content
stringlengths
1
15.9M
\section{Вступ} Робота присвячена дослідженню режимів хвильового ядерного горіння (ХЯГ) реакторного палива на основі торію-232 для хвильових реакторів V покоління, які будуть працювати у режимі хвильового ядерного горіння (ХЯГ). Таки ядерні реактори є реакторами з так званою внутрішньою безпекою. Основний принцип роботи реактора з внутрішньою безпекою виконується коли паливні компоненти структуровані так, щоб, по-перше, його характерний час регулювання був набагато більше хвилини, по-друге, щоб в режимі його роботи з'явилися елементи саморегулювання \cite{1,2,3,4,5}. Цього можна досягти, якщо в активній зоні реактора, крім інших реакцій, має місце наступний ланцюжок перетворень: \begin{equation} {}^{232}Th(n,\gamma )\to {}^{233}Th\stackrel{\beta ^{-} }{\longrightarrow} {}^{233}Pa\stackrel{\beta ^{-} }{\longrightarrow} {}^{233}U . \label{eq01} \end{equation} \noindent де ${}^{232}$Th, ${}^{233}$U, ${}^{233}$Pa є відповідні ізотопи торію, урану і протактинію. У цьому випадку утворюється ${}^{233}$U, який є основним компонентом подільної речовини. Характерний час цієї реакції відповідає часу двох $\beta^{-}$ розпадів, що дорівнює приблизно $\tau = 27.4 / \ln 2 = 39.53$~діб, що на кілька порядків більше, ніж для запізнілих нейтронів, що в свою чергу дає нам чимало часу для маневрування реактором. Дане перетворення і буде розглянуто в рамках даної роботи. Ефект саморегулювання пов'язаний з тим, що збільшення потоку нейтронів призведе до швидкого вигоряння ${}^{233}$U, зменшення його концентрації і відповідно потоку нейтронів (утворення нових ядер ${}^{233}$U буде йти в колишньому темпі приблизно протягом 40 діб). Якщо ж, навпаки, потік нейтронів в результаті зовнішнього втручання зменшиться, то знижується швидкість вигоряння і збільшиться темп напрацювання подільної речовини (в даному випадку ${}^{233}$U) з подальшим збільшенням числа виділених нейтронів в реакторі через приблизно такий самий час. Досить повна математична модель активної зони реактора повинна включати в себе моделі нестаціонарних тривимірних процесів переносу нейтронів в сильно неоднорідному середовищі, вигоряння палива і реакторної кінетики, а також модель відведення тепла. В роботах \cite{1,2} для U-Pu паливного середовища було розглянуто можливість реалізації режиму ХЯГ при деяких спрощеннях кінетичної системи рівнянь, що описують режим ХЯГ: розглядається одновимірне середовище, фіксована енергія нейтронів (одногрупове наближення); не враховується дифузія нейтронів; кінетичне рівняння для ${}^{239}$Pu написано в припущенні, що ${}^{238}$U безпосередньо переходить в ${}^{239}$Pu з деяким характерним часом $\beta $ розпаду $\tau _{\beta } $; не враховуються запізнілі нейтрони і температура середовища, що поділяється. У роботі \cite{1} отримані вирази для нерівноважно-стаціонарної $N_{N{\rm .}S{\rm .}}^{Pu} $ (в \cite{1} рівноважної) і критичної $N_{crit}^{Pu}$ концентрації нукліда (${}_{{\rm 94}}^{{\rm 239}} Pu$), що поділяється. Ці вирази були адаптовані для задачі, що розглядається у даній роботі, а саме, було замінено нуклід ${}^{239}$Pu, що поділяється, на нуклід ${}^{233}$U. Відповідно, перше завантаження палива складається з ${}^{232}$Th з невеликим збагаченням по ${}^{239}$Pu, тому згідно з відповідним ланцюжком розпаду (\ref{eq01}), отримуємо: \begin{equation} N_{N{\rm .}S{\rm .}}^{U{\rm 233}} \left(E_{n} \right)\approx \frac{\sigma _{c}^{Th{\rm 232}} \left(E_{n} \right)}{\sigma _{c}^{U{\rm 233}} \left(E_{n} \right)+\sigma _{f}^{U233} \left(E_{n} \right)} N^{Th{\rm 232}} =\frac{\sigma _{c}^{Th{\rm 232}} \left(E_{n} \right)}{\sigma _{a}^{U{\rm 233}} \left(E_{n} \right)} N^{Th{\rm 232}} \label{eq02} \end{equation} \begin{equation} N_{crit}^{U{\rm 233}} \left(E_{n} \right)\approx \frac{\sum _{i\ne U{\rm 233}}\sigma _{a}^{i} \left(E_{n} \right) N^{i} -\sum _{i\ne U{\rm 233}}\nu _{i} \sigma _{f}^{i} \left(E_{n} \right)N^{i} }{(\nu _{U{\rm 233}} -{\rm 1})\sigma _{f}^{U{\rm 233}} \left(E_{n} \right)-\sigma _{c}^{U{\rm 233}} \left(E_{n} \right)} \label{eq03} \end{equation} \noindent де $\sigma _{c}^{i} ,\sigma _{f}^{i} ,\sigma _{a}^{i}$ - мікроперерізи реакцій радіаційного захоплення нейтрона, поділу і поглинання, відповідно для \textit{i }--го нукліду середовища, що поділяється; $\tau _{\beta }$- характерний час для двох $\beta$- розпадів, що перетворюють ${}_{90}^{233}$Th (${}_{90}^{233}$Th утворюється при радіаційному захопленні нейтронів ${}_{90}^{232}$Th) в ${}_{91}^{233}$Pa, а останній у ${}_{91}^{233}$U; $\nu _{i} $ і $\nu _{U233} $- середнє число нейтронів, що народжуються при поділі одного ядра \textit{i}-го нукліда і ${}_{91}^{233}$U відповідно. Критерій ХЯГ має вигляд умови $N_{N{\rm .}S{\rm .}}^{U{\rm 233}} $$>$$N_{crit}^{U{\rm 233}} $ та його вперше було сформульовано у \cite{1}. Наочно розвиток подій можна уявити собі таким чином. Нейтрони, що випускаються зовнішнім джерелом, у паливному середовищі на відстані довжини пробігу поглинаються ${}^{232}$Th і утворюють ${}^{233}$U, що поділяється. По мірі накопичення ${}^{233}$U у найближчій до зовнішнього джерела нейтронів області палива процеси поділу ядер ${}^{233}$U посилюються, та при виконанні умови $N_{N{\rm .}S{\rm .}}^{U{\rm 233}} $$>$$N_{crit}^{U{\rm 233}} $ внаслідок швидкого розвитку ланцюгового процесу, у ній реалізується режим ядерного горіння. В свою чергу внаслідок реалізації режиму ядерного горіння у локальній області палива, нейтронів у ній стає досить, щоб запалити сусідню до неї, але більш віддалену від зовнішнього джерела нейтронів область палива. Після того, як центр енерговиділення зміщується вглиб, послаблюється роль зовнішнього джерела, система поступово виходить в стаціонарний режим. \par Амереканська компанія ``Terra-power'' перша заявила про розробку швидкого ядерного реактора, що працює в режимі ХЯГ. Цей реактор отримав назву TWR (Traveling-Wave Reactor) \cite{6,7,8,9,10}. Навіть були оформлені патенти на реактори TWR \cite{10,11,12,13,14}, засновані на ідеї хвилі ядерного горіння, що біжить по паливу \cite{1,2,3,4,5,6,7,8,9}. Але в ході наукових обговорень про реалізацію проекту реактора TWR було виявлено деякі проблеми технічного характеру, головна з яких -- радіаційна стійкість конструкційного матеріалу першої стінки ТВЕЛа, тому найбільш важливим для технічної реалізації хвильових реакторів представляється необхідність пошуку рішення проблеми дії високої інтегральної дози швидких нейтронів на конструкційні матеріали, що іх пошкоджує, у хвильових ядерних реакторів. Як свідчать результати математичних моделювань (наприклад, \cite{3}) для режимів хвильового ядерного горіння радіаційна дія на конструкційні матеріали може досягати $\sim$500 ЗНА (зміщень на атом). Причому, на сьогодні конструкційних матеріалів, які витримують такий радіаційний вплив, поки ще не створено, і максимально досягнуте радіаційне навантаження для діючих реакторних металів дорівнює 100 ЗНА. Вирішенням даної проблеми є реалізація режиму XЯГ не на швидких нейтронах, а на теплових нейтронах або надтеплових нейтронах \cite{15}. \section{Вплив збагачення по ${}^{239}$Pu на виконання критерію ХЯГ в торій-урановому подільному середовищі при енергіях нейтронів 0.015-10~еВ} \label{sec01} Для паливного середовища із ${}^{232}$Th, що збагачено ${}^{239}$Pu, та для області енергій нейтронів 0.015-10~еВ відповідно до рівнянь (\ref{eq02}) і (\ref{eq03}) були проведені розрахунки нерівноважно-стаціонарної і критичної концентрацій ${}^{233}$U. Результати розрахунків представлені на рис.~\ref{fig01}. Важливим моментом є первинне бомбардування палива нейтронами, тобто миттєвий поділ ядер ${}^{239}$Pu нейтронами, для насичення активної зони необхідним потоком нейтронів необхідним для ХЯГ. Такий процес зменшить час використання зовнішнього джерела нейтронів, який застосовують при первинному запуску будь-якого реактора, а також надасть можливості підтримання ядерної реакції до виходу її у стаціонарний режим. Результати, представлені на рис.~\ref{fig01}, свідчать про те, що для паливного середовища, яке складається з ${}^{232}$Th із збагаченням 2\% по ${}^{239}$Pu (рис.~\ref{fig01}а), критична концентрація ${}^{233}$U більше нуля лише для інтервалу енергій нейтронів $1\div$10~еВ. Для інших діапазонів енергій нейтронів критерій ХЯГ не виконується. Таким чином, якщо сформувати такий склад палива, щоб спектр нейтронів підтримувався постійно в зазначеному інтервалі енергій, то можлива реалізація такого хвильового ядерного реактора. Але в подальшому для реалізації стаціонарного ХЯГ потрібно підбирати склад та структуру активної зони реактора, яка повинна містити сповільнювач нейтронів. \begin{figure}[ht] \center{\includegraphics[width=1\linewidth]{1}} \vskip-3mm\caption{Залежність нерівноважно-стаціонарної та критичної концентрації ${}^{233}$U по енергії нейтронів в шкалі від 0.015$\div$10~еВ, який першочергово складається з ${}^{232}$Th зі збагаченням: a) 2\%; b) -- 1\%; c) --0.5\% по ${}^{239}$Pu.} \label{fig01} \end{figure} Аналогічний аналіз представлених на (рис.~\ref{fig01}b,c) результатів дозволяє зробити висновок про те, що при зменшенні збагачення від 1\% до 0.5\% по ${}^{239}$Pu, відбувається розширення області енергій нейтронів, в якій критична концентрація ${}^{233}$U більше нуля, в сторону теплових енергій нейтронів, причому при концентрації 0.5\% по ${}^{239}$Pu, у всіх цих областях енергій нейтронів виконується критерій ХЯГ, тобто, можлива реалізація режиму хвильового нейтронно-ядерного горіння на теплових нейтронах. Оскільки зі зменшенням збагачення область енергій нейтронів, в яких виконуються критерій ХЯГ, розширюється, відповідно можна зробити припущення, що при збагаченні ${}^{232}$Th по ${}^{239}$Pu слід виконувати тільки для «підпалу» ланцюгової реакції, або кажучи іншими словами, для насичення активної зони необхідним потоком нейтронів. При опроміненні нейтронами нейтронного джерела паливного середовища буде відбуватися поділ ${}^{239}$Pu, і по мірі його вигоряння, це також дає нейтрони для активації ${}^{232}$Th, який після захвату нейтронів переходить у ${}^{233}$Th, який через 39.5~діб перейде в потрібний нам нуклід ${}^{233}$U, що поділяється. Даний ізотоп урану в свою чергу почне поділ під дією нейтронів. Після поступового вигоряння ${}^{239}$Pu до концентрації менше 0.5\% від загального завантаження палива (рис.~\ref{fig01}) і насичення активної зони потрібним потоком нейтронів, ланцюгова ядерна реакція зможе підтримувати сама себе, і відповідно, реалізується стаціонарна ХЯГ. \section{Моделювання нейтронно-ядерного горіння торію-232 для теплової області енергії нейтронів} \label{sec02} Для підтвердження справедливості вищенаведених оцінок і висновків, заснованих на аналізі виконання критерію повільного хвильового нейтронно-ядерного горіння в залежності від енергії нейтронів, було проведено чисельне моделювання нейтронно-ядерного горіння ${}^{232}$Th в тепловій області енергій нейтронів (0.015-10 еВ). Розглянемо напівпростір по координаті \textit{x}, заповнений ${}^{232}$Th (99.5\% ${}^{232}$Th і 0.5\% ${}^{239}$Pu), котрий опромінюється з відкритої поверхні нейтронним джерелом. Торій-232, якщо він поглинає нейтрон, перетворюється на ${}^{233}$Th, який потім внаслідок двох $\beta $-розпадів з характерним часом $\tau _{\beta } $- 39.5~діб переходить в ізотоп ${}^{233}$U. Як показано вище, в такому середовищі може виникнути повільна хвиля нейтронно-подільного горіння. З урахуванням запізнілих нейтронів кінетика такої хвилі описується системою із 19 диференційних рівнянь у вигляді частинних похідних зі зворотними нелінійними зв'язками щодо 19 функцій $n\;\left(x,t\right)$, $N_{Pu} \left(x,t\right)$, $N_{Th{\rm 2}} \left(x,t\right)$, $N_{Th{\rm 3}} \left(x,t\right)$, $N_{U3} \left(x,t\right)$, $\tilde{N}_{i}^{\left(U3\right)} \left(x,t\right)$, $\tilde{N}_{i}^{\left(Pu\right)} \left(x,t\right)$, $\bar{N}^{\left(U3\right)} \left(x,t\right)$, $\bar{N}^{\left(Pu\right)} \left(x,t\right)$ двох змінних \textit{x} і \textit{t}, яка може бути записана наступним чином. Спочатку випишемо кінетичне рівняння для щільності потоку нейтронів: \begin{equation} \frac{\partial \; n\; \left(x,t\right)}{\partial \; t} =D\; \Delta \; n\; \left(x,t\right)+q\; \left(x,t\right) \end{equation} \noindent де об'ємна щільність джерела: \begin{align} q(x,t) & = \Bigg[\nu^{(U3)} ({\rm 1}-p^{(U3)} )-{\rm 1}]\cdot n(x,t)\cdot V_{n} \cdot \sigma_{f}^{U3} \cdot N_{U3} (x,t) \nonumber \\ & +[\nu ^{(Pu)} ({\rm 1}-p^{(Pu)} )-{\rm 1}]\cdot n(x,t)\cdot V_{n} \sigma _{f}^{Pu} \cdot N_{Pu} (x,t)+ \nonumber \\ & +{\rm ln2}\cdot \sum _{i={\rm 1}}^{{\rm 6}}[\frac{\tilde{N}_{i^{(U3)} } }{T_{{\rm 1}/{\rm 2}}^{i^{(U3)} } } +\frac{\tilde{N}_{i^{(Pu)} } }{T_{{\rm 1}/{\rm 2}}^{i^{(Pu)} } }] - n(x,t)\cdot V_{n} \cdot \nonumber \\ & \cdot \bigg[\sum _{Pu,Th{\rm 2,}Th{\rm 3,}U3}\sigma _{c}^{i} \cdot N_{i} (x,t)+\sum _{i={\rm 1}}^{{\rm 6}}[\sigma _{c}^{i\; (U3)} \cdot \tilde{N}_{i}^{(U3)}(x,t)+\sigma _{c}^{i\; (U5)} \cdot \tilde{N}_{i_{i} }^{Pu} (x,t)] \bigg] \Bigg] \nonumber \\ & -n(x,t)\cdot V_{n} \cdot \left[\sigma _{c}^{eff\left(U3\right)} \cdot \bar{N}^{\left(U3\right)} (x,t)+\sigma _{c}^{eff\left(Pu\right)} \cdot \bar{N}^{\left(Pu\right)} (x,t)\right] \label{eq05} \end{align} \noindent де $n\; \left(x,t\right)$ -- щільність нейтронів; $D$ -- коефіцієнт дифузії нейтронів; \textit{V${}_{n}$} -- швидкість нейтронів; $\nu ^{\left(U3\right)} $ і $\nu ^{\left(Pu\right)} $ дорівнюють середньому числу миттєвих нейтронів на один акт поділу ${}^{233}$U і ${}^{239}$Pu відповідно; $N_{Pu} $,$N_{Th{\rm 2}} $,$N_{Th{\rm 3}} $,$N_{U3} $ -- концентрації ${}^{239}$Pu, ${}^{232}$Th, ${}^{233}$Th, ${}^{233}$U відповідно; $\tilde{N}_{i}^{\left(U3\right)} $і $\tilde{N}_{i}^{\left(Pu\right)} $ -- концентрації нейтронно-надлишкових уламків поділу ядер ${}^{233}$U і ${}^{239}$Pu; $\bar{N}_{i}^{\left(U3\right)} $ і $\bar{N}_{i}^{\left(Pu\right)} $ -- концентрації всіх інших уламків поділу ядер ${}^{233}$U і ${}^{239}$Pu; $\sigma _{c}$ і $\sigma _{f}$ -- мікроперерізи реакцій радіаційного захоплення нейтрона та поділу ядра; параметри $p_{i} (p= \sum _{i=1}^{6} p_i)$ і $T_{1/2}^{i}$, характеризують групи запізнілих нейтронів для основних паливних нуклідів, взяті з \cite{16,17,18}. Відзначимо, що при виводі рівняння для $q(x,t)$ для врахування запізнілих нейтронів використовувався метод Ахієзера-Померанчука \cite{18}. Останні члени в квадратних дужках в правій частині (\ref{eq05}) задавалися відповідно до методу усередненого ефективного перерізу для шлаків \cite{17}: \begin{equation} n(x,t)V_{n} \sum _{i=fission\; fragments}\sigma _{c}^{i} \bar{N}_{i} (x,t)=n(x,t)V_{n} \sigma _{c}^{eff} \bar{N}(x,t) \end{equation} \noindent де $\sigma _{c}^{eff} $ -- деякий ефективний мікропереріз радіаційного захоплення нейтронів для уламків. Кінетичні рівняння для$\bar{N}^{\left(U3\right)} $(\textit{x}, \textit{t}) і $\bar{N}^{\left(Pu\right)} $(\textit{x}, \textit{t}) мали наступну форму: \begin{equation} \frac{\partial \bar{N}^{\left(U3\right)} (x,t)}{\partial t} ={\rm 2}\left({\rm 1}-\sum _{i={\rm 1}}^{{\rm 6}}p_{i}^{\left(U3\right)} \right)\cdot n(x,t)\cdot V_{n} \cdot \sigma _{f}^{U3} \cdot N_{U3} (x,t)+\sum _{i={\rm 1}}^{{\rm 6}}\frac{\tilde{N}_{i}^{(U3)} {\rm ln2}}{T_{{\rm 1}/{\rm 2}}^{i\; (U3)} } \end{equation} і \begin{equation} \frac{\partial \bar{N}^{\left(Pu\right)} (x,t)}{\partial t} ={\rm 2}\left({\rm 1}-\sum _{i={\rm 1}}^{{\rm 6}}p_{i}^{\left(Pu\right)} \right)\cdot n(x,t)\cdot V_{n} \cdot \sigma _{f}^{Pu} \cdot N_{U5} (x,t)+\sum _{i={\rm 1}}^{{\rm 6}}\frac{\tilde{N}_{i}^{(Pu)} {\rm ln2}}{T_{{\rm 1}/{\rm 2}}^{i\; (Pu)} } \end{equation} Отже, маємо таку систему з 19 кінетичних рівнянь: \begin{equation} \frac{\partial \; n\; \left(x,t\right)}{\partial \; t} =D\; \Delta \; n\; \left(x,t\right)+q\left(x,t\right) \label{eq09} \end{equation} \noindent де $q(x,t)$ задається виразом (\ref{eq05}); \begin{equation} \frac{\partial \; N_{Th{\rm 2}} \left(x,t\right)}{\partial \; t} =-\; V_{n} n\left(x,t\right)\; \sigma _{c}^{Th{\rm 2}} \; N_{Th{\rm 2}} \left(x,t\right); \end{equation} \begin{equation} \frac{\partial \; N_{Th{\rm 3}} \left(x,t\right)}{\partial \; t} =V_{n} n\left(x,t\right)\; \left [\; \sigma _{c}^{Th{\rm 2}} \; N_{Th{\rm 2}} \left(x,t\right)-\sigma_{c}^{Th{\rm 3}} \; N_{Th{\rm 3}} \left(x,t\right)\right]\;-\frac{{\rm 1}}{\tau _{\beta } } N_{Th{\rm 3}} (x,t); \end{equation} \begin{equation} \frac{\partial \; N_{U3} \left(x,t\right)}{\partial \; t} =\frac{{\rm 1}}{\tau _{\beta } } N_{Th{\rm 3}} \left(x,t\right)-\; V_{n} n\left(x,t\right)\left(\sigma _{f}^{U3} +\sigma _{c}^{U3} \right)\; N_{U3} \left(x,t\right)\; ; \end{equation} \begin{equation} \frac{\partial \; N_{Pu} \left(x,t\right)}{\partial \; t} =-\; V_{n} n\left(x,t\right)\; \left(\sigma _{f}^{Pu} +\sigma _{c}^{Pu} \right)\; N_{Pu} \left(x,t\right); \end{equation} \begin{equation} \frac{\partial \tilde{N}_{i}^{\left(U3\right)} \left(x,t\right)}{\partial t} =p_{i}^{\left(U3\right)} \cdot V_{n} \cdot n\; \left(x,t\right)\; \cdot \sigma _{f}^{U3} \cdot N_{U3} \left(x,t\right)-\frac{{\rm ln2}\cdot \tilde{N}_{i}^{\left(U3\right)} \left(x,t\right)}{T_{{\rm 12}}^{i\; \left(U3\right)} } ,\quad i={\rm 1,}\; {\rm 6} \end{equation} \begin{equation} \frac{\partial \tilde{N}_{i}^{\left(Pu\right)} \left(x,t\right)}{\partial t} =p_{i}^{\left(Pu\right)} \cdot V_{n} \cdot n\; \left(x,t\right)\; \cdot \sigma _{f}^{Pu} \cdot N_{Pu} \left(x,t\right)-\frac{{\rm ln2}\cdot \tilde{N}_{i}^{\left(Pu\right)} \left(x,t\right)}{T_{{\rm 12}}^{i\; \left(Pu\right)} } ,\quad i={\rm 1,}\; {\rm 6} \end{equation} \begin{equation} \frac{\partial \bar{N}^{\left(U3\right)} (x,t)}{\partial t} ={\rm 2}\left({\rm 1}-\sum _{i={\rm 1}}^{{\rm 6}}p_{i}^{\left(U3\right)} \right)\cdot n(x,t)\cdot V_{n} \cdot \sigma _{f}^{U3}\cdot N_{U3} (x,t)+\sum _{i={\rm 1}}^{{\rm 6}}\frac{\tilde{N}_{i}^{\left(U3\right)} {\rm ln2}}{T_{{\rm 1}/{\rm 2}}^{i\; \left(U3\right)} } \end{equation} \begin{equation} \frac{\partial \bar{N}^{\left(Pu\right)} (x,t)}{\partial t} ={\rm 2}\left({\rm 1}-\sum _{i={\rm 1}}^{{\rm 6}}p_{i}^{\left(Pu\right)} \right)\cdot n(x,t)\cdot V_{n} \cdot \sigma _{f}^{Pu} \cdot N_{Pu} (x,t)+\sum _{i={\rm 1}}^{{\rm 6}}\frac{\tilde{N}_{i}^{\left(Pu\right)} {\rm ln2}}{T_{{\rm 1}/{\rm 2}}^{i\; \left(Pu\right)} } \label{eq17} \end{equation} \noindent де $\tau _{\beta} $ -- час життя ядра відносно $\beta$-розпаду. Граничні умови: \begin{equation} n\;\left(x,t\right)|_{x={\rm 0}} =\frac{\Phi _{{\rm 0}} }{V_{n} }; \qquad n\;\left(x,t\right)|_{x=l} ={\rm 0} \label{eq18} \end{equation} \noindent де $\Phi_0 $ -- щільність нейтронів, що створюються пласким дифузійним джерелом нейтронів, розташованим на границі при $x=0$; $l$ -- довжина блоку з природного урану, що задається при моделюванні. Початкові умови: \begin{equation} n\; \left(x,t\right)|_{x={\rm 0,}t={\rm 0}} =\frac{\Phi _{{\rm 0}} }{V_{n} }; \qquad n\; \left(x,t\right)|_{x\ne {\rm 0,}\; t={\rm 0}} ={\rm 0} \end{equation} \begin{multline} N_{Th{\rm 2}} \left(x,t\right)|_{t={\rm 0}} ={\rm 0,995}\cdot \frac{\rho _{Th{\rm 2}} }{\mu _{Th{\rm 2}} } N_{A} \approx {\rm 0,995}\cdot \frac{{\rm 11},{\rm 78}}{{\rm 232}} N_{A};\\ \quad N_{Pu} \left(x,t\right)|_{t={\rm 0}} \approx {\rm 0,005}\cdot \frac{{\rm 19},{\rm 8}4}{{\rm 239}} N_{A} \end{multline} \noindent де $\rho _{Th{\rm 2}} $ -- густина (г/см${}^{3}$) торію-232, $\mu _{Th{\rm 2}} $ -- моль (г/моль${}^{-1}$) торію-232, $N_{A} $ - число Авогадро; \begin{multline} {N}_{Th{\rm 3}} \left(x,t\right)|_{t={\rm 0}} ={\rm 0,}\quad {N}_{U3} (x,t)|_{t={\rm 0}} ={\rm 0,}\\ \tilde{N}_{i}^{\left(U3\right)} (x,t)|_{t={\rm 0}} ={\rm 0,}\quad \tilde{N}_{i}^{\left(Pu\right)} (x,t)|_{t={\rm 0}} ={\rm 0}\;\\ \bar{N}_{i}^{\left(U3\right)} (x,t)|_{t={\rm 0}} ={\rm 0,}\quad \bar{N}_{i}^{\left(Pu\right)} (x,t)|_{t={\rm 0}} ={\rm 0} \label{eq21} \end{multline} Чисельне рішення системи рівнянь (\ref{eq09}) - (\ref{eq17}) з граничними і початковими умовами (\ref{eq18}) - (\ref{eq21}) проводилося за допомогою програмного пакета Mathematica 8. Для оптимізації процесу чисельного рішення системи рівнянь, було здійснено перехід до безрозмірних величин, згідно з наступними співвідношеннями: \begin{equation} n\; \left(x,t\right)=\frac{\Phi _{{\rm 0}} }{V_{n} } n(x,t), N(x,t)=\frac{\rho _{Th{\rm 2}} N_{A} }{\mu _{Th{\rm 2}} } N(x,t) \label{eq22} \end{equation} \begin{table}[ht!] \noindent \caption{Значення постійних коефіцієнтів диференційних рівнянь \cite{15,16,17,18}} \begin{center} \begin{tabular}{|p{2in}|p{0.9in}|p{0.7in}|p{0.7in}|p{0.7in}|} \hline \multicolumn{2}{|p{1in}|}{Характеристики нуклідів} & ${}^{232}$Th--${}^{233}$U & \multicolumn{2}{|p{1.2in}|}{99.5\% (${}^{232}$Th -- ${}^{233}$U) + 0.5\% ${}^{239}$Pu} \\ \hline Дифузія нейтрона & D, cм${}^{2}$/c & $2 \cdot 10^{-4}$ & \multicolumn{2}{|p{1.2in}|}{$2 \cdot 10^{-4}$} \\ \hline Швидкість нейтрона & V${}_{n}$, cм/c & $10^{6}$ & \multicolumn{2}{|p{1.2in}|}{$10^{6}$} \\ \hline Потік нейтронів & $\Phi_0$, 1/(cм${}^{2}$·c) & $10^{16}$ & \multicolumn{2}{|p{1.2in}|}{$10^{16}$} \\ \hline Переріз захоплення ${}^{232}$Th & $\sigma_c$ , барн & 3.06 & \multicolumn{2}{|p{1.2in}|}{3.06} \\ \hline Переріз захоплення ${}^{233}$Th & $\sigma_c$, барн & 14.59 & \multicolumn{2}{|p{1.2in}|}{14.59} \\ \hline Час двох бета розпадів & $\tau $, діб & 39.5 & \multicolumn{2}{|p{1.2in}|}{-} \\ \hline & & ${}^{233}$U & ${}^{233}$U & ${}^{239}$Pu \\ \hline Середня кількість народжених нейтронів в одному акті поділу & $\nu $ & 2.52 & 2.52 & 2.91 \\ \hline Переріз поділу & $\sigma_f$, барн & 260.68 & 260.6 & 477.0 \\ \hline Переріз захоплення & $\sigma_c$, барн & 52.97 & 52.97 & 286.1 \\ \hline \multirow{6}{2in}{Період напіврозпаду ядер- попередників залежно від групи запізнілих нейтронів} & T${}_{1}$, c & 55 & 55 & 54.28 \\ \cline{2-5} & T${}_{2}$, c & 20.57 & 20.57 & 23.04 \\ \cline{2-5} & T${}_{3}$, c & 5 & 5 & 5.6 \\ \cline{2-5} & T${}_{4}$, c & 2.13 & 2.13 & 2.13 \\ \cline{2-5} & T${}_{5}$, c & 0.62 & 0.62 & 0.62 \\ \cline{2-5} & T${}_{6}$, c & 0.28 & 0.28 & 0.26 \\ \hline \multirow{6}{2in}{Частка запізнілих нейтронів в залежності від їх групи} & $\beta_1$, $10^{-3}$ & 0.224 & 0.224 & 0.072 \\ \cline{2-5} & $\beta_2$, $10^{-3}$ & 0.776 & 0.776 & 0.626 \\ \cline{2-5} & $\beta_3$, $10^{-3}$ & 0.654 & 0.654 & 0.444 \\ \cline{2-5} & $\beta_4$, $10^{-3}$ & 0.725 & 0.725 & 0.685 \\ \cline{2-5} & $\beta_5$, $10^{-3}$ & 0.134 & 0.134 & 0.18 \\ \cline{2-5} & $\beta_6$, $10^{-3}$ & 0.087 & 0.087 & 0.093 \\ \cline{2-5} & $\beta_?$, $10^{-3}$ & 2.6 & 2.6 & 2.1 \\ \hline Довжина реактора\textit{} & \textit{l, }см & 100 & 100 & 100 \\ \hline \end{tabular} \end{center} \label{tab01} \end{table} Відзначимо, що перерізи нейтронно-ядерних реакцій для нуклідів, наведених вище, задавалися їх усередненими значеннями по області енергій нейтронів (0.015$\div$10 еВ). При розрахунку, результати якого представлені нижче на рис.~\ref{fig02} - \ref{fig06}~a),~b),~c), використовуються значення із таблиці~\ref{tab01}, де час моделювання ХЯГ 360~діб, крок за часом $\Delta t=$50~хв, крок по просторовій координаті $\Delta x= 0.01$~см. \begin{figure}[ht] \noindent\centering{\includegraphics[width=12cm]{2}} \vskip-3mm \caption{Кінетика нейтронів при хвильовому нейтронно-ядерному горінні торію зі збагаченням по ${}^{239}$Pu, залежність знерозміреної щільності нейтронів від просторової координати $n(x)$ для моменту часу розрахунку: а) \textit{t~=~}72~діб; b) \textit{t~=~}216~діб; c) \textit{t~=~}360~діб.} \label{fig02} \end{figure} Звичайно, хотілося б провести розрахунок для значно більшого часу комп'ютерного експерименту, і щоб крок за часом мати $\Delta t\approx {\rm 10}^{-{\rm 5}} \div {\rm 10}^{-{\rm 7}} \; c$, але при виборі зазначених вище параметрів, що задаються при розрахунку, були обмежені наявними обчислювальними ресурсами. Представлені на рис.~\ref{fig02}-\ref{fig06} результати чисельного моделювання хвильового нейтронно-ядерного горіння торію зі збагаченням по ${}^{239}$Pu в тепловій області енергій нейтронів (0.015$\div$10 еВ) свідчать про реалізацію такого режиму. Дійсно, на рис.~\ref{fig06} ми бачимо хвильове горіння ${}^{233}$U, що можна помітити по збільшенню концентрації нукліда, що поділяється, в зоні горіння, а згодом і зменшенням його концентрації при зростанні швидкості його вигоряння. А також на рис.~\ref{fig06} ми бачимо динаміку зміщення максимальної концентрації ${}^{233}$U по довжині палива у відповідності зі збільшенням часу горіння, тобто бачимо хвилю ядерного горіння, що біжить по паливу. При цьому згідно з рис.~\ref{fig03} і \ref{fig04}, ${}^{232}$Th і ${}^{235}$U поступово вигорають. Слід зазначити, що представлені на рис.~\ref{fig02} результати кінетики для щільності нейтронів не демонструють нейтронну хвилю. Пояснюється це тим, що чисельно вирішувалася система диференціальних рівнянь щодо знерозмірених (згідно співвідношенням (\ref{eq22})) змінних і при знерозмірюванні, щільність нейтронів ділилася на щільність потоку зовнішнього джерела, який при розрахунку задавався спеціально завищеним значенням з метою скоротити час розрахунку і рівним $\Phi_0 = 1.0 \cdot 10^{16}$ см${}^{-2}$с${}^{-1}$, тому відмінність масштабів величин щільності потоку зовнішнього джерела і щільності потоку нейтронів в області ядерного горіння в режимі усталеного хвильового горіння не дозволяє бачити нейтронну хвилю. \begin{figure}[htbp!] \center{\includegraphics[width=12cm]{3}} \vskip-3mm \caption{Кінетика щільності ядер ${}^{232}$Th при хвильовому нейтронно-ядерному горінні торію зі збагаченням по ${}^{239}$Pu, залежність знерозміреної щільності ядер ${}^{232}$Th від просторової координати $N^{Th{\rm 232}} \; \left(x\right)$ для моменту часу розрахунку: a) \textit{t =~}72~діб; b) з \textit{t =~}216~діб; c) \textit{t =~}360~діб.} \label{fig03} \end{figure} \begin{figure}[htbp!] \center{\includegraphics[width=12cm]{4}} \vskip-3mm\caption{Кінетика щільності ядер ${}^{239}$Pu при хвильовому нейтронно-ядерному горінні торію зі збагаченням по ${}^{239}$Pu, залежність знерозміреної щільності ядер ${}^{239}$Pu від просторової координати $N^{{\rm Pu239}} \; \left(x\right)$ для моменту часу розрахунку: a) \textit{t =~}72~діб; b) \textit{t =~}216~діб; c) \textit{t =~}360~діб.} \label{fig04} \end{figure} \begin{figure}[htbp!] \center{\includegraphics[width=12cm]{5}} \vskip-3mm\caption{Кінетика щільності ядер ${}^{233}$Th при хвильовому нейтронно-ядерному горінні торію зі збагаченням по ${}^{239}$Pu, залежність знерозміреної щільності ядер ${}^{233}$Th від просторової координати $N^{Th{\rm 233}} \; \left(x\right)$ для моменту часу розрахунку: a) \textit{t =}72 діб; b) \textit{t =~}216~діб; c) \textit{t =~}360~діб.} \label{fig05} \end{figure} \begin{figure}[htbp!] \center{\includegraphics[width=12cm]{6}} \vskip-3mm\caption{Кінетика щільності ядер ${}^{233}$U при хвильовому нейтронно-ядерному горінні торію зі збагаченням по ${}^{239}$Pu, залежність знерозміреної щільності ядер ${}^{233}$U від просторової координати $N^{U{\rm 233}} \; \left(x\right)$ для моменту часу розрахунку: a)\textit{ t =~}72 діб; b) \textit{t =~}216 діб; c) \textit{t =~}360 діб.} \label{fig06} \end{figure} Можливо також, що зміщення хвилі нейтронів уздовж просторової координати не видно на рис.~\ref{fig02} при зазначеній щільності нейтронів, оскільки на нього накладається горіння ${}^{239}$Pu. Дійсно, результати моделювання кінетики щільності ядер ${}^{239}$Pu, представлені на рис.~\ref{fig04}, показують, що ${}^{239}$Pu бере участь в поділі для наповнення активної зони нейтронами на етапі підпалу, а його початкова концентрація дорівнює 0.5\% та лише через 72 доби вона стає менше на $\sim$0.15\%. Через 360 діб концентрація ${}^{233}$U стане вдвічі більшою (згідно з рис.~\ref{fig06} дорівнює \~{}1\%). Підкреслимо те, що згідно з результатами, представленими на рис.~\ref{fig06}, хвиля повільного нейтронно-ядерного горіння ${}^{233}$U сформувалася за час моделювання, яке дорівнювало 360 діб. \section{Висновки} Представлені результати дослідження виконання критерію ХЯГ, тобто можливості хвильового ядерного горіння для середовища, що поділяється та спочатку складається з ${}^{232}$Th зі збагаченням 2\%, 1\% і 0.5\% по ${}^{239}$Pu, для області енергій нейтронів 0.015-10~еВ. Ці результати свідчать про виконання критерію ХЯГ, тобто про можливість реалізації режиму хвильового нейтронно-ядерного горіння торій-уранових паливних середовищ, що спочатку (до процесу ініціації хвильового режиму горіння за допомогою зовнішнього джерела нейтронів) мають збагачення по ${}^{239}$Pu, відповідні підкритичним станам в області теплових, надтеплових і проміжних нейтронів. Вперше для підтвердження справедливості висновків з розділів \ref{sec01} і \ref{sec02} проведено моделювання хвильового ядерного горіння вказаного вище паливного торієвого середовища протягом 360 діб для діапазону енергій нейтронів (0.01-10~еВ). Отримані та представлені у роботі результати доводять реалізацію режиму хвильового ядерного горіння в області теплових та надтеплових енергій. Перевагами такого паливного середовища з торію для реактора, який буде працювати у режимі хвилі ядерних поділів, що біжить, є: \begin{itemize} \item саморегулювання хвилі за часовим параметром, який дорівнює майже 40 діб, що значно перевищує такий само часовий параметр для ХЯГ в уран-плутонієвому паливному середовищі, який дорівнює 3.3 добам, що одночасно вказує на більшу безпеку такого режиму горіння; \item при поділі торію утворюється значно менша кількість довговічних продуктів поділу та актинідів, таких як нептуній, америцій і самарій. Вихід нептунію, америцію і самарію в $\sim 10^2$, $\sim 10^5$ і $\sim 10^{6}$ разів відповідно менше ніж при урановому циклі. Так само після 10-річного відстою використаного палива розпадається більшість продуктів поділу ${}^{233}$U \cite{19}, що значно спрощує завдання локалізації та захоронення РАВ \cite{19}. \item приблизна концентрація торію \cite{19,20} в земній корі в 3-4 рази більша, ніж урану. \item використання палива із торієвого сольового розтопу дасть можливість повністю уникнути використання легкої води в якості теплоносія, яка може розкластися на кисень і вибухонебезпечний водень. \end{itemize} Найбільш цікавими є області енергій нейтронів від 0.015-10~еВ, оскільки при даних значеннях знімається питання радіаційної стійкості матеріалів \cite{3,15} (оболонки активної зони) і відповідно, меншої товщини захисної оболонки. Однак існують проблеми \cite{19} при використанні паливної матриці у вигляді металу або двоокису торію. Ц пов'язано з протактинієм-233, який є добрим поглиначем нейтронів (час життя близько 27 діб). Оскільки цей нуклід знаходиться в ланцюжку розпаду при напрацюванні ${}^{233}$U (\ref{eq01}), то при поглинанні нейтрона ${}^{233}$Pa ми будемо втрачати цінні для ХЯГ ядра ${}^{233}$U. Відповідно, даний проміжний нуклід на шляху напрацювання подільного нукліда потрібно виводити з активної зони на час періоду його напіврозпаду. Даний процес неможливо здійснити, якщо паливна матриця буде мати тверду структуру, і відповідно, кращим буде паливне середовище із сольовоого розтопу, для якого вже існує технологічний процес з виведення його з активної зони \cite{20}.
\section{introduction} \color{black} The deformation of soft material is general and can be due to mechanical force, temperature, pH value, humidity, electric field, and van der Waals interactions\cite{1,2,3,4,5,6,7,8,9,10,11,12}. Plentiful examples exist in living creatures, such as the wrinkling of skins\cite{skin,finger1,finger2}, differential growth of bacterial biofilms\cite{bacterial}, and pattern selection in growing tubular tissues\cite{tubular}. Researchers who were interested at distinct undulating topologies for fruits and vegetables\cite{fruit} or soft elastic cylindrical shell\cite{fold,balloon} have discussed different modes of deformation for core-shell structures. But, in real-life examples of rolled-up sleeves, taken-off pants, shedding skin of snake, (now extinct) wrinkled wrapping when removed from drinking straws, or more exotic banana leaves as shown in Fig. \ref{mode}(a-c), there is a gap between the core and shell. Intuitively this interval lends more freedom to the deformation and may allow for the creation of new modes. To clarify this conjecture we will discuss the morphology and dynamics of a cylindrical shell with a coaxial core whose radii $R_0$ and $R_{\rm in}$ are independently varied. Note that $R_0$ is defined as the average of inner and outer radii of shell. In addition, the compression rate $v$ and shell properties, such as initial length $L_0$, thickness $t$, and hardness, will be among our tuning parameters. We use a stepping motor to compress cylindrical shells of silica gel and paper with a rigid steel rod at its core, as shown in Fig. \ref{mode}(d). To avoid friction, we lubricate the core with a thin layer of oil before each round of compression. In order to better understand the distribution and ratio of bending and stretching energies, molecular dynamics (MD) simulation will also be employed. In contrast to just one mode (diamond) of deformation for stand-alone shells\cite{1977} and two (wrinkle and sagging) for core-shell without a gap\cite{fold, balloon}, our core-gap-shell system can exhibit as many as five different modes. Among them, the spiral, ladder, diamond, and sagging modes show up in thick shells, as shown in Fig.\ref{mode}(e, f, g, i). Whiles, only diamond, wrinkle, and sagging modes are observed in Fig.\ref{mode}(g, h, i) for thin shells. \begin{figure} \centering \includegraphics[width=8.5cm]{Fig1.png} \caption{(color online) Examples of compressed cylindrical shell, (a) banana leaf, (b) package of chopsticks, and (c) rolled-up sleeves. Panel (d) shows the experimental set-up. Different modes of compressed shell can be observed: (e) spiral, (f) ladder, (g) diamond, (h) wrinkle, and (i) sagging. The inset of (e, f) are silica gel tube, (g) is paper roll, and (h, i) are balloon. Further detail of inset (h): left part shows wrinkle, and the right part shows ridge.\cite{balloon} } \label{mode} \end{figure} \section{MD simulation} Our MD simulation adopts the Weeks-Chandler-Anderson potential \cite{WCA} to enforce the excluded volume for each lattice point and define the length unit $\sigma$ and the energy unit $\epsilon$. We choose a hexagonal lattice with mean spacing $a_0=1.0\ \sigma$ to form a cylindrical shell. Two impenetrable walls are arranged at both ends of the shell. The reduction of length to $L$ is carried out by moving one of the walls. Since $k_b/k_s = 3 t^2 /32$ where $k_b$ and $k_s$ are the bending and stretching modulii \cite{change}, and two values of $t$, $0.23\sigma$ and $2.3\sigma$, are tested by varying $k_b=10^3 \sim 10^5 \epsilon/\sigma^2$ while holding $k_s$ fixed. In the mean time, different materials are simulated by changing $k_s$ for the same $t$. The elastic energy comprises two forms: stretching energy $E_s=k_s(a-a_0)^2/2 $ and bending energy $E_b=k_b(\theta-\theta_0)^2/2 $ where $a$ is the length between adjacent beads and $\theta$ is the angle spanned by three consecutive beads along a lattice direction and $\theta_0=\pi$ along the length and $\theta_0=[(2\pi R-2)/(2\pi R)]\pi$ in the circular cross section. Plasticity is included by halving the magnitude of $k_b$ beyond a yield angle $|\theta -\theta_0 |$ of $10^{\circ}$ \cite{plasticity}. The compression rate is set at $v=-10^{-4} \sigma/ v_s$ where $v_s=\sigma (m/ \epsilon)^{1/2}$ is the time unit and $m$ is the mass of bead. All simulations are performed using LAMMPS version 16Mar18\cite{LAMMPS}. \section{mode map} Since we already know that there are five modes, we can assemble a mode map to characterize their corresponding stages during compression. Inputs from experiments and MD simulation tell us that plasticity promotes diamonds while suppressing other modes, which observation is consistent with our experience with a casually rolled-up sleeve. Readers may protest that sleeves can also assume the neat and more stable mode of sagging. But this is created by deliberate folding and not in the scope of our discussion. The deformation mode of silica gel tube, representative of an elastic shell, is more diversified than its plastic counterpart. The mode map consists of three dimensionless parameters: reduced length $L/L_0$, $R_0-R_{in}/t$, and $ks/v^2 \times \rho$ that incorporates the effect of hardness and compression rate where $\rho$ denotes the surface mass density of the shell in simulation. \color{black} Note that all deformations originate from the moving end. The first mode that appears is spiral that consists of two parallel lines spiraling up the shell Further compression introduces two sets of rungs that wrap around the shell and use the spirals as side rails to form the ladder mode. The rungs appear crooked at first, but improve in their orientation, namely, becoming more parallel as $L$ decreases. When the gap $R_{0}-R_{\rm in}$ is increased from 2 to beyond 5, a fourth mode of diamond will interpose itself between and coexist with ladder and sagging. But if the gap is further widened to 10, there is no sagging after diamond. A complete survey of modes can be found in Fig. \ref{map} which plots gap vs. $L/L_{0}$. Note that once the sagging shows up, the preceding mode, either ladders or diamonds, will be quickly suppressed to resume the surface back to smoothness. In contrast, the transition from ladder to diamond is gradual. For an elastic thin shell, diamond is the first mode that emerges. (a) After the diamond pattern gradually spreads and covers the whole shell, wrinkles start to appear and coexist with the diamond. (b) A second transition happens when all the wrinkles are wiped out by a sudden appearance of sagging. (c) Afterwards, wrinkles reemerge between and coexist with sagging and diamond. Further compression will introduce a second sagging and the processes (b) and (c) are duplicated. As shown in Fig. \ref{map}, the number of repetitions can be as frequent as four. We have checked the effect of plasticity which turns out to suppress all the deformation mode except diamond. Furthermore, plasticity renders the arrangement of diamond less periodic. \begin{figure} \centering \includegraphics[width=8.5cm]{Fig2.jpg} \caption{(color online) For panel (a)/(b) shows the deformation mode of shell with $R_0=20$, $L_0=200$, $v=-10^{-4}$, $k_s=2 \times 10^5$, and $t=0.23/2.3$. Different hardness in (c)/(d) with $R_0=20$, $R_{\rm in}=16$ $L_0=200$, $v=-10^{-4}$, $t=0.23/2.3$.} \label{map} \end{figure} \begin{figure} \centering \includegraphics[width=8.5cm]{Fig3.png} \caption{(color online) Panel (a)/(b) shows the energetic/mechanical response of $R_0=10$, $R_{\rm in}=9$, $L_0=200$, $v=-10^{-4}$, $k_s=2 \times 10^5$, $t=0.23$. Each thin straight line highlight the pattern transition on the shell or the formation of the sagging. During the uniform diamond mode, $Y$ and $E_b/E_s$ remain a constant. For panel (c)/(d) shows the the energetic/mechanical response of $R_0=20$, $R_{\rm in}=18$, $L_0=300$, $v=-10^{-4}$, $k_s=2 \times 10^5$, $t=2.3$. The transition is simpler than thinner shell, the first mode is spiral then turn into ladder and end with sagging. A constant $E_b/E_s$ during ladder mode, and decrease during sagging mode. Besides ladder, spiral and sagging remain a constant $Y$. } \label{response} \end{figure} \section{Energetic response} The energetic and mechanical responses for a thin shell from MD simulations are shown in Fig. \ref{response}(a, b) where $E_0$ is the initial total energy and $F_0$ is the resistance force at $L/L_0=0.99$. Being the first mode to appear, diamond increases its size with compression. It was mentioned in Fig. \ref{map} that there are only three modes for a thin shell. Wrinkling emerges and coexists with the diamonds at the first transition, which is characterized by a discontinuous $d(E_b/E_s)/dL$. In contrast, each of the latter transitions introduces one more sagging and exhibits discontinuities in both $E_{\rm tot}$ and $E_b/E_s$. Analogous to the latent heat when water freezes, the difference of $E_{\rm tot}$ is converted into kinetic energy before being dissipated as heat. In contrast to the total $E_b$ and $E_s$ in Fig. \ref{response}(a), we have also measured those for individual mode. The ratio $E_b/E_s$ turns out to be insensitive to $L$ and remains at 3/2 for wrinkles and 0.8/1.4/2.1 for small/medium/large diamonds that appear respectively in $L/L_0 >0.93$, $0.89<L/L_0 <0.93$, and $L/L_0<0.89$. The reason why $E_b/E_s$ increase is that, as the height of diamond perimeter increases with compression, its width narrows to avoid stretching the surface, which implies more $E_b$ is required. The ratio $E_b/E_s$ for sagging is also not a constant. This is expected because $E_b$ is stored mainly on the bending part which remains intact as sagging grows. As a result, the input work is totally converted to $E_s$ on the lengthening overlap part. Figure \ref{response}(b) tells us that the force of resistance is discontinuous at the second and following transitions. The Young's modulus $Y$ can be measured by taking the derivative of $F$ with respect to $L$. The observation that $Y$ equals roughly a constant in Fig. \ref{response}(b) should not be taken too seriously. We believe it is due to the fact that diamond remains the dominant mode for $L/L_0>0.7$. We except that $Y$ will change when sagging take place diamond for further compression. Now let's study the energetic and mechanical responses for thick shells in Fig. \ref{response} (c, d). As depicted in Fig. \ref{map}, the first deformation to appear is a groove at either end of the shell, that is evidenced by a sudden surge of $E_b$ and $E_s$ with $E_b$ being the dominant energy. The grooves persist after spiral and ladder take turns at occupying the shell. The ratio $E_b/E_s$ for these two modes is determined to be roughly 0.4 and 0.45. Unlike thin shells, sagging does not coexist with other modes, i.e., the thick shell resumes to smoothness as soon as sagging appears, which transition is signified by a discontinuity in $E_{\rm tot}$. As further compression lengthens the sagging, the folded edge where $E_b$ mainly resides remains roughly the same, while $E_s$ increases linearly with $L_0-L$. In the mean time, the shape of folded edge flips between being round and blunt as the edge being pushed by the fictitious wall, which adds an oscillatory part to $E_b/E_s$ vs. $L/L_{0}$ in Fig. \ref{response}(c). Experimental results for silica gel tube are plotted in Fig.\ref{exp}(a) where each dip represents the appearance of a new sagging. A lower compression rate $v$ exhibits a higher $F$. The shorter shell, as denoted by triangles, exhibits a steeper slope than diamonds in Fig.\ref{exp}(a). This is expected from $F=(YA/L_0 )(L_0-L)$. However, if multiplied by their respective $L_0$, the slope for triangles will become slightly smaller than that for diamonds. This implies that, unlike homogeneous material, $Y$ is not pure an intrinsic property, but may depend on $L_0$ for a shell with deformations. The effect of $R_{\rm in}$ is also checked. The fact that the cube data overlap with diamonds before sagging implies that, as long as $R_{\rm in}$ is nonzero, $Y$ is insensitive to its value. And, once entered, sagging always enhances $Y$ besides the induction of a sudden drop in $F$ at the transition. Our simulation results without plasticity in Fig.\ref{exp}(b) show that a shorter $L_0$, larger $R_{\rm in}$, and higher $v$ require a stronger $F$ to achieve the same $L_0 -L$. These trends are consistent with those of silica gel in Fig.\ref{exp}(a). One further parameter that we tested in simulations is the effect of thickness $t$. As expected, thicker samples also require a larger force. To test the effect of plasticity, we also arrange to sample on paper roll to obtain Fig.\ref{exp}(c) and contrast it with simulations with plasticity in Fig.\ref{exp}(d). Two characteristics that are unique to plastic shells are that the mode of deformation is reduced to one, i.e., diamonds, and rings of diamonds emerge discretely. The $F$ is found to fluctuate whenever a new ring of diamonds appears, similar to the behavior of paper roll. But our simulations fail to predict the overall increase of $F$ as $L_0-L$ increases. Since there was no such a trend in another experiment\cite{1977} without a core, We believe the increment in $F$ must be due to the increasing number of contacts and frictional force between the shell and the core. \begin{figure} \centering \includegraphics[width=8.5cm]{Fig4.png} \caption{(color online) Resistance force is plotted against reduced length for real samples. (a) Silica gel tube with different $R_{\rm in}$(mm), $L_0$(mm) and $v$(mm/s), while $R_0=4.18$mm is fixed. (b) Simulation result with same variation, while $R_0=20$ is fixed. (b) Paper roll with different $t$(mm) while $R_0=15.9$mm, $R_{in}=11$mm, $L_0=180$mm, and $v$=0.41mm/s are fixed. In contrast to Fig. \ref{response}, plasticity is added to MD simulations with $R_0=20, L_0=300$, and $v=10^{-4}$ to obtain plot (c) in order to compare with (a) and (b).} \label{exp} \end{figure} \section{release} After we roll up the sleeve, the deformation can persist for a while due to its friction with our arm. How about the compression shell for a purely elastic shell in MD simulations? In other words, is the compression process intrinsically irreversible? Or is plasticity crucial to induce hysteresis? This is the goal of our following simulations in which the compressing wall is suddenly removed. The recoil speed $v_{\rm recoil}$ and total energy are recorded and plotted in Fig.\ref{relax}(a). It can be seen that $v_{\rm recoil}$ varies with modes and is the smallest for sagging. The thick shell in MD will always stuck at sagging and never recover to smooth again. We use $E_tot/E_0$ as the degree of deformation to plot the relation to the simulation time $t$ for thin shell in MD. We find that harder and more space can release faster, and independent of temperature. The temperature represent the kinetic energy of the beads, which means the fluctuation of the shell is independent of the relaxation in simulation. To avoid the shell brittle or melt, it can not change the range of temperature to check this property in experiment. For elastic case, as shown in Fig. \ref{relax}(a), the stepped energetic response represents the untying of the sagging. Note that if and only if $R_0-R_{in}>3$, the sagging can be untied. Compare to the plastic case, as shown in Fig.\ref{relax}(b), it is hard to form sagging during compression, which means that there will no stepped energetic response and there is a good agreement, with $R^2 \sim 0.99$, of the relation: $E_{tot}/E_0 = a \times {\rm exp}(-t/\tau)+E_{min}$, for $a$ is dependent on the maximum total energy of each different case, $\tau$ is relaxation time and $E_{min}$ is $E_{tot}/E_0$ at the equilibrium state. \section{discussion} Although the morphological and mechanical responses obtained by our simulation are consisting with experimental results, some discrepancies still exist. For instance, the diamond mode that appears in simulations for a thick shell with $R_{in}/R_0 >0.6$ was never observed in experiments. In simulations for thick shells the appearance of sagging will wipe out whatever modes preceeding it. However, in real experiments sagging is less exclusive. Boundary condition, e.g., whether the circular ends are allowed to deform during compression, is checked not to alter our conclusions, except minor quantitative corrections to the critical $L/L_0$ when different modes switch. Intuitively one would imagine $R_{in}$ not to matter when the deformation is not serious and the shell never touches the core. However, this is limited to the early stage of compression when $L/L_0 >0.95$. As a result, it is still acceptable for us to use the parameter $(R_0-R_{in})/R_0$ as a label for the mode map. \begin{figure} \centering \includegraphics[width=7cm]{Fig5.png} \caption{(color online) We shift the time axis to $0$ when the relaxation starts, and distinguish the (a) elastic and (b) plastic case. (a) shows the harder material recover faster with $R_0=20, R_{in}=16, L_0=200, t=0.23$, and independent of temperature in the inset. (b) compares the deformation of simulation and experiment with plastic at the right side, and shows larger space, i.e. $R_0-R_{in}$, recover faster with $R_0=20, L_0=300, v=10^{-4}, t=0.23$. } \label{relax} \end{figure} We acknowledge the financial support from MoST in Taiwan under grants 105-2112-M007-008-MY3 and 108-2112-M007-011-MY3.
\section{Introduction} \IEEEPARstart{W}{ith} the explosive growth of the Internet of Things (IoT), massive IoT (mIoT) devices, the number of which is predicted to reach 20.8 billion by 2020, will access the wireless networks for implementing advanced applications{\cite{says20156}}. These applications include e-health, public safety, smart traffic, virtual navigation/management, and environment monitoring{\cite{liu2018novel}}. To address the IoT market, the third-generation partnership project (3GPP) has identified mIoT as one of the three main use cases of 5G and has already initiated several task groups to standardize several solutions including extended coverage GSM (EC-GSM), LTE for machine-type communication (LTE-M), and narrowband IoT (NB-IoT) \cite{Cellular-Ericsson,LTE-Nokia}. For establishing massive connections among wireless networks and IoT devices, the research on reliable and efficient access mechanisms should be prioritized. In accomplishing the massive connections, when an IoT device wants to transmit signals in the uplink, it randomly chooses a random access (RA) preamble from an RA preamble pool and transmits it through an RA channel (RACH). If more than one device tries to access a base station (BS) simultaneously, then interference occurs at the BS. {Unless interference is resolved, the grand goal of accomplishing the massive connections cannot be achieved. } \subsection{Prior arts} During the past few years, a rich body of works \cite{xing2019novel,jang2016non,zhang2019dnn,moon2018sara,miuccio2020joint,di2018learning,vilgelm2019dynamic,seo2019low} on RA mechanisms has been developed to mitigate interference and improve the RA success probability or reduce the access delay of an IoT device. For example, the work in \cite{xing2019novel} proposed to improve the RA success probability of an IoT device by exploiting a distributed queue mechanism. It {also designed} an access resource grouping mechanism to reduce the access delay caused by the queuing process of the distributed queue mechanism. The work in \cite{jang2016non} proposed a novel scheme to increase RA success probability. First, this scheme increased the number of preambles at the first step of the RACH procedure by utilizing a spatial group mechanism. Second, it improved resource utilization through non-orthogonally allocating uplink channel resources at the second step of the RACH procedure. Besides, to reduce the access delay, a grant-free non-orthogonal RA system relying on the accurate user activity detection and channel estimation was proposed in \cite{zhang2019dnn}. Most of the studies \cite{xing2019novel,jang2016non,zhang2019dnn,moon2018sara,miuccio2020joint,di2018learning,vilgelm2019dynamic,seo2019low}, however, assumed that network resources were reserved for the IoT service and did not study the case of the coexistence of IoT service and many other services such as ultra-reliable and low latency communications (URLLC). The research of the coexistence of IoT service and other services is essential. {This is because} future networks are convinced to integrate {heterogeneous} services with different latency, reliability, and throughput requirements into a shared physical infrastructure rather than deploying individual network solution for each type of service \cite{alliance20155g}. What is more, owing to the shared characteristic of network resources, some conclusions obtained {from IoT dedicated networks} may become inapplicable if {heterogeneous} services are required to be supported by the networks. Network slicing is considered as a promising technique in future networks to converge {heterogeneous} services onto a shared physical infrastructure. This can be implemented by {logically} partitioning the infrastructure into multiple network slices, where a network slice {capable of providing a negotiated service quality} is defined as an end-to-end virtual network running on the infrastructure \cite{rost2017network}. Recently, many slicing frameworks have been developed to provide performance guarantees for IoT or massive machine-type communications (mMTC) service, enhanced mobile broadband (eMBB) service, and URLLC service{\cite{popovski20185g,budhiraja2019tactile,ksentini2017toward,How2019yang,d2019slice,zambianco2020interference}}. For example, instead of slicing the radio access network (RAN) via orthogonal resource allocation, the work in \cite{popovski20185g,budhiraja2019tactile} studied the advantages of allowing for non-orthogonal RAN resources sharing {among} a set of mMTC, eMBB, and URLLC users. The work in \cite{ksentini2017toward} developed a two-level scheduling process to allocate dynamically dedicated bandwidth to each slice based on workload demand and slices' quality of service (QoS) requirements. In \cite{How2019yang}, we proposed to orchestrate network resources for a network slicing system to guarantee more reliable URLLC and energy-efficient eMBB service provisions. {Besides, the work in \cite{d2019slice,zambianco2020interference} proposed to mitigate the inter-slice interference via RAN slicing such that heterogeneous services could be supported by the same physical infrastructure. However, the significant impact of intra-cell interference on the obtained results was not considered.} \subsection{Motivation and contributions} Unlike the work in \cite{xing2019novel,jang2016non,zhang2019dnn,moon2018sara,miuccio2020joint,di2018learning,vilgelm2019dynamic,seo2019low,popovski20185g, budhiraja2019tactile,ksentini2017toward,How2019yang,d2019slice,zambianco2020interference}, this paper simultaneously analyzes the {RACH procedure} for the mIoT service and studies the RAN slicing for the mIoT service included service multiplexing. This study is highly challenging because i) performance requirements of a massive number of IoT devices should be satisfied. Yet, the typical 5G cellular IoT, NB-IoT can only admit 50,000 devices per cell \cite{3GPP15Cellular}, and the 5G new radio (NR) technique can connect a great number of devices {only} by deploying costly ultra-dense heterogeneous networks; ii) RAN slicing operation (e.g., activating and releasing slices) has to be conducted in a timescale of minutes to hours to keep pace with the upper layer network slicing. In the process of slicing upper layer networks, some functions (e.g., radio resource control function) and protocols (e.g., RAN protocol stacks) should be activated and configured, which are time-consuming \cite{rost2017network}. However, wireless channels generally change in a timescale of a millisecond to seconds, {which is much shorter than the RAN slicing operation duration. As a result, how to optimally perform the time-consuming RAN slicing operation in rapidly changing wireless channels, which is called a two-timescale issue of the RAN slicing \cite{tang2019service}, is a big challenge;} iii) compared with the resource allocation problem for other services (e.g., eMBB service), the resource allocation problem for the bursty URLLC service {(e.g., human-machine collaborations in industry automation, telesurgery in healthcare, virtual reality for remote education or in gaming industry \cite{hou2019prediction,antonakoglou2018toward,ruan2019machine})} where URLLC packets arrive in a burst may be more challenging due to the stringent low latency requirement and the 99.999\% reliability requirement \cite{series2015imt}; iv) {IoT devices may experience radio shadowing and then the transmission outage in challenging radio environments.} These challenges motivate us to investigate the RAN slicing for mIoT and bursty URLLC service multiplexing to maximize {the total RA success probabilities of all IoT devices while providing URLLC services for URLLC devices.} {Besides, to overcome the radio shadowing in challenging radio environments, the coordinated multi-point (CoMP) transmission technique, which creates spatial diversity with redundant communication paths, is exploited. CoMP can also significantly improve transmission reliability via spatial diversity instead of relying on {the} packet retransmission.} {Therefore, this paper considers the RAN incorporating the CoMP transmission technique, which is called CoMP-enabled RAN.} Summarily, the main contributions of this paper are presented as the following: \begin{itemize} \item {The subframe structure designed for NB-IoT is extended} for mIoT transmissions to accommodate more RACH requests from a massive number of IoT devices; \item {We analyze the queue evolution processes including the IoT packet arrival, accumulation and departure processes} by employing probability and stochastic geometry theories. Based on the analysis result, we derive the closed-form expression of the RA success probability of a randomly chosen IoT device; \item We define the mIoT slice utility {as the time average of RA success probability of all IoT devices} and the bursty URLLC slice utility {as the time-average energy efficiency, which reflects the transmission latency and power consumption, for serving URLLC devices}. {We then} formulate the CoMP-enabled RAN slicing for mIoT and bursty URLLC service multiplexing as a resource optimization problem. The objective of the optimization problem is to maximize the total mIoT and URLLC slice utilities, subject to limited physical resource constraints. The solution of this problem is difficult due to the existence of {the} indeterministic objective function and thorny non-convex constraints and the requirement of tackling a two-timescale issue as well; \item To mitigate this thorny optimization problem, we propose a slice resource optimization (SRO) algorithm. In this algorithm, we first exploit a sample average approximate (SAA) technique and an alternating direction method of multipliers (ADMM) to tackle the {indeterminacy of the} objective function and the two-timescale issue. Then, a semidefinite relaxation (SDR) scheme joint with a Taylor expansion scheme is leveraged to approximate the non-convex problem as a convex one. The tightness of the SDR scheme and the error bound of the Taylor expansion are also analyzed. \end{itemize} \subsection{Organization} {The remainder of this paper is organized as follows: Section \uppercase\expandafter{\romannumeral2} builds the system model. Based on the model, a CoMP-enabled RAN slicing problem for mIoT and bursty URLLC service multiplexing is formulated in Section \uppercase\expandafter{\romannumeral3}. Section \uppercase\expandafter{\romannumeral4} aims to derive the closed-form expression of the RA success probability. Section \uppercase\expandafter{\romannumeral5} and Section \uppercase\expandafter{\romannumeral6} propose to mitigate the formulated problem with system generated channel coefficients and sensed channel coefficients, respectively. The simulation is conducted in Section \uppercase\expandafter{\romannumeral7}, and Section \uppercase\expandafter{\romannumeral8} concludes this paper.} {\emph{Notation:} Boldface uppercase letters denote matrices, whereas boldface lowercase letters denote vectors. The superscripts $(\cdot)^{\rm T}$ and $(\cdot)^{\rm H}$ denote transpose and conjugate transpose matrix operators. ${\rm tr}(\cdot)$, ${\rm rank}(\cdot)$, and $\left\lfloor {\cdot} \right\rfloor$ denote the trace, the rank, and the rounding down operators, respectively. ${\bm X} \succeq 0$ indicates that $\bm X$ is a Hermitian positive-semidefinite matrix. For clarification, some significant notations are listed in Table \uppercase\expandafter{\romannumeral1}.} \begin{table*}[!t] \renewcommand{\arraystretch}{1.2} \caption{{{List of Notations}}} \label{table_1} \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} \centering \begin{tabular}{|c||c|c||c|} \hline {Notation} & {Description} & {Notation} & {Description} \\\hline {{${\mathcal S}^I$, ${\mathcal S}^u$}} & {mIoT, URLLC slice sets} & {${\bm u}_{i,s}$} & {Location of the $i$-th IoT device in $s\in {\mathcal S}^I$} \\ \cline{1-4} {$\lambda_{s}^{I}$} & {Intensity of IoT devices in $s \in {\mathcal S}^I$} & {$N^u$} & {Number of URLLC devices} \\ \cline{1-4} {$\lambda_R$} & {Intensity of RRHs} & {${\bm v}_j$} & {Location of the $j$-th RRH} \\ \cline{1-4} {$K$} & {Number of antennas of an RRH} & {$W$} & {Total system bandwidth} \\ \cline{1-4} {$\theta_s^{\rm th}$} & {SINR threshold for decoding an IoT packet in $s\in{\mathcal S}^I$} & {$I_s^u$} & {Number of URLLC devices in $s \in {\mathcal S}^u$} \\ \cline{1-4} {$D_s$} & {Transmission latency requirement of a URLLC device} & {$\alpha$} & {Blocking probability threshold of a URLLC packet} \\\hline {$\beta$} & {Codeword error decoding probability threshold} & {$\vartheta_{w,s}(t)$} & {Intensity of new IoT arrival packets} \\ \cline{1-4} {$N_{a,s}(t)$} & {Accumulated number of IoT packets} & {$L$} & {Number of information bits of an IoT packet} \\ \cline{1-4} {$N_{w,s}(t)$} & {Number of new IoT arrival packets} & {$a$} & {Size of the tone spacing} \\ \hline {$P_{ne,s}(t)$} & {Non-empty probability of a queue} & {$F_s$} & {Number of orthogonal uplink PRACHs} \\ \hline {$\xi $} & {Number of non-dedicated RA preambles} & {$P_{ACB}$} & {An ACB factor} \\ \hline {$P_{nr,s}(t) $} & {Probability without restricting RACH requests} & {$P_{s}(t)$} & {RA success probability of an IoT device} \\ \hline {$\rho_o $} & {Power cutoff threshold} & {${\mathcal I}_s(t)$} & {Intra-cell interference} \\ \hline {$L_{{\mathcal I}_s(t)}(\cdot) $} & {Laplace transform of the PDF of ${\mathcal I}_s(t)$} & {$\vartheta_{a,s}^t$} & {Intensity of accumulated IoT packets} \\ \hline {$\lambda_s $} & {Intensity of new URLLC arrival packets} & {$W^u(\bm r(t))$} & {Bandwidth allocated to URLLC slices} \\ \hline {$\omega_{i,s}^u(t)$} & {Bandwidth allocated for transmitting a URLLC packet} & {$b_{i,s}^u(t)$} & {Indicator of whether a URLLC device is served} \\ \hline {$r_{i,s}^u(t)$} & {Channel uses for transmitting a URLLC packet} & {$\varsigma $} & {Queueing probability of a URLLC packet} \\ \hline {$\bm g_{ij,s}(t)$} & {\tabincell{l}{Transmit beamformer pointing at the $i$-th \\ URLLC device from the $j$-th RRH}} & {$\bm h_{ij,s}(t) $} & {\tabincell{l}{Channel coefficient between the $i$-th \\ URLLC device and the $j$-th RRH}} \\ \hline {$E_j$} & {Maximum transmit power of the $j$-th RRH} & {$L_{i,s}^u(t) $} & {Number of information bits of a URLLC packet} \\ \hline {$\hat E_j^I$} & {Transmit power of a RRH for connecting to an IoT device} & {$\omega_s(\bar t) $} & {Bandwidth allocated to a mIoT slice $s\in {\mathcal S}^I$} \\ \hline {$\bm H_{i,sm}$} & {Channel matrix corresponding to the $m$-th channel sample} & {$\bm G_{i,sm}$} & {Power matrix corresponding to the $m$-th channel sample} \\ \hline \end{tabular} \end{table*} \begin{figure}[!t] \centering \includegraphics[width=3.3in]{mIoT_URLLC_system_prototype.eps} \caption{{A CoMP-enabled RAN slicing system.}} \label{fig:fig_URLLC_mIoT_slice} \end{figure} \section{System model} {As shown in Fig. \ref{fig:fig_URLLC_mIoT_slice},} we consider a CoMP-enabled RAN slicing system for mIoT and bursty URLLC multiplexing service provision. From the viewpoint of infrastructure composition, the system mainly includes one baseband unit (BBU) and multiple remote radio heads (RRHs) connecting to the BBU via fronthaul links\footnote{{As in \cite{matera2018non}, we assume the perfect network synchronization and the available low-latency backhaul for the coordination. Although the CoMP structure requires the data sharing among RRHs resulting in additional overhead, some schemes such as short packet communication, flexible subcarrier spacing, and a flexible number of symbols in one transmission time interval \cite{khan2020availability} can be exploited to satisfy the stringent low latency requirement of URLLC. }}. From the perspective of network slicing, two types of inter-slices, i.e., mIoT slices and URLLC slices\footnote{{The service multiplexing of eMBB traffic is not considered in this paper as it has been investigated in our paper \cite{tang2019service}.}}, are exploited in this system with $\mathcal{S}^I$ and $\mathcal{S}^u$ denoting the mIoT slice set and {the} URLLC slice set. We focus on the modelling of uplink IoT data transmission in mIoT slices and the modelling of downlink URLLC data transmission in URLLC slices. IoT devices (e.g., water meters and wearable e-health devices) are spatially distributed in ${\mathbb R}^2$ according to an independent homogeneous Poisson point process (PPP) $\Phi_s = \{{\bm u}_{i,s}; s \in \mathcal{S}^I, i = 1, 2, \ldots\}$ with intensity $\lambda_s^I$, where ${\bm u}_{i,s}$ is the $i$-th IoT device's location in the $s$-th mIoT slice. There are $N^u$ URLLC devices (e.g., remote-controlled robot sensors) that are randomly and evenly distributed in ${\mathbb R}^2$. The RRHs are spatially distributed in ${\mathbb R}^2$ according to an independent PPP $\Phi_R = \{\bm v_j; j = 1, 2, \ldots\}$ with intensity $\lambda_R$, where $\bm v_j$ represents the location of the $j$-th RRH. The number and locations of IoT devices and RRHs will be fixed once deployed. Besides, each RRH is equipped with $K$ antennas, and each device is equipped with a single antenna. The total system bandwidth $W$ of the system is limited and shared by mIoT slices and URLLC slices. A flexible frequency division multiple access (FDMA) technique is utilized to achieve the inter-slice and intra-slice interference isolation \cite{tang2019service}. {\subsection{CoMP-enabled RAN slicing system architecture}} In view of the architecture, the CoMP-enabled RAN slicing system consists of four parts including end devices, RAN coordinator (RAN-C), network slice management, and network providers, as shown in Fig. \ref{fig:fig_URLLC_mIoT_slice}. The system time is discretized and partitioned into time slots and minislots with a time slot consisting of $T$ minislots. At the beginning of each time slot, the RAN-C will decide whether to accept or reject received network slice requests defined later after checking available resource information (e.g., physical resource blocks (PRBs)) and computing. If a slice request is accepted, network slice management will be responsible for creating or activating corresponding types of virtual slices and configuring RAN protocol stacks, the processes of which are time-consuming and usually in a timescale of minutes to hours. Next, if a slice request admission arrives, network providers will find the optimal servers and paths to deploy virtual network functions to satisfy the end-to-end QoS requirements of the slice\footnote{{Although network providers are included as part of the architecture, the related problem of finding optimal servers and paths to deploy virtual network functions is not studied in this paper.}}. Meanwhile, at the beginning of each minislot, each active IoT device may try to connect to its associated RRH. RRHs will generate cooperated beamformers pointing at URLLC devices based on sensed channel coefficients. {\subsection{mIoT and bursty URLLC slice model}} {According to} the above mentioned network slice concept, especially from the viewpoint of the slice's QoS requirement, we can define a mIoT slice request as follows. \begin{mydef}\label{def:IoT_slice_definition} A mIoT slice request is defined as a tuple $\{\lambda_s^I, \theta_s^{th}\}$ for any slice $s \in {\mathcal S}^I$, where $\theta_s^{th}$ is the signal-to-interference-plus-noise ratio (SINR) threshold for an RRH to successfully decode packets (including preamble packets and IoT data packets) sent from an IoT device in $s$. \end{mydef} In this paper, RRHs will assign IoT devices to {$|{\mathcal S}^I|$} different slices according to the received SINR {with $|\cdot|$ indicating the number of elements in a set}. The SINR threshold configured for all IoT devices in a slice is similar. \begin{mydef}\label{mydef:URLLC_slice_request} A bursty URLLC slice request is defined as four tuples $\{I_s^u, D_s, \alpha, \beta\}$ for slice $s \in {\mathcal S}^u$, where $I_s^u$ is the number of URLLC devices in $s$, $D_s$ is the transmission latency requirement of each URLLC device in $s$, $\alpha$ and $\beta$ are the packet blocking probability threshold and the codeword error decoding probability threshold of each URLLC device, respectively \cite{How2019yang}. \end{mydef} In this definition, URLLC devices are grouped into $|{\mathcal S}^u|$ clusters according to the transmission latency requirement of each device. As URLLC packets may arrive in burst and network resources allocated to URLLC slices may be inadequate, URLLC packets may experience blocking. The packet blocking probability threshold is then involved as a QoS requirement of URLLC slices. Besides, owing to the low latency requirement, URLLC packets should be immediately scheduled upon arrival; thus, URLLC slice requests should always be accepted by the RAN-C {if there are sufficient network resources}. \section{Problem formulation} Based on the system model, this section aims to formulate the problem of CoMP-enabled RAN slicing for mIoT and bursty URLLC multiplexing service provision. {To this aim, we first present mIoT and bursty URLLC slice constraints and physical resource constraints. Then, we define slice utility functions of the problem. With the constraints and utility functions, the CoMP-enabled RAN slicing problem is formulated.} {\subsection{mIoT slice constraint}} For an IoT device in $s$, if it has the opportunity to send endogenous arrival packets to {its} corresponding RRH, then it will randomly select a preamble (e.g., orthogonal Zadoff-hu sequences) from a BBU-maintained preamble pool and transmit the preamble to the RRH. Just like the literature \cite{soorki2017stochastic,jiang2018random}, although the whole connection establishment process usually follows a RACH four-step procedure \cite{grau2019preamble}, we assume that a connection between the IoT device and the RRH is set up if the preamble can be successfully transmitted. In other words, the RA success probability is regarded as the probability of successfully transmitting a preamble. For an RRH, if its received preamble SINR is no less than a preset SINR threshold, then the preamble is considered to be successfully transmitted. As in \cite{jiang2018random}, we do not investigate the well-investigated preamble collision issue. {However,} owing to the channel deep fading and severe co-channel interference, an IoT device may experience uplink preamble transmission outage. {Then,} at minislot $t$, for a randomly selected active IoT device in $s \in \mathcal{S}^I$, its RA success probability is defined as \begin{equation}\label{eq:preamble_trans_suc_prob} P_{s}{(t)} = {\mathbb P}\{{ SINR}_s(t) \ge \theta_s^{th}\} \ge {\pi _s}, \end{equation} where $SINR_s(t)$ denotes the preamble SINR experienced at an RRH associating with the IoT device, $\pi_s$ denotes a threshold of the required RA success probability. We utilize a power-law path-loss model to calculate the path-loss between an IoT device and its RRH in mIoT slices. To eliminate the `near-far' effect, a truncated channel inversion power control scheme is also exploited. In the pass-loss model, the IoT device's transmit power decays at the rate of $r^{-{\varphi}}$ with $r$ representing the propagation distance and $\varphi$ denoting the path-loss exponent. In the power control scheme, IoT devices associated with the same RRH compensate for the path-loss to maintain that the average received signal power of an IoT device at the RRH equals a threshold $\rho_o$. Without loss of generality, the cutoff threshold $\rho_o$ is set to be the same for all RRHs, and we perform the analysis of RA success probability on an RRH located at the origin. According to {the} Slivnyak's theorem \cite{haenggi2012stochastic}, the analysis holds for a generic RRH located at a generic location. For {the} randomly selected {active} IoT device in $s \in \mathcal{S}^I$, the preamble SINR experienced at the RRH located at the origin can take the form \begin{equation}\label{eq:SINR} SINR_s(t) = {{\rho_o {h_o}}}/({{{\sigma ^2} + {{\mathcal I}_{s}}(t)}}), \end{equation} where $\sigma^2$ represents the noise power, ${{\mathcal I}_{s}}(t)$ denotes intra-cell interference received at the RRH{\footnote{{Just like \cite{zhang2015resource}, the co-channel inter-cell interference received by each RRH is assumed as a part of thermal noise mainly because of the intra-slice (or mIoT slice) interference isolation, the long-distance fading, and the severe wall penetration loss. Therefore, we focus on the analysis of the intra-cell interference in this paper.}}}, the useful signal power equals $\rho_o h_o$ due to the truncated channel inversion power control \cite{elsawy2014stochastic}, $h_o$ denotes the channel gain between the IoT device and the RRH. Note that the channel gain experienced at a generic RRH is related to the spatial locations of both the RRH and its associated IoT devices. Nevertheless, we drop the spatial indices for notation lightening. Besides, just like \cite{elsawy2014stochastic}, all channel gains are assumed to be {independent of spatial locations and independent} and identically distributed (i.i.d.). Considering the particular IoT device deployment environment, the Rayleigh fading is assumed, and the channel gain is assumed to be exponentially distributed with unit mean \cite{elsawy2014stochastic}. The intra-cell interference received at the origin RRH can take the following form \begin{equation}\label{eq:I_intra} \begin{array}{*{20}{l}} {\mathcal I}_{s}(t) = \sum\nolimits_{m \in {{ u}_{s}^I} \backslash \{ o\} } {\mathbbm 1}({p_m}||{d_m}|{|^{ - \varphi }} = {\rho _o}) \times \\ \qquad {\mathbbm 1}(N_{a,s}{(t)} > 0){{\mathbbm 1}({f_m} = {f_o}){\rho _o}{h_m}}, \end{array} \end{equation} where ${ u}_s^I$ is the set of IoT devices connecting to the origin RRH in $s \in {\mathcal S}^I$, $o$ is the randomly selected IoT device associated with the RRH at the origin, $p_m$ denotes the transmit power of the $m$-th IoT device, $||d_m||$ is the distance between the $m$-th IoT device and the origin RRH, {$N_{a,s}(t)$ is the \underline{\textbf a}ccumulated number of packets in a queue during $t$, which is maintained by the selected IoT device in slice $s$ for packet behavior (e.g., arrival and departure) analysis,} $f_o$ denotes the preamble and channel chosen by the randomly selected IoT device, $h_m$ is the channel gain from the $m$-th IoT device to the origin RRH. $f_o = f_m$ indicates that the randomly selected IoT device and the $m$-th IoT device select the same preamble and channel. The $1^{\rm st}$ ${\mathbbm 1}(\cdot)$ (from left to right) on the right-hand-side of (\ref{eq:I_intra}) indicates that the average received signal power of an interfering device at the origin RRH equals $\rho_o$ {owing to the adoption of the truncated channel inversion power control scheme}. The $2^{\rm nd}$ ${\mathbbm 1}(\cdot)$ denotes that {an interfering device must be active}. The $3^{\rm rd}$ ${\mathbbm 1}(\cdot)$ indicates that an interfering device selects the same preamble and channel as the randomly selected IoT device. {\subsection{Bursty URLLC slice constraint}} During minislot $t$, a \emph{compound} Poisson process \cite{becchi2008poisson}, where arrivals happen in bursts (or batches, i.e., several arrivals can happen at the same instant) and the inter-batch times are independent and exponentially distributed, is utilized to model the number of bursty URLLC packets arrive at each RRH. The intensity of the exponential distribution is set to be one batch. The number of new arrivals in each batch is subject to an independent homogeneous Poisson distribution with intensity ${\bm \lambda} = \{\lambda_s; s \in {\mathcal{S}^u}\}$, where $\lambda_s$ denotes the intensity of new arrivals in a batch destined to devices belonging to URLLC slice $s$. Once arrived, new URLLC arrivals will enter a queue maintained by an RRH to be {served}. An $M/M/W^u$ queueing system with limited bandwidth $W^u$ is exploited to model the queue due to the low latency requirement. Without loss of any generality, we assume that each RRH maintains the same queue due to the exploration of cooperated transmission. In the queue, a packet destined to URLLC device $i \in {\mathcal{I}_s^u}$, $s \in {\mathcal{S}^u}$ will be allocated with a block of system bandwidth $\omega_{i,s}^u(t)$ for a period of time $d_s \le D_s$ at minislot $t$. Owing to stochastic variations in the bursty packet arrival process, the limited bandwidth may not be enough to serve new arrivals occasionally. As such, URLLC packet blocking may happen. To reduce the probability of URLLC packet blocking, the PRB in the frequency domain for URLLC should be narrowed while widening it in the time domain \cite{anand2018resource}. In this way, the number of concurrent transmissions will be increased, and the packet blocking probability is reduced. As the tolerable communication latency of a URLLC device $i \in {\mathcal I}_s^u$ in {slice} $s \in \mathcal{S}^u$ is $D_s$, we can scale up $d_s$ and choose $d_s$ and $\omega_{i,s}^u(t)$ at minislot $t$ using the following equation \begin{equation}\label{eq:omega_s} d_{{s}} = D_s \ {\rm and} \ \omega_{{i,s}}^{u}(t) = {b_{i,s}^u(t){r_{{i,s}}^{u}(t)}}/{{(\kappa D_s)}}, \end{equation} where $r_{i,s}^u(t)$ denotes channel uses for transmitting a URLLC packet \cite{anand2018resource}, $\kappa$ is a constant reflecting the number of channel uses per unit time per unit bandwidth of FDMA frame structure and numerology, $b_{i,s}^u(t) \in \{0, 1\}$ is an indicator that indicates whether the device $i$ in $s$ can be served at minislot $t$. As mentioned above, because network resources are limited and shared by all network slices, not all URLLC devices can be guaranteed to be served at every minislot although the RAN-C will always accept the URLLC slice requests. If the QoS requirement of $i$ in $s$ is satisfied at $t$, then the device $i$ can be served by the slice $s$, and we let $b_{i,s}^u(t) = 1$; otherwise, $i$ cannot be served by $s$, and we let $b_{i,s}^u(t) = 0$. Certainly, we can adjust the slice priority weight introduced in subsection III.D to {orchestrate network} resources for the {coverage of all} URLLC devices. Based on the result in (\ref{eq:omega_s}), at minislot $t$, for a given $M/M/W^u$ queue with packet arrival intensity $\bm \lambda$, the minimum upper bound of bandwidth orchestrated for URLLC slices with a packet blocking probability $\alpha$ and a packet queueing probability $\varsigma$ can be given by \cite{How2019yang} \begin{equation}\label{eq:URLLC_bandwidth} \begin{array}{l} W^u(\bm r(t)) \le \sum\limits_{s \in {\mathcal S}^u } {\sum\limits_{i \in {\mathcal I}_s^u} {{\lambda _{s}}b_{i,s}^u(t)\frac{{{{r_{i,s}^u(t)}}}}{\kappa}} } + \\ \frac{{{\alpha} - \varsigma {\alpha}}}{{\varsigma - {\alpha}}}\sqrt {\frac{({\sum\limits_{s \in {{\mathcal S}^u}} {\sum\limits_{i \in {\mathcal I}_s^u}{b_{i,s}^u(t)\lambda _s^2D_s^2}} })( {\sum\limits_{s \in {\mathcal S}^u} {\sum\limits_{i \in {\mathcal I}_s^u} {{\lambda _{s}}b_{i,s}^u(t)\frac{{r_{i,s}^u(t)}^2}{{{\kappa ^2}{D_s}}}} }})}{{\mathop {\min }\nolimits_{s \in {{\mathcal S}^u}} \{ {\lambda _s}{D_s}\} }}}. \end{array} \end{equation} As (\ref{eq:URLLC_bandwidth}) is correlated with the channel use $r_{i,s}^u (t)$, we next discuss how to obtain its expression. For any URLLC slice $s \in {\mathcal S}^u$, during minislot $t$, let $\bm g_{ij,s}(t) \in {\mathbb C}^K$ be the transmit beamformer pointing at the device $i$ from the $j$-th RRH and $\bm h_{ij,s}(t) \in \mathbb{C}^K$ be the channel coefficient between the $i$-th URLLC device and the $j$-th RRH. {Recall that} RRHs cooperate to transmit signals to a URLLC device to satisfy its reliability requirement, the signal-to-noise ratio (SNR) received at device $i$ in $s$ at minislot $t$ can be written as \begin{equation}\label{eq:URLLC_SINR} {SNR_{i,s}^u(t)} = {{|\sum\nolimits_{j \in {\mathcal J}} {{{\bm h}_{ij,s}^{\rm H}}{{(t)}}{{\bm g}_{ij,s}}(t)} {|^2}}}/{{\phi \sigma _{i,s}^2}}, \end{equation} where ${\mathcal J} = \{1,2,\ldots,J\}$ denotes the set of deployed RRHs, $\phi > 1$ is an SNR loss coefficient owing to imperfect channel status information acquisition \cite{hou2018burstiness}, $\sigma_{i,s}^2$ denotes the noise power. Just like \cite{tang2019service}, (\ref{eq:URLLC_SINR}) does not include interference due to the usage of a flexible FDMA mechanism. For URLLC transmission {where the short packet transmission scheme is leveraged}, the capacity analysis for a finite blocklength channel coding regime derived in \cite{yang2014quasi} shall be resorted. {However, the capacity formula in \cite{yang2014quasi} was {derived under} an additive white Gaussian noise (AWGN) channel assumption rather than a fading channel {assumption} \cite{yang2014quasi,Durisi2016toward}. To tackle this issue, like \cite{Yang2020Joint,Ren2020Joint}, we assume that the fading channel is a quasi-static Rayleigh fading channel over a minislot and the channel coefficients are i.i.d. Then,} for any device $i \in {\mathcal{I}_s^u}$, $s \in \mathcal{S}^u$, the number of transmitted information bits $L_{i,s}^u(t)$ at minislot $t$ using $r_{i,s}^u(t)$ channel uses can be approximately correlated with the codeword\footnote{It is noteworthy that a URLLC packet will usually be coded before transmission. The generated codeword will be transmitted in the air interface such that the transmission reliability can be improved.} error decoding probability $\beta$ \begin{equation}\label{eq:URLLC_bit_length} \begin{array}{l} L_{i,s}^u(t) \approx r_{i,s}^u(t)C(SNR_{i,s}^u(t)) - \\ \qquad {Q^{ - 1}}(\beta)\sqrt {r_{i,s}^u(t)V(SNR_{i,s}^u(t))}, \end{array} \end{equation} where $C(SNR_{i,s}^u(t)) = \log_2(1 + SNR_{i,s}^u(t) )$, $V(SNR_{i,s}^u(t)) = \ln^2 2\left( {1 - \frac{1}{{{{(1 + SNR_{i,s}^u(t))}^2}}}} \right)$ is the channel dispersion, and $Q(\cdot)$ is the $Q$-function. The complicated expression of $V(SNR_{i,s}^u(t))$ in (\ref{eq:URLLC_bit_length}) significantly hinders the theoretical analysis of network resources orchestrated for URLLC slices. Fortunately, as $V(SNR_{i,s}^u(t))$ is upper-bounded by $\ln^2 2$, we can obtain the closed-form expression of the minimum upper bound of $r_{i,s}^u(t)$. {Specifically,} by defining $x = \sqrt{r_{i,s}^u(t)}$ and solving a quadratic equation with respect to (w.r.t.) $x$, {the closed-form expression of $r_{i,s}^u(t)$ can take the following form} \begin{equation}\label{eq:URLLC_channel_use} \begin{array}{l} r_{i,s}^u(t) \le \frac{{L_{i,s}^u(t)}}{{C(SNR_{i,s}^u(t))}} + \frac{{{{({Q^{ - 1}}(\beta))}^2}}}{{2{{(C(SNR_{i,s}^u(t)))}^2}}} + \\ \quad \frac{{{{({Q^{ - 1}}(\beta))}^2}}}{{2{{(C(SNR_{i,s}^u(t)))}^2}}}\sqrt {1 + \frac{{4L_{i,s}^u(t)C(SNR_{i,s}^u(t))}}{{{{({Q^{ - 1}}(\beta))}^2}}}}. \end{array} \end{equation} \subsection{Physical resource constraints} Next, we describe the physical resource constraints enforced for the RAN slicing system. In mIoT slices, each RRH may transmit feedback signals to its connected IoT devices for the connection establishment according to the RACH four-step procedure \cite{grau2019preamble}. Meanwhile, in URLLC slices, each RRH may transmit URLLC packets to URLLC devices. As the transmit power $E_j$ ($j \in \mathcal{J}$) of each RRH is limited, we have the following transmit power constraint \begin{equation}\label{eq:RRH_energy} \begin{array}{l} \sum\nolimits_{s \in {\mathcal S}^I} {{(1 + \alpha_g)\frac{\lambda_s^I}{\lambda_R}{{\hat E}_{j}^I}}} + \\ \quad \sum\nolimits_{s \in {\mathcal S}^u} {\sum\nolimits_{i \in {\mathcal I}_s^u} {b_{i,s}^u(t){{\bm g}_{ij,s}^{\rm H}}{{(t)}}{{\bm g}_{ij,s}}(t)} } \le {E_j}, \end{array} \end{equation} where ${\hat E}_{j}^I$ is assumed to be a constant and denotes the average transmit power of the $j$-th RRH for connecting to an associated IoT device over downlink, $\alpha_g$ is a coefficient. As a PPP with intensity $\lambda_s^I$ is utilized to model the distribution of IoT devices, the actual number of IoT devices may be greater than $\lambda_s^I$ once deployed. As a result, the coefficient $\alpha_g$ is introduced to reserve transmit power for exceeded IoT devices. In the RAN slicing system, as the total limited system bandwidth $W$ will be shared by mIoT slices and URLLC slices, we have the following bandwidth constraint \begin{equation}\label{eq:total_bandwidth} \sum\nolimits_{s \in {\mathcal S}^I} {(1+\alpha_g)\omega_s(\bar t)} + W^u(\bm r(t)) \le W, \end{equation} where $\omega_s(\bar t)$ denotes the bandwidth allocated to mIoT slice $s \in \mathcal{S}^I$. {$\omega_s(\bar t)$ is correlated with $F_s$ by means of $F_s = \left\lfloor {{{\omega _s}(\bar t)}/{{a}}} \right\rfloor$. This is because $F_s$ orthogonal uplink physical RA channels (PRACHs) will be allocated to the mIoT slice $s$. Besides, a single tone mode \cite{LTE-Nokia} with the tone spacing of $a$ MHz is adopted for each uplink PRACH, which indicates that each PRACH occupies a PRB.} $\alpha_g \omega_s(\bar t)$ denotes a block of reserved bandwidth for exceeded IoT devices. In (\ref{eq:total_bandwidth}), $F_s$ is an integer, and some integer variable recovery schemes \cite{tang2019systematic} can be leveraged to obtain the suboptimal $F_s$. However, considering the high computational complexity of optimizing an integer variable and the utilization of the scheme of reserving additional bandwidth resources, we directly relax the integer variable into a continuous one, i.e., let $F_s = {{{\omega _s}(\bar t)}/{{a}}}$. Without loss of any generality, we regard $\omega_s(\bar t)$ as an independent variable below. Additionally, as at least one PRB should be allocated to each type of mIoT slice $s \in {\mathcal S}^I$, we have \begin{equation}\label{eq:mMTC_bandwidth} \omega_s(\bar t) \ge a. \end{equation} \subsection{Slice utility functions} Owing to the exploration of mIoT and bursty URLLC service multiplexing, we should orchestrate network resources for all mIoT slices and URLLC slices to simultaneously maximize the slice utilities. For a mIoT slice $s \in \mathcal{S}^I$, its primary goal is to offload as many packets as possible from IoT devices. Thus, the number of accumulated packets in each IoT device should be kept at a low level. Considering that a great RA success probability of an IoT device will lead to a low number of accumulated packets, we define the mIoT slice utility as follows. \begin{mydef}\label{mydef:IoT_slice_utility} Over a time slot of duration $T$, the mIoT slice utility is defined as the time average of RA success probabilities of IoT devices in all mIoT slices, which is given by \begin{equation}\label{eq:IoT_utility} {{\bar U}^I} = \frac{1}{T}\sum\nolimits_{t = 1}^T {{U^I}(t)} = \frac{1}{T}\sum\nolimits_{t = 1}^T {\tilde P(t) }, \end{equation} where $\tilde P(t) = \sum\nolimits_{s \in {{\mathcal S}^I}} {\frac{{{\lambda _s^I}{P_s}(t)}}{{\sum\nolimits_{s \in {{\mathcal S}^I}} {{\lambda _s^I}} }}}$ with the numerator $\lambda_s^I P_s (t)$ represents the expected sum of RA success probabilities of IoT devices in slice $s \in \mathcal{S}^I$ and the denominator $\sum\nolimits_{s\in\mathcal{S}^I}{\lambda_s^I}$ denoting a normalization coefficient. \end{mydef} In (\ref{eq:IoT_utility}), ${\lambda_s^I}/{\sum\nolimits_{s \in \mathcal{S}^I} {\lambda_s^I}}$ can be regarded as an intra-slice priority coefficient. A mIoT slice serving more IoT devices will be orchestrated with more network resources. For a URLLC slice $s \in \mathcal{S}^u$, its primary objective is to maximize the slice gain reflected by the parameters of the bursty URLLC slice request {in an efficient way}. Therefore, we define an energy-efficient utility for URLLC slices, as presented below. \begin{mydef}\label{mydef:URLLC_slice_utility} Over one time slot of duration $T$, the bursty URLLC slice utility is defined as the time-average energy efficiency for serving URLLC devices, which is given by \begin{equation}\label{URLLC_long_term_utility} \begin{array}{l} {{\bar U}^u} = \frac{1}{T}\sum\limits_{t = 1}^T {{U^u}(t)} = \frac{1}{T}\sum\limits_{t = 1}^T {\sum\limits_{s \in {{\mathcal S}^u}} {U_s^u({D_s},{\bm g_{ij,s}}(t))} } \\ \quad = \frac{1}{T}\sum\limits_{t = 1}^T {\sum\limits_{s \in {{\mathcal S}^u}} {\sum\limits_{i \in {\mathcal I}_s^u} \frac{b_{i,s}^u(t)}{{1 - {e^{ - {D_s}}}}} } } - \\ \qquad \frac{\eta }{T}\sum\limits_{t = 1}^T {\sum\limits_{s \in {{\mathcal S}^u}} {\sum\limits_{j \in {\mathcal J}} {\sum\limits_{i \in {\mathcal I}_s^u} {b_{i,s}^u(t)\bm g_{ij,s}^{\rm{H}}(t){\bm g_{ij,s}}(t)} } } }, \end{array} \end{equation} where $\eta$ is {a positive} energy efficiency coefficient indicating the tradeoff between the URLLC slice gain and the RRH power consumption. \end{mydef} In (\ref{URLLC_long_term_utility}), we characterize the slice gain by $\frac{1}{T}\sum\nolimits_{t = 1}^T {\sum\nolimits_{s \in {{\mathcal S}^u}} {\sum\nolimits_{i \in {\mathcal I}_s^u} \frac{b_{i,s}^u(t)}{{1 - {e^{ - {D_s}}}}} } }$ as it reflects the latency requirements of bursty URLLC slices. Then, during a time slot, the original RAN slicing problem for mIoT and URLLC service multiplexing can be formulated as follows. \begin{subequations}\label{eq:original_problem} \begin{alignat}{2} & \mathop {\rm maximize}\limits_{\{{b_{i,s}^u(t)},{{\omega_s}}(\bar t),{{\bm g}_{ij,s}}(t)\}} {{\bar U}^I} + {\tilde \rho} {{\bar U}^u} \\ & {\rm s.t. \text{ }} b_{i,s}^u(t) \in \{ 0,1\}, \forall s \in {\mathcal S}^u, i \in {\mathcal I}_s^u \\ & \rm {constraints \text{ } (\ref{eq:preamble_trans_suc_prob}), (\ref{eq:RRH_energy})-(\ref{eq:mMTC_bandwidth}) \text{ } are \text{ } satisfied,} \end{alignat} \end{subequations} where $\tilde \rho$ is {a non-negative} inter-slice priority coefficient reflecting the priority of orchestrating network resources for mIoT slices and URLLC slices\footnote{{To make the problem (\ref{eq:original_problem}) slightly simpler}, we do not focus on the selection of the optimal {inter-slice priority} coefficient $\tilde \rho $ and {energy efficiency coefficient} $\eta$ here. Yet, an iterative method proposed in our paper \cite{xi2020non} can be leveraged to determine their values.}. The solution of (\ref{eq:original_problem}) is quite challenging mainly because i) \textbf{indeterministic objective function}: {the closed-form expression of $P_s(t)$ is not obtained. Besides,} (\ref{eq:original_problem}) should be optimized at the beginning of the $1^{\rm st}$ minislot. The time-averaged objective function of (\ref{eq:original_problem}) can only be exactly computed according to the future channel information. Therefore, the value of the objective function is indeterministic at the beginning of the $1^{\rm st}$ minislot; ii) \textbf{two-timescale issue}: the creation of a network slice is performed at a timescale of time slot. Thus, the variable $\omega_s(\bar t)$ should be determined at the beginning of the time slot $\bar t$ and kept unchanged over the whole time slot. The channel, however, is time-varying. As a result, the beamformer $\bm g_{ij,s}(t)$ should be optimized at each minislot $t$. In summary, the variables in (\ref{eq:original_problem}) should be optimized at two different timescales; iii) \textbf{thorny optimization problem}: at each minislot $t$, the constraint (\ref{eq:preamble_trans_suc_prob}) is non-convex over $\omega_s(\bar t)$, and the constraints (\ref{eq:RRH_energy}), (\ref{eq:total_bandwidth}) are non-convex over $\bm g_{ij,s}(t)$, which together lead to a non-convex problem. {To solve this highly challenging problem, we first derive the closed-form expression of $P_s(t)$. Next, we attempt to tackle the two-timescale issue via converting it to single-timescale issues. Finally, we develop a novel alternative optimization method to solve the thorny optimization problem. The procedures of solving (\ref{eq:original_problem}) are elaborated in the following sections.} {\section{Derivation of the closed-form expression of the RA success probability}} {The RA success probability $P_s(t)$ of an IoT device is closely related to whether the device needs to request for the RACH and whether the RACH request is restricted. If the device has IoT packets to deliver, the device will request for the RACH. Therefore, we analyze behaviors (i.e., arrival, accumulation, and departure) of IoT packets in an IoT device and the probability of restricting its RACH request. Based on the analysis results, the closed-form expression of $P_s(t)$ is derived.} {\subsection{Arrival, accumulation and departure of IoT packets}} For a typical IoT device, we leverage a queue maintained in the device to capture the arrival, accumulation and departure of IoT packets. During minislot $t$, a Poisson distribution with intensity (or {the average number of} ne{\underline{\textbf w}} arrival {packets}) {$\vartheta_{w,s}(t)$} is exploited to model the random, mutually independent endogenous packet arrivals in an IoT device in slice $s$. {Once arrived, new packets will not be sent out immediately in general and will enter a queue in the IoT device to wait to be served. To model the queue, an $M/M/k$ queueing system rather than an $M/M/{1}$ queueing system is leveraged as the key performance indicators of the former are much better than the later one. First-come-first-serve (FCFS) is selected as the queueing principle in the $M/M/k$ queue.} Besides, to facilitate the analysis of the queue evolution process, we consider the slotted-ALOHA RA protocol although there are many other RA protocols such as non-orthogonal and coded RA protocols. Owing to the RA behavior of the ALOHA protocol, new arrivals during $t$ will only be counted at minislot $t + 1$. Thus, the {value of} $N_{a,s}(t)$ in the queue of a randomly selected IoT device in slice $s$ at $t$ is simultaneously determined by the following three factors: a) the accumulated number of packets; b) the number of new arrivals during $t - 1$; c) whether the preamble of the device can be successfully decoded by its associated RRH. The work in \cite{jiang2018random} presented a queue evolution model based on the single packet transmission configuration. We extend \cite{jiang2018random} to the {general} case of {transmitting multiple packets in one transmission time interval} {as multiple packets can be simultaneously transmitted in one transmission time interval}, and (\ref{eq:queue_evolution}) shows an evolution model of $N_{a,s}(t)$ for all $s \in {\mathcal S}^I$ with \begin{equation}\label{eq:queue_evolution} {N_{a,s}}(t) = \left\{ {\begin{array}{*{20}{l}} {0,t = 1}\\ {{{[{N_{w,s}}(t - 1) - \mathbbm 1({\rm{RA \text{ } succeeds}}){x_s}]}^ + },t = 2}\\ {[{N_{a,s}}(t - 1) + {N_{w,s}}(t - 1) - }\\ {\mathbbm 1({\rm{RA \text{ } succeeds}}){x_s}{]^ + },t \ge 3} \end{array}} \right. \end{equation} where $N_{w,s}(1)$ is the number of ne{\underline{\textbf w}} arrivals in the $1^{\rm st}$ minislot, ${\mathbbm 1}(\cdot)$ is a function equaling one if the corresponding RA succeeds; otherwise, ${\mathbbm 1}(\cdot)=0$. $x_s = a\log_2(1+\theta_s^{th})/L$ packets at the head of the queue will be popped out if ${\mathbbm 1}(\cdot)=1$, where $L$ is the {number of information bits of an} IoT packet; otherwise, they will not. $[x]^+ = \max(x,0)$. At minislot $t$, based on the model in (\ref{eq:queue_evolution}), for a randomly selected IoT device in slice $s \in \mathcal{S}^I$, the probability that its maintained queue is {\underline{\textbf n}}ot {\underline{\textbf e}}mpty can be defined as \begin{equation}\label{eq:non_empty_prob} P_{ne,s}{(t)} = {\mathbb P}\{N_{a,s}(t) > 0\}. \end{equation} (\ref{eq:non_empty_prob}) explicitly shows that new arrivals at $t$ will not be sent out immediately, which is reflected in (\ref{eq:queue_evolution}). (\ref{eq:non_empty_prob}) is significantly different from the work in \cite{jiang2018random}, which defines the non-empty probability ${\mathcal T}^m = {\mathbb P}\{N_{\rm Cum}^m + N_{\rm New}^m> 0 \}$, where $N_{\rm Cum}^m$ is the number of accumulated packets and $N_{\rm New}^m$ denotes the number of new arrivals in the $m$-th slot. The definition ${\mathcal T}^m$ shows that new arrivals during the $m$-th minislot have the probability of sending out immediately. {However, according to the RA behavior of the ALOHA protocol, new arrivals in minislot $m$ can only be sent out in minislot $m+1$ if possible.} Next, we describe the packet departure process combined with {an extended subframe structure for mIoT transmissions}. As mentioned above, partly due to the limitation on the subframe structure, NB-IoT and LTE-M {\cite{Cellular-Ericsson,LTE-Nokia}} can only admit 50,000 devices. For NB-IoT, only one PRB with a bandwidth of $180$ KHz in the frequency domain is allocated for the IoT service, and each physical channel occupies the whole PRB. For LTE-M, although the physical channels are time and frequency multiplexed, it only reserves six in-band PRBs with a total bandwidth of $1.08$ MHz in the frequency domain for the IoT service. Thus, the subframe structure for mIoT transmissions should be revisited if more RACH requests from IoT devices are required to be accepted. Fig. \ref{fig:fig_frame_minislot_structure} depicts an extended subframe structure for mIoT transmissions. Although it depicts some essential channels, we do not discuss their correlations to the considered {RAN slicing} problem as the detailed research on the physical layer supporting the mIoT service is out of our scope. In this structure, both the frequency division multiplexing (FDM) scheme and {the} code division multiplexing (CDM) scheme are leveraged to admit more IoT devices in the way of alleviating mutual device interference. Particularly, the FDM scheme can alleviate signal interference through orthogonal frequency band allocation. The CDM scheme mitigates the co-channel signal interference via reducing the cross-correlation of simultaneous transmissions. {Based on the extended structure}, at the beginning of each minislot, an active IoT device, i.e., an IoT device whose queue is non-empty, will randomly choose a preamble, {which is an orthogonal sequence,} from a set of non-dedicated RA preambles of size $\xi$. {Next, it will} transmit the preamble through a randomly selected PRACH, {which occupies a PRB}. For each preamble, it has an equal probability ${{1}/{\xi}}$ to be chosen by each IoT device. Similarly, each PRACH has an equal probability ${1}/{F_s}$ to be selected. Thus, the average number of IoT devices in mIoT slice $s \in \mathcal{S}^I$ choosing the same PRACH and the same preamble is ${\lambda_s^I}/{\xi F_s}$. Notably, a greater $\xi F_s$ may significantly reduce signal interference experienced at each RRH. \begin{figure}[!t] \centering \includegraphics[width=3.4in]{frame_slot_structure.eps} \caption{{The extended subframe structure for mIoT transmissions.} 'R' and 'D' denote the resource block reserved for preamble and IoT data transmission. The preamble in 'R' also reflects the usage of a code division multiplexing scheme. PBCH, PSS and SSS represent the PRBs for physical broadcast channel, primary synchronization signal and secondary synchronization signal transmission, respectively.} \label{fig:fig_frame_minislot_structure} \end{figure} {\subsection{Access control scheme}} In a mIoT network slice, as the slotted-ALOHA protocol allows all active IoT devices to request for RA at the beginning of each minislot without checking channel statuses, IoT devices may simultaneously transmit preambles. It may incur severe slice congestion that may lower the RA success probabilities of IoT devices and degrade the system performance. Access control has been considered as an efficient proposal of alleviating congestion \cite{Study163GPP}, and many access control schemes such as access class barring (ACB), power ramping and back-off schemes \cite{jiang2018random} have been proposed. As we aim at investigating the performance difference between a network slicing system without access control and with access control, we adopt the following two schemes \cite{jiang2018random}: 1) \textbf{Unrestricted scheme:} each active IoT device requests the RACH at the beginning of minislot $t$ without access restriction; 2) \textbf{ACB scheme:} at the beginning of $t$, each active IoT device draws a random number $q \in [0, 1]$ and can request the RACH only when $q < P_{ACB}$, where $P_{ACB}$ is an ACB factor determined by RRHs based on the slice congestion condition. With the introduced access control schemes, the probability that the RACH requests of a randomly selected IoT device in slice $s \in \mathcal{S}^I$ are {\underline{\textbf n}}ot {\underline{\textbf r}}estricted at minislot $t$ is defined as \begin{equation}\label{eq:non_restriction_prob} P_{nr,s}{(t)} = {\mathbb P}\{{\rm Unrestricted} \text{ } {\rm RACH} \text{ } {\rm requests}\}. \end{equation} For all $s \in \mathcal{S}^I$ at any minislot $t$, we have $P_{nr,s}(t) = 1$ for the unrestricted scheme and $P_{nr,s}(t) = P_{ACB}$ for the ACB scheme. {\subsection{Closed-form expression of $P_s(t)$}} {With the above analysis results, we can now derive the closed-form expression of $P_s(t)$, {$\forall s \in {\mathcal S}^I$}. Specifically,} for the randomly selected IoT device in $s \in {\mathcal{S}^I}$, we can rewrite (\ref{eq:preamble_trans_suc_prob}) as follows \begin{equation}\label{eq:QoS_analysis} \begin{array}{l} P_s(t) = {\mathbb P}\{ {h_o} \ge \frac{{\theta _s^{th}}}{{{\rho _o}}}({\sigma ^2} + {{\mathcal I}_{s}(t)})\} \\ \mathop = \limits^{(a)} {{\mathbb E}}\left[ {\exp \left\{ { - \frac{{\theta _s^{th}}}{{{\rho _o}}}({\sigma ^2} + {{\mathcal I}_{s}(t)})} \right\}} \right] \\ = e^ { { - \frac{{\theta _s^{th}}}{{{\rho _o}}}{\sigma ^2}} }{\mathcal L}_{{{\mathcal I}_{s}(t)}}\left(\frac{\theta_s^{th}}{\rho_o}\right), \end{array} \end{equation} where (a) follows from the {law of total probability} over ${\mathcal I}_{s}(t)$, and ${\mathcal L}_{{{\mathcal I}_{s}(t)}} (\cdot)$ denotes the Laplace transform (LT) of the probability density function (PDF) of the random variable ${\mathcal I}_{s}(t)$. Note that the notation ${\mathcal L}_{{{\mathcal I}_{s}(t)}} (\cdot)$ is a terminology that is a slight abuse of subscript ${{\mathcal I}_{s}(t)}$. The following lemma characterizes the LT of interference $\mathcal{I}_s(t)$. {By referring to the RA behavior of the ALOHA protocol, we derive the expression of the LT of interference $\mathcal{I}_{\rm Intra}(t)$, which is obviously different from that obtained in \cite{jiang2018random}.} In \cite{jiang2018random}, the obtained ${\mathcal L}_{{{\mathcal I}_{\rm Intra}(t)}}(\gamma_{th}/\rho)$ was a quasi-convex function over the system bandwidth allocated to IoT devices. In this paper, the obtained ${\mathcal L}_{{{\mathcal I}_{s}(t)}} \left(\theta_s^{th}/\rho_o\right)$ is the difference of two quasi-convex functions that significantly increases the difficulty of orchestrating system resources for mIoT slices. \begin{lemma}\label{lem:LT_interference_expression} For the origin RRH, based on the packet evolution model in (\ref{eq:queue_evolution}), the LT of its received interference from active IoT devices associated with it is given by \begin{equation}\label{eq:LT_interference_expression} {\mathcal L}_{{{\mathcal I}_{s}(t)}} \left(\varpi_s\right) = {\frac{{1 + \varpi_s{\rho _o}}}{{{{\left( {1 + \alpha_s \varpi_s{\rho _o}/\left( {1 + \varpi_s{\rho _o}} \right)} \right)}^{3.5}}}} - \frac{{1 + \varpi_s{\rho _o}}}{{{{\left( {1 + \alpha_s } \right)}^{3.5}}}}}, \end{equation} where $\varpi_s = {\theta_s^{th}}/{\rho_o}$, $\alpha_s = {{{P_{nr,s}}(t){P_{ne,s}}(t){\lambda _{{s}}^I}}}/({{3.5{\lambda _R}{\xi F_s}}})$. \end{lemma} \begin{proof} Please refer to Appendix A. \end{proof} By substituting (\ref{eq:LT_interference_expression}) into (\ref{eq:QoS_analysis}), we can obtain a mathematical expression of $P_s(t)$. The expression, however, is not in the closed-form as it is a function of $P_{ne,s}(t)$, the closed-form expression of which is not obtained. Next, we attempt to derive the closed-form expression of $P_{ne,s}(t)$. According to the definition of non-empty probability, $P_{ne,s}(t)$ is correlated with $N_{a,s}(t)$. Thus, we theoretically analyze $P_{ne,s}(t)$ as the following. From (\ref{eq:queue_evolution}), we can observe that $N_{a,s}(1) = 0$ for all $s \in {\mathcal S}^I$; thus, at the $1^{\rm st}$ minislot, we have \begin{equation}\label{eq:non_empty_prob_1} P_{ne,s}^{1} = {\mathbb P}\{N_{a,s}^1 > 0\} = 0, \end{equation} where we write $x^t$ instead of $x(t)$ to lighten the notation. {The similar lightened notation is adopted throughout the rest of this section to simplify the description.} The following lemma presents the closed-form expression of the non-empty probability of a randomly selected IoT device served by the origin RRH when minislot $t > 1$. \begin{lemma}\label{lem:non_empty_prob_lemma} The number of accumulated packets of a randomly selected IoT device served by the origin RRH at minislot $t > 1$ may be approximately Poisson distributed. Therefore, based on the model in (\ref{eq:queue_evolution}), for any mIoT slice $s \in \mathcal{S}^I$, we approximate the number of {\underline{\textbf a}}ccumulated packets $N_{a,s}^{t}$ at $t$ as a Poisson distribution with intensity $\vartheta_{a,s}^{t}$, which is given by \begin{equation}\label{eq:mu_accumulated_packets} \vartheta _{a,s}^t = \left [\vartheta _{w,s}^{t - 1} + \vartheta _{a,s}^{t - 1} - P_{s}^{t - 1}\left( {1 - {e^{ - \vartheta _{w,s}^{t - 1} - \vartheta _{a,s}^{t - 1}}}} \right) \right ]^+ \end{equation} Then, the probability that the queue of the device is non-empty at $t$ can be written as \begin{equation}\label{eq:non_empty_prob_m} P_{ne,s}^t = 1 - {e^{ - \vartheta _{a,s}^t}} \end{equation} \end{lemma} \begin{proof} Please refer to Appendix B. \end{proof} Combined with (\ref{eq:QoS_analysis}), (\ref{eq:LT_interference_expression}) and (\ref{eq:non_empty_prob_m}), the closed-form expression of $P_s(t)$ ($s \in \mathcal{S}^I$) can be obtained. \section{Problem solution with system generated channels} {Although we obtain the closed-form expression of $P_s(t)$, it is still difficult to solve (\ref{eq:original_problem}). This is mainly because (\ref{eq:original_problem}) is a two-timescale optimization problem and some optimization methods cannot be directly utilized to solve it. A possible proposal of solving the two-timescale optimization problem is to explore an SAA technique \cite{kim2015guide} and an ADMM method \cite{boyd2011distributed}. The SAA technique can be utilized to approximate the indeterministic objective function. Based on the approximated results, the ADMM method can be leveraged to decompose the two-timescale problem into multiple single-timescale problems, which can be solved by some optimization methods. Then, the solution of the two-timescale problem can be effectively recovered by ADMM based on the solutions of the single-timescale problems. } \subsection{Sample average approximation and alternating direction method of multipliers} As mIoT slices and URLLC slices share the network resources, both $\bar U^I$ and $\bar U^u$ may be determined by channel coefficients experienced by URLLC slices. At each minislot $t$, due to the i.i.d. assumption on the channel coefficients of URLLC slices, we have \begin{equation}\label{objfun_approx} \frac{1}{T}\sum\nolimits_{t = 1}^T {{U^I}(t)} + \frac{1}{T}\sum\nolimits_{t = 1}^T {\tilde \rho {U^u}(t)} \approx {{\mathbb E}_{\hat {\bm h}}}\left[ {{{\hat U}^I} + \tilde \rho {{\hat U}^u}} \right] \end{equation} where $\hat {\bm h}$ is the channel samples of URLLC slices collected at the beginning of the time slot $\bar t$. Given a collection of channel samples $\{\bm h_m\}$ with $\bm h_m = [\bm h_{11,1m};\ldots;\bm h_{1J,sm};\ldots;\bm h_{N^uJ,|\mathcal{S}^u|m}]$ and $m \in \mathcal{M}=\{1,\ldots,M\}$. For notation lightening, we write $x_m$ instead of $x(m)$ that represents a variable corresponding to the channel sample $\bm h_m$. Just like \cite{How2019yang}, as constraints (\ref{eq:original_problem}b) and (\ref{eq:original_problem}c) construct a non-empty compact set, the conclusion of Proposition 5.1 in \cite{How2019yang} is applicable to this paper by exploiting the SAA technique. The conclusion indicates that if the number of channel samples $M$ is reasonably large, then $\frac{1}{M}\sum\nolimits_{m = 1}^M {U_m^I } + \frac{\tilde \rho}{M}\sum\nolimits_{m = 1}^M {U_m^u }$ converges to ${{\mathbb E}_{\hat {\bm h}}}[ {{{\hat U}^I} + {{\hat U}^u}} ]$ uniformly on the non-empty compact set almost surely. In other words, the SAA technique enables us to use the channel samples collected at the beginning of a time slot to approximate the unknown channel coefficients over the time slot. Recall that the variable $\omega_s(\bar t)$ will be kept unchanged over the time slot $\bar t$ and the beamformer $\bm g_{ij,s}(t)$ should be calculated at each minislot $t$, we can further consider (\ref{eq:original_problem}) as a global consensus problem, which can be effectively mitigated by an ADMM method. In (\ref{eq:original_problem}), $\omega_s(\bar t)$ is a global consensus variable that should be maintained in consensus for all $\bm h_m$ ($m \in \mathcal{M}$), and $\bm g_{ij,sm}$ that is calculated based on $\bm h_m$ is a local variable. The fundamental principle of ADMM is to impose augmented penalty terms characterizing global consensus constraints on the objective function of an optimization problem. In this way, the local variables can be driven into the global consensus while still attempting to maximize the objective function. Let ${\bm G}_{i,sm} = {\bm g}_{i,sm} {\bm g}_{i,sm}^{\rm H} \in {\mathbb R}^{JK \times JK}$, ${\bm H}_{i,sm} = {\bm h}_{i,sm} {\bm h}_{i,sm}^{\rm H} \in {\mathbb R}^{JK \times JK}$, where ${\bm g}_{i,sm} = [{\bm g}_{i1,sm};\ldots;{\bm g}_{iJ,sm}] \in {\mathbb C}^{JK \times 1}$ and ${\bm h}_{i,sm} = [{\bm h}_{i1,sm};\ldots;{\bm h}_{iJ,sm}] \in {\mathbb C}^{JK \times 1}$. By applying the property \cite{karipidis2008quality} ${{{\bm G}_{i,sm}} = {{\bm g}_{i,sm}}{\bm g}_{i,sm}^{\rm H} \Leftrightarrow {{\bm G}_{i,sm}} \succeq 0}$, ${{\rm rank}({{\bm G}_{i,sm}}) \le 1}$ and utilizing the conclusions of SAA and ADMM, we can approximate (\ref{eq:original_problem}) as the following problem at the beginning of the time slot $\bar t$. \begin{subequations}\label{eq:SAA_admm_problem} \begin{alignat}{2} & \mathop {{\rm{minimize}}}\limits_{\{ \omega _{sm},\omega_s(\bar t),{b_{i,sm}^u},{\bm G_{i,sm}}\}\hfill} \sum\limits_{m = 1}^M {\left[ { - \frac{{U_m^I}}{M} - \frac{{\tilde \rho U_m^u}}{M}} \right]} + \nonumber \\ & \underbrace {\sum\limits_{m = 1}^M {\sum\limits_{s \in {{\mathcal S}^I}} {\left[ {{\psi _{sm}}\left( {{\omega _{sm}} - {\omega _s}(\bar t)} \right) + \frac{\mu }{2}\left\| {{\omega _{sm}} - \omega{_s}(\bar t)} \right\|_2^2} \right]} } }_{{\rm augmented} \text{ } {\rm penalty} \text{ } {\rm terms}} \allowdisplaybreaks[4] \\ & {\rm s.t. \text{ }} P_{sm} \ge \pi_s, \forall s \in {\mathcal S}, m \in {\mathcal M} \\ & \sum\nolimits_{s \in {\mathcal S}^I} {{(1 + \alpha_g)\frac{\lambda_s^I}{\lambda_R}{\hat E}_{j}^I}} + \nonumber \\ & \sum\nolimits_{s \in {{\mathcal S}^u}} {\sum\nolimits_{i \in {\mathcal I}_s^u} {b_{i,sm}^u {\rm tr}({{\bm Z}_j}{{\bm G}_{i,sm}})} } \le {E_j}, \forall j\in {\mathcal J},m\in {\mathcal M} \\ & \sum\nolimits_{s \in {{\mathcal S}^I}} {(1+\alpha_g) \omega _{s}(\bar t)} + W^u(\bm r_m) \le W, m \in {\mathcal M} \\ &{{\bm G}_{i,sm}} \succeq 0, \forall s \in {\mathcal S}^u, i \in {\mathcal I}_s^u, m \in {\mathcal M} \\ &{{\rm rank}({{\bm G}_{i,sm}}) \le 1}, \forall s \in {\mathcal S}^u, i \in {\mathcal I}_s^u, m \in {\mathcal M} \\ & b_{i,sm}^u \in \{0,1\}, \forall s \in {\mathcal S}^u, i \in {\mathcal I}_s^u, m \in {\mathcal M} \\ & {\rm constraint} \text{ } (\ref{eq:mMTC_bandwidth}) \text{ } {\rm is} \text{ } {\rm satisfied}, \end{alignat} \end{subequations} where $\psi_{sm}$ is the Lagrangian multiplier, $\mu$ is a penalty coefficient, ${\bm Z}_j$ is a square matrix with $J \times J$ blocks, and each block in ${\bm Z}_j$ is a $K \times K$ matrix. In ${\bm Z}_j$, the block in the $j$-th row and {the} $j$-th column is a $K \times K$ identity matrix, and all other blocks are zero matrices. (\ref{eq:original_problem}) is now reduced to a deterministic single-timescale problem (\ref{eq:SAA_admm_problem}). What is more, (\ref{eq:SAA_admm_problem}) can be split into $M$ separate problems that can be optimized in parallel as its objective function is separable. Thus, the following ADMM-based framework, {which needs to compute (\ref{eq:arg_lagarangian})-(\ref{eq:psi_update}),} can be exploited to mitigate (\ref{eq:SAA_admm_problem}). \begin{subequations}\label{eq:arg_lagarangian} \begin{alignat}{2} & \left\{ {{\omega _{sm}^{(k + 1)},b_{i,sm}^{u(k+1)}},{\bm G_{i,sm}^{(k + 1)}}} \right\} = \nonumber \\ & \mathop {{\rm{argmin}}}\nolimits_{\left\{ \omega _{sm},b_{i,sm}^{u},{\bm G_{i,sm}}\right\}} \overline {\mathcal L} (\omega _{sm},{{\bm G}_{i,sm}}) \\ & {\rm s.t. \text{ }} {\rm for} \text{ } {\rm the} \text{ } m{\rm -th} \text{ } {\rm sample}, (\ref{eq:SAA_admm_problem}b)-(\ref{eq:SAA_admm_problem}g) \text{ } \rm{are} \text{ } {\rm satisfied} \allowdisplaybreaks[4] \\ & \quad {\rm for} \text{ } {\rm the} \text{ } m{\rm -th} \text{ } {\rm sample}, \text{ } \omega_{sm} \ge a, \text{ } \forall s\in {\mathcal S}^I \end{alignat} \end{subequations} \begin{equation}\label{eq:omega_update} \omega _s^{(k + 1)}(\bar t) = \sum\nolimits_{m = 1}^M {( {\omega _{sm}^{(k + 1)} + \psi _{sm}^{(k)}/{\mu}} )}/{M}, \text{ } \forall s\in {\mathcal S}^I \end{equation} \begin{equation}\label{eq:psi_update} \psi _{sm}^{(k + 1)} = \psi _{sm}^{(k)} + \mu \left( {\omega _{sm}^{(k + 1)} - \omega _s^{(k + 1)}(\bar t)} \right), \text{ } \forall s\in {\mathcal S}^I \end{equation} where the augmented partial Lagrangian function \begin{equation}\label{eq:average_Lagrangian_func} \begin{array}{l} \bar{\mathcal{L}}(\omega _{sm},\bm {\bm G}_{i,sm}) = {- \frac{{U_m^{I(k)}}}{M} - \frac{{\tilde \rho U_m^{u(k)}}}{M} +} \\ { \sum\limits_{s \in {{\mathcal S}^I}} {\left[ {\psi _{sm}^{(k)}\left( {\omega _{sm} - \omega _s^{(k)}(\bar t)} \right) + \frac{\mu }{2}{{\left\| {\omega _{sm} - \omega _s^{(k)}(\bar t)} \right\|}_2^2}} \right]} }. \end{array} \end{equation} This ADMM-based framework can be executed on multiple processors{/virtual machines}. Each processor is responsible for optimizing (\ref{eq:arg_lagarangian}) and calculating (\ref{eq:psi_update}) with a global value as an input. (\ref{eq:omega_update}) is centrally updated in such a way that local variables converge to the global value, which is the solution of (\ref{eq:SAA_admm_problem}). Unfortunately, (\ref{eq:arg_lagarangian}) is a mixed-integer non-convex optimization problem as there are zero-one variables, continuous variables and non-convex constraints in (\ref{eq:arg_lagarangian}). As a result, the optimization of (\ref{eq:arg_lagarangian}) is quite difficult. We next discuss how to handle this hard problem. \subsection{Alternative optimization} In this subsection, we {explore a novel} alternative optimization scheme to handle the mixed-integer non-convex optimization problem. Specifically, we first assume that continuous variables are known and attempt to mitigate a zero-one optimization problem. Given the zero-one variables, we then try to optimize a non-convex optimization problem. The process is alternatively conducted until convergence. \subsubsection{URLLC device associations} Given continuous variables $\{{\bm G}_{i,sm}^{(k)}, \omega_{sm}^{(k)}\}$ at the $k$-th iteration, the association problem of URLLC devices in URLLC slices can take the following form \begin{subequations}\label{eq:arg_lagarangian_b_isu} \begin{alignat}{2} & \{ b_{i,sm}^{u(k+1)} \} = \mathop {{\rm{argmin}}}\nolimits_{\{b_{i,sm}^u\}} - {{\tilde \rho U_m^{u(k)}}}/{M} \\ & {\rm s.t. \text{ }} {\rm for} \text{ } m, \text{ } (\ref{eq:SAA_admm_problem}c), (\ref{eq:SAA_admm_problem}d),(\ref{eq:SAA_admm_problem}g) \text{ } \rm{are} \text{ } satisfied. \end{alignat} \end{subequations} This problem is non-linear and hard to be handled. In theory, an exhaustive algorithm can obtain the optimal solution of (\ref{eq:arg_lagarangian_b_isu}). The computation complexity of this algorithm is $O(2^{N^u})$ that may be impractical in implementation. Therefore, a greedy scheme of the computational complexity $O(N^u)$, which is summarized as the following, is proposed to obtain $\{b_{i,sm}^{u(k+1)}\}$. \begin{enumerate}[a)] \item initialize two device sets, i.e., candidate device set ${\mathcal{I}}^{u-} = {\mathcal I}^u$, association device set ${\mathcal I}^{u+} = \emptyset$. \item select the device that maximizes ${{\tilde \rho U_m^{u(k)}}}/{M}$ from ${\mathcal{I}}^{u-}$, remove it from ${\mathcal{I}}^{u-}$, and add it to ${\mathcal{I}}^{u+}$. Given ${\mathcal{I}}^{u+}$, check the feasibility of (\ref{eq:arg_lagarangian_b_isu}). If (\ref{eq:arg_lagarangian_b_isu}) is feasible, then accept the device; otherwise, remove the device from ${\mathcal{I}}^{u+}$. Continue till ${\mathcal{I}}^{u-} = \emptyset$. \end{enumerate} \subsubsection{{Non-convex optimization}} Given the obtained $b_{i,sm}^{u(k+1)}$, (\ref{eq:SAA_admm_problem}) will be reduced to the following {optimization} problem. \begin{subequations}\label{eq:bandwidth_beamforming_problem} \begin{alignat}{2} & \left\{ {\omega _{sm}^{(k + 1)}}, {\bm G_{i,sm}^{(k + 1)}} \right\} = \mathop {{\rm{argmin}}}\nolimits_{\{\omega _{sm},{\bm G_{i,sm}}\}} \overline {\mathcal L} (\omega _{sm},{{\bm G}_{i,sm}}) \\ & {\rm s.t. \text{ }} {\rm for} \text{ } m, (\ref{eq:SAA_admm_problem}b)-(\ref{eq:SAA_admm_problem}f),(\ref{eq:arg_lagarangian}c) \text{ } \rm{are} \text{ } satisfied. \end{alignat} \end{subequations} In (\ref{eq:bandwidth_beamforming_problem}), the low-rank constraint (\ref{eq:SAA_admm_problem}f) is non-convex, and its objective function is not convex and even not quasi-convex w.r.t. ${\omega_{sm}}$, the tackling of which is quite tricky. To tackle the non-convex low-rank constraint (\ref{eq:SAA_admm_problem}e), we resort to the SDR technique. The primary procedures of SDR are i) directly drop the low-rank constraint; ii) solve the optimization problem without the low-rank constraint to obtain the solution; iii) if the obtained solution is not rank-one, then some manipulations such as randomization/scale \cite{ma2010semidefinite} are needed to perform on it to impose the low-rank constraint; otherwise, its principal component is the optimal solution to (\ref{eq:bandwidth_beamforming_problem}). For the tricky objective function, we are reminded of the art of dealing with a non-convex function, i.e., study the structure of the function if it is non-convex. A crucial observation is that $P_{sm}$ is quasi-concave w.r.t. $\omega_{sm}$ although the objective function is not quasi-convex w.r.t. $\omega_{sm}$. Therefore, we resort to the Taylor expansion to approximate the tricky objection function. The following analysis is based on two facts \textbf{Fact 1:} the value of the objective function of (\ref{eq:bandwidth_beamforming_problem}) is mainly determined by that of ${\tilde P_{m}^{(k)}}$ (or $U_m^{I(k)}$); \textbf{Fact 2:} the solution $\omega_{sm}$ maximizing ${\tilde P_{m}^{(k)}}$ must locate in the range of $[\hat \omega_{sm}^{lb}, S_{sm}^{\star}]$ $\forall s,m$, as shown in Fig. \ref{fig:fig_quasi_convex_structure}, where $\hat \omega_{sm}^{lb} = \max \{\omega_{sm}^{lb}, a\}$ with $\omega_{sm}^{lb}$ denoting the lower bound of $\omega_{sm}$ satisfying the constraint (\ref{eq:SAA_admm_problem}b), $S_{sm}^{\star}$ is the $\omega_{sm}$ maximizing $P_{sm}$, and the notation $P_{sm}|_{\omega_{sm}}$ is utilized to explicitly indicate that $P_{sm}$ is a function of $\omega_{sm}$. \begin{figure}[!t] \centering \subfigure[Curve of $P_{sm}$.]{\includegraphics[width=2.4 in]{curve_structure.eps}% \label{fig:fig_curve_structure}} \hspace{0.05\linewidth} \subfigure[$2^{\rm nd}$ Taylor expansion.]{\includegraphics[width=2.4 in]{Taylor_expansion.eps}% \label{fig_Taylor_expansion}} \caption{Curve of $P_{sm}$ and its $2^{\rm nd}$ Taylor expansion.} \label{fig:fig_quasi_convex_structure} \end{figure} Fact 1 holds because the linear terms w.r.t. $\omega_{sm}$ will donate little to the objective function as the consensus constraint is active. Besides, the quadratic terms pull local values towards the consensus; thus, they will also donate little to the objective function. Fact 2 holds because the total bandwidth is limited and shared. For example, given a value $\omega_{sm, 2} \in [S_{sm}^{\star}+\delta_{\omega}, W]$ with $\delta_{\omega}$ being a small positive constant, there must exist a value $\omega_{sm,1} \in [\hat \omega_{sm}^{lb}, S_{sm}^{\star}]$ such that $P_{sm}|_{\omega_{sm,1}} = P_{sm}|_{\omega_{sm,2}}$. Thus, a small $\omega_{sm}$ will be preferred as it indicates that more bandwidth can be allocated to URLLC slices to further improve the objective function. For all $s \in \mathcal{S}^I$, it can be proved that $P_{sm}$ is concave in the interval $(a_1, a_2]$ by evaluating the second-order derivative of $P_{sm}$. Thus, we can use the $2^{\rm nd}$ Taylor expansion to approximate $P_{sm}$ in this interval. Considering that $P_{sm}$ is convex in the interval $[\hat \omega_{sm}^{lb}, a_1]$, the $1^{\rm st}$ Taylor expansion is always used to obtain the lower bound of $P_{sm}$. However, this interval is usually rather narrow, and the value of $P_{sm}$ in this interval is much lower than that in the interval $(a_1, a_2]$. What is more, the error bound of the $1^{\rm st}$ Taylor expansion is greater than that of the $2^{\rm nd}$ expansion. Therefore, we explore the $2^{\rm nd}$ Taylor expansion to approximate $P_{sm}$ in the interval $[\hat \omega_{sm}^{lb}, a_2]$. Fig. \ref{fig_Taylor_expansion} shows an example of the $2^{\rm nd}$ Taylor expansion of $P_{sm}$. Given a local point $\bm \omega_{m}^{(k,q)}$ at the $q$-th iteration, the Taylor expansion of $-\tilde P_{m}^{(k)}$ at the local point can be given by \begin{equation}\label{eq:P_sm_Taylor_expansion} \begin{array}{*{20}{l}} { - {{\tilde P}_{m}^{(k)}} \approx - \tilde P_{m}^{(k,q)} - \nabla \tilde P_m^{(k,q)}{{({{\bm \omega} _m} - {\bm \omega} _m^{(k,q)})}^{\rm T}} - } \\ {\frac{1}{2}({{\bm \omega} _m} - {\bm \omega} _m^{(k,q)})H({\bm \omega} _{m}^{(k,q)}){{({\bm \omega _m} - {\bm \omega} _m^{(k,q)})}^{\rm T}} - R_2(\bm \omega_{m})}, \end{array} \end{equation} where ${\bm \omega}_m = [\omega_{1m}, \ldots, \omega_{|{\mathcal S}^I|m}]$, $\nabla \tilde P_m^{(k,q)}$ is the gradient of $\tilde P_m^{(k)}$ over ${\bm \omega_m}$ at the local point ${\bm \omega_m^{(k,q)}}$ with \begin{equation}\label{eq:first_order_Taylor_expansion} \begin{array}{l} \frac{{\partial P_{sm}^{(k)}}}{{\partial \omega _{sm}^{(k,q)}}} = \frac{{{\lambda _s^I}(1 + {\varpi _s}{\rho _o}){e^{ - {\varpi _s}{\sigma ^2}}}}}{{\sum\nolimits_{s \in {{\mathcal S}^I}} {{\lambda _s^I}} }} \\ \qquad \left[ {\frac{{3.5{y_{sm}}{z_s}\omega _{sm}^{2.5(k,q)}}}{{{{({y_{sm}}{z_s} + \omega _{sm}^{(k,q)})}^{4.5}}}} - \frac{{3.5{y_{sm}}\omega _{sm}^{2.5(k,q)}}}{{{{({y_{sm}} + \omega _{sm}^{(k,q)})}^{4.5}}}}} \right], \end{array} \end{equation} and $H({\bm \omega}_m^{(k,q)})$ is a Hessian matrix with \begin{equation}\label{eq:second_order_Taylor_expansion} \begin{array}{*{20}{l}} \frac{{{\partial ^2}P_{sm}^{(k)}}}{{\partial \omega _{sm}^{2(k,q)}}} = \frac{{{\lambda _s^I}(1 + {\varpi _s}{\rho _o}){e^{ - {\varpi _s}{\sigma ^2}}}}}{{\sum\nolimits_{s \in {{\mathcal S}^I}} {{\lambda _s^I}} }} \times \\ \quad \left[ {\frac{{15.75y_{sm}^2z_s^2\omega _{sm}^{1.5(k,q)}}}{{{{({y_{sm}}{z_s} + \omega _{sm}^{(k,q)})}^{5.5}}}} - \frac{{7{y_{sm}}{z_s}\omega _{sm}^{1.5(k,q)}}}{{{{({y_{sm}}{z_s} + \omega _{sm}^{(k,q)})}^{4.5}}}}} \right] + \\ \quad {\frac{{{\lambda _s^I}(1 + {\varpi _s}{\rho _o}){e^{ - {\varpi _s}{\sigma ^2}}}}}{{\sum\nolimits_{s \in {{\mathcal S}^I}} {{\lambda _s^I}} }}\left[ {\frac{{7{y_{sm}}\omega _{sm}^{1.5(k,q)}}}{{{{({y_{sm}} + \omega _{sm}^{(k,q)})}^{4.5}}}} - \frac{{15.75y_{sm}^2\omega _{sm}^{1.5(k,q)}}}{{{{({y_{sm}} + \omega _{sm}^{(k,q)})}^{5.5}}}}} \right]}, \end{array} \end{equation} \begin{equation}\label{eq:second_order_intersection_term} \frac{{{\partial ^2}P_{sm}^{(k)}}}{{\partial \omega _{sm}^{(k,q)}\partial \omega _{s'm}^{(k,q)}}} = 0, \forall s \ne s', \end{equation} $y_{sm} = {{a{P_{nr,sm}}{P_{ne,sm}}{\lambda_s^I}}}/({{3.5{\lambda _R}}})$, ${z_s} = {{\theta_s^{th}}}/({{ 1 + \theta_s^{th} }})$. Besides, we write $\omega_{sm}^{2.5(k,q)}$ rather than ${( {\omega _{sm}^{(k,q)}} )^{2.5}}$ for lightening the notation. \begin{lemma}\label{lemma:error_bound} Let the function $\tilde P_{m}^{(k)}: \mathbb{R}^{|{\mathcal S}^I|} \to \mathbb{R}$ be three times differentiable in a given interval $[\hat \omega_{sm}^{lb}, S_{sm}^{\star}]$ for all $s \in {\mathcal{S}^I}$, then the error bound of $2^{\rm nd}$ degree Taylor expansion of $\tilde P_{m}^{(k)}$ at the local point $\bm \omega_{m}^{(k,q)}$ with $\omega_{sm}^{(k,q)} \in [\hat \omega_{sm}^{lb}, S_{sm}^{\star}]$ is given by \begin{equation}\label{eq:error_bound_lemma} \begin{array}{l} {R_2}({\bm \omega _m}) = \frac{1}{{3!}}{\left[ {\sum\nolimits_{s \in {{\mathcal S}^I}} {\left( {{\omega _{sm}} - \omega _{sm}^{(k,q)}} \right)\frac{\partial }{{\partial \omega _{sm}^{(k,q)}}}} } \right]^3} \\ \qquad \max \left\{ {\tilde P_m^{(k)}{|_{\hat {\bm \omega} _m^{lb}}},\tilde P_m^{(k)}{|_{\bm S_m^ \star }}} \right\}, \end{array} \end{equation} where $\hat {\bm \omega}_{m}^{lb} = [\hat {\omega}_{1m}^{lb}, \ldots, \hat \omega_{|\mathcal{S}^I|m}^{lb}]$ and $\bm S_{m}^{\star} = [S_{1m}^{\star}, \ldots, S_{|\mathcal{S}^I|m}^{\star}]$. \end{lemma} \begin{proof} Please refer to Appendix C. \end{proof} After conducting the $2^{\rm nd}$ Taylor approximation, the objective function becomes a convex function. Although the constraint (\ref{eq:SAA_admm_problem}b) is $P_{sm}$ $\forall s,m$ related, we need not to conduct the Taylor approximation on (\ref{eq:SAA_admm_problem}b) as $P_{sm}$ is quasi-concave and unimodal. In fact, the probability constraint (\ref{eq:SAA_admm_problem}b) and (\ref{eq:arg_lagarangian}c) are equivalent to the following inequality \begin{equation}\label{eq:variable_range} \hat \omega_{sm}^{lb} \le \omega_{sm} \le \omega_{sm}^{ub}, \end{equation} where $\omega_{sm}^{ub} \le W$ represents the upper bound of $\omega_{sm}$ satisfying (\ref{eq:SAA_admm_problem}b). Next, a low-complexity bisection-search-based scheme, the main procedures of which are described below, is developed to obtain $\omega_{sm}^{lb}$, $S_{sm}^{\star}$, and $\omega_{sm}^{ub}$: a) let the function $Q_{sm} = P_{sm} - \pi_s$. Perform the bisection search method \cite{yang2018three} on $Q_{sm} = 0$ to obtain $\omega_{sm}^{lb}$ and $\omega_{sm}^{ub}$ that are the two zero points of $Q_{sm}$; b) with the obtained $\omega_{sm}^{lb}$ and $\omega_{sm}^{ub}$, find the maximum value $S_{sm}^{\star}$ of $P_{sm}$ using the bisection search method again. According to the above analysis, at the $q$-th iteration, we can rewrite (\ref{eq:bandwidth_beamforming_problem}) as \begin{subequations}\label{eq:SCA_bandwidth_beamforming_problem} \begin{alignat}{2} & \left\{ {\omega _{sm}^{(k + 1,q+1)}},{\bm G_{i,sm}^{(k + 1,q+1)}} \right\} = \nonumber \\ & \qquad \mathop {{\rm{argmin}}}\nolimits_{\{\omega _{sm},{\bm G_{i,sm}}\}} \bar {\mathcal L}^{(q)} (\omega _{sm},{\bm G_{i,sm}}) \\ & {\rm s.t. \text{ }} {\rm for} \text{ } m, (\ref{eq:SAA_admm_problem}c)-(\ref{eq:SAA_admm_problem}e),(\ref{eq:variable_range}) \text{ } \rm{are} \text{ } satisfied, \end{alignat} \end{subequations} where $\bar {\mathcal{L}}^{(q)}(\omega _{sm},\bm G_{i,sm}) = -{ \frac{1}{M}{\tilde P_{m}^{(k)}} - \frac{{\tilde \rho U_m^{u(k)}}}{M} +}$ ${ \sum\limits_{s \in {{\mathcal S}^I}} {\left[ {\psi _{sm}^{(k,q)}( {\omega _{sm} - \omega _s^{(k,q)}(\bar t)} ) + \frac{\mu }{2}{{\| {\omega _{sm} - \omega _s^{(k,q)}(\bar t)} \|}_2^2}} \right]} }$. In (\ref{eq:SCA_bandwidth_beamforming_problem}), the objective function is convex, (\ref{eq:SAA_admm_problem}c) is affine, and the constraint (\ref{eq:SAA_admm_problem}d) can be proved to be convex w.r.t. both $\omega_{sm}$ and $\bm G_{i,sm}$ \cite{How2019yang}. Therefore, (\ref{eq:SCA_bandwidth_beamforming_problem}) is a convex problem that can be effectively mitigated by some standard convex optimization tools such as CVX and MOSEK. Then, we can summarize the main steps of mitigating the problem (\ref{eq:SAA_admm_problem}) in Algorithm \ref{alg1}. \begin{algorithm} \caption{ADMM-based bandwidth allocation algorithm} \label{alg1} \begin{algorithmic}[1] \STATE \textbf{Initialization:} Randomly initialize $\bm G_{i,s}^{(0,0)}$, $\{\omega_{s}^{(0,0)}\}$, let $k_{\rm max}=250$, $q_{\rm max}=250$, $q = 0$, $k = 0$, and generate channel samples \{$\bm H_{i,sm}$\}. \REPEAT \REPEAT \STATE Given $\bm G_{i,sm}^{(k,q)}$, $\omega_{sm}^{(k,q)}$, call the greedy scheme to obtain $b_{i,sm}^{u(k,q+1)}$. \STATE Optimize (\ref{eq:SCA_bandwidth_beamforming_problem}) with obtained $b_{i,sm}^{u(k,q+1)}$ to achieve $\bm G_{i,sm}^{(k,q+1)}$ and $\omega_{sm}^{(k,q+1)}$. Update $q = q + 1$. \UNTIL{Convergence or reach at the maximum iteration times $q_{{\rm max}}$.} \STATE Let $\omega_{sm}^{(k+1,q+1)} = \omega_{sm}^{(k,q+1)}$, update $\psi _{sm}^{(k + 1)}$, $\omega_{s}^{(k+1)}(\bar t)$ using (\ref{eq:psi_update}), (\ref{eq:omega_update}), and update $k = k + 1$. \UNTIL {Convergence or reach at the maximum iteration times $k_{\max}$.} \end{algorithmic} \end{algorithm} \begin{lemma}\label{lemma_5} For all $i\in\mathcal{I}_s^u$, $s \in {\mathcal{S}^u}$, and $m \in {\mathcal{M}}$, the obtained power matrix $\bm G_{i,sm}^{(k,q)}$ by Algorithm 1 at the $(k,q)$-th iteration satisfies the low-rank constraint, i.e., the SDR for the power matrix utilized in Algorithm 1 is tight. \end{lemma} \begin{proof} Please refer to Appendix D. \end{proof} { Besides, the computational complexity of Algorithm \ref{alg1} consists of the complexities of calling a greedy scheme, solving an optimization problem with semidefinite matrices and the aggregation of local variables. The complexity of the greedy scheme is $O(N^u)$. There are $N^u$ matrices of size $JK \times JK$ and $|{\mathcal S}^I|$ one-dimensional variables in the optimization problem. An interior-point method is then exploited to solve the optimization problem with the complexity of $O(N^uJ^2K^2 +|{\mathcal S}^I|)^{3.5}$ at the worst-case \cite{ye1997interior}. The complexity of aggregating local variables is $O(M)$. Therefore, the total computational complexity of Algorithm \ref{alg1} is $O(k_{\rm max}(q_{\rm max}(N^u+(N^uJ^2K^2 +|{\mathcal S}^I|)^{3.5})+M))$ at the worst case. Yet, the actual complexity will be much smaller than the worst case.} \section{Optimization of beamforming and URLLC device association with system sensed channels} In section V, we obtain a family of global consensus variables $\{\omega_{s}(\bar t)\}$ with the system generated channel samples. The time-varying actual channels may require the re-optimization of beamformers and {URLLC} device associations at each minislot. According to system sensed channels at each minislot, we next discuss how to calculate beamformers and {URLLC} device associations. At each minislot $t$, given the global consensus variables $\{\omega_s(\bar t)\}$, the original problem (\ref{eq:original_problem}) will be reduced to the following problem \begin{subequations}\label{eq:mini_time_scale_transformed_problem} \begin{alignat}{2} & \mathop {{\rm{maximize}}}\limits_{\{b_{i,s}^u(t), {\bm G}_{i,s}(t)\}} \text{ } {\tilde \rho} {{U}^u(t)} \\ & {\rm s.t. \text{ }} \rm {constraints \text{ } (\ref{eq:RRH_energy}), (\ref{eq:total_bandwidth}),(\ref{eq:original_problem}b) \text{ } are \text{ } satisfied.} \end{alignat} \end{subequations} In (\ref{eq:mini_time_scale_transformed_problem}), the channels are system sensed ones at $t$. According to the convexity analysis in section V, (\ref{eq:mini_time_scale_transformed_problem}) is a mixed-integer non-convex programming problem with positive semidefinite matrices, which is hard to be mitigated. Therefore, the alternative optimization scheme presented in subsection V-B can be leveraged to achieve the solutions $b_{i,s}^u(t)$ and $\bm G_{i,s}(t)$ of (\ref{eq:mini_time_scale_transformed_problem}). Lemma \ref{lemma_5} indicates that the achieved ${\rm rank}(\bm G_{i,s}(t)) \le 1$. Thus, we can obtain the beamformers $\bm g_{i,s}(t)$ by performing the eigendecomposition on $\bm G_{i,s}(t)$. {Summarily,} over a time slot $\bar t$, the slice resource optimization algorithm designed for the RAN slicing system is presented in Algorithm \ref{alg_algo_bandwidth_beamforming}. \begin{algorithm} \caption{slice resource optimization algorithm, SRO} \label{alg_algo_bandwidth_beamforming} \begin{algorithmic}[1] \STATE \textbf{Initialization:} $\{{\bm H}_{i,s}(t)\}$, $\forall i \in {{\mathcal I}^u}$, $s \in {{\mathcal S}^u}$, and let $P_{s}^{1} \in [0,1]$, $\vartheta_{a,s}^{1}=0$, $\forall s \in {{\mathcal S}^I}$. \STATE Call Algorithm \ref{alg1} to obtain $\{\omega_s(\bar t)\}$ for all $s\in {\mathcal S}^I$. \FOR{$t = 1 : T$} \STATE Given $\{\omega_s(\bar t)\}$, mitigate (\ref{eq:mini_time_scale_transformed_problem}) by exploiting the alternative optimization scheme to obtain beamformers $\{{\bm g}_{i,s}(t)\}$ and URLLC device associations $b_{i,s}^u(t)$ for all $i \in {\mathcal I}_s^u$, $s \in {\mathcal S}^u$. \ENDFOR \end{algorithmic} \end{algorithm} \begin{figure}[!t] \flushleft \includegraphics[width=3.4in]{Algorithm_flow.eps} \caption{{The algorithm logical flow.}} \label{fig:fig_algorithm_flow} \end{figure} {Furthermore, we can depict the logical flow of mitigating (\ref{eq:original_problem}) in Fig. \ref{fig:fig_algorithm_flow}. At the beginning of each time slot $\bar t$, with the system generated channels the RAN-C will follow the flow \textcircled{1} $ \to$ \textcircled{2} $ \to $ \textcircled{3} $\to $ \textcircled{4} $\to$ \textcircled{5} to achieve $\{\omega_s(\bar t)\}$. The RAN slicing system will allocate $\{\omega_s(\bar t)\}$ bandwidth to mIoT slices, and the remaining system bandwidth is allocated to bursty URLLC slices. With the achieved $\{\omega_s(\bar t)\}$, the RAN-C acquires sensed channels with which the following flow \textcircled{2} $\to $ \textcircled{3} $\to $ \textcircled{4} will be executed to generate beamformers $\{\bm g_{i,s}(t)\}$ and URLLC device associations $\{b_{i,s}^u (t)\}$. Next, the RAN slicing system will configure RRHs' transmit beamformers based on $\{\bm g_{i,s}(t)\}$ and establish connections with URLLC devices based on $\{b_{i,s}^u (t)\}$. } \section{Simulation results} \subsection{Comparison algorithms and parameter setting} {As no existing algorithms can be considered as benchmark algorithms, we design three benchmark algorithms. The effectiveness of the proposed algorithm is verified via comparing it with the benchmark algorithms.} The simulation is also performed to explain the impact of access control schemes on the RAN system performance intuitively. The comparison algorithms are i) {SRO algorithm} that adopts the unrestricted access control scheme; ii) {{SRO-ACB$_{\rm I}$ algorithm}} that utilizes the ACB access control scheme with $P_{ACB} = 0.9$; iii) {SRO-ACB$_{\rm II}$ algorithm} that adopts the ACB access control scheme with $P_{ACB} = 0.5$; {iv) {Single-sample-based SRO (S$^3$RO) algorithm} that determines the global consensus variable based on a single channel sample instead of the ADMM method.} The parameter setting is as follows: RRHs and IoT devices are deployed following independent PPPs in a one km$^2$ area. URLLC devices are randomly and uniformly distributed in this area. There are three mIoT slices and two URLLC slices in the RAN slicing system. For the mIoT slices, set $\vartheta_{w,s}(t) = [1.5, 1.0, 0.5]$, $\pi_s = 0.5$, $\forall s,t$, $\varphi = 4$, $L = 2000$ bits, $\sigma^2 = -90$ dBm, $\rho_o = -90$ dBm, ${\hat E}_{j}^I = 0.03$ mW, $\lambda_R = 3$ RRHs/km$^2$, $\lambda_{s}^I = 18000$ IoT devices/km$^2$, $\forall s$, $a =0.18$ MHz, the queue serving rate $\gamma_s^{th} = a\log_2(1+{\theta_s^{th}})$, $\{\gamma_s^{th}\} = \{5.8, 4.35, 2.9\}$ Kbits/minislot. For the URLLC slices, the transmit antenna gain at each RRH is set to be $5$ dB, and a log-normal shadowing path-loss model is used to simulate the path-loss between an RRH and a URLLC device with the log-normal shadowing parameter being $10$ dB. A path-loss is computed by $h({\rm dB}) = 128.1 + 37.6\log_{10}d$, where $d$ (in km) is the distance between a device and an RRH. Let $L_{i,s}^u = 160$ bits, $\sigma_{i,s}^2 = -100$ dBm, $\lambda_{s} = \lambda = 0.1$ packets/minislot, $\forall i,s$, $\{I_s^u\} = \{3, 5\}$ devices, and $\{D_s\} = \{1, 2\}$ milliseconds, $E_j = 3$ W, $\forall j$ \cite{tang2019service}. Other system parameters are shown as follows: $J = 3$, $K = 2$, $\tilde \rho=1$, $\eta =100$, $T = 60$, $W =60$ MHz, $M = 100$, $\mu = 2.9\times10^{-3}$, $\phi =1.5$, $\xi =54$, $\alpha_g=0.05$, $\kappa=5.12 \times 10^{-4}$, $\alpha=10^{-5}$, $\beta=2 \times 10^{-8}$, and $\varsigma =2 \times 10^{-5}$ \cite{How2019yang}. \subsection{Performance evaluation} To evaluate the comparison algorithms, the following performance indicators are utilized i) RA success probability $P_s(t)$; ii) expected queue length per IoT device at minislot $t$, $E[Q_s(t)] = \vartheta_{a,s}(t)$; iii) total slice utility $\bar U$ that is the objective function of (\ref{eq:original_problem}). We first evaluate the convergence mainly determined by that of the ADMM-based framework of the proposed SRO algorithm. We then leverage $\Delta_{\omega} = {\rm{ }}\sum\nolimits_{s \in {{\mathcal S}^I}} {| {\omega _s^{(k + 1)}(\bar t) - \omega _s^{(k)}(\bar t)} |} $ to evaluate the convergence of the SRO algorithm. Fig. \ref{fig:fig_convergence} illustrates the algorithm's convergence. It shows that SRO can converge after several iterations. \begin{figure}[!t] \centering \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.4in,height=1.2in]{Convergence_curve.eps} \caption{The convergence curve of the SRO algorithm.} \label{fig:fig_convergence} \end{minipage} \hspace{0.05\linewidth} \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.8in,height=1.6in]{Ps_EQs_vs_t.eps} \caption{Trends of $P_s(t)$ and $E[Q_s(t)]$.} \label{fig:fig_queueLen_Pst} \end{minipage} \end{figure} We next plot the tendency of the RA success probability $P_s(t)$ and the corresponding expected queue length $E[Q_s(t)]$ during a time slot in Fig. \ref{fig:fig_queueLen_Pst}. Fig. \ref{fig:fig_queueLen_Pst}(a) and \ref{fig:fig_queueLen_Pst}(c) show the tendency of $P_s(t)$ and $E[Q_s(t)]$ in the case of $\{\gamma_s^{th}\} = \{1.8, 1.35, 0.9\}$ Kbits/minislot. Fig. \ref{fig:fig_queueLen_Pst}(b) and \ref{fig:fig_queueLen_Pst}(d) depict the tendency of $P_s(t)$ and $E[Q_s(t)]$ in the case $\{\gamma_s^{th}\} = \{5.8, 4.35, 2.9\}$ Kbits/minislot. From Fig. \ref{fig:fig_queueLen_Pst}, we obtain the following interesting conclusions: the queue of each IoT device is not stable when the queue serving rate $\gamma_s^{th}$ is small. In this case, the average queue length monotonously increases over $t$. On the contrary, the queue of each IoT device is periodically flushed when a great queue serving rate is configured. The result that the maintained queue by each IoT device can be emptied verifies the correctness of the analysis of the RA process. \begin{figure}[!t] \centering \includegraphics[width=2.7in,height=1.5in]{IoT_URLLC_utility_vs_Pacb.eps} \caption{{Trends of $\bar U^I$ and $\bar U^u$ vs. $P_{ACB}$.}} \label{fig:fig_IoT_URLLC_Pacb} \end{figure} {As access control schemes have a significant impact on the algorithm performance, we discuss how to select the value of $P_{ACB}$. Fig. \ref{fig:fig_IoT_URLLC_Pacb} depicts the trends of mIoT slice utility $\bar U^I$ and bursty URLLC slice utility $\bar U^u$ w.r.t. $P_{ACB}$ with $P_{ACB} = [0.001, 0.01, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9, 0.95, 1]$, $\lambda_s^I = 19800$ IoT devices/km$^2$, and $\lambda = 1$ packet/minislot. In this figure, we denote the bandwidth allocated to bursty URLLC slices during a time slot by $\omega^u$ (in MHz) and the sum of RRHs' transmit power for serving URLLC devices during a time slot by $E^u$ (in mW). } {From this figure, we can observe that: i) the obtained $\bar U^I$ of the proposed algorithm increases with $P_{ACB}$ when $0< P_{ACB} \le 0.1$. This is because more IoT devices have the opportunity to access their corresponding RRHs when the stringent access restriction status is slightly mitigated; ii) when $0.1 < P_{ACB} \le 1$, $\bar U^I$ decreases with $P_{ACB}$. This is because the intra-cell interference is getting worse and more and more IoT devices go into the outage when the access restriction status is further eased; iii) as the system will allocate less bandwidth to bursty URLLC slices and RRHs will consume more transmit power for serving URLLC devices, the obtained $\bar U^u$ is decreased when more IoT devices successfully access the network. However, $\bar U^u$ slightly changes when the value of $P_{ACB}$ becomes greater; iv) the above results indicate that the selection of the value of $P_{ACB}$ should consider the network status (e.g., the interference status).} Let the IoT device intensity $\bm \lambda^I = [900 n, 900 n, 900 n]$ with $n \in \{6, 8, \ldots, 26\}$. Under the existence of both mIoT and URLLC slices, we plot trends of the total slice utility $\bar U$ and bursty URLLC slice utility $\bar U^u$ w.r.t. $n$ in Fig. \ref{fig:fig_utility_vs_lamdba_IoT} to understand the impact of the mIoT slices on the performance of all comparison algorithms. In this figure, with a slight abuse of notation, $B = [b_{11}^u, \ldots, b_{31}^u, b_{12}^u, \ldots, b_{52}^u]$, $\omega^I=[\omega_{SRO}^I, \omega_{ACB_{\rm I}}^I, \omega_{ACB_{\rm II}}^I, \omega_{S^3RO}^I]$ MHz with $\omega_{SRO}^I$, $\omega_{ACB_{\rm I}}^I$, $\omega_{ACB_{\rm II}}^I$, and $\omega_{S^3RO}^I$ representing the bandwidth allocated to mIoT slices by executing SRO, SRO-ACB$_{\rm I}$, SRO-ACB$_{\rm II}$, and S$^3$RO algorithms, respectively. $\bar U^I = [\bar U_{SRO}^I, \bar U_{ACB_{\rm I}}^I, \bar U_{ACB_{\rm II}}^I, \bar U_{S^3RO}^I]$ with $\bar U_{SRO}^I$ denoting the achieved mIoT slice utility of SRO. \begin{figure}[!t] \centering \subfigure[total slice utility vs. $n$.]{\includegraphics[width=2.7in,height=1.5in]{total_slice_utility_vs_IoT_lambda.eps}% \label{fig:fig_total_utility_vs_lamdba_IoT}} \hspace{0.1\linewidth} \subfigure[bursty URLLC slice utility vs. $n$.]{\includegraphics[width=2.7in,height=1.5in]{URLLC_slice_utility_vs_IoT_lambda.eps}% \label{fig_vs_Ds}} \caption{Trends of the achieved total slice utilities and bursty URLLC slice utilities of all algorithms vs. $n$.} \label{fig:fig_utility_vs_lamdba_IoT} \end{figure} The following observations can be obtained from Fig. \ref{fig:fig_utility_vs_lamdba_IoT}: i) when $n < 16$, all algorithms except for S$^3$RO almost obtain the same $\bar U$, and the obtained utilities are robust to the average number of IoT devices; ii) when $16 \le n < 26$, the conclusion changes. For the SRO algorithm, its achieved $\bar U$ decreases with an increasing $n$ due to the increasing interference. A great $n$, however, does not cause a significant decrease on the obtained $\bar U$ by SRO-ACB$_{\rm I}$ and SRO-ACB$_{\rm II}$. Thanks to the exploration of an access control scheme, both SRO-ACB$_{\rm I}$ and SRO-ACB$_{\rm II}$ can achieve greater $\bar U$ than SRO. For example, compared with SRO, SRO-ACB$_{\rm II}$ improves $\bar U$ by $6.65\%$ when $n = 24$; iii) when $n = 26$, which means that the total average number of IoT devices reaches $70,200$ devices, the RAN slicing system fails to create and manage mIoT slices as the QoS requirements of mIoT slices serving such a massive average number of devices cannot be simultaneously satisfied. In this case, all system resources are allocated to URLLC slices, and the maximum bursty URLLC slice utility is obtained; iv) as mIoT slices and URLLC slices share the system resources, an increasing $n$ results in a decreasing $\bar U^u$; besides, it is interesting to find that the two access-control-based algorithms may not outperform SRO in terms of obtaining $\bar U^u$. It indicates that URLLC slices do not benefit from access control schemes of mIoT slices when changing $n$; v) {although the S$^3$RO algorithm can achieve the greatest URLLC slice utility, it obtains the smallest $\bar U$. It indicates that S$^3$RO cannot effectively orchestrate network resources for mIoT and URLLC slices;} vi) the RAN slicing system can always accommodate the QoS requirements of all URLLC devices. Next, to understand the impact of URLLC slices on the performance of all comparison algorithms, we plot the trends of $\bar U$ and the mIoT slice utilities obtained by all comparison algorithms w.r.t. URLLC packet arrival rate $\lambda$ with $\lambda = \{0.1,0.5,1.0,\ldots,4.5,5.0\}$ packets per unit time in Fig. \ref{fig:fig_utility_vs_lamdba_URLLC}. Similarly, the following notations are involved in Fig. \ref{fig:fig_utility_vs_lamdba_URLLC}: $\bar U^u = [\bar U_{SRO}^u, \bar U_{ACB_{\rm I}}^u, \bar U_{ACB_{\rm II}}^u, \bar U_{S^3RO}^u]$ with $\bar U_{SRO}^u$ denoting the URLLC slice utility obtained by running the SRO algorithm. \begin{figure}[!t] \centering \subfigure[total slice utility vs. $\lambda$.]{\includegraphics[width=2.7in,height=1.5in]{total_slice_utility_vs_URLLC_lambda.eps}% \label{fig:fig_total_utility_vs_lamdba_URLLC}} \hspace{0.1\linewidth} \subfigure[mIoT slice utility vs. $\lambda$.]{\includegraphics[width=2.7in,height=1.5in]{IoT_slice_utility_vs_URLLC_lambda.eps}% \label{fig_vs_Ds}} \caption{Trends of the achieved total slice utilities and IoT slice utilities of all algorithms vs. $\lambda$.} \label{fig:fig_utility_vs_lamdba_URLLC} \end{figure} From Fig. \ref{fig:fig_utility_vs_lamdba_URLLC}, we can observe that: i) the obtained utilities $\bar U$ of all algorithms decrease with $\lambda$ mainly due to the decrease of the bursty URLLC slice utility. Two algorithms adopting the access control scheme always achieve greater utilities $\bar U$ than SRO. For example, when $\lambda = 5$, compared with the SRO algorithm, the obtained $\bar U$ of SRO-ACB$_{\rm II}$ is increased by $29.41\%$; ii) SRO-ACB$_{\rm II}$ may achieve greater $\bar U$ than SRO-ACB$_{\rm I}$ as a greater $\bar U^I$ is obtained by reducing more interfering IoT devices; iii) the obtained mIoT slice utilities $\bar U^I$ of SRO-ACB$_{\rm I}$, SRO-ACB$_{\rm II}$, and S$^3$RO are robust to the URLLC packet arrival rate. The obtained $\bar U^I$ of SRO decreases with an increasing $\lambda$; iv) an important observation is that the $\bar U^I$ of the access-control-based SRO-ACB$_{\rm I}$ algorithm is $1.65$ times that of the SRO algorithm when $\lambda = 5$. It explicitly reflects that mIoT slices can still benefit from access control schemes even though $\lambda$ is changed. Figs. \ref{fig:fig_utility_vs_lamdba_IoT} and \ref{fig:fig_utility_vs_lamdba_URLLC} illustrate the situation of a given total system bandwidth. We next change the total bandwidth $W$ and plot its impact on the obtained $\bar U$ of all algorithms in Fig. \ref{fig:fig_total_utility_vs_bandwidth}. {The following notations are used in this figure: $\omega^u = [\omega_{SRO}^u, \omega_{ACB_{\rm I}}^u, \omega_{ACB_{\rm II}}^u, \omega_{S^3RO}^u]$ MHz with $\omega_{SRO}^u$ denoting the bandwidth allocated to URLLC slices by running the SRO algorithm.} \begin{figure}[!t] \centering \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.8in,height=1.6in]{total_slice_utility_vs_bandwidth.eps} \caption{Trend of achieved $\bar U$ vs. system bandwidth.} \label{fig:fig_total_utility_vs_bandwidth} \end{minipage} \hspace{0.05\linewidth} \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.8in,height=1.6in]{total_slice_utility_vs_Csth.eps} \caption{Trend of achieved total slice utility vs. $m$.} \label{fig:fig_total_utility_vs_gammath} \end{minipage} \end{figure} The following conclusions can be obtained from Fig. \ref{fig:fig_total_utility_vs_bandwidth}: i) when $W=45$ MHz, the QoS requirements of all IoT devices cannot be simultaneously satisfied. As a result, the total bandwidth is allocated to URLLC slices; ii) when $W$ locates in the range of $(45, 55]$ MHz, the achieved total slice utilities $\bar U$ of SRO and SRO-ACB$_{\rm I}$ increase with $W$. Owing to the utilization of the access control scheme, SRO-ACB$_{\rm I}$ and SRO-ACB$_{\rm II}$ obtain higher $\bar U$ than SRO. For example, compared with the SRO algorithm, the SRO-ACB$_{\rm II}$ algorithm improves the achieved $\bar U$ by $6.66\%$ when $W = 50$ MHz; iii) when $W > 55$ MHz, all algorithms cannot remarkably improve $\bar U$; {iv) S$^3$RO achieves the smallest $\bar U$ under different bandwidth values.} We also discuss other crucial parameters' impact on the performance of the comparison algorithms. We reconfigure $\{\gamma_s^{th}\}$ of mIoT slices as $\gamma_1^{th} = 3.6 m$, $\gamma_2^{th} = 2.7 m$ and $\gamma_3^{th} = 1.8 m$ Kbits/minislot with $m \in \{1.5, 1.6, \ldots, 2.1\}$ and $\{D_s\}$ of URLLC slices as $D_1 = 0.00025 d$ second and $D_2 = 0.0005 d$ second with $d \in \{2, 3, \ldots, 10\}$. The impact of QoS requirements of network slices on the total slice utility is plotted in Figs. \ref{fig:fig_total_utility_vs_gammath} and \ref{fig:fig_total_utility_vs_Ds}. The impact of energy efficiency coefficient $\eta$ is plotted in Fig. \ref{fig:fig_total_utility_vs_eta}. In these figures, we denote the power consumption of RRHs of all algorithms by $E^u = [E_{SRO}^u, E_{ACB_{\rm I}}^u, E_{ACB_{\rm II}}^u, E_{S^3RO}^u]$ mW with $E_{SRO}^u = \sum\limits_{t = 1}^T {\sum\limits_{s \in {{\mathcal S}^u}} {\sum\limits_{i \in {\mathcal I}_s^u} {b_{i,s}^u{\rm tr}({\bm G_{i,s}})} } } $. \begin{figure}[!t] \centering \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.8in,height=1.6in]{total_slice_utility_vs_Ds.eps} \caption{Trend of achieved total slice utility vs. $d$.} \label{fig:fig_total_utility_vs_Ds} \end{minipage} \hspace{0.05\linewidth} \begin{minipage}[t]{0.45\textwidth} \centering \includegraphics[width=2.8in,height=1.6in]{total_slice_utility_vs_eta.eps} \caption{Trend of achieved total slice utility vs. $\eta$.} \label{fig:fig_total_utility_vs_eta} \end{minipage} \end{figure} From these figures, the following observations can be achieved: i) the obtained utilities $\bar U$ of all algorithms apart from S$^3$RO decrease with an increasing $m$. This is because a great $m$ indicates that the accumulated IoT packets in the queue of each IoT device can be quickly emptied, and then a small $P_s(t)$ is obtained. {For S$^3$RO, it achieves a fluctuating $\bar U$ as only one channel sample is used to orchestrate slice resources;} ii) a great $D_s$ will reduce RRHs' power consumption. However, it also reduces the URLLC slice gain. Then, it may be hard to conclude the trend of $\bar U^u$ w.r.t. $D_s$ as the energy efficiency coefficient $\eta$ significantly affects the value of $\bar U^u$; iii) it is also uneasy to conclude the trend of $\bar U^u$ w.r.t. $\eta$. An increasing $\eta$ causes a decrease of RRHs' power consumption. Yet, the value of $\bar U^u$ is determined by the multiplier of $\eta$ and $E^u$; iv) the SRO-ACB$_{\rm II}$ algorithm may perform better than the SRO algorithm. However, the performance of the other access-control-based algorithm, SRO-ACB$_{\rm I}$, is slightly worse than SRO. Besides, it cannot ensure that the $\bar U^I$ obtained by the access-control-based algorithms are always higher than that of SRO. At sometimes, access control schemes may drag down the utility of the mIoT service; {v) S$^3$RO obtains the smallest $\bar U$, which further indicates that S$^3$RO cannot effectively address the two-timescale issue.} \section{Conclusion} In this paper, we extended the subframe structure of a RAN slicing system to admit more IoT devices and analyzed the RACH of a randomly chosen IoT device. Based on the analysis result, we derived closed-form expressions of RA success probabilities of devices with an unrestricted access control scheme and an ACB access control scheme. Next, we formulated the RAN slicing for mIoT and bursty URLLC service multiplexing as an optimization problem to optimally orchestrate RAN resources for mIoT slices and bursty URLLC slices. Efficient mechanisms such as SAA and ADMM were then exploited to mitigate the optimization problem. Simulation results showed that the proposed algorithm could support more IoT devices and could effectively implement the service multiplexing of mIoT and bursty URLLC traffic. This paper focused on the {orthogonal} RAN slicing system for mIoT and bursty URLLC service multiplexing provision. The {non-orthogonal} RAN slicing system is a topic worthy of research in the near future.
\section{Introduction} The generic term \textit{fusion} describes the combination of different fusion components that consist of available datasets. A more specific definition of fusion is only possible regarding the context and the purpose of the fusion, i.e., in particular the components to fuse. In general, the assumption behind the application of fusion is, that fusing datasets from different sources improves the performance of the subsequent data processing. Consider the task of tracking a pedestrian at a crossroad with the help of a set of cameras. The aim is to generate a position prediction of a pedestrian at the next timestep. For this purpose, predictions based on the images from different cameras can be combined to obtain a more robust prediction. The fusion on a previous stage of the data processing can improve the prediction accuracy. Fusing knowledge in form of models for predestrian behavior, fusing information about the location and velocity of the pedestrian or fusing images of the same pedestrian to obtain less noisy images can contribute to a more precise prediction. Unfortunately, inconsistent vocabulary often complicates the clear definition and description of fusion algorithms and, as a result, makes the categorization of the datasets and the selection of a corresponding fusion technique difficult. The aim of the paper at hand is to clearify the terms of possible fusion components, the terms used for the different process levels and the definition of the total process. Several deceptive definitions are discussed and afterwards, an ordered definition for the fusion terms is proposed that combines the common definitions of the fusion components and the fusion level. In the last section, a selected set of fusion techniques for the different fusion level are listed. \section{Subdivision of Fusion Techniques} To define a categorization of fusion techniques, it is necessary to first define the terms used for the fusion components. The definition of the fusion components corresponds to the level of abstraction that can be determined by means of the data-information-knowledge-wisdom (DIKW) hierarchy \cite{Ackoff1989}. Furthermore, the constitution of the fusion components per level restrains the possible fusion algorithms to a specific family of techniques. In the following, an extension of the DIKW hierarchy is illustrated and afterwards, the fusion levels are specified. \subsection{Fusion Components}\label{sectFusionComp} There have been wide studies about the categorization of data. In this section, two popular concepts are examined considering the application of the data as fusion components.\\ One common categorization has been published by Ackoff \cite{Ackoff1989} and divides data into five categories that can be transferred into each other: data, information, knowledge, understanding, and wisdom. Ackoff describes \textit{data} as representations of objects or events. Processing the data to improve the usability leads to \textit{information} that is used in descriptions and answers questions that begin with what, who, where, and how many. The application of data and information generates \textit{knowledge} that can transform information into instructions and answers questions that begin with how. If relations and patterns in the information are identified, the context has been captured and, as a result, \textit{understanding} has been reached. Understanding helps with questions that begin with why. At least, \textit{wisdom} includes the ability of judgement and the competence of dealing with the value of the data, information and knowledge. \begin{figure}[h!] \begin{center} \includegraphics*[scale = 0.5]{DIKW_.pdf \caption{The adjusted DIKW hierarchy.\label{DIKW}} \end{center} \end{figure} \vspace*{-0.5cm} According to the further elaboration of the definitions from Ackoff in \cite{bellinger2004data}, Bellinger et al. take the view that understanding is not a stage in the hierarchy but the condition for the transition from a lower to an upper level as schematized in Figure \ref{DIKW}. Thus understanding relations between data leads to information, understanding patterns in information generates knowledge, and understanding the underlying principles of knowledge results in wisdom.\\ With regard to the following fusion techniques that originate mostly from a machine learning context, the extended version of the DIKW-hierarchy provides a more applicable definition of the fusion components. In Section \ref{FusionTech}, the relation between the extended DIKW-hierarchy and the fusion levels will be clarified. But first, the fusion process and the levels of fusion are defined in the following. \subsection{Definition of Fusion and Fusionlevel} Especially in terms of fusion definitions, the literature varies. In general, there exist two kinds of perspectives: On the one hand, there are universal definitions of fusion in sense of a whole process. On the other hand, fusion is performed on components from different abstraction levels. But due to the inconsistent classification of fusion techniques, the comparison of literature is often difficult. In particular, the definition of data and information fusion differs. In the following sections, the terminology of different approaches is discussed and in the conclusion, an ontology of the terms for the fusion components and the fusion level is proposed in form of the fusion level rainbow as illustrated in Figure \ref{rainbow}. \subsubsection*{Fusion.} In \cite{Bostroem2007}, several differing previous definitions as well as a new definition of sensor, data and information fusion are listed. Staying with the attempt to categorize the general definitions, it is noticeable, that they focus on three different aspects in particular: Firstly, the \textit{fusion components} are a central aspect. In some literature, they are explicitly identified as observations or measurements respectively raw data \cite{Durrant-Whyte2012,McKendall1988,Waltz1990}. In most cases, they are referred to as data or information, or it is specified that they originate from multiple sources, but there is no detailed discussion about the representation of the data.\\ Secondly, some of the definitions also focus on the \textit{process} behind the fusion. A popular precedent for this is one of the first definitions of fusion published by the Joint Directors of Laboratories (JDL) in form of a data fusion lexicon \cite{white1986data}. The fusion process is described as the \glqq association, correlation, and combination of data and information from single and multiple sources\grqq \cite{white1986data}. It is additionally mentioned, that the fusion has several levels that are explained separately as listed in the next section. A different description of fusion in \cite{Koch2016} interprets the process as the application of prior knowledge to a concrete realization.\\ Thirdly, most authors focus on the \textit{purpose} of the fusion or consider the combination of the three aspects presented. The most common goal that is stated includes an improvement of the obtained information due to fusion. Further advantages are reflected in its applicability for many purposes: The resulting understanding of the observed situation \cite{Varshney1997}, smoothed data and reduction in uncertainty \cite{Challa2005}, an optimal estimate of a hidden state \cite{Gao2009}, an improved perfomance of inference \cite{Hall1997}, improvement in prediction \cite{Steinberg2008} or decision tasks \cite{Fisch2014} or in general richer and more useful information \cite{Wald1999},\cite{Waltz1990}. \subsubsection*{Fusionlevel.} Many definitions of the level of fusion refer to the published data fusion lexicon of the JDL \cite{white1986data}. Here, the level specification originally has been analysed from the point of view of a military application, but it can be extended to several fusion applications. It consists of three interrelated levels, but it is more common to use the extended JDL definition. The latter is illustrated in Figure \ref{JDL} and includes the three levels from the JDL model (levels 1 - 3), extended by three more levels as described in \cite{Hall2009}. The six levels are defined as follows: \\ \begin{itemize} \item[\textit{Level 0:}] Fusion of raw data in form of signal refinement to obtain preliminary information about the characteristics of the observed object or situation. \item[\textit{Level 1:}] Data is processed to specify the position or identity of an entity, or to classify characteristics of it. This is called the object refinement. \item[\textit{Level 2:}] Relationships between objects and events considering the environment leads to a situation refinement by, e.g., analyzing relation structures. \item[\textit{Level 3:}] Characterized as the threat refinement. In general, this can be interpreted as a risk estimation by drawing inferences or predictions for application-specific operations. \item[\textit{Level 4:}] The performance improvement of the entire fusion process by refining the elements of it during a suitable type of monitoring. \item[\textit{Level 5:}] A process of cognitive refinement via optimizing the interaction of the process with the user, that is dissociated from the previous levels. \end{itemize} \begin{figure} \begin{center} \includegraphics*[scale=0.5]{JDL_model_new.pdf} \caption[JDL model.]{The extended fusion level definition of the JDL includes six different levels that can be passed through during an entire fusion process (sketched here based on\cite{Hall2009}).\label{JDL}} \end{center} \end{figure} \vspace*{-0.8cm} For a more differentiated categorization of fusion processes, the goal of the paper at hand is to combine the characterization of the fusion components from Section \ref{sectFusionComp} and the fusion levels (and eventually the constitution of the fusion components). But, from this point of view, the level definitions from the JDL are too broad and the interest of the type of fusion components emerges only in the first four levels. \\ In contrast to the JDL model, the model proposed by Dasarathy \cite{Dasarathy1997}, where fusion processes are divided into five levels, is more associated to the DIKW-hierarchy from Section \ref{sectFusionComp}. The reason is, that the choice of devision is directly related to the fusion components and the fusion emissions. Interpreting the knowledge as a feature of the observed event and wisdom as decisions, that can exist, e.g., as classification decisions, evaluation of a regression model or a prediction, the following model is directly based on the DIKW-hierarchy. In addition, Varshney \cite{Varshney1997} added a sixth level, so that all possible ascending (relating to the components presented in \ref{sectFusionComp}) or equal pairs of inputs and outputs of a fusion are considered. The all-encompassing extension of Dasarathy's model is illustrated in \cite{Hall2009} and will be briefly listed in the following. For this representation, the shortcuts DAI (input: data), DAO (output: data), FEI (input: feature), FEO (output: feature), DEI (input: decision) and DEO (output: decision) are used. All pairs of inputs and outputs during a fusion process can be interpreted as follows: \begin{itemize} \item[1] DAI/DAO: signal detection (fusion of raw datasets generates data with less noise, a sharper signal can, e.g., be used to detect signal sections) \item[2] DAI/FEO: feature extraction (fusion of datasets generates data that can be used to extract relevant features) \item[3] DAI/DEO: Gestalt-based object characterization (fusion of raw datasets can lead to a better characterization of an object or a decision) \item[4] FEI/DAO: model-based detection and feature extraction (fusion of features leads to refined features from which data can be generated, e.g., the fusion of Gaussians and subsequent sampling) \item[5] FEI/FEO: feature refinement (fusion of different models that describe the same feature generates a more confident feature model) \item[6] FEI/DEO: feature-based object characterization (feature level fusion refines the description of an object or a decision) \item[7] DEI/DAO: model-based detection and estimation (decision fusion sharpens the decision model from which data can be generated e.g. mixture of generative experts and subsequent sampling with the Gibb's Sampler \cite{Bishop06}) \item[8] DEI/FEO: model-based feature extraction (decision fusion can lead to a decision from which a feature can be derived) \item[9] DEI/DEO: object/decision refinement (e.g. mixture of experts leads to a better decision) \end{itemize} But in fact, the combination of data as input and decision as output does not often occur in common tasks. Additionally, cases 4, 7 and 8 are feature respectively decion level fusions from which can be sampled or conclusions drawn afterwards. Depending on the form of the feature representation, samples can be generated by common sampling methods as described in \cite{Bishop06}. \newpage Furthermore, there is a set of models that apply an additional backward connection from the top level to the data acquisition process as in the OODA (Observe, Orient, Decide, Act) loop \cite{Bedworth2000}. As a result, the generation and collection process of input data can be adapted with regard to the conclusive decision evaluation. One last model has to be mentioned here that is also common, but especially used in image fusion applications and is similar to the described definitions before. Here the fusion is divided into the \textit{pixel, feature} and \textit{decision level} \cite{Chang2018}. Analogous to the data, feature and decision fusion, this model is applied to image processing, which is a subset of the sensor fusion. An illustration is given in Figure \ref{pixel}. \begin{figure}[h!] \begin{center} \includegraphics*[scale=0.5]{multisensor_data_fusion.png \caption{For image data, the data level fusion is known as pixel level fusion and used for image processing (figure inspired by the depiction from \cite{Chang2018}).}\label{pixel} \end{center} \end{figure} In order to combine the delineated fusion level terms, the following ordered ontology describes the relations between the terms:\\ \begin{itemize} \item[$\circ$] (Pixel, Sensor) Data Fusion \item[$\circ$] Information Fusion \item[$\circ$] Knowledge/Feature Fusion \item[$\circ$] Decision Fusion \end{itemize} and is illustrated in Figure \ref{rainbow}. \newpage At the bottom of the entire fusion process, raw data given by sensors or other sources are fused while understanding characteristics and relations of the input. The refined data with a low information loss compared to the original data provides an updated representation for further applications. The obtained information is a fundamental basis for the feature extraction in the next level that proposes an underlying model for the data. This can provide knowledge that can be used to understand patterns in the data and thus create awareness of underlying principles in the source data. On top of the fusion process, the aim is to gain wisdom in form of performance improvement in decision making and thus the choice of action. Depending on the impact of the action, the entire fusion process can be adapted at the different stages. \begin{figure}[h!] \begin{center} \includegraphics[width=4.5cm,height=10cm]{DIKW_Fusion_Rainbow3.pdf} \caption{The Fusion Level Rainbow. Based on the extended Dasarathy model, the fusion within a component leads to a refined element of the corresponding component or to a more abstract emission.\label{rainbow}} \end{center} \end{figure} \newpage \section{Fusion Techniques of the Particular Levels}\label{FusionTech} In this section, selected techniques from different fusion levels will be presented. At the beginning of \ref{SensorFusion}, a fine structure of sensor fusion techniques is outlined. Afterwards, statistical fusion methods are described in more detail. To get a short overview of algorithms used in data and information fusion, the focus in Section \ref{DataInfoFusion} is on the constitutions of data that require different fusion processes. At the end in Section \ref{KnowFusion} and \ref{DecFusion}, different forms of knowledge and decision fusion techniques are characterized. \subsection{Sensor Fusion}\label{SensorFusion} In the fusion level rainbow (Fig. \ref{rainbow}), the sensor fusion is a subset of the lowest level of fusion, the data fusion. Sensor data is a special case of data that can be represented as a data point in a high dimensional space and is produced by (multiple) sensors. Sensor fusion techniques once again can be categorized according to the information flow between the available sensor network and different sensor configurations.\\ Firstly, the fusion can be implemented \textit{centralized} or \textit{decentralized} \cite{Gustafsson2012}. In the centralized architecture, the measurements of all sensors are available during the fusion process, so a batch method is used. In contrast to this, in the decentralized fusion, the measurements of each sensor is fused within a seperate fusion model. Then during the global fusion process, only the model information of each sensor is available and processed sequential. The decentralized fusion is preferred since the fusion process is considered as being more robust and reliable \cite{Gao2009}. Secondly, sensor fusion can be furthermore divided into three cases depending on the sensor configuration as listed in \cite{Durrant-Whyte1988}: \subsubsection*{Competitive Sensor Fusion.} (homogeneous) Either data from sensors of the same modality are fused or the sensors can be transformed to the same baseline previously and are fused afterwards. Data fusion of competitive sensors can be used to reduce noise respectively uncertainty. In connection to the initial example, competitive sensors in form of cameras used for the pedestrian tracking produce images of the same person at the same time. Fusing the images that may contain a degree of uncertainty, the resulting images are less noisy and more applicable for the tracking task. \subsubsection*{Complementary Sensor Fusion.} (heterogeneous) Sensors observe the same event and fusion of them generates a complemented image of the observation. This means, the sensors can measure different and disjunct parts of the same event and the combination leads to a complete characterization of it. A complementary set of cameras, e.g., can provide an extended picture of a crossroad in contrast of the image of only one camera which simplifies the subsequent tracking of a pedestrian. \subsubsection*{Cooperative Sensor Fusion.} A sensor is configurated depending on the information from other sensors to generate more useful information. This form of sensor network configuration includes some sort of temporal delay and dependency on a decision of an expert. The tracking task can require the possibility to adapt the camera angles after observing a certain behaviour of the pedestrian.\\ Sensor fusion techniques also differ in the assumptions about the system under consideration. For processing sensor data with uncertainties, statistical sensor fusion techniques for static and dynamic systems are presented by Fredrik Gustafsson in \cite{Gustafsson2012}: \subsubsection*{Statistical Sensor Fusion} The main idea behind statistical models is, that the sensors are noisy and the \glqq true\grqq \ characterization of the event is given by a state vector $\bm{x}$. Furthermore, it is expected, that by fusing different sensors, the state vector gets more precise. The assumption here is that $N$ given observations $\bm{y}_n\in\mathbb{R}^{n_y},\ n\in [ N]$, stacked in $\bm{y}\in\mathbb{R}^{N\times n_y}$, can be described by a model \begin{align*} \bm{y} = \bm{h}(\bm{x}) + \bm{e}. \end{align*} Gustafsson discusses linear models $\bm{h}(\bm{x}) = \bm{Hx}$ with a stacked factormatrix $\bm{H}\in\mathbb{R}^{N\cdot n_y\times n_x}$, as well as nonlinear models, that relate the observations to the hidden state vector $\bm{x}\in\mathbb{R}^{n_x}$. Most of the time, the stacked error $\bm{e}\in\mathbb{R}^{N\cdot n_y}$ is assumed to be Gaussian, but the non-Gaussian case is mentioned too. In the \textit{static case}, the hidden state $\bm{x}\in\mathbb{R}^{n_x}$ is time-invariant, so that the model describes, e.g., the observation of the same event by means of several sensors or of the same sensor at different timestamps. In the \textit{dynamic case}, the state $\bm{x}_k\in\mathbb{R}^{n_x}$ is additionally varying with time according to a sequential update model \begin{align*} \bm{x}_{k+1} = \bm{f}(\bm{x}_k) + \bm{v}_k, \end{align*} with a linear or non-linear mapping $\bm{f}:\mathbb{R}^{n_x}\rightarrow\mathbb{R}^{n_x}$ and a Gaussian or non-Gaussian noise $\bm{v}_k\in\mathbb{R}^{n_x}$. For providing a new state estimation, Gustafsson gives an insight into a variety of least squares approaches that can be applied, while the measurements are independent. In case of correlated measurements in the static case, Gustafsson presents the \textit{safe fusion algorithm}, which will be discussed in \ref{corrData}. For dynamic systems, Gustafsson lists popular filtering algorithms, such as several variations of the Kalman Filter \cite{Kalman1960}, that make inference on the state from the observations using dynamic linear or nonlinear models. Numerical methods approximating the nonlinear filter models are also discussed. In the grid-based methods, e.g., parts of the calculation during the filtering process are approximated by discretising the state space \cite{Jazwinski2007} or replacing integrals by finite sums \cite{Kramer1988}. \subsection{Data and Information Fusion}\label{DataInfoFusion} In this section, the case of data respectively information fusion in the second lowest levels of the fusion level rainbow (Fig. \ref{rainbow}) in general are under consideration. When selecting a data fusion technique, the first aspect to focus on is the constitution of the data. In \cite{KHALEGHI201328}, a detailed overview of fusion techniques for the following types of data quality is given: \subsubsection*{Imperfect Data.} The case of imperfect data occurs in nearly all applications of data fusion. To deal with a certain degree of imperfect data, the following algorithms, that are described together with former extensions in \cite{KHALEGHI201328}, can be used: \begin{itemize} \item \underline{\textit{Probabilistic Fusion:}} The main idea is to represent the imperfection of data by means of uncertainty in form of probability distributions. Fusing them according to the Bayesian fusion formula from \cite{Bishop06}: \begin{align}\label{BayesFusion} p(\bm{X}|\bm{Z}) = \frac{p(\bm{Z}|\bm{X})\cdot p(\bm{X})}{p(\bm{Z})} \end{align} determines the posterior probability distribution of the (real, underlying) state $\bm{X}$ depending on the observations $\bm{Z}=\lbrace\bm{z}_1,\ldots,\bm{z}_t\rbrace$, the likelihood $p(\bm{Z}|\bm{X})$ and the (chosen) prior distribution $p(\bm{X})$. Analogously, the Bayesian fusion can be formulated for the dynamic case by using observations up to time $t$ \cite{Gustafsson2012}. Based on this Bayes theorem, several fusion techniques have been formulated, that are used in algorithms for numerous applications, such as the Kalman filter. For more information see \cite{KHALEGHI201328}. \item \underline{\textit{Evidential Belief Reasoning:}} In the Dempster-Shafer evidential theory (DSET), possible measurement hypotheses obtain correspoding beliefs and plausibilities. Usually, Dempster's rule of combination is used to fuse two belief masses of the same set by summing up the product of the belief masses of every pair of supersets regarding conflicting subsets. Consequential, the DSET provides a fusion technique that can be seen as a generalization of the Bayesian fusion where probability mass functions are used as belief functions \cite{Shafer1976}.\\ The DSET has been proposed to represent incomplete data, analogously to the probability theory by modeling the membership uncertainty of an element in a well-defined class. \item \underline{\textit{Fusion and Fuzzy Reasoning:}} In contrast, the fuzzy set theory is mainly designed to represent and to operate on vague data and to model the fuzzy membership of an element in an ill-defined class \cite{KHALEGHI201328}. For this purpose, a gradual membership function is introduced that defines a fuzzy set by assigning a membership degree between 0 and 1 to each element of the (discrete) universe. The higher the degree, the more the element belongs to the fuzzy set. \\ Fusing of membership degrees can be done in form of conjunctive and disjunctive fusion rules to obtain a fuzzy fusion output (i.e., the fusion function is bounded from above by the minimum in the former and from below by the maximum in the latter case), as further described in \cite{zadeh1965fuzzy}. \item \underline{\textit{Possibilistic Fusion:}} Based on the fuzzy set theory, possibility theory is conceived to again represent incomplete data by modeling an uncertain membership of the elements in the universe in well-defined classes with a possibility distribution \cite{KHALEGHI201328}. Another difference to fuzzy theory is to require normalized membership functions that can be used to define a possibility and a necessity degree. The former determines the plausibility and the latter the certainty of a subset of the universe. So the possibility theory differs from probability theory by the use of the two dual set-functions. The fusion rules are identical to the ones for the fuzzy fusion. \item \underline{\textit{Rough Set Based Fusion:}} The idea of the rough set theory is to approximate a data set by an upper and lower bound of sets to obtain a rough representation of the original set. The lower bound set includes subsets of the data that definitely belong to the original set. The difference of the upper and lower bound sets includes subsets that cannot be classified as belonging or not belonging to the original set. In the approximation, the granularity of the data can be considered by choosing an appropriate size of the united subsets. \\ Datasets can then be fused by combining the rough sets of their approximations with the aid of classical conjunctive or disjunctive fusion techniques of set theory such as the union or intersection of sets \cite{KHALEGHI201328}. \item \underline{\textit{Random Set Theory:}\label{randomSetTheory}} The theory of random sets uses a form of generalized random variables, the random sets, which take sets as random values. In \cite{Goodman2013}, random sets and their characteristics are described in detail. In addition, Goodman et al. discuss applications of random sets in single- and multi-target data fusion which can be used for the data association problem. \\ The handling with coarse data in general by using the random set theory is described in \cite{Nguyen2006} extensively. \end{itemize} \subsubsection*{Correlated Data.}\label{corrData} As mentioned in Section \ref{SensorFusion}, correlated data can be fused by the \textit{safe fusion algorithm} \cite{Gustafsson2012} or evolved algorithms as listed in \cite{KHALEGHI201328}. Here it is assumed, that the correlation is unknown and the data respectively information is represented as a point in a high dimensional space. \begin{figure}[h!] \begin{center} \includegraphics*[width=\linewidth]{CI.pdf} \end{center} \caption{Safe fusion algorithm visualized (similar as illustrated in \cite{Gustafsson2012}) in the fusion of two covariances. In the first step, both covariances are transformed corresponding to the SVD of one covariance (blue). The SVD of the obtained manipulated second covariance (green) yields in the second transformation of both covariances. The final intersection of the covariances is then covered by the target covariance (thick ellipse). \label{safeFusion}} \end{figure} The safe fusion algorithm presumes a decentralized network and is based on the covariance intersection (CI) algorithm proposed by Julier and Uhlman \cite{Julier1997}. This means in addition, it is assumed that the models of the depending measurements include Gaussian noise and thus possess individual means and covariances. The algorithm determines a covariance that defines the minimal ellipsoid that encloses the intersection of (sequentially entering) covariances by making use of a transformation defined by the sequentially emerging singular value decomposition (SVD, \cite{Golub1970}) as illustrated in Figure \ref{safeFusion}. In case of a known correlation, it can be eliminated before fusing the data \cite{KHALEGHI201328}, e.g., by the principal component analysis \cite{Bishop06}. \newpage \subsubsection*{Inconsistent Data.} There are several forms of inconsistencies, which must be dealt with in different ways. These are listed in the following: \begin{itemize} \item \underline{\textit{spurious data:}} Sensor data can be distorted by permanent failures or slowly evolving errors of a sensor. The most common ideas of dealing with spurious data is the identification or prediction of systematic errors. After that, suspicious data can be excluded from the fusion process. A statistical approach for detecting spurious data can be found in \cite{Kumar2007}. Kumar et al. formulated an extension of the basic Bayesian fusion formula \eqref{BayesFusion} by augmenting a random variable which describes whether the data is spurious or not depending on the data and the true state. \item \underline{\textit{out-of-sequence-measurements (OOSM):}} There are two different aspects that have to be considered in dynamic systems: the validity and the out-of-sequence arrival of data. When a history of measurements is necessary for the fusion process, the data should be updated at appropriate intervals to guarantee a valid fusion result. In addition, an implementation of an entire sensor network can entail delayed data deliveries for the fusion process. A possible approach for these problems has been proposed by Kaugerand et al. in \cite{kaugerand2018time}, that defines a fusion interval in which incoming data is permitted to be fused. Also in \cite{KHALEGHI201328}, some strategies for dealing with out-of-sequence data are presented. \item \underline{\textit{conflicting data:}} The problem of conflicting data results in misleading conclusions as discussed in \cite{Zadeh1984}. Extensions of the DSET have been developed to especially address the problem of inconsistent data and are mentioned in \cite{KHALEGHI201328}. \\ In a statistical environment, in complement to the CI algorithm, the covariance union (CU) algorithm can be applied to deviating measurements for a consistent fusion with the assumption of a Gaussian uncertainty \cite{Uhlmann2003}. The union process consists of the computation of a mean and a covariance, so that the previous covariances added to the deviation of the previous mean from the new mean constitute a lower limit of e.g. the determinant of the new covariance. \end{itemize} \subsubsection*{Disparate Data.} An aspect, that has not been considered yet is the fusion of data from sensors and sensor intelligence (hard information), data from human intelligence, open source intelligence and communications intelligence (soft information) \cite{Pravia2008}. Hard information can be represented in a mathematical framework and can therefore be used for the fusion techniques as presented above. \\ Whereas soft information is produced by human sources and is therefore available in \glqq context-dependent languages over bandwidth-limited channels\grqq \;\cite{Pravia2008}. The research on modeling uncertainty of such soft information is quite young, but there are some models for linguistic data described in \cite{Auger2008}. \\ \subsection{Knowledge Fusion}\label{KnowFusion} When the abstraction of the fusion components increases along the fusion level rainbow (Fig. \ref{rainbow}), the components can be available in form of models that include knowledge from the observed event. Knowledge fusion itself has two different levels: it can be performed at model or parameter level. \subsubsection*{Model Fusion.} Knowledge can be represented in form of different models. A simple example of such a model is a Gaussian distribution that includes information about the distribution of the data \cite{Bishop06}. In addition, artificial data can be generated with it. This kind of model is called a generative model. To fuse knowledge from several models in form of \textit{mixture models}, they have to be in the same modality \cite{Bishop06}, i.e., they consist of the same base model but are trained differently or model different aspects of the underlying data. A high diversity in knowledge is prefered for a fusion as discussed for the case of ensembles in \cite{Ren2016}. In case of fusing models, the training can differ in the training set or the prior parameter setting. The fused knowledge is then composed of a linear combination of the distinct models. The mixture of Gaussian distributions, e.g., results in a Gaussian mixture model (GMM). It descibes the distribution of a data set, that is assumed to be more complex than a unimodal Gaussian, by a convex combination of a selected number of Gaussians. The concluding mixture model contains more precise knowledge about the overall distribution and the mixture coefficients imply additive knowledge about the responsibility of a mixture component for generating a given data point. Further examples for model fusion techniques are Convolutional Neural Networks \cite{Bishop06} and Multiple Kernel Learning based Ensemble Methods \cite{Goenen2011}. The latter approach permits different kernels representing knowledge that are fused by a (non-) linear combination function. \subsubsection*{Parameter Fusion.} Moreover, knowledge given by classification models can be available as classification rules or decisions (as the outputs of the classifiers). The combination of classifiers at the component level is equivalent to the mixture models and the combination at the output level will be presented in the next section. The parameter fusion is a more complex fusion form and is applied on the parameter level of the classification models. In \cite{Fisch2014}, a knowledge fusion technique for generative classifiers based on mixture models (CMMs) is presented. For the fusion algorithm, two or more probabilistic generative classifier that describe the same process have to be given. Each one is divided by the number of classes into parts that are mixtures of probabilty densities conditioned by the class and the mixture component. Additionally, the densities have to be defined on the same input space, i.e., especially on the same number of continuous and categorical dimensions and are trained on different training sets. Before applying the algorithm, conjugate hyperdistributions for all hyperparameters per component are introduced and trained via the variational inference (VI) algorithm as described in \cite{Fisch2014}. Having defined the hyperdistributions, the first step of the algorithm determines similar hyperdistributions of each component via an appropriate similarity measure. Assuming that a posterior distribution for a class is calculated by the Bayesian formula \eqref{BayesFusion} and the classifiers use the same prior knowledge, the fusion rule of two similar hyperdistributions is determined by the multiplication of the two posteriors divided by the prior. The derivation of this rule can be found in \cite{Fisch2014}. Using conjugate priors, the fused posterior distribution has the same functional form as the given classifiers, so the estimation of the fused parameters are deducible from a sequence of mathematical transformations of the fusion rule. For setting the distributions in the continuous dimensions to multivariate Gaussians and the distributions of the categorical ones to multinomial distributions, the hyperdistributions are Dirichlet respectively normal-Wishart distributions. The fusion formulae for the corresponding parameters are listed in \cite{Fisch2014}. \newpage \subsection{Decision Fusion}\label{DecFusion} The decision fusion of multiple classifiers may consist of the direct combination of decisions or the selection of one suitable classifier for a specific input area. \begin{itemize} \item \underline{\textit{Committee/Ensemble}}: The decision is given as a combination of decisions from distinct models \cite{Bishop06}. Boosting is an ensemble technique that trains the models iteratively and a decision is calculated by, e.g., weighting the models depending on their performance as in the adaptive boosting (AdaBoost) algorithm \cite{Freund1997}. \item \underline{\textit{Decomposition-Based Ensemble Methods:}} In case of time series data, several ensemble methods based on the lossless decomposition of the input signal can be used for forecasting \cite{Ren2016}, which can be interpreted as decision making. After decomposing the time series into a set of signals that fully represent the original signal, the predictions from the components can be combined to one predition for the origin. \item \underline{\textit{Mixture of Experts:}} Depending on the input domain, a decision is made from one (hard or soft) selected model from the mixture of experts. The selection can be implemented in form of decision trees. Whereas in the Bayesian Model Averaging, one model is determined for the entire input space by introducing a prior probability for each model \cite{Bishop06}. \end{itemize} \section{Conclusion} The ideal definition should have no space for interpretation or double allocation of the terminology. The goal of this paper was to provide a clear definition for fusion and its components for the applicability in varous contexts. After having discussed several definitions, the fusion levels have been defined considering the previous specified fusion components. The resulting fusion level rainbow (Fig. \ref{rainbow}) includes the entire range of fusion components and levels and provides a clear definition of fusion for further applications. Finally, an overview of common fusion techniques was given for each of the previously defined levels. In the presented definitions, decisions are often associated with predictions or classifications. The definitions are analogously valid for regression problems. The concurrent fusion of components from different levels has not been considered in the paper at hand and is left for future work. In addition, the hybridization of the fusion techniques are in common use and have not been addressed here. \section*{\large Acknowledgment} This work results from the project DeCoInt$^2$, supported by the German Research Foundation (DFG) within the priority program SPP 1835: "Kooperativ interagierende Automobile", grant number SI 674/11-1. \newpage \bibliographystyle{abbrvdin}
\section{Introduction} Polar codes are a novel class of error-correcting codes, which achieve the symmetric capacity of a binary-input discrete memoryless channel $W$, have low complexity construction, encoding and decoding algorithms \cite{arikan2009channel}. However, the performance of polar codes of practical length is quite poor. The reasons for this are the presence of imperfectly polarized subchannels and the suboptimality of the successive cancellation (SC) decoding algorithm. To improve performance, successive cancellation list decoding (SCL) algorithm \cite{tal2015list}, as well as various code constructions were proposed \cite{trifonov2016polar,trifonov2017randomized,wang2016paritycheckconcatenated}. Polarization is a general phenomenon, and is not restricted to the case of Arikan matrix \cite{korada2010polar}. One can replace it by a larger matrix, called \textit{polarization kernel}, which can provide higher polarization rate. Polar codes with large kernels were shown to provide asymptotically optimal scaling exponent \cite{fazeli2018binary}. Many kernels with various properties were proposed \cite{korada2010polar,fazeli2014scaling,presman2015binary,buzaglo2017efficient}, but, to the best of our knowledge, no efficient decoding algorithms for kernels with polarization rate greater than $0.5$ were presented, except \cite{miloslavskaya2014sequentialBCH}, where an approximate algorithm was introduced. Therefore, polar codes with large kernels are believed to be impractical due to very high decoding complexity. In this paper we present reduced complexity decoding algorithms for $16\times 16$ polarization kernels with polarization rate $0.51828$ and scaling exponents $3.346$ and $3.45$. We show that with these kernels increasing list size in the SCL decoder provides much more significant performance gain compared to the case of Arikan kernel, and ultimately the proposed approach results in lower decoding complexity compared to the case of polar codes with Arikan kernel with the same performance. The proposed approach exploits the relationship between the considered kernels and the Arikan matrix. Essentially, the log-likelihood ratios (LLRs) for the input symbols of the considered kernels are obtained from the LLRs computed via the Arikan recursive expressions. \section{Background} \label{sBackground} \subsection{Channel polarization} Consider a binary input memoryless channel with transition probabilities $W\{y|c\}, c\in \F_2, y\in \mathcal Y$, where $ \mathcal Y$ is output alphabet. For a positive integer $n$, denote by $[n]$ the set of $n$ integers $\{0,1,\dots\,n-1\}$. A \textit{polarization kernel} $K$ is a binary invertible $l \times l$ matrix, which is not upper-triangular under any column permutation. The Arikan kernel is given by $F_2= \begin{pmatrix} 1&0\\ 1&1 \end{pmatrix}. $ An $(n = l^m, k)$ polar code is a linear block code generated by $k$ rows of matrix $G_m = M^{(m)}K^{\otimes m}$, where $M^{(m)}$ is a digit-reversal permutation matrix, corresponding to mapping $ \sum_{i = 0}^{m-1}t_il^i \rightarrow \sum_{i = 0}^{m-1}t_{m-1-i}l^i$,$t_i \in [l]$. The encoding scheme is given by $ c_0^{n-1}= u_0^{n-1}G_m$, where $u_i,i\in \mathcal F$ are set to some pre-defined values, e.g. zero (frozen symbols), $|\mF| = n - k$, and the remaining values $u_i$ are set to the payload data. It is possible to show that a binary input memoryless channel $W$ together with matrix $G_m$ gives rise to bit subchannels $W_{m,K}^{(i)}(y_0^{n-1},u_0^{i-1}|u_i)$ with capacities approaching $0$ or $1$, and fraction of noiseless subchannels approaching $I(W)$ \cite{korada2010polar}. Selecting $\mF$ as the set of indices of low-capacity subchannels enables almost error-free communication. It is convenient to define probabilities \begin{align} \label{mKernelStepW} W^{(i)}_{m,K}(u_0^{i}|y_0^{n-1})=&\frac{W_{m,K}^{(i)}(y_0^{n-1},u_0^{i-1}|u_i)}{2W(y_0^{n-1})}\nonumber\\ = &\sum_{u_{i+1}^{n-1}}\prod_{i = 0}^{n-1}W((u_0^{n-1}G_m)_i|y_i). \end{align} Let us further define $\W^{(j)}_{m}(u_0^{j}|y_0^{n-1}) = W^{(j)}_{m,K}(u_0^{j}|y_0^{n-1})$, where kernel $K$ will be clear from the context. We also need probabilities $W^{(j)}_{t}(u_0^{j}|y_0^{l-1}) = W^{(j)}_{1,F_2^{\otimes t}}(u_0^{j}|y_0^{l-1})$ for Arikan matrix $F_2^{\otimes t}$. Due to the recursive structure of $G_n$, one has \begin{align} \W^{(sl+t)}_{m}(u_0^{sl+t}|y_0^{n-1}) = \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \nonumber\\ \sum_{u_{sl+t+1}^{l(s+1)-1}} \prod_{j = 0}^{l-1} \W_{m-1}^{(s)} (\theta_K[u_0^{l(s+1)-1},j]|y_{j\frac{n}{l}}^{(j+1)\frac{n}{l}-1}) \end{align} where $\theta_K[u_0^{(s+1)l-1},j]_r = (u_{lr}^{l(r+1)-1}G_n)_j, r \in [s+1]$. A trellis-based algorithm for computing these values was presented in \cite{griesser2002aposteriori}. At the receiver side, one can successively estimate \begin{equation} \label{mSCProb} \widehat u_i=\begin{cases}\arg\max_{u_i\in \F_2} \W_m^{(i)}(\widehat u_0^{i-1}.u_i|y_0^{n-1}), &i\notin\mF,\\ \text{the frozen value of $u_i$}&i\in \mF. \end{cases} \end{equation} This is known as the successive cancellation (SC) decoding algorithm. \section{Computing kernel input symbols LLRs} \subsection{General case} Our goal is to compute efficiently probabilities $\W^{(i)}_{m}(u_0^{i}|y_0^{n-1})$ for a given polarization transform $K^{\otimes m}$. Let us assume for the sake of simplicity that $m=1$. The corresponding task will be referred to as {\em kernel processing}. We propose to introduce approximate probabilities \begin{align} \widetilde \W_1^{(j)}(u_0^j|y_0^{l-1}) &= \max_{u_{j+1}^{l-1}} \W^{(l-1)}_{1}(u_0^{l-1}|y_0^{l-1}) \quad \quad \quad \nonumber \\ &=\max_{u_{j+1}^{l-1}}\prod_{i = 0}^{l-1}W((u_0^{l-1}K)_i|y_{i}). \label{mKernelWApprox} \end{align} This is the probability of the most likely continuation of path $u_0^j$ in the code tree, without taking into account possible freezing constraints on symbols $u_i,i>j$. Note that the same probabilities were introduced in \cite{miloslavskaya2014sequentialBCH,miloslavskaya2014sequential}, and shown to provide substantial reduction of the complexity of sequential decoding of polar codes. Decoding can be implemented using the log-likelihood ratios $\bar \bS_{m,i}=\bar \bS_m^{(i)}(u_0^{i-1}|y_0^{n-1})= \ln\frac{\W_m^{(i)}(u_0^{i-1}.0|y_0^{n-1})}{\W_m^{(i)}(u_0^{i-1}.1|y_0^{n-1})}.$ Hence, kernel output LLRs $\bar \bS _{1,i}, i \in [l]$ can be approximated by \begin{align} \label{mKernelLog} \bar \bS_{1,i} \approx \bS_{1, i} = \ln \frac{\widetilde \W_1^{(i)}(u_0^{i-1}. 0|y_0^{l-1})}{\widetilde \W_1^{(i)}(u_0^{i-1}. 1|y_0^{l-1})} \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \nonumber\\ =\max_{u_{i+1}^{l-1}}\ln \W^{(l-1)}_{1}(u(0)^i|y_0^{l-1}) - \max_{u_{i+1}^{l-1}}\ln \W^{(l-1)}_{1}(u(1)^i|y_0^{l-1}), \end{align} where $b(a)^{i} = (b_0^{i-1}.a.b_{i+1}^{l-1})$. The above expression means that $\bS_{1, i} $ can be computed by performing ML decoding of the code, generated by last $l-i+1$ rows of the kernel $K$, assuming that all $u_j,i<j<l,$ are equiprobable. \subsection{Binary algorithm} \label{sLLRSimple} Straightforward evaluation of \eqref{mKernelLog} for arbitrary kernel has complexity $O(2^ll)$. However, we have a simple explicit recursive procedure for computing these values for the case of the Arikan matrix $F_2^{\otimes t}$. Let $l = 2^t$. Consider encoding scheme $c_0^{l-1} = v_0^{l-1}F_2^{\otimes t}$. Similarly to \eqref{mKernelWApprox}, define approximate probabilities $$\widetilde W_t^{(i)}(v_0^i|y_0^{l-1})= \max_{v_{i+1}^{l-1}} W_t^{(l-1)}(v_0^{l-1}|y_0^{l-1}) $$ and modified log-likelihood ratios $$S_\lambda^{(i)}(v_0^{i-1},y_0^{l-1})=\log\frac{\widetilde W_\lambda^{(i)}(v_0^{i-1}.0|y_0^{l-1})}{\widetilde W_\lambda^{(i)}(v_0^{i-1}.1|y_0^{l-1})}.$$ It can be seen that \begin{align} S_{\lambda}^{(2i)}(v_0^{2i-1},y_0^{N-1}) =&Q(a,b)\label{mMinSum1}\\ S_{\lambda}^{(2i+1)}(v_0^{2i},y_0^{N-1})=&P(a,b,v_{2i}) ,\label{mMinSum2} \end{align} where $N=2^{\lambda}$, $a=S_{\lambda-1}^{(i)}(v_{0,e}^{2i-1}\oplus v_{0,o}^{2i-1},y_{0,e}^{{N}-1})$, $b=S_{\lambda-1}^{(i)}(v_{0,o}^{2i-1},y_{0,o}^{N-1})$, $Q(a,b) =\sgn (a)\sgn (b)\min(|a|,|b|)$, $P(a,b,c) = (-1)^{c}a+b$. Then the log-likelihood of a path (path score) $v_{0}^i$ can be obtained as \cite{trifonov2018score} \begin{align} R(v_0^i|y_0^{l-1})=&\log\widetilde W_t^{(i)}(v_0^i|y_0^{l-1})\nonumber\\ =R&(v_0^{i-1}|y_0^{l-1})+\tau\left(S_t^{(i)}(v_0^{i-1},y_0^{l-1}),v_i\right),\label{mScoreMinSum} \end{align} where $R(\epsilon|y_0^{l-1})$ can be set to $0$, $\epsilon$ is an empty sequence, and $$\tau(S,v)=\begin{cases} 0,&\sgn(S)=(-1)^v\\ -|S|,&\text{otherwise}. \end{cases}$$ It can be verified that \begin{equation} \label{mEWIdentity} \sum_{\beta = 0}^{2^{j}-1} \tau(S_{0}^{(0)}(y_\beta),c_\beta) = \sum_{\beta = 0}^{2^{j}-1} \tau(S_j^{(\beta)}(v_0^{\beta-1},y_0^{2^j-1}), v_\beta), \end{equation} where $c=v_0^{2^j-1}F_2^{\otimes j}$. It was suggested in \cite{trifonov2014binary} to express values $\W^{(i)}_1(u_0^{i}|y_0^{l-1} )$ via $W^{(j)}_{t}(v_0^{j}|y_0^{l-1})$ for some $j$. One can represent the kernel $K$ as $K = TF_{2}^{\otimes t}$, where $T$ is an $l \times l$ matrix. Let $v_0^{l-1}=u_0^{l-1}T$. Then, $c_{0}^{l-1} = v_0^{l-1} F_{2}^{\otimes t} =u_{0}^{l-1}K$, so that $u_0^{l-1} = v_0^{l-1}T^{-1}.$ Observe, that it is possible to reconstruct $u_0^i$ from $v_0^{\tau_i}$, where $\tau_i$ is the position of the last non-zero symbol in the $i$-th row of $T^{-1}$. Recall that successive cancellation decoding of polar codes with arbitrary kernel requires one to compute values $\W^{(i)}_1(u_0^{i}|y_0^{l-1} ), u_i\in \F_2$. However, fixing the values $u_0^{i-1}$ may impose constraints on $v_j, j > \tau_i$, which must be taken into account while computing these probabilities. Indeed, vectors $u_0^{l-1}$ and $v_0^{l-1}$ satisfy the equation $$\Theta'(u_{l-1}\quad \dots \quad u_1\quad u_0\quad v_0\quad v_1 \quad \dots \quad v_{l-1})^{T}=0,$$ where $\Theta'=(\mathbb S\quad I)$, and $l\times l$ matrix $\mathbb S$ is obtained by transposing $T$ and reversing the order of columns in the obtained matrix. By applying elementary row operations, matrix $\Theta'$ can be transformed into a minimum-span form $\Theta$, such that the first and last non-zero elements of the $i$-th row are located in columns $i$ and $z_i$, respectively, where all $z_i$ are distinct. This enables one to obtain symbols of vector $u$ as \begin{align} \label{fTransformMinSpan} u_{i}=\sum_{s=0}^{i-1} u_s\Theta_{l-1-i,l-1-s} +\sum_{t=0}^{j_i}v_t \Theta_{l-1-i, l+t}, \end{align} where $j_i=z_{l-1-i}-l$. Let $h_i = \underset{0 \leq i' \leq i}{\max} j_{i'}$. It can be seen that\footnote{The method given in \cite{buzaglo2017efficient} is a special case of this approach. } \begin{align} \W^{(j)}_1(u_0^{j}|y_0^{l-1}) &= \sum_{v_0^{h_{j}}\in\mathcal Z_j} W^{(h_j)}_{t}(v_0^{h_{j}}|y_0^{l-1}) \nonumber \\ &=\sum_{v_0^{h_{j}}\in\mathcal Z_j}\sum_{v_{h_j+1}^{l-1}} W_t^{(l-1)}(v_0^{l-1}|y_0^{l-1}), \label{mKernelLook} \end{align} where $\mathcal Z_j$ is the set of vectors $v_0^{h_j}$, such that \eqref{fTransformMinSpan} holds for $i\in[j]$. Similarly we can rewrite the above expression for the case of the approximate probabilities \begin{align} \widetilde \W_1^{(j)}(u_0^j|y_0^{l-1}) &= \max_{v_0^{h_{j}}\in\mathcal Z_j} \widetilde W^{(h_j)}_{t}(v_0^{h_{j}}|y_0^{l-1}) \nonumber \\ &= \max_{v_0^{h_{j}}\in\mathcal Z_j} \max_{v_{h_j+1}^{l-1}} W^{(l-1)}_{t}(v_0^{l-1}|y_0^{l-1}). \end{align} Let $ \mathcal Z_{i,b} = \set{v_0^{h_i}|v_0^{h_i}\in \mathcal Z_i, \text{where }u_i=b} $. Hence, one obtains \begin{align} \bS_{1, i} = \max_{v_0^{h_{i}}\in\mathcal Z_{i,0}} R(v_0^{h_i}|y_0^{l-1}) - \max_{v_0^{h_{i}}\in\mathcal Z_{i,1}} R(v_0^{h_i}|y_0^{l-1}). \label{mKernLLR} \end{align} Observe that computing these values requires considering multiple vectors $v_0^{h_i}$ of input symbols of the Arikan transform $F_2^{\otimes t}$. Let $\mathcal D_i = \{0,\dots,h_i\}\backslash \{j_0,\dots,j_i\}$ be a \textit{decoding window}, i.e. the set of indices of Arikan input symbols $v_0^{h_i}$, which are not determined by symbols $u_0^{i-1}$. The number of such vectors, which determines the decoding complexity, is $ 2^{|\mathcal D_i|}$. In general, one has $|\mathcal D_i|=O(l)$ for an arbitrary kernel. \section{Efficient processing of $16\times 16$ kernels} \label{sKern16Proc} To minimize complexity of proposed approach $\eqref{mKernLLR}$ one needs to find kernels with small decoding windows while preserving required polarization rate ($>0.5$ in our case) and scaling exponent. By computer search, based on heuristic algorithm presented in \cite{fazeli2014scaling}, we found a $16 \times 16$ kernel\\ \scalebox{0.8}{\parbox{0.6\textwidth}{ $$\setlength{\arraycolsep}{2pt}K_1= \left(\begin{array}{cccccccccccccccc} 1&0&0&0&0&0&0&0&0&0&0&0&0&0&0&0\\ 1&1&0&0&0&0&0&0&0&0&0&0&0&0&0&0\\ 1&0&1&0&0&0&0&0&0&0&0&0&0&0&0&0\\ 1&0&0&0&1&0&0&0&0&0&0&0&0&0&0&0\\ 1&0&0&0&0&0&0&0&1&0&0&0&0&0&0&0\\ 1&1&0&0&0&0&0&0&1&1&0&0&0&0&0&0\\ 1&1&0&0&1&1&0&0&0&0&0&0&0&0&0&0\\ 1&1&1&1&0&0&0&0&0&0&0&0&0&0&0&0\\ 1&0&0&0&1&0&0&0&1&0&0&0&1&0&0&0\\ 1&0&1&0&0&1&1&0&1&1&0&0&0&0&0&0\\ 0&1&1&0&1&1&0&0&1&0&1&0&0&0&0&0\\ 1&1&1&1&1&1&1&1&0&0&0&0&0&0&0&0\\ 1&1&1&1&0&0&0&0&1&1&1&1&0&0&0&0\\ 1&1&0&0&1&1&0&0&1&1&0&0&1&1&0&0\\ 1&0&1&0&1&0&1&0&1&0&1&0&1&0&1&0\\ 1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\ \end{array} \right) $$}} with BEC scaling exponent $\mu(K_1) = 3.346$ \cite{fazeli2014scaling}. Furthermore, to minimize the size of decoding windows, we derived another kernel $K_2 = P_{\sigma}K_1$, were $P_{\sigma}$ is a permutation matrix corresponding to permutation $\sigma = [0,1,2,7,3,4,5,6,9,10,11,12,8,13,14,15]$, with scaling exponent $\mu(K_2) = 3.45$. Both kernels have polarization rate $0.51828$. \begin{table} \caption{Input symbols $u_\phi$ for kernels $K_1, K_2$ as functions of input symbols $v$ for $F_2^{\otimes 4}$} \label{tDecWin} \centering \scalebox{0.82}{ \begin{tabular}{|l|p{0.09\textwidth}|c|c||p{0.09\textwidth}|c|c|} \hline \multirow{2}{*}{$\phi$}&\multicolumn{3}{c||}{$K_1$}&\multicolumn{3}{c|}{$K_2$}\\\cline{2-7} & $u_\phi $ & $\mathcal D_\phi$ & Cost& $u_\phi$ & $\mathcal D_\phi$ & Cost\\ \hline 0 & $v_0$ & $\set{}$ &15& $v_0$ &$\set{}$&15\\ \hline 1 & $v_1$ & $\set{}$ &1& $v_1$ &$\set{}$ &1\\ \hline 2 & $v_2$ & $\set{}$ &3& $v_2$ & $\set{}$ &3\\ \hline 3 & $v_4$ & $\set{3}$ &21& $v_3$ &$\set{}$ &1\\ \hline 4 & $v_8$ & $\set{3,5,6,7}$ &127& $v_4$ &$\set{}$ &7\\ \hline 5 & $v_6\oplus v_9$ & $\set{3,5,6,7}$ &48& $v_8$ & $\set{5,6,7}$ &67\\ \hline 6 & $v_5\oplus v_6 \oplus v_{10} $ & $\set{3,5,6,7}$ &95& $v_6\oplus v_9$ & $\set{5,6,7}$ &24\\ \hline 7 & $v_3$ & $\set{5,6,7}$ &1& $v_5\oplus v_6\oplus v_{10}$ & $\set{5,6,7}$ &47\\ \hline 8 & $v_{12}$ & $\set{5,6,7,11}$ &127& $v_{6}$ & $\set{5,7}$ &1\\ \hline 9 & $v_{6}$ & $\set{5,7,11}$ &1& $v_{10}$ & $\set{7}$ &1\\ \hline 10 & $v_{10}$ & $\set{7,11}$ &1& $v_7$ & $\set{}$ &1\\ \hline 11 & $v_7$ & $\set{11}$ &1& $v_{11}$ & $\set{}$ &1\\ \hline 12 & $v_{11}$ & $\set{}$ &1& $v_{12}$ & $\set{}$ &7\\ \hline 13 & $v_{13}$ & $\set{}$ &1& $v_{13}$ & $\set{}$ &1\\ \hline 14 & $v_{14}$ & $\set{}$ &3& $v_{14}$ & $\set{}$ &3\\ \hline 15 & $v_{15}$ & $\set{}$ &1& $v_{15}$ & $\set{}$ &1\\ \hline \end{tabular}} \end{table} Table \ref{tDecWin} presents the right hand side of expression \eqref{fTransformMinSpan} for each $ i \in [16]$, as well as the corresponding decoding windows $\mathcal D_i$, for both kernels. It can be seen that the maximal decoding windows size for $K_1$ and $K_2$ is $4$ and $3$, respectively. Note that by applying the row permutation to $K_1$, we have reduced decoding windows, but increased scaling exponent. Below we present efficient methods for computing some input symbol LLRs for these kernels. \subsection{Processing of kernel $K_1$ with $\mu = 3.346$} \label{sDecK} It can be seen that for $\phi \in \set{0,1,2,13,14,15}$ one has $\bS_{1,\phi} =S_4^{(\phi)}(v_0^{\phi},y_0^{15})$, i.e. LLR for $F_2^{\otimes 4}$. \subsubsection{phase 3} In case of $\phi = 3$ expressions \eqref{mKernLLR} and \eqref{fTransformMinSpan} imply that the decoding window $\mathcal D_3 = \set{3}$ and LLR for $u_3$ is given by $$ \bS_{1,3} = \max_{v_3} R( \hat v_0 \hat v_1 \hat v_2 v_3 0|y_0^{15}) - \max_{v_3} R( \hat v_0 \hat v_1 \hat v_2 v_3 1|y_0^{15}), $$ where $ \hat v_ i= \hat u_i,i\in[3]$, are already estimated symbols. To obtain LLR $\mathbf S_{1,3}$ one should compute: \begin{itemize} \item $S_4^{(3)}(v_0^{2},y_0^{15})$ with 1 operation, \item $R(\hat v_0 \hat v_1 \hat v_2 v_3|y_0^{15})$ for $v_3 \in [2]$. Observe that this can be done with 1 summation, since $R(\hat v_0 \hat v_1 \hat v_2 v_3|y_0^{15}) = R(\hat v_0 \hat v_1 \hat v_2|y_0^{15}) + \tau(S_4^{(3)}(v_0^{2},y_0^{15}),v_3)$ and there is $v_3$ such as $\tau(S_4^{(3)}(v_0^{2},y_0^{15}),v_3) = 0$, \item $S_4^{(4)}(v_0^{3},y_0^{15})$ for $v_3 \in [2]$ with $7 * 2$ operations, \item $R( \hat v_0 \hat v_1 \hat v_2 v_3 v_4|y_0^{15})$ for $v_3,v_4 \in [2]$ with 2 operations, \item $\max_{v_3} R( \hat v_0 \hat v_1 \hat v_2 v_3 v_4|y_0^{15})$ for $v_4 \in [2]$ with 2 operations, \item $\max_{v_3} R( \hat v_0 \hat v_1 \hat v_2 v_3 0|y_0^{15}) - \max_{v_3} R( \hat v_0 \hat v_1 \hat v_2 v_3 1|y_0^{15})$ with 1 operation. \end{itemize} Total number of operations is given by 21. \subsubsection{phase 4} The decoding window is given by $\mathcal D_4 = \set{3,5,6,7}$ and $$ \bS_{1, 4} = \max_{v_0^{8}\in\mathcal Z_{4,0}} R(v_0^{8}|y_0^{15}) - \max_{v_0^{8}\in\mathcal Z_{4,1}} R(v_0^{8}|y_0^{l-1}), $$ where $\mathcal Z_{4,b}$ is given by the set of vectors $[\hat v_0 \hat v_1 \hat v_2 v_3 \hat v_4 v_5 v_6 v_7 b]$, $v_3,v_5,v_6,v_7 \in [2]$. Instead of exhaustive enumeration of vectors $v_0^{h_{j}}$ in \eqref{mKernLLR}, we propose to exploit the structure of $K_1$ to identify some common subexpressions (CSE) in formulas for $R(v_0^{h_i}|y_0^{l-1})$ and $S_\lambda^{(i)} = S_\lambda^{(i)}(v_0^{i-1},y_0^{l-1})$, which can be computed once and used multiple times. In some cases computing these subexpressions reduces to decoding of well-known codes, which can be implemented with appropriate fast algorithms. Furthermore, we observe that the set of possible values of these subexpressions is less than the number of different $v_0^{h_{j}}$ to be considered. This results in further complexity reduction. More accurate and detailed description of CSE can be found in \cite{trofimiuk2019reduced}. To demonstrate this approach, we consider computing the LLR for $u_4$ of $K_1$. This requires considering 16 vectors $v_0^7$ satisfying \eqref{fTransformMinSpan}. According to \eqref{mScoreMinSum}, one obtains $ R(v_0^8|y_0^{15})=R(v_0^{7}|y_0^{15})+\tau\left(S_4^{(8)}(v_0^{7},y_0^{15}),v_8\right). \label{v8K1} $ Observe that $\set{v_0^7F_2^{\otimes 3}|v_0^7\in \bar {\mathcal Z}_4}$ is a coset of Reed-Muller code $RM(1,3)$, where $\bar{\mathcal Z}_4$ is the set of vectors $v_0^{7}$, so that \eqref{fTransformMinSpan} holds for $i\in[4]$. Furthermore, $$R(v_0^{7}|y_0^{15}) =\frac{1}{2}\left(\sum_{i=0}^7(-1)^{c_i}s_i-\sum_{i=0}^7|s_i|\right),$$ where $s_i = S_{1}^{(0)}(\epsilon,(y_{i},y_{i+8})), i \in [8]$, $c_0^7= v_0^7F_2^{\otimes 3}$. Assume for the sake of simplicity that $v_j=0,j\in\set{0,1,2,4}$. Then the first term in this expression can be obtained for each $v_0^7\in \bar {\mathcal Z}_4$ via the fast Hadamard transform (FHT) \cite{beery1986optimal} of vector $s$, and the second one does not need to be computed, since it cancels in \eqref{mKernLLR}. It remains to compute $S_4^{(8)}(v_0^{7},y_0^{15}),v_0^{7} \in \bar{\mathcal Z_4}$ and $|\bar{ \mathcal Z_4}| = 16$. In a straightforward implementation, one would recursively apply formulas \eqref{mMinSum1} and \eqref{mMinSum2} to compute $S_4^{(8)}$ for 16 vectors $v_0^{7}$. It appears that there are some CSE arising in this computation. At first, one needs to compute $S_{1}^{(1)}(c_i,y_i,y_{i+8}),i\in[8]$, $c_0^{7} = v_0^7 F_2^{\otimes 3}$. Since $c_i \in \set{0,1}$, the values $S_{1}^{(1)}(j,y_i,y_{i+8}),j\in \set{0,1},i\in[8]$ constitute the first set of CSE. We store them in the array $L$ $$L[4i+j]=S_{1}^{(1)}(j\bmod 2 ,y_{i+\bar j},y_{i+8+\bar j}),$$ where $i,j \in [4]$, $\bar j = 4\lfloor j/2\rfloor$. Computing these values requires $16$ summations only, instead of $16\cdot 8 = 128$ summations in a straightforward implementation. The next step is to compute the values $S_2^{(2)}((c_i,c_{i+4}),(y_i,y_{i+4},y_{i+8},y_{i+12})), i\in[4]$ which are equal to $Q(S_{1}^{(1)}(c_i,y_i,y_{i+8}),S_{1}^{(1)}(c_{i+4},y_{i+4},y_{i+12}))$. Since $(c_i,c_{i+4}) \in \F_2^2$, $S_2^{(2)}$ gives us the second set of CSE. One can use values stored in $L$ to compute $S_2^{(2)}$ as $$X[i][j] = Q(L[4i+j/2], L[4i +(j \text{ mod }2) + 2])], i,j \in [4].$$ Observe that for any $c_0^7\in RM(1,3)$ one has $c_i^{i+4}\in RM(1,2), i\in\set{0,4}$. That is, one needs to consider only vectors $c_i^{i+4}$ of even weight while computing $S_3^{(4)}$. These values can be calculated as $$Y[i][j+4k] = Q(X[i][j \oplus 3k],X[i+2][j]),i,k \in [2], j\in[4].$$ Finally, the values $S_4^{(8)}(v_0^{7},y_0^{15})$ can be obtained as $$Z[i+8j] = Q(Y[0][i \oplus 3j],Y[1][i]), i \in[8], j\in [2]. $$ Each element of $Z$ corresponds to some $c_0^7\in RM(1,3)$. Finally, these values are used in \eqref{mKernLLR} together with $R(v_0^{7}|y_0^{15})$ to calculate $\mathbf S_{1,4}$. Let us compute the number of operations required to process phase $4$. One need to compute \begin{itemize} \item $R(v_0^7|y_0^{15})$ for $v_0^7 \in \bar {\mathcal Z}_4$ via FHT with 24 operations, \item all different $S_1^{(1)}$ arising in CSE (array $L$)\ with 16 operations, \item all $S_2^{(2)}$ in CSE (array $X$) with 16 operations, \item all $S_3^{(4)}$ in CSE (array $Y$) with 16 operations, \item all $S_4^{(8)}$ in CSE (array $Z$) with 16 operations, \item $R(v_0^8|y_0^{15})$ for $v_0^8 \in {\mathcal Z}_4$ with 16 operations, \item $\max_{v_0^{8}\in\mathcal Z_{4,b}} R(v_0^{8}|y_0^{15})$, $b \in [2]$, with $15 * 2$ operations, \item $\mathbf S_{1,4}$ with 1 operation. \end{itemize} The overall complexity is given by 135 operation. We also employ one observation to reduce the complexity of computing $\max_{v_0^{8}\in\mathcal Z_{4,b}} R(v_0^{8}|y_0^{15})$. Let $s$ be a FHT\ of the vector $s$, where $s_i = S_{1}^{(0)}(\epsilon,(y_{i},y_{i+8})), i \in [8]$. Observe that we can compute $\arg\max_{i \in [8]} |s_i|$ with 7 operations and obtain $v_3,v_5,v_6,v_7$ which gives us $\max R(v_0^7|y_0^{15})$. Recall that $\tau(S,c)$ function is zero for one of $b \in [2]$, therefore, there is a value of $\hat b, b \in [2]$ such as $\max_{v_0^{8}\in\mathcal Z_{4,\hat b}} R(v_0^{8}|y_0^{15}) = \max R(v_0^7|y_0^{15})$. It implies that we remain need to compute $\max_{v_0^{8}\in\mathcal Z_{4,1 \oplus \hat b}} R(v_0^{8}|y_0^{15})$. With this modification we have the complexity given by 127 operations. \subsubsection{phase 5} The decoding window $\mathcal D_5$ remains the same as in the previous phase. According to expressions \eqref{mMinSum2} and \eqref{mScoreMinSum} to obtain $\mathbf S_{1,5}$ one should compute: \begin{itemize} \item all $S_4^{(9)}$ with 16 operations, \item $R(v_0^9|y_0^{15})$ for $v_0^9 \in {\mathcal Z}_5$ with 16 operations, \item $\max_{v_0^{9}\in\mathcal Z_{5,b}} R(v_0^{9}|y_0^{15}), b \in [2],$ with 15 operations. Similarly to phase 4, there is a value of $\hat b \in [2]$ such as $\max_{v_0^{9}\in\mathcal Z_{5,\hat b}} R(v_0^{9}|y_0^{15}) = \max_{v_0^{8}\in\mathcal Z_{4,v_4}} R(v_0^{8}|y_0^{15})$, \item $\mathbf S_{1,5}$ with 1 operation. \end{itemize} Total complexity is given by 48 operations. \subsubsection{phase 6} The decoding window $\mathcal D_6 = \set{3,5,6,7}$. At this phase according to expressions \eqref{mMinSum1}-\eqref{mMinSum2} one should compute: \begin{itemize} \item 32 values of $S_3^{(5)}$ in CSE with 32 operations, \item 16 LLRs $S_4^{(10)}$ with 16 operations, \item $R(v_0^{10}|y_0^{15})$ for $v_0^{10} \in {\mathcal Z}_6$ with 16 operations, \item $\max_{v_0^{10}\in\mathcal Z_{6,b}} R(v_0^{10}|y_0^{15}), b \in [2],$ with 30 operations, \item $\mathbf S_{1,5}$ with 1 operation. \end{itemize} Total complexity is given by 95 operations. \subsubsection{phase 7} At this phase the decoding window is reduced and given by $\mathcal D_7 = \set{5,6,7}$. Moreover, the value $h_7 = h_6 = v_{10}$, which means that the values $R(v_0^{10}|y_0^{15})$ remains the same. We propose to use the following method: at phase 6 one should compute $\max_{\set{v_0^{10}|v_0^{10}\in\mathcal Z_{7,b},u_6 = \bar b}} R(v_0^{10}|y_0^{15})$ for $b \in [2], \bar b \in [2]$ and obtain $$\max_{v_0^{10}\in\mathcal Z_{6,b}} R(v_0^{10}|y_0^{15}) = \max_{\bar b \in [2]} \max_{\set{v_0^{10}|v_0^{10}\in\mathcal Z_{7,b},u_6 = \bar b}} R(v_0^{10}|y_0^{15}).$$ Once the value $u_6$ is determined, one can obtain $\mathbf S_{1,7}$ with one operation directly from already computed values $\max_{v_0^{10}\in\mathcal Z_{7,b}} R(v_0^{10}|y_0^{15})$. \subsubsection{phase 8} At this phase the decoding window is increased and given by $\mathcal D_8 = \set{5,6,7,11}$ and $h_8 = 12$. To obtain kernel input symbol LLR one should compute: \begin{itemize} \item 8 LLRs $S_4^{(11)}$ with 8 operations, \item 16 path scores $R(v_0^{11}|y_0^{15})$ with 8 operations, \item 16 values $S_2^{(3)}$ in CSE with 16 operations, \item 32 values $S_3^{(6)}$ in CSE with 32 operations, \item 16 values $S_4^{(12)}$ with 16 operations, \item 32 path scores $R(v_0^{12}|y_0^{15})$ with 16 operations, \item $\max_{v_0^{12}\in\mathcal Z_{12,b}} R(v_0^{12}|y_0^{15}), b\ in [2]$ with $15 * 2$ operations, \item $\mathbf S_{1,12}$ with one operation. \end{itemize} Total complexity is given by 127 operations. One can recursively apply approach described for phase 7, namely, construct tree of maximums of $R(v_0^{12}|y_0^{(15)})$, and obtain $\mathbf S_{1,\phi}, 8<\phi<13$ with one operation. \subsection{Processing of kernel $K_2$ with $\mu = 3.45$} Below we briefly present a complete processing algorithm for kernel $K_2$. It provides much better performance-complexity tradeoff compared to $K_1$. The algorithm uses the same CSE elimination techniques as described in section \ref{sDecK}. After the pre-computation steps for $\phi\in\set{5,6,7},$ the LLR is obtained via \eqref{mKernLLR}. \begin{itemize} \item For $\phi \in \set{0,1,2,3, 4, 11,12, 13,14,15}$, compute $\bS_{1,\phi}$ as LLRs $S_4^{(\phi)}(v_0^{\phi-1},y_0^{15})$ for the Arikan transform $F_2^{\otimes 4}$. \item For $\phi = 5$: \begin{enumerate} \item Since the set of vectors $c_0^3 = [\hat v_4 v_5 v_6 v_7]F_2^{\otimes 2}$ fixed $v_i,i\in\set{0,1,2,3,4},$ a coset of $RM(1,2)$, one can obtain $8$ values of $R(v_4^7|y_0^{15})$ (recall that $R(v_0^7|y_0^{15}) = R(\hat v_0^3|y_0^{15}) + R(v_4^7|y_0^{15})$) from the FHT of the vector $s_i = S_{2}^{(1)}(\bar c_i, (y_i,y_4,y_{i+8},y_{i+12})), i \in [4]$, $\bar c = \hat v_0^3 F_2^{\otimes 2}$. \item Compute\\ $L[i+8j]=S_{1}^{(1)}(j\bmod 2 ,y_{i},y_{i+8}), i \in [8], j \in [2].$ \item Since $\set{(c_i,c_{i+4})}=\set{(0,0),(1,1)}$, compute all possible $S_2^{(2)}$ values as $X[i][j] = Q(L[i+8j],L[i+4+8j]), i \in [4], j \in [2]. $ \item Since $\set{(c_i,c_{i+4},c_{i+2},c_{i+6})}$ is a code generated by $\begin{pmatrix}1&1&0&0\\1&1&1&1\end{pmatrix}$, compute all possible $S_3^{(4)}$ values as $Y[i][j] = Q(X[i][j/2],X[i+2][j\mod2]), i \in [2], j \in[4].$ \item For every $c_0^7=v_0^7F_2$ compute $S_4^{(8)}(v_0^7,y_0^{15})$ as $Z[i+4j] = Q(Y[0][i\oplus3j],Y[1][i]), i \in [4], j \in [2].$ \end{enumerate} \item For $\phi = 6$, compute $S_4^{(9)}(v_0^8,y_0^{15})$ as $Z[i+4j] = P(Y[0][i\oplus3j],Y[1][i],v_{8}), i \in [4], j \in [2]$. \item For $\phi = 7$: \begin{enumerate} \item Compute $S_3^{(5)}$ as $\bar Y[0][j+4k] = P(X[0][j/2],X[2][j\text{ mod }2],\bar c_{0,k})$, $\bar Y[1][j+4k] = P(X[3][\bar j_k/2],X[1][\bar j_k \text{ mod }2],\bar c_{1,k})$ and $\bar c_{0, k} = v_8\oplus u_6 \oplus k$, $\bar c_{1,k} = u_6 \oplus k$, $\bar j_k = j \oplus 3$, $i \in [2], j \in[4], k \in[2]$. \item Obtain $S_4^{(10)}$ as $Z[i] = Q(\bar Y[0][i], \bar Y[1][i]), i \in [8]$. \end{enumerate} \item For $\phi \in \set{8,9,10}$: Use $16$ already computed values of $R(v_0^{10}|y_0^{15})$ to obtain $\bS_{1,\phi}$. \end{itemize} \begin{remark} Let us comment the case of $\phi = 7$. In conventional Arikan SC for $F_2^{\otimes 4}$, after symbol $v_9$ is estimated, the LLRs $S_3^{(5)}$ for $v_{10}$ are obtained by applying $P$ function to $S_2^{(2)}$ and values $(v_8\oplus v_9, v_8)$. In the case of $K_2$, we do not have a fixed value for $v_9$. Instead, we have a constraint $u_6 = v_6+v_9 $. Therefore, for each vector $v_0^9 \in \bar{\mathcal Z_7}$ the value of $v_9$ is changed according to $v_6$. This property is taken into account in the expressions for computing of $\bar Y[i][j]$. \end{remark} For processing of $K_2$ we also used trick with simplified computation of path score maximums similarly to phase $5$ of $K_1$. The cost, in terms of the total number of summations and comparisons, of computing $\bS_{1, \phi}$ using the proposed algorithm is shown in Table \ref{tDecWin}. The overall processing complexity is $447$ and $181$ operations for kernels $K_1$ and $K_2$ respectively, while the trellis-based algorithm \cite{griesser2002aposteriori} requires $7557$ and $9693$ operations, respectively. The above described techniques can be also used to implement an SCL\ decoder for polar codes with the considered kernels, using a straightforward generalization of the algorithm and data structures presented in \cite{tal2015list}. \section{Numeric results} \begin{figure} \includegraphics[width=0.5\textwidth]{plots/4096_2048.eps} \caption{Performance of $(4096, 2048)$ polar codes} \label{f4096_2048} \end{figure} We constructed $(4096,2048)$ polar codes with the considered kernels, and investigated their performance for the case of AWGN\ channel with BPSK\ modulation. The sets of frozen symbols were obtained by Monte-Karlo simulations. Figure \ref{f4096_2048} illustrates the performance of plain polar codes, polar codes with CRC\footnote{CRC length was selected to minimize FER with $L=8$.} and polar subcodes \cite{trifonov2017randomized}. It can be seen that the codes based on kernels $K_1$ and $K_2$ with improved polarization rate $E(K_1) = E(K_2) = 0.51828$ provide significant performance gain compared to polar codes with Arikan kernel. Observe also that randomized polar subcodes provide better performance compared to polar codes with CRC. Moreover, polar subcodes with kernels $K_1, K_2$ under SCL with $L=8$ have almost the same performance as polar subcodes with Arikan kernel under SCL with $L = 32$. Observe also that the codes based on kernels with lower scaling exponent exhibit better performance. Figure \ref{fErrorList} presents simulation results for $(4096,2048)$ polar subcodes with different kernels under SCL with different $L$ at $E_b/N_0=1.25$ dB. It can be seen that the kernels with polarization rate $0.51828$ require significantly lower list size $L$ to achieve the same performance as the code with the Arikan kernel. Moreover, this gap grows with $L$. This is due to improved rate of polarization, which results in smaller number of unfrozen imperfectly polarized bit subchannels. The size of the list needed to correct possible errors in these subchannels grows exponentially with their number (at least for the genie-aided decoder considered in \cite{mondelli2015scaling}). On the other hand, lower scaling exponent gives better performance with the same list $L$, but the slope of the curve remains the same for both kernels $K_1,K_2$. \begin{figure} \begin{subfigure}[b]{0.2415\textwidth} \includegraphics[width=\linewidth]{plots/Error_vs_List.eps} \caption{Performance} \label{fErrorList} \end{subfigure} \begin{subfigure}[b]{0.2415\textwidth} \includegraphics[width=1\linewidth]{plots/Error_vs_Compl.eps} \caption{Decoding complexity} \label{fErrorCompl} \end{subfigure} \caption{SCL decoding of polar subcodes with different kernels} \end{figure} Figure \ref{fErrorCompl} presents the same results in terms of the actual decoding complexity. Recall that proposed kernel processing algorithm uses only summations and comparisons. The SCL algorithm was implemented using the randomized order statistic algorithm for selection of the paths to be killed at each phase, which has complexity $O(L)$. Observe that the polar subcode based on kernel $K_2$ can provide better performance with the same decoding complexity for FER $\leq 8\cdot 10^{-3}$. This is due to higher slope of the corresponding curve in Figure \ref{fErrorList}, which eventually enables one to compensate relatively high complexity of the LLR computation algorithm presented in Section \ref{sKern16Proc}. Unfortunately, $K_1$ kernel, which provides lower scaling exponent, has greater processing complexity than $K_2$, so that its curve intersects the one for the Arikan kernel only at FER$=2\cdot 10^{-3}$. \section{Conclusions} In this paper efficient decoding algorithms for some $16 \times 16$ polarization kernels with polarization rate $0.51828$ were proposed. The algorithms compute kernel input symbols LLRs via the ones for the Arikan kernel, and exploit the structure of the codes induced by the kernel to identify and re-use the values of some common subexpressions. It was shown that in the case of SCL decoding with sufficiently large list size, the proposed approach results in lower decoding complexity compared to the case of polar (sub)codes with Arikan kernel with the same performance. Extension of the proposed approach to the case of other kernels remains an open problem. \section*{Acknowledgment} We thank Fariba Abbasi Aghdam Meinagh for many comments and stimulating discussions. \bibliographystyle{ieeetran}
\section{Introduction} \label{sec:intro} The optimization of the production is an important problem in chemical and biological engineering and the control can be either the temperature (batch or closed reactor) or by feeding the reactor (semi-batch or open case). In this article we shall concentrate on the first case. Moreover we assume that the dynamics is modeled using the mass action kinetics assumptions and hence given at constant temperature $T$ by a polynomial system based only on the Feinberg--Horn--Jackson graph associated to the chemical network. Also in the 70's those researchers obtained (under the so--called zero deficiency assumption) in a series of seminal articles \cite{feinberg1972,horn1972} a complete description of the dynamics, at constant temperature. If this dynamics is well understood, in the optimal problem the temperature is not constant and the analysis becomes very intricate. Thanks to the Pontryagin Maximum Principle \cite{pontryagin1962} candidates as minimizers can be found among extremals solutions of a ({\it non smooth}) Hamiltonian dynamics and optimal solutions are concatenation of bang arcs, with minimum and maximum temperature, and the so--called singular arcs, defined as a solution of a {\it smooth} Hamiltonian {\it constrained} dynamics \cite{bonnard2003}. Moreover maximizing the production of one species during the batch can be restated as producing a fixed amount of this species while minimizing the batch duration. In this frame, the problem is a time minimal control problem, with a terminal target manifold of {\it codimension one}. For applications, the time optimal control has to be computed as a closed loop feedback and this leads to the problem of computing the time minimal {\it synthesis}, for a single--input control system. At the end of the 80's, geometric optimal control has produced an important literature to compute the time minimal syntheses for the {\it fixed end point case}, where the initial point is localized near the terminal point. This was done using the {\it Lie algebraic structure} of the control system, mainly for single--input (smooth) system, where the control appears linearly, some seminal references are \cite{sussmann1990,schattler1988,boscain2004} either in general context or in view of application formed by a sequence of two irreversible reactions: $A\rightarrow B \rightarrow C$ and in relation with an industrial project \cite{bonnard1998}. Our aim is to extend this work to more complicated reaction schemes and to deal in particular with weakly reversible chemical schemes. More precisely we shall concentrate on a McKeithan type scheme of the form $ \tikz[baseline={(a.base)},node distance=6mm] { \node (a) {T+M}; \node[right=of a] (b) {A}; \node[right=of b] (c) {B}; \draw (a.base east) edge[left,->] node[above] {} (b.base west) (b.base east) edge[->] node[above] {} (c.base west); \draw (a) edge[bend right=40,<-] node[below right] {} (b); \draw (a.south) edge[bend right=60,<-] node[below right] {} (c); } $ assuming that the coefficient governing the dynamics are given by Arrhenius law. This scheme was already studied in the context of control theory using stabilization techniques with ``{\it feeding}'' types control \cite{sontag2001} and ad hoc {\it observer design} \cite{chavez2002a}. In our case, this network is a test bed case for our very general approach. The key point for this extension is the analysis of singular trajectories and their role in the synthesis. This is connected with an important question and the need to extend the standard synthesis related to the turnpike phenomenon \cite{sussmann1987a} to deal with cases, where the strict Legendre--Clebsch condition is not satisfied, a situation encountered in a recent application in MRI \cite{cots2018}. The organization of this article is the following. In Section \ref{sec2}, we recall briefly the Feinberg--Horn--Jackson theory to model the dynamics of chemical networks of constant temperature and the properties of the dynamics under the zero deficiency assumption \cite{feinberg1972,horn1972}, which can be applied to the McKeithan scheme. The stability properties are recalled and can be applied to control stabilization and observer design \cite{sontag2001,chavez2002a}. In Section \ref{sec3}, we present the fundamental results of the time minimal control problem, which are relevant to our study: Pontryagin Maximum Principle \cite{pontryagin1962}, regular and singular extremals \cite{bonnard2003},\cite{kupka1987}. The general turnpike theorem \cite{sussmann1987a} is recalled and extensions are presented in relation with the problem with terminal manifold of codimension one and when the strict Legendre--Clebsch condition is not satisfied. The concept of conjugate and focal points is introduced based on \cite{bb1993}. In Section \ref{sec4}, we analyze the time minimal control problem for a two reactions McKeithan scheme. To compute the time minimal syntheses, we present techniques and results from \cite{bonnard1998,bonnard1997}, which have to be extended to analyze the problem. The computational complexity of the problem is discussed and symbolic computations are presented to cope with this complexity. \section{Mathematical model and stability properties of the McKeithan network} \label{sec2} \subsection{Mass action kinetics networks and dynamics using the Feinberg--Horn--Jackson graph (\cite{feinberg1972},\cite{horn1972})} We consider a set of $m$ chemical species $\{X_1,\ldots,X_m\}$ and the state of the dynamics is the vector $c=(c_1,\ldots,c_m)^\intercal \in \mathbb{R}_{\ge 0}^m$ representing the molar concentration. Let ${\cal R}$ be a set of reactions, each reaction being denoted by $y\rightarrow y'$ and of the form \[ \sum_{i=1}^m \alpha_i X_i \longrightarrow \sum_{i=1}^m \beta_i X_i, \] where $\alpha_i, \beta_i$ are the {\it stoichiometric coefficients} and the vectors $y=(\alpha_1,\ldots, \alpha_m)^\intercal$ and $y'=(\beta_1,\ldots, \beta_m)^\intercal$ are the vertices of the so--called {\it Feinberg--Horn--Jackson oriented graph} associated to the network, edges being oriented according to $y\rightarrow y'$. Each reaction is characterized by a {\it reaction rate} $K(y\rightarrow y')$ and the system is said {\it simple} (or mass kinetics) if the rate of the reaction is of the form: \begin{equation} \begin{aligned} &K(y\rightarrow y') = k(T)\, c^y, \\ &c^y = c_1^{\alpha_1} \ldots c_m^{\alpha_m} \end{aligned} \label{eq:constant-reaction} \end{equation} and \[ k(T) = A\, e^{-E/(RT)} \] is the {\it Arrhenius law}, $A$ is the exponential factor, $E$ is the activation energy, both depending on the reaction, $R$ is the gas constant and $T$ is the temperature. Note that different rate formulae can be used to deal in particular with biomedical systems (see for instance \cite{sontag2001}). The dynamics of the system, taking into account the whole network is: \begin{equation} \dot c(t) = f(c(t),T) = \sum_{y\rightarrow y'} K(y\rightarrow y')\, (y'-y). \label{eq:dyn-gen} \end{equation} \subsection{More explicit representation of the dynamics} \begin{definition} The stoichiometric subspace is $S\coloneqq \mathrm{span}\{y-y';\ y\rightarrow y' \in {\cal R}\}$ and the sets $(c(0) + S) \cap \mathbb{R}_{\ge 0}^m$ are called the (strictly if $>0$) positive stoichiometric compatibility classes. \label{def:stochio-subspace} \end{definition} From \cite{anderson2008} we have. \begin{lemma} Let $c(t)$ be a solution of \eqref{eq:dyn-gen} with initial condition $c(0) \in \mathbb{R}_{\ge 0}^m$. Then $c(t)$ belongs for all $t\ge 0$ to the strictly positive compatibility class $(c(0)+S) \cap \mathbb{R}_{\ge 0}^m$. \label{lem:invariant-set} \end{lemma} \begin{definition} Having labeled the set of vertices by $i=1,\ldots, n$, with corresponding stoichiometric vector $(y_1,\ldots,y_n)$, the complex matrix is $Y\coloneqq(y_1,\ldots, y_n)$. The incidence connectivity matrix $A\coloneqq (a_{ij})$ contains the Arrhenius coefficients $k_i$ of the reactions using the rule: $k_1=a_{21}$ indicates a reaction with kinetics constant $k_1$ from the first node to the second, that is $y_1 \underset{k_1}{\rightarrow} y_2$. \label{def:complex-matrix} \end{definition} With the mass kinetics assumption, the dynamics can be expressed as \[ \dot c(t) = f(c(t),T) = Y \tilde A c^Y, \] where $\tilde A$ is the Laplacian matrix in graph theory defined by \begin{equation} \tilde A = A - \text{diag} \left( \sum_{i=1}^n a_{i1},\ldots, \sum_{i=1}^n a_{in} \right) \label{eq:laplacian-matrix} \end{equation} and we denote \[ c^Y = (c^{y_1},\ldots,c^{y_n})^\intercal. \] \subsection{The McKeithan scheme (\cite{keithan2001,sontag2001})} It is given by the reaction scheme: \[ \tikz[baseline={(a.base)},node distance=6mm] { \node (a) {$T+M$}; \node[right=of a] (b) {$C_0$}; \node[right=of b] (c) {$C_1$}; \node[right=of c] (d) {$\hdots$}; \node[right=of d] (e) {$C_N$}; \draw (a) edge[->] node[above] {$k_1$} (b) (b) edge[->] node[above] {$k_{p,0}$} (c) (c) edge[->] node[above] {$k_{p,1}$} (d) (d) edge[->] node[above] {$k_{p,N}$} (e); \draw (a) edge[bend right=30,<-] node[below right] {$k_{-1,0}$} (b); \draw (a) edge[bend right=53,<-] node[below] {$k_{-1,1}$} (c); \draw (a.south) edge[bend right=64,<-] node[below] {$k_{-1,N}$} (e); }. \] The matrix $Y$ is given by \begin{equation*} Y = \begin{pmatrix} 1 & 0 & \hdotsfor{2}& 0 \\ 1 & 0 & & & \cdot \\[-1.5ex] 0 & 1 & \ddots & & \vdots \\[-1.5ex] \vdots & \ddots & \ddots & \ddots & \vdots \\[-1.5ex] \vdots & & \ddots & 1 & 0 \\ 0 & \hdotsfor{2} & 0 & 1 \end{pmatrix} \end{equation*} and the matrix $A=(a_{ij})$ is defined by $a_{21}=k_1,\ a_{1i}=k_{-1,i-2},\ i=2,\ldots,m$ $(m=N+2)$, $a_{i,i-1}=k_{p,i-3},\ i=3,\ldots,m$ and all others $a_{ij}$ are zero. The stoichiometric subspace is defined by: \[{\{ c: T+C_0+\ldots+C_N = M+C_0+\ldots+C_N=0\}}\] and we note: ${\delta_1=T+C_0+\ldots +C_N} \text{ and } \delta_2=M+C_0+\ldots +C_N$ the constants associated to first integrals of the dynamics. Consider the special case $N=2$ so that the reaction scheme is denoted by $ \tikz[baseline={(a.base)},node distance=6mm] { \node (a) {T+M}; \node[right=of a] (b) {A}; \node[right=of b] (c) {B}; \draw (a.base east) edge[left,->] node[above] {{$\scriptstyle k_1$}} (b.base west) (b.base east) edge[->] node[above] {{$\scriptstyle k_2$}} (c.base west); \draw (a) edge[bend right=40,<-] node[below right] {{$\scriptstyle k_3$}} (b); \draw (a.south) edge[bend right=60,<-] node[below right] {{$\scriptstyle k_4$}} (c); } $, and restricting to the stoichiometric class ($\delta_1$ and $\delta_2$ being fixed), one gets with: $x\coloneqq [A], y\coloneqq [B]$, $[\cdot]$ denoting the respective concentrations, that the dynamics is described by the equations \begin{equation} \begin{aligned} &\dot x = k_1(\delta_1 x-y)(\delta_2 -x -y)-(k_2+k_3)x \\ &\dot y = k_2x-k_4 y. \end{aligned} \label{eq:dyn} \end{equation} \begin{definition} The deficiency of the network is: $\delta=n-l-s$, where $n$ is the number of vertices, $l$ is the number of connected components and $s$ is the dimension of the stoichiometric subspace. The network is called strongly connected if for each pair $(i,j)$ of vertices such that there exists an oriented path joining $i$ to $j$ there exists a path joining $j$ to $i$. \end{definition} Using \cite{feinberg1972}, refined by \cite{anderson2008,sontag2001}, one has the following result. \begin{theorem} The graph associated to the McKeithan scheme is strongly connected and with deficiency zero. In each strictly positive compatibility class there exists in this domain an unique globally asymptotically stable equilibrium. \label{thm:anderson} \end{theorem} \subsection{Application to stabilization and observer design for the McKeithan scheme} This stability result has consequences to control and observation properties of the network, see \cite{sontag2001,chavez2002b}, that we recall briefly. The dynamics \eqref{eq:dyn} can be converted into a control system of the form \begin{equation} \begin{aligned} &\dot c(t) = f(x(t)) + u(t) \\ &y(t) = h(c(t)), \end{aligned} \label{eq:control-sys} \end{equation} where $u(\cdot)$ is a feeding control and $h$ is a polynomial observation function. Asymptotic stability of equilibrium in each strictly positive compatibility class will allow to get stabilization result for a single equilibrium. Moreover it leads to design under a mild assumption (detectability) a simple observer. We refer to \cite{sontag2001} and \cite{chavez2002a} for the detailed presentation of those results, the geometric construction being clear. \section{The optimal control problem and Pontryagin Maximum Principle} \label{sec3} \subsection{Statement and notation for the optimal control problem} \label{sec3p1} The system is written as $\frac{\mathrm{d} c}{\mathrm{d} t} = f(c,T)$ (see \eqref{eq:dyn}) and controlling the temperature leads to $T\in [T_m,T_M]$. In the sequel, we shall use the terminology {\it direct} for the corresponding control problem. In practice, thermodynamics has to be used to model the heat exchanges, in relation with the heat produced by the reactions \cite{toth2018} or the heat exchange device used in the experiments, depending upon the technical achievements. To avoid this part of the study and without losing any mathematically generality, we shall use $\dot v$ as the control variable setting $\dot v=u$, where $v\coloneqq k_i(T)$ for some reaction $i$, where $k_i(T)=A_i e^{-E_i/(RT)}$ (see \eqref{eq:constant-reaction}). This leads to deal with the so--called {\it indirect} control system: \[ \dot q(t) = F(q(t)) + u(t)\, G(q(t)), \] where $q=(c,v) \in \mathbb{R}^n$ is the extended state variable, $F=f(c,v)\, \frac{\partial}{\partial q}, G=\frac{\partial}{\partial v}$, $u_-\le u \le u_+$, where $[u_-,u_+]$ can be normalized to $[-1,+1]$. Note that the bounds $v\in [v_m,v_M]$ will not be taken into account in our study. The map $v\mapsto \dot v$ is the standard {\it Goh transformation} in optimal control, see \cite{bonnard2003}. The optimal control problem of physical interest is the problem of maximizing the production of one species and using a proper variable labeling, the optimal problem is therefore of the {\it Mayer type}: \[ \dot q = F(q) + u\, G(q),\quad \underset{|u|\le 1}{\max}\ q_1(t_f), \] where $t_f$ is the time duration of the batch and $q_1$ is the desired product. Note it will be show (thanks to the Maximum Principle) that a ``dual'' formulation is \[ \underset{u(\cdot)}{\min} \ t_f, \quad c_1(t_f) = d, \] where $d>0$ is the desired amount of the species $X_1$ during the batch. \subsection{Maximum Principle \cite{pontryagin1962}} \subsubsection{Notations and concepts} Consider a general control system of the form \[ \dot q = X(q,u), \quad q\in \mathbb{R}^n, \] where $X$ is a real analytic $(C^\omega)$ and the control is $u:[0,t_f(u)] \mapsto [-1,1]$. The set of admissible controls ${\cal U}$ is the set of bounded measurable mappings. If $q(0)=q_0$ (initial state), we denote by $q(\cdot,q_0,u)$ (in short $q(\cdot)$) the solution starting from $q_0$. Fixing $t_f$, the {\it accessibility set} in time $t_f$ is the set $A(q_0,t_f) = \underset{u(\cdot)\in {\cal U}}{\cup} q(t_f,q_0,u)$. The {\it extremity mapping} (in time $t_f$) is the map: $E^{q_0,t_f}: u(\cdot) \mapsto q(t_f,q_0,u)$ defined on a domain of ${\cal U}$; the set ${\cal U}$ is endowed with the L$^\infty$-norm topology. \subsubsection{Pontryagin Maximum Principle (PMP)} \noindent {\bf Statement in the time minimal case with} $\bm{q(t_f)\in N\coloneqq}$ {\bf smooth terminal manifold.} \noindent {\it Notation: } $H(q,p,u) = p\cdot X(q,u)$ denotes the {\it pseudo--Hamiltonian} (Hamiltonian lift of the vector field $X$), $p$ is the adjoint vector in $\mathbb{R}^n\setminus \{0\}$ and $\cdot$ is the scalar product. We denote by $M(q,p) = \underset{|u|\le 1}{\max}\ H(q,p,u)$. \noindent {\it Statement of the PMP:} If $(q^*,u^*)$ is an optimal control--trajectory pair on $[0,t_f^*]$ then there exists $p^*\in \mathbb{R}^n\setminus \{0\}$ such that a.e.: \begin{equation} \begin{array}{ll} &\dot q^*(t)=\frac{\partial H}{\partial p}(q^*(t),p^*(t),u^*(t)), \\ &\dot p^*(t) = -\frac{\partial H}{\partial q}(q^*(t),p^*(t),u^*(t)), \\ &H(q^*(t),p^*(t),u^*(t))=M(q^*(t),p^*(t)). \end{array} \label{eq:ham-pmp} \end{equation} Moreover $M(q^*(t),p^*(t))$ is a positive constant and $p^*$ satisfies the {\it transversality condition} \begin{equation} p^*(t_f) \perp T_{q^*(t_f)} N. \label{eq:transversality} \end{equation} \noindent {\it Statement in the Mayer case:} As before, except that the transversality condition is replaced by \[ p^*(t_f)= \frac{\partial \varphi}{\partial q}(x^*(t_f)), \] where $\varphi$ is the Mayer cost function to minimize. \begin{definition} An extremal $(q,p,u)$ is a solution of \eqref{eq:ham-pmp} on $[0,t_f]$. It is called a BC--extremal is $q(0)=q_0$ and $p(t_f)$ satisfies the transversality condition. An extremal control is called regular if $|u(t)|\le 1$ a.e. and singular if $\frac{\partial H}{\partial u}=0$ everywhere. An extremal is said exceptional if $M=0$. A regular extremal control is called "bang--bang" if $u(\cdot)$ is piecewise constant on $[0,t_f]$ (i.e. the number of switches is finite). \end{definition} \subsubsection{Computations of singular extremals} \noindent {\bf First case.} Consider the case $\dot q = X(q,u)$, where $H=p\cdot X(q,u)$ and the condition $\frac{\partial H}{\partial u}=0$ is satisfied. Denote by $z(\cdot)=(q(\cdot),p(\cdot))$ the reference extremal. From the maximization condition, the {\it Legendre--Clebsch condition} $\frac{\partial^2 H}{\partial u^2}\le 0$ has to be fulfilled. If this inequality is strict, one can use the implicit function theorem to compute the singular control as the dynamic feedback: $z\mapsto u_s(z)$ and plugging such $u_s$ into $H(q,p,u)$ leads to define the {\it true} (or maximized) Hamiltonian. \noindent {\bf Second case.} Let $\dot q = F(q) + u\, G(q)$. One introduces the following notations. If $X$ and $Y$ are two real analytic vector fields, the {\it Lie bracket} is defined by $[X,Y](q)= \frac{\partial X}{\partial q}(q)Y(q)-\frac{\partial Y}{\partial q}(q)X(q)$. The extremal lift of $X$ is $H_X(z)=p\cdot X(q), \; z=(q,p)$ and the {\it Poisson bracket} is defined by $\{H_X,H_Y \}(z)=p\cdot [X,Y](q)$. \noindent {\it Computation of singular extremals:} The condition $\frac{\partial}{\partial u} \frac{\mathrm{d}}{\mathrm{d} t^2} \frac{\partial H}{\partial u} =\{ \{ H_G,H_F \}, H_G \} \geq 0$ (resp. $>0$) is called the (resp. strict) {\it generalized Legendre--Clebsch condition}. Recall the following. \begin{proposition}[\cite{krener1977}] The generalized Legendre--Clebsch condition is a necessary optimality condition for the time minimal control problem with fixed extremities. \end{proposition} To compute the singular extremal, we differentiate twice $t\mapsto H_G(z(t))$ and we get \begin{equation} \begin{aligned} &H_G(z)=\{ H_G,H_F \}(z)=0, \\ &\{ \{ H_G,H_F \} , H_F \}(z)+u\, \{ \{ H_G,H_F \} , H_G \}(z)=0. \end{aligned} \label{eq:cond_order_2} \end{equation} Assume (in relation with the Legendre--Clebsch condition) ${\{\{H_G,H_F\},H_G\}\neq 0}$. The corresponding extremal is called of {\it order 2} and the singular control $u$ is computed as $u_s(z)$, using relation \eqref{eq:cond_order_2}. Plugging such $u_s(z)$ into $H(q,p,u)$ leads to define the {\it true} singular Hamiltonian, denoted by $H_s(z)$. One has: \begin{proposition} Singular extremals of order $2$ are the solutions of : \begin{equation} \frac{\mathrm{d} q}{\mathrm{d} t}=\frac{\partial H_s}{\partial p}(z), \; \frac{\mathrm{d} p}{\mathrm{d} t}=-\frac{\partial H_s}{\partial q}(z) \label{eq:singular_solution_Hs} \end{equation} \end{proposition} with the constraints \[\{ H_G,H_F \}(z) = H_G(z) = 0.\] Moreover, in order to be admissible, the singular control is given by \begin{equation} u_s(z)= -\frac{\{ \{ H_G,H_F \} , H_F \}(z)}{\{ \{ H_G,H_F \} , H_G \}(z)} \label{eq:control_u_s} \end{equation} and has to satisfy the admissibility constraint $|u_s(z)|\le 1$. \begin{definition} Let $z=(q,p)$ be a singular extremal of order $2$ and $M=H_F=h$ the constant value of the Hamiltonian. The extremal is called {\it exceptional} if $h=0$. If $h>0$, the extremal is called {\it hyperbolic} (resp. {\it elliptic}) if $\{\{H_G,H_F\},H_G\}>0$ (resp. $<0$). \label{def:class-sing} \end{definition} \subsubsection{The case of chemical networks} Recall that for our network $\dot c = f(c,v),\ v=k_i$ and it is extended into ${\dot q = F(q) + u\, G(q)}$ with $F=f(c,v)\frac{\partial}{\partial c}$ and $G=\frac{\partial}{\partial v}$. Denote $\tilde H = p_c\cdot f(c,v)$ and $H=p\cdot (F+u\, G)$ the respective Hamiltonian lifts, with $p=(p_c,p_v)$. One has the following relation between the corresponding singular extremals. \begin{lemma} The pair $(q,p)$ is solution of \[ \dot q = \frac{\partial H}{\partial p},\ \dot p = -\frac{\partial H}{\partial q},\ \frac{\partial H}{\partial u}=0 \] if and only if $p_v=0$ and $(c,p_c,p_v)$ is solution of \[ \dot{c}=\frac{\partial \tilde{H}}{\partial p_c}, \; \dot{p}_c=\frac{\partial \tilde{H}}{\partial \tilde{c}}, \; \frac{\partial \tilde{H}}{\partial v}=0, \] and moreover the following relations are satisfied \begin{equation} \frac{\mathrm{d}}{\mathrm{d} t}\frac{\partial H}{\partial u}=\{H_G,H_F \}=-\frac{\partial \tilde{H}}{\partial v} \label{eq:H_tilde_v} \end{equation} \begin{equation} \frac{\partial }{\partial u}\frac{\mathrm{d}^2}{\mathrm{d} t^2}\frac{\partial H}{\partial u}=\{ \{H_G,H_F \}, H_G \}=-\frac{\partial^2 \tilde{H}}{\partial v^2}. \label{eq:H_tilde_v2} \end{equation} \end{lemma} In particular this gives the correspondence between both singular Hamiltonian and the respective Legendre--Clebsch and generalized Legendre--Clebsch conditions. \subsubsection{The case $n=3$} We have $q=(x,y,v)$ and introduce the following determinants: \begin{align*} &D=\det(G,[G,F],[[G,F],G]), \\ & D'=\det(G,[G,F],[[G,F],F]), \\ &D''=\det(G,[G,F],F). \end{align*} Using $p\cdot G = p\cdot [G,F]= p\cdot \left(\left[\left[ G,F \right],F\right] + u \, \left[\left[ G,F \right],G\right]\right)=0$ and eliminating $p$ leads to the following. \begin{proposition} If $n=3$, the singular control is given by the feedback ${u_s(q)=-D'(q)/D(q)}$ and singular trajectories are defined by the vector field $X_s(q) = F(q) - \frac{D'(q)}{D(q)}\, G(q)$. Singular trajectories are hyperbolic if $DD''>0$, elliptic if $DD''<0$ and exceptional if $D''=0$. \end{proposition} \noindent {\bf Optimality status: the case $\bm{n=3}$.} We use \cite{bb1993} to describe the optimality status of singular trajectories. The system is $\dot q = F+u\, G$ and we relax the bound $|u|\le 1$, assuming $u\in \mathbb{R}$ so that singular arcs are admissible. We assume the following: \begin{description} \item[($H_0$)] $F,G$ are linearly independent, \item[($H_1$)] $G,[G,F]$ are linearly independent. \end{description} One picks a smooth singular arc $z(\cdot) = (q(\cdot),p(\cdot))$ defined on $[0,t_f]$ so that $p$ is unique up to a non zero multiplicative scalar and $q(\cdot)$ is a one-to-one immersion. We have: \begin{proposition} \label{prop:classification-singular} There exists a $C^0$--neighborhood $U$ of the reference singular arc ${t\mapsto q(t),\ t\in [0,t_f]}$ so that $q(\cdot)$ is time minimal (resp. maximal) if $q(\cdot)$ is hyperbolic (resp. elliptic) up to the first conjugate time $t_{1c}$ with respect to all trajectories with the same extremities contained in ${\cal U}$. In the exceptional case, the reference singular arc is time minimal (and time maximal). \end{proposition} \noindent {\bf Algorithm to compute the first conjugate point in the hyperbolic--elliptic case.} Let $V(t),\ t\in[0,t_f]$ be the solution of the {\it (variational) Jacobi equation}: \[ \dot{\delta q}(t) = \frac{\partial X}{\partial q}(z(t))\, \delta q(t) \] with initial condition $V(0)=G(q(0))$, where $t\rightarrow q(t)$ is the reference singular arc. The first conjugate point $t_{1c}$ is the first $t>0$ such that $V(t)$ is collinear to $G(q(t))$. See \cite[p. 123]{bonnard2003} for a proof and the geometric interpretation. \subsection{Small time classification of regular extremals} \label{sec:class-extremals} In this section, we recall the seminal results coming from singularity theory due to \cite{ekeland1977,kupka1987} to analyze the small time extremal curves near the switching surface. \begin{definition} We denote by $\sigma_+$ (resp. $\sigma_-$) a bang arc with constant control $u=1$ (resp. $u=-1$) and $\sigma_s$ an admissible singular arc. We denote by $\sigma_1 \sigma_2$ an arc $\sigma_1$ followed by $\sigma_2$. The surface $\Sigma: H_G(z)=0$ is called the switching surface and let $\Sigma'\subset \Sigma$ given by $H_G(z)=\{H_G,H_F\}(z)=0$. Let $z(\cdot)=(q(\cdot),p(\cdot))$ be a reference curve on $[0,t_f]$. We note $t\mapsto \Phi(t)\coloneqq H_G(z(t))$ the switching function, which codes the switching times. \end{definition} Deriving twice with respect to time the switching function, one gets \begin{equation} \dot{\Phi}(t)=\{H_G,H_F\}(z(t))\,, \label{eq:Phi_dot} \end{equation} \begin{equation} \ddot{\Phi}(t)=\{\{H_G,H_F\},H_F\}(z(t))+u(t)\, \{\{H_G,H_F\},H_G\}(z(t)). \label{eq:Phi_ddot} \end{equation} From this, we derive. \begin{lemma} \label{lem:classification-ordinary} Assume that $t$ is an ordinary switching time, that is $\Phi(t)=0$ and ${\dot \Phi(t)\neq 0}$. Then near $z(t)$ every extremal projects onto $\sigma_+\sigma_-$ if $\dot \Phi(t)<0$ and $\sigma_-\sigma_+$ if $\dot \Phi(t)>0$. \end{lemma} The situation is more complex for higher contact with $\Sigma$. \begin{definition} \label{def:fold_case} The fold case is characterized by $\Phi(t)=\dot \Phi(t)=0$ and $\ddot \Phi(t)\neq 0$ (replacing $u$ by $\pm 1$ in \eqref{eq:Phi_ddot}). Hence $z(t)\in \Sigma'$. Assume that locally $\Sigma'$ is a regular surface of codimension two. We have three cases: \begin{itemize} \item {\it Parabolic case:} $\ddot{\Phi}_{+}(t) \ddot{\Phi}_{-}(t) > 0$. \item {\it Hyperbolic case:} $\ddot{\Phi}_{+}(t)>0$ and $\ddot{\Phi}_{-}(t) < 0$. \item {\it Elliptic case:} $\ddot{\Phi}_{+}(t)<0$ and $\ddot{\Phi}_{-}(t) > 0$. \end{itemize} \end{definition} Denote by $u_s(\cdot)$ the singular control defined by \eqref{eq:Phi_ddot} as $\ddot \Phi(t)=0$. In the hyperbolic case, through $z(t)$, assuming $\left\{ \left\{ H_G,H_F \right\},H_G \right\}(z(t))\neq 0$, there exists a singular arc, which is strictly admissible that is $|u_s(t)|<1$. This arc is hyperbolic if $\left\{ \left\{ H_G,H_F \right\},H_G \right\}(z(t))>0$ (strict Legendre--Clebsch condition) and elliptic if this quantity is $<0$. In the parabolic case, it can be absent or not admissible that is $|u_s(t)|>1$. One has from \cite{kupka1987}, \begin{figure} \centering \def0.47\textwidth{0.44\textwidth} \input{fold_case_elliptic.pdf_tex} \caption{Fold case in the elliptic 2D--situation and the antiturnpike phenomenon.} \label{fig:Fold_case_turnpike} \end{figure} \subsection{Global case} It is based on \cite{bb1993} and presented here for $n=3$. It uses proposition \ref{prop:classification-singular}. Under our assumptions $(H_0)-(H_1)$, and if moreover the singular control is {\it strictly admissible} on $[0,t_f]$, that is $|u_s(t)|<1$, the reference singular arc can be immersed in a $C^0$--domain {\it up to the first conjugate time} $t_{1c}$ and where the time minimal policy is of the form $\sigma_\pm \sigma_s \sigma_\pm$, see Fig. \ref{fig:global-case} for the interpretation of the first conjugate time $t_{1c}$ for the problem in the $q$--space with $q=(c,v)$, $\dot v = u$. \begin{figure} \centering \def0.47\textwidth{0.42\textwidth} \input{global_case.pdf_tex} \def0.47\textwidth{0.42\textwidth} \input{conj-c-space.pdf_tex} \caption{ {\it(left)} Time minimal policy in the $q$--space. {\it (right)} Conjugate point in the $c$--space.} \label{fig:global-case} \end{figure} \subsection{The curse of the non strict Legendre--Clebsch condition} More complicated and challenging situation is to analyze situations, where the strict Legendre--Clebsch condition is not satisfied that is $\left\{ \left\{ H_G,H_F \right\},H_G \right\}(z(t))$ vanishes at some times. Due to the complexity and in relation with our application, we shall assume that $n=3$. In this case, one has $D=0$ since $\left\{ \left\{ H_G,H_F \right\},H_G \right\} = p \cdot \left[ \left[ G,F \right],G \right]$ and recall that $D=\det(G,[G,F],\left[ \left[ G,F \right],G \right])$. The singular flow is defined by the vector field $X_s(q)=F(q) - \frac{D'(q)}{D(q)}\, G(q)$. Using a time reparameterization, it is related to the one--dimensional foliation ${\cal F}_s: D(q)F(q)-D'(q)G(q)$. Complexity of the analysis is due to {\it non isolated singularities} contained in the set $D'(q)=D(q)=0$. In relation with our optimal problem with terminal manifold $N$ of codimension one given by $x=d$, our singularity resolution will be concerned by analyzing arcs initiating from the set ${\cal S}:n \cdot \left[ G,F \right](q)=0$, where $n=(1,0,0)$ is the normal vector to $N$. Singularities can be roughly classified into two types: local in relation with singularities of ${\cal S}$ and propagated along the singular flow, and Lagrangian singularities in relation with the concept of conjugate--focal points. This will be developed in the next section. \section{Geometric techniques to analyze the 2d--McKeithan Network} \label{sec4} \subsection{Time minimal syntheses near the terminal manifold} \subsubsection{Notations and definitions} The system is written $\dot q = F(q) + u\, G(q)$, $|u|\le 1$, with $q=(c,v)$, $G=\frac{\partial}{\partial v}$. The terminal manifold $N$ is given by $c_1=d$. The problem is to determine {\it small time} synthesis near a given point $q_0\in N$, which can be identified to $0$. More precisely one wants to classify the syntheses under generic assumptions near the terminal manifold in relation with the Lie algebraic structure of $\left\{ F,G \right\}$ at $q_0$. Our approach developed in our series of articles \cite{bonnard1995,bonnard1997,bonnard1998,launay1997} is to use the construction of {\it semi--normal form} for the action of the pseudo--group ${\cal G}$ of local diffeomorphisms and feedback transformation $u\rightarrow-u$ (so that $\sigma_+$ and $\sigma_-$ can be exchanged). Additionally recall that the pseudo--group ${\cal G}_f$ formed by local diffeomorphims and feedback actions of the form $u=\alpha(q) + \beta(q)v$ leaves the singular flow invariant \cite{bb1991}. These groups act on the jet space of $F$ at zero, $G$ being identified to $\frac{\partial}{\partial v}$ and the terminal manifold $N$ to $c_1=d$. Note that the problem is {\it flat} that is $G$ is tangent to $N$. For the action of the pseudo--group $G$ on the jet spaces of $F$ we refer to \cite{martinet1980} (we shall work in the $C^k$ category, where $k\ge 1$ is not precised) and the semi--normal form is related to a semi--algebraic stratification on the jet spaces of $(F,G,N)$. One has $N: c_1=d$ and the initial state is such that $c_1(0)<d$. Denote in general $N^\perp = \{(q,p); \ p\cdot v=0, \forall v \in T_qN\}$ and let $n$ be the outward normal to $N$ so that $n=(1,0,\ldots,0)$ and $N^\perp = (q,n(q))$. Let $z=(q,p)$ be a BC--extremal on $[t_f,0]$, $t_f<0$ and $z(0)\in N^\perp$ (this convention is used since we integrate {\it backwards} from the terminal manifold). The set of minimizing switching points can be stratified into stratum of {\it first kind} if the optimal curves are tangent and {\it second kind} if they are transverse. The {\it splitting locus} $L$ is the set of points, where the optimal control is not unique and the {\it cut locus} $C$ is the closure of the set of points, where the optimal trajectories loses its optimality, see \cite{boltyanskii1966,brunovsky1980} for the introduction of those concepts in the frame of semi--analytic geometry. We introduce the following triplet $(F,G,N)$ in the $C^\omega$--category, with $N=\{f(q)=0\}$, where $f$ is a (local) submersion. Fixing $q_0\in \mathbb{R}^n$, we denote by $j_kF(q_0),j_kG(q_0),j_kf(q_0)$ the respective $k$--jets, that is the Taylor expansions at order $k$. We say that $(F,G,f)$ has at $q_0$ a singularity of {\it codimension} $i$ if $(j_kF(q_0),j_kG(q_0),j_kf(q_0)) \in \Sigma_i$, where $\Sigma_i$ is a semi--algebraic submanifold of codimension $i$ in the jets space. Taking $q_0\in N$ with a singularity of codimension $i$, an {\it unfolding} is a $C^0$ change of coordinates near $q_0$ such that small time minimal synthesis is described by a system $\dot {\tilde q} = F(\tilde q, \lambda) + u\, G(\tilde q,\lambda)$, $|u|\le 1$, $\tilde q\in \mathbb{R}^{n-m}$ and $\lambda$ is a (vector) parameter. \subsubsection{Local syntheses: general tools and classification} We shall present the main steps to compute the time minimal syntheses, restricting our study to the $3$-dimensional case, but it can be clearly extended to the $n$--space with the concept of codimension \cite{launay1997}. The system is written: $\dot q = F(q) + u\, G(q)$, $|u|\le 1$ and let $q=(x,y,z)$ be the coordinates, $G$ being identified to $\frac{\partial}{\partial z}$ and $G$ being tangent to $N$, which can be identified to $x=0$ and $n=(1,0,0)$ is the outward normal to $N$. Recall that (generic) singular trajectories are given by $\dot q = F(q) + u_s(q) G(q)$, $u_s(q)=-D'(q)/D(q)$ and they can be classified into: hyperbolic, elliptic, exceptional, see section \ref{sec3}. The first step is to stratify the terminal manifold into: \begin{itemize} \item ${\cal S}:$ {\it singular locus} defined by $\{q\in N,\ n\cdot [G,F](q)=0\}$, \item ${\cal E}:$ {\it exceptional locus} defined by $\{q\in N,\ n\cdot F(q)=0\}$. \end{itemize} Note that since the problem is flat, $n\cdot G(q)=0$ if $q\in N$ so that $N^\perp \subset \Sigma$, where $\Sigma$ is the switching surface. \noindent {\bf Generic case.} The first case is when $F(q_0)$ and $\left[ G,F \right](q_0)$ are independent and not tangent to $N$ and the synthesis follows from Lemma \ref{lem:classification-ordinary}. It is given by $\sigma_+$ if $n\cdot \left[ G,F \right](q_0)<0$ and $\sigma_-$ if $n\cdot [G,F](q_0)>0$ since the final point is a {\it virtual} switching point. \noindent {\bf Generic hyperbolic singular case and the concept of focal points.} Now we present the basis of our analysis, the so--called hyperbolic situation. In this case, based on \cite{bonnard1997}, a semi--algebraic normal form is constructed to obtain the corresponding local syntheses and it is extended (in the jet space) {\it along the reference singular arc} in order to obtain the concept of {\it focal point} based on the notions of turnpike and conjugate points presented in Section \ref{sec3}. \noindent {\it Semi--normal form:} one has $q_0=0$ and we make the following assumptions: \begin{itemize} \item The tangent space to $N$ is $G(0)$, $\left[ G,F \right](0)$. \item The set of points $\delta$, where $\left[ G,F \right]$ is tangent to $N$ is a simple curve passing through $0$ and transverse to $G$. \item $D(0)$ and $D''(0)$ are non zero. \end{itemize} With those assumptions, through $0$, there exists a simple BC--singular extremal $\sigma_s$ transverse to $N$. One can choose local coordinates so that $G$ is identified to $\frac{\partial}{\partial z}$, $\delta$ to the axis $(Oy)$ can be identified to $t\mapsto (t,0,0)$, whose image is the $(Ox)$--axis. Note that $N$ is identified to $x=0$. The semi--normal form is constructed in a tubular neighborhood of the reference singular curve $\sigma_s$ and the vector field $F$ is developed in the jet space with respect to $(y,z)$ since $\sigma_s:t\mapsto (t,0,0)$ is the x--coordinate. One has the following semi-normal form \begin{align*} &\dot{x}=1+a(x) z^2+2 b(x) y z +c(x) y^2+R_1 \\ &\dot{y}=d(x) y+ e(0) z+ R_2 \\ &\dot{z}=(u-{u_s}_{\mid\sigma}(x))+ f(x) y+ g(0) z + R_3, \end{align*} where $a(x)\neq 0, \; e(0) \neq 0$ and $R_1$ (resp. $R_2, \; R_3$) are terms of order $\geq 3$ (resp. $\geq 2$) in $(y,z)$ and $u_s$ is the singular control. Furthermore we make the following assumption: \begin{itemize} \item The reference arc is {\it hyperbolic} on $[t_f,0]$ so that $a(x)<0$. \end{itemize} According to \cite{bonnard1997} the time minimal synthesis near $q_0$ is of the form $\sigma_+ \sigma_s \sigma_-$, see Fig.\ref{fig:synthesis-bb} and is described by the unfolding \begin{align*} &\dot x = 1 - a(0)\, z^2 \\ &\dot z = u - u_s(0) \\ &\dot y = 0 \end{align*} in a small neighborhood of $q_0=0$. \begin{figure} \centering \def0.47\textwidth{0.3\textwidth} \input{synthesis-bb.pdf_tex} \caption{} \label{fig:synthesis-bb} \end{figure} \paragraph*{Local syntheses and the semi-bridge phenomenon.} We use \cite{bonnard1997} and the \texttt{Mathematica}'s program given in Appendix \ref{prog:strata}. One fixes a point $q_0 \in {\cal S}$ and we make the explicit computations of the switching and cut loci near $q_0$ using the jet expansion of $F$ at $q_0$, $G$ and $N$ being normalized respectively to $\frac{\partial}{\partial v}$ and $x=0$. The computations are in the semi-algebraic category, easily implementable using symbolic algorithms and the cut locus and switching loci are stratifiable. {\it Switching locus.} We denote by $K$ the set of ordinary switching points for BC-extremals, $K_+$ being a switching $\sigma_- \sigma_+$ and $K_-$ being a switching $\sigma_+ \sigma_-$, while $W,W_+,W_-$ corresponds respectively to switching points of optimal extremals. More precisely, near $N$ the stratification of $W$ is $W=W_1 \cup W_2$ where $W_1$ is the first kind stratum composed by the hyperbolic singular arcs and $W_2=W_s\cup W_+ \cup W_-$ is the second kind strata, where $W_\varepsilon,\ \varepsilon\in \{-1,1\}$ is composed by the ordinary switching points of the policy $\sigma_{-\varepsilon} \sigma_\varepsilon$ and $W_s$ is the first switching point of the Bang-Bang-Singular's policy. From \cite{Agrachev1998} we have two situations describe by Fig.\ref{fig:crossing-k}. \begin{figure}[ht] \centering \def0.47\textwidth{0.25\textwidth} \input{ka.pdf_tex} \hspace{1cm} \def0.47\textwidth{0.25\textwidth} \input{kb.pdf_tex} \caption{ {\it (left)} Crossing. {\it (right)} Reflecting. \label{fig:crossing-k}} \end{figure} The reflecting case corresponds to a non optimal situation and has to be rejected to determine $W$. Using the theory and computations of \cite{bonnard1997} only the stratification of $W$ localized near $q_0$ can be computed. {\it Singular locus.} Near $q_0$, one determines the singular locus $\Gamma_s$ restricting to admissible singular trajectories, which are optimal. In other words, the test is : hyperbolicity and strict admissibility $|u_s|<1$. {\it Cut locus.} The cut locus $C$ is the set of points where optimality is lost. One part of the cut locus is formed by the splitting locus $L$, where two minimizers intersects. It can be stratified into strata corresponding between intersections $\sigma_+$, $\sigma_-$ intersections between $\sigma_+ \sigma_-$ and $\sigma_-$ \dots Again such intersections are described in \cite{bonnard1997}. \paragraph*{The local syntheses.} It is based on the classification of section \ref{sec:class-extremals}. {\bf Generic case.} Since $G$ is tangent to $N$, every final point is a virtual switching point. Denoting $\Phi(t)$ the switching function on $[t_f,0]$, with $\Phi(0)=n\cdot G(q_0)$ one has: if $\dot \Phi(0)\coloneqq n\cdot[G,F](q_0)<0$ (resp. $>0$) the terminating arc is $\sigma_-$ (resp. $\sigma_+$). {\bf Codimension one case.} We have different cases corresponding to the fold case, since in the parabolic case one must distinguish between a parabolic point corresponding either to a non admissible hyperbolic or elliptic arc. The cases are represented on Fig.\ref{fig:hyperbolic_case}-\ref{fig:parabolic_point}. \begin{figure}[ht] \begin{minipage}{0.49\textwidth} \centering \def0.47\textwidth{0.5\textwidth} \input{hyperbolic.pdf_tex} \\ Hyperbolic \end{minipage} \begin{minipage}{0.49\textwidth} \centering \def0.47\textwidth{0.37\textwidth} \input{parabolic_elliptic.pdf_tex} \\ \quad Elliptic \end{minipage} \caption{Fold case. \label{fig:hyperbolic_case}} \end{figure} \begin{figure}[ht] \centering \begin{minipage}{0.49\textwidth} \centering \def0.47\textwidth{0.35\textwidth} \input{parabolic_elliptic.pdf_tex} \hspace{0.5cm} \def0.47\textwidth{0.35\textwidth} \input{parabolic_elliptic-b.pdf_tex} \\ Non admissible elliptic case \end{minipage} \begin{minipage}{0.49\textwidth} \centering \def0.47\textwidth{0.35\textwidth} \input{parabolic_hyperbolic.pdf_tex} \\ Non admissible hyperbolic case \end{minipage} \caption{Parabolic point with a non admissible singular arc. \label{fig:parabolic_point}} \end{figure} The syntheses can be represented by foliations by 2d-planes. Note that the role of $\sigma_+$ and $\sigma_-$ can be interchanged since the semi-normal forms are computed using the transformation $u\mapsto -u$. The ${\cal C}^0$-unfoldings are: \begin{itemize} \item Hyperbolic and Parabolic: \begin{align*} &\dot x = 1 + a\, y^2 \\ &\dot y = u - u_s(0), \qquad |u_s(0)|<1, \end{align*} and $a<0$ (hyperbolic) or $a>0$ (elliptic). \item Parabolic: \begin{align*} &\dot x = 1 + a\, y^2 \\ &\dot y = u - u_s(0), \qquad |u_s(0)|>1, \end{align*} and $a\neq 0$. \end{itemize} \paragraph*{Focal points.} The synthesis in the hyperbolic case can be extended to a tubular neighborhood of $\sigma_s$ for $t\in [t_f,0]$ introducing the concept of focal point as follows. By assumptions, $W\coloneqq \delta'(0)$ belongs to $\mathrm{span} \{G(0),[G,F](0)\}$. Let $\lambda_1, \lambda_2$ be two scalars such that $W=\lambda_1 G(0) + \lambda_2 [F,G](0)$ and by assumption $\lambda_1\neq 0$. Denoting by $X_s(q)\coloneqq F(q) - \frac{D'(q)}{D(q)} G(q)$, we introduce the variational equation \[ \dot{\delta q}(t) = \frac{\partial X_s}{\partial q}(\sigma_s(t))\, \delta q(t) \] and let $W(\cdot)$ be a solution on $[t_f,0]$ such that $W(0)=W$. \begin{definition} Let $t_{1f}$ be the first time in $[t_f,0]$ such that: ${\det(W(t),G(\sigma_s(t)),F(\sigma_s(t)))=0}$. Then $t_{1f}$ is called the first focal point along $\sigma_s$. \end{definition} As for the fixed end point problem we have the following: \begin{proposition} Provided $t\in ]t_{1f},0]$, then in a tubular neighborhood of $\sigma_s$ the set $S=\{\exp(t X_s(\sigma))\}$ is a smooth surface and the synthesis is given by Fig.\ref{fig:synthesis-bb}. \end{proposition} \noindent {\it Algorithm:} Besides the definition, which leads to compute focal point using a singular value decomposition, an equivalent computation is to determine $t=t_{1f}$ such that $W(t)$ becomes collinear to $G(\sigma_s(t))$. {\bf Two codimension-two cases.} The situation is more intricate. It is analyzed using the semi-normal form constructed in \cite{bonnard1997}. A model is \begin{equation} \begin{aligned} &\dot x = 1 + a\, z^2+\alpha_1\, x y^2+\alpha_2\, y z^2+\alpha_3\, x z^2 \\ &\dot y = b\, z \\ &\dot z = c\, z-u_s(0)-u_{sx}\, x-u_{sy}\, y, \end{aligned} \label{eq:semi-nf} \end{equation} where $u_s$ is the singular control, $u_s(0) \in \{1,3\}$, $u_{sx}=\frac{\partial u_s}{\partial x}(0)$, $u_{sy}=\frac{\partial u_s}{\partial y}(0)>0$ and $a,b,c\neq 0$. The switching function $\Phi(t)\coloneqq p_3(t)$ is developed at order $3$ and factorized as $tP(t)$, where $P$ is polynomial of order two with two roots $t_1,t_2$, which determine the switching points. If $a>0$, we are in the elliptic situation and if $a<0$ in the hyperbolic situation and the reference singular arc is identified to $\sigma_s:t\mapsto (t,0,0)$ being not admissible. One has $|u_s(0)|>1$ and we can assume $u_s(0)>1$. Figures presented in this section are obtained with the \texttt{Mathematica}'s program of Appendix \ref{prog:strata}, we use the following values: $\alpha_1=\alpha_2=\alpha_3=u_{sy}=c=b=1$.\\ {\bf The case $\bm{a>0}$ and $\bm{u_s(0)=3}$.} We have the following three situations \begin{figure}[H] \centering \begin{tabular}{ccc} \def0.47\textwidth{0.25\textwidth} \input{parabolic_elliptic.pdf_tex} & \def0.47\textwidth{0.3\textwidth} \input{cut-decolle.pdf_tex} \hspace*{0.2cm} & \def0.47\textwidth{0.25\textwidth} \input{parabolic_elliptic-b.pdf_tex} \end{tabular} \caption{\label{fig:par-ell} Bifurcation of the cut $(a>0,\, u_s(0)=3)$. The cut locus $C$ splits into $C_1\cup C_{12}$ where $C_1: \sigma_-\cap\sigma_+$ and $C_{12}: \sigma_+\sigma_-\cap \sigma_-$.} \end{figure} Note that the cut appears when the trajectories reflect on the switching surface, see Fig.\ref{fig:cut-elliptic}. \begin{figure}[H] \centering \begin{tabular}{c} \includegraphics[scale=0.7]{6p2p8_y_neg.pdf} \\ $y<0$ \end{tabular} \caption{ A situation in the elliptic parabolic case. The trajectories of $\Gamma_-$ reflect on $W_-$ leading to a cut locus between $W_-$ and $W_+$.\label{fig:cut-elliptic}} \end{figure} {\bf The case $\bm{a<0}$ and $\bm{u_s(0)=1}$.} There are two generic cases described by Fig.\ref{fig:saturation_case1}-\ref{fig:saturation_case2}. The two cases are discriminated by the existence or not of the singular arc in the transition. In the second case, the switching locus $\Sigma$ has two strata : $\Sigma = W_+ \cup W_s$, where $W_+$ corresponds to optimal policies $\sigma_-\sigma_+$ and $W_s$ to policies $\sigma_-\sigma_+\sigma_s$, $\Sigma$ is not $C^1$. The stratum $W_s\cup \Gamma_s$ is $C^1$ but not $C^2$. \begin{figure} \includegraphics[scale=0.47]{case1-a.pdf} \includegraphics[scale=0.47]{case1-b.pdf} \vspace*{0.5cm} \centering \begin{tabular}{ccc} \def0.47\textwidth{0.16\textwidth} \input{saturate-a.pdf_tex} \hspace{0.2cm} & \def0.47\textwidth{0.29\textwidth} \input{saturate-b.pdf_tex} \hspace{0.2cm} & \def0.47\textwidth{0.33\textwidth} \input{saturate-c.pdf_tex} \\ $y<0$ & $y=0$ & $y>0$ \end{tabular} \caption{Saturating case 1: $-1=a<0$, $1=u_{sx}>0$. Top figures are obtained using the \texttt{Mathematica}'s program given in the Appendix \ref{prog:strata} and these situations are sketched in the bottom figures. \label{fig:saturation_case1}} \end{figure} \begin{figure} \centering \includegraphics[scale=0.55]{6p2p7.pdf} \vspace*{0.5cm} \begin{tabular}{ccc} \def0.47\textwidth{0.3\textwidth} \input{saturate-d.pdf_tex} \hspace{0.1cm} & \def0.47\textwidth{0.26\textwidth} \input{saturate-e.pdf_tex}\hspace{0.4cm} & \def0.47\textwidth{0.26\textwidth} \input{saturate-f.pdf_tex} \end{tabular} \caption{Saturating case 2: $-1=a<0$, $1=u_{sx}<0$. Top figure is obtained using the \texttt{Mathematica}'s program given in the Appendix \ref{prog:strata} and the corresponding situations are sketched in the bottom figures. \label{fig:saturation_case2}} \end{figure} \subsubsection{Beyond the strict generalized Legendre--Clebsch condition} In our previous work in the 90's we restricted our study to the case, where the strict generalized Legendre--Clebsch condition is satisfied, see \cite{bonnard1997}. Now our program is to extend this analysis when this condition is not satisfied. \paragraph*{The semi--bridge phenomenon as transition between two saturations} A bridge in optimal control was introduced in \cite{cots2018} as a policy of the form Bang-Singular-Bang-Singular, where the second bang is related as a saturation due to the violation of the strict Legendre-Clebsch condition. In our context a semi--bridge is interpreted as a path to a bridge due to saturation between optimal singular arcs. {\bf A tutorial model for the semi--bridge.} Consider the case \begin{equation} \begin{aligned} &\dot x = 1 + a\, y -3c\,yz +c\, z^3 \\ &\dot y = z \\ &\dot z = u, \qquad |u|\le 1, \end{aligned} \label{eq:normal-form} \end{equation} where $a,c\neq 0$ are parameters. {\it Lie brackets computations.} We have \[\begin{array}{ll} F = (1+ay-3cyz+cz^3)\frac{\partial}{\partial x} + z \frac{\partial}{\partial y}, & G = \frac{\partial}{\partial z}, \\ \left[G,F\right] = 3 c (y-z^2) \frac{\partial}{\partial x} - \frac{\partial}{\partial y}, & [[G,F],G] = -6 c z \frac{\partial}{\partial x}, \\ \left[[G,F],F\right] = a\frac{\partial}{\partial x}, & D(q) = \det(G,[G,F],[[G,F],G])= -6 c z, \\ D'(q)=\det(G,[G,F],[[G,F],F])= a, & D''(q) = \det(G,[G,F],F)= a y-2 c z^3+1. \end{array} \] {\it Stratification of $N$.}\\ We have the following properties \begin{itemize} \item $N:x=0$, $G=\frac{\partial}{\partial z}$ \item ${\cal S}: n \cdot [G,F] = 0 \cap \{x=0\}$ is the parabola: $y=z^2$. \item $n \cdot \left[ \left[ G,F \right],G \right](0) =0$, $n \cdot \left[ \left[ G,F \right],F \right](0) \neq 0$. \end{itemize} Observe that ${\cal E}: n \cdot F(q)=0$ is the defined by $y(a-3c z) + cz^3 +1 = 0$. One will localize our study in a neighborhood $V$ of $0$ such that: ${\cal E} \cap V=\emptyset$. We represent such a situation on Fig.\ref{fig:normal-form} \begin{figure} \centering \includegraphics[scale=0.37]{forme-normale.pdf} \caption{Stratification of $N$ for the system \eqref{eq:normal-form} ($a=c=1$). Green dotted line: elliptic, red line: hyperbolic, crosses: saturating values of the singular control.\label{fig:normal-form}} \end{figure} One has $u_s = a/(6cz)$ and the points $u_{sat}$ are given by $|u_s|=1$. We have two saturating points, one in the hyperbolic domain and one in the elliptic domain. Near the fold, the two saturation phenomenons are glued together using the curvature of ${\cal S}$, the normal to $N$ being given by $n=(1,0,0)$, while $q_0$ follows ${\cal S}$. Note that since the control is blowing up at the fold, we encounter the case $a>0, u_s(0)=3$ (see Fig.\ref{fig:par-ell}) and the bifurcation phenomenon of $C$, which splits into the case $\sigma_+$, $\sigma_-$ and the case $\sigma_+\sigma_-$ and $\sigma_-$ intersecting minimizers. The two strata will be denoted $C_{12}$ and $C_1$. The model detects the two strata. The stratification of the terminal manifold near the semi--bridge and the local time minimal synthesis are described in Fig.\ref{fig:zoom}. \begin{figure}[H] \centering \def0.47\textwidth{0.7\textwidth} \input{zoom.pdf_tex} \caption{Stratification of the target $x=0$ for a semi--bridge model and the associated local syntheses.} \label{fig:zoom} \end{figure} {\bf Local syntheses by symbolic computations.} We use the \texttt{Mathematica}'s program in Appendix \ref{prog:strata} to derive the local syntheses for the semi--bridge model. We compute the time minimal synthesis in a neighborhood $U$ of $q_0\in N$ where $N:x=0$ is the target. Since the problem is flat, $q_0$ is either an ordinary switching point, a fold point, or a codimension two case. Denote $n$ the unit normal of $N$ at $q_0$ such that $n$ belongs to the half-space containing the set $\{X+u\, Y,\ |u|\le 1\}$, i.e. $n=(1,0,0)$. Assume $X(q_0)$ and $[Y,X](q_0)$ are not tangent to $N$. Then $q_0$ is an ordinary point and the optimal control is given by $u(q_0)=-\text{sign} \ p\cdot [Y,X](q_0)$. We take $q_0 = (0,s_0^2,s_0)$ and we look at the behavior of BC-extremals reaching $N$ near $q_0$. The switching surface $W$, the splitting locus $C$ and the trajectories $\sigma_\pm$ are computed via symbolic computations, expanding the jets of $F$ and $G$ up to some order. \begin{itemize} \item \underline{Near a parabolic point on an hyperbolic singular arc.}\\ BC-extremals $\sigma_-$ switch while BC-extremals $\sigma_+$ don't. These computations are represented in Fig. \ref{fig:nf-near-hyperbolic} for $q_0=(0,(-0.05)^2,-0.05)$. \item \underline{Near a parabolic point on an elliptic singular arc.}\\ BC-extremals $\sigma_\pm$ reflect on the switching surface $W_\pm$, hence a cut locus appears between the switching surfaces. We represent in Fig. \ref{fig:nf-near-elliptic} with $q_0=(0,0.04^2,0.04),\, 0.04>z_{sat}=a/(6c)$ this cut locus and the switching surface $W_-$, together with the elliptic singular surface $\Gamma_s$. \item \underline{Near a saturated point on an hyperbolic singular arc.}\\ We have $q_0=(0,z_{sat}^2,-z_{sat})$ where $z_{sat}=\frac{a}{6c}$. The synthesis is represented in Fig.\ref{fig:nf-hyp-sat} and it corresponds to the synthesis described earlier by Fig.\ref{fig:saturation_case1}. \end{itemize} \begin{figure}[H] \centering \includegraphics[scale=0.6]{nf-near-hyperbolic.pdf} \caption{Time minimal synthesis near an hyperbolic fold point for $q_0=(0,(-0.05)^2,-0.05)$. Only the BC-extremals with optimal control $-1$ switch for the tutorial model \eqref{eq:normal-form} with $a=c=1$. The tangent space of the switching surface at $q_0$ is represented. \label{fig:nf-near-hyperbolic} } \end{figure} \begin{figure} \centering \includegraphics[height=5.2cm]{nf-near-elliptic.pdf} \caption{Time minimal synthesis near an elliptic fold point for $q_0=(0,0.04^2,0.04)$ for the tutorial model \eqref{eq:normal-form} with $a=1,\,c=5$. \label{fig:nf-near-elliptic} } \end{figure} \begin{figure} \centering \includegraphics[height=5.2cm]{nf-saturation-hyperbolic.pdf} \caption{Time minimal synthesis near a saturating hyperbolic fold point $q_0=(0,z_{sat}^2,-z_{sat})$ for the tutorial model \eqref{eq:normal-form} with $a=c=1$. Trajectories $\sigma_-$ switch, while $\sigma_+$ don't. The surface $W_s$ is the first switching point of the sequence $\sigma_+\sigma_-\sigma_s$. \label{fig:nf-hyp-sat} } \end{figure} {\it These computations confirm the expected results and validate the symbolic program to investigate the McKeithan model.} \begin{remark} We can investigate other singularities by the same method, for instance: \begin{itemize} \item Cusp singularity $y=z^3$. \item Singularity $y^2=z^2$. \item Case $D=D'=0$ is $q=\{0\}$. \end{itemize} \end{remark} {\bf Global analysis.} Take $u=\varepsilon\in \{-1,1\}$. The dynamics \eqref{eq:normal-form} is integrable and we have \[ p_3(t) = \frac{1}{2} t \left(-2 c t^2+ (a -6 c \varepsilon s_0) t-6 c s_0^2+6 c w_0\right). \] Denoting by $\Gamma_\varepsilon(q_0),\ \varepsilon\in\{-1,1\}$ the surface composed by the trajectories $\sigma_\varepsilon$ passing through $q_0$, then $\Gamma_\varepsilon(0,w_0,s_0)$ is parameterized by \begin{equation*} \begin{aligned} x = & t \left( (a -3cs_0) + c s_0^3+1\right) + \frac{1}{2} t^2 \left(s_0 (a-3 c s_0)+3 c\varepsilon (s_0^2- w_0)\right) + o(t^3) \\ y = &w_0 + s_0 t+\frac{\varepsilon t^2}{2}+ o(t^3) \\ z = &s_0+ \varepsilon t + o(t^3). \end{aligned} \label{eq:nf-gamma} \end{equation*} Solving $p_3=0$ with respect to $w_0$, the switching surface $K_\varepsilon$ for BC-extremals of controle $u=\varepsilon$ on $N$ is parameterized by: \begin{equation*} \begin{aligned} x = & \frac{1}{6} t^2 \left(-\frac{a^2}{c}+6 a \varepsilon s_0+6 a s_0-18 c \varepsilon s_0^2-9 c s_0^2\right)+\frac{1}{6} t \left(6 a s_0^2-12 c s_0^3+6\right), \\ y = & t \left((\varepsilon+1) s_0-\frac{a}{6 c}\right) +\frac{1}{6} (3 \varepsilon+2) t^2+s_0^2 \\ z = &s_0+ \varepsilon t + o(t^3). \end{aligned} \label{eq:nf-w} \end{equation*} The switching condition of a trajectory on $W_\varepsilon$ is given by the sign of \[ \det\left( \frac{\partial K_\varepsilon}{\partial t}_{\mid t=0}, \frac{\partial K_\varepsilon}{\partial t}_{\mid t=0}, \frac{\partial \Gamma_\varepsilon(0,s_0^2,s_0)}{\partial t}_{\mid t=0} \right), \] and this determinant is equal to $\left(a s_0^2-2 c s_0^3+1\right) (6 c \varepsilon s_0-a)/(6 c)$. In the case $a=c=1$, we get that $\sigma_+$ (resp. $\sigma_-$) switches on $W_+$ (resp. $W_-$) for $z\in ]z_{sat},1[$ (resp. $z\in ]-z_{sat},1[$) as illustrated in Fig.\ref{fig:wp-cap-gp} (resp. Fig.\ref{fig:wm-cap-gm}). \begin{figure}[htpb] \centering \includegraphics[scale=0.62]{wp-cap-gp.pdf} \caption{The trajectories $\sigma_+$ starting from $q_0=(0,w_0,s_0)$ such that $w_0<s_0^2$ switch on $W_+$ for $z\in ]z_{sat},1[$ ($a=c=1$).} \label{fig:wp-cap-gp} \end{figure} \begin{figure}[htpb] \centering \includegraphics[scale=0.62]{wm-cap-gm.pdf} \caption{The trajectories $\sigma_-$ starting from $q_0=(0,w_0,s_0)$ such that $w_0>s_0^2$ switch on $W_-$ for $z\in ]-z_{sat},1[$ ($a=c=1$).} \label{fig:wm-cap-gm} \end{figure} We deduce the time minimal synthesis from Fig.\ref{fig:nf-global-a}-\ref{fig:nf-global-b} for all point $q_0$ along ${\cal S}$. More precisely, if $z<-z_{sat}$ the optimal policy is Bang-Singular-Bang; if $z=-z_{sat}$, the synthesis is given by Fig.\ref{fig:nf-hyp-sat}. If $-z_{sat}<z<z_{sat}$, we have first a $\sigma_+\sigma_-$'s policy, then we encounter the case $u_s(z)=3$ (see Fig.\ref{fig:par-ell}), then we have a cut for $z>z_{sat}$. \begin{figure}[htpb] \centering \begin{tabular}{cc} \includegraphics[scale=0.55]{nf-globale-a.pdf} & \includegraphics[scale=0.55]{nf-globale-c.pdf} \\ Cut locus for $z>z_{sat}$. & $u_s(z)=3$. \end{tabular} \caption{ {\it (left)} $\sigma_-$ reflect on $W_-$ for $z>z_{sat}$. {\it (right)} At $z=\frac{a}{18c}<z_{sat}$ such that $u_s(z)=3$, $\sigma_-$ cross $W_-$ and the cut locus disappears (see Fig.\ref{fig:par-ell}). For $-z_{sat}<z<z_{sat}$, the optimal policy is $\sigma_+\sigma_-$. The case $z=-z_{sat}$ was given in Fig.\ref{fig:nf-hyp-sat} and is also represented here with the surface $W_s$. } \label{fig:nf-global-a} \end{figure} \begin{figure}[htpb] \centering \includegraphics[scale=0.62]{nf-globale-b.pdf} \caption{For $z>z_{sat}$ $\sigma_+$ reflect on $W_+$, hence we have a cut locus. For $z<-z_{sat}$, the optimal policy is Bang-Singular. } \label{fig:nf-global-b} \end{figure} \paragraph*{Construction of a semi--normal form and the need of integrability assumption.} \noindent {\it Notations and assumption:} We normalize in a small neighborhood of $N$. We assume that $F$ is transverse to $N$. Let $q=(x,y,z)$, $q_0=(0,0,0)$, $G=\frac{\partial}{\partial z}$ and $N\coloneqq \{x=0\}$. We denote by $\sigma_0$ the reference trajectory of $F$ identified to $t\rightarrow (t,0,0)$ so that $F_{\mid \sigma_0} = \frac{\partial}{\partial x}$. Assuming $x$ small enough one can write the system as: \begin{align*} &\dot x = 1 + f(y,z) + R_1 \\ &\dot y = g(y,z) + R_2 \\ &\dot z = h(y,z) + R_3, \end{align*} where $R_i(x,y,z)=o(|x|)$ and the corresponding model is \begin{align*} &\dot x = 1 + f(y,z) \\ &\dot y = g(y,z) \\ &\dot z = h(y,z) + u. \end{align*} \noindent {\it Singular flow on the model:} Furthermore, we assume $\frac{\partial g}{\partial z} \neq 0$. Since the singular flow is feedback invariant, setting $z=g(y,z)$, $z\rightarrow z$ and using a proper feedback the system takes the form \begin{align*} &\dot x = 1 + f(y,z) \\ &\dot y = z \\ &\dot z = u. \end{align*} Computing, we get: \begin{equation} \begin{array}{ll} \left[ G,F \right] = -f_z \frac{\partial}{\partial x} + \frac{\partial }{\partial y} & \left[ \left[ G,F \right],G \right] = -f_{z^2} \frac{\partial}{\partial x}, \\ \left[ \left[ G,F \right],F \right] = -f_{yz} \frac{\partial}{\partial x} +f_y \frac{\partial}{\partial y}. \end{array} \end{equation} Hence \[ D = -f_{z^2}, \qquad D' = -f_y f_z + f_{yz} \] and \[ u_s = -\frac{D'}{D} = \frac{f_yf_z - f_{yz}}{f_{z^2}}. \] Therefore, we have \[ \frac{\mathrm{d} y}{\mathrm{d} z} = \frac{z}{u_s} \] and assuming the {\it separability condition} \[ \frac{\mathrm{d} y}{\mathrm{d} z} = h_1(y) h_2(z) \] one can integrate the singular trajectories such that $q(0) \in {\cal S}$ as follows, parameterizing by $z$ instead of $t$ using the relation \[ \int_{y(0)}^y h_1(y)\,\mathrm{d} y = \int_{z(0)}^z h_2(z)\, \mathrm{d} z. \] Assuming that $y(0)$ can be expressed as $y(0)=p_1(z(0))$ and moreover that the left--hand side is invertible, one gets $y = p_2(z,z(0))$. This defines the {\it singular leaf} ${\cal F}$ through $q(0) \in {\cal S}$ using the equation \[ \frac{\mathrm{d} x}{\mathrm{d} z} = \frac{1+f(y,z)}{z}. \] Using $x(0)=0$, one gets: \[ x(z,z(0)) = \int_{z(0)}^z \left( 1 +f(p_2(z,z(0)),z) \right)\, \mathrm{d} z. \] \begin{remark} This requires an integrability condition to obtain the leaf ${\cal F}$. If it is not satisfied, integration is obtained through a proper {\it numeric integration}. \end{remark} \paragraph*{Application.} {\bf Singular set.} Back to the tutorial model \eqref{eq:normal-form}, we fix $a=c=1$, we are in the separable case and using our previous algorithm one gets \begin{proposition} \begin{enumerate} \item Integrating the singular flow, we get: \[ \begin{array}{ll} x(t,z(0))&= t + \frac{2\varepsilon (2a+3ck) \,\left(k t+z(0)^2\right)^{5/2} -10 c \left(k t+z(0)^2\right)^3 t}{15 k^2} \\ y(t,z(0))&= \frac{2 \varepsilon }{3k} \left(k t+z(0)^2\right)^{3/2} \\ z(t,z(0))&= \varepsilon\, \left(k t+z(0)^2\right)^{1/2}, \end{array} \] where $\varepsilon=\pm 1$, $k=12c/a$. \item Parameterizing by $z$, the integral singular leaf ${\cal F}$ with $q(0)\in {\cal S}$ is given \[ \begin{array}{l} y(z,z(0))=2c\, (z^3-z(0)^3)/a + z(0)^2 \\ x(z,z(0)) = g(z) - g(z(0)), \end{array} \] where $ \displaystyle g(z) = \frac{3 c z^2}{5a^2}\, \Big( 2 a (2 c+1)\, z^3+30 c z(0)^2 (a-2 c z(0))\, z +30 c^2\, z^4 +5 a (a z(0)^2-2 c z(0)^3+1)\Big). $ \end{enumerate} \end{proposition} We represent on Fig.\ref{fig:sing-leaf} the stratification of the singular leaf ${\cal F}$ with $a=c=1$ using hyperbolic and elliptic cases and the admissibility conditions $|u_s|\le 1$. \begin{figure} \centering \includegraphics[scale=0.64]{stratSnew.pdf} \caption{Stratification of the singular set $\Gamma_s$ for the system \eqref{eq:normal-form} with parameters $a=c=1$.\label{fig:sing-leaf}} \end{figure} \subsection{The 2d--McKeithan scheme} Recall that the network is $ \tikz[baseline={(a.base)},node distance=6mm] { \node (a) {$T+M$}; \node[right=of a] (b) {$A$}; \node[right=of b] (c) {$B$}; \draw (a.base east) edge[left,->] node[above] {{$\scriptstyle k_1$}} (b.base west) (b.base east) edge[->] node[above] {{$\scriptstyle k_2$}} (c.base west); \draw (a) edge[bend right=40,<-] node[below right] {{$\scriptstyle k_3$}} (b); \draw (a.south) edge[bend right=60,<-] node[below right] {{$\scriptstyle k_4$}} (c); } $ and the system $\dot q=F(q)+u\, G(q)$, using the coordinates $q=(x,y,v)$, $x=[A]$, $y=[B]$, $v=k_1$ and reduced to the stoichiometric class $T+M+A=\delta_1$ and $T+M+B=\delta_2$ takes the form \begin{align*} &\dot x = -\beta_2 x v^{\alpha_2}-\beta_3 x v^{\alpha_3}-\delta_3 v\, (x+y)+\delta_4 v+v\, (x+y)^2 \\ &\dot y = \beta_2 x v^{\alpha_2}-\beta_4 y v^{\alpha_4} \end{align*} with $0\le x\le \delta_1$, $0\le y \le \delta_2$, $\delta_3=\delta_1+\delta_2$, $\delta_4=\delta_1\, \delta_2$, $k_2=\beta_2\, v^{\alpha_2}$, $k_3=\beta_3\, v^{\alpha_3}$, $k_4=\beta_4\, v^{\alpha_4}$. \subsubsection{Lie brackets computations} We have: \begin{itemize} \item $F = \big(-\beta_2 x v^{\alpha_2}-\beta_3 x v^{\alpha_3}-\delta_3 v (x+y) + \delta_4v+v\, (x+y)^2\big)\frac{\partial}{\partial x} + \big(\beta_2 x v^{\alpha_2}-\beta_4 y v^{\alpha_4}\big)\frac{\partial}{\partial y} $, \item $G = \frac{\partial}{\partial v}$, \item $\left[ G,F \right]= \big(x (\alpha_2 \beta_2 v^{\alpha_2-1}+\alpha_3 \beta_3 v^{\alpha_3-1}+\delta_3)+\delta_3 y-\delta_4-x^2-2 x y-y^2\big)\frac{\partial}{\partial x}+ \big(\alpha_4 \beta_4 y v^{\alpha_4-1}-\alpha_2 \beta_2 x v^{\alpha_2-1}\big) \frac{\partial}{\partial y} $, \item $ \left[ \left[ G,F \right],G \right]= \big(x (\alpha_2 \beta_2(\alpha_2 -1) v^{\alpha_2-2}+\alpha_3 \beta_3(\alpha_3-1) v^{\alpha_3-2})\big)\frac{\partial}{\partial x} +\big(y \alpha_4 \beta_4(\alpha_4 -1) v^{\alpha_4-2} -x \alpha_2 \beta_2(\alpha_2-1) v^{\alpha_2-2} \big)\frac{\partial}{\partial y} $, \item $ \left[ \left[ G,F \right]F \right]= \big(-x v^{\alpha_2} \beta_2 \delta_3(\alpha_2-1) -y v^{\alpha_2} \beta_2 \delta_3(\alpha_2 -1) +v^{\alpha_2} (\alpha_2 \beta_2 \delta_4 +x y (2 \alpha_2 \beta_2-2 \beta_2)-\beta_2 \delta_4) +x^2 (\alpha_2 \beta_2-\beta_2) v^{\alpha_2} +y^2 (\alpha_2 \beta_2-\beta_2)v^{\alpha_2} +y v^{\alpha_3} (\beta_3 \delta_3-\alpha_3 \beta_3 \delta_3)+v^{\alpha_3} (\alpha_3 \beta_3 \delta_4-\beta_3 \delta_4)+x^2 (\beta_3-\alpha_3 \beta_3) v^{\alpha_3}+y^2 (\alpha_3 \beta_3-\beta_3) v^{\alpha_3}+y v^{\alpha_4} (\alpha_4 \beta_4 \delta_3-\beta_4 \delta_3)+x y (2 \beta_4-2 \alpha_4 \beta_4) v^{\alpha_4}+y^2 (2 \beta_4-2 \alpha_4 \beta_4) v^{\alpha_4}\big) \frac{\partial}{\partial x} +\big( x (v^{\alpha_2+\alpha_3-1} (\alpha_2 \beta_2 \beta_3-\alpha_3 \beta_2 \beta_3)+v^{\alpha_2+\alpha_4-1} (\alpha_4 \beta_2 \beta_4-\alpha_2 \beta_2 \beta_4))+x v^{\alpha_2} (\alpha_2 \beta_2 \delta_3-\beta_2 \delta_3)+y v^{\alpha_2} (\alpha_2 \beta_2 \delta_3-\beta_2 \delta_3)+v^{\alpha_2} (-\alpha_2 \beta_2 \delta_4+x y (2 \beta_2-2 \alpha_2 \beta_2)+\beta_2 \delta_4)+x^2 (\beta_2-\alpha_2 \beta_2) v^{\alpha_2}+y^2 (\beta_2-\alpha_2 \beta_2) v^{\alpha_2}\big) \frac{\partial}{\partial y} $. \end{itemize} \subsubsection{Singular arcs} One has: \begin{itemize} \item $D(q)= ((\alpha_4-1) \alpha_4 \beta_4 y v^{\alpha_4-3} -(\alpha_2-1) \alpha_2 \beta_2 x v^{\alpha_2-3} ) (\alpha_2 \beta_2 x v^{\alpha_2}+\alpha_3 \beta_3 x v^{\alpha_3}+\delta_3 v (x+y)-\delta_4 v-v x^2-2 v x y-v y^2) +x (\alpha_2^2 \beta_2 v^{\alpha_2}-\alpha_2 \beta_2 v^{\alpha_2}+(\alpha_3-1) \alpha_3 \beta_3 v^{\alpha_3}) (\alpha_2 \beta_2 x v^{\alpha_2-3}-\alpha_4 \beta_4 y v^{\alpha_4-3})$, \item $D'(q)= \beta_2 v^{\alpha_2-2} (\alpha_2 \beta_2 x v^{\alpha_2}+\alpha_3 \beta_3 x v^{\alpha_3}+\delta_3 v (x+y)-\delta_4 v-v x^2-2 v x y-v y^2) (\alpha_2 \beta_3 x v^{\alpha_3}-\alpha_2 \beta_4 x v^{\alpha_4}+(\alpha_2-1) \delta_3 v (x+y)+\delta_4 (v-\alpha_2 v)-\alpha_2 v x^2-2 \alpha_2 v x y-\alpha_2 v y^2-\alpha_3 \beta_3 x v^{\alpha_3}+\alpha_4 \beta_4 x v^{\alpha_4}+v x^2+2 v x y+v y^2) +(\alpha_2 \beta_2 x v^{\alpha_2-1}-\alpha_4 \beta_4 y v^{\alpha_4-1}) (( \alpha_2-1) \beta_2 v^{\alpha_2} (\delta_4-(x+y) (\delta_3-x-y))+(\alpha_3-1) \beta_3 v^{\alpha_3} (y (y-\delta_3)+\delta_4-x^2)+(\alpha_4-1) \beta_4 y v^{\alpha_4} (\delta_3-2 (x+y))) $, \item $ D''(q)= (\beta_2 x v^{\alpha_2-1}-\beta_4 y v^{\alpha_4-1}) (\alpha_2 \beta_2 x v^{\alpha_2}+\alpha_3 \beta_3 x v^{\alpha_3}+\delta_3 v (x+y)-\delta_4 v-v x^2-2 v x y-v y^2)-(\alpha_2 \beta_2 x v^{\alpha_2-1}-\alpha_4 \beta_4 y v^{\alpha_4-1}) (\beta_2 x v^{\alpha_2}+\beta_3 x v^{\alpha_3}+\delta_3 v (x+y)-\delta_4 v-v x^2-2 v x y-v y^2) $, \end{itemize} and the singular control is given by: $u_s = -D'(q) / D(q)$. \subsubsection{Classification of local syntheses for the McKeithan network} We consider the case ${\max\ [A]}$, with $x=[A]$. We proceed as follows. {\bf Stratification of the terminal manifold: $x=d$.} \paragraph*{Singular locus} ${\cal S}: n\cdot [G,F](q)=0 \text{ and } x=d$ with $n=(1,0,0)$. It is given by: \begin{equation} \begin{aligned} {\cal S}:\, \alpha_2 \beta_2 d v^{\alpha_2-1}+\alpha_3 &\beta_3 d v^{\alpha_3-1} +d \delta_3-\delta_4 \\ &-d^2+y (\delta_3-2 d)-y^2=0. \end{aligned} \label{eq:eqS} \end{equation} Denoting by $\Delta$ the discriminant of the polynomial function $y\mapsto n\cdot [G,F](q) \cap x=d$, a singularity can occur for $\Delta=0$. One has \begin{lemma} Assume $\alpha_i , \beta_i, \delta_i >0$,\,i=1,2 and $d,v>0$. Then we have $\Delta=(\delta_1-\delta_2)^2+4d\,( \alpha_2\beta_2v^{\alpha_2-1}+\alpha_3\beta_3v^{\alpha_3-1} )> 0$ so that there is no ramification and ${\cal S}$ contains at most two real positive branches. \end{lemma} \begin{definition} A semi-bridge occurs at a point $q\in {\cal S}$ if $n\cdot \left[ \left[ G,F \right],G \right](q)=0$. \end{definition} Computing, a semi-bridge occurs if \begin{equation} \label{cond:semi-bridge} v^{\alpha_3-\alpha_2}=-\frac{(\alpha_2-1)\alpha_2\beta_2}{(\alpha_3-1)\alpha_3\beta_3}. \end{equation} \paragraph*{Exceptional locus} It is given by ${\cal E}: n\cdot F(q)=0$ and $x=d$. Computing, one gets: \begin{equation} \begin{aligned} {\cal E}:\, -\beta_2 d v^{\alpha_2}&-\beta_3 d v^{\alpha_3}+d^2 v-d \delta_3 v \\ &+y\, (2 d v-\delta_3 v)+\delta_4 v+v y^2 = 0. \end{aligned} \label{eq:eqE} \end{equation} The discriminant of the polynomial $n\cdot X(q)$ in $y$ is $\Delta = v (4 d (\beta_2 v^{\alpha_2}+\beta_3$ $ v^{\alpha_3})+v(\delta_1-\delta_2)^2)>0$ and ${\cal E}$ contains at most two real positive branches. Fig.\ref{fig:stratification_mck} gives a picture of stratification of $x=d$ for the McKeithan system with a focus where ${\cal S}$ is folded. We represent the sets ${\cal S}$ and ${\cal E}$ and the stratification of ${\cal S}$ in hyperbolic, elliptic and parabolic points. From this, we deduce the admissible points. We are in the flat case and a point of $N$ is either an ordinary point or a fold point. For an ordinary point, the final optimal control is regular and is equal to $-\textrm{sign}\ \Phi(0)$. At a fold point on ${\cal S}$, the final optimal control may be singular (see Definition \ref{def:fold_case}). \begin{figure} \centering \def0.47\textwidth{0.47\textwidth} \input{mck_stratification.pdf_tex} \caption{Stratification of the surface $x=d$ for the McKeithan reaction. Dotted line: elliptic, red line: hyperbolic.} \label{fig:stratification_mck} \end{figure} The optimal syntheses near the fold can be described using the techniques of the tutorial model \eqref{eq:normal-form} and symbolic computations. \section{Conclusion} \label{sec5} In this article, we have presented the general tools to analyze a Mayer problem to optimize the yield of chemical networks. Using the McKeithan network, we have completed the analysis of \cite{bonnard1998} for the simple scheme $A\rightarrow B \rightarrow C$. The main point is to extend a geometric techniques from \cite{bonnard1997} to consider the case when the strict Legendre-Clebsch is not satisfied. The starting point is to analyze the semi-bridge phenomenon. Note that with the same techniques we can analyze the situations up to codimension $2$ describe in details in \cite{launay1997} (in particular near the exceptional locus ${\cal E}$). Furthermore, it can be extended to an important problem of codimension $3$ occurring for reversible chemical networks and the existence of equilibria, see Fig. \ref{fig:stratification_mck}. \section{Appendix} \subsection{Strata.m} \label{prog:strata} \begin{lstlisting} (* Strata.m -- Tested with Mathematica v11.3 Linux *) (* This program computes the singular set, switching surface \ and splitting locus to derive the time minimal synthesis in a neighborhood of N. *) (* Lie derivative of w wrt v *) LieDerive[v_List,w_List,var_List]:=Transpose[D[w,#]& /@ var] . v /; \ Length[v] == Length[var] (* Lie bracket [v,w] *) LieBracket[v_List,w_List,var_List]:=\ LieDerive[w,v,var] - LieDerive[v,w,var] /; \ Length[v] == Length[w] == Length[var] (* Poisson bracket {f,g} *) PoissonBracket[f_, g_,q_List,p_List] /; Length[q] == Length[p] := \ Total @ Flatten @ Fold[List,0,MapThread[D[f,#1] D[g,#2] - D[f,#2] D[g,#1] &, {q, p}]] (* Remove monomials of order >= ord *) EliminTe[expr_,var_List,ord_Integer]:=Module[{},\ FromCoefficientRules[Select[CoefficientRules[expr,var],Total@#[[1]] <= ord &], var]] (* Multivariate Taylor expansions *) mTaylor[expr_,var_List,pts_List,ord_Integer] /; \ Length[var] == Length[pts] := Normal[Series[(expr /. Thread[var -> s (var - pts) + pts])//ExpandAll, {s, 0, ord}]] /. {s -> 1} (* Integration in (q,p) of H=p.(XX + u YY) for small time in o(t^ord) *) IntSmallTime[XX_,YY_,u_,qfpf_List,ord_Integer]:=Module[{res}, pv = {p1,p2,p3}; qv = {x,y,z}; H = {p1,p2,p3}.(XX + u YY); res = Sum[t^k / k! Nest[PoissonBracket[#,H,qv,pv]&,#,k],{k,0,ord}] \ /. Thread[Join[qv,pv]->qfpf]& /@ Join[qv,pv] ]; $Assumptions = (ep==1 || ep==-1); (*--------------------------------------------------------*) (*--------------------------main--------------------------*) (*--------------------------------------------------------*) (*.......... constants ..........*) a1 = 1; a2 = 1; a4 = 1; b = 1; c = 1; d = 0; uh0 = 1; uhx = 1; uhy = 1; (*.......... model ..........*) XX = {1 + a z^2 + a2 x z^2 + a3 x y^2 + a4 y z^2,\ b z, -uh0 -uhx x -uhy y + c z}; X = XX /. {x-> x-d}; Y = {0,0,1}; (*.......... Lie brackets computations ..........*) YX = LieBracket[Y,X,{x,y,v}]; YXY = LieBracket[YX,Y,{x,y,v}]; YXX = LieBracket[YX,X,{x,y,v}]; DD = Det[{Y,YX,YXY}]; DDp = Det[{Y,YX,YXX}]; DDpp = Det[{Y,YX,X}]; aux = Solve[(YX[[1]])==0,{y}]; Sy[v_] = Expand[(y /. aux[[1]]) /. x->0] (*.......... Gammas ..........*) ord = 3; us = - DDp / DD; q0p0 = {0,w0,0,1,0,0}; qpt = IntSmallTime[X,Y,us,q0p0,ord]; ps = {t0val,w0val,s0val}; gms = mTaylor[#,{t,w0,s0},ps,ordG]& /@ qpt[[1;;3]] //Expand gmsall = mTaylor[#,{t,w0,s0},ps,ordG]& /@ qpt //Expand (*.......... Gamma+,Gamma- ..........*) u = ep; q0p0 = {0,w0,s0,1,0,0}; pt = {t0val,w0val,s0val}; qpt = Refine /@ IntSmallTime[X,Y,u,q0p0,ord]; qpt = mTaylor[#,{t,w0,s0},pt,ordG] & /@ qpt; gmall = Refine /@ qpt //Refine gmp = gmall[[1;;3]] /. {ep->1} gmm = gmall[[1;;3]] /. {ep->-1} (*.......... W+,W- ..........*) ord = 3; qpt = Refine /@ IntSmallTime[X,Y,u,q0p0,ord]; eq = mTaylor[qpt[[6]],vars,{t0val,w0val,s0val},ord] // Simplify aux = Solve[eq==0,vw]; sols = Flatten[vw /. aux]; sols = Refine[Expand[mTaylor[#,{t,w0,s0},{0,w0val,s0val},ord] & /@ sols]] // Simplify solp = mTaylor[ # /. {ep->1},vars,{t0val,w0val,s0val},ordG] & /@ sols; solm = mTaylor[ # /.{ep->-1},vars,{t0val,w0val,s0val},ordG] & /@ sols qptp = (qpt /. ep->1 /. vw-># ) & /@ solp; qpwps = mTaylor[#,{t,w0,s0},pt,ordG] & /@ qptp // Flatten; qptm = (qpt /. ep->-1 /. vw-># ) & /@ solm; qpwms = mTaylor[#,{t,w0,s0},pt,ordG] & /@ qptm //Flatten (*.......... Ws ..........*) ord = 3; q0p0 = {0,w0,0,1,0,0}; qpt = Refine /@ IntSmallTime[X,Y,us,q0p0,ord]; qpt = mTaylor[#,{t,w0,s0},pt,ord] & /@ qpt; q0p02 = qpt /. t->ss; qpt2 = Refine /@ IntSmallTime[X,Y,1,q0p02,ord]; qpt2 = mTaylor[#,{t,w0,s0,ss},{0,w0val,s0val,0},ord] & /@ qpt2; p3t2 = qpt2[[6]] aux = Solve[p3t2==0,ss]; sols = Flatten[ss /. aux]; sols = Refine[Expand[mTaylor[#,{t,w0,s0},{0,w0val,s0val},ord] & /@ sols]] qpws = qpt2 /. {ss-> #} & /@ sols; qpws = mTaylor[#,{t,w0,s0},pt,ordG] & /@ qpws //Flatten ws = Refine /@ qpws[[1;;3]] (*.......... C1 ..........*) ord = 3; q0p0 = {0,w0,s0,1,0,0}; pt = {0,w0val,s0val}; qpt = IntSmallTime[X,Y,u,q0p0,ord]; qpt = mTaylor[#,{t,w0,s0},pt,ord] & /@ qpt; (* u=-1 *) {xp,yp,zp} = qpt[[1;;3]] /.{ep->-1}; (* u=+1 *) {xm,ym,zm} = qpt[[1;;3]] /.{ep->1,s0->s0p,w0->w0p}; eqns = {xp==xm,yp==ym,zp==zm}; aux = Solve[eqns,{t,w0p,s0p}] // Expand; aux2 = {t,w0p,s0p} /. aux; c1sols = mTaylor[#,{t,w0,s0},pt,ord] & /@ aux2; (*.......... C12 ..........*) ord = 2; q0p0 = {0,w0,s0,1,0,0}; pt = {0,w0val,s0val}; qpt = IntSmallTime[X,Y,u,q0p0,ord]; qpt = mTaylor[#,{t,w0,s0},pt,ord] & /@ qpt; vars = {t,ss1,ss2,w0,s0,w0p,s0p}; pt2 = {0,0,0,w0val,s0val,w0val,s0val}; (* u=-1 *) {x1,y1,z1} = qpt[[1;;3]] /.{ep->-1}; (* u=-1 & switch *) ptfin = (qpt /.{ep->-1,w0->w0p,s0->s0p})/.t->ss1; qpt2 = IntSmallTime[X,Y,1,ptfin,ord] /. t->ss2; {x3,y3,z3} = mTaylor[#,vars,pt2,ord] & /@ qpt2[[1;;3]]; eqns = {x1==x3,y1==y3,z1==z3,ss2+ss1==t,ptfin[[6]]==0}; aux = Solve[eqns,{t,ss1,ss2,w0p,s0p}]; aux2 = {t,ss1,ss2,w0p,s0p} /. aux; c12sols = mTaylor[#,vars,pt2,ord] & /@ sols; \end{lstlisting}
\section{INTRODUCTION}\label{sec:SysModel} \section{Introduction} \vspace{0.2cm} Polar codes are the first class of channel codes that achieve capacity for Binary-input Memoryless Symmetric (BMS) channels with low encoding and decoding complexities \cite{Arikan_polarization}. As the name suggests, polar codes are based on a polarization phenomenon, which we now describe briefly: Given two identical and independent instances of a BMS channel $W: \mathbb{F}_2 = \mathcal{X} \to \mathcal{Y}$, create two synthetic channels $W^-: \mathcal{X} \to \mathcal{Y}^2$ and $W^+:\mathcal{X} \to \mathcal{Y}^2 \times \mathcal{X}$ with the polar transform introduced in \cite{Arikan_polarization}. Arikan has shown that the mutual information of $W^+$ is greater than the mutual information of $W^-$ and their average is equal to that of $W$. This means that from a BMS channel $W$, its `worse' and `better' versions are synthesized while the average mutual information is preserved. Recursive application of the above construction allows one to synthesize channels $W^{\bs{s}_n}$ for all $\bs{s}_n \in \{+,-\}^n$ in $n$ steps. Arikan has also shown that a fraction of synthetic channels eventually become `perfect' whereas the other fraction eventually become `useless'. In other words, they eventually polarize. Together with the fact that the average mutual information remains same at each step and the error probability of perfect channels behave as $O(2^{-2^{n/2}})$ (cf. \cite{Telatar_Rate}), this shows the capacity achieving property of polar codes. Arikan has introduced the Successive Cancellation Decoder (SCD) in \cite{Arikan_polarization}, which estimates the channel input sequence by calculating the individual log-likelihood ratios (LLR) for each bit, exploiting the recursive structure. The basis of code construction is to send the information bits through synthetic channels that are close to perfect. Identifying these almost perfect channels can in principle be done with a density evolution algorithm \cite{MoriTanaka}. We exploit the inherent symmetry of BMS channels and assume all-zero sequence is sent throughout this manuscript. Under this assumption and supposing that the random channel output is $Y$, the update equations for LLRs are given by \begin{equation}\label{eq:minus_llr} L^- = L \boxplus L', \qquad L^+ = L + L' \end{equation} where $L\triangleq \ln\left(\frac{W(Y|0)}{W(Y|1)}\right)$, $a\boxplus b \triangleq \ln\left(\frac{e^{a+b}+1}{e^a + e^b}\right)$ and $L'$ is an identical and independent copy of $L$. Similar to the creation of synthetic channels, one can calculate the distribution of any $L^{\bs{s}_n}$, $\bs{s}_n \in \{+,-\}^n$. Note that the distribution of $L^{\bs{s}_n}$ is equivalent to the channel transition probabilities of $W^{\bs{s}_n}$ given all-zero input. Now, we state two challenges about code construction and decoder implementation: \begin{enumerate} \item In general, equations \eqref{eq:minus_llr} suggest that the support size of LLRs grow exponentially in block length. To overcome this problem, special degradation procedures or approximations are proposed (e.g., see \cite{Tal_Vardy}, \cite{RamtinHassani}). \item LLRs are real numbers, therefore implementation of a real-time SCD has to include an inherent quantization scheme depending on the required precision (c.f. \cite{LLRBasedCircuit}). In \cite{Urbanke}, robustness of polarization with respect to a specific family of quantization schemes was examined and the authors have shown that even a simple 3-level quantization scheme polarizes. \end{enumerate} We refer the reader to the partial list (\!\!\cite{Trifonov,MoriTanaka2,UniformQuantization,Joachim,HigherOrder}) for other studies on these considerations. To the best of our knowledge, little is known about polarization phenomenon for finite-level quantization schemes other than a specific three-level case. We have found that a weaker polarization phenomenon compared to that in \cite{Arikan_polarization} exists under some constraints. The main results of this manuscript are: \begin{itemize} \item[(i)] For the three-level quantization scheme in \cite{Urbanke}, an improved calculation method for the lower bound for achievable rates is obtained. \item[(ii)] The exact asymptotic behavior of block error probability for the same three-quantized decoder is found to be $\mathcal{O}(2^{-\sqrt{N}^{\log \phi}})$, where $\phi = \frac{1+\sqrt{5}}{2}$ is the golden ratio and $N = 2^n$ is the block length. \item[(iii)] A broad family of finite-level quantization procedures weakly polarize. The family is to be defined in Section \ref{sec:Qfamily}. \end{itemize} \section{Notation} The random variables are denoted with uppercase letters whereas their realizations are denoted with lowercase letters (e.g., $X_n$ and $x_n$). Sets and events are denoted with script-style letters (e.g., $\mathcal{A}_n$, $\mathcal{G}_n$). As two special cases, the set $\{1,2,\ldots,n\}$ is denoted $[n]$, $n\in \mathbb{N}$ and $\Pi_{\mathbb{R}}$ denotes the set of all probability distributions on $\mathbb{R}$. $|\mathcal{A}|$ denotes the cardinality of a set $\mathcal{A}$. Vectors and sequences are denoted by boldface letters. If their length is known, it is added as a subscript (e.g., $\bs{s}_n$). If the length is not known or has no importance, we drop the subscript (e.g., $\bs{s}$). $\mathbbm1_{\mathcal{A}}$ denotes the indicator function for a set $\mathcal{A}$. We abbreviate the following operations: $a \wedge b \triangleq \min\{a,b\}$, $a \vee b \triangleq \max\{a,b\}$, $\text{sign}(x) \triangleq \mathbbm{1}_{\{x > 0\}} - \mathbbm{1}_{\{x < 0\}}$. $h(x) \triangleq -x\log x - (1-x)\log(1-x)$ is the binary entropy function defined for $x \in [0,1]$. All the logarithms are in base 2 unless we use the notation $\ln$ for natural logarithm. \section{Static and Dynamic Quantization Procedures}\label{sec:Qfamily} We define a family of symmetric quantization procedures to unify the approaches in \cite{Urbanke},\cite{Tal_Vardy} and \cite{RamtinHassani}. \begin{definition}[$D$-quantization family and admissible quantization procedures] \label{def:qfamily} For a finite $D \in \mathbb{N}$, a $D$-quantization family $\mathcal{Q}^{(D)}$ is a family of odd, increasing step functions which can take at most $D$ values. Moreover, the members are right continuous on $\mathbb{R}_+$, and left continuous on $\mathbb{R}_-$. We also define the family of admissible quantization procedures as $\mathcal{Q} \triangleq \cup_{D \geq 1} \mathcal{Q}^{(D)}$. \end{definition} Restriction to odd functions provides symmetry. This is necessary to preserve the property that the set of BMS channels are invariant under polar transforms with quantization schemes. Note that Definition \ref{def:qfamily} implies that for all $Q \in \mathcal{Q}$, $Q(0)=0$. Hence, one can always take $D$ as an odd number. Furthermore, for any member of $\mathcal{Q}$; the quantization intervals in $\mathbb{R}_+$ together with their images contain all the information needed for its behavior in $\mathbb{R}$. Taking into account the above, we have the following definition of static and dynamic quantization procedures. \begin{definition}[$D$-static and $D$-dynamic quantization]\label{def:quantization} A $D$-dynamic quantization $Q_{\beta}^{(D)}:\Pi_{\mathbb{R}}\times\mathbb{R} \to \mathbb{R}$ is a member of $\mathcal{Q}^{(D)}$, where the right limits of quantization intervals in $\mathbb{R}_+$ and their images are described in parameter $\beta(\mathbb{P})$, $\mathbb{P} \in \Pi_{\mathbb{R}}$. $\beta(\mathbb{P})$ is a set of 2-tuples with $|\beta| = \frac{D-1}{2}$ and depends on the distribution $\mathbb{P}$. A $D$-static quantization is a $D$-dynamic quantization with $\beta$ being same for all $\mathbb{P} \in \Pi_{\mathbb{R}}$. \end{definition} We give a simple example of a $D$-static quantization procedure. \begin{example} Given $\alpha_1, \alpha_2, \gamma_1, \gamma_2 \in \mathbb{R},~0 < \alpha_1 < \alpha_2$ and $0 < \gamma_1 < \gamma_2$, let $\beta = \{(\alpha_1,\gamma_1),(\alpha_2,\gamma_2)\}$. $Q_\beta^{(5)}(x)$ is depicted in Figure \ref{fig:Q}: \begin{figure}[h!]\label{fig:Q}\centering \begin{tikzpicture}[scale=0.82, every node/.style={scale=0.85}] \begin{axis}[ axis x line=center, axis y line=center, x axis line style={<->}, y axis line style={<->}, xtick={-0.7,-0.2,0,0.2,0.7}, ytick={-1,-0.6,0,0.6,1}, xmajorgrids, ymajorgrids, yticklabels={,,}, xticklabels={,,}, ymin=-2,ymax=2, ] \addplot[mark = * ,blue,line width = 0.8pt, mark options={fill=white}] coordinates { (-0.7,-1)(-0.7,-0.6) (-0.2,-0.6) (-0.2,0) (0.2,0) (0.2,0.6) (0.7,0.6)(0.7,1) }; \addplot[mark = none,blue,line width = 0.8pt] coordinates { (0.7,1) (1,1) }; \addplot[mark = none,blue,line width = 0.8pt] coordinates { (-0.7,-1) (-1,-1) }; \addplot[only marks, mark = *, blue] coordinates { (-0.7,-1) (-0.2,-0.6) (0.2,0.6) (0.7,1) }; \node at (axis cs: 0.7,-0.2) {$\alpha_2$}; \node at (axis cs: 0.2,-0.2) {$\alpha_1$}; \node at (axis cs: -0.7,0.2) {$-\alpha_2$}; \node at (axis cs: -0.2,0.2) {$-\alpha_1$}; \node at (axis cs: -0.1,0.6) {$\gamma_1$}; \node at (axis cs: -0.1,1) {$\gamma_2$}; \node at (axis cs: 0.1,-0.6) {$-\gamma_1$}; \node at (axis cs: 0.1,-1) {$-\gamma_2$}; \node at (axis cs: 0.17,1.8) {$Q_\beta^{(5)}(x)$}; \node at (axis cs: 0.94,-0.1) {$x$}; \end{axis} \end{tikzpicture} \caption{Graphical representation of $Q_\beta^{(5)}(x)$.} \end{figure} A special case is when $\alpha_1 = 0$. Then, $Q_\beta(0) = 0$ and $Q_\beta(x) = \gamma_1$ for $0<x<\alpha_2$. Observe that $Q_\beta$ is not continuous at zero for this case. \end{example} We sometimes drop the superscript $(D)$ if the number of quantization levels $D$ is known or trivial. For dynamic quantization procedures, the notation $\beta(Y)$ is equivalent to $\beta(\mathbb{P})$ if a random variable $Y$ with distribution $\mathbb{P}$ is to be quantized. $\mathcal{Q}$ contains a broad class of practical quantization procedures. Observe that any quantization scheme similar to those in \cite{Urbanke} belongs to $\mathcal{Q}^{(D)}$. Furthermore, it is immediate from Definition \ref{def:quantization} that $Q \circ Q' \in \mathcal{Q}$ for all $Q$, $Q'\in \mathcal{Q}$. This implies that the greedy quantization procedures in \cite{Tal_Vardy} and \cite{RamtinHassani} are dynamic quantization procedures which belong to $\mathcal{Q}$ with the additional condition that zero is an absorbing support, namely, any combination of the zero support with some nonzero support should map to zero. We also emphasize that the widely used approximation (c.f. \cite{HardwarePolar}) $$ a\, \widehat \boxplus\, b \triangleq (|a|\wedge|b|)\text{sign}(ab) \approx a \boxplus b $$ results in a dynamic quantization procedure under some conditions. \begin{lemma}\label{lem:minsum}Consider a discrete random variable $L$ and its identical and independent copy $L'$ that take values in the finite set $\mathcal{L} = \{d_1, \ldots, d_n\}$ for some $n \in \mathbb{N}$. Take the symmetrized set $\tilde{ \mathcal{L}} \triangleq \mathcal{L}\, \cup\, (-\mathcal{L})$, where $-\mathcal{L} = \{-d_1, \ldots, -d_n\}$. Suppose the non-negative elements of $\tilde{ \mathcal{L}}$ are ordered as $\alpha_1\leq\ldots\leq\alpha_m$ for some $m$. If $\alpha_{i+1} > \ln(e^{\alpha_i} + \sqrt{e^{2\alpha_i}-1})$ for all $1 \leq i \leq m-1$, there exists a dynamic quantization procedure $Q_{\beta(L)}$ such that $L\, \widehat \boxplus\, L' = Q_{\beta(L)}(L \boxplus L')$. \end{lemma} \begin{proof} The random variable $L \boxplus L'$ takes values in the set $\tilde{ \mathcal{L}}\,\boxplus\, \tilde{ \mathcal{L}} = \{-(\alpha_m \boxplus \alpha_m), \ldots, \alpha_m \boxplus \alpha_m\}$. Suppose $\alpha_{i+1} > \ln(e^{\alpha_i} + \sqrt{e^{2\alpha_i}-1})$ for all $1 \leq i \leq m-1$, then one can show $\alpha_{i-1} < \alpha_{i} \boxplus \alpha_{i} < \alpha_{i} \boxplus \alpha_{i+1} < \ldots < \alpha_{i} \boxplus \alpha_m < \alpha_{i}$ for all $i \in [m]$. Take the dynamic quantization procedure $Q_{\beta{(L)}}$ with $$ \beta(L) = \cup_{i = 1}^m\{(\alpha_{i} \boxplus \alpha_{i},\alpha_{i})\}. $$ With the above selection, $Q_{\beta(L)}\bigl(\cup_{j \geq i}^m\{\alpha_{i} \boxplus \alpha_{j}\}\bigr) = \alpha_i = \cup_{j \geq i}^m\{\alpha_{i} \wedge \alpha_{j}\}$ for all $i \in [m]$. In other words, every $\alpha_i \boxplus \alpha_j$ is mapped to $\alpha_i \wedge \alpha_j$. Since this true for all $i,j \in [m]$, $\bigl(L\, \widehat \boxplus\, L'\bigr) \vee 0 = \bigl(Q_{\beta(L)}(L \boxplus L')\bigr) \vee 0$. The proof for the negative support follows similarly. \end{proof} Note that the condition in Lemma \ref{lem:minsum} can be met by simply scaling the random variables $L$, $L'$ with a large enough constant. \section{Three-Quantized Case}\label{sec:3quantizedCase} In this section, we study the same three-level quantization procedure from \cite{Urbanke}. We briefly explain the findings in \cite{Urbanke} with an improvement on calculation of the lower bound for the fraction of perfect channels. We also find the exact asymptotic behavior of the block error probability. Consider a BMS channel $W$, whose output $Y$ takes values from the set $\{-\lambda,0,\lambda\}$. If the initial channel has support size larger than three, it can be quantized with any desired procedure until we obtain a channel with three outputs. The static quantization procedure we consider throughout this section is $Q_\beta^{(3)}$, $\beta = \{(0, 1)\}$. Verbally, $Q_\beta$ results in only propagating the signs of the quantized random variables. The quantized channel output, $Y^{\bs{s}_n}= Q_\beta(Y^{\bs{s}_{n-1},s_n})$, $\bs{s}_n \in \{+,-\}^n,$ $n\geq 1$ with $Y^{\bs{s}_{n-1},s_n}$ defined according to \eqref{eq:minus_llr}; has therefore three parameters, namely $p^{\bs{s}_n} \triangleq \Pr(Y^{\bs{s}_n}=1)$, $z^{\bs{s}_n} \triangleq \Pr(Y^{\bs{s}_n}=0)$ and $m^{\bs{s}_n} \triangleq \Pr(Y^{\bs{s}_n}=-1)$. Without loss of generality, we assume $p\geq m$. Otherwise, one can negate the channel output to fulfil this condition. These parameters completely describe the distribution of $Y^{\bs{s}_n}$. Referring to \eqref{eq:minus_llr}, iterations of $(p,m,z)$ under $Q_\beta$ are given by \vspace{-0.1cm} \begin{equation}\label{eqn:updates3} \vspace{-0.1cm} \begin{split} p^{+}= p^2 + 2pz & \qquad p^{-} = p^2 + m^2\\ m^+ = m^2 + 2mz & \qquad m^-= 2mp\\ z^+ = z^2 + 2mp & \qquad z^-= 2z-z^2\text. \end{split} \end{equation} These iterations are the same as those in \cite{Urbanke}. It is possible to calculate $(p^{\bs{s}},m^{\bs{s}},z^{\bs{s}})$ for any ${\bs{s}} \in \{+,-\}^*$ with the above transformations. Note that these transformations preserve $p^{\bs{s}} \geq m^{\bs{s}}$. \subsection{Feasible Region for $Y^{\bs{s}}$} Our purpose is to track these parameters for the statistic $Y^{\bs{s}}$. At first sight, it may seem that $p^{\bs{s}}$, $m^{\bs{s}}$ and $z^{\bs{s}}$ can take any value in the set $\mathcal{R}_3 \triangleq \{(p,m,z):p\geq m,\ p+m+z = 1,\ p,m,z \geq 0\}$. However, this is not the case. If it is known that $Y^{\bs{s}}$ has gone through $+$ transformation once, there are some restrictions on the feasible region for its parameters. \begin{lemma}\label{lem:region} Define the limiting curve as the $(p,m)$ pairs with the following parametric equations: \begin{equation} \begin{split}\label{eqn:limiting_curve} p^*(t) &= \sqrt{4t^3-3t^4}\\ m^*(t)& = 1 - 3t + \frac 3 2 t^2 + \frac {p^*(t)} 2\text, \quad t \in [0,1]\text. \end{split} \end{equation} Let $\mathcal{R}_3^+ \triangleq \mathcal{R}_3 \cap \{0 \leq m \leq m^*(t),\ p = p^*(t),\ \forall t \in [0,1] \}$. Then, for any $\bs{s}_n \in \{+,-\}^n$, $n\geq 1$ \begin{itemize} \item[(i)] It is sufficient that $\bs{s}_n$ contains at least one $(+)$ to ensure that $(p^{\bs{s}_n},m^{\bs{s}_n}) \in \mathcal{R}_3^+$. \item[(ii)] If $(p^{\bs{s}_n},m^{\bs{s}_n}) \in \mathcal{R}_3^+$, then $(p^{\bs{s}_ns},m^{\bs{s}_ns}) \in \mathcal{R}_3^+$ for $s \in \{+,-\}$. In words, once $(p^{\bs{s}_n},m^{\bs{s}_n})$ is driven under the limiting curve, it remains there. \end{itemize} \end{lemma} Proof of Lemma \ref{lem:region} is given in Appendix \ref{pf:region}. \subsection{Polarization of Quantized Statistics}\label{sec:prob_setting} With a similar approach to those in \cite{Urbanke} and \cite{Arikan_polarization}, parameters of quantized statistics can be examined in a probabilistic setting. The setting is described below: \\ Fix $\Omega \triangleq \{+,-\}^*$ and let $\bs{S}_n = (S_1,S_2,\ldots,S_n)$ be a sequence of $n$ random variables where each $S_i$ is independently and uniformly distributed on $\{+,-\}$. Define the natural filtration $\{\mathcal{F}_n\}_{\mathbb{N}}$ with $\mathcal{F}_n \triangleq \sigma(\bs{S}_n)$, $n \geq 1$ and $\mathcal{F}_0 \triangleq \{\Omega,\emptyset\}$. Also define $\mathcal{F} \triangleq \sigma((S_n)_\mathbb{N})$. These ingredients completely define the probability space with filtration $(\Omega,\mathcal{F},\{\mathcal{F}_n\},\mathbb{P})$ and for a quantized statistic obtained in $n$ polarization steps, any of its parameter becomes an $\mathcal{F}_{n}$-measurable random variable, namely $P_n \triangleq p^{\bs{S_n}}$, $Z_n \triangleq z^{\bs{S_n}}$ and $M_n \triangleq m^{\bs{S_n}}$. Also note that any function of $D_n \triangleq (P_n,Z_n,M_n)$ becomes random. The quantized statistic $Y^{\bs{S}_n}$ can also be represented as a 'quantized' or 'degraded' synthetic BMS channel $\tilde W^{\bs{S}_n}$ with $$ \tilde {W}^{\bs{S}_n}(y|0) = \begin{cases} P_n, & y = 1\\ Z_n, & y = 0\\ M_n, & y = -1 \end{cases}\text. $$ It is known that any bounded submartingale or supermartingale converges almost surely (see, e.g. \cite{Martingales}). Therefore, if a function of $D_n$ is a submartingale or supermartingale, it may give information on whether polarization occurs. From this perspective, we list some consequences of the quantization procedure $Q_\beta$ in terms of probabilistic arguments. One can verify that $P_n$, $M_n$, $Z_n$ themselves exhibit submartingale/supermartingale properties \cite{Urbanke}. Moreover, the mutual information of $\tilde{W}^{\bs{s}_n}$, $$ I(\tilde{W}^{\bs{s}_n}) \triangleq (p^{\bs{s}_n}+m^{\bs{s}_n})\left(1-h\left(\frac{m^{\bs{s}_n}}{p^{\bs{s}_n}+m^{\bs{s}_n}}\right)\right) $$ is a supermartingale. This property follows simply from data processing inequality as the average mutual information is preserved without quantization. \begin{lemma}[\!\cite{Urbanke}, Lemma 4]\label{lem:polarize} The random variables $P_n$, $Z_n$, $M_n$ converge almost surely. Moreover, $Z_\infty \triangleq \lim_{n \to \infty} Z_n = 0$ or $1$, $P_\infty \triangleq \lim_{n \to \infty} P_n = 0$ or 1 and $M_\infty \triangleq \lim_{n \to \infty} M_n = 0$ almost surely. Namely, $Y^{\bs{S}_n}$ polarizes. \end{lemma} Lemma \ref{lem:polarize} simply follows from the fact that $Z_n$ is a submartingale and $M_n$ supermartingale. Knowing that the quantized statistics polarize, we elaborate on the question of what fraction of these statistics carry lossless information. We note that it is very hard to obtain an exact expression for this fraction. Let $\gamma$ denote the fraction of the lossless statistics. Lower and upper bounds for $\gamma$ can be obtained from the submartingale and supermartingale properties of some functions $f(D_n)$ with $f(1,0,0) = 1$ and $f(0,1,0) = 0$. Suppose $f(D_n)$ is a bounded submartingale (supermartingale), i.e., it satisfies $\frac{f(d^+)+f(d^-)} 2 \substack{\geq \\ (\leq)} f(d), \forall d \in \mathcal{R}_3$. Then $\gamma = \E {f(P_\infty,Z_\infty,M_\infty)} \substack{\geq \\ (\leq)} f(p,z,m)$, which shows that $f$ is useful to obtain an lower (upper) bound on $\gamma$. In \cite{Urbanke} it is shown that $I(W)^2 \leq \gamma \leq I(W)$ as $I(\tilde{W}^{\bs{S}_n})$ is a supermartingale and $I(\tilde{W}^{\bs{S}_n})^2$ submartingale. In addition, we have numerically found that $I^{1.24}(\tilde W^{\bs{S}_n})$ is submartingale if the process starts in $\mathcal{R}_3^+$. Hence, we have the following improved lower bound for $\gamma$. \begin{lemma}\label{lem:new_bound} If the original $(p,m)$ belongs to $ \mathcal{R}_3^+$, then $I^{1.24}(W)$ is a lower bound for $\gamma$. If not, then $\frac 1 2 {I^{1.24}(\tilde W^+)} + \frac 1 2 I^2(\tilde W^-)$ is a lower bound for $\gamma$. More precisely, define \begin{equation*} F_0(W) \triangleq \begin{cases} I^{1.24}(W), & (p,m) \in R_3^+\\ \frac 1 2 I^{1.24}(\tilde W^+) + \frac 1 2 I^2(\tilde W^-),& \text{else} \end{cases}\text. \end{equation*} Then, $F_0(W) \leq \gamma$. \end{lemma} \begin{corollary}\label{corr:new_bound_n}$F$ can be improved by increasing the number of polarization steps. Namely, define $$ F_n(W) \triangleq \begin{cases} \frac 1 {2^n} \sum_{\bs{s}_n \in \{+,-\}^n}I^{1.24}(\tilde W^{\bs{s}_n}),\\ \qquad(p,m) \in R_3^+\\ \frac 1 {2^n}\left(\sum_{\bs{s}_n \in \{+,-\}^n \setminus (-)^n}I^{1.24}(\tilde W^{\bs{s}_n}) + I^2(\tilde W^{(-)^n}\!)\!\right)\!\!,\\ \qquad \text{else} \end{cases}\text. $$ Then, $F_0(W) \leq F_n(W) \leq \gamma$. \end{corollary} The proposed method for calculation of the lower bound in \cite{Urbanke} relies on the fact that $\gamma$ is bounded from above and below as $\E{I^{2}(\tilde W^{\bs{S}_n})} \leq \gamma \leq \E{I(\tilde W^{\bs{S}_n})}$, and $\E{I(\tilde W^{\bs{S}_n})} - \E{I^2(\tilde W^{\bs{S}_n})} \leq \delta$ for some $\delta >0$ and large enough $n$. Therefore, one can obtain a confidence interval of $\delta$ for large $n$. Since $ \E{I(\tilde W^{\bs{S}_n})}-F_n(W)$ decreases faster, the same confidence interval $\delta$ can be achieved with smaller $n$ compared to the first method. This results in an improved calculation method for the lower bound. \subsection{Rate of Polarization} From the previous section, we know that the quantized statistics polarize. However, it is required that the error probability $P_e(\tilde W^{\bs{S}_n}) \triangleq M_n + \frac 1 2 Z_n$ of each perfect statistic decays fast enough, i.e. $o(2^{-n})$, to ensure reliable communication under the aforementioned quantization procedure. For the unquantized case, it is found in \cite{Telatar_Rate} that the Bhattacharyya parameter $Z_b(W^{\bs{S}_n})$, which is an upper bound to the error probability, decays as $O(2^{-2^{n/2}})$ and in \cite{Urbanke}, it is shown that $Z_b(\tilde W^{\bs{S}_n}) \triangleq 2\sqrt{P_nM_n} + Z_n$ decays as $O(2^{-2^{\alpha n}})$, $\alpha < \frac {\log 1.5} 2$ under $Q_\beta$ according to the previously given probabilistic setting. Since $(P_n,M_n) \in \mathcal{R}_3^+$ and thus $M_n \leq Z_n$ eventually, this also implies $Z_n$ and $M_n$ decay at least with the same rate. However, one cannot compare the decay rates of $Z_n$ and $M_n$ only knowing the decay rate of $Z_b(\tilde W^{\bs{S}_n})$. If $M_n$ decays much faster than $Z_n$, it is possible that the code constructed with $Q_\beta$ can be concatenated with an erasure-only code as an outer code for large $n$. Unfortunately, this is not the case. To show this, we present the following lemma and theorem, whose proofs are given in Appendices \ref{pf:process_R} and \ref{pf:rate} respectively. \begin{lemma}\label{lem:processR} For all $\epsilon_r > 0$, $$\lim_{n\to \infty} \mathbb{P} \left(\left|\frac{\log M_n}{\log Z_n} - \phi\right| \leq \epsilon_r \right)= \gamma\text,\quad\phi = \frac{1+\sqrt 5}{2}\text.$$ \end{lemma} Lemma \ref{lem:processR} suggests that with probability close to $\gamma$, $M_n$ and $Z_n$ decay with same rate. With the next theorem, we obtain the exact rate. \begin{theorem}\label{thm:rate} In limit, the random processes $Z_n$ and $M_n$ roughly behave as $O(2^{-2^{\alpha n}})$, $\alpha = \frac {\log \phi}{2}$ with probability close to $\gamma$. That is, for any $\delta,\delta'> 0$, \vspace{-0.2cm} $$ \lim_{n\to \infty} \mathbb{P}\left(2^{-2^{n\frac{\log \phi + \delta'}{2}}} \leq Z_n \leq 2^{-2^{n\frac{\log \phi - \delta}{2}}}\right)= \gamma \vspace{-0.2cm} $$ \centerline{and} \vspace{-0.2cm} $$ \lim_{n\to \infty} \mathbb{P}\left(2^{-2^{n\frac{\log \phi + \delta'}{2}}} \leq M_n \leq 2^{-2^{n\frac{\log \phi - \delta}{2}}}\right)= \gamma\text. $$ \end{theorem} Lemma \ref{lem:processR} and Theorem \ref{thm:rate} imply that $Z_n$ and $M_n$ decay at the same rate. Consequently, concatenation with an erasure-only code does not improve the error probability. Also note that the rate of polarization for this particular three-quantized case is bounded away from $O(2^{-2^{n/2}})$, which shows that longer codes are required to ensure reliable communication compared to the unquantized case. \section{D-Quantized Case} In this section, we consider static and dynamic quantization procedures $Q_{\beta}^{(D)}$, where $D = 2d+1$ is an odd number by definition. Note that $|\beta| = d $. Similar to the three-level case, we start with a BMS channel $W$ whose output $Y$ takes values in the set $\{0,\pm \lambda_1,\ldots,\pm \lambda_d\}$, $\lambda_i > 0$, $i \in [d]$. Define the parameters of the quantized statistic $Y^{\bs{s}_n}$ as $p_i^{\bs{s}_n}$ , $m_i^{\bs{s}_n}$ and $z^{\bs{s}_n}$ in a similar fashion to that in Section \ref{sec:3quantizedCase} and assume $p_i \geq m_i$. Also define $p^{\bs{s}_n} \triangleq \sum_{i=1}^d p^{\bs{s}_n}_i$ and $m^{\bs{s}_n}\triangleq \sum_{i=1}^d m^{\bs{s}_n}_i$. In general, it appears to be hard to obtain good lower bounds on the achievable rates for quantization procedures with output size greater than three. However, we have found that there are non-trivial $D$-static and $D$-dynamic quantization procedures that result in the same dynamics as the simple three-quantized case. We formally define these procedures below. \begin{definition}[Proper quantization procedures] A quantization procedure $Q_{\beta(\mathbb{P})}^{(D)}$ is proper if $\beta(\mathbb{P})_i \neq \beta(\mathbb{P})_j$ for all $i\neq j \in [d]$ and $\mathbb{P} \in \mathcal{P}$. In words, $\beta$ consists of distinct elements. \end{definition} Note that if a quantization procedure is not proper, then it is equivalent to another quantization procedure with $|\beta| < d$. \begin{lemma}\label{lem:properQ} There exists \begin{itemize} \item[(i)] a pair of proper $D$-static quantization procedures $Q_{\beta^+}$, $Q_{\beta^-}$ with $Y^+ = Q_{\beta^+}(Y + Y')$, $Y^- = Q_{\beta^-}(Y \boxplus Y')$ that results in the same dynamics as the three-quantized case, \item[(ii)] a single proper $D$-static quantization procedure $Q_\beta$ that results in the same dynamics as the three-quantized case. \end{itemize} \end{lemma} \begin{proof}[Proof Sketch] \begin{itemize} \item[(i)] Take any $$\beta^+ = \cup_{i=1}^d\{(\alpha_i, \alpha_i)\} ,\quad \beta^- = \cup_{i=1}^d\{(\alpha_i\boxplus \alpha_i, \alpha_i)\}$$ such that $0 < \alpha_1 <\alpha_i < 2\alpha_1$, $i \in [d]$, $i\neq 1$. \item[(ii)] Take $\beta = \cup_{i=1}^d\{(\alpha_i \boxplus \alpha_i, \alpha_i)\}$ such that $0 < \alpha_1 <\alpha_i < 2(\alpha_1 \boxplus \alpha_1)$, $i \in [d]$, $i\neq 1$. \end{itemize} Under these assumptions, one can verify that the resulting dynamics for both cases become the same as those in the formerly discussed three-quantized case. \end{proof} Lemma \ref{lem:properQ} shows that with a pair of two proper $D$-static quantization procedures, or with a single proper $D$-static quantization procedure, the system performance can be made equivalent to that in the simple three-quantized case. This also implies that there are proper $D$-dynamic quantization schemes with the same performance. Based on this fact, a lower bound on the achievable rates can be derived for $D$-quantization families. \begin{lemma}\label{lem:Dlower_bnd} Consider the function $F_n$ defined in Corollary \ref{corr:new_bound_n} for an $n \geq 0$. Then, the following claims hold: \begin{itemize} \item[(i)] With a pair of proper $D$-static quantization procedures $Q_{\beta^+}$ and $Q_{\beta^-}$, one can achieve rates greater than $$ R_{s,2}^{(D)}(W) \triangleq \max_{\stackrel{\alpha_1 \leq \alpha_2 \ldots \leq \alpha_d}{\stackrel{\alpha_d \leq 2\alpha_1}{\alpha_1 \boxplus \alpha_1\vee(\alpha_1/2) \leq \lambda_d}}} \frac{F_n(\tilde W^+) + F_n(\tilde W^-)}{2}\text, $$ where $\beta^+ = \cup_{i=1}^d\{(\alpha_i, \alpha_i)\} $ and $\beta^- = \cup_{i=1}^d\{(\alpha_i\boxplus \alpha_i, \alpha_i)\}\text. $ \item[(ii)] With a single proper $D$-static quantization procedure $Q_{\beta}$, one can achieve rates greater than $$ R_{s,1}^{(D)}(W) \triangleq \max_{\stackrel{\alpha_1 \leq \alpha_2 \ldots \leq \alpha_d}{\stackrel{\alpha_d \leq 2(\alpha_1 \boxplus \alpha_1)}{\alpha_1 \boxplus \alpha_1\leq \lambda_d}}} \frac{F_n(\tilde W^+) + F_n(\tilde W^-)}{2}\text, $$ where $\beta = \cup_{i=1}^d\{(\alpha_i\boxplus \alpha_i, \alpha_i)\}$. \item[(iii)] With a proper $D$-dynamic quantization procedure $Q_\beta$, one can achieve rates greater than $$ R_d^{(D)}(W) \triangleq \sup_{\stackrel{Q_{\beta(Y+Y')}\in \mathcal{Q}^{(D)}}{Q_{\beta(Y\boxplus Y')}\in \mathcal{Q}^{(D)}}} \frac{F_n(\tilde W^+) + F_n(\tilde W^-)}{2}\text, $$ where $Y^+ = Q_{\beta(Y+Y')}(Y+Y')$ and $Y^- = Q_{\beta(Y\boxplus Y')}(Y+Y')$. In other words, quantize $Y+Y'$ and $Y\boxplus Y'$ in the best possible way to maximize the objective function. \end{itemize} \end{lemma} \begin{proof} For (i) and (ii), take the procedures described in Lemma \ref{lem:properQ}. Since the evolution of the parameters are same as the three-quantized case after one polarization step, we use the same lower bound. The last inequalities are added to make the region compact. For (iii), we see that at any step, a proper dynamic quantization exists to ensure that the parameters evolve similarly to the three-quantized case. Quantization at first step is optimized to get a better lower bound. \end{proof} It is important to note that the special quantization schemes considered in the proof of Lemma \ref{lem:properQ} ensure that the quantized statistics polarize as the resulting dynamics are equivalent to that in three-level case. At first glance, it is not obvious that the statistics polarize for any admissible quantization procedure. Surprisingly, the quantized statistics polarize in a weaker manner under any admissible static or dynamic quantization procedure. \begin{theorem}\label{thm:Dpolarize} Consider the probabilistic setting in Section \ref{sec:prob_setting} and define $P_{i,n} \triangleq p_i^{\bs{S}_n}$, $M_{i,n} \triangleq m_i^{\bs{S}_n}$ for all $i \in [d]$. Then, for all static or dynamic quantization procedures in $\mathcal{Q}$, $Z_n$ converges to $0$ or $1$ almost surely and for any $i$, $P_{i,n}M_{i,n}$ converges to $0$ in probability. \end{theorem} \begin{proof} We use the abbreviations $X_n \stackrel{\text{a.s.}}{\to} c$ and $X_n \stackrel{P}{\to} c$ to denote that $X_n$ converges to $c\in \mathbb{R}$ almost surely or in probability respectively. For every static or dynamic $Q_\beta \in \mathcal{Q}$, it is known that $Q_\beta(0) = 0$. This implies that if $Y = 0$ or $Y'=0$ then $Y^- = Q_\beta(Y \boxplus Y') = 0$ and if $Y,Y' = 0$ or $Y = -Y'$ then $Y^+ = Q_\beta(Y + Y') = 0$. One thus obtains \vspace{-0.1cm} $$ z^- \geq 2z-z^2,\quad z^+ \geq z^2 + 2\sum_{i = 1}^d p_im_i\text. \vspace{-0.1cm} $$ Therefore, $Z_n$ is a bounded submartingale as $\E{Z_{n+1}|\mathcal{F}_{n}} \geq Z_n + \sum_{i = 1}^d P_{i,n}M_{i,n}$. Considering the $-$ transformation and following the same steps in \cite{Arikan_polarization}, we obtain \begin{align*} \E{|Z_{n+1} - Z_n|} &\geq \frac 1 2\E{Z_n^- - Z_n} \geq \frac 1 2\E{Z_n-Z_n^2}\text. \end{align*} Since $\lim_n \E{|Z_{n+1} - Z_n|} = 0$ and $Z_n$ converges almost surely, $Z_n \stackrel{\text{a.s.}}{\to} 0\text{ or }1$. Studying the $+$ transformation instead, we obtain \begin{align*} \E{|Z_n^+ - Z_n|} = \E{\left|Z_n^2-Z_n + 2\sum_{i=0}^d P_{i,n}M_{i,n} + J_n \right|}\text, \end{align*} where $J_n$ is an $\mathcal{F}_{n}$-measurable non-negative remainder term. With a similar reasoning, we know that the right hand side goes to zero as $n$ tends to infinity. This implies that $Z_n^2-Z_n + 2\sum_{i=0}^d P_{i,n}M_{i,n} + J_n\stackrel{P}{\to} 0 $. $Z_n^2-Z_n\stackrel{\text{a.s.}}{\to} 0$ implies $Z_n^2-Z_n \stackrel{P}{\to} 0$. It is well-known that if $X_n \stackrel{P}{\to} x$ and $Y_n \stackrel{P}{\to} y$ for some constants $x$ and $y$, then $X_n+Y_n \stackrel{P}{\to} x+y$. From this fact, we conclude that $2\sum_{i=0}^d P_{i,n}M_{i,n} + J_n \stackrel{P}{\to} 0$ as well. Since both $2\sum_{i=0}^d P_{i,n}M_{i,n} $ and $J_n$ are non-negative random variables, we have $\sum_{i=0}^d P_{i,n}M_{i,n} \stackrel{P}{\to} 0$ and $P_{i,n}M_{i,n} \stackrel{P}{\to} 0$ for all $i \in [d]$. \end{proof} Theorem \ref{thm:Dpolarize} has significance in practice as it implies Tal-Vardy construction in \cite{Tal_Vardy} under the assumption that zero is an absorbing support, any quantization scheme as in \cite{Urbanke} and many other schemes weakly polarize. The weak polarization implies that for sufficiently large $n$, some fraction of synthetic channels meet the condition that $\tilde W^{\bs{s}_n}(y|0)$ and $\tilde W^{\bs{s}_n}(y|1)$ have almost non-overlapping supports. If one is allowed to remap the supports and change the quantization procedure once at some $n$, one can show that the quantized statistics can be forced to polarize strongly. \begin{lemma}\label{lem:FinalPolarize} Assume $Z_\infty = 0$ with probability $\gamma_Z > 0$, i.e., a non-zero fraction $\gamma_Z$ of quantized statistics tend to become non-zero with probability 1. Given $\epsilon,\delta >0$ and $\delta \leq \gamma_Z$, one can ensure that the quantized statistics polarize and at least $(\gamma_Z-\delta)(1-\epsilon-2\sqrt{d}\epsilon^{1/4})^2$ fraction of the statistics will eventually become perfect by remapping of supports and changing the procedure to the simple three-quantized case after some $n_0(\delta,\epsilon)$. \end{lemma} \begin{proof} Given $\epsilon,\delta$, Theorem \ref{thm:Dpolarize} implies the existence of an $n_0$ such that $$ \mathbb{P}(Z_n \leq \epsilon, P_{i,n}M_{i,n} \leq \epsilon,\ i \in [d]) \geq \gamma_Z -\delta,\quad n \geq n_0\text. $$ We consider $\bs{s}_n \in \{+,-\}^n$ such that the condition in the above event holds. For such $\bs{s}_n$, $p^{\bs{s}_n}_i \wedge m^{\bs{s}_n}_i \leq \sqrt{\epsilon}$ for all $i \in [d]$. At $n_0$, we remap the support such that $m^{\bs{s}_n}_i \gets p^{\bs{s}_n}_i \wedge m^{\bs{s}_n}_i$ and we switch to the simple three-level quantization procedure $Q_\beta$, $\beta = \{(0,1)\}$. This will ensure that $m^{\bs{s}_n} \leq d\sqrt{\epsilon}$. Under these conditions the Bhattacharyya parameters are bounded as $Z_b(\tilde W^{\bs{s}_n}) \triangleq z^{\bs{s}_n} + 2\sqrt{p^{\bs{s}_n}m^{\bs{s}_n}} \leq \epsilon + 2\sqrt{d}\epsilon^{1/4}$. For BMS channels, it is known that $I(W) \geq 1-Z_b(W)$, thus $I(\tilde W^{\bs{s}_n}) \geq 1-\epsilon - 2\sqrt{d}\epsilon^{1/4}$. Observe that the specific three-quantized case polarizes strongly. Now we use the simple lower bound $I(W)^2$ to show that at least $(\gamma_Z-\delta)(1-\epsilon-2\sqrt{d}\epsilon^{1/4})^2$ fraction of channels will eventually become perfect. \end{proof} Note that the three-quantized case assures that the block error probability behaves roughly as $O(2^{-\sqrt{N}^{\log\phi}})$. Together with Lemma \ref{lem:FinalPolarize}, it implies that one achieves reliable communication at rates arbitrarily close to $\gamma_Z$ by constructing and decoding polar codes with $D$-level quantization procedures, if it is allowed to change the procedure and remap the supports once at an arbitrary $n$. As a final note, we remark that if the quantization procedures take some special form, e.g., if they ensure that the quantized statistics are LLRs as in \cite{Tal_Vardy}, then the remapping of the support is not needed since $M_n \leq P_n$ always. \bibliographystyle{IEEEtran}
\section{Introduction} The goal of Linear Independent Component Analysis (ICA) is to find such a unmixing function of the given data that the resulting representation has statistically independent components. Common tools solving this problem are based on maximizing some measure of nongaussianity, e.g. kurtosis \Citep{hyvarinen1999fast,bell1995information} or skewness~\Citep{spurek2017ica}. Clearly, an obvious limitation of those approaches is the assumption of linearity, as the real world data usually contains complicated and nonlinear dependencies (see for instance \Citep{larson1998radio,ziehe2000artifact}). Designing an efficient and easily implementable nonlinear analogue~of~ICA~is~a~much~more complex problem than its linear counterpart. A crucial complication is that without any limitations imposed on the space of the mixing functions the problem of nonlinear-ICA is ill-posed, as there are infinitely many valid solutions \Citep{hyvarinen1999nonlinear}. As an alternative to the fully unsupervised setting of the nonlinear~ICA one can assume some prior knowledge about the distribution of the sources, which allows to obtain identifiability \Citep{hyvarinen2016unsupervised,hyvarinen2019nonlinear}. Several algorithms exploiting this property have been recently proposed, either assuming access to segment labels of the sources \Citep{hyvarinen2016unsupervised}, temporal dependency of the sources \Citep{hyvarinen2017nonlinear} or, generally, that the sources are conditionally independent, and the conditional variable is observed along with the mixes \Citep{hyvarinen2019nonlinear, khemakhem2019variational}. However it may be sometimes hard to generalize those approaches in fully unsupervised setting where some prior knowledge is unavailable or the qualities of the data itself preserve unknown for the researcher. An additional complication in devising nonliear-ICA algorithms lies in proposing an efficient measure of~independence, which optimization would encourage the model to disentangle the components. One of the most common nonlinear method is MISEP \Citep{almeida2003misep} which, similar to the popular INFOMAX algorithm \Citep{bell1995information}, uses the mutual information criterion. In consequence, the procedure involves the~calculation of the Jacobian of the modeled nonlinear transformation, which often causes a computational overhead when both the input and output dimensions are large. Another approach is applied in~NICE (Nonlinear Independent Component Estimation) \Citep{dinh2014nice}. Authors propose a fully invertible neural network architecture where the Jacobian is trivially obtained. The independent components are then estimated using the maximum likelihood criterion. The drawback of both MISEP and NICE is that they require choosing the prior distribution family of the unknown independent components. An alternative approach is given by ANICA (Adversarial nonlinear ICA) \Citep{brakel2017learning}, where the independence measure is directly learned in each task with the use of GAN-like adversarial method combined with an an~autoencoder architecture. However, the introduction of a GAN-based independence measure results in an often unstable adversarial training. In this paper we present a competitive approach to nonlinear independent components analysis~--~\mbox{WICA}{} (Nonlinear Weighted~ICA). Crucial role in our approach is played by the conclusion from~\Citep{bedychaj2019independent}, which proves that to verify nonlinear independence it is sufficient to~check the linear independence of the normally weighted dataset, see Fig. \ref{fig:cov}. Based on this result we introduce {\em weighted indepedence index ($\textbf{wii}{}$)} which relies on computing weighted covariance and~can be applied to the verification of the nonlinear independence, see Section~\ref{section:wc}. Consequently, the constructed \mbox{WICA}{} algorithm is based on simple operations on matrices, and therefore~is~ideal~for~GPU~calculation and parallel processing. We construct it by incorporating the introduced cost function in a commonly used in ICA problems auto-encoder framework \Citep{brakel2017learning,le2011ica}, where the~role of the decoder is to limit the unmixing function so that the~learned by the encoder independent components contained the~information needed to reconstruct the inputs, see Section~\ref{sec:algorithm}. We verified our algorithm in the case of a source signal separation problem. In Section \ref{sec:experiments}, we presented the results of \mbox{WICA}{} for nonlinear mixes of images and for the decomposition of electroencephalogram signals. It occurs that \mbox{WICA}{} outperforms other methods of nonlinear ICA, both with respect to unmixing quality and the stability of the results, see Fig.~\ref{fig:spearman_1}. To fairly evaluate various nonlinear ICA methods in the case of~higher dimensional datasets, we introduce a measure index called \mbox{OTS}{} based on Spearman's rank correlation coefficient. In the definition of~\mbox{OTS}{}, similarly to the clustering accuracy (ACC) \Citep{cai2005document,cai2010locally}, we~used optimal transport to obtain the minimal mismatch cost. This approach has its merit here, since the~correspondence between the~input coordinates and the reconstructed components in a higher dimensional space is nontrivial. Another important ingredient of this paper is the introduction of~a~new and fully invertible nonlinear mixing function. In the case of linear ICA, one can easily construct many experiment settings that can be used in order to evaluate and compare different methods. Such standards are unfortunately not present in the case of nonlinear~ICA. Therefore it is not clear what kind of nonlinear mixing should be used in the benchmark experiments. In most cases the authors usually use mixing functions, which correspond with the models architecture \Citep{almeida2003misep,brakel2017learning}. In contrast to such methodology, we propose a new iterative nonlinear mixing function based on the flow models \Citep{dinh2014nice, glow}. This method does not relates to internal design of our network architecture, is invertible and allows for chaining the task complexity by varying the number of iterations, making it a useful tool in verification of the nonlinear ICA models. \section{Weighted independence index} \label{section:wc} Let us consider a random vector $\mathbf{X}$ in $\mathbb{R}^d$ with density $f$. Then $\mathbf{X}$ has independent components iff $f$ factors as $$ f\left(x_1,x_2, \ldots,x_d\right)=f_1(x_1) \cdot f_2(x_2) \cdot \ldots \cdot f_d(x_d), $$ for some densities $f_i$, where $i\in \{1,2,\ldots,d\}$. Those functions are called marginal densities of $f$. A related, but much weaker notion, is the uncorrelatedness. We say that $\mathbf{X}$ has uncorrelated components, if the covariance of $\mathbf{X}$ is diagonal. Contrary to the independence, correlation has fast and easy to compute estimators. Components independence implies uncorrelatedness, but the opposite is not valid, see Fig.~\ref{fig:cov}. \begin{figure}[!h] \centering \includegraphics[width=0.49\linewidth]{img/cov_1.png} \includegraphics[width=0.49\linewidth]{img/cov_5.png} \caption{Sample from a random vector which Pearson’s correlation is equal to zero (left), but the components are not independent. Since the components are not independent, one can choose Gaussian weights so that Pearson’s correlation of weighted dataset~is~not~zero~(right).} \label{fig:cov} \end{figure} Let us mention that there exist several measures which verify the~independence. One of the most well-known measures of independence of random vectors is the {\em distance correlation} (dCor) \Citep{szekely2007measuring}, which is applied in \Citep{matteson2017independent} to solve the linear ICA problem. Unfortunately, to verify the independence of components of the~samples, dCor~needs~$2^d N^4$~comparisons, where $d$ is the dimension of the sample and $N$ is the sample size. Moreover, even a simplified version of dCor which checks only pairwise independence has high complexity and does not obtain very good results (which can be seen in experiments from Section \ref{sec:experiments}). This motivates the research into fast, stable and efficient measures of indepedence, which are adapted to GPU processing. \subsection{Introducing the \textbf{wii}{} index} In this subsection we fill this gap and introduce a method of verifying independence which is based on the covariance of the weighted data. The covariance scales well with respect to the sample size and data dimension, therefore the proposed covariance-based index inherits similar properties. To proceed further, let us introduce weighted random vectors. \begin{definition} Let $w:\mathbb{R}^d \to \mathbb{R}_+$ be a bounded weighting function. By $\mathbf{X}_w$ we denote a weighted random vector with a density\footnote[3]{This is just the normalization of $w(x) f(x)$.} $$ f_w(x)= \frac{w(x)f(x)}{\int w(z)f(z)dz}. $$ \end{definition} \begin{observation} \label{pr:1} Let $\mathbf{X}$ be a random vector which has independent components, and let $w$ be an arbitrary weighting function. Then $\mathbf{X}_{w}$ has independent components as well. \end{observation} One of the main results of \Citep{bedychaj2019independent} is that the strong version of the~inverse of the above theorem holds. Given $m \in \mathbb{R}^d$, we consider the~weighting of $\mathbf{X}$ by the standard normal gaussian with center at $m$ ($\mathrm{N}(m,\mathbb{I})$): $$ \mathbf{X}_{[m]}=\mathbf{X}_{\mathrm{N}(m,\mathbb{I})}. $$ We quote the following result which follows directly from the proof of Theorem 2 from \Citep{bedychaj2019independent}: \begin{theor} \label{theorem:1} Let $\mathbf{X}$ be a random vector, let $p \in \mathbb{R}^d$ and $r>0$ be arbitrary. If $\mathbf{X}_{[q]}$ has linearly independent components for every $q \in B( p,r)$, where $B(p,r)$ is a ball with center in $p$ and radius $r$, then $\mathbf{X}$ has the~independent components. \end{theor} Given sample $X=(x_i) \subset \mathbb{R}^d$, vector $p \in \mathbb{R}^d$, and weights $w_i = \mathrm{N}(p,\mathbb{I})(x_i)$, we define the weighted sample as: $$ X_{[p]}=(x_i,w_i). $$ Then the mean and covariance for the weighted sample \mbox{$X_{[p]}=(x_i,w_i)$} is given by: $$ \mathrm{mean} X_{w}=\frac{1}{\sum_i w_i}\sum_i w_i x_i $$ and $$ \mathrm{cov} X_{w}=\frac{1}{\sum_i w_i}\sum_i w_i (x_i-\mathrm{mean} X_w)^T(x_i-\mathrm{mean} X_w). $$ The informal conclusion from the above theorem can be stated as follows: \textit{if $\mathrm{cov} X_{[p]}$ is (approximately) diagonal for a sufficiently large set of $p$, then the sample $X$ was generated from a distribution with independent components.} Let us now define an index which will measure the distance from being independent. We define the {\em weighted independence index} $\left(\textbf{wii}(X,p)\right)$ as $$ \textbf{wii}(X,p)=\frac{2}{d(d-1)} \sum_{i<j} c_{ij}, $$ where $d$ is the dimension of $X$ and $$ c_{ij}=\frac{2z_{ij}^2}{z_{ii}^2+z_{jj}^2}, $$ for $Z=[z_{ij}]=\mathrm{cov} X_{[p]}.$ \begin{observation} Let us first observe that $c_{ij}$ is a close measure to the correlation $\rho_{ij}$, namely: $$ c_{ij} \leq \rho^2_{ij}, $$ where the equality holds iff the $i$-th and $j$-th components in $X_{[p]}$ have equal standard deviations. \end{observation} \begin{proof} Obviously $$ \rho^2_{ij}=\frac{z_{ij}^2}{z_{ii} \cdot z_{jj}}. $$ Since $ab \leq \frac{1}{2}(a^2+b^2)$ (where the equality holds iff $a=b$), we obtain the assertion of the observation. \end{proof} Consequently, $\textbf{wii}(X,p)=1$ iff all components of $X_{[p]}$ are linearly dependent and have equal standard deviations. Thus, the minimization of $\textbf{wii}$ simultaneously aims at maximizing the independence and increasing the difference between the standard deviations. We extend the index for a sequence of points $\{p_1,p_2,\ldots,p_n\}$ , as the mean of the indexes for each $p_i$: $$ \textbf{wii}(X;\{p_1,p_2,\ldots,p_n\})=\frac{1}{n}\sum_{i=1}^n\textbf{wii}(X,p_i). $$ \subsection{Selecting the weighting points} \label{sec:weightpoints} To implement the weighted independence index in practice, we need to find the optimal choice of weighting centers $(p_i)$. First, we assume that the dataset in question is normalized componentwise (in particular, variance of each coordinate is one). We argue that the right choice of $(p_i)$ should satisfy the following two conditions: \begin{itemize} \item selected weights do not concentrate on a small percentage of the~data, \item for different centers selected from the dataset, weights diversify the data points. \end{itemize} At first glance, it would seem that the simplest choice for points $(p_i)$ is to sample them from the standard normal distribution. However, the conducted by us preliminary experiments (see Fig. \ref{fig:co}) demonstrate that sampling from $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$ would be a better choice. \begin{figure} \centering \includegraphics[width=0.7\linewidth]{img/p_1.png} \caption{In the experiment, we sampled twenty points from $\mathrm{N}(0,\mathbb{I})$~\mbox{(x-axis)}. Then, we calculate weights of the points respectively to $\mathrm{N}(0,\mathbb{I})$ and $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$. We present values of those weights (sorted decreasingly) in the case when the center is chosen according to \mbox{$\mathrm{N}(0,\mathbb{I})$ vs. $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$}. One can see that weights derived from $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$ actually balance more data points, in contrary to $\mathrm{N}(0,\mathbb{I})$ which focus on smaller amount of data ($\mathrm{N}(0,\mathbb{I})$ converges to~0~earlier). }\label{fig:co} \end{figure} Consider the case when the data come from the standard normal distribution. For given weights $w$ and density $f$ we define measure $P(w,f)$ as: \begin{equation} P(w,f)=\frac{\left(\int w(x) f(x) dx\right)^2}{\int w^2(x) f(x) dx}. \label{eq:P_measure} \end{equation} Observe that if $w$ is constant on a subset $U$ of some space $S$ (for which functions $w$ and $f$ are well-defined) and zero otherwise, then the above reduces to $\mu(U)$, where $\mu$ is counting measure. Intuitively, \textit{$P(w,f)$ returns the percentage of the population which has nontrivial weights.} Let us consider the case when $\mu$ is given by the standard normal density $$ w(x)=\mathrm{N}(p,\mathbb{I})(x) $$ and our dataset is normalized as stated above. Then, directly from~(\ref{eq:P_measure}), one obtains: $$ P(w,f)=\frac{\left(\int \mathrm{N}(p,\mathbb{I})(x) \mathrm{N}(0,\mathbb{I})(x)dx\right)^2}{\int \mathrm{N}(p,\mathbb{I})^2(x)\mathrm{N}(0,\mathbb{I})(x)dx } $$ Applying the formula for the product of two normal densities: $$ \mathrm{N}(m_1,\Sigma_1)(x) \cdot \mathrm{N}(m_2,\Sigma_2)(x) \, =c_c\mathrm{N}(m_c,\Sigma_c)(x), $$ where $$ c_c=\mathrm{N}(m_1-m_2,\Sigma_1+\Sigma_2)(0), $$ $$\Sigma_c=(\Sigma_1^{-1}+\Sigma_2^{-1})^{-1},$$ and $$m_c=\Sigma_c(\Sigma_1^{-1}m_1+\Sigma_2^{-1} m_2),$$ we get: $$ \int \mathrm{N}(p,\mathbb{I})(x) \mathrm{N}(0,\mathbb{I})(x)dx=\mathrm{N}(p,2\mathbb{I})(0), $$ for the numerator, and $$ \int \mathrm{N}\left(p,\mathbb{I}\right)^2(x)\mathrm{N}(0,\mathbb{I})(x)dx=\mathrm{N}(0,2\mathbb{I})(0) \mathrm{N}\left(p,\tfrac{3}{2}\mathbb{I}\right)(0). $$ for the denominator. The equation for the denominator follows from the simple fact that: $$ \mathrm{N}(p,\mathbb{I})^2(x)=\mathrm{N}(0,2\mathbb{I})(0) \cdot \mathrm{N}\left(p,\tfrac{1}{2}\mathbb{I}\right)(x), $$ Summarizing, we obtain that \begin{equation} \label{eq:eq2} \begin{split} P(\mathrm{N}(p,\mathbb{I}),\mathrm{N}(0,\mathbb{I})) & = \frac{\mathrm{N}(p,2\mathbb{I})^2(0)}{\mathrm{N}(0,2\mathbb{I})(0) \mathrm{N}\left(p,\tfrac{3}{2}\mathbb{I}\right)(0)} \\ & = \left(\tfrac{3}{4}\right)^{D/2} \exp\left(-\tfrac{1}{6}\|p\|^2\right). \end{split} \end{equation} Normalizing (\ref{eq:eq2}) by its maximum obtained at $0$, we get $$ \exp\left(-\tfrac{1}{6}\|p\|^2\right). $$ Clearly if $p$ would be chosen from the standard normal distribution, the value of $\|p\|^2$ for large dimensions equals approximately $d$, and consequently the weights for the randomly chosen points will become concentrated at a single point (see Fig \ref{fig:co}). To obtain the quotient approximately constant, we should choose $p$ so that its norm is approximately one. Hence, it leads to the choice of $p$ from the distribution $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$. One can observe, that if $\mathbf{X} \sim \mathrm{N}(0,\mathbb{I})$, then we can sample from $\mathrm{N}\left(0,\tfrac{1}{d}\mathbb{I}\right)$ by taking the mean of $d$ randomly chosen vectors from $\mathbf{X}$. This leads to the following definition: \begin{definition} For the dataset $X \subset \mathbb{R}^d$, we define $$ \textbf{wii}(X)=\mathbb{E} \{\textbf{wii}(Y,p): \mbox{$p$ a mean of random $d$ elements of $Y$}\}, $$ where $Y$ is a componentwise normalization of $X$ and $\mathbb{E}$ stands for expected value. \end{definition} Let us summarize why centering the weights at the mean of $d$ elements from the dataset has good properties: \begin{itemize} \item if the data is restricted to some subspace $S$ of the space, then mean also belongs to $S$; \item if the data comes from normal distribution $\mathrm{N}(m,\Sigma)$, then mean of $d$ elements comes from $\mathrm{N}\left(m,\tfrac{1}{d}\Sigma\right)$, \item if the data has heavy tails (i.e. comes from Cauchy distribution), then~the~distribution of mean for $d$ elements set can be close to the original dataset mean. \end{itemize} \section{The WICA algorithm} \label{sec:algorithm} In this section we propose the \mbox{WICA}{} algorithm for nonlinear ICA decomposition which exploits the $\textbf{wii}(X)$ index in practice. Following \Citep{brakel2017learning}, we use an auto-encoder (AE) architecture, which consists of an encoder function $\mathcal{E}:~\mathbb{R}^d~\to~\mathcal{Z}$ and a complementary decoder function $\mathcal{D}:\mathcal{Z} \to \mathbb{R}^d$. The role of the encoder is to learn a transformation of the data that unmixes the latent components, utilizing some measure of independence (we use the $\textbf{wii}(X)$ index). The decoder is responsible for limiting the encoder, so that the learned representation does not lose any information about the input. In practice, this is implemented by simultaneously minimizing the reconstruction error: $$\mathrm{rec\_error}(X;\mathcal{E},\mathcal{D})=\sum_{i=1}^d \|x_i-\mathcal{D}(\mathcal{E} x_i)\|^2.$$ Reducing the difference between the input and the output is crucial to recover unmixing mapping close to inverse of the mixing one. Thus our final cost function is given by \begin{equation} \mathrm{cost}(X;\mathcal{E},\mathcal{D})=\mathrm{rec\_error}(X;\mathcal{E},\mathcal{D})+\beta \textbf{wii}(\mathcal{E} X). \label{eq:cost_function} \end{equation} where $\beta$ is a hyperparameter which aims to weight the role of reconstruction with that of independence (analogous~to~\mbox{$\beta$-VAE}~\Citep{Higgins2017betaVAELB}). The~training procedure follows the steps: \begin{algorithm}[H] \caption{\mbox{WICA}{}}\label{alg:algorithm_wica} \begin{enumerate} \item Take mini-batch $X'$ from the dataset $X$. \item Normalize componentwise $\mathcal{E} X'$, to obtain $Y$ \item Compute $p_1,\ldots,p_d$, where $p_i$ is the mean of randomly chosen~$d$~elements from $Y$, \item Minimize: $$ \mathrm{rec\_error}(X';\mathcal{E},\mathcal{D}) + \beta \textbf{wii}(Y;p_1,\ldots,p_d). $$ \end{enumerate} \end{algorithm} \section{Nonlinear mixing} \label{sec:mixing} Let us start with a discussion of possible definitions of the nonlinear mixing function used for benchmarking the ICA methods. In the beginning we shortly explain some approaches used in the linear ICA, and then move forward to propose a mixing which benefits from properties desired in the comparison of the results obtained by nonlinear ICA algorithms. In the case of linear ICA the experiments are usually conveyed on an artificial dataset, which is obtained by mixing two or more of~independent source signals. This allows for the comparison of~the~results returned by the analyzed methods with the original independent components. In the real-world applications such a procedure is of~course infeasible, but in experimental setting it provides a good basis for~benchmarking different models. In classical ICA setup, creating an artificial mixing function is equivalent to selecting a random invertible matrix $A$, such that $X=A\cdot S$, where $S$ are the true sources and $X$ are the observations, which are then passed to the evaluated methods. Such mixing is used by \Citep{bedychaj2019independent,hyvarinen1999fast,spurek2017ica}. Unfortunately, there do not exist any mixing standards for the nonlinear ICA problem. A common setup of the comparable environments needed to test the nonlinear models of ICA is to interlace linear mixes of signals with nonlinear functions \Citep{almeida2003misep, brakel2017learning}. During our experiments we found that the proposed methods of nonlinear mixes are ineffective in large dimensions. The aforementioned approaches usually apply only a shallow stack of linear projections followed by a nonlinearity. In consequence, the obtained observations are either close to the linear mixing (and therefore not hard enough to be properly challenging for the linear models) or become degenerate (i.e.~all~points cluster towards zero). Results of such mixing techniques are presented on Fig. \ref{lattice_anica}. \begin{figure} \centering \subfigure[PNL - Iteration 1]{ \includegraphics[width=0.22\linewidth]{anica_mieszanie_krata/ANICA_2D_pnl_1.png} } \subfigure[PNL - Iteration 3]{ \includegraphics[width=0.22\linewidth]{anica_mieszanie_krata/ANICA_2D_pnl_3.png} } \subfigure[MLP - Iteration 1]{ \includegraphics[width=0.22\linewidth]{anica_mieszanie_krata/ANICA_2D_mlp_1.png} } \subfigure[MLP - Iteration 3]{ \includegraphics[width=0.22\linewidth]{anica_mieszanie_krata/ANICA_2D_mlp_3.png} } \caption{Results of the nonlinear mixing techniques proposed in \Citep{brakel2017learning} on a normalized synthetic lattice data. Post nonlinear mixing model~(PNL) introduced only slight nonlinearities, which are not hard enough to solve even for the linear algorithms. On the other hand, the multi-layer perceptron mixing (MLP) technique collapses after just couple of iterations.} \label{lattice_anica} \end{figure} \begin{figure} \centering \subfigure[Iteration 0]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_0.png} } \subfigure[Iteration 10]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_10.png} } \subfigure[Iteration 20]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_20.png} } \subfigure[Iteration 30]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_30.png} } \subfigure[Iteration 40]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_40.png} } \subfigure[Iteration 50]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_50.png} } \subfigure[Iteration 60]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_60.png} } \subfigure[Iteration 70]{ \includegraphics[width=0.22\linewidth]{odwzorowania_krata/dummy_data_neural_net_70.png} } \caption{Results of our proposition of mixing over normalized synthetic lattice data. One may observe that after multiple iterations of the proposed mixing, results become highly nonlinear but not degenerate into any obscure solutions known from previous setup. }\label{lattice} \end{figure} Because of aforementioned disadvantages we propose our own mixing, inspired by \Citep{glow, dinh2014nice} network architecture. Let $S$ be a sample of~vectors with independent components. We apply a random isometry on $S$, by taking $X=\left(UV^T\right)S$, where $UV^T$ comes from the Singular~Value~Decomposition on a random matrix $A_{ij}\sim \mathrm{N}(0,1)$. Next we split $X \in \mathbb{R}^d$ into half \begin{equation*} (x_i,x_j) \to \left(x_i,x_j+\phi(x_i)\right) \label{eq:nonlin_mixing}, \end{equation*} similarly as it was done in \Citep{glow}. Function $\phi$ is a randomly initialized neural network with two hidden layers and $\tanh$ activations after each of them. This approach can be iterated over multiple times to achieve the desired level of nonlinear mixing. Mixing procedure can be described in an algorithmic way: \begin{algorithm}[H] \caption{Nonlinear mixing} \begin{flushleft} Take dataset $S_0$. \end{flushleft} \begin{enumerate} \item Take random isometry: \begin{enumerate} \item Take $A$ from $\mathrm{N}{(0,\mathbb{I})}$, such that $a_{ij} \sim \mathrm{N}{(0,1)}$ \item Take SVD of $A$, such that $A=U\Sigma V^T$ \item Return $UV^T$ \end{enumerate} \item Take $X=\left(UV^T\right)S_0$ \item Split $X \in \mathbb{R}^D$ in half: $$ (x_i,x_j) \to \left(x_i,x_j+\phi(x_i)\right) $$ where $\phi$ is a randomly initialized neural network and $x_i, x_j$ come from the split of~$X$ into half. \item Return $X_1=AX$ \end{enumerate} \end{algorithm}\label{alg:nonlin_mixing} One can easily increase the number of mixes and interlude splits of~$X$ in~reverse order so that $(x_i,x_j) \to \left(x_i+\phi(x_j), x_j\right)$ for even and \break $(x_i,x_j) \to \left(x_i,x_j+\phi(x_i)\right)$ for odd iterate. The effects of applying the proposed mixing to two-dimensional data are presented in Fig.~\ref{lattice}. Our mixing procedure scales well in higher dimensions by iterating over the splits in $\mathbb{R}^d$. Additionally, it is also easily invertible, therefore there is a guarantee that the source components may be~retrieved. \begin{figure*}[!h] \centering \begin{tabular}[t]{cc} 2 dimensions & 4 dimensions \\ \includegraphics[width=0.49\linewidth]{eksperyment_z_miarami/krata_searman_vs_max_corr_dim_2.png} & \includegraphics[width=0.49\linewidth]{eksperyment_z_miarami/krata_searman_vs_max_corr_dim_4.png} \\ 6 dimensions & 8 dimensions \\ \includegraphics[width=0.49\linewidth]{eksperyment_z_miarami/krata_searman_vs_max_corr_dim_6.png} & \includegraphics[width=0.49\linewidth]{eksperyment_z_miarami/krata_searman_vs_max_corr_dim_8.png} \end{tabular} \caption{Results of the experiment where in $n$--dimensional mixed observation one component was swapped with a randomly chosen source signal. One may observe that $max\_corr$ almost always prefers such situation, while \mbox{OTS}{} seems to be more rigorous. }\label{spearmanVSmaxcorr} \end{figure*} \begin{figure*}[!h] \centering \begin{tabular}[t]{cc} 2 dimensions & 4 dimensions \\ \includegraphics[width=0.49\linewidth]{eksperymenty_z_miarami_pelne_mieszanie/krata_pelne_searman_vs_max_corr_dim_2.png} & \includegraphics[width=0.49\linewidth]{eksperymenty_z_miarami_pelne_mieszanie/krata_pelne_searman_vs_max_corr_dim_4.png} \\ 6 dimensions & 8 dimensions \\ \includegraphics[width=0.49\linewidth]{eksperymenty_z_miarami_pelne_mieszanie/krata_pelne_searman_vs_max_corr_dim_6.png} & \includegraphics[width=0.49\linewidth]{eksperymenty_z_miarami_pelne_mieszanie/krata_pelne_searman_vs_max_corr_dim_8.png} \\ \end{tabular} \caption{Results for the \mbox{OTS}{} and $max\_corr$ values for fully mixed dataset. One may observe that both measures in this case give similar outcomes. }\label{fullMixing} \end{figure*} \section{Optimal Transport Spearman measure} \label{sec:OTS} For the~benchmark experiments we want to be able to measure the~similarity between the obtained results $Z$ and the original sources~$S$. In the case of linear mixing the common choice is the maximum absolute correlation over all possible permutations of the signals (denoted hereafter as $max\_corr$ \Citep{hyvarinen2016unsupervised,hyvarinen2017nonlinear, hyvarinen2019nonlinear,spurek2020non, pnlmisep,bengio2013representation, hyvarinen1999fast}). However, this measure is based on the Pearson's correlation coefficient and therefore is not able to catch any high order dependencies. To address this problem we introduce a new measure based on the~nonlinear Spearman's rank correlation coefficient and optimal transport. Let the $Z$ denote the signal retrieved by an ICA algorithm and let the $r_s\left(z^j, s^k\right)$ be the Spearman's rank correlation coefficient between the $j$-th component of $Z$ and $k$-th component of $S$. We define the~Spearman's distance matrix $M(Z,S)$ as $$ M(Z,S)=\left[1-\left|r_s(z^j,s^k)\right|\right]_{j,k=1,2,\ldots d}, $$ where the zero entries indicate a monotonic relationship between the~corresponding features. This matrix is then used as the transportation cost of the components. Formally, we compute the value of the optimal transport problem formulated in terms of integer linear programming: $$ \mbox{OTS} = 1 - I_s(Z,S), $$ $$ I_s(Z,S) = \min_{\gamma} \frac{1}{D}\sum_{j,k} \gamma_{j,k}M(Z,S)_{j,k}, $$ subject to: $$\sum_{k}^{d}\gamma_{j,k} = A_j\mathrm{\ for\ all\ }j\in\{1,2,\ldots,d\}, $$ $$ \sum_{j}^{d}\gamma_{j,k} = A_k\mathrm{\ for\ all\ }k\in\{1,2,\ldots,d\},$$ $$ \gamma_{j,k}\in \{0,1\}\mathrm{\ for\ all\ }j,k\in\{1,2,\ldots,d\}, $$ where $A_j=A_k=1$. As a result of the last constraint, the obtained transport plan~$\gamma$~defines a one-to-one map from the retrieved signals~to~the~original sources. In addition, the proposed Spearman-based measure ($\mbox{OTS}{}$) is sensitive to monotonic nonlinear dependencies and also relatively easy to compute with the use of existing tools for integer programming. Another difference between \mbox{OTS}{} and $max\_corr$ is that the latter favors stronger disentanglement of few components, while \mbox{OTS}{} gives lower results for outcomes that decompose the observation more equally. In other words consider an experiment in which $n$ signals were mixed. Further, assume that some (nonlinear) ICA algorithm failed to unmix all but one component (i.e. only one unmixed component matches exactly one source signal, while the rest is still highly unrecognizable). In such situation the $max\_corr$ value will be significantly higher than \mbox{OTS}{}, although only the small portion of the base dataset was recovered. \begin{figure}[!h] \centering \rotatebox{90}{\hskip 0.1in Original } \includegraphics[width=0.25\linewidth]{example_3/orig1.png} \includegraphics[width=0.25\linewidth]{example_3/orig0.png} \includegraphics[width=0.25\linewidth]{example_3/orig_scatter.png}\\ \rotatebox{90}{\hskip 0.1in Mixed} \includegraphics[width=0.25\linewidth]{example_3/mix0.png} \includegraphics[width=0.25\linewidth]{example_3/mix1.png} \includegraphics[width=0.25\linewidth]{example_3/mix_scatter.png}\\ \rotatebox{90}{\hskip 0.1in FastICA} \includegraphics[width=0.25\linewidth]{example_3/FastICA1.png} \includegraphics[width=0.25\linewidth]{example_3/FastICA0.png} \includegraphics[width=0.25\linewidth]{example_3/FastICA-scatter.png}\\ \rotatebox{90}{\hskip 0.1in ANICA} \includegraphics[width=0.25\linewidth]{example_3/ANICA0.png} \includegraphics[width=0.25\linewidth]{example_3/ANICA1.png} \includegraphics[width=0.25\linewidth]{example_3/ANICA-scatter.png}\\ \rotatebox{90}{\hskip 0.2in PNLMISEP} \includegraphics[width=0.25\linewidth]{example_3/MISEP0.png} \includegraphics[width=0.25\linewidth]{example_3/MISEP1.png} \includegraphics[width=0.25\linewidth]{example_3/MISEP-scatter.png}\\ \rotatebox{90}{\hskip 0.1in dCor} \includegraphics[width=0.25\linewidth]{example_3/dCor0.png} \includegraphics[width=0.25\linewidth]{example_3/dCor1.png} \includegraphics[width=0.25\linewidth]{example_3/dCor-scatter.png}\\ \rotatebox{90}{\hskip 0.1in \mbox{WICA}{}} \includegraphics[width=0.25\linewidth]{example_3/DeepWeICA0.png} \includegraphics[width=0.25\linewidth]{example_3/DeepWeICA1.png} \includegraphics[width=0.25\linewidth]{example_3/DeepWeICA-scatter.png}\\ \caption{Two dimensional example of the problem of unmixing natural images. One can easily spot that \mbox{WICA}{} has the smallest amount of artifacts remained after retrieving the signals. All of the scatter plots were normalized and are presented in the same scale. It is valuable to also look at the attached marginal histograms, where some of the similarities between the original signal and its retrieved counterpart may be observed. }\label{fig:2d-nonlinear_1} \end{figure} In order to empirically demonstrate this property, we artificially mixed a multidimensional grid using the mixing function from Section \ref{sec:mixing}. Next, we randomly swapped one of the mixed signals with the original signal from the base dataset. We compared this \textit{mixed-and-swapped} data to the source signals using $max\_corr$ and \mbox{OTS}{}. The results over different mixing iterations are presented on Fig. \ref{spearmanVSmaxcorr}. One may observe that $max\_corr$ values are always above the \mbox{OTS}{} ones, suggesting that $max\_corr$ measure prefers such a recovery more than \mbox{OTS}{}. Naturally, in the case when all signals are far different from the true sources, values for $max\_corr$ and $\mbox{OTS}{}$ are almost exactly the same (see Fig. \ref{fullMixing}). In consequence, the $max\_corr$ measure can help to asses the maximum of informativeness from the retrieved signal. This can be desired in situations that favor well decomposition of few components at the cost of lower correlatedness of the remaining ones (which may happen, for instance, in denoising problems). In the case where approximately equal recovery of all the signals is requested, the \mbox{OTS}{} measure would be a better choice. \section{Experiments} \label{sec:experiments} In this section we show several simulated experiments to validate the \mbox{WICA}{} algorithm empirically. Because there is no clear benchmark definition for the nonlinear ICA evaluation, we have selected most figurative and easily interpretable setup which we present in the following subsections. In addition, we performed the analysis of electroencephalographic (EEG) signal according to procedure presented in \Citep{icaEEG,Onton_2006}, to validate our method in more natural setting, that is, without artificially generated mixing and access to true source components. \subsection{Qualitative results} \label{sec:imageseparation} We start from the simulated example of the ICA application in the case of images separation problem. We use this regime because the results can be understand with the naked eye of a reader. To construct this experiment one needs to apply some artificial mixing function (i.e. linear transformation or mixing function from Section \ref{sec:mixing}) on the independent source signals. Such mixture is then passed to the ICA model in question to perform the unmixing task. In order to compare the \mbox{WICA}{} algorithm to other nonlinear ICA approaches we evaluated the models performance in the case of separation of artificially mixed images. As an initial setup for this blind source separation task, we randomly sampled two flattened images from the Berkeley Segmentation Dataset \Citep{MartinFTM01}\footnote[4]{available at \url{https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/BSDS300/html/dataset/images.html}} and mixed them using the function defined in Section \ref{sec:mixing}. We compared the proposed our method with dCor~\Citep{spurek2020non}, PNLMISEP~\Citep{pnlmisep}, ANICA~\Citep{bengio2013representation} and linear FastICA. Results of this toy example are presented on Fig.~\ref{fig:2d-nonlinear_1}. Besides the retrieved images and their scatter plots, we also demonstrated projection of marginal densities. The desired goal is to achieve similar images and marginal densities as in the source (original) pictures. One can easily spot that FastICA and dCor seem to only rotate the mixed signals. The ANICA, on the other hand, transformed the observations to a high extent, but the recovered signals are visually worse than the original pictures. Similarly to previous algorithm, PNLMISEP and \mbox{WICA}{} also performed some nontrivial shift on the marginal densities, but in this case the retrieved densities resemble the original ones more naturally. This experiment was fully qualitative and the outcome is subject to one’s individual perception. We demonstrated the images purely as a visualization of the different ICA models performance in simple nonlinear setup. We report quantitative results in the next subsection. \begin{figure}[!htb] \centering \includegraphics[width=0.9\linewidth]{rank_max_corr.png} \\ \includegraphics[width=0.9\linewidth]{rank_OTS.png} \caption{The mean rank results for different mixes measured by $max\_corr$ (top) and \mbox{OTS}{} (bottom). The lower the better. }\label{fig:ranks} \end{figure} \begin{figure*}[!h] \centering \subfigure[Original EEG signals]{ \includegraphics[width=0.28\linewidth]{eeg/original.png}} \subfigure[Retrieved by \mbox{WICA}{}]{ \includegraphics[width=0.28\linewidth]{eeg/weica.png}} \subfigure[Retrieved by FastICA]{ \includegraphics[width=0.328\linewidth]{eeg/fastICA-results.png}} \caption{Results of analysis done on the EEG signals. After the deletion of a suspicious signals selected by an expert from the decomposition, one can easily spot that the reconstructed components are more homogeneous, and do not have as much artifacts as the original EEG data. In both methods the same amount of signals was~cleared. The results are satisfying in either of the cases. Additionally \mbox{WICA}{} persist scale of the retrieved signals, which is helpful property in further cleansing of the EEG data.}\label{fig:eeg_retived} \end{figure*} \subsection{Quantitative results} From the preliminary results reported in previous subsection, we moved to a more complex scenario in which we quantitative evaluated the ICA methods in a higher dimensional setup. We uniformly sampled $d$ flattened images from the Berkeley Segmentation Dataset \Citep{MartinFTM01} to form the source components. We used five different source dimensions $d \in \{2,4,6,8,10\}$. The observations were then obtained by using the function described in Section \ref{sec:mixing}, applied iteratively $i \in \{10, 20, 30, 40, 50\}$ times. For each dimension $d$ we randomly picked $5$ different sets of source images. Every method was evaluated $10$ times on each set of sources, dimensions and mixes. We fit each nonlinear algorithm using the grid search over the~learning rate. For the auto-encoder based models we also performed a grid search over the scaling of the independence measure. Adjustment of these hyper-parameters was done on randomly sampled observations from the set of all obtained mixtures. Examples used to tune the architectures, were then excluded from the dataset on which we performed the actual evaluation. It is worth to mention that we had to fix batch size to $256$, because any bigger value caused instabilities in the ANICA results. To be fair in comparisons, we set the same neural net architecture for \mbox{WICA}{}, ANICA and dCor. Both the encoder and the decoder were composed of~3~hidden layers with $128$ neurons each. In the case of MISEP we used the PNL version from \Citep{pnlmisep}. The outcomes from each method were measured both by $max\_corr$ and $\mbox{OTS}{}$ against the true source components. \begin{figure*}[!h] \centering \includegraphics[width=0.49\linewidth]{wykresy_z_tabelki/dim_50_ot_spearman.png} \hfill \includegraphics[width=0.49\linewidth]{wykresy_z_tabelki/dim_50_max_corr.png} \caption{Comparison between standard ICA methods (PNLMISEP, dCor, ANICA, FastICA) and our approach by using \mbox{OTS}{} (left) and $max\_corr$ (right) measures in the setup where $50$ mixing iterations were performed. In the experiment we train five models and present the mean and standard deviation of each of the used measures (the higher the better). One can observe that \mbox{WICA}{} consistently obtains good results for all of the dimensions and outperforms the other methods in higher dimensions. Moreover, it has the lowest standard deviation across all the nonlinear algorithms. More numerical results of the experiment are presented in Table \ref{fig:table}.}\label{fig:spearman_1} \end{figure*} \paragraph{Performance across different dimensions.} We plotted the results of this experiment on $50$ mixes\footnote[5]{We considered the setting with $50$ mixing iterations as the hardest one.} with respect to the data dimension $d$ in Fig.~ \ref{fig:spearman_1}. The outcomes demonstrated that the \mbox{WICA}{} method outperformed any other nonlinear algorithm in the proposed task by achieving high and stable results regardless of the considered data dimension. In~the~case of the results stability, \mbox{WICA}{}~losses only to the linear method -- FastICA -- which, unfortunately, cannot satisfactorily factorize nonlinear data. This experiment demonstrated that \mbox{WICA}{} is a strong competitor to other models in a fully unsupervised environment for nonlinear~ICA. It is also worth to mention the difference between the results measured by \mbox{OTS}{} and $max\_corr$ for the ANICA and FastICA models applied in high dimension. We hypothesize that this may indicate that those algorithms were able to retrieve very well only small subset of the components, while the remaining variables were still highly mixed, leading to a similar effect as the one described in Section \ref{sec:OTS}. \paragraph{Performance across different mixes.} For every model we evaluated the mean \mbox{OTS}{} and $max\_corr$ score on a given dimension $d$ and number of mixing iterations $i$. Then, for each pair $(d,i)$ we ranked the tested models based on their performance. We report the mean rank of models for each mixing iteration $i$ in Fig. \ref{fig:ranks} (the lower the better). One may observed that for tasks relatively similar to the linear case, where number of mixes is equal to $10$, the PNLMISEP method performs the best both on $max\_corr$ and \mbox{OTS}{}. However, as the number of mixes increases, the \mbox{WICA}{} algorithm usually outperforms all the other methods in both measures, achieving the lowest mean rank. As a complement to the above discussion we also provide the complete numerical results for all mixtures on all tested dimensions in Table~\ref{fig:table}. \begin{table*}[!h] \centering {\small \begin{tabular}{l|c|c|c|c|c|c|c|} \toprule \multicolumn{1}{|l|}{\textbf{Measure}} & \multicolumn{1}{c|}{\textbf{Dim}} & \multicolumn{1}{c|}{\textbf{Mixes}} & \multicolumn{1}{c|}{\textbf{ \mbox{WICA}{} }} & \multicolumn{1}{c|}{\textbf{FastICA}} & \multicolumn{1}{c|}{\textbf{ANICA}} & \multicolumn{1}{c|}{\textbf{dCor}} & \textbf{PNLMISEP} \\ \midrule \multirow{25}{*}{$max\_corr$} & 2 & & 0.771$\pm$0.013 & \textbf{0.965$\pm$0.001} & 0.631$\pm$0.112 & 0.901$\pm$0.058 & 0.942$\pm$0.045 \\ & 4 & & \textbf{0.910$\pm$0.065} & 0.710$\pm$0.000 & 0.588$\pm$0.063 & 0.552$\pm$0.278 & 0.645$\pm$0.383 \\ & 6 & 10 & \textbf{0.821$\pm$0.041} & 0.578$\pm$0.000 & 0.505$\pm$0.062 & 0.696$\pm$0.059 & 0.808$\pm$0.063 \\ & 8 & & \textbf{0.814$\pm$0.058} & 0.759$\pm$0.046 & 0.769$\pm$0.065 & 0.658$\pm$0.044 & 0.812$\pm$0.085 \\ & 10 & & 0.812$\pm$0.049 & 0.770$\pm$0.058 & \textbf{0.837$\pm$0.042} & 0.658$\pm$0.041 & 0.820$\pm$0.077 \\ \cmidrule{2-8} & 2 & & 0.870$\pm$0.088 & 0.827$\pm$0.000 & 0.817$\pm$0.080 & \textbf{0.883$\pm$0.060} & 0.853$\pm$0.156 \\ & 4 & & \textbf{0.957$\pm$0.059} & 0.751$\pm$0.000 & 0.559$\pm$0.059 & 0.756$\pm$0.065 & 0.833$\pm$0.069 \\ & 6 & 20 & \textbf{0.795$\pm$0.033} & 0.574$\pm$0.015 & 0.480$\pm$0.053 & 0.696$\pm$0.052 & \textbf{0.795$\pm$0.056} \\ & 8 & & \textbf{0.844$\pm$0.055} & 0.770$\pm$0.013 & 0.803$\pm$0.085 & 0.703$\pm$0.060 & 0.813$\pm$0.056 \\ & 10 & & \textbf{ 0.858$\pm$0.065} & 0.743$\pm$0.010 & 0.751$\pm$0.056 & 0.634$\pm$0.051 & 0.688$\pm$0.058 \\ \cmidrule{2-8} & 2 & & 0.925$\pm$0.100 & 0.819$\pm$0.001 & 0.702$\pm$0.100 & 0.824$\pm$0.067 & \textbf{0.939$\pm$0.037} \\ & 4 & & 0.820$\pm$0.051 & 0.673$\pm$0.002 & 0.571$\pm$0.086 & 0.788$\pm$0.070 & \textbf{0.898$\pm$0.070} \\ & 6 & 30 & \textbf{0.887$\pm$0.036} & 0.572$\pm$0.000 & 0.521$\pm$0.058 & 0.687$\pm$0.075 & 0.752$\pm$0.052 \\ & 8 & & 0.746$\pm$0.050 & 0.800$\pm$0.005 & \textbf{0.827$\pm$0.055} & 0.639$\pm$0.037 & 0.772$\pm$0.104 \\ & 10 & & \textbf{0.835$\pm$0.052} & 0.751$\pm$0.010 & 0.814$\pm$0.062 & 0.675$\pm$0.033 & 0.740$\pm$0.021 \\ \cmidrule{2-8} & 2 & & 0.862$\pm$0.057 & 0.882$\pm$0.020 & 0.746$\pm$0.093 & 0.852$\pm$0.079 & \textbf{0.931$\pm$0.043} \\ & 4 & & \textbf{0.847$\pm$0.048} & 0.681$\pm$0.003 & 0.580$\pm$0.071 & 0.761$\pm$0.101 & 0.836$\pm$0.094 \\ & 6 & 40 & 0.701$\pm$0.039 & 0.585$\pm$0.010 & 0.468$\pm$0.059 & 0.696$\pm$0.039 & \textbf{0.815$\pm$0.064} \\ & 8 & & \textbf{0.861$\pm$0.055} & 0.781$\pm$0.001 & 0.792$\pm$0.079 & 0.658$\pm$0.054 & 0.734$\pm$0.108 \\ & 10 & & \textbf{0.859$\pm$0.056} & 0.746$\pm$0.001 & 0.749$\pm$0.112 & 0.642$\pm$0.030 & 0.802$\pm$0.049 \\ \cmidrule{2-8} & 2 & & 0.759$\pm$0.097 & \textbf{0.872$\pm$0.000} & 0.866$\pm$0.128 & 0.771$\pm$0.090 & 0.811$\pm$0.122 \\ & 4 & & 0.774$\pm$0.050 & 0.692$\pm$0.000 & 0.573$\pm$0.067 & 0.756$\pm$0.086 & \textbf{0.825$\pm$0.108} \\ & 6 & 50 & \textbf{0.769$\pm$0.030} & 0.562$\pm$0.000 & 0.465$\pm$0.055 & 0.695$\pm$0.059 & 0.721$\pm$0.102 \\ & 8 & & \textbf{0.831$\pm$0.061} & 0.773$\pm$0.021 & 0.798$\pm$0.087 & 0.668$\pm$0.053 & 0.711$\pm$0.022 \\ & 10 & & \textbf{0.819$\pm$0.052} & 0.756$\pm$0.026 & 0.796$\pm$0.087 & 0.644$\pm$0.032 & 0.738$\pm$0.084 \\ \midrule \multirow{25}{*}{\mbox{OTS}{}} & 2 & & 0.798$\pm$0.048 & 0.652$\pm$0.001 & 0.938$\pm$0.088 & 0.899$\pm$0.076 & \textbf{0.948$\pm$0.041} \\ & 4 & & \textbf{0.890$\pm$0.065} & 0.582$\pm$0.000 & 0.784$\pm$0.062 & 0.554$\pm$0.264 & 0.652$\pm$0.360 \\ & 6 & 10 & \textbf{0.807$\pm$0.043} & 0.419$\pm$0.000 & 0.571$\pm$0.056 & 0.666$\pm$0.064 & 0.779$\pm$0.046 \\ & 8 & & \textbf{0.784$\pm$0.025} & 0.457$\pm$0.058 & 0.431$\pm$0.054 & 0.594$\pm$0.051 & 0.769$\pm$0.097 \\ & 10 & & 0.742$\pm$0.030 & 0.405$\pm$0.077 & 0.405$\pm$0.032 & 0.556$\pm$0.041 & \textbf{0.758$\pm$0.103} \\ \cmidrule{2-8} & 2 & & \textbf{0.884$\pm$0.089} & 0.674$\pm$0.000 & 0.820$\pm$0.088 & 0.850$\pm$0.105 & 0.864$\pm$0.099 \\ & 4 & & \textbf{0.945$\pm$0.064} & 0.561$\pm$0.000 & 0.760$\pm$0.062 & 0.722$\pm$0.061 & 0.808$\pm$0.062 \\ & 6 & 20 & \textbf{0.776$\pm$0.031} & 0.456$\pm$0.015 & 0.500$\pm$0.053 & 0.650$\pm$0.053 & 0.764$\pm$0.038 \\ & 8 & & \textbf{0.797$\pm$0.029} & 0.442$\pm$0.014 & 0.432$\pm$0.064 & 0.623$\pm$0.071 & 0.767$\pm$0.053 \\ & 10 & & \textbf{0.790$\pm$0.029} & 0.406$\pm$0.034 & 0.404$\pm$0.027 & 0.551$\pm$0.041 & 0.625$\pm$0.048 \\ \cmidrule{2-8} & 2 & & 0.797$\pm$0.105 & 0.655$\pm$0.000 & 0.815$\pm$0.102 & 0.808$\pm$0.089 & \textbf{0.903$\pm$0.051} \\ & 4 & & 0.805$\pm$0.050 & 0.468$\pm$0.001 & 0.661$\pm$0.074 & 0.760$\pm$0.074 & \textbf{0.884$\pm$0.065} \\ & 6 & 30 & \textbf{0.865$\pm$0.037} & 0.486$\pm$0.000 & 0.497$\pm$0.061 & 0.653$\pm$0.066 & 0.724$\pm$0.034 \\ & 8 & & 0.702$\pm$0.033 & 0.491$\pm$0.006 & 0.432$\pm$0.043 & 0.559$\pm$0.054 & \textbf{0.730$\pm$0.086} \\ & 10 & & \textbf{0.782$\pm$0.027} & 0.440$\pm$0.021 & 0.405$\pm$0.034 & 0.560$\pm$0.063 & 0.657$\pm$0.043 \\ \cmidrule{2-8} & 2 & & 0.869$\pm$0.053 & 0.668$\pm$0.001 & 0.868$\pm$0.087 & 0.852$\pm$0.087 & \textbf{0.938$\pm$0.032} \\ & 4 & & 0.781$\pm$0.049 & 0.455$\pm$0.002 & 0.667$\pm$0.060 & 0.729$\pm$0.102 & \textbf{0.822$\pm$0.092} \\ & 6 & 40 & 0.636$\pm$0.039 & 0.405$\pm$0.008 & 0.516$\pm$0.059 & 0.649$\pm$0.044 & \textbf{0.772$\pm$0.071} \\ & 8 & & \textbf{0.729$\pm$0.029} & 0.482$\pm$0.001 & 0.428$\pm$0.046 & 0.572$\pm$0.039 & 0.663$\pm$0.083 \\ & 10 & & \textbf{0.820$\pm$0.025} & 0.345$\pm$0.004 & 0.397$\pm$0.035 & 0.569$\pm$0.046 & 0.752$\pm$0.073 \\ \cmidrule{2-8} & 2 & & 0.828$\pm$0.105 & 0.672$\pm$0.000 & \textbf{0.842$\pm$0.136} & 0.794$\pm$0.071 & 0.824$\pm$0.115 \\ & 4 & & 0.735$\pm$0.053 & 0.468$\pm$0.000 & 0.676$\pm$0.063 & 0.736$\pm$0.076 & \textbf{0.799$\pm$0.123} \\ & 6 & 50 & \textbf{0.735$\pm$0.031} & 0.425$\pm$0.001 & 0.503$\pm$0.052 & 0.661$\pm$0.065 & 0.697$\pm$0.103 \\ & 8 & & \textbf{0.766$\pm$0.028} & 0.453$\pm$0.018 & 0.427$\pm$0.048 & 0.595$\pm$0.052 & 0.627$\pm$0.022 \\ & 10 & & \textbf{0.766$\pm$0.025} & 0.341$\pm$0.036 & 0.405$\pm$0.032 & 0.563$\pm$0.040 & 0.667$\pm$0.084 \\ \bottomrule \end{tabular} } \caption{Comparison between nonlinear ICA methods (PNLMISEP, dCor, ANICA, WICA) and the classical linear ICA approach (FastICA) on images separation problem (with different dimensions) by using $max\_corr$ and \mbox{OTS}{} measures. In the experiment we tuned and trained four models (excluding FastICA, which~is~a~linear~model) and present mean and standard deviation in the tabular form.} \label{fig:table} \end{table*} \subsection{Decomposing EEG data} Finally we want to show usability of the \mbox{WICA}{} method on real life data. An example of a task that can be tackle by the ICA algorithms is electroencephalogram (EEG) decomposition. An EEG signal is~a~test used to evaluate the electrical activity in the brain. The brain cells communicate via electrical impulses and are active all the time. In~the~original scalp channel data, each row of the data recording matrix represents the time course of summed voltage differences between source projections to one data channel and one or more reference channels. We followed a common experiment framework proposed in \Citep{icaEEG, Onton_2006}, to detect artifacts in unmixed signals representation which can suggest a blinks or an eye movement during the test. The setup for this decomposition is different than in previous sections. An original EEG mixture took for this experiment, consisted of~$40$~scalp electrode signals. Those signals were selected as an input for the \mbox{WICA}{} model. Retrieved data were analysed by an expert, who selected signs of a blinking on recovered components. Manually selected subset of suspicious components, were then nullified. Unmixed signal with masked (by nullification) components were then feed back to the decoder which came from the training of the \mbox{WICA}{} model. As a researcher we are not aware how deeply EEG signals are mixed or dependent. The crucial functionality that ICA serves in this setting is normalizing and cleansing of the dataset. From that point, time series produced from recovered signals have to be analysed by an expert. In this experiment we want to prove that high dimension of the input data and the unknown entanglement of the components is not a limitation for the \mbox{WICA}{}. Visual results of this experiment are presented on Fig \ref{fig:eeg_retived}. For a comparison we used results from other standard ICA algorithm used for this kind of a task -- linear FastICA. The details of "remixing" process for this method are descirbed in \Citep{icaEEG}. This experiment showed that \mbox{WICA}{} is able to handle multidimensional data highly above the volume tested for other nonlinear models. Moreover, results our method for this task works well enough to be used as a preliminary step of cleaning the data. \section{Conclusion} In this paper we presented a new approach to the nonlinear ICA task. In addition to the investigation of \mbox{WICA}{} method, which proves to be matching the results of all other tested nonlinear algorithms, we proposed a new mixing function for validating nonlinear tasks in a structurized manner. Our mixing scales to higher dimensions and is easily invertible. Lastly, we defined \mbox{OTS}{}, a measure that can catch nonlinear dependence and is easy to compute. The \mbox{OTS}{} measure and the proposed mixing have the potential to become benchmarking tools for all future work in this field. \section{Acknowledgements} The work of P. Spurek was supported by the National Centre of Science (Poland) Grant No. 2019/33/B/ST6/00894. The work of J. Tabor was supported by the National Centre of Science (Poland) Grant No. 2017/25/B/ST6/01271. A. Nowak carried out this work within the research project "Bio-inspired artificial neural networks" (grant no. POIR.04.04.00-00-14DE/18-00) within the Team-Net program of the Foundation for Polish Science co-financed by the European Union under the European Regional Development Fund.
\section{INTRODUCTION} Modern micro-electro-mechanical (MEMS) inertial measurements units (IMUs) are small (a few mm$^2$), cheap (several dollars a piece), energy efficient and pervasive. As a low-cost yet powerful sensing modality, they have received a large amount of research effort and deeply weave into a wide range of applications. For instance, today's smart phones come with embedded IMUs while users can use them for different location-based services, e.g. indoor navigation, localisation and outdoor trajectory analysis \cite{Harle2013}. Moreover, emerging cyber gadgets, such as wristbands and VR/AR headsets, also actively utilise IMUs to provide continuous health monitoring \cite{Gowda2017}, accurate activity tagging \cite{Bianchi2019} and immersive gaming experiences \cite{Marchand2016}. On the side of robots and autonomous systems, IMUs are a long-standing sensing solution to navigation and grasping tasks \cite{Leutenegger2015}. The proliferation of IMUs in the aforementioned applications depends on a method called inertial navigation (aka. intertial odometry). Inertial navigation produces orientation and position of users based on the rotation and acceleration measurements of IMU sensors. Such a method is a pillar to motion sensing, acting as a key enabler for many location based services. Compared with GPS, vision, radio or other navigation techniques \cite{Kuutti2018}, the inertial solution relies only on self-contained sensor, requires few physical infrastructure, and is insensitive to environmental dynamics. This unique property, coupled with the proliferation of IMUs in smart devices, allows the flexibility and reliability to deploy the location service easily to IoT applications. Meanwhile, compared with high-dimensional visual data, IMU data are 6-dim time series that can be processed in real time even on resource-constrained device. As such, user's location/motion privacy is thus better protected off the cloud. \begin{figure} \centering \includegraphics[width=0.48\textwidth]{oxiod_structure2.pdf} \caption{\label{fig:comparison} Deep learning based inertial odometry models can learn and predict human motion from raw inertial data. } \end{figure} \begin{table*}[ht] \caption{Comparison of datasets with IMU and ground truth} \label{dataset_compare} \begin{center} \begin{tabular}{c c c c c c c c c} \hline Dataset & Year & Environment & Attachment & IMU Type & Sample Rate & Groundtruth & Accuracy & Data Size\\ \hline KITTI Odometry & 2013 & Outdoors & Car & OXTS RT3003 & 10 Hz & GPS/IMU & 10 cm & 22 seqs, 39.2 km\\ EuRoC MAV & 2016 & Indoors & MAV & ADIS 16488 & 200 Hz & Motion Capture & 1 mm & 11 seqs, 0.9 km\\ Oxford RobotCar & 2016 & Outdoors & Car & NovAte SPAN & 50 Hz & GPS/IMU & Unknown & 1010.46 km\\ TUM VI & 2018 & In/Outdoors & Human & BMI 160 & 200 Hz & Motion Capture & 1 mm & 28 seqs, 20 km\\ ADVIO & 2018 & In/Outdoors & Human & InvenSense 20600 & 100 Hz & Other Algorithms & Unknown & 23 seqs, 4.5 km\\ \hline \textbf{OxIOD (Ours)} & 2018 & Indoors & Human & InvenSense 20600 & 100 Hz & Motion Capture & 0.5 mm & \textbf{158 seqs}, \textbf{42.587 km}\\ \hline \end{tabular} \end{center} \end{table*} To achieve long term inertial navigation, a major limitation is the unbounded system error growth, caused by various sensor errors and biases due to the use of low-cost IMUs \cite{Naser2008}. Most previous work has exploited human motion context information to constrain the error drifts of the inertial systems. One solution is to attach the IMU on a user's foot to take advantage of zero-velocity update (ZUPT) for compensating the system drift \cite{Nilsson2012}. Pedestrian dead reckoning systems (PDRs) \cite{Harle2013} have been proposed to estimate trajectories by detecting steps and estimating heading. However, these handcrafted algorithms are hard to apply in everyday usage due to the unrealistic assumptions of human motion: ZUPT requires the inertial sensor to be firmly fixed on a user's foot, preventing this solution from being used on consumer devices; PDRs are based on personal walking models, and constrained only to work under periodic pedestrian motion. Recently, deep learning based inertial navigation models, e.g., IONet \cite{Chen2018}, are proved to be capable of estimating motion and generating trajectories directly from raw inertial data without any handcrafted engineering. Other data-driven methods \cite{Yan2018,Cortes2018} learn to predict velocities in order to constrain system error drift, and achieve competitive performance. These learning based models have been shown to outperform previous model-based approaches in terms of accuracy and robustness \cite{Chen2018,Yan2018,Cortes2018}. There is a growing interest in applying deep neural networks to learn motion from time-series data, due to its potential for model-free generalisation. However, to develop data-driven approaches, we are confronted with the following three main challenges: 1) A significant amount of sensor data with highly precise labels, i.e. the ground-truth values of location, velocity and orientation are required for training, validating and testing deep neural network models. Existing datasets \cite{Geiger2013,Maddern2016,Schubert2018,Cortes2018-1} are not suitable for training DNN models for human tracking, as the sensor data are collected either from vehicles e.g. cars, or fixed in specific position, which can not reflect the IMU motion in everyday usage e.g. as would be sensed by a smartphone. 2) Few works have considered the efficiency of deep neural network models for inertial odometry when deployed on low-end devices. It is important for machine learning models to run at the edge close to where the sensor data are collected, as this will improve the reliability and latency of the inference, and protect the users' privacy \cite{Samie2019}, particularly in IoT applications. 3) There is a lack of common evaluation benchmarks, whether for conventional PDRs or learning based models, which precludes a fair and objective comparison of different techniques. In this paper, we present and release the Oxford Inertial Odometry Dataset (OxIOD), with a large amount of pedestrian, multi-attachment sensor data (158 sequences, totalling more than 42 km in distance), and high-precise labels, much larger than prior inertial navigation datasets. In order to capture human motion that accurately reflects everyday usage, the data were collected with a high degree of diversity, across different attachments, motion modes, users, types of device and places. As illustrated in Figure \ref{fig:comparison}, our proposed dataset is able to be used to train robust and accurate deep learning models for inertial navigation, and we evaluate both the classical algorithms (PDRs) and data-driven models on OxIOD as a common benchmark. To enhance the online efficiency of DNN models on mobile devices, we propose Light Inertial Odometry Neural Networks (L-IONet), a lightweight deep neural network framework to learn inertial navigation from raw data without any handcrafted engineering, which is much more efficient at training and inference than previously proposed models using LSTM (Long Short-Term Memory neural network). Extensive experiments were conducted to evaluate the proposed model and existing methods for a systematic study into the performance of the data-driven inertial odometry models in real-world applications and inference at the edge. In summary, we have three main contributions: \begin{itemize} \item We present OxIOD\footnote{The OxIOD Dataset is available at: http://deepio.cs.ox.ac.uk}, a first-of-its-kind dataset for pedestrian inertial navigation research, to both boost the adoption of data-driven methods and provide a common benchmark for the task of pedestrian inertial navigation. \item We propose L-IONet, a lightweight deep neural network framework to efficiently learn and infer inertial odometry from raw IMU data. \item We conduct a systematic research into the computational and runtime efficiency of deep neural network models deployed on low-end mobile devices. \end{itemize} The rest of the paper is organised as follows. Section 2 surveys the related work on the existing datasets and models. Section 3 introduces the Oxford Inertial Odometry Dataset. In Section 4, we present a novel lightweight learning based inertial odometry model. Section 5 provides comprehensive evaluations and results. \section{RELATED WORK} \subsection{Inertial Navigation Datasets} Table \ref{dataset_compare} shows representative datasets that include inertial data for the purpose of navigation and localisation. In KITTI \cite{Geiger2013}, Oxford RobotCar \cite{Maddern2016} and EuRoC MAV datasets \cite{Burri2016}, the sensors are rigidly fixed to the chassis of a car, which is suitable for studying vehicle movements, but not directly useful for studying human movement. The TUM VI dataset \cite{Schubert2018} was collected to evaluate visual-inertial odometry (VIO), with a pedestrian holding the device in front of them. The ground truth in TUM VI is provided at the beginning and ending of the sequences, while during most of the trajectories there is no ground truth. Similarly, in ADVIO \cite{Cortes2018-1}, the dataset is rather short (4.5 km) and only offers pseudo ground truth generated by a handcrafted inertial odometry algorithm. There are several datasets focusing on human gait and activities, which are somewhat similar to our dataset, but do not concentrate on localisation. Some of these datasets measure human activities, such as USC-HAD \cite{Zhang2012}, CMU-MMAC \cite{DeLaTorre2008}, and OPPORTUNITY \cite{Chavarriaga2013}. Though these datasets have inertial data with accurate poses as ground truth, they cannot be used to train and test odometry/localisation, since the participants did not move much during the experiments. Some other datasets, such as MAREA \cite{Siddhartha2017}, focus on human gait recognition and collected inertial data while carriers were walking or running. However, these datasets lack solid ground truth and thus limit their usage in training and testing odometry models. As we can see from Table \ref{dataset_compare}, our OxIOD dataset has a huge amount of data from 158 sequences, leading to a total distance of 42.587km. The data size of OxIOD is larger than most other inertial navigation datasets, and hence is suitable for deep neural network methods, which require large amounts of data and high accuracy labels. It should be noted that the total length of the dataset even exceeds those collected by vehicles. Meanwhile, our dataset can better represent human motion in everyday conditions and thus has a greater diversity. \subsection{Inertial Navigation Using Low-cost IMUs} Due to high sensor noise and bias, it is impossible to use conventional Strapdown Inertial Navigation Systems (SINS), which directly integrate inertial measurements into orientation, velocity and location, on low-cost MEMS IMU platforms. To realise purely inertial pedestrian navigation, most of existing methods exploit domain specific knowledge to constrain the error drift of inertial systems. One solution is to attach inertial sensor onto users' foot to take advantage of stationary phases during human walking to perform the zero-velocity update (ZUPT). The ZUPT based method can be further enhanced by known velocity update and double-foot position calibration \cite{Diliang2019}. Another solution is Pedestrian Dead Reckoning (PDR), very common in phone based pedestrian navigation. Under the assumption that users exhibit periodic motion, PDRs update locations by counting users' steps and estimating their stride length and heading \cite{Harle2013}. Recent research focuses on fusing other sensor modalities with the PDR models to further improve the robustness and accuracy, such as wireless signals \cite{Zhuang2018}, magnetic fields \cite{Li2019,Wang2016a} or UWB \cite{LiuYDJLT17}. Recent emerging data-driven solutions are capable of learning a more general motion model from a large amount of inertial data without hand-engineering effort. A good example is IONet \cite{Chen2018}, which proposes to formulate inertial odometry as a sequential learning problem and constructs a deep recurrent neural network (RNN) framework to reconstruct trajectories directly from raw inertial data, outperforming traditional model-based methods. Other methods learn to recover latent velocities \cite{Yan2018} \cite{Cortes2018}, or detect more accurate zero-velocity phase, in order to compensate the errors of inertial systems \cite{Wagstaff2018}. However, few of the previous works considers the inference efficiency of deep learning approaches when deployed on low-end devices. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{attachments_vicon2.pdf} \caption{\label{fig:attachments} Inertial data are collected from a smartphone in four different attachments: handheld (left above), pocket (right above), handbag (left below), trolley (right below). The high-precise motion labels are provided by the Vicon System.} \end{figure} \section{Oxford Inertial Odometry Dataset} This section introduces the Oxford Inertial Odometry Dataset (OxIOD), a data collection of inertial measurements for training and evaluating deep learning based inertial odometry models. To reflect sensor readings under everyday usage, the data were collected with IMUs with various attachments (handheld, in the pocket, in the handbag and on a trolley/stroller), motion modes (halting, walking slowly, walking normally, and running), four types of off-the-shelf consumer phones and five different users, as illustrated in Table \ref{tb:dataset}. Our dataset has 158 sequences, and the total walking distance and recording time are 42.5 km, and 14.72 h (53022 seconds). \begin{table}[ht] \caption{Oxford Inertial Odometry Dataset} \label{tb:dataset} \begin{center} \begin{tabular}{c c c c c} \hline ~ & Type & Seqs & Time (s) & Distance (km) \\ \hline \multirow{4}*{Attachments} & Handheld & 24 & 8821 & 7.193\\ ~ & Pocket & 11 & 5622 & 4.231\\ {\tiny (iPhone 7P/User 1)} & Handbag & 8 & 4100 & 3.431\\ {\tiny (Normally Walking)} & Trolley & 13 & 4262 & 2.685\\ \hline \multirow{3}*{Motions} & Slowly Walking & 8 & 4150 & 2.421\\ ~ & Normally Walking & - & - & - \\ ~ & Running & 7 & 3732 & 4.356\\ \hline \multirow{3}*{Devices} & iPhone 7P & - & - & - \\ ~ & iPhone 6 & 9 & 1592 & 1.381\\ ~ & iPhone 5 & 9 & 1531 & 1.217\\ ~ & Nexus 5 & 8 & 4021 & 2.752\\ \hline \multirow{4}*{Users} & User 1 & - & - & - \\ ~ & User 2 & 9 & 2928 & 2.422\\ ~ & User 3 & 7 & 2100 & 1.743\\ ~ & User 4 & 9 & 3118 & 2.812\\ ~ & User 5 & 10 & 2884 & 2.488\\ \hline \multirow{2}*{Large Scale} & floor 1 & 10 & 1579 & 1.412\\ ~ & floor 2 & 16 & 2582 & 2.053\\ \hline Total & & 158 & 53022 & 42.587\\ \hline \end{tabular} \end{center} \end{table} \subsection{Sensor Setup} The data were collected by the on-board sensors of consumer phones, recording accelerations and angular rates from 6-axis IMUs, and magnetic fields from 3-axis magnetometers. The sensor types of IMUs and magnetometers employed in our adopted mobile phones are listed in Table \ref{sensor_list}. A Vicon motion capture system \cite{Vicon2017} was deployed to produce high-precise groundtruth values of the object motion, i.e. its orientation, velocity and position. The large-scale collection was conducted on two office floors, where we used a Google Tango Tablet \cite{Tango} as pseudo groundtruth. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{framework2.pdf} \caption{\label{fig:framework} The framework illustration of three inertial navigation models: (a) Pedestrian Dead Reckoning (b) Inertial Odometry Neural Network (IONet) (c) Lightweight Inertial Odometry Neural Network (L-IONet).} \end{figure*} \begin{table}[ht] \caption{Sensors} \label{sensor_list} \begin{center} \begin{tabular}{c c c} \hline Mobile Phone & IMU & Magnetometer\\ \hline iPhone 7 Plus & InvenSense ICM-20600 & Alps HSCDTD004A\\ iPhone 6 & InvenSense MP67B & AKM 8963\\ iPhone 5 & STL3G4200DH & AKM 8963\\ Nexus 5 & InvenSense MPU-6515 & Asahi Kasei AK8963 \\ \hline \end{tabular} \end{center} \end{table} \textbf{IMU}: The majority of data were collected with an iPhone 7 Plus device. The IMU inside iPhone 7 Plus is InvenSense ICM-20600, a 6-axis motion tracking sensor. It combines a 3-axis gyroscope and a 3-axis accelerometer. 16-bit ADCs are integrated in both gyroscope and accelerometer. The sensitivity error of the gyroscope is $1 \%$, while the noise is $4 \text{mdps}/\sqrt{\text{Hz}}$. The accelerometer noise is 100 $\mu g/\sqrt{\text{Hz}}$. \textbf{Magnetometer} The Alps HSCDTD004A embedded in iPhone 7 Plus is a 3-axis geomagnetic sensor, which is mainly used for electronic compass. It has a measurement range of $\pm 1.2 \text{mT}$ and an output resolution of 0.3 $\mu \text{T/LSB}$. \textbf{Vicon System} We deployed 10 Bonita B10 cameras in the Vicon Motion Tracker system \cite{Vicon2017}, encircling an area where we conducted data collection experiments. Each Bonita B10 camera has a frame rate of 250 fps, and resolution of 1 megapixel (1024*1024). The lens operating range of Bonita B10 can be up to 13 m. These features enable us to capture motion data with a precision down to 0.5 mm, making the ground truth very accurate and reliable. The software used in the Vicon system is \textit{Vicon Tracker 2.2}. We connected Vicon Tracker to Robot Operating System (ROS) with \textit{vicon\_bridge}, and recorded the data stream with rostopic. The map size of our experimental setup in Vicon Room is $5 m \times 8 m$. \textbf{Time Synchronisation} The IMU and magnetometer are integrated in the mobile phone, sharing the same time stamp. Vicon data recorded with ROS is saved with UTC timestamp. Before each experiment, we synchronised the time of iPhone 7 Plus and ROS with UTC, and thus all time stamps recorded along with sensor data will be synchronised. \subsection{Data Collection} \textbf{Attachments} The phone based IMUs will experience distinct motions when attached in different places. In the context of pedestrian navigation, a natural use of mobile phone leads to an unconstrained placement of inertial sensors, and therefore we selected four common situations to study, i.e. the device is in the hand, in the pocket, in the handbag or on the trolley. In our data collection, a pedestrian (named \textit{User 1}) walked naturally inside the Vicon room, carrying a phone in four attachments. Figure \ref{fig:attachments} shows in which way the devices were held during the experiments. \textbf{Motion Modes} Humans move in different motion modes in their everyday activities. We selected and collected data from four typical motion models: halting, walking slowly, walking normally and running. The experiments with different motion modes were performed by \textit{User 1} with iPhone 7Plus in hand, to reduce the influences from user walking habits or sensor properties. The velocities of participants are around 0.5 m/s, 1 m/s, and 1.5 m/s during slow walking, normal walking and running. Our experiments indicate that the user speeding can be directly recovered from raw inertial data via deep neural networks, even under a mixed of motion modes. \textbf{Devices and Users} Both sensors properties and the walking habits of users throw impacts on the performance of inertial navigation systems. In order to ensure inertial odometry invariant across devices and users, we collected data from several types of devices and different users. Four off-the-shelf smartphone were chosen as experimental devices: iPhone 7 Plus, iPhone 6, iPhone 5, and Nexus 5, listed in Table \ref{sensor_list}. Five participants were recruited to perform experiments with phone in the hand, pocket and handbag respectively. The mixed data from various devices and users can also be applied in the identification of devices and users. \textbf{Large-scale localisation} Besides the extensive data collection inside the VICON Room, we also conducted large-scale tracking in two environments. Without the help of Vicon system, Google Tango device was chosen to provide pseudo ground truth. Participant was instructed to walk freely in an office building on two separate floors (about 1650 $m^2$ and 2475 $m^2$). The smartphones were placed in the hand, pocket and handbag respectively, while the Tango device was attached on the chest of the participant to capture precise trajectories. Figure \ref{fig:floor1} and Figure \ref{fig:floor2} illustrate the floor maps and pseudo ground truth trajectories captured by Google Tango. \section{Inertial Navigation Models} In this section, we selected and introduced two typical inertial navigation models as our baselines: one is a model-based method, Pedestrian Dead Reckoning (PDR) \cite{Harle2013,Xiao2014}, the other one is a deep learning based method, Inertial Odometry Neural Networks (IONet) \cite{Chen2018}. PDR detects steps, estimates step length and heading and updates locations per step, mitigating exponential increasing drifts of SINS algorithm into linear increasing drifts. IONet is able to learn self-motion directly from raw data above large dataset, and solve more general motion, with advantages of extracting high-level motion representation without hand-engineering. A novel lightweight DNN framework, the Light Inertial Odometry Neural Networks (L-IONet), is proposed to enable more accurate and efficient inference for inertial navigation from low-cost IMU data. Figure \ref{fig:framework} illustrates the frameworks of the PDR, IONet, and L-IONet model. \subsection{Pedestrian Dead Reckoning} Pedestrian Dead Reckonings (PDRs) output pairs of [step length, step heading] to construct 2D trajectories on a plane. Instead of naively double integrating inertial measurements, PDR algorithms detect steps and estimate step length from a duration of classified inertial data using human walking model. We implemented a basic PDR algorithm to quantitatively evaluate its performance on the OxIOD dataset. Aided by the common benchmark, extensions are easy to add on this basic PDR to show the effectiveness of each module. The PDR models mainly consist of four parts: step detection, step length estimation, heading estimation and location update. In our PDR model, the step detection thresholds the mean and variance of accelerations, which further classifies the sensory reading into separate independent strides. A dynamical step length estimation module uses the Weinberg's empirical equation \cite{Weinberg2002} to produce the location displacement $\Delta l$ during a pedestrian stride. Gyroscope signals are integrated into the orientation of inertial sensor, but only the yaw angle is kept as pedestrian heading $\psi$. The current location $(L^x_{k}, L^y_{k})$ can be updated with the previous location $(L^x_{k-1}, L^y_{k-1})$ via: \begin{equation} \label{eq: location} \left\{ \begin{aligned} L^x_{k}=L^x_{k-1}+\Delta l \cos(\psi_{k}) \\ L^y_{k}=L^y_{k-1}+\Delta l \sin(\psi_{k}), \end{aligned} \right. \end{equation} where $\Delta l$ and $\psi_{k}$ are the step length and heading at $k$ th step. In real-world practice, it is not always easy for the hand-built algorithms to classify inertial data correctly only based on data patterns. Even if the step detection and classification is accurate, the empirical human walking model to estimate step length is highly correlated with user's walking habits and body properties, causing unavoidable accumulative errors during long-term operating. \subsection{Inertial Odometry Neural Networks} Inertial Odometry Neural Networks (IONet) \cite{Chen2018} are able to learn user's ego-motion directly from raw inertial data and solve more general motions. For example, tracking a trolley or other wheeled configurations is quite challenging for PDR models, due to the fact that no walking step or periodicity patterns can be detected in this case. In contrast, IONet can regress the location transformation (the average speed) during any fixed window of time, without the explicit components of step detection and step length estimation as in PDRs. We implemented and trained the IONet model on the OxIOD dataset, to show the effectiveness of OxIOD for data-driven approaches. The continuous inertial readings are segmented into independent sequences of $n$ frames IMU data $\{(\mathbf{a}_i, \mathbf{w}_i)\}_{i=1}^{n}$, consisting of 3-dimensional accelerations $\mathbf{a}_i \in \mathbb{R}^3$ and 3-dimensional angular rates $\mathbf{w}_i \in \mathbb{R}^3$ at the time step $i$. The 6-dimensional inertial data are preprocessed to normalise the accelerations and angular rates into a same scale. The generated sequences are further feed into the recurrent neural networks (RNNs), e.g. LSTMs to extract effective features for motion estimation. Specifically, Figure \ref{fig:wavenet} (a) illustrates the details of LSTM-based IONet. Each frame of inertial data is used as a input for single LSTM cell: $\mathbf{x}_i = (\mathbf{a}_i, \mathbf{w}_i)$. In the recurrent model, a hidden state $\mathbf{h}_i$ containing the history information of inputs, is maintained and updated at each step $i$ by: \begin{equation} \mathbf{h}_{i+1} = \text{LSTM}(\mathbf{h}_i, \mathbf{x}_i) . \end{equation} This recurrent process compresses the high dimensional inertial sequence to a high-level compact motion description $\mathbf{h}_i \in \mathbb{R}^m$. $m$ is the number of hidden states. Finally, after recurrently processing all the data, the last hidden feature $\mathbf{h}_n$ contains the compressed information of the entire sequence for the motion transformation prediction. In IONet model, the polar vector $(\Delta l, \Delta \psi) \in \mathbb{R}^2$ (the displacement of location and heading), which proves to be observable from a sequence of inertial data, is learned by LSTMs. After LSTMs, a fully-connected layer then maps the hidden features into the target polar vector: \begin{equation} (\Delta l, \Delta \psi)=\text{FC}(\mathbf{h}_n). \end{equation} Subsequently, in a sequence with timesteps between [0, n], the location $(L^x_n, L^y_n)$ at the $n$ th step is updated by \begin{equation} \label{eq: location} \left\{ \begin{aligned} L^x_n=L^x_0+\Delta l \cos(\psi_0+\Delta \psi) \\ L^y_n=L^y_0+\Delta l \sin(\psi_0+\Delta \psi), \end{aligned} \right. \end{equation} where $(L^x_0, L^y_0)$, and $\psi_0$ are the beginning location and heading of the sequence. . Instead of building explicit model to describe human motion, such as Weinberg's model \cite{Weinberg2002}, IONet is able to model motion dynamics and temporal dependencies of sensor data implicitly. Compared with PDR models, IONet is not restricted to the empirical step model, but is capable of regressing the average velocity anytime, i.e. the location transformation during any fixed period of time. \subsection{Lightweight Inertial Odometry Neural Networks} To this end, we introduce the Lightweight Inertial Odometry Neural Network (L-IONet), a lightweight framework to learn inertial tracking, which is more efficient in resource and computational consumption than the previous IONet approach. The detailed structure of L-IONet can be found in Figure \ref{fig:wavenet} (b). Although deep learning solutions demonstrate great potential to solve sensing problems, e.g. IONet in inertial navigation, their huge computational and memory requirement slows down the deployment of DNN models onto low-end devices \cite{Yao2018}. Compared with deploying machine learning models on the cloud, computation at the edge reduces the bandwidth usage, cloud workload and latency. Besides, it helps protect the users' privacy, as all sensor data hence remain at the users' device rather than uploading to the cloud \cite{Samie2019}. Therefore, it is necessary to design an efficient and fast DNN model to enable the inference of IONet on low-end devices, e.g. mobile phone, smartwatch, Raspberry Pi. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{wavenet2.pdf} \caption{\label{fig:wavenet} A comparison of LSTM-based IONet and WaveNet-based L-IONet} \end{figure} The main bottleneck of IONet framework is the LSTM module. During the backpropagation of model training, recurrent models confront the so-called gradients vanishing problem \cite{greff2016lstm}, when processing long sequential data. This is especially the case in our inertial tracking task, as the input is a long sequence of 200 frames of inertial measurements, causing the optimization of recurrent models to be hard and unstable. Moreover, parallel training and inference is difficult for recurrent models, due to the fact that recurrent models have to exploit the sequential relation of the inputs and outputs. This limitation requires a sequence of input to be feed into recurrent models in order, consuming huge training time and computational resources to converge. In addition, the inference speed is a bottleneck for deploying RNN models on low-end devices, such as IoT devices or mobile phones, because of the complex operations inside recurrent networks. In contrast, the feed-forward models, e.g. WaveNet are more lightweight, and able to balance the trade-off between the accuracy and inference speed \cite{Oord2016}. We propose to replace the recurrent model with an autoregressive model to produce outputs using the recent frames of a sequence. A good example is WaveNet, a generative causal autoregressive model, widely applied in processing speech and voice signals for synthesis tasks \cite{Oord2016}. Inspired by WaveNet, we propose an autoregressive model based L-IONet to process the long continuous signals of inertial sensors to predict polar vectors, which are further connected with previous states to reconstruct trajectories. Because L-IONet has no recurrent module and fewer complex nonlinear operations, this feed-forward model is easier to train in parallel, and much faster at state inference. The basic module of our proposed framework is the causal dilated convolution layer. It can be viewed as a convolutional neural network (ConvNet) with a sliding window, but is a specific type of ConvNet that works perfectly on long sequential data. Compared with a regular ConvNet, the causal convolution inside our model is a 1-dimensional filter that convolves on the elements of current and previous timestep from last layer, to prevent using future states, as shown in Figure 4 (b). The stacked layers of dilated convolutions allow the receptive area of convolution operation to be made very large by using the convolution that skips input values with a certain distance. And hence the model is able to capture a long sequence of data without being too huge \cite{yu2015multi}. Each causal dilated convolution performs via a gated activation unit: \begin{equation} \mathbf{z} = \text{tanh} (\mathbf{W}_{f,k}*\mathbf{x}) \odot \sigma (\mathbf{W}_{g,k}*\mathbf{x}) \end{equation} where $\mathbf{W}$ denotes the weights of the convolutional filters, $f$ and $g$ represent filters and gates, $k$ is the layer index, $*$ is the convolution operator, and $\odot$ is an element-wise multiplication operator. Meanwhile, residual and skip connection modules are adopted to enable a deeper structure, and improve the model's non-linearity in regression. In our L-IONet framework, several layers of dilated causal convolutions are stacked to increase the receptive areas of the inputs. They skip the inputs with a specified stride, and their dilation doubled for every layer. In our case, an 8-layers model with a dilation of 1, 2, 4, 8, 16, 32, 64, 128 for each layer respectively, is enough to process a sequence of 200 frames of inertial data. The original WaveNet is designed for audio generation, which quantizes the real data into possible values, and reconstructs from the quantized data using the softmax function. Instead of learning classification possibility, our framework replaces the softmax function with a pooling layer and a fully-connected layer to map the extracted features $\mathbf{z}$ into the 2-dimensional polar vectors: \begin{equation} (\Delta l, \Delta \psi)=\text{FC}(\text{Pool}(\mathbf{z})) . \end{equation} Similar to IONet model, the predicted polar vectors are further connected with previous system states to produce current locations via Equation \ref{eq: location}. Compared with IONet, the main advantages of our proposed L-IONet can be summarized in two-folds - 1) Accuracy: the WaveNet module inside our L-IONet is extremely suitable to processing long continuous sensor signals, i.e. inertial data in our case. Compared with recurrent models, WaveNet mainly consists of dilated causal convolutions, which is easier to optimize, converge and recover optimal parameters during training, as no hidden states need to be updated and maintained for a long sequence of input data. Besides, the residual modules inside WaveNet further improves the expressive capacity of our model and thus provides more accurate polar vector predictions. 2) Efficiency: L-IONet shows large improvement of both training and inference speed over IONet, enabling it to be deployed onto low-end devices easily, as illustrated in the experiments of Section V. On one hand, WaveNet allows parallel training. On the other hand, the convolutional operations in our L-IONet are faster to perform than the complex operations inside recurrent models \cite{Yao2018}. The power of feed-forward models (e.g. WaveNet or Transformers \cite{vaswani2017attention}) have already shown huge improvement in voice synthesis and machine translation \cite{devlin2019bert}. Recently, there is a trend to replace the LSTM module with feed-forward models in sequence modelling tasks. However, few work has explored the potential applications of feed-forward models in processing continuous sensor data, e.g. inertial data as inertial tracking in our case. \subsection{Sliding Window} \begin{figure*} \centering \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=\textwidth]{inference_parameters.pdf} \caption{\label{fig:parameters} Parameters Number} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=\textwidth]{inference_training.pdf} \caption{\label{fig:training speed} Training Speed} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=\textwidth]{inference_loss.pdf} \caption{\label{fig:accuracy} Mean square error} \end{subfigure} \caption{\label{fig:edge} A comparison of IONet and L-IONet models in terms of their (a) number of parameters, (b) training (convergence) speed and (c) test accuracy. L-IONet shows competitive performance to IONet, but requires less memory and a quicker training time.} \end{figure*} \begin{table*}[ht] \caption{The execution time (ms) of the deep neural networks models on the low-end devices. } \label{tb: inference time} \begin{center} \begin{tabular}{c c c c c} \hline Models & Huawei Mate 8 & Nexus 5 & HTC One M8 & Sony SW2\\ \hline 2-layers LSTM (128) & 38.13 & 38.65 & 88.13 & 342.61\\ 2-layers LSTM (64) & 11.42 & 14.74 & 33.62 & 109.41\\ 1-layer Bi-LSTM (128) & 27.23 & 31.08 & 71.02 & 261.08\\ 1-layer LSTM (128) & 12.7 & 16.15 & 37.38 & 130.85\\ 1-layer LSTM (64) & 4.65 & 7.08 & 16.69 & 48.9\\ 1-layer LSTM (32) & 1.32 & 2.25 & 3.49 & 18.7\\ 1-layer Basic RNN (128) & 2.4 & 3.13 & 4.63 & 31.2\\ 1-layer Basic RNN (64) & 0.86 & 1.7 & 2.69 & 14.06\\ 1-layer Basic RNN (32) & 0.46 & 1.13 & 1.94 & 8.78\\ 1-layer GRU (128) & 7.29 & 12.92 & 14.72 & 81.8\\ 1-layer GRU (64) & 3.02 & 6.21 & 8.00 & 35.03\\ 1-layer GRU (32) & 1.76 & 4.24 & 5.68 & 21.54\\ \hline WaveNet (32) & 3.7 & 6.47 & 13.74 & 56.78\\ WaveNet (16) & 1.27 & 3.58 & 8.43 & 27\\ \hline \end{tabular} \end{center} \end{table*} In order to increase the output rate of neural network predictions, we present a sliding window method. As Figure \ref{fig:framework} (b) and (c) demonstrated, the inertial sensory readings are segmented into independent sequences by using a fixed-size sliding window. In our problem, we choose $n$ the window size of the sequence as 200 frames (2 seconds), with a stride for sliding the window as 10. The polar vector is predicted by the deep neural networks from each sequence, and connected by a merging module to generate locations, as Equation (3) described. Note that the current location is updated with the location 200 frames before it rather than the previous states 10 frames before it. With the predictions from the overlapping windows, the output rate is increased onto 10 Hz. Low pass filters are further used upon the polar vectors and locations to smooth the predictions for trajectory reconstruction. \section{Experiments} In this section, we implemented and trained the IONet and L-IONet models on the OxIOD dataset, and conducted extensive experiments to evaluate their performance on the low-end devices, velocity estimation, and localisation experiments. \subsection{Setup} \textbf{Training and Testing:} We split the dataset into the training and testing set for each attachment scenario, i.e. handheld, pocket, handbag and trolley. The detailed description can be found in the dataset folder. All the data is split using a window size of 200 and a stride of 10. Considering the convenience of deploying on devices, our IONet and L-IONet were implemented in the Keras framework with a Tensorflow backend. By minimising the mean square error between the estimated values and ground truth provided by our dataset, the optimal parameters were trained via the ADAM optimiser \cite{Kingma2014} with a learning rate of $1e^{-5}$. The batchsize is chosen as 256. We trained each of the model configurations on one NVIDIA TESLA K80. \textbf{Devices:} To evaluate the performance of our proposed models on low-end devices, we chose three levels off-the-shelf consumer smartphones, i.e. Huawei Mate 8, Nexus 6, HTC One M8, and one consumer smartwatch, i.e. Sony Smartwatch 2. Huawei Mate 8 is equipped with octa-core (4x2.3 GHz and 4x1.8 GHz) CPU and 4 GB RAM. Nexus 6 is equipped with quad-core 2.7 GHz CPU and 3 GB RAM. HTC One M8 is equipped with quad-core 2.5 GHz CPU and 2 GB RAM. Sony Smartwatch 2 is equipped with 1 core 180 MHz CPU and 256 MB RAM. Our IONet and L-IONet models were first trained with the Keras framework on GPUs, further converted into Tensorflow Lite models, and then deployed on the low-end devices to test their inference speed. \subsection{Model Performance at the edge} We conducted a systematic research into the inference performance of DNNs models for inertial tracking at the edge. The LSTM-based IONet is compared with our proposed WaveNet style L-IONet, with different hyperparameters chosen to demonstrate their impacts on the model performance, which are the number of layers, whether LSTMs are bi-directional or not, the number of hidden states for LSTMs, and the number of convolutional filters for WaveNet. Moreover, we replaced the LSTM module in IONet with GRUs and Basic RNNs as baselines to show the trade-off between model accuracy and efficiency. Figure \ref{fig:edge} compares different model configurations of IONet (LSTM), IONet (GRU), IONet (Basic RNN) and L-IONet (WaveNet), in terms of their number of parameters, training speed and mean square error (MSE) of predicted polar vectors. It is clear to see that the L-IONet with 32 filters i.e. WaveNet (32), achieves the highest accuracy, with a prediction error of 0.0069, even slightly lower than that of IONet with 1-layer Bi\_LSTM (128), i.e. 1-layer Birectional LSTM with 128 hidden states. In contrast, the number of parameters in the L-IONet with WaveNet (32) is only one quarter that of the IONet with 1-layer Bi-LSTM (128). Meanwhile, L-IONet with WaveNet (32) is around 10 times faster than IONet with 1-layer Bi-LSTM when training on a Tesla K80 GPU. This indicates that L-IONet shows competitive performance in accuracy over IONet, while still superior in the speed and resource consumption. Table \ref{tb: inference time} illustrates the execution time of different IONet (LSTM, GRU, Basic RNN) and L-IONet (WaveNet) models when deployed on Huawei Mate 8, Nexus 5, HTC One M8 and Sony SW2 respectively. The execution time (milliseconds, ms) is the average inference time of these models at the low-end devices. The L-IONet models, i.e. WaveNet (32) and WaveNet (16) performed faster inference than the LSTM-based IONet models. Even at the swartwatch device equipped with very limited CPU and memory, our proposed L-IONet is capable of realising real-time inference, producing outputs within only 56.78 ms (WaveNet (32)) and 27 ms (WaveNet (16)) for each step. The inference speed of IONet with 1-layer LSTM (64) is similar to WaveNet (32), but its prediction error is almost 8 times higher than WaveNet (32). We further compare LSTM (32) with WaveNet (32) and find that the prediction error of LSTM (32) increases to 17.5 times higher than WaveNet (32), although LSTM (32) is with faster inference speed. It is interesting to see that GRUs are more lightweight compared with both LSTM and WaveNet models. However, the prediction accuracy of GRU models are not satisfying with larger prediction errors, i.e. 0.0186, 0.0391, and 0.0626 for GRU(128), GRU(64) and GRU (32) respectively, around 3, 6, 9 times higher than WaveNet (32). The Basic RNNs (128) (64) (32) have fewer parameters, and faster inference speed on low-end devices than our WaveNet-based L-IONet, but they almost learned nothing from inertial data with huge test errors (i.e. 0.268, 0.288 and 0.296), nearly 40 times larger than the WaveNet models. Therefore, our WaveNet based L-IONet models show better trade-off between the prediction accuracy and on-device inference efficiency. It is worth noticing that the Wavenet-based L-IONet owns the advantages of faster training speed over Basic RNNs, LSTMs, and GRUs, as shown in Figure 5 (b). This is because feed-forward models are easier to train and optimize than recurrent models. \subsection{Velocity and Heading Estimation} \label{sec: velocity} \begin{figure*} \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{normal.pdf} \caption{\label{fig:speed_normal} Walking Normally} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{slow.pdf} \caption{\label{fig:speed_slow} Walking Slowly} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{run.pdf} \caption{\label{fig:speed_run} Running} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{mix.pdf} \caption{\label{fig:speed_mix} Mixed Activities} \end{subfigure} \caption{\label{fig:velocity estimation} The velocity and heading estimations for a) walking normally, b) walking slowly, c) running and d) mixed motion modes. The ground truth was captured by Vicon System, while the values from IONet and L-IONet were predicted by the learning model trained on our proposed dataset.} \end{figure*} As a demonstration of training performance, the IONet and L-IONet models were trained on the OxIOD dataset to predict the average velocity and heading rate of pedestrian motion. The average velocity $\bar{v}$ and heading rate $\dot{\psi}$ are defined as the location displacement $\Delta l$ and heading change $\Delta \psi$ during a window size of time $n$: \begin{equation} (\bar{v}, \dot{\psi}) = (\Delta l / n, \Delta \psi / n) . \end{equation} In our experiment setup, the window size $n$ was chosen as 2 seconds, so a sequence of inertial data (200 frames) $(\{(\mathbf{a}_i, \mathbf{w}_i)\}_{i=1}^{n})$ is fed into IONet or L-IONet model to predict the average velocity $\bar{v}$ and heading rate $\dot{\psi}$: \begin{equation} (\bar{v}, \dot{\psi}) = \text{IONet or L-IONet} (\{(\mathbf{a}_i, \mathbf{w}_i)\}_{i=1}^{n}) , \end{equation} where we used IONet with 1-layer 128-dimensional Bidirectional LSTM, and L-IONet with 32-filters WaveNet for training and prediction. The training data are from the training sets of three motion modes categories: walking normally (handheld, 20 seqs), walking slowly (7 seqs) and running (6 seqs). To test its generalisation ability, we performed randomly walking in the Vicon Room, and used the trained neural network to predict the values for selected three motion modes and a mix of activities respectively. Fig. \ref{fig:velocity estimation} indicates that both IONet and L-IONet can model a variety of complex motions, and generalise well to mixed activities. The more lightweight L-IONet does not suffer an accuracy loss in this task. \subsection{Deep Learning based Pedestrian Inertial Navigation} We show how to solve the pedestrian inertial navigation problem using deep neural networks with the aid of our proposed OxIOD dataset. IONet and L-IONet models can reconstruct trajectories from raw IMU data, and provide users with their accurate locations. A 1-layer Bidirectional LSTM with 128 dimensional hidden states was adopted for IONet, while the WaveNet with 32 filters was used in L-IONet for the evaluation. Both models were trained with the above detailed split training sets from the four attachment categories, i.e. the handheld (20 sequences), pocket (10 sequences), handbag (7 sequences) and trolley (12 sequences). Two sets of experiments were conducted to evaluate our proposed models. \begin{figure*} \centering \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{floor1_handheld_L_IONet2.pdf} \caption{\label{fig:floor1} Office Floor 1} \end{subfigure} \begin{subfigure}[t]{0.48\textwidth} \includegraphics[width=\textwidth]{floor4_handheld_L_IONet2.pdf} \caption{\label{fig:floor2} Office Floor 2} \end{subfigure} \caption{\label{fig: largescale} The largescale localisation experiments were conducted on (a) Office Floor 1 and (b) Office Floor 2. The trajectories were generated from the IONet, L-IONet and PDR. The pseudo ground truth was provided by Google Tango device.} \end{figure*} \begin{figure*} \centering \begin{subfigure}[t]{0.24\textwidth} \includegraphics[width=\textwidth]{smallscale_hand2.pdf} \caption{\label{fig:handheld} Handheld} \end{subfigure} \begin{subfigure}[t]{0.24\textwidth} \includegraphics[width=\textwidth]{smallscale_pocket2.pdf} \caption{\label{fig:pocket} In Pocket} \end{subfigure} \begin{subfigure}[t]{0.24\textwidth} \includegraphics[width=\textwidth]{smallscale_bag2.pdf} \caption{\label{fig:handbag} In Handbag} \end{subfigure} \begin{subfigure}[t]{0.24\textwidth} \includegraphics[width=\textwidth]{smallscale_trolley2.pdf} \caption{\label{fig:trolley} On Trolley} \end{subfigure} \caption{\label{fig:deep tracking} The trajectories reconstruction for pedestrian tracking with device in four attachments: a) in the hand, b) in the pocket, c)in the handbag, and d) on the trolley respectively. The trajectories were generated from IONet, L-IONet and a basic PDR algorithm. PDRs do not work when the device was placed on the trolley, as no step can be detected in this situation. The ground truth values are provided by the Vicon System.} \end{figure*} The first set of tests involved tracking a pedestrian with the phone in different attachments. In this experiment, the participant carrying the smartphone was asked to walk normally inside the Vicon room. The IMU data \footnote{The test data can be found at the 'test' fold of our dataset} were collected and feed into the IONet and L-IONet to predict the participant's motion. The installed motion capture systems can provide highly precise trajectories as groundtruth. Note that these walking trajectories are not present in the training dataset. A basic PDR algorithm was implemented as a baseline, and we show that our dataset can also be used as a benchmark for conventional PDR algorithms. Figure \ref{fig:deep tracking} demonstrates the trajectories generated from the groundtruth (blue line), PDR (green line), IONet (orange line) and L-IONet (red line). It indicates that the deep learning based methods outperformed the model-based PDR when the phone was placed either in the hand, pocket or handbag. The trolley tracking is a difficult problem for PDR algorithms, as no step (periodicity pattern) can be detected in this case, and hence a handcrafted model is hard to build for this wheeled motion. In contrast, the learning based approaches are still able to generalise to this general motion, and reconstruct physically meaningful trajectories, while the PDR algorithm fails in this task. The L-IONet model produced results even closer to the groundtruth compared with IONet, especially in the handheld and trolley domains. Figure \ref{fig:pocket} indicates that the IONet shows better performance when mobile device is inside pocket. This is because inertial sensor experiences less motion-dynamics inside pocket (pocket can be viewed to constrain mobile device when users are moving), so that LSTM based IONet is already good enough to capture its self-motion from inertial data. In the other domains, the WaveNet based L-IONet is more capable of representing the free motion of sensor, due to the expressive capability of WaveNet in processing long sequential data. The other set of experiments is to perform large-scale localisation on two floors of an office building. Although DNN models were trained with inertial data collected inside the Vicon room, we show that the models can be used to predict the pedestrian motion outside the room directly. This is due to the fact that inertial data are not sensible to environments, and hence the proposed DNN models can generalize to new environment easily. Figure \ref{fig: largescale} demonstrates that both IONet and L-IONet models achieve good localisation results, although the two models never saw any data outside the Vicon room. This experiment shows the generalisation ability of the deep learning based models towards new environments. \section{Conclusions and Future Work} In this work, we propose L-IONet, a lightweight deep neural networks framework to learn inertial tracking from raw IMU data. L-IONet shows competitive performance over previous deep inertial odometry models. Meanwhile, L-IONet is more efficient in memory, inference and training. We conducted a systematic research into the performance of deep learning based inertial odometry models on low-end devices. Our L-IONet is able to achieve real-time inference on different levels smartphones, and even the smartwatch with very limited computational resources. Moreover, we present and release OxIOD, an inertial odometry dataset for training and evaluating inertial navigation models. With the release of this large-scale diverse dataset, it is our hope that it will prove valuable to the community and enable future research in long-term ubiquitous ego-motion estimation. Future work would include collecting data from more challenging situations, for example, 3D tracking. We plan to create on-line common benchmark and tools for the comparison of odometry models. We also hope to include more IoT devices into our dataset, such as smartwatch, wristband, smart earphones, to extend the potential applications of this research. A further extension to current deep inertial odometry models is to adopt knowledge distillation to compress the deep neural networks, which can reduce the number of parameters and enable faster training and on-device inference. Another future research direction is to investigate how to formulate dilated casual convolutional model (i.e. WaveNet style model) as a generic framewor to process a variety of sensor data e.g. temperature, pressure, light intensity, magnetic field, in other potential IoT application domains, e.g. health/activity monitoring, sport analysis, smart home and intelligent transportation. Except the deep neural networks discussed above, other machine learning models might also be applied into data-driven IoT research domains, for example, Deep Belief Network (DBN) or Broad Learning System (BLS). \bibliographystyle{IEEEtran}
\section{Introduction} Randomized experiments are typically seen as a gold standard for evaluating the causal effect of a treatment on an outcome. Although the estimation of causal effect allows researchers to examine whether the treatment causally affects the outcome, it provides only a black-box view of causality and cannot tell us how and why such an effect occurs. Mediation analysis seeks to open up the black box and helps us to understand how the treatment impacts the outcome. In particular, mediation analysis is an important tool for evaluating direct and indirect causal effects of the treatment on the outcome through an intermediate variable or a mediator. A traditional approach to mediation analysis, which was commonly used in social psychological research \citep{baron1986moderator,mackinnon2007mediation}, involves three regression models: a regression equation of mediator on treatment, a regression equation of outcome on both treatment and mediator, and a regression model of treatment on outcome. This regression-based traditional approach is often known as the linear structural equation modeling (LSEM) method. Usually, the LSEM framework does not consider latent confounders which affect both the mediator and the outcome in the models. However, in real applications, the mediator cannot be randomly assigned to individuals, and there may exist latent variables confounding the mediator-outcome relationship. The presence of such latent confounders often induces the non-identifiability of the direct and indirect causal effects of treatment on outcome. Apart from this, another drawback of the LSEM framework is that it cannot offer a general definition of these causal effects that are applicable beyond specific statistical models. Alternatively, a large number of scholars adopted the potential outcome framework to define the direct and indirect causal effects in causal mediation analysis \citep{robins1992identifiability,vanderweele2009marginal,imai2010identification,vanderweele2013mediation,li2017identifiability}. Causal mediation analysis distinguishes between natural and controlled effects which are defined for different purposes \citep{pearl2001direct}. For example, the natural direct effect captures the effect of the treatment when one intervenes to set the mediator to its naturally occurring level, while the controlled direct effect arises after intervening the mediator to a fixed level, which is particularly relevant for policy making and requires that both the treatment and mediator can be directly manipulated. The natural direct and indirect effects are more useful for understanding the underlying mechanism by which the treatment operates. This is because the total causal effect can be decomposed into the sum of these two natural effects. The identifiability of direct and indirect causal effects requires the sequential ignorability assumption \citep{imai2010general} or some other similar assumptions \citep{pearl2001direct,vanderweele2009conceptual}. The sequential ignorability assumption means that the treatment is randomly assigned and the mediator is also randomly assigned conditional on the assigned treatment and the measured covariates. Under the sequential ignorability assumption, the parameters in the LSEM approach can also have causal interpretations. However, this assumption is too stringent and may not hold even in randomized experiments. It is because that there may exist some latent confounders between the mediator and outcome variables. For example, blood pressure as a mediator between treatment and heart disease cannot be randomly assigned to patients, and there may be latent confounders (e.g., diets, habits and genes) affecting both blood pressure and heart disease. To address such latent confounding problems, one possible way is to perform a sensitivity analysis to evaluate how sensitive the result is to the violation of the sequential ignorability assumption \citep{vanderweele2010bias,imai2010general,li2017identifiability}. In order to obtain identifiability results for the case with latent confounders, \cite{ten2007causal} proposed a linear rank preserving model approach for assessment of causal mediation effects, but they made some no-interaction assumptions which are untestable. Following this line, \cite{zheng2015causal} extended this model to a more general setting but still required some other untestable assumptions. Another way of dealing with latent confounders is to use baseline covariates interacted with the random treatment assignment as an instrumental variable. Specifically, it assumes that there exists a baseline covariate which interacts with the treatment in predicting the mediator but is not predictive to the outcome \citep{dunn2007modelling,albert2008mediation,small2012mediation}. In this article, we focus on the identification and estimation of natural direct and indirect causal effects in causal mediation analysis. We propose an approach to dealing with multiple and correlated treatments for causal mediation analysis. We give the formal definitions of causal mediation effects for each treatment while accounting for possible correlations with other treatments. Besides, our approach can also be applicable to the case with latent confounders between mediator and outcome variables. We allow for interactions between treatments and covariates in both mediator and outcome models, and we utilize the information from multiple treatments to identify direct and indirect causal effects and obtain consistent estimates of direct and indirect effects. \section{Preliminaries}\label{sec:preliminaries} \subsection{Observed random variables} Let $\mathbf{Z}_i$ denote the observed treatments assigned to individual $i$ which is a vector with $J \geq 2$ treatment variables, i.e., $\mathbf{Z}_i=(Z_{i1}, Z_{i2},\ldots, Z_{iJ})^\top$. Let $Y_i$ denote the observed outcome for individual $i$ and $M_i$ denote some observed intermediate variable on the causal path from the treatments to the outcome. To streamline notation of the random variables, we suppress subscript $i$ for individual below. The components of $\mathbf{Z}$ can be correlated with each other through an unobserved common cause of them. For each $j=1,\ldots,J$, assume that $\Pr(Z_{j}=z_j)>0$ for any $z_j$th treatment level with $z_j\in\{1,\ldots,K_j\}$. Both $Y$ and $M$ are assumed to be continuous and there may exist a latent confounder $U$ confounding the relationship between these two variables. In general, we may also consider $M$ as a vector of mediator variables and our results in this article can be straightforwardly generalized from the setting of a single mediator to the setting of multiple mediators. \subsection{Potential outcomes and assumptions} To formally define causal effects in causal mediation analysis, we make use of the concept of potential outcomes. Potential outcomes present the values of a outcome variable for each individual under varying levels of a treatment variable. We can observe only one of these potential outcomes but can never observe all of them because it is impossible for us to unwind time and go back and manipulate the individual to other treatment levels. We first make the stable unit treatment value assumption (SUTVA). This assumption requires that the value of the outcome should not be affected by the manner of manipulations providing the same value for the treatment variable, that is, there is only one version of the potential outcomes and there is no interference between individuals \cite{rubin1980comment}. The SUTVA allows us to uniquely define the potential values for the mediator $M(\mathbf{z})$ and the potential outcome $Y(\mathbf{z})$ if an individual were to receive treatment $\mathbf{Z}=\mathbf{z}$. Let $Y(\mathbf{z},m)$ denote the potential outcome for an individual that would occur if the treatment $\mathbf{Z}$ were set to level $\mathbf{z}$, and if the mediator $M$ were manipulated to level $m$. In contrast, let $Y(\mathbf{z},M(\mathbf{z}^*))$ denote the potential outcome for an individual, where we do not specify the actual level of $M$, but set it to what it would have been if treatment had been $\mathbf{Z}=\mathbf{z}^*$. To connect the observed random variables with corresponding potential outcomes, we also make the consistency assumption, namely that $M(\mathbf{z})=M$, $Y(\mathbf{z}) = Y$ if $\mathbf{Z}=\mathbf{z}$, and $Y(\mathbf{z},m)=Y$ if $\mathbf{Z}=\mathbf{z}$, $M=m$. According to this assumption, we note that the observed outcome $Y$ is just one realization of the potential outcome $Y(\mathbf{z},m)$ with observed treatment level $\mathbf{Z} = \mathbf{z}$ and mediator level $M=m$. We also assume that the underlying causal model corresponds to a {\it directed acyclic graph} (DAG, \cite{pearl2000causality}). The DAG is a useful tool for visual representations of qualitative causal relationships between the variables of interest. We show the corresponding DAG of this context in Figure \ref{fig:dag}. Note that there are no causal relationships between the treatment variables in $\mathbf{Z}$, but they may be associated with each other through some unobserved variable. We use $C$ to denote this unobserved common cause of the treatment variables in $\mathbf{Z}$, and it is assumed to be independent of the other variables conditional on $\mathbf{Z}$. When the treatment variables in $\mathbf{Z}$ are randomly assigned, $C$ is an empty set, and this assumption automatically holds. The symbol `{\scalebox{0.7}{$\vdots$}}' in the DAG represents other undisplayed treatment variables $Z_j$'s, each of which has the directed edges $C \rightarrow Z_j$, $Z_j \rightarrow M$, and $Z_j \rightarrow Y$. \begin{figure}[h] \begin{center} \begin{tikzpicture} \node[sum, text centered] (c) {$C$}; \node[above right = 1.5 of c, text centered] (z1) {$Z_1$}; \node[right = 1.1 of c, text centered] (d) {$\vdots$}; \node[below right = 1.5 of c, text centered] (j) {$Z_J$}; \node[below right = 1.5 of z1, text centered] (m) {$M$}; \node[right=2.4 of m, text centered] (y) {$Y$}; \node[sum, above = of $(m)!0.2!(y)$, text centered] (u) {$U$}; \draw[->, line width= 0.5] (c) -- (z1); \draw[->, line width= 0.5] (c) -- (j); \draw[->, line width= 0.5] (z1) -- (m); \draw[->, line width= 0.5] (j) -- (m); \draw[->, line width= 0.5] (z1) to [out=90,in=90, looseness=0.5] (y); \draw[->, line width= 0.5] (j) to [out=270,in=270, looseness=0.5] (y); \draw [->, line width= 0.5] (m) -- (y); \draw [->, line width= 0.5] (u) -- (m); \draw [->, line width= 0.5] (u) -- (y); \end{tikzpicture} \end{center} \caption{ \label{fig:dag} A DAG depicts the causal relationships for mediation analysis, where the variables in circle are unobserved. } \end{figure} \subsection{Definitions of direct and indirect effects} Using the nested potential outcomes notation, we can define the causal parameters of interest in this multiple-treatment model. We first describe the definition of the average causal effect in a single-treatment setting. We use the difference $\textnormal{E}\{Y(z)-Y(z^*)\}$ to represent the average causal effect of treatment level $z$ versus treatment level $z^*$. We now extend this definition to the setting with multiple treatment variables. For notational simplicity, we let $\mathbf{Z}_{-j}=(Z_1,\ldots,Z_{j-1},Z_{j+1},\ldots,Z_J)$ and $\mathbf{z}_{-j}=(z_1,\ldots,z_{j-1},z_{j+1},\ldots,z_J)$. Then we let $CTE(z_j,z_j^*\mid \mathbf{z}_{-j})$ denote the conditional total causal effect of $Z_j$ on $Y$ under two differing levels $z_j$ and $z_j^*$ of $Z_j$ while conditioning on the interventions $\mathbf{z}_{-j}$ for the other treatments. The formulation is given as follows: \begin{equation*} \begin{aligned} CTE(z_j,z_j^*\mid \mathbf{z}_{-j}) =\textnormal{E}\{Y(z_{j},\mathbf{z}_{-j})\} -\textnormal{E}\{Y(z_j^*, \mathbf{z}_{-j})\}. \vspace{-1em} \end{aligned} \end{equation*} In addition, we can also define the average total causal effect, $TE(z_j,z_j^*)$, which is free of other treatment variables, by taking expectation of $CTE(z_j,z_j^*\mid \mathbf{Z}_{-j})$ with respect to $\mathbf{Z}_{-j}$, i.e., \begin{equation*} \begin{aligned} TE(z_j,z_j^*)=\textnormal{E}\{CTE(z_j,z_j^*\mid \mathbf{Z}_{-j})\}. \end{aligned} \end{equation*} We next define the conditional natural direct and indirect effects of $Z_j$ on $Y$. Let $CNDE(z_j,z_j^*\mid \mathbf{z}_{-j})$ denote the conditional natural direct effect of $Z_j$ under two different levels $z_j$ and $z_j^*$ while setting the other treatments to $\mathbf{z}_{-j}$ and setting $M$ to the values attained under fixed treatment levels $\mathbf{z}$. We use $CNIE(z_j,z_j^*\mid \mathbf{z}_{-j})$ to denote the conditional natural indirect effect which is defined as the difference between two averaged potential outcomes with treatments set to $z_j^*,\mathbf{z}_{-j}$ and the mediator $M$ set to the values attained under differing treatment levels $z_j$ and $z_j^*$ for $Z_j$ and $\mathbf{z}_{-j}$ for others. Below we formally give their definitions: \begin{equation*} \begin{aligned} CNDE(z_j,z_j^*\mid \mathbf{z}_{-j}) =& \textnormal{E}\{Y(z_j,\mathbf{z}_{-j},M(\mathbf{z}))\} \\&~- \textnormal{E}\{Y(z_j^*,\mathbf{z}_{-j},M(\mathbf{z}))\},\\ CNIE(z_j,z_j^*\mid \mathbf{z}_{-j}) = &\textnormal{E}\{Y(z_j^*,\mathbf{z}_{-j},M(z_j,\mathbf{z}_{-j}))\} \\&~- \textnormal{E}\{Y(z_j^*,\mathbf{z}_{-j}, M(z_j^*,\mathbf{z}_{-j}))\}. \end{aligned} \end{equation*} Similarly, we also give the the definitions of the average natural direct and indirect effects of $Z_j$ on $Y$ which do not depend on other treatment variables: \begin{equation*} \begin{aligned} NDE(z_j,z_j^*) =~&\textnormal{E}\{CNDE(z_j,z_j^*\mid \mathbf{Z}_{-j})\},\\ NIE(z_j,z_j^*) =~&\textnormal{E}\{CNIE(z_j,z_j^*\mid \mathbf{Z}_{-j})\}. \end{aligned} \end{equation*} Under the composition assumption \citep{pearl2000causality} that $Y(\mathbf{z})=Y(\mathbf{z},M(\mathbf{z}))$, we immediately have the following decompositions: \begin{equation*} \begin{aligned} CTE(z_j,z_j^*\mid \mathbf{z}_{-j}) =& CNDE(z_j,z_j^*\mid \mathbf{z}_{-j}) \\&~+CNIE(z_j,z_j^*\mid \mathbf{z}_{-j}),\\ TE(z_j,z_j^*)=&NDE(z_j,z_j^*)+NIE(z_j,z_j^*). \end{aligned} \end{equation*} \section{Methods}\label{sec:methods} In this section, we first study the identification of the direct and indirect causal effects for some commonly-used models. We then provide an approach for estimation and also discuss inference procedures via resampling techniques. \subsection{Causal models} We use potential outcomes notation to construct causal models that allow us to directly specify the causal effects of interest as functions of parameters in the models. We consider the following causal models including a latent confounder $U$ for potential outcomes, $M(\mathbf{z})$ and $Y(\mathbf{z},m)$, respectively: \begin{eqnarray} \begin{aligned} M(\mathbf{z}) &= g_M^c(\mathbf{z}) + U + \epsilon(\mathbf{z}),\\ Y(\mathbf{z},m)&=g_Y^c(\mathbf{z}) + \beta^c m + h(U) + \eta(\mathbf{z},m)\label{eqn:causalmodel}, \end{aligned} \end{eqnarray} where $\textnormal{E}(U)=\textnormal{E}\{h(U)\}=0$, $g_M^c(\cdot)$, $g_Y^c(\cdot)$ and $h(\cdot)$ are unknown functions. Note that the causal models in~\eqref{eqn:causalmodel} allow the individual natural direct, indirect and total causal effects vary individual by individual. Similar models were also proposed in \cite{lindquist2012functional}. Here we use the superscript `$c$' to indicate causal parameters in models~\eqref{eqn:causalmodel} for potential outcomes to distinguish the parameters in SEMs for observed variables. We assume that $\textnormal{E}\{\epsilon(\mathbf{z})\}=0$ and $\textnormal{E}\{\eta(\mathbf{z},m)\}=0$ and that $\epsilon(\mathbf{z})$ and $\eta(\mathbf{z},m)$ are mutually independent and are also independent of $(\mathbf{Z},M,U)$ for all values of $\mathbf{z}$ and the pair $(\mathbf{z},m)$. Then we can obtain $\textnormal{E}\{\eta(\mathbf{z},M(\mathbf{z}^*))\}=0$ for all values of $\mathbf{z}$ and $\mathbf{z}^*$. With these conditions, we can directly write the average natural direct, indirect and total causal effects of $Z_j$ on $Y$ respectively as \begin{equation}\label{eqn:causaleffectsofinterest} \begin{aligned} NDE(z_j,z_j^*)&=\textnormal{E}\{g_Y^c(z_j,\mathbf{Z}_{-j})\} - \textnormal{E}\{g_Y^c(z_j^*,\mathbf{Z}_{-j})\},\\ NIE(z_j,z_j^*)&=\beta^c\big[\textnormal{E}\{g_M^c(z_j,\mathbf{Z}_{-j})\} - \textnormal{E}\{g_M^c(z_j^*,\mathbf{Z}_{-j})\}\big],\\ TE(z_j,z_j^*)&=NDE(z_j,z_j^*)+NIE(z_j,z_j^*). \end{aligned} \end{equation} The identifiability of these causal effects relies on the identifiability of $g_M^c(\cdot)$, $g_Y^c(\cdot)$ and $\beta^c$. These parameters encode the causal relationships in models \eqref{eqn:causalmodel} for the potential outcomes. Since the variables in the models are not observed, these parameters cannot be estimated by the ordinary approaches for the models with observed variables. Hence, additional assumptions or (and) more feasible models are required to identify and estimate these parameters. \subsection{SEMs for observed variables} According to the path diagram in Figure \ref{fig:dag}, we consider the SEMs for observed variables and a latent confounder $U$ as follows: \begin{equation} \begin{aligned} M(\mathbf{Z}) &= g_M^s(\mathbf{Z}) + U + \epsilon,\\ Y(\mathbf{Z},M)&=g_Y^s(\mathbf{Z}) + \beta^s M + h(U) + \eta\label{eqn:SEM}, \end{aligned} \end{equation} where $\textnormal{E}(\epsilon\mid \mathbf{Z},U)=0$, $\textnormal{E}(\eta\mid \mathbf{Z},M,U)=0$, $g_M^s(\cdot)$ and $g_Y^s(\cdot)$ are unknown functions, and the variables $M(\mathbf{Z})$ and $Y(\mathbf{Z}, M)$ are observed because of the consistency assumption: $M(\mathbf{Z})=M$ and $Y(\mathbf{Z},M)=Y$. The SEMs are built upon observed variables, which are different from those for the potential outcomes defined in the previous subsection. The superscript `$s$' denotes the parameters occurring in the SEMs, and these parameters are in principle estimable from observed data. The SEMs in~\eqref{eqn:SEM} assumes constant individual natural direct, indirect and total causal effects, which is more restrictive than that imposed in the causal models~\eqref{eqn:causalmodel}. However, we are interested in the average versions of these causal effects, and the average causal effects can be expressed as causal parameters $\{g_M^c(\cdot)$, $g_Y^c(\cdot)$, $\beta^c\}$ in models~\eqref{eqn:causalmodel} according to~\eqref{eqn:causaleffectsofinterest}. In general, the parameters $\{g_M^s(\cdot),g_Y^s(\cdot),\beta^s\}$ in the SEMs~\eqref{eqn:SEM} are not equal to their counterparts $\{g_M^c(\cdot)$, $g_Y^c(\cdot)$, $\beta^c\}$ in the causal models. However, under the assumptions encoded by the DAG in Figure \ref{fig:dag}, we can establish the equality between these two sets of parameters. \subsection{Equivalence between parameters in causal models and SEMs} Under the models in~\eqref{eqn:SEM}, we can write the parameters $\{g_M^s(\cdot),g_Y^s(\cdot),\beta^s\}$ as \begin{equation*} \begin{aligned} g_M^s(\mathbf{z}) = \textnormal{E}\{M(\mathbf{Z})\mid \mathbf{Z} =\mathbf{z}\},~~~~~~~~~~~~~~~~~~~~~\qquad\qquad\qquad&\\ \beta^s=\frac{1}{m-m^*}\big[\textnormal{E}\{Y(\mathbf{Z},M(\mathbf{Z}))\mid M(\mathbf{Z})=m,\mathbf{Z}=\mathbf{z},U\}&\\ -\textnormal{E}\{Y(\mathbf{Z},M(\mathbf{Z}))\mid M(\mathbf{Z})=m^*,\mathbf{Z}=\mathbf{z},U\}\big],\qquad&\\ g_Y^s(\mathbf{z}) =\textnormal{E}\{Y(\mathbf{Z},M(\mathbf{Z}))\mid M(\mathbf{Z})=m,\mathbf{Z}=\mathbf{z}, U\}\qquad\quad&\\ -\beta^s m-h(U).\qquad\qquad\qquad\qquad\qquad\qquad\quad& \end{aligned} \end{equation*} Noting first from the DAG that $M(\mathbf{z})\indep \mathbf{Z}$ and under the assumption that $\textnormal{E}(U+\epsilon\mid \mathbf{Z}=\mathbf{z})=0$ for any value of $\mathbf{z}$, we immediately have the following result: \begin{equation*} \begin{aligned} g_M^s(\mathbf{z}) = \textnormal{E}\{M(\mathbf{Z})\mid \mathbf{Z} =\mathbf{z}\}=\textnormal{E}\{M(\mathbf{z})\}=g_M^c(\mathbf{z}). \end{aligned} \end{equation*} We also note that the potential outcomes for the mediator and outcome are conditionally independent given the latent confounder $U$, i.e., $Y(\mathbf{z},m)\indep M(\mathbf{z})\mid U$ for any value of the pair $(\mathbf{z},m)$. Combining this with the ignorable treatment assignment assumption, we have \begin{equation*} \begin{aligned} &\textnormal{E}\{Y(\mathbf{Z},M(\mathbf{Z}))\mid M(\mathbf{Z})=m,\mathbf{Z}=\mathbf{z},U\}\\ =~&\textnormal{E}\{Y(\mathbf{z},m)\mid M(\mathbf{z})=m,U\}=\textnormal{E}\{Y(\mathbf{z},m)\mid U\}. \end{aligned} \end{equation*} Consequently, \begin{equation*} \begin{aligned} \beta^s&=\frac{1}{m-m^*}\big[\textnormal{E}\{Y(\mathbf{z},m)\mid M(\mathbf{z})=m,U\}\\&~~~~~~~ -\textnormal{E}\{Y(\mathbf{z},m^*)\mid M(\mathbf{z})=m^*,U\}\big]\\ &=\frac{1}{m-m^*}\big[\textnormal{E}\{Y(\mathbf{z},m)\mid U\}-\textnormal{E}\{Y(\mathbf{z},m^*)\mid U\}\big] \\&=\beta^c. \end{aligned} \end{equation*} In addition, it should also be noted that based on the previous results, we can also show the equality of parameter $g_Y^s(\cdot)$ with parameter $g_Y^c(\cdot)$ as follows: \begin{equation*} \begin{aligned} g_Y^s(\mathbf{z}) &=\textnormal{E}\{Y(\mathbf{z},m)\mid U\}-\beta^s m-h(U)=g_Y^c(\mathbf{z}). \end{aligned} \end{equation*} Until now, we have shown the equivalence between parameters of the SEMs in \eqref{eqn:SEM} with the corresponding parameters of the causal models in \eqref{eqn:causalmodel}. Since the SEMs include the unobserved variable $U$, the parameters are still unidentifiable without additional conditions. \subsection{Identification of parameters} In this subsection, we give conditions under which the parameters of the SEMs are identifiable from observed data. Apparently, $g_M^s(\cdot)$ is identifiable due to the condition that $\textnormal{E}(U+\epsilon\mid \mathbf{Z})=0$ and can be written as follows: \begin{equation*} g_M^s(\mathbf{z}) = \textnormal{E}(M\mid \mathbf{Z}=\mathbf{z}). \end{equation*} In order to guarantee the identifiability of $\beta^s$ and $g_Y^s(\cdot)$, we impose the following condition. \begin{condition}\label{cond:identification} $\mathscr{G}_M^s:=\{g_M^s(\cdot)\}$ is a function space with finite dimension, and the space $\mathscr{G}_Y^s:=\{g_Y^s(\cdot)\}$ is a proper subspace of $\mathscr{G}_M^s$. \end{condition} The condition 1 implies that the number of the basis functions of $\mathscr{G}_M^s$ is finite and a proper subset of these basis functions generates the subspace $\mathscr{G}_Y^s$. This may be not a stringent condition and can be satisfied in a variety of cases. For example, suppose that $g_M^s(\mathbf{z})$ is a polynomial function of degree 2 in each component of $\mathbf{z}$. Then, a linear function $g_Y^s(\mathbf{z})$ of the components satisfies Condition \ref{cond:identification}. \begin{theorem}\label{thm:identification} Given the specified DAG in Figure~\ref{fig:dag} and models in \eqref{eqn:SEM}, the parameters $\beta^s$ and $g_Y^s(\cdot)$ are identifiable under Condition \ref{cond:identification}. \end{theorem} \begin{proof} Suppose that the functions $\phi_1(\mathbf{z}),\ldots,\phi_L(\mathbf{z})$ are composed of the basis functions of $\mathscr{G}_M^s$. Since $\mathscr{G}_Y^s$ is a proper subset of $\mathscr{G}_M^s$, we assume without loss of generality that the basis functions of $\mathscr{G}_Y^s$ are $\phi_1(\mathbf{z}),\ldots,\phi_{L_1}(\mathbf{z})$, where $L_1<L$. By definition, there exist two sequences of real numbers $\{\alpha_l\}_{l=1}^L$ and $\{\gamma_l\}_{l=1}^{L_1}$ such that \begin{equation}\label{eqn:linearcombination} \begin{aligned} g_M^s(\mathbf{z})=\sum_{l=1}^L\alpha_l \phi_l(\mathbf{z}),~~ \text{and}~~ g_Y^s(\mathbf{z})=\sum_{l=1}^{L_1}\gamma_l \phi_l(\mathbf{z}). \end{aligned} \end{equation} As discussed earlier, $g_M^s(\mathbf{z})$ is identifiable, which implies that the parameters $\{\alpha_l\}_{l=1}^L$ are also identifiable. Substituting the equation for $M$ into the equation for $Y$ in \eqref{eqn:SEM}, and replacing the expressions of $g_M^s(\mathbf{z})$ and $g_Y^s(\mathbf{z})$ with corresponding linear combinations as shown above, we obtain \begin{equation}\label{eqn:anothermodelforY} \begin{aligned} Y=&\sum_{l=1}^{L_1}(\gamma_l+\beta^s\alpha_l)\phi_l(\mathbf{Z})+ \beta^s\sum_{L_1+1}^L\alpha_l\phi_l(\mathbf{Z})\\&~~~+\beta^sU +h(U)+\beta^s\varepsilon+\eta. \end{aligned} \end{equation} Because $\textnormal{E}\{\beta^sU+h(U)+\beta^s\varepsilon+\eta\mid \mathbf{Z}\}=0$ and $\phi_1(\mathbf{z}),\ldots,\phi_L(\mathbf{z})$ are linearly independent, we find that $\gamma_l+\beta^s\alpha_l$ ($l=1,\ldots,L_1$) and $\beta^s\alpha_l$ ($l=L_1+1,\ldots,L$) are identifiable. This, combined with the identifiability of $\{\alpha_l\}_{l=1}^L$, implies that $\beta^s$ and $\{\gamma_l\}_{l=1}^{L_1}$ are also identifiable. Thus, $g_Y^s(\mathbf{z})$ is identifiable. \end{proof} Based on the discussions about the equality between the parameters of the SEMs and the analogous parameters of the causal models in the previous subsection, we conclude from Theorem \ref{thm:identification} that the parameters $g_M^c(\cdot)$, $g_Y^c(\cdot)$ and $\beta^c$ are also identifiable, which in turn implies the identifiability of the average natural direct, indirect and total causal effects of $Z_j$ on $Y$ according to \eqref{eqn:causaleffectsofinterest}. \subsection{Estimation and inference} In this subsection, we provide an approach for estimating the parameters of the SEMs in \eqref{eqn:SEM}. We also discuss the resampling-based procedures for inference. Given the known basis functions $\phi_1(\mathbf{z}),\ldots,\phi_L(\mathbf{z})$ of $\mathscr{G}_M^s$, we can express $g_M^s(\mathbf{z})$ and $g_Y^s(\mathbf{z})$ as linear combinations of them, which have been shown in \eqref{eqn:linearcombination}. Denote $\bm{\Phi}(\mathbf{z})=(\phi_1(\mathbf{z}),\ldots,\phi_L(\mathbf{z}))$, $\bm{\Phi}_1(\mathbf{z})=(\phi_1(\mathbf{z}),\ldots,\phi_{L_1}(\mathbf{z}))$, $\bm{\alpha}=(\alpha_1,\ldots,\alpha_L)^\top$, $\bm{\gamma}=(\gamma_1,\ldots,\gamma_{L_1})^\top$. We then rewrite $g_M^s(\mathbf{z})$ and $g_Y^s(\mathbf{z})$ as \begin{equation*} g_M^s(\mathbf{z}) = \bm{\Phi}(\mathbf{z})\bm{\alpha}, ~~\text{and}~~ g_Y^s(\mathbf{z})=\bm{\Phi}_1(\mathbf{z})\bm{\gamma}. \end{equation*} By the least-square criterion, the coefficient $\bm{\alpha}$ of the expansion of $g_M^s(\mathbf{z})$ can be determined by minimizing \begin{equation*} \hat{\bm{\alpha}}=\arg\!\min_{\bm{\alpha}} \sum_{i=1}^n \big\{M_i-\bm{\Phi}(\mathbf{Z}_i)\bm{\alpha}\big\}^2. \end{equation*} Then the solution is given by \begin{equation*} \hat{\bm{\alpha}}=\bigg\{\sum_{i=1}^n\bm{\Phi}(\mathbf{Z}_i)^\top\bm{\Phi}(\mathbf{Z}_i)\bigg\}^{-1} \bigg\{\sum_{i=1}^n\bm{\Phi}(\mathbf{Z}_i)^\top M_i\bigg\}, \end{equation*} which provides us an estimate of the coefficients of $g_M^s(\mathbf{z})$. To derive estimates of $\beta^s$ and $\bm{\gamma}$, we utilize the idea of the generalized method of moments (GMM) \cite{hall2005generalized} and introduce more notations. Let $\bm{\alpha}_1=(\alpha_1,\ldots,\alpha_{L_1})^\top$, and the subvector being composed of the remaining components in $\bm{\alpha}$ is denoted by $\bm{\alpha}_2$. Let $\bm{\Phi}_2(\mathbf{z})$ represent the subvector of $\bm{\Phi}(\mathbf{z})$ with components not contained in $\bm{\Phi}_1(\mathbf{z})$, i.e., $\bm{\Phi}(\mathbf{z})=\{\bm{\Phi}_1(\mathbf{z}),\bm{\Phi}_2(\mathbf{z})\}$. Then, we denote $\bm{Y}=(Y_1,\ldots,Y_n)^\top$, $\bm{\Phi}=\{\bm{\Phi}(\mathbf{Z}_1)^\top,\ldots,\bm{\Phi}(\mathbf{Z}_n)^\top\}^\top$, $\bm{\Phi}_1=\{\bm{\Phi}_1(\mathbf{Z}_1)^\top,\ldots,\bm{\Phi}_1(\mathbf{Z}_n)^\top\}^\top$, and $\bm{\Phi}_2=\{\bm{\Phi}_2(\mathbf{Z}_1)^\top,\ldots,\bm{\Phi}_2(\mathbf{Z}_n)^\top\}^\top$. For notational simplicity, we also let $\bm{\delta}=\bm{\gamma}+\beta^s\bm{\alpha_1}$. Using these notations, we now rewrite \eqref{eqn:anothermodelforY} as \begin{equation*} Y = \bm{\Phi}_1(\mathbf{Z})\bm{\delta}+\beta^s\bm{\Phi}_2(\mathbf{Z})\bm{\alpha}_2+ \beta^sU+h(U)+\beta^s\varepsilon+\eta. \end{equation*} In view of $\textnormal{E}\{\beta^sU+h(U)+\beta^s\varepsilon+\eta\mid \mathbf{Z}\}=0$, it follows immediately that \begin{equation}\label{eqn:residualexpectation} \textnormal{E}\big[\Phi(\mathbf{Z})^\top\{Y-\bm{\Phi}_1(\mathbf{Z})\bm{\delta}-\beta^s\bm{\Phi}_2(\mathbf{Z})\bm{\alpha}_2\}\big] =\bm{0}. \end{equation} We then estimate $(\bm{\delta}^\top,\beta^s)$ by minimizing the sum of the squares of sample analogues of \eqref{eqn:residualexpectation} \begin{equation*} \begin{aligned} &(\hat{\bm{\delta}}^\top,\hat{\beta^s}) =\arg\!\min_{(\bm{\delta}^\top,\beta^s)}(\bm{Y}-\bm{\Phi}_1 \bm{\delta}-\beta^s\bm{\Phi}_2\bm{\alpha}_2)^\top\bm{\Phi}\bm{\Phi}^\top \\&~~~\qquad\qquad\qquad\qquad~~(\bm{Y}-\bm{\Phi}_1 \bm{\delta}-\beta^s\bm{\Phi}_2\bm{\alpha}_2). \end{aligned} \end{equation*} After solving the above optimization problem and substituting the estimator $\hat{\bm{\alpha}}_2$ into the solutions, we can easily obtain the estimates of $(\bm{\delta}^\top,\beta^s)$ with explicit forms. However, due to their complex expressions, we omit displaying them here. Let $\hat{\bm{\gamma}}=\hat{\bm{\delta}} - \hat{\beta^s}\hat{\bm{\alpha}}_1$, which gives us an estimate of $\bm{\gamma}$. In addition, all these estimators $\hat{\bm{\alpha}}$, $\hat{\beta^s}$ and $\hat{\bm{\gamma}}$ are consistent. Under some regularity conditions, they are also asymptotically normal. Substituting these estimators into \eqref{eqn:causaleffectsofinterest} and taking averages over samples, we obtain consistent estimators of the average causal effects of interest. Furthermore, by the Delta method, these consistent estimators are also asymptotically normal. Since analytical calculations of the asymptotic variances are difficult, we use a nonparametric bootstrap method to conduct inference. \section{Simulation studies and application}\label{sec:experiments} In this section, we first conduct simulation studies to evaluate the performance of the proposed estimators in finite samples. We then apply the proposed approach to a real customer loyalty data set. \subsection{Simulation studies} We consider two different simulation studies where data are generated by using only one and multiple (more than one) available instrumental variables, respectively. Each of the simulations is repeated 1000 times under different sample sizes $n=$ 500, 1000, and 2000. We report the results of estimated causal effects of interest by averaging over the 1000 replications. In both of the simulation studies, we consider three treatment variables: $Z_1$, $Z_2$, and $Z_3$. Each of them is uniformly generated from $\{1, 2, 3\}$ with equal probability. The latent confounder $U$ is generated from $N(0, 1)$. The mediator $M$ is generated from the following equation: \begin{equation*} \begin{aligned} M =& Z_1+Z_2+Z_3+Z_1*Z_2 +Z_1*Z_3 \\&~~+Z_2*Z_3 +U+\epsilon_M, \end{aligned} \end{equation*} where $\epsilon_M\sim N(0,1)$. The only difference between the two simulation studies is the generation of the outcome $Y$. The details for the generation of $Y$ are described as follows: \paragraph{ Simulation Study 1.} The outcome $Y$ is generated from \begin{equation*} \begin{aligned} Y =& Z_1 + Z_2 + Z_3 + M + Z_1 * Z_2\\ &~~+ Z_1 * Z_3 + 2 * U + \epsilon_Y, \end{aligned} \end{equation*} where $\epsilon_Y\sim N(0,1)$, and is independent of $\epsilon_M$. Note that $Z2*Z3$ is independent of $U$, associated with $M$, and has no direct effect on $Y$ except through $M$. Thus, for this simulation, $Z2*Z3$ can be viewed as an instrumental variable. We use both the proposed approach and the traditional regression-based approach without considering the latent confounder $U$ for estimation. To compare the results obtained from these two approaches, we report the bias and standard error (SE) for estimators of $NDE_j(2,1)$, $NIE_j(2,1)$ and $TE_j(2,1)$ based on 1000 replications for the sample sizes $n=500$, 1000, and 2000, respectively. Here, the subscript `$j$' indicates the causal effects of the $j$th treatment variable and $j=1,2,3$. Table~\ref{tab:sim1} displays the simulation results. From Table~\ref{tab:sim1}, we can see that the estimates by our approach all have negligible biases for the small sample size 500. As sample size increases, both the biases and standard errors become much smaller. In contrast, the estimates of the average natural direct and indirect effects obtained by the traditional approach all have quite large biases even for large sample sizes. It is because the traditional approach ignores the latent confounder $U$ which confounds the mediator-outcome relationship. However, since $U$ does not affect the relationship between treatments and outcome variables, the performance of the traditional approach for estimations on the average total effects behaves much better. \begin{table}[h!] \centering \resizebox{0.48\textwidth}{!}{ \begin{threeparttable} \def~{\hphantom{0}} \caption{Results for the proposed approach and traditional approach with different sample sizes in {\bf Simulation Study 1}.} \label{tab:sim1} \centering \begin{tabular}{ccrrcrr} \hline & \multirow{ 2}{*}{$~n$} & \multicolumn{2}{c}{Proposed } & &\multicolumn{2}{c}{Traditional } \vspace{0.6mm}\\ \cline{3-4} \cline{6-7} \addlinespace[0.9mm] & & Bias &SE & &Bias &SE \\ \hline \addlinespace[1mm] $Z_1$ &&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_1(2,1)$ = 5} &~500&0.057 &0.643 & &-3.724 &0.280\\ &1000 &0.010 & 0.464 & &-3.719&0.189\\ &2000 &0.008 & 0.326 & &-3.720 &0.133 \\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_1(2,1)$ = 5}&~500&-0.062 &0.649 & &3.820 &0.297 \\ &1000 &-0.014 &0.479 & &3.815 &0.208 \\ &2000 &-0.005 &0.335 & &3.824 &0.149 \\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_1(2,1)$ = 10}&~500 &-0.006 &0.210 & &0.096 &0.212\\ &1000 &-0.004 &0.146 & &0.095 &0.148 \\ &2000 &0.004 &0.101 & &0.104 &0.101\\ \addlinespace[1mm] \hline \addlinespace[1mm] $Z_2$&&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_2(2,1)$ = 3}&~500 &0.067&0.632 & &-3.718 &0.284\\ &1000 &0.012 &0.467 & &-3.720 &0.188 \\ &2000 &0.003 &0.324 &&-3.723 &0.130\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_2(2,1)$ = 5} &~500 &-0.057 &0.653 & &3.830&0.306 \\ &1000 &-0.010 &0.479 & &3.815 &0.218 \\ &2000 &-0.008 &0.334 &&3.819 &0.144\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_2(2,1)$ = 8}&~500 &0.011 &0.204 & &0.111 &0.203\\ &1000 &0.002 &0.138 & &0.103 &0.138\\ &2000 &-0.004 &0.096 & &0.097 &0.095\\ \addlinespace[1mm] \hline \addlinespace[1mm] $Z_3$&&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_3(2,1)$ = 3}&~500 &-0.052 &0.636 & &-3.728 &0.272\\ &1000 &0.010 &0.466 & &-3.718 &0.191 \\ &2000 &0.009 &0.327 &&-3.717 &0.133\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_3(2,1)$ = 5} &~500 &-0.064 &0.649 & &3.818&0.300 \\ &1000 &-0.014 &0.478 & &3.815 &0.216 \\ &2000 &-0.007 &0.334 &&3.820 &0.149\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_3(2,1)$ = 8}&~500 &-0.012 &0.190 & &0.090 &0.189\\ &1000 &-0.004 &0.138 & &0.097 &0.139 \\ &2000 &0.002 &0.097 & &0.103 &0.096\\ \hline \end{tabular} \end{threeparttable}} \end{table} \paragraph{ Simulation Study 2.} In this simulation study, we generate the outcome $Y$ from \begin{equation*} \begin{aligned} Y = Z_1+Z_2+Z_3+M+2*U+\epsilon_Y, \end{aligned} \end{equation*} where $\epsilon_Y\sim N(0,1)$ and it is independent of $\epsilon_M$. For this simulation, $Z_1*Z_2$, $Z_1*Z_3$ and $Z_2*Z_3$ can be treated as instrumental variables. We use both the proposed approach and the traditional approach for estimation, and the corresponding results are shown in Table~\ref{tab:sim2}. The results are similar to those in Table~\ref{tab:sim1}, both of which support the consistency results of the proposed estimators and demonstrate the advantage of the proposed approach over the traditional one. \begin{table}[h!] \centering \resizebox{0.48\textwidth}{!}{ \begin{threeparttable} \def~{\hphantom{0}} \caption{Results for the proposed approach and traditional approach with different sample sizes in {\bf Simulation Study 2}.} \label{tab:sim2} \centering \begin{tabular}{lcrrcrr} \hline & \multirow{ 2}{*}{$~n$} & \multicolumn{2}{c}{Proposed} & &\multicolumn{2}{c}{Traditional} \vspace{0.6mm}\\ \cline{3-4} \cline{6-7} \addlinespace[0.9mm] & & Bias &SE & &Bias &SE \\ \hline \addlinespace[1mm] $Z_1$&&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_1(2,1)$ = 1} &~500&0.001 &0.154 & &-0.572 &0.134\\ &1000 &0.000 & 0.107 & &-0.569&0.096\\ &2000 &-0.000 & 0.073 & &-0.570 &0.065 \\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_1(2,1)$ = 5}&~500&-0.002 &0.213 & &0.918 &0.188 \\ &1000 &-0.003 &0.151 & &0.915 &0.138 \\ &2000 &0.004 &0.106 & &0.921 &0.095 \\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_1(2,1)$ = 6}&~500 &-0.001 &0.213 & &0.346 &0.188\\ &1000 &-0.003 &0.134 & &0.346 &0.129 \\ &2000 &0.004 &0.093 & &0.351 &0.089\\ \addlinespace[1mm] \hline \addlinespace[1mm] $Z_2$&&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_2(2,1)$ = 1}&~500 &0.006&0.150 & &-0.565 &0.133\\ &1000 &0.002 &0.107 & &-0.570 &0.095 \\ &2000 &-0.004 &0.075 &&-0.574 &0.066\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_2(2,1)$ = 5} &~500 &0.004 &0.216 & &0.924&0.193 \\ &1000 &0.001 &0.149 & &0.920 &0.139 \\ &2000 &0.001 &0.105 &&0.918 &0.092\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_2(2,1)$ = 6}&~500 &0.010 &0.197 & &0.359 &0.187\\ &1000 &0.003 &0.134 & &0.350 &0.129\\ &2000 &-0.003 &0.092 & &0.344 &0.087\\ \addlinespace[1mm] \hline \addlinespace[1mm] $Z_3$&&&&&&\\ \cline{1-1} \multirow{ 3}{*}{$\textnormal{NDE}_3(2,1)$ = 1}&~500 &0.006 &0.150 & &-0.565 &0.133\\ &1000 &0.002 &0.107 & &-0.570 &0.095 \\ &2000 &-0.004 &0.075 &&-0.574 &0.066\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{NIE}_3(2,1)$ = 5} &~500 &-0.004 &0.209 & &0.916&0.187 \\ &1000 &-0.003 &0.149 & &0.915 &0.138 \\ &2000 &0.001 &0.106 &&0.919 &0.095\\ \addlinespace[1mm] \multirow{ 3}{*}{$\textnormal{TE}_3(2,1)$ = 6}&~500 &-0.011 &0.182 & &0.337 &0.176\\ &1000 &-0.003 &0.133 & &0.346 &0.128 \\ &2000 &0.004 &0.093 & &0.351 &0.089\\ \hline \end{tabular} \label{tab:sim2} \end{threeparttable}} \end{table} \subsection{Application to real data} In this section, we apply the proposed approach to a real customer loyalty data set from a telecom company in China. The customer loyalty analysis tries to discover key factors affecting loyalty and the affecting process, with which to choose proper actions to maintain customers. In this study, 18553 randomly chosen customers answer questionnaire via personal interview or an online survey. We drop the incompletely observed participants, leaving a total of 9833 participants. In the questionnaire, customers scored their satisfaction about 13 different specific factors, respectively, such as network quality, tariff plan, voice quality, service quality, and so on. The scores are integers ranging from 1 to 10, with 1 denoting ``not satisfied at all'' and 10 denoting ``satisfied''. For the simplicity, we choose two important treatment factors, network quality and tariff plan, as an example to illustrate our approach, which are denoted by $Z_1$ and $Z_2$, respectively. For each customer, a score indicating the loyalty to the company has also been obtained, and we use the score as the outcome variable $Y$. Investigators also collected the information of each customer's general satisfaction about the company, and it is used as the mediator variable $M$. We aim to assess whether the treatment factors have significant effects on improving customers' loyalty. In particular, we wish to figure out whether the effects of the factors on loyalty are mediated by the general satisfaction about the company. We use the proposed approach for evaluation, and also consider the traditional approach without accounting for possible latent confounders for comparison. For both approaches, we calculate estimators of the average natural direct effect $NDE_j(2,1)$, the average natural indirect effect $NIE_j(2,1)$, and the average total effect $TE_j(2,1)$, and also their 95\% confidence intervals. Of note, the average total causal effect $TE_j(2,1)$ is estimated by the sum of the estimated average natural direct effect $NDE_j(2,1)$ and indirect effect $NIE_j(2,1)$. Subscript `$j$' indicates the corresponding causal effects of network quality and tariff plan for $j=1,2$. We report these results in Table \ref{example:tab:results}. \begin{table}[htbp] \centering \resizebox{0.48\textwidth}{!}{ \begin{threeparttable} \def~{\hphantom{0}} \caption{Results for the proposed approach and traditional approach on the analysis of the real customer loyalty data, respectively. } \centering \begin{tabular}{ccccccc} \hline \addlinespace[1.5mm] \multirow{ 2}{*}{}& \multicolumn{2}{c}{Proposed} & &\multicolumn{2}{c}{Traditional } \\ \addlinespace[1.5mm] \cline{2-3} \cline{5-6} \addlinespace[2mm] & Estimate & 95\% CI & & Estimate & 95\% CI \\ \addlinespace[2mm] \hline \addlinespace[1mm] Network quality & & & & &\\ \addlinespace[1mm] \cline{1-1} \addlinespace[1.5mm] $\widehat{NDE_1(2,1)}$ &0.426 &(0.392, 0.458) & & 0.267 & (0.244, 0.291) \\ \addlinespace[2mm] $\widehat{NIE_1(2,1)}$ &0.039 &(0.028, 0.050) & & 0.101 &(0.089, 0.113) \\ \addlinespace[2mm] $\widehat{TE_1(2,1)}$ &0.465 & (0.437, 0.492) & & 0.369 &(0.345, 0.391) \\ \addlinespace[1.5mm] \hline \addlinespace[1mm] Tariff plan & & & & &\\ \addlinespace[1mm] \cline{1-1} \addlinespace[1.5mm] $\widehat{NDE_2(2,1)}$ &0.401 &(0.373, 0.430) & & 0.271 &(0.250, 0.293) \\ \addlinespace[2mm] $\widehat{NIE_2(2,1)}$ &0.042 & (0.031, 0.053) & & 0.110 &(0.099, 0.120) \\ \addlinespace[2mm] $\widehat{TE_2(2,1)}$ &0.443 & (0.419, 0.466) & & 0.381 &(0.361, 0.403) \\ \addlinespace[1.5mm] \hline \end{tabular} \label{example:tab:results} \begin{tablenotes} \small \item CI: confidence interval. \end{tablenotes} \end{threeparttable}} \end{table} From Table~\ref{example:tab:results}, we can see that both the proposed approach and the traditional approach indicate positive and statistically significant causal effects of network quality and tariff plan on loyalty. Since there are no latent confounders between the treatments (network quality and tariff plan) and outcome variable (loyalty) by the randomization of this study, a simple linear regression of the outcome against the treatments can induce good estimates of the average total causal effects. These results are exactly the same as the corresponding ones obtained from the proposed approach, but different from those obtained from the traditional approach. From this point of view, the results for our proposed approach in Table~\ref{example:tab:results} are more reliable, compared with those obtained from the traditional approach which does not consider possible latent confounders between the general satisfaction and loyalty. According to the results, both the estimated average natural direct effects of network quality and tariff plan on loyalty are positive but larger than the corresponding indirect effects through the mediator variable (the general satisfaction about the company). This means that the causal effects of satisfaction about network quality and tariff plan on loyalty are mostly operated in a direct way, but only a small fraction of them are intermediated by the general satisfaction about the company. Note also that the estimated total causal effect of network quality is a bit larger than that of tariff plan, which to some extent implies that the network quality may play a more important role in affecting loyalty than tariff plan. \section{Conclusion}\label{sec:conclusion} In this article, we have proposed an approach for causal mediation analysis with multiple treatments and latent confounders between the mediator and outcome variables. We give the formal definitions of the causal mediation effects in the multiple-treatment setting. For the identification of these causal effects, we first postulate a causal model for potential outcomes and express the causal effects as functions of parameters of the causal model. Then we show the equality between parameters of the causal models with analogous parameters of the more feasible SEMs which is built upon observed variables. Using the idea of instrumental variable methods, we provide sufficient conditions for identifying parameters of the SEMs, which in turn gives the identification of the causal effects of interest. Finally, we also develop an effective approach for estimation and inference. \bibliographystyle{aaai}
\section{Introduction} We are interested in the following version of the isogeny problem: given two isogenous abelian varieties, compute an isogeny between them explicitly. Let us start with some motivation. The isogeny problem in the case of elliptic curves was solved by Elkies~\cite{elkies_EllipticModularCurves1998}. Given two $\ell$-isogenous elliptic curves, where $\ell$ is a prime, his algorithm uses modular polynomials of level~$\ell$ to compute rational fractions defining this isogeny. Elkies's algorithm is used to speed up Schoof's point counting algorithm for elliptic curves over finite fields~\cite{schoof_EllipticCurvesFinite1985}: replacing kernels of \emph{endomorphisms} by kernels of \emph{isogenies} yields smaller subgroups of the elliptic curve, and therefore smaller polynomial computations, while giving the same amount of information on the Frobenius. This improvement is at the heart of the well-known SEA point counting algorithm~\cite{schoof_CountingPointsElliptic1995}. The situation for point counting in genus 2 is different, as the existing complexity estimates and records only use kernels of endomorphisms~\cite{gaudry_CountingPointsGenus2011, gaudry_GenusPointCounting2012}. One can therefore ask whether the idea of using isogenies generalizes. Modular polynomials have now been computed in genus 2: the smallest ones are known both for $\ell$-isogenies~\cite{milio_QuasilinearTimeAlgorithm2015} and, in the real multiplication case, cyclic $\beta$-isogenies~\cite{ milio_ModularPolynomialsHilbert2017, martindale_IsogenyGraphsModular2018}. This opened the way for Atkin-style methods in point counting~\cite{ballentine_IsogeniesPointCounting2016}, but isogeny computations remain the missing ingredient to generalize Elkies's method in genus~$2$. The object of this paper is precisely to fill this gap. We now present our main result in the case of $\ell$-isogenies. For any field~$k$, we denote by~$\coarse_2(k)$ the coarse moduli space of principally polarized abelian surfaces over~$k$, and we denote by $j = (j_1,j_2,j_3)$ the Igusa invariants as introduced by Streng (see~§\ref{subsec:siegel-g2}). We also denote by~$\Psi_{\ell,i}$ for $1\leq i\leq 3$ the modular equations of level~$\ell$ in Igusa invariants (see~§\ref{subsec:modpol}). Recall that if~${\mathcal{C}}$ is a hyperelliptic curve of genus~$2$ over a field~$k$, then its Jacobian~$\Jac({\mathcal{C}})$ is a principally polarized abelian surface which is birational to the symmetric square~${\mathcal{C}}^{2,\ensuremath{\mathrm{sym}}}$; the points of ${\mathcal{C}}^{2,\ensuremath{\mathrm{sym}}}$ over~$k$ are the Galois-invariant unordered pairs $\{P,Q\}$ where~$P,Q\in {\mathcal{C}}(\overline{k})$. \begin{thm} \label{thm:main} Let~$\ell$ be a prime, and let~$k$ be a field such that $\chr k = 0$ or $\chr k > 8\ell+ 7$. Let~$U\subset\coarse_2(k)$ be the open set consisting of abelian surfaces~$A$ such that $\Aut_{\bar{k}}(A)\iso\{\pm 1\}$ and~$j_3(A)\neq 0$. Assume that there is an algorithm to evaluate derivatives of modular equations of level~$\ell$ at a given point of~$U\times U$ over~$k$ using~$\ensuremath{C_{\mathrm{eval}}}(\ell)$ operations in~$k$. Let $A,A' \in U$, and let $j(A),j(A')$ be their Igusa invariants. Assume that~$A$ and~$A'$ are $\ell$-isogenous, and that the subvariety of $\mathbb{A}^3\times \mathbb{A}^3$ cut out by the modular equations $\Psi_{\ell,i}$ for $1\leq i\leq 3$ is normal at $(j(A), j(A'))$. Then, given~$j(A)$ and~$j(A')$, we can compute \begin{enumerate} \item a field extension~$k'/k$ of degree dividing~$8$, \item hyperelliptic curve equations ${\mathcal{C}},{\mathcal{C}}'$ over~$k'$ whose Jacobians are isomorphic to $A,A'$ respectively, \item a point $P\in {\mathcal{C}}(k')$, \item rational fractions $s, p, q, r\in k'(u, v)$, \end{enumerate} such that $(s, p, q, r)$ equals the compositum \begin{displaymath} \begin{tikzcd} {\mathcal{C}} \ar[rr, hook, "{Q\mapsto [Q-P]}" ] & & \Jac({\mathcal{C}}) \ar[r, "{\varphi}" ] & \Jac({\mathcal{C}}') \ar[r, dashed, "\sim"] & {\mathcal{C}}'^{2,\ensuremath{\mathrm{sym}}} \ar[r, dashed, "m"] & \mathbb{A}^4 \end{tikzcd} \end{displaymath} where $\varphi$ is an $\ell$-isogeny and $m$ is the rational map given by \begin{displaymath} \{(x_1,y_1),(x_2,y_2)\} \mapsto \Bigl(x_1+x_2,\ x_1x_2,\ y_1y_2,\ \frac{y_2-y_1}{x_2-x_1}\Bigr). \end{displaymath} The cost of the algorithm is $O\bigl(\ensuremath{C_{\mathrm{eval}}}(\ell)\bigr) + \smash{\widetilde{O}}(\ell)$ elementary operations and~$O(1)$ square roots in~$k'$. \end{thm} In other words, given sufficiently generic genus~$2$ curves ${\mathcal{C}},{\mathcal{C}}'$ whose Jacobians are $\ell$-isogenous, obtained for instance by computing roots of modular equations of level~$\ell$, we compute rational fractions that determine an $\ell$-isogeny completely. We also obtain a similar result in the case of $\beta$-isogenies in the real multiplication case: see \cref{thm:proved-main-hilbert}. In a follow-up paper, the first author will design evaluation algorithms for genus~$2$ modular equations and their derivatives, thereby obtaining estimates on $\ensuremath{C_{\mathrm{eval}}}(\ell)$. Possible applications of our results to the point counting problem are a major goal for future work. Let us describe the outline of our algorithm in the case of $\ell$-isogenies from a geometric point of view, in any dimension~$g$. The central object is the map \begin{displaymath} \mathit{\Phi}_{\ell} = (\mathit{\Phi}_{\ell,1}, \mathit{\Phi}_{\ell,2}) \colon {\stack_{g}(\ell)} \to \AAg \times \AAg \end{displaymath} where~${\stack_{g}(\ell)}$ denotes the stack of principally polarized abelian schemes of dimension~$g$ with an $\ell$-kernel, and~$\AAg$ denotes the stack of principally polarized abelian schemes of dimension~$g$; this map is given by $(A,K) \mapsto (A, A/K)$. Both~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are étale maps. Let $\varphi\colon A\to A'$ be an $\ell$-isogeny, so that $(A, A')$ lies in the image of~$\mathit{\Phi}_\ell$. Denote by~$T_A(\AAg)$ the tangent space of~$\AAg$ at~$A$, and denote by~$T_0(A)$ the tangent space of~$A$ at its neutral point. Then there is a close relation between two maps: \begin{itemize} \item the \emph{deformation map} $\mathscr{D}(\varphi)\colon T_A(\AAg) \to T_{A'}(\AAg)$ defined as \begin{displaymath} \mathscr{D}(\varphi) \coloneqq d {\mathit{\Phi}_{\ell,2}} \circ d {\mathit{\Phi}_{\ell,1}}^{-1}; \end{displaymath} \item the \emph{tangent map} $d\varphi\colon T_0(A)\to T_0(A')$. \end{itemize} This relation stems from a canonical isomorphism, called the \emph{Kodaira--Spencer isomorphism}, between~$T_A(\AAg)$ and~$\Sym^2 T_0(A)$. Therefore, in any dimension~$g$, an isogeny algorithm could run as follows. \begin{enumerate} \item \label{step:defo} Compute the deformation map by differentiating certain modular equations giving a local model of~${\stack_{g}(\ell)}$ and~${\stack_{g}}$. \item \label{step:tangent} Compute~$d\varphi$ from the deformation map using an explicit version of the Kodaira--Spencer isomorphism, that is, an explicit way to map a pair~$(A, w)$ where~$w$ is an element of~$\Sym^2 T_0(A)$ to the corresponding point of~$T_A({\stack_{g}})$ in the local model of~${\stack_{g}}$. \item \label{step:formal} Finally, attempt to reconstruct~$\varphi$ itself by solving a differential system in the formal group of~$A$ and performing a multivariate rational reconstruction. In this last step, the characteristic of~$k$ should be large with respect to~$\ell$, hence the condition on the characteristic in \cref{thm:main}. Otherwise, a standard solution is to use étaleness of the modular correspondence to lift the isogeny in characteristic~$0$, as in~\cite{joux_CountingPointsElliptic2006}, and to control the precision losses when reconstructing the isogeny. \begin{details} This last step is more standard, and is similar to the methods of \cite{couveignes_ComputingFunctionsJacobians2015, costa_RigorousComputationEndomorphism2019}; this is where the hypothesis on $\chr k$ appears. The whole method, when applied to elliptic curves, is a reformulation of Elkies's algorithm. As explained, in genus~$2$, if $\ell$ does not satisfy $\chr k > 8\ell+7$, the standard solution is to use étaleness of the modular correspondance to lift the isogeny in characteristic $0$, as in \cite{joux_CountingPointsElliptic2006}. To get a bound on complexity, one would need to control the loss of $p$-adic precision when reconstructing the isogeny. Provided the precision loss is small enough (as is the case in dimension~$1$), the complexity of the isogeny reconstruction is the same, except that we need to call the algorithm evaluating modular polynomials $O(\log \log_p \ell)$ times rather than just once in order to compute the lift. Since we are mainly interested with $\ell$ small with respect to $\chr k$ (for instance for applications to point counting), we leave that as an open question. \end{details} \end{enumerate} In practice, working with stacks would involve adding an additional level structure and keeping track of automorphisms, which is not computationally convenient. Therefore, in order to make everything explicit in the case~$g=2$, we choose to replace the stack~$\stack_2$ by its coarse moduli scheme~$\coarse_2$. We even work up to birationality, by considering the birational map from~$\coarse_2$ to~$\mathbb{A}^3$ defined by the three Igusa invariants $(j_1,j_2,j_3)$. These reductions have the drawback of introducing singularities; this is the reason for restricting to the open set~$U$ in \Cref{thm:main}. When the genericity conditions of \cref{thm:main} are not satisfied, one can still compute the isogeny by working at the level of stacks, or choosing other models, for instance when~$A$ or~$A'$ is a product of elliptic curves. In the genus~$2$ setting, the local model of ${\stack_{g}(\ell)}$ that we use in Step~\ref{step:defo} is given by modular equations in Igusa invariants; in order to compute the deformation map, it is enough to evaluate modular equations and their derivatives at $(A,A')$. In Step~\ref{step:tangent}, we choose to encode a basis of~$T_0(A)$ in the choice of a hyperelliptic curve equation. Then, the explicit Kodaira--Spencer isomorphism is simply an expression for certain Siegel modular forms, namely derivatives of Igusa invariants, in terms of the coefficients of the curve (see \cref{thm:vector-identification}). In Step~\ref{step:formal}, we take advantage of the fact that the curve~${\mathcal{C}}$ embeds in its Jacobian to compute with power series in one variable only. This paper is organized as follows. In \Cref{sec:mf,sec:cov}, we work over $\C$: \Cref{sec:mf} is devoted to the necessary background on modular forms and isogenies, while \Cref{sec:cov} is devoted to the explicit Kodaira--Spencer isomorphism and the computation of the tangent map. In \Cref{sec:moduli}, we call upon the language of algebraic stacks to show that the calculations over $\C$ remain in fact valid over any base. We present the computation of the isogeny from its tangent map in \Cref{sec:alg}, focusing on the large characteristic case which is sufficient for applications to point counting, and we sum up the algorithm in \Cref{sec:summary}. Finally, in \Cref{appendix:Qr5}, we present variants in the algorithm in the case of real multiplication by $\mathbb{Q}(\sqrt{5})$ and compute an example of cyclic isogeny of degree~$11$. \paragraph{Acknowledgement.} The authors were supported by the ANR grant CIAO (French Agence Nationale de la Recherche). \section{Background on modular forms and isogenies} \label{sec:mf} We present the basic facts about Siegel and Hilbert modular only in the genus~$2$ case. References for this section are~\cite{vandergeer_SiegelModularForms2008} for Siegel modular forms, and~\cite{bruinier_HilbertModularForms2008} for Hilbert modular forms, where the general case is treated. We write~$4\times 4$ matrices in block notation using~$2\times 2$ blocks. We write~$m^t$ for the transpose of a matrix~$m$, and use the notations \begin{displaymath} m^{-t} = (m^{-1})^t, \qquad \Diag(x,y) = \mat{x}{0}{0}{y}. \end{displaymath} \subsection{Siegel modular forms} \label{subsec:siegel} \paragraph{The Siegel threefold.} Denote by~$\mathbb{H}_2$ the set of complex symmetric~$2\times 2$ matrices with positive definite imaginary part. For every $\tau\in\mathbb{H}_2$, the quotient \begin{displaymath} A(\tau) = \C^2 / \Lambda(\tau) \quad \text{where}\quad \Lambda(\tau) = \mathbb{Z}^2 \oplus \tau\mathbb{Z}^2 \end{displaymath} is naturally endowed with the structure of a principally polarized abelian surface over~$\C$. A basis of differential forms on~$A(\tau)$ is given by \begin{displaymath} \omega(\tau) = (2\pi i\, dz_1,2\pi i\, dz_2) \end{displaymath} where $z_1, z_2$ are the coordinates on~$\C^2$. Recall that the symplectic group~$\Sp_{4}(\mathbb{Z})$ acts on~$\mathbb{H}_{2}$ in the following way: \begin{displaymath} \forall \gamma = \mat{a}{b}{c}{d}\in\Sp_{4}(\mathbb{Z}),\ \forall\tau\in\mathbb{H}_2,\ \gamma\tau = (a\tau + b)(c\tau + d)^{-1}. \end{displaymath} \begin{prop}[{\cite[Rem.~8.1.4]{birkenhake_ComplexAbelianVarieties2004}}] \label{prop:H2-isom} Let $\tau\in\mathbb{H}_2$, and let $\gamma\in\Sp_4(\mathbb{Z})$ with blocks $a,b,c,d$. Then there is an isomorphism \begin{displaymath} \eta_{\gamma,\tau}\colon A(\tau) \to A(\gamma\tau),\quad z\mapsto (c\tau+d)^{-t}z. \end{displaymath} \end{prop} \begin{thm}[{\cite[Prop.~8.1.3]{birkenhake_ComplexAbelianVarieties2004}}] \label{thm:siegel-unif} Let~$A$ be a principally polarized abelian surface over~$\C$. Then there exists~$\tau\in\mathbb{H}_2$ such that~$A$ is isomorphic to~$A(\tau)$, and $\tau$ is uniquely determined up to action of~$\Sp_{4}(\mathbb{Z})$. \end{thm} The quotient space~$\coarse_2(\C) = \Sp_4(\mathbb{Z})\backslash\mathbb{H}_2$ is the set of complex points of the coarse moduli space~$\coarse_2$ alluded to in the introduction. \begin{details} \Cref{thm:siegel-unif} shows that $\mathcal{A}_2(\C)$ is a moduli space for principally polarized abelian surfaces over $\C$. More generally, $\mathcal{A}_2$ is a moduli space over $\mathbb{Z}$ for principally polarized abelian varieties, either in the coarse sense or as a stack~\cite[§10]{vandergeer_SiegelModularForms2008}. Hence, most of the computations that we make in the paper have an algebraic meaning; in order to prove that they are valid over any field, it is enough to do so over $\C$, since $\mathcal{A}_2$ is smooth as a stack over $\mathbb{Z}$. Alternatively, we can use a lifting argument to characteristic zero. We refer to \cref{sec:moduli} for much more details. \end{details} \paragraph{Siegel modular forms.} Let~$\rho\colon \GL_{2}(\C)\to\GL(V)$ be a finite-dimensional holomorphic representation of~$\GL_2(\C)$. We can assume that~$\rho$ is irreducible. A \emph{Siegel modular form} of weight~$\rho$ is a holomorphic map~$f\colon\mathbb{H}_{2}\to V$ satisfying the transformation rule \begin{displaymath} \forall \gamma= \mat{a}{b}{c}{d}\in\Sp_{4}(\mathbb{Z}),\ \forall \tau\in\mathbb{H}_{2}, \quad f(\gamma\tau) = \rho(c\tau + d)f(\tau). \end{displaymath} We say that~$f$ is \emph{scalar-valued} if~$\dim V=1$, and \emph{vector-valued} otherwise. A \emph{modular function} is only required to be meromorphic instead of holomorphic. If~$A$ is a principally polarized abelian surface over~$\C$ endowed with a basis~$\omega$ of $\Omega^1(A)$ (the space of global differential forms on~$A$), and if if~$f$ is a Siegel modular form of weight~$\rho$, then it makes sense to evaluate~$f$ on the pair $(A,\omega)$. We refer to §\ref{sec:moduli} for a geometric interpretation of this fact. To compute this quantity, choose~$\tau\in\mathbb{H}_2$ and an isomorphism~$\eta \colon A \to A(\tau)$ as in \Cref{thm:siegel-unif}. Let~$r\in\GL_2(\C)$ be the matrix of the pullback map~$\eta^*\colon \Omega^1(A(\tau))\to\Omega^1(A)$ in the bases~$\omega(\tau),\omega$. Then \begin{displaymath} f(A,\omega) = \rho(r) f(\tau). \end{displaymath} We can check using \cref{prop:H2-isom} that~$f(A,\omega)$ does not depend on the choice of~$\tau$ and~$\eta$. \begin{details} There is no need to enforce the holomorphy condition at the cusps: Koecher's principle asserts that it is automatically satisfied. Since every irreducible representation of~$\GL_1(\C)$ is 1-dimensional, only scalar-valued modular forms occur in genus~$1$; this is no longer the case in genus~$2$. From a geometric point of view, scalar Siegel modular forms are sections of certain algebraic line bundles on~$\mathcal{A}_2$. These line bundles can be realized as certain powers, depending on the weight~$\rho$, of the \emph{Hodge line bundle}. More generally, the fibre of the \emph{Hodge vector bundle} over the isomorphism class of an abelian surface~$A$ can be identified with the dual of the vector space~$\Omega^1(A)$ of differential forms on~$A$. As a consequence, if~$f$ is a Siegel modular form of weight~$\rho$, and~$\omega$ is a basis of~$\Omega^1(A)$, then the quantity~$f(A,\omega)$ has an algebraic meaning. See~\cite[§10]{vandergeer_SiegelModularForms2008} and \cref{subsec:mf-ZZ} for more details. \end{details} \subsection{An explicit view on Siegel modular forms in genus 2} \label{subsec:siegel-g2} \paragraph{Classification of weights.} Finite-dimensional holomorphic representations of~$\GL_2(\C)$ are well known. Let~$n\geq 0$ be an integer. We denote by~$\Sym^n$ the~$n$-th symmetric power of the standard representation of~$\GL_2(\C)$ on~$\C^2$. Explicitly,~$\Sym^n$ is a representation on the vector space~$\C_n[x]$ of polynomials of degree at most~$n$, with \begin{displaymath} \Sym^n\left(\mat{a}{b}{c}{d}\right) W(x) = (bx + d)^n W\left(\frac{ax + c}{bx + d}\right). \end{displaymath} We take $(x^n,\ldots,x,1)$ as the standard basis of~$\C_n[x]$, so that we can write an endomorphism of~$\C_n[x]$ as a matrix; in particular we have \begin{displaymath} \Sym^2\mat{a}{b}{c}{d} = \left( \begin{matrix} a^2 & ab & b^2 \\ 2ac & ad+bc & 2bd \\ c^2 & cd & d^2 \end{matrix} \right). \end{displaymath} \begin{prop} \label{prop:irr-rep} The irreducible finite-dimensional holomorphic representations of~$\GL_2(\C)$ are exactly the representations~$\det^k\Sym^n$, for~$k\in\mathbb{Z}$ and~$n\in\mathbb{N}$. \end{prop} \begin{proof} Since~$\SL_2(\C)$ is a simply connected Lie group, there is an equivalence between holomorphic finite-dimensional representations of~$\SL_2(\C)$ and representations of its Lie algebra~$\mathfrak{sl}_2(\C)$~\cite[Ch.~III, §6.1, Th.~1]{bourbaki_GroupesAlgebresLie1972}. By~\cite[Ch.~VIII, §1.3, Th.~1]{bourbaki_GroupesAlgebresLie1975}, irreducible representations of~$\mathfrak{sl}_2(\C)$ are classified by their higher weight; on the Lie group side, this shows that the holomorphic finite-dimensional irreducible representations of~$\SL_2(\C)$ are exactly the representations~$\Sym^n$ for~$n\in\mathbb{N}$. The case of~$\GL_2(\C)$ follows easily. \end{proof} The weight of a scalar-valued Siegel modular form~$f$ is of the form~$\det^k$ for some $k\in\mathbb{Z}$, and in fact $k\geq 0$. We also say that~$f$ is a scalar-valued Siegel modular form of weight~$k$. Writing~$\Sym^n$ as a representation on~$\C_n[x]$ allows us to multiply Siegel modular forms; hence, they naturally generate a graded $\C$-algebra. \paragraph{Fourier expansions.} Let~$f$ be a Siegel modular form on~$\mathbb{H}_2$ of any weight, with underlying vector space~$V$. If $s\in\mathcal{M}_2(\mathbb{Z})$ is symmetric, then $f(\tau+s) = f(\tau)$ for every $\tau\in\mathbb{H}_2$. Hence, if we write \begin{displaymath} \tau = \mat{\tau_1}{\tau_2}{\tau_2}{\tau_3} \quad \text{and} \quad q_j = \exp(2\pi i \tau_j)\quad \text{for } 1\leq j\leq 3, \end{displaymath} then~$f$ has a Fourier expansion of the form \begin{displaymath} f(\tau) = \sum_{n_1,n_2,n_3\in\mathbb{Z}} c_f(n_1,n_2,n_3)\, q_1^{n_1} q_2^{n_2} q_3^{n_3}. \end{displaymath} The Fourier coefficients~$c_f(n_1,n_2,n_3)$ belong to~$V$, and can be nonzero only when~$n_1\geq 0$, $n_3\geq 0$, and~$n_2^2\leq 4 n_1 n_3$. Note that~$n_2$ can still be negative. When computing with~$q$-expansions, we consider them as elements of the power series ring~$\C(q_2)[[q_1, q_3]]$. Writing the beginning of a~$q$-expansion means computing modulo an ideal of the form~$\bigl(q_1^\nu, q_3^\nu\bigr)$ for some precision~$\nu\geq 0$. \paragraph{Structure of scalar-valued forms.} The full graded $\C$-algebra of Siegel modular forms in genus 2 is not finitely generated~\cite[§25]{vandergeer_SiegelModularForms2008}, but the subalgebra of scalar-valued modular forms is. \begin{thm}[{\cite{igusa_SiegelModularForms1962, igusa_ModularFormsProjective1967}}] \label{thm:siegel-structure} The graded $\C$-algebra of scalar-valued even-weight Siegel modular forms in genus~$\,2$ is generated by four algebraically independent elements~$\psi_4, \psi_6, \chi_{10}$, and $\chi_{12}$ of respective weights~$4,\, 6,\, {10},\, {12}$, and~$q$-expansions \begin{displaymath} \begin{aligned} \psi_4(\tau) &= 1 + 240(q_1 + q_3) \\ & \quad + \bigl(240 q_2^2 + 13440 q_2 + 30240 + 13340 q_2^{-1} + 240 q_2^{-2} \bigr) q_1 q_3 + O\bigl(q_1^2,q_3^2 \bigr), \\ \psi_6(\tau) &= 1 - 504(q_1 + q_3) \\ & \quad + \bigl(-504 q_2^2 + 44352 q_2 + 166320 + 44352 q_2^{-1} - 504 q_2^{-2}\bigr) q_1q_3 + O\bigl(q_1^2,q_3^2 \bigr), \\ \chi_{10}(\tau) &= \bigl(q_2 - 2 + q_2^{-1}\bigr) q_1 q_3 + O(q_1^2,q_3^2), \\ \chi_{12}(\tau) &= \bigl(q_2 + 10 + q_2^{-1}\bigr) q_1 q_3 + O\bigl(q_1^2,q_3^2 \bigr). \\ \end{aligned} \end{displaymath} The graded~$\C$-algebra of scalar-valued Siegel modular forms in genus~$2$ is \begin{displaymath} \C[\psi_4,\psi_6,\chi_{10},\chi_{12}] \oplus \chi_{35} \C[\psi_4,\psi_6,\chi_{10},\chi_{12}] \end{displaymath} where $\chi_{35}$ is a modular form of weight~$35$ and $q$-expansion \begin{displaymath} \chi_{35}(\tau) = q_1^2 q_3^2 (q_1 - q_3) (q_2 - q_2^{-1}) + O(q_1^4, q_3^4). \end{displaymath} \end{thm} The $q$-expansions in \Cref{thm:siegel-structure} are easily computed from expressions in terms of theta functions, and their coefficients are integers. We warn the reader that different normalizations appear in the literature: our~$\chi_{10}$ is~$-4$ times the modular form~$\chi_{10}$ appearing in Igusa's papers, our~$\chi_{12}$ is~$12$ times Igusa's~$\chi_{12}$, and our~$\chi_{35}$ is~$4i$ times Igusa's~$\chi_{35}$. The equality~$\chi_{10}(\tau) = 0$ occurs exactly when~$A(\tau)$ is isomorphic to a product of elliptic curves with the product polarization; otherwise,~$A(\tau)$ is isomorphic to the Jacobian of a hyperelliptic curve. Following Streng~\cite[§2.1]{streng_ComplexMultiplicationAbelian2010} and our choice of normalizations, we define the \emph{Igusa invariants} to be \begin{displaymath} j_1 = 2^{-8} \frac{\psi_4\psi_6}{\chi_{10}},\quad j_2 = 2^{-5} \frac{\psi_4^2\chi_{12}}{\chi_{10}^2}, \quad j_3 = 2^{-14} \frac{\psi_4^5}{\chi_{10}^2}. \end{displaymath} They are Siegel modular functions of trivial weight, i.e.~weight~$\det^0$. \begin{prop} \label{prop:igusa-birational} Igusa invariants define a birational map~$\coarse_2(\C)\to\C^3$. \end{prop} \begin{proof} By the theorem of Baily and Borel~\cite[Thm.~10.11]{baily_CompactificationArithmeticQuotients1966}, scalar-valued Siegel modular forms of sufficiently high even weight realize a projective embedding of~$\coarse_2(\C)$. Therefore, by \Cref{thm:siegel-structure}, Igusa invariants generate the function field of~$\coarse_2(\C)$. \end{proof} \begin{rem} \label{rem:invariants_bielliptic} \Cref{prop:igusa-birational} shows that generically, giving~$(j_1, j_2, j_3)$ in~$\C$ uniquely specifies an isomorphism class of principally polarized abelian surfaces over~$\C$. This correspondence only holds on an open set: Igusa invariants are not defined on products of elliptic curves, and do not represent a unique isomorphism class when~$\psi_4 = 0$. If one wants to consider these points nonetheless, it is best to make another choice of invariants: for instance one could use \begin{displaymath} h_1 = \dfrac{\psi_6^2}{\psi_4^3},\quad h_2 = \dfrac{\chi_{12}}{\psi_4^3}, \quad h_3 = \dfrac{\chi_{10}\psi_6}{\psi_4^4} \end{displaymath} which are generically well-defined on products of elliptic curves. See \cite[Thm.~1.V]{liu_CourbesStablesGenre1993} for an interpretation of these invariants in terms of $j(E_1)+j(E_2)$ and $j(E_1)j(E_2)$ when evaluated on a product $E_1 \times E_2$. \end{rem} \paragraph{Examples of vector-valued forms.} Derivatives of Igusa invariants are modular function themselves; as explained in the introduction, this property stems from the existence of the Kodaira--Spencer isomorphism. \begin{prop} \label{prop:mf-derivative} Let~$f$ be a Siegel modular function of trivial weight. Then \begin{displaymath} \dfrac{df}{d\tau} := \dfrac{\partial f}{\partial\tau_1} x^2 + \dfrac{\partial f}{\partial\tau_2} x + \dfrac{\partial f}{\partial\tau_3} \end{displaymath} is a Siegel modular function of weight~$\Sym^2$. \end{prop} \begin{proof} Differentiate the relation~$f(\gamma\tau) = f(\tau)$ with respect to~$\tau$. \end{proof} \begin{details} \Cref{prop:mf-derivative} has an algebraic interpretation. For every principally polarized abelian surface $A$, the Kodaira--Spencer map is a canonical isomorphism between the vector space $\Sym^2(\Omega^1(A))$ and the tangent space of $\mathcal{A}_2$ at $A$~\cite[1.4.1]{andre_KodairaSpencerMap2017}, \cref{subsec:defo}. Therefore, the derivative of an invariant is naturally a meromorphic section of the vector bundle on $\mathcal{A}_2$ defining modular forms of weight $\Sym^2$. \end{details} We will use another vector-valued modular form in the sequel. \begin{ex} \label{ex:f86} Following Ibukiyama~\cite{ibukiyama_VectorvaluedSiegelModular2012}, let~$E_8\subset \mathbb{R}^8$ denote the lattice of half-integer vectors~$v = (v_1, \ldots, v_8)$ subject to the conditions \begin{displaymath} \sum_{k=1}^8 v_k \in 2\mathbb{Z} \quad\text{and}\quad \forall\, 1\leq k, l\leq 8,\ v_k - v_l\in\mathbb{Z}. \end{displaymath} Set~$a = (2,1,i,i,i,i,i,0)$ and~$b = (1,-1,i,i,1,-1,-i,i)$, where~$i^2=-1$. Define \begin{displaymath} f_{8,6}(\tau) = \dfrac{1}{111456000} \sum_{j = 0}^6 \binom{6}{j} \Theta_j(\tau) \,x^j \end{displaymath} where, using the notation~$\displaystyle\langle v, w\rangle = \sum_{k=1}^8 v_k w_k$, \begin{align*} \Theta_j(\tau) &= \sum_{v, v'\in E_8} \scal{v}{a}^j \cdot \scal{v'}{a}^{6-j} \cdot \detmat{\scal{v}{a}}{\scal{v'}{a}}{\scal{v}{b}}{\scal{v'}{b}}^4 \\ & \qquad\qquad\qquad \cdot\exp\Bigl(i\pi\bigl(\scal{v}{v}\tau_1 + 2\scal{v}{v'}\tau_2 + \scal{v'}{v'}\tau_3\bigr)\Bigr). \end{align*} Then~$f_{8,6}$ is a nonzero Siegel modular form of weight~$\det^8\Sym^6$. This definition provides an explicit, but slow, method to compute the first coefficients of the~$q$-expansion; using the expression of~$f_{8,6}$ in terms of theta series~\cite{clery_CovariantsBinarySextics2017} would be faster. We have \begin{displaymath} \begin{aligned} f_{8,6}(\tau) = & \quad \left((4 q_2^2 - 16 q_2 + 24 - 16 q_2^{-1} + 4 q_2^{-2}) q_1^2 q_3 + \cdots\right) x^6 \\ & + \left((12 q_2^2 - 24 q_2 + 24 q_2^{-1} - 12 q_2^{-2}) q_1^2 q_3 + \cdots \right) x^5 \\ & + \left((- q_2 + 2 - q_2^{-1}) q_1 q_3 + \cdots \right) x^4 \\ & + \left((-2 q_2 + 2 q_2^{-1}) q_1 q_3 + \cdots \right) x^3 \\ & + \left((-q_2 + 2 - q_2^{-1}) q_1 q_3 + \cdots \right) x^2 \\ & + \left((12 q_2^2 - 24 q_2 + 24 q_2^{-1} - 12 q_2^{-2}) q_1 q_3^2 + \cdots \right) x \\ & + \left((4 q_2^2 - 16 q_2 + 24 - 16 q_2^{-1} + 4 q_2^{-2})q_1 q_3^2 + \cdots \right). \end{aligned} \end{displaymath} \end{ex} \subsection{Hilbert modular forms} \label{subsec:hilbert} In the context of Hilbert surfaces and abelian surfaces with real multiplication, we consistently use the following notation: \begin{center} \begin{tabular}{ccl} $K$ & & a real quadratic number field (embedded in~$\mathbb{R}$)\\ $\Delta$ & & the discriminant of~$K$, so that $K = \mathbb{Q}\bigl(\sqrt{\Delta}\bigr)$ \\ $\mathbb{Z}_K$ & & the ring of integers in~$K$ \\ $\mathbb{Z}_K^\vee$ & & the trace dual of~$\mathbb{Z}_K$, in other words $\mathbb{Z}_K^\vee = 1/\sqrt{\Delta}\ \mathbb{Z}_K$ \\ $x\mapsto \conj{x}$ & & real conjugation in~$K$ \\ $\Sigma$ & & the embedding~$x\mapsto (x,\conj{x})$ from~$K$ to~$\mathbb{R}^2$. \end{tabular} \end{center} Finally, we denote \begin{displaymath} \Gamma_K = \SL_2\bigl(\mathbb{Z}_K\oplus \mathbb{Z}_K^\vee\bigr) = \left\{\mat{a}{b}{c}{d} \in\SL_2(K) \,\,|\,\, a,d\in\mathbb{Z}_K,\, b\in \bigl(\mathbb{Z}_K^\vee\bigr)^{-1},\, c\in \mathbb{Z}_K^\vee \right\}. \end{displaymath} A principally polarized abelian surface~$A$ over~$\C$ has \emph{real multiplication by~$\mathbb{Z}_K$} if it is endowed with an embedding \begin{displaymath} \iota\colon \mathbb{Z}_K\hookrightarrow \End^{\ensuremath{\mathrm{sym}}}(A), \end{displaymath} where~$\End^{\ensuremath{\mathrm{sym}}}(A)$ denotes the set of endomorphisms of~$A$ that are invariant under the Rosati involution. \paragraph{Hilbert surfaces.} Denote by~$\mathbb{H}_1$ the complex upper half plane. For every $t = (t_1,t_2)\in\mathbb{H}_1^2$, the quotient \begin{displaymath} A_K(t) = \C^2/\Lambda_K(t) \quad\text{where} \quad \Lambda_K(t) = \Sigma\bigl(\mathbb{Z}_K^\vee\bigr) \oplus \Diag(t_1,t_2)\,\Sigma\bigl(\mathbb{Z}_K\bigr) \end{displaymath} is naturally endowed with the structure of a principally polarized abelian surface over~$\C$, and has a real multiplication embedding~$\iota_K(t)$ given by multiplication via~$\Sigma$. It is also endowed with the basis of differential forms \begin{displaymath} \omega_K(t) = (2\pi i\, dz_1, 2\pi i\, dz_2). \end{displaymath} The involution~$\sigma$ of~$\mathbb{H}_1^2$ given by $\sigma\bigl((t_1,t_2)\bigr) = (t_2,t_1)$ exchanges the two differential forms in the basis, and exchanges the real multiplication embedding with its conjugate. The embedding~$\Sigma$ induces a map $\Gamma_K \hookrightarrow \SL_2(\mathbb{R})^2$. Through this embedding, the group~$\Gamma_K$ acts on~$\mathbb{H}_1^2$ by the usual action of~$\SL_2(\mathbb{R})$ on~$\mathbb{H}_1$ on each coordinate. \begin{thm}[{\cite[§9.2]{birkenhake_ComplexAbelianVarieties2004}}] \label{thm:hilbert-unif} Let~$(A,\iota)$ be a principally polarized abelian surface over~$\C$ with real multiplication by~$\mathbb{Z}_K$. Then there exists~$t\in\mathbb{H}_1^2$ such that~$(A,\iota)$ is isomorphic to~$\bigl(A_K(t),\iota_K(t)\bigr)$, and~$t$ is uniquely determined up to action of~$\Gamma_K$. \end{thm} The quotient~${\mathbf{H}_2}(\C) = \Gamma_K\backslash \mathbb{H}_1^2$ is the set of complex points of an algebraic variety~${\mathbf{H}_2}$ called a \emph{Hilbert surface}. \paragraph{Hilbert modular forms.} Let~$k_1, k_2\in \mathbb{Z}$. A \emph{Hilbert modular form} of weight $(k_1, k_2)$ is a holomorphic function~$f\colon\mathbb{H}_1^2\to\C$ satisfying the transformation rule \begin{displaymath} \forall\gamma = \begin{pmatrix}a & b \\ c & d\end{pmatrix}\in\Gamma_K, \ \forall t\in\mathbb{H}_1^2,\ f(\gamma t) = \bigl(c\, t_1 + d\bigr)^{k_1} \bigl(\wideconj{c}\,t_2 + \conj{d}\bigr)^{k_2} f(t). \end{displaymath} We say that~$f$ is \emph{symmetric} if~$f\circ\sigma = f$. If~$f$ is nonzero and symmetric, then its weight~$(k_1, k_2)$ is automatically \emph{parallel}, meaning~$k_1 = k_2$. A Hilbert modular \emph{function} is only required to be meromorphic instead of holomorphic. All irreducible representations of~$\GL_1(\C)^2$ are 1-dimensional, so there is no need to consider vector-valued forms. The analogue of \Cref{prop:mf-derivative} for Hilbert modular forms is the following. \begin{prop} \label{prop:mf-hilbert-derivative} Let~$f$ be a Hilbert modular function of weight $(0,0)$. Then the partial derivatives $\partial f/\partial t_1$ and $\partial f/\partial t_2$ are Hilbert modular functions of weight $(2,0)$ and $(0,2)$ respectively. \end{prop} \begin{proof} Differentiate the relation $f(\gamma t) = f(t)$. \end{proof} Let $(A,\iota)$ be a principally polarized abelian surface over~$\C$ with real multiplication by~$\mathbb{Z}_K$. As in the Siegel case, we would like to evaluate Hilbert modular forms when a basis of differential forms on~$A$ is given; this is possible if we restrict to bases of~$\Omega^1(A)$ which behave well with respect to the real multiplication embedding. \begin{details} From a geometric point of view, we have two line bundles~${\mathcal{L}}_1$ and ${\mathcal{L}}_2$ on~$\mathcal{A}_{2,K}$ whose fibres over the isomorphism class of $(A,\iota)$ are given by \begin{displaymath} \left\{\omega\in \Omega^1(A) \,|\, \forall \beta\in\mathbb{Z}_K,\ \iota(\beta)^* \omega = \beta\omega \text{ (resp.\ $\conj{\beta}\omega$)}\right\}^\vee. \end{displaymath} Hilbert modular forms of weight~$(k_1,k_2)$ are holomorphic sections of the line bundle~${\mathcal{L}}_1^{k_1}\otimes {\mathcal{L}}_2^{k_2}$~\cite[X.3]{vandergeer_HilbertModularSurfaces1988}, \cref{details:hilbert}. \end{details} \begin{defn} \label{def:hilbert-normalized} Let~$\omega$ be a basis of~$\Omega^1(A)$. We say that~$(A,\iota,\omega)$ is \emph{Hilbert-normalized} if for every $\alpha\in \mathbb{Z}_K$, the matrix of $\iota(\alpha)^*\colon \Omega^1(A)\to \Omega^1(A)$ in the basis~$\omega$ is~$\Diag(\alpha,\conj{\alpha})$. \end{defn} If~$(A,\iota,\omega)$ is Hilbert-normalized and~$f$ is a Hilbert modular form of weight $(k_1,k_2)$, then the quantity~$f(A,\iota,\omega)$ is computed as follows. Choose $t\in\mathbb{H}_1^2$ and an isomorphism~$\eta\colon (A,\iota)\to \bigl(A_K(t),\iota_K(t)\bigr)$ as in \Cref{thm:hilbert-unif}, and let $r\in\GL_2(\C)$ be matrix of $\eta^*$ in the bases $\omega(t),\omega$. Then~$r$ is diagonal,~$r = \Diag(r_1,r_2)$, and \begin{displaymath} f(A,\iota,\omega) = r_1^{k_1} r_2^{k_2} f(t). \end{displaymath} \subsection{The Hilbert embedding} \label{subsec:hilbert-siegel} Forgetting the real multiplication structure yields a map~${\mathbf{H}_2}(\C)\to \coarse_2(\C)$ from the Hilbert surface to the Siegel threefold. In fact, this forgetful map comes from a linear map \begin{displaymath} H\colon \mathbb{H}_1^2 \to \mathbb{H}_2 \end{displaymath} called the \emph{Hilbert embedding}, which we now describe explicitly. Let $(e_1,e_2)$ be the $\mathbb{Z}$-basis of~$\mathbb{Z}_K$ given by $e_1=1$ and \begin{displaymath} e_2 = \dfrac{1 - \sqrt{\Delta}}{2}\quad \text{if } \Delta=1 \text{ mod } 4,\quad e_2 =\sqrt{\Delta} \quad \text{otherwise.} \end{displaymath} Set $R = \mat{e_1}{e_2}{\conj{e_1}}{\conj{e_2}}$, and define \begin{displaymath} H\colon \mathbb{H}_1^2\to \mathbb{H}_2,\qquad t = (t_1,t_2)\mapsto R^t\, \Diag(t_1,t_2)\, R. \end{displaymath} \begin{prop} \label{prop:hilbert-embedding} For every~$t\in\mathbb{H}_1^2$, left multiplication by~$R^t$ on~$\C^2$ induces an isomorphism~$A_K(t) \to A \bigl(H(t) \bigr)$. \end{prop} \begin{proof} By definition,~$\Sigma\bigl(\mathbb{Z}_K\bigr) = R\,\mathbb{Z}^2$, and since~$\mathbb{Z}_K^\vee$ is the trace dual of~$\mathbb{Z}_K$, we have~$\Sigma\bigl(\mathbb{Z}_K^\vee\bigr) = R^{-t}\,\mathbb{Z}^2$. Then a direct computation shows that \begin{displaymath} \forall t\in\mathbb{H}_1^2,\ \Lambda \bigl(H(t) \bigr) = R^t\, \Lambda_K(t). \qedhere \end{displaymath} \end{proof} The Hilbert embedding is compatible with the actions of the modular groups. \begin{prop}[{\cite[Prop.~3.1]{lauter_ComputingGenusCurves2011}}]~ \label{prop:hilbert-embedding-action} \begin{enumerate} \item Under~$H$, the action of~$\Gamma_K$ on~$\mathbb{H}_1^2$ is transformed into the action of~$\Sp_{4}(\mathbb{Z})$ on~$\mathbb{H}_2$ by means of the morphism \begin{displaymath} \mat{a}{b}{c}{d} \mapsto \mat{R^t}{0}{0}{R^{-1}} \mat{a^*}{b^*}{c^*}{d^*} \mat{R^{-t}}{0}{0}{R} \end{displaymath} where we write~$x^* = \Diag(x,\conj{x})$ for~$x\in K$. \item Define \begin{displaymath} M_\sigma = \mat{ \begin{matrix} 1&0\\ \delta &-1 \end{matrix} }{(0)}{(0)}{ \begin{matrix} 1& \delta\\0&-1 \end{matrix} } \end{displaymath} where~$\delta = 1$ if~$\Delta = 1\ \mathrm{mod}\ 4$, and~$\delta=0$ otherwise. Then we have \begin{displaymath} \forall t\in\mathbb{H}_1^2,\ H \bigl(\sigma(t) \bigr) = M_\sigma H(t). \end{displaymath} \end{enumerate} \end{prop} Moreover, pulling back a Siegel modular form via the Hilbert embedding gives a Hilbert modular form. \begin{prop} \label{prop:mf-pullback} Let $k\in\mathbb{Z}$, $n\in\mathbb{N}$, and let~$f \colon \mathbb{H}_2\to \C_n[x]$ be a Siegel modular form of weight~$\rho = \det^k\Sym^n$. Define the functions~$g_i\colon\mathbb{H}_1^2\to\C$ for $0\leq i\leq n$ by \begin{displaymath} \forall t\in\mathbb{H}_1^2,\ \sum_{i=0}^n g_i(t)\, x^i = \rho(R) f \bigl(H(t) \bigr). \end{displaymath} Then each~$g_i$ is a Hilbert modular form of weight~$(k+i,\, k+n-i)$. \end{prop} \begin{proof} It is straightforward to check the transformation rule using \Cref{prop:hilbert-embedding-action}. The heart of the computation is that on diagonal matrices~$\Diag(r_1,r_2)$, the representation~$\det^k\Sym^n$ splits: the coefficient before~$x^i$ is multiplied by~$(r_1 r_2)^k\, r_1^i\, r_2^{n-i}$. \end{proof} \begin{cor} \label{cor:scalar-pullback} If~$f$ is a scalar-valued Siegel modular form of weight~$\,\det^k$, then~$H^*f\,:\, t\mapsto f \bigl(H(t) \bigr)$ is a symmetric Hilbert modular form of weight~$(k,k)$. \end{cor} \begin{proof} Since~$\det(R)^k$ is a nonzero constant, by \Cref{prop:mf-pullback}, the function~$H^*f$ is a Hilbert modular form of weight~$(k,k)$. Moreover~$\det(M_\sigma) = 1$, so~$H^*f$ is symmetric by \Cref{prop:hilbert-embedding-action}. \end{proof} The image of the Hilbert embedding in~$\coarse_2(\C)$ is called a \emph{Humbert surface}. It can be described by an equation in terms of Igusa invariants, which grows quickly in size with the discriminant~$\Delta$, but can be computed in small cases~\cite{gruenewald_ComputingHumbertSurfaces2010}. \begin{prop} \label{prop:igusa-hilbert} Igusa invariants generate the field of symmetric Hilbert modular functions of weight $(0,0)$. They define a birational map from $\coarse_{2,K}(\C)$ to the closed subset of $\C^3$ cut out by the Humbert equation. \end{prop} \begin{proof} The image of~$H$ in~$\coarse_2(\C)$ is not contained in the codimension~$1$ subset where Igusa invariants are not a local isomorphism to~$\mathbb{A}^3$. \end{proof} To ease notation, we also write~$j_k$ for the pullback~$H^* j_k$, for each $1\leq k\leq 3$. \subsection{Isogenies between abelian surfaces} \label{subsec:isogenies} Let~$k$ be a field, and let~$A$ be a principally polarized abelian surface over~$k$. Denote its dual by~$A^\vee$ and its principal polarization by $\pi\colon A\to A^\vee$. Recall that for every line bundle~${\mathcal{L}}$ on~$A$, there is a morphism $\phi_{{\mathcal{L}}}\colon A\to A^\vee$ defined by $\phi_{\mathcal{L}}(x) = T_x^* {\mathcal{L}}\otimes{\mathcal{L}}^{-1}$, where~$T_x$ denotes translation by~$x$ on~$A$. Finally, let~$\NS(A)$ denote the Néron--Severi group of~$A$, consisting of line bundles up to algebraic equivalence. \begin{thm}[{\cite[Prop.~14.2]{milne_AbelianVarieties1986}}] \label{thm:NS-End} For every $\xi\in\End^{\ensuremath{\mathrm{sym}}}(A)$, there is a unique symmetric line bundle~${\mathcal{L}}_A^\xi$ such that $\phi_{{\mathcal{L}}_A^\xi} = \pi\circ\xi$. This association induces an isomorphism of groups \begin{displaymath} \bigl(\End^{\ensuremath{\mathrm{sym}}}(A),+\bigr) \simeq \bigl(\NS(A),\otimes\bigr). \end{displaymath} Under this isomorphism, line bundles giving rise to polarizations correspond to totally positive elements in $\End^{\ensuremath{\mathrm{sym}}}(A)$. \end{thm} In this notation,~${\mathcal{L}}_A^1$ is the line bundle associated with the principal polarization~$\pi$. We will consider two different isogeny types that we now define. \begin{defn} \label{def:beta-isog} Let~$k$ be a field. \begin{enumerate} \item Let $\ell\in\mathbb{N}$ be a prime, and let~$A, A'$ be principally polarized abelian surfaces over~$k$. An isogeny $\varphi\colon A\to A'$ is called an \emph{$\ell$-isogeny} if \begin{displaymath} \varphi^* {\mathcal{L}}_{A'}^1 = {\mathcal{L}}_A^{\ell}. \end{displaymath} \item Let~$K$ be a real quadratic field, and let $\beta\in\mathbb{Z}_K$ be a totally positive prime. Let $(A,\iota)$ and $(A',\iota')$ be principally polarized abelian surfaces over~$k$ with real multiplication by~$\mathbb{Z}_K$. An isogeny $\varphi\colon A\to A'$ is called a \emph{$\beta$-isogeny} if \begin{displaymath} \varphi^* {\mathcal{L}}_{A'}^1 = {\mathcal{L}}_A^{\,\iota(\beta)} \end{displaymath} and \begin{displaymath} \forall \alpha\in\mathbb{Z}_K,\ \varphi\circ\iota(\alpha) = \iota'(\alpha)\circ\varphi. \end{displaymath} \end{enumerate} \end{defn} For a generic principally polarized abelian surface, $\ell$-isogenies are the simplest kind of isogenies that occur. They have degree~$\ell^2$. If we restrict to abelian surfaces with real multiplication by $\mathbb{Z}_K$, then $\beta$-isogenies are smaller: their degree is only $N_{K/\mathbb{Q}}(\beta)$~\cite[Prop.~2.1]{dudeanu_CyclicIsogeniesAbelian2017}. Both~$\ell$- and $\beta$-isogenies are easily described over~$\C$. For $t = (t_1,t_2)\in\mathbb{H}_1^2$, write \begin{displaymath} t/\beta := \bigl(t_1/\beta, t_2/\conj{\beta}\bigr). \end{displaymath} The following well-known statement is a consequence of~\Cref{thm:siegel-unif,thm:hilbert-unif}, using the facts that the kernel of an $\ell$-isogeny is a maximal isotropic subgroup of the $\ell$-torsion, and the kernel of a $\beta$-isogeny is a cyclic subgroup of the $\beta$-torsion. \begin{prop}~ \label{prop:complex-isog} \begin{enumerate} \item For every $\tau\in\mathbb{H}_2$, the identity map on~$\C^2$ induces an $\ell$-isogeny \begin{displaymath} A(\tau)\to A(\tau/\ell). \end{displaymath} Let $A, A'$ be principally polarized abelian surfaces over~$\C$, and let $\varphi\colon A\to A'$ be an $\ell$-isogeny. Then there exists $\tau\in \mathbb{H}_2$ such that there is a commutative diagram \begin{displaymath} \begin{tikzcd} A \ar[r,"\varphi"] \ar[d, "{\rotatebox{90}{$\sim$}}"]& A' \ar[d, "{\rotatebox{90}{$\sim$}}"] \\ A(\tau) \ar[r, "z\mapsto z"] & A(\tau/\ell). \end{tikzcd} \end{displaymath} \item For every $t\in\mathbb{H}_1^2$, the identity map on~$\C^2$ induces a $\beta$-isogeny \begin{displaymath} \bigl(A_K(t),\iota_K(t)\bigr)\to \bigl(A_K(t/\beta),\iota_K(t/\beta)\bigr). \end{displaymath} Let $(A,\iota)$, $(A',\iota')$ be principally polarized abelian surfaces over~$\C$ with real multiplication by~$\mathbb{Z}_K$, and let $\varphi\colon (A,\iota)\to (A',\iota')$ be a $\beta$-isogeny. Then there exists $t\in \mathbb{H}_1^2$ such that there is a commutative diagram \begin{displaymath} \begin{tikzcd} (A,\iota) \ar[r,"\varphi"] \ar[d, "{\rotatebox{90}{$\sim$}}"]& (A',\iota') \ar[d, "{\rotatebox{90}{$\sim$}}"] \\ \bigl(A_K(t),\iota_K(t)\bigr) \ar[r, "z\mapsto z"] & \bigl(A_K(t/\beta),\iota_K(t/\beta)\bigr). \end{tikzcd} \end{displaymath} \end{enumerate} \end{prop} \subsection{Modular equations} \label{subsec:modpol} Modular equations encode the presence of an isogeny between principally polarized abelian surfaces, as the classical modular polynomial does for elliptic curves. To define them, we use the fact that the extension of the field $\C\bigl(j_1(\tau), j_2(\tau), j_3(\tau)\bigr)$ constructed by adjoining~$j_1(\tau/\ell)$, $j_1(\tau/\ell)$, and~$j_3(\tau/\ell)$ is finite and generated by~$j_1(\tau/\ell)$. A similar statement holds for Igusa invariants at $t/\beta$ in the Hilbert case \cite[Prop.~4.11]{milio_ModularPolynomialsHilbert2017}. \begin{defn}~ \label{def:modeq} \begin{enumerate} \item Let $\ell\in\mathbb{N}$ be a prime. We call the \emph{Siegel modular equations of level~$\ell$} the data of the three polynomials $\Psi_{\ell,1},\Psi_{\ell,2},\Psi_{\ell,3}\in \C(J_1,J_2,J_3)[J_1']$ defined as follows: \begin{itemize} \item $\Psi_{\ell,1}$ is the monic minimal polynomial of the function~$j_1(\tau/\ell)$ over the field $\C\bigl(j_1(\tau),j_2(\tau),j_3(\tau) \bigr)$. \item For $i\in\{2, 3\}$, we have the following equality of meromorphic functions: \begin{displaymath} j_i(\tau/\ell) = \Psi_{\ell,i}\bigl(j_1(\tau),j_2(\tau),j_3(\tau),j_1(\tau/\ell)\bigr). \end{displaymath} \end{itemize} \item Let~$K$ be a real quadratic field, and let $\beta\in\mathbb{Z}_K$ be a totally positive prime. We call the \emph{Hilbert modular equations of level~$\beta$} the data of the three polynomials $\Psi_{\beta,1}, \Psi_{\beta,2}, \Psi_{\beta,3}$ defined as follows: \begin{itemize} \item $\Psi_{\beta,1}$ is the monic minimal polynomial of the function~$j_1(t/\beta)$ over the field $\C\bigl(j_1(t),j_2(t),j_3(t)\bigr)$. \item For $i\in\{2, 3\}$, we have the following equality of meromorphic functions: \begin{displaymath} j_i(t/\beta) = \Psi_{\beta,i}\bigl(j_1(t),j_2(t),j_3(t),j_1(t/\beta)\bigr). \end{displaymath} \end{itemize} \end{enumerate} \end{defn} In the Hilbert case, since Igusa invariants are symmetric by \Cref{cor:scalar-pullback}, the modular equations encode~$\beta$- and $\conj{\beta}$-isogenies simulaneously~\cite[Ex.~4.17]{milio_ModularPolynomialsHilbert2017}. It would be better to consider modular equations with non-symmetric invariants; however, we know of no good choice of such invariants in general. As explained in the introduction, modular equations really are equations for the image of a map defined at the level of algebraic stacks. As a consequence, they have coefficients in~$\mathbb{Q}$. Since Igusa invariants have poles on~$\coarse_2$ and ${\mathbf{H}_2}$, modular equations in genus~$2$ have denominators~\cite[Rem.~4.20]{milio_ModularPolynomialsHilbert2017}. If we multiply by these denominators, then we may consider modular polynomials as elements of~$\C[J_1,J_2,J_3,J_1',J_2',J_3']$ that vanish on the Igusa invariants of isogenous Jacobians: this is what we do in the sequel. From a practical point of view, modular equations in genus~$2$ are very large. This is especially true for Siegel modular equations of level~$\ell$. The degree of~$\Psi_{\ell,1}$ in~$J_1'$ is $\ell^3 + \ell^2 + \ell + 1$, and its degree in $J_1, J_2, J_3$ has the same order of magnitude, not mentioning the height of the coefficients. The situation is less desperate for Hilbert modular equations of level~$\beta$: the degree of~$\Psi_{\beta,1}$ in~$J_1'$ is $2N_{K/\mathbb{Q}}(\beta)+2$~\cite[Ex.~4.17]{milio_ModularPolynomialsHilbert2017}. Modular equations have been computed for $\ell = 2$ and $3$ in the Siegel case, up to $N(\beta) = 41$ in the Hilbert case with $K = \mathbb{Q}(\sqrt{5})$ using Gundlach invariants, and even up to $N(\beta) = 97$ for $K = \mathbb{Q}(\sqrt{2})$ using theta constants as invariants~\cite{milio_ModularPolynomials}. \section{Explicit Kodaira--Spencer over \texorpdfstring{$\C$}{C}} \label{sec:cov} A nonsingular hyperelliptic equation~${\mathcal{C}}\,:\, v^2 = E_{{\mathcal{C}}}(u)$ over~$\C$ naturally encodes a basis of differential forms~$\omega({\mathcal{C}})$ on the principally polarized abelian surface~$\Jac({\mathcal{C}})$ (§\ref{subsec:hyperelliptic}). If~$f$ is a Siegel modular function, this gives rise to a map \begin{displaymath} \Cov(f)\colon {\mathcal{C}}\mapsto f\bigl(\Jac({\mathcal{C}}), \omega({\mathcal{C}})\bigr). \end{displaymath} Then,~$\Cov(f)$ is a \emph{covariant} of the curve, and has an expression in terms of the coefficients. We give an algorithm to obtain this expression from the $q$-expansion of~$f$ (§\ref{subsec:cov}), and apply it to the derivatives of Igusa invariants (§\ref{subsec:identification}). The result is the explicit Kodaira--Spencer isomorphism. This allows us to compute the deformation map and the tangent map of a given $\ell$-isogeny over~$\C$ (§\ref{subsec:norm-matrix}). Finally, we adapt these methods to the Hilbert case (§\ref{subsec:explicit-hilbert}). \subsection{Hyperelliptic equations} \label{subsec:hyperelliptic} Let~${\mathcal{C}}$ be a nonsingular hyperelliptic \emph{equation} of genus~$2$ over~$\C$: \begin{displaymath} {\mathcal{C}}\,:\, v^2 = E_{\mathcal{C}}(u), \end{displaymath} with $\deg E_{\mathcal{C}}\in\{5,6\}$. Then~${\mathcal{C}}$ is naturally endowed with the basis of differential forms \begin{displaymath} \omega({\mathcal{C}}) = \Bigl(\frac{u\,du}{v},\frac{du}{v}\Bigr). \end{displaymath} Recall that the Jacobian~$\Jac({\mathcal{C}})$ is a principally polarized abelian surface over~$\C$~\cite[Thm.~1.1 and Summary~6.11]{milne_JacobianVarieties1986}. Choose a base point~$P$ on~${\mathcal{C}}$. This gives an embedding \begin{displaymath} \eta_P \colon {\mathcal{C}} \hookrightarrow \Jac({\mathcal{C}}), \quad Q\mapsto [Q-P]. \end{displaymath} \begin{prop}[{\cite[Prop.~2.2]{milne_JacobianVarieties1986}}] \label{prop:etaP-diff} The map \begin{displaymath} \eta_P^*\colon \Omega^1 \bigl(\Jac({\mathcal{C}}) \bigr) \to \Omega^1({\mathcal{C}}) \end{displaymath} is an isomorphism and is independent of~$P$. \end{prop} By \Cref{prop:etaP-diff}, we can see~$\omega({\mathcal{C}})$ as a basis of differential forms on~$\Jac({\mathcal{C}})$. This basis depends on the particular hyperelliptic equation chosen. \begin{lem} \label{lem:hyperell-isomorphism} Let~${\mathcal{C}}$ be a genus~$2$ hyperelliptic equation over~$\C$, and let \begin{displaymath} r = \mat{a}{b}{c}{d} \in \GL_2(\C). \end{displaymath} Let~$E_{{\mathcal{C}}'}$ be the image of~$E_{\mathcal{C}}$ by $\det^{-2}\Sym^6(r)$, and let~${\mathcal{C}}'$ be the curve with equation $y'^{\,2} = E_{{\mathcal{C}}'}(x')$. Let $\eta\colon{\mathcal{C}}'\to{\mathcal{C}}$ be the isomorphism defined by \begin{displaymath} \eta(x',y') = \left( \dfrac{a x' + c}{b x' + d},\ \dfrac{(\det r)\,y'}{(bx' + d)^3} \right). \end{displaymath} Then the matrix of $\eta^*\colon \Omega^1({\mathcal{C}})\to \Omega^1({\mathcal{C}}')$ in the bases $\omega({\mathcal{C}}),\omega({\mathcal{C}}')$ is~$r$. \end{lem} \begin{proof} Write $(x,y) = \eta(x',y')$. A simple calculation shows that \begin{displaymath} \dfrac{dx}{y} = (bx' + d) \dfrac{dx'}{y'} \quad\text{and}\quad \dfrac{x\,dx}{y} = (ax' + c) \dfrac{dx'}{y'}, \end{displaymath} so the result follows. \end{proof} \begin{cor} \label{cor:hyperell-rep} Let~$A$ be a principally polarized abelian surface over~$\C$ that is not a product of two elliptic curves, and let~$\omega$ be a basis of~$\Omega^1(A)$. Then there exists a unique hyperelliptic curve equation~${\mathcal{C}}$ of genus~$2$ over~$\C$ such that \begin{displaymath} \bigl(\Jac({\mathcal{C}}),\omega({\mathcal{C}}) \bigr) \simeq (A,\omega). \end{displaymath} \end{cor} \begin{proof} By Torelli's theorem, there is a curve equation~${\mathcal{C}}_0$ over~$\C$ such that~$A$ is isomorphic to~$\Jac({\mathcal{C}}_0)$. Then~$\omega$ differs from~$\omega({\mathcal{C}}_0)$ by a linear transformation in~$\GL_2(\C)$. By \Cref{lem:hyperell-isomorphism}, we can make a suitable change of variables to find the correct~${\mathcal{C}}$. It is unique because every isomorphism between hyperelliptic curves comes from such a matrix~$r$. \end{proof} \begin{defn} The bases of differential forms chosen in~§\ref{sec:mf} allows us to define particular curve equations attached to a point of~$\mathbb{H}_2$ or~$\mathbb{H}_1^2$. \begin{enumerate} \item Let $\tau\in\mathbb{H}_2$, and assume that $\chi_{10}(\tau)\neq 0$. Then, by \Cref{cor:hyperell-rep}, there exists a unique hyperelliptic equation~${\mathcal{C}}(\tau)$ over~$\C$ such that \begin{displaymath} \Bigl(\Jac\bigl({\mathcal{C}}(\tau)\bigr), \omega\bigl({\mathcal{C}}(\tau) \bigr) \Bigr) \simeq \bigl(A(\tau),\omega(\tau) \bigr). \end{displaymath} We call~${\mathcal{C}}(\tau)$ the \emph{standard curve} attached to~$\tau$. We define the meromorphic functions~$a_i(\tau)$ for $0\leq i\leq 6$ to be the coefficients of~${\mathcal{C}}(\tau)$: \begin{displaymath} {\mathcal{C}}(\tau) \,:\, y^2 = \sum_{i=0}^6 a_i(\tau) x^i. \end{displaymath} \item Let $t\in \mathbb{H}_1^2$, and assume that $\chi_{10}(H(t)) \neq 0$, where~$H$ is the Hilbert embedding. Then, by \Cref{cor:hyperell-rep}, there exists a unique hyperelliptic equation~${\mathcal{C}}_K(t)$ over~$\C$ such that \begin{displaymath} \Bigl(\Jac\bigl({\mathcal{C}}_K(t)\bigr), \omega\bigl({\mathcal{C}}_K(t)\bigr)\Bigr) \simeq \bigl(A_K(t),\omega_K(t)\bigr). \end{displaymath} We call ${\mathcal{C}}_K(t)$ the \emph{standard curve} attached to $t$. \end{enumerate} \end{defn} \begin{prop} \label{prop:curve-siegel-mf} The function $\tau\mapsto{\mathcal{C}}(\tau)$ is a Siegel modular function of weight~$\det^{-2}\Sym^6$ which has no poles on the open set $\{\chi_{10}\neq 0\}$. \end{prop} \begin{proof} Over~$\C$, the Torelli map is biholomorphic, so this function is meromorphic. By \Cref{cor:hyperell-rep}, it is defined everywhere on $\{\chi_{10}\neq 0\}$. Combining \Cref{prop:H2-isom} with \Cref{lem:hyperell-isomorphism} shows the transformation rule. \end{proof} Finally, for $t\in\mathbb{H}_1^2$, we can relate the standard curves~${\mathcal{C}}_K(t)$ and~${\mathcal{C}}\bigl(H(t)\bigr)$. \begin{prop} \label{prop:hilb-standard-curve} For every $t\in\mathbb{H}_1^2$, we have \begin{displaymath} {\mathcal{C}}_K(t) = \det\nolimits^{-2}\Sym^6(R) \,{\mathcal{C}}\bigl(H(t)\bigr). \end{displaymath} \end{prop} \begin{proof} Use \Cref{prop:hilbert-embedding} and \Cref{lem:hyperell-isomorphism}. \end{proof} \subsection{Covariants} \label{subsec:cov} If~$f$ is a Siegel modular form, then we have a map \begin{displaymath} \Cov(f)\colon {\mathcal{C}}\mapsto f\bigl(\Jac({\mathcal{C}}), \omega({\mathcal{C}})\bigr). \end{displaymath} We show that~$\Cov(f)$ is a covariant of the curve equation. A recent reference for covariants is Mestre's article~\cite{mestre_ConstructionCourbesGenre1991}. \begin{defn} \label{def:cov} Denote by~$\C_6[x]$ the space of polynomials of degree at most~$6$. Let $\rho\colon\GL_2(\C)\to\GL(V)$ be a finite-dimensional holomorphic representation of~$\GL_2(\C)$. A \emph{covariant}, or \emph{polynomial covariant}, of weight~$\rho$ is a map \begin{displaymath} C\colon \C_6[x] \to V \end{displaymath} which is polynomial in the coefficients, and such that the following transformation rule holds: for every $r\in\GL_2(\C)$ and $W\in\C_6[x]$, \begin{displaymath} C\bigl(\det\nolimits^{-2}\Sym^6(r) \,W\bigr) = \rho(r)\, C(W). \end{displaymath} If $\dim V\geq 2$, then~$C$ is said to be \emph{vector-valued}, and otherwise \emph{scalar-valued}. A \emph{fractional covariant} is a map satisfying the same transformation rule which is only required to have a fractional expression in terms of the coefficients. \end{defn} It is enough to consider covariants of weight~$\det^k\Sym^n$ for $k\in\mathbb{Z}$, $n\in\mathbb{N}$. What we call a vector-valued covariant of weight $\det^k\Sym^n$ is in Mestre's paper a covariant of order~$n$ and degree $k + n/2$; what we call a scalar-valued covariant of weight~$\det^k$ is in Mestre's paper an invariant of degree~$k$. The reason for this change of terminology is the following. \begin{prop} \label{prop:siegel-cov-weight} If~$f$ be a Siegel modular function of weight~$\rho$, then~$\Cov(f)$ is a fractional covariant of weight~$\rho$. Conversely, if~$F$ is a fractional covariant of weight~$\rho$, then the meromorphic function $\tau\mapsto F\bigl({\mathcal{C}}(\tau)\bigr)$ is a Siegel modular function of weight~$\rho$. These operations are inverse of each other. \end{prop} \begin{proof} If~$f$ is a Siegel modular function, then~$\Cov(f)$ is well defined on a Zariski open set of~$\C_6[x]$ and is algebraic, so must have a fractional expression in terms of the coefficients. We let the reader check the transformation rules (use \Cref{lem:hyperell-isomorphism} and \Cref{prop:curve-siegel-mf}). \end{proof} \Cref{prop:siegel-cov-weight} gives a bijection between Siegel modular \emph{functions} and \emph{fractional} covariants, but we need more. The following theorem establishes a relation between Siegel modular \emph{forms} and \emph{polynomial} covariants, and was first proved in~\cite[§4]{clery_CovariantsBinarySextics2017}. \begin{thm} \label{thm:siegel-cov} Let~$f$ be a holomorphic Siegel modular form. Then~$\Cov(f)$ is a polynomial covariant. Moreover, if~$f$ is a cusp form, then~$\Cov(f/\chi_{10})$ is also a polynomial covariant. \end{thm} \begin{proof} The main difficulty is that nonsingular hyperelliptic equations only form a codimension~$1$ subset of all degree~$6$ polynomials: if~$f$ is a Siegel modular form, then the proof of~\cref{prop:siegel-cov-weight} only shows that~$\Cov(f)$ is a polynomial divided by some power of the discriminant. However, one can show that~$f$ extends to the so-called toroidal compactification of~$\coarse_2(\C)$, and this shows that~$\Cov(f)$ is well defined on all curve equations with at most one node. Since this set has codimension~$2$, the result follows. \end{proof} Unlike for Siegel modular forms, the graded $\C$-algebra generated by polynomial covariants is finitely generated. \begin{thm}[{\cite[p.\,296]{clebsch_TheorieBinaerenAlgebraischen1872}}] \label{thm:cov-structure} The graded $\C$-algebra of covariants is generated by~$26$ elements defined over~$\mathbb{Q}$. The number of generators of weight $\det^k\Sym^n$ is indicated in the following table: \end{thm} \begin{center} \begin{tabular}{c|cccccccccccccccc} $n\ \backslash\ k$ & -3 & -2 & -1 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 15 \\\hline 0 & & & & & &1& &1& &1& & & &1& &1 \\ 2 & & & & & &1& &1& &1&1& &1& &1 \\ 4 & & & &1& &1&1& &1& & 1 \\ 6 & &1& &1&1& &2 \\ 8 & &1&1& &1 \\ 10& & &1 \\ 12&1 \\ \end{tabular} \end{center} We only need to manipulate a small subset of these generators. Take our scalar generators of even weight to be the Igusa--Clebsch invariants $I_2, I_4, I_6, I_{10}$, in Mestre's notation $A',B',C',D'$~\cite{mestre_ConstructionCourbesGenre1991}, and set \begin{displaymath} I_6' := (I_2 I_4 - 3 I_6)/2. \end{displaymath} Denote the generator of weight~$\det^{15}$ by~$R$, and denote by $y_1, y_2, y_3$ the generators of weights~$\det^2\Sym^2$, $\det^4\Sym^2$, and~$\det^6\Sym^2$ respectively. Finally, the generator of weight~$\det^{-2}\Sym^6$, denoted by~$X$, is the degree 6 polynomial itself. Note that when computing these covariants as described in~\cite[§1]{mestre_ConstructionCourbesGenre1991}, the integers~$m$ and~$n$ on page~315 should be the \emph{orders} of~$f$ and~$g$, and not their degrees. To help the reader check their computations, we mention that the coefficient of~$a_1^5 a_4^{10}$ in~$R$ is~$2^{-2} 3^{-6} 5^{-10}$. \subsection{From \texorpdfstring{$q$}{q}-expansions to covariants} \label{subsec:identification} We now explain how to compute the polynomial covariant associated with a Siegel modular form whose $q$-expansion is known up to a certain precision. The works of Igusa already provide the answer in the case of scalar covariants. \begin{thm} \label{thm:scalar-identification} We have \begin{displaymath} \begin{aligned} 4\, \Cov(\psi_4) &= I_4, \\ 4\, \Cov(\psi_6) &= I_6', \\ 2^{12}\, \Cov(\chi_{10}) &= I_{10}, \\ 2^{15} \,\Cov(\chi_{12}) &= I_2 I_{10}, \\ 2^{37} 3^{-9} 5^{-10} \Cov(\chi_{35}) &= I_{10}^2 R. \end{aligned} \end{displaymath} \end{thm} \begin{proof} By~\cite[p.\,848]{igusa_SiegelModularForms1962}, there exists a constant $\lambda\in\C^\times$ such that these relations hold up to a factor~$\lambda^k$, for $k\in\{4,6,10,12,35\}$ respectively. Note that Igusa's covariant~$E$ is $-2^5 3^9 5^{10} R$. Then, Thomae's formul\ae~(\cite[Thm.~IIIa.8.1]{mumford_TataLecturesTheta1984} and~\cite[pp.\,216--217]{thomae_BeitragZurBestimmung1870}), which relate theta constants with the values of path integrals on the associated hyperelliptic curve, imply that~$\lambda=1$. \end{proof} Therefore, the Igusa invariants satisfy \begin{displaymath} \Cov(j_1) = \dfrac{I_4 I_6'}{I_{10}},\quad \Cov(j_2) = \dfrac{I_2I_4^2}{I_{10}},\quad \Cov(j_3) = \dfrac{I_4^5}{I_{10}^2}. \end{displaymath} Let us compute the $q$-expansion of the standard curve~${\mathcal{C}}(\tau)$. Recall the Siegel modular form~$f_{8,6}$ of weight~$\det^8\Sym^6$ introduced in \Cref{ex:f86}. \begin{prop} \label{prop:f86} We have $\Cov(f_{8,6}/\chi_{10}) = X$. In other words, for every $\tau\in\mathbb{H}_2$ such that $\chi_{10}(\tau)\neq 0$, we have \begin{displaymath} {\mathcal{C}}(\tau) = \frac{f_{8,6}(\tau)}{\chi_{10}(\tau)}. \end{displaymath} \end{prop} \begin{proof} Since~$f_{8,6}$ is a cusp form, by \Cref{thm:siegel-cov},~$\Cov(f_{8,6}/\chi_{10})$ is a nonzero polynomial covariant of weight~$\smash{\det^{-2}\Sym^6}$. By \Cref{thm:cov-structure}, this space of covariants is of dimension~1 and generated by $X$, so the relation holds up to a factor~$\lambda\in\C^\times$. This yields $q$-expansions for the coefficients~$a_i(\tau)$ of~${\mathcal{C}}(\tau)$ up to a factor~$\lambda$. Then, the relations from \cref{thm:scalar-identification} imply~$\lambda^4=\lambda^6=\lambda^{35}=1$, hence~$\lambda=1$. \end{proof} Given a Siegel modular form~$f$ of weight~$\rho$ whose $q$-expansion can be computed, the following algorithm recovers the expression of~$\Cov(f)$ as a polynomial. \begin{algo} \label{alg:qexp-to-cov} \begin{enumerate} \item Compute a basis~$\mathcal{B}$ of the vector space of polynomial covariants of weight~$\rho$ using \Cref{thm:cov-structure}. \item \label{step:qexp} Choose a precision~$\nu$ and compute the $q$-expansion of~$f$ modulo $(q_1^\nu, q_3^\nu)$. \item For every $B\in \mathcal{B}$, compute the $q$-expansion of the Siegel modular function $\tau\mapsto B\bigl({\mathcal{C}}(\tau)\bigr)$ using \Cref{prop:f86}. \item Do linear algebra; if the matrix does not have full rank, go back to step~\ref*{step:qexp} with a larger~$\nu$. \end{enumerate} \end{algo} Sturm-type bounds~\cite{burgosgil_HeckeSturmBounds2017} provide a theoretical limit for the precision~$\nu$ that we need to consider; for the examples given in this article, $\nu = 3$ is enough. We now apply \Cref{alg:qexp-to-cov} to derivatives of Igusa invariants. Recall from \Cref{prop:mf-derivative} that for $1\leq k\leq 3$, the partial derivative \begin{displaymath} \dfrac{dj_k}{d\tau} := \dfrac{\partial j_k}{\partial \tau_1} x^2 + \dfrac{\partial j_k}{\partial \tau_2} x + \dfrac{\partial j_k}{\partial \tau_3} \end{displaymath} is a Siegel modular function of weight~$\Sym^2$. \begin{thm} \label{thm:vector-identification} We have \begin{align*} \frac{1}{2\pi i} \Cov\Bigl(\frac{dj_1}{d\tau}\Bigr) &= \dfrac{1}{I_{10}}\Bigl( \dfrac{153}{8} I_2^2 I_4 y_1 - \dfrac{135}{2} I_2 I_6 y_1 + \dfrac{135}{2} I_4^2 y_1 + \dfrac{46575}{4} I_2 I_4 y_2\\ &\qquad\qquad - 30375\, I_6 y_2 + 1366875\, I_4 y_3 \Bigr), \\ \frac{1}{2\pi i} \Cov\Bigl(\frac{dj_2}{d\tau}\Bigr) &= \dfrac{1}{I_{10}}\Bigl( 90\, I_2^2 I_4 y_1 + 900\, I_2^2 y_1 + 40500\, I_2 I_4 y_2 \Bigr), \\ \frac{1}{2\pi i}\Cov\Bigl(\frac{dj_3}{d\tau}\Bigr) &= \dfrac{1}{I_{10}^2}\Bigl( 225\, I_2 I_4^4 y_1 + 101250\, I_4^4 y_2 \Bigr). \end{align*} \end{thm} \begin{proof} Let $1\leq k\leq 3$. The function~$\chi_{10}^2 j_k$ has no poles on~$\coarse_2(\C)$. Therefore, the Siegel modular function \begin{displaymath} f_k = \chi_{10}^3 \dfrac{dj_k}{d\tau} \end{displaymath} is holomorphic on $\coarse_2(\C)$. Its $q$-expansion can be computed from the $q$-expansion of~$j_k$ by formal differentiation. Since \begin{displaymath} \frac{1}{2\pi i}\dfrac{\partial}{\partial \tau_i} = q_i \frac{\partial}{\partial q_i} \end{displaymath} for $1\leq i\leq 3$, we check that~$f_k$ is a cusp form. Therefore, by \Cref{thm:siegel-cov}, $\Cov(f_k/\chi_{10})$ is a polynomial covariant of weight~$\det^{20}\Sym^2$. Looking at the table in \Cref{thm:cov-structure}, we find that a basis of this space of covariants is given by covariants of the form~$I y$ where $y\in\{y_1,y_2,y_3\}$ and~$I$ is a scalar-valued covariant of the appropriate even weight. \Cref{alg:qexp-to-cov} succeeds with $\nu=3$; the computations were done using Pari/GP~\cite{theparigroup_PariGPVersion2019}. \end{proof} \begin{rem} \label{rem:vector-identification-numcheck} \Cref{thm:scalar-identification,thm:vector-identification} can be checked numerically. Computing big period matrices of hyperelliptic curves~\cite{molin_ComputingPeriodMatrices2019} provides pairs $\bigl(\tau,\, {\mathcal{C}}(\tau)\bigr)$ with $\tau\in\mathbb{H}_2$. We can evaluate Igusa invariants at a given $\tau$ to high precision using their expression in terms of theta functions~\cite{dupont_FastEvaluationModular2011}. Therefore we can also evaluate their derivatives numerically with high precision and compute the associated covariant using floating-point linear algebra. The computations were done using the libraries \texttt{hcperiods}~\cite{molin_HcperiodsPeriodMatrices2018} and \texttt{cmh}~\cite{enge_CMHComputationIgusa2014}; they provide a nice consistency check to \Cref{thm:vector-identification}. Another consistency check is that we can recover the relations from \cref{thm:scalar-identification}. \end{rem} \begin{rem} \label{rem:derivatives-other-invariants} From \Cref{thm:vector-identification}, we can easily obtain similar formul\ae\ for derivatives of other invariants, or even invariants for abelian surfaces with extra structure such as theta constants. For instance, taking the invariants $h_1, h_2, h_3$ defined in \cref{rem:invariants_bielliptic}, we obtain {\small \begin{align*} \frac{1}{2\pi i} \Cov\Bigl(\frac{dh_1}{d\tau}\Bigr) &= \dfrac{1}{I_4^4} \Bigl( -\frac{297}{8}y_1 I_{4}^2I_{2}^3 + -\frac{54675}{4}y_{2}I_{4}^2 I_2^2 + \frac{1701}{8}y_{1}I_{6}I_{4} I_{2}^2 + \frac{135}{2}y_{1}I_{4}^3 I_2 \\ & \qquad + 1366875y_{3}I_{4}^2 I_2 + \frac{346275}{4}y_{2}I_{6}I_{4} I_2 - \frac{1215}{4}y_{1}I_{6}^2 I_{2} + -\frac{405}{2}y_{1}I_{6}I_{4}^2 \\ &\qquad - 4100625y_{3}I_{6}I_{4} - \frac{273375}{2}y_{2}I_{6}^2\Bigr),\\ \frac{1}{2\pi i} \Cov\Bigl(\frac{dh_2}{d\tau}\Bigr) &= \frac{1}{I_4^4} \Bigl( -135 y_{1}I_{10}I_{2}^2 - 60750y_{2}I_{10}I_{2} + 900y_{1}I_{10}I_{4} \Bigr), \\ % \frac{1}{2\pi i}\Cov\Bigl(\frac{dh_3}{d\tau}\Bigr) &= \frac{1}{I_4^5} \Bigl( -\frac{747}{8}y_{1}I_{10}I_{4}I_{2}^2 -\frac{155925}{4}y_{2}I_{10}I_{4}I_2 + 270y_{1}I_{10}I_{6} I_{2} + \frac{135}{2}y_{1}I_{10}I_{4}^2 \\ &\qquad + 1366875y_{3}I_{10}I_{4} + 121500y_{2}I_{10}I_{6}\Bigr). \end{align*} } \end{rem} \subsection{Deformation matrix and action on tangent spaces} \label{subsec:norm-matrix} Let ${\mathcal{C}}, {\mathcal{C}}'$ be equations of genus~$2$ hyperelliptic curves over~$\C$, let $A, A'$ be their Jacobians, and let $\varphi\colon A\to A'$ be an $\ell$-isogeny. The choice of curve equations encodes a choice of bases of~$\Omega^1(A)$ and~$\Omega^1(A')$, or equivalently, by taking dual bases, a choice of bases of the tangent spaces~$T_0(A)$ and~$T_0(A')$. By an abuse of notation, we identify the tangent map $d\varphi\colon T_0(A)\to T_0(A')$ with its matrix written in these bases. Let us show how to compute~$d\varphi$ from the data of the curve equations and modular equations of level~$\ell$. \begin{defn} It is convenient to introduce matrix notations. \label{def:djdtau} \begin{itemize} \item For $\tau\in\mathbb{H}_2$, we define \begin{displaymath} D_\tau J(\tau) = \left(\dfrac{1}{2\pi i}\dfrac{\partial j_k}{\partial\tau_l}(\tau)\right)_{1\leq k, l\leq 3} \cdot \left( \begin{matrix} 2&0&0\\0&1&0\\0&0&2 \end{matrix} \right). \end{displaymath} In other words, if we set \begin{displaymath} v_1 = \mat{2}{0}{0}{0},\quad v_2 = \mat{0}{1}{1}{0},\quad v_3 = \mat{0}{0}{0}{2}, \end{displaymath} then the $l$-th column of~$D_\tau J(\tau)$ contains (up to~$2\pi i$) the derivatives of Igusa invariants at~$\tau$ in the direction~$v_l$. We can check that for $r\in\GL_2(\C)$, the $l$-th column of~$D_\tau J(\tau) \Sym^2(r)$ contains the derivatives of Igusa invariants at~$\tau$ in the direction~$r\, v_l\, r^t$. Let $(A,\omega)$ be a principally polarized abelian surface over~$\C$ with a basis of differential forms, let $\eta\colon A\to A(\tau)$ be an isomorphism for some~$\tau\in\mathbb{H}_2$, and let~$r$ be the matrix of~$\eta^*$ in the bases~$\omega(\tau),\omega$. Then the fact that derivatives of Igusa invariants have weight~$\Sym^2$ translates as \begin{displaymath} D_\tau J(A,\omega) = D_\tau J(\tau) \Sym^2(r^t). \end{displaymath} We denote by \begin{displaymath} {\mathcal{C}}\mapsto D_\tau J({\mathcal{C}}) \end{displaymath} the associated fractional covariant; \Cref{thm:vector-identification} expresses the entries of this matrix up to a constant in terms of the coefficients of~${\mathcal{C}}$. \item Consider the Siegel modular equations~$\Psi_{\ell,1}, \Psi_{\ell,2}, \Psi_{\ell,3}$ of level~$\ell$ as elements of the ring $\mathbb{Q}[J_1,J_2,J_3,J_1',J_2',J_3']$. We define \begin{displaymath} D\Psi_{\ell,L} = \left(\dfrac{\partial\Psi_{\ell,n}}{\partial J_k}\right)_{1\leq n, k\leq 3} \quad\text{and} \quad D\Psi_{\ell,R} = \left(\dfrac{\partial\Psi_{\ell,n}}{\partial J_k'}\right)_{1\leq n, k\leq 3}. \end{displaymath} \end{itemize} \end{defn} \begin{defn} \label{def:generic} Let~$\varphi$ be an $\ell$-isogeny as above, write~$j$ as a shorthand for the Igusa invariants $(j_1,j_2,j_3)$ of $A$, and~$j'$ for the invariants $(j_1',j_2',j_3')$ of $A'$. We say that the isogeny~$\varphi$ is \emph{generic} if the $3\times 3$ matrices $D\Psi_{\ell,L}(j,j')$, $D\Psi_{\ell,R}(j,j')$, $D_\tau J({\mathcal{C}})$ and $D_\tau J({\mathcal{C}}')$ are invertible. In this case, we define the \emph{deformation matrix}~$\mathscr{D}(\varphi)$ of~$\varphi$ as \begin{displaymath} \mathscr{D}(\varphi) = - D_\tau J({\mathcal{C}}')^{-1}\cdot D\Psi_{\ell,R}(j, j')^{-1} \cdot D\Psi_{\ell,L}(j, j') \cdot D_\tau J({\mathcal{C}}). \end{displaymath} \end{defn} In~\cref{sec:moduli}, we will interpret~$\mathscr{D}(\varphi)$ as the matrix of the deformation map in the bases of~$\tangent{A}{\stack_2}$ and~$\tangent{A'}{\stack_2}$ associated with~$\omega({\mathcal{C}}),\omega({\mathcal{C}}')$ via the Kodaira--Spencer isomorphism. Let us relate the deformation matrix~$\mathscr{D}(\varphi)$ with the tangent matrix~$d\varphi$. \begin{prop} \label{prop:norm-matrix} Assume that~$\varphi$ is generic. Then we have \begin{displaymath} \Sym^2(d\varphi) = \ell\, \mathscr{D}(\varphi). \end{displaymath} \end{prop} \begin{proof} By \Cref{prop:complex-isog}, we can find $\tau\in\mathbb{H}_2$ and isomorphisms $\eta, \eta'$ such that there is a commutative diagram \begin{displaymath} \begin{tikzcd} A \ar[r,"\varphi"] \ar[d, "\eta"]& A' \ar[d, "\eta'"] \\ A(\tau) \ar[r, "z\,\mapsto z"] & A(\tau/\ell). \end{tikzcd} \end{displaymath} Let~$r$ be the matrix of~$\eta^*$ in the bases $\omega(\tau),\omega({\mathcal{C}})$, and define~$r'$ similarly. Then we have $d\varphi = r'^t r^{-t}$. By the definition of modular equations, we have \begin{displaymath} \Psi_{\ell,n}\bigl(j_1(\tau), j_2(\tau), j_3(\tau), j_1(\tau/\ell), j_2(\tau/\ell), j_3(\tau/\ell)\bigr) = 0\quad \text{for } 1\leq n\leq 3. \end{displaymath} We differentiate with respect to $\tau_1,\tau_2,\tau_3$ and obtain \begin{displaymath} D\Psi_{\ell,L}(j, j') \cdot D_\tau J(\tau) + \dfrac{1}{\ell} D\Psi_{\ell,R}(j, j') \cdot D_\tau J(\tau/\ell) = 0. \end{displaymath} We rewrite this relation as \begin{displaymath} -\ell \, D\Psi_{\ell,L}(j, j') \cdot D_\tau J({\mathcal{C}}) \cdot \Sym^2(r^t) = D\Psi_{\ell,R}(j, j') \cdot D_\tau J({\mathcal{C}}') \cdot \Sym^2(r'^t), \end{displaymath} and the result follows. \end{proof} Once we compute~$\mathscr{D}(\varphi)$, the matrix~$d\varphi$ itself is easily computed up to sign. \subsection{Explicit Kodaira--Spencer in the Hilbert case} \label{subsec:explicit-hilbert} We now explain how to recover the tangent matrix in the Hilbert case, in the same spirit as the Siegel case. An important difference is that we have to restrict to Hilbert-normalized bases of differential forms (recall \cref{def:hilbert-normalized}), so not all curve equations will do. For the moment, assume that we have a $\beta$-isogeny $\varphi\colon (A,\iota)\to (A',\iota')$ between abelian surfaces with real multiplication by~$\mathbb{Z}_K$, and we are given curve equations ${\mathcal{C}}, {\mathcal{C}}'$ such that the associated bases~$\omega({\mathcal{C}})$ and~$\omega({\mathcal{C}}')$ are Hilbert-normalized. We address the question of constructing ${\mathcal{C}},{\mathcal{C}}'$ in §\ref{subsec:curves}. \begin{defn}~ \label{def:djdt-matrix} \begin{itemize} \item For $t\in\mathbb{H}_1^2$, we define \begin{displaymath} D_t J(t) = \left(\frac{1}{\pi i}\dfrac{\partial j_k}{\partial t_l}(t)\right)_{1\leq k\leq 3, 1\leq l\leq 2}. \end{displaymath} If~${\mathcal{C}}$ is a curve equation such that~$\omega({\mathcal{C}})$ is Hilbert-normalized, we denote by~$D_t J({\mathcal{C}})$ the value of this modular form on~${\mathcal{C}}$. \item We define the $3\times 3$ matrices~$D\Psi_{\beta,L}$ and $D\Psi_{\beta,R}$ in the case of Hilbert modular equations of level~$\beta$ as in \Cref{def:djdtau}. \item Write~$j$ as a shorthand for the Igusa invariants $(j_1,j_2,j_3)$ of~$A$, and~$j'$ for the invariants $(j_1',j_2',j_3')$ of~$A'$. We say that the isogeny~$\varphi$ is \emph{generic} if the denominators of modular equations do not vanish at~$j$ and the $3\times 2$ matrices \begin{displaymath} D\Psi_{\beta,L}(j,j')\cdot D_t J({\mathcal{C}}) \quad \text{and}\quad D\Psi_{\beta,R}(j, j')\cdot D_t J({\mathcal{C}}') \end{displaymath} have rank~$2$. \end{itemize} \end{defn} \begin{lem} \label{prop:djdt-transformation} Let $(A,\iota,\omega)$ be Hilbert-normalized, and let $t\in\mathbb{H}_1^2$ such that there is an isomorphism $\eta\colon (A,\iota)\to (A_K(t),\iota_K(t))$. Let~$r$ be the matrix of~$\eta^*$ in the bases~$\omega_K(t),\omega$. Then we have \begin{displaymath} D_t J(A,\omega) = D_t J(t) \cdot r^{2}. \end{displaymath} \end{lem} \begin{proof} By \Cref{prop:mf-hilbert-derivative}, derivatives of Igusa with respect to~$t_1$ and~$t_2$ are Hilbert modular functions of weight $(2,0)$ and $(0,2)$ respectively. \end{proof} \begin{prop} \label{prop:djdt-djdtau} Let $(A,\iota,\omega)$ be Hilbert-normalized. Then we have \begin{displaymath} D_t J(A,\omega) = D_\tau J(A,\omega)\cdot T \qquad \text{where }\ T = \left( \begin{matrix} 1&0 \\ 0&0 \\ 0&1 \end{matrix} \right). \end{displaymath} \end{prop} \begin{proof} Let $t,\eta,r$ as in \Cref{prop:djdt-transformation}, and write $\tau = H(t)$. By the expression of the Hilbert embedding, $D_tJ(t)$ contains the derivatives of Igusa invariants at~$\tau$ in the directions \begin{displaymath} \frac{1}{\pi i}R^t \mat{1}{0}{0}{0} R\quad\text{and}\quad \frac{1}{\pi i}R^t\mat{0}{0}{0}{1} R. \end{displaymath} Hence we have \begin{displaymath} D_t J(t) = D_\tau J(\tau) \cdot \Sym^2(R^t) \cdot T. \end{displaymath} By \Cref{prop:hilbert-embedding}, we have an isomorphism $\zeta\colon A_K(t)\to A(\tau)$ such that the matrix of~$\zeta^*$ in the bases $\omega(\tau),\omega_K(t)$ is~$R$. Therefore \begin{displaymath} D_t J(A,\omega) = D_t J(t) r^2,\quad D_\tau J(A,\omega) = D_\tau J(\tau) \Sym^2((rR)^t). \end{displaymath} The result follows. \end{proof} It is natural that the matrix~$R$ defining the Hilbert embedding does not appear in \Cref{prop:djdt-djdtau}: evaluating derivatives of Igusa invariants on~$(A,\omega)$ has an intrinsic meaning in terms of the Kodaira--Spencer isomorphism, and the choice of Hilbert embedding does not matter. \begin{prop} \label{prop:norm-matrix-hilbert} Let $\varphi\colon A\to A'$ be a $\beta$-isogeny and let ${\mathcal{C}}, {\mathcal{C}}'$ be Hilbert-normalized curve equations as above. Then the tangent matrix~$d\varphi$ is diagonal, and we have \begin{displaymath} D\Psi_{\beta,L}(j, j') \cdot D_t J({\mathcal{C}}) = - D\Psi_{\beta,R}(j,j')\cdot D_t J({\mathcal{C}}') \cdot \Diag(1/\beta, 1/\conj{\beta})\cdot (d\varphi)^{2}. \end{displaymath} \end{prop} \begin{proof} By \Cref{prop:complex-isog}, we can find $t\in\mathbb{H}_1^2$ and isomorphisms $\eta, \eta'$ such that there is a commutative diagram \begin{displaymath} \begin{tikzcd} \bigl(A,\iota\bigr) \ar[r,"\varphi"] \ar[d, "\eta"] & \bigl(A',\iota'\bigr) \ar[d, "\eta'"] \\ \bigl(A_K(t),\iota_K(t)\bigr) \ar[r, "z\mapsto z"] & \bigr(A_K(t/\beta),\iota_K(t/\beta)\bigr). \end{tikzcd} \end{displaymath} Let~$r$ be the matrix of~$\eta^*$ in the bases $\omega_K(t),\omega$, and define~$r'$ similarly; they are diagonal. We have $d\varphi = r'^t r^{-t} = r'r^{-1}$. Differentiating the modular equations, we obtain \begin{displaymath} D\Psi_{\beta,L}(j, j') \cdot D_t J(t) + D\Psi_{\beta,R}(j,j') \cdot D_t J(t/\beta) \cdot \Diag(1/\beta,1/\conj{\beta}) = 0. \end{displaymath} By \Cref{prop:djdt-transformation}, we have \begin{displaymath} D_t J(t) = D_t J({\mathcal{C}})\cdot r^2, \quad D_t J(t/\beta) = D_t J({\mathcal{C}}') \cdot r'^2 \end{displaymath} and the result follows. \end{proof} This relation allows us to compute~$(d\varphi)^2$ from derivatives of modular equations when~$\varphi$ is generic. In contrast with the Siegel case, the knowledge of~$(d\varphi)^2$ does not allow us to recover the diagonal matrix~$d\varphi$ up to sign, as we have to perform two uncorrelated root extractions: we obtain two possible candidates. \subsection{Constructing Hilbert-normalized curves} \label{subsec:curves} Let $(A,\iota)$ is an abelian surface over~$\C$ with real multiplication by~$\mathbb{Z}_K$. Given the Igusa invariants $(j_1,j_2,j_3)$ of~$A$, we would like to construct a curve equation~${\mathcal{C}}$ such that $(A,\iota,\omega({\mathcal{C}}))$ is Hilbert-normalized. Our method is to compute a first curve equation using Mestre's algorithm~\cite{mestre_ConstructionCourbesGenre1991}, and then look for a suitable homographic change of variables. However, we are missing some information, as the two pairs $(A,\iota)$ and $(A,\conj{\iota})$, where~$\conj{\iota}$ denotes the real conjugate of~$\iota$, have the same Igusa invariants. The best we can hope for is to compute an equation~${\mathcal{C}}$ such that either $(A,\iota,\omega({\mathcal{C}}))$ or $(A,\conj{\iota},\omega({\mathcal{C}}))$ is Hilbert-normalized. In this case, we say that~${\mathcal{C}}$ is \emph{potentially Hilbert-normalized.} This uncertainty is a consequence of our using symmetric invariants on the Hilbert surface. \begin{prop} \label{prop:tangent-humbert} Let~${\mathcal{C}}$ be a hyperelliptic curve equation of genus~$2$ over~$\C$ such that~$\Jac({\mathcal{C}})$ has real multiplication by~$\mathbb{Z}_K$. Denote its Igusa invariants by $(j_1,j_2,j_3)$. Then the curve~${\mathcal{C}}$ is potentially Hilbert-normalized if and only if the two columns of the $3\times 2$ matrix \begin{displaymath} D_\tau J({\mathcal{C}})\cdot T \qquad\text{where }\ T = \left( \begin{matrix} 1&0\\0&0\\0&1 \end{matrix} \right) \end{displaymath} define tangent vectors to the Humbert surface at $(j_1,j_2,j_3)$. \end{prop} \begin{proof} Let $t\in\mathbb{H}_1^2$ such that there is an isomorphism $\eta\colon \Jac({\mathcal{C}})\to A_K(t)$, and write $\tau = H(t)$. Let $r\in\GL_2(\C)$ be the matrix of~$\eta^*$ in the bases~$\omega_K(t),\omega$. Then the columns of~$D_\tau J({\mathcal{C}})\cdot T$ contain, up to~$\pi i$, the derivatives of Igusa invariants at~$\tau$ in the directions \begin{displaymath} R^t r \mat{1}{0}{0}{0} r^{t} R \quad\text{and}\quad R^t r \mat{0}{0}{0}{1} r^{t} R. \end{displaymath} These directions are tangent to the Humbert surface if and only if~$r$ is is either diagonal or anti-diagonal. \end{proof} Assume that the equation of the Humbert surface for~$K$ in terms of Igusa invariants is given: this precomputation depends only on~$K$. Given Igusa invariants $(j_1,j_2,j_3)$ on the Humbert surface, the algorithm to reconstruct a potentially Hilbert-normalized curve equation runs as follows. \begin{algo} \label{algo:hilb-curve-2} \begin{enumerate} \item Construct any curve equation~${\mathcal{C}}_0$ with Igusa invariants $(j_1,j_2,j_3)$ using Mestre's algorithm. \item \label{step:tangent-humbert} Find $r\in \GL_2(\C)$ such that the two columns of the matrix \begin{displaymath} D_\tau J({\mathcal{C}}_0)\cdot \Sym^2(r^t)\cdot T \end{displaymath} are tangent to the Humbert surface at $(j_1,j_2,j_3)$. \item Output $\det^{-2}\Sym^6(r){\mathcal{C}}_0$. \end{enumerate} \end{algo} In step~\ref*{step:tangent-humbert}, if $a,b,c,d$ denote the entries of~$r$, we only have to solve a quadratic equation in $a,c$, and a quadratic equation in $b, d$. Therefore \Cref{algo:hilb-curve-2} costs $O_K(1)$ square roots and field operations. In practice, when computing a $\beta$-isogeny $\varphi\colon A\to A'$ in the Hilbert case, we are only given the Igusa invariants of~$A$ and~$A'$. Constructing potentially Hilbert-normalized curves is then equivalent to making a choice of real multiplication embedding for each abelian surface. If these embeddings are incompatible via~$\varphi$, we obtain antidiagonal matrices when computing the tangent matrix; in this case, we apply the change of variables $x\mapsto 1/x$ on one of the curve equations to make them compatible. Even if they are compatible,~$\varphi$ will be either a $\beta$- or a $\conj{\beta}$-isogeny depending on the choices of real multiplication embeddings. Therefore we really obtain four candidates for the tangent matrix, among which only one is correct. \section{Moduli spaces and the deformation map} \label{sec:moduli} In this section, we use the language of algebraic stacks to show how to compute the deformation map of a given isogeny~$\varphi$, and to show its relation with the tangent map~$d\varphi$, for abelian schemes of any dimension over any base. We start by recalling well-known and general facts about separated Deligne--Mumford stacks and their coarse moduli spaces (§\ref{subsec:coarse}). Then we recall the properties of several moduli stacks for principally polarized abelian schemes of dimension~$g$, namely ${\stack_{g}}$ (abelian schemes with no extra structure), $\stack_{g,n}$ (abelian schemes with a level~$n$ structure), ${\stack_{g}(\ell)}$ (abelian schemes endowed with the kernel of an $\ell$-isogeny), and their coarse moduli schemes $\coarse_{g}$, ${\coarse}_{g,n}$, ${{\coarse}_{g}(\ell)}$ (§\ref{subsec:moduliav}). In particular, we have a map at the level of algebraic stacks, \begin{displaymath} \mathit{\Phi}_{\ell} = (\mathit{\Phi}_{\ell,1}, \mathit{\Phi}_{\ell,2}) \colon {\stack_{g}(\ell)} \to \AAg \times \AAg \end{displaymath} sending $(A,K)$ to $(A, A/K)$ such that both~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are étale. Therefore, for an $\ell$-isogeny~$\varphi$ seen as a point of~${\stack_{g}(\ell)}$, the deformation map \begin{displaymath} \mathscr{D}(\varphi) = d{\mathit{\Phi}_{\ell,2}}(\varphi) \circ d{\mathit{\Phi}_{\ell,1}}(\varphi)^{-1} \end{displaymath} is well-defined at the level of stacks. However, the induced maps at the level of coarse spaces, \begin{displaymath} (\mathbf{\Phi}_{\ell,1},\mathbf{\Phi}_{\ell,2}) \,:\, {{\coarse}_{g}(\ell)} \to \Ag \times \Ag \end{displaymath} are not étale everywhere, so that we can only recover the deformation map on an open set of the coarse spaces (see \Cref{cor:criteria}). In the genus~$2$ case, when we work with the modular polynomials $\Psi_{\ell,i}$ from \Cref{subsec:modpol}, this phenomenon worsens; still, we can give precise conditions on the isogeny that ensure genericity in the sense of \Cref{def:generic} (see \Cref{prop:defomatrix}). We also extend these results to the Hilbert case. After that, we give the general relation between the tangent map and the deformation map of a given $\ell$- or $\beta$-isogeny (§\ref{subsec:defo}). Finally we show that in dimension~$2$, the relations between modular forms and covariants given in \Cref{prop:f86} hold over~$\mathbb{Z}$ and not only over~$\C$ (§\ref{subsec:mf-ZZ}). This allows us to give an explicit version of the Kodaira--Spencer isomorphism over any base (§\ref{subsec:kodaira}), that we could use for instance to construct explicit families of abelian varieties with real multiplication. In summary, this section explains the relationship between the fine moduli space ${\stack_{g}(\ell)}$ and its coarse moduli space ${{\coarse}_{g}(\ell)}$, and the geometric meaning of the genericity conditions of \cref{thm:main}; moreover it gives a purely algebraic, rather than analytic, interpretation of the results of \cref{sec:cov}. Another way to extend the results of \cref{sec:cov} over any base would be to lift the isogeny to characteristic zero (in the case of fields), then interpolate between fibers using rigidity; however, we find that the moduli-theoretic approach is superior as it provides more geometric insight. \begin{details} We give more details on the standard lifting arguments to extend the results of \Cref{sec:cov} to other fields than~$\C$. Let $\varphi$ be an $\ell$-isogeny defined over a field~$k$ of characteristic prime to~$\ell$ or zero. Since ${\stack_{g}(\ell)}$ is of finite type, we may assume that~$k$ has finite transcendance degree over its prime field. Then, we may embed~$k$ in~$\C$ if $\chr k = 0$; otherwise, we lift~$\varphi$ to the Witt ring~$W(k)$ by smoothness of~${\stack_{g}(\ell)}$ over $\mathbb{Z}[1/\ell]$, and embed~$W(k)$ in~$\C$. This technique alone, however is not possible if we want to apply it to an abelian scheme. A workaround would be to use rigidity and interpolate between fibers, at least if the base scheme is reduced, or combine lifting and rigidity for a general connected scheme. But at this point it is easier to work with stacks. \end{details} \subsection{Coarse moduli spaces} \label{subsec:coarse} In this paper, we always assume stacks to be of finite type over a Noetherian base scheme. Let~$\mathscr{X}$ be a separated Deligne--Mumford stack over~$S$; we recall that an Artin stack is Deligne--Mumford if and only if its diagonal is unramified \stackcite{06N3}. Here we summarize well-known results on the geometry of~$\mathscr{X}$ and its coarse moduli space. By a \emph{point}~$x$ of~$\mathscr{X}$, we mean a point of the underlying topological space~$\lvert \mathscr{X} \rvert$, and we implicitly take a representative $\Spec k \to \mathscr{X}$ of~$x$. For any scheme~$T$, a \emph{$T$-point} of~$\mathscr{X}$ is a morphism $T \to \mathscr{X}$. We denote by~$I_{\mathscr{X}}$ the inertia stack of~$\mathscr{X}$, and if~$x$ is a point of~$\mathscr{X}$, we denote by~$I_x$ the pullback of~$I_{\mathscr{X}}$ to~$x$; this pullback is simply the space~$\Aut(x)$ of automorphisms, or stabilizers, of~$x$. Since we assume~$\mathscr{X}$ separated, $I_x$~is in fact finite. The stabilizer~$I_x$ does not depend on the representative chosen since~$I_x$ is the pullback of the residual gerbe $G_x \to k(\xi)$ at~$x$ through $\Spec k \to \Spec k(\xi)$: see \cite[Ch.~11]{laumon_ChampsAlgebriques2000}, \stackcite{06ML}. We identify open substacks of~$\mathscr{X}$ with the underlying open topological spaces of~$\lvert \mathscr{X} \rvert$ \stackcite{06FJ}. We recall that a map $f\colon \mathscr{X} \to \mathscr{Y}$ is representable if and only if the induced map $I_{\mathscr{X}} \to \mathscr{X} \times_{\mathscr{Y}} I_{\mathscr{Y}}$ is a monomorphism \stackcite{04YY}. Also, if~$f$ is unramified, then its diagonal is étale by \stackcite{0CIS} and \cite{rydh_CanonicalEmbeddingUnramified2011}; hence the map $I_{\mathscr{X}} \to \mathscr{X} \times_{\mathscr{Y}} I_{\mathscr{Y}}$ is étale. Therefore, if~$f$ is representable and unramified, then the map $I_{\mathscr{X}} \to \mathscr{X} \times_{\mathscr{Y}} I_{\mathscr{Y}}$ is an open immersion. A \emph{coarse moduli space}~$X$ of~$\mathscr{X}$ is an algebraic space~$X$ endowed with a map $\pi: \mathscr{X} \to X$ such that~$\pi$ is categorical and induces a bijection $\pi: \mathscr{X}(k) \to X(k)$ for every algebraically closed field~$k$. We also use the following terminology from \cite{mumford_GeometricInvariantTheory1994} (see also \cite[Def.~1.8]{keel_QuotientsGroupoids1997} and \cite[Defs.~2.2 and~6.1]{rydh_ExistencePropertiesGeometric2013}): a map $q:\mathscr{X} \to Z$ is \emph{topological} if~$q$ is a universal homeomorphism, and \emph{geometric} if it is topological and furthermore $\mathcal{O}_Z \to q_{\ast} \mathcal{O}_{\mathscr{X}}$ is an isomorphism. A \emph{GC quotient} is a geometric quotient that is also (uniformly) categorical; in particular, its image is a coarse moduli space (\cite[Def.~1.8]{keel_QuotientsGroupoids1997} and \cite[Def.~3.17 and Rem.~3.18]{rydh_ExistencePropertiesGeometric2013}). \begin{thm} \label{th:coarsemoduli} Let $\mathscr{X}\to S$ be a separated Deligne--Mumford stack. \begin{thmlist} \item \label{th:keelmori} (Keel--Mori). There exists a coarse moduli space $\pi: \mathscr{X} \to X$, where~$X$ is of finite type over~$S$. The map~$\pi$ is a GC quotient, is proper, quasi-finite and separated; moreover the construction is stable under flat base change. \item \label{th:localstruct} Let $x \in X(k)$ be a point, and let~$I_x$ be the stabilizer of any point in~$\mathscr{X}$ above~$x$. Then étale-locally around~$x$, $\mathscr{X}$ is a quotient stack by~$I_x$ and~$X$ is a geometric quotient by~$I_x$. More precisely, there is an affine scheme~$U$, an étale morphism $U \to X$ whose image contains~$x$, and a finite morphism $V \to U$ with an action of~$I_x$ on~$V$ such that $\mathscr{X}_U \coloneqq \mathscr{X} \times_X U =[V/I_x]$ is an~$I_x$-quotient stack, and $U=V/I_x$. \end{thmlist} \end{thm} \begin{proof} \Cref{th:keelmori} is valid for Artin stacks with finite inertia; the original proof is in \cite{keel_QuotientsGroupoids1997}, and reformulations of the proof using the language of stacks rather than groupoids are given in \cite{conrad_KeelMoriTheorem2005}, \cite{rydh_ExistencePropertiesGeometric2013} and \stackcite{0DUK}. \begin{inlinedetails} A proof relying on the language of stacks rather than groupoids is given in \cite{conrad_KeelMoriTheorem2005} where the Noetherian hypothesis on~$S$ is relaxed, and~$\mathscr{X}$ is assumed to be locally of finite presentation. This last condition is relaxed in \cite{rydh_ExistencePropertiesGeometric2013}. \end{inlinedetails} Since~$\mathscr{X}$ is a separated Deligne--Mumford stack, its inertia~$I_{\mathscr{X}}$ is finite, so the Keel--Mori theorem applies. For \cref{th:localstruct}, see \cite[Lem.~2.2.3]{abramovich_CompactifyingSpaceStable2002} which shows that~$\mathscr{X}$ is locally a quotient, and \cite[Thm.~2.12]{olsson_UnderlineRmHomStacks2006} which shows that we can take the quotient to be a quotient by~$I_x$. If $V=\Spec R$, then~$V/I_x$ is the affine scheme~$\Spec R^{I_x}$. The fact that $U=(\Spec R)/I_x$ then follows easily from the theory of quotients of affine schemes: see for instance \cite[\S 4]{rydh_ExistencePropertiesGeometric2013} or \cite[\S I.8.2.2]{deligne_SchemasModulesCourbes1973}. See also \stackcite{0DU0} for extensions of this result in the case of quasi-DM stacks, and \cite{alper_EtaleLocalStructure2019,alper_LunaEtaleSlice2020} for a far reaching generalization. \end{proof} By Zarsiki's main theorem, the coarse moduli space~$X$ is characterized by the fact that $\pi: \mathscr{X} \to X$ is proper and quasi-finite, and $\mathcal{O}_X \iso \pi_{\star}\mathcal{O}_{\mathscr{X}}$ on the étale site \cite[\S 1]{conrad_KeelMoriTheorem2005}. The formation of coarse moduli spaces is not stable under base change in general. This causes problems when reducing coarse moduli spaces, defined for instance over~$\mathbb{Z}$, modulo a prime~$p$, as the morphism $\Spec\mathbb{F}_p\to\Spec\mathbb{Z}$ is not flat. Coarse moduli spaces have better properties in the case of \emph{tame} stacks. The stack $\mathscr{X}$ is said to be tame \cite{abramovich_TameStacksPositive2008} if the map $\pi: \mathscr{X} \to X$ is cohomologically affine; in particular it is a good moduli space in the sense of \cite{alper_GoodModuliSpaces2013}. A finite fppf group scheme~$G/S$ is \emph{linearly reductive} if $BG \to S$ is tame (\cite{mumford_GeometricInvariantTheory1994}, \cite[Def.~2.4]{abramovich_TameStacksPositive2008}, \cite[Def.~12.1]{alper_GoodModuliSpaces2013}). In \cite{abramovich_TameStacksPositive2008}, it is shown that~$G/S$ is linearly reductive if and only if its geometric fibers are geometrically reductive, if and only if its geometric fibers are locally (in the fppf topology) a split extension of a constant tame group by a group of multiplicative type. If $x\in\mathscr{X}(k)$ is a geometric point of~$\mathscr{X}$, we say that~$x$ is a \emph{tame point} of~$\mathscr{X}$ if $x$ has a linearly reductive stabilizer. \begin{thm} \label{th:tame} Let $\mathscr{X}\to S$ be a separated Deligne--Mumford stack, and let $\pi\colon\mathscr{X}\to X$ be its coarse moduli space. \begin{thmlist} \item \label{th:globalstruct_tame} If every geometric point of~$\mathscr{X}$ is tame, then~$\mathscr{X}$ is tame. If~$\mathscr{X}$ is tame, then the formation of its coarse space commutes with arbitrary base change. \item \label{th:localstruct_tame} More generally, if $x \in \mathscr{X}(k)$ is tame, then there is an open tame substack~$\mathscr{U}$ of~$\mathscr{X}$ containing~$x$. Furthermore, the image of~$\mathscr{U}$ in~$X$ is Cohen--Macaulay. \item \label{th:adequate} The map $\pi\colon \mathscr{X} \to X$ is always an adequate moduli space in the sense of \cite{alper_AdequateModuliSpaces2014}. In particular, if $T \to S$ is a morphism of algebraic spaces, $\mathscr{X}_T$ denotes the base change of~$\mathscr{X}$ to~$T$ and~$\mathsf{X}_T$ denotes the coarse moduli space of~$\mathscr{X}_T$, then the natural map $\mathsf{X}_T \to X \times_S T$ is an universal homeomorphism. \end{thmlist} \end{thm} \begin{proof} \Cref{th:globalstruct_tame,th:localstruct_tame} are proved in the case of Artin stacks with finite inertia in \cite{abramovich_TameStacksPositive2008}. The openness of tame points is the main result of this paper \cite[Thm.~3.2, Prop.~3.6]{abramovich_TameStacksPositive2008}. Since we restrict to separated Deligne--Mumford stacks, it also follows from \cref{th:localstruct}. Formation of the coarse moduli space commutes with pullbacks in the tame case by \cite[Cor.~3.3]{abramovich_TameStacksPositive2008}. If~$x$ is a tame point of~$\mathscr{X}$, then by the local structure theorem, étale-locally around~$x$, there is an open substack of the form $\mathscr{U}=[V/I_x]$, and~$I_x$ is linearly reductive. By the Hochster--Roberts theorem \cite[Appendix~1.E]{mumford_GeometricInvariantTheory1994}, the affine scheme~$V/I_x$ is Cohen--Macaulay. Being Cohen--Macaulay is a local notion for the étale topology, so the image of~$\mathscr{U}$ in~$X$ is also Cohen--Macaulay. Finally, \cref{th:adequate} is proved in \cite{alper_AdequateModuliSpaces2014}, which shows that the coarse moduli space of an Artin stack with finite inertia is always an adequate moduli space. The natural map $\mathsf{X}_T \to X\times_S T$ is then an adequate homeomorphism in the sense of \cite{alper_AdequateModuliSpaces2014}, and in particular is a universal homeomorphism \cite[Main Theorem]{alper_AdequateModuliSpaces2014}. \end{proof} \begin{cor} Let~$\mathscr{X}$ be a separated Deligne--Mumford stack. \label{cor:Ix} \begin{thmlist} \item\label{cor:genericiso} The set~$\mathscr{U}$ of points~$x$ such that~$I_x$ is trivial is an open substack of~$\mathscr{X}$ (which may be empty), and $\pi: \mathscr{U} \to \pi(\mathscr{U})$ is an isomorphism. \item \label{cor:normal} \label{cor:hensellocal} Let $x \in \mathscr{X}(k)$ be a point, and let~$\widehat{O}_{\mathscr{X}, x}$ be the strict Hensel ring of~$\mathscr{X}$ at~$x$. Then \begin{equation} \label{eq:stricthensel} \widehat{O}_{X, x}=\widehat{O}_{\mathscr{X}, x}^{I_x}. \end{equation} In particular, if~$\mathscr{X}$ is a normal, then its coarse moduli space is normal. \end{thmlist} \end{cor} \begin{proof} These two statements are immediate consequences of \cref{th:localstruct}. For \cref{cor:hensellocal}, see also \cite[\S I.8.2.1]{deligne_SchemasModulesCourbes1973} which states that the kernel of the action of~$I_x$ acting on~$\smash{\widehat{O}_{\mathscr{X}, x}}$ is exactly the set of automorphisms of~$x$ that can be extended to $\smash{\Spec \widehat{O}_{\mathscr{X}, x}} \to \mathscr{X}$. \end{proof} Finally, we know when an étale map between algebraic stacks induces an étale map on their coarse moduli spaces. \begin{thm}[Luna's fundamental lemma] \label{th:strongetale} Let $f\colon \mathscr{X} \to \mathscr{Y}$ be a representable and unramified morphism of separated Deligne--Mumford stacks. Then the set of points where~$f$ is \emph{stabilizer preserving}, meaning that the monomorphism on inertia $I_x \to I_{f(x)}$ induced by~$f$ is an isomorphism, is an open substack~$\mathscr{U}$ of~$\mathscr{X}$. The morphism $I_{\mathscr{U}} \to I_{\mathscr{Y}} \times_{\mathscr{Y}} \mathscr{U}$ induced by~$f$ is an isomorphism. If~$f$ is étale and~$\mathscr{U}=\mathscr{X}$, that is if~$f$ is stabilizer preserving at every point, then the induced map on coarse spaces $f_0: X \to Y$ is étale, and even strongly étale; in other words $\mathscr{X} = X \times_Y \mathscr{Y}$. \end{thm} \begin{proof} The fact that~$\mathscr{U}$ is open is \stackcite{0DUA}, \cite[Prop.~3.5]{rydh_ExistencePropertiesGeometric2013}. Since~$\mathscr{X}$ and~$\mathscr{Y}$ are separated Deligne--Mumford stacks, the induced map is étale by \cref{cor:hensellocal}. The general case of Artin stacks with finite inertia is treated in \cite[Prop.~6.5 and Thm.~6.10]{rydh_ExistencePropertiesGeometric2013}. In this reference, \emph{stabilizer preserving} is called \emph{fixed point reflecting}, but we prefer to use the terminology of the Stacks project \stackcite{0DU6}. The fact that~$f_0$ is strongly étale comes from the cartesian diagram in \cite[Thm.~6.10]{rydh_ExistencePropertiesGeometric2013}. See also \cite[Thm.~3.14]{alper_EtaleLocalStructure2019} where this is proved in a more general setting. \end{proof} \begin{rem} If $f: \mathscr{X} \to \mathscr{Y}$ is proper (resp.~finite), then the induced map $f_0: X \to Y$ is proper (resp.~finite), because the maps from $\mathscr{X}$ and $\mathscr{Y}$ to their coarse moduli spaces are proper quasi-finite \stackcite{02LS}, \cite[EGA IV.8.11.1]{grothendieck_ElementsGeometrieAlgebrique1964}). \end{rem} \begin{rem} If $x$ is a tame smooth $k$-point of $\mathscr{X}$, then by Luna's étale slice theorem (\cite{luna_SlicesEtales1973}, \cite[Thm~1.1 and Thm~2.1]{alper_LunaEtaleSlice2020}, \cite[Thm~19.4]{alper_EtaleLocalStructure2019}), the étale local structure of \cref{th:localstruct} takes a particularly nice form. Indeed, taking an étale local presentation $\mathscr{X}_U=[V/I_x] $ as in \cref{th:localstruct}, then (possibly after an étale extension of $k$ and after shrinking $V$) there is a strongly étale morphism $[V/I_x] \to [T_{x} \mathscr{X} / I_x]$ which sends $x$ to $0$, where $I_x$ acts via its natural linear action on $T_x \mathscr{X}$. In particular, étale locally around $x$ the map $\pi: \mathscr{X} \to X$ is given by $[T_x \mathscr{X} / I_x] \to T_x \mathscr{X} / I_x$. \end{rem} \begin{details} \label{rem:adequate_moduli} The definition and characterization of a tame stack given in \cref{th:tame} is also valid for an Artin stack with finite inertia \cite{abramovich_TameStacksPositive2008}, meaning that $\mathscr{X}$ is tame if its coarse moduli space $\mathscr{X} \to X$ is a good moduli space (hence always a tame moduli space in the sense of \cite{alper_GoodModuliSpaces2013} since In fact this is true more generally for good moduli spaces \cite{alper_GoodModuliSpaces2013}. The local structure and characterization of \cref{th:localstruct_tame} is also still valid for good moduli spaces, but much more difficult to prove: see \cite[Theorem 1.2]{alper_LunaEtaleSlice2020} and \cite[Theorem 1.1 and Proposition 13.4]{alper_EtaleLocalStructure2019}. In \cite{mumford_GeometricInvariantTheory1994} and \cite{seshadri_GeometricReductivityArbitrary1977}, Mumford and Seshadri study quotients of schemes by (linearly) reductive groups. This has been generalised in the context of stacks by Alper, which introduces the notion of good moduli spaces in \cite{alper_GoodModuliSpaces2013} (this includes GIT quotients by linearly reductive groups), and the notion of adequate moduli space in \cite{alper_AdequateModuliSpaces2014} (this includes GIT quotients by geometrically reductive groups). In particular if $\mathscr{X}$ is an Artin stack with finite inertia, its coarse moduli is adequate \cite[Proposition~8.2.1]{alper_AdequateModuliSpaces2014}. Most of the results of this section can be extended to good and adequate moduli spaces. For instance adequate moduli spaces are stable by flat base change \cite{alper_AdequateModuliSpaces2014}, while good moduli spaces are stable by arbitrary base change \cite{alper_GoodModuliSpaces2013}. Alper defines in \cite[\S 7]{alper_GoodModuliSpaces2013} a tame moduli spaces $\pi: \mathscr{X} \to X$ as a good moduli which induces a bijection on geometric points. This extends the notion of tame spaces from \cite{abramovich_TameStacksPositive2008}. The local structure and characterization of \cref{th:localstruct_tame} is still valid for good moduli spaces, but much more difficult to prove: see \cite[Theorem 1.2]{alper_LunaEtaleSlice2020} and \cite[Theorem 1.1 and Proposition 13.4]{alper_EtaleLocalStructure2019}. Finally Luna's étale slice theorem \cite{luna_SlicesEtales1973}, which use Luna's fundamental lemma as a building block, can be used to study the local structure of the quotient of a scheme by a linearly reductive group scheme. See also the generalization to stacks and the relative setting in \cite[Theorem~1.1]{alper_LunaEtaleSlice2020} and \cite[Theorem~19.4]{alper_EtaleLocalStructure2019}, and the generalization of Luna's fundamental lemma in \cite[Theorem~3.14]{alper_EtaleLocalStructure2019}. The coarse moduli of principally polarized abelian varieties is constructed by Mumford as a quotient of a locally closed subscheme of the Hilbert scheme by the reductive group $\PGL_n$ (and its coarse moduli space as the corresponding GIT quotient). Over $\mathbb{Z}[1/2]$, the coarse moduli of hyperelliptic curves can be constructed as the quotient of the open subvariety of $\mathbb{P}^{2g+2}$ given by the discriminant by $\PGL_2$ (since the map from stack of hyprelliptic curves to its coarse space factorize through $[\mathbb{P}^{2g+2}/\PGL_2]$). One can then use Luna's étale slice theorem to study the local structure of these spaces. \end{details} \subsection{Moduli stacks of abelian varieties} \label{subsec:moduliav} In this section, we apply the general results gathered in §\ref{subsec:coarse} to the case of moduli spaces of abelian schemes. This allows us to investigate the properties of the map~$\mathit{\Phi}_\ell$ on coarse moduli spaces in the Siegel case, and its analogue~$\mathit{\Phi}_\beta$ in the Hilbert case. \subsubsection{Siegel stacks} \label{subsec:moduliav-siegel} Recall that we denote by~$\AAg$ the moduli stack of principally polarized abelian varieties, and by~$\stack_{g,n}$ the moduli stack of principally polarized abelian varieties with a level~$n$ symplectic structure; here we mean a level $\smash{(\mathbb{Z}/n\mathbb{Z})^{2g}}$ structure as in \cite{faltings_DegenerationAbelianVarieties1990} rather than a $\smash{(\mathbb{Z}/n\mathbb{Z})^g \times \mu_n^g}$ structure as in \cite{mumford_StructureModuliSpaces1971,dejong_ModuliSpacesPolarized1993}, so that~$\stack_{g,n}$ is defined over~$\mathbb{Z}[1/n]$ rather than over~$\mathbb{Z}$. Both~${\stack_{g}}$ and~$\stack_{g,n}$ are separated Deligne--Mumford stacks, and moreover~$\stack_{g,n}$ is smooth over~$\mathbb{Z}[1/n]$ with~$\phi(n)$ geometrically irreducible fibers \cite{faltings_DegenerationAbelianVarieties1990} We denote by $\Ag$, ${\coarse}_{g,n}$ their corresponding coarse moduli spaces. By Mumford's Geometric Invariant Theory \cite{mumford_GeometricInvariantTheory1994}, they are quasi-projective schemes. \begin{inlinedetails} Note that the Keel-Mori theorem only show that ${\coarse}_{g,n}$ is an algebraic space. Instead, Mumford constructs in \cite[\S VII.2]{mumford_GeometricInvariantTheory1994} ${\coarse}_{g,n}$ as a GIT quotient by $\PGL$ of a subscheme of an Hilbert scheme. \end{inlinedetails} We can extend~${\coarse}_{g,n}$ over~$\mathbb{Z}$ by taking the normalization of~$\Ag$ in~${\coarse}_{g,n}/\mathbb{Z}[1/n]$, as in \cite{mumford_StructureModuliSpaces1971,deligne_SchemasModulesCourbes1973,dejong_ModuliSpacesPolarized1993}. Over~$\C$, the analytification of~$\AAg$ is the Siegel space~$\mathbb{H}_g/\Sp_{2g}(\mathbb{Z})$ seen as an orbifold. If $n \geq 3$, then the inertia of the stack~$\stack_{g,n}$ is trivial. Therefore~$\stack_{g,n}$ is isomorphic to~${\coarse}_{g,n}$ by \cref{cor:genericiso}, and~${\coarse}_{g,n}$ is smooth over~$\mathbb{Z}[1/n]$. This shows in particular that there is a $p_0$ such that $\AAg$ is tame at every abelian variety defined over a field of characteristic $p \geq p_0$. \begin{inlinedetails} Indeed, $\AAg=[\stack_{g,n}/\Sp_g(\mathbb{Z}/n\mathbb{Z})]$ is a $\Sp_g(\mathbb{Z}/n\mathbb{Z})$ quotient stack, and for $p$ large enough, it is prime to $\# \Sp_g(\mathbb{Z}/n\mathbb{Z})$. \end{inlinedetails} If $n \leq 2$, then the generic automorphism group on~$\stack_{g,n}$ is~$\mu_2$. We can rigidify~$\stack_{g,n}$ by~$\mu_2$ in such a way that $\stack_{g,n} \to [\stack_{g,n}/\mu_2]$ is a~$\mu_2$-gerbe \cite[Appendix~A]{abramovich_TameStacksPositive2008}. The map~$\stack_{g,n} \to {\coarse}_{g,n}$ factors through~$[\stack_{g,n}/\mu_2]$, so the coarse moduli space of~$[\stack_{g,n}/\mu_2]$ is still~${\coarse}_{g,n}$. By \cref{th:localstruct} or \cref{th:localstruct_tame}, there exists an affine étale open scheme~$U$ above~${\coarse}_{g,n}$ whose image is dense and contains all points with only generic automorphisms. Then~$[\stack_{g,n}/\mu_2] \to {\coarse}_{g,n}$ becomes an isomorphism over~$U$ by \cref{cor:genericiso}. Since~$[\stack_{g,n}/\mu_2]$ is smooth, the image of~$U$ in~${\coarse}_{g,n}$ is also smooth by étale descent. We now proceed to construct the moduli stack~${\stack_{g}(\ell)}$ parametrizing $\ell$-isogenies. If~$\Gamma$ is a level subgroup of~$\smash{\Sp_{2g}(\widehat{\Z})}$, and~$n$ is an integer such that the level subgroup $\Gamma(n)$ is contained in~$\Gamma$, we define~$\stack_{g,\Gamma} / \mathbb{Z}[1/n]$ as the quotient stack~$[\stack_{g,n}/\widetilde{\Gamma}]$ where~$\widetilde{\Gamma}$ is the image of~$\Gamma$ in~$\Sp_{2g}(\mathbb{Z}/n\mathbb{Z})$. A $T$-point of~$[\stack_{g,n}/\widetilde{\Gamma}]$ corresponds to an abelian scheme $A/T$ which is étale-locally endowed with a level~$n$ structure modulo the action of~$\widetilde{\Gamma}$ \cite[\S IV.3.1]{deligne_SchemasModulesCourbes1973}. The maps $\stack_{g,n} \to \stack_{g,\Gamma}$ and $\stack_{g,\Gamma} \to \AAg$ are finite, étale, and representable \cite[\S IV.2, \S IV.3]{deligne_SchemasModulesCourbes1973}. We can extend~$\stack_{g,\Gamma}$ to~$\mathbb{Z}$ by normalization, as we did for~${\coarse}_{g,n}$. We can check as in \cite[\S IV.3.6]{deligne_SchemasModulesCourbes1973} that the definition does not depend on the integer~$n$ such that $\Gamma(n) \subset \Gamma$. \begin{proofdetails} Indeed, choose another integer~$m$ such that $\Gamma(m) \subset \Gamma$, and define $\stack_{g,\Gamma}'/\mathbb{Z}[1/m] \coloneqq [\AAgm/\tilde{\Gamma}]$. Then $\stack_{g,\Gamma} / \mathbb{Z}[1/n]$ and $\stack_{g,\Gamma}' / \mathbb{Z}[1/m]$ are isomorphic over~$\mathbb{Z}/[1/nm]$, and since~$\stack_{g,\Gamma}'/\mathbb{Z}[1/m]$ is smooth, it coincides with the normalization~$\stack_{g,\Gamma} /\mathbb{Z}$ over~$\mathbb{Z}[1/m]$. Assume that $\Gamma$ is of level~$\ell$. Then fixing an integer $n \geq 3$ as above, we get that $\AAgnl$ is an étale presentation of both $\stack_{g,\Gamma}$ and $\AAg$ over $\mathbb{Z}[1/n \ell]$. Hence the natural map $\stack_{g,\Gamma} \to \AAg$ is étale over $\mathbb{Z}[1/n \ell]$, and it is obviously representable since $I_{\stack_{g,\Gamma} / \AAg}=0$. Letting $m \geq 3$ be an integer coprime to $n$ and reasoning over $\mathbb{Z}[1/m \ell]$, this show that $\stack_{g,\Gamma} \to \AAg$ is representable and étale over $\mathbb{Z}[1/\ell]$. \end{proofdetails} We apply this construction to $\Gamma = \Gamma_0(\ell)$, the standard level subgroup encoding $\ell$-isogenies, and we denote by ${\stack_{g}(\ell)} \coloneqq \stack_{g,\Gamma_0(\ell)}$ the resulting stack. The stack~${\stack_{g}(\ell)}$ is smooth over~$\mathbb{Z}[1/\ell]$. We denote by \begin{displaymath} \mathit{\Phi}_{\ell} = (\mathit{\Phi}_{\ell,1},\mathit{\Phi}_{\ell,2}): {\stack_{g}(\ell)} \to \AAg \times \AAg \end{displaymath} the map $(A,K) \mapsto (A, A/K)$. \begin{prop} \begin{enumerate} \item The maps~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are finite, étale and representable. \item Let $x \in {\stack_{g}(\ell)}(k)$ be a point represented by~$(A,K)$, and let $K'\subset A/K$ be the kernel of the contragredient isogeny. Then~$\mathit{\Phi}_{\ell,1}$ is stabilizer preserving at~$x$ if and only if all automorphisms of~$A$ stabilize~$K$, and~$\mathit{\Phi}_{\ell,2}$ is stabilizer preserving at~$x$ if and only if all automorphisms of~$A/K$ stabilize~$K'$. \end{enumerate} \end{prop} \begin{proof} The automorphisms of~$x$ in ${\stack_{g}(\ell)}$ are exactly the automorphisms of~$A$ stabilizing~$K$. In particular~$\mathit{\Phi}_{\ell,1}$ induces a monomorphism of the automorphism groups, so is representable; it is stabilizer preserving if and only if all automorphisms of~$A$ stabilize~$K$. If~$\alpha$ is an automorphism of $(A,K)$, then~$\alpha$ descends to $A' = A/K$, so~$\mathit{\Phi}_{\ell,2}$ is representable as well. An automorphism of~$A'$ comes from an automorphism of~$A$ if and only if it stabilizes~$K'$, hence the condition for~$\mathit{\Phi}_{\ell,2}$ to be stabilizer preserving. Finally, the map~$\mathit{\Phi}_{\ell,1}$ is finite étale because it is of the form $\stack_{g,\Gamma} \to \AAg$ for $\Gamma=\Gamma_0(\ell)$. Denote by $\pi_1: \XXg}%{{\mathscr{X}_{g,1}} \to \AAg$ the universal abelian scheme, and by $\pi_{\ell}: {\mathscr{X}_{g}(\ell)} \to {\stack_{g}(\ell)}$ the universal abelian scheme with a $\Gamma_0(\ell)$-level structure. Then the universal isogeny $f: {\mathscr{X}_{g}(\ell)} \to \XXg}%{{\mathscr{X}_{g,1}} \times_{\AAg} {\stack_{g}(\ell)}$ is separable over~$\mathbb{Z}[1/\ell]$. If we let $s_1\colon \AAg\to \XXg}%{{\mathscr{X}_{g,1}}$ and $s_{\ell}\colon{\stack_{g}(\ell)}\to {\mathscr{X}_{g}(\ell)}$ be the zero sections, then we have \begin{displaymath} \mathit{\Phi}_{\ell,2}=\mathit{\Phi}_{\ell,1} \circ \pi_1 \times_{\AAg} {\stack_{g}(\ell)} \circ f \circ s_{\ell}. \end{displaymath} Therefore $\mathit{\Phi}_{\ell,2}: {\stack_{g}(\ell)} \to \AAg$ is finite étale as well. \end{proof} The map~$\mathit{\Phi}_{\ell}$ induces a map $\mathbf{\Phi}_{\ell}: {{\coarse}_{g}(\ell)} \to \Ag^2$ on the coarse moduli spaces. This map is not injective, but the same reasoning as in \cite[\S VI.6]{deligne_SchemasModulesCourbes1973} shows that it is generically radicial, and even a birational isomorphism. The open subscheme~$U$ of~${{\coarse}_{g}(\ell)}$ where~$\mathbf{\Phi}_{\ell}$ is an embedding is dense in every fiber of characteristic $p \nmid \ell$. \begin{prop} \label{prop:moduli_normal} Let~$\PHII$ denote the schematic image of~$\mathbf{\Phi}_\ell$. Then~${{\coarse}_{g}(\ell)}$ is the normalization of~$\PHII$. If~$x_0$ lies in the image, then~$\mathbf{\Phi}_\ell: {{\coarse}_{g}(\ell)} \to \PHII$ induces a local isomorphism around~$x_0$ if and only if~$x_0$ is normal in~$\Psi_0$. \end{prop} \begin{proof} The map ${{\coarse}_{g}(\ell)} \to \PHII$ is separated quasi-finite, and birational by the discussion above. Since~${{\coarse}_{g}(\ell)}$ is normal by \cref{cor:normal}, we deduce that~${{\coarse}_{g}(\ell)}$ is the normalization of~$\PHII$ by Zariski's main theorem \cite[Cor.~IV.8.12.11]{grothendieck_ElementsGeometrieAlgebrique1964}. If~$\mathbf{\Phi}_\ell$ induces a local isomorphism at~$x_0$, then~$x_0$ is normal since~${{\coarse}_{g}(\ell)}$ is normal. In fact it suffices to ask that $\mathbf{\Phi}_\ell: {{\coarse}_{g}(\ell)} \to \PHII$ is étale at~$x$, because normality is a local notion in the smooth topology \stackcite{034F}. The converse also follows from Zariski's main theorem \cite[Cor.~IV.8.12.10 and Cor.~IV.8.12.12]{grothendieck_ElementsGeometrieAlgebrique1964}: there exists an open neighborhood $U$ of $x_0$ in $\PHII$ such that the map $\mathbf{\Phi}_\ell^{-1}(U) \to U$ is an isomorphism. \end{proof} If~$x$ is a point of~${\stack_{g}(\ell)}$ or~${\stack_{g}}$, we abuse notation by also calling~$x$ its reduction to the associated coarse moduli space. \begin{prop} \label{prop:defo1} Let~$x$ be a $k$-point of~${\stack_{g}(\ell)}$. \begin{enumerate} \item Assume that~$\mathit{\Phi}_{\ell,1}$ is stabilizer preserving at~$x$. Then: \begin{itemize}[nosep] \item The map~$\mathbf{\Phi}_{\ell,1}$ is strongly étale at~$x$, and the point~$x$ is smooth in~${{\coarse}_{g}(\ell)}$ if and only if~$\mathbf{\Phi}_{\ell,1}(x)$ is smooth in~$\coarse_{g}$. \item The point $x_0 = \mathbf{\Phi}_\ell(x)$ is normal in~$\PHII$ if and only if the projection $p_1: \PHII \to \coarse_{g}$ is étale at~$x_0$. \item If~$\mathbf{\Phi}_{\ell,1}(x)$ is represented by an abelian variety~$A$ defined over~$k$, then the isogeny $\varphi\colon A \to A'$ representing~$x$ is also defined over~$k$. \end{itemize} \item Assume that~$\mathbf{\Phi}_{\ell,1}(x)$ only has generic automorphisms. Then~$\mathit{\Phi}_{\ell,1}$ is stabilizer preserving at~$x$, the point~$x$ is smooth in~${{\coarse}_{g}(\ell)}$, and the map ${\stack_{g}(\ell)} \to {{\coarse}_{g}(\ell)}$ (resp.~${\stack_{g}} \to \coarse_{g}$) is étale at~$x$ (resp.~at~$\mathit{\Phi}_{\ell,1}(x)$). \end{enumerate} \end{prop} \begin{proof} The first part of Item~1 comes from \cref{th:strongetale}: in this case, the map~$\mathbf{\Phi}_{\ell,1}$ is étale at $x$, and~$\mathit{\Phi}_{\ell,1}$ is étale-locally around~$x$ the pullback of~$\mathbf{\Phi}_{\ell,1}$ by the map ${\stack_{g}(\ell)} \to {{\coarse}_{g}(\ell)}$. For the second part, we know that $\mathbf{\Phi}_{\ell,1}=p_1 \circ \mathbf{\Phi}_{\ell}$ is étale at~$x$, and we have seen in \cref{prop:moduli_normal} that~$\mathbf{\Phi}_{\ell}$ is étale at~$x$ if and only if~$x_0$ is normal in~$\PHII$. Therefore~$x_0$ is normal in~$\PHII$ if and only if~$p_1$ is étale at~$x_0$. The final part of Item~1 comes from \cite[\S VI.3.1]{deligne_SchemasModulesCourbes1973}. Indeed, if $(A,K)$ represents~$x$ over~$\overline{k}$, the obstruction for $(A,K)$ to descend over~$k$ is given by an element in $H^2(\Spec k, \Aut(x))$ in the sense of Giraud. But this obstruction vanishes since~$\mathbf{\Phi}_{\ell,1}(x)$ is represented by~$A/k$, and the automorphism groups of~$x$ and~$\mathbf{\Phi}_{\ell,1}(x)$ are equal. The set of isomorphism classes over $k$ is then canonically given by $H^1(\Spec k, \Aut(x))$. If~$y=\mathit{\Phi}_{\ell,1}(x)$ only has generic automorphisms, then~$x$ too, so~$\mathit{\Phi}_{\ell,1}$ is stabilizer preserving at~$x$. The rigidification ${\stack_{g}} \to [{\stack_{g}} / \mu_2]$ is étale (it is a $\mu_2$-gerbe) and $[{\stack_{g}} / \mu_2] \to \coarse_{g}$ is an isomorphism above~$y$ by \cref{cor:genericiso}. Therefore ${\stack_{g}} \to \coarse_{g}$ is étale at~$y$, and~$y$ is smooth in~$\coarse_{g}$. By the same reasoning, the map ${\stack_{g}(\ell)} \to {{\coarse}_{g}(\ell)}$ is étale at~$x$. \end{proof} \cref{prop:defo1} also holds for~$\mathbf{\Phi}_{\ell,2}$ in place of~$\mathbf{\Phi}_{\ell,1}$. \begin{cor} \label{cor:criteria} Let~$x$ be a $k$-point of~${\stack_{g}(\ell)}$ such that both~$\mathbf{\Phi}_{\ell,1}(x)$ and~$\mathbf{\Phi}_{\ell,2}(x)$ only have generic automorphisms. Then~$x$ is a smooth $k$-point of~${{\coarse}_{g}(\ell)}$, the points~$\mathbf{\Phi}_{\ell,1}(x)$ and~$\mathbf{\Phi}_{\ell,2}(x)$ are both smooth $k$-points of~$\coarse_{g}$, and we have a commutative diagram \begin{displaymath} \begin{tikzcd} \tangent{\mathit{\Phi}_{\ell,1}(x)}{{\stack_{g}}} \ar[d] & \tangent{x}{{\stack_{g}(\ell)}} \ar[r, "d\mathit{\Phi}_{\ell,2}"] \ar[l, swap, "d\mathit{\Phi}_{\ell,1}"] \ar[d]& \tangent{\mathit{\Phi}_{\ell,2}(x)}{{\stack_{g}}} \ar[d] \\ \tangent{\mathbf{\Phi}_{\ell,1}(x)}{\coarse_{g}} & \tangent{x}{{{\coarse}_{g}(\ell)}} \ar[r, "d\mathbf{\Phi}_{\ell,2}"] \ar[l, swap, "d\mathbf{\Phi}_{\ell,1}"]& \tangent{\mathbf{\Phi}_{\ell,2}(x)}{\coarse_{g}} \end{tikzcd} \end{displaymath} where the vertical arrows are isomorphisms induced by the maps ${\stack_{g}(\ell)}\to{{\coarse}_{g}(\ell)}$ and ${\stack_{g}}\to\coarse_{g}$. In particular, the deformation map of the isogeny~$\varphi$ representing~$x$ is given by $\mathscr{D}(\varphi)= d{\mathbf{\Phi}_{\ell,2}}(x) \circ d{\mathbf{\Phi}_{\ell,1}}^{-1}(x)$. Furthermore, let~$\PHII\subset\coarse_{g}\times\coarse_{g}$ be the image of~$\mathbf{\Phi}_\ell$, denote by $p_1,p_2\colon\PHII\to\coarse_{g}$ the two projections, and let $x_0=\mathbf{\Phi}_\ell(x)$. If~$\PHII$ is normal at~$x_0$, then the deformation map $\mathscr{D}(\varphi)$ is given by $d{p_2}(x_0) \circ d{p_1}(x_0)^{-1}$. \end{cor} \begin{proof} For the first part, apply \cref{prop:defo1} for both~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$. For the second part, if~$\PHII$ is normal at~$y$, then~$\mathbf{\Phi}_\ell\colon{{\coarse}_{g}(\ell)}\to \PHII$ is an isomorphism around~$x_0$ by \cref{prop:moduli_normal}. \end{proof} \begin{rem} \label{rem:stabpreserving} Let~$x$ be a $k$-point of~${\stack_{g}(\ell)}$ such that both~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are stabilizer preserving at~$x$. Let $y_1 = \mathbf{\Phi}_{\ell,1}(x)$, $y_2 = \mathbf{\Phi}_{\ell,2}(x)$, and let $y_1',y_2'$ be lifts of $y_1,y_2$ to~${\stack_{g}}$. Let~$G=I_x$ be the common automorphism group of these objects. Even if~$G$ contains non-generic automorphisms, strong étaleness still allows us to compute the deformation map by looking at the coarse spaces, as follows. Indeed, suppose that $x$ is smooth in ${{\coarse}_{g}(\ell)}$ (equivalently, by \cref{prop:defo1}, $y_1$, or $y_2$, is smooth in $\coarse_{g}$). Then, the same reasoning as in \cref{cor:criteria} holds for $x$, except that in the commutative diagram the vertical maps are not isomorphisms, since the maps to the coarse moduli spaces are not étale at $x$ and its images. From strong étaleness, the maps on the bottom are isomorphisms, and it remains to explain how to recover the maps on the top from them. Let~$B_1$ be the completed local ring of~${\stack_{g}}$ at~$y_1'$. Then by \cref{cor:normal}, the completed local ring of~$\coarse_{g}$ at~$y_1$ is~$B_1^G$. Therefore, given $m = g(g+1)/2$ uniformizers $u_1',\ldots, u_m'$ of~${\stack_{g}}$ at~$y_1'$, we obtain $g(g+1)/2$ uniformizers of~$\coarse_{g}$ at $y_1$ as $G$-invariant polynomials in $u_1',\ldots,u_m'$. Knowing these polynomials and proceeding in the same way at~$y_2$ allows us to recover the deformation map at the level of stacks up to an action of non-generic elements of~$G$, which amounts to changing the lifts~$y'_1$ and~$y'_2$. In practice, it may be more convenient to work at the level of stacks to recover the deformation map directly, rather than using $G$-invariants uniformizers on~$\coarse_{g}$. Algorithmically, the choice depends on the degree of the field extension one has to take to add enough level structure to rigidify the stack. For instance, if $g=2$ and~$k$ is a finite field, we only need an extension of degree at most~$6$ to get the $2$-torsion, whereas over a number field this could take an extension of degree up to~$720$. \end{rem} \begin{details} We can also invoke Luna's étale slice theorem as follow. By \cref{th:localstruct}, there is a strongly étale representable affine morphism $[V/G] \to {\stack_{g}}$, which is a pullback of the étale $V/G \to \coarse_{g}$, and a $v \in V$ whose image is $y'_1$. If $G$ contains non generic automorphisms, then they won't extend to the strict Hensel ring of ${\stack_{g}}$ at $y'_1$ (see \cref{cor:normal}), and so they will not be automorphisms of the deformations at $y'_1$, hence they will act on the deformation map. If $x$ is tame, so $G$ is linearly reductive, by Luna's étale slice theorem (\cite{luna_SlicesEtales1973}, \cite[Theorem~1.1 and Theorem~2.1]{alper_LunaEtaleSlice2020}, \cite[Theorem~19.4]{alper_EtaleLocalStructure2019}), which can be seen as a refinement of \cref{th:localstruct,cor:normal}, then (possibly after an étale extension of $k$ and after shrinking $V$) there is a strongly étale morphism $[V/G] \to [T_{y'_1} {\stack_{g}} /G]$ which sends $v$ to $0$, with the natural linear action of $G$ on $T_{y'_1} {\stack_{g}}$. In particular, étale locally around $y'_1$ the map $\pi: {\stack_{g}} \to \coarse_{g}$ is given by $[T_{y'_1} {\stack_{g}} /G] -> T_{y'_1} {\stack_{g}} / G$, and if $x$ is smooth in ${{\coarse}_{g}(\ell)}$, so that $y_1$ is smooth in $\coarse_{g}$, then $T_{y_1} {\stack_{g}} = T_0 (T_{y'_1} {\stack_{g}} /G)$. So given $m=g(g+1)/2$ uniformizers $u'_1, \ldots, u'_m$ at $y'_1$, we get that the $g(g+1)/2$ uniformizers $u_1, \ldots, u_m$ are $G$-invariants polynomials in $u_1, \dots, u_m$. Passing to the completions, we recover as above the maps $A \to B$ on the top, and $A^G \to B^G$. Up to an automorphism of $B^G$, the map $A^G \to B^G$ is determined by its degree one part $d\mathbf{\Phi}_{\ell,1}(x)$, and so this determines the degree one part $d \mathit{\Phi}_{\ell,1}(x)$ of $A \to B$ (since the automorphisms only change higher degree elements). \end{details} \begin{rem} Let~$k$ be a field. Then \Cref{prop:defo1,cor:criteria} also apply to the map ${{\coarse}_{g}(\ell)}^{(k)} \to \coarse_{g}^{(k)}\times\coarse_{g}^{(k)}$, where~${{\coarse}_{g}(\ell)}^{(k)}$ and~$\coarse_{g}^{(k)}$ are the coarse moduli space of~${\stack_{g}(\ell)}\otimes k$ and~${\stack_{g}}\otimes k$ respectively. In practice this does not change the results much, since at points~$x$ with generic automorphisms, we know that~$\coarse_{g}^{(k)}$ is isomorphic to $\coarse_{g} \otimes k$ locally around~$x$ by \cref{th:localstruct_tame}. Moreover, if the characteristic of~$k$ is large enough, then all points above~$k$ are tame, so $\coarse_{g}^{(k)} = \coarse_{g} \otimes k$ by \cref{th:globalstruct_tame}. Now assume that we are in the situation of \cref{rem:stabpreserving}, with~$x$ a $k$-point of~${\stack_{g}(\ell)}$ such that both~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are stabilizer preserving at~$x$. Assume furthermore that~$x$ is a tame point, and that the characteristic of~$k$ is~$p$. Let $x_0 = \mathbf{\Phi}_{\ell}(x)$. If~$\mathbf{\Phi}_{\ell}$ is étale at~$x$, or equivalently~$x_0$ is normal in~$\Psi_0$, then~$\mathbf{\Phi}_\ell$ is étale above lifts in characteristic~$0$ of~$x$. The converse is also true: if~$x_0$ is not normal, then it must come from a singular point in characteristic zero. Indeed, normality is equivalent to the conditions~$S_2$ and~$R_1$; since $\PHII \otimes k$ is reduced, so is~$S_1$ and~$R_0$, it suffices to check normality at lifts of characteristic zero. This generalizes the remark of \cite[p.\,248]{schoof_CountingPointsElliptic1995}. \end{rem} \subsubsection{Birational invariants for abelian surfaces} In the case $g=2$, the structure of the coarse moduli space~$\coarse_2$ and the possible automorphism groups have been worked out explicitly. Recall that the Jacobian locus, denoted by $\mathbf{M}_2$, is the open locus in $\coarse_2$ consisting of Jacobians of hyperelliptic curves. Igusa showed in \cite{igusa_ArithmeticVarietyModuli1960} that \begin{displaymath} \mathbf{M}_2=\Proj[J_2,J_4,J_6,J_8,J_{10}]/(J_2 J_6 - J_4^2 - 4J_8)_{(J_{10})}, \end{displaymath} and that there is only one singular point of~$\mathbf{M}_2$ over~$\mathbb{Z}$, given by the hyperelliptic curve ${\mathcal{C}}_0: y^2=x^5-1$, which corresponds to the point $J_2=J_4=J_6=J_8=0$. Over~$\C$, in \cite{igusa_SiegelModularForms1962}, Igusa shows that~$\coarse_2$ has also in its singular locus two projective lines which represent products of elliptic curves, one of which being isomorphic to $y^2=x^3-1$ or to $y^2=x^4-1$. Finally, the structure of~$\coarse_2$ over~$\mathbb{Z}$ is described in \cite{igusa_RingModularForms1979}, but the singular locus is not determined. The possible (reduced) groups of automorphisms of genus~$2$ curves over an algebraic closure are determined in \cite[\S VIII]{igusa_ArithmeticVarietyModuli1960}; see also \cite[\S 4.1]{liu_CourbesStablesGenre1993}. We restrict to a characteristic different from~$2$. Define ${\mathcal{C}}_0: y^2=x^5-1$ and ${\mathcal{C}}_1: y^2=x^5-x$. Then every curve~${\mathcal{C}}$ not isomorphic to~${\mathcal{C}}_0$ or~${\mathcal{C}}_1$ satisfies $\# \Aut({\mathcal{C}}) \in \{2, 4, 6 \}$. In characteristic different from~$5$, we have $\Aut {\mathcal{C}}_0 = \mathbb{Z}/10\mathbb{Z}$ and $\# \Aut {\mathcal{C}}_1 \in \{6,8\}$. In characteristic~$5$, $\Aut {\mathcal{C}}_1$ is an extension of $\PGL_2(\mathbb{F}_5)$, which has cardinality~$120$, by~$\mathbb{Z}/2\mathbb{Z}$. In particular we see that in characteristic~$0$ and $p>5$ all curves have a tame automorphism group. From \cite{igusa_ArithmeticVarietyModuli1960, streng_ComplexMultiplicationAbelian2010, goren_GenusCurvesComplex2012}, the covariants $I_2$, $I_4$, $I'_6$, $I_{10}$ are defined over~$\mathbb{Z}$. They are zero modulo~$2$, and $I_2$, $I_4$, $I'_6$ are all polynomials in~$J_2$ modulo~$3$. Therefore the Igusa invariants $j_1, j_2, j_3$ have bad reduction modulo~$2$ and do not generate the function field of~$\mathbf{M}_2$ modulo~$3$. Over~$\mathbb{Z}[1/6]$ however, they are birational invariants, and determine an isomorphism from $U = \{I_4 \ne 0\}\subset \mathbf{M}_2$ to $\{j_3 \ne 0\}\subset\mathbb{A}^3$. Every point with $I_4=0$ maps to $(j_1,j_2,j_3) =(0,0,0)$. The modular polynomials~$\Psi_{\ell,i}$ from §\ref{subsec:modpol} are equations for the image $\PHII\subset \coarse_{g}\times\coarse_{g}$ of~$\mathbf{\Phi}_\ell$ intersected with $U\times U$ in $\mathbb{A}^3 \times \mathbb{A}^3$ via $j_1,j_2,j_3$. \begin{prop} \label{prop:defomatrix} Let $\PHIII$ denote the normalization of the variety cut out by the modular polynomials $\Psi_{\ell,i}$. Let $\varphi\colon A \to A'$ be an $\ell$-isogeny over a field~$k$ of caracteristic $p>5$ or $zero$, and let $x$ be the $k$-point of $\PHIII$ corresponding to~$\varphi$. Assume that~$A$ and~$A'$ are Jacobians with no extra automorphisms and that $A,A'\in U$. Then the deformation map $\mathscr{D}(\varphi)$ of $\varphi$ is given by $d{p_2}(x) \circ d{p_1}(x)^{-1}$, where $p_1,p_2$ denotes the projections $\PHIII \otimes k \to \mathbb{A}^3_k$. \end{prop} \begin{proof} By assumption, the Igusa invariants induce an isomorphism between the tangent spaces~$\tangent{A}{\coarse_{g}}$ and~$\tangent{j(A)}{\mathbb{A}_k^3}$, and similarly for~$A'$. Since~$A$ and~$A'$ have no extra automorphisms, $\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are automatically stabilizer preserving. The normalization~$\PHIII$ is isomorphic to the preimage of $U \times U$ in the coarse moduli space~${{\coarse}_{g}(\ell)}$ by the discussion before~\cref{prop:defo1}. Since~$\varphi$ is a tame point, by \cref{th:localstruct_tame}, $\PHIII \otimes k$ is still the coarse moduli space of $\stack_{g,\Gamma_0(\ell)} \otimes k$ locally around $\varphi$, so we conclude by \cref{prop:defo1}. \end{proof} \begin{rem} We summarize different incarnations of the deformation map. \begin{itemize} \item At the level of stacks, the two projections $\mathit{\Phi}_{\ell,1},\mathit{\Phi}_{\ell,2}: {\stack_{g}(\ell)} \to \AAg$ are always étale and we can always compute the deformation map at an isogeny~$\varphi$ as $d{\mathit{\Phi}_{\ell,2}}(\varphi) \circ d{\mathit{\Phi}_{\ell,1}}(\varphi)^{-1}$. \item At the level of the coarse moduli space~${{\coarse}_{g}(\ell)}$, we can still compute the deformation map at the points where~$\mathit{\Phi}_{\ell,1}$ and~$\mathit{\Phi}_{\ell,2}$ are stabilizer preserving. If this is not the case, we must add a level structure that kills the automorphisms that do not stabilize the kernel of the isogeny. \item We may then replace~${{\coarse}_{g}(\ell)}$ by its birational image in~$\Ag^2$. We recover the deformation map at points $x \in \Ag^2$ where there is a local isomorphism $\mathit{\Phi}_{\ell}^{-1}(U) \to U$ for some open set~$U$ containing~$x$. If this is not the case, we may instead recover~${{\coarse}_{g}(\ell)}$ from its birational image by computing the normalization. It is usually enough to compute the normalization once and for all over~$\mathbb{Z}$, since by \cref{th:tame} the formation of~${{\coarse}_{g}(\ell)}$ commutes with arbitrary base change at tame points. \item Finally, when $g=2$, we can use the birational morphism from~$\coarse_2$ to~$\mathbb{A}^3$ given by the three Igusa invariants. Modular polynomials are usually given in this form. With Streng's version of Igusa invariants, they can be used as long as $I_4 \ne 0$, i.e.~$j_3 \ne 0$. Otherwise, one has to compute the modular polynomials for another set of invariants which are defined at~$A$ and~$A'$. \end{itemize} As we go down the list, modular equations become algorithmically more tractable, at the expense of introducing more exceptions; but if we find such an exception, we can always spend more computation time if needed in order to recover the deformation map. \end{rem} \subsubsection{Hilbert--Blumenthal stacks} We now briefly describe Hilbert--Blumenthal stacks, and refer to \cite{rapoport_CompactificationsEspaceModules1978,chai_ArithmeticMinimalCompactification1990} for more details. Let~$K$ be a real number field of dimension~$g$, and let~$\mathbb{Z}_K$ be its maximal order. We say that an abelian scheme $A \to S$ has \emph{real multiplication by~$\mathbb{Z}_K$} (or, for short, is RM) if it is endowed with a morphism $\iota\colon \mathbb{Z}_K \to \End(A)$ such that $\Lie(A)$ is a locally free $\mathbb{Z}_K \otimes \mathcal{O}_S$-module of rank~$1$. This last condition can be checked on geometric fibers \cite[Rem.~1.2]{rapoport_CompactificationsEspaceModules1978} and is automatic on fibers of characteristic zero \cite[Prop.~1.4]{rapoport_CompactificationsEspaceModules1978}. We let~${\mathscr{H}_{g}}$ be the stack of principally polarized abelian schemes with real multiplication by~$\mathbb{Z}_K$. It is algebraic and smooth of relative dimension~$g$ over $\Spec \mathbb{Z}$ \cite[Thm.~1.14]{rapoport_CompactificationsEspaceModules1978}. Moreover,~${\mathscr{H}_{g}}$ is connected and its generic fiber is geometrically connected \cite[Thm.~1.28]{rapoport_CompactificationsEspaceModules1978}. Forgetting the real multiplication embedding~$\iota$ yields a map ${\mathscr{H}_{g}} \to \AAg$, called the \emph{Hilbert embedding}, which is an $\Isom(\mathbb{Z}_K, \mathbb{Z}_K) \iso \Gal(K)$-gerbe over its image, the \emph{Humbert stack}. We described the analytification of~${\mathscr{H}_{g}}$ and the Hilbert embedding in \cref{sec:mf}. The map from ${\mathscr{H}_{g}} \to \AAg$ is finite by \cite[EGA IV.15.5.9]{grothendieck_ElementsGeometrieAlgebrique1964}, \cite[Lem~1.19]{deligne_SchemasModulesCourbes1973} (or by looking at the compactifications of \cite{rapoport_CompactificationsEspaceModules1978}, \cite{faltings_DegenerationAbelianVarieties1990}). One can define the stack ${\mathscr{H}_{g,n}} \to \mathbb{Z}[1/n]$ of RM abelian schemes with a level~$n$ structure in the usual way. The map ${\mathscr{H}_{g,n}} \to {\mathscr{H}_{g}}$ is étale over~$\mathbb{Z}[1/n]$ \cite[Thm.~1.22]{rapoport_CompactificationsEspaceModules1978}, its generic fiber is connected, and geometrically has $\phi(n)$ components defined over $\mathbb{Q}(\zeta_n)$ \cite[Thm.~1.28]{rapoport_CompactificationsEspaceModules1978}. If~$\beta$ is a totally positive prime of~$\mathbb{Z}_K$, this allows us to construct, in a similar fashion to~${\stack_{g}(\ell)}$, the stack~$\mathscr{H}_{g}(\beta) = \mathscr{H}_{g,\Gamma_0(\beta)}$ of RM abelian schemes endowed with a subgroup~$K$ which is maximal isotropic for the $\beta$-pairing. We have a map \begin{displaymath} \mathit{\Phi}_{\beta} = (\mathit{\Phi}_{\beta,1},\mathit{\Phi}_{\beta,2})\colon \mathscr{H}_{g}(\beta) \to {\mathscr{H}_{g}} \times {\mathscr{H}_{g}} \end{displaymath} given by forgetting the extra structure and taking the isogeny respectively. The condition on~$\beta$ ensures that $\mathit{\Phi}_{\beta,2}$ sends~$\mathscr{H}_{g}(\beta)$ to~${\mathscr{H}_{g}}$. The methods of \cref{subsec:moduliav-siegel} also apply to compute the Hilbert deformation map. We have the following analogue of \cref{cor:criteria}, with a similar proof. \begin{prop} \label{prop:hilbert-criteria} Let~$x$ be a $k$-point of $\mathscr{H}_{g}(\beta)$ such that~$\mathit{\Phi}_{\beta,1}(x)$ and~$\mathit{\Phi}_{\beta,2}(x)$ only have generic automorphisms. Then~$x$ maps to a smooth point of the coarse moduli space~$\mathbf{H}_{g}(\beta)$, both~$\mathit{\Phi}_{\beta,1}(x)$ and~$\mathit{\Phi}_{\beta,2}(x)$ map to smooth points of the coarse moduli space~${\mathbf{H}_{g}}$, and we have a commutative diagram \begin{displaymath} \begin{tikzcd} \tangent{\mathit{\Phi}_{\beta,1}(x)}{{\mathscr{H}_{g}}} \ar[d] & \tangent{x}{\mathscr{H}_{g}(\beta)} \ar[r, "d\mathit{\Phi}_{\beta,2}"] \ar[l, swap, "d\mathit{\Phi}_{\beta,1}"] \ar[d]& \tangent{\mathit{\Phi}_{\beta,2}(x)}{{\mathscr{H}_{g}}} \ar[d] \\ \tangent{\mathbf{\Phi}_{\beta,1}(x)}{{\mathbf{H}_{g}}} & \tangent{x}{\mathbf{H}_{g}(\beta)} \ar[r, "d\mathbf{\Phi}_{\beta,2}"] \ar[l, swap, "d\mathbf{\Phi}_{\beta,1}"]& \tangent{\mathbf{\Phi}_{\beta,2}(x)}{{\mathbf{H}_{g}}} \end{tikzcd} \end{displaymath} where the vertical arrows are isomorphisms induced by the maps ${\stack_{g}(\ell)}\to{{\coarse}_{g}(\ell)}$ and ${\stack_{g}}\to\coarse_{g}$, and~$\mathbf{\Phi}_{\beta,i}$ is the map induced by~$\mathit{\Phi}_{\beta,i}$ at the level of coarse spaces. In particular, the deformation map of the isogeny~$\varphi$ representing~$x$ is given by $\mathscr{D}(\varphi)= d{\mathbf{\Phi}_{\beta,2}}(x) \circ d{\mathbf{\Phi}_{\beta,1}}^{-1}(x)$. \end{prop} \begin{cor} Let~$x$ be a $k$-point of $\mathscr{H}_{g}(\beta)$ such that both $x_1=\mathit{\Phi}_{\beta,1}(x)$ and $x_2=\mathit{\Phi}_{\beta,2}(x)$ only have generic automorphisms. Assume furthermore that $(x_1, x_2)$ does not lie in $\mathit{\Phi}_{\overline{\beta}}(\mathscr{H}_{g}(\betabar))$: this means that the corresponding abelian varieties are $\beta$-isogenous but not $\overline{\beta}$-isogenous. Let~$\PHIIb\subset{\mathbf{H}_{g}}\times{\mathbf{H}_{g}}$ be the image of~$\mathbf{\Phi}_\beta$. Let $\PHIIH \subset \coarse_{g} \times \coarse_{g}$ be the image of~$\PHIIb$, and let $y=(y_1,y_2)$ the image of $(x_1,x_2)$ by the forgetful morphism ${\mathbf{H}_{g}} \times {\mathbf{H}_{g}} \to \coarse_{g} \times \coarse_{g}$. Denote by $p_1,p_2\colon \PHIIH\to\coarse_{g}$ the two projections. If~$\PHIIH$ is normal at~$y$, then the deformation map $\mathscr{D}(\varphi)$ is given by $d{p_2}(y) \circ d{p_1}(y)^{-1}$. \end{cor} \begin{proof} The map ${\mathscr{H}_{g}} \to {\stack_{g}}$ is finite étale, and under our assumptions the maps ${\mathscr{H}_{g}} \to {\mathbf{H}_{g}}$ and ${\stack_{g}} \to \coarse_{g}$ are étale at $x_1$ and $x_2$ (resp.~at their images $y_1,y_2$ in ${\stack_{g}}$). Therefore the map ${\mathbf{H}_{g}} \times {\mathbf{H}_{g}} \to \coarse_{g} \times \coarse_{g}$ is étale at $x'=(x_1,x_2)$. Furthermore the pullback of $\PHIIH$ by ${\mathbf{H}_{g}} \times {\mathbf{H}_{g}} \to \coarse_{g} \times \coarse_{g}$ is $\PHIV \subset {\mathbf{H}_{g}} \times {\mathbf{H}_{g}}$, so the map $\PHIV \to \PHIIH$ is étale at $x'$. Since $\mathit{\Phi}_{\overline{\beta}}$ is finite, its image $\PHIIbb \subset {\mathbf{H}_{g}} \times {\mathbf{H}_{g}}$ is closed. By our assumption on $x$, there is an open subscheme containing~$x$ which does not intersect~$\PHIIb$, so the map $\PHIIb \to \PHIIH$ is étale at~$x'$. In particular,~$\PHIIb$ is normal at~$x'$ if and only if~$\PHIIH$ is normal at~$x$. The same proof as in \cref{cor:criteria} shows that the projections maps $\PHIIb \to {\mathbf{H}_{g}}$ are étale at~$x'$, and can be used to compute the deformation matrix. Since ${\mathbf{H}_{g}} \to \coarse_{g}$ is étale at~$x_1$ and~$x_2$, the projections~$p_1$ and~$p_2$ are also étale at $y$, and can be used to compute the deformation matrix as well. \end{proof} \begin{details} If~$A$ has real multiplication, there is always a polarization compatible with $\iota\colon \mathbb{Z}_K \to \End(A)$ \cite[Proposition 1.10]{rapoport_CompactificationsEspaceModules1978}. In fact the possible compatible polarizations form a projective $\mathbb{Z}_K$-module~$P$ of rank~$1$ with positivity. The stack~$\HHgpol$ of polarized abelian schemes with real multiplication is algebraic and smooth of relative dimension~$g$ over $\Spec \mathbb{Z}$ \cite[Théorème 1.14]{rapoport_CompactificationsEspaceModules1978}. Isomorphisms classes of polarization modules~$P$ as above are indexed narrow class group~$\Cl^+(\mathbb{Z}_K)$. Therefore $\HHgpol$ decomposes as $\HHgpol = \coprod_{P \in \Cl^+(\mathbb{Z}_K)} \HHgpolP{P}$ where~$\HHgpolP{P}$ is the open substack of abelian schemes with real multiplication and polarization type~$P$ \cite[\S 1]{chai_ArithmeticMinimalCompactification1990}, \cite[Preuve du thm.~1.28]{rapoport_CompactificationsEspaceModules1978}. Over~$\C$, the analytification of~$\HHgpolP{P}$ is given by $\mathbb{H}_1^g/\Sl_2(\mathbb{Z}_K \oplus P^\vee)$, where a point $(t_1, \ldots, t_g) \in \mathbb{H}_1^g$ represents the abelian variety $\C^g/(\Sigma(P^\vee) \oplus \Diag(t_1,\dots,t_g) \Sigma(\mathbb{Z}_K))$, where $\Sigma\colon K \to \mathbb{R}^g$ is the collection of the~$g$ real embeddings of~$K$. For any $\lambda \in P$ the corresponding hermitian form of the polarization is given by $H_{\lambda}(z,w)=\sum_{i=1}^g \lambda_i z_i \overline{w}_i/\Im t_i$. Then ${\mathscr{H}_{g}}=\HHgpolP{\mathbb{Z}_K}$ is the substack which corresponds to principally polarizable abelian schemes, ${\mathscr{H}_{g,n}} \otimes \mathbb{Q}(\zeta_n)$ is geometrically connected. We can also construct $\HHgpolI$ for any ideal $I$ of $\mathbb{Z}_K$, but in this case the corresponding $\mathit{\Phi}_{\beta,2}$ isogeny map would map ${\HHgpolI}^{P}$ to ${\HHgpol}^{I \otimes P}$ \cite[\S 3.4]{kieffer_DegreeHeightEstimates2020}. Note that the deformation map is represented by an element of $\mathbb{Z}_K \otimes \mathcal{O}_S$ instead of a $g(g+1)/2 \times g(g+1)/2$ $\mathcal{O}_S$-matrix. \end{details} \subsection{The deformation and tangent maps} \label{subsec:defo} In this section, we present the Kodaira--Spencer isomorphism, which for a principally polarized abelian variety~$A$ identifies~$\tangent{A}{{\stack_{g}}}$ with~$\Sym^2(\tangent{0}{A})$. This yields a relation between the deformation and tangent maps of a given $\ell$-isogeny (\cref{prop:defo_siegel}). We also present an analogous result in the Hilbert case. \begin{details} Let $f: A \to B$ be a rational $\ell$-isogeny between two principally polarized abelian varieties defined over a field $k$, of character prime to $\ell$. So (the isomorphism classes of) $A$ and $B$ are points in ${\stack_{g}}(k)$ and $f$ is a point in ${\stack_{g}(\ell)}(k)$. A deformation of $A$ is an abelian scheme $\Acal$ over $\keps$ such that $\Acal_k = A$. In particular this is a point of ${\stack_{g}}(\keps)$ above $A \in {\stack_{g}}(k)$, or in other words $\Acal$ is given by a choice of tangent vector $\tau_A$ above $A$ in ${\stack_{g}}$. Given such a deformation scheme, by étaleness of ${\stack_{g}(\ell)} \to {\stack_{g}}$ over $\mathbb{Z}[1/\ell]$, there is a unique lift of $f$ to an isogeny $\fcal: \Acal \to \Bcal$ where $\Bcal$ is a deformation of $B$. Explicitly $\Bcal$ is the quotient scheme of the unique lift of $\Ker f$ to $\Acal$. In particular $\Bcal$ corresponds to a tangent vecteur $\tau_B$ above $B$ in $\coarse_{g}$. This gives a linear map $\Phi(f): T_{\coarse_{g},A} \to T_{\coarse_{g}, B}, \tau_A \mapsto \tau_B$, $\Phi(f)$ which is simply the deformation map $D_{\mathbf{\Phi}_{\ell,2}}(f) \circ D_{\mathbf{\Phi}_{\ell,1}}^{-1}(f)$ of $f$. \end{details} \subsubsection{The Siegel case} The Kodaira-Spencer morphism was first introduced in \cite{kodaira_DeformationsComplexAnalytic1958}; we refer to \cite[\S III.9]{faltings_DegenerationAbelianVarieties1990} and \cite[\S 1.3]{andre_KodairaSpencerMap2017} for more details. Let $p\colon A\to S$ be a proper abelian scheme, and assume for simplicity that~$S$ is smooth. Then, using the Gauss-Manin connection \begin{displaymath} \nabla\colon R^1 p_{\ast} \Omega_{A/S} \to R^1 p_{\ast} \Omega_{A/S} \otimes \Omega^1_S, \end{displaymath} one can define the \emph{Kodaira--Spencer morphism} \begin{displaymath} \kappa\colon T_S \to R^1p_{\ast} T_{A/S}, \end{displaymath} where $T_{A/S}$ is the dual of $\Omega^1_{A/S}$. \begin{inlinedetails} Note that $S$ smooth is enough for our purpose since we will apply this to ${\stack_{g}}$, or rather to an étale presentation $S$ of ${\stack_{g}}$). \end{inlinedetails} Recall that $\Lie_S A=p_{\ast} T_{A/S}$ is the dual of~$p_\ast \Omega^1_{A/S}$, and is canonically identified with~$s^{\ast} T_{A_S}$ where $s\colon S \to A$ is the zero section \cite[Prop.~3.15]{moonen_AbelianVarieties2012}. By the projection formula \cite[Thm.~8.3.2]{fantechi_FundamentalAlgebraicGeometry2005}, \stackcite{0943}, we have \begin{displaymath} R^1p_\ast T_{A/S} = \Lie_S(A) \otimes_{\mathcal{O}_S} R^1p_\ast\mathcal{O}_A. \end{displaymath} Moreover,~$R^1p_\ast\mathcal{O}_A$ is naturally isomorphic to~$\Lie_S (A^\vee)$, where $A^\vee\to S$ is the dual of~$A$. Therefore, we can also write the Kodaira--Spencer map as \begin{displaymath} \kappa\colon T_S \to R^1p_\ast T_{A/S} \iso \Lie_S (A) \otimes_{\mathcal{O}_S} \Lie_S (A^\vee). \end{displaymath} The Kodaira-Spencer map~$\kappa$ is invariant by duality. A polarization $A\to A^\vee$ induces another version of the Kodaira--Spencer map: \begin{displaymath} \kappa\colon T_S \to \Sym^2 \Lie_S (A) = \Hom_{\Sym}(\Omega^1_{A/S}, \Omega^{1\,\vee}_{A^\vee/S}) = \Hom_{\Sym}\bigl(\Lie_S(A)^\vee, \Lie_S(A^\vee)\bigr). \end{displaymath} If we apply this construction to the universal abelian scheme ${\mathscr{X}_{g}} \to {\stack_{g}}$ (or rather, the pullback of~${\mathscr{X}_{g}}$ to an étale presentation~$S$ of~${\stack_{g}}$), the Kodaira--Spencer map is an isomorphism \cite[\S 2.1.1]{andre_KodairaSpencerMap2017}. Its analytification can be described explicitly. \begin{prop} \label{prop:analytic_kodaira} Let~$V$ be the trivial vector bundle~$\C^g$ on~$\mathbb{H}_g$, identified with the tangent space at~$0$ of the universal abelian variety~$A(\tau)$ over~$\mathbb{H}_g$. Then the pullback of the Kodaira--Spencer map $\kappa\colon T_{{\stack_{g}}} \to \Sym^2 \Lie_S {\mathscr{X}_{g}}$ by $\mathbb{H}_g \to {\stack_{g}}^{\text{an}}$ is an isomorphism $T_{\mathbb{H}_g} \iso \smash{\Sym^2} V$ given by \begin{displaymath} \kappa \Bigl( \frac{1+\smash{\delta_{jk}}}{2\pi i} \frac{\partial}{\partial \tau_{jk}} \Bigr) = \frac{1}{(2\pi i)^2} \frac{\partial}{\partial z_j}\otimes\frac{\partial}{\partial z_k}. \end{displaymath} for each $1\leq j,k\leq g$, where $\delta_{jk}$ is the Kronecker symbol. \end{prop} \begin{proof} This is \cite[§2.2]{andre_KodairaSpencerMap2017}. The identification can be derived by looking at the deformation of a section~$s$ of the line bundle on~${\mathscr{X}_{g}}$ giving the principal polarization. \begin{inlinedetails} Precisely, if $(A, \mathcal{L})$ is a principally polarized abelian variety, and $s$ a non zero section of $\mathcal{L}$, each deformation $(A_{\epsilon}, \mathcal{L}_{\epsilon})$ gives a deformation $s_{\epsilon}$. \end{inlinedetails} On $\mathbb{H}_g \times \C^g \to \mathbb{H}_g$, we can take the theta function~$\theta$ as a section, and its deformation along~$\tau$ is given by the heat equation \cite[p.\,9]{ciliberto_ModuliSpaceAbelian2000}: \begin{displaymath} 2 \pi i (1+\delta_{jk}) \frac{\partial\theta}{\partial \tau_{jk}} = \frac{\partial^2 \theta }{ \partial z_j \partial z_k}. \qedhere \end{displaymath} \end{proof} When identifying the tangent space at~$\tau$ with the symmetric matrices, the action of~$\Sym^2$ at a matrix~$U$ on the tangent space is given by $M \mapsto M U M^t$. It is then easy to check that this action is indeed compatible with the action of~$\Sp_{2g}(\mathbb{Z})$ on~$\tau$ and~$U$. From \cref{prop:analytic_kodaira}, we recover that derivatives of Siegel modular invariants have weight~$\smash{\Sym^2}$ in the sense of~§\ref{sec:mf}; moreover the basis of differential forms~$\omega(\tau)$ from~§\ref{subsec:siegel} and the matrix~$D_\tau J$ defined in~§\ref{subsec:norm-matrix} are correctly normalized. To sum up, if $x: \Spec k \to {\stack_{g}}$ is a point represented by a principally polarized abelian variety~$A/k$, we have a canonical isomorphism $T_x {\stack_{g}} \iso \Sym^2(\tangent{0}{A})$. \begin{defn} \label{def:siegel_defo_matrix} Let $k$ be a field of characteristic distinct from~$\ell$, let $\varphi\colon A\to A'$ be an $\ell$-isogeny representing a point of~${\stack_{g}(\ell)}(k)$, and fix bases of~$\tangent{0}{A}$ and~$\tangent{0}{B}$ as $k$-vector spaces. We call the matrix of the tangent map~$d\varphi$ in these bases the \emph{tangent matrix} of~$\varphi$. By functoriality, this choice of bases induces bases of~$\tangent{A}{{\stack_{g}}}$ and~$\tangent{A'}{{\stack_{g}}}$ over~$k$. We call the matrix of the deformation map~$\mathscr{D}(\varphi)$ in these bases the \emph{deformation matrix} of~$\varphi$. We still denote these matrices by~$d\varphi$ and~$\mathscr{D}(\varphi)$, but this abuse of notation should cause no confusion. \end{defn} We can now extend the relation that we gave in \cref{prop:norm-matrix} between the tangent and deformation matrices, as follows. \begin{prop} \label{prop:defo_siegel} Let~$\varphi$ be as in \cref{def:siegel_defo_matrix}, and let $d\varphi$ (resp.~$\mathscr{D}(\varphi)$) be its tangent (resp.~deformation) matrix. Then we have $\Sym^2(d\varphi) = \ell \mathscr{D}(\varphi)$. \end{prop} \begin{proof} It suffices to prove it for the universal $\ell$-isogeny \begin{displaymath} \varphi\colon {\mathscr{X}_{g}(\ell)} \to \XXg}%{{\mathscr{X}_{g,1}} \times_{\AAg} {\stack_{g}(\ell)} \end{displaymath} over~$\mathbb{Z}[1/\ell]$. All line bundles involved in the relation we have to prove are locally free on smooth stacks, so are flat over~$\mathbb{Z}$; therefore, since $\mathbb{Z}\to\C$ is injective, it suffices to prove the relation over~$\C$. By rigidity \cite[Prop.~6.1 and Thm.~6.14]{mumford_GeometricInvariantTheory1994}, it suffices to prove the relation on each fiber. Hence we may assume that $\varphi\colon A \to A'$ is an $\ell$-isogeny over~$\C$. We can find $\tau\in\mathbb{H}_g$ such that~$A$ is isomorphic to $\C^g/(\mathbb{Z}^g + \tau \mathbb{Z}^g)$ and~$A'$ is isomorphic to $\C^g/(\mathbb{Z}^g + \tau/\ell \mathbb{Z}^g)$, with $\varphi$ induced by the identity on~$\C^g$. Then, the deformation map at $\varphi$ is given by $\tau \to \tau/\ell$, so the result follows. \end{proof} \begin{details} \begin{itemize} \item We give an alternative proof using modular polynomials. We may take our basis such that $df=\Id$ (we say that $f$ is a normalized isogeny). If $A$ correspond to the abelian variety $\C^g/(\mathbb{Z}^g + \tau \mathbb{Z}^g)$, then since $f$ is normalized it is the identity on $\C^g$, so $B$ is given by $\C^g/(\mathbb{Z}^g + \tau/\ell \mathbb{Z}^g)$. Let $A_{\epsilon}$ be a deformation of $A$ over $\C[\epsilon]$ (where $\epsilon^2=0$), and $B_{\epsilon}$ the deformation induced by $f$. Then taking $j$ a set of local uniformizers at $A$ and $B$ and $\Phi_{\ell}$ modular equations in these uniformizers, we have $\Phi_{\ell}(j(A_{\epsilon}), j(B_{\epsilon}))=0$. Thus we get a relation involving $\mathscr{D}(f)(t_{\epsilon})$ where $t_{\epsilon}$ is the tangent vector corresponding to $A_{\epsilon}$. On the other hand, differentiating the relation $\Phi_{\ell}(j(\tau), j(\tau/\ell))=0$ shows that in the normalized basis $\mathscr{D}(f)=\Id/\ell$. Alternatively, working on $\mathbb{H}_g$, we see directly that the deformation map is given by $\tau \to \tau/\ell$, so $\mathscr{D}(f)=\Id/\ell$. \item In the proof above, if we take $f$ to be given by $z \mapsto \ell z$ on $\C^g$, then $B=\C^g/(\mathbb{Z}^g + \ell \tau \mathbb{Z}^g)$. Then differentiating the relation $\Phi_{\ell}(j(\tau), j(\ell \tau))=0$, shows that in a $\ell$-normalized basis, $\mathscr{D}(f)=\ell \Id$. This is coherent with the fact that changing the tangent matrix $df$ by a factor $\ell$ change $\Sym^2 df$ by $\ell^2$. \item The multiplication by $[m]$ map is an $m^2$-isogeny, and acts by $m$ on the tangent space. Hence the deformation matrix is the identity, as expected from the fact that $[m]$ lift on any deformation of $A$. \end{itemize} \end{details} \subsubsection{The Hilbert case} In the Hilbert case, the Kodaira--Spencer isomorphism is as follows. \begin{prop} \label{prop:kodaira_hilbert} Let $A \to S$ be an abelian scheme in ${\mathscr{H}_{g}}$. Then we have canonical isomorphisms \begin{displaymath} \tangent{A}{{\mathscr{H}_{g}}} \iso \Hom_{\mathbb{Z}_K \otimes \mathcal{O}_S}(\Lie(A)^\vee, \Lie(A^\vee)) = \Lie(A^\vee) \otimes_{\mathbb{Z}_K \otimes \mathcal{O}_S} \Lie(A) \otimes_{\mathbb{Z}_K} \mathbb{Z}_K^\dualv. \end{displaymath} \end{prop} \begin{proof} Combine \cite[Prop.~1.6]{rapoport_CompactificationsEspaceModules1978} with \cite[Prop.~1.9]{rapoport_CompactificationsEspaceModules1978}. \end{proof} \begin{details} By the above Propositions of \cite{rapoport_CompactificationsEspaceModules1978}, the functor of formal deformations of RM abelian schemes with or without polarization are the same; in other words, all deformations which preserve the real multiplication automatically preserve the polarization. By contrast for an abelian scheme with a separable polarization, the formal functor of deformations (without polarization) is represented by $W(k)[[[t_{11}, \ldots, t_{gg}]]$\cite[Thm.~2.2.1]{oort_FiniteGroupSchemes1971} and the one with polarization by $W(k)[[[t_{11}, \ldots, t_{gg}]]/(t_{ij}-t_{ji})$ \cite[Thm.~2.3.3 and Rem.~p.\,288]{oort_FiniteGroupSchemes1971}. \end{details} \Cref{prop:kodaira_hilbert} shows that for Hilbert--Blumenthal stacks, the deformation map is actually represented by an element of $\mathbb{Z}_K \otimes \mathcal{O}_S$ rather than a matrix in $\mathcal{O}_S$. The action of the Hilbert embedding on tangent spaces is also easy to describe. \begin{prop} \label{prop:ks_embedding} Let $A$ be a $k$-point of~${\mathscr{H}_{g}}$. Then the map $\tangent{A}{{\mathscr{H}_{g}}}\to \tangent{A}{{\stack_{g}}}$ induced by the forgetful functor fits in the commutative diagram \begin{displaymath} \begin{tikzcd} \tangent{A}{{\mathscr{H}_{g}}} \ar[r] \ar[d] & \tangent{A}{{\stack_{g}}} \ar[d] \\ \Hom_{\mathbb{Z}_K\otimes \mathcal{O}_k}(\Lie(A)^\vee, \Lie(A^\vee)) \ar[r] & \Hom_{\Sym}(\Lie(A)^\vee, \Lie(A^\vee)). \end{tikzcd} \end{displaymath} where the vertical arrows are the Kodaira--Spencer isomorphisms. \begin{inlinedetails} As a reformulation: the forgetful functor ${\mathscr{H}_{g}} \to {\stack_{g}}$ induces the following map on tangent spaces. If $A \to k$ represents the geometric point $\Spec k \to {\mathscr{H}_{g}}$, then $T_{A,{\mathscr{H}_{g}}} \to T_{A,{\stack_{g}}}$ is given by the natural map $\Lie(A) \otimes_{\mathbb{Z}_K \otimes \mathcal{O}_k} \Lie(A) \otimes_{\mathbb{Z}_K} \mathbb{Z}_K^\dualv \iso \Hom_{\mathbb{Z}_K \otimes \mathcal{O}_k}(\Lie(A)^\vee, \Lie(A^\vee)) \to \Sym^2 \Lie(A) \iso \Hom_{\Sym}(\Lie(A)^\vee, \Lie(A^\vee))$. \end{inlinedetails} \end{prop} \begin{proof} The bottom arrow is well-defined: $\Lie(A)$ is a projective $\mathbb{Z}_K \otimes \mathcal{O}_k$-sheaf of rank~$1$, so its image in $\Hom_{\mathcal{O}_k}(\Lie(A)^\vee, \Lie(A^\vee))$ obtained by forgetting the $\mathbb{Z}_K$-structure is automatically symmetric. We omit the proof of commutativity. \end{proof} Combining \cref{prop:ks_embedding} with the analytic description of the Kodaira--Spencer in the Siegel case (\cref{prop:analytic_kodaira}) and the analytic description of the forgetful map (§\ref{subsec:hilbert-siegel}), we obtain the following analytic description of the Kodaira--Spencer isomorphism in the Hilbert case. \begin{cor} The pullback of $\kappa\colon T_{{\mathscr{H}_{g}}}\to \Sym^2 Lie_S {{X}_{g}}$ by $\mathbb{H}_1^g \to {\mathscr{H}_{g}}^{\text{an}}$ is given by \begin{displaymath} \kappa \Bigl(\frac{1}{\pi i} \frac{\partial}{\partial t_{j}}\Bigr) = \frac{1}{(2\pi i)^2} \frac{\partial}{\partial z_j} \otimes \frac{\partial}{\partial z_j} \end{displaymath} for every $1\leq j\leq g$. \end{cor} This result provides an algebraic interpretation of \cref{prop:djdt-djdtau}: in genus~$2$, the part of $\tangent{A}{\stack_2}$ that comes from the Hilbert space corresponds to the span of $dz_1\otimes dz_1$ and $dz_2\otimes dz_2$. We obtain the analogue of \cref{prop:defo_siegel} in the Hilbert case by a similar proof; in this statement, we see $\mathscr{D}(\varphi)$ as an element of a $\mathbb{Z}_K\otimes\mathcal{O}_S$-module. \begin{prop} \label{prop:defo_hilbert} Let $\varphi\colon A \to A'$ be a $\beta$-isogeny. Then $\Sym^2(d\varphi) = \beta \mathscr{D}(\varphi)$. \end{prop} \begin{proofdetails} The forgetting map ${\mathscr{H}_{g}}$ to ${\stack_{g}}$ is given over $\C$ by \cref{prop:hilbert-embedding} and the action on the tangent space at the period matrices and on the tangent space $\C^g$ at $0$ of the corresponding complex abelian varieties is compatible with the $\Sym^2$ action by the same proof as in \cref{prop:djdt-djdtau}. The conclusion then follows from \cref{prop:analytic_kodaira,cor:ks_embedding} \end{proofdetails} \begin{rem} \label{rem:hilbert_tangent}\label{rem:trivialization} We give an algebraic interpretation of the notion of Hilbert-normalized bases from §\ref{subsec:hilbert}, and the reduction to diagonal matrices that we used in §\ref{subsec:explicit-hilbert} to compute the tangent matrix in the Hilbert case. Let~$k$ be a field, and let~$A$ be an abelian variety representing a $k$-point of~${\mathscr{H}_{g}}$. Then~$\Lie(A)$ is a free $\mathbb{Z}_K \otimes k$-module of rank~$1$, and any choice of basis~$v$ induces an isomorphism with $\mathbb{Z}_K\otimes k$ itself. Provided that $\chr k\nmid \Discr(K)$, and up to taking an étale extension of~$k$, we may assume that~$k$ splits~$\mathbb{Z}_K$: \begin{displaymath} \mathbb{Z}_K \otimes k=\oplus_{i=1}^g k^{\sigma_i} \end{displaymath} where $k^{\sigma_i} \iso k$ has a $\mathbb{Z}_K$-module structure induced by the $i$-th embedding $\sigma_i\colon\mathbb{Z}_K\to k$. We fixed such a trivialization in §\ref{subsec:hilbert} in the case $k=\C$. Then,~$v$ induces a basis of~$\Lie(A)$ as a $k$-vector space on which~$\mathbb{Z}_K$ acts diagonally, in other words a Hilbert-normalized basis of~$\Lie(A)$. With such choices of trivializations, the deformation map as given by a $g \times g$ matrix in the basis $(v_1 \otimes v_1, \ldots, v_g \otimes v_g)$ of the tangent spaces to~${\mathscr{H}_{g}}$. Let us discuss, as a generalization of §\ref{subsec:curves}, the construction of Hilbert-normalized basis when only the Humbert equation is given. Assume that~$k$ splits~$\mathbb{Z}_K$ and fix a trivialization; let $(v_1, \dots, v_g)$ be a Hilbert-normalized basis of~$\Lie(A)$, let $(w_1, \dots, w_g)$ be another $k$-basis and let~$M$ be the base-change matrix. Then $w_1 \otimes w_1, \dots, w_g \otimes w_g$ are tangent to the Humbert variety if and only if they are in the image of the map \begin{displaymath} \Hom_{\mathbb{Z}_K \otimes \mathcal{O}_k}(\Lie(A)^\vee, \Lie(A^\vee)) \to \Hom_{\Sym}(\Lie(A)^\vee, \Lie(A^\vee)). \end{displaymath} Via the trivialization, the left hand side is isomorphic to $\oplus_{i=1}^g \Hom_{k}(k^{\sigma_i}, k^{\sigma_i})$. So $w_1 \otimes w_1, \dots, w_g \otimes w_g$ are tangent to the Humbert variety if and only if~$M$ is diagonal up to a permutation. When~$\Gal(K/\mathbb{Q})$ is not the full symmetric group~$\mathfrak{S}_g$, this is not enough in general to ensure that the basis $(w_1,\ldots,w_g)$ is potentially Hilbert-normalized. This issue does not appear in genus~$2$. As a final remark, assume that $\varphi\colon A\to A'$ is an isogeny compatible with the real multiplication, and assume that we are given bases of~$\Lie(A)$ and~$\Lie(A')$ as $\mathbb{Z}_K\otimes k$-modules (which we assume is étale for simplicity). Then, knowing $\Sym^2(d\varphi)$, the number of possibilities for~$d\varphi$ is~$2^s$ where~$s$ is the number of connected components of the étale algebra $\mathbb{Z}_K\otimes k$. For instance, if $g=2$ and $k = \mathbb{F}_p$ there are~$2$ or~$4$ possibilities according to whether~$p$ is inert or split in~$\mathbb{Z}_K$. \end{rem} \begin{details} Thus the results of this section allows to recover purely algebraically the results of \cref{prop:djdt-djdtau,prop:tangent-humbert} and extend them to all dimension $g$. When $k=\C$, the trivialization of $\mathbb{Z}_K \otimes \C$ is given by a numerotation of the $g$ embeddings of $\mathbb{Z}_K$ into $\mathbb{R}$, and the analytic description of ${\mathscr{H}_{g}}$ shows that on $T_0 A$ we may take $v_i=dz_i$. The discussion above of Hilbert-normalized can be detailed as follow. If $x \in {\mathscr{H}_{g}}$ represents an abelian variety $A/k$ with real multiplication, but we are only given the image of $x$ in ${\stack_{g}}$, then we only have $\Lie(A)$ as a $k$-module. Likewise, the tangent equations of the Humbert moduli in ${\stack_{g}}$ at $A$ only allows us to recover $\tangent{{\mathscr{H}_{g}}}{A}$ as a $k$-vector space. The choice of an $\mathbb{Z}_K$ module structure on $\Lie A$ then essentially corresponds to a choice of a preimage of $A$ in ${\mathscr{H}_{g}}$ \cite[Prop.~1.4]{rapoport_CompactificationsEspaceModules1978}; there are $\Gal(K)$ possibilities. As we saw above, the generalization of \cref{prop:tangent-humbert} only gives that if $w_1 \otimes w_1, \dots, w_g \otimes w_g$ are tangent to the Humbert variety, then the action of $\mathbb{Z}_K$ on the $w_i$ is diagonal. But when $\Gal(K)$ is not the full symmetric group $\mathfrak{S}_n$ then this is not enough to get that the action is induced by the given trivialization, even up to Galois conjugation, so $(w_1, \dots, w_g)$ may not be potentially Hilbert-normalized. To treat this case, the explicit action of $\mathbb{Z}_K$ on $\Lie(A)$ is required. Likewise, if $f:A \to B$ be an isogeny compatible with real multiplication between abelian varieties with real multiplication, then seeing $\Sym^2 \Lie A$ and $\Sym^2 \Lie B$ only as $O_k$-modules, there are a priori $2^g$ possibilities for $df$ (since by the discussion above, eventually taking an étale extension of $k$, we can assume $df$ diagonal since $f$ is compatible with the real multiplication). Here again the $\mathbb{Z}_K$-action is important to get the $2^s$ possibilities of \cref{rem:trivialization}. \end{details} \subsection{Modular forms and covariants} \label{subsec:mf-ZZ} In this section, we give an algebraic interpretation of modular forms and covariants over~$\mathbb{Z}$, as well as a completely algebraic proof of \cref{thm:siegel-cov}. This yields an explicit version of the Kodaira--Spencer isomorphism in the model of~$\coarse_{g}$ given by Igusa invariants over~$\mathbb{Z}[1/2]$ and not only over~$\C$. \begin{inlinedetails} Indeed, to apply the results of \cref{subsec:moduliav,subsec:defo}, we need to describe models of ${\stack_{g}}$ and $\coarse_{g}$, and give an explicit version of the Kodaira-Spencer isomorphism on these models. But there is a canonical model on ${\stack_{g}}$, given by the Hodge line bundle, whose sections are modular form. So in this section, we reinterpret the results of \cref{sec:cov} to show that they still hold over $\mathbb{Z}$. \end{inlinedetails} Let $\pi: {\mathscr{X}_{g}} \to {\stack_{g}}$ be the universal abelian variety. The vector bundle \begin{displaymath} h = \pi_{\ast} \Omega^1_{{\mathscr{X}_{g}}/{\stack_{g}}} \end{displaymath} over~${\stack_{g}}$, which is dual to~$\Lie_{{\mathscr{X}_{g}}/{\stack_{g}}}$, is called the \emph{Hodge bundle}. If~$\rho$ is a representation of $\GL_g$, a Siegel modular form of weight~$\rho$ is a section of $\rho(h)$; in particular, a scalar-valued modular form of weight~$k$ is a section of $\Lambda^g h^{\otimes k}$. In other words, a Siegel modular form~$f$ can be seen as a map \begin{displaymath} (A, \omega) \mapsto f(A, \omega) \end{displaymath} where~$A$ is a point of~${\stack_{g}}$ and~$\omega$ is a basis of differential forms on~$A$, with the following property: if $\eta\colon A \to A'$ is an isomorphism, and~$r\in\GL_g$ is the matrix of~$\eta^*$ in the bases~$\omega',\omega$, then $f(A', \omega)=\rho(r) f(A,\omega')$. The link with classical modular forms over~$\C$ is the following: if $\tau \in \mathbb{H}_g$, then we define \begin{displaymath} f(\tau)=f\bigl(\C^g/(\mathbb{Z}^g+\tau \mathbb{Z}^g), (2 \pi i \,dz_1, \ldots, 2 \pi i\,dz_g)\bigr). \end{displaymath} This choice of basis is made so that the $q$-expansion principle holds \cite[p.\,141]{faltings_DegenerationAbelianVarieties1990}. We already used it to define~$f(A,\omega)$ over~$\C$ in §\ref{subsec:siegel}. The canonical line bundle $h=\Lambda^g h$ is ample, so modular forms give local coordinates on $\coarse_{g}$. The link between modular forms and covariants comes from the Torelli morphism \begin{displaymath} \tau_g: \mathscr{M}_g \to {\stack_{g}} \end{displaymath} where~$\mathscr{M}_g$ denotes the moduli stack of smooth curves of genus~$g$. Let $\mathscr{C}_g\to\mathscr{M}_g$ denote the universal curve; then the pullback~$\tau_g^\ast h$ of the Hodge bundle by the Torelli morphism is $\pi_{\ast} \Omega^1{\mathscr{C}_g/\mathscr{M}_g}$, with both having canonical action by $\GL_g$. In other words a Siegel modular form of weight~$\rho$ induces a Teichmuller modular form of weight~$\rho$. Now assume that $g=2$. Over $\mathbb{Z}[1/2]$, the moduli stack $\mathscr{M}_2$ is identified with the moduli stack of nondegenerate binary forms of degree~$6$. Let $V=\mathbb{Z} x \oplus \mathbb{Z} y$, let $X=\det^{-2} V \otimes \Sym^6 V$, and let~$U$ be the open locus determined by the discriminant. Then~$U\to \mathscr{M}_2$ is naturally identified with the Hodge frame bundle on~$\mathscr{M}_2$: in other words,~$U$ is the moduli space of genus~$2$ hyperelliptic curves $\pi: C \to S$ endowed with a rigidification $\mathcal{O}_S^{\oplus 2} \iso \pi_\ast \Omega^1_{C/S}$. In this identification, we send the binary form $f(x,y)$ to the curve $v^2=f(u,1)$ with a basis of differential forms given by $(u \,du/v, du/v)$ \cite[\S 4]{clery_CovariantsBinarySextics2017}. The natural action of $\GL_2$ on the Hodge bundle corresponds to the action of~$\GL_2$ on~$U$ that we describe in~\cref{subsec:cov}. This shows why a Siegel modular form of weight~$\rho$ pulls back to a fractional covariant of weight~$\rho$, at least over~$\mathbb{Z}[1/2]$. In fact, one can show as in~\cref{thm:siegel-cov}, by considering suitable compactifications, that a Siegel modular form pulls back to a polynomial covariant over any ring~$R$ in which~$2$ is invertible. Using Igusa's universal form \cite[\S 2]{igusa_ArithmeticVarietyModuli1960}, one can also use binary forms of degree~$6$ to describe the moduli stack of genus~$2$ curves even in characteristic two. \begin{details} The canonical line bundle $h=\Lambda^g h$ is ample, and can be used to construct the Satake-Baily-Borel compactification ${\stack_{g}}^\ast$ of ${\stack_{g}}$ over $\mathbb{Z}$. The stack ${\stack_{g}}^\ast$ is normal but not smooth, one can also construct smooth toroidal compactifications $\AAgbar$ over $\mathbb{Z}$. If $g>1$, the Koecher principle is still valid over $\mathbb{Z}$, and a scalar modular form defined over ${\stack_{g}}$ extends to ${\stack_{g}}^\ast$ and $\AAgbar$. The boundary components have interpretations in terms of the Fourier coefficients, in term of the Siegel operator or the Fourier-Jacobi development respectively. Finally the $q$-expansion principle give a convenient way to find the ring of definition of a modular form. For all this and much more, we refer to \cite[Ch.~V]{faltings_DegenerationAbelianVarieties1990}. Let $j$ be a modular function, that is a section of $\mathcal{O}_{{\stack_{g}}}$. Then if $A/k$ is in the open of definition of $j$, one can evaluate $j$ at every deformation $A_{\epsilon}$ of $A$. If $t_\epsilon$ is the tangent vector at $A$ to ${\stack_{g}}$ corresponding to $A_{\epsilon}$, writing $j(A_{\epsilon})=j(A)+dj(\epsilon) \epsilon$ defines an application $dj: \Sym^2 T_{0_A} A \to k$ (where we used the Kodaira-Spencer isomorphism). More generally this holds for abelian schemes, so we see that $dj$ is a section of $\Sym^2 h$, in other words a modular form of weight $\Sym^2$. So if $j_1, \ldots, j_m$ contains uniformizers of ${\stack_{g}}$ at $A$, we can use the $dj_i$ to compute the deformation matrix. This uniformizer condition explains the genericity condition on the ranks of $dj/d\tau$ (resp. $dj/dt$) of \cref{def:generic,def:djdt-matrix}. It remains to give an explicit version of the Kodaira-Spencer isomorphism when $g=2$, via covariants of hyperelliptic curves. The isomorphism $T_0 \Jac C \iso H^1(C, O_C) \iso H^0(C, \Omega_C)$ for a curve $C$ shows that the pullback $\tau_g^\ast h$ of $h$ by the Torelli morphism $\tau_g: \mathscr{M}_g \to {\stack_{g}}$ is indeed given by the bundle $\pi_{\ast} \Omega^1{\mathscr{C}_g/\mathscr{M}_g}$, with both having canonical action by $\Gl_g$. The Torelli morphism is radicial on $\mathscr{M}_g$, and unramified when restricted to $\mathscr{M}_g \setminus \mathscr{H}_g$ and to $\mathscr{H}_g$, where $\mathscr{H}_g$ is the locus of hyperelliptic curves. If $\overline{\mathscr{M}}_g$ is the moduli space of stable curves of genus~$g$, then the Torelli morphisms extends to morphisms (no longer injective) $\mathscr{M}^\ast_g \to {\stack_{g}}$ and $\overline{\mathscr{M}}_g \to \AAbar_g$, where $\mathscr{M}^\ast_g$ denotes the locus of stable curves. If $g=2$, then the morphism $\mathscr{M}^\ast_g \to {\stack_{g}}$ is surjective, as can be seen from the degenerations of hyperelliptic curves of genus~$2$ studied in (\cite[Thm.~1]{liu_CourbesStablesGenre1993}). Let $U$ be the open locus of $X$ defined above, the action of $\Gl_2$ on $\mathscr{M}_2$ is the one described in \cref{subsec:cov}, which as explained there, differs from the usual action when considering covariants, so that if we let $\alpha: U \to [U/\Gl_2] \iso \mathscr{M}_2$ be the natural projection, then $\alpha^{\ast} \Omega^1{\mathscr{C}_2/\mathscr{M}_2}$ is identified to $V$ with its natural $\Gl_2$ action. With the standard action from \cite[\S 4]{clery_CovariantsBinarySextics2017}, the pullback is identified to $V \otimes \det V$ instead. Then \cref{thm:siegel-cov} can be interpreted as follow, a Siegel modular form on ${\stack_{g}}$ extends to $\AAgbar$, hence its restriction via the Torelli morphism gives a Teichmuller modular form on the stable curves of genus~$g$. If $g=2$, these curves describe a codimension $>1$ of the space $X=\Sym^6 V$, so by normality of $X$, $f$ induces a polynomial covariant. In particular a Siegel modular form defined over a ring $R$ induces a polynomial covariant defined over $R$. \end{details} \begin{prop} \label{prop:identification} The equality $\Cov(f_{8,6}) = \Cov(\chi_{10}) X$ from \cref{prop:f86} holds over~$\mathbb{Z}$. \end{prop} \begin{proof} By the $q$-expansion principle, $f_{8,6}$ is defined over~$\mathbb{Z}[1/2,1/3,1/5,1/43]$; the covariants~$I_{10}$ and~$X$ are defined over~$\mathbb{Z}[1/2]$ since they have integral coefficients. Checking the value of $\Cov(\chi_{10}) X$ on Igusa's universal hyperelliptic curve as in \cite[\S 3]{igusa_ArithmeticVarietyModuli1960} shows that this covariant is even defined over~$\mathbb{Z}$. Since the Hodge bundle is without torsion, it is enough to check equality over~$\C$, which is the content of \cref{prop:f86}. \end{proof} This suggests another, entirely algebraic proof of \cref{prop:f86}. By dimension considerations, we have $\Cov(f_{8,6}) = \lambda \Cov(\chi_{10}) X$ for some~$\lambda\in\mathbb{Q}^\times$. We have seen above that $\Cov(\chi_{10})X$ is defined over~$\mathbb{Z}$ and primitive; therefore, if we can show that the Fourier coefficients of~$f_{8,6}$ are integers with gcd~$1$, we will have~$\lambda=\pm 1$. In order to obtain~$\lambda=1$, we can use Thomae's formula on one curve, perform a certified numerical evaluation over~$\C$, or study degenerations from hyperelliptic curves to elliptic curves using the formula from \cite[Thm.~1.II]{liu_CourbesStablesGenre1993}. As a consequence of \cref{prop:identification}, the identification of derivatives of Igusa invariants as explicit covariants (\cref{thm:vector-identification}) still holds over~$\mathbb{Z}[1/2]$. For the algebraic interpretation of Hilbert modular forms as sections of the Hodge bungle on~${\mathscr{H}_{g}}$, the Koecher principle and the $q$-expansion principle for Hilbert modular forms, we refer to \cite[\S 4]{chai_ArithmeticMinimalCompactification1990} and \cite[Thm.~6.7]{rapoport_CompactificationsEspaceModules1978}. We can check that the relation between derivatives of Igusa invariants on the Hilbert and Siegel sides (\cref{prop:djdt-djdtau}) and the characterization of potentially Hilbert-normalized curves (\cref{prop:tangent-humbert}) are still valid over~$\mathbb{Z}[1/2]$. \begin{details} \label{details:hilbert} More precisely, the Hilbert Hodge bundle $h=\pi_\ast \Omega^1_{{\mathscr{X}_{g}}/{\mathscr{H}_{g}}}$ is a locally free $\mathbb{Z}_K \otimes {\mathscr{H}_{g}}$-module, and Hilbert modular forms of weight $\chi$ are sections of the line bundle $h^\chi$ where the weights are given by $\chi \in G_{\mathbb{Z}_K}=\mathop{Res}_{\mathbb{Z}_K/\mathbb{Z}} \mathbb{G}_{m,\mathbb{Z}_K} \times \mathbb{Z}_K$ \cite[Defs.~5.1 and~5.4]{andreatta_HilbertModularForms2005}, \cite[\S 6]{rapoport_CompactificationsEspaceModules1978}. If $K'$ is the normal closure of $K$, it splits $\mathbb{Z}_K$, and a choice of trivialization of $\mathbb{Z}_K \otimes K'$ induce a splitting of the torus $G_{K'}$, hence a basis of $g$ characters $\chi_1, \dots, \chi_g$. An Hilbert modular form of weight $\chi_1^{a_1} \dots \chi_g^{a_g}$ corresponds to a form of weight $(a_1, \dots a_g)$ in the notations of \cref{subsec:hilbert} \cite[p.\,2]{andreatta_HilbertModularForms2005}. Then the same reasoning as in \cref{prop:identification} shows that \cref{prop:f86-pullback} is valid over $\mathbb{Z}[1/2]$. \end{details} \subsection{Computing the tangent map in dimension~\texorpdfstring{$2$}{2}} \label{subsec:kodaira} In this section, we work over a field~$k$ of characteristic different from~$2$ and~$3$; this restriction is not essential and comes from our choice of invariants. We have seen that derivatives of Igusa invariants are defined over~$\mathbb{Z}[1/2]$, and hence make sense over~$k$. We keep the matrix notations from §\ref{subsec:norm-matrix}. \begin{prop} \label{prop:tangent_siegel} Let~$U$ be the open set of~$\stack_2$ over~$k$ consisting of abelian surfaces~$A$ such that $\Aut(A) = \{\pm 1\}$ and $j_3(A)\neq 0$. Let $\varphi\colon A\to A'$ be an $\ell$-isogeny over~$k$. Assume that $A,A'$ lie in~$U$, and denote their Igusa invariants by $j,j'$. Assume further that the subvariety of $\mathbb{A}^3\times\mathbb{A}^3$ cut out by modular equations is normal at $(j(A),j(A'))$. Let~${\mathcal{C}},{\mathcal{C}}'$ be hyperelliptic equations over~$k$ whose Jacobians are isomorphic to $A,A'$ respectively. Then \begin{enumerate} \item The isogeny~$\varphi$ is generic in the sense of \cref{def:generic}, in other words the $3\times 3$ matrices \begin{displaymath} D\Psi_{\ell,L}(j,j'),\quad D\Psi_{\ell,R}(j,j'),\quad D_\tau J({\mathcal{C}})\quad \text{and}\quad D_\tau J({\mathcal{C}}') \end{displaymath} are invertible. \item Let $d\varphi$ be the tangent matrix of~$\varphi$ with respect to~${\mathcal{C}},{\mathcal{C}}'$. Then \begin{displaymath} \Sym^2(d\varphi) = -\ell D_\tau J({\mathcal{C}}')^{-1}\cdot D\Psi_{\ell,R}(j, j')^{-1} \cdot D\Psi_{\ell,L}(j, j') \cdot D_\tau J({\mathcal{C}}). \end{displaymath} \end{enumerate} \end{prop} \begin{proof} By \cref{cor:criteria}, both~$A$ and~$A'$ are smooth points of~$\coarse_{g}$, and the deformation map $\mathscr{D}(\varphi)$ is $d\mathbf{\Phi}_{\ell,2}(\varphi)\circ d\mathbf{\Phi}_{\ell,1}(\varphi)^{-1}$. Since~$A$ has generic automorphisms,~$A$ is not a product of elliptic curves; moreover $j_3(A)\neq 0$, so the birational map $(j_1,j_2,j_3) \colon\coarse_{g}\to\mathbb{A}^3$ is well-defined and étale at~$A$. The map~${\stack_{g}}\to\coarse_{g}$ is also étale at~$A$, so the Igusa invariants are local uniformizers around~$A$ in ${\stack_{g}}$. This shows that~$\varphi$ is generic in the sense of \cref{def:generic}. We obtain the expression of $\Sym^2(d\varphi)$ by \cref{prop:defo_siegel}. \end{proof} If~$A$ lies in the open set~$U$ defined in \cref{prop:tangent_siegel} and~${\mathcal{C}}$ is a hyperelliptic equation for~$A$, then giving an element of~$\tangent{A}{{\stack_{g}}}$ is equivalent to giving one of the following: \begin{enumerate} \item A deformation~${\mathcal{C}}_\epsilon$ of~${\mathcal{C}}$ over $k[\epsilon]/(\epsilon^2)$, \item The Igusa invariants $j_1({\mathcal{C}}_\epsilon), j_2({\mathcal{C}}_\epsilon), j_3({\mathcal{C}}_\epsilon)$ in~$k[\epsilon]/(\epsilon^2)$, \item If $(w_1,w_2) = (x\,dx/y, dx/y)$ is the canonical basis of differential forms on~${\mathcal{C}}$, a vector $v=\alpha w_1^2 + \beta w_1 w_2 + \gamma w_2^2$ in $\Sym^2 \Omega^1({\mathcal{C}})$. \end{enumerate} Switching from one representation to another can be done at the cost of~$O(1)$ operations in~$k$ using the formul\ae\ for Igusa invariants, the expression of their derivatives as a covariant, and linear algebra. \begin{proofdetails} We simply specialize the results above, to get explicit Kodaira-Spencer formula in the genus~$2$ case. For simplicity we assume that we are over a field (of characteristic different from $2$). Let $C: v^2=E_C(u)$ be an hyperelliptic curve of genus~$2$ over $k$. We want to prove that to give a deformation of $\Jac(C)$ over $k[\epsilon]$ (with $\epsilon^2=0$), is the same as to give \begin{enumerate} \item\label{defo:i} A deformation $C_\epsilon / k[\epsilon]$ of $C$ \item\label{defo:ii} A deformation $E_{C,\epsilon}$ of $E_C$ \item\label{defo:iii} If $w_1=dx/y, w_2=xdx/y$ are the canonical basis of differential forms on $C$, a vector $v=\alpha w_1^2 + \beta w_1 w_2 + \gamma w_2^2$ in $\Sym^2 \Omega^1(C)$. \item\label{defo:iv} The Igusa invariants $j_1(C_\epsilon), j_2(C_\epsilon), j_3(C_\epsilon)$ (if $j_1(C) \ne 0$) \end{enumerate} The Torelli morphism from the stack of hyperelliptic curves to the stack of principally polarized abelian varieties is unramified, so in genus~$2$ induces an isomorphism on tangent space since their dimension are the same. Hence \cref{defo:i}. The equivalence of \cref{defo:i} and \cref{defo:ii} comes from the theory of hyperelliptic curves over a base scheme, and \cref{defo:iii} is the Kodaira-Spencer isomorphism. Finally \cref{defo:iv} comes from the discussion above \cref{prop:defomatrix}, since $j_1(C_\epsilon) \ne 0$ if $j_1(C) \ne 0$. Changing between these representations is done as follow: given $E_{C,\epsilon}$, we can evaluate $j_1(C_\epsilon), j_2(C_\epsilon), j_3(C_\epsilon)$ since they are rational functions on the coefficients of $E_{C,\epsilon}$. Conversely, from $j_1(C_\epsilon), j_2(C_\epsilon), j_3(C_\epsilon)$ we can recover the curve $C_\epsilon$ by applying Mestre's algorithm \cite{mestre_ConstructionCourbesGenre1991}. This algorithm requires finding a rational point on a conic, but since we know $C$ we just need to lift the point coming from $C$. Alternatively, writing the coefficients of $E_{C,\epsilon}$ as $a_i + \epsilon a'_i$ where $a_i$ are the coefficients of $E_C$, and then plugging the formulas for $j_1, j_2, j_3$, this amount to solving linear equations in the $a'_i$. If $C_\epsilon$ is a deformation coming from a tangent vector $w$, then $j_i(C_\epsilon)=j_i(C)+dj_i(C)(w)\epsilon$. Using \cref{prop:identification}, we can evaluate $dj_i(C)(w)$ for $w=w_1^2$, $w=w_1 w_2$ and $w=w_2^2$, hence for all $w$ by linearity. Conversely, given the $j_i(C_\epsilon)$, to search for $w$ such that $j_i(C_\epsilon)=j_i(C)+dj_i(C)(w)\epsilon$ we simply compute $dj_i(C)(w)$ for $w=w_1^2$, $w=w_1 w_2$ and $w=w_2^2$ and solve a linear equation. \end{proofdetails} In the Hilbert case, it is more difficult to ensure genericity in the sense of \cref{def:djdt-matrix} because the Hilbert embedding ${\mathscr{H}_{g}}\to{\stack_{g}}$ comes into play. We assume that~$k$ splits~$\mathbb{Z}_K$, and fix a trivialization of $\mathbb{Z}_K\otimes k$. \begin{prop} \label{prop:tangent_hilbert} Let $A,A'$ be abelian varieties representing $k$-points of~${\mathscr{H}_{g}}$, and let ${\mathcal{C}},{\mathcal{C}}'$ be hyperelliptic equations over~$k$ whose Jacobians are isomorphic to $A,A'$ respectively; assume that ${\mathcal{C}},{\mathcal{C}}'$ are Hilbert-normalized and that there exists a $\beta$-isogeny $\varphi\colon A\to A'$. Then we have \begin{displaymath} D\Psi_{\beta,L}(j, j') \cdot D_t J({\mathcal{C}}) = - D\Psi_{\beta,R}(j,j')\cdot D_t J({\mathcal{C}}') \cdot \Diag(1/\beta, 1/\conj{\beta})\cdot (d\varphi)^{2}. \end{displaymath} \end{prop} \begin{proof} This comes from the relation between the deformation and tangent matrices (\cref{prop:defo_hilbert}). \end{proof} The equality in \cref{prop:tangent_hilbert} only allows to compute $(d\varphi)^2$ when~$\varphi$ is generic. Even in this case, we get several possible candidates for~$d\varphi$ up to sign. The discussion of \cref{rem:trivialization} shows that \cref{prop:tangent-humbert}, which gives an algorithm to construct potentially Hilbert-normalized curve equations in genus~$2$, is still valid over~$k$. \begin{rem} The $3\times 2$ matrices $D_t J({\mathcal{C}})$ and $D_t J({\mathcal{C}}')$ have rank two when the Igusa invariants contain uniformizers of~${\mathscr{H}_{g}}$ at~$A$ and~$A'$ by \cite[IV.17.11.3]{grothendieck_ElementsGeometrieAlgebrique1964}. Given the relation between derivatives of Igusa invariants on the Hilbert and Siegel sides (\cref{prop:tangent-humbert}, which is valid over~$k$ by \cref{prop:ks_embedding}), this will be the case at soon as the images of~$A$ and~$A'$ in~$\coarse_{g}$ lie in the open set~$U$ from \cref{prop:tangent_siegel}. Assume that generators of the ring of Hilbert modular forms are known, and the expression of Igusa invariants in terms of these generators is given. Since modular forms realize a projective embedding of~${\mathbf{H}_{g}}$, one can compute from this data an open set~$V$ in~${\mathbf{H}_{g}}$ where the Igusa invariants contain local uniformizers. Then, if~$A$ lies in~$V$ and $\Aut(A)\iso \{\pm 1\}$, the Igusa invariants will contain local uniformizers of~${\mathscr{H}_{g}}$, hence $D_t J({\mathcal{C}})$ will have rank~$2$. \end{rem} In the Hilbert case, if Igusa invariants contain local uniformizers of~${\mathscr{H}_{g}}$ at~$A$ and if~${\mathcal{C}}$ is a Hilbert-normalized curve equation for~$A$, then giving an element of~$\tangent{A}{{\mathscr{H}_{g}}}$ is equivalent to giving \begin{enumerate} \item A deformation~${\mathcal{C}}_\epsilon$ of~${\mathcal{C}}$ over $k[\epsilon]/(\epsilon^2)$ with real multiplication by~$\mathbb{Z}_K$, \item Igusa invariants $j_1({\mathcal{C}}_\epsilon), j_2({\mathcal{C}}_\epsilon), j_3({\mathcal{C}}_\epsilon)$ in~$k[\epsilon]/(\epsilon^2)$ lying on the Humbert surface (if $j_1({\mathcal{C}}) \ne 0$), \item If $(w_1,w_2) = (x\,dx/y, dx/y)$ is the canonical basis of differential forms on~${\mathcal{C}}$, a vector $v=\alpha w_1^2 + \gamma w_2^2$ in $\Sym^2 \Omega^1({\mathcal{C}})$. \end{enumerate} Switching from one representation to another can be done at the cost of~$O(1)$ operations in~$k$. \begin{proofdetails} Indeed, this is immediate by \cref{prop:explicit_ks_g2}. When $g=2$, the Humbert surface is enough to determine a potentially Hilbert normalized basis, as explained in \cref{rem:trivialization}, we may even only assume that ${\mathcal{C}}$ is potentially Hilbert normalized. This give an algebraic interpretation of \cref{subsec:curves}, and as a corollary, we get that Algorithms \cref{algo:hilb-curve-1,algo:hilb-curve-2} are valid over an arbitrary field (of characteristic different from two). \end{proofdetails} \section{Computing the isogeny from its tangent map} \label{sec:alg} \subsection{General strategy} \label{subsec:introalg} Assume that we are given the tangent map~$d\varphi$ of a separable isogeny $\varphi\colon A \to A'$ of principally polarized abelian varieties of dimension~$g$ defined over a field~$k$. In general, the task of \emph{computing~$\varphi$ explicitly} may be specified as follows: given models of~$A$ and~$A'$, that is given very ample line bundles~$\mathcal{L}_A$ and~$\mathcal{L}_{A'}$ on~$A$ and~$A'$ and a choice of global sections~$(a_i)$ (resp.~$(a'_j)$) which give a projective embedding of~$A$ (resp.~$A'$), express the functions~$\varphi^\ast a'_j$ on~$A$ as rational fractions in terms the coordinates~$(a_i)$. One method to determine~$\varphi$ given~$d\varphi$ is to work over the formal groups of~$A$ and $A'$. Let $x_1, \ldots, x_g$ be uniformizers at $0_A$, and let $y_1, \ldots, y_g$ be uniformizers at $0_{A'}$. Knowing the map $d\varphi$ allows us to express the differential form~$\varphi^\ast dy_j$ in term of the differential forms~$dx_i$ on~$A$, so the functions~$\varphi^\ast a'_j$ satisfy a differential system. A possible strategy to solve this differential system is to use a multivariate Newton algorithm, possibly over an extension of the formal group. If this algorithm is successful, we recover the functions~$\varphi^\ast a'_j$ as power series in $k[[x_1, \ldots, x_g]]$ up to some precision. The next step is to use multivariate rational reconstruction to obtain~$\varphi$ as a rational map. In order for the rational reconstruction algorithm to succeed, the power series precision must be large enough with respect to the degrees of the result in the variables~$(a_i)$. These degrees can be estimated from the intersection degree of $\varphi^\ast\mathcal{L}_{A'}$ and~$\mathcal{L}_A$, or alternatively from the intersection degree of $\varphi_\ast\mathcal{L}_A$ and~$\mathcal{L}_{A'}$. This strategy to compute~$\varphi$ is not new: the idea of using a differential equation to compute isogenies in genus~$1$ appears in \cite{elkies_EllipticModularCurves1998}, and \cite{bostan_FastAlgorithmsComputing2008} uses a Newton algorithm to solve this differential equation. To the best of our knowledge, the first article to extend these ideas to genus~$2$ is \cite{couveignes_ComputingFunctionsJacobians2015}. The method is further extended to compute endomorphisms of Jacobians over a number field in \cit {costa_RigorousComputationEndomorphism2019}. In \cite[\S 6]{costa_RigorousComputationEndomorphism2019}, the endomorphism is represented as a divisorial correspondence; the interpolation of this divisor is done a bit differently, via linear algebra on Riemann--Roch spaces. A necessary condition for the whole method to work is that~$\varphi$ be completely determined by its tangent map. In general, this will be the case when $\chr k$ is large with respect to the degree of~$\varphi$. For instance, we have the following statement in the case of $\ell$-isogenies. \begin{lem} Let~$A$ and~$A'$ be two principally polarized abelian varieties over a field~$k$, and $M: T_0(A) \to T_0(A')$ a linear map. Assume that that $\chr k =0$ or $\chr k> 4N$. Then there is at most one $\ell$-isogeny $\varphi\colon A \to A'$ with $\ell \leq N$ such that $d\varphi=M$. \end{lem} \begin{proof} Let~$\varphi_1$ and $\varphi_2$ be two such isogenies. Then $\varphi_1=\varphi_2+\psi$ where $\psi$ is inseparable. If $\chr k =0$, this implies $\psi=0$ and hence $\varphi_1=\varphi_2$. Otherwise, write $p=\chr k$ and denote by $\overline{\varphi_1}$ the contragredient isogeny. Then if $\psi\neq 0$, we have \begin{displaymath} \psi \overline{\psi} = \varphi_2 \overline{\varphi_2} + \varphi_1 \overline{\varphi_1} - \varphi_1 \overline{\varphi_2} - \varphi_2 \overline{\varphi_1}. \end{displaymath} But $\psi \overline{\psi}$ is equal to $p^m$ for some $m\geq 1$, and $\varphi_1 \overline{\varphi_1}=\ell_1$, $\varphi_2 \overline{\varphi_2}=\ell_2$ with $\ell_1,\ell_2 \leq N$ by hypothesis. Therefore we obtain $p^m \leq 2N + 2 \sqrt{N}\sqrt{N} = 4N$. \end{proof} In practice, Newton iterations will fail to reach sufficiently high power series precision if $\chr k$ is too small, hence the bound given in \cref{thm:main}. In the rest of this section, we carry out this strategy in detail when $A,A'$ are the Jacobians of genus~$2$ hyperelliptic curves ${\mathcal{C}},{\mathcal{C}}'$. Concretely, we are given the matrix of $d\varphi$ in the bases of~$T_0(A)$ and~$T_0(A')$ that are dual to~$\omega({\mathcal{C}})$ and~$\omega({\mathcal{C}}')$ respectively (see §\ref{subsec:hyperelliptic}). In this case, a nice simplification occurs: the isogeny~$\varphi$ is completely determined by the compositum \begin{displaymath} \begin{tikzcd} {\mathcal{C}} \ar[rr, hook, "{Q\mapsto [Q-P]}" ] & & \Jac({\mathcal{C}}) \ar[r, "{\varphi}" ] & \Jac({\mathcal{C}}') \ar[r, dashed, "\sim"] & {\mathcal{C}}'^{2,\ensuremath{\mathrm{sym}}} \ar[r, dashed, "m"] & \mathbb{A}^4 \end{tikzcd} \end{displaymath} where~$P$ is any point on~${\mathcal{C}}$, and $m$ is the rational map given by \begin{displaymath} \{(x_1,y_1),(x_2,y_2)\} \mapsto \Bigl(x_1+x_2,\ x_1x_2,\ y_1y_2,\ \frac{y_2-y_1}{x_2-x_1}\Bigr). \end{displaymath} This compositum is a tuple of four rational fractions $s,p,q,r\in k(u,v)$ that we call the \emph{rational representation of~$\varphi$ at the base point~$P$}. We choose a uniformizer~$z$ of~${\mathcal{C}}$ around~$P$ and perform the Newton iterations and rational reconstruction over the \emph{univariate} power series ring~$k[[z]]$ We explain how we choose the base point~$P$ and solve the differential system in \cref{subsec:diffsyst}. One difficulty is that the differential system we obtain is singular (\cref{lem:det-valuation}), so we need to use the geometry of the curves (\cref{prop:imagept}) to find the first few terms in the series before switching to Newton iterations (\cref{prop:newton-mde}). In \cref{subsec:rational}, we estimate the degrees of the rational fractions that we want to compute and present the rational reconstruction step. \subsection{Solving the differential system} \label{subsec:diffsyst} We keep the notation used in~§\ref{subsec:introalg}. Write the curve equations ${\mathcal{C}},{\mathcal{C}}'$ and the tangent matrix as \begin{displaymath} {\mathcal{C}}\,:\, v^2 = E_{{\mathcal{C}}}(u),\quad {\mathcal{C}}'\,:\, y^2 = E_{{\mathcal{C}}'}(x), \quad d\varphi = \mat{m_{1,1}}{m_{1,2}}{m_{2,1}}{m_{2,2}}. \end{displaymath} We assume that~$\varphi$ is separable, so that~$d\varphi$ is invertible. If~$P$ is a base point on ${\mathcal{C}}$, we denote by $\varphi_P$ the associated map ${\mathcal{C}}\to{\mathcal{C}}'^{2,\ensuremath{\mathrm{sym}}}$. \paragraph{Step 1: choice of base point and power series.} Let~$P$ be a point on~${\mathcal{C}}$ which is not at a point at infinity; up to enlarging~$k$, we assume that $P\in{\mathcal{C}}(k)$. Since~$\varphi_P(P)$ is zero in~$\Jac({\mathcal{C}}')$, we have \begin{displaymath} \varphi_P(P) = \bigl\{Q, i(Q)\bigr\} \end{displaymath} for some~$Q\in{\mathcal{C}}'$, where~$i$ denotes the hyperelliptic involution. We say that~$\varphi_P$ is of \emph{Weierstrass type} if~$Q$ is a Weierstrass point of~${\mathcal{C}}'$, and of \emph{generic type} otherwise. If $z$ is a local uniformizer of~${\mathcal{C}}$ at~$P$, and~$R$ is an étale extension of~$k[[z]]$, we define a \emph{local lift of~$\varphi_P$ at~$P$ with coefficients in~$R$} to be a tuple $\widetilde{\varphi}_P = (x_1, x_2, y_1, y_2) \in R^4$ such that we have a commutative diagram \begin{displaymath} \begin{tikzcd} \Spec R \ar[rrr, "{(x_1,y_1), (x_2,y_2)}"] \ar[d] &&& {\mathcal{C}}'^{\,2} \ar[d] \\ \Spec k[[z]] \ar[r] & {\mathcal{C}} \ar[rr, "\varphi_P"] && {\mathcal{C}}'^{\,2,\ensuremath{\mathrm{sym}}}. \end{tikzcd} \end{displaymath} If the power series $x_1,x_2,y_1,y_2$ define a local lift of~$\varphi_P$, then they satisfy the differential system \eqref{eq:diffsyst} given by \begin{equation*} \label{eq:diffsyst} \tag{$S$} \begin{cases} \begin{matrix} \dfrac{x_1\, dx_1}{y_1} + \dfrac{x_2\, dx_2}{y_2} & = & (m_{1,1} u + m_{1,2}) \dfrac{du}{v} \\ \dfrac{dx_1}{y_1} + \dfrac{dx_2}{y_2} & = & (m_{2,1} u + m_{2,2}) \dfrac{du}{v} \\ y_1^2 = E_{{\mathcal{C}}'}(x_1) & & \\ y_2^2 = E_{{\mathcal{C}}'}(x_2), & & \end{matrix} \end{cases} \end{equation*} where we consider the coordinates $u,v$ on~${\mathcal{C}}$ as elements of~$k[[z]]$, and the letter~$d$ denotes derivation with respect to~$z$. When solving~\eqref{eq:diffsyst}, we want~$\varphi_P$ to be of generic type. \Cref{prop:imagept} shows how to choose~$P$ to enforce this condition; in order to prove it, we first study the existence of local lifts for arbitrary base points. \begin{lem} \label{lem:lift} Let~$z$ be a uniformizer of~${\mathcal{C}}$ at~$P$. Then there is a quadratic extension $k'/k$ such that a local lift of~$\varphi_P$ at~$P$ with coefficients in $R = k'[[\sqrt{z}]]$ exists. Moreover, if~$\varphi_P$ is of generic type, or if~$P$ is a Weierstrass point of~${\mathcal{C}}$, then the same statement holds with $R = k'[[z]]$. \end{lem} \begin{proof} First assume that~$\varphi_P$ is of generic type. Since the unordered pair $\bigl\{Q, i(Q)\bigr\}$ is Galois-invariant, there is a quadratic extension $k'/k$ such that~$Q$ is defined over $k'$. The map ${\mathcal{C}}'^{\,2}\to {\mathcal{C}}'^{\,2,\ensuremath{\mathrm{sym}}}$ is étale at $\bigr(Q, i(Q)\bigr)$, so induces an isomorphism of completed local rings. Therefore a local lift exists over~$k'[[z]]$. Second, assume that~$\varphi_P$ is of Weierstrass type. The map $\Spec k[[z]]\to{\mathcal{C}}'^{2,\ensuremath{\mathrm{sym}}}$ defines a $k((z))$-point of~${\mathcal{C}}'^{2,\ensuremath{\mathrm{sym}}}$, and there exists a preimage of this point defined over an extension $K/k((z))$ of degree~$2$. Let~$R$ be the integral closure of $k[[z]]$ in~$K$. Then $R$ is contained in $k'[[\sqrt{z}]]$ for some quadratic extension $k'/k$ \stackcite{09E8}. By the valuative criterion of properness, our $K$-point of ${\mathcal{C}}'^2$ extends to an $R$-point uniquely, so a local lift exists over~$R$. Finally, assume that~$\varphi_P$ is of Weierstrass type and that~$P$ is a Weierstrass point of~${\mathcal{C}}$. Let $(x_1,x_2,y_1,y_2)$ be a local lift of~$\varphi_P$ over~$k'[[\sqrt{z}]]$. The completed local ring of the Kummer line of~${\mathcal{C}}$ at~$P$ is~$k[[z^2]]$, and the unordered pair~$\{x_1,x_2\}$ is defined on the Kummer line; by the same argument as above, $x_1$ and $x_2$ are defined over~$k'[[z]]$. The system~\eqref{eq:diffsyst} can be written as \begin{displaymath} \vectwo{1/y_1}{1/y_2} = \mat{x_1 x_1'}{x_2 x_2'}{x_1'}{x_2'}^{-1} \vectwo{R_1(z)}{R_2(z)} \end{displaymath} for some series $R_1, R_2\in k[[z]]$, hence~$y_1$ and~$y_2$ are defined over~$k'[[z]]$ as well. \end{proof} Consider the tangent space $T_{(Q,i(Q))}\, {\mathcal{C}}'^2$ of ${\mathcal{C}}'^2$ at $\bigl(Q, i(Q)\bigr)$. It decomposes as \begin{displaymath} T_{(Q,i(Q))}\, {\mathcal{C}}'^{\,2} = T_Q\, {\mathcal{C}}' \oplus T_{i(Q)}\, {\mathcal{C}}' \simeq (T_Q\, {\mathcal{C}}')^2 \end{displaymath} where the last map is given by the hyperelliptic involution on the second term. \begin{lem} \label{lem:colinear} Assume that a local lift~$\widetilde{\varphi}_P$ of~$\varphi_P$ to~$k'[[z]]$ exists. Then the tangent vector $d\widetilde{\varphi}_P/dz$ at $z=0$ cannot be of the form $(v, v)$ where $v\in T_Q\, {\mathcal{C}}'$. \end{lem} \begin{proof} Assume the contrary. The direction $(v,v)$ is contracted to zero in the Jacobian, so every differential form on the Jacobian is pulled back to zero via~$\varphi_P$. This is a contradiction because $\varphi^*$ is nonzero. \end{proof} \begin{prop} \label{prop:imagept} The point~$Q$ is uniquely determined by the property that, up to a scalar factor, \begin{displaymath} \varphi^*\omega'_Q = \omega_P \end{displaymath} where~$\omega_P$ (resp.~$\omega'_Q$) is a nonzero differential form on~${\mathcal{C}}$ (resp.~${\mathcal{C}}'$) vanishing at~$P$ (resp.~$Q$). \end{prop} \begin{proof} First, assume that a local lift $\widetilde{\varphi}_P$ exists over~$k'[[z]]$. By \Cref{lem:colinear}, the tangent vector $d\widetilde{\varphi}_P/dz$ at $z=0$ is of the form $(v+w, w)$ for some $v,w\in T_Q{\mathcal{C}}'$ such that $v\neq 0$. Let~$\omega'$ be the unique nonzero differential form pulled back to~$\omega_P$ by~$\varphi$. Then~$\omega'$ must vanish on $(v, 0)$, in other words~$\omega'$ must vanish at~$Q$. Second, assume that no such lift exists. By \Cref{lem:lift}, $Q$ is a Weierstrass point on~${\mathcal{C}}'$, and~$P$ is not a Weierstrass point on~${\mathcal{C}}$. After a change of variables, we may assume that~$Q$ is not at infinity. Write $P = (u_0, v_0)$ with $v_0\neq 0$, and $Q = (x_0, 0)$. We have to show that \begin{displaymath} x_0 = \dfrac{m_{1,1} u_0 + m_{1,2}}{m_{2,1}u_0 + m_{2,2}}. \end{displaymath} Let $(x_1,y_1,x_2,y_2)$ be a lift over $k'[[\sqrt{z}]]$ as in \Cref{lem:lift}, and look at the differential system~\eqref{eq:diffsyst}. Write the lift as \begin{displaymath} y_1 = v_1\sqrt{z} + t_1 z + O(z^{3/2}) , \quad y_2 = v_2\sqrt{z} + t_2 z + O(z^{3/2}). \end{displaymath} Then the relation $y^2 = E_{{\mathcal{C}}'}(x)$ forces $x_1, x_2$ to have no term in $\sqrt{z}$, so that \begin{displaymath} x_1 = x_0 + w_1 z + O(z^{3/2}),\quad x_2 = x_0 + w_2z + O(z^{3/2}). \end{displaymath} Using the relation $dx/y = 2 dy/E_{{\mathcal{C}}'}'(x)$, we have \begin{displaymath} \begin{cases} 2 x_1 \dfrac{dy_1}{E_{{\mathcal{C}}'}'(x_1)} + 2 x_2 \dfrac{dy_2}{E_{{\mathcal{C}}'}'(x_2)} = (m_{1,1} u + m_{1,2})\dfrac{du}{v}, \\ 2 \dfrac{dy_1}{E_{{\mathcal{C}}'}'(x_1)} + 2 \dfrac{dy_2}{E_{{\mathcal{C}}'}'(x_2)} = (m_{2,1} u + m_{2,2})\dfrac{du}{v}. \end{cases} \end{displaymath} Inspection of the~$(\sqrt{z})^{-1}$ term gives the relation $v_1 = -v_2$. Write $e = E_{{\mathcal{C}}'}'(x_0)$. Then the constant term of the series on the left hand side are respectively \begin{displaymath} 2 x_0 \Bigl(\frac{t_1}{e} + \frac{t_2}{e}\Bigr)\quad\text{and} \quad 2 \Bigl(\frac{t_1}{e} + \frac{t_2}{e} \Bigr). \end{displaymath} The differential forms on the right hand side do not vanish simultaneously at~$P$, therefore $m_{2,1}u_0 + m_{2,2}$ must be nonzero. Taking the quotient of the two lines gives the result. \end{proof} Using \Cref{prop:imagept}, we choose a base point~$P$ on~${\mathcal{C}}$ such that~$\varphi_P$ is of generic type. By \cref{lem:lift}, a local lift $\widetilde{\varphi}_P = (x_1,x_2,y_1,y_2)$ of~$\varphi_P$ exists over~$k'[[z]]$, where~$k'$ is a quadratic extension of~$k$. \begin{details} Let $U$, $D$ be the power series in $z$ with respective constant terms $u_0$, $d_0$ such that $u = U(z)$ and $du/v = D(z)\, dz$. Then we can rewrite~\eqref{eq:diffsyst} as follows: \begin{equation*} \label{eq:diffsyst-ps} \tag{$S$} \begin{cases} \begin{matrix} \dfrac{x_1 x_1'}{y_1} + \dfrac{x_2 x_2'}{y_2} & = & (m_{1,1}U + m_{2,1}) D\\ \dfrac{x_1'}{y_1} + \dfrac{x_2'}{y_2} & = & (m_{2,1}U + m_{2,2}) D\\ y_1^2 = E_{{\mathcal{C}}'}(x_1) & & \\ y_2^2 = E_{{\mathcal{C}}'}(x_2). & & \end{matrix} \end{cases} \end{equation*} \end{details} \paragraph{Step 2: initialization.} Now we explain how to compute the power series $x_1,x_2,y_1,y_2$ up to $O(z^2)$. We can compute the point $Q = (x_0,y_0)$ using \Cref{prop:imagept}. Write \begin{displaymath} x_1 = x_0 + v_1 z + O(z^2), \quad x_2 = x_0 + v_2 z + O(z^2). \end{displaymath} Then, using the curve equations, we can compute $y_1, y_2$ up to~$O(z^2)$ in terms of $v_1, v_2$ respectively. Let $u_0$ (resp.~$d_0$) be the constant term of the power series~$u$ (resp.~$du/v$). Then~\eqref{eq:diffsyst} gives \begin{equation} \label{eq:vi1} v_1 + v_2 = \dfrac{y_0}{x_0}(m_{1,1}u_0 + m_{2,1}) d_0 = y_0 (m_{2,1}u_0 + m_{2,2}) d_0. \end{equation} Combining the two lines, we also obtain \begin{displaymath} (x_1 - x_0) \dfrac{dx_1}{y_1} + (x_2 - x_0) \dfrac{dx_2}{y_2} = R, \end{displaymath} where $R= r_1z + O(z^2)$ has no constant term. At order 1, this yields \begin{equation} \label{eq:vi2} v_1^2 + v_2^2 = y_0 r_1. \end{equation} Equalities~\eqref{eq:vi1} and~\eqref{eq:vi2} yield a quadratic equation satisfied by $v_1, v_2$. This gives the values of $v_1$ and $v_2$ in a quadratic extension $k'/k$. \paragraph{Step 3: Newton iterations.} Assume that the series $x_1, x_2, y_1, y_2$ are known up to~$O(z^n)$ for some $n\geq 2$. The system~\eqref{eq:diffsyst} is satisfied up to~$O(z^{n-1})$ for the first two lines, and~$O(z^n)$ for the last two lines. We attempt to double the precision, and write \begin{displaymath} x_1 = x_1^0(z) + \delta x_1(z) + O(z^{2n}),\ \text{etc.} \end{displaymath} where $x_1^0$ is the polynomial of degree at most $n-1$ that has been computed. The series~$\delta x_i$ and~$\delta y_i$ start at the term~$z^n$. From now on, we also denote by~$x'$ the derivative of a power series~$x$ with respect to~$z$. \begin{prop} \label{prop:diffsyst-linearize} The power series~$\delta x_1$, $\delta x_2$ satisfy a linear differential equation of the first order \begin{equation} \label{eq:mde} \tag{$E_n$} M(z) \vectwo{\delta x_1'}{\delta x_2'} + N(z) \vectwo{\delta x_1}{\delta x_2} = R(z) + O(z^{2n-1}) \end{equation} where $M, N, R\in \mathcal{M}_2\bigl(k'[[z]]\bigr)$ have explicit expressions in terms of $x_1^0$, $x_2^0$, $y_1^0$, $y_2^0$, $u$, $v$, $E_{{\mathcal{C}}}$ and $E_{{\mathcal{C}}'}$. In particular, \begin{displaymath} M(z) = \mat{x_1^0/y_1^0}{x_2^0/y_2^0}{1/y_1^0}{1/y_2^0} \end{displaymath} and, writing $e = E_{{\mathcal{C}}'}'(x_0)$, the constant term of $N$ is \begin{displaymath} \mat{\dfrac{v_1}{y_0} - \dfrac{x_0 v_1}{2 y_0^3} e}{\dfrac{v_2}{y_0} - \dfrac{x_0 v_2}{2 y_0^3} e}{-\dfrac{v_1}{2 y_0^3} e}{-\dfrac{v_2}{2 y_0^3} e}. \end{displaymath} \end{prop} \begin{proof} Linearize the system~\eqref{eq:diffsyst}. We omit the calculations. \end{proof} In order to solve~\eqref{eq:diffsyst} in quasi-linear time in the precision, it is enough to solve equation~\eqref{eq:mde} in quasi-linear time in~$n$. One difficulty here, that does not appear in similar works~\cite{couveignes_ComputingFunctionsJacobians2015, costa_RigorousComputationEndomorphism2019}, is that the matrix~$M$ is not invertible in $k'[[z]]$. Still, we can adapt the generic divide-and-conquer algorithm from~\cite[§13.2]{bostan_AlgorithmesEfficacesCalcul2017}. \begin{lem} \label{lem:det-valuation} The determinant \begin{displaymath} \det M(z) = \dfrac{x_1^0 - x_2^0}{y_1^0 y_2^0} \end{displaymath} has valuation one. \end{lem} \begin{proof} We know that~$y_1^0$ and~$y_2^0$ have constant term~$\pm y_0\neq 0$. The polynomials~$x_1^0$ and~$x_2^0$ have the same constant term~$x_0$, but they do not coincide at order~$2$: if they did, then so would~$y_1$ and~$y_2$ because of the curve equation, contradicting \Cref{lem:colinear}. \end{proof} By \Cref{lem:det-valuation}, we can find $I\in\mathcal{M}_2\bigl(k[[z]]\bigr)$ such that $IM = \mat{z}{0}{0}{z}$. \begin{lem} \label{lem:invertible} Let $\kappa\geq 1$, and assume that $\chr k > \kappa+1$. Let $A = IN$. Then the matrix $A+\kappa$ has an invertible constant term. \end{lem} \begin{proof} By \Cref{lem:det-valuation}, the leading term of $\det(M)$ is $\lambda z$ for some nonzero $\lambda\in k'$. Using \Cref{prop:diffsyst-linearize}, we compute that the constant term of $\det(A+\kappa)$ is $\lambda^2 \kappa(\kappa+1)$. We omit the calculations. \end{proof} \begin{prop} \label{prop:newton-mde} Let $1\leq \nu\leq 2n-1$, and assume that $\chr k > \nu$. Then we can solve~\eqref{eq:mde} to compute $\delta x_1$ and $\delta x_2$ up to precision $O(z^\nu)$ using $\smash{\widetilde{O}}(\nu)$ operations in $k'$. \end{prop} \begin{proof} Write $\theta = \vectwo{\delta x_1}{\delta x_2}$. Multiplying~\eqref{eq:mde} by~$I$, we obtain the equation \begin{displaymath} z \theta' + (A + \kappa) \theta = B + O(z^{d}), \quad \text{where } d = 2n-1,\ \kappa=0. \end{displaymath} We show that~$\theta$ can be computed from this kind of equation up to~$O(z^d)$ using a divide-and-conquer strategy. If~$d>1$, write $\theta = \theta_1 + z^{d_1}\theta_2$ where $d_1 = \lfloor d/2\rfloor$. Then we have \begin{displaymath} z\theta_1' + (A + \kappa)\theta_1 = B + O(z^{d_1}) \end{displaymath} for some other series~$B$. By induction, we can recover~$\theta_1$ up to~$O(z^d)$. Then \begin{displaymath} z\theta_2' + (A + \kappa + d_1)\theta_2 = E + O(z^{d-d_1}) \end{displaymath} where~$E$ has an expression in terms of~$\theta_1$. This is enough to recover~$\theta_2$ up to~$O(z^{n-1-d})$, so we can recover~$\theta$ up to~$O(z^{n-1})$. We initialize the induction with the case $d=1$, where we have to solve for the constant term in \begin{displaymath} (A + \kappa)\theta = B. \end{displaymath} Since~$\theta$ starts at~$z^2$, the values of~$\kappa$ that occur are $2,\ldots, \nu-1$ when computing the solution of~\eqref{eq:diffsyst} up to precision~$O(z^\nu)$. By \Cref{lem:invertible}, the constant term of $A+\kappa$ is invertible. This concludes the induction, and the result follows from standard lemmas in computer algebra~\cite[Lem.~1.12]{bostan_AlgorithmesEfficacesCalcul2017}. \end{proof} \begin{prop} \label{prop:newton} Let $\nu\geq 1$, and assume that $\chr k > \nu$. Then we can compute the lift $\widetilde{\varphi}_P$ up to precision $O(z^\nu)$ within $\smash{\widetilde{O}}(\nu)$ operations in $k'$. \end{prop} \begin{proof} This is a consequence of \Cref{prop:newton-mde} and~\cite[Lem.~1.12]{bostan_AlgorithmesEfficacesCalcul2017}. \end{proof} \subsection{Rational reconstruction} \label{subsec:rational} Finally, we want to recover the rational representation $(s, p, q, r)$ of~$\varphi$ at~$P$ from its power series expansion~$\widetilde{\varphi}_P$ at some finite precision. First, we estimate the degrees of the rational fractions we want to compute; second, we present the reconstruction algorithm. \paragraph{Degree estimates.} The degrees of $s, p, q, r$ as morphisms from~${\mathcal{C}}$ to~$\mathbb{P}^1$ can be computed as intersection numbers of divisors on~$\Jac({\mathcal{C}}')$, namely~$\varphi_P({\mathcal{C}})$ and the polar divisors of $s$, $p$, $q$ and $r$ as functions on~$\Jac({\mathcal{C}}')$. They are already known in the case of an~$\ell$-isogeny. \begin{prop}[{\cite[§6.1]{couveignes_ComputingFunctionsJacobians2015}}] \label{prop:degree-siegel} Let $\varphi\colon\Jac({\mathcal{C}})\to\Jac({\mathcal{C}}')$ be an $\ell$-isogeny, and let $P\in{\mathcal{C}}(k)$. Let $(s,p,q,r)$ be the rational representation of $\varphi$ at the base point $P$. Then the degrees of $s$, $p$, $q$ and $r$ as morphisms from ${\mathcal{C}}$ to $\mathbb{P}^1$ are $4\ell$, $4\ell$, $12\ell$, and $8\ell$ respectively. \end{prop} Now assume that~$\Jac({\mathcal{C}})$ and~$\Jac({\mathcal{C}}')$ have real multiplication by $\mathbb{Z}_K$ given by embeddings $\iota,\iota'$, and that \begin{displaymath} \varphi\colon \bigl(\Jac({\mathcal{C}}),\iota\bigr) \to \bigl(\Jac({\mathcal{C}}'),\iota'\bigr) \end{displaymath} is a $\beta$-isogeny. Denote the theta divisors on~$\Jac({\mathcal{C}})$ and~$\Jac({\mathcal{C}}')$ by~$\Theta$ and~$\Theta'$ respectively, and denote by $\eta_P\colon{\mathcal{C}}\to\Jac({\mathcal{C}})$ the map $Q\mapsto[Q-P]$. Then~$\eta_P({\mathcal{C}})$ is algebraically equivalent to~$\Theta$. \begin{lem} \label{lem:spqr-poles} The polar divisors of $s, p, q, r$ as rational functions on~$\Jac({\mathcal{C}}')$ are algebraically equivalent to $2\Theta'$, $2\Theta'$, $6\Theta'$ and $4\Theta'$ respectively. \end{lem} \begin{proof} See \cite[§6.1]{couveignes_ComputingFunctionsJacobians2015}. For instance, $s = x_1 + x_2$ has a pole of order~$1$ along each of the two divisors $\bigl\{(\infty_{\pm}, Q) \,|\, Q\in {\mathcal{C}}\bigr\}$, where~$\infty_\pm$ are the two points at infinity on~${\mathcal{C}}$, assuming that we choose a degree 6 hyperelliptic model for~${\mathcal{C}}'$. Each of these divisors is algebraically equivalent to~$\Theta'$. The proof for $p$, $q$, and $r$ is similar. \end{proof} Recall that divisor classes on $\Jac({\mathcal{C}}')$ are in bijective correspondence with isomorphism classes of line bundles. By \Cref{thm:NS-End}, if $(A,\iota)$ is a principally polarized abelian surface with real multiplication by $\mathbb{Z}_K$, then there is a bijection $\alpha\mapsto{\mathcal{L}}_{A}^{\iota(\alpha)}$ between $\mathbb{Z}_K$ and the Néron--Severi group of~$A$. \begin{lem} \label{lem:image-divisor} Let~$\varphi$ be a $\beta$-isogeny as above. Then the divisor~$\varphi_P({\mathcal{C}})$ is algebraically equivalent to the divisor corresponding to the line bundle $\displaystyle{\mathcal{L}}_{\Jac({\mathcal{C}}')}^{\iota'(\conj{\beta})}$. \end{lem} \begin{proof} By \Cref{thm:NS-End}, there exists an~$\alpha\in\mathbb{Z}_K$ such that the divisor~$\varphi_P({\mathcal{C}})$ corresponds to the line bundle~${\mathcal{L}}_{\Jac({\mathcal{C}}')}^{\iota'(\alpha)}$ up to algebraic equivalence. Look at the pullback $\varphi^*\bigl(\varphi_P({\mathcal{C}})\bigr)$ as a divisor on~$\Jac({\mathcal{C}})$: by definition, we have \begin{displaymath} \varphi^*\bigl(\varphi_P({\mathcal{C}}) \bigr) = \sum_{x\in\ker\varphi} \bigl(x + \eta_P({\mathcal{C}}) \bigr) \end{displaymath} and therefore, up to algebraic equivalence, \begin{displaymath} \varphi^*\bigl(\varphi_P({\mathcal{C}}) \bigr) = (\#\ker\varphi)\Theta = N_{K/\mathbb{Q}}(\beta)\Theta. \end{displaymath} Since~$\varphi$ is a $\beta$-isogeny, by \Cref{def:beta-isog}, the pullback~$\varphi^*\Theta'$ corresponds to~${\mathcal{L}}_{\Jac({\mathcal{C}})}^{\iota(\beta)}$ up to algebraic equivalence. Therefore, for every~$\gamma\in\mathbb{Z}_K$, \begin{displaymath} \varphi^*{\mathcal{L}}_{\Jac({\mathcal{C}}')}^{\iota'(\gamma)} = {\mathcal{L}}_{\Jac({\mathcal{C}})}^{\iota(\gamma\beta)}. \end{displaymath} By \Cref{thm:NS-End} applied on~$\Jac({\mathcal{C}})$, we have $\alpha\beta = N_{K/\mathbb{Q}}(\beta)$, so $\alpha = \conj{\beta}$. \end{proof} The next step is to compute the intersection degree of~$\Theta'$ and the divisor corresponding to ${\mathcal{L}}_{\Jac({\mathcal{C}}')}^{\iota(\alpha)}$ on~$\Jac({\mathcal{C}}')$, for every~$\alpha\in\mathbb{Z}_K$. \begin{prop}[{\cite[Rem.~16]{kani_EllipticSubcoversCurve2019}}] \label{prop:end-quadform} Let~$(A,\iota)$ be a principally polarized abelian surface with real multiplication by~$\mathbb{Z}_K$, and let~$\Theta$ be its theta divisor. Then the quadratic form \begin{displaymath} D \mapsto (D\cdot\Theta)^2 - 2(D\cdot D) \end{displaymath} on~$\NS(A)$ corresponds via the isomorphism of \cref{thm:NS-End} to the quadratic form on~$\mathbb{Z}_K$ given by \begin{displaymath} \alpha\mapsto 2\Tr_{K/\mathbb{Q}}(\alpha^2) - \dfrac{1}{2}\Tr_{K/\mathbb{Q}}(\alpha)^2. \end{displaymath} \end{prop} \begin{cor} \label{cor:theta-intersection} Let~$(A,\iota)$ be a principally polarized abelian surface with real multiplication by~$\mathbb{Z}_K$, and let~$\Theta$ be its theta divisor. Then for every~$\alpha\in\mathbb{Z}_K$, we have \begin{displaymath} \bigl({\mathcal{L}}_A^{\iota(\alpha)}\cdot \Theta\bigr)^2 = \Tr_{K/\mathbb{Q}}(\alpha)^2. \end{displaymath} \end{cor} \begin{proof} Write $\alpha = a + b\sqrt{\Delta}$. By \Cref{prop:end-quadform}, we can compute \begin{displaymath} \bigl({\mathcal{L}}_A^{\iota(\alpha)}\cdot\Theta \bigr)^2 - 2\, \bigl({\mathcal{L}}_A^{\iota(\alpha)}\cdot {\mathcal{L}}_A^{\iota(\alpha)}\bigr) = 2\Tr(\alpha^2) - \dfrac{1}{2}\Tr(\alpha)^2 = 4b^2\Delta. \end{displaymath} On the other hand, the Riemann--Roch theorem~\cite[Thm.~11.1]{milne_AbelianVarieties1986} gives \begin{displaymath} \bigl({\mathcal{L}}_A^{\iota(\alpha)}\cdot {\mathcal{L}}_A^{\iota(\alpha)} \bigr) = 2\, \chi\bigl({\mathcal{L}}_A^{\iota(\alpha)} \bigr) = 2\sqrt{\deg\iota(\alpha)} = 2(a^2 - b^2\Delta). \end{displaymath} The result follows. \end{proof} \begin{prop} \label{prop:spqr-degrees} Let~$\varphi$ be a $\beta$-isogeny as above, and let $(s, p, q, r)$ be the rational representation of~$\varphi$ at~$P$. Then, considered as morphisms from~${\mathcal{C}}$ to~$\mathbb{P}^1$, the respective degrees of $s$, $p$, $q$, and $r$ are $2\Tr(\beta)$, $2\Tr(\beta)$, $6\Tr(\beta)$ and $4\Tr(\beta)$. \end{prop} \begin{proof} The degrees of $s,p,q,r$ can be computed as the intersection of the polar divisors from \Cref{lem:spqr-poles} and the divisor~$\varphi_P({\mathcal{C}})$. By \Cref{lem:image-divisor}, the line bundle associated with~$\varphi_P({\mathcal{C}})$, up to algebraic equivalence, is~${\mathcal{L}}_{\Jac({\mathcal{C}}')}^{\conj{\beta}}$. Its intersection number with~$\Theta'$ is nonnegative, hence by \Cref{cor:theta-intersection}, we have \begin{displaymath} \bigl(\varphi_P({\mathcal{C}})\cdot\Theta'\bigr) = \Tr_{K/\mathbb{Q}}(\conj{\beta}) = \Tr_{K/\mathbb{Q}}(\beta). \end{displaymath} The result follows by \Cref{lem:spqr-poles}. \end{proof} \paragraph{Rational reconstruction.} Now we present the rational reconstruction algorithm, and compute the power series precision that is precisely needed. \begin{lem} Let $s\colon{\mathcal{C}}\to\mathbb{P}^1$ be a morphism of degree~$d$. \begin{enumerate} \item If~$s$ is invariant under the hyperelliptic involution~$i$, then we can write $ s(u,v) = X(u)$ where the degree of~$X$ is bounded by~$d/2$. \item In general, let~$X$, $Y$ be the rational fractions such that \begin{displaymath} s(u,v) = X(u) + v\, Y(u). \end{displaymath} Then the degrees of~$X$ and~$Y$ are bounded by~$d$ and~$d+3$ respectively. \end{enumerate} \end{lem} \begin{proof} For item~$1$, use the fact that the function~$u$ itself has degree~$2$. For item~$2$, write \begin{displaymath} s(u,v) + s(u,-v) = 2X(u),\quad \dfrac{s(u,v) - s(u,-v)}{v} = 2Y(u). \end{displaymath} The degrees of these morphisms are bounded by~$2d$ and~$2d+6$ respectively. \end{proof} \begin{prop} \label{prop:reconstruction} Let $\widetilde{\varphi}_P$ and $\widetilde{\varphi}_{i(P)}$ be local lifts of~$\varphi_P$ at~$P$ and~$i(P)$ in the uniformizers~$z$ and~$i(z)$. Let $\nu = 8\ell+7$ in the Siegel case, and $\nu = 4\Tr_{K/\mathbb{Q}}(\beta)+7$ in the Hilbert case. Then, given~$\widetilde{\varphi}_P$ and~$\widetilde{\varphi}_{i(P)}$ at precision~$O(z^\nu)$, we can compute the rational representation of~$\varphi$ at~$P$ within~$\smash{\widetilde{O}}(\nu)$ operations in~$k'$. \end{prop} \begin{proof} It is enough to recover the rational fractions~$s$ and~$p$; afterwards,~$q$ and~$r$ can be deduced from the equation of~${\mathcal{C}}'$. First, assume that~$P$ is a Weierstrass point of~${\mathcal{C}}$. Then $s$, $p$ are invariant under the hyperelliptic involution. Therefore we have to recover univariate rational fractions in~$u$ of degree $d\leq 2\ell$ (resp.~$d\leq \Tr(\beta)$). This can be done in quasi-linear time from their power series expansion up to precision $O(u^{2d+1})$~\cite[§7.1]{bostan_AlgorithmesEfficacesCalcul2017}. Since~$u$ has valuation~$2$ in~$z$, we need to compute~$\widetilde{\varphi}_P$ at precision~$O(z^{4d+1})$. Second, assume that~$P$ is not a Weierstrass point of~${\mathcal{C}}$. Then the series defining $s(u,-v)$ and $p(u,-v)$ are given by~$\widetilde{\varphi}_{i(P)}$. We now have to compute rational fractions of degree $d\leq 4\ell+3$ (resp.~$d\leq 2\Tr(\beta)+3$) in~$u$. Since~$u$ has valuation~$1$ in~$z$, this can be done in quasi-linear time if~$\widetilde{\varphi}_P$ and~$\widetilde{\varphi}_{i(P)}$ are known up to precision~$O(z^{2d+1})$. \end{proof} \section{Summary of the algorithm} \label{sec:summary} In this final section, we summarize the isogeny algorithm and prove \cref{thm:main}. We also state the analogous result in the case of $\beta$-isogenies (\cref{thm:proved-main-hilbert}). \begin{algo} \label{algo:main} Let $j,j'$ the Igusa invariants of principally polarized abelian varieties $A,A'$ over~$k$. Assume that $A,A'$ are $\ell$-isogenous (the Siegel case), or that $A,A'$ have real multiplication by~$\mathbb{Z}_K$ and are $\beta$-isogenous (the Hilbert case). \begin{enumerate} \item Use Mestre's algorithm~\cite{mestre_ConstructionCourbesGenre1991} to construct curve equations~${\mathcal{C}},{\mathcal{C}}'$ whose Jacobians are isomorphic to~$A,A'$. In the Hilbert case, use \Cref{algo:hilb-curve-2} to ensure that~${\mathcal{C}},{\mathcal{C}}'$ are potentially Hilbert-normalized. \item Compute at most~$4$ candidates for the tangent matrix of the isogeny~$\varphi$ using \cref{prop:tangent_siegel} in the Siegel case, or \cref{prop:tangent_hilbert} in the Hilbert case. Run the rest of the algorithm for all the candidates; in general, only one will produce meaningful results. \item Choose a base point~$P$ on~${\mathcal{C}}$ such that~$\varphi_P$ is of generic type, and compute the power series~$\widetilde{\varphi}_P$ and~$\widetilde{\varphi}_{i(P)}$ up to precision~$O\bigl(z^{8\ell+7}\bigr)$, respectively~$O\bigl(z^{4\Tr(\beta)+7}\bigr)$ using \Cref{prop:newton}. \item Recover the rational representation of~$\varphi$ at~$P$ using \Cref{prop:reconstruction}. \end{enumerate} \end{algo} We recall the statement of \cref{thm:main} from the introduction. \begin{thm} \label{thm:main_proved} Let~$\ell$ be a prime, and let~$k$ be a field such that $\chr k = 0$ or $\chr k > 8\ell+ 7$. Let~$U\subset\coarse_2(k)$ be the open set consisting of abelian surfaces~$A$ such that $\Aut(A)\iso\{\pm 1\}$ and $j_3(A)\neq 0$. Assume that there is an algorithm to evaluate derivatives of modular equations of level~$\ell$ at a given point of~$U \times U$ over~$k$ using~$\ensuremath{C_{\mathrm{eval}}}(\ell)$ operations in~$k$. Let $A,A' \in U$, and let $j(A),j(A')$ be their Igusa invariants. Assume that~$A$ and~$A'$ are $\ell$-isogenous over~$k$, and that the subvariety of $\mathbb{A}^3\times \mathbb{A}^3$ cut out by the modular equations $\Psi_{\ell,i}$ for $1\leq i\leq 3$ is normal at $(j(A), j(A'))$. Then, given~$j(A)$ and~$j(A')$, \Cref{algo:main} succeeds and returns \begin{enumerate} \item a field extension~$k'/k$ of degree dividing~$8$, \item hyperelliptic curve equations ${\mathcal{C}},{\mathcal{C}}'$ over~$k'$ whose Jacobians are isomorphic to $A,A'$ respectively, \item a point $P\in {\mathcal{C}}(k')$, \item the rational representation $(s,p,q,r)\in k'(u,v)^4$ of an $\ell$-isogeny $\varphi\colon \Jac({\mathcal{C}})\to\Jac({\mathcal{C}}')$ at~$P$. \end{enumerate} The cost of \Cref{algo:main} in the Siegel case is $O\bigl(\ensuremath{C_{\mathrm{eval}}}(\ell)\bigr) + \smash{\widetilde{O}}(\ell)$ elementary operations and~$O(1)$ square roots in~$k'$. \end{thm} \begin{proof} Mestre's algorithm returns curve equations~${\mathcal{C}},{\mathcal{C}}'$ defined over extensions of~$k$ of degree at most~$2$, and costs~$O(1)$ operations in~$k$ and~$O(1)$ square roots. Under our hypotheses, \cref{prop:tangent_siegel} applies and allows us to recover $\Sym^2(d\varphi)$ using $O(\ensuremath{C_{\mathrm{eval}}}(\ell))+O(1)$ operations in $k$. We recover~$d\varphi$ up to sign using~$O(1)$ square roots and elementary operations; since~$\varphi$ is defined over~$k$, extending the base field is not necessary. We choose the base point~$P$ on~${\mathcal{C}}$ such that~$\varphi_P$ is of generic type using \cref{prop:imagept}, perhaps taking another extension of degree~$2$. By \cref{prop:newton}, we can compute the local lifts~$\lift{\varphi}_P$ and~$\lift{\varphi}_{i(P)}$ up to precision $8\ell+7$ within~$\smash{\widetilde{O}}(\ell)$ field operations; this is where we use the hypothesis on~$\chr k$. Finally, we recover the rational representation at~$P$ using a further~$\smash{\widetilde{O}}(\ell)$ field operations by \cref{prop:reconstruction}. The result is defined over an extension of~$k$ of degree dividing~$8$. \end{proof} We conclude with the analogue of \cref{thm:main_proved} in the Hilbert case. \begin{thm} \label{thm:proved-main-hilbert} Let~$K$ be a real quadratic field, and let~$\beta\in \mathbb{Z}_K$ be a totally positive prime. Let~$k$ be a field such that $\chr k=0$ or $\chr k > 4\Tr_{K/\mathbb{Q}}(\beta)+7$. Assume that there is an algorithm to evaluate derivatives of modular equations of level~$\beta$ at a given point~$(j,j')$ over~$k$ using~$\ensuremath{C_{\mathrm{eval}}}(\beta)$ operations in~$k$. Let $A,A'$ be principally polarized abelian surfaces over~$k$ with real multiplication by~$\mathbb{Z}_K$ whose Igusa invariants $j(A),j(A')$ are well defined, and assume that there exists a $\beta$-isogeny $\varphi\colon A\to A'$ defined over~$k$ which is generic in the sense of \Cref{def:generic}. Then, given~$j(A)$ and~$j(A')$, \cref{algo:main} succeeds and returns \begin{enumerate} \item a field extension $k'/k$ of degree dividing~$8$, \item hyperelliptic curve equations ${\mathcal{C}},{\mathcal{C}}'$ over~$k'$ whose Jacobians are isomorphic to $A,A'$ respectively, \item a point $P\in {\mathcal{C}}(k')$, \item at most~$4$ possible values for the rational representation $(s,p,q,r)\in k'(u,v)^4$ of a~$\beta$- or $\conj{\beta}$-isogeny $\varphi\colon \Jac({\mathcal{C}})\to\Jac({\mathcal{C}}')$ at~$P$. \end{enumerate} The cost of \Cref{algo:main} in the Hilbert case is $O\bigl(\ensuremath{C_{\mathrm{eval}}}(\beta)\bigr) + \smash{\widetilde{O}}\bigl(\Tr_{K/\mathbb{Q}}(\beta)\bigr) + O_K(1)$ elementary operations and~$O(1)$ square roots in~$k'$; the implied constants, $O_K(1)$ excepted, are independent of~$K$. \end{thm} Note that~$\ensuremath{C_{\mathrm{eval}}}(\beta)$ also depends on~$K$. We expect that the algorithm returns only one answer for the rational representation of~$\varphi$ at~$P$; if the algorithm outputs several answers, we could implements tests for correctness, but they might be more expensive than the isogeny algorithm itself. \begin{proof} We use \cref{algo:hilb-curve-2} to construct the curve equations~${\mathcal{C}},{\mathcal{C}}'$. By \cref{rem:trivialization}, we obtain potentially Hilbert-normalized curves, and each of them is defined over an extension of~$k$ of degree at most~$4$. This requires~$O_K(1)$ elementary operations and~$O(1)$ square roots in~$k$. We may assume that~${\mathcal{C}},{\mathcal{C}}'$ are Hilbert-normalized for some choice of real multiplication embeddings that are compatible via~$\varphi$, which becomes either a $\beta$- or a $\conj{\beta}$-isogeny. Under our hypotheses, \cref{prop:tangent_hilbert} applies, so we recover two possible values for~$(d\varphi)^2$ within $O(\ensuremath{C_{\mathrm{eval}}}(\beta)) + O(1)$ operations in~$k$, and hence~$4$ possible values for~$d\varphi$, using~$O(1)$ square roots. We can now make a change of variables to the (not necessarily Hilbert-normalized) curves output by Mestre's algorithm, so that each curve is defined over an extension of~$k$ of degree~$2$. The end of the algorithm is similar to the Siegel case: we take an extension of degree~$2$ to find the base point, then try to compute the rational representation for each value of~$d\varphi$ using~$\smash{\widetilde{O}}(\Tr_{K/\mathbb{Q}}(\beta))$ operations in~$k$. For the correct value of~$d\varphi$, rational reconstruction will succeed and output fractions of the correct degrees. \end{proof} \printbibliography \newpage \normalsize \begin{appendix} \section{The case \texorpdfstring{$K = \mathbb{Q}(\sqrt{5})$}{K=Q(√5)}} \label{appendix:Qr5} We present a variant of our algorithm in the case of principally polarized abelian varieties with real multiplication by~$\mathbb{Z}_K$ where $K = \mathbb{Q}(\sqrt{5})$. In this case, the structure of the ring of Hilbert modular form is well known, and the Humbert surface is rational: its function field can be generated by only two elements called \emph{Gundlach invariants}. Having only two coordinates reduces the size of modular equations. We work over~$\C$, but the methods of §\ref{sec:moduli} show that the computations are valid in general. We illustrate our algorithm with an example of cyclic isogeny of degree~$11$ over a finite field. \subsection{Hilbert modular forms for \texorpdfstring{$K = \mathbb{Q}(\sqrt{5})$}{K=Q(√5)}} We keep the notation used to describe the Hilbert embedding (§\ref{subsec:hilbert-siegel}). Hilbert modular forms have Fourier expansions in terms of \begin{displaymath} w_1 = \exp\bigl(2\pi i(e_1 t_1 + \conj{e_1}t_2)\bigr) \quad\text{and}\quad w_2 = \exp\bigl(2\pi i(e_2 t_1 + \conj{e_2}t_2)\bigr). \end{displaymath} We use this notation and the term \emph{$w$-expansions} to avoid confusion with expansions of Siegel modular forms. Apart from the constant term, a term in~$w_1^a w_2^b$ can only appear when~$ae_1 + be_2$ is a totally positive element of~$\mathbb{Z}_K$. Since~$e_1 = 1$ and~$e_2$ has negative norm, for a given~$a$, only finitely many~$b$'s appear. Therefore we can consider truncations of~$w$-expansions as elements of~$\C(w_2)[[w_1]]$ modulo an ideal of the form~$(w_1^\nu)$. \begin{thm}[{\cite{nagaoka_RingHilbertModular1983}}] \label{thm:hilbert-structure} The graded $\C$-algebra of symmetric Hilbert modular forms of even parallel weight for~$K = \mathbb{Q}(\sqrt{5})$ is generated by three elements~$G_2$, $F_6$, $F_{10}$ of respective weights~$2$, $6$ and $10$, with~$w$-expansions \begin{align*} G_2(t) &= 1 + (120 w_2 + 120) w_1 \\ &\quad + \bigl(120 w_2^3 + 600 w_2^2 + 720 w_2 + 600 + 120w_2^{-1}\bigr)w_1^2 + O(w_1^3),\\ F_{6}(t) &= (w_2 + 1) w_1 + \bigl(w_2^3 + 20 w_2^2 - 90 w_2 + 20 + w_2^{-1}\bigr) w_1^2 + O(w_1^3), \\ F_{10}(t) &= (w_2^2 - 2 w_2 + 1) w_1^2 + O(w_1^3). \end{align*} \end{thm} The \emph{Gundlach invariants} for~$K = \mathbb{Q}(\sqrt{5})$ are \begin{displaymath} g_1 = \dfrac{G_2^5}{F_{10}}\quad \text{and}\quad g_2 = \dfrac{G_2^2 F_6}{F_{10}}. \end{displaymath} Recall that we denote by~$\sigma$ the involution $(t_1,t_2)\mapsto(t_2,t_1)$ of~${\mathbf{H}_2}(\C)$ \begin{prop} The Gundlach invariants define a birational map \begin{displaymath} {\mathbf{H}_2}(\C)/\sigma\to\C^2. \end{displaymath} \end{prop} \begin{proof} This is a consequence of the theorem of Baily and Borel~\cite[Thm.~10.11]{baily_CompactificationArithmeticQuotients1966} and \Cref{thm:hilbert-structure}. \end{proof} By \Cref{prop:mf-pullback}, the pullbacks of the Siegel modular forms $\psi_4$, $\psi_6$, $\chi_{10}$ and $\chi_{12}$ via the Hilbert embedding~$H$ are symmetric Hilbert modular forms of even weight, so they have expressions in terms of~$G_2, F_6, F_{10}$. These expressions can be computed using linear algebra on Fourier expansions~\cite[Prop.~2.12]{milio_ModularPolynomialsHilbert2017}: in our case, the Hilbert embedding is defined by $e_1 = 1$, $e_2 = (1 - \sqrt{5})/2$, so \begin{displaymath} q_1 = w_1, \quad q_2 = w_2, \quad q_3 = w_1 w_2. \end{displaymath} As a corollary, we obtain the expression for the pullback of Igusa invariants. \begin{prop}[{\cite[Cor.~2.14]{milio_ModularPolynomialsHilbert2017}}] \label{prop:igusa-pullback} In the case~$K = \mathbb{Q}(\sqrt{5})$, we have \begin{displaymath} \begin{aligned} H^*j_1 &= 8 g_1 \biggl(3 \dfrac{g_2^2}{g_1} - 2\biggr)^5, \\ H^*j_2 &= \dfrac{1}{2} g_1 \biggl( 3 \dfrac{g_2^2}{g_1} - 2\biggr)^3, \\ H^*j_3 &= \dfrac{1}{8} g_1 \biggl( 3 \dfrac{g_2^2}{g_1} - 2\biggr)^2 \biggl( 4 \dfrac{g_2^2}{g_1} + 2^53^2\dfrac{g_2}{g_1} - 3\biggr). \end{aligned} \end{displaymath} \end{prop} Let $\beta\in\mathbb{Z}_K$ be a totally positive prime. We call the \emph{Hilbert modular equations of level $\beta$} in Gundlach invariants the data of the two polynomials $\Psi_{\beta,1},\Psi_{\beta,2} \in \C(G_1, G_2)[G_1']$ defined as follows: \begin{itemize} \item $\Psi_{\beta,1}$ is the univariate minimal polynomial of the function $g_1(t/\beta)$ over the field $\C\bigl(g_1(t), g_2(t)\bigr)$. \item We have the following equality of meromorphic functions on~${\mathbf{H}_2}(\C)$: \begin{displaymath} \ g_2(t/\beta) = \Psi_{\beta,2}\bigl(g_1(t),g_2(t),g_1(t/\beta)\bigr). \end{displaymath} \end{itemize} Modular equations using Gundlach invariants for $K = \mathbb{Q}(\sqrt{5})$ also have denominators. They have been computed up to $N_{K/\mathbb{Q}}(\beta)=41$~\cite{milio_ModularPolynomials}. \subsection{Variants in the isogeny algorithm} \paragraph{Constructing potentially Hilbert-normalized curves.} We give another method to reconstruct such curves using the pullback of the modular form~$f_{8,6}$ from \Cref{ex:f86} as a Hilbert modular form. Let $H\colon \mathbb{H}_1^2\to \mathbb{H}_2$ be the Hilbert embedding from §\ref{subsec:hilbert-siegel}. \begin{prop} \label{prop:f86-pullback} Define the functions~$b_i(t)$ for $0\leq i\leq 6$ on~$\mathbb{H}_1^2$ by \begin{displaymath} \forall t\in\mathbb{H}_1^2, \ \det\nolimits^8\Sym^6(R) f_{8,6}\bigl(H(t)\bigr) = \sum_{i = 0}^6 b_i(t)\, x^i. \end{displaymath} Then $b_2$ and $b_4$ are identically zero, and \begin{displaymath} \begin{aligned} b_3^2 &= 4 F_{10} F_6^2, \phantom{\dfrac{1}{25}}\\ b_1 b_5 &= \dfrac{36}{25} F_{10} F_6^2 - \dfrac{4}{5} F_{10}^2 G_2,\\ b_0 b_6 &= \dfrac{-4}{25} F_{10} F_6^2 + \dfrac{1}{5} F_{10}^2 G_2,\\ b_3 \bigl(b_0^2 b_5^3 + b_1^3 b_6^2 \bigr) &= 123 F_{10}^3 F_6 - \dfrac{32}{25} F_{10}^2 F_6^2 G_2^2 + \dfrac{288}{125} F_{10} F_6^4 G_2 - \dfrac{3456}{3125} F_6^6. \end{aligned} \end{displaymath} \end{prop} \begin{proof} By \Cref{prop:mf-pullback}, each coefficient~$b_i$ is a Hilbert modular form of weight~$(8+i,14-i)$. We can check using the action of~$M_\sigma$ that~$\sigma$ exchanges~$b_i$ and~$b_{6-i}$. From the Siegel~$q$-expansion for~$f_{8,6}$, we can compute the~$w$-expansions of the~$b_i$'s; then, we use linear algebra to identify symmetric combinations of the~$b_i$'s of parallel even weight in terms of the generators~$G_2, F_6, F_{10}$. \end{proof} By \Cref{prop:hilb-standard-curve,prop:f86}, the standard curve~${\mathcal{C}}_K(t)$ attached to $t\in\mathbb{H}_1^2$ is proportional to the curve $ y^2 = \sum b_i(t) x^i$. The algorithm to compute a potentially Hilbert-normalized curve~${\mathcal{C}}$ from its Igusa invariants $(j_1,j_2,j_3)$ runs as follows. \begin{algo} \label{algo:hilb-curve-1} \begin{enumerate} \item Compute Gundlach invariants $(g_1, g_2)$ mapping to the Igusa invariants $(j_1,j_2,j_3)$ via $H$ using \Cref{prop:igusa-pullback}, and compute values for the generators $G_2, F_6, F_{10}$ giving these invariants. \item Compute $b_3^2$, $b_1 b_5$, etc.\ using \Cref{prop:f86-pullback}. \item Recover values for the coefficients: choose any square root for~$b_3$; choose any value for~$b_1$, which gives~$b_5$; finally, solve a quadratic equation to find~$b_0$ and~$b_6$. \end{enumerate} \end{algo} We can always choose values $G_2, F_6, F_{10}$ such that~$b_3^2$ is a square in $k$; then, the output is defined over a quadratic extension of $k$. Even if arbitrary choices are made during \cref{algo:hilb-curve-1}, the output will be potentially Hilbert-normalized. \paragraph{Computing the tangent matrix.} Consider~$\Psi_{\beta,1}$ and~$\Psi_{\beta,2}$ as elements of the ring $\mathbb{Q}(G_1,G_2)[G_1',G_2']$. Define the $2\times 2$ matrices \begin{displaymath} D\Psi_{\beta,L} = \left(\dfrac{\partial\Psi_n}{\partial G_k}\right)_{1\leq n,k \leq 2} \quad\text{and}\quad D\Psi_{\beta,R} = \left(\dfrac{\partial\Psi_n}{\partial G_k'}\right)_{1\leq n,k \leq 2}. \end{displaymath} Then we have an analogue of \cref{prop:tangent_hilbert}, where we replace derivatives of Igusa invariants in \Cref{prop:norm-matrix} by derivatives of Gundlach invariants. The relation between these derivatives is given by \Cref{prop:igusa-pullback}. This time, using the formalism of §\ref{sec:moduli}, we can prove that all $2\times 2$ matrices will be invertible if the abelian varieties $A,A'$ have only~$\mathbb{Z}_K^\times$ as automorphisms, have $g_1\neq 0$, and if the modular equations in Gundlach invariants cut out a normal subvariety of~$\mathbb{A}^2\times\mathbb{A}^2$ at $(g(A),g(A'))$. \subsection{An example of cyclic isogeny} \label{sec:ex} We illustrate our algorithm in the Hilbert case with $K = \mathbb{Q}(\sqrt{5})$ by computing a $\beta$-isogeny between Jacobians with real multiplication by $\mathbb{Z}_K$, where \begin{displaymath} \beta = 3 + \dfrac{1 + \sqrt{5}}{2} \in\mathbb{Z}_K,\quad N_{K/\mathbb{Q}}(\beta)=11, \quad \Tr_{K/\mathbb{Q}}(\beta)=7. \end{displaymath} We work over the prime finite field $k = \mathbb{F}_{56311}$, whose characteristic is large enough for our purposes. We choose a trivialization of $\mathbb{Z}_K\otimes k$, in other words a square root of~$5$ in~$k$, so that $\beta=26213$. Consider the Gundlach invariants \begin{displaymath} (g_1,g_2) = \bigl(23, 56260\bigr), \quad (g_1', g_2') = \bigl(8, 36073\bigr). \end{displaymath} \begin{inlinedetails} The corresponding Igusa--Streng invariants are \begin{displaymath} (j_1,j_2,j_3) = \Bigl(14030, 9041, 56122\Bigr),\quad (j_1',j_2',j_3') = \Bigl(13752, 42980, 12538\Bigr); \end{displaymath} they lie on the Humbert surface, as expected! \end{inlinedetails} In order to reconstruct a Hilbert-normalized curve, we apply \Cref{algo:hilb-curve-1}. We obtain the curve equations \begin{displaymath} \begin{aligned} {\mathcal{C}}\,:\, v^2 &= 13425 u^6 + 34724 u^5 + 102 u^3 + 54150u + 11111 \\ {\mathcal{C}}' \,:\, y^2 &= 47601 x^6 + 35850 x^5 + 40476 x^3 + 24699 x + 40502. \end{aligned} \end{displaymath} The derivatives of Gundlach invariants are given by \begin{displaymath} D_t G({\mathcal{C}}) = \mat{43658}{17394}{16028}{26656}, \quad D_t G({\mathcal{C}}') = \mat{15131}{739}{50692}{49952}. \end{displaymath} Computing derivatives of the modular equations as in \Cref{prop:norm-matrix}, we find that the isogeny is compatible with the real multiplication embeddings for which ${\mathcal{C}},{\mathcal{C}}'$ are Hilbert-normalized. We do not known whether~$\varphi$ is a~$\beta$- or a $\conj{\beta}$-isogeny, so we have four candidates for the tangent matrix up to sign: \begin{displaymath} \begin{aligned} d\varphi_{\beta,\pm} &= \mat{38932\alpha + 19466}{0}{0}{\pm(53318\alpha + 26659)},\\ d\varphi_{\conj{\beta},\pm} &= \mat{50651\alpha + 53481}{0}{0}{\pm(11076\alpha + 5538)} \end{aligned} \end{displaymath} where $\alpha^2 + \alpha + 2 = 0$. We see that the isogeny is only defined over a quadratic extension of~$k$. The curve~${\mathcal{C}}$ has a rational Weierstrass point~$\bigl(36392, 0\bigr)$. We can bring it to $(0,0)$, so that~${\mathcal{C}}$ is of the standard form \begin{displaymath} {\mathcal{C}}\,:\, v^2 = 33461 u^6 + 7399 u^5 + 16387 u^4 + 34825 u^3 + 14713 u^2 + u. \end{displaymath} This multiplies the tangent matrix on the right by \begin{displaymath} \mat{44206}{18649}{0}{7615}. \end{displaymath} Choose $P = (0,0)$ as a base point on~${\mathcal{C}}$, and~$z = \sqrt{u}$ as a uniformizer; it is a Weierstrass point, and we check that~$\varphi_P$ is of generic type. We solve the differential system up to precision~$O(z^{35})$, or any higher precision. It turns out that the correct tangent matrix is~$d\varphi_{\conj{\beta}, +}$ as the other series do not come from rational fractions of the prescribed degree. We obtain \begin{displaymath} \begin{aligned} s(u) &= \frac{50255u^6 + 40618u^5 + 17196u^4 + 9527u^3 + 22804u^2 + 49419u + 11726}{u^6 + 40883u^5 + 22913u^4 + 41828u^3 + 18069u^2 + 14612u + 7238}, \\ p(u) &= \frac{35444u^6 + 9569u^5 + 52568u^4 + 3347u^3 + 9325u^2 + 32206u + 7231}{u^6 + 40883u^5 + 22913u^4 + 41828u^3 + 18069u^2 + 14612u + 7238}. \end{aligned} \end{displaymath} \begin{details} \begin{displaymath} \begin{aligned} r(u, v) &= v\frac{(47538\alpha + 23769)u^{10} + (54736\alpha + 27368)u^9 + (10441\alpha + 33376)u^8 + (51740\alpha + 25870)u^7 + (27982\alpha + 13991)u^6 + (47619\alpha + 51965)u^5 + (55801\alpha + 56056)u^4 + (12897\alpha + 34604)u^3 + (36860\alpha + 18430)u^2 + (30245\alpha + 43278)u + (55909\alpha + 56110)}{u^{13} + 25455u^{12} + 42413u^{11} + 8422u^{10} + 1295u^9 + 10859u^8 + 4334u^7 + 33200u^6 + 52976u^5 + 10154u^4 + 37792u^3 + 19196u^2 + 19414u} \\ t(u, v) &= v \frac{(21373\alpha + 38842)u^{10} + (52517\alpha + 54414)u^9 + (30517\alpha + 43414)u^8 + (26715\alpha + 41513)u^7 + (39071\alpha + 47691)u^6 + (31123\alpha + 43717)u^5 + (13028\alpha + 6514)u^4 + (29429\alpha + 42870)u^3 + (12405\alpha + 34358)u^2 + (26273\alpha + 41292)u + (359\alpha + 28335)}{u^{13} + 25455u^{12} + 42413u^{11} + 8422u^{10} + 1295u^9 + 10859u^8 + 4334u^7 + 33200u^6 + 52976u^5 + 10154u^4 + 37792u^3 + 19196u^2 + 19414u}\\ \end{aligned} \end{displaymath} with $t(u,v) = (x_1 y_2 - x_2 y_1)/(x_2 - x_1)$, and $q = t^2 + r^2 p + srt$. \end{details} The degrees agree with \Cref{prop:spqr-degrees}. The isogeny is $k$-rational at the level of Kummer surfaces, but not on the Jacobians themselves: $\alpha$ appears on the numerator of $r(u, v)$. \end{appendix} \end{document}
\section{Introduction}\label{sec1} \setcounter{equation}{0} As an undergraduate student in mathematics we’ve all encountered (or will encounter) a theorem by Picard and Lindel\"{o}f. Though this theorem is named for \'{E}mile Picard and Ernst Lindel\"{o}f, its history traces from Augustin-Louis Cauchy, to Leonhard Euler, to Isaac Newton--and through much of 17th to 19th century mathematics. But as ingenious Picard and Lindel\"{o}f’s theorem is, it is non-productive; insofar as it does not \emph{produce} the function in any feasible manner. For a more detailed look at the history and development of differential equations, refer to \cite{HisODEMisc, HisODECaj, HisODEInce, HisODESas}; where arguably the climax of classical contributions to the theory of differential equations is Picard and Lindel\"{o}f's eponymous theorem. This paper aims to look at First Order Differential Equations from a different perspective; like the Necker cube, differential equations can be viewed in more ways than one.\\ The brute can summarize Picard and Lindel\"{o}f's theorem in a few key words. For $|x-x_0| < \delta$ with $\delta > 0$ small enough, and for $f(x, t)$ a Lipschitz continuous function, the mapping: \[ \Phi u = y_0 + \int_{x_0}^x f(s,u(s))\,ds \] is a contraction. Therefore, by The Banach Fixed Point Theorem\footnote{This theorem will most likely be the first non-trivial case where a student encounters a use for The Banach Fixed Point Theorem.} it has a unique fixed point $y$, which inherently satisfies $y(x_0) = y_0$ and $\Phi y = y$, which reduces to $y'(x) = f(x, y(x))$.\\ This provides us with a local solution to the differential equation $y' = f(x,y)$ subject to the constraint $y(x_0) = y_0$. It also ensures this solution is unique, thanks to our use of The Banach Fixed Point Theorem; and that it is continuously differentiable. A more in depth look at The Picard-Lindel\"{o}f Theorem can be found in \cite{TheOdDEq}. The author would like to expand this theorem. This theorem does not necessarily help us produce the solution $y$–it only informs us it exists and is unique. Even though Picard and Lindel\"{o}f's theorem is considered constructive--the author feels it isn't productive. The result is restricted to tiny intervals about $x_0$, making us unsure of where the iteration of $\Phi$ actually converges--simply that it must somewhere. Numerical calculations of $y$ using iterations of $\Phi$ is also unfeasible in practice. In no different a manner than how the Riemann Integral is \emph{productive}, we should have something similar for $y$. There is a Riemann Sum of $g$ which converges to an object $G$ and that object satisfies $G'(x) = g(x)$. What if there was the same thing for the equation $y' = f(x, y(x))$? A kind of ``Picard-Lindel\"{o}f Integral." We should have some \emph{thing} and this \emph{thing} converges to $y$ everywhere; and in a useful productive sense. This \emph{thing} should also behave in a manner similar to our usual notion of an integral. This \emph{thing} should be accessible and intuitive like the Riemann Sum. And above all, this thing should look and \emph{feel} like an integral. The author will argue that Euler had already met these criteria in the 18th century. He simply worded it in a language of infinitesimals.\\ We are going to start with a formal calculus and prove some less than obvious facts about it. The author will then propose a way of actually constructing this formal calculus. In order to do this, the author will be brash and introduce a new notation known as the differential bullet product. This will take some persuasion. He maintains though, that the summation of this paper is the introduction of a formal calculus, The Compositional Integral, and an argument for a notation which describes said idea. The methodology of our proposed, new kind of integral, is vastly similar to Euler's Method for approximating First Order Differential Equations. The idea is to make this approximation notion more precise, and re-approach it as a modified Riemann Sum--and describe some properties which, as the author would put it, have been overlooked. We are also going to steal Leibniz's notation for the integral, and twist it a bit. However, and this is a strong however, the integral was originally a formal idea. It took much work to make it anything less than formal. A Riemann Sum, as beautiful and practical as it is, still couldn’t accomplish a victory over the formal meaning. The integral is a mysterious thing. The author cannot fully construct The Compositional Integral to the extent mathematician’s have constructed modern integration. He simply wishes to discuss the formal object, and give a concrete instance where it works. Therein, the majority of this paper will be formal arguments. He hopes more knowledgeable mathematicians of measure theory and Lesbesgue's theory of integration will have something more interesting to say. \section{So, what is The Compositional Integral?} \label{sec2} \setcounter{equation}{0} Let’s borrow Leibniz's notation for the integral. The Compositional Integral can be introduced modestly in a less than avant-garde fashion. The notation may look a little clunky, but the pieces fit together rather tightly. Let $b \ge a$, supposing $f(s,t)$ is a \emph{nice} function\footnote{Bear with the author, as what we mean by \emph{nice} will have to be filled in as we progress.}, write: \begin{equation}\label{eq:1A} Y_{ba}(t) = \int_a^b f(s, t)\, ds \bullet t \end{equation} To get what this expression means will be the point of this paper. And if the reader can absorb what this expression means, they can absorb the thesis of this paper. The author’s goal is to acclimatize the reader slowly with this notation. But the author will simply start with the denotion $Y_{ba}(t)$.\\ \begin{definition}[The Compositional Integral]\label{def1} The Compositional Integral: \[ y(x) = Y_{xa}(t) = \int_a^x f(s, t)\, ds \bullet t \] is the \emph{unique}\footnote{Although one would usually have to show $y$ is unique, by The Picard-Lindel\"{o}f Theorem it certainly is if, for instance, $f$ is globally Lipschitz on its domain. We include uniqueness in the definition for convenience.} function $y$ such that $y'(x) = f(x, y(x))$ and $y(a) = t$. \end{definition} This is a bit of a mouthful, and imprecise on domains, but the imprecision of this definition is warranted. This definition is made the way it is to introduce more simply what the author calls the formal semi-group laws; where $a \le b \le c$: \begin{enumerate} \item $Y_{aa}(t) = t$\\ \item $Y_{cb}(Y_{ba}(t)) = Y_{ca}(t)$ \end{enumerate} These laws comprise a modified additivity condition of the usual integral $\int_b^c + \int_a^b = \int_a^c$ and $\int_a^a = 0$. Where now addition is replaced with composition--and we have a semi-group-structure rather than a group-structure (at least for now). As a brief digression, to gather some intuition; if we were to let $f(s,t)= f(s)$ be constant in $t$, then the differential equation would reduce to $y'(x) = f(x)$ and $y(a) = t$. The Compositional Integral becomes the integral. That is to mean $y(x) = t + \int_a^xf(s)\,ds$, and $Y_{ba}(t) = t + \int_a^b f(s)\,ds$. The composition law ($2$) across $t$ becomes the usual additivity condition of the integral--albeit written a bit strangely. Of which, the constant of integration plays a more prominent role as an argument of a function. There is not much more than a trick to proving ($1$) and ($2$). We will restrict ourselves to a formal proof that breaks down the mechanism of it purely from Definition \ref{def1}. The following argument really only works for well behaved $f$, which we avoid describing as it may muddy the initial intuition. But the reader may guess that it is something like a \emph{nice} global Lipschitz condition. \begin{theorem}\label{thm1} Let $Y_{ba}(t)$ be The Compositional Integral of $f(s,t)$; then the following group laws are satisfied: \begin{enumerate} \item $Y_{aa}(t) = t$\\ \item $Y_{cb}(Y_{ba}(t)) = Y_{ca}(t)$\\ \end{enumerate} for all $a \le b \le c$. \end{theorem} \begin{proof} Using the definition of $Y$ we can play a few tricks to get our result. When $y(x)= Y_{xa}(t)$ then $y(a) = t$ by definition and so ($1$) is satisfied by first principles. Proving ($2$) is more wordplay then anything. Firstly $u = Y_{xb}(Y_{ba}(t))$ is the unique function such that $u(b) = Y_{bb}(Y_{ba}(t))= Y_{ba}(t)$ (by ($1$)) and $u'(x) = f(x, u(x))$. Similarly though, the function $w = Y_{xa}(t)$ is the unique function such that $w(b) = Y_{ba}(t)$ and $w'(x) = f(x, w(x))$. Therefore they must equal, $w = u$. Plugging in $x = c$ gives the result. \end{proof} The majority of this theorem relied on the uniqueness of a solution to a First Order Differential Equation; where again $f$ is \emph{nice}. This allowed for an identity principle, which was used as the cornerstone of this theorem. It isn't very hard to imagine the cases where $f$ is suitable and this argument works--again, something like a \emph{nice} global Lipschitz condition.\\ Now, this identity alone does not justify considering this object an integral. Luckily, there's more hidden to the proposed notation. Considering the usual integral, there is an iconic ability to substitute variables using Leibniz's differential calculus. If $u = \gamma(s)$, $du = \gamma'(s)ds$ and $u(\alpha) = a$ and $u(\beta) = b$ then, \[ \int_a^b f(s)\,ds = \int_\alpha^\beta f(u)\, du = \int_\alpha^\beta f(\gamma(s))\gamma'(s)\,ds \] This leads us to the next nice fact about The Compositional Integral, and hints more aggressively as to the usefulness of the proposed notation. The same substitution of variables is still perfectly valid. \[ \int_a^b f(s,t) \,ds\bullet t = \int_{\alpha}^\beta f(u,t) \,du \bullet t = \int_\alpha^\beta f(\gamma(s),t)\gamma'(s)\,ds\bullet t \] Remembering the definition of The Compositional Integral, this can be shown using the less than startling identity: \[ \frac{d}{dx} y(\gamma(x)) = f(\gamma(x),y(\gamma(x)))\gamma'(x) \] More thoroughly, the function $w(x) = y(\gamma(x))$ is the \emph{unique} function such that $w'(x) = f(\gamma(x),w(x))\gamma'(x)$ and $w(\alpha) = y(\gamma(\alpha)) = y(a) = t$. Therefore $w(x) = \int_\alpha^x f(\gamma(s),t)\gamma'(s)\,ds\bullet t$. Similarly $w(\beta) = y(b)$. Since $y(b) = Y_{ba}(t)$, we must have: \[ Y_{ba}(t) = \int_\alpha^\beta f(\gamma(s),t)\gamma'(s)\,ds\bullet t \] This also explicitly constructs the inverse for each element of the semi-group. Meaning, The Compositional Integral forms a group under composition. The function $Y_{ab}(t) = Y_{ba}^{-1}(t)$ which allows $Y_{ab}(Y_{ba}) = Y_{aa} = t$. Theorem \ref{thm1} hypothetically shows this, but it may be unclear what $Y_{ab}$ means when $a \le b$. Using Leibniz's rule of substitution where $u(s) = b+a - s$ with $u(a) = b$ and $u(b) = a$, the meaning of $Y_{ab}$ can be clarified by the identity: \[ Y_{ab}(t) = \int_b^a f(s,t)\,ds \bullet t = \int_a^b f(u,t)\,du \bullet t = \int_a^b -f(b+a-s,t)\,ds \bullet t \] Therefore: \[ Y_{ab}(t) = Y^{-1}_{ba}(t) = \int_a^b -f(b+a-s,t)\,ds \bullet t \] This leaves us with the conception that not only does $Y_{ba}(t)$ have a semi-group-structure for $a \le b$, it has a group-structure when we remove the restriction $a \le b$; the inverse of $Y_{ba}$ is $Y_{ab}$, which can be described using a substitution of variables.\\ The last facet of The Compositional Integral is perhaps the most important. The Compositional Integral can be constructed using something looking like a Riemann Sum. We will devote the majority of this brief paper justifying this. The group structure of $Y_{ba}$ can be used to construct $Y_{ba}$. It is beneficial to think accurately about Euler's Method in the following argument. If throwing in one's hat as to whom truly deserves priority over all the ideas in this paper; the author feels the entirety of this paper could probably be attributed to Euler, it's simply that he said it differently. Let $P = \{s_i\}_{i=0}^n$ be a partition of $[a, b]$ written in descending order (this can cause a bit of a trip up). That is to say $b = s_0 > s_1 > s_2 > ... > s_n = a$. Let's also write $Y_{\Delta s_i} = Y_{s_is_{i+1}}$ then by the group law $Y_{ca} = Y_{cb}(Y_{ba})$: \[ Y_{ba} = Y_{bs_1}(Y_{s_1s_2}(Y_{s_2s_3}(...Y_{s_{n-1}a}))) = \prod_i Y_{\Delta s_i} \] Where the product is taken to mean composition. As $\Delta s_i = s_i -s_{i+1}$ tends to zero these $Y_{\Delta s_i} \to t$, which follows because $Y_{aa}(t) = t$. We know something stronger though, we know as $s_i,s_{i+1} \to s_{i}^*$ that $\dfrac{Y_{\Delta s_i} - t}{\Delta s_i} \to f(s_i^*, t)$ which is just the differential equation used to define $Y$. This implies each $Y_{\Delta s_i}$ looks like $t + f(s_i^*, t)\Delta s_i$, up to an error of order $\mathcal{O}(\Delta s_i^2)$. To make an educated guess then: shouldn't the $\mathcal{O}(\Delta s_i^2)$ part be negligible as the partition gets finer? It should be safe to write: \[ Y_{ba} = \lim_{\Delta s_i \to 0} \prod_i t + f(s_i^*, t)\Delta s_i \] We may write this in a form that would be familiar to more Classical Analysts. Let $\Delta s_i \to ds$ and write: \begin{equation} Y_{ba} = \prod t + f(s, t)\, ds\\ \label{eq:1} \end{equation} Although this may seem unusual; this is no more than the combination of Euler's Method and Riemann Sums with their language of partitions. For context, Euler would usually fix $\Delta s_i$ small and approximate $Y_{ba}$ as we let $b$ grow. We are fixing $b$, but letting $\Delta s_i \to ds$ and thinking of this as a Riemann Sum. But then again, Classical Analysts never saw the need for a Riemann Sum, it was just how infinitesimals worked. \section{But where does the $\bullet$ come from?}\label{sec3} \setcounter{equation}{0} If the reader leaves this paper with one thing, it is hopefully an understanding of the differential bullet product $ds \bullet t$. And what it means when combined with the integral. The expression $\int ds \bullet t$ behaves similarly to the expression $\int ds$ (they both satisfy: a group structure, substitution of variables, and a First Order Differential Equation). But, what does the differential bullet product mean? That’s a tough question to answer without sufficient context. The author will boil it down into one thing. We cannot use the notation $\prod$ to represent nested compositions. Notation must represent clearly and precisely. We’ll need a notation for iterated compositions, and we’ll have to be clear. The author chooses the symbol $\OmSum$. If $h_j$ is a sequence of functions taking some interval to itself. The expression $\OmSum_{j=0}^n h_j (t)$ can be understood to mean: \[ \OmSum_{j=0}^n h_j (t) = h_0(h_1(h_2(...h_n(t)))) \] No different than Euler’s notation for products and sums, except, we’ll need some additional notation in the spirit of Leibniz. When our function $h_j$ depends on another variable which is not being composed across, our notation becomes unclear. Insofar, when we write: \[ \OmSum_{j=0}^n h_j (s, t) \] Does this mean we compose across $t$? \[ h_0(s, h_1(s, ...h_n(s, t))) \] Or does this mean we compose across $s$? \[ h_0(h_1(...h_n(s, t)..., t), t) \] This is no different a problem than when an undergraduate writes $\int e^{st}$ and the professor is expected to guess whether the integration is across $s$ or $t$. It becomes unclear whether one means $\int e^{st}\,ds$ or $\int e^{st} \, dt$. To reconcile the situation we’re going to use a bullet. Therein, the above expressions can be written more clearly: \[ \OmSum_{j=0}^n h_j (s, t) \bullet t = h_0(s, h_1(s, ...h_n(s, t))) \] \[ \OmSum_{j=0}^n h_j (s, t) \bullet s = h_0(h_1(...h_n(s, t)..., t), t) \] So when the author uses a bullet ($\bullet$) followed by a variable, it is to mean that the operation is bound to the variable. Specifically compositions are across this variable. Returning to our discussion from above, we arrive at a more playful denotion of The Compositional Integral. Let $P = \{s_i\}_{i=0}^n$ be a partition of $[a, b]$ (written in descending order) with $s_{i+1} \le s_i^* \le s_i$, then we can write, and aim to justify: \[ \prod_i t + f(s_i^*,t)\Delta s_i = \OmSum_{i=0}^{n-1} t + f(s_i^*, t)\Delta s_i \bullet t \approx Y_{ba}(t) \] This is essentially the statement of Euler's Method as it's stated today, and it's still used by numerical approximation algorithms. Traditionally one would write this calculation a bit more sequentially: \begin{eqnarray*} t_0 &=& t\\ t_1 &=& t_0 + f(s_{n-1}^*,t_0)\Delta s_{n-1}\\ t_2 &=& t_1 + f(s_{n-2}^*,t_1)\Delta s_{n-2}\\ &\vdots&\\ t_n &=& t_{n-1} + f(s_0^*,t_{n-1})\Delta s_0 \approx Y_{ba}(t)\\ \end{eqnarray*} The benefit of this notation is that $t_{n+1} \approx Y_{(b+\Delta)a}$ and $t_{n+2} \approx Y_{(b+2\Delta)a}$, and we can think of this as a sequence, or a process, which continues to approximate. The main proposition of our altered form, is this becomes equality as $\Delta s_i \to 0$ (and $n\to\infty$), but $b$ is fixed, and isn't allowed to vary. This isn't much of a leap of faith considering the vast amount of numerical evidence which supports this claim; and lays at the foundation of numerical approximation algorithms. At this point, the notation can be rephrased; the notation of Section 2 can be better motivated. Let $\Delta s_i \to ds$, the summatory part $\OmSum t + $ becomes an $\int$. This is a continuous, infinitesimal, composition; similar to a continuous sum. It becomes a sweep of $f(s,t)$ for $s \in [a,b]$ across $t$; which we write as $ds \bullet t$. Again, this is something like a Riemann Sum... but it's an infinitely nested composition. The bounds on the integral can be made explicit, and it leaves us with the expression: \[ \lim_{\Delta s_i \to ds}\OmSum_{i=0}^{n-1} t + f(s_i^*, t)\Delta s_i \bullet t = \int_a^b f(s, t)\, ds \bullet t \] Which is what the author means by the differential bullet product. We specifically call it a product as our group law $Y_{cb}(Y_{ba}(t)) = Y_{ca}$ can be written as the product of integrals: \[ \int_{a}^c f(s,t)\,ds\bullet t = \int_{b}^c f(s,t)\,ds\bullet \int_{a}^b f(s,t)\,ds\bullet t \] The bullet is composition. We choose a bullet for this product of integrals, rather than the traditional symbol $\circ$, as to specify the composition is across $t$; and to emphasize the group-structure.\\ It is helpful to note when $f(s, t) = f(s)$ is constant in $t$, then $t + f(s)$ is a translation and the compositions above revert to addition. Illustrated by the formal manipulations, \begin{eqnarray*} \int_a^b f(s) ds \bullet t &=& \lim_{\Delta s_i\to0}\OmSum_{i=0}^{n-1} t + f(s_i^*)\Delta s_i \bullet t\\ &=& \lim_{\Delta s_i \to 0} \big{(}t + \sum_{i=0}^{n-1} f(s_i^*)\Delta s_i\big{)}\\ &=& t + \int_a^b f(s)\, ds\\ \end{eqnarray*} We are reduced to the usual Riemann Sum definition of an integral. Furthermore we can explicitly see $t$ as the constant of integration. The additivity of integrals is again the composition law \[ Y_{cb}(Y_{ba}(t)) = t + \int_b^c f(s)\,ds + \int_a^b f(s)\,ds = t + \int_a^c f(s)\,ds = Y_{ca}(t) \] \section{Approaching from the other side of the equation}\label{sec4} \setcounter{equation}{0} Continuing with the same idea, we are going to approach from the other side of the equation. We will start with our (or Euler's?) proposed definition of $Y$ and argue that it is $Y$. To separate the objects as two different things we will call the proposed definition $\widetilde{Y}$. The aim is to formally argue and motivate $Y = \widetilde{Y}$, but we will not attempt to prove it yet. The benefit of this side, is to construct $\widetilde{Y}$ first, and provide a constructive/productive form of Picard and Lindel\"{o}f's Theorem. Recalling the proposed definition: if $P = \{s_i\}_{i=0}^n$ is a partition of $[a, b]$ in descending order, and $s_{i+1} \le s_i^* \le s_i$: \[ \widetilde{Y}_{ba}(t) = \lim_{\Delta s_i\to 0} \OmSum_{i=0}^{n-1} t + f(s_i^*, t) \Delta s_i \bullet t \] We are going to take a leap of faith momentarily and assume this expression converges uniformly. Some things about $\widetilde{Y}$ are simple to prove off hand, but $\widetilde{Y}$ may seem so foreign to navigate, the reader may not know where to look. So to start slow, the semi-group laws from before hold. Firstly, $\widetilde{Y}_{aa}(t) = t$ as this becomes the null composition which is the identity value $\text{Id} = t$. It is helpful to think about how the null sum is $0$, and the null product is $1$. More importantly, $\widetilde{Y}_{cb}(\widetilde{Y}_{ba}) = \widetilde{Y}_{ca}$ which is worth while to the reader for the author to write out.\\ \emph{A proof-sketch that $\widetilde{Y}_{cb}(\widetilde{Y}_{ba}) = \widetilde{Y}_{ca}$:} Let $P = \{s_i\}_{i=0}^n$ be a partition of $[a, b]$ in descending order, with $s_{i+1} \le s_i^* \le s_i$; and let $R = \{r_j\}_{j=0}^m$ be a partition of $[b, c]$ in descending order, with $r_{j+1} \le r_j^* \le r_j$. Then, \begin{eqnarray*} \widetilde{Y}_{cb}(\widetilde{Y}_{ba}) &=& \lim_{\Delta r_j\to 0} \OmSum_{j=0}^{m-1} t + f(r_j^*, t) \Delta r_j \bullet \lim_{\Delta s_i\to 0}\OmSum_{i=0}^{n-1} t + f(s_i^*, t)\Delta s_i \bullet t\\ &=& \lim_{\Delta r_j\to 0} \lim_{\Delta s_i\to 0} \OmSum_{j=0}^{m-1} t + f(r_j^*, t) \Delta r_j \bullet\OmSum_{i=0}^{n-1} t + f(s_i^*, t)\Delta s_i \bullet t\\ &=& \lim_{\Delta q_k\to 0}\OmSum_{k=0}^{n+m-1} t + f(q_k^*, t)\Delta q_k \bullet t\\ &=& \widetilde{Y}_{ca}\\ \end{eqnarray*} Where $Q = P \cup R= \{q_k\}_{k=0}^{n+m}$ is a partition of $[a, c]$ written in descending order, consisting of $q_j = r_j$ for $0 \le j \le m$ and $q_{i+m} = s_i$ for $0 \le i \le n$ and similarly for $q_k^*$.\\ This is purely a formal manipulation, but the reader may care to see how a rigorous proof would evolve if these objects converge uniformly in $t$, or in some \emph{nice} way. Reparametrizing the composition from $[a,b]$ to $[\alpha,\beta]$ with a continuously differentiable function $\gamma$; Leibniz's substitution of variables appears. Taking $\gamma(p^*_i) = s_i^*$ and $\gamma_i = \gamma_i(p_i) = s_i$, where $\beta = p_0 > p_1 > ... > p_{n-1} > p_n = \alpha$ and $p_{i+1} \le p_i^* \le p_i$, then by an approximate mean value theorem: \[ f(s_i^*,t) (s_i - s_{i+1}) = f(\gamma(p_i^*),t) (\gamma_i - \gamma_{i+1}) \approx f(\gamma(p_i^*),t) \gamma'(p_i^*) (p_i - p_{i+1}) \] So that, \[ \widetilde{Y}_{ba}(t) = \lim_{\Delta p_i \to 0} \OmSum_{i=0}^{n-1} t + f(\gamma(p_i^*),t) \gamma'(p_i^*) \Delta p_i \bullet t \] So, our proposed definition also admits substitution of variables. It's also nice to see that the composition behaves little differently than how Riemann Sums behave, in this instance at least.\footnote{This hints aggressively to the idea of adding measure theory to the discussion.} To extend our group-structure, if we invert $\widetilde{Y}_{ba}$ to $\widetilde{Y}_{ba}^{-1}$, then componentwise $t + f(s_i^*,t)\Delta s_i$ gets mapped to $\approx t - f(s_i^*,t)\Delta s_i$. Since composition is non-commutative, the partition is now in ascending order, and our inverse becomes precisely $\OmSum_{i=0}^{n-1} t - f(b+a-s_i^*,t)\Delta s_i \bullet t$. This agrees with our earlier inversion formula.\\ A more difficult idea to intuit is that $\widetilde{Y}_{xa}$, using this definition, satisfies the differential equation that $Y$ satisfies: $\frac{d}{dx} \widetilde{Y}_{xa} = f(x, \widetilde{Y}_{xa})$. And that this expression actually satisfies a First Order Differential Equation and we can come full circle. The author will only use intuition to morally justify this statement, for the moment. This logical sequence is a formal use of infinitesimals. Starting with the following identity: \[ \widetilde{Y}_{(x+dx)x}(t) = t + f(x, t)dx \] Which can be sussed out as ``composing an infinitesimal amount,'' or ``composing over the interval $[x,x+dx]$.'' If one can accept this malignant use of infinitesimals\footnote{As the author would argue Classical Analysts took it as fact, though they definitely wrote it differently.}, it can be expanded using our semi-group laws $\widetilde{Y}_{cb}(\widetilde{Y}_{ba}(t)) = \widetilde{Y}_{ca}(t)$, so that: \begin{eqnarray*} \widetilde{Y}_{(x+dx)a} &=& \widetilde{Y}_{(x+dx)x}(\widetilde{Y}_{xa}) = \widetilde{Y}_{xa} + f(x, \widetilde{Y}_{xa}) dx\\ \frac{d \widetilde{Y}_{xa}}{dx} &=& \frac{\widetilde{Y}_{(x+dx)a} - \widetilde{Y}_{xa}}{dx}\\ &=&f(x,\widetilde{Y}_{xa})\\ \end{eqnarray*} This kind of tells us this idea should work. If the objects converge in the best manner possible, all of this seems like a Leibnizian argument using infinitesimals.\\ The above arguments work out formally as we've written, but proving it does generally and rigorously is difficult. For that reason, we will work through a specific case. It can be illuminating to use an example, and may clear cut some of the block-ways which heed intuition on the matter. This will also give a glimpse of the difficulty of the problem in a rigorous setting. \section{The nit and gritty}\label{sec5} \setcounter{equation}{0} Now that we’re caught up with the sweeping motions, we’ll work through a case in which we can do everything we just did above but with a bit more rigor. To do such, we’ll work with the function $f(x, t) = e^{-xt}$ for $x \in [0, 1]$ and $t \in \mathbb{R}^+$. And we'll try to construct The Compositional Integral of $f$. Although we've just deliberated on The Compositional Integral as a formal thing; the author has yet to construct it, or even prove its existence. We aim to prove the following theorem: \begin{theorem}\label{thm1B} The following two claims hold: \begin{enumerate} \item For $0 \le a \le b \le 1$ and $t \in \mathbb{R}^+$, there is a unique Compositional Integral of $e^{-xt}$, denoted \[ Y_{ba}(t) = \int_a^b e^{-st}\,ds \bullet t \] Where $Y_{ba}(t): \mathbb{R}^+ \to \mathbb{R}^+$. \item Let $P = \{ s_i\}_{i=0}^{n}$ be a partition of $[a, b]$ written in descending order, with $s_{i+1} \le s_i^* \le s_i$; as $\Delta s_i = s_i - s_{i+1} \to 0$ the expression \[ \OmSum_{i=0}^{n-1}t+e^{-s_i^*t}\Delta s_i \bullet t \] converges to The Compositional Integral $Y_{ba}(t)$ of $e^{-xt}$. \end{enumerate} \end{theorem} In our proof, it will be shown in one motion that $\widetilde{Y}=Y$. It will then be evident the function $\widetilde{Y}_{xa}(t)$ is the unique function $y(x)$ such that $y(a) = t$ and $y'(x) = e^{-xy(x)}$. This provides us with the quick and justifiable statement that The Compositional Integral is a meaningful thing and looks something like a Riemann Sum, if only a Riemann Sum involved compositions... A Riemann composition, if you will. For convenience, the author will call it \emph{The Riemann Composition} of The Compositional Integral. The proof we will provide will require some hand waving, as to write out all the steps produces a mess of equations. For this reason we will try to be short but convincing nonetheless. We will try to argue classically, but will admit much more rigor than a Classical Analyst would. \begin{proof} To begin, we'll prove ($1$). For all $t\in \mathbb{R}^+$ and $0 \le a \le b \le 1$ there is a function $Y_{ba}(t):\mathbb{R}^+\to\mathbb{R}^+$--The Compositional Integral of $f(x,t) = e^{-xt}$. To show this is an exercise in soft-analysis. For all $t_0,t_1 \in\mathbb{R}^+$ and $x \in [0,1]$ we have $|e^{-xt_0} - e^{-xt_1}| \le |t_0 - t_1|$. Therefore by The Picard-Lindel\"{o}f Theorem, for every $x_0 \in [0,1]$ there is a neighborhood $|x-x_0| < \delta$ ($\delta$ can be chosen to work for all $x_0$), where for each $ t \in \mathbb{R}^+$, we have a function $y_{t,x_0}$ in which $y_{t,x_0}'(x)= e^{-xy_{t,x_0}(x)}$ and $y_{t,x_0}(x_0) = t$. These neighborhoods $|x-x_0|<\delta$, and hence functions $y_{t,x_0}$, can be glued together. We can extend $y_{t,x_0}(x)$ from $|x-x_0| < \delta$ to $|x-x_0| < 3\delta/2$ by noticing \[ y_{t,x_0}(x\pm\delta/2) = y_{y_{t,x_0}(x_0\pm\delta/2),x_0}(x) \] Continuing this process, $y_{t,x_0}$ can be extended from $|x-x_0|<\delta$ to $x \in [0,1]$ using a monodromy principle. The presiding identity principle is not that $y$ is analytic, though. Instead $y_{t,x_0}$ satisfies the same First Order Differential Equation for each $x_0$. To elaborate: consider two intervals $I$ and $J$ where $I \cap J \neq \emptyset$. Let $u: I \to \mathbb{R}$ and $w: J \to \mathbb{R}$. Assume $u\Big{|}_{I \cap J} = w\Big{|}_{I \cap J}$, and they satisfy the same First Order Differential Equation, $y' = e^{-xy(x)}$. By the uniqueness property of First Order Differential Equations, $u = w$ on $I \cup J$. This monodromy principle forms $Y_{ba}(t) = y_{t,a}(b)$ for all $t\in \mathbb{R}^+$ and $0 \le a \le b \le 1$. Lastly, $Y_{ba}(t) : \mathbb{R}^+ \to \mathbb{R}^+$ because $Y_{aa}(t) = t \in \mathbb{R}^+$ and $Y_{xa}(t)$ is increasing in $x$ because it's derivative is greater than $0$. Theorem \ref{thm1} can now be thought of rigorously, and shows that $Y$ satisfies a group structure.\\ For our proof of ($2$), that The Riemann Composition converges to $Y_{ba}(t)$; by Taylor's theorem: \[ Y_{ss'}(t) = t + f(s^*,t)(s-s') + R_\Delta \] Where here $\frac{R_\Delta}{\Delta} \to 0$ as $\Delta \to 0$, and $\Delta$ is an upper bound on $(s - s')$ where $0 \le s' \le s^* \le s \le 1$. Now $R_\Delta$ depends on $s^*, s', s$ and $t$, but we are going to throw its dependence away, as it can clutter the proof. Since we will be letting $\Delta\to 0$ its dependence on $t$ (and $s^*, s', s$) becomes irrelevant (especially because the convergence is uniform for $t \in \mathbb{R}^+$, and $0 \le s' \le s^* \le s \le 1$). Let $P= \{s_i\}_{i=0}^{n}$ be a partition of $[a,b]$ in descending order, and let $s_{i+1} \le s_i^* \le s_i$. Let $\max_{i=0,1,...,n-1} \Delta s_i=\Delta$. The following identities should illustrate the method of the proof: \begin{eqnarray*} Y_{ba}(t) &=& Y_{bs_1}(Y_{s_1s_2}(...Y_{s_{n-1}a}(t)))\\ &=&\OmSum_{i=0}^{n-1} Y_{s_is_{i+1}}(t)\bullet t\\ &=&\OmSum_{i=0}^{n-1} t+ f(s_i^*,t)\Delta s_i + R^{i}_\Delta \bullet t\\ &=& \OmSum_{i=0}^{n-1} t+ f(s_i^*,t)\Delta s_i\bullet t + \sum_{i=0}^{n-1} Q^i_\Delta\\ \end{eqnarray*} Where here each $\frac{Q^i_\Delta}{\Delta} \to 0$ as $\Delta\to 0$ for all $0 \le i \le n-1$. Ignoring $R_\Delta^i$'s dependence on $t$, the justification of this identity follows from an inductive use of the rule $g(t+\mathcal{O}(\Delta^2)) = g(t) + \mathcal{O}(\Delta^2)$--where we must be sure to count how many error terms we are adding together. This crude formalism is justified, again due to the uniform convergence of $R_\Delta^i \to 0$. Now since $\Delta = \mathcal{O}(1/n)$ we must have $Q^i_\Delta = \mathcal{O}(1/n^2)$. We are taking the sum $\sum_{i=0}^{n-1} Q^i_\Delta$, so we can see that \[ \sum_{i=0}^{n-1} Q^i_\Delta = \sum_{i=0}^{n-1} \mathcal{O}(1/n^2) = n \mathcal{O}(1/n^2) = \mathcal{O}(1/n) \] This allows us to write that: \[ Y_{ba}(t) - \OmSum_{i=0}^{n-1} t + f(s_i^*,t)\Delta s_i \bullet t = \mathcal{O}(1/n) = \mathcal{O}(\Delta) \] And so in letting $\Delta\to 0$ (and $n\to\infty$), the LHS tends to zero and our Riemann Composition converges to The Compositional Integral of $e^{-xt}$. \end{proof} To summarize what was especially needed from $f$ in this argument, in our exact choice of $f(x,t) = e^{-xt}$; the mapping $f(x,t) : [0,1] \times \mathbb{R}^+ \to \mathbb{R}^+$ and therefore the nested compositions are meaningful. Secondly, it was required that the function $f(x,t) = e^{-xt}$ is globally Lipschitz continuous in $t$ on $\mathbb{R}^+$ for all $x \in [0,1]$ as this allowed for the simple argument proving the function $Y_{ba}(t)$ even exists and is unique. The global Lipschitz condition also ensured the uniform convergence of the error term $R^i_\Delta \to 0$, which allowed for the error term to be pulled through the composition so easily. Supposing we chose another function $f$ where $t$ was restricted to some interval $[c,d]$, then this causes innumerable problems. We would need that compositions of $t+f(s_i^*,t)\Delta s_i$ are meaningful things, but this is difficult as $[c,d]$ is bounded and the composing functions may grow to a value greater than $d$, or less than $c$, and our composition may no longer make sense. Especially because of the dangling translation by $t$. We would need $t+f(s_i^*,t)\Delta s_i:[c,d] \to [c,d]$ for all $0 \le i \le n-1$ and as $\Delta s_i \to 0$, which is unnatural and quite restrictive. Avoiding this would require more clever topological arguments; they would surely not fit in the confines of this notice. Therein, our choice of $e^{-xt}$ was very intentional, and a very special function for this argument to work. Constructing The Compositional Integral for arbitrary functions proves to be a much more difficult task, especially if the only condition we demand is that $f$ is Lipschitz. But if one takes Euler's word for it, it isn't much of a leap. The author imagines it very plausible that The Riemann Composition converges to The Compositional Integral if all that is asked is that $f$ is Lipschitz. A proof of this would simply take longer than the space we have in this paper. And probably more expertise than the author has. \section{In Conclusion}\label{sec6} \setcounter{equation}{0} The Compositional Integral can be made into a meaningful thing. It is a stark redefinition of the Riemann Integral, and provides a productive form of The Picard-Lindel\"{o}f Theorem, in which we have some \emph{thing} and this \emph{thing} converges to the solution of a First Order Differential Equation. It also looks like the integral in more ways than one. The author has remained as curt as possible, but hopes to excise a curiousity in the reader and leave the subject open ended. What else can be done with this strange new integral? Can we add measure theory by looking at $\mu (\Delta s_i)$ rather than $\Delta s_i$ for some measure $\mu$? Can we add contour integrals by parameterizing contours $C$ in the complex plane using some differentiable arc $\gamma$? How do we take limits at infinity? Are there dominated or monotone convergence theorems? The author can only imagine.\\ And as to what we've really done in this paper, it may be fun to hint at expansions of common functions using these methods. We can express $e^x$ in a somewhat new way, or at least provide a new way of justifying the expansion. For $x,t \in \mathbb{R}^+$: \[ t e^x= \int_{0}^x t\,ds\bullet t \] because $y = te^x$ satisfies $y(0) = t$ and $y'(x) = y(x)$. Interestingly, now the group structure of The Compositional Integral become the multiplicative property of $e^x$. In this special case, The Riemann Composition reduces to an identity exactly of the form $\lim_{n\to\infty}(1+\frac{x}{n})^n = e^x$--the author thinks it's one of the many ways Euler probably derived the expression. Namely if $P=\{s_i\}_{i=0}^n$ is a partition of $[0,x]$, then: \begin{eqnarray*} te^x &=& \lim_{\Delta s_i \to 0} \OmSum_{i=0}^{n-1} t + t\Delta s_i \bullet t\\ &=& \lim_{\Delta s_i \to 0} \OmSum_{i=0}^{n-1} t(1 + \Delta s_i) \bullet t\\ &=& \lim_{\Delta s_i \to 0} t \prod_{i=0}^{n-1}(1+\Delta s_i)\\ \end{eqnarray*} Where here $\Delta s_i$ looks like $\frac{x}{n}$; so, $\prod_{i=0}^{n-1}(1+\Delta s_i)$ looks like $(1+\frac{x}{n})^n$. Using the same reasoning, we can generalize. The following identities written as though they are Riemann Sums, are derived in the same manner and are interesting--but are not unknown: \begin{eqnarray*} e^{x^2} &=& \lim_{\Delta s_i \to 0} \prod_{i=0}^{n-1} (1 + 2 s_i^*\Delta s_i) = \lim_{n\to\infty} \prod_{i=0}^{n-1} \Big{(}1 + 2 i \Big{(}\frac{x}{n}\Big{)}^2\Big{)}\\ e^{x^3} &=& \lim_{\Delta s_i \to 0} \prod_{i=0}^{n-1} (1 + 3 (s_i^*)^2\Delta s_i) = \lim_{n\to\infty} \prod_{i=0}^{n-1} \Big{(}1 + 3 i^2 \Big{(}\frac{x}{n}\Big{)}^3\Big{)}\\ &\vdots&\\ e^{x^k} &=& \lim_{\Delta s_i \to 0} \prod_{i=0}^{n-1} (1 + k (s_i^*)^{k-1}\Delta s_i) = \lim_{n\to\infty} \prod_{i=0}^{n-1} \Big{(}1 + k i^{k-1} \Big{(}\frac{x}{n}\Big{)}^{k}\Big{)}\\ \end{eqnarray*} The following derivation is left to the reader: \[ te^{\int_0^x p(s)\,ds} = \int_0^x p(s)t\,ds\bullet t = \lim_{\Delta s_i \to 0} t\prod_{i=0}^{n-1} (1 + p(s_i^*)\Delta s_i) \] Therefore The Compositional Integral of $f$ reduces to the Volterra integral of $p$ when $f(s,t) = p(s)t$ \cite{Volterra}. If I haven't convinced the reader--these identities can be proven by taking logarithms, and using the estimate $\log(1+x) \sim x$, which is the driving point of Volterra's construction. \section*{Acknowledgement} The author would like to thank the retired professor Dr. John Gill of Colorado state University-Pueblo. John may be better known as a revolutionary free climber, but the few e-mails and notes we passed back and forth helped me clarify exactly what I meant when I'd say to myself: ``A Riemann Sum, but instead it's like... composition.'' John essentially invented The Riemann Composition of The Picard Lindel\"{o}f Integral--and truly claims priority (though only if Euler doesn't). John chose a different nomenclature, and called it ``The Virtual Integral.'' The author came to the idea independently, but in the altered format presented in this article. This exposition intended to: expand on John Gill's ideas; give context in the form of Euler's method; define and describe the group structure; and propose more fluid notation. For John Gill's original papers on ``The Virtual Integral,'' the author points to \cite{VirtInt1, VirtInt2}; but the abundance of his notes are sadly unpublished. The majority of his work was made known to the author through personal correspondence. Even still, a lot of his work on ResearchGate frequently makes brief mention of ``The Virtual Integral.'' The author is greatly indebted to his mathematical contributions, and his encouraging comments.
\section{Introduction}\label{sec:int} The binomial and negative binomial distribution functions are used in many areas of science and engineering. In particular, the generation of random binomial variables plays a key role in simulation algorithms as, for example, the stochastic spatial modeling of chemical reactions \cite{Marquez:2007:binom}. On the other hand, the negative binomial distribution is, for example, widely used in genomic research to model gene expression data arising from RNA-sequences; see, for example, \cite{McCarthy:2012:negbin}, \cite{Li:2019:negbin}. The binomial cumulative distribution function is defined by \begin{equation}\label{eq:intro01} P(n,p,x)=\displaystyle\sum_{k=0}^x \binom{n}{k}p^k(1-p)^{n-k},\quad 0\le p \le 1, \end{equation} with $x$ and $n$ positive integers, $x\le n$. The complementary function is \begin{equation}\label{eq:intro02} Q(n,p,x)=\displaystyle\sum_{k=x+1}^n \binom{n}{k}p^k(1-p)^{n-k}=1-P(n,p,x). \end{equation} The negative binomial cumulative distribution function (also called Pascal distribution) can be given by \begin{equation}\label{eq:intro03} P^{NB}(r,p,x)=\displaystyle\sum_{k=0}^x \binom{k+r-1}{r-1}p^r(1-p)^{k},\quad 0\le p \le 1, \end{equation} with $x$ and $r$ positive integers. The complementary function satisfies $Q^{NB}(n,p,x)=1-P^{NB}(r,p,x)$. The definition of the negative binomial distribution can be extended to the case where the parameter $r$ takes positive real values. In this case, the distribution is called Polya distribution. These functions are particular cases of the cumulative central beta distribution. This distribution function (also known as the incomplete beta function) is defined by \begin{equation}\label{eq:intro04} I_y(a,b)=\Frac{1}{B(a,b)}\displaystyle\int_0^y t^{a-1}(1-t)^{b-1}\,dt, \end{equation} where we assume that $a$ and $b$ are real positive parameters and $0\le y \le 1$. $B(a,b)$ is the Beta function \begin{equation}\label{eq:intro05} B(a,b)=\Frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}. \end{equation} The relation between the binomial and the central beta distribution functions is the following \begin{equation}\label{eq:intro06} P(n,p,x)=I_{1-p}(n-x,x+1),\quad Q(n,p,x)=I_p(x+1,n-x). \end{equation} In order to avoid loss of significant digits by cancellation, it is always convenient to compute the smallest of the two functions ( $P(n,p,x)$ or $Q(n,p,x)$) . For this, one can use the transition point for the function $I_x(p,q)$, which is given by $x_t\approx p/(p+q)$. In the case of the binomial distribution, we will have $p_t \approx (x+1)/(n+1)$. Then, if $p>p_t$ ($p<p_t$) it is better to evaluate $P(n,p,x)$ ($Q(n,p,x)$). For the negative binomial, we have \begin{equation}\label{eq:intro07} P^{NB}(r,p,x)=I_{p}(r,x+1),\quad Q^{NB}(r,p,x)=I_{1-p}(x+1,r). \end{equation} In this case, the transition point will be given by $p_t \approx r/(r+x+1)$. When $p<p_t$ ($p>p_t$) it is convenient to evaluate $P(n,p,x)$ ($Q(n,p,x)$). In this paper, we explain that the methods used for the central beta distribution function (described in \cite{gil:2017:numbeta}) can be used to obtain asymptotic representations of the binomial and negative binomial cumulative distribution functions, and also for inverting these functions. The inversion problem is, however, now slightly different: in \cite{gil:2017:numbeta} we considered the problem of finding $y$ from the equation $I_y(a,b)=\alpha$. In the present case, the problem of inverting the binomial cumulative distribution function can be stated as follows: given $\alpha\in(0,1]$, $p\in(0,1)$, and $n$ (in the asymptotic problem a large positive integer), find the smallest positive integer $x$ such that \begin{equation}\label{eq:intro08} \alpha \le P(n,p,x)=\displaystyle\sum_{k=0}^x \binom{n}{k}p^k(1-p)^{n-k}\,. \end{equation} When we assume $x\in[1,n]$, we cannot take $\alpha$ smaller than the sum of the first two terms of the sum at the right-hand side. However, the sum of these two terms becomes very small when $n$ is large. In the finite sum definitions in \eqref{eq:intro01}, and so on, $x$ should be an integer, but in the representations in \eqref{eq:intro06} and \eqref{eq:intro07}, $x$ may be real. In the inversion procedure we first assume that $x$ is a real parameter, and later we round $x$ to the smallest integer larger than $x$. We give in detail the results for the binomial cumulative distribution function and in a final section we will redefine some parameters to obtain the results for the negative binomial cumulative distribution function. \section{Results for the binomial distribution function}\label{sec:bindis} In the Appendix, \S\ref{sec:incbeta}, we summarize earlier results for the incomplete beta function. We use these for the present case, where we need to change some notations. We use the notation \begin{equation}\label{eq:rep01} \nu= n+1,\quad \xi= \frac{x+1}{\nu}, \quad 1-\xi=\frac{n-x}{\nu}, \end{equation} and from \eqref{eq:intro07} and \eqref{eq:incbeta13} (with $a=x+1$ and $b=n-x$) it follows that the representation of both binomial distributions $ P(n,p,x)$ and $ Q(n,p,x)$ in terms of the complementary error function is \begin{equation}\label{eq:rep02} \begin{array}{@{}r@{\;}c@{\;}l@{}} P(n,p,x)&=&I_{1-p}(n-x,x+1)=\frac12\erfc\left(+\eta\sqrt{\nu/2}\right)+R_\nu(\eta),\\[8pt] Q(n,p,x)&=&I_p(x+1,n-x)=\frac12\erfc\left(-\eta\sqrt{\nu/2}\right)-R_\nu(\eta), \end{array} \end{equation} where the function $R_\nu(\eta) $ has the asymptotic expansion given in \eqref{eq:incbeta14}. The expansion can be obtained by using a recursive scheme given in \eqref{eq:incbeta15} in terms of a function $f(\eta)$ that arises when a change of the variable of integration is used; see \eqref{eq:incbeta02}, \eqref{eq:incbeta03} with final result in \eqref{eq:incbeta06}. In the present case we use \begin{equation}\label{eq:rep03} f(\zeta)=\frac{\lambda\zeta}{t-\xi},\quad f(\eta)=\frac{\lambda\eta}{p-\xi},\quad \lambda=\sqrt{\xi(1-\xi)}, \end{equation} where $\zeta$ is defined in \eqref{eq:incbeta03} ($t$ is a variable of integration in \eqref{eq:incbeta02}) and the definition of $\eta$ becomes \begin{equation}\label{eq:rep04} -\tfrac12 \eta^2 = \xi \log \frac{p}{\xi}+(1-\xi) \log \frac{1-p}{1-\xi}, \quad \sign(\eta)=\sign(p-\xi). \end{equation} \begin{remark}\label{rem:rem01} The choice of sign follows from the change of variables in \S\ref{sec:incbeta}. We know that when $p\downarrow0$ the binomial distributions approach the values $P(n,p,x)\to1$, $Q(n,p,x)\to 0$. From \eqref{eq:rep04} we see that the corresponding $\eta$ in the complementary error function tends to infinity when $p\downarrow0$, and when we take $\eta \to-\infty$, we have $\frac12\erfc\left(\eta\sqrt{\nu/2}\right)\to 1$, which is the wanted limit for $P(n,p,x)$. We see that this corresponds with the choice $\sign(\eta)=\sign(p-\xi)$. Similarly for $p\to1$, in which case we need positive values of $\eta$. \end{remark} Other representations that follow from \eqref{eq:rep02} and \eqref{eq:incbeta06} are \begin{equation}\label{eq:rep04a} \begin{array}{@{}r@{\;}c@{\;}l@{}} Q(n,p,x)&=&\dsp{\frac{F_\nu(\eta)}{F_\nu(\infty)},\quad F_\nu(\eta)=\sqrt{{\frac \nu{2\pi}}}\int_{-\infty}^\eta e^{-\frac12\nu\zeta^2}f(\zeta)\, d\zeta,}\\[8pt] P(n,p,x)&=&\dsp{\frac{G_\nu(\eta)}{F_\nu(\infty)},\quad G_\nu(\eta)=\sqrt{{\frac \nu{2\pi}}}\int_{\eta}^{\infty} e^{-\frac12\nu\zeta^2}f(\zeta)\, d\zeta,} \end{array} \end{equation} where $f(\zeta)$ is given in \eqref{eq:rep03}. We see here and in the representation of the incomplete beta function in \eqref{eq:incbeta06} a function $F_\nu(\infty)$, which is defined in \eqref{eq:incbeta07}. It has the large-$\nu$ asymptotic expansion given in \eqref{eq:incbeta07}. The first coefficients are as shown in \eqref{eq:incbeta09}. \subsection{Some expansions}\label{sec:binexp} An expansion of $\eta$ in \eqref{eq:rep04} in powers of $q=(p-\xi)/\lambda^2$ with $\lambda=\sqrt{\xi(1-\xi)}$ reads \begin{equation}\label{eq:rep05} \eta= q\lambda\left(1-\tfrac13(1-2\xi)q+\tfrac{1}{36}\left(7-19\xi+19\xi^2\right)q^2+\bigO\left(q^3\right)\right).\end{equation} Limiting values (for fixed $\xi\in(0,1))$ are \begin{equation}\label{eq:rep06} \lim_{p\downarrow0}\eta=-\infty,\quad \lim_{p\uparrow1}\eta=+\infty. \end{equation} We can also consider $\eta$ as a function of $\xi$. Limiting values (for fixed $p\in(0,1))$ are \begin{equation}\label{eq:rep08} \lim_{\xi\downarrow0}\eta=\sqrt{-2\log(1-p)},\quad \lim_{\xi\uparrow1}\eta=-\sqrt{-2\log p}. \end{equation} \begin{figure}[tb] \begin{center} \begin{minipage}{4.5cm} \hspace*{-0.5cm} \epsfxsize=5cm \epsfbox{etaxinew.eps} \end{minipage} \hspace*{2cm} \begin{minipage}{4.5cm} \epsfxsize=5cm \epsfbox{etapnew.eps} \end{minipage} \end{center} \caption{{\bf Left:} The function $\eta$ defined in \eqref{eq:rep04} as a function of $\xi\in(0,1)$ for two values of $p$: $p=1/3$ (lower curve) and $p=2/3$ (upper curve). The function $\eta$ has a zero at $\xi=p$. {\bf Right:} The function $\eta$ defined in \eqref{eq:rep04} as a function of $p\in(0,1)$ for two values of $\xi$: $\xi=1/3$ (upper curve) and $\xi=2/3$ (lower curve). The function $\eta$ has a zero at $p=\xi$.} \label{fig:fig01} \end{figure} In Figure~\ref{fig:fig01} (Left) we show two curves of $\eta$ as a function of $\xi$ for two values of $p$: $p=1/3$ (upper curve) and $p=2/3$ (lower curve). The function $\eta$ has a zero at $\xi=p$. At $\xi=0$ and $\xi=1$ the values of $\eta$ follow from \eqref{eq:rep08}. In Figure~\ref{fig:fig01} (Right) we give a similar picture of $\eta$ as a function of $p$ for two values of $\xi$: $\xi=1/3$ (lower curve) and $\xi=2/3$ upper curve). The function $\eta$ has a zero at $p=\xi$. At $p=0$ and $p=1$ we have $\eta\to\pm\infty$, see \eqref{eq:rep06}. For the inversion procedure it is convenient to have the expansion of $\xi$ in powers of $\eta$: \begin{equation}\label{eq:rep09} \xi=p-p(1-p)\sum_{k=1}^\infty a_k \wt\eta^k, \quad \wt\eta=\frac{\eta}{\sqrt{p(1-p)}}. \end{equation} The first coefficients are \begin{equation}\label{eq:rep10} \begin{array}{@{}r@{\;}c@{\;}l@{}} a_1&=&1, \quad a_2= \frac16(2p-1),\quad a_3=\frac{1}{72}(2p^2-2p-1),\\[8pt] a_4&=&-\frac{1}{540}(2p^3-3p^2-3p+2),\\[8pt] a_5&=&\frac{1}{17280}(4p^4-8p^3-48p^2+52p-23). \end{array} \end{equation} We also have \begin{equation}\label{eq:rep11} p=\xi+\lambda^2\sum_{k=1}^\infty b_k \widehat\eta^k, \quad \widehat\eta=\frac{\eta}{\lambda},\quad \lambda=\sqrt{\xi(1-\xi)}, \end{equation} with first coefficients \begin{equation}\label{eq:rep12} \begin{array}{@{}r@{\;}c@{\;}l@{}} b_1&=&1, \quad b_2= \frac13(1-2\xi),\quad b_3=\frac{1}{36}(13\xi^2-13\xi+1),\\[8pt] b_4&=&-\frac{1}{270}(2\xi-1)(23\xi^2-23\xi-1),\\[8pt] b_5&=&\frac{1}{4320}(313\xi^4-626\xi^3+339\xi^2-26\xi+1). \end{array} \end{equation} With these coefficients we can find the coefficients of the expansion \begin{equation}\label{eq:rep13} f(\eta)=\frac{\lambda\eta}{p-\xi}=\sum_{k=0}^\infty c_k \widehat\eta^k, \end{equation} and the first coefficients are \begin{equation}\label{eq:rep14} \begin{array}{@{}r@{\;}c@{\;}l@{}} c_0&=&1, \quad c_1= \frac13(2\xi-1),\quad c_2=\frac{1}{12}(\xi^2-\xi+1),\\[8pt] c_3&=&-\frac{1}{135}(2\xi-1)(\xi-2)(\xi+1),\quad c_4=\frac{1}{864}(\xi^2-\xi+1)^2. \end{array} \end{equation} \section{Inverting the binomial distribution function using the error function}\label{sec:invbin} We consider the inversion as described in \eqref{eq:intro08}, assuming that $\nu=n+1$ is a large parameter. The inversion procedure is based on finding $\eta$ from the equation (see \eqref{eq:rep02}) \begin{equation}\label{eq:inv01} \tfrac12\erfc\left(\eta\sqrt{\nu/2}\right)+R_\nu(\eta)=\alpha,\quad \alpha\in(0,1), \end{equation} and with $\eta$ we compute $\xi$, and then $x=\nu\xi-1$ (rounded to an integer). We consider $p$ and $n$ as fixed given quantities. The starting point for the inversion is considering the error function in \eqref{eq:inv01} as the main term in the representation. We compute $\eta_0$, the solution of the reduced equation \begin{equation}\label{eq:inv02} \tfrac12 \erfc \left(\eta_0 \sqrt{\nu/2}\right)=\alpha. \end{equation} A simple and efficient algorithm for computing the inverse of the complementary error function is included, for example, in the package described in \cite{Gil:2015:GCH}. Using this $\eta=\eta_0$ in \eqref{eq:rep04} we compute $\xi$, either by using the series expansion in \eqref{eq:rep09} or a numerical iteration procedure. \begin{remark}\label{rem:rem02} When $\alpha$ or $1-\alpha$ is very small, the value of $\vert\eta_0\vert$ may be very large, although a large value of $\nu$ may control this. Referring to the limits shown in \eqref{eq:rep08} for a given $p$, we observe that if the value of $\eta_0$ satisfies $\eta_0 < -\sqrt{-2\log(1-p)}$ or $\eta_0>\sqrt{-2\log p}$, then a corresponding value of $\xi\in(0,1)$ cannot be found. \end{remark} Next we try to find a better approximation of $\eta$ and assume that we have an expansion of the form \begin{equation}\label{eq:inv03} \eta\sim\eta_0+\frac{\eta_1}{\nu}. \end{equation} We can find the coefficient $\eta_1$ by using a perturbation method. We have from \eqref{eq:inv02} \begin{equation}\label{eq:inv04} \frac{d\alpha}{d\eta_0}=-\sqrt{\frac{\nu}{2\pi}}\, e^{-\frac12\nu\eta_0^2}. \end{equation} To proceed, we consider $P(n,p,x)=I_{1-p}(n-x,x+1)=\alpha$ and use the representation in \eqref{eq:rep04a}. This gives \begin{equation}\label{eq:inv05} \frac{d\alpha}{d\eta}=-\frac{1}{F_\nu(\infty)}\sqrt{\frac{\nu}{2\pi}}\, e^{-\frac12\nu\eta^2}f(\eta), \end{equation} with $f(\eta)$ given in \eqref{eq:rep03} and $\eta$ given in \eqref{eq:inv03}. We obtain from \eqref{eq:inv04} and \eqref{eq:inv05} \begin{equation}\label{eq:inv06} f(\eta)\frac{d\eta}{d\eta_0}=F_\nu(\infty)e^{\frac12\nu(\eta^2-\eta_0^2)}. \end{equation} The coefficient $\eta_1$ in \eqref{eq:inv03} depends on $\eta_0$, and we can substitute this approximation, compare equal powers of $\nu$ and find $\eta_1$. It follows that \begin{equation}\label{eq:inv07} \eta_1=\frac{1}{\eta_0}\log f(\eta_0). \end{equation} This quantity is defined as $\eta_0\to0$ because of the expansion in \eqref{eq:incbeta10}. For small values of $\eta_0$ (that is, when $\xi\sim p$, see \eqref{eq:rep04}), we need an expansion of $\eta_1$ in powers of $\eta_0$. We have \begin{equation}\label{eq:inv08} \begin{array}{@{}r@{\;}c@{\;}l@{}} \eta_1&= &\dsp{\frac{ 1-2\xi}{ 3 \lambda} - \frac{5\xi^2-5\xi-1} { 36 \lambda^{2}}\eta_0- \frac{ (2\xi-1)(23\xi^2-23\xi-1)} { 1620 \lambda^{3}} \eta_0^{2}\ -}\\ [8pt] && \dsp{\frac{ 31\xi^4-62\xi^3+33\xi^2-2\xi+7}{ 6480 \lambda^{4}} \eta_0^{3}+\ldots,} \end{array} \end{equation} where $\lambda=\sqrt{\xi(1-\xi)}$. \begin{remark}\label{rem:rem03} The asymptotic estimates in this section are uniformly valid for $\xi \in[\delta,1-\delta]$, where $\delta$ is a small fixed positive number. This corresponds with the result of the expansion of the incomplete beta function; see \eqref{eq:incbeta14}. \end{remark} \subsection{The algorithmic steps of the inversion procedure}\label{sec:algbin} To summarize the algorithm for inverting the binomial distribution using the error function we give the following steps. \begin{enumerate} \item First obtain a value for $\eta$ ($\eta_0$) from \eqref{eq:inv02}. \item With this value $\eta_0$, obtain a first approximation $\xi_0$ of $\xi$ from solving equation \eqref{eq:rep04}, either by a numerical iterative procedure, or when $\eta_0$ is small by using the expansion in \eqref{eq:rep09}. \item Evaluate $\eta_1$ by using \eqref{eq:inv07}, where $f(\eta_0)=\eta_0\sqrt(\xi_0(1-\xi_0))/(p-\xi_0)$; see \eqref{eq:rep03}. \item Next compute $\eta=\eta_0+\eta_1/\nu$. \item With this new value of $\eta$, obtain a further approximation of $\xi$ by solving equation \eqref{eq:rep04}, either by a numerical iterative procedure, or when $\eta$ is small by using the expansion in \eqref{eq:rep09}. \item Compute $x=\xi\nu-1$, and round this to the nearest larger integer; this gives the final $x$. \end{enumerate} \section{Numerical examples}\label{sec:numex} As a first example to find $x$ from $\alpha \le P(n,p,x)$, we take $n=50$, $p=0.4$, and $\alpha=0.51$. With $\nu=51$, we compute $\eta_0\doteq -0.0035103$ by using \eqref{eq:inv02}. This gives $\xi\doteq0.40172$ by using \eqref{eq:rep09} and $\eta_1\doteq -0.13454$ by using \eqref{eq:inv07}. Then $\eta\sim\eta_0+\eta_1/\nu\doteq-0.0061484$. The new value of $\xi$ follows from \eqref{eq:rep09}, $\xi\doteq 0.40301$. This gives $x\doteq 19.554$ and $I_{1-p}(n-x,x+1)\doteq0.510043$. Comparing this with $\alpha=0.51$, the absolute error is $0.000043$. Computations are done by using Maple with Digits=16. The integer value of $x$ is 20. When we take the same values of $\alpha$ and $p$, and $n=1500$, we find $x \doteq 599.94236$, with $P(n,p,x)\doteq 0.51000026659$, an absolute error $ 2.6\times10^{-7}$. Rounding $x$ to nearest integers we find $P(n,p,599)\doteq 0.490189$ and $P(n,p,600)\doteq 0.511212$. A more extensive test of the performance of the expansion is considered in Figure~\ref{fig:fig03}. In the plots we show relative errors when the approximation \eqref{eq:inv03} has been considered in the inversion process for $p \in (0,\,1)$ and two different values of $\alpha$ ($\alpha=0.35,\,0.85$) and $n$ ($n=100,\,1000$.) As expected, a better accuracy is obtained for the larger of the two $n$-values. The efficiency of the computation also improves as $n$ increases. This is not always the case in other existing algorithms for the inversion of the binomial distribution: for example, the CPU time in the computation of $0.96 \le P(n,0.5,x)$ for $n=10000$ using the Matlab function {\bf binoinv} is approximately $100$ times larger than the same computation for $n=100$. On the other hand, the algorithm implemented in R (function {\bf qbinom}) for the inversion of the binomial distribution seems to be much more efficient than the Matlab function (according to our tests, the difference in CPU times is only a factor $2$ when computing for $n=100$ and $n=10000$) but, as before, there is not improvement in the efficiency of the computation as $n$ increases. \begin{figure} \epsfxsize=13.5cm \epsfbox{figure3.eps} \caption{ \label{fig:fig03} Inversion of the binomial distribution: performance of the expansion \eqref{eq:inv03} for $p \in (0,\,1)$ and two different values of $\alpha$ and $n$.} \end{figure} \section{Results for the negative binomial distribution function}\label{sec:negbindis} We recall the relations for the negative binomial distribution function: \begin{equation}\label{eq:negrep01} P^{NB}(r,p,x)= \sum_{k=0}^x \binom{k+r-1}{r-1}p^r(1-p)^{k}=I_{p}(r,x+1),\quad 0\le p \le 1. \end{equation} Comparing this with the representation of $P(n,p,x)$ in \eqref{eq:intro06}, we see that we can redefine the parameters: we change $p$ into $1-p$, and write \begin{equation}\label{eq:negrep02} \nu= r+x+1,\quad \xi=\frac{r}{\nu}, \quad 1-\xi=\frac{x+1}{\nu}. \end{equation} The representation of the two negative binomial distributions in terms of the complementary error function is as in \eqref{eq:rep02}: \begin{equation}\label{eq:negrep03} \begin{array}{@{}r@{\;}c@{\;}l@{}} P^{NB}(r,p,x)&=&I_{p}(r,x+1)=\frac12\erfc\left(-\eta\sqrt{\nu/2}\right)-R_\nu(\eta),\\[8pt] Q^{NB}(r,p,x)&=&I_{1-p}(x+1,r)=\frac12\erfc\left(+\eta\sqrt{\nu/2}\right)+R_\nu(\eta), \end{array} \end{equation} where \begin{equation}\label{eq:negrep04} -\tfrac12 \eta^2 = \xi \log \frac{p}{\xi}+(1-\xi) \log \frac{1-p}{1-\xi}, \quad \sign(\eta)=\sign(p-\xi). \end{equation} In the analysis of $P(n,p,x)$ the function $R_\nu(\eta)$ has not been used, and we refer to the Appendix to see its role in the asymptotic expansion of the incomplete beta function $I_x(a,b)$. The asymptotic expansion of $P^{NB}(r,p,x)$ for large $\nu$ follows from the expansion of the incomplete beta function $I_{p}(r,x+1)$. \section{Inverting the negative binomial distribution function using the error function}\label{sec:invnegbin} We consider the inversion problem in the form: with given positive integer $r$, $p\in(0,1)$, and $\alpha\in(0,1)$, find the smallest integer $x$ such that \begin{equation}\label{eq:invneg01} \alpha \le P^{NB}(r,p,x). \end{equation} In particular, we assume that $r$ is large. We use the representation in \eqref{eq:negrep03} and start with solving the equation \begin{equation}\label{eq:invneg02} \tfrac12 \erfc \left(-\eta \sqrt{\nu/2}\right)=\alpha. \end{equation} Because the requested value of $x$ is also part of $\nu$ we have to modify the analysis for $P(n,p,x)$. We write the solution in the form \begin{equation}\label{eq:invneg03} -\eta \sqrt{\nu/2}=z, \quad z={\rm inverse\ erfc}(2\alpha), \quad \eta=-z\sqrt{2/\nu}=-z\sqrt{2\xi/r}, \end{equation} because $\nu=r/\xi$. To find the corresponding $\xi$ from equation \eqref{eq:negrep04}, we write this equation in the form \begin{equation}\label{eq:invneg04} \psi(\xi)=-\tfrac12\rho^2, \quad \rho=-z\sqrt{2/r}=\eta/\sqrt{\xi}, \end{equation} where \begin{equation}\label{eq:invneg05} \psi(\xi)= -\frac{1}{2\xi}\eta^2=\frac{1-\xi}{\xi}\log \frac{1-p}{1-\xi}+ \log \frac{p}{\xi},\quad \frac{d}{d\xi}\psi(\xi)=-\frac{1}{\xi^2}\log \frac{1-p}{1-\xi}. \end{equation} The solution $\xi$ of the equation $\psi(\xi)=-\tfrac12\rho^2$ should satisfy $\sign(p-\xi)=\sign(\eta)$. Limiting values of the function $\psi(\xi)$ are \begin{equation}\label{eq:invneg06} \lim_{\xi\downarrow0}\psi(\xi)=-\infty, \quad \lim_{\xi\uparrow1}\psi(\xi)=\log p, \end{equation} and for $\eta$ we have \begin{equation}\label{eq:invneg07} \lim_{\xi\downarrow0}\eta=\sqrt{-2\log(1-p)}, \quad \lim_{\xi\uparrow1}\eta=-\sqrt{-2\log p}. \end{equation} So, when $\alpha <\frac12$, that is, the solution should satisfy $ p<\xi$, we can always find a solution of the equation $\psi(\xi)=-\frac12\rho^2$ for $\xi\in (0,p)$. When $\frac12 < \alpha <1$, there is a solution for $\xi\in(p,1)$ when $\log p < -\frac12\rho^2$. For large values of $r$ this may be satisfied, if not we cannot use the error function equation in \eqref{eq:invneg02} to find a value of $\xi$. For $p\to1$, we have $P^{NB}(r,p,x)\to1$, and the interval $(\log p,0)$ becomes very small. For small values of $\rho$, the solution of the equation in \eqref{eq:invneg04} can be expanded in the form \begin{equation}\label{eq:invneg08} \xi=p-p(1-p)\sum_{k=1}^\infty r_k\wt\rho^k,\quad \wt\rho=\frac{\rho}{\sqrt{1-p}}, \end{equation} and the first coefficients are \begin{equation}\label{eq:invneg09} \begin{array}{@{}r@{\;}c@{\;}l@{}} r_1&=&1,\quad \dsp{r_2=\tfrac{1}{6}(5p-4)},\quad \dsp{r_3=\tfrac{1}{72}\left(47p^2-74p+26\right),}\\[8pt] r_4&=&\dsp{\tfrac{1}{540}\left(268p^3-627p^2+453p-92\right),}\\[8pt] r_5&=&\dsp{\tfrac{1}{17280}\left(6409p^4-19868p^3+21792p^2-9608p+1252\right).} \end{array} \end{equation} We also have \begin{equation}\label{eq:invneg10} p=\xi+\xi(1-\xi)\sum_{k=1}^\infty s_k\widehat\rho^k,\quad \widehat\rho=\frac{\rho}{\sqrt{1-\xi}}, \end{equation} and the first coefficients are \begin{equation}\label{eq:invneg11} \begin{array}{@{}r@{\;}c@{\;}l@{}} s_1&=&1, \quad s_2= \frac13(1-2\xi),\quad s_3=\frac{1}{36}(13\xi^2-13\xi+1),\\[8pt] s_4&=&\frac{1}{270}(1-2\xi)(23\xi^2-23\xi+1),\\[8pt] s_5&=&\frac{1}{4320}(313\xi^4-626\xi^3+339\xi^2-26\xi+1). \end{array} \end{equation} The inversion method runs as in the case for $P(n,p,x)$ with minor modifications. \begin{enumerate} \item Compute $z$ and $\rho$ from \eqref{eq:invneg03} and \eqref{eq:invneg04}. \item Compute $\xi$ from \eqref{eq:invneg05} by solving $\psi(\xi)=-\frac12\rho^2$ by iteration or by using expansion \eqref{eq:invneg08} when $\xi$ is small. Call this first approximation $\xi_0$ and $x_0=r/\xi_0-r-1$. \item The corresponding $\eta_0$ follows from equation \eqref{eq:invneg04}: $\eta_0=\rho\sqrt{\xi_0}$. \item Compute \begin{equation}\label{eq:invneg12} \eta_1=\frac{1}{\eta_0}\log f(\eta_0), \quad f(\eta)=\frac{\eta\sqrt{\xi_0(1-\xi_0)}}{p-\xi_0}. \end{equation} \item Compute $\eta=\eta_0+\eta_1/\nu$ with $\nu=r+x_0+1$. \item The new value $\xi$ follows from the expansion given in \eqref{eq:invneg08} when $\xi$ is small (or by solving $\psi(\xi)=-\frac12\rho^2$ by iteration), with $\rho=\eta/\sqrt{\xi_0}$. \item Finally, $x=r/\xi-r-1$, rounded to the integer just larger than this value. \end{enumerate} As an example to find the smallest integer $x$ from $\alpha \le P^{NB}(r,p,x)$, we take $r=50$, $p=0.4$, and $\alpha=0.51$. The value $z$ of \eqref{eq:invneg03} is $z\doteq -0.0177264$ and $\rho\doteq0.00354528$. Using \eqref{eq:invneg08} we obtain $\xi_0\doteq 0.398903$. Then (see \eqref{eq:invneg04}) $\eta_0=\rho\sqrt{\xi_0}\doteq0.00223916$, and \eqref{eq:invneg12} gives $\eta_1\doteq-0.137068$. With $x_0=r/\xi_0-r-1\doteq74.34369$ and $\nu\doteq125.344$. The approximation of $\eta=\eta_0+\eta_1/\nu$ becomes $\eta\doteq0.001145617$, and $\rho=\eta/\sqrt{\xi_0}\doteq0.00181387$. The corresponding $\xi$ follows from the expansion in \eqref{eq:invneg08}, which gives $\xi\doteq0.399438$, and finally $x=r/\xi-r-1\doteq74.1757$. When we compute $P^{NB}(r,p,x)$ with these values we obtain $P^{NB}(r,p,x)\doteq0.509992$. Comparing this with $\alpha$, we see an absolute error $0.79\times10^{-5}$. Computations are done by using Maple with Digits=16. When we take the same values of $\alpha$ and $p$, and $r=1500$, we find $x \doteq2250.71$, with $P^{NB}(r,p,x)\doteq 0.50999995$, an absolute error $0.48\times10^{-7}$. A more detailed example of the performance of the asymptotic inversion of the negative binomial distribution is shown in Figure~\ref{fig:fig04}. In the plots we show relative errors (obtained comparing with the values of the incomplete beta function $I_p(r,x+1)$) when the approximation in \eqref{eq:inv03} has been used in the inversion process. The results obtained for $p\in (0,\,1)$ and two different values of $\alpha$ ($\alpha=0.35,\,0.85$) and $r$ ($r=100,\,1000$) are shown for comparison. The expansion \eqref{eq:invneg08} has been considered in all cases to obtain the value $\xi_0$. \begin{figure} \epsfxsize=13.5cm \epsfbox{figure4.eps} \caption{ \label{fig:fig04} Inversion of the negative binomial distribution: performance of the expansion \eqref{eq:inv03} for $p \in (0,\,1)$ and two different values of $\alpha$ and $r$.} \end{figure} \section{Appendix. Summary of the asymptotic results for the incomplete beta function}\label{sec:incbeta} We collect results from \cite{gil:2017:numbeta}, \cite{Temme:1992:AIB}, \cite[\S38.4]{Temme:2015:AMI}, with a slightly different notation. We write \begin{equation}\label{eq:incbeta01} \nu=a+b,\quad \xi=\frac{a}{\nu},\quad b=\nu(1-\xi). \end{equation} Then \eqref{eq:intro04} can be written as \begin{equation}\label{eq:incbeta02} I_x(a,b)=\frac1{B(a,b)}\int_0^x e^{\nu\left(\xi\log t+(1-\xi)\log(1-t)\right)}\frac{dt}{t(1-t)}. \end{equation} We consider $\nu$ as a large parameter, and $\xi$ bounded away from 0 and $1$. The maximum of the exponential function occurs at $t=\xi$. We use the transformation \begin{equation}\label{eq:incbeta03} -\tfrac12\zeta^2=\xi\log\frac t{\xi}+(1-\xi)\log\frac{1-t}{1-\xi}, \end{equation} where the sign of $\zeta$ equals the sign of $t-\xi$. The same transformation holds for $x\mapsto\eta$ if $t$ and $\zeta$ are replaced by $x$ and $\eta$, respectively. That is, \begin{equation}\label{eq:incbeta04} -\tfrac12 \eta^2 =\xi \log \frac{x}{\xi}+(1-\xi) \log \frac{1-x}{1-\xi}. \end{equation} When taking the square root for $\eta$ we assume that $\sign(\eta)=\sign(x-\xi)$, this means $\sign(\eta)=\sign\left(x-a/(a+b)\right)$. Using \eqref{eq:incbeta03} we obtain \begin{equation}\label{eq:incbeta05} -\zeta\frac{d\zeta}{dt}=\frac{\xi-t}{t(1-t)}, \end{equation} and we can write \eqref{eq:incbeta02} in the form \begin{equation}\label{eq:incbeta06} I_x(a,b)=\frac{F_\nu(\eta)}{F_\nu(\infty)},\quad F_\nu(\eta)=\sqrt{{\frac \nu{2\pi}}}\int_{-\infty}^\eta e^{-\frac12\nu\zeta^2}f(\zeta)\, d\zeta, \end{equation} where \begin{equation}\label{eq:incbeta07} f(\zeta)=\frac{\zeta\lambda}{t-\xi},\quad F_\nu(\infty)=\frac{\Gamma^*(a)\Gamma^*(b)}{\Gamma^*(a+b)}\sim \sum_{k=0}^\infty \frac{F_k}{\nu^k}, \quad \lambda=\sqrt{\xi(1-\xi)}. \end{equation} The function $\Gamma^*(x)$, the slowly varying part of the Euler gamma function, is defined by \begin{equation}\label{eq:incbeta08} \Gamma^*(x)=\frac{\Gamma(x)}{\sqrt{2\pi/x}\, x^xe^{-x}},\quad x>0. \end{equation} The first coefficients $F_k$ are \begin{equation}\label{eq:incbeta09} \begin{array}{@{}r@{\;}c@{\;}l@{}} F_0&=&1,\quad \dsp{F_1=\frac{1-\xi+\xi^2}{12\lambda^2}},\quad \dsp{F_2=\frac{(1-\xi+\xi^2)^2}{288\lambda^4},}\\[8pt] F_3&=&\dsp{-\frac{139\xi^6-417\xi^5+402\xi^4-109\xi^3+402\xi^2-417\xi+139}{51840\lambda^6}.} \end{array} \end{equation} The first coefficients of the Taylor expansion \begin{equation}\label{eq:incbeta10} f(\zeta)=a_0+a_1\zeta+a_2\zeta^2+a_3\zeta^3+\ldots \end{equation} are \begin{equation}\label{eq:incbeta11} a_0=1,\quad a_1=\frac{2\xi-1}{3\lambda},\quad a_2=\frac{1-\xi+\xi^2}{12\lambda^2}. \end{equation} When we replace in \eqref{eq:incbeta06} the function $f(\zeta)$ by 1, the integral becomes the complementary error function defined by \begin{equation}\label{eq:incbeta12} \erfc\,z=\frac{2}{\sqrt{\pi}}\int_z^\infty e^{-t^2}\,dt. \end{equation} As explained in \cite{Temme:1982:UAE}, we can write \begin{equation}\label{eq:incbeta13} I_x(a,b)=\tfrac12\erfc\left(-\eta\sqrt{{\nu/2}}\right)- R_\nu(\eta),\quad \nu=a+b, \end{equation} where the relation between $x$ and $\eta$ follows from \eqref{eq:incbeta04}, and $R_\nu(\eta)$ has the expansion \begin{equation}\label{eq:incbeta14} R_\nu(\eta)\sim\frac{1}{F_\nu(\infty)} \frac{e^{-\frac12\nu\eta^2}}{\sqrt{2\pi \nu}}\sum_{k=0}^\infty\frac{C_k(\eta)}{\nu^k},\quad \nu\to\infty, \end{equation} and $F_\nu(\infty)$ is defined in \eqref{eq:incbeta07}. This expansion is uniformly valid for $\xi=a/(a+b)\in[\delta,1-\delta]$, where $\delta$ is a small fixed positive number. The coefficients $C_k(\eta)$ can be obtained from the scheme \begin{equation}\label{eq:incbeta15} C_k(\eta)=\frac{f_k(\eta)-f_k(0)}{\eta},\quad f_k(\zeta)=\frac{d}{d\zeta}\frac{f_{k-1}(\zeta)-f_{k-1}(0)}{\zeta}, \end{equation} $k=0,1,2,\ldots$, with $f_0=f$ defined in \eqref{eq:incbeta07}. \section*{Acknowledgments} The authors thank the anonymous referees for their constructive comments and suggestions. This work was supported by Ministerio de Ciencia e Innovaci\'on, Spain, projects MTM2015-67142-P (MINECO/FEDER, UE) and PGC2018-098279-B-I00 (MCIU/AEI/FEDER, UE). NMT thanks CWI, Amsterdam, for scientific support. \bibliographystyle{plain}
\section{Introduction} \label{sec:intro} Aqueous foams interact with particles in a number of important situations~\cite{WeaireH99,mousse13}; at high particle density the particles can even replace surfactant and stabilise the foam~\cite{binksM06}. At the other extreme, foam films can be used to separate individual particles based on their size~\cite{stogingfcww18}. In between, processes such as froth flotation and explosion suppression~\cite{mousse13,monloubou16} rely on the extent to which particles are trapped by foam films. Once in the film, particles may rotate and, depending on parameters such as the contact angle, may cause rupture~\cite{morrisnc12}. \citeauthor{legoffcsq08}~\cite{legoffcsq08} found that small millimetric-sized particles falling on to a soap film at speeds of about 1 {\rm m/s} do not break the film. That is, after the particle has passed through the soap film the film ``heals'' itself \cite{courbins06}. This arrangement of a stable soap film held horizontally while a small spherical particle falls onto it permits an investigation of the forces that the soap film exerts on the particle and the consequent changes to the particle's velocity. The soap film can be considered to represent one repeating unit of a more extensive ``bamboo" foam~\cite{daviesc12}, in which successive impacts between the particle and different soap films could bring the particle to rest, representing a microscopic approach to the way in which a foam can be used in impact protection~\cite{monloubou16}. In the following, we choose the particle's weight sufficiently large that it is never trapped by a single soap film. Then the film is pulled into a catenoid-like shape as it is stretched by the particle, until, similar to the usual catenoid instability \cite{cryers92}, the neck collapses and the soap film returns to its horizontal state. We will show that the forces exerted on the particle depend strongly on the contact angle along the triple line (Plateau border) where the liquid, gas and solid particle meet. In an experiment this contact angle could be adjusted by coating the particle~\cite{teixeiraact18}. We allow the contact angle at which the soap film meets the spherical particle to vary: the equilibrium case is a contact angle of $\theta_c = 90^\circ$~\cite{davies18}, in which the sphere is assumed to be coated with a wetting film that allows the soap film to move freely. However, experimental photographs~\cite{legoffcsq08,chenpjhd19} show that the soap film wraps around the particle, with a contact angle far from $90^\circ$, before forming a catenoid-like neck. This suggests that the particle's motion is faster than the mechanical relaxation of the foam. Here we nonetheless employ quasistatic simulations, and presume that the only effect of the dynamic nature of the experiments is to adjust the contact angle between particle and film. We consider several values of $\theta_c$ down to $10^\circ$. In experiments, the collapse of the catenoidal neck above the particle generates a small bubble~\cite{legoffcsq08}, as for the impact of a liquid drop on a liquid surface~\cite{oguz_prosperetti_1990,thoroddsenteh05} and the collapse of an isolated soap-film catenoid~\cite{robinsons01}. This small bubble was not seen in previous simulations with a $90^\circ$ contact angle~\cite{daviesc12,davies18}. Our new simulations make clear why this is the case: only with a contact angle smaller than $90^\circ$ does the film curve around the particle sufficiently before detachment to enclose such a volume of gas. The particle in our simulations, described below, is a sphere of given radius $R_s$ and mass $m$ grams, and hence with density $\rho = m / (4/3 \pi R_s ^3)$. It falls, initially under its own weight, towards a film with interfacial tension $\gamma = 30 {\rm mN/s}$ (so a film tension of $2\gamma$). We consider two cases: \begin{enumerate} \item the soap film is held in a cylinder of radius $R_{cyl} = 1{\rm cm}$ and height $H = 2 {\rm cm}$. The film encloses a bubble of fixed volume $0.5 H \pi R_{cyl}^2 = 0.5\pi {\rm cm}^3$, i.e. that fills the lower half of the cylinder. In this case both the tension in the film and the pressure in the bubble exert a force on the sphere once it touches the film. \item the soap film is held by a fixed ring of radius $R_{cyl} = 1{\rm cm}$. In this case only the tension in the film exerts a force on the sphere. \end{enumerate} The Bond Number is defined as $Bo = \frac{1}{2} \rho g R_s^2 / \gamma$. In the simulations in \S\ref{sec:results} we ensure that the Bond number is just greater than one, indicating that gravitational forces should exceed the retarding force due to surface tension. Making the density (and hence the Bond number) smaller would lead to the sphere being trapped by the film, while increasing it would mean that the quasistatic approximation that we employ would be less appropriate. The maximum vertical tension force that the soap film could exert on the sphere to counteract its weight occurs when the film meets the sphere on its equator and pulls vertically upwards; then the film tension multiplied by the sphere circumference is $4 \pi \gamma R_s$. So, roughly speaking, if the particle density is constant then to pass through the film requires that the particle radius must be greater than $\sqrt{3 \gamma / (\rho g) }$ whereas if the particle mass is constant the condition is $R_s < mg/(4 \pi \gamma)$. \section{Method} \begin{figure \centerline{ \includegraphics[angle=0,width=0.65\textwidth]{notation_1.eps} } \caption{The axisymmetric structure under consideration, shown in the $(r,z)$ plane. In case 1 there is a bubble of fixed volume $V_{bub}$ and the vertex at position $(R_{cyl}, z_{cf})$ is free to move, while in case 2 there is no volume constraint and the vertex is fixed.} \label{fig:notation} \end{figure} \subsection{Geometry} We use the Surface Evolver~\cite{brakke92} to compute the shape of the soap film. Since this software gives information about static situations, we assume that the motion is overdamped, and therefore that the sphere and soap film move through a sequence of equilibrium positions determined by the forces acting. By symmetry the sphere must remain in the centre of the film, so we perform an axisymmetric calculation in the $(r,z)$ plane. See figure~\ref{fig:notation}. The film is represented by a curve whose endpoints touch, respectively, the sphere (or the axis of the cylinder before attachment and after detachment) and the outer cylinder / ring. We discretize the curve into short straight segments of length ${\rm d}l$ and write the energy of the system as \begin{equation} E_{film} = 2 \gamma \sum_{segments} 2 \pi r {\rm d }l. \end{equation} We restrict segments to have lengths in the range 0.01 to 0.05 which balance the need for accuracy with short computational time. To include a contact angle $\theta_c$ we add a further term to the energy representing a spherical cap of film with tension $2 \gamma \cos \theta_c$ that covers the lower part of the sphere. This is based on the height $z_{sf}$ of the film where it meets the sphere: \begin{equation} E_{\theta_c} = 2 \gamma \cos \theta_c \; . \; 2 \pi R_s \left(z_{sf} - (z_s-R_s) \right), \end{equation} where $z_s$ is the height of the centre of the sphere. This energy is set to zero before attachment and after detachment. In case 1 we must also account for the volume $V_{bub}$ of the bubble trapped beneath the soap film. We calculate this volume based on the shape of the film and the positions of its endpoints. There are three terms required: \begin{eqnarray} V_1 & = & \sum_{segments} \pi r^2 {\rm d }z \nonumber \\ V_2 & = & \left\{ \begin{array}{ll} 0 & z_{sf} < z_s - R_s\\ \pi R_s^2 (z_{sf}-z_s)-\frac{\pi}{3}(z_{sf}-z_s)^3+\frac{2\pi}{3} R_s^3 & z_s - R_s \le z_{sf} \le z_s + R_s \\ \frac{4}{3} \pi R_s^3 & z_{sf} > z_s + R_s \end{array} \right. \label{eq:volume} \\ V_3 & = & \pi R_{cyl}^2 z_{cf}, \nonumber \end{eqnarray} with $V_{bub} = V_3 - V_2 - V_1$ The first term ($V_1$) is the volume of revolution about the $z$ axis of the film between its endpoints, and the second term ($V_2$) is the volume of the spherical cap below the the point of contact between the film and the sphere. These are both subtracted from the third term ($V_3$), which is the total cylindrical volume enclosed by the outer wall of the cylinder beneath the point of contact $z_{cf}$ between the film and the cylinder wall. \subsection{Forces} We consider two forces in addition to the weight $mg$ acting in the negative $z$ direction. The tension force $\underline{F}_\gamma$ is due to the pull of the soap film around its circular line of contact with the sphere and the pressure force $\underline{F}_p$, which is only relevant in case 1, is due to the pressure in the trapped bubble which acts over the surface of the sphere below the contact line. We are interested only in the vertical component of these forces, since by symmetry the other components cancel. We define the angle $\theta$ that the film subtends with the centre of the sphere, $\tan \theta = (z_{sf}-z_s)/r_{sf}$, and then the $z-$components of the forces are \begin{equation} F_{\gamma} = 2 \gamma . \; 2 \pi r_{sf} \; \cos (\theta - \theta_c) \end{equation} and \begin{equation} F_p = \pi r_{sf}^2 \; p_{bub}, \label{eq:press_force} \end{equation} where $p_{bub}$ is the pressure in the bubble. \subsection{Motion} We perform a quasi-static simulation in which the position of the sphere is held fixed while the equilibrium shape of the film is found, and then the sphere is moved a small distance in the direction of the resultant force. In case 1 the bubble pressure is found from the Lagrange multiplier of the volume constraint, eq.~(\ref{eq:volume}). \begin{figure \centerline{ (a) \includegraphics[angle=0,width=0.4\textwidth]{pic_7_10_all.eps} (b) \includegraphics[angle=0,width=0.4\textwidth]{pic_7b_10_all.eps} } \caption{Film shapes in a frame of reference moving with the sphere, with contact angle $\theta_c = 10^\circ$, shown every 100 iterations. (a) Case 1, where a wetting film on the outer cylinder wall allows the film to slip there and hence meet the wall at $90^\circ$. (b) Case 2, where the film is fixed at the outer cylinder wall. } \label{fig:film_shape} \end{figure} We start the simulation with the sphere above a horizontal film, and move the sphere downwards in steps of $\Delta z_s = - \epsilon mg$, with the small parameter $\epsilon$ taken equal to $1\times 10^{-5}$ (which we find is sufficiently small not to change the results), until contact is made. The inner end of the film then jumps to a new position on the sphere and then the change in its vertical position obeys \begin{equation} \Delta z_s = \epsilon \left( F_\gamma + F_p - mg \right). \end{equation} Detachment occurs when the film nears the top of the sphere and becomes unstable, at which point it jumps back to being horizontal, and we then end the simulation. Note that $\Delta z_s$ is always negative in our simulations, since the weight of the sphere is large enough that it always exceeds the tension force. \section{Results} \label{sec:results} \begin{figure (a) \centerline{ \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_1a.ps} (b) \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_1b.ps} } \caption{The height of the centre of the sphere under the action of its weight and the forces that the foam exerts on it. The horizontal axis corresponds to time, in units of $\epsilon$. (a) Case 1. (b) Case 2.} \label{fig:centre_of_sphere} \end{figure} In this section we consider a sphere of radius $R_s = 0.2{\rm cm}$ and mass $m = 0.1$ grams. Then the particle density is $\rho \approx 3 g/{\rm cm}^3$ and the Bond number is $Bo \approx 2 $. An example of the shape of the film at different times is shown in figure \ref{fig:film_shape}. \subsection{Sphere position, soap film area, and point of contact} The vertical position of the centre of the sphere is shown in figure~\ref{fig:centre_of_sphere}. Before attachment the sphere follows the same path for all contact angles. Following attachment (at an iteration number close to 150) we observe a shallower curve for smaller contact angles, indicating that the forces retard the motion of the sphere to a greater extent when the contact angle is small. When the contact angle is larger, for example with $\theta_c$ greater than about $45^\circ$, the sphere motion is at first accelerated, as the film pulls it downwards. In case 1, the bubble pressure is also negative at first (see figure~\ref{fig:pressure_force} below), adding to this effect. For the contact angle of $\theta_c = 135^\circ$ this significantly reduces the time of interaction before the film detaches from the top of the sphere. After detachment the slope of each curve returns to the same value as before attachment (data not shown) for all contact angles. In case 2, without a volume constraint, the interaction time (when the film and sphere are in contact) is longer for each value of contact angle compared to case 1, and the sphere descends further before detachment. Hence the overall effect of constraining the volume rather than the outer rim of the film is to retard the sphere. Detachment occurs {\em before} the inner end of the soap film reaches the top of the sphere. Instead, there is a sort of ``pre-emptive" instability~\cite{Hutzlerwcve07}: the curved soap film becomes unstable, the line of contact jumps upwards, and a new configuration consisting of a flat film above the sphere is reached. This is seen, for example, in the abrupt jump in the surface area of the film, shown in figure~\ref{fig:area_of_film}, at the point of detachment. When the sphere first meets the film the film area is reduced because it contains a circular hole that is filled by the sphere. As the sphere descends further, the film is deformed, in order to obey the volume constraint (in case 1) or the fixed rim at the cylinder wall (in case 2) and to satisfy the contact angle where they meet. This causes the film area to increase, until the film approaches the point of detachment. For a contact angle of $135^\circ$ (and presumably greater) the area of the film never exceeds its equilibrium value, $A=\pi R_{cyl}^2$, indicating that it is not greatly deformed and that detachment occurs quickly. Comparing case 1 to case 2, for all other contact angles simulated, the film is slightly more deformed when its outer rim is fixed (case 2). \begin{figure (a) \centerline{ \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_2a.ps} (b) \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_2b.ps} } \caption{The area of the soap film as the sphere passes through it. (a) Case 1. (b) Case 2. } \label{fig:area_of_film} \end{figure} Just as there is a sudden jump during detachment, there is also a jump in the vertical position of the circular line of contact when the film first meets the sphere (figure~\ref{fig:vertex_position}). The contact line rises to a new position to satisfy the contact angle (without, in case 1, violating the volume constraint), to a degree that increases with the contact angle. This end of the film is then pulled down by the sphere, more so for large contact angles, and the decrease is monotonic until detachment, whereupon the film is suddenly released. In case 1, the film returns to a higher position after the sphere has passed, because the volume enclosed beneath the film is augmented by the volume of the sphere. Fixing the outer rim of the film (case 2) leads to a greater deformation of the film (figure~\ref{fig:area_of_film}) and hence to the film becoming unstable when the line of contact is further from the top of the sphere (figure~\ref{fig:vertex_position} insets). \begin{figure (a) \centerline{ \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_3a2.ps} (b) \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_3b2.ps} } \caption{The vertical position $z_{sf}$ of the line where the film touches the sphere. The inset shows this position relative to the height of the centre of the sphere, $(z_{sf}-z_s)/R_s$. (a) Case 1. (b) Case 2.} \label{fig:vertex_position} \end{figure} In case 1 the outer rim of the film, where it touches the cylinder wall, behaves slightly differently (data not shown). It at first drops suddenly, i.e. in the opposite sense to the inner contact line, and then increases until the inner contact line approaches the top of the sphere. It then descends again before suddenly returning to the same vertical position as the inner contact line when the film detaches and becomes flat. \subsection{Measured forces} \begin{figure (a) \centerline{ \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_5a.ps} (b) \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_5b.ps} } \caption{Tension forces exerted on the sphere, determined by the direction in which the film pulls multiplied by its tension. (a) Case 1. (b) Case 2. } \label{fig:tension_force} \end{figure} We show the forces acting on the sphere in figures~\ref{fig:tension_force} and ~\ref{fig:pressure_force}. For large contact angles the film pulls the sphere downwards, accelerating its motion. The opposite occurs for small contact angles, and so the time over which the sphere contacts the sphere is extended. Just before the abrupt drop in force at the point of detachment, there is a slight reduction in the tension force as the perimeter of the contact line becomes small, ameliorating the pull from the film. \begin{figure \centerline{ \includegraphics[angle=270,width=0.5\textwidth]{bam_0.200000_1.000000_7a.ps} } \caption{Pressure forces exerted on the sphere in Case 1.} \label{fig:pressure_force} \end{figure} In case 1, the pressure in the bubble can be either positive or negative, depending on the curvature of the film. The pressure force on the sphere is determined by this pressure multiplied by the vertically-projected area of the sphere over which the bubble touches the sphere, eq. (\ref{eq:press_force}). The pressure force is much smaller in magnitude than the tension force. For the contact angle of $135^\circ$ the bubble pressure is large and negative for much of the passage of the sphere, because of the curvature induced by the contact angle, so in this case the pressure force ``sucks" the sphere downwards and detachment occurs earlier than in case 2. For smaller contact angles, for example $\theta_c=10^\circ$, the pressure is always positive, opposing the downward motion of the sphere. Yet it is still the case that detachment occurs sooner in case 1, even though for a given contact position the tension force is similar in both cases. Further, the film becomes unstable at a lower position in case 2. The resolution of this apparent paradox is that when the contact line is at a certain position on the sphere, the sphere is at a different height in the two cases, because of the need to satisfy the different constraints and for the film to meet the sphere at the same contact angle. In particular, before the contact line passes the equator of the sphere ($z_{sf} < z_s$), it moves around the sphere more slowly in case 2, while above the equator it moves more quickly (but over a shorter distance). \section{Bubble entrainment} Although our quasistatic simulations do not resolve the rapid film motion during detachment, we can gain an idea of the size of the small bubble that is trapped~\cite{legoffcsq08} by examining the shape of the soap film immediately before detachment, as shown in figure~\ref{fig:satellite}. We calculate the area of the region in the $(r, z)$ plane that is shaded in the figure, between the soap film and a radial line through the point of the soap film closest to the vertical axis, and rotate this region about the vertical axis to estimate the bubble volume. This is likely to be an underestimate, as the curvature of the film around the catenoidal neck is likely to increase during detachment. Figure~\ref{fig:satellite} shows that for small contact angles the bubble size can reach almost $0.01 {\rm cm}^3$. The limit in which the contact angle tends to zero appears to give a well-defined value for the maximum size of this small satellite bubble. For contact angles of $90^\circ$ and above there is no bubble because the point on the soap film nearest to the vertical axis is where the film touches the particle. There is a small effect of the choice of boundary conditions: in case 2, without a pressure force, the bubble is about 30\% larger for $\theta = 10^\circ$ (although this difference decreases as the contact angle increases). This is because, as noted above, in case 2 the instability that causes the film to detach occurs earlier, when the line of contact is closer to the equator of the sphere. \begin{figure (a) \centerline{ \includegraphics[angle=0,width=0.3\textwidth]{satellite_1.eps} (b) \includegraphics[angle=0,width=0.5\textwidth]{satellite_vol2.eps} } \caption{(a) Close to the contact line between the soap film and the sphere, at the last iteration before detachment, we calculate the shaded area to estimate the volume of the small bubble that is left behind. (b) The bubble volume depends strongly on the contact angle, depends only weakly on whether we consider case 1 or case 2, and vanishes for contact angles greater than $90^\circ$.} \label{fig:satellite} \end{figure} In case 1 with a fixed contact angle of $10^\circ$ we varied the size of the spherical particle and again estimated the size of the trapped bubble. For a sphere of a given radius, we must choose between a fixed particle mass (weight) or a fixed particle density. In the former case, the tension force opposing the descent of the particle increases with particle radius, but since the sphere does not increase in weight, it is brought to rest by the soap film once the particle exceeds a critical radius (in our case with $R_s \approx 0.3$cm, or $Bo \approx 3$). In the latter case, only when the particle is sufficiently large (in our case with $R_s$ greater than 0.1cm) does it pass through the soap film. Figure~\ref{fig:satellite2} shows that the size of the bubble that is trapped is the same in both cases. So it is determined by the shape of the soap film only, which in turn arises from the film meeting the sphere, of whatever radius, at the given contact angle. Therefore the size of the trapped bubble increases with sphere size, since the film is more greatly deformed when the sphere is larger. There is also a small dependence of the size of the trapped bubble on the cylinder size. As the cylinder becomes larger, the sphere descends further before detachment, and so greater film deformation is possible. In addition, the pressure force is reduced in a larger cylinder, so the result should be closer to case 2. Thus, the trapped bubble is slightly larger if the cylinder radius is larger. Figure~\ref{fig:satellite2} also shows the minimim and maximum sphere radius for which the sphere passes through the film, based on the predictions in \S \ref{sec:intro}. The lower bound (for constant particle density) is just below the numerical data while the upper bound (for constant particle mass) is about 20\% above the upper limit of the data in that case. The bounds are predicated on the soap film pulling vertically upwards around the equator of the sphere, but despite this approximation appear to work well. To validate our predictions, we compare with the image in Figure 1 of~\cite{legoffcsq08}, which shows a sphere of radius 0.16cm falling through a soap film trapping a bubble. (The cylinder radius and sphere mass are not recorded.) The bubble is trapped against the upper part of the sphere, but appears to be roughly hemispherical with radius 0.08cm, and hence a volume of 0.001cm$^3$. The data point, shown in figure~\ref{fig:satellite2}, lies close to our prediction. \begin{figure \centerline{ \includegraphics[angle=0,width=0.5\textwidth]{satellite_vol4.eps} } \caption{With contact angle $\theta_c = 10^\circ$ in case 1, the volume of the bubble that is trapped by the film increases with the size of the particle and (inset) depends weakly on the size of the cylinder containing the soap film. With fixed mass $m=0.12g$ only spheres with radius up to $R_s = 0.25 cm$ pass through the film; with constant density $\rho \approx 6 {\rm g/cm}^3$ only spheres with radius larger than $R_s = 0.10 cm$ pass through the film; the size of the trapped bubble is the same in both cases, indicating that it is determined by the geometry of the soap film. The vertical lines indicate the radius bounds estimated at the end of \S \ref{sec:intro} and the solid circle is experimental data~\protect\cite{legoffcsq08}.} \label{fig:satellite2} \end{figure} \section{Conclusions} We have explained the effect of contact angle on the forces that act on a spherical particle passing through a soap film. The duration of the interaction is determined by the contact angle and also the way in which the film is deformed; for example, with low contact angles the particle moves more slowly, and stays in contact with the soap film for longer. Further, the interaction depends upon the details of the experiment: greater deformation is induced by holding the film in a fixed circular wire frame than in a cylindrical tube, where it traps a bubble but where the outer circumference of the film is not fixed, such as in a soap-film meter \cite{chenpjhd19}. In the latter case there is an additional force on the particle due to the pressure in the bubble, but this is negligible in determining the dynamics of the system. Analysing the shape of the soap film just before detachment allows us to predict the size of the small bubble that is formed when a particle passes through a film. The entrapment of this air and the formation of interface could play a role in determining the efficacy of using foams for the suppression of explosions. We find that the bubble increases in size as the particle gets larger, and can exceed $10 {\rm mm}^3$. Extending our predictions to more general cases, such as oblique impact and non-spherical particles \cite{morrisnc12,davies18}, will require more computationally-intensive three-dimensional simulations. \section*{Acknowledgements} The late J.F. Davidson inspired us to work on this problem. We are also grateful to C. Raufaste for useful discussions, and to K. Brakke for provision and support of the Surface Evolver software. SJC acknowledges financial support from the UK Engineering and Physical Sciences Research Council (EP/N002326/1).
\section{Introduction}\label{Intro} An algorithmic complexity of solving combinatorial games is an important area of research. There are famous games which can be solved efficiently. The most important one is nim. The game was introduced by Bouton~\cite{Bouton02}. It can be solved efficiently by using the theorem on Sprague-Grundy function for a~disjunctive compound (or, for brevity, sum) of games (see~\cite{BerlekampConwayGuy,Conway,GrundySmith}). There are several generalizations of nim solved by efficient algorithms: the Wythoff nim~\cite{Wythoff,Fraenkel84}, the Fraenkel's game~\cite{Fraenkel82,Fraenkel84}, the nim$(a,b)$ game~\cite{BorosGurvichOudalov13}, the Moore's nim~\cite{Moore,JenkynsMayberry80,Boros-etc19a}, the exact $(n,k)$-nim with $2k\geq n$~\cite{Boros-etc15,Boros-etc19a}. There are `slow' versions for both, Moore's and exact nim~\cite{GurvichHo15,GHHC}. In a slow version a player can take at most one pebble from a~heap. In~\cite{GurvichHo15} P-positions of exact slow $(3,2)$-nim were described. In~\cite{GHHC} the $(4,2)$-case was solved. Note that for many values of parameters the exact $(n,k)$-nim is not solved yet and the set of P-positions looks rather complicated. The simplest example is the exact $(5,2)$-nim. Slow $(5,2)$ version of exact nim reveals a~similar behavior. So, it was conjectured that there are no efficient algorithms solving these variants of nim. Now we have no clues how to prove this conjecture. Looking for hardness results in solving combinatorial games, we see numerous examples of ${\mathbf{PSPACE}}$-complete games, e.g.~\cite{Schaefer78,DemaineHearn08}. For nim-like games, there are results on hardness of the \emph{hypergraph nim}. Given a set $[n] = \{1, \ldots, n\}$ and an arbitrary hypergraph ${\cal H} \subseteq 2^{[n]} \setminus \{\es\}$ on the ground set $[n]$, the game {\em hypergraph nim} $\mathrm{NIM}_{\cal H}$ is played as follows. By one move a~player chooses an edge $H \in {\cal H}$ and reduces (strictly) all heaps of $H$. Obviously, the games of standard, exact and Moore's nim considered above are special cases of the hypergraph nim. For a position $x = (x_1, \ldots, x_n)$ of $\mathrm{NIM}_{\cal H}$ its {\em height} $h(x) = h_{\cal H}(x)$ is defined as the maximum number of successive moves that can be made from $x$. A~hypergraph ${\cal H}$ is called {\em intersecting} if $H' \cap H'' \ne \varnothing$ for any two edges $H', H'' \in {\cal H}$. The following two statements were proven in~\cite{Boros-etc17,Boros-etc19b}. For any intersecting hypergraph ${\cal H}$, its height and SG function are equal. Computing the height $h_{\cal H}(x)$ is ${\mathbf{NP}}$-complete already for the intersecting hypergraphs with edges of size at most 4. Obviously, these two statements imply that, for the above family of hypergraphs. computing the SG function is ${\mathbf{NP}}$-complete too. Note that all hardness results mentioned above were established for games in unbounded dimension (the number of heaps is a part of an input). For a fixed dimension, there is a very important result of Larsson and W\"astlund~\cite{LarssonWastlund13}. They studied a wider class of games, so-called \emph{vector subtraction games}. These games were introduced by Golomb~\cite{Golomb66}. Later they were studied under a~different name---invariant games~\cite{DucheneRigo10}. Subtraction games include all versions of nim mentioned above. In these games, the positions are $d$-dimensional vectors with nonnegative integer coordinates. The game is specified by a~set of $d$-dimensional integer vectors (the difference set) and a~possible move is a~subtraction of a~vector from the difference set. Larsson and W\"astlund considered subtraction games of finite dimension with a finite difference set (MSG for brevity). P-positions of a 1-dimensional MSG form a periodic structure~\cite{CGTbook}. It gives an efficient algorithm to solve such a~game. In higher dimensions the MSG behave in a~very complicated way. Larsson and W\"astlund proved in~\cite{LarssonWastlund13} that in some fixed dimension the equivalence problem for MSG is undecidable. Nevertheless, this remarkable result does not answer the major question about efficient algorithms solving MSG. For example, there are polynomial time algorithms solving the membership problem for CFL but the equivalence problem for CFL is undecidable~\cite{HoMoUl}. In this paper we extend arguments of Larsson and W\"astlund and prove an existence of a MSG such that any algorithm solving the game runs in exponential time. For this result we need no complexity-theoretic conjectures and derive it from the hierarchy theorem. Also, we prove by similar arguments an existence of a~MSG such that solving the game is ${\mathbf{PSPACE}}$-hard. The latter result is not an immediate corollary of the former. It is quite possible that a~language $L$ is recognizable only in exponential time but $L$ is not ${\mathbf{PSPACE}}$-hard. The rest of the paper is organized as follows. In Section~\ref{sect:basic} we introduce all concepts used and present the main results. In Section~\ref{sect:outline} we outline main ideas of the proofs. The following sections contain a~more detailed exposition of major steps of the proofs: in Section~\ref{sect:2CA->MSG} we describe a~simulation of a binary cellular automaton by a subtraction game; Section~\ref{sect:TM->CA} contains a discussion of converting a Turing machine to a binary cellular automaton; Section~\ref{sec:parallel} presents a way to launch a Turing machine on all inputs simultaneously. Finally, Section~\ref{sec:proofs} contains the proofs of main results. \section{Concepts and Results}\label{sect:basic} \subsection{Impartial Games} An \emph{impartial} game of two players is determined by a finite set of \emph{positions}, by the indicated \emph{initial} position and by a set of possible moves. Positions and possible moves form vertices and edges of a directed graph. All games considered in this paper are impartial. Also, we always assume that the graph of a game is DAG. Therefore, each play terminates after a finite number of moves. Here we restrict our attention to a \emph{normal winning condition}: the player unable to make a move loses. Recall the standard classification of positions of an impartial game. If a player who moves at a position $x$ has a winning strategy in a game starting at the position $x$, then the position is called N-\emph{position}. Otherwise, the position is called P-\emph{position}. Taking in mind the relation with Sprague-Grundy function, we assign to a~P-position the (Boolean) value~$0$ and to an N-position the (Boolean) value~$1$. The basic relation between values of positions is \begin{equation}\label{val-eq} p(v) = \lnot \bigwedge_{i=1}^n p(v_i) = \bigvee_{i=1}^n \lnot p_(v_i) = [p(v_1),\dots, p(v_n)], \end{equation} where the possible moves from the position $v$ are to the positions $v_1$, $\dots$, $v_n$. Using Eq.~\eqref{val-eq}, it is easy to find values for all positions of a game in time polynomial in the number of positions. We are interested in solving games presented by a~succinct description. So, the number of positions is typically huge and this straightforward algorithm to solve a~game appears to be unsatisfactory. \subsection{Subtraction Games and Modular Games} Now we introduce a class MSG of subtraction games. A game from this class is completely specified by a finite set $D$ of $d$-dimensional vectors (the \emph{difference set}). We assume that coordinates of each vector $a\in D$ are integer and their sum is positive: \[ \sum_{i=1}^d a_i >0. \] A~position of the game is a $d$-dimensional vector $x=(x_1,\dots,x_d)$ with non-negative integer coordinates (informally, they are the numbers of pebbles in the heaps). A~move from the position $x$ to a~position $y$ is possible if $x-y\in D$. If a~player is unable to make a move, then she loses. \begin{example} The exact slow $(n,k)$-nim~\cite{GurvichHo15} is an $n$-dimensional subtraction game with the difference set consisting of all $(0,1)$-vectors with exactly $k$ coordinates equal~$1$. \end{example} Any subtraction game can be considered as a generalization of this example. In general case we allow to add pebbles to the heaps. But the total number of pebbles should diminish at each move (the positivity condition above). It guarantees that each play of a MSG terminates after finite number of moves. If a difference set is a part of an input, then it is easy to see that solving of MSG is ${\mathbf{PSPACE}}$-hard. To show ${\mathbf{PSPACE}}$-hardness we reduce solving of the game NODE KAYLES to solving a~MSG. Recall the rules of the game NODE KAYLES. It is played on a graph $G$. At each move a player puts a pebble on an unoccupied vertex of the graph which is non-adjacent to any occupied vertex. The player unable to make a move loses. It is known that solving NODE KAYLES is ${\mathbf{PSPACE}}$-complete~\cite{Schaefer78}. So, ${\mathbf{PSPACE}}$-hardness of solving MSG is an immediate corollary of the following proposition. \begin{proposition}\label{NodeKayles->MSG} Solving of NODE KAYLES is reducible to solving of MSG. \end{proposition} \begin{proof} Let $G=(V,E)$ be the graph of NODE KAYELS. Construct a $|E|$-dimensional subtraction game with the difference set $A_G$ indexed by the vertices of~$G$: $D=\{a^{(v)}: v\in V\}$, where \[ a^{(v)}_{e}= \left\{ \begin{aligned} 1,&&&\text{the vertex $v$ is incident to the edge $e$},\\ 0,&&&\text{otherwise.} \end{aligned} \right. \] We assume in the definition that the coordinates are indexed by the edges of the graph $G$. Take a position $\mathbbm{1}$ with all coordinates equal~$1$. We are going to prove that this position is a P-position of the MSG $A_G$ iff the graph $G$ is a P-position of NODE KAYLES. Indeed, after subtracting a vector $a^{(v)}$, coordinates indexed by the edges incident to~$v$ are zero. It means that after this move it is impossible to subtract vectors $a^{(v)}$ and $a^{(u)}$, where $(u,v)\in E$. On the other hand, if the current position is \[ \mathbbm{1} - \sum_{v\in X} a^{(v)} \] and there are no edges between a vertex $u$ and the vertices of the set $X$, then the subtraction of the vector $a^{(u)}$ is a legal move at this position. Thus, the subtraction game starting from the position $\mathbbm{1}$ is isomorphic to the game NODE KAYLES on the graph $G$. \qed\end{proof} In the sequel we are interested in solving of a~particular MSG (the difference set is fixed). In other words, we are going to determine algorithmic complexity of the language $\mathcal{P}(D)$ consisting of binary representations of all P-positions $(x_1,\dots,x_d)$ of the MSG with the difference set $D$. Our main result is unconditional hardness of this problem. \begin{theorem}\label{th:main} There exist a constant $d$ and a finite set ${\cal D}\subset \mathbb N^{d}$ such that any algorithm recognizing the language $\mathcal{P}({\cal D})$ runs in time $\Omega(2^{n/11})$, where $n$ is the input length. \end{theorem} Also, we show that there are ${\mathbf{PSPACE}}$-hard languages $\mathcal{P}(D)$. \begin{theorem}\label{th:aux} There exist a constant $d$ and a finite set ${\cal D}\subset \mathbb N^{d}$ such that the language $\mathcal{P}({\cal D})$ is ${\mathbf{PSPACE}}$-hard. \end{theorem} In the proofs we need a generalization of MSG---so-called $k$-modular MSG introduced in~\cite{LarssonWastlund13}. A $k$-modular $d$-dimensional MSG is determined by $k$ finite sets $D_0, \dots, D_{k-1}$ of vectors in $\mathbb Z^{d}$. The rules are similar to the rules of MSG. But the possible moves at a position $x$ are specified by the set $D_r$, where $r$ is the residue of $\sum_i x_i$ modulo $k$. \subsection{Turing Machines and Cellular Automata} A notion of a Turing machine is commonly known. We adopt the definition of Turing machines from Sipser's book~\cite{Sipser}. Cellular automata are also well-known. But we prefer to provide the definitions for them. Formally, a cellular automaton (CA) $C$ is a pair $(A,\delta)$, where $A$ is a finite set (the \emph{alphabet}), and $\delta\colon A^{2r+1}\to A$ is the \emph{transition function}. The number $r$ is called \emph{the size of a~neighborhood}. The automaton operates on an infinite tape consisting of \emph{cells}. Each cell carries a symbol from the alphabet. Thus, a~\emph{configuration} of $C$ is a~function $c\colon \mathbb Z\to A$. At each step CA changes the content of the tape using the transition function. If a~configuration before the step is $c$, then the configuration after the step is $c'$, where \[ c'(u) = \delta\big(c(u-r), c(u-r+1),\dots, c(u), \dots, c(u+r-1), c(u+r)\big). \] Note that changes are local: the content of a cell depends on the content of $2r+1$ cells in the neighborhood of the cell. We assume that there exists a blank symbol $\Ld$ in the alphabet and the transition function satisfies the condition $\delta(\Ld,\dots,\Ld)=\Ld$ (``nothing generates nothing''). This convention guarantees that configurations containing only a finite number of non-blank symbols produce configurations with the same property. A 2CA (a binary CA) is a CA with the binary alphabet $\{0,1\}$. Due to relation with games, it is convenient to assume that $1$ is the blank symbol in 2CAs. It is well-known that Turing machines can be simulated by CA with $r=1$ and any CA can be simulated by a~2CA (with a larger size of a~neighborhood). In the proofs we need some specific requirements on these simulations. They will be discussed later in Section~\ref{sect:TM->CA}. \section{Outline of the Proofs}\label{sect:outline} Both Theorems~\ref{th:main} and~\ref{th:aux} are proved along the same lines. \begin{enumerate} \item Choose a hard language $L$ and fix a Turing machine $M$ recognizing~it. \item Construct another machine $U$ which simulates an operation of~$M$ \emph{on all inputs in parallel} (a~realization of this idea is discussed in Section~\ref{sec:parallel}). \item The machine $U$ is simulated by a CA $C_U$. The cellular automaton $C_U$ is simulated in its turn by a 2CA $C_U^{(2)}$ (see Section~\ref{sect:TM->CA} for the details). And this $C_U^{(2)}$ is simulated by $d$-dimensional MSG ${\cal D}_U$ (see Section~\ref{sect:2CA->MSG}), where $d$ depends on $C_U^{(2)}$. \item It is important that the result of operation of $M$ on an input $w$ is completely determined by the value of a specific position of ${\cal D}_U$ and this position is computed in polynomial time. So, it gives a~polynomial reduction of the language $L$ to $\mathcal{P}(D_U)$. \item Now a theorem follows from a hardness assumption on the language $L$. \end{enumerate} \section{From Cellular Automata to Subtraction Games}\label{sect:2CA->MSG} In this section we follow the construction of Larsson and W\"astlund~\cite{LarssonWastlund13} with minor changes. \subsection{First Step: Simulation of a 2CA by a 2-dimensional Modular Game} Let $C= (\{0,1\}, \delta)$ be a 2CA. The symbol $1$ is assumed to be blank: $\delta(1,\dots,1)=1$. We are going to relate evolution of $C$ starting from the configuration $c(0)=(\dots 11011\dots)$ with the values $p(x)$ of positions of a 2-dimensional $2N$-modular MSG ${\cal D}'_C$. The value of $N$ depends on $C$ and we will choose it greater than~$r$. The exact form of the relation is as follows. Time arrow is a direction $(1,1)$ in the space of game positions, while the coordinate along the automaton tape is in the direction $(1,-1)$. The configuration of $C$ at moment $t$ corresponds to positions on a line $x_1+x_2 = 2Nt$. The cell coordinate is $u = (x_1-x_2)/2$, as it shown in Fig.~\ref{pic:CAgame} ($N=1$). For the configuration $(\dots 11011\dots)$ we assume that $0$ has the coordinate~$0$ on the automaton tape. \begin{figure} \centering \mpfile{CA}{12} \caption{Encoding configurations of 2CA by positions of a modular MSG}\label{pic:CAgame} \end{figure} The relation between the content of the automaton tape and the values of positions of the game ${\cal D}'_C$ is \begin{equation}\label{2CA=mSG} c(t,u) = p(Nt+u,Nt-u)\quad\text{for}\ |u|\leq Nt. \end{equation} The choice of the initial configuration implies that if $|u|>Nt>rt$, then $c(t,u)=1$. To extend the relation to this area, we extend the value function $p(x_1,x_2)$ by setting $p(x_1,x_2)=1$ if either $x_1<0$ or $x_2<0$. In other words, we introduce dummy positions with negative values of coordinates. These positions are regarded as terminal and having the value~$1$. Note that for the game evaluation functions $[\dots]$ the equality $ [p_1,\dots, p_k, 1,\dots,1]=[p_1,\dots, p_k] $ holds, i.e. extra arguments with the value $1$ do not affect the function value. So, the dummy positions do not change the values of real positions of a game. The starting configuration $c(0)=(\dots 11011\dots)$ satisfies this relation for any game: the position $(0,0)$ is a P-position. To maintain the relation~\eqref{2CA=mSG}, we should choose an appropriate modulus and difference sets. Note that the Boolean functions $[p_1,\dots, p_n]$ defined by Eq.~\eqref{val-eq} form a complete basis: any Boolean function is represented by a circuit with gates $[\dots]$. It is enough to check that the functions from the standard complete basis can be expressed in the basis $[\dots]$: \[ \lnot x = [x],\quad x\lor y = [[x],[y]],\quad x\land y =[[x,y]]. \] Now take a circuit in the basis $[\dots]$ computing the transition function of the 2CA~$C$. The circuit is a sequence of assignments $s_1,\dots, s_N$ of the form \[ s_j:= [\text{list of arguments}], \] where arguments of the $j$th assignment may be the input variables or the values of previous assignments $s_i$, $i<j$. The value of the last assignment $s_N$ coincides with the value of the transition function $\delta(u_{-r},\dots, u_{-1},u_0, u_1,\dots, u_r)$. For technical reasons we require that the last assignment $s_N$ does not contain the input variables $u_i$. It is easy to satisfy this requirement: just start a circuit with assignments in the form $s_{i+r+1}=[u_i]$; $s_{i+3r+2}=[s_{i+r+1}]$, where $-r\leq i\leq r$, and substitute a~variable $u_i$ in the following assignments by $s_{i+3r+2}$. The circuit size of the modified circuit is obviously greater than~$r$. We extend the relation~\eqref{2CA=mSG} to intermediate positions in the following way \begin{equation}\label{eq:intermediate} \begin{aligned} &p(Nt+i,Nt-i)=c(t,i),\\ &p(Nt+i+j,Nt-i+j)= s_j, &&1\leq j<N, \end{aligned} \end{equation} where $s_j$ is the value of $j$th assignment of the circuit for the input variables values $c(t,i-r), \dots, c(t,i), \dots,c(t,i+r)$. \begin{proposition}\label{modDiff} There exist sets ${\cal D}_j$ such that the relation~\eqref{eq:intermediate} holds for values of the modular game ${\cal D}'_C$ with the difference sets ${\cal D}_j$. \end{proposition} \begin{proof} For each line $x_1+x_2 = 2Nt+2j$ we specify the difference set ${\cal D}_{2j}$ according to the arguments of an assignment $s_j$. The sets with odd indices are unimportant and may be chosen arbitrary. If an input variable $u_k$ is an argument of the assignment $s_j$, then we include in the set ${\cal D}_{2j}$ the vector $(j-k, j+k)$. Since \[ (Nt+i+j, Nt-i+j) = (Nt+i+k, Nt-i-k) + (j-k, j+k), \] it guarantees that there exists a legal move from the position $(Nt+i+j, Nt-i+j)$ to the position $(Nt+i+k, Nt-i-k)$. If the value of an intermediate assignment $s_k$ is an argument of the assignment $s_j$, then we include in the set ${\cal D}_{2j}$ the vector $(j-k, j-k)$. It guarantees that there exists a move from the position $(Nt+i+j, Nt-i+j)$ to the position $(Nt+i+k, Nt-i+k)$. The rest of the proof is by induction on the parameter $A=2Nt+2i$, where $t\geq0$, $0\leq i<N$. For $A=0$ we have $t=0$ and $i=0$. So the relation~\eqref{eq:intermediate} holds as it explained above. Now suppose that the relation holds for all lines $x_1+x_2 = A'$, $A'<2Nt+2j$. To complete the proof, we should verify the relation on the line $x_1+x_2 = 2Nt+2j$. From the construction of the sets ${\cal D}_{2j}$ and the induction hypothesis we conclude that \[ p(Nt+i+j,Nt-i+j) = [\text{arguments of the assignment $s_j$}]. \] Here arguments of the assignment $s_j$ are the values of the input variables and the values of previous assignments in the circuit computing the transition function $\delta(c(t,u-r), \dots, c(t,u),\dots, c(t,u+r))$. The last touch is to note that the value of the $N$th assignment is just the value $c(t+1, u) = \delta(c(t,u-r), \dots, c(t,u),\dots, c(t,u+r))$. \qed \end{proof} Note that the game ${\cal D}'_C$ has the property: if there is a legal move from $(x_1,x_2)$ to $(y_1,y_2)$, then either $x_1+x_2\equiv 0\pmod{2N}$ or the residue of $(y_1,y_2)$ modulo $2N$ is less than the residue of $(x_1,x_2)$ (we assume the standard representatives for residues: $0,1,\dots, 2N-1$). Also, $x_1+x_2\not\equiv y_1+y_2\pmod{2N}$ since the input variables are not arguments of the final assignment. \subsection{Second Step: Simulation of a 2CA by a $(2N+2)$-dimensional Subtraction Game} To exclude modular conditions we use the trick suggested in~\cite{LarssonWastlund13}. Using the 2-dimensional modular game ${\cal D}'_C$ constructed above we construct a $(2N+2)$-dimensional MSG ${\cal D}_C$ with the difference set \[ {\cal D} = \big\{(a_1, a_2,0^{2N} \big)+e^{(j)}-e^{(k)}: (a_1,a_2)\in D_j,\ k=j- a_1-a_2\pmod{2N}\big\}. \] Here $e^{(i)}$ is the $(i+2)$th coordinate vector: $e^{(i)}_{i+2} = 1$, $e^{(i)}_s=0$ for $s\ne i+2$. \begin{proposition}\label{mSG->SG} The value of a~position $(x_1,x_2, 0^{2N})+ e^{(2r)}$ of the game ${\cal D}_C$ equals the value of a~position $(x_1,x_2)$ of the modular game ${\cal D}'_C$ if $2r\equiv x_1+x_2\pmod {2N}$. \end{proposition} \begin{proof} Induction on $t=x_1+x_2$. The base case $t=0$ is due to the convention on the values of dummy positions (with negative coordinates). The induction step. A~legal move at a~position $(Nt+i+j,Nt-i+j,0^{2N})+e^{(2j)}$ is to a position $(Nt+i+j,Nt-i+j,0^{2N})-(a_1,a_2,0^{2N})+e^{(2s)}$, where $2s\equiv 2j-a_1-a_2\pmod {2N}$ and $(a_1,a_2)\in {\cal D}_{2j}$. It corresponds to a move from $(Nt+i+j,Nt-i+j)$ to $(Nt+i+j-a_1,Nt-i+j-a_2)$ in the modular game. \qed\end{proof} From Propositions~\ref{modDiff} and~\ref{mSG->SG} we conclude \begin{corollary}\label{CA->SG} For any 2CA $C$ there exist an integer $N$ and a $(2+2N)$-dimensional MSG ${\cal D}_C$ such that the relation \[ c(t,u) = p(Nt+u,Nt-u,0,0,\dots,0,1)\quad\text{holds for}\ |u|\leq Nt. \] \end{corollary} \section{From Turing Machines to Cellular Automata}\label{sect:TM->CA} In this section we outline a~way to simulate a Turing machine by a binary cellular automaton. It is a standard simulation, but we will put specific requirements. Let $M = (Q,\{0,1\},\Gamma, \Ld, \delta_M, 1, 2, 3)$ be a Turing machine, where $Q = \{1,\dots,q\}$, $q\geq3$, is the set of states, the input alphabet is binary, $\Gamma=\{0,1,\dots,\ell\}$ is the tape alphabet, $\ell>1$ is the blank symbol, $\delta_M\colon Q\times\Gamma\to Q\times \Gamma\times\{+1,-1\} $ is the transition function, and $1, 2, 3$ are the initial state, the accept state, the reject state respectively. We encode a configuration of $M$ by a doubly infinite string $c\colon \mathbb Z\to A$, where $A = \{0,\dots,q\}\times \{0,\dots,\ell\}$, indicating the head position by a~pair $(q,a)$, $q>0$, $a\in \Gamma$; the content of any other cell is encoded as $(0,a)$, $a\in \Gamma$. Let $c_0, \dots, c_t,\dots$ be a sequence of encoded configurations produced by $M$ from the starting configuration $c_0$. It is easy to see that $c_{t+1}(u)$ is determined by $c_t(u-1)$, $c_t(u)$, $c_{t}(u+1)$. In this way we obtain the CA $C_M= (A,\delta_C) $ over the alphabet $A$ with the transition function $\delta_C\colon A^3\to A$ simulating operation of~$M$ in encoded configurations. It is easy to see that $\Ld = (0,\ell)$ is the blank symbol: $\delta_C(\Ld,\Ld,\Ld) = \Ld$. The next step is to simulate $C_M$ by a 2CA $C_M^{(2)}$. For this purpose we use an automaton $C'_M= (A',\delta'_C) $ isomorphic to $C_M$, where $A' = \{0,\dots,L-1\}$ and $L = (|Q|+1)\cdot|\Gamma|$. The transition function $\delta'_C$ is defined as follows \[ \delta'_C (i,j,k) = \pi (\delta_C(\pi^{-1}(i), \pi^{-1}(j), \pi^{-1}(k))), \] where $\pi \colon A\to A'$ is a bijection. To keep a~relation between the starting configurations we require that $\pi(\Ld) = 0$, $\pi((1,\ell)) = 1$. Recall that $1$ is the initial state of $M$ and $\ell$ is the blank symbol of $M$. To construct the transition function of $C_M^{(2)}$ we encode symbols of $A'$ by binary words of length $L+2$ as follows \[ \ph(a) = 1^{1+L-a}0^a1. \] In particular, $\ph(0) = \ph(\pi (\Ld)) = 1^{L+2}$ and $\ph(1) = \ph(\pi(1,\ell)) = 1^L01$. The encoding $\ph$ is naturally extended to words in the alphabet $A'$ (finite or infinite). Thus the starting configuration of $M$ with the empty tape corresponds to the configuration $\dots1110111\dots$ of $C_M^{(2)}$. Recall that $1$ is the blank symbol of $C_M^{(2)}$. With an abuse in notation, we denote below by $\ph$ the extended encoding of configurations in the alphabet $A'$ by doubly infinite binary words. We align configurations in the following way: if $i = q(L+2)+k$, $0\leq k<L+2$, then $\ph(c)(i)$ is a $k$th bit of the $\ph(c(q))$. The size of a neighborhood of $C_M^{(2)}$ is $r = 2(L+2)$. To define the transition function $\delta^{(2)}_M$ we use a~local inversion property of the encoding~$\ph$: looking at the $r$-neighborhood of an $i$th bit of $\ph(c)$, where $i = q(L+2)+k$, $0\leq k<L+2$, one can restore symbols $c(q-1)$, $c(q)$, $c(q+1)$ and the position $k$ of the bit provided the neighborhood contains zeroes ($0$ is the non-blank symbol of $C_M^{(2)}$). Note that if the neighborhood of a bit does not contain zeroes, then the bit is a part of encoding of the blank symbol $0$ of $C'_M$ and, moreover, $c(q-1)=c(q)=c(q+1)=0$. \begin{lemma}\label{restore} There exists a function $\delta^{(2)}_C\colon \{0,1\}^{2r+1}\to\{0,1\}$ such that a 2CA $C_M^{(2)}=(\{0,1\},\delta^{(2)}_C)$ simulates $C'_M$: starting from $b_0 = \dots1110111\dots$, it produces the sequence of configurations $b_0,b_1,\dots$ such that $b_t = \ph(c_t)$ for any $t$, where $(c_t)$ is the sequence of configurations produced by $C'_M$ starting from the configuration $c_0=\dots0001000\dots$ \end{lemma} \begin{proof} The function $\delta^{(2)}_C$ should satisfy the following property. If $b=\ph(c)$, then \begin{equation}\label{delta2-def} \delta^{(2)}_C\big((b(i-r),\dots, b(i), \dots , b(i+r)\big) = \ph\big(\delta'_C\big(c(q-1), c(q), c(q+1))\big)(k) \end{equation} for all integer $i = q(L+2)+k$, $0\leq k<L+2$. This property means that applying the function $\delta^{(2)}_C$ to $b$ produces the configuration $b_1=\ph(c_1)$, where $c_1$ is the configuration produced by the transition function $\delta'_C$ from the configuration~$c$. Therefore the sequence of configurations produced by $C_M^{(2)}$ starting at $\ph(c_0)$ is the sequence of the encodings of configurations $c_t$ produced by $C'_M$ starting at~$c_0$. Note that $\ph(c(q-1))$, $\ph(c(q))$ and $\ph(c(q+1))$ are in the $r$-neighborhood of a~bit $i$. Thus, from the condition on blank symbols in the alphabets $A'$ and $\{0,1\}$, we conclude the required property holds if the $r$-neighborhood of a~bit $i$ does not contain zeroes (non-blank symbols of $C_M^{(2)}$). In this case the $i$th bit of $b$ is a~part of encoding of the blank symbol $0$ in the alphabet $A'$ and, moreover, $c(q-1)=c(q)=c(q+1)=0$. Now suppose that the $r$-neighborhood of the $i$th bit contains zeroes. Take the nearest zero to this bit (either from the left or from the right) and the maximal series $0^a$ containing it. The series is a part of the encoding of a symbol in $c$. So, there are at least $1+L-a$ ones to the left of it. They all should be in the $r$-neighborhood of the bit. Thus we locate an encoding of a symbol $c(q+q')$, $q'\in\{-1,0,+1\}$, and we are able to determine $q'$ (depends on relative position of the $i$th bit with respect to the first bit of the symbol located). So, the symbols $c(q-1)$, $c(q)$, $c(q+1)$ can be restored from the $r$-neighborhood of the $i$th bit. Moreover, a~relative position $k$ of the $i$th bit in $\ph(c(q+q'))$ can also be restored. Because the symbols $c(q-1)$, $c(q)$, $c(q+1)$ and the position $k$ are the functions of the $r$-neighborhood of the bit $i$, it is correct to define the function $\delta^{(2)}_C$ as \[ \delta^{(2)}_C\big(u_{-r},\dots,u_0,\dots,u_r\big) = \ph\big(\delta'_M(c(q-1), c(q), c(q+1))\big)(k) \] if the restore process is successful on $(u_{-r},\dots,u_0,\dots,u_r)$; for other arguments, the function can be defined arbitrary. It is clear that this function satisfies the property~\eqref{delta2-def}. \qed\end{proof} \section{A Parallel Execution of a Turing Machine}\label{sec:parallel} The last construction needed in the main proofs is a Turing machine $U$ simulating an operation of a Turing machine $M$ \emph{on all inputs}. The idea of simulation is well-known. But, again, we need to specify some details of the construction. We assume that on each input of length $n$ the machine $M$ makes at most $ T(n)>n$ steps. The alphabet of $U$ includes the set $A = \{0,\dots,q\}\times \{0,\dots,\ell\} $ (we use notation from the previous section) and additional symbols. The machine $U$ operates in \emph{stages} while its tape is divided into \emph{zones}. The zones are surrounded by the delimiters, say, $\triangleleft$ and $\triangleright$. We assume that $\triangleleft$ is placed to the cell~$0$. Also the zones are separated by a delimiter, say, $\diamond$. An operation of $M$ on a particular input $w$ is simulated inside a separate zone. Each zone consists of three blocks. as pictured in Fig.~\ref{TMzone}. \begin{figure}[!h] \centering \mpfile{TM}{1} \caption{A zone on the tape of $U$}\label{TMzone} \end{figure} The first block of a zone has the size $1$. It carries $(0,1)$ iff $M$ accepts the input written in the second block. Otherwise it carries $(0,0)$. The last block contains a~configuration of $M$ represented by a word over the alphabet $A$ as described in Section~\ref{sect:TM->CA}. Blocks in a zone are separated by a delimiter, say \#. At start of a stage $k$ there are $k-1$ zones corresponding to the inputs $w_1$, $w_2$, $\dots$, $w_{k-1}$ of $M$. We order binary words by their lengths and words of equal length are ordered lexicographically. The last block of a zone~$i$ contains the configuration of $M$ after running $k-1-i$ steps on the input $w_i$. During the stage $k$, the machine $U$ moves along the tape from $\triangleleft$ to $\triangleright$ and in each zone simulates the next step of operation of $M$. At the end of the stage the machine $U$ writes a~fresh zone with the input $w_k$ and the initial configuration of $M$ on this input. The initial configuration is extended in both directions by white space of size $T(n)$, as it shown in Fig.~\ref{TMinit}. \begin{figure}[!h] \centering \mpfile{TM}{2} \caption{A fresh zone on the~stage $k$}\label{TMinit} \end{figure} When an operation of $M$ on an input $w_k$ is finished, the machine $U$ updates the result block and does not change the zone on subsequent stages. In reductions below we need $U$ satisfying specific properties. \begin{proposition}\label{goodU} If $T(n)= C 2^{n^k}$ for some integer constants $C\geq1$, $k\geq1$, then there exists $U$ operating as it described above such that \begin{enumerate} \item \label{time-bnd} $U$ produces the result of operation of $M$ on input $w$ in time $<2^{4n^k}$, where $ n = |w|$. \item \label{mod-cond} The head $U$ visits the first blocks of zones only on steps~$t$ that are divisible by~$3$. \end{enumerate} \end{proposition} \begin{proof} Recall that operation of the machine $U$ is divided in stages. During the stage $k$, the machine $U$ moves along the tape from the left to the right and in each zone simulates the next step of operation of $M$. At the end of the stage the machine $U$ writes a~fresh zone with the input $w_k$ and the initial configuration of $M$ on this input. The configuration is extended in both directions by white space of size $T(n)$. At first, we show how to construct a machine $U'$ satisfying the property~\ref{time-bnd}. More exactly, we explain how to construct a machine satisfying the following claims. {\bfseries\itshape Claim 1.} Updating a configuration of the simulated machine $M$ into a zone takes a time $O(S)$, where $S$ is the size of the zone. A straightforward way to implement the update is the following. The head of $U'$ scans the zone until it detects a symbol $(q,a)$ with $q>0$. It means that the head of the simulated machine~$M$ is over the current cell. Then $U'$ updates the neighborhood of the cell detected with respect to the transition function of~$M$. After that $U'$ continues a motion until it detects the next zone. If a machine $M$ finishes its operation on a~configuration written in the current zone, then additional actions should be done. The machine $U'$ should update the result block. For this purpose it returns to the left end of the zone, updates the result block and continues a motion to the right until it detects the next zone. So, each cell in the zone is scanned $O(1)$ times. The total time for update is $O(S)$. {\bfseries\itshape Claim 2.} A fresh zone on the stage $k$ is created in time $O(n^k T(n))$, where $n= |w_k|$. Creation of the result block takes a time $O(1)$. To compute the next input word the machine $U'$ copies the previous input into the second block of the fresh zone. The distance between positions of the second blocks is $4+|w_{k-1}|+2T(|w_{k-1}|)=O(T(n))$. Here we count three delimiters occuring between the blocks and use the assumption that $T(n)>n$. The machine $U'$ should copy at most $n$ symbols. So, the copying takes a time $O(nT(n))$. After that, the machine $U'$ computes the next word in the lexicographical order. It can be done by adding $1$ modulo $2^{|w_{k-1}|}$ to $\bin(w_{k-1})$, where $\bin(w) $ is the integer represented in binary by $w$ (the empty word represents~0). It requires a time $O(n)$. If an overflow occurs, then the machine should write an additional zero. It also requires a time $O(n)$. To mark the third block in the fresh zone the machine $U'$ computes a binary representation of $T(n)$ by a polynomial time algorithm using the second block as an input to the algorithm (thus, $n$ is given in unary). Then it makes $T(n)$ steps to the right using the computed value as a counter and decreasing the counter each step. The counter should be moved along a tape to save a time. The length of binary representation of $T(n)$ is $O(n^k)$. So, each step requires $O(n^k )$ time and totally marking of $T(n)$ free space requires $O(n^k T(n))$ time. Then $U'$ copies the input word $w_k$ to the right of marked free space. It requires $O(n T(n))$ time. The first cell of the copied word should be modified to indicate the initial state of the simulated machine~$M$. And, finally, it repeat the marking procedure to the right of the input. The overall time is $O(n^k T(n))$. Let us prove the property~\ref{time-bnd} is satisfied by the machine~$U'$. Counting time in stages, the zone corresponding to an input word $w$ of length $n$ appears after $\leq 2^{n+1}$ stages. After that the result of operation of $M$ appears after $\leq T(n)$ stages. Let $s=|w_k|$. At stage $k$ there are at most $2^{s+1}$ zones. Updating the existing zones requires time $O(2^{s}(s+T(s)))$ due to Claim~1. Creation of a fresh zone requires time $O(s^k T(s))$ due to Claim 2. Thus, the overall time for a stage is \[ O\big(2^{s+1}(s+T(s)) +s^k T(s) \big) = O(2^sT(s)). \] Therefore, the result of operation of $M$ appears in time \[ O\big((2^{n+1}+T(n)) T(n)^2\big) = O(2^{3n^k})< 2^{4n^k} \] for sufficiently large~$n$. Now we explain how to modify the machine $U'$ to satisfy the property~\ref{mod-cond}. Note that the result block of a zone is surrounded by delimiters: \# to the right of it and either $\triangleleft$ or $\diamond$ to the left. We enlarge the state set of $U'$ adding a counter modulo~3. It is increased by $+1$ each step of operation. If the head of a modified machine $U$ is over the $\triangleleft$ or $\diamond$ and $U'$ should go to the right, then the machine $U$ makes dummy moves in the opposite direction and back to ensure that it visits the cell to the right on a~step $t$ divisible by 3. In a similar way the machine $U$ simulates the move to the left from the cell carrying the delimiter \#. \qed\end{proof} \section {Proofs of the Main Theorems}\label{sec:proofs} \begin{proof}[of Theorem~\ref{th:main}] Time hierarchy theorem~\cite{Sipser} implies that $\DTIME(2^{n/2})\subset \DTIME(2^{ n})$. Take a language $L\in \DTIME(2^{ n})\sm\DTIME(2^{n/2})$. For some constant $C$ there exists a Turing machine $M$ recognizing $L$ such that $M$ makes at most $ T(n)=C2^n$ steps on inputs of length~$n$. Apply the construction from Section~\ref{sec:parallel} and Proposition~\ref{goodU} to construct the machine~$U$. Then convert $U$ into 2CA $C^{(2)}_U$ as it described in Section~\ref{sect:TM->CA}. We put an additional requirement on the bijection $\pi$, namely, $\pi(0,(0,1))=L-1$. It locates the result of computation of $M$ in the third bit of the encoding of the result block. Finally, construct $O(1)$-dimensional MSG ${\cal D}_C$ as it described in Section~\ref{sect:2CA->MSG}. The dimension $2N+2$ of the game is determined by the machine~$M$. Due to Corollary~\ref{CA->SG} the symbol $c(t,u)$ on the tape of $C^{(2)}_U$ equals the value of position $(Nt+u,Nt-u,0,0,\dots,0,1)$ of the game. Suppose that we have an algorithm ${\cal A}$ to solve the game ${\cal D}_C$ in time $T_{\cal A}(m)$. Consider the following algorithm recognizing $L$. On an~input $w$ of length~$n$ do: \begin{enumerate} \item\label{first-step} Compute the number $k$ of the~zone corresponding to the input~$w$ of length $n$. \item Compute the position $u$ of the bit carrying the result of computation of $M$ on input~$w$ in the image of the result block of the zone~$k$. \item\label{last-step} Set $t=2^{4n}$. \item Apply the algorithm ${\cal A}$ to compute the value of the position $$(Nt+u,Nt-u,0,0,\dots,0,1)$$ of the game and return the result. \end{enumerate} Correctness of the algorithm is ensured by previous constructions and by the property~\ref{mod-cond} of Proposition~\ref{goodU}. The latter guarantees that at moment $t=2^{4n}$ the head of $U$ is not on the result block. Thus the third bit of the encoding of the block is $1$ iff $M$ accepts $w$. It can be easily verified (see Proposition~\ref{calculations} below) that the first two steps of the algorithm can be done in time $\poly (n)$ and $u=O(2^{3n})$. The property~\ref{time-bnd} of Proposition~\ref{goodU} ensures that $U$ produces the result of $M$ on the input $w$ in time $<2^{4n}$ for sufficiently large~$n$. Thus, the total running time of the algorithm is at most $\poly (n)+T_{\cal A}(5n) $. But by choice of $L$ it is $\Omega (2^{n/2})$. We conclude that $T_{\cal A}(m)=\Omega (2^{m/11})$. \qed\end{proof} To complete the proof of Theorem~\ref{th:main}, we provide the proof of a technical claim made. \begin{proposition}\label{calculations} The first two steps of the algorithm in the proof of Theorem~\ref{th:main} can be done in time $\poly (n)$ for $T(n)=C2^{n^k}$ and $u=O(2^{3n})$ if $T(n)= C2^n$. \end{proposition} \begin{proof} For the first step, note that $k= 2^{n}+\bin(w)$. Indeed, there are $2^{n}-1$ shorter words, all of them precede $w$ in the ordering of binary words we use. Also there are exactly $\bin(w)$ words of length $n$ preceding the word~$w$. The formula for $k$ follows from these observations (note that we count words starting from~1). It is quite obvious now that $k$ is computed in polynomial time. For the second step, we should count the sizes of zones preceding the zone for $w$ and add a~constant to take into account delimiters. Let count the size of a zone including the delimiter to the left of it. Then the size of a~zone for an input word of length $\ell$ is \[ 1+1+1+\ell+1+\ell+2T(\ell) = 4+2\ell+2T(\ell). \] There are $2^\ell$ words of length $\ell$. Thus, the total size of the zones preceding the zone of $w$ is \[ S = \sum_{\ell=0}^{n-1} 2^\ell (4+2\ell+2T(\ell)) + \bin(w) (4+2n+2T(n)) + 2 \] For $T(n) = C2^{n^k}$ this expression can be computed in polynomial time in $n$ by a straightforward procedure (the expression above has $\poly(n)$ arithmetic operations and the results of these operations are integers represented in binary by $\poly(n)$ bits). Thus, the result block of the zone of $w$ is $S+1$ (the delimiter to the left of the zone adds~1). To compute $u$ we should multiply $S+1$ by $L=O(1) $ (the size of encoding) and add~3 (because the third bit indicates the result of computation of the simulated machine~$M$). All these calculations can be done in polynomial time. If $T(n)=C2^n$, then we upperbound $u$ as follows \[ u\leq L\big(n 2^n (4+2n+2C2^n) + 2^n (4+2n+2C2^n) + 3\big)+3 = O(2^{3n}). \] \qed\end{proof} \begin{proof}[of Theorem~\ref{th:aux}] Take a ${\mathbf{PSPACE}}$-complete language $L$ and repeat arguments from the previous proof using an upper bound $T(n)=C 2^{n^k}$ of the running time of a machine $M$ recognizing $L$. The bound follows from the standard counting of the number of configurations in an accepting computation using polynomial space. At the step~\ref{last-step} set $t =2^{4n^k}$. It gives a~polynomial reduction of $L$ to $\mathcal{P}({\cal D}_C)$: $w\mapsto(Nt+u,Nt-u,0,0,\dots,0,1) $. \qed\end{proof} \bibliographystyle{splncs03}
\section{Introduction} ``Crowded trades'' or ``crowded strategies'' are often heard explanations for the sub-par performance of an investment or, in more extreme cases, for the occurence of deleveraging spirals. Although seemingly intuitive, the concept of crowding has remained elusive and is, in fact, somewhat paradoxical as every buy trade is executed against a sell trade of the same magnitude. Some clarification is therefore needed, and the subject has recently garnered substantial interest in academic \cite{deleveragingspirals,khandani2007happened,overlapping,overlapping2,barroso2019institutional} and applied research \cite{CFMsardines}. Investors in a purportedly crowded strategy may face three related predicaments. One is that of increased competition for the same excess returns, leading to an erosion of the performance of the strategy. Second is increased transaction costs: maintaining similar portfolios leads to similar trade flows. This amplifies the effective market impact suffered by all investors following the same strategy -- an effect called co-impact in \cite{bucci2018co}. This in turn leads to a deterioration of performance even under normal conditions, see e.g. \cite{CFMimpact}. Finally, if the portfolios of different competitors largely overlap, systemic risk may arise as the liquidation of one of these portfolios can trigger further liquidations and even severe cascading losses for all investors who shared similar positions \cite{deleveragingspirals,overlapping,barroso2019institutional}. This phenomenon is well exemplified by the Quant Crunch of 2007 \cite{khandani2007happened}, which chiefly affected a certain style of relative value investing, while it left the market index itself, and therefore long-only investors, largely unscathed. Crowding has recently been invoked in the context of Equity Factor strategies, which have witnessed substantial inflows in the past decade, and are currently (as of end 2019) in a relatively severe drawdown. These strategies are based on persistent anomalies which are well known to investors, such as Momentum, Value, or Small Cap strategies \cite{fama1992cross}. This makes them potentially crowded and thus interesting to investigate. The aim of the present study is to investigate the possible crowdedness of Equity Factor strategies by measuring the correlation of market order flow with the strength of the trading signal that factor investors hypothetically follow. We use both (i) the total order flow measured using anonymized microstructure data pertaining to stocks of the Russell 3000 index and (ii) the institutional order flow identified thanks to a proprietary database. Although these correlations are small, $\sim 1\%$, they are strongly significant and are seen to have increased over the recent years. The estimated impact costs suggest that simple Fama-French factor investing is close to saturation. \section{Data and Metrics} This paper relies on three different datasets: one using equity prices to construct Equity Factor trading signals, and two allowing us to quantify trading activity. \subsection{Equity Factor Data} We use standard Fama-French (FF) factors \cite{fama1992cross,ang2014}, extended to Momentum \cite{jegadeesh1993returns, carhart1997persistence}, defined on the components of the Russell 3000 index in a period spanning from January 1995 to December 2018. Since rebalancing these FF portfolios is costly, we expect investors to slow down the bare signal to trade less aggressively. A conceptually sound \cite{garleanu2013dynamic} model that assumes quadratic trading costs leads to an exponential slowing down of the signal. More formally, let us denote by $s_{i,t}$ the ``signal'' followed by an investor, giving the ideal holding of stock $i$ on the close of day $t$. For example, $s_{i,t}$ would be the ranking of stocks according to their past returns in the case of the Momentum factor. The {\it actual} holdings $\pi_{i, t}$ of the investor is then given by an Exponential Moving Average (EMA): \begin{equation} \pi_{i, t} = A \, \sum_{t' \leq t} s_{i, t'} \,\, \exp\left(-\frac{t-t'}{D}\right). \end{equation} The factor $A$ sets the overall risk of the portfolio, whereas the slowing down time scale $D$ is chosen as to provide a good compromise between performance and trading costs. The theoretically expected order flow from the strategy on day $t$ is thus given by \begin{equation} \Delta \pi_{i, t} = \pi_{i, t}-\pi_{i, t-1}. \end{equation} This framework is summarized in Figure \ref{fig:signalsketch}. \begin{figure}[!htb] \includegraphics[width=\columnwidth] {0107_draft_factors.pdf} \caption{\textbf{The slowing down procedure implemented in this paper}. (Top panel) The original signal $s_{i,t}$, corresponding to ideal position before trading costs are considered. (Middle panel) The slowed down signal $\pi_{i, t}$ with slowing down timescale $D=3$ months, corresponding to the desired position when transaction costs are taken into account. (Bottom panel) The expected order flow $\Delta \pi_{i, t}$, submitted by the investor who is targeting the position $\pi_{i, t}$. } \label{fig:signalsketch} \end{figure} \subsection{Market Microstructure Data} We also use anonymous market data collected by Capital Fund Management (CFM) covering about $1,600$ US stocks between January 2011 to May 2018. We process a large majority of trades executed throughout different market venues. For each stock $i$ and each day $t$, we define the {\it trade imbalance} as \begin{equation} I^\mathrm{trade}_{i, t} = \frac{\sum_{n \in t} \epsilon_{i,n}}{\sum_{n \in t} |\epsilon_{i,n}|}, \end{equation} where $\epsilon_{i, n}$ is the sign of the $n$'th trade on stock $i$, and the sum extends to all trades taking place during the continuous trading session of day $t$. The sign is considered positive if the trade was executed above the prevailing mid price, and negative otherwise. Midprice trades are excluded. Trades are generated by aggressive orders; $I^\mathrm{trade}_{i,t}$ hence captures the pressure that they imply. Similarly, we define the {\it volume imbalance} as \begin{equation} I^\mathrm{volume}_{i, t} = \frac{\sum_{n \in t} \epsilon_{i,n} v_{i,n}}{\sum_{n \in t} v_{i,n}}, \end{equation} where $v_{i,n}$ is the volume executed on stock $i$ at trade $n$. We do not expect, and in fact do not find, major differences between the behavior of $I^\mathrm{trade}$ and $I^\mathrm{volume}$, because volumes are constrained by liquidity available at the best quotes, and do not fluctuate wildly. To capture the liquidity in the order book, we average the volume available on the bid side $V^\mathrm{bid}_{i, s}$ and the one available on the ask side $V^\mathrm{ask}_{i, s}$ over $N$ snapshots $s$ taken every $5$ seconds during the continuous trading session of day $t$, to calculate, for a given day and stock \begin{equation} V^\mathrm{bid}_{i, t} = \frac{1}{N} {\sum_{s\in t} V^\mathrm{bid}_{i, s}}, \end{equation} and \begin{equation} V^\mathrm{ask}_{i, t} = \frac{1}{N} {\sum_{s\in t} V^\mathrm{ask}_{i, s}}. \end{equation} These allow us to define the daily average \emph{order book imbalance} as \begin{equation} I^\mathrm{book}_{i, t} = \frac{V^\mathrm{bid}_{i, t} - V^\mathrm{ask}_{i, t}}{V^\mathrm{bid}_{i, t} + V^\mathrm{ask}_{i, t}} . \end{equation} All imbalances above are, by definition, bounded between -1 and 1. \subsection{Metaorder Data} Finally, we also use the Ancerno dataset, a proprietary database containing trades of institutional investors, covering about $10,000$ execution tickets per day, which corresponds to approximately $10\%$ of the daily volume traded on the market from January 1999 to December 2014. This data set has been used in several academic studies in the past, see e.g. \cite{ganghu2018,busse2017,zarinelli,bucci2018co,bucci2019crossover}, and we refer to those papers for more information on the data set, as well as descriptive statistics. Using labels present in the data, we are able to group together different trades that belong to the same metaorder, i.e. an ensemble of trades with the same client number, start date, end date, stock symbol, and sign. This allows us to gain more information about the decision-making process underpinning the order flow. Furthermore, Ancerno trades are representative of institutional investors, for whom we expect a larger propensity to follow classical equity factors. Similarly to the above measures of imbalance, we can define a \emph{metaorder trade imbalance} $I^\mathrm{meta}_{i, t}$ and a \emph{metaorder volume imbalance} $I^\mathrm{metavolume}_{i, t}$ by restricting the sums over all market trades to metaorders executed on stock $i$ on day $t$. For example: \begin{equation} I^\mathrm{meta}_{i, t} = \frac {\sum_{m \in t} \epsilon^\mathrm{meta}_{i,m}} {\sum_{m \in t} |\epsilon^\mathrm{meta}_{i,m}|} \end{equation} where $\epsilon^\mathrm{meta}_{i,m}$ is the sign of metaorder $m$ on stock $i$, and where $m$ runs on the total number of identified metaorders on stock $i$ and day $t$. \section{Return-Imbalance Correlations} Before diving into the original part of our study, namely the correlation between imbalances and trading signal, we re-establish some well known facts about imbalance-return and imbalance-imbalance correlations. Figure \ref{fig:correls2}, top panel, shows the lagged correlation between different imbalance measures and returns, averaged over all the stocks in our dataset. For zero lag, we recover the usual positive correlations between trade imbalance and returns, here found to be $\approx 0.2$. For positive lags, i.e.~when returns are posterior to imbalances, correlation is close to zero, indicating that past imbalances have on average no linear predictability on future returns. On the other hand, past returns are found to be positively correlated with future trade imbalance, both for the market-wide $I^\mathrm{trade}$ and for the metaorder imbalance $I^\mathrm{meta}$. This is compatible with the strong temporal autocorrelation of trade imbalance, documented in \cite{slowlydigest2009, bouchaud2018trades}, and again shown in Figure \ref{fig:correls2}, bottom panel. \begin{figure}[!htb] \includegraphics[width=0.5\textwidth] {1212_draft_autocorrelations.pdf} \caption{ \textbf{Correlation of imbalances with price returns and autocorrelations}. (Top panel) Lagged correlations of all imbalances at day $t$, with price returns at day $t+\textrm{Lag}$. For $\textrm{Lag}>0$ imbalances built with public information have no correlation with future returns as expected. For $\textrm{Lag}=0$ we recover the well known ``mechanical'' correlation between contemporaneous trade imbalance and returns. For $\textrm{Lag}<0$ we observe how today's imbalances are correlated to past returns. (Bottom panel) We show the time autocorrelation of all imbalances introduced in the text. While price returns are only weakly autocorrelated, the submission of orders, and in particular metaorders, are strongly autocorrelated, with a power-law decay $\text{Lag}^{-\gamma}$ of the autocorrelation function (see \cite{slowlydigest2009, bouchaud2018trades}). We find $\gamma \approx 0.8$ for market-wide trades and $\gamma \approx 0.5$ for metaorders. } \label{fig:correls2} \end{figure} We also mention that we find a clear positive correlation between metaorder imbalances $I^\mathrm{meta}$ and market-wide imbalances $I^\mathrm{trade}$ (not shown). This has to be the case since metaorders themselves contribute to the anonymous market flow. We also find a negative correlation of a few percent between metaorder imbalances and book imbalances. This can be understood by arguing that metaorders are more likely to be executed when there is enough available liquidity, and vice-versa: the execution of large metaorders induces more liquidity to be revealed in the order book (a phenomenon called liquidity refill in \cite{bouchaud2018trades}). \section{Dynamical Correlations} \subsection{Momentum} Let us now turn to the study of correlations between different kinds of imbalances and factor trading, starting with the standard Momentum Factor \cite{jegadeesh1993returns,carhart1997persistence} for which we see the most significant results. As explained above, we first slow down the signal using an EMA, and then take the derivative to calculate the trades that would follow from rebalancing. \begin{figure}[!htb] \includegraphics[width=0.5\textwidth] {1220_draft_momentum.pdf} \caption{ \textbf{Conditional correlations of all imbalances with slowed down momentum.} (Top panel) Average correlation of market-wide trade imbalances and of book imbalance, with the Momentum trading signal slowed down with different timescales $D$, on the $x$ axis. (Middle panel) Average correlation between metaorder imbalances and the Momentum trading signal, slowed down with different timescales $D$ (Bottom panel) Average correlations between the daily close to close price returns and the Momentum trading signal, slowed down with different timescales $D$. The latter correlation displays a qualitatively similar behaviour, but it is 10 times smaller ($\sim 0.2 \%$) than the correlation between imbalances and trading signal.} \label{fig:resmomentum} \end{figure} In the top panel of Figure \ref{fig:resmomentum} we show the correlation of anonymous market imbalances with the expected Momentum order flow for different values of the slowing down parameter $D$, averaged over all stocks in the dataset. The grey stripe denotes the significance band of the correlations, obtained by reshuffling the time series (in blocks of 6 months in order to preserve the autocorrelation structure) and calculating the standard deviation of the obtained correlations over 200 reshuffled samples. We find a significant correlation between trade and book imbalances and the expected order flow. This correlation is {\it negative} for trade imbalance and {\it positive} for order book imbalance, with absolute maxima $\gtrsim 1\%$ for $D$ around 3--4 months. This timescale is of the same order of magnitude as the autocorrelation time of the momentum signal, and thus quite reasonable. Although the results in the top panel of Figure \ref{fig:resmomentum} are highly significant, the sign of the correlations is somewhat confusing. Naively, one would be tempted to argue that Momentum investors execute their trades with aggressive market orders. This should lead to a positive correlation between the trading signal and trade imbalance, whereas we observe this correlation to be negative. At this stage, one can come up with two opposite interpretations: \begin{itemize} \item What we see are in fact aggressive orders by mean-reversion traders. However, this is quite unlikely since mean-reversion is not a profitable strategy on the time scale of months, but rather on the time scale of a few days only. \item Momentum trades are predominantly executed using limit orders, thus contributing to a positive correlation with the order book imbalance, as observed in the top panel of Figure \ref{fig:resmomentum}. This is compatible with the behavior of popular broker execution algorithms that chiefly use passive orders. It also resonates with \cite{aqr_liquidity}, which states that 80 \% of the volume executed by a major fund manager in the factor trading industry is through limit orders. \end{itemize} The analysis of metaorders helps bolster our interpretation. In the middle panel of Figure \ref{fig:resmomentum} we see that both metaorder and metaorder volume imbalance show a clear {\it positive} correlation with the Momentum trading signal, with a similar time scale $D$ around 4--6 months. Note that the sign of metaorders (to buy or to sell) reported by the data provider is not sensitive to whether they are executed actively or passively. Since most metaorders in the database correspond to order flow of institutionals who most likely engage in Momentum strategies, we can safely conclude that the inverted correlation observed in the top panel of Figure \ref{fig:resmomentum} corresponds to Momentum trading using passive orders. We have performed a series of tests for the robustness of the observed correlations. These are quite stable across stocks, regardless of liquidity and tick size. The same analysis with different slowing down mechanisms, or using the long (or short) only component of Momentum yields qualitatively similar results in all cases. \begin{figure*}[!ht] \includegraphics[width=\textwidth] {1218_draft_momentum_yearly_trend.pdf} \caption{\textbf{Time evolution of the correlation between imbalances and Momentum signal.} (Left panel) Maximum (in absolute value) of the trade imbalance and book imbalance correlation with the Momentum trade signal versus time, since 2011. One observes a clear upward trend, suggesting that Momentum trading has become more and more crowded. (Right panel) Maximum (in absolute value) of the metaorder imbalance correlation with the Momentum trade signal versus time, from 2000 to 2014. The sign and absolute values of these correlations, albeit noisy, are quite stable in time.} \label{fig:resmomentum2} \end{figure*} We also show the correlations between the daily close-to-close price returns and the Momentum trading signal, which we can compute on the Russell 3000 from 1996 to 2019, i.e. with much more data than for imbalance correlations. This correlation is considerably smaller: its maximum is around $0.2\%$, to be compared with $1.2\%$ for the imbalance correlation.\footnote{A simple, back-of-the-envelope estimation based on a linear impact model allows one to explain the observed factor $5$ between return/signal and imbalance/signal correlations, taking into account the fact that the unconditional standard deviation of $I^\mathrm{volume}$ is $\sim 0.1$. However, one would rather expect a square-root impact and not a linear impact \cite{bucci2018co}, so it is at this stage not clear how to reconcile these observations.} Although quite small, this correlation is important as it can be used to estimate the impact cost incurred by Momentum traders. It should be compared with the correlation between the slowed down position $\pi_t$ and the returns, which by definition gives the average profit of the strategy, and is found to be $\approx 0.1 \%$. Assuming a quadratic cost model gives a trading cost equal to one half of the instantaneous impact. These numbers therefore suggest that Momentum has become only marginally profitable: this is a crowded trade, for which co-impact has driven profits to zero. Let us stress that this is not the case for other implementations of Momentum that are, according to the same measure, distinctively less crowded and therefore still profitable (at least at the time of writing). We can in fact prove directly that Momentum crowding has increased in the recent years, by computing the maximal imbalance/signal correlation computed every year, found for $D \in (2,4)$ months for market-wide data and $D \in (3,6)$ months for metaorder data. The results are shown in Figure \ref{fig:resmomentum2} and are quite consistent over the whole period. Whereas the maximum correlation is noisy but quite stable for metaorders from 1999 to 2014, market-wide data that we collect up to 2018 reveals a clear upward drift since 2012, possibly related to the increase of the popularity of factor strategies. \subsection{Other Factors: HML \& SMB} So far we discussed results for Momentum only. We also explored Fama-French factors, such as ``HML'' (also called ``Value''), comparing the price of a stock to its book value, and ``SMB'', i.e. buying small cap stocks and selling large cap stocks \cite{ang2014}. Our methodology closely follows that of the previous section. In Figure \ref{fig:otherfff} we show our results for HML and SMB. Our results for market-wide imbalances for these two factors are similar to those obtained for momentum --~although less significant for SMB. This is expected, given that the longer holding period of these strategies induces a much smaller rebalancing activity~\cite{briere2019stock}. For metaorder imbalance, on the other hand, correlations are barely significant. On the other hand, the time evolution of the market-wide imbalances with the HML or SMB signals is too noisy to confirm that crowdedness in these factors has also increased in the recent years. \begin{figure}[!htb] \includegraphics[width=0.5\textwidth] {1218_draft_hmlsmb.pdf} \caption{ \textbf{Conditional correlations of imbalances with slowed-down HML and SMB}. We again show, as a function of $D$, the correlation between different types of imbalances and the trading signal originating from the HML and SMB factors. Because these factors have a significantly longer intrinsic time scale, the signal is weaker and shifted to larger values of $D$. Note that the correlation of the trading signals to metaorder imbalances is barely significant, and points in the opposite direction.} \label{fig:otherfff} \end{figure} \section{Conclusions} In this empirical study we have shown that crowding of equity factors can be quantitatively elicited through correlations between real supply/demand imbalances (proxies of market participants trading in the same direction) and the rebalancing order flow that would result from tracking slowed-down equity factors. Our results, particularly significant for Momentum, show that such a strategy is indeed crowded, resulting in rather poor profitability. Further, our method allows one to confirm that crowding on equity factors (at least on Momentum) has, as claimed and feared by many, significantly increased over the past few years. \section{Acknowledgments} The authors thank Charles-Albert Lehalle for his initial suggestion to study order flow in relation to Ancerno metaorders. We would also like to thank Stefano Ciliberti, Philip Seager and Juha Suorsa for interesting discussions on the subject. We would also like to acknowledge the valuable help and suggestions of Matthieu Cristelli. This research was conducted within the \emph{Econophysics \& Complex Systems} Research Chair, under the aegis of the Fondation du Risque, the Fondation de l’Ecole polytechnique, the Ecole polytechnique and Capital Fund Management. \section*{Data availability statement} The data were purchased by Imperial College from {AN}cerno Ltd (formerly the Abel Noser Corporation) which is a widely recognised consulting firm that works with institutional investors to monitor their equity trading costs. Its clients include many pension funds and asset managers. The authors do not have permission to redistribute them, even in aggregate form. Requests for this commercial dataset can be addressed directly to the data vendor. See www.ancerno.com for details.
\section*{Acknowledgements} This work is partially supported by NSF CREST Grant HRD-1736209, NSF grant CNS-1423481, and DoD ARL Grant W911NF-15-1-0518. \section*{Acknowledgements} This research is partially supported by NSF Grants CNS-1423481, CNS-1538418, DoD ARL Grant W911NF-15-1-0518. \clearpage \fi \bibliographystyle{IEEEtran} \section{Implementation in AWS}\label{sec_imp} In this section we present a proof of concept implementation of AB-ITS model in Amazon Web Services (AWS) \cite{aws}. We use AWS IoT service along with AWS Greengrass \cite{grass} (to provide edge functionality) to setup a realistic environment where vehicles are simulated as AWS IoT things. In particular, these stand alone services are implemented as a Lambda function \cite{lambda} using Boto \cite{boto} which is AWS SDK for Python. It should be noted that in this implementation no long term GPS data coordinates of vehicles are collected in cloudlets. This reduces privacy concerns of end users and encourages adoption of the proposed model. \subsection{Use Cases Overview} US-DOT has proposed an extensive list of ITS applications \cite{its-app} which we have used to create our real life connect use-cases. Our implementation addresses trust, security and privacy issues concerning end users which must be satisfied before bringing ITS technology in practice. As most applications are safety related, we have considered accident and ice-on-road (tire slip) alerts as our running use-case along with real-time detection and prevention of rogue (or malicious) vehicles on road. In the use-cases, we have also shown how different entities (S, TC, {$\mathrm{V_T}$}~etc.) fit in the formal model definitions. \textbf{Accidental Safety and Ice-Threat :} Moving vehicles (S) can generate warnings for other vehicles ({$\mathrm{V_T}$}) in their surrounding based on an event which they sensed or encountered. In our use-case, we consider `ice-threat' alerts based on a tire slip wherein vehicles are notified a warning, if any nearby vehicle `feels' it and broadcasts, after satisfying security policies implemented at the edge infrastructures (TC). These policies take into account: who is the source of alert, location of vehicle (ATT) and how many other vehicles encountered similar event, before forwarding (OP) these alerts to other nearby approaching vehicles ({$\mathrm{V_T}$}). It is possible that a single vehicle (S) sends an ice-threat alert to associated cloudlet (TC), while other vehicles in the area sense no such movement. Therefore the edge will be able to filter such malfunctioning or deliberate malicious attempt from the vehicle and also notify law enforcement and put that vehicle in rogue vehicles list. Further, in case of an accident, alert messages will be generated and sent only to police or medical vehicles in the area. Based on the type of alerts and who generates it, policies are defined in the system to ensure trusted, anonymized and relevant notifications. \input{Figures/comp} \input{Tables/table_conf1} \textbf{Compromised Rogue Vehicles :} Rogue vehicle either intentionally or due to sensor failure can send fake messages to other vehicles. Misbehaving and compromised vehicles must be detected in smart transportation and alerts must be issued immediately to discard the information sent by them. In our use-case, central cloud authority (S) informs edge infrastructures (TC) with a list of detected rogue vehicles and when any message is received by an edge from these vehicles, it is not forwarded to other vehicles. Further, law enforcement is informed about the location (ATT) of a rogue vehicle to prevent fake message dissemination. This approach prevents the need to update and publish revocation list to all vehicles eliminating the bandwidth and connectivity issues. \input{Figures/Policy} \subsection{Proof of Concept} We will first go over the system configuration along with implemented security policies defined in the cloudlet before we delve into more details of our developed prototype. \textbf{System Architecture :} Figure \ref{fig-comp} represents system architecture along with different components implemented for our prototype. All the vehicles and static smart entities including edge infrastructures must be registered with a central cloud controller to ensure trusted authorized participating entities. Further, the controller also helps in the administrative phase (discussed later) which includes providing a list of edge infrastructures on designated path of moving vehicle. Once the registration is done and vehicles are sent a list of edge infrastructures, the vehicles publish and subscribe to secure (and reserved) MQTT topics created in each of cloudlets which get dynamically assigned based on vehicle current GPS coordinates. It is also possible that the moving vehicle keeps on sending coordinates to the cloud and the controller lets them know the IP address of the nearby edge infrastructures to which the vehicle has to associate. These cloudlets (represented as AWS Greengrass) hold the implemented security policies, a lambda function (similar to policy decision point - PDP \cite{hu2013guide}) for policy evaluation and the policy enforcement point (PEP) to check messages received, anonymize and filter them and based on the type of alert send them to relevant entities. It should be noted that only alert messages go through the enforcement point, whereas no alerts messages are discarded after logging. Table \ref{tab-2} lists different AWS system parameters to provide a better understanding of performance metrics shown later in this section. \textbf{Security Policies :} We defined attributes based policies which are enforced at the edge, to check who is allowed to send messages, conditions when the message is forwarded to other vehicles and who are authorized recipients for different types of alerts in the system. \input{Figures/gps} \input{Figures/seq} Various attributes can be included in policy but for the sake of simplicity we used only vehicle type to determine the source and destination of messages. As shown in Figure \ref{fig-policy}, security policies are listed in JSON format, where three types of alerts are being generated, `TireSlip', `Accident' and `Rogue' vehicle updates, as denoted by red rectangular boxes. We defined separate set of conditions for each alert type. For example, in `TireSlip' alerts, it is first checked if it is generated (`Source' attribute) by a regular vehicle (specified by attribute value `Vehicle') or by law enforcement (`Police' or `Medical'). Policy then checks number of vehicles which created similar alerts (specified by "Number" attribute). Notification to other vehicles depends on how many alerts were generated or who is the source of alert. If the number of alerts are greater than or equal to 2 from regular vehicles, or even a single alert from police or medical vehicle, "Ice-threat High" notifications are sent to other associated vehicles of the cloudlet. However, if an alert is generated by one regular vehicle, "Ice Threat - Low" is sent for all member vehicles. It must be noted that the sender vehicles and the receiving vehicle must be associated with the same cloudlet to exchange notifications, which also ensure relevance of alerts being received. Similarly, for accident use case, notification is only sent to nearby police vehicles and medical with assistance message. Here the source is not defined, since any smart entity including vehicle, or nearby smart road side sensor or a pedestrian can send message to police or medical vehicles. It is also possible that information about the vehicle including color, license plate number or other identifying information can be sent to law enforcement. Another important use case is to enable a central law enforcement that can regularly publish and update the list of rogue vehicles. This list for example, could help locate vehicles that have been stolen or implicated in amber alert In the last part of our policy for `Rogue', vehicle IDs \texttt{Car-X, Car-Y, Vehicle-Z} are stated as rogue and any message from these vehicles is not forwarded. This is a dynamic policy as the list is periodically updated by a central authority. Also to extend the use-case, it is possible when an edge receives a message from a rogue vehicle, it can forward that information to nearby police along with vehicle information like license number and color. The defined policies are only for alert messages, and other `no alerts' messages are just checked by the policy and are logged and dropped without forwarding to any vehicle. Note that policies can also be implemented inside the smart vehicle as well to provide user privacy preference aware notifications, but are not implemented in our prototype \textbf{Implementation Details :} The implementation of our proposed solution involves two steps: the administrative phase and the operational phase. Administrative phase includes setup of cloudlets by city administration, setting up the boundaries for each cloudlet, dynamic assignment of moving vehicles to edge infrastructures, and attributes and alerts inheritance from edges to the member vehicles. To be part of ITS, vehicles and smart infrastructures need to have one time registration with central cloud which ensures that smart entities are trusted and benign. Once registered, the moving vehicles can be provided with a mapped list of edges which will arrive in their designated route to which they are allowed to connect. As the vehicles get dynamically associated to different cloudlets, they are able to publish and subscribe to the reserved topics on each edge infrastructures. The operational phase consists of how these attributes and assignment to cloudlets ensure the relevance of alerts to the vehicles and how the edge deployed security policies are used to mitigate security and privacy concerns of users who are using AB-ITS system. In our prototype, we demarcated a big geographic location area into several smaller regions and each region has a trusted cloudlet (TC) which serves all the smart entities in the region as shown in Figure \ref{fig gps}. We used a python script to simulate the movement of vehicles in the system, shown as green dots, which sends MQTT messages containing GPS coordinates to a central cloud. Service in cloud determines which edge cloudlets are in the surrounding area of the vehicle and then assigns the vehicle to the nearby cloudlets. Following is the sample MQTT payload sent by a moving vehicle to its shadow reserved topic \texttt{\$aws/things/`Vehicle-Name'/shadow/update} in the cloud for dynamic cloudlet assignment: \begin{itemize}[leftmargin=*] \item[] \texttt{\{"state": \{"reported": } \item[] \texttt{\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \{"Latitude": "28.1452683",} \item[] \texttt{ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; "Longitude":"-97.567259"\}\}\}} \end{itemize} \iffalse \begin{itemize}[leftmargin=*] \item[] \texttt{\{"state": \{"reported": } \item[] \texttt{\{"Latitude": "28.14526","Longitude":"-97.5672"\}\}\}} \end{itemize} \fi As the path of vehicle is mostly known, these edge assignments can be pro-active in nature as well, mitigating the concern of cloud latency. In such a case, the cloud controller can send a list of edge infrastructures which will be on the designated path of the vehicle to get them associated when vehicles come in their range. It is also possible that these cloudlets have a wireless range and the vehicles which are in the range get automatically assigned to these cloudlets. A vehicle can associate to multiple cloudlets at a time based on their overlapping location. In Figure \ref{fig gps}, static smart objects like stop warning signs, road work ahead or other infrastructures have fixed allocation to cloudlets, and the dotted lines represent predicted future cloudlets of vehicle along with current cloudlets by solid pink lines. Once vehicles get assigned to nearby cloudlets, operational phase starts where the vehicles send messages to its shadow reserved topic (which gets created when the vehicle becomes member of a cloudlet) in their associated edges, which enforce security policies to ensure trusted and authorized alerts to nearby vehicles in near real time manner. In all the policies defined, privacy of the sender is well preserved as the messages do not contain any personal identifiable information and are anonymous. Following is a sample MQTT message sent by vehicle: \begin{itemize}[leftmargin=*] \item[] \texttt{\{"state":\{"reported": } \item[] \texttt{\;\; \{"Longitude": "29.472741982", } \item[] \texttt{\;\;\;\; "Latitude": "-98.50038363", } \item[] \texttt{\;\;\;\; "Time": "2019-03-19 11:27:40.237734", } \item[] \texttt{\;\;\;\; "Velocity": "30", "Direction": "north", } \item[] \texttt{\;\;\;\;\;\;"Elevation": "650", "Posit. Accuracy":} \item[] \texttt{\;\;\;\; "5", "Steering Wheel Angle": "0",} \item[] \texttt{\;\;\;\; "Alert": myAlert\}\}\}} \end{itemize} In this message, beside BSM \cite{bsm} attributes, an attribute "Alert" also exists, which defines what kind of alert has been sent from the vehicle to cloudlets. For our use-cases, it can be an "Accident", "Tireslip", or "Null" value where Null signifies no alert. Once the message is received by cloudlet, and is checked against the policies, the edge infrastructure forwards the following Tireslip alert message to a generic topic \texttt{test/devices} to which the vehicles subscribe when they become member of the edge. \begin{itemize}[leftmargin=*] \item[] \texttt{\{"message": "Ice Threat - Low', } \item[] \texttt{ 'myEvent': '2019-03-19 10:56:15.921834'"\}} \end{itemize} In case of accident alert following message: \begin{itemize}[leftmargin=*] \item[] \texttt{\{"message":"Accident- Require Assistance',} \item[] \texttt{ 'myEvent': '2019-03-19 11:27:40.237734'"\}} \end{itemize} is sent to topic \texttt{test/medical} and \texttt{test/police} to which nearby medical and police vehicles are subscribed respectively. Note that event time has also been added to messages, to ensure when the message is not obsolete. Similarly, for updating the rogue vehicle list from the transportation authority via central cloud to the edge infrastructures, message \begin{itemize}[leftmargin=*] \item[] \texttt{\{"Alert": myAlert, "myVehicle": myVehicle\}} \end{itemize} is sent to \texttt{test/Rogue-Vehicle} topic. In this message, 'myAlert' variable can be \texttt{ADD}, \texttt{DELETE} or \texttt{LIST} operation, and 'myVehicle' can hold the vehicles to be added or deleted. In case of list operation, 'myVehicle' attribute value is NULL. The complete sequence of events for the administrative and operational phase in cloudlet supported ITS is shown in Figure \ref{fig_seq}. \input{Figures/perform} \iffalse \paragraph{Edge Cloudlet Allocation} \paragraph{Dynamic Policy Update} \paragraph{Secure and Trusted Communication} \fi \subsection{Performance Metrics and Discussion} We evaluated the performance of our proposed AB-ITS model in AWS and provide metrics for the use-cases in proof of concept. We first calculate the execution time for the proposed policy enforcer to evaluate the attribute based security polices (shown in Figure \ref{fig-policy}) against the number of vehicles associated with a cloudlet and scaling the number of messages sent per vehicle per second. In Figure \ref{fig-perform} (a) and (b), as the number of vehicles increase (along x axis) with more messages being sent, the enforcer takes more time to evaluate the polices and impact performance. This enforced policy engine in cloudlet has the worse case execution time less than 200 microseconds, for any number of messages sent per second (from 1 to 20) by vehicles which could range from 1 to 50. In case of no-alerts, this execution time will be zero as the policies will not be evaluated. Total trip time performance of our model includes time at which vehicle generates an alert till it is received by target vehicles which includes the policy evaluation time. As shown in Table \ref{tab-acc} and \ref{tab-tire}, the total trip time is within the permissible limits ($\sim$100 ms \cite{Xu:2004:VSM:1023875.1023879}) for most of the case scenarios. However, the trip time goes beyond the limits when 50 vehicles get associated to single edge cloudlet at one time. The variation in total trip time is due to network traffic and latency, but the average and standard deviation infer that the performance is very comparable to peer to peer ITS. It should be noted that the extra overhead induced by policy execution (in microseconds) is very negligible as compared to the total trip time (in milliseconds). In our approach MQTT protocol has been used, therefore, if some one does not want use DSRC due to cost of transmitter and receiver, our approach can still work with the traditional IoT MQTT based communication based on LTE, 5G or WiFi connectivity. \input{Tables/perform} We understand that there may be hundreds of vehicles during heavy traffic time, therefore, to scale the system and accommodate all vehicles we can install more cloudlets and infrastructure devices in busy areas that will reduce the number of vehicles which will get associated with single cloudlet at a time. This implementation in AWS showcases the practical viability and use of fine grained polices in context of intelligent transportation system, without the need to capture data points from real world traffic. It must be also noted that, AWS Greengrass has limit of 200 devices per Greengrasss group, which means maximum number of vehicles which can be associated can not be more than 200. We can add more cloudlets in the system which can cater to higher population of vehicles and smart entities. As mentioned earlier, this proposed cloudlet supported V2V and V2I complements the current DSRC approach and is not considered a replacement. \section{Introduction and Motivation}\label{sec_intro}} \IEEEPARstart{F}{uture} smart world will be equipped with technologies and autonomous devices which collaborate among themselves with minimal human interference. Automotive industry is one of the front runners that has quickly embraced this technological change. Connected vehicles (CVs) and smart cars have been introduced, with a plethora of on-board sensors and applications with internet connectivity to offer safety and comfort services to users. Intelligent transportation for smart cities envision moving entities interacting and exchanging information with other vehicles, infrastructures or on-road pedestrians. Federal and private agencies are defining communication standards and technologies for Intelligent Transportation System (ITS) to ensure safety, and address security and privacy concerns of end users. Vehicle to Vehicle (V2V) and Vehicle to Infrastructure (V2I) are two proposed technological innovations which can change current transportation. V2V will enable vehicles to exchange information about speed, location, position, direction, or brake status with other surrounding vehicles where receiving vehicles will aggregate these messages and make smart decisions using on-board applications which will warn drivers about accidents, over-speed, slow traffic ahead, aggressive driver, blind spot or a road hazard. V2I will enable road side units (RSUs) or traffic infrastructures to transmit information about bridge permissible height, merging traffic, work zone warning or road hazard detection to complement V2V applications. Vehicle to pedestrian (V2P) is also envisioned to cater to pedestrians, such as with visual or physical impairments, and send corresponding alerts to approaching vehicles. These communication technologies will use Dedicated Short Range Communications (DSRC) \cite{dsrc} to exchange data packets, called Basic Safety Messages (BSMs) \cite{bsm}, with nearby vehicles and entities between 300-500 meters range. Messages will be sent up to 10 times per second providing a 360-degree view of proximity, with on-board applications using the information for triggering alerts and warnings. US Department of Transportation (DOT) and National Highway Traffic Safety Administration (NHTSA) estimate around 80\% of non-impaired collisions \cite{us-dot,us-dot-1} and 6.9 billions traffic hours can be reduced by using V2V, V2I and V2P communications. Vehicles in ITS are communicating and exchanging information with external entities including toll booths, gas stations, parking lots, and other vehicles, which raises security and privacy issues. Incidents on Jeep and Tesla \cite{jeep,tesla} have been demonstrated where car engine was shut and steering wheel controlled remotely by adversaries. These smart cars are equipped with 100's of electronic control units (ECUs) and more than 100 million lines of code, thereby, exposing broad attack surface for critical car systems including transmission control, air-bag, telematics, engine or infotainment systems. In-vehicle controller area network (CAN) bus also needs security to prevent unauthorized data exchange and tampering among ECUs and software manipulation. Cyber attacks on smart connected vehicles \cite{gao,nhtsa-1,nhtsa-2,elmaghraby2014cyber} include: unauthorized over the air updates (OTA) for firmware, stealing user private data, spoofing sensors, coordinated attacks on road side infrastructure or malware injection. Dynamic and mobile nature of V2X (Vehicle to everything) communication makes it additionally difficult to secure the distributed system where vehicles will be exchanging data with random unknown entities on road. Impersonation and fake message from malicious compromised vehicles is also a grave concern as the information exchanged is used by other vehicles to make alerts and notifications. Vehicle users also have privacy concerns where every movement can be tracked continuously by agencies or data collected from vehicles can be used to extrapolate personal identifiable information (PII). These concerns lead to reluctance in embracing these future transportation technologies. Attribute-based access control (ABAC) \cite{jin2012unified,hu2013guide,gupta2016mathrm} provides fine grained authorization capabilities for resources in a system. This mechanism offers flexibility in a distributed multi-entity dynamic environment where the attributes of entities along with contextual information are used to make access and communication authorization decisions. Intelligent transportation system involves interaction and messages exchange among entities with no prior association. Attributes of vehicles or transportation infrastructure can be used to authorize communication decision based on their current location, ownership or degree of trust. Such security mechanisms can help to prevent fake messages, stop rogue vehicles and ensure privacy aware message communication besides ensuring location and time sensitive relevance of exchanged information. In this work, we present a privacy-aware secure attribute-based V2V and V2I communication architecture and model using trusted cloudlets. These cloudlets are setup in wide geographic locations with defined coverage area. Each cloudlet will receive messages from vehicles in its range and forward it to all other vehicles associated with that cloudlet. Vehicles are dynamically assigned to these cloudlets as they move along geographic boundaries based on their GPS coordinates and predicted path. An important benefit of this indirect V2V and V2I communication is the deployment of security policies at edge cloudlets which can restrict or block fake messages, and ensure trustworthiness in communication. Moreover edge cloudlets also enable message anonymization and user privacy, as the receiver cannot detect who is the sender as all messages come through edge infrastructures. These cloudlets can also be used to forward certificate revocation lists (CRLs) to vehicles in the range beside blocking the vehicles themselves. Rogue vehicle list can be dynamically updated at the edges, and messages from a vehicle in the rogue list can be blocked. The proposed architecture and attribute-based policies ensure the important security properties of message integrity, originator authenticity and user privacy concerns in V2V and V2I communication. This MQTT \cite{mqtt} based approach for messages exchange can be used in addition to DSRC to enable use cases with acceptable latency (discussed in implementation section) without the need for additional hardware cost\footnote{NHTSA proposed V2V equipment and communication is between \$341 to \$350 per vehicle in 2020 \cite{faq}} and work with familiar technologies such as WiFi, LTE or 5G. This work proposes a formalized communication security model for V2V and V2I called attribute-based intelligent transportation system (AB-ITS). We have implemented our proposed architecture and model using AWS and collected several performance metrics, which reflect the plausibility and efficiency of our proposal. Rest of the paper is as follows: Section \ref{sec_related} discusses related work along with USDOT proposed Security Credential Management System (SCMS). Security and privacy requirements along with the proposed cloudlet supported ITS architecture is given in Section \ref{sec_arch}. Section \ref{sec_model} presents formal attribute-based V2V and V2I communication model (AB-ITS). Section \ref{sec_imp} describes our implementation with real-world use cases using AWS, and discusses performance parameters. Section \ref{sec_summary} concludes the paper. \iffalse Department’s National Highway Traffic Safety Administration (NHTSA) estimates that safety applications enabled V2V could eliminate or mitigate the severity of up to 80\% of non-impaired crashes, including crashes at intersections or while changing lanes. On the other hand, when such a vehicle connects with road infrastructure, the exchange of information such as information of road signals, weather condition, and nearby traffic condition takes place. It would enable vehicles to transmit their location, speed, direction and other information 10 times per second. That lets cars detect, for example, when another vehicle is about to run a red light or coming around a blind turn in time to prevent a crash. \fi \section{Discussion and Limitations}\label{sec-limit} \section{ Cloudlets Enabled Attribute Based V2V and V2I Communication}\label{sec_model} Edge cloudlets supported V2V and V2I communication has many advantages, as discussed in previous section. These cloudlets can support attributes based fine-grained policies based on which communication decisions can be made. These attributes offer flexibility and take into account different environmental factors along with dynamic policies based on administrator needs. Further, individual users are also allowed to set their own privacy preferences, to decide on what and from whom messages are allowed to receive. In this section, we formally define our proposed cloudlets supported attributes based intelligent transportation system model, which we refer to as AB-ITS. \subsection{AB-ITS Communication Model} \input{Figures/model} The conceptual AB-ITS communication model is shown in Figure \ref{fig_model} and formal definitions elaborated in Table \ref{tab 1}. The model has following components: Vehicles (V), Transportation Infrastructure Devices (I), Users (U), Sources (S), Trusted Cloudlets (TC), Target Vehicles ({$\mathrm{V_T}$}), Operations (OP), Authorization Policies (POL), and Attributes (ATT). \noindent \textbf{Sources (S) :} A source initiates operations on cloudlets (discussed below) in the system. A source can be from a set of vehicles (V), transportation infrastructure (I) or an administrator user (U). For instance, in case of V2V communication, a source is a vehicle which wants to send messages to other vehicles in its vicinity. Similarly, law enforcement and city administration can initiate theft and accident alerts in a particular area via cloudlets, which are forwarded to all vehicles associated with cloudlet. \noindent \textbf{Trusted Cloudlets (TC) :} Cloudlets are introduced, which are trusted edge infrastructures set up across locations and facilitate secure V2V and V2I communication. These cloudlets have a limited geographic range and all vehicles in that range get associated with one or more TCs automatically based on their moving location coordinates. Any communication between vehicles and other entities including transportation infrastructures (or RSUs) is done via TC, which checks security policies to forward or block the messages sent by different sources. Also TCs have attributes which are propagated to associated vehicles and can also help setting alerts and warnings based on attribute values. For instance, when a vehicle enters forest and gets associated with the cloudlet, it can automatically inherit a wildlife area attribute ON from TC. \noindent \textbf{Target Vehicles ($\mathbf{V_T}$) :} These vehicles are subset of total vehicles (V) in the transportation system and are potential receiver of messages sent by a source. Both target vehicles and source must be associated with same TC to enable V2V and V2I communication. \noindent \textbf{Operations (OP) :} Operations are actions which are performed by source on TC. TC also execute operations against associated vehicles and infrastructures. For example, a source initiating a join operation to get associated with a TC, or trying to send a message to vehicles via TC. Also, TC forwarding a message sent by sources to its member vehicles is another example of operations in ITS. These also include administrative actions performed by a user including updating, deleting or adding attribute values for an attribute or rogue vehicles list in TC. \noindent \textbf{Authorization Policies (POL) and Attributes (ATT) :} Sources, TCs, vehicles and other relevant ITS entities can have personal defined individual policies along with system wide authorization policies needed for the overall secure functioning of the ecosystem. Vehicles owners can set individual privacy preferences which enable them to allow or disallow any particular private information from being shared with a third party remotely. Similarly, city traffic department may set its own rules when to trigger an alert or warnings to vehicles in a sensitive or accident prone area. Administrative policies are also needed to authorize a legitimate user to change attributes, send notifications to TCs or update rogue vehicles list. Entities like vehicles and sources also have individual characteristics, called attributes, which are used to make authorization and communication decisions in ITS. For a vehicle, sample attributes can be: vehicle ID, speed, heading angle, brake, vehicle size, vehicle type or preferred notifications. Vehicles and infrastructure can also inherit attributes from their associated TCs, which can have common location wide attributes like speed limit, road work ahead or blind turn. Both attributes and policies are dynamic which can be changed by administrators or vehicle owners based on system needs and personal preferences. The attributes of vehicles like location, speed or heading angle are continuously changing, but other attributes like vehicle size remain static. Policies are also dynamic in nature, as reflected in use-case implementation in the next section, where we defined a security policy with a list of black-listed rogue vehicles which are notified to law enforcement when detected by TCs. This list is dynamic in nature and is continuously updated by administrators, demonstrating how dynamic policies are used and enforced in ITS. It must be noted that in a session the proposed model assumes a static set of policies and attributes which are used to make V2V and V2I communication decision. All relevant polices including system defined and user preferences are evaluated to make the final communication decision. \input{Tables/table_model-new} In our proposed model, TCs evaluate security policies and ensure that un-trusted or fake messages are not forwarded to associated vehicles in its geographic coverage boundary. These connected vehicles must initiate association with TCs pro-actively based on their predicted path, and once they get into the range of the TCs, vehicles become the member of TC. Such communication with TCs can be done using encrypted and secure cellular or WiFi technologies with no added equipment cost. It should be noted that our model complements the proposed DSRC based direct V2V and V2I communication, and can be used to assist in situations where the authenticity and integrity of messages is much needed. Our use-cases in the next section will highlight the real world enforcement and use of AB-ITS model. \subsection{Formal Definitions} Table \ref{tab 1} elaborates the formal AB-ITS communication model definitions, which comprise of vehicles (V), transportation infrastructure devices (I), administrative users (U) and edge cloudlets (TC). A source in S initiating an operation op $\in$ OP can be from a set of vehicles, transportation infrastructures or users, whereas target vehicles {$\mathrm{V_T}$}~is a subset of total vehicles in the entire transportation system ({$\mathrm{V_T}$}~$\subseteq$ V). Attributes are functions defined for source and edge cloudlets, where functions can be set or atomic valued (stated by attType) and are assigned values from Range(att) for each att $\in$ ATT. The atomic valued attributes are assigned single value including null (denoted as $\bot$) whereas set valued attribute can have a subset of values assigned from power set of the range of attribute function. Some attributes are also defined system wide, which reflect the state of entire transportation system (like level of threat or city traffic) and are set by administrators. Authorization security policies are defined for individual sources and TCs, which are either stated based on personal privacy preferences or are enforced system wide as defined by central administrators. For example, a driver may not want to receive marketing commercials on dashboard, so she can set such personal preference as choosing the desired policy, whereas police can define a policy with a list of black-listed cars and blocking communication from them. Source and target vehicles are dynamically assigned to one or many trusted edge cloudlets based on their current GPS coordinates and predicted path as defined by associated\_cloudlets function. The association with edge cloudlets is fixed for transportation infrastructures or administrators which are assigned at the time of system deployment whereas for vehicles it keeps on changing as the vehicles move. Each cloudlet has defined geographic coverage area and when vehicles enter the area, they get associated with the cloudlet. A vehicle may be associated with multiple cloudlets in areas where coverage areas are overlapping, thereby, a vehicle is always associated to at least one cloudlet at all times. These cloudlets mediate the V2V and V2I communication by enforcing security policies, stop fake messages and ensure privacy, as discussed later in the model definitions. Further, sources (including vehicles) inherit attributes from their associated cloudlets, which helps in administration and propagation of common attributes to all associated entities with single administrative action. For instance, at a location where flash flood warning is issued, the edge cloudlet installed there will set attribute flash-flood = ON for all its associated vehicles when they become members of that cloudlet. In case of set valued attribute function, the effective attribute values for att $\in$ ATT of source (defined as $\mathrm{\ensuremath{\mathrm{effS}}_{att}}$), including target vehicles, is the union of direct values assigned to the source for attribute att and the values assigned to att for each associated cloudlets. However, in case of atomic valued attribute, it is necessary to define which attribute values take precedence when multiple edge clouds are associated. In our model, we propose that most recently connected cloudlet with non null value for the attribute will be inherited by the associated source or vehicles.\footnote{There are other approaches also to deal with atomic value inheritance, but for moving vehicles which are dynamically assigned to new cloudlets, we believe this approach is the most appropriate and relevant.} For example, the speed-limit attribute of most recently associated cloudlet will be populated for all member vehicles, and as the vehicle moves, this value is inherited from next associated edge cloudlet and so on. This inheritance in atomic values attribute only takes place when edge cloudlets have non null values, whereby with all associated cloudlets having null values, the direct attribute value of the source holds as its effective value also. Authorization functions are parameterized propositional logic formulae defined to represent access control security policies stated in the policy language defined in Table \ref{tab 1}. The function $\mathrm{Auth_{op}}$(s:S, tc:TC) specify conditions under which source s (including vehicles) can perform an operation op $\in$ via cloudlet tc $\in$ TC. These boolean authorization functions are evaluated substituting actual arguments for formal parameters along with direct and effective attributes values of actual arguments. Similar syntax and policy language can be defined for other set of policies including personal vehicle specific policies or system wide policies with attributes of relevant entities substituted in authorization requests evaluation. Authorization decision to allow {$\mathrm{s^\prime}$}~$\in$ S to perform an operation op $\in$ OP on {$\mathrm{tc^\prime}$}~$\in$ TC is determined when the authorization function is evaluated with the actual arguments ({$\mathrm{s^\prime}$}~$\in$ S, {$\mathrm{tc^\prime}$}~$\in$ TC) to be True. Similarly, the decision for operation op from {$\mathrm{tc^\prime}$}~$\in$ TC to {$\mathrm{v^\prime}$} $\in$ {$\mathrm{V_T}$}~is made by calling the relevant authorization function with actual parameters. As discussed in authorization property, the model has defined two primitive operations, `send' and `forward' relevant for V2V and V2I communication. A source uses `send' operation (defined as $\mathrm{Auth_{send}}$({$\mathrm{s^\prime}$} : S, {$\mathrm{tc^\prime}$} : TC)) to communicate a `send message' to trusted cloudlet, whereas `forward' operation (defined as $\mathrm{Auth_{forward}}$({$\mathrm{tc^\prime}$} : TC, {$\mathrm{v^\prime}$} : {$\mathrm{V_T}$})) is between trusted cloudlet and target vehicle defining a `forward message'. For allowing, communication from {$\mathrm{s^\prime}$} to {$\mathrm{v^\prime}$} requires a common {$\mathrm{tc^\prime}$}~to which both {$\mathrm{s^\prime}$} and {$\mathrm{v^\prime}$} are associated and the required authorization functions for send and forward messages i.e $\mathrm{Auth_{send}}$({$\mathrm{s^\prime}$} : S, {$\mathrm{tc^\prime}$} : TC) and $\mathrm{Auth_{forward}}$({$\mathrm{tc^\prime}$} : TC, {$\mathrm{v^\prime}$} : {$\mathrm{V_T}$}) as well as the system defined security policies evaluate to True. Additional relevant operations and messages can be similarly defined. The proposed AB-ITS model leverages attributes and GPS coordinates of communicating entities to enable and secure V2V and V2I communication. The introduction of trusted cloudlets provide benefits of enforcing security policies at the edge to stop fake messages, enhance user privacy and integrity of messages before forwarded to other target vehicles. These edge cloudlets ensure low latency and near real time communication much needed in most ITS applications without bandwidth issues. It must be noted that the messages shared among source and vehicles are end to end encrypted and can still use the proposed DSRC wireless technology for communication with cloudlet and then to the vehicles. Our model complements the USDOT proposed V2V and V2I architecture functionalities and support applications which need additional message integrity and confidentiality, and can be used as an add on to current ITS peer to peer communication. \iffalse Authorization functions are parameterized propositional logic formulae defined to represent access control security policies stated in the policy language as shown in Table \ref{tab 1}. We have stated syntax for two authorization functions $\mathrm{Auth_{op}}$(s:S, tc:TC) and $\mathrm{Auth_{op}}$(tc : TC, v : {$\mathrm{V_T}$}), which specify conditions under which source s can perform operation op $\in$ OP on tc, and policies when tc can perform operation op on vehicle v respectively. These boolean authorization functions take formal parameters which are passed when function call is made using the actual arguments. The values of direct and effective attributes of these formal parameters (s $\in$ S, tc $\in$ TC, v $\in$ {$\mathrm{V_T}$}) are used to evaluate the authorization policy. Similar syntax and policy language can be defined for other set of policies including personal vehicle specific policies or system wide policies with attributes of relevant entities included in authorization requests evaluation. Authorization decision for allowing {$\mathrm{s^\prime}$}~$\in$ S to send or perform an operation op $\in$ OP on {$\mathrm{tc^\prime}$}~$\in$ TC is determined when the authorization function call is made using the actual parameters ({$\mathrm{s^\prime}$}~$\in$ S, {$\mathrm{tc^\prime}$}~$\in$ TC) and if function returns True, the operation op is allowed. Similarly, the decision for operation op from {$\mathrm{tc^\prime}$}~$\in$ TC to {$\mathrm{v^\prime}$} $\in$ {$\mathrm{V_T}$}~is made by calling the relevant authorization function with actual parameters. The communication decision for a message from a source {$\mathrm{s^\prime}$}~to vehicle {$\mathrm{v^\prime}$}~requires a common trusted cloudlet {$\mathrm{tc^\prime}$}~to which both {$\mathrm{s^\prime}$}~and {$\mathrm{v^\prime}$}~are associated, and the required authorization policies including system defined policies are taken into account to make the final ITS V2V and V2I communication decision. The following authorization property must hold true in AB-ITS model: For allowing, communication and message flow from {$\mathrm{s^\prime}$} to {$\mathrm{v^\prime}$} requires a common {$\mathrm{tc^\prime}$} to which both {$\mathrm{s^\prime}$} and {$\mathrm{v^\prime}$} are associated and the required atomic authorization functions i.e $\mathrm{Auth_{send}}$({$\mathrm{s^\prime}$} : S, {$\mathrm{tc^\prime}$} : TC) and $\mathrm{Auth_{forward}}$({$\mathrm{tc^\prime}$} : TC, {$\mathrm{v^\prime}$} : {$\mathrm{V_T}$}) as well as the system defined security policies must return True. The proposed AB-ITS model leverages attributes and GPS coordinates of communicating entities to enable and secure V2V and V2I communication. The introduction of trusted cloudlets provide benefits of enforcing security policies at the edge to stop fake messages, enhance user privacy and integrity of messages before forwarded to other target vehicles. These edge cloudlets ensure low latency and near real time communication much needed in most ITS applications without bandwidth issues. It must be noted that the messages shared among source and vehicles are end to end encrypted and can still use the proposed DSRC wireless technology for communication with cloudlet and then to the vehicles. Our model complements the USDOT proposed V2V and V2I architecture functionalities and support applications which need additional message integrity and confidentiality, and can be used as an add on to current ITS peer to peer communication. \fi \section{Proposed Cloudlets Supported ITS Architecture}\label{sec_arch} The current peer to peer V2V and V2I communication as represented in Figure \ref{fig_v2v} is proposed to use SCMS to ensure secure trusted basic safety messages exchange among entities. However, the vast and complex scale of this PKI based system has user privacy and security concerns which need to be addressed before its deployment. In this section, we will discuss security and privacy requirements of ITS and smart cars ecosystem and highlight how the proposed trusted cloudlets supported communication offers the required security and complements current solutions. \subsection{Security and Privacy Requirements} \input{Figures/architecture} Intelligent Transportation System (ITS) involves real time sharing of location and sensitive information about vehicles and passengers, which pose a serious privacy threat and a strong deterrent for its adoption. Dynamic and distributed ITS will enable interaction with random entities on road with no prior trust established, and the information sent from these smart vehicles will be used by on-board applications to provide safety and warning signals, which itself has some inherent security risks. An adversary can compromise a road-side unit or vehicle to send fake information about traffic or accident, which can trigger unnecessary alerts and may distract drivers. Basic safety messages (BSMs) are designed to contain no personal identifiable information (PII) and are attached with a certificate issued by certificate authority in SCMS. However, limited number of certificates and number of messages sent per minute can reveal the identity of a targeted vehicle with advanced computer techniques. Untrackability of vehicles and users is paramount to ensure privacy in ITS. Also, the system must not save personal or individual information and use it as law enforcement or issuing speeding tickets. Anonymity of sender must always be maintained. Over the air messages exchanged among smart entities must have integrity, and authenticity. Security mechanisms to protect smart cars and their critical systems from unauthorized access, control and tampering are important to strengthen intelligent transportation. Integrated approach of DSRC and cellular technologies is needed based on different ITS applications. Cloud and cloudlets supported architectures will provide resiliency and reduce system stress. Encrypted and secure data transfer link is the backbone needed from DSRC, cellular LTE or any communication technologies involved in ITS. However, limited bandwidth and latency issues in cloud connectivity needed for certificate updates and revocation needs attention In smart city, location based notifications for connected vehicles must allow user to have personal preferences where a user may want weather warning and not parking advertisements on board. Dynamic policies are required, for example, in case of a traffic jam in an area a policy may ask all drivers to follow route A but considering the heavy traffic on route A, the policy may be changed to move traffic to route B or C. This can be implemented at the edge level and triggered by central administrators. In such a case, whether the administrative subject is authorized to change the policy or trigger an alert, also needs security checks. \subsection{How Cloudlets Can Provide Security?} Figure \ref{fig_arch} shows the proposed edge supported architecture for V2V and V2I communication. Trusted edge infrastructures (setup by city administration) will work as a middle man and relay messages to vehicles and other entities inside its geographic range. Instead of peer to peer connection, all vehicles publish to edges, where security policies defined are checked to ensure validity and integrity of the communication, and relevance of messages, before forwarding to other vehicles. A vehicle can be in range of multiple infrastructures, depending on its location. Each vehicle will be dynamically associated with edges as it moves. All participating vehicles and RSUs still need to enroll with a central authority to be part of the system, to ensure that only trusted vehicles are allowed to exchange messages among themselves. Communication technologies used for vehicles to cloudlets can be cellular LTE, WiFi or DSRC. MQTT messaging protocol can be used, as discussed in implementation which will obviate the cost of DSRC equipments needed in smart cars. The proposed architecture is implemented in addition to V2V and V2I direct communication and is supported in NPRM \cite{nhtsa-6} documents which recommend both DSRC and secondary communication for ITS. Trusted cloudlets installed in wide geographic area offer the needed fog infrastructure functionality required in an IoT environment. They can address security concerns by deploying and enforcing security policies to ensure trusted communication among smart entities on the road. This proposed architecture offers an alternate edge supported V2V and V2I communication with minimal message latency and in permissible time limits \cite{Xu:2004:VSM:1023875.1023879,articleV2V}. A vehicle sending and receiving BSM or other messages, must be associated with an edge infrastructure, which will enforce policies, sanitize messages, prevent fake messages dissemination and offer administrative advantages. Each cloudlet will have a geographic range and all the vehicles within it will get associated with the edge automatically. Since the range of edge is within a restricted limited area, it also ensures location sensitivity of messages exchanged, as vehicles communicating messages must be associated to a common edge cloudlet. Message anonymity and sanitization can be done, since the messages sent by a vehicle are relayed via the edge cloudlet without direct peer to peer communication, which will have less security and privacy implications. Further, using cloudlets offers administrative benefits as single notification from edge infrastructure will trigger alerts for all the vehicles which are connected to it in a geographic range. If an agency or a police vehicle wants to send alerts, instead of sending to each individual vehicle, they can send it to a trusted cloudlet, which after checking the policies to ensure the sender is allowed to generate such requests, forwards or stops the message. Also, entities present in a particular area have certain characteristics (for example, stop sign warning, speed limits, deer-threat, flash flood warnings etc.) in common, which can be inherited by getting dynamically associated to edge infrastructures, without the need to generate messages 10 times per second \cite{nhtsa-3} to get this information from other vehicles or RSUs saving network bandwidth. It is also possible to limit the messages to a specific set of vehicles, for example, in case of a kidnapped child warning, messages can be sent to nearby edge infrastructures and then to only police vehicles in the area, and not to the common public using security policies defined at the cloudlet. Edge infrastructure can also have the capacity to filter unwanted and incorrect messages from the vehicles and infrastructure using a majority rule policy. For example, if an adversary is sending accident message (either deliberately or a malfunction sensor on vehicle) to subvert the traffic whereas other vehicles notify no accident and clear traffic messages, installed trusted edge will have the intelligence and policy to filter such fake messages and forward the correct information to its associated vehicles. This will not be possible in peer to peer V2X (vehicle to anything) architecture immediately, until certificate revocations (by a central authority) are propagated to individual vehicle, which may take time and also require internet connectivity which cannot be guaranteed all times in terrains where the vehicle is moving. Also, instead of sending CRLs to each vehicle, only edge servers can be sent with list of revoked certificates and based on the information, edge can decide if the messages sent by vehicle should be forwarded or not. Further, if an adversary is detected by an edge with fake or wrong messages, policies can be defined to inform appropriate agencies and law enforcement in the area where such malicious behaviour is detected. It is also possible to have different levels of alerts based on the degree of trust and who is the sender. Law enforcement initiating a bomb threat in the vicinity will be treated as major threat and edge infrastructure states it as code red alert, with immediate rerouting and emergency exit directions. \iffalse V2V-- Forward Collision Warning, Emergency Electronic Brake Light, Blind Spot/Lane Change Warning, Do Not Pass Warning Intersection, Movement Assist Left Turn Assist v2I-- Curve Speed Warning Red Light Violation Warning \fi \section{Related Work}\label{sec_related} Connected and smart vehicle applications need wireless exchange of V2X messages among unknown moving vehicles, RSUs and pedestrians. The proposed intelligent transportation system (ITS) for future cities has underlying technologies, security concerns and proposed solutions, which we briefly review in this section. \subsection{Security Credentials Management System} United States Department of Transportation (USDOT) has suggested a PKI-based security infrastructure system, called Security Credentials Management System or SCMS \cite{its-scms2, its-scms1}, to ensure trusted V2V and V2I communication among random moving entities. Authorized participating vehicles use digital certificates issued by SCMS to validate and authenticate basic safety messages (BSMs), by attaching these certificates with each message to ensure integrity, confidentiality and privacy of the communication. Vehicles need initial enrollment into SCMS to obtain security certificates from trusted certificate authorities (CA). Each BSM will include vehicle related information digitally signed using private key corresponding to the digital certificate attached with BSM. Different certificate types are used including enrollment, pseudonym and identification for vehicle and enrollment applications for RSUs. Certificates can be cancelled for potential adversaries or reported misbehaving vehicles by CAs by disseminating certificate revocation lists (CRLs). USDOT and NHTSA claim \cite{us-dot-1} that BSMs will exchange anonymized information and no personal identifiable data will be shared with other entities. SCMS is considered as a central system to be trusted by entities participating to revolutionize transportation However, there are some challenges \cite{scms-issues,scms-issues1} that need to be addressed before the system is deployed. Each vehicle will receive 20 certificates weekly to sign the BSMs \cite{nhtsa-5}, which will rotate every 5 minutes. Therefore, a vehicle will use a new set of 20 certificates every 100 minutes. In such a scenario a computer can analyse all the certificates a vehicle used in a day and then use these certificates to track it for a week. Although, PKI based SCMS system ensures who signed the certificate, it is difficult to prove how correct or true the information sent from the vehicle is. A malfunctioning device in the vehicle can result in false BSMs exchanged even though the sender is trusted. Further, the proposed SCMS system will be largest and complex ever built producing 265B to 800B certs/year depending on weekly rate supporting 17M vehicles/year \cite{scms-issues1}. The revocation of certificates for bad actors would result in pushing CRLs to all enrolled vehicles, which will be time and bandwidth consuming. \subsection{Relevant Background and Technologies} Several general IoT architectures \cite{atzori2010internet,gubbi2013internet,alshehri2016access} have been proposed with different middleware layers in multi-layer stack representing physical objects, communication or service layer, cloud and end-user applications. Gupta and Sandhu proposed \cite{gupta2018authorization} enhanced access control oriented architecture (E-ACO) particularly relevant to smart cars and intelligent transportation. The work introduced clustered objects (smart objects with multiple sensors like cars) as component of object layer which interact with other objects similar to V2V and V2I communication. As shown in Figure \ref{fig_eaco}, E-ACO architecture has four layers: \textbf{Object Layer} at the bottom representing physical objects including connected cars, vehicles and RSUs. \textbf{Virtual Object Layer} maintains cyber entity (like an AWS shadow stored as JSON) of each physical object which is imperative in a moving and dynamic ecosystem like smart cars, where the connectivity of a vehicle is not continuously guaranteed. With virtual objects, when direct communication with physical object is not possible, its virtual entity maintains last reported and desired state information. Further, it resolves the issues of heterogeneity as objects support different communication technologies. Using virtual objects, physical entities communicate with corresponding virtual objects where messages are exchanged with virtual entities of other object which is then passed to actual physical object. \textbf{Cloud Services and Application Layer} together harness data sent by physical objects and use it to extrapolate value, analytics and provide end user cloud supported applications. \input{Figures/v2v} Smart cars security incidents including Jeep \cite{jeep} and Tesla Model X \cite{tesla} hacks have demonstrated how engine was stopped and steering remotely controlled exhibiting cyber threats. Security and privacy issues in smart cars and ITS are serious concerns where several federal agencies are working along with industry partners to ``fully'' proof the system before final deployment and use by common public. European Union Agency for Network and Information Security (ENISA) \cite{enisa} has studied vulnerable assets in smart cars with related threat and risks, and proposed some prevention approaches with recommendations. Cooperative Intelligent Transport Systems (C-ITS) \cite{c-its1,c-its2} also highlighted the need of data communication integrity and authenticity in V2V and V2I, and proposed PKI based trust model using pseudonym certificates. NHTSA report \cite{nhtsa-3} has thoroughly explored the technical, legal and policy related issues pertinent to V2V communication and studied technological solutions for safety and privacy issues. US Government Accountability Office (GAO) \cite{gao} has also discussed security risks and potential attack surfaces in smart vehicles, and proposed solutions to prevent cyber threats. Attribute based access control \cite{hu2015attribute,jin2012unified,gupta2018attribute} provides fine grained authorization capabilities most appropriate in dynamic and distributed systems similar to ITS. Recently dynamic groups and ABAC model \cite{Gupta:2019:DGA:3292006.3300048,gupta2019secure} was proposed for smart cars ecosystem which caters to mobile needs of vehicles. However the model is more suitable to cloud assisted applications and a real time V2V and V2I edge supported model is still missing. Role based access controls \cite{sandhu1996role,ferraiolo2001proposed} were designed particularly for enterprise applications with a limited set of roles and administrators assigning roles to users. Similar concept does not seem to fit dynamic and random unknown IoT smart cars setting where devices and vehicles are in different administrative domains spread across geographic area. \section{Summary}\label{sec_summary} This research work proposes a cloudlet assisted secure V2V and V2I communication in intelligent transportation system, which ensures trusted and reliable messages exchange among moving entities on road. We introduce the novel notion of dynamic edge associations in which the smart entities get connected to different pre-installed cloudlets on road, which help them relay the basic safety messages and perform the needed filtering and reduces privacy concerns of the users. These cloudlets can anonymize the messages, ensure trustworthiness and ensure their relevance to entities which receive them. We also present the formal model which specifies attributes based polices for V2V and V2I communication. Several use-cases of ITS have been discussed along with implementation in Amazon Web Services (AWS). Performance has been evaluated against time taken to evaluate the polices in cloudlets and the total trip time from the moment message is generated till it gets received and relayed by the cloudlets. In future work we would incorporate additional privacy preserving approaches wherein the exact location GPS coordinates are not required to be shared with cloud. The work can be complemented using homomorphic encryption or other similar approaches which will further mitigate privacy concerns of the users. \iffalse ---To ADD--- PERFORMANCE--- As more cars are in the GG, it do not impacr performace as all assigned to same topic (Need conforamtion) \fi
\section{Introduction} \noindent The research field of econophysics has emerged recently as economics-inspired statistical physics. Though the attempts are not new and in fact almost a century old (see the Appendix), the institutionalization of this research field, where (statistical) physicists can and do regular researches in their own departments and publish their relevant results in traditional and contemporary physics journals, is new (see e.g.,~\cite{kishore_sudip19,stanley2000introduction_sudip,sinha2010econophysics_sudip,yakovenko2009colloquium_sudip,chakrabarti2013econophysics,sen2014sociophysics}). Indeed the term econophysics had been formally coined in 1995 (see the Appendix and Fig.~\ref{citation_hist}) and we are now in the silver jubilee celebration year! This review is intended for interested students for self-studies and self-learning through computational modelings of a few selected problems in econophysics. Some elementary computer programs or codes (in Fortran or Python) are added for ready support. We first introduce a few popular research problems in econophysics and continue discussion on them in the following. \begin{figure}[h] \begin{center} \includegraphics[width=10.5cm]{citation_ECNPHYS_histogram.pdf} \end{center} \caption{Histogram plot of numbers of entries per year containing the term ‘econophysics’ versus the corresponding year. The data are taken from Google Scholar (dated: 31 December, 2019). It may also be noted from Google Scholar that while this 24-year old econophysics has today typical yearly citation frequency of order $1.2 \times 10^3$, more than 100-year old subjects like astrophysics (Meghnad Saha published his ionization equation for solar chromosphere in 1920), biophysics (Karl Pearson coined the term in his 1892 book `Grammar of Science') and geophysics (Issac Newton explained planetary motion, origin of tides, etc in `Principia Mathematica', 1687) today have typical yearly citation frequencies of order $36.6 \times 10^3$, $40.2 \times 10^3$ and $45.4 \times 10^3$ respectively.} \label{citation_hist} \end{figure} Inequality in income or acquired wealth has been ubiquitous: not only today, even in the earliest days of the human civilization. It is hard to find any society with fare amount of equality in income or wealth for everyone. It has continued to exist and sometimes have grown enormously in societies for centuries, and even today threatening our existence and wellbeing. Studies on inequality in wealth has a long history and has fascinated generations of philosophers, economists, social scientists and thinkers alike. Analysis of real data on wealth distribution is not new: with the advent of digital era, researchers from social science, even from interdisciplinary branches have been studying the recorded bulk amount of human social interaction data to explore the hidden structure of these data and also investigate the reason behind such inequality and so on. There are many ways to quantify inequality present in some social context or opportunity, e.g. income, wealth, as we know income is taken as a measure of economic growth of any country. The popular measures, summarized in one value, are Gini, Pietra indices etc. We will also discuss the recently introduced Kolkata index for measuring social inequality. All these make use of the Lorenz curve plot. On the other hand, one can also study the probability distribution and find the trend present in empirical data. Interestingly, the above mentioned indices computed from the Lorenz curve which is also plotted using the cumulative probability distribution of some context data against number of occurences. The study can also be extended to uncover the temporal pattern of social inequality from those data spread over years. Along with income or wealth inequality, we also put together inequality indices values measured over several other social context, e.g., academic citation count, city size or population, voting data, human death counts from social conflict which can be man-made like war, battle or natural disasters like earthquake, flood etc. These studies, sometimes done over couple of century-wide data (which are publicly available), have helped to uncover interesting patterns (of the presence of higher inequality but not highest inequality). Next we study about the Kolkata Paise Restaurant (KPR) problem. KPR is a repeated many-player many-choice game played by a large number of players ($N$). Every day each player will choose a restaurant and visit there for lunch. Each restaurant prepares a single dish that costs the same at any restaurant. Player can only make single choice per day, and lunch at chosen restaurant is guaranteed if visited alone there for that day. Any day if more than one player choose the same restaurant then only one of them gets the dish and others arriving there would miss their lunch. Information about the restaurant occupations for few finite previous days (depending on the memory capacity of the players) will be publicly available. But players do not interact with others while making decision i.e. choosing a restaurant for lunch that day. In such set up, how the players should set individual choice towards socially optimal solution i.e. no food waste as well as no player staying hungry that day. A simple solution could be to hire a non playing captain (dictator) who would assign some restaurant to the players, thus all of them get their food from first day and following this setting till end. But in a democratic setup, players would like to make their own choice following some collectively learning strategy. Here the objective is to achieve maximum social utilization of the scarce resources in absence of some external coordinator. This makes the KPR game interesting. Some results on statistics of KPR dynamics over variety of strategies developed, as well as an interesting phase transition phenomena have been discussed in respective section. Another important and popular research-work deals with the economic/social networks evolved due to social interactions through market dynamics and game. In this context we will discuss about the Indian Railway network (IRN) as a complex (transport) network where each railway station is vertex and track between any two connecting stations is the edge between them. Study reveals IRN as a small world network, a popular network model where mean distance between any two nodes becomes constant as network size grows. Thus the graph like study has successfully answered several interesting questions like how many trains one passenger would require to switch to reach any destination station within country while traveling by train etc. We discuss the attempts made in the developments of the microscopic dynamical models (mainly based on kinetic theory), which can explore the underline dynamics behind the making of the real-world income or wealth distribution. We also highlight few models which show the possible ways of minimizing the socioeconomic inequality. \begin{figure}[ht] \begin{center} \includegraphics[width=7.0cm]{Lorentz2.pdf} \end{center} \caption{Lorenz curve (in red here) plot represents the accumulated wealth against the fraction of people possessing that when arranged from poorest to richest. The diagonal from the origin represents the equality line. The Gini index ($g$) can be measured from the (shaded) area ($S$) normalized by the area ($S+{\bar{S}} = 1/2$) of total area of the triangle below the equality line): $g = 2S$. The $k$ index can be measured by the ordinate value of the intersecting point of the Lorenz curve and the diagonal perpendicular to the equality line. It says that $k$ fraction of wealth is being held by $1-k$ fraction of top richest population.} \label{LC_fig} \end{figure} \begin{figure}[ht] \begin{center} \fbox{\includegraphics[width=12.0cm] {gini_program.pdf}} \end{center} \caption{Python (version $2.7$) program to plot Lorenz curve based on hypothetical data, and also to compute gini index value. If run this program, one obtains $g$ value around $0.73$. } \label{gini_code} \end{figure} \section{Measuring Social Inequality and the Kolkata Index}\label{gini-kpr} Inequality present in socio-economic data can be quantified in several ways. Mostly used is the Gini index ($g$) introduced by Italian statistician and sociologist Corrado Gini in 1912~\cite{gini1921measurement}. There are others as well like Kolkata index ($k$), Pietra index ($p$) etc. Usually we plot histogram or frequency distribution to get the initial idea of any data in hand. And those indices mentioned above are easily measurable scalars from the cumulative probability distribution of the respective quantity. This distribution when plotted is known as Lorenz curve. Study of real data on the socio-economic context has been reported to follow fat tail, lognormal or gamma like distribution, see. Below we discuss some standard measures and techniques to get a general idea on how to measure inequality present in some quantity. \textbf{Lorenz curve:} Lorenz curve was proposed by Max O. Lorenz in $1905$. The curve always begins from point $(0,0)$ and ends in point $(1,1)$ as seen in Fig.~\ref{LC_fig}. If one plots the fraction of population or household in increasing order of $X$-axis against fraction of wealth held by them gives the cumulative probability distribution function $F$. Thus, the fraction of total wealth held by bottom x\% population is represented by $y = F(x)$. More the fractions grow close to each other, i.e. if $x$\% $\sim$ $y$\% then the Lorenz curve becomes a straight line representing perfect equality in wealth or income distribution. Far the curve deviates from the diagonal or $45\degree$ line mean presence of greater inequality in the distribution. Intuitively, the curve never rise above the equality line ($X$ = $Y$). We also discuss about some inequality measuring indices, to be obtained using the Lorenz curve.\\ \noindent\textbf{Gini index ($g$):} Gini index ($g$) is a standard measure of inequality, used not only by economists but also researchers across other disciplines e.g. physicist, social scientists etc. For computing the Gini index ($g$), one can fit Lorenz curve in a unit square, where the ratio of area between the Lorenz curve and equality line to the area below the equality line gives the Gini index ($g$) value. In Fig.~\ref{LC_fig}, $S$ represents the area between the Lorenz curve and equality line and $(S+{\bar{S}})$ represents the area below the equality line, then $\left(g={{S} \over{S+{\bar{S}}}}\right)$. It ranges from $0$ to $1$ where $g = 0$ denotes perfect equality, say every individual has same income and plotting this should give the equality line (see Fig.~\ref{LC_fig}). And when $g = 1$, it represents maximum possible inequality where in a society only one person has every wealth and rest left with none. But then, Gini index ($g$) is a summary measure. Below we discuss Kolkata index ($k$), Pietra index ($p$) etc. to be estimated using the same Lorenz curve plot. \textbf{Kolkata index ($k$):} Ghosh et al. has recently proposed `Kolkata index'($k$) \cite{ghosh2014inequality}, another inequality measuring index to be obtained from the same Lorenz curve plot. The $k$ value can be estimated from the $X$-axis point where the Lorenz curve intersects the diagonal line perpendicular to the line of equality, see Fig.~\ref{LC_fig}. So, the $k$-index ranges from $0.5$ to $1$. Interestingly the complementary Lorenz function, represented as $\tilde{F}(n) = 1 - F(n)$, denotes $k$-index as a non-trivial fixed point on $x$-coordinate such that $\tilde{F}(k)$ = $k$ where $\tilde{F}(n)$ intersects the diagonal line spanning between $(0,0)$ and $(1,1)$, see Fig.~\ref{LC_fig}. Another popular measure of inequality is the Pietra index (see, Eliazar et al. \cite{eliazar2010measuring} for further discussion). It can be measured as the maximal vertical distance of the Lorenz curve from line of equality. So more the Lorenz curve deviates from the equality line greater is the inequality. Similar to Gini-index, the Pietra-index value also varies between $0$ to $1$, where $0$ represents complete equality and $1$ denotes extreme inequality. However we will consider Gini and Kolkata indices for our further discussion over inequality in social events. To measure inequality, Gini index ($g$) is frequently used by the economist. Note that the $g$-index represents the overall summary of inequality, whereas $k$-index is the indicator of the fraction of $x$ quantity held by $1-x$ fraction of population. Already mentioned that, $g$ varies between $0$ to $1$, whereas $k$ ranges from $0.5$ to $1$. One can obtain the Lorenz curve plot as well as the measure of indices from some real data using program given in Fig.~\ref{gini_code}. \subsection{$g$ and $k$ index values for several types of real data:} Here we discuss results from various kinds of social events where inequality is measured (for e.g., citations, income, expenditure, vote, city size, human-death counts from social conflicts etc.) and some interesting results are observed. Chatterjee and Chakrabarti, 2016~\cite{chatterjee2017fat} studied probability distribution of many publicly available (by several universities and peace research institutes) data on human death counts occured from wars, armed-conflicts as man-made disasters as well as natural disasters like earthquake, forest fires etc. The distribution plots showed up to follow power law, in the fat-tail region, with exponent $\zeta$ around -$1.5$, see~TABLE~\ref{tab_1}. Extending their work, Sinha and Chakrabarti in~\cite{sinha2019inequality} measured the corresponding $g$ and $k$ index values by plotting Lorenz curves using many of the data discussed in~\cite{chatterjee2017fat} and the $g$ and $k$ values were found to be very high, see~TABLE~\ref{tab_2} and TABLE~\ref{tab_3}. Such high values indicates severe inequalities which is rarely seen in economic states of different countries (presumably because of deliberate supports to economically weaker groups, etc.). Those indices are also measured for the physical quantities (in case of natural disasters only, e.g., Richter magnitudes for earthquake, areas affected in sq. km. for floods, maximum water height in m for tsunami) causing such unequal occurences of human deaths~TABLE~\ref{tab_3.1}. Surprisingly not much inequality is observed in this case in comparison to those social effects caused by them. To establish the `similarity classes' of social inequality, these results were compared against those inequality measures found from man-made competitive societies like academic institution (paper citation counts), see TABLE~\ref{tab_4}. And the study indicated the growing recent trend of economic inequality across the world, may be because of encouraging competitiveness in societies as well as due to fast disappearance of social welfare measures in recent years. \begin{table}[h] \caption{Estimated value of power law exponent $\zeta$ for man-made, natural conflicts from~\cite{chatterjee2017fat}.} \label{tab_1} \begin{center} \begin{tabular}{|l||c|c|} \hline \textbf{Type of conflicts/disasters} & \textbf{Time period} & \textbf{$\zeta$} \\ \hline conflict & 1946-2008 & $1.54\pm0.06$ \\ \hline war & 1816-2007 & $1.63\pm0.03$ \\ \hline battle & 1989-2014 & $1.64 \pm 0.07$ \\ \hline \hline earthquakes & 1900-2013 & $1.51\pm 0.05$ \\ \hline storms & 1900-2013 & $1.65\pm 0.03$ \\ \hline wildfires & 1900-2013 & $1.51\pm 0.01$ \\ \hline \end{tabular} \end{center} \end{table} \begin{table}[h] \caption{Estimated inequality (in death counts) index values for man-made conflicts from~\cite{sinha2019inequality} } \label{tab_2} \begin{center} \begin{tabular}{|l|c|c|c|} \hline \textbf{Type of conflicts} & \textbf{Time period} & \textbf{$g$-index} & \textbf{$k$-index} \\ \hline war & 1816-2007 & $0.83\pm$0.02 & $0.85\pm$0.02 \\ \hline battle & 1989-2017 & $0.82\pm$0.02 & $0.85\pm$0.02 \\ \hline armed-conflict & 1946-2008 & $0.85\pm$0.02 & $0.87\pm$0.02 \\ \hline terrorism & 1970-2017 & $0.80\pm$0.03 & $0.83\pm$0.02 \\ \hline murder & 1967-2016 & $0.66\pm$0.02 & $0.75\pm$0.02 \\ \hline \end{tabular} \end{center} \end{table} \begin{table}[h] \caption{Estimated inequality index values for social damages by natural disasters from~\cite{sinha2019inequality} } \label{tab_3} \begin{center} \begin{tabular}{|l|c|c|c|} \hline \textbf{Type of disasters} & \multicolumn{3}{c|} {\textbf{ Social Damage measures }} \\ \cline{2-4} & \textbf{Time period} & \textbf{$g$-index} & \textbf{$k$-index} \\ \hline earthquake & 1000-2018(July) & $0.94\pm$0.02 & $0.95\pm$0.02 \\ \hline flood & 1900-2018(July) & $0.98\pm$0.02 & $0.98\pm$0.02 \\ \hline tsunami & 1000-2018(July) & $0.93\pm$0.02 & $0.94\pm$0.02 \\ \hline \end{tabular} \end{center} \end{table} \begin{table}[h] \caption{Estimated inequality index values for physical damages by natural disasters from~\cite{sinha2019inequality} } \label{tab_3.1} \begin{center} \begin{tabular}{|l|c|c|c|} \hline \textbf{Type of disasters} & \multicolumn{3}{c|} {\textbf{ Physical Damage measures }} \\ \cline{2-4} & \textbf{Time period} & \textbf{$g$-index} & \textbf{$k$-index} \\ \hline earthquake & 2013-2018(July) & 0.35 & 0.64 \\ \hline flood & 1900-2018(July) & 0.76 & 0.79 \\ \hline tsunami & 1000-2018(July) & 0.53 & 0.69 \\ \hline \end{tabular} \end{center} \end{table} \begin{table}[h] \caption{Values of the inequality indices ($g$ and $k$) for some of the academic institutions (from \cite{ghosh2014inequality}, see also \cite{chatterjee2017socio}; source-data taken from the Web of Science).\tiny{\textbf{[*Cambridge: University of Cambridge, Harvard: Harvard University, MIT: Massachusetts Institute of Technology, Oxford: University of Oxford, Stanford: Stanford University, Stockholm: Stockholm University, Tokyo: The University of Tokyo, BHU: Banaras Hindu University, Calcutta: University of Calcutta, Delhi: University of Delhi, IISC: Indian Institute of Science, Madras: University of Madras, SINP: Saha Institute of Nuclear Physics, TIFR: Tata Institute of Fundamental Research.]}} } \label{tab_4} \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|} \hline \textbf{Inst./Univ.*} & \textbf{Year} & \multicolumn{2}{ c|} {\textbf{Index values for}} & \textbf{Inst./Univ.*} & \textbf{Year} & \multicolumn{2}{ c|} {\textbf{Index values for}} \\ \cline{3-4} \cline{7-8} & & \makecell{Gini\\($g$)} & \makecell{Kolkata\\($k$)} &&& \makecell{Gini\\($g$)} & \makecell{Kolkata\\($k$)} \\ \hline \multirow{4}{*}{Cambridge} &1980 & 0.74 & 0.78 & \multirow{4}{*}{BHU} &1980 & 0.68 & 0.76 \\ &1990 & 0.74 & 0.78 & &1990 & 0.71 & 0.77 \\ &2000 & 0.71 & 0.77 & & 2000 & 0.64 & 0.74\\ &2010 & 0.70 & 0.76 & &2010 & 0.63 & 0.73 \\ \hline \multirow{4}{*}{Harvard} &1980 & 0.73 & 0.78 & \multirow{4}{*}{Calcutta} &1980 & 0.74 & 0.78 \\ &1990 & 0.73 & 0.78 & &1990 & 0.64 & 0.74\\ &2000 & 0.71 & 0.77 & &2000 & 0.68 & 0.74\\ &2010 & 0.69 & 0.76 & &2010 & 0.61 & 0.73 \\ \hline \multirow{4}{*}{MIT} &1980 & 0.76 & 0.79 & \multirow{4}{*}{Delhi} &1980 & 0.67 & 0.75\\ &1990 & 0.73 & 0.78 & &1990 & 0.68 & 0.76\\ &2000 & 0.74 & 0.78 & &2000 & 0.68 & 0.76\\ &2010 & 0.69 & 0.76 & &2010 & 0.66 & 0.74\\ \hline \multirow{4}{*}{Oxford} &1980 & 0.70 & 0.77 & \multirow{4}{*}{IISC} &1980 & 0.73 & 0.78\\ &1990 & 0.73 & 0.78 & &1990 & 0.70 & 0.76 \\ &2000 & 0.72 & 0.77 & &2000 & 0.67 & 0.75\\ &2010 & 0.71 & 0.76 & &2010 & 0.62 & 0.73\\ \hline \multirow{4}{*}{Stanford} &1980 & 0.74 & 0.78 & \multirow{4}{*}{Madras} &1980 & 0.69 & 0.76 \\ &1990 & 0.70 & 0.76 & &1990 & 0.68 & 0.76 \\ &2000 & 0.73 & 0.80 & &2000 & 0.64 & 0.73\\ &2010 & 0.70 & 0.76 & &2010 & 0.78 & 0.79 \\ \hline \multirow{4}{*}{Stockholm} &1980 & 0.70 & 0.76 & \multirow{4}{*}{SINP} &1980 & 0.72 & 0.74 \\ &1990 & 0.66 & 0.75 & &1990 & 0.66 & 0.73\\ &2000 & 0.69 & 0.76 & &2000 & 0.77 & 0.79\\ &2010 & 0.70 & 0.76 & &2010 & 0.71 & 0.76 \\ \hline \multirow{4}{*}{Tokyo} &1980 & 0.69 & 0.76 & \multirow{4}{*}{TIFR} &1980 & 0.70 & 0.76\\ &1990 & 0.68 & 0.76 & &1990 & 0.73 & 0.77 \\ &2000 & 0.70 & 0.76 & &2000 & 0.74 & 0.77\\ &2010 & 0.70 & 0.76 & &2010 & 0.78 & 0.79 \\ \hline \end{tabular} \end{center} \end{table} \begin{figure} \includegraphics[width=7.5cm] {cir1.pdf} \includegraphics[width=7.5cm]{c1.pdf} \caption{(a) Approximating Lorenz curve as an arc of a unit circle (here ACB) and equality line as the chord AB. (b) Plot of approximated slope ($\gamma$ = $\frac{1}{2\alpha}$) of $k$-$g$ linear relation for different values of $\theta$. } \label{gk-a-b} \end{figure} \subsection{Relationship between Gini ($g$) and Kolkata ($k$) index} In Fig~\ref{LC_fig}, the Lorenz curve is represented by the red color line obtained using a probability distribution function $F(x)$. Assume, $X$ denotes the cumulative fraction of $x$ taking lowest to highest order and $Y$ as the cumulative fraction of $y$. The Lorenz curve cuts the anti-diagonal $Y = 1 - X$ at point C ($k,1-k$). This gives the $k$-index defined as: $k$ fraction of wealth is possessed by $1-k$ fraction of people. Here, the shaded area $\mathcal{S}$ is enclosed by the Lorenz curve $(ACB)$ and the equality line $(ADB)$, and the The Gini index $g$ is represented by: \begin{equation}\label{egk_1} g = \frac{\text{ area of shaded region }}{\text{ area of the triangle $ABE$} } = 2\mathcal{S} \end{equation} Here we would study some approximate ways to measure $\mathcal{S}$. In Fig.~\ref{LC_fig}, we can assume the Lorenz curve to be given by two broken straight lines $AC$ and $CB$. Here, $AB = \sqrt{2}$, $DF = \frac{\sqrt{2}}{2}$, $CF$ = $(1-k)\sqrt{2}$, thus $CD = (DF-CF) = \frac{1}{\sqrt{2}}(2k-1)$. And the area of triangle $CAB$ is \begin{equation}\label{egk_2} \mathcal{A}_1 = \frac{1}{2} \cdot AB \cdot CD = \frac{1}{2}(2k-1) \end{equation} Note that this is an exact result where equality in the relation holds for $g$ = $k$ at $g$ = $k$ = 1. Thinking other way, consider that the Lorenz curve is represented by the arc $ACB$ of a circle with radius $r (=AE=BE)$, see Fig.~\ref{gk-a-b}(a). Find that $DE$ is perpendicular to base $AB$ with $\angle{BED} = \theta$. And the area of arc $ACB$ is the difference between the sector $BEAC$ and the triangle $ABE$. The area of sector $BEAC$ is $\theta r^2$. And, the area of triangle $ABE$ is given by $\frac{1}{2} \cdot$ $DE$ $\cdot AB = \frac{1}{2} \cdot r cos\theta \cdot 2r sin\theta$ = $r^{2}cos\theta sin\theta$. Thus the required area $ACBD$ representing the Lorenz curve is given by: \begin{equation}\label{egk_3} \mathcal{A}^{'} = r^2(\theta - sin\theta cos\theta) \end{equation} Now if we write $\mathcal{A}$ = $\mathcal{A}^{'}$ = $\frac{\alpha}{2}\cdot AB \cdot CD$, then \begin{equation}\label{egk_4} \alpha = \frac{\theta - sin\theta cos\theta}{sin\theta(1-cos\theta)} \end{equation} where $\alpha$ is a fraction incorporated to get the approximate result of $A^{'}$ as $\alpha \mathcal{A}_1$. Thus one gets $g \simeq$ 2$\mathcal{A}^{'}$ = 2$\alpha \mathcal{A}_{1}$ = $\alpha(2k-1)$ using Eq.~\ref{egk_2}, and this gives: \begin{equation}\label{egk_5} k = \frac{1}{2} + \frac{1}{2\alpha}g \end{equation} This is the general result of $g$ and $k$ relationship with slope $\gamma = \frac{1}{2\alpha}$. Fig.~4(b) also shows variation of $\frac{1}{2\alpha}$ against $\theta$. From Fig.~\ref{gk-vote}, one can find the observed approximate value of $\gamma$ = 0.365 which corresponds to $\theta$ = $\pi / 4$ (see Fig.~\ref{gk-a-b}(b)). This means that the Lorenz curve can be approximated as a quadrant arc of an unit circle centered at $E$ such that $2\theta = \pi/2$ (compare Fig.~\ref{gk-a-b}(a) with Fig.~\ref{LC_fig}). The readers are hereby encouraged to calculate the approximated $k$ value using Eq.~\ref{egk_5} that should come as $0.707$. \begin{figure}[h] \includegraphics[width=14.0cm] {g_k_acbkc.pdf} \caption{Plot of the relationship between Kolkata index($k$) and Gini index ($g$) found from various types of data, e.g., citation, income, city population, vote share, etc. The data fits Eq.~\ref{egk_5} quite well. Above figure is taken from ref.~\cite{chatterjee2017socio}.} \label{gk-vote} \end{figure} Interestingly, the results discussed in above para matches well with extensively studied real data taken from several publicly available sources e.g., citation data (from Web of Science), consumption expenditure data (for India, Brazil, Italy), income (for USA) voting data (for Italy, Sweden, India, UK, Bangladesh, Canada etc.), city size etc. The dotted straight line represents $k = 0.5 + 0.365g$. For more details see \cite{chatterjee2017socio,inoue2015measuring}. As the $k$-index ranges from $0.5$ to $1$, a normalized estimate 2$k$-1 is also considered which represents the maximum vertical distance between the equality line and Lorenz curve. This is how done as alike $g$-index, the $2k-1$ estimate also ranges between $[0,1]$. In \cite{sinha2019inequality}, both of $g$ and $2k-1$ are calculated for human death count data occurred from social conflict like battle, war, natural calamities etc. Two slope is observed when $2k-1$ is plotted against $g$: about $0.73$ (for lower range of $g$) and $1.5$ (for higher range of $g$). Though for both the cases, $g$ values are observed to be higher than corresponding $2k-1$ values; see Figs.~\ref{gk-vote} and~\ref{gk-as} for details. \begin{figure}[h] \begin{center} \includegraphics[width=8.0cm] {g_2k-1.pdf} \end{center} \caption{Plot of $2k-1$ against $g$ measured for human death count data from social conflict, also see~TABLE \ref{tab_2} \&~TABLE \ref{tab_3}. Both the estimates range from $0$ to $1$. For both of the slopes, $2k-1$ measures are observed to be less than respective $g$ values (see Ref.~\cite{sinha2019inequality}). } \label{gk-as} \end{figure} \section{Econophysics of income and wealth distribution}\label{econo_income-wealth} As discussed already, irrespective of history, culture and economic policies followed, socioeconomic inequalities are found to be omnipresent across the globe and throughout the ages. Indeed some robust features of such unequal distributions of income or wealth are already established (see e.g.,~\cite{chatterjee2007kinetic,chakrabarti2013econophysics}): While the overall the income or wealth distribution fits generally a Gamma-like curve (see some typical income distribution in Fig.~\ref{arnab_bkc_epjb2007}; whereas economists still like to fit it to a log-normal curve). The tail end of the distribution (for large income or wealth) decays following a robust power law, called the Pareto law (see Fig.~\ref{arnab_bkc_epjb2007}). Physicists today have been trying to capture such generic features of the income or wealth distribution, using models based on the kinetic theory of ideal gases, where the interactions among the `social-atoms' or agents (traders) due to a trade (involving money exchanges), are considered as a two-body scattering problem where the total money (like energy) before and after the trade, remains conserved. To best of our knowledge, the first text book (`A Treatise on Heat') on the statistical thermodynamics, which discussed the application of the kinetic theory (of ideal gas od `social-atoms') to the derive the income or wealth distribution, was written by Saha and Srivastava~\cite{sudip_saha_book}. \begin{figure}[h] \includegraphics[width=6.5cm]{uk_1992_2002.pdf} \includegraphics[width=6.5cm]{usa1992.pdf} \includegraphics[width=6.5cm]{usa2001.pdf} \includegraphics[width=6.5cm]{jpn2000.pdf} \caption{(a) Distribution $P(m)$ of individual weekly income in UK for 1992, 1997 and 2002. (b) Distribution $P(m)$ of individual weekly income for manufacturing and service sectors in USA for 1992; data for US Statistical survey. The inset shows the probability distribution of individual annual income, from US census data of 1996. (c) Cumulative probability $Q(m) = \int_m^\infty P(m) dm$ of rescaled adjusted gross personal annual income in US for IRS data from 2001, with Pareto exponent ${\alpha}_p \approx 1.5$ (given by the slope of the solid line). (d) Cumulative probability distribution of Japanese personal income in the year 2000. The power law (Pareto) region approximately fits to $\nu=1.96$. The data and analysis adapted from~\cite{chatterjee2007kinetic}.} \label{arnab_bkc_epjb2007} \end{figure} \subsection{Saha and Srivastava's Kinetic Theory for ideal gases with `atoms’ and `social agents’}\label{saha_book_diss} In thermodynamic systems, the number atoms or molecules is typically of the order of Avogadro number ($\sim 10^{23}$) whereas the number of social agents even in a global market is about $10^9$. Still one can imply the statistical physics principles in such economic systems. In their famous book, Saha and Srivastava had put a discussion in the section Maxwell-Boltzmaan velocity distribution of ideal gas, which highlights the idea of applying kinetic theory in market to evaluate the income distribution of a society (see Fig.~\ref{saha_book}). \begin{figure}[h] \begin{center} \fbox{\includegraphics[width=11.5cm, angle=-89]{Saha_book_pages_cam2.pdf}} \end{center} \caption{Image of the pages 104 and 105 of the book ``A Treatise on Heat'' (1931) by Saha and Srivastava~\cite{sudip_saha_book}.} \label{saha_book} \end{figure} In case of an ideal gas, at temperature $T$, the number density of particles $P(\epsilon)$ (atoms or molecules) having energy between $\epsilon$ to $\epsilon$ $+$ $d\epsilon$ is given by $P(\epsilon)d{\epsilon} = g(\epsilon)f(\epsilon)d\epsilon$. Here the density of states $g(\epsilon)d\epsilon$ gives the number of possible dynamical states between the energy $\epsilon$ to $\epsilon$ $+$ $d\epsilon$. The energy distribution function is denoted by $f(\epsilon)$. We should mention that, in case of an ideal gas, the particle can only have the kinetic energy $\epsilon = |\vec{p}|/2w$, where $\vec{p}$ and $w$ are the momentum and mass of the particle respectively. Since momentum is a vector, one can clearly understand that the particle can have same energy for different momentum vector $\vec{p}$. The density of states can be written as $g(\epsilon)d\epsilon = 4\pi|\vec{p}|^2d|\vec{p}| = 2\pi(2m)^{3/2}\sqrt{\epsilon}d\epsilon$. As the energy is conserved during any energy exchanging process, then the energy distribution should satisfy $f({\epsilon}_1)f({\epsilon}_2) = f({\epsilon}_1 + {\epsilon}_2)$ (for any arbitrary values of energy ${\epsilon}_1$, ${\epsilon}_2$). Therefore one can expect the exponential form of the energy distribution function, which is $f(\epsilon) \sim \exp(-\epsilon/\Delta)$, where we will identify later $\Delta = K_B T$. This essentially gives $P(\epsilon)d{\epsilon} \sim \sqrt{\epsilon}\exp({-{\epsilon}/{\Delta}})$ and from such expression one can evaluate the pressure $P$ of an ideal gas having volume $V$ and temperature $T$. Comparing such result with the equation of state of ideal gas $PV = K_B T$, one can identify $\Delta = K_B T$. In their chosen example in the section velocity distribution, Saha and Shrivastava indicated that in a closed economic system (where no migration of labour, no growth etc are considered) the money $m$ distribution of the agents of the system should have the similar form of the energy distribution function of ideal gas atoms or molecules. This is evident because in a closed economic system the money $M$ is conserved. Hence the money distribution should also satisfy the condition $f(m_1)f(m_2) = f(m_1+m_2)$. Like the collision (the energy exchange process) between the particles, the money exchange (due to any kind of trading) between the agents are also random. Therefore, one can expect the money distribution should be $f(m) \sim \exp(-m/\sigma)$, where $\sigma$ is constant. As in the economic system there is no quantity which is equivalent to the momentum vector of the gas particle, in this case the density of states is constant. Hence the number density of agents $P(m)$ having money $m$ should be $P(m) = C\exp(-m/\sigma)$. Here $C$ is another constant. Both $\sigma$ and $C$ can be evaluated using two conditions. One of the condition is $N = \int_{0}^{\infty} P(m)dm$, where $N$ is the total number of agents. There is another condition $M = \int_{0}^{\infty} mP(m)dm$. Calculating these two integrations one would get $C = 1/\sigma$ where $\sigma = M/N$, which is actually the average money per agent. Therefore instead of Maxwell-Bolzmann or Gamma distribution of energy in the ideal gas, the money distribution becomes an exponentially decaying function (like Gibbs distribution). Here most number of agents have zero money. For the students, Saha and Shrivastva left the task of making this exponential distribution more like Gamma distribution. \subsection{Data analysis of Income and Wealth distributions} Italian scientist Pareto, from his socioeconomic study in Europe~\cite{sudip_pareto} showed that the income distribution contains a power law tail ($f(x) \sim x^{-(1+{\alpha}_p)}$). Such an observation is often called Pareto's law ($\alpha_p$ the Pareto exponent). Later another economist Gibrat~\cite{sudip_gibrat} showed that the part of the income distribution which corresponds to the higher income range actually fits well with power law type function whereas the rest of the distribution can be characterized by the log-normal function $f(x) \sim \frac{1}{x\sqrt{2\pi {\sigma}^2}}\exp{- \frac{log^2(x/x_0)}{2{\sigma}^2}}$. From the analysis of Japanese personal income distribution data ranging from 1887 to 1908, Souma~\cite{souma_sudip} reported about the two type nature of income distribution. also indicated both Pareto index (${\alpha}_p$) and Gibrat index (${\beta}_g = 1/\sqrt{2{\sigma}^2}$) varies with time. Several physicists have been rigorously studied the financial data of many countries to capture the form of the income distribution. From the investigation of the Japanese income tax data of the year 1998, Aoyama et al.~\cite{aoyama_sudip} observed the power law decay of the income distribution. Dr\u{a}gulescu and Yakovenko analyzed the USA~\cite{druagulescu2001a_sudip} and UK~\cite{druagulescu2001b_sudip} income tax data. From the examinations of such data, they conjectured that the major part of the income distribution fits with the exponential function whereas in the higher income range the distribution follows power law decay. Dr\u{a}gulescu and Yakovenko explained the exponential nature of the income distribution in the basis of statistical mechanics~\cite{dragulescu2000_sudip}. They treated the closed economic system as a closed thermodynamic ideal gas system where the money in the economic system is equivalent to the energy in the idea gas system. They considered the financial transaction between any two agents is equivalent to the scattering between the two gas molecules or atoms in which they exchange energy. Like total energy of ideal gas system, the total money is also conserved in the closed economic system. Therefore the money distribution should follow the Gibbs distribution (exponential) if the density of state is constant. There are many suggestions on the shape of income distribution. Ferrero~\cite{ferrero_sudip} proposed that the income distribution follows Gamma distribution $f(x) \sim x^{n-1}\exp(-x/a)$, where $n$ and $a$ are the fitting parameters. Clementi~\cite{clementi_sudip} proposed $\kappa$ generalized function $f(x)=\frac{{\alpha}_0{\beta}_0x^{{\alpha}_0 - 1}exp_{\kappa}(-{\beta}_0x^{{\alpha}_0})}{\sqrt{1+{\kappa}^2{{\beta}_0}^2 x^{2{\alpha}_0}}}$ for the income distribution. Here $\kappa$ is the deformation parameter and ${\alpha}_0$, ${\beta}_0$ are fitting parameters. Using $\kappa$ generalized function, they found good data fit with USA income data. In their analysis the low income part of the distribution is exponential, which is retrieved by taking the limit $\kappa \to 0$. The low income part is actually corresponds to the low energy regime of the physical system, where one can treat such system non-relativistically. As a result of that the nature of the income distribution in the low income part is exponential. On the other hand the high income part is associated with the physical system in high energy scale. Therefore the physical system should be treated relativistically and one could not expect exponential distribution in the high income regime. The Pareto's law can be obtained by taking the limit $x \to \infty$ with $\kappa \ne 0$. Analyzing the 1996 Forbes magazine data Levy and Solomon~\cite{levy_sudip} found the existence of Pareto's law in the wealth distribution. The Forbes$^{[1]}$ \footnotetext[1]{Forbes magazine annually published the lists of the top 400 rich people of USA. The electronic data is available in www.forbes.com/lists.} magazine data from year 1988 to 2003 was investigated by Klass et al.~\cite{klass_sudip}. They ordered rich Americans according to their wealth where the wealth of the $r$-th person is $w_r$. They found a power law $w_r \sim r^{-(1/\alpha_p)}$, where the Pareto exponent $\alpha_p \simeq 1.43$. The exponent $\gamma$ is called Zipf exponent. The existence of power law in the wealth distribution of India was reported by Sinha~\cite{sinha_sudip}. From the analysis of Internal Revenue Service data of USA, Silva and Yakovenko~\cite{silva_sudip} studied the time evolution of the income distribution. They found that the form of the income distribution qualitatively remains similar throughout the entire period of the observation. Most interestingly the nature of the time evolutions of the lower and the upper parts of the income distribution are different. The lower income part of the distribution for all the years can be fitted with a single exponential curve, which actually indicates the thermal equilibrium in this part of the income distribution. On the other hand Silva and Yakovenko noticed that the power law tail in high income regime evolves significantly with time. They found the Pareto's exponent ${\alpha}_p$ changes from $2.8$ to $2.4$ during the year 1983-2003 (see also~\cite{gupta2006_sudip,sinha_sudip,saif2007_sudip,saif2009_sudip}). In this context of Pareto law see, however, Neda et al.~\cite{neda2019-sudip} for a recent review and extensive analysis of income inequality data. \subsection{Models of the Income and Wealth distributions} There are several attempts have been made to model the observed universal income or wealth distributions of various countries. Physicists try to make models which can highlight the basic mechanism behind the formation of such universal income or wealth distribution in the society. Their another motivation is to explain the global economic inequality using the elementary ideas of physics. There are few works on the modeling of wealth distribution based on generalized Lotka-Volterra model (e.g.,~\cite{richmond_sudip,solomon_sudip}). Following the model, the time evolution equation of $m_{i,t}$ can be written as \begin{equation}\label{LV} m_{i,t+1} = (1+\xi_t)m_{i,t} + \frac{a}{N}\sum m_{j,t} - c\sum m_{i,t}m_{j,t}, \end{equation} where $m_{i,t}$ is the money of the $i$-th agent at time $t$. Here $N$ is the total number of agents and $a$, $c$ are two parameters. The variance of the distribution of random number $\xi_t$ (always positive) is $V$. Due to the presence of the second term in the right hand side of the equation~(\ref{LV}), the money of any agent should not go to zero at any instant of time. Such term may be considered as the effect of some kind of social security policy. The overall growth of the total money is controlled by the the parameter $c$. Since the total money of the system can change with time, the equation~\ref{LV} does not have any stationary solution. The relative money of an agent can be defined as $x_{i,t}=m_{i,t}/\langle m_t \rangle$, here $\langle m_t \rangle$ is the average money per agent at any instant of time $t$. The $x_{i,t}$ becomes independent of time if the ratio $a/V$ is constant. As a result of that, even in a non-stationary system, after some amount of time, one can eventually get a time invariant relative money distribution. In mean field approximation the distribution function $f(x)$ has the following form \begin{equation} \label{lotka} f(x)=\frac{exp[-(\nu - 1)/x]}{x^{1+\nu}}. \end{equation} Here $\nu$ (positive exponent) is the ratio of $a$ and $V$. For large value of $x$, the form of equation~(\ref{lotka}) eventually becomes power-law-like. Bouchaud and M\'{e}zard~\cite{bouchaud2000_sudip} proposed a generalized model for the growth and redistribution of wealth. Their model (BM) able to reproduce the Pareto law. They used the physics of directed polymers in economical framework. In the BM model, the dynamics of the wealth $w_i$ of the $i$-th is governed by the set of stochastic equation, \begin{equation} \frac{dw_i(t)}{dt} = {\eta}_i(t)w_i(t) + \sum_{j \ne i}J_{ij}w_j(t) - \sum_{j \ne i}J_{ji}w_i(t) \nonumber \end{equation} Here ${\eta}_i(t)$ follows a Gaussian distribution which has mean $\mu$ and variance $2{\sigma}^2$. The Gaussian multiplicative process simulates the investment dynamics. The $J_{ij}$ is the linear exchange rate of between $i$-th and $j$-th agents. Employing Fokker-Planck equation under mean field approximation, one can obtain a stationary solution of the distribution function $P(\overline{w})$, where $\overline{w} = \sum_{i} w_i/N$ is the mean wealth. Here $N$ is the total number of agents. The form of the $P(\overline{w})$ is given by \begin{equation} P(\overline{w}) = A\frac{\exp[(1-\nu)/\overline{w}]}{{\overline{w}}^{1+\nu}}, \nonumber \end{equation} where $A = (1-\nu)^{\nu}/{\Gamma(\nu)}$ and $\nu = 1 + J/{\sigma}^2$. For large value of $\overline{w}$, the $P(\overline{w})$ decays in a power law with exponent $\nu$. The BM model indicates about the two phases, in one phase only a few number of agents hold the entire amount of wealth. Such phase appears when $\nu < 1$. In the another phase the wealth is distributed among the finite number of agents. Under mean field approximation the agents in BM model exchange the same percentage of wealth they have. That means a relatively poor agent receives an unrealistic amount of wealth from the rich agent. In the field approximation, the wealth of the individual agents asymptotically converges to the mean wealth $\overline{w}$. That means after long time, all the agents have same amount of wealth, which is again an unrealistic situation. To introduce economic inequality, Scafetta et al.~\cite{scafetta2004_sudip} modulate the investment term of BM model. Garlaschelli and Loffredo~\cite{garlaschelli2008_sudip} accounted BM model in different types of networks. \begin{figure}[ht] \begin{center} \fbox{\includegraphics[width=8.0cm]{cc1.pdf} \vline\includegraphics[width=7.8cm]{cc2.pdf}} \end{center} \caption{The Fortran code for simulating the dynamics of CC model.} \label{cc_code} \end{figure} \begin{figure}[ht] \begin{center} \includegraphics[width=10cm]{cc_model.pdf} \end{center} \caption{The money distribution $P(m)$ for different values of saving propensity factor $\lambda = 0, 0.1, 0.5, 0.9$. Here the number of agents $N = 100$.} \label{cc_pdf} \end{figure} Employing kinetic theory, physicists built models which can reproduce the income or wealth distribution of the society. Chakraborti and Chakrabarti~\cite{chakraborti_sudip} proposed a generalized model (CC model) of income distribution. In their proposed money exchange dynamics, during the economic transaction the participating agents (two people) always keep some fraction of their money and the sum of their remaining money is distributed randomly among them. The dynamical equations of CC model are given by \begin{eqnarray} \label{cc_exchange} m_i(t+1) = \lambda m_i(t) + {\epsilon}_{ij}[(1 - \lambda)(m_i(t) + m_j(t))] \nonumber \\ m_j(t+1) = \lambda m_j(t) + (1 - {\epsilon}_{ij})[(1 - \lambda)(m_i(t) + m_j(t))]. \end{eqnarray} Here $\lambda$ is the saving propensity and ${\epsilon}_{ij}$ is random fraction. Both $\lambda$ and ${\epsilon}_{ij}$ are ranging from zero to unity. One can simulate the dynamics of CC model using the Fortran code given in the Fig.~\ref{cc_code}. The money distribution $P(m)$ for different values of $\lambda$ are shown in the Fig.~\ref{cc_pdf}. For any non-zero value of $\lambda$ the most probable position of the $P(m)$ will be located at the non-zero value of the money. For zero value of $\lambda$ the distribution is essentially exponential whereas for non-zero value of $\lambda$ the $P(m)$ fits approximately to a Gamma function. Patriarca and Chakraborti~\cite{patriarca_sudip} numerically evaluated the mathematical form of the $P(m)$ which is given by \begin{eqnarray} \label{cc_exchange} P(m) = \frac{1}{\Gamma (n)}\Big(\frac{n}{\langle m \rangle}\Big)^n m^{n-1} \exp\Big(-\frac{mn}{\langle m \rangle}\Big), \nonumber \\ n(\lambda) = 1+\frac{3\lambda}{1 - \lambda }.\nonumber \end{eqnarray} We can see in the limit $\lambda \to 1$, the distribution function becomes sharply peaked about some non-zero value of money, which indicates the money is uniformly distributed among the agents. Almost simultaneous to the CC model, Dr\u{a}gulescu and Yakovenko~\cite{dragulescu2000_sudip} proposed another model (DY model), in which they mapped the two body collision process (exchange energy in the collision) into the economic system, where in each financial transaction (equivalent to collision) between two agents, they exchange money (equivalent to energy). The stochastic equations of money exchange DY model are given by, \begin{eqnarray} \label{money_exchange} m_i(t+1) = m_i(t) - \Delta m \nonumber \\ m_j(t+1) = m_j(t) + \Delta m, \end{eqnarray} where at time $t$ the $i$-th agent contains $m_i(t)$ amount of money. The financial transaction is only allowed if both $m_i(t)$ and $m_j(t)$ are greater than zero. Here $\Delta m$ is the random fraction of the average money of the two participating agents. There is no provision of saving propensity in the DY model, which is the fundamental difference with the CC model. Using the dynamical money exchange equation of DY model, one will get a exponential money distribution, which appears as a special case $\lambda = 0$ in the CC model. Therefore one would get an equivalent dynamics of DY model by putting $\lambda = 0$ in the CC model. \begin{figure}[ht] \begin{center} \includegraphics[width=10cm]{ccm_model.pdf} \end{center} \caption{For uniformly distributed saving propensity factor $\lambda$, the money distribution $P(m)$ contains a power law tail which goes as $m^{-2}$. Here the number of agents $N = 1000$.} \label{ccm_pdf} \end{figure} Although we observe power law tail in the income distributions of various countries, both CC and DY models fail to generate such power law tail by using their proposed dynamical rules. We find in the CC model, the value of $\lambda$ is same for every agent but in realistic situation the saving propensity should vary from agent to agent. Chatterjee et al.~\cite{chatterjee2004_sudip} discussed the CC model in more general way. Instead of constant value of saving propensity, they consider $\lambda$ is distributed among the agents. Therefore the modified dynamical equations of their model (CCM model) can be written as \begin{eqnarray} \label{ccm_exchange} m_i(t+1) = \lambda_i m_i(t) + {\epsilon}_{ij}[(1 - \lambda_i)m_i(t) + (1 - \lambda_j)m_j(t))] \nonumber \\ m_j(t+1) = \lambda_j m_j(t) + (1 - {\epsilon}_{ij})[(1 - \lambda_i)m_i(t) + (1 - \lambda_j)m_j(t))]. \end{eqnarray} The values of the saving propensities of $i$-th and $j$-th agents are $\lambda_i$ and $\lambda_j$ respectively and they are in general different. Employing the dynamical equations~(\ref{ccm_exchange}), Chatterjee et al.~\cite{chatterjee2004_sudip} numerically found a money distribution which contains a power tail. Such power law tail actually reveals the Pareto law. The existence of the power law tail is robust to the type of the distribution function $\rho(\lambda)$ of saving propensities but the power law exponent depends on the nature of the $\rho(\lambda)$. In fact for the distribution function $\rho(\lambda) \sim |{\lambda}_0 - \lambda|^{{\alpha}_{\lambda}}$, the Pareto exponent value becomes unity for all values for $\alpha_\lambda (\ne 0)$. For uniformly distributed $\lambda$, the money distribution decays as $P(m) \sim m^{-2}$. The money distribution for system size $N = 1000$ is shown in Fig.~\ref{ccm_pdf}, here the relaxation time is of order of $10^6$. Chatterjee et al.~\cite{chatterjee2004_sudip} reported another important result regarding the fluctuation in money of individual agent. They showed that in case of CC model the fluctuation in the money of individual agent increases with the decrease in the value of $\lambda$ whereas in case of CCM model exactly opposite trend is observed. Patriarca et al.~\cite{patriarca2007_sudip} investigated the relaxation behavior of income or wealth distribution. They found the equilibrium time is proportional to the number of agents. They also noticed that for a given value of $\lambda$, the equilibrium time ${\tau}_{\lambda} \sim 1/(1 - {\lambda})$. Chakraborty and Manna~\cite{chakraborty2010_sudip} found a distribution with power law tail by using the dynamics of CC model and their power law exponent is similar with the result obtained in the CCM model. In contrast to the CC model, Chakraborty and Manna~\cite{chakraborty2010_sudip} considered the probability of an agent in participating in a financial transaction is proportional to the positive power of his/her money. That means they evoked a dynamics where the richer class of people essentially get more opportunity in trading rather than the low-income people. Reduction of the Cobb-Douglas utilization maximization principle to the CC model of exchange dynamics form was shown by Chakrabarti and Chakrabarti~\cite{chakrabarti2009_bkc} (see also~\cite{huli_bkc} for a recent discussion). Heinsalu and Patriarca~\cite{heinsalu2014kinetic_sudip} introduced another gas like model of income or wealth distribution. Their model is often called immediate exchange (IE) model. Their proposed dynamical equations of exchanging money between $j$-th and $k$-th agents are given by \begin{eqnarray}\label{IE_model} m'_j = (1 - {\epsilon}_j) m_j + {\epsilon}_k m_k \nonumber \\ m'_k = (1 - {\epsilon}_k) m_k + {\epsilon}_j m_j~~, \end{eqnarray} where $m$ and $m'$ are the money of any agent before and after the exchange respectively. Here ${\epsilon}_j)$ and ${\epsilon}_k)$ are two random numbers, uniformly distributed in $(0,1)$. Heinsalu and Patriarca~\cite{heinsalu2014kinetic_sudip} numerically found the equilibrium money distribution $f_{{\alpha}_{s}}(m)$ has the shape of $\Gamma$-function. \begin{eqnarray} \label{IE} f_{{\alpha}_{s}}(m) = \frac{{{\alpha}_{s}}^{{\alpha}_{s}}m^{{\alpha}_{s} - 1}}{\Gamma({{\alpha}_{s}})} \exp(- {\alpha}_{s} m)~. \end{eqnarray} Here the shape parameter ${\alpha}_{s} = 2$. Heinsalu and Patriarca~\cite{heinsalu2014kinetic_sudip} assert that for small values of wealth, the distribution function obtained from IE model matches better with the real data than the earlier models. Along with new dynamics, they introduced an acceptance criterion of trading for the agents. The acceptance probability of $j$-th agent for making transaction with the $k$-th agent is a function of ${\Delta}m_{jk}(={\epsilon}_k m_k - {\epsilon}_j m_j)$. Moreover, the equilibrium money distribution does not affected by the introduction of acceptance criterion. There are few analytical works on the IE model. Katriel~\cite{katriel2014immediate_sudip} performed analytical investigations on the IE model. He analytically showed the equilibrium money distribution of IE model converges to $\Gamma$-function in infinite population limit. Lanchier and Reed~\cite{lanchier2018_sudip} realized the IE model on connected graph, where agents are located at the vertex set of the graph and they can interact only with their neighbors. Lanchier and Reed~\cite{lanchier2018_sudip} analytically proved the conjectures made by Heinsalu and Patriarca~\cite{heinsalu2014kinetic_sudip}. \begin{figure}[h] \begin{center} \includegraphics[width=5.9cm]{mf_order1.pdf} \includegraphics[width=5.9cm]{1d1_order.pdf} \includegraphics[width=5.9cm]{2dorder1.pdf} \end{center} \caption{(a) The numerical data of the variation of $O$ with the threshold money $\theta$ (in the mean field case), where $O$ is the number of agents having money below the threshold money $\theta$ in the equilibrium state. The top inset shows that for $\theta = 0.59$, $O \to 0$ when $N \to \infty$. The bottom inset shows the power law fit of the numerical data of $O$ against $(\theta - {\theta}_c)$, which gives $\beta \simeq 0.91$, where $O \sim (\theta - {\theta}_c)^{\beta}$. Here the number of agents $N = 10^5$. (b) The variation of $O$ with the threshold money $\theta$ in one dimension. Inset shows the power law fit of the numerical data of $O$ against $(\theta - {\theta}_c)$. Such scaling fit gives $\beta \simeq 0.41$. Here the number of agent $N = 10^4$ (c) The variation of $O$ with the threshold money $\theta$ in two dimension. Inset shows the power law fit of the numerical data of $O$ against $(\theta - {\theta}_c)$. Such scaling fit gives $\beta \simeq 0.67$. The dimension of the lattice is $1000 \times 1000$.} \label{OP_fig} \end{figure} \subsection{A Kinetic Exchange Model with self-organized poverty-line} Along with the modeling of the observed income or wealth data, there are few attempts made on illustrating intriguing models which indicate the potential way of reducing economic inequality in the society. Pianegonda et al.~\cite{pianegonda2003_sudip} proposed conservative exchange market (CEM) model where a group of agents is realized in one dimensional lattice. According to their proposed dynamics, in each transaction one of the participating agent is necessarily the poorest agent of the group. Due to the transaction the poorest agent may gain (or lose) some amount of wealth. Such amount of wealth is equally deducted (or distributed) from the two nearest neighbors of the poorest agent. In the mean field version of the model (globally coupled), such deduction (or addition) of wealth is done from two randomly chosen agents. Considering the nearest neighbors interactions, they found a wealth distribution in which almost all agents are beyond a certain threshold ${\eta}_T$. Their numerical results indicated the value of ${\eta}_T \approx 0.4$ where in the initial configuration the wealth is a random number between $0$ to $1$, distributed uniformly among the agents. In the mean field case the value of ${\eta}_T \approx 0.2$. They noticed the probability of an agent becoming wealthier decreases with time and finally it converges to a value $\approx 0.76$. Pianegonda et al.~\cite{pianegonda2003_sudip} observed the fraction of rich agents is independent of the size of the market. The CEM model reveals an exponential distribution (beyond ${\eta}_T$) in case of nearest neighbors interactions whereas such distribution has almost linear form in the mean field limit. Iglesias~\cite{iglesias2010_sudip} simulated the dynamics of the CEM model through inclusion of several types of taxes. He considered a situation where the amount of wealth gain (or lose) by the poorest agent is equally collected from the all agents. Such kind of deduction of wealth can be treated as an implementation of tax (uniform for every agent) in the society for the development of the poor class of the people. The distribution obtained by imposing such global-uniform tax is similar with the distribution acquired in case of the mean field version of the CEM model but in this case the value of ${\eta}_T \approx 0.25$. It should be noted that in case of mean field CEM model the value of Gini coefficient $g \approx 0.1$ whereas such value becomes $g \approx 0.2$ for the wealth distribution extracted from the global-uniform tax version of CEM model. Iglesias~\cite{iglesias2010_sudip} also introduced proportional tax in the CEM model. In this case the deduction of wealth is not uniform for all the agents rather it is proportional to the wealth of the agents. Iglesias~\cite{iglesias2010_sudip} also simulated the effect of the proportional tax when it is deducted locally (i.e., from the neighbors). In the local case of the proportional tax he considered four neighbors and he got ${\eta}_T \approx 0.4$ whereas such value for the global case is approximately $0.32$. The value of the Gini coefficient is nearly $0.1$ for the wealth distribution (exponential in nature) obtained considering the local-proportional tax which is similar to the value of $g$ in the original local version of the CEM model. In case of global-proportional tax, the nature of the wealth distribution is power law and the value of $g \approx 0.16$. Ghosh et al.~\cite{ghosh2011_sudip} proposed gas-like model which shows an effective way of improving the financial condition of poor people. In their model they initially set an threshold $\theta$ value of money or wealth. Like the CEM model, in each interaction one of the agent must have the money below the $\theta$ and the other $j$-th agent is randomly selected (mean field case) from the rest of the agents. The dynamical equation of money exchange are given by \begin{eqnarray}\label{Ghosh_model} m'_i = {\epsilon}({m_i}^{<} + m_j) \nonumber \\ m'_j = (1 - {\epsilon})({m_i}^{<} + m_j)~~. \end{eqnarray} Here ${m_i}^{<} < \theta$, the money of the $i$-th agent before the interaction whereas $m'_i$ is the money after the interaction. The ${\epsilon}$ is a random number between $0$ to $1$. Each financial transaction is considered as unit time $t$. The dynamical exchange of money continues until the money of the all agents cross the threshold or poverty line $\theta$. After sufficiently long time $t > \tau$ (relaxation time) one will get a steady state distribution, in which a small perturbation cannot affect the distribution. Such perturbation is implemented by forcibly bringing down a agent below the level $\theta$ and to ensure the money conservation his/her money is given to anyone else. Addition of such perturbation cannot alter the relevant results obtained in the steady state. The equilibrium money distribution is independent of the initial states of agents which essentially reflects the ergodicity of the system. Ghosh et al.~\cite{ghosh2011_sudip} computed $O$, the average number of agents below the threshold $\theta$, which is certainly zero in steady state up to a critical value of the threshold ${\theta}_c$. That means for $\theta > {\theta}_c$ one will never get a distribution where $O$ is zero (see Fig.~\ref{OP_fig}). Interestingly the relaxation time $\tau$ divergences at $\theta = {\theta}_c$. These outcomes essentially indicate a phase transition in the system, where $O$ is the order parameter. In the mean field case the of ${\theta}_c \sim 0.6$ and values of the critical exponents are $\beta = 0.97 \pm 0.01$, $z = 0.83 \pm 0.01$ and $\delta = 0.93 \pm 0.01$. These exponents $\beta$, $z$ and $\delta$ are obtained from the power fit of $O \sim (\theta - {\theta}_c)^{\beta}$, $\tau \sim (\theta - {\theta}_c)^z$ and $O(t) \sim t^{-\delta}$ respectively. Ghosh et al.~\cite{ghosh2011_sudip} studied their model in one dimension. In this case during a financial transaction one of the agent contains money ${m_i}^{<} < \theta$. The other agent is randomly selected from the two nearest neighbors (which can contain any money whatsoever) of the $i$-th agent. The variation of $O$ in the one dimension is shown in the Fig.~\ref{OP_fig}. The value of ${\theta}_c = 0.810 \pm 0.0001$ and the obtained values of critical exponents are $\beta = 0.41 \pm 0.02$, $z = 0.810 \pm 0.0001$ and $\delta = 0.19 \pm 0.01$. Ghosh et al.~\cite{ghosh2011_sudip} also simulated the model in two dimension where again in a financial transaction one of the agent has money ${m_i}^{<} < \theta$ and the other agent is one of the four nearest neighbors of the $i$-th agent. The nearest neighbors can have any money whatsoever. The values of the critical point and exponents are ${\theta}_c = 0.675 \pm 0.0005$, $\beta = 0.67 \pm 0.01$, $z = 1.2 \pm 0.01$ and $\delta = 0.43 \pm 0.02$. In should be mentioned that except the value of $z$, the values of $\beta$ and $\delta$ in mean field, one dimension and two dimensional cases are very close to the values of these exponents in the Manna model~\cite{lubeck2004_sudip,manna1991_sudip,manna1991two_sudip} in the respective dimensions. Ghosh et al.~\cite{ghosh2011_sudip} commented that the mismatch in the values of $z$ may arise due to the limitation in the system size and they conjectured that their model might belong to the Manna universality class. \subsection{The Yard-Sale Model and effects of taxes} Another kinetic exchange model considered had been (see Chakraborti~\cite{chak_2002_sudip}) that \begin{eqnarray}\label{chak_model} m_i(t+1) &=& m_i(t) - m_j(t) + {\epsilon}(2m_j(t)) \nonumber \\ m'_j(t+1) &=& (1 - {\epsilon})(2m_j(t)) \nonumber \end{eqnarray} when $m_i(t) \geq m_j(t)$. In many economic transactions this may be a natural feature, particularly for Yard-Sale model and hence the name. Here, the wealthier agent saves exactly the excess amount and trading takes place with double the poorer agent's money or wealth. The attractive and stable fixed point for the dynamic corresponds to wealth condensation in the land of one agent. This is obvious, as $m_j(t)$ at any $t$ becomes zero, the agent gets isolated from any further trade and this continues for all others until one agent grabs all! This absolute level of condensation or inequality in the model made it unrealistic$^{[1]}$\footnotetext[1]{The model was studied by the group members in Saha Institute of Nuclear Physics during 2000-2005 and income/wealth condensation phenomenon was taken initially as a signature of the absurdity of the model and the study was temporarily abandoned. Later, however, some interesting slow dynamical behavior of the model was observed~~\cite{chak_2002_sudip}. It was also noted that a `mixed kinetic exchange strategy' (see e.g., Pradhan~\cite{pradhan2005random_sudip}) can destabilize the condensation (with Gini coefficient $g = 1$) and can lead to some extreme but realistic distributions, having $g \lesssim 1$.}. However, as discussed in the footnote, several strategies could save the model from such condensation with extreme inequality ($g = 1$), and one suggested recently~\cite{bruce_2019_sudip} to impose the natural tax collection by government, eventually to redistribute it among all the agents in the form of public goods and services, e.g., road construction etc, is extremely successful and gives very good fit to the data. \section{Kolkata Paise Restaurant Problem} The city Kolkata was once the capital of India and till date continues to be one of the oldest trading centre of this country. This old city has attracted large number of labors migrating from all parts of India. A century has passed since this city lost its preeminent position, but the migrant inflow has made Kolkata highly populated till date. Most of the migrants belongs to unorganized labor class, generally lacking secure wages even without fixed working hours. Sometime in Kolkata, there used to be an array of cheap restaurants at road side, namely `Paise Hotels': Paise is the smallest Indian currency. Everyday, each of those restaurant would prepare limited number of dishes, that costs very low (at rate of basic cost of cooking). And this cost matches well with the affordability of those labors. Budget is also not a constraint while choosing any restaurant. Thus the Paise hotels become much popular among the poor labors during their lunch hour. Everyday without discussing with others, they themselves would choose some restaurant for lunch that day. During lunch hour, they would walk down the street and visit his chosen restaurant for lunch. And, only one choice can be afforded per agent per day due to strict lunch hour. For simplicity, we assume that only one dish would get prepared by each of those restaurants. If some day, only one labor arrives at some restaurant during lunch hour, he will be served the only dish prepared there. And he would go back to work happily. Problem arises if more than one people visit any one restaurant for lunch. Then the restaurant would choose one of them randomly and he gets the lunch. Others arrived there would miss their lunch for that day and report back to work staying hungry for rest of the working hour. Nobody would like to starve. Choosing restaurants intelligently could guarantee lunch for every labor that day. But how to choose in that way makes this problem interesting. So every day, these labors face a decision making problem. They do not discuss with peers while making his choice. Only information they have is the crowd distribution of every restaurants for some finite number of past days. End of the day, no one would like to continue work skipping lunch. Ideal case would be: if every labor arrives at a restaurant where nobody else visit for that day to assure his lunch. The maximum possible social utilization fraction is $1.0$ (assuming number of restaurants is same as number of labors), meaning no dish gets waste that day. One simple solution is: a central coordinator would ask the labors to form a queue and assign one of the restaurant to the first one in queue. Rest would follow him since then. Thus full social utilization is achieved and that too from first day. This solution is even valid if the restaurants are ranked (may be because of quality of service or taste of dish prepared there) which is commonly agreed upon by all labors though the cost of dish remain the same as previous. But presence of a dictator is not always practical. Say in a democratic society, each individual will have his own choice and would hardly like to compromise by listening to some dictator. Rather one would prefer to choose a restaurant on his own. So how any labor would choose some restaurant without knowing the choice of others for that day, may be e.g. choosing randomly per day or evolving some strategy to improve social utilization fraction over time. The objective is to find some strategy following which maximum social utilization can be achieved. For that one needs to study the steady state dynamics of the strategy undertaken. Memory is limited and the labors only have last few days crowd distribution at every restaurant. And mutual interaction among some subset of labors i.e. grouping or some kind of fixing is not allowed. Here we discuss Kolkata Paise Restaurant (KPR) problem as a repeated many-player many-choice game problem as introduced by Chakrabarti in \cite{chakrabarti2007kolkata}: there are $\nu N$ agents choosing among $N$ restaurants (however we will consider $\nu$ = 1) for lunch every day. Agents do not interact with others while making his decision any day. Information regarding last day's restaurant fill up statistics is available publicly. With this, agents choose and visit the chosen restaurant during lunch hour. Dish is guaranteed only if a restaurant is visited by some agent alone that day. Any day if some restaurant is visited by more than one agents then only one of them gets the food and others return remaining hungry for that day. But, lunch hour is strict. Visiting another restaurant would delay to return back to work and hence only one choice can be made per day per agent. End of the day, the social utilization fraction (number of restaurants visited by at least one agent by total number of restaurant) will be calculated. Maximum possible social utilization fraction is unity. This is when every agent is able get lunch at some restaurant, and no dish gets wasted that day. The dictatorial solution, as discussed in previous para, though works well though we will encourage the readers to evolve some strategy following which those agents will learn to make decision their own and also social utilization fraction can be maximized as much as possible. Below we discuss few interesting strategies along with their results developed by several econophysics researchers. \subsection{Learning Strategies} Here we will study the dynamics of Kolkata Paise Restaurant game problem following several strategies proposed in \cite{chakrabarti2009kolkata,ghosh2010statistics,martin2019}. They are: No Learning (NL), Limited Learning (LL), One Period Repetition (OPR), Crowd Avoiding strategy (CA), Stochastic Crowd Avoiding strategy (SCA). Among them No Learning strategy is considered to be the base strategy throughout, often compared with other mentioned strategy. \subsubsection{\textbf{No Learning (NL)}} In this strategy, $\nu N$ agents randomly chooses among $N$ restaurants. We consider no past history i.e. memory. For simpilicity, restaurant occupying density $\nu$ is considered to be $1$ throughout study. The probability of choosing a restaurant by $n < N$ agents is: \begin{equation}\label{ekpr_1} \tilde{P}(n) = \binom{\nu N}{n} {p}^{n} {(1-p)}^{\nu N - n} \end{equation} The restaurants being equi-probable, the probability of choosing one restaurant among $N$ is $p = \frac{1}{N}$ and for $N\to\infty$ one gets (using Poisson Limit theorem): \begin{equation}\label{ekpr_2} \tilde{P}(n) = \frac{\nu^n }{n!} exp(-\nu) \end{equation} So, fraction of restaurants not chosen by any agent is $\tilde{P}(n=0)=exp(-\nu)$, and this gives the average fraction of restaurants chosen by at least one agent on that day $\bar{f}$ is $1-exp(-\nu)\simeq 0.63$. This we will consider as the base strategy and will compare with remaining cases for improvement in $f$. Results Following No Learning strategy given in Fig.~\ref{nl_op} can be obtained using program given in Fig.~\ref{nl_code}. \begin{figure}[h] \begin{center} \fbox{\includegraphics[width=6.0cm]{nl.pdf}} \end{center} \caption{Python (version $2.7$) program for No Learning strategy. Results (see Fig.~\ref{nl_op}) can be obtained if one runs this program. } \label{nl_code} \end{figure} \begin{figure}[h] \begin{center} \includegraphics[width=8.0cm]{NL_as.pdf} \end{center} \caption{Plot of social utilization fraction ($f$) in magenta color vs. days ($t$) following No Learning (NL) strategy. Average utilization fraction $\bar{f}(\simeq 0.63)$ over 100 days is shown in black color straight line.} \label{nl_op} \end{figure} \subsubsection{\textbf{Limited Learning (LL)}} On first day, agents will randomly choose some restaurant similar to No Learning strategy with $f=0.63$. Next day onwards, they will make individual choice depending upon their last day lunch availability: below we discuss the LL(1) inspired strategy proposed in \cite{chakrabarti2009kolkata}. If an agent gets lunch from some restaurant on $t$-th day, then he opts for the best restaurant on day $t+1$. If he did not get lunch on any $t$-th day, then next day $t+1$ he randomly choose one among the other $(N-1)$ restaurant with equal probability. Say $x_t$ fraction of agents or rather $f_tN$ number of agents ($f_t$ is utilization fraction at $t$-th day) on getting their lunch on some day $t$ will visit the best restaurant (restaurant 1), and only one of them will get lunch there and others will not get their lunch for that day. Remaining ($N-f_tN$) agents will try from the remaining $(N-1)$ restaurant following no learning case. And the recursion relation will be: \begin{equation}\label{ekpr_3} f_{t+1} = \frac{1}{x_t} + (1-exp(-\nu_t)); \nu_t = 1 - f_t \end{equation} The first term of the summand will contribute 0 as $N\to\infty$, and one gets the steady state utilization fraction $f \simeq 0.43$. This also matches well with numerical simulation result as reported in~\cite{chakrabarti2009kolkata}. \subsubsection{\textbf{One Period Repetition (OPR)}} On first day say $t-1$, agents will randomly choose a restaurant following NL strategy. If an agent gets his lunch on day $t-1$ from some restaurant, he will revisit there on day $t$. This is one period repeat. If some agent got his lunch from same restaurant for two consecutive days $t-1$ and $t$, then he will compete for the best restaurant (ranking of restaurant is agreed upon by all agents) on day $t+1$. For any day $t$ if an agent fails to get lunch, next day $t+1$ he will randomly choose one among restaurants which remained vacant yesterday. Here the fraction $f_t$ (representing social utilization at day $t$) is made of two parts: $x_{t-1}$ fraction of agents who will continue their lunch at last day chosen restaurant, and rest of the fraction $x_t$ who have chosen today: \begin{equation}\label{ekpr_4} f_t = x_{t-1} + [1-x_{t-1}](1-exp(-1)) \end{equation} The fraction $x_t$ of agents who have chosen today is given by NL strategy where $N(1-x_{t-1})$ left out agents finds one out of $N(1-x_{t-1})$ yesterday's vacant restaurants, so ${\nu}_t = 1$. \\On next day, the fraction $f_{t+1}$ will be: \begin{equation}\label{ekpr_5} f_{t+1} = \frac{1}{x_{t-1}} + x_t + (1-x_{t-1}-x_t) (1-exp(-1)) \end{equation} fraction $\frac{1}{x_{t-1}}$ would be very small and gets ignored, and replacing $x_t$ with $(1-x_{t-1})[1-exp(-1)]$ one gets, \begin{equation}\label{ekpr_6} f_{t+1} = [1-x_{t-1}](1-exp(-1)) + [1-x_{t-1}-(1-x_{t-1})(1-exp(-1))](1-exp(-1)) \end{equation} At stable state convergence, $f_{t-1}$ = $f_t$ = $f_{t+1}$ = $f$ and $x_{t-1}$ = $x_t$ = $x_{t+1}$, so dropping the subscript $t$ and equating $f_t$ = $f_{t+1}$ one calculates $x$ to be 0.19 and $f$ = 0.71. So this strategy is an improvement over NL case, though an agent after getting lunch at some restaurant $k$ revisits there the very next day with probability 1. The fluctuations in the social utilization fraction is found to be Gaussian in the simulation results reported by \cite{chakrabarti2009kolkata}. \subsubsection{\textbf{Crowd Avoiding strategy (CA)}} As the name suggests, agents following this strategy will randomly choose some restaurant on day $t$ where nobody had visited last day i.e. day($t-1$). We provide a sample program in Fig.~\ref{ca_op} to calculate the steady state utilization fraction $f$ following Crowd Avoiding strategy. Computer simulation results the distribution of social utilization fraction $f$ to be Gaussian with peak around 0.46. It can be understood following way: as the fraction of restaurants filled last day will strictly get avoided by agents today, so the number of available restaurants today is $N(1-f)$ which will be chosen randomly by all agents. With $\nu = \frac{1}{1-f}$, the recursion relation becomes: \begin{equation}\label{ekpr_7} f = (1-f)[1-exp(-\frac{1}{1-f})] \end{equation} \begin{figure}[h] \begin{center} \fbox{\includegraphics[width=6.9cm]{ca.pdf}} \end{center} \caption{Python (version $2.7$) program for Crowd Avoiding strategy. Results (see Fig.~\ref{ca_op}) can be plotted if one runs this program.} \label{ca_code} \end{figure} Solving above equation, we get $f$ = 0.46, which fits well along the simulation result (Fig.~\ref{ca_op}). \begin{figure}[h] \begin{center} \includegraphics[width=8.5cm]{CA_as.pdf} \end{center} \caption{Plot of social utilization fraction ($f$) in magenta color vs. days ($t$) following Crowd Avoiding strategy. Average utilization fraction $\bar{f}(\simeq 0.46)$ over 100 days is shown in black color straight line.} \label{ca_op} \end{figure} \subsubsection{\textbf{Stochastic Crowd Avoiding strategy (SCA)}} We consider the strategy be following: if an agent arrives at restaurant $j$ for getting his lunch on day ($t$-1), then next day (i.e. day $t$) probability of visiting back to the same restaurant for that agent to have his lunch will depend on how crowded was the last day's restaurant. So, probability of visiting restaurant $j$ on day $t$ is $p_j(t)$=$\frac{1}{n_j(t-1)}$. And the probability of visiting any other restaurant $j^{'}(\neq j)$ goes as $p_{j^{'}}(t)$=$\frac{(1-p_j(t))}{(N-1)}$. Both the numerical and analytical results of average utilization fraction $\bar{f}$ following this strategy is found to be $0.8$. The distribution is Gaussian with peak around $f\simeq 0.8$~\cite{chakrabarti2009kolkata}. The approximate estimation for the steady state behavior of $f$ following the above strategy can be made as: Suppose $a_i$ denotes the fraction of restaurants having exactly $i$ number of agents ($i$ = $0,1,...N$) arrived on day $t$. And also assume that $a_i$ = 0 for $i \geq$ 3 for large $t$ as the dynamics gets stabilized in steady state. Thus, $a_0+a_1+a_2$ = 1, $a_1+2a_2$ = 1 for large $t$ gives $a_0$ = $a_2$. Following the strategy, $a_2$ fraction of agents will try to leave their last day's visited (each with a probability of 1/2) restaurant on day $t+1$ and of course, no such activity will take place in some restaurant where nobody (fraction $a_0$) or only one agent (fraction $a_1$) visited last day. Fraction of $a_2$ agents with successful leave attempt will now get equally distributed into $N-1$ remaining restaurants. Out of this $a_2$, fraction visiting any vacant restaurant ($a_0$) of last day is $a_0a_2$, at present fraction of vacant restaurant is $a_0$ = $a_0 - a_0a_2$. In this process, the vacancy which will also pop up in those restaurants where exactly two agents visited last day is $(a_2/4) - a_2(a_2/4)$. At steady state one can write: \begin{equation}\label{ekpr_8} a_0 = a_0 - a_0a_2 + \frac{a_2}{4} - a_2\frac{a_2}{4} \end{equation} Using $a_0 = a_2$, we get $a_0=a_2=0.2$, and also $a_1=0.6$. Thus, social utilization fraction $f$ becomes $a_1 + a_2$ = 0.8. This is an approximate result considering nil contribution from $a_i$ with $i \geq 3$ over large $t$, as seen numerically. Simulation results also confirm the approximated result of steady state utilization fraction, see Fig.~\ref{sca_op}. \begin{figure}[h] \begin{center} \includegraphics[width=8.5cm]{SCA_as.pdf} \end{center} \caption{Plot of social utilization fraction ($f$) in magenta color vs. days ($t$) following Stochastic Crowd Avoiding strategy. Average utilization fraction $\bar{f}(\simeq 0.79)$ over 100 days is shown in black color straight line. } \label{sca_op} \end{figure} \subsection{Phase Transition in KPR game} Recently, a novel phase transition phenomena is reported in Kolkata Paise restaurant game problem~\cite{sinha2019phase} if $n_i(t-1)$ number of agents revisit their last day visited restaurant $i$ with weight $[n_i(t-1)]^\alpha$ and $1/(N-1)$ for any other restaurant, then the steady state ($t$ independent) utilization fraction becomes $f(t)$ = $[1-\sum_{i=1}^{N} [\delta(n_i(t))/N]]$. Here, the critical point $\alpha_c$ is found near point $0_+$ where $(1-f)$ is found to vary as $(\alpha - \alpha_c)^{\beta}$ where $\beta \simeq 0.8$. See Fig.~\ref{pt_kpr}, where ($1-f$) is plotted against $\alpha$, fitting is done using maximum likelihood estimation. Inset plot shows the direct functional relationship between ($1-f$) and $\alpha$. \begin{figure}[h] \begin{center} \includegraphics[width=8.5cm]{1-f_a.pdf} \end{center} \caption{Figure 18 Plot of $[1-f]$ against $\alpha$ fitted to $(\alpha - \alpha_c)^{\beta}$ where $\beta \simeq 0.8$ ($f$ denoting the utilization fraction and $\alpha$ denoting the weight factor power as defined earlier). The critical point $\alpha_c$ is fount to be at $0_+$~\cite{sinha2019phase}. } \label{pt_kpr} \end{figure} \subsection{Application of KPR: Vehicle for Hire problem in mobility market} KPR game model has been applied in competitive resource allocation systems where scarce resources need to be allocated effectively for repeated times. Areas like dynamic matching in mobility markets~\cite{martin2019}, mean field equilibrium study for resource competitive platform reported in~\cite{yang2018mean} are such examples. In mobility market, agents generally have their individual preference/ranking towards resources. Vehicle for hire markets is one of such platform where drivers individually decide some pick up location to increase their own utilization and accordingly offer individual transportation to customers by car. Martin \& Karaenke~\cite{martin2017vehicle} has extended the KPR game model to generalize the Vehicle for Hire Problem (VFHP) and applied playing strategies discussed in previous section assuming drivers as agents and customers as resources in hire market. Below we discuss some of the results where drivers will have their individual ranking over customers unlike original KPR game model having commonly agreed resource ranking. \subsubsection{\textbf{No Learning (NL)}} $\nu N$ drivers,independent of their individual preference ranking and any last trip history, choosing randomly among $N$ customers for their next ride. For simplicity $\nu$ is considered as 1. The probability of choosing any particular customer by $n < N$ drivers is: \begin{equation}\label{eakpr_1} \tilde{P}(n) = \binom{\nu N}{n} {p}^{n} {(1-p)}^{\nu N - n} \end{equation} Assuming each of the customers to be equi-probable with probability $p = \frac{1}{N}$ and for $N\to\infty$ one gets (using Poisson Limit theorem): \begin{equation}\label{eakpr_2} \tilde{P}(n) = \frac{\nu^n }{n!} exp(-\nu) \end{equation} Thus fraction of customers not chosen by any driver is $\tilde{P}(n=0)=exp(-\nu)$, and one obtains the average fraction of customers chosen by at least one driver for ride $\bar{f}$ is $1-exp(-\nu)\simeq 0.63$. This result is exactly similar to NL or base strategy of KPR and again we will compare this result with other strategies. \subsubsection{\textbf{Limited Learning (LL)}} Following LL strategy of KPR, drivers choose a customer randomly for ride at time $t$ and go to their most preferred customer at time $t+1$ if they got a tour at time $t$. otherwise they choose randomly again. One obtains the utilization fraction by following formula: \begin{equation}\label{eakpr_3} f_{t+1} = f_t \cdot (1-exp(-1)) + (1-exp(-\nu_t)); \nu_t = 1 - f_t \end{equation} The left summand of above equation represents all those drivers who are successful in choosing their most preferred customer at time $t+1$ after choosing randomly at time $t$ or earlier. The right summand models those who choose randomly or successful in choosing their top priority customer at time $t$ and return there. On solving the above equation, one gets the steady state utilization $f = 0.702$. It is quite higher than the same strategy applied in original KPR game model. Drivers having self preference over top customer choice, may have different customer as his best choice. Thus the effective fraction of top customers becomes much higher than having one commonly agreed top rank resource. This is making LL strategy in Vehicle for hire market superior to original KPR LL strategy utilization. \subsubsection{\textbf{One Period Repetition (OPR)}} At time $t-1$, drivers will randomly choose customers for trip. For the next ride he will repeat trip with the same customer of time $t-1$, if successful in previous ride choosing any customer. For drivers with two consecutive successful trip with same customer, would go for individual best ranked customer at time $t+1$. Any driver follows NL strategy for next trip if fails in getting a successful ride at any time slot. So, overall utilization fraction at time $t$, say $f_t$, comprises of two parts: $x_{t-1}$ fraction of drivers who continues riding with last time chosen customer and rest of the fraction who choose any customer at current time slot. So $f_t$ becomes: \begin{equation}\label{eakpr_4} f_t = x_{t-1} + [1-x_{t-1}](1-exp(-1)) \end{equation} The utilization fraction for $x_t$ fraction of drivers who have chosen in current trip will be given by NL strategy where $N(1-x_{t-1})$ left out drivers finds one out of the $N(1-x_{t-1})$ customers waiting for a ride. \\On next trip, utilization fraction $f_{t+1}$ will be: \begin{equation}\label{eakpr_4} f_{t+1} = x_{t-1} + x_t + (1-x_{t-1}-x_t) (1-exp(-1)) \end{equation} substituting $x_t$ with $(1-x_{t-1})[1-exp(-1)]$ one gets, \begin{equation}\label{eakpr_5} f_{t+1} = x_{t-1} + [1-x_{t-1}](1-exp(-1)) + [1-x_{t-1}-(1-x_{t-1})(1-exp(-1))](1-exp(-1)) \end{equation} At stable state convergence, $f_{t-1}$ = $f_t$ = $f_{t+1}$ = $f$ and $x_{t-1}$ = $x_t$ = $x_{t+1}$, so dropping the subscript $t$ and equating $f_t$ = $f_{t+1}$ one calculates $x$ to be $0.28$ and $f = 0.73$. \subsection{\textbf{Application of KPR: Resource allocation in wireless IoT system} } Recently, Park et al. has proposed and analyzed a KPR inspired learning framework \cite{park2017kolkata} for resource allocation in the IoT environment. Here, the IoT devices has been modeled as non-cooperative agents choosing their preferred resource block with limited past information made available by their neighbors. However, socially optimal solution is reported for denser as well as lesser dense IoT environment, discussed below. \\ Internet of Things (IoT) technology is behind many smart city application. In an IoT environment, huge number of devices gets deployed for task and given limited source of energy (battery) for each device makes it challenging to ensure efficient resource allocation per time slot. The transmissions are often random and infrequent in nature. Now, up link of such an IoT system in time division multi-access way is considered with one base station (BS) to serve $N$ IoT devices transmitting short packets whenever they want to. For each time slot $t$, the channel will be divided into $b$ resource blocks (RB), each of which to be used by exactly one transmitting device: multiple devices choosing same RB end up transmission failure. At time slot $t$, the probability of $N_t = n_t$ devices transmitting with probability $p$ is: \begin{equation}\label{eakpr_6} \tilde{P}(N_t = n_t) = {N\choose n_t} p^{n_t} (1-p)^{N-n_t} \end{equation} Generally in an IoT system, $N_t$ is much larger than $b$. In order to obtain maximum socially optimal solution, the trivial solution could be a centralized solution where the BS allocates RBs to transmitting devices. But for several reasons this solution is impractical. The simple solution is to let the transmitting device randomly choose a RB with equal probability. Let $S_n$ be a random variable representing number of successful transmission with support function supp($S_n$) as [0,$N_t$] for $N_t \leq b$ and [0,$b$-1] when $N_t > b$. Taken $N_t = n_t$, the probability of having minimum $s$ successful transmission is: \begin{equation}\label{eakpr_7} Pr(S_n \geq s| N_t = n_t) = \prod_{i = 0}^{s-1} \frac{b-i}{b} [{\frac{b-s}{b}}]^{(n_t - s)}\\ \end{equation} From equation and , one gets probability of having $s$ successful transmission as: \begin{equation}\label{eakpr_8} Pr(S_n = s) = \sum_{i=s}^{N} Pr(S_n = s|N_t = i)Pr(N_t = i) \end{equation} Following \cite{park2017kolkata}, Park et al. has modeled the one to one association between RBs and IoT devices as a KPR game where each player $i \in \rho$ has a set of actions $\mathbb{A}_i$ of selecting set of $b$ RBs. Also the RBs have different channel gain $\tilde{g}_i$ and a device would prefer to transmit using a channel block with higher gain. Let the utility function for an IoT device $i$ choosing an action $a_i,_t$ of selecting RB $j$ with channel gain $\tilde{g}_i,_j$ at slot $t$ is: \begin{equation}\label{eakpr_9} u(a_i,_t) = \begin{cases} \tilde{g}_i,a_i,_t & \text{if $a_i,_t \neq a_k,_t \forall k \in \rho, k \neq i,$.}\\ 0 & \text{otherwise.} \end{cases} \end{equation} Unlike original KPR game model, multiple transmitting devices choosing single RB results into zero utility. Within certain communication range ($r_c$), during time slot $t$ each transmitting device learns from their neighbor's RB usage; on ($t-1$) slot, if neighbor's transmission is successful then choose some better ranked RB else transmit with less preferable RB than neighbor's last preference, otherwise transmit randomly. Nash equilibrium is reported for certain values of $r_c$ for even denser IoT network with service rate of $27.1$\%, which is about threefold higher than respective baseline. \section{Social Networks} Society evolves in to many complex network structures in the hyperspace of inter-agent interactions (viewed as links) among the agents (viewed as nodes). Examples may be transport networks, bank networks, etc. Geometrically defined, for example, if one puts $N$ random dots (nodes) on an unit area the minimum distance of separation between any two dots or nodes will decays as $1/\sqrt{N}$. The same problem in an unit three dimensional volume will give the inter-node separation decaying as $1/{N}^{1/3}$, and decays as $1/N^{1/d}$ for a $d$ dimensional system. For complex social networks such inter-node distance (for a fixed embedding volume) will decay as $1/{(\log N)}$, as in an effective infinite-dimensional space. This indicates the minimum contact number required for the spread of disease or information in a society. In other words, the number of transits for transport between any two nodes can be much lower than naively expected for two or three dimensional world! \subsection{Indian Railway network analysis} Here we discuss one of the highly cited research work from Kolkata: the structural properties of the $160$ years' old Indian Railway network (IRN) as complex network. Indian Railway is the largest medium of transport in the country. Question is, how many trains one passenger would need to change while reaching any destination within country while traveling by train. Passengers would not like to change many trains to avoid the hassle and latency. How would if a train runs between every stations (junction, regular as well as remote) to make journey hassle-free i.e. switching trains during journey become less; considering $579$ trains running between $587$ stations. But it will end up incurring too much latency. In~\cite{sen2003small}, for the first time Indian Railway network has been studied by Sen et al. as a graph where each railway-station is considered a node and the physical track joining any two stations as the edge so that there exist minimum one train running between them using the track. For simplicity, edges are considered to be one unit distant, ignoring actual geographical distance between the two stations it connect as an unweighted graph. Rigorous investigation of the structural properties of IRN as a complex network are discussed below. With a motive of being fast and economic, railways run several trains covering short as well as long route. IRN is quite a large network consisting more than $8000$ stations over which almost $10000$ trains run over the country. For the purpose of coarse-grained study of IRN, \cite{sen2003small} has considered only $587$ stations ($N$) with $579$ tracks ($L$) represented as a grant rectangular matrix $G(N,L)$ such that $G[i,j] = 1$ if train $j$ has a stop at station $i$. In $1998$, Watts and Strogatz proposed a model of network in~\cite{watts1998collective} with properties like: diameter of the network changes very slowly as the size of the network grows over time and the network will possess dense connectivity among the neighbors of a node, termed as clustering coefficient $C(N)$. They named this network type as Small World Network (SWN) arguing it's diameter growth is similar to random network i.e. $ln(N)/N \to 0$ as $N\to\infty$ with large value of clustering coefficients $C(N) \sim 1$. Sen et al. has measured both of the metric over $25$ different subsets of IRN and concluded it to behave similar to a small world network (see Figs.~\ref{mean_distance},~\ref{cc}). Practically this implied that over the years IRN has grown up to be economic, fast i.e. very few trains need to be changed to reach any arbitrary station over the whole network. \begin{figure}[h] \begin{center} \includegraphics[width=6.5cm]{figure1_train.pdf} \end{center} \caption{Plot of the mean distance $D(N)$ considering $25$ different subsets of IRN consisting different number of nodes $(N)$. The fitted function over the whole range of nodes is $D(N) = A+B\log(N)$ where $A \approx 1.33$ and $B \approx 0.13$. The probability distribution Prob$(\ell)$ of the shortest path lengths $\ell$ on IRN is shown in the inset. The mean distance $D(N)$ of the IRN network is $\approx 2.16$, varying maximum up to $5$ links. } \label{mean_distance} \end{figure} \begin{figure}[h] \begin{center} \includegraphics[width=6.5cm]{figure2_train.pdf} \end{center} \caption{Plot of the computed clustering coefficients $C(N)$ over $25$ different subsets of IRN with different number of nodes $N$. Initially very high followed by fluctuations, $C(N)$ has finally seen to stabilize at $0.69$ as $N\to\infty$, over the whole IRN. } \label{cc} \end{figure} As per Graph theory, how well connected a node is primarily agreed upon by the number of neighbor it has i.e. degree of the node. Hence it is important to study the degree distribution $P(k)$ of IRN. The cumulative degree distribution $F(k)$ = $P(k)dk$ of IRN when plotted on a semi-logarithmic scale, has been found to fit an exponentially decaying distribution $F(k) \sim exp(-\beta k)$ with $\beta= 0.0085$. But $F(k)$ does not tell much about how well connected are the neighbors of a high degree station i.e. the correlation (whether positive or negative) of the average degree $<k_{nn}(k)>$ of neighbors to that of the respective node. Fig.~\ref{corr_deg} shows the plot of $<k_{nn}(k)>$ against respective vertex's degree to find the general assortative behavior of the network. Using rigorous measure discussed in \cite{sen2003small}, the value came for IRN is very small ($ \sim -0.033$). \begin{figure}[h] \begin{center} \includegraphics[width=6.5cm]{figure7_train.pdf} \end{center} \caption{Plot of the fluctuations of average degree $<k_{nn}(k)>$ of neighbors over the degree of nodes $k$ over the whole range of IRN. } \label{corr_deg} \end{figure} \section{Summary and Discussion} Unequal distribution of income, wealth and other social features are not only common, they have been the persistent feature throughout the world and through the history of human civilization. Apart from the thinkers and philosophers, the economists and other social scientists have studied extensively about it. Recently, physicists are trying to measure and explore the cause of such inequalities. We first discuss (in Section~\ref{gini-kpr}) about measures of social inequalities, including the Kolkata index $k$, giving the fraction of wealth $k$ possessed by $(1-k)$ fraction of the reach population: As such it generalizes the Pareto's `80/20 law'. We have discussed in this section about the Gini and Kolkata index values measured in various social contexts, e.g., of the income and wealth, deaths in social conflicts and natural disasters, citations of papers across the institutions and journals etc. Next, in section~\ref{econo_income-wealth} we investigate the nature of income and wealth distribution in various societies, and find a dominant feature in that typically more the ninety percent of the population in any society has a distribution which fits a Gamma distribution, while the upper tail part (for the super-rich fraction of the population) fits a robust power law or Pareto law. We show, the kinetic theory of ideal gas, where the trading agents are like `social atoms' of the gas as in two person trading of scattering process with conserved money (like the conserved energy for the gas atoms) and saving a fraction of respective money in each trading indeed gives a Gamma-like distribution which crosses over to Pareto-like power law when the saving fractions are inhomogeneous. Econophysics is interdisciplinary by nature, contributed by physicists, economists, statisticians, social scientists, computer scientists etc. Here, an effort has been put to give a glimpse of recent studies from Econophysics by computation. Inequality measuring techniques starting from simple histogram to standard gini index as well as Kolkata index and others (see e.g.,~\cite{ghosh2014inequality,chatterjee2017socio,inoue2015measuring,banerjee2019kolkata}). One of the major goal of econophysics has been to search for a successful theory or model which can capture the behavior of the real economic data of income or wealth distribution. In this review we briefly discuss some of the models inspired by the kinetic theory of ideal gases which are able to give some insights into the mechanisms of the income distributions. For application of kinetic exchange models to social opinion formation, see~\cite{lallouache_bkc,biswas2012_bkc,mukherjee2016_bkc}. There are a few extensive reviews and books~\cite{yakovenko2009colloquium_sudip,chakrabarti2013econophysics,pareschi2013interacting_sudip} highlighting these developments of the econophysics (of income and wealth distribution) as well as in sociophysics. Beside this field of study there are many applications of physical laws in financial and stock markets (see e.g.,~\cite{stanley2000introduction_sudip,sinha2010econophysics_sudip,bhadola2017_sudip,bertschinger2018reality}). Social resource allocation models (see for e.g.,~\cite{chakrabarti2017econophysics},\cite{dhar2011_bkc}) along with several intelligent collective learning strategies are discussed along with their programs. We also discussed the connectivity structures of social networks (see e.g.,~\cite{sen2014sociophysics,chakrabarti2007econophysics}). In particular we discussed here for the Indian Railway network, how the minimum number of train connections (links) one need to hop for going from one destination to another within India (or, for that matter, any other country), grows with the total number of service stations (nodes) in India (network of the respective country). Such shortest number of links in any network gives the idea for the time required to spread rumor or contact diseases, etc. in a networked society. In order to give a birds'-eye-view of the developments of econophysics, we give the chronological entries in `Timeline of econophysics' (Appendix) for the major developments in the initial phase. For further studies and search of research problems in these and related fields, see Refs~\cite{stanley2000introduction_sudip,sinha2010econophysics_sudip,yakovenko2009colloquium_sudip,chakrabarti2013econophysics,sen2014sociophysics,chakrabarti2007econophysics, chakrabarti2017econophysics,slanina2013essentials_sudip,pareschi2013interacting_sudip,aoyama2017macro_sudip,jovanovic2017econophysics_sudip}. \section{Acknowledgement} We are grateful to Muktish Acharyya for the invitation to write this review. BKC is grateful to J. C. Bose fellowship (DST, Govt. India) for financial support.
\section{Introduction} Smart cities provide reliable and robust solutions to crucial problems related to traffic, healthcare, education, security, etc~\cite{amma2018privacy,puiu2016citypulse}. Smart cities embody a massive smart Internet of things (IoT) devices in various applications. The compelling capabilities of the sensors included in these devices generate an unprecedented volume of data~\cite{brisimi2016sensing}. Learning from this data reinforces the performance of applications and enables the discovery of the knowledge to compose intelligent decisions~\cite{amma2018privacy}. However, a large chunk of this data is sensitive because it is generated by users, and their privacy is a premier parameter that must be fulfilled in the design of smart cities' infrastructure to evade privacy infringement\cite{khan2019federated}. In addition, sending massive data to a centralized location is resource starvation resulting in network congestion since many users endeavor to make use of the same resource~\cite{mcmahan2016communication}. To this end, there is a need for a distributed learning paradigm that mitigates network bottlenecks and enables IoT devices to build a collaborative shared model that discovers the necessary information embedded in the data without compromising their privacy. Federated learning (FL) has emerged as an attractive solution to meet the aforementioned requirements\cite{tran2019federated}. FL enables users to share their acquaintance without privacy violation, whereas the data is stored locally\cite{mcmahan2016communication}. Users only share their local model gradients regularly with the orchestrating server, which organizes the training and collects the contributions of all participants~\cite{smith2018cocoa}. The server builds the global model by averaging all gradients across the network~\cite{Sahu2018FederatedOF}. Then, the coordinating server broadcasts the new updated model to all clients ~\cite{lim2019federated}. Each client uploads its local model to the server and then downloads the global model to do on-device inference using a cloud-distributed model. The server orchestrates this process until learning is stopped~\cite{smith2017federated}. Moreover, to allow rapid access to the enormous distributed data for fast model training, federated learning algorithms have been pushed towards the network edge. This has led to the emergence of a new paradigm of FL called federated edge learning as a cutting-edge decentralized technique that enables edge devices to train the model using real-time data collaboratively~\cite{konevcny2016federated}. Recently, the works in~\cite{mcmahan2016communication,smith2017federated, Sahu2018FederatedOF,lin2018don,lim2019federated } studied system-level and statistical challenges related to FL deployment as detailed in Section~\ref{sect:RelatedWorks}. However, none of the existing works ~\cite{mcmahan2016communication,smith2017federated, Sahu2018FederatedOF,lin2018don,lim2019federated } considers the unlabeled data, and they only assumed that the data is completely labeled which does not reflect the realistic nature of the applications. In reality, there is a scarcity in the amount of labeled data and an abundance of unlabeled data collected in smart cities. To this end, targeting federated edge learning, the main contribution of this work is a novel semi-supervised federated learning scheme that exploits the unlabeled data at edge networks. In our simulation, we use German Traffic Sign Dataset (GTSDB) which contains large images of real-world traffic signs to evaluate the proposed approach. We can summarize our key contributions as follows: \begin{itemize} \item We propose a novel semi-supervised FL approach called FedSem, FedSem can handle the problem of unlabeled data in smart cities while preserving privacy and increasing data utilization. \item We utilize the GTSDB dataset to evaluate our proposed method under various settings of unlabeled data ratios. \item We consider the performance of FL under various heterogeneity settings for the unlabeled data. \end{itemize} To the best of our knowledge, this is the first work in FL that takes into account semi-supervised learning, which exploits unlabeled data generated in the edge networks. The rest of this paper is structured as follows. We review the state of art of similar works in Section~\ref{sect:RelatedWorks}. Then, we introduce the system model and our proposed approach in Section~\ref{sect:SystemModel}. Details descriptions of the used datasets, performance metrics, experimental setup, and results are provided in Section~\ref{sect:NumericalResults}. Finally, we conclude our work with remarks in Section ~\ref{conclustion}. \section{Related Work} \label{sect:RelatedWorks} To process large amounts of data, with the evolution of cloud computing techniques, the majority of the works have been devoted to study large-scale distributed learning, especially in the data center setting ~\cite{boyd2011distributed, dean2012large, dekel2012optimal, shamir2014communication}. However, pushing the data directly to the server violates the privacy of users for critical applications. Recently, FL has emerged as an effective solution to preserve privacy and share the knowledge between users due to the rapid growth of computing agents (i.e., smartphones, wearables, and internet-of-things devices)~\cite{smith2017federated}. In this approach, it is directly learning the models over the network rather than transmitting the data to the cloud~\cite{smith2017federated}. This technique inspired researchers to pay attention to challenges with heterogeneity, privacy, computation constraints, and communication cost. In order to evaluate the proposed methods in FL, researchers have taken into account the following properties ~\cite{mcmahan2016communication}: \begin{itemize} \item Non-IID: training the data in each client depends on its usage. Consequently, any specific user's local data could not represent the population distribution~\cite{smith2017federated} \item Unbalanced data: the local training data (e.g., Sign Images) is varied depending on the usage of the service, which depends on the user behaviour~\cite{Sahu2018FederatedOF}. \item Communication boundaries: Some devices(e.g., smartphones, vehicles) typically are not available all the time or may have slower connections. Also, different users may use different network technologies(i.e. 4G and 5G)~\cite{smith2017federated}. \end{itemize} Focusing on optimization algorithms for FL, many methods ~\cite{boyd2011distributed, lin2018don} have been designed to tackle the statistical and system challenges. These methods showed outstanding improvements compared to conventional approaches such as ADMM methods~\cite{boyd2011distributed} and mini-batch~\cite{dekel2012optimal} algorithm. These methods allow for local updates in the edge devices by only activating a subset of them to participate in forming a global model~\cite{smith2017federated, lin2018don}. In addition, with the aim of convergence, the authors in ~\cite{smith2018cocoa} proposed a heuristic method called multitask learning to average the local updates received from a set of devices and then broadcast the global model accordingly. The authors proposed to collect raw data in a certain period to improve the model. However, the data is private, and this will violate the principle of FL, which mainly aims to preserve the user's privacy. Recently, heuristic methods have been proposed to address statistical data heterogeneity in FL ~\cite{lin2018don, mcmahan2016communication}. For example, Federated Averaging (FedAvg) is a heuristic algorithm based on averaging local Stochastic Gradient Descent (SGD) updates in the primal. In ~\cite{mcmahan2016communication}, the authors showed the FedAvg method of providing outstanding empirical performance. However, FedAvg is challenging to analyze due to its local updates in regular periods, and only a subset of devices participates at each round with heterogeneous data in non-identical fashion. To tackle this issue, the authors in ~\cite{smith2017federated, smith2018cocoa} proposed approaches to periodically send the local data produced by the edge devices to edge-server and then, share the global model to all edge devices. However, these methods are unrealistic because the bandwidth and energy are quickly consumed due to periodic data transmissions, and user privacy is violated. On the other side, sharing the edge-device data between all members requires sufficient network resources and powerful computing capabilities to manipulate massive datasets. Furthermore, a new paradigm of FL called federated edge learning has emerged as a cutting-edge decentralized technique which enables edge devices to train the model using real-time data~\cite{lim2019federated} collaboratively. In summary, the majority of researchers have studied the statistical challenges of FL. However, to the best of our knowledge, there are no approaches to handle the problem of using unlabeled data collected in smart cities using edge FL. \section{System Model} \label{sect:SystemModel} In this work, we consider a swarm of smart vehicles learning traffic signs at edge networks in smart cities. This system includes a set of autonomous vehicles $K$ passing through different roads, as depicted in Fig~\ref{fig1}. A subset of these vehicles $S$ occasionally is active. The coordination between these nodes is performed by an orchestrating edge server that controls the learning process. Each vehicle trains the local model based on its own data (traffic sign images) locally and sends only gradients to the server. Then, the server applies federated averaging to create a global model using \eqref{eq1}. In general, the orchestrating server coordinates to select different number of participants in each round trying to capture all existing labels across vehicles. \begin{equation} \omega^{t+1}= \frac{1}{K}\sum_{k\in S_t} \omega^{t+1}_k \label{eq1} \end{equation} where $w$ is the weights of the global model, $K$ is the total number of vehicles in the network, and $S_t$ is the subset of vehicles selected to train the global model for one round. \begin{figure}[t] \centering \includegraphics[width=0.95\linewidth, height=6cm]{Arch2.pdf} \caption{System model under Federated learning settings} \label{fig1} \vspace{-5mm} \end{figure} To train the local model across vehicles, the loss function is defined as follows. Consider ${\cal D}_k$ denotes the local dataset collected at the $k$-th edge vehicle. The loss function of the model $\omega$ on ${\cal D}_k$ is given by \begin{align}\label{eq:local_loss} (\text{Local loss function}) \qquad F_k(\omega) = \frac{1}{|{\cal D}_k|} \sum_{(x_j, y_j) \in {\cal D}_k} f(\omega, x_j, y_j) \end{align} Then, the loss function of all vehicle is expressed as follows. \begin{align} (\text{Global loss function}) \qquad F(\omega) = \frac{1}{K} \sum_{k\in S_t} F_k(\omega). \end{align} All vehicles aim to minimize the global loss function $F(\omega)$, namely, \begin{align}\label{eq:learning_prob} \omega^* = \arg \min F(\omega). \end{align} \subsubsection{Federated Averaging}(FedAvg) ~\cite{mcmahan2016communication}, In FedAvg, the stochastic gradient descent $(SGD)$ is used as a local solver and each vehicle $k$ has a local surrogate to approximate the global objective function. The local solver hyper-parameters(i.e., learning rate and local epochs) are assumed to be homogeneous among all vehicles in all rounds $R$. At each round $r$, only a subset of $K$ participants is selected to update the global model. The $SGD$ is run locally for a specified number of epochs $E$ and the learning rate $\eta$. A central server repeats these steps until convergence. The steps of this approach are listed in Algorithm ~\ref{algavg}. \begin{algorithm}[t] \SetAlgoLined \label{algavg} \caption{FedAvg~\cite{mcmahan2016communication}} \KwIn{$R, K, \eta , \omega^0, S, E$} \For{$r= 1$ to $R$}{ 1- Server coordinates to choose subset $S$ of K randomly\\ 2- Server broadcasts $\omega^t$ to $S$\\ 3- Vehicle $k_i$ run a local solver for $E$ epochs to update $\omega^t$ with step size $\eta$ to get $\omega^{t+1}$ \\ 4- The selected vehicle $k_i$ send its updated model $\omega^{t+1}$ back to the server\\ 5- Server receive all updates from $S$ and average $\omega's$ as $\omega^{t+1}= \frac{1}{K}\sum_{k\in S_t} \omega^{t+1}_k$ } \end{algorithm} \section{Federated Semi-Supervised Learning} In this section, we explain the semi-supervised learning in general then, we narrow this definition to FL settings. Semi-supervised learning is an approach where unlabeled data is used to gain more understanding of the general structure~\cite{li2018pseudo}. The labeled data plays an important role to classify unlabeled data based on the initial training model. However, semi-supervised learning under FL is challenging as a single unit can't capture all labels independently as the data points are disseminated across the network. To this end, we propose a novel scheme that addresses this issue under FL settings as described in section~\ref{fedsemd} \begin{figure}[t] \centering \includegraphics[width=0.75\linewidth]{FedSemalg.png} \caption{FedSem Proposed Algorithm where the \emph{phase1} designs the global model using only labeled data and \emph{Phase2} injects unlabeled data into learning process} \label{fig:FedSem} \vspace{-8mm} \end{figure} \subsection{FedSem} \label{fedsemd} FedSem aims to leverage the semi-supervised learning process in edge FL. We take advantage of using \emph{pseudo-labeling technique} to utilize unlabeled data in all vehicles in the network. In the beginning, the server sends initial model \textbf{\emph{Model-Phase1}} with random gradients to available clients, which in turn will start training or updating their model using only their labeled data in order to collaboratively design the initial global model Model-Phase1. This phase aims to capture all labels from different vehicles to ensure that the global model can predict most existing labels. Then, the server control this phase until \textbf{\emph{Model-Phase1}} converges to enable all vehicles utilizing unlabeled data in the second phase. In phase two, the resulting \textbf{\emph{Model-Phase1}} is used to fill the unlabeled data points. As a result, all data is completely labeled and each vehicle uses traditional supervised learning after injecting unlabeled data into the training process so as to increase the robustness of the global model \textbf{\emph{Model-Phase2}}. Fig.~\ref{fig:FedSem} is a flowchart illustrating our proposed scheme "FedSem". For simplicity, Algorithm~\ref{fedsem_1} and Algorithm~\ref{fedsem_2} explain the steps in each phase. \begin{algorithm} \SetAlgoLined \label{fedsem_1} \caption{Federated Algorithm for Semi-supervised learning Phase-1} \KwIn{Total Participant vehicles $ K$, Subset Participant in each round $S$, Learning rate $\eta $ , initial gradients $\omega^0$, Number of epochs in local vehicle $E$, Number of rounds $R$ } \For{$i= 1$ to $R$}{ - Server coordinates to choose subset $S$ of K randomly\\ - Server broadcasts $\omega^t$ to $S$\\ \For{$j= 1$ to $S$}{ - Vehicle $k_j$ trains its model using only the fully labeled data points for $E$ epochs to update $\omega^t$ with step size $\eta$ to get $\omega^{t+1}$ \\ - The selected vehicle $k_j$ send its updated model $\omega^{t+1}$ back to the server\\ } - Server receives all updates from $S$ and applies FedAvg $\omega's$ as $\omega^{t+1}= \frac{1}{K}\sum_{k\in S_t} \omega^{t+1}_k$\\ - \If{If the global model converge}{ Save the model "Model-Phase1"\; Break\; } } \end{algorithm} \begin{algorithm} \SetAlgoLined \label{fedsem_2} \caption{Federated Algorithm for Semi-supervised learning Phase-2} \KwIn{Total Participant vehicles $ K$, Subset Participant in each round $S$, Learning rate $\eta $ , initial gradients $\omega^0$, Number of epochs in local vehicle $E$, Number of rounds $R$ } - All $K$ vehicles use "Model-Phase1" to fill unlabeled data points. \For{$i= 1$ to $R$}{ - Server coordinates to choose subset $S$ of K randomly\\ - Server broadcasts $\omega^t$ to $S$\\ \For{$j= 1$ to $S$}{ - Vehicle $k_j$ train its model utilizing labeled and unlabeled data for $E$ epochs to update $\omega^t$ with step size $\eta$ to get $\omega^{t+1}$ \\ - The selected vehicles $S$ send their updateds model $\omega^{t+1}$ back to the server\\ } - Server receives all updates and applies FedAvg: $\omega's$ as $\omega^{t+1}= \frac{1}{K}\sum_{k\in S_t} \omega^{t+1}_k$\\ -\If{If the global model converge}{ Save the model "Model-Phase2"\; Break\; } } \end{algorithm} \section{Numerical Results} \label{sect:NumericalResults} In this section, the performance of Fedsem method is benchmarked to the learning without injecting unlabeled data under different scenarios. First, we explain the used dataset, how is distributed across vehicles and its structure, and then we present the used model and classifier. \subsection{Dataset, Performance Metrics, and Experimental Setup} \label{dataset} The German Traffic Sign Dataset (GTSDB) has been widely used in similar research for only centralized supervised learning~\cite{sermanet2011traffic,staravoitau2018traffic}. We follow the procedure done in ~\cite{sermanet2011traffic},~\cite{staravoitau2018traffic} for splitting the dataset. The data is split into $39209$ 32×32 px color images for training and $12630$ images for testing. Each image represents one of 43 distinct classes of traffic signs. Each image is a 32×32×3 array of pixel intensities, represented as [0, 255] integer values in RGB color space. The class of each image is converted to a one-hot encoding scheme. We used a deep neural network classifier as a model following the work done in~\cite{sermanet2011traffic}. For federated settings, we split the data between $1000$ vehicles, and in each round, only $30$ vehicles are selected randomly to train and update the model. To assure data heterogeneity, the data is distributed in none-IID fashion. For local image recognition, each vehicle uses convolutional neural networks as in ~\cite{li2018real}. Table ~\ref{Tab:datasettings} illustrates GTSDB dataset and how it is split across vehicles. \begin{table}[t] \centering \caption{Statistics of the used datasets in federated settings } \begin{tabular}{|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|} \cline{1-4} \textbf{ Dataset} & \textbf{Total number of vehicles} & \textbf{Total number of samples} &\textbf{Number of classes} \\ \hline \cline{1-4} GTSDB & 1000 &39,209 for training, and 12,630 images for testing & 43 \\ \hline \end{tabular} \label{Tab:datasettings} \end{table} In this work, we use different percentages of the labeled data to show to which extent FedSem can help to enhance the learning performance. We use testing accuracy, testing loss and gained accuracy as performance metrics to evaluate FedSem. We carried out all experiments using the TensorFlow library ~\cite{abadi2016tensorflow}. $Adam$ optimizer is employed as a local solver. The sampling scheme is implemented as in algorithms 1 and 2, which is uniform among vehicles. The update is performed based on the weights to the local data points, as proposed in~\cite{mcmahan2016communication}. For the model training parameters, we adopted the parameters similar to work in ~\cite{staravoitau2018traffic}. However, we reduce the batch size to fit vehicle computation capabilities. We set homogeneous learning rate $\eta$ and the number of local epochs $E$ across vehicles. The model has four layers comprising three convolutional layers for feature extraction and one fully connected layer as a classifier~\cite{staravoitau2018traffic}. For our simulations, we consider that different participants are selected in each round to allow for more updates. We have split the data on each vehicle into a training set $(80\%)$ and testing set $(20\%)$. All matrices are reported using the global model outputs. The other parameters used in simulations are summarized in Table ~\ref{tab:setuppar}. \begin{table}[t] \centering \caption{Experimental Setup parameters } \begin{tabular}{|p{3.5cm}|p{2.5cm}|} \cline{1-2} \textbf{ Parameter} & \textbf{Value} \\ \cline{1-2} Library & TensorFlow GPU \\ \cline{1-2} Number of local epochs $E$ & 20, 40 and 100 \\ \cline{1-2} Learning rate $\eta$ & 0.0001 \\ \cline{1-2} Batch Size & 32 \\ \cline{1-2} Number of rounds & 30, 50, and 100 \\ \cline{1-2} Clients per round & 10 and 20 \\ \cline{1-2} Evaluation Period & every round \\ \cline{1-2} \end{tabular} \label{tab:setuppar} \end{table} We initially carried our simulations using only $10\%$ of labeled data. Then we repeat the same experiments with the same settings, but we use $30\%$ and $50\%$ of labeled data, respectively. We set all experiments to start injecting unlabeled data at round $R/2$ where $R$ is the total number of rounds. \subsection{Results} In Table ~\ref{table:results}, we show the gained accuracy in both phases using different percentages of labeled data and a different number of epochs. We compute the gained accuracy after injecting unlabeled data using (~\ref{equ:gain}). \begin{equation} \label{equ:gain} Gain= \frac{Accu_{Phase2}-Accu_{Phase1}}{Accu_{Phase2}} \end{equation} where $Accu_{Phase1}$ is the achieved accuracy using only \textbf{\emph{Model-Phase1}} and $Accu_{Phase2}$ is the achieved accuracy after injecting unlabeled data into learning process \textbf{\emph{Model-Phase2}}. We can notice that regardless of the percentage of the labeled data used in phase one, training the model using unlabeled data helps to increase the accuracy. Also, we can observe that increasing the number of epochs across vehicles results to improve the testing accuracy so tuning the number of epochs to an optimal value is crucial to decrease the number of rounds that is needed to converge. \begin{table}[t] \centering \caption{Experimental Results} \begin{tabular}{|p{1cm}|p{1cm}|p{1cm}|p{1cm}|p{1cm}|p{1cm}|} \cline{1-6} \textbf{\% of Labeled data} & \textbf{\# of rounds} & \textbf{\# of Epochs $E$} & \textbf{labeled data Accuracy } & \textbf{All data points Accuracy } & \textbf{Gain} \\ \hline \cline{1-6} 20 & 50 & 20 & 73\% & 78\% & 7\%\\ \hline \cline{1-6} 20 & 50 & 40 & 80.02\% & 83.97\% & 5\%\\ \hline \cline{1-6} 20 & 30 & 20 & 69.57\% & 73.55\% & 6\%\\ \hline \cline{1-6} 30 & 50 & 20 & 79\% & 83\% & 5\%\\ \hline \cline{1-6} 30 & 50 & 40 & 81\% & 84.7\% & 4.4\%\\ \hline \cline{1-6} 50 & 50 & 40 & 79\% & 84.05\% & 6\%\\ \hline \end{tabular} \label{table:results} \end{table} \begin{figure}[t] \centering \begin{tikzpicture}[scale=0.80] \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, xlabel=\% of Labeled data (20 Epochs), ylabel=Testing Accuracy\%, enlargelimits=0.05, legend style={at={(0.5,-0.2)}, anchor=north,legend columns=-1}, ybar interval=0.7, ] \addplot[fill=blue!80!white,] coordinates {(20,73) (30,77.5) (40,80.9)(50,84.2)(60,87)} \addplot[fill=red!80!white,] coordinates {(20,78) (30,83.2) (40,85.7)(50,88.3)(60,88.1)}; \legend{Labeled data only, With Unlabeled data} \end{axis} \end{tikzpicture} \caption{The percentage of the labeled data points vs. the testing accuracy when the number of Epochs is 20.} \label{resultspre} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{Fig70p1.png} \caption{The testing accuracy using FedSem vs 20\% and 30\% labeled data.} \label{fig30p1} \end{figure} \begin{figure}[t] \centering \includegraphics[width=0.8\linewidth]{Fig70p2.png} \caption{The testing loss using FedSem vs. 20\% and 30\% labeled data.} \label{fig30p2} \end{figure} Fig.~\ref{resultspre} shows the gained accuracy for different percentages of labeled data either without using unlabeled data or after injecting unlabeled data. We can see that unlabeled data helps to increase the testing accuracy of all considered labeled data percentages. This is because, at each given learning step, the proposed FedSem includes different features that belong to the same class, which in turn increases the marginal probability. Fig.~\ref{fig30p1} and Fig.~\ref{fig30p2} show the obtained accuracy when the percentage of the labeled data is 30\% and 20\% during the learning process. We can observe that utilizing unlabeled data enhances the accuracy and leverages the stability of the global model, as depicted in Fig.~\ref{fig30p1} and Fig.~\ref{fig30p2}. In summary, injecting unlabeled data into training increases the accuracy even if the ratio of labeled data is small. \section{CONCLUSIONS} In this work, we propose a federated semi-supervised learning technique to utilize the unlabeled data in smart cities. The proposed scheme exploits the unlabeled data as well as evades privacy infringement. The proposed approach divides the learning into two phases to assure capturing the information encapsulated within unlabeled data. The global model resulting from \emph{Phase-1} is used to label the unlabeled data. We have carried out several experiments using different percentages of labeled data to show how the FedSem can enhance the learning performance by utilizing unlabeled data even if the ratio of labeled data is small. FedSem improves the accuracy of up to 8\% compared to using only the labeled data. Overall, utilizing unlabeled data in FL increases accuracy. \label{conclustion} \balance \bibliographystyle{IEEEtranTIE}
\section{Introduction} This work is concerned with the regularity properties of weak solutions to doubly nonlinear equations whose model case is \begin{align}\label{DNPE} \partial_t u - \nabla\cdot (u^{m-1} |\nabla u|^{p-2}\nabla u) = 0 \quad \text{ in } \Omega_T:=\Omega\times (0,T), \end{align} where $\Omega\subset \ensuremath{\mathbb{R}}^n$ is an open bounded set, and the parameters $m$ and $p$ are restricted to the range \begin{align}\label{parameter-range} p\in (1,2), \qquad \qquad m > 1, \qquad\text{ and } \qquad 2<m+p<3. \end{align} The term doubly nonlinear refers to the fact that the diffusion part depends nonlinearly both on the gradient and the solution itself. Such kind of equations describe several physical phenomena and were introduced by \cite{Li} (see also the nice survey by Kalashnikov \cite{Ka}). Moreover, these equations have an intrinsic mathematical interest because they represent a natural bridge between the more natural generalisations of the heat equation: the parabolic $p$-Laplace and the Porous Medium equations. Especially in recent years, many papers have been devoted to this topic. The approaches are sometimes not rigorous, sometimes not with sharp assumptions or with unnecessarily long proofs. The natural definition of weak solutions is obtained from \eqref{DNPE} by a formal application of the chain rule and requires that a certain power of $u$ (rather than $u$ itself) has a weak gradient. This is perhaps the most delicate point: too many papers devoted to this topic do not take this aspect into account carefully, and use incorrect approximations or non-admissible test-functions. For more details, we refer the reader to Section \ref{weaksolsect}. Analogously, some results presented below, such as the $L^1$-Harnack inequality and the expansion of positivity have been obtained previously under the assumption that the function $u$ itself has weak gradient, see \cite{FoSoVe} and \cite{FoSoVe2}. Since this is not necessarily true in our setting we have included detailed proofs showing that the strategies developed in \cite{FoSoVe} and \cite{FoSoVe2} are applicable also without assuming the existence of $\nabla u$. But we do not limit ourselves to fix this aspect. We go through the regularity theory and we use a unified approach giving shorter and different proofs with respect to the ones known in literature. In this way, a reader can have a self-contained overview of the theory of doubly nonlinear singular parabolic equations. We obtain different results under various ranges for the parameters. The time continuity, mollified weak formulation, energy estimates, expansion of positivity and $L^1$-Harnack inequality are obtained in the full range \eqref{parameter-range}. Local boundedness of weak solutions is shown in the smaller range \begin{align}\label{nicerange} m+p>3-\frac{p}{n-(\frac{n-p}{p})}. \end{align} We recall that this range is sharp. In the special case $m=1$, \eqref{DNPE} becomes the singular parabolic $p$-Laplace equation. Then the condition \eqref{nicerange} and the integrability required of $u$ in Definition \ref{weakdef} below reduce to $p>\frac{2n}{n+2}$ and $u\in L^2$ respectively, which are well-known sharp conditions to guarantee local boundedness for this equation, see for example Chapter V of \cite{DiBene}. The local H\"older continuity will be proven only in the so-called supercritical range \begin{align}\label{supercritical} m+p>3-\frac{p}{n}. \end{align} Note that \eqref{supercritical} is a stricter condition than \eqref{nicerange}. We decided that it was too much dispersive for the reader to prove H\"older continuity also in the sub-critical case because requires a slighty different approach (and assumptions). In the last section, we prove Harnack estimates in the supercritical range. Note that, as proven in \cite{DiGiaVe1} for the p-Laplacian, this result is sharp. \medskip \noindent {\bf Acknowledgments.} M. Vestberg wants to express gratitude to the Academy of Finland. Moreover, we thank Juha Kinnunen for useful discussions and feedback during the writing of this article. \section{Setting and main result}\label{weaksolsect} In order to motivate the natural definition of weak solutions, we reformulate \eqref{DNPE}. Formally applying the chain rule, we can write the equation in the form \begin{align}\label{reformulated} \partial_t u-\nabla \cdot (\beta^{1-p}|\nabla u^\beta |^{p-2}\nabla u^\beta )= 0, \end{align} where \begin{align}\label{def:beta} \beta:=1 + \frac{m-1}{p-1} >1. \end{align} For later reference we note that \eqref{nicerange} can be expressed conveniently in terms of $\beta$, $p$ and $n$ as \begin{align}\label{nicerange-rephrased} \frac{p(\beta+1)}{1-\beta(p-1)} > n. \end{align} We will prove our result not only for solutions to \eqref{reformulated}, but for all equations of the form \begin{align}\label{general} \partial_t u-\nabla \cdot A(x,t, u,\nabla u^\beta)=0, \end{align} where $A(x,t, u,\xi)$ is a vector field satisfying \begin{align} \label{structcond1}|A(x,t, u,\xi)|&\leq C_1 |\xi|^{p-1} \\ \label{structcond2}A(x,t, u,\xi)\cdot \xi &\geq C_0|\xi|^p \end{align} An example of an equation that satisfies these conditions is \begin{align}\label{DNPEG} \partial_t u - \sum_{i,j=1}^n(a_{ij}(x,t)\beta^{1-p} |\nabla u^\beta|^{p-2} u^{\beta}_{x_i})_{x_j} = 0 \quad \text{ in } \Omega_T:=\Omega\times (0,T), \end{align} where the coefficients $a_{ij} $ are bounded and measurable and where the matrix $(a_{ij}(x,t))^n_{i,j=1}$ is positive definite uniformly in $(x,t)$. We arrive at the definition of weak solutions by multiplying \eqref{general} by a smooth test function and integrating formally by parts. \begin{defin}\label{weakdef} A function $u\colon\Omega_T\to \ensuremath{\mathbb{R}} $ is a weak solution to \eqref{general} if and only if $u\geq 0$, $u^\beta \in L^p(0,T;W^{1,p}(\Omega))$, $u\in L^{\beta+1}(\Omega_T)$ and \begin{align}\label{weakform2} &\iint_{\Omega_T} A(x,t,u,\nabla u^\beta)\cdot \nabla \varphi- u\partial_t \varphi\d x\d t=0, \end{align} for all $\varphi \in C^\infty_0(\Omega_T)$. \end{defin} \begin{rem} The extra integrability condition $u\in L^{\beta+1}(\Omega_T)$ is made to justify a test function containing $u^\beta$. The condition is needed since we are considering the fast diffusion case, in which $\beta p< \beta +1$. By contrast, in the slow diffusion case $m+p>3$ which is not considered in this article, the inequality holds in the reverse direction, which means that no additional integrability is needed. For explicit calculations illustrating this point, consider the flat case of the equation studied in \cite{SiVe} and \cite{SiVe2}. Earlier works treating the slow diffusion case (although not necessarily with the same definition) are \cite{PoVe} and \cite{Iv3}. \end{rem} \section{Preliminaries} \label{Preliminaries} Here we introduce some notation and present auxiliary tools that will be useful in the course of the paper. \subsection{Notation} With $B_\rho(x_o)$ we denote the open ball in $\ensuremath{\mathbb{R}}^n$ with radius $\rho$ at center $x_o$, and the corresponding closed ball is denoted $\bar B_\rho(x_o)$. Furthermore, we use the notation $Q_{\rho,\theta}(z_o):=B_\rho(x_o)\times (t_o-\theta,t_o)$ for space-time cylinders, where $z_o:=(x_o,t_o)\in \Omega_T$. For $w,v \geq 0$ we define \begin{align} \label{definition:b} &\b[v,w]:= \tfrac{1}{\beta+1} (v^{\beta+1}-w^{\beta+1})- w^\beta (v-w) \\ \notag &\hphantom{\b[v,w]:}= \tfrac{\beta}{\beta+1} (w^{\beta+1}-v^{\beta+1})- v (w^\beta-v^\beta), \\ \notag \\ &\b[v,w]^+:=\b[v,w]\chi_{(w,\infty)}(v), \end{align} where $\beta$ is defined by \eqref{def:beta}. For any real-valued essentially bounded function $g$ defined on a measurable set $E\subset \ensuremath{\mathbb{R}}^{n+1}$ we define its essential oscillation in $E$ as \begin{align*} \essosc_E g:= \esssup_E g-\essinf_E g. \end{align*} The oscillation $\osc_E g$ of a bounded function $g$ is defined analogously, using the ordinary supremum and infimum. The parameters $C_0, C_1,m,n,p$ will collectively be referred to as the data. \subsection{Auxiliary tools} We now recall some elementary lemmas that will be used later, and start by defining a mollification in time as in \cite{KiLi}, see also \cite{BoeDuMa}. For $T>0$, $t\in [0,T]$, $h\in (0,T)$ and $v\in L^1(\Omega_T)$ we set \begin{align} \label{def:moll} v_h(x,t):=\frac{1}{h}\int^t_0 e^\frac{s-t}{h}v(x,s)\d s. \end{align} Moreover, we define the reversed analogue by \begin{align*} v_{\overline h}(x,t) :=\frac{1}{h}\int^T_t e^\frac{t-s}{h}v(x,s)\d s. \end{align*} For details regarding the properties of the exponential mollification we refer to \cite[Lemma 2.2]{KiLi}, \cite[Lemma 2.2]{BoeDuMa}, \cite[Lemma 2.9]{St}. The properties of the mollification that we will use have been collected for convenience into the following lemma: \begin{lem} \label{expmolproperties} Suppose that $v \in L^1(\Omega_T)$, and let $p\in[1,\infty)$. Then the mollification $v_h$ defined in \eqref{def:moll} has the following properties: \begin{enumerate} \item[(i)] If $v\in L^p(\Omega_T)$ then $v_h\in L^p(\Omega_T)$, $$ \norm{v_h}_{L^p(\Omega_T)}\leq \norm{v}_{L^p(\Omega_T)}, $$ and $v_h\to v$ in $L^p(\Omega_T)$. \item[(ii)] In the above situation, $v_h$ has a weak time derivative $\partial_t v_h$ on $\Omega_T$ given by \begin{align*} \partial_t v_h=\tfrac{1}{h}(v-v_h), \end{align*} whereas for $v_{\overline h}$ we have \begin{align*} \partial_t v_{\overline h}=\tfrac{1}{h}(v_{\overline h}-v). \end{align*} \item[(iii)] If $v\in L^p(0,T;W^{1,p}(\Omega))$ then $v_h\to v$ in $L^p(0,T;W^{1,p}(\Omega))$ as $h\to 0$. \item[(iv)] If $v\in L^p(0,T;L^{p}(\Omega))$ then $v_h \in C([0,T];L^{p}(\Omega))$. \end{enumerate} \end{lem} The next Lemma provides us with some useful estimates for the quantity $\b[v,w]$ that was defined in \eqref{definition:b}. The proof can be found in \cite[Lemma 2.3]{BoDuKoSc}. \begin{lem} \label{estimates:boundary_terms} Let $v,w \geq 0$ and $\beta> 1$. Then there exists a constant $c$ depending only on $\beta$ such that: \begin{enumerate} \item[(i)] $\tfrac 1 c\big| w^{\frac{\beta+1}{2}}-v^{\frac{\beta+1}{2}} \big|^2 \leq \b[v,w] \leq c \big| w^{\frac{\beta+1}{2}}-v^{\frac{\beta+1}{2}} \big|^2$ \vspace{2mm} \item[(ii)] $\tfrac 1 c | w^{\beta}-v^{\beta}|^2 \leq \left( w^{\beta-1}+v^{\beta-1}\right) \b[v,w] \leq c |w^{\beta}-v^{\beta}|^2 $ \item[(iii)]$\b[v,w] \leq c |v^{\beta}-w^{\beta}|^{\frac{\beta+1}{\beta}}$ \end{enumerate} \end{lem} Next, we recall a well-known parabolic Sobolev inequality, which can be found for example in \cite{DiBene}. For the proof, we refer to \cite[Lemma 3.2]{Sche}. \begin{lem} \label{lemma:Gagliardo} Let $z_o=(x_o,t_o)\in \ensuremath{\mathbb{R}}^{n+1}$ and $\theta>0$. Suppose that $q>0$, $p>1$. Then for every $$ u\in L^\infty (t_o-\theta,t_o;L^q(B_r(x_o))) \cap L^p(t_o-\theta,t_o;W^{1,p}_0(B_r(x_o))) $$ we have \begin{align*} \iint_{Q_{r,\theta}(z_o)} |u|^{p(1+\frac qn)} \d x\d t& \leq c\bigg(\esssup_{t\in (t_o-\theta,t_o)} \int_{B_r(x_o)\times \{t\}} |u|^q \d x\bigg)^{\frac pn} \iint_{Q_{r,\theta}(z_o)} |\nabla u|^p \d x\d t \end{align*} for a constant $c=c(n,p,q)$. \end{lem} The following lemma can be proven using an inductive argument, see for example \cite[Lemma 7.1]{Gi}. \begin{lem} \label{fastconvg} Let $(Y_j)^\infty_{j=0}$ be a positive sequence such that \begin{equation*} Y_{j+1}\leq C b^j Y^{1+\delta}_j, \end{equation*} where $C, b >1$ and $\delta>0$. If \begin{equation*} Y_0\leq C^{-\frac{1}{\delta}}b^{-\frac{1}{\delta^2}}, \end{equation*} then $(Y_j)$ converges to zero as $j\to\infty$. \end{lem} A form of the following lemma was originally proven by De Giorgi\cite{DeGi}, see also \cite{DiBene}. \begin{lem}\label{isoperim} Let $v\in W^{1,1}(B_\rho(x_o))$ for some $\rho>0$ and $x_o\in \ensuremath{\mathbb{R}}^n$. Let $k$ and $l$ be real numbers such that $k<l$. Then there exists a constant $c$ depending only on $n$ (and thus independent of $k,l,v,x_o$ and $\rho$) such that for any representative of $v$, we have \begin{align*} (l-k)|\{x\in B_\rho(x_o) : v(x)>l\}|\leq \frac{c \rho^{n+1}}{|\{x\in B_\rho(x_o) : v(x)<k\}|}\int_{\{k<v<l\}\cap B_\rho(x_o)}|\nabla v|\d x. \end{align*} \end{lem} The following lemma is a special case of Theorem 1.1 in section IV.1 of \cite{DiBene}. \begin{lem}\label{lem:p-parabolic_hold_cont} Let $1<p<2$ and suppose that $v\in L^p(0,T;W^{1,p}(\Omega))\cap L^\infty(\Omega_T)$ is a weak solution to the equation \begin{align*} \partial_t v-\nabla \cdot \big(\tilde{A}(x,t,v,\nabla v)\big) =0, \end{align*} where $\tilde{A}$ satisfies the structure conditions \begin{align*} |\tilde{A}(x,t,v,\xi)|&\leq \tilde{C}_1|\xi|^{p-1} \\ \tilde{A}(x,t,v,\xi)\cdot \xi &\geq \tilde{C}_0|\xi|^p. \end{align*} Then $v$ is locally H\"older continuous in $\Omega_T$ and there are constants $c>1$ and $\nu \in (0,1)$ depending only on $n,p, \tilde{C}_0, \tilde{C}_1$ such that for any subset $K\subset \Omega_T$, compactly contained in $\Omega\times (0,T]$, we have for all $(x,t),(y,s)\in K$ that \begin{align*} |v(x,t)-v(y,s)|\leq c\norm{v}_{L^\infty(\Omega_T)}\bigg( \frac{\norm{v}_{L^\infty(\Omega_T)}^\frac{2-p}{p}|x-y|+|t-s|^\frac{1}{p}}{d_p(K)} \bigg)^\nu, \end{align*} where \begin{align*} d_p(K):=\inf_{\substack{ (x,t)\in K \\ (y,s)\in \partial_p \Omega_T}}\Big( \norm{v}_{L^\infty(\Omega_T)}^\frac{2-p}{p}|x-y|+|t-s|^\frac{1}{p} \Big). \end{align*} \end{lem} The next lemma shows that weak solutions to \eqref{general} which are bounded from below and above by positive constants are in fact also solutions to an equation of parabolic $p$-Laplace type (in the case $M=1$). It also investigates how solutions are affected by re-scaling. \begin{lem}\label{re-scaling} Let $A$ satisfy the structure conditions \eqref{structcond1} and \eqref{structcond2} and suppose that $u$ is a weak solution to \eqref{general} in the cylinder $B_R(x_o)\times (0,M^{3-m-p}\tau)$. Suppose furthermore that \begin{align}\label{ubounds} \beta_0 M \leq u \leq \beta_1 M, \end{align} for some positive constants $\beta_0,\beta_1$. Then the function \begin{align*} v(x,t)=M^{-1}u(x, M^{3-m-p}t), \hspace{5mm} (x,t)\in B_R(x_o)\times (0,\tau), \end{align*} has a weak $p$-integrable gradient, and is a weak solution in $B_R(x_o)\times (0,\tau)$ to the equation \begin{align}\label{tildeweakform} \partial_t v-\nabla \cdot \big(\tilde{A}(x,t,\nabla v)\big)=0, \end{align} where \begin{align*} \tilde{A}(x,t,\xi):= M^{2-m-p}A\big(x, M^{3-m-p}t, Mv(x,t), \beta M^\beta v^{\beta-1}(x,t)\xi\big). \end{align*} The vector field $\tilde{A}$ satisfies the structure conditions \begin{align*} |\tilde{A}(x,t,\xi)|&\leq C_1\beta^{p-1}\beta_1^{(\beta-1)(p-1)}|\xi|^{p-1} \\ \tilde{A}(x,t,\xi)\cdot \xi &\geq C_0\beta^{p-1}\beta_0^{(\beta-1)(p-1)}|\xi|^p, \end{align*} where $C_0$ and $C_1$ are the constants appearing in the structure conditions \eqref{structcond1} and \eqref{structcond2}. \end{lem} \begin{proof}[Proof] The bounds on $u$ show that the chain rule holds in the following form: \begin{align}\label{nabla_u} \nabla u=\nabla (u^\beta)^\frac{1}{\beta}=\beta^{-1} u^{1-\beta}\nabla u^\beta. \end{align} Note especially that the lower bound on $u$ guarantees that $u^{1-\beta}$ stays bounded despite the negative exponent. From these observations it follows that also $v$ has a weak gradient which is $p$-integrable. By a change of variables in the time variable in the weak formulation \eqref{weakform2}, and by taking note of \eqref{nabla_u}, one can see that $v$ satisfies \eqref{tildeweakform} weakly. The structure conditions for $\tilde{A}$ follow from the corresponding conditions satisfied by $A$, and the bounds \eqref{ubounds}. \end{proof} \subsection{Continuity in time and mollified weak formulation}\label{subsec:time-cont} In this subsection we show that weak solutions are continuous in time as maps into $L^{\beta+1}_{\textrm{loc}}(\Omega)$. The proof is adapted from \cite{St}. We start with a lemma. \begin{lem}\label{lem:time-cont} Suppose that $u$ is a weak solution in the sense of Definition \ref{weakdef} and define \begin{align*} \mathcal{V}:=\big\{ w\in L^{\beta+1}(\Omega_T)\, |\, w^\beta\in L^p(0,T;W^{1,p}(\Omega)), \, \partial_t w^\beta \in L^{\frac{\beta+1}{\beta}}(\Omega_T) \big\}. \end{align*} Then, for every $\zeta\in C^\infty_0(\Omega_T,\ensuremath{\mathbb{R}}_{\geq 0})$ and $w\in \mathcal V$ we have \begin{align} \label{eq:time_1} \iint_{\Omega_T} \partial_t \zeta \b[u,w] \d x\d t = \iint_{\Omega_T} A(x,t,u,\nabla u^\beta) \cdot \nabla[\zeta(u^\beta-w^\beta)] + \zeta \partial_t w^\beta (u-w) \d x\d t. \end{align} \end{lem} \begin{proof}[Proof] Let $w\in \mathcal V$, $\zeta \in C^\infty_0(\Omega_T,\ensuremath{\mathbb{R}}_{\geq 0})$ and choose $$ \varphi =\zeta \left( w^\beta-[u^\beta]_h \right) $$ as test function in \eqref{weakform2}. Our goal is to pass to the limit $h\to 0$. It follows from Lemma \ref{expmolproperties} (iii) that \begin{align*} \iint_{\Omega_T}A(x,t,u,\nabla u^\beta)\cdot \nabla \varphi \d t \d t \xrightarrow[h\to 0]{} \iint_{\Omega_T} A(x,t,u,\nabla u^\beta)\cdot \nabla [\zeta (w^\beta-u^\beta)]\d x \d t. \end{align*} Note that Lemma \ref{expmolproperties} (ii) implies $$ \big( [u^\beta]_h^{\frac 1 \beta} -u\big) \partial_t [u^\beta]_h\leq 0, $$ which shows that we can treat the parabolic part as follows. \begin{align*} \iint_{\Omega_T} u\partial_t \varphi \d x\d t&=\iint_{\Omega_T} \zeta u \partial_t w^\beta \d x\d t -\iint_{\Omega_T} \zeta [u^\beta]_h^{\frac 1 \beta} \partial_t [u^\beta]_h \d x\d t \\ &\quad+ \iint_{\Omega_T} \zeta \big( [u^\beta]_h^{\frac 1 \beta} -u\big) \partial_t [u^\beta]_h \d x\d t+ \iint_{\Omega_T} \partial_t \zeta u \big( w^\beta-[u^\beta]_h \big) \d x\d t \\ &\leq \iint_{\Omega_T} \zeta u \partial_t w^\beta\d x\d t+ \iint_{\Omega_T} \tfrac{\beta}{\beta+1} \partial_t \zeta [u^\beta]_h^{\frac{\beta+1}{\beta}} \d x\d t \\ &\quad +\iint_{\Omega_T} \partial_t \zeta u \big(w^\beta-[u^\beta]_h \big) \d x\d t \\ &\xrightarrow[h\to 0]{} \iint_{\Omega_T} \zeta u \partial_t w^\beta \d x\d t+ \iint_{\Omega_T} \partial_t \zeta \big(\tfrac{\beta}{\beta+1} u^{\beta+1}+u(w^\beta-u^\beta) \big) \d x\d t \\ &\quad =\iint_{\Omega_T} \zeta \partial_t w^\beta (u-w) \d x\d t -\iint_{\Omega_T} \partial_t \zeta \b[u,w] \d x \d t, \end{align*} This shows ``$\leq$'' in \eqref{eq:time_1}. The reverse inequality can be derived in the same way by taking $$ \varphi =\zeta \left( w^\beta-[v^\beta]_{\overline h} \right) $$ as test function. \end{proof} \begin{theo}\label{cont_into_Lbetaplusone} Let $u$ be a weak solution in the sense of Definition \ref{weakdef}. Then \\ $u\in C([0,T];L^{\beta+1}_\textrm{loc}(\Omega))$. \end{theo} \begin{proof}[Proof] We prove continuity on the interval $[0,\tfrac12 T]$ and describe later how the argument can be modified to show continuity also on $[\tfrac12 T,T]$, thus completing the proof. We first note that due to Lemma \ref{expmolproperties}, $w:=([u^\beta]_{\bar{h}} )^\frac{1}{\beta}$ belongs to the set of admissible comparison functions $\mathcal{V}$ of Lemma \ref{lem:time-cont}. Furthermore, since Lemma \ref{expmolproperties} (iv) guarantees that $w^\beta$ is continuous $[0,T]\to L^\frac{\beta+1}{\beta}(\Omega)$ and since \begin{align*} |w(x,s)-w(x,t)|^{\beta+1}\leq |w^\beta (x,s)-w^\beta (x,t)|^\frac{\beta+1}{\beta}=|[u^\beta]_{\bar{h}}(x,s) - [u^\beta]_{\bar{h}}(x,t)|^\frac{\beta+1}{\beta}, \end{align*} we see that $w$ is continuous $[0,T]\to L^{\beta+1}(\Omega)$. We will show that $u$ is essentially the uniform limit on the time interval $[0,\tfrac12 T]$ of the functions $w$ as $h\to 0$, and the continuity will follow from this. For a compact set $K\subset \Omega$ we take $\eta \in C^\infty_0(\Omega;[0,1])$ such that $\eta=1$ on $K$ and $|\nabla \eta|\leq C_K$. Furthermore, take $\psi\in C^\infty([0,T];[0,1])$ with $\psi=1$ on $[T,\tfrac12 T]$, $\psi=0$ on $[\tfrac34 T,T]$ and $|\psi'|\leq \tfrac8T$. For $\tau\in (0,\tfrac12 T)$ and $\varepsilon>0$ so small that $\tau+\varepsilon< \tfrac12 T$ we define \begin{align*} \chi^\tau_\varepsilon(t)= \begin{cases} 0, & t<\tau \\ \varepsilon^{-1}(t-\tau), & t\in [\tau, \tau+\varepsilon] \\ 1, & t> \tau+\varepsilon. \end{cases} \end{align*} We use \eqref{eq:time_1} with $\zeta=\eta\chi^\tau_\varepsilon\psi$ and $w=([u^\beta]_{\bar{h}} )^\frac{1}{\beta}$ to obtain \begin{align*} \varepsilon^{-1} \int^{\tau+\varepsilon}_\tau\int_\Omega \b[u,w]\eta \d x\d t &= \iint_{\Omega_T} A(x,t,u,\nabla u^\beta) \cdot \nabla[\eta(u^\beta-w^\beta)]\chi^\tau_\varepsilon\psi \d x \d t \\ &\quad + \iint_{\Omega_T}\eta\chi^\tau_\varepsilon\psi \partial_t w^\beta (u-w) \d x\d t - \iint_{\Omega_T} \b[u,w]\eta \psi'\d x \d t \\ &\leq \iint_{\Omega_T} |A(x,t,u,\nabla u^\beta)| (|\nabla u^\beta -\nabla [u^\beta]_{\bar{h}}| + |\nabla\eta| |u^\beta - [u^\beta]_{\bar{h}}|)\d x \d t \\ & \quad + \frac{8}{T}\iint_{\Omega_T} \b[u,w]\d x \d t. \end{align*} Here we were able to drop the term involving $\partial_t w^\beta$ since Lemma \ref{expmolproperties} (ii) shows that the factors $\partial_t w^\beta$ and $(u-w)$ are of opposite sign, and hence their product is nonpositive. Passing to the limit $\varepsilon\to 0$ we see that \begin{align}\label{gs} \int_K \b[u,w](x,\tau) \d x & \leq C_K \iint_{\Omega_T} |A(x,t,u,\nabla u^\beta)| (|\nabla u^\beta -\nabla [u^\beta]_{\bar{h}}| + |u^\beta - [u^\beta]_{\bar{h}}|)\d x \d t \\ \notag & \quad + \frac{8}{T}\iint_{\Omega_T} \b[u,w]\d x \d t \end{align} for all $\tau\in [0,\tfrac12 T]\setminus N_h$, where $N_h$ is a set of measure zero. Note that the integrand on the left-hand side can be estimated using Lemma \ref{estimates:boundary_terms} (ii) and the fact that $\beta>1$ as follows \begin{align*} |u-w|^{\beta+1}=(|u-w|^\frac{\beta+1}{2})^2\leq \big| u^{\frac{\beta+1}{2}}-w^{\frac{\beta+1}{2}} \big|^2 \leq c \b[u,w]. \end{align*} For the term on the last line of \eqref{gs} we can use Lemma \ref{estimates:boundary_terms} (iii) to make the estimate \begin{align*} \b[u,w] &\leq c |u^\beta-[u^\beta]_{\bar{h}} \big|^{\frac{\beta+1}{\beta}} =c |u^\beta-[u^\beta]_{\bar{h}} \big|^\frac{1}{\beta}|u^\beta-[u^\beta]_{\bar{h}} \big| \leq c(u + ([u^\beta]_{\bar{h}})^\frac{1}{\beta})|u^\beta - [u^\beta]_{\bar{h}}|. \end{align*} The first factor stays bounded in $L^{\beta+1}$ as $h\to 0$ and the second factor converges to zero in $L^\frac{\beta+1}{\beta}$ as $h\to 0$. The fact that $|A(u,\nabla u^\beta)|\in L^{p'}(\Omega_T)$ combined with Lemma \ref{expmolproperties} (iii) show that also the first integral on the right-hand side of \eqref{gs} converges to zero as $h\to 0$. Picking now a sequence $h_j\to 0$ and $w_j=([u^\beta]_{\bar{h}_j} )^\frac{1}{\beta}$ and $N:= \cup N_{h_j}$ (which has measure zero) we see that \eqref{gs} combined with the previous observations implies \begin{align}\label{unif_limit} \lim_{j\to \infty} \sup_{\tau\in [0,\frac{1}{2}T]\setminus N} \int_K |u-w_j|^{\beta+1}(x,\tau) \d x = 0. \end{align} As noted earlier, each $w_j$ is continuous as a map $[0,T]\to L^{\beta+1}(K)$ so the uniform limit \eqref{unif_limit} shows that $u$ has a representative which is continuous on $[0,\tfrac12T]\setminus N$. By the completeness of $L^{\beta+1}(K)$ we find a representative of $u$ which is continuous $[0,\tfrac12T]\to L^{\beta+1}(K)$. The continuity on $[\tfrac12T,T]$ follows from a similar argument with $w=([u^\beta]_h)^\frac{1}{\beta}$ and with $\psi$ and $\chi^\tau_\varepsilon$ mirrored on the interval $[0,T]$ under the map $t\mapsto T-t$.\end{proof} Now that we have established the continuity in time it is possible to show that weak solutions in the sense of Definition \ref{weakdef} satisfy a mollified weak formulation. \begin{lem}\label{lem:mollified} Let $u$ be a weak solution in the sense of Definition \ref{weakdef}. Then we have \begin{align}\label{h-averaged-form} \iint_{\Omega_T} [A(x,\cdot,u, \nabla u^\beta)]_h\cdot \nabla \phi+\partial_t u_h \phi\d x\d t- \int_\Omega u(x,0) \phi_{\bar{h}}(x,0) \d x = 0 \end{align} for all $\phi \in C^\infty(\Omega \times [0,T])$ with support contained in $K\times [0,\tau]$ ,where $K\subset \Omega$ is compact and $\tau \in (0,T)$. Here $u(x,0)$ refers to the value at time zero of the continuous representative of $u$ as a map $[0,T]\to L^{\beta+1}(K)$. \end{lem} \begin{proof}[Proof] Consider the piecewise smooth function \begin{align*} \eta_\varepsilon (t):= \begin{cases} \, \frac{t}{\varepsilon}, & t\in[0,\varepsilon] \\ \, 1, & t\in (\varepsilon, T], \end{cases} \end{align*} and use \eqref{weakform2} with the test function $\varphi=\eta_\varepsilon\phi_{\bar{h}}$. Taking the limit $\varepsilon \to 0$ and using Fubini's theorem we see that the elliptic term will converge to the integral of $[A(x,\cdot,u,\nabla u^\beta)]_h \cdot \nabla \phi$. Note now that \begin{align*} \iint_{\Omega_T} u\partial_t(\eta_\varepsilon\phi_{\bar{h}})\d x \d t = \iint_{\Omega_T}u\eta_\varepsilon\frac{\phi_{\bar{h}}-\phi}{h}\d x \d t +\varepsilon^{-1} \int^\varepsilon_0\int_\Omega u \phi_{\bar{h}} \d x \d t. \end{align*} In the first term we can pass to the limit $\varepsilon\to 0$, use Fubini's theorem and Lemma \ref{expmolproperties} (ii) to obtain the integral of $\partial_t u_h \varphi$. It remains to investigate what happens to the last term in the limit $\varepsilon\to 0$. Note that we can write this term as \begin{align*} \varepsilon^{-1} \int^\varepsilon_0\int_K u \phi_{\bar{h}} \d x \d t =\varepsilon^{-1} \int^\varepsilon_0 \int_K u(x,t) \phi_{\bar{h}}(0) \d x \d t + \varepsilon^{-1} \int^\varepsilon_0 \int_K u(x,t)[ \phi_{\bar{h}}(t)- \phi_{\bar{h}}(0) ]\d x \d t. \end{align*} The second term on the right-hand side converges to zero since $\phi_{\bar{h}}$ is uniformly continuous and $\norm{u(t)}_{L^{\beta+1}(K)}$ is bounded independent of $t$. The first term on the right-hand side converges to the second integral on the left-hand side of \eqref{h-averaged-form} since $u\in C([0,T]; L^{\beta+1}(K))$ and $\phi_{\bar{h}}(0)\in L^\frac{\beta+1}{\beta}(\Omega)$. \end{proof} \section{Energy Estimates}\label{sec:energy} Here we discuss various energy estimates. We begin by showing that the assumptions on $u$ made in Definition \ref{weakdef} allow suitable choices of test functions in the mollified weak formulation. This is a crucial step in obtaining a rigourous proof for the energy estimates. We want to use test functions involving $(u^\beta-k^\beta)_\pm$ for some $k\geq0$. Since these functions have a $p$-integrable gradient, they automatically fit with the elliptic term in \eqref{h-averaged-form}. The minimal integrability of $u$ which justifies the test function becomes apparent from the diffusive part of the mollified weak formulation: If $u\in L^q$ then $\partial_t u_h\in L^q$ and $(u^\beta-k^\beta)_\pm \in L^\frac{q}{\beta}$. These exponents should be at least dual exponents so we need \begin{align*} \frac{1}{q}+\frac{1}{q/\beta}\leq 1, \end{align*} which is equivalent to $q\geq \beta +1$. This is exactly the integrability we required in Definition \ref{weakdef}. We now show the energy estimate for solutions according to Definition \ref{weakdef}. \begin{lem}\label{lem:Energy_Est} Let $u$ be a weak solution in the sense of Definition \ref{weakdef}. Then \begin{align}\label{caccioppoli} \iint_{\Omega_T} |\nabla (u^\beta-k^\beta)_\pm|^p\varphi^p\d x \d t + \esssup_{\tau\in [0,T]}\int_\Omega \b[u,k] \chi_{\{(u-k)_\pm > 0\}}\varphi^p(x,\tau)\d x \\ \notag \leq C\iint_{\Omega_T}(u^\beta-k^\beta)^p_\pm |\nabla \varphi|^p\d x\d t + \iint_{\Omega_T} \b[u,k] \chi_{\{(u-k)_\pm > 0\}} |\partial_t \varphi^p|\d x \d t, \end{align} for all smooth $\varphi\geq 0$ defined on $\bar{\Omega}_T$, vanishing for $x$ outside a compact $K\subset \Omega$ and for all times less than some $\delta>0$. The constant $C$ only depends on the data. \end{lem} \begin{proof}[Proof] We prove the case for the positive part. The case for the negative part is similar. We use the mollified weak formulation \eqref{h-averaged-form} with the test function \noindent $\phi = (u^\beta-k^\beta)_+\varphi^p\xi_{\tau,\varepsilon}$ where $\varphi$ is as in the statement of the lemma and $\xi_{\tau,\varepsilon}$ is defined as \begin{align}\label{def:xi} \xi_{\tau,\varepsilon}(t):=\begin{cases} \, 1, &t<\tau \\ \, 1-\varepsilon^{-1}(\tau-t), &t\in [\tau, \tau+\varepsilon] \\ \, 0, &t>\tau+\varepsilon. \end{cases} \end{align} Even though $\phi$ is nonsmooth, it is still an admisssible test function since we can find a sequence of functions $\phi_j\in C^\infty_0(\Omega_T)$ converging to $\phi$ in $L^p(0,T;W^{1,p}_0(\Omega))\cap L^\frac{\beta+1}{\beta}(\Omega_T)$. Our goal is to make some estimates in \eqref{h-averaged-form} and pass to the limit $h\to 0$ and then $\varepsilon \to 0$. We first show that the term involving the initial value vanishes in this process. Taking into account the support of $\phi$ we have \begin{align*} \int_\Omega u(x,0) \phi_{\bar{h}}(x,0) \d x &= \iint_{\Omega_T} u(x,0) h^{-1}e^{-\frac{t}{h}}\phi(x,t)\d x\d t = \int^T_\delta \int_\Omega u(x,0) h^{-1}e^{-\frac{t}{h}}\phi(x,t)\d x\d t \\ &\leq \int^T_\delta \int_\Omega u(x,0) \delta^{-1} (\tfrac{\delta}{h} e^{-\frac{\delta}{h}})\phi(x,t)\d x\d t\xrightarrow[h\to 0]{} 0, \end{align*} due to the dominated convergence theorem. The elliptic term can be treated using Lemma \ref{expmolproperties} (i) as \begin{align*} \iint_{\Omega_T} [A(x,\cdot,u, \nabla u^\beta)]_h\cdot \nabla \phi \d x \d t &\xrightarrow[h\to 0]{} \iint_{\Omega_T} A(x,t,u, \nabla u^\beta)\cdot \nabla \phi \d x \d t \\ &\xrightarrow[\varepsilon\to 0]{} \iint_{\Omega_\tau} A(x,t,u, \nabla u^\beta)\cdot \nabla [(u^\beta-k^\beta)_+\varphi^p] \d x \d t \end{align*} We now calculate \begin{align*} \nabla \phi = \varphi^p\xi_{\tau,\varepsilon}\chi_{\{u>k\}}\nabla u^\beta + p(u^\beta-k^\beta)_+\xi_{\tau,\varepsilon}\varphi^{p-1}\nabla \varphi. \end{align*} From the properties of the vector field, here denoted only $A(u,\nabla u^\beta)$ for brevity, and Young's inequality we obtain \begin{align*} A(u,\nabla u^\beta) \cdot \nabla [(u^\beta-k^\beta)_+\varphi^p] &= A(u,\nabla u^\beta) \cdot \nabla u^\beta \chi_{\{u>k\}} \varphi^p + A(u,\nabla u^\beta) \cdot \nabla (\varphi^p)(u^\beta-k^\beta)_+ \\ &\geq c|\nabla u^\beta|^p \chi_{\{u>k\}} \varphi^p -|A(u,\nabla u^\beta)||\nabla \varphi|p\varphi^{p-1}(u^\beta-k^\beta)_+ \\ &\geq c|\nabla u^\beta|^p \chi_{\{u>k\}} \varphi^p -c|\nabla u^\beta|^{p-1}\varphi^{p-1}(u^\beta-k^\beta)_+|\nabla \varphi| \\ &\geq c|\nabla u^\beta|^p \chi_{\{u>k\}} \varphi^p- c(u^\beta-k^\beta)_+^p|\nabla \varphi|^p. \end{align*} Using Lemma \ref{expmolproperties} (ii) and the fact that $s\mapsto (s^\beta-k^\beta)_+$ is increasing we can treat the diffusion term as \begin{align*} \partial_t u_h \phi &= \big(\frac{u-u_h}{h}\big)[(u^\beta-k^\beta)_+ - ([u_h]^\beta-k^\beta)_+]\varphi^p\xi_{\tau,\varepsilon} + \partial_t u_h([u_h]^\beta-k^\beta)_+\varphi^p\xi_{\tau,\varepsilon} \\ &\geq \partial_t G(u_h) \varphi^p \xi_{\tau,\varepsilon}, \end{align*} where \begin{align}\label{G-def} G(u):= \int^u_0 (s^\beta-k^\beta)_+ \d s= \b[u,k]\chi_{\{u>k\}}. \end{align} The chain rule works in our case since Lemma \ref{expmolproperties} guarantees that both $u_h$ and $\partial_t u_h$ are in $L^{\beta+1}(\Omega_T)$. Thus, we may estimate \begin{align*} \iint_{\Omega_T} \partial_t u_h \phi\d x \d t &\geq \iint_{\Omega_T} \partial_t G(u_h) \varphi^p \xi_{\tau,\varepsilon} \d x \d t= - \iint_{\Omega_T} G(u_h)\partial_t(\varphi^p\xi_{\tau,\varepsilon}) \d x \d t \\ &\xrightarrow[h\to 0]{} - \iint_{\Omega_T} G(u)\partial_t(\varphi^p\xi_{\tau,\varepsilon}) \d x \d t \\ &=- \iint_{\Omega_T} G(u)\partial_t\varphi^p\xi_{\tau,\varepsilon} \d x \d t + \varepsilon^{-1}\int^{\tau+\varepsilon}_\tau \int_\Omega G(u) \varphi^p\d x \d t \\ &\xrightarrow[\varepsilon\to 0]{} - \iint_{\Omega_\tau} G(u)\partial_t\varphi^p\d x \d t + \int_\Omega G(u) \varphi^p(x,\tau)\d x, \end{align*} for a.e. $\tau$. Putting together the estimates for the elliptic and diffusion terms we have \begin{align*} c\iint_{\Omega_\tau}|\nabla u^\beta|^p \chi_{\{u>k\}} \varphi^p \d x \d t + \int_\Omega G(u) \varphi^p(x,\tau)\d x &\leq c \iint_{\Omega_\tau} (u^\beta-k^\beta)_+^p|\nabla \varphi|^p \d x \d t \\ &\quad + \iint_{\Omega_\tau} G(u)|\partial_t\varphi^p|\d x \d t, \end{align*} for a.e. $\tau$. We obtain the desired estimate by using \eqref{G-def} and noting that the right-hand side can be estimated upwards by replacing $\tau$ by $T$. \end{proof} The following variant of the energy estimate will also be useful. \begin{lem}\label{lem:alt-en-est} Let $\varphi \in C^\infty_0(\Omega;\ensuremath{\mathbb{R}}_{\geq 0})$ and suppose that $[t_1,t_2]\subset (0,T)$. Then the time-continuous representative of $u$ satisfies \begin{align}\label{klj} c^{-1}\int^{t_2}_{t_1}\int_\Omega& |\nabla (u^\beta-k^\beta)_-|^p\d x \d t + \int_\Omega \b[u,k]\chi_{\{u<k\}}\varphi^p(x,t_2)\d x \d t \\ \notag &\leq c \int^{t_2}_{t_1}\int_\Omega (u^\beta-k^\beta)_-^p|\nabla \varphi|^p\d x \d t+ \int_\Omega \b[u,k]\chi_{\{u<k\}}\varphi^p(x,t_1)\d x, \end{align} where $c>0$ is a constant depending only on $p,C_0,C_1$. \end{lem} \begin{proof}[Proof] We use the mollified weak formulation \eqref{h-averaged-form} with the test function \noindent $\phi=-(u^\beta-k^\beta)_-\varphi^p(x)\xi_\varepsilon(t)$, where \begin{align*} \xi_\varepsilon(t)=\begin{cases} 0, &t\leq t_1, \\ \varepsilon^{-1}(t-t_1), & t\in (t_1,t_1+\varepsilon), \\ 1, &t\in [t_1+\varepsilon,t_2], \\ \varepsilon^{-1}(t_2+\varepsilon-t), &t\in (t_2,t_2+\varepsilon), t\in (t_2,t_2+\varepsilon), \\ 0, & t\geq t_2+\varepsilon. \end{cases} \end{align*} Reasoning as in the proof of Lemma \ref{lem:Energy_Est} leads to \eqref{klj}. \end{proof} \section{$L^1$-Harnack inequality} In order to obtain the reduction of the oscillation we will use the fact that weak solutions satisfy a local $L^1$-Harnack inequality. Such a result was already obtained in \cite[Theorem 5.1]{FoSoVe} in a quite general setting, allowing for all $m>0$ and also a source term satisfying certain structure conditions. However, the proofs were made under the assumption that $u$ itself has a gradient, whereas in our case we only know that $u^\beta$ has a gradient. It turns out that the same strategy as in \cite{FoSoVe} works also in our case with some modifications. In this section we present the full proof in the case $m>1$ and without a source term. \begin{theo}[Harnack inequality]\label{harnack} Let $u$ be a nonnegative weak solution to \eqref{general} where the vector field $A(x,t,u,\xi)$ satisfies the structure conditions \eqref{structcond1} and \eqref{structcond2}, and the parameters satisfy the conditions \eqref{parameter-range}. Then there exists a positive constant $\gamma$ depending only on $m,n,p,C_0,C_1$ such that for all cylinders $\bar{B}_{2\rho}(y)\times[s,t]\subset \Omega\times [0,T)$, \begin{align*} \esssup_{\tau\in [s,t]}\int_{B_\rho(y)}u(x,\tau)\d x \leq \gamma \essinf_{\tau\in [s,t]}\int_{B_{2\rho}(y)}u(x,\tau)\d x + \gamma \left(\frac{t-s}{\rho^\lambda}\right)^\frac{1}{3-m-p}, \end{align*} where $\lambda= n(p+m-3)+p$. \end{theo} Note that $\lambda$ can have any sign. If we use the time continuous representative of $u$ we can replace the essential infimum and supremum by the actual infimum and supremum. Before proceeding we note that by translation we may assume that $s=0$. All of the calculations will be performed under this assumption, and the time interval $[s,t]$ will henceforth be labelled $[0,\tau]$, where $\tau \in (0,T)$. The first step of the argument is a lemma corresponding to \cite[Lemma 5.2]{FoSoVe}. \begin{lem}\label{femtvaa} Let $u$ be a weak solution, $\tau \in (0,T)$, $\sigma\in (0,1)$ and $B_\rho(x_o)\subset \Omega$. Then \begin{align}\label{est:harnack-lemma} \iint_{B_{\sigma\rho}(x_o)\times(0,\tau)}&|\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p} \d x \d t + \iint_{B_{\sigma\rho}(x_o)\times(0,\tau)} F_\varepsilon(u) t^{\frac{1}{p}-1}\d x \d t \\ \notag &\leq \frac{c\rho}{(1-\sigma)^p} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p}, \end{align} where $\lambda= n(p+m-3)+p$, $\varepsilon = (\tfrac{\tau}{\rho^p})^\frac{1}{3-m-p}$ and $F_\varepsilon$ is defined in \eqref{def:F} below. The constant $c$ depends only on $m,n,p, C_0,C_1$. \end{lem} \begin{proof}[Proof] Consider the mollified weak formulation \eqref{h-averaged-form} with the test function \begin{align*} \phi(x,t) = -(u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} t^\frac{1}{p}\varphi^p(x)\xi_{\tau,\delta}(t), \end{align*} where $\varepsilon > 0$, $\xi_{\tau,\delta}$ is defined as in \eqref{def:xi} and $\varphi\in C^\infty_0(B_\rho(x_o);[0,1])$ satisfies $\varphi=1$ on $B_{\sigma\rho}(x_o)$. We may thus choose $\varphi$ such that \begin{align*} |\nabla \varphi|\leq 2(1-\sigma)^{-1}\rho^{-1}. \end{align*} We have \begin{align*} \nabla \phi = \tfrac{(3-m-p)}{\beta p}(u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p(x)\xi_{\tau,\delta}(t)\nabla u^\beta - (u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} t^\frac{1}{p}\xi_{\tau,\delta}(t) \nabla \varphi^p(x). \end{align*} We see that \begin{align*} \iint_{\Omega_T}[A(x,\cdot,u,\nabla u^\beta)]_h \cdot \nabla \phi \d x \d t \xrightarrow[h\to 0]{} \iint_{\Omega_T} A(x,t,u,\nabla u^\beta) \cdot \nabla \phi \d x \d t, \end{align*} and \begin{align*} A&(x,t,u,\nabla u^\beta) \cdot \nabla \phi = \tfrac{(3-m-p)}{\beta p}(u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p \xi_{\tau,\delta}A(x,t,u,\nabla u^\beta)\cdot \nabla u^\beta \\ &\hspace{31mm} - p(u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} t^\frac{1}{p}\xi_{\tau,\delta}\varphi^{p-1} A(x,t,u,\nabla u^\beta)\cdot \nabla \varphi \\ &\geq c_0|\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p\xi_{\tau,\delta} - c_1(u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} t^\frac{1}{p}\xi_{\tau,\delta}\varphi^{p-1}|\nabla u^\beta|^{p-1}|\nabla \varphi| \\ &\geq \hat{c}_0|\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p\xi_{\tau,\delta} - \hat{c}_1 (u^\beta+\varepsilon^\beta)^{p-1+\frac{m+p-3}{\beta p}}t^\frac{1}{p}\xi_{\tau,\delta}|\nabla \varphi|^p. \end{align*} Here $c_0,c_1,\hat{c}_0,\hat{c}_1$ are constants depending only on $m,p,C_0,C_1$. For the initial value term we note that \begin{align*} \Big| \int_\Omega u(x,0) \phi_{\bar{h}}(x,0) \d x \Big| &= \Big| \iint_{\Omega_T} u(x,0) h^{-1}e^{-\frac{t}{h}}\phi(x,t)\d x\d t \Big| \\ &\leq c \iint_{\supp \varphi \times [0,T]} u(x,0) (\tfrac{t}{h} e^{-\frac{t}{h}}) t^{\frac{1}{p}-1}\d x\d t \xrightarrow[h\to 0]{} 0, \end{align*} by the dominated convergence theorem. The diffusion part is treated as follows: \begin{align*} \phi\partial_t u_h &= \big( \big[([u_h]^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} - (u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p}\big]\tfrac{(u-u_h)}{h} -([u_h]^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p}\partial_t u_h \big) t^\frac{1}{p}\varphi^p\xi_{\tau,\delta} \\ &\geq -([u_h]^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p}\partial_t u_h t^\frac{1}{p}\varphi^p\xi_{\tau,\delta} \\ &= -\partial_t[ F(u_h)] t^\frac{1}{p}\varphi^p\xi_{\tau,\delta}, \end{align*} where \begin{align}\label{def:F} F_\varepsilon(s):=\int^s_0 (t^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p}\d t \leq \int^s_0 t^\frac{m+p-3}{p}\d t = \tfrac{p}{2p+m-3} s^\frac{2p+m-3}{p}. \end{align} From this we see that \begin{align*} \iint_{\Omega_T} \phi\partial_t u_h\phi \d x \d t \geq &\iint_{\Omega_T} F_\varepsilon(u_h)\partial_t( t^\frac{1}{p}\varphi^p\xi_{\tau,\delta}) \d x \d t \\ \xrightarrow[h\to 0]{} &\iint_{\Omega_T} F_\varepsilon(u)\partial_t( t^\frac{1}{p}\varphi^p\xi_{\tau,\delta}) \d x \d t \\ =&\frac{1}{p}\iint_{\Omega_T} F_\varepsilon(u)\varphi^p t^{\frac{1}{p}-1}\xi_{\tau,\delta}\d x \d t - \delta^{-1}\int^{\tau+\delta}_\tau \int_\Omega F_\varepsilon(u)\varphi^p t^\frac{1}{p} \d x \d t \\ \xrightarrow[\delta\to 0]{}& \frac{1}{p}\iint_{\Omega_\tau} F_\varepsilon(u)\varphi^p t^{\frac{1}{p}-1}\d x \d t - \tau^\frac{1}{p}\int_\Omega F_\varepsilon(u)\varphi^p (x,\tau)\d x. \end{align*} To conclude the limit in the last term we use the Lipschitz continuity of $F$ and the time-continuity of $u$. Combining these estimates we have \begin{align}\label{sutevensu} &\iint_{\Omega_\tau}|\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p \d x \d t + \iint_{\Omega_\tau} F_\varepsilon(u)\varphi^p t^{\frac{1}{p}-1}\d x \d t \\ \notag &\quad \leq c\iint_{\Omega_\tau} (u^\beta+\varepsilon^\beta)^{p-1+\frac{m+p-3}{\beta p}}t^\frac{1}{p}|\nabla \varphi|^p\d x \d t + c\tau^\frac{1}{p}\int_\Omega F_\varepsilon(u)\varphi^p (x,\tau)\d x. \end{align} Taking into account the estimate in \eqref{def:F} and the support of $\varphi$, and applying H\"older's inequality we see that \begin{align*} \tau^\frac{1}{p}\int_\Omega F_\varepsilon(u)\varphi^p (x,\tau)\d x &\leq c \tau^\frac{1}{p}\int_{B_\rho(x_o)} u^\frac{2p+m-3}{p}(x,\tau) \varphi^p(x) \d x \\ &\leq \tau^\frac{1}{p}\Big[ \int_{B_\rho(x_o)} u(x,\tau) \d x \Big]^\frac{2p+m-3}{p} |B_\rho(x_o)|^\frac{3-m-p}{p} \\ &\leq c\tau^\frac{1}{p}\Big[ \sup_{t\in[0,\tau]}\int_{B_\rho(x_o)} u(x,t) \d x \Big]^\frac{2p+m-3}{p}\rho^\frac{n(3-m-p)}{p} \\ &=c\rho\Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p} \Big[ \sup_{t\in[0,\tau]}\int_{B_\rho(x_o)} u(x,t) \d x \Big]^\frac{2p+m-3}{p}. \end{align*} Using the bound on the gradient of $\varphi$ we may now estimate the other term on the right-hand side of \eqref{sutevensu} as \begin{align}\label{gottagofast} \iint_{\Omega_\tau} &(u^\beta+\varepsilon^\beta)^{p-1+\frac{m+p-3}{\beta p}}t^\frac{1}{p}|\nabla \varphi|^p\d x \d t \\ \notag &\leq \tfrac{c}{(1-\sigma)^p\rho^p}\iint_{B_\rho(x_o)\times(0,\tau)} (u^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta} (u^\beta+\varepsilon^\beta)^\frac{2p+m-3}{\beta p} t^\frac{1}{p}\d x \d t \\ \notag &\leq \tfrac{c}{(1-\sigma)^p\rho^p}\varepsilon^{m+p-3} \int^\tau_0\int_{B_\rho(x_o)} (u^\beta+\varepsilon^\beta)^\frac{2p+m-3}{\beta p} \d x\, t^\frac{1}{p} \d t \\ \notag &\leq \tfrac{c}{(1-\sigma)^p\rho^p}\varepsilon^{m+p-3} \tau^{\frac{1}{p}+1} \sup_{t\in [0,\tau]} \int_{B_\rho(x_o)} (u^\beta+\varepsilon^\beta)^\frac{2p+m-3}{\beta p}(x,t) \d x , \end{align} In the second step we use the fact that the exponent $\beta^{-1}(m+p-3)$ is negative. In the last step we estimate the integral over the ball by the supremum in time of such integrals, leaving only an integral in time of the factor $t^\frac{1}{p}$. The integral appearing in the last expression may be estimated further using H\"older's inequality and the definition of $\lambda$ as \begin{align}\label{mellansteg} \int_{B_\rho(x_o)} (u^\beta+\varepsilon^\beta)^\frac{2p+m-3}{\beta p} \d x &\leq \Big[ \int_{B_\rho(x_o)} (u^\beta+\varepsilon^\beta)^\frac{1}{\beta} \d x \Big]^\frac{2p+m-3}{p}|B_\rho(x_o)|^\frac{3-m-p}{p} \\ \notag &\leq c \Big[ \int_{B_\rho(x_o)} u \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p}\rho^{1-\frac{\lambda}{p}}. \end{align} Since the exponent $p^{-1}(2p+m-3)$ is positive, we can combine \eqref{gottagofast} and \eqref{mellansteg} taking the supremum inside the square brackets to obtain \begin{align*} \iint_{\Omega_\tau} (u^\beta+\varepsilon^\beta)^{p-1+\frac{m+p-3}{\beta p}}t^\frac{1}{p}|\nabla \varphi|^p\d x \d t &\leq \frac{c\rho}{(1-\sigma)^p}\Big(\frac{\tau}{\rho^p}\Big)\varepsilon^{m+p-3} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p} \\ &\quad \times\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p} \end{align*} Combining the estimate for the two terms on the right-hand side of \eqref{sutevensu} we end up with \begin{align}\label{almostthere} \iint_{\Omega_\tau}&|\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p} -1}t^\frac{1}{p}\varphi^p \d x \d t + \iint_{\Omega_\tau} F_\varepsilon(u)\varphi^p t^{\frac{1}{p}-1}\d x \d t \\ \notag &\leq \frac{c\rho}{(1-\sigma)^p} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}\Big[1+\varepsilon^{m+p-3}\Big(\frac{\tau}{\rho^p}\Big)\Big]\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p}. \end{align} Choosing now $\varepsilon=(\tfrac{\tau}{\rho^p})^\frac{1}{3-m-p}$ confirms \eqref{est:harnack-lemma}. \end{proof} Because of the somewhat more complicated calculations in our setting, we also need the following result, which does not appear in \cite{FoSoVe}. \begin{lem}\label{lem:somestuff} Let $F_\varepsilon$ be defined by \eqref{def:F} and let $\varepsilon>0$. Then there is a constant $c=c(m,p)$ such that \begin{align}\label{lem:u-eps-est} (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)} \leq cF_\varepsilon(u)+ c \varepsilon^{\frac{m+p-3}{p}+1}, \end{align} for all $u\geq 0$. \end{lem} \begin{proof}[Proof] Assume first $u>2 \varepsilon$. Then since $m+p-3<0$, \begin{align*} F_\varepsilon(u)&=\int^u_0 (t^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} \d t \geq \int^u_\varepsilon (t^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} \d t\ \geq \int^u_\varepsilon (2t^\beta)^\frac{m+p-3}{\beta p} \d t \\ &=c \big(u^{\frac{m+p-3}{p}+1}-\varepsilon^{\frac{m+p-3}{p}+1}\big) \geq \tilde{c}u^{\frac{m+p-3}{p}+1}, \end{align*} where in the last step we used the assumption $u>2\varepsilon$ and the fact that the exponent of $\varepsilon$ is positive. On the other hand, since $u>2\varepsilon$ we also have \begin{align*} (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)}\leq c u^{[\frac{3-m-p}{p}+\beta](p-1)}=cu^{\frac{m+p-3}{p}+1}, \end{align*} and combining the two estimates we have verified the claim in the case $u>2\varepsilon$. Suppose now $u\leq 2\varepsilon$. Then \begin{align*} F_\varepsilon(u) &= \int^u_0 (t^\beta+\varepsilon^\beta)^\frac{m+p-3}{\beta p} \d t \geq \int^u_0 ((1+2^\beta)\varepsilon^\beta )^\frac{m+p-3}{\beta p} \d t = c \varepsilon^{\frac{m+p-3}{p}}u \geq c u^{\frac{m+p-3}{p}+1} \\ &=c (u^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)} \geq c_1 (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)} - c_2 \varepsilon^{\frac{m+p-3}{p}+1}, \end{align*} where in the last step we used the fact that for positive $\alpha$ and nonnegative $a,b$ we have $a^\alpha\geq 2^{-\alpha}(a+b)^\alpha-b^\alpha$. Thus, we have verified the claim also in the case $u\leq 2\varepsilon$. \end{proof} The next lemma corresponds to \cite[Lemma 5.3]{FoSoVe}. A formal application of the chain rule shows that the the integrands on the left-hand side in both lemmas are essentially the same, although in our case the gradient of $u$ need not exist. The proof in our case is somewhat more complicated as we need also to use Lemma \ref{lem:somestuff}. \begin{lem}\label{drphil} Let $u$ be a weak solution and $\delta\in (0,1)$. Then there is a constant $c$ depending only on $m,n,p,C_0,C_1$ such that \begin{align*} \frac{1}{\rho}\int^\tau_0 \int_{B_{\sigma\rho}(x_o)} |\nabla u^\beta|^{p-1} \d x \d t \leq \delta \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \frac{c \delta^\frac{3-2p-m}{3-m-p}}{(1-\sigma)^\frac{p^2}{3-m-p}}\Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{3-m-p}. \end{align*} \end{lem} \begin{proof}[Proof] Choose $\varepsilon$ as in Lemma \ref{femtvaa}. By H\"older's inequality and the previous lemma, we have \begin{align}\label{pppp} &\int^\tau_0 \int_{B_{\sigma\rho}(x_o)} |\nabla u^\beta|^{p-1}\d x \d t \\ \notag &= \int^\tau_0\int_{B_{\sigma\rho}(x_o)} \Big[ |\nabla u^\beta|^{p-1}(u^\beta+\varepsilon^\beta)^{[\frac{m+p-3}{\beta p}-1]\frac{(p-1)}{p}}t^\frac{p-1}{p^2}\Big] \Big[ (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1]\frac{(p-1)}{p}} t^\frac{1-p}{p^2} \Big] \d x \d t \\ \notag & \leq \Big[ \int^\tau_0\int_{B_{\sigma\rho}(x_o)} |\nabla u^\beta|^p (u^\beta+\varepsilon^\beta)^{\frac{m+p-3}{\beta p}-1} t^\frac{1}{p}\d x \d t \Big]^\frac{p-1}{p} \\ \notag &\quad \times \Big[ \int^\tau_0\int_{B_{\sigma\rho}(x_o)} (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)}t^\frac{1-p}{p}\d x \d t\Big]^\frac{1}{p}. \end{align} The second integral in the last expression can be estimated by combining \eqref{lem:u-eps-est} and \eqref{est:harnack-lemma}: \begin{align*} \int^\tau_0&\int_{B_{\sigma\rho}(x_o)} (u^\beta+\varepsilon^\beta)^{[\frac{3-m-p}{\beta p}+1](p-1)}t^\frac{1-p}{p}\d x \d t \leq c \int^\tau_0\int_{B_{\sigma\rho}(x_o)} (F_\varepsilon(u) + \varepsilon^{\frac{m+p-3}{p}+1})t^\frac{1-p}{p}\d x \d t \\ &\leq c \int^\tau_0\int_{B_{\sigma\rho}(x_o)} F_\varepsilon(u)t^\frac{1-p}{p}\d x \d t + c \rho^n\varepsilon^{\frac{m+p-3}{p}+1}\tau^\frac{1}{p} \\ &\leq \frac{c\rho}{(1-\sigma)^p} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p} + c\rho \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}(\varepsilon\rho^n)^\frac{2p+m-3}{p} \\ &\leq \frac{c\rho}{(1-\sigma)^p} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p}. \end{align*} Since also the other integral appearing in the last expression of \eqref{pppp} can be estimated using \eqref{est:harnack-lemma}, we have \begin{align*} \int^\tau_0 \int_{B_{\sigma\rho}(x_o)} |\nabla u^\beta|^{p-1}\d x \d t \leq \frac{c\rho}{(1-\sigma)^p} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{p}\Big[ \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x + \varepsilon\rho^n \Big]^\frac{2p+m-3}{p}. \end{align*} Dividing by $\rho$ and applying Young's inequality to the right-hand side yields the claim. \end{proof} Now we can finally prove the Harnack inequality. \begin{proof}[Proof of Theorem \ref{harnack}]. For $j\in \ensuremath{\mathbb{N}}$ we choose \begin{align*} \rho_j&:=2(1-2^{-j})\rho,\hspace{4mm} \tilde{\rho}_j:=\frac{1}{2}(\rho_j+\rho_{j+1}) \\ B_j&:=B_{\rho_j}(x_o),\hspace{9mm} \tilde{B}_j :=B_{\tilde{\rho}_j}(x_o) \end{align*} Pick $\zeta_j\in C^\infty_0(B_{\tilde{\rho}_j}(x_o);[0,1])$ such that $\zeta_j=1$ on $B_{\rho_j}(x_o)$ and We use the weak formulation \eqref{weakform2} with the test function $\varphi=\zeta_j\xi^r_{\tau_1,\tau_2}$ where $r>0$, $\tau_1<\tau_2<\tau$ and \begin{align*} \xi^r_{\tau_1,\tau_2}(t)= \begin{cases} 0, &t<\tau_1, \\ r^{-1}(t-\tau_1), &t\in [\tau_1,\tau_1+r] \\ 1, & t\in (\tau_1+r,\tau_2) \\ r^{-1}(\tau_2+r-t), &t\in [\tau_2,\tau_2+r], \\ 0, &t>\tau_2+r. \end{cases} \end{align*} This implies \begin{align*} \frac{1}{r}\int^{\tau_2}_{\tau_1} \int_\Omega u\zeta_j\d x\d t = \iint_{\Omega_T} A(u,\nabla u^\beta) \cdot \nabla \zeta_j \xi^r_{\tau_1,\tau_2}\d x \d t + \frac{1}{r}\int^{\tau_2}_{\tau_1} \int_\Omega u\zeta_j\d x\d t. \end{align*} Passing to the limit $r\to 0$ and using the structure conditions and properties of $\zeta_j$ we have \begin{align}\label{psk} \int_{B_j} u(x,\tau_1)\d x \leq \int_\Omega u\zeta_j(x,\tau_1) \d x &= \int^{\tau_2}_{\tau_1}\int_\Omega A(u,\nabla u^\beta) \cdot \nabla \zeta_j \d x \d t + \int_\Omega u\zeta_j(x,\tau_2)\d x \\ \notag &\leq \int^{\tau_2}_{\tau_1}\int_\Omega |A(u,\nabla u^\beta)| |\nabla \zeta_j| \d x \d t + \int_\Omega u\zeta_j(x,\tau_2)\d x \\ \notag &\leq c\frac{2^j}{\rho} \int^{\tau}_0\int_{\tilde{B}_j}|\nabla u^\beta|^{p-1}\d x \d t + \int_{B_{j+1}}u(x,\tau_2)\d x, \end{align} for all $\tau_1,\tau_2$ due to the time-continuity of $u$. Although we assumed $\tau_1<\tau_2$, we see by a similar calculation that the estimate remains valid for $\tau_1\geq \tau_2$. We want to estimate the double integral in the last expression using Lemma \ref{drphil} with $\rho$ replaced by $\rho_{j+1}$, and consequently with $\sigma:=\tilde{\rho}_j/\rho_{j+1}$. Directly from the definition it follows that \begin{align*} \frac{1}{1-\sigma}< 2^{j+2}. \end{align*} Taking this into account, Lemma \ref{drphil} shows that \begin{align*} \int_{B_j} u(x,\tau_1)\d x \leq c 2^j \delta \sup_{t\in[0,\tau]} \int_{B_{j+1}} u(x,t) \d x + c \frac{2^{\frac{jp^2}{3-m-p}+j}}{\delta^\frac{2p+m-3}{3-m-p}} \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{3-m-p} + \int_{B_{j+1}}u(x,\tau_2)\d x, \end{align*} for all $\delta\in (0,1)$. Here we also used the fact that all the elements of the sequence $(\rho_j)$ are comparable in size to $\rho$. Taking now $\delta=c^{-1}2^{-1}\varepsilon_o$ where $\varepsilon_o\in (0,1)$ and $c\geq 1$ is the constant from the previous estimate, we see that \begin{align*} \int_{B_j} u(x,\tau_1)\d x \leq \varepsilon_o \sup_{t\in[0,\tau]} \int_{B_{j+1}} u(x,t) \d x + cb^j \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{3-m-p} + \int_{B_{2\rho}(x_o)}u(x,\tau_2)\d x, \end{align*} where $b=b(m,n,p, C_0, C_1)$ and $c=c(m,n,p, C_0, C_1, \varepsilon_o)$. We also used the fact that $B_{j+1}\subset B_{2\rho}(x_o)$. Recalling that the inequality holds for a.e. $\tau_1,\tau_2\in (0,\tau)$ we see that it implies \begin{align*} S_j\leq \varepsilon_o S_{j+1} + c b^j \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{3-m-p} + I, \end{align*} where \begin{align}\label{iterative_esssup_ineq} S_j:= \sup_{t\in[0,\tau]} \int_{B_j} u(x,t) \d x, \hspace{5mm} I:= \inf_{t\in[0,\tau]} \int_{B_{2\rho}(x_o)}u(x,t)\d x. \end{align} Iterating \eqref{iterative_esssup_ineq} we have \begin{align}\label{iterated} \sup_{t\in[0,\tau]} \int_{B_\rho(x_o)} u(x,t) \d x = S_1 \leq \varepsilon_o^M S_{M+1}+ c b \Big(\frac{\tau}{\rho^\lambda}\Big)^\frac{1}{3-m-p} \sum^{M-1}_{j=0}(b\varepsilon_o)^j+ I\sum^{M-1}_{j=0}\varepsilon_o^j. \end{align} choose now for example $\varepsilon_o= \tfrac{1}{2b}$ so that both of the sums in \eqref{iterated} converge in the limit $M\to \infty$. Then, since \begin{align*} S_{M+1}\leq \sup_{t\in[0,\tau]} \int_{B_{2\rho}(x_o)} u(x,t) \d x, \end{align*} where the right-hand side finite due to the time-continuity of $u$, we see that we can pass to the limit $M\to \infty$ which yields the claim. \end{proof} \section{Expansion of Positivity} In this section we show that weak solutions exhibit expansion of positivity. This type of result was already obtained in \cite{FoSoVe2}, but the calculations were made under the assumption that $u$ has a gradient, which is not necessarily true in our case. We demonstrate that the same strategy as in \cite{FoSoVe2} can nevertheless be applied with some modifications. For the reader's convenience detailed proofs are provided. We start with a lemma corresponding to Lemma 3.1 of \cite{FoSoVe}. \begin{lem}[General De Giorgi type lemma]\label{lem:GenDeGio} Suppose that $v:\Omega_T\to \ensuremath{\mathbb{R}}_{\geq 0}$ satisfies $v^\beta \in L^p(0,T;W^{1,p}(\Omega))$ and the energy estimate \begin{align}\label{general_en-est} c_g\iint_{\Omega_T} | \nabla & v^\beta |^p\varphi^p \chi_{\{v<k\}}\d x\d t + c_e\esssup_{t\in [0,T]} \int_\Omega \b[v,k]\chi_{\{v<k\}}\varphi^p(x,t) \d x \\ \notag & \leq \iint_{\Omega_T} |\nabla \varphi|^p(v^\beta-k^\beta)^p_- + \big(v^{\frac{\beta+1}{2}}-k^{\frac{\beta+1}{2}} \big)_-^2 \varphi^{p-1}|\partial_t \varphi | \d x \d t, \end{align} for some positive constants $c_g$ and $c_e$ and all $k\geq 0$ and functions $\varphi \in C^\infty(\bar{\Omega}\times [0,T];[0,1])$ vanishing in a neighborhood of $\partial_p \Omega_T$. Suppose $K>0$, $a\in (0,1)$ and that $Q_{\rho,\theta\rho^p}(z_o)\subset \Omega_T$ Then there is a constant $c>0$ depending only on $m,n,p$ such that if \begin{align}\label{meas_cond_for_v} |Q_{\rho,\theta\rho^p}(z_o)\cap \{ v < K\}|\leq c c_e c_g^{\frac{n}{p}} (1-a^\beta)^{n+2} \frac{ (\theta K^{m+p-3})^\frac{n}{p}}{\big[ 1 + \theta K^{m+p-3}\big]^{\frac{(n+p)}{p}}} |Q_{\rho,\theta\rho^p}(z_o)|, \end{align} then $v\geq a K$ a.e. in $Q_{\frac{\rho}{2},\theta(\frac{\rho}{2})^p}(z_o)$. \end{lem} \begin{proof}[Proof] Define \begin{align*} &\rho_j :=\frac{\rho}{2}+\frac{\rho}{2^{j+1}}, \hspace{5mm} k_j^\beta := \Big(a^\beta+\frac{(1-a^\beta)}{2^j}\Big)K^\beta, \hspace{5mm} B_j:=B_{\rho_j}(y_o), \hspace{5mm} T_j:=(t_o-\theta \rho_j^p,t_o), \\ &Q_j:= B_j\times T_j = Q_{\rho_j,\theta \rho_j^p}(y_o,t_o), \hspace{5mm} A_j:=Q_j\cap \{ v<k_j\}, \hspace{5mm} Y_j:=|A_j|/|Q_j|. \end{align*} Pick $\varphi_j \in C^\infty(Q_j;[0,1])$ such that $\varphi_j=1$ on $Q_{j+1}$ and $\varphi_j=0$ in a neighborhood of $\partial_p Q_j$, and \begin{align*} |\nabla \varphi_j|\leq 2^{j+3}\rho^{-1}, \hspace{5mm} |\partial_t\varphi|\leq c_p\theta^{-1}2^j\rho^{-p}. \end{align*} In the set where $v<k_{j+1}$ we have \begin{align*} (v^\beta-k_j^\beta)_-\geq k_j^\beta-k_{j+1}^\beta = \frac{(1-a^\beta)}{2^{j+1}}K^\beta, \end{align*} so \begin{align}\label{ffff} \frac{(1-a^\beta)^p}{2^{(j+1)p}}K^{\beta p}|A_{j+1}| &\leq \iint_{A_{j+1}} (v^\beta-k_j^\beta)_-^p\d x \d t \\ \notag &\leq \Big( \iint_{A_{j+1}} (v^\beta-k_j^\beta)_-^{p \frac{(n+p)}{n}} \d x \d t \Big)^\frac{n}{n+p} |A_{j+1}|^\frac{p}{n+p}. \end{align} We treat the integral inside the brackets by applying H\"older's inequality to the integral over the space variables. One of the resulting integrals is then estimated by taking the essential supremum over the time interval, and the Gagliardo-Nirenberg inequality provides an upper bound for the other integral. All in all, we have \begin{align*} \iint_{A_{j+1}} & (v^\beta-k_j^\beta)_-^{p \frac{(n+p)}{n}} \d x \d t = \int_{T_{j+1}}\int_{B_{j+1}} (v^\beta-k_j^\beta)_-^{p \frac{p}{n}}\chi_{A_{j+1}} (v^\beta-k_j^\beta)_-^p \d x \d t \\ &\leq \int_{T_{j+1}}\Big[\int_{B_{j+1}} (v^\beta-k_j^\beta)_-^p \chi_{A_{j+1}}\d x \Big]^\frac{p}{n} \Big[\int_{B_{j+1}} (v^\beta-k_j^\beta)_-^{p^*} \d x \Big]^\frac{p}{p^*} \d t \\ &\leq \Big[\esssup_{T_{j+1}} \int_{B_{j+1}} (v^\beta-k_j^\beta)_-^p \chi_{A_{j+1}}\d x \Big]^\frac{p}{n} \int_{T_j} \Big[\int_{B_j} \big((v^\beta-k_j^\beta)_-\varphi_j\big)^{p^*} \d x \Big]^\frac{p}{p^*} \d t \\ &\leq c\Big[\esssup_{T_{j+1}} \int_{B_{j+1}} (v^\beta-k_j^\beta)_-^{p-2} \chi_{A_{j+1}}(v^\beta-k_j^\beta)_-^2\d x \Big]^\frac{p}{n} \iint_{Q_j} |\nabla \big((v^\beta-k_j^\beta)_-\varphi_j\big)|^p \d x \d t \\ &\leq c (1-a^\beta)^{(p-2)\frac{p}{n}} K^{\beta(p-2)\frac{p}{n}}2^{j(2-p)\frac{p}{n}} k_j^{(\beta-1)\frac{p}{n}} \Big[\esssup_{T_{j+1}} \int_{B_{j+1}} k_j^{1-\beta}(v^\beta-k_j^\beta)_-^2\d x \Big]^\frac{p}{n} \\ &\quad \times \iint_{Q_j} |\nabla \big((v^\beta-k_j^\beta)_-\varphi_j\big)|^p \d x \d t \\ &\leq c(1-a^\beta)^{(p-2)\frac{p}{n}} K^{\frac{p}{n}(m+p-3)}2^{j(2-p)\frac{p}{n}} \Big[\esssup_{T_j} \int_{B_j} \b[v,k_j]\chi_{\{v<k_j\}} \varphi_j^p \d x \Big]^\frac{p}{n} \\ &\quad \times \iint_{Q_j} |\nabla \big((v^\beta-k_j^\beta)_-\varphi_j\big)|^p \d x \d t \\ &\leq c c_e^{-\frac{p}{n}} c_g^{-1}(1-a^\beta)^{(p-2)\frac{p}{n}} K^{\frac{p}{n}(m+p-3)}2^{j(2-p)\frac{p}{n}} \\ &\quad \times \Big[\iint_{Q_j} |\nabla \varphi_j|^p (v^\beta-k_j^\beta)^p_- + \big(v^{\frac{\beta+1}{2}}-k_j^{\frac{\beta+1}{2}} \big)_-^2 \varphi_j^{p-1}|\partial_\tau \varphi_j| \d x \d t\Big]^\frac{p+n}{n}, \end{align*} where $c=c(m,n,p)$. We have also used \eqref{estimates:boundary_terms} (ii) and the fact that $k_j\leq K$. In the last step we use \eqref{general_en-est}. Taking also into account the bounds on the derivatives of $\varphi_j$ and the bound for $k_j$ we end up with \begin{align*} \Big[ \iint_{A_{j+1}} (v^\beta-k_j^\beta)_-^{p \frac{(n+p)}{n}} \d x \d t \Big]^\frac{n}{n+p} &\leq c c_e^{-\frac{p}{n+p}}c_g^{-\frac{n}{n+p}}(1-a^\beta)^{(p-2)\frac{p}{n+p}}K^\frac{p(m+p-3)}{n+p}2^{j\frac{p(2-p)}{n+p}} \\ &\quad \times \big[K^{\beta p} 2^{j p}\rho^{-p} + K^{\beta+1}\theta^{-1}2^{-j}\rho^{-p}\big]|A_j| \\ &\leq c c_e^{-\frac{p}{n+p}}c_g^{-\frac{n}{n+p}}(1-a^\beta)^{\frac{(p-2)p}{n+p}} K^{\frac{p(m+p-3)}{n+p} + \beta p}2^{j\frac{p(n+2)}{n+p}}\rho^{-p} \\ &\quad \times \big[ 1 + K^{3-m-p}\theta^{-1}\big]|A_j|. \end{align*} Combining the last estimate with \eqref{ffff} we end up with \begin{align*} |A_{j+1}| &\leq c c_e^\frac{-p}{n+p}c_g^\frac{-n}{n+p}(1-a^\beta)^{\frac{(p-2)p}{n+p}-p} K^{\frac{p(m+p-3)}{n+p}} 2^{j[\frac{p(n+2)}{n+p}+p]}\rho^{-p} \big[ 1 + K^{3-m-p}\theta^{-1}\big]|A_j|^{1+\frac{p}{n+p}} \end{align*} Dividing by $|Q_j|$ gives us the desired iterative estimate \begin{align*} Y_{j+1}\leq c c_e^\frac{-p}{n+p}c_g^\frac{-n}{n+p}(1-a^\beta)^{\frac{(p-2)p}{n+p}-p} \big[\theta K^{m+p-3}\big]^\frac{p}{n+p} 2^{j[\frac{p(n+2)}{n+p}+p]} \big[ 1 + K^{3-m-p}\theta^{-1}\big]Y_j^{1+\frac{p}{n+p}}. \end{align*} Thus Lemma \ref{fastconvg} shows that if \begin{align*} Y_0 \leq c c_e c_g^{\frac{n}{p}} (1-a^\beta)^{n+2} \frac{ (\theta K^{m+p-3})^\frac{n}{p}}{\big[ 1 + \theta K^{m+p-3}\big]^{\frac{(n+p)}{p}}} \end{align*} for a suitable constant $c$ depending only on $m,n,p$, then $Y_j\to 0$, which means that $v\geq a K$ in $Q_{\frac{\rho}{2},\theta(\frac{\rho}{2})^p}(z_o)$. \end{proof} The following variant of the De Giorgi lemma will also be useful. The extra assumption \eqref{ularge}, regarding the values of $u$ at the initial time of the space-time cylinder, allows us to get a lower bound which holds on a cylinder which has only been reduced in the spatial dimensions. It is understood that we consider the time-continuous representative of $u$, so that \eqref{ularge} makes sense. \begin{lem}[Variant of the general De Giorgi type lemma]\label{lem:VarGenDeGio} Let $u$ be a weak solution in the sense of Definition \ref{weakdef}. Suppose that $Q_{\rho,\theta\rho^p}(z_o)\subset \Omega_T$ and that \begin{align}\label{ularge} u(x,t_o-\theta\rho^p)\geq K, \end{align} for a.e. $x\in B_\rho(x_o)$. Then there is a constant $c$ depending only on $m,n,p,C_0,C_1$ such that if \begin{align}\label{assumption:meas} |Q_{\rho,\theta\rho^p}(z_o)\cap \{u< K\}| \leq c\frac{(1-a^\beta)^{n+2}}{\theta K^{m+p-3}}|Q_{\rho,\theta\rho^p}(z_o)|, \end{align} then $u\geq aK$ a.e. in $Q_{\frac{\rho}{2},\theta\rho^p}(z_o)$. \end{lem} \begin{proof}[Proof] Define $k_j$, $\rho_j$ and $B_j$ as in Lemma \ref{lem:GenDeGio}, but choose \begin{align*} Q_j:=B_j\times \Delta=B_j\times (t_o-\theta\rho^p,t_o)=Q_{\rho_j,\theta\rho^p}. \end{align*} As before, we denote $A_j=Q_j\cap \{u<k_j\}$ and $Y_j=|A_j|/|Q_j|$. Choose $\varphi_j\in C^\infty_0(B_j;[0,1])$ such that $\varphi_j=1$ on $B_{j+1}$ and \begin{align*} |\nabla \varphi_j|\leq \rho^{-1}2^{j+3}. \end{align*} We use the energy estimate \eqref{klj} of Lemma \ref{lem:alt-en-est} with $\varphi=\varphi_j$, $k=k_j$, $t_1=t_o-\theta\rho^p$ and $t_2\in \Delta$. The assumption \eqref{ularge} guarantees that the second term on the right-hand side of \eqref{klj} vanishes and we end up with \begin{align*} \iint_{Q_j} |\nabla (u^\beta-k_j^\beta)_-|^p\varphi_j^p\d x \d t + \esssup_\Delta \int_{B_j}\b[u,k_j] \chi_{\{u<k_j \}} \varphi_j^p\d x \\ \leq c \iint_{Q_j} (u^\beta-k_j^\beta)_-^p|\nabla \varphi_j|^p\d x \d t, \end{align*} where $c=c(p,C_0,C_1)$. As in Lemma \ref{lem:GenDeGio} we see that \begin{align}\label{jli} \frac{(1-a^\beta)^p}{2^{(j+1)p}}K^{\beta p}|A_{j+1}| \leq \Big( \iint_{A_{j+1}} (u^\beta-k_j^\beta)_-^{p \frac{(n+p)}{n}} \d x \d t \Big)^\frac{n}{n+p} |A_{j+1}|^\frac{p}{n+p}. \end{align} Similarly as in the proof of Lemma \ref{lem:GenDeGio} we may estimate the integral inside the brackets as \begin{align*} \iint_{A_{j+1}}& (u^\beta-k_j^\beta)_-^{p \frac{(n+p)}{n}} \d x \d t \\ &\leq \Big[\esssup_\Delta \int_{B_j} (u^\beta-k_j^\beta)_-^p \chi_{A_{j+1}}\varphi_j^p \d x \Big]^\frac{p}{n} \int_\Delta \Big[\int_{B_j} \big((u^\beta-k_j^\beta)_-\varphi_j\big)^{p^*} \d x \Big]^\frac{p}{p^*} \d t \\ &\leq c (1-a^\beta)^{(p-2)\frac{p}{n}} K^{\beta(p-2)\frac{p}{n}}2^{j(2-p)\frac{p}{n}} k_j^{(\beta-1)\frac{p}{n}} \Big[\esssup_\Delta \int_{B_j} (u^\beta-k_j^\beta)_-^2 k_j^{1-\beta} \varphi_j^p \d x \Big]^\frac{p}{n} \\ & \quad \times \iint_{Q_j} |\nabla \big( (u^\beta-k^\beta)_- \varphi_j\big)|^p\d x \d t \\ & \leq c (1-a^\beta)^{(p-2)\frac{p}{n}} K^{(m+p-3)\frac{p}{n}}2^{j(2-p)\frac{p}{n}} \Big[ \iint_{Q_j} (u^\beta-k_j^\beta)_-^p|\nabla \varphi_j|^p\d x \d t \Big]^\frac{p+n}{n} \\ & \leq c (1-a^\beta)^{(p-2)\frac{p}{n}} K^{(m+p-3)\frac{p}{n}}2^{j(2-p)\frac{p}{n}} \big( K^{\beta p} \rho^{-p}2^{jp}|A_j| \big)^\frac{p+n}{n}, \end{align*} where the constant $c$ only depends on $m,n,p,C_0,C_1$. Combining this estimate with \eqref{jli} we have \begin{align*} |A_{j+1}|\leq c (1-a^\beta)^{\frac{(p-2)p}{n+p}-p} K^{\frac{p(m+p-3)}{n+p}} 2^{j[\frac{p(n+2)}{n+p}+p]}\rho^{-p}|A_j|^{1+\frac{p}{n+p}} \end{align*} Dividing by $|Q_j|$ we obtain \begin{align*} Y_{j+1} \leq c (1-a^\beta)^{\frac{(p-2)p}{n+p}-p} (\theta K^{m+p-3})^\frac{p}{n+p} 2^{j[\frac{p(n+2)}{n+p}+p]} Y_j^{1+\frac{p}{n+p}}. \end{align*} In light of Lemma \ref{fastconvg}, this means that there exists a constant $c=c(m,n,p,C_0,C_1)$ such that if \begin{align*} Y_0\leq c\frac{(1-a^\beta)^{n+2}}{\theta K^{m+p-3}}, \end{align*} then $Y_j\to 0$. \end{proof} A version of the following result was proven in Lemma 1.1 of Chapter 4 of \cite{DiGiaVe} for the parabolic $p$-Laplace equation. We use the same strategy. \begin{lem}\label{snails} Let $u$ be a weak solution on $\Omega_T$. Suppose that $B_\rho(y)\times\{s\} \subset \Omega_T$ and that \begin{align}\label{exposlemma-assumption1} |B_\rho(y)\cap \{u(\cdot,s)\geq M\}| \geq \alpha |B_\rho(y)|. \end{align} Then there are $\delta=\delta(m, n, p, C_0, C_1, \alpha)$ and $\epsilon=\epsilon(\alpha)$ such that \begin{align}\label{exposlemma-consequence} |B_\rho(y)\cap \{u(\cdot,t)\geq \epsilon M\}|\geq \frac{1}{2}\alpha |B_\rho(y)|, \end{align} for all $t \in (s, \min\{T, s+\delta M^{3-m-p}\rho^p \})$. \end{lem} \begin{proof}[Proof] Let $\tau < \min\{T, s+\delta M^{3-m-p}\rho^p\}$, where $\delta$ is a positive number which is yet to be chosen and consider \eqref{klj} of Lemma \ref{lem:alt-en-est} with $t_1=s$, $t_2=\tau$ and $k=M$. Discarding the first term on the left-hand side, which is non-negative we end up with \begin{align}\label{kultaa} \int_\Omega \big[\b[u,M]\chi_{\{u<M\}} \varphi^p\big](x,\tau) \d x &\leq \int_\Omega \big[\b[u,M]\chi_{\{u<M\}} \varphi^p\big](x,s) \d x \\ \notag &\quad + c\int_s^\tau\int_\Omega (u^\beta-M^\beta)_-^p |\nabla \varphi|^p\d x \d t, \end{align} where $\varphi\in C^\infty_0(\Omega;\ensuremath{\mathbb{R}}_{\geq 0})$ and the constant $c$ only depends on $p,C_0,C_1$. Taking $\sigma \in (0,1)$ and $\varphi \in C^\infty_0(B_\rho(y);[0,1])$ such that $\varphi=1$ on $B_{(1-\sigma)\rho}(y)$ and $|\nabla \varphi|\leq \tfrac{2}{\sigma \rho}$, the estimate \eqref{kultaa} implies \begin{align}\label{MOERKOE} \int_{B_{(1-\sigma)\rho}(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x &\leq \int_{B_\rho(y)} \b[u,M]\chi_{\{u<M\}} (x,s) \d x \\ \notag &\quad + \frac{c}{\sigma^p\rho^p}\int^\tau_0\int_{B_\rho(y)}(u^\beta-M^\beta)_-^p \d x \d t. \end{align} From the properties of $\b$ it follows that when $u<M$ we have \begin{align*} \b[u,M]\leq \b[0,M]=\tfrac{\beta}{\beta+1}M^{\beta+1}. \end{align*} Using this result and the assumption \eqref{exposlemma-assumption1} we conclude that \begin{align*} \int_{B_\rho(y)} \b[u,M]\chi_{\{u<M\}} (x,s)\d x &\leq \tfrac{\beta}{\beta+1} M^{\beta+1}|B_\rho(y)\cap \{u(\cdot,s)<M\}| \\ & \leq \tfrac{\beta}{\beta+1}M^{\beta+1}(1-\alpha)|B_\rho(y)|. \end{align*} Recall that $\tau\in (s,s+\delta M^{3-m-p}\rho^p)$ where $\delta$ is to be chosen so \begin{align*} \frac{c}{\sigma^p\rho^p}\int^\tau_0\int_{B_\rho(y)}(u^\beta-M^\beta)_-^p \d x \d t \leq \frac{c\delta}{\sigma^p}M^{\beta+1}|B_\rho(y)|. \end{align*} We estimate the term on the left-hand side of \eqref{MOERKOE} as \begin{align*} \int_{B_{(1-\sigma)\rho}(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x &= \int_{B_\rho(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x \\ &\quad - \int_{B_\rho(y)\setminus B_{(1-\sigma)\rho}(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x \\ &\geq \int_{B_\rho(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x - c_n^\beta\sigma M^{\beta+1}|B_\rho(y)|. \end{align*} Picking $\epsilon \in (0,1)$ we can estimate the last integral as \begin{align*} \int_{B_\rho(y)} \b[u,M]\chi_{\{u<M\}} (x,\tau) \d x &\geq \int_{B_\rho(y)\cap \{u<\epsilon M\}} \b[u,M] (x,\tau) \d x \\ &\geq \b[\epsilon M, M] |B_\rho(y)\cap \{u(\cdot,\tau)<\epsilon M\}| \\ &\geq \tfrac{\beta}{\beta+1}M^{\beta+1}(1-2\epsilon ) |B_\rho(y)\cap \{u(\cdot,\tau)<\epsilon M\}|. \end{align*} Combining all the estimates we have \begin{align}\label{rrrrr} |B_\rho(y)\cap \{u(\cdot,\tau)<\epsilon M\}|\leq \frac{|B_\rho(y)|}{(1-2\epsilon)}[\tilde{c}_n^\beta \sigma + (1-\alpha) + c\sigma^{-p}\delta]. \end{align} where $\tilde{c}_n^\beta=\tilde{c}_n^\beta(\beta,n)$ and $c=c(m,n,p,C_0,C_1)$. Choose $\sigma=\sigma(\alpha,n,m,p)$ so small that $\tilde{c}_n^\beta\sigma < \alpha/8$. With this choice of $\sigma$, choose \noindent$\delta=\delta(m,n,p,C_0,C_1,\alpha)$ so small that $c\sigma^{-p}\delta<\alpha/8$. Here $c$ denotes the constant in \eqref{rrrrr}. This leads to \begin{align*} |B_\rho(y)\cap \{u(\cdot,\tau)<\epsilon M\}|\leq \frac{|B_\rho(y)|}{(1-2\epsilon)}(1-3\alpha/4). \end{align*} From this it follows that \eqref{exposlemma-consequence} is true for any \begin{align*} 0<\epsilon \leq \frac{\alpha}{4(2-\alpha)}. \end{align*} \end{proof} We are now ready to prove the main result of this section. \begin{theo}[Expansion of Positivity]\label{theo:exppos} Suppose that $(x_o,s)\in \Omega_T$ and $u$ is a weak solution satisfying \begin{align}\label{assumpt-exppos} |B_\rho(x_o)\cap\{u(\cdot,s) \geq M\}|\geq \alpha |B_\rho(x_o)|, \end{align} for some $M>0$ and $\alpha \in (0,1)$. Then there exist $\varepsilon,\delta,\eta \in (0,1)$ depending only on $m,p,n,C_0,C_1,\alpha$ such that if $B_{16\rho}(x_o)\times (s,s+\delta M^{3-m-p}\rho^p) \subset \Omega_T$ then \begin{align*} u\geq \eta M \textrm{ in } B_{2\rho}(x_o)\times (s+(1-\varepsilon)\delta M^{3-m-p}\rho^p, s+\delta M^{3-m-p}\rho^p) . \end{align*} \end{theo} \begin{proof}[Proof] The proof is divided into several steps. \noindent \textbf{Step 1: Change of variables, transformed equation and energy estimates.} Let $\delta=\delta(m,n,p,C_0,C_1,\alpha)\in (0,1)$ be the constant from Lemma \eqref{snails}. By translation we may assume that $(y,s)=(\bar{0},0)$. Furthermore, we assume that $B_{16\rho}(\bar{0})\times (0, \delta M^{3-m-p}\rho^p)\subset \Omega_T$, since otherwise there is nothing to prove. Introduce the new variables $(y,\tau)$ defined by the equations \begin{align*} y=\frac{x}{\rho}, \hspace{15mm} -e^{-\tau}= \frac{t-\delta M^{3-m-p}\rho^p}{\delta M^{3-m-p}\rho^p}. \end{align*} These coordinates transform the cylinder $B_{16\rho}(\bar{0})\times (0,\delta M^{3-m-p}\rho^p)$ into $B_{16}(\bar{0})\times (0,\infty)$, preserving the direction of time. Define the function $v: B_{16}(\bar{0})\times (0, \infty)\to \ensuremath{\mathbb{R}}$, \begin{align*} v(y,\tau)=\frac{e^\frac{\tau}{3-m-p}}{M}u(x,t)= \frac{e^\frac{\tau}{3-m-p}}{M} u\big(\rho y, \delta M^{3-m-p}\rho^p(1-e^{-\tau})\big). \end{align*} A routine calculation confirms that $v^\beta \in L^p(0,S; W^{1,p}(B_{16}(\bar{0})))$, for all $S>0$, and that $v$ is a weak solution to the equation \begin{align*} \partial_\tau v -\nabla\cdot \tilde{A}(y,\tau,v,\nabla v^\beta)=\tfrac{1}{3-m-p}v, \end{align*} where \begin{align*} \tilde{A}(y,\tau,v,\xi)=\delta \rho^{p-1} \frac{e^{(\frac{m+p-2}{3-m-p})\tau}}{M^{m+p-2}} A\big(\rho y, \delta M^{3-m-p}\rho^p(1-e^{-\tau}), M e^{-\frac{\tau}{3-m-p}}v,\rho^{-1}M^\beta e^{-\frac{\beta \tau}{3-m-p}}\xi \big) \end{align*} satisfies the structure conditions \begin{align} \label{tildestructcond0} \tilde{A}(y,\tau,v,\xi)\cdot \xi &\geq \delta C_0 |\xi|^p, \\ \label{tildestructcond1} |\tilde{A}(y,\tau,v,\xi)| &\leq \delta C_1 |\xi|^{p-1}, \end{align} where $C_0$ and $C_1$ are the constants appearing in the structure conditions \eqref{structcond1} and \eqref{structcond2}. The time continuity of $u$ obtained in Subsection \ref{subsec:time-cont} implies that $v\in C([0,\infty);L^{\beta+1}_{\textrm{loc}}(B_{16}(\bar{0})) $. This allows us to reason as in the proof of Lemma \ref{lem:mollified}, to conclude that $v$ satisfies the mollified weak formulation \begin{align}\label{molform_for_v} \int^\infty_0\int_{B_{16}(\bar{0})} [\tilde{A}(y,\cdot,v, \nabla v^\beta)]_h\cdot \nabla \phi+\partial_\tau v_h \phi\d y\d \tau - \int_{B_{16}(\bar{0})} (v \phi_{\tilde{h}})(y,0) \d y \\ \notag = \tfrac{1}{3-m-p}\int^\infty_0 \int_{B_{16}(\bar{0})} v_h\phi\d y\d \tau, \end{align} for all $\phi \in C^\infty_0(B_{16}(\bar{0})\times (0,\infty))$. The only difference is that we have replaced $\phi_{\bar{h}}$ by \begin{align*} \phi_{\tilde{h}}(y,\tau):=\frac{1}{h}\int^\infty_\tau e^\frac{\tau-s}{h}\phi(y,s)\d s, \end{align*} which in practice always can be written as a finite integral due to the support of $\phi$. This enables us to prove an energy estimate for $v$. Namely, we use \eqref{molform_for_v} with the test function $\phi = -(v^\beta-k^\beta)_-\varphi^p \xi_r(\tau)$, where $\varphi$ is a smooth function vanishing near $\partial_p (B_{16}(\bar{0})\times(0,\infty))$, and \begin{align*} \xi_r(\tau)= \begin{cases} 1, &\tau \leq \tilde{\tau}, \\ r^{-1}(\tilde{\tau}+r-t), &\tau \in [\tilde{\tau},\tilde{\tau}+r], \\ 0, &\tau>\tilde{\tau}+r. \end{cases} \end{align*} Here $\tilde{\tau}>0$. We see that \begin{align*} \int^\infty_0\int_{B_{16}(\bar{0})} [\tilde{A}(y,\tau,v, \nabla v^\beta)]_h\cdot \nabla \phi\d y \d \tau \xrightarrow[h\to 0]{} \int^\infty_0\int_{B_{16}(\bar{0})} \tilde{A}(y,\tau,v, \nabla v^\beta) \cdot \nabla \phi\d y \d \tau \\ \xrightarrow[r\to 0]{} -\int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} \tilde{A}(y,\tau,v, \nabla v^\beta) \cdot \nabla [(v^\beta-k^\beta)_-\varphi^p ]\d y \d \tau \\ = \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} \tilde{A}(y,\tau,v, \nabla v^\beta) \cdot \nabla v^\beta \chi_{\{v<k\}} \varphi^p - \tilde{A}(y,\tau,v, \nabla v^\beta) \cdot \nabla \varphi^p (v^\beta-k^\beta)_- \d y \d \tau \\ \geq \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} \delta C_0|\nabla v^\beta|^p\varphi^p \chi_{\{v<k\}} - \delta \tilde{C}_1|\nabla v^\beta|^{p-1}\varphi^{p-1}|\nabla \varphi|(v^\beta-k^\beta)_- \d y \d \tau \\ \geq \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} \delta \frac{C_0}{2}|\nabla v^\beta|^p\varphi^p \chi_{\{v<k\}} - \delta \hat{C}_1 |\nabla \varphi|^p(v^\beta-k^\beta)^p_- \d y \d \tau, \end{align*} where $\hat{C}_1=\hat{C}_1(C_1,p)$. Reasoning similarly as in the proof of Lemma \ref{lem:Energy_Est}, the parabolic term can be treated as \begin{align*} \int^\infty_0&\int_{B_{16}(\bar{0})}\partial_\tau v_h \phi\d y\d \tau \geq -\int^\infty_0\int_{B_{16}(\bar{0})} \b[v_h,k]\chi_{\{v_h<k\}} \partial_\tau( \varphi^p \xi_r )\d y\d \tau \\ &\xrightarrow[h\to 0]{} -\int^\infty_0\int_{B_{16}(\bar{0})} \b[v,k]\chi_{\{v<k\}} \xi_r \partial_\tau \varphi^p\d y \d \tau + r^{-1} \int^{\tilde{\tau}+r}_{\tilde{\tau}} \int_{B_{16}(\bar{0})}\b[v,k]\chi_{\{v<k\}} \varphi^p\d y \d \tau. \\ &\xrightarrow[r\to 0]{} -\int_0^{\tilde{\tau}}\int_{B_{16}(\bar{0})} \b[v,k]\chi_{\{v<k\}} \partial_\tau \varphi^p \d y \d \tau - \int_{B_{16}(\bar{0})}\b[v,k]\chi_{\{v<k\}} \varphi^p(y,\tilde{\tau}) \d y. \end{align*} As in the proof of Lemma \ref{lem:Energy_Est}, one can see that the second term on the left-hand side of \eqref{molform_for_v} vanishes in the limit $h\to 0$. Combining the estimates for all terms we end up with \begin{align} \notag \delta \frac{C_0}{2}& \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} |\nabla v^\beta|^p\varphi^p \chi_{\{v<k\}}\d y\d \tau + \int_{B_{16}(\bar{0})}\b[v,k]\chi_{\{v<k\}}\varphi^p(z,\tilde{\tau}) \d y \\ \label{solstizio} &\leq \delta \hat{C}_1 \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} |\nabla \varphi|^p(v^\beta-k^\beta)^p_- \d y \d \tau + \int_0^{\tilde{\tau}}\int_{B_{16}(\bar{0})} \b[v,k]\chi_{\{v<k\}} \partial_\tau \varphi^p \d y \d \tau \end{align} Note that we were able to drop the term on the right-hand side of \eqref{molform_for_v} since it is non-positive. Using Lemma \ref{estimates:boundary_terms} (i) to estimate $\b[v,k]$ on the right-hand side and taking into account that $\delta \in (0,1)$ we finally obtain the desired energy estimate \begin{align}\label{en_est_for_v} \notag c\delta \int^{\tilde{\tau}}_0 &\int_{B_{16}(\bar{0})} |\nabla v^\beta|^p\varphi^p \chi_{\{v<k\}}\d y\d \tau + c\esssup_{\tau\in [0,\tilde{\tau}]} \int_{B_{16}(\bar{0})}\b[v,k]\chi_{\{v<k\}}\varphi^p(y,\tau) \d y \\ & \leq \int^{\tilde{\tau}}_0\int_{B_{16}(\bar{0})} |\nabla \varphi|^p(v^\beta-k^\beta)^p_- + \big(v^{\frac{\beta+1}{2}}-k^{\frac{\beta+1}{2}} \big)_-^2 \varphi^{p-1} |\partial_\tau \varphi | \d y \d \tau, \end{align} where $c=c(C_0,C_1,p,m)$ and $\tilde{\tau}$ is any positive number. \noindent \textbf{Step 2: Measure estimates of sublevel sets.} From the assumption \eqref{assumpt-exppos} and Lemma \ref{snails} it follows that there is an $\epsilon=\epsilon(\alpha)$ such that \begin{align}\label{measure_est_for_v} |B_1(\bar{0}) \cap \{v(\cdot,\tau)>\epsilon e^\frac{\tau}{3-m-p}\}|\geq \frac{\alpha}{2}|B_1(\bar{0})|, \end{align} for all $\tau\in [0,\infty)$. Pick $\tau_o>0$ to be determined later and define \begin{align}\label{k_j-def} k_o:=\epsilon e^\frac{\tau_o}{3-m-p}, \hspace{7mm} k_j:=\frac{k_o}{(2^\frac{1}{\beta})^j}, \hspace{5mm} j\in \ensuremath{\mathbb{N}}_0. \end{align} With these definitions, \eqref{measure_est_for_v} implies that \begin{align}\label{est_on_B8} |B_8(\bar{0}) \cap \{v(\cdot,\tau)> k_j\}|\geq \frac{\alpha}{2}8^{-n}|B_8(\bar{0})|, \end{align} for all $\tau\in [\tau_o,\infty)$ and $j\in \ensuremath{\mathbb{N}}_0$. We introduce the cylinders \begin{align*} Q_{\tau_o} :=B_8(\bar{0})\times (\tau_o+k_o^{3-m-p}, \tau_o+2k_o^{3-m-p}), \hspace{5mm} Q_{\tau_o}' :=B_{16}(\bar{0})\times (\tau_o, \tau_o+2k_o^{3-m-p}) \end{align*} Pick $\zeta_1\in C^\infty_0(B_{16}(\bar{0}))$ such that $\zeta_1=1$ on $B_8(\bar{0})$ and $|\nabla \zeta_1|\leq \frac{1}{4}$. Pick $\zeta_2 \in C^\infty(\ensuremath{\mathbb{R}})$ such that $\zeta_2(\tau)=0$ for $\tau <\tau_o$, $\zeta_2(\tau)=1$ for $\tau \geq \tau_o + k_o^{3-m-p}$ and $0\leq \zeta_2'(\tau)\leq \frac{2}{k_o^{3-m-p}}$. Using the energy estimate \eqref{en_est_for_v} with $\varphi(y,\tau)=\zeta_1(y)\zeta_2(\tau)$, $k=k_j$ and $\tau_1 = \tau_o+2k_o^{3-m-p}$ yields \begin{align}\label{midsommar} \iint_{Q_{\tau_o}} |\nabla v^\beta|^p \chi_{\{v<k_j\}}\d y\d \tau &\leq \frac{c}{\delta} \iint_{Q_{\tau_o}'}(v^\beta-k_j^\beta)_-^p + \frac{2}{ k_o^{3-m-p}} \big(v^{\frac{\beta+1}{2}}-k_j^{\frac{\beta+1}{2}} \big)_-^2 \d y \d \tau \\ \notag &\leq c\delta^{-1}\Big(k_j^{\beta p} + \frac{k_j^{\beta+1}}{k_o^{3-m-p}}\Big)|Q_{\tau_o}| \\ \notag &\leq c \delta^{-1}k_j^{\beta p} |Q_{\tau_o}|, \end{align} where in the second step we used the fact that the measures of $Q_{\tau_o}$ and $Q_{\tau_o}'$ are comparable. In the last step we used that $k_j\leq k_o$. The constant $c$ still depends only on $C_0,C_1,p,m$. We define the sets \begin{align*} A_j:= Q_{\tau_o}\cap \{v<k_j\}, \hspace{5mm} A_j(\tau):=B_8(\bar{0}) \cap \{v(\cdot, \tau) <k_j\}. \end{align*} By the isoperimetric inequality \eqref{isoperim} and \eqref{est_on_B8} we have \begin{align*} \frac{k_j^\beta}{2}|A_{j+1}(\tau)|=(k_j^\beta-k_{j+1}^\beta)|A_{j+1}(\tau)|&\leq \frac{c_n}{|B_8(\bar{0})\setminus A_j(\tau)|}\int_{A_j(\tau)\setminus A_{j+1}(\tau)}|\nabla v^\beta(y,\tau)|\d y \\ &\leq \frac{\tilde{c}_n}{\alpha}\int_{A_j(\tau)\setminus A_{j+1}(\tau)}|\nabla v^\beta(y,\tau)|\d y. \end{align*} Integrating the estimate over the time interval $(t_o+k_o^{3-m-p}, \tau_o+2k_o^{3-m-p})$ and using H\"older's inequality and \eqref{midsommar} we obtain \begin{align*} \frac{k_j^\beta}{2}|A_{j+1}| &\leq \frac{\tilde{c}_n}{\alpha}\int_{A_j\setminus A_{j+1}}|\nabla v^\beta(y,\tau)|\d y \\ &\leq \frac{\tilde{c}_n}{\alpha}\Big[\int_{A_j\setminus A_{j+1}}|\nabla v^\beta(y,\tau)|^p\d y\Big]^\frac{1}{p} |A_j\setminus A_{j+1}|^{1-\frac{1}{p}} \\ &\leq \frac{c k_j^\beta}{\alpha \delta^\frac{1}{p}}|Q_{\tau_o}|^\frac{1}{p}|A_j\setminus A_{j+1}|^\frac{p-1}{p}, \end{align*} where $c$ depends on $m,n,p,C_0, C_1$. Hence, \begin{align*} |A_{j+1}|^\frac{p}{p-1}\leq \frac{c}{\alpha^\frac{p}{p-1}\delta^\frac{1}{p-1}}|Q_{\tau_o}|^\frac{1}{p-1}|A_j\setminus A_{j+1}|=\gamma |Q_{\tau_o}|^\frac{1}{p-1}|A_j\setminus A_{j+1}|, \end{align*} where $\gamma:=c\alpha^{-\frac{p}{p-1}}\delta^{-\frac{1}{p-1}}$. Adding this equation for $j\in \{0,\dots, j_0-1\}$ where $j_0\in \ensuremath{\mathbb{N}}$ and noting that $|A_j|$ is decreasing in $j$ we have \begin{align*} j_0|A_{j_0}|^\frac{p}{p-1}\leq \gamma |Q_{\tau_o}|^\frac{1}{p-1}|\Big(\sum_{j=0}^{j_0-1}(|A_j|-|A_{j+1}|)\Big)\leq \gamma |Q_{\tau_o}|^\frac{p}{p-1}|. \end{align*} Taking into account the definition of $A_j$, this means that \begin{align*} |Q_{\tau_o}\cap \{v<k_{j_0}\}|\leq \Big(\frac{\gamma}{j_0}\Big)^\frac{p-1}{p}|Q_{\tau_o}|. \end{align*} Recalling that $\delta$ is already determined in terms of $m,n,p,C_0,C_1,\alpha$, this estimate shows that any $\nu>0$ we may choose $j_0=j_0(m,n,p,C_0,C_1,\alpha,\nu)\in \ensuremath{\mathbb{N}}$ such that \begin{align*} |Q_{\tau_o}\cap \{v<k_{j_0}\}|\leq \nu |Q_{\tau_o}|. \end{align*} Let $j_*\in [j_0,\infty)$ be the smallest real number for which $(2^{j_*})^\frac{3-m-p}{\beta}$ is an integer. Then $j_*$ only depends on $m,n,p,C_0,C_1,\alpha,\nu$ and \begin{align}\label{gggg} |Q_{\tau_o}\cap \{v<k_{j_*}\}|\leq \nu |Q_{\tau_o}|, \end{align} where we have extended the definition of $k_j$ in \eqref{k_j-def} to all real numbers. \noindent \textbf{Step 3: Segmenting the cylinder.} For $i$ belonging to $\{0,\dots (2^{j_*})^\frac{3-m-p}{\beta} - 1\} $ We define the subcylinders \begin{align*} Q_i=B_8(\bar{0})\times \big(\tau_o +k_o^{3-m-p} + ik_{j_*}^{3-m-p}, \tau_o +k_o^{3-m-p} + (i+1)k_{j_*}^{3-m-p}\big), \end{align*} which is a parition of $Q_{\tau_o}$ (discarding only a set of measure zero). Thus, \eqref{gggg} implies that for at least one of the subcylinders we must have \begin{align*} |Q_i\cap \{v<k_{j_*}\}|\leq \nu |Q_i|. \end{align*} Since $v$ satisfies the energy estimates \eqref{en_est_for_v}, we may apply Lemma \ref{lem:GenDeGio} to $Q_i$ with $\rho=8$, $\theta=8^{-p}k_{j_*}^{3-m-p}$, $K=k_{j_*}$ and $a=\frac{1}{2}$. Now $c_g=c\delta$ for a $c$ only depending on $m,n,p,C_1,C_0$ and also $c_e$ only depends on these parameters. Plugging in everything into \eqref{meas_cond_for_v} we see that there is a constant $c$ depending only on $m,n,p,C_1,C_0$, such that if $\nu\leq \nu_o:= c\delta^\frac{n}{p}$ then \begin{align}\label{nypotatis} v\geq \frac{1}{2}k_{j_*} \textrm{ in } B_4(\bar{0})\times \big(\tau_o+k_o^{3-m-p} + (i+1-2^{-p})k_{j_*}^{3-m-p}, \tau_o+k_o^{3-m-p} + (i+1)k_{j_*}^{3-m-p}\big). \end{align} Fixing $j_0:=j_0(m,n,p,C_0,C_1,\alpha,\nu_o)$, we obtain by the definitions of $\nu_o$ and $\delta$ that the corresponding $j_*$ ultimately depends only on $m,n,p,C_0,C_1,\alpha$, and that \eqref{nypotatis} is indeed valid. Hence, there is a $\tau_1 \in (\tau_o+k_o^{3-m-p}, \tau_o+2k_o^{3-m-p})$ such that for a.e. $y\in B_4(\bar{0})$, \begin{align}\label{doors} v(y,\tau_1)\geq \frac{1}{2}k_{j_*}=\frac{k_o}{2^{\frac{j_*}{\beta}+1}} =\frac{\epsilon}{2^{\frac{j_*}{\beta}+1}} e^\frac{\tau_o}{3-m-p}=\sigma_o e^\frac{\tau_o}{3-m-p}, \end{align} where $\sigma_o=\sigma_o(m,n,p,C_0,C_1,\alpha)$. \noindent \textbf{Step 4: Returning to the original coordinates.} By the definition of $v$, \eqref{doors} says that for a.e. $x\in B_{4\rho}(\bar{0})$ \begin{align*} u(x,t_1)\geq \sigma_o M e^\frac{\tau_o-\tau_1}{3-m-p}=:M_o, \end{align*} where $t_1:=\delta M^{3-m-p}\rho^p(1-e^{-\tau_1})$. We want to apply Lemma \ref{lem:VarGenDeGio} with $K=M_o$, $a=\frac{1}{2}$ and $\theta = c 2^{-n-2}M_o^{3-m-p}$, where $c$ is the constant from the assumption \eqref{assumption:meas}. With these choices the assumption in Lemma \ref{lem:VarGenDeGio} is automatically true since it becomes the statement $|Q\cap \{u < M_o\}|\leq |Q|$ for a certain cylinder $Q$. As a consequence, Lemma \ref{lem:VarGenDeGio} implies that \begin{align}\label{thunder} u\geq \frac{1}{2}M_o, \end{align} in $B_{2\rho}(\bar{0})\times(t_1,t_1+ c 2^{-n-2}M_o^{3-m-p} (4\rho)^p)$. In order to complete the proof, it is sufficient that \begin{align*} t_1+ c 2^{-n-2}M_o^{3-m-p} (4\rho)^p) = \delta M^{3-m-p}\rho^p. \end{align*} Using the definition of $t_1$ we see that this is equivalent to \begin{align*} \tau_o= \ln\Big(\frac{2^{n+2}\delta}{c 4^p\sigma_o^{3-m-p}}\Big), \end{align*} where $c$ is the constant from assumption \eqref{assumption:meas}. The right hand side depends only on $m,n,p,C_0,C_1,\alpha$. Hence, with this choice of $\tau_o$, \eqref{thunder} and the upper bound for $\tau_1$ imply that \begin{align*} u\geq \frac{1}{2}M_o = \frac{\sigma_o}{2} e^\frac{\tau_o-\tau_1}{3-m-p} M > \frac{\sigma_o}{2} e^{-\frac{2k_o^{3-m-p}}{3-m-p}} M =: \eta M. \end{align*} in $B_{2\rho}(\bar{0})\times(t_1, \delta M^{3-m-p}\rho^p)$. Note that $\eta$ only depends on $m,n,p,C_0,C_1,\alpha$. From the upper bound for $\tau_1$ it also follows that \begin{align*} t_1 =\delta M^{3-m-p}\rho^p(1-e^{-\tau_1})< \delta M^{3-m-p}\rho^p(1-e^{-\tau_0-2k_o^{3-m-p}}), \end{align*} so the claim of the theorem is true if we take \begin{align*} \varepsilon= e^{-\tau_0-2k_o^{3-m-p}}, \end{align*} and the right-hand side clearly only depends only on $m,n,p,C_0,C_1,\alpha$. \end{proof} \section{Local Boundedness} We prove that in the range \eqref{nicerange} all weak solutions are locally bounded. We use a De Giorgi iteration combining the energy estimates obtained in Lemma \ref{lem:Energy_Est} with a Sobolev embedding. \begin{theo}\label{theo:local_bdd} Let $u$ be a weak solution in the sense of Definition \ref{weakdef} and suppose that the parameters $m$ and $p$ satisfy \eqref{nicerange}. Then $u$ is locally bounded and for any cylinder of the form $Q_{\rho,2\tau}(z_o)$ contained in $\Omega_T$ and any $\sigma \in (0,1)$ we have the explicit bound \begin{align*} \esssup_{Q_{\sigma \rho, \sigma\tau}(z_o)}u\leq c\Big[\big((1-\sigma)^p \tau\big)^{-\frac{n+p}{p}}\iint_{Q_{\rho, \tau}(z_o)}u^{\beta+1}\d x \d t\Big]^\frac{p}{p\beta n+(\beta+1)(p-n)} + \Big(\frac{\tau}{\rho^p}\Big)^\frac{1}{3-m-p}, \end{align*} where $c$ is a constant depending only on $m,n,p, C_0, C_1$. \end{theo} \begin{proof}[Proof] Suppose that $Q_{\rho,\tau}(z_o)\subset \Omega_T$. Define sequences \begin{align*} \rho_j:= \sigma \rho +\frac{(1-\sigma)}{2^j}\rho, \hspace{15mm} \tau_j&:= \sigma\tau +\frac{(1-\sigma)}{2^j}\tau, \hspace{15mm} k_j:=k(1-2^{-j})^\frac{2}{\beta+1}, \end{align*} where $k>0$ is a number to be fixed later. We also define the cylinders $Q_j:=Q_{\rho_j,\tau_j}(z_o)=B_j\times T_j$. Choose functions $\varphi_j\in C^\infty(Q_j;[0,1])$ vanishing near the parabolic boundary of $Q_j$ and satisfying $\phi_j=1$ on $Q_{j+1}$ and for which \begin{align*} |\nabla \varphi_j|\leq \frac{2^{j+2}}{(1-\sigma)\rho}, \hspace{10mm} |\partial_t \varphi_j|\leq \frac{2^{j+2}}{(1-\sigma)\tau}. \end{align*} Furthermore, we define the sequence \begin{align*} Y_j:=\iint_{Q_j}\big(u^\frac{\beta+1}{2}-k_j^\frac{\beta+1}{2}\big)_+^2\d x \d t. \end{align*} Note that $Y_j$ is finite for every $j$ since $u\in L^{\beta+1}(\Omega_T)$. Define the auxiliary parameters \begin{align*} M:=\tfrac{\beta+1}{\beta}, \hspace{10mm} q:= p(\tfrac{1}{M}+\tfrac{1}{n})=\tfrac{p}{M}(\tfrac{n+M}{n}). \end{align*} A straightforward calculation shows that \eqref{nicerange-rephrased} (and hence \eqref{nicerange}) guarantees that $q>1$. Thus, we may use H\"older's inequality to estimate \begin{align}\label{Y-jplusone_estim1} Y_{j+1}\leq \Big[\iint_{Q_{j+1}} \big(u^\frac{\beta+1}{2}-k_{j+1}^\frac{\beta+1}{2}\big)_+^{2q}\d x \d t\Big]^\frac{1}{q}|Q_{j+1}\cap \{u>k_{j+1}\}|^\frac{1}{q'}. \end{align} We will use the shorthand notation \begin{align*} \phi:= \big(u^\frac{\beta+1}{2}-k_{j+1}^\frac{\beta+1}{2}\big)_+^\frac{2}{M}\leq (u^\beta-k^\beta_{j+1})_+. \end{align*} The upper bound, is a consequence of the definition of $M$ and the fact that $\tfrac{2}{M}>1$. In the following calculation we express the integral on the right-hand side of \eqref{Y-jplusone_estim1} in terms of $\phi$ and split the integral into space and time variables. We apply H\"older's inequality to the integral over the space variables, and then estimate one of the resulting factors upwards by the essential supremum over time. After this, we introduce the cut-off function $\varphi_j$ which allows us to apply the Gagliardo-Nirenberg inequality. We also apply Lemma \ref{estimates:boundary_terms} (i). Thus, we obtain two factors which both are bounded by the right-hand side of the energy estimate \eqref{caccioppoli}. All in all, we have \begin{align}\label{longcalc} \iint_{Q_{j+1}} &\phi^{p(\frac{n+M}{n})} \d x \d t = \int_{T_{j+1}}\int_{B_{j+1}} \phi^p \phi^\frac{pM}{n}\d x \d t \\ \notag &\leq \int_{T_{j+1}}\Big[ \int_{B_{j+1}} \phi^{p^*}\d x \Big]^\frac{p}{p^*} \Big[\int_{B_{j+1}} \phi^M \d x\Big]^\frac{p}{n}\d t \\ \notag &\leq \Big[\esssup_{T_{j+1}}\int_{B_{j+1}}\phi^M \d x\Big]^\frac{p}{n}\int_{T_{j+1}}\Big[ \int_{B_{j+1}} \phi^{p^*}\d x \Big]^\frac{p}{p^*} \d t \\ \notag &\leq \Big[\esssup_{T_{j+1}}\int_{B_{j+1}}\big(u^\frac{\beta+1}{2}-k_{j+1}^\frac{\beta+1}{2}\big)_+^2 \d x\Big]^\frac{p}{n}\int_{T_{j+1}}\Big[ \int_{B_{j+1}} (u^\beta-k^\beta_{j+1})_+^{p^*}\d x \Big]^\frac{p}{p^*} \d t \\ \notag &\leq \Big[\esssup_{T_{j}}\int_{B_{j}}\big(u^\frac{\beta+1}{2}-k_{j+1}^\frac{\beta+1}{2}\big)_+^2\varphi_j^p \d x\Big]^\frac{p}{n}\int_{T_{j}}\Big[ \int_{B_{j}} ((u^\beta-k^\beta_{j+1})_+\varphi_j)^{p^*}\d x \Big]^\frac{p}{p^*} \d t \\ \notag &\leq c \Big[\esssup_{T_{j}}\int_{B_{j}} \b[u,k_j]\chi_{\{u>k_j\}}\varphi_j^p \d x\Big]^\frac{p}{n}\int_{T_{j}} \int_{B_{j}} |\nabla [(u^\beta-k^\beta_{j+1})_+\varphi_j]|^p\d x \d t \\ \notag &\leq c\Big[ \iint_{Q_j} (u^\beta-k_{j+1}^\beta)^p_+ |\nabla \varphi_j|^p + \big(u^\frac{\beta+1}{2}-k_{j+1}^\frac{\beta+1}{2}\big)_+^2\varphi_j^{p-1}|\partial_t \varphi_j| \d x \d t \Big]^\frac{n+p}{n}. \end{align} The constant $c$ depends only on $m,n,p,C_0,C_1$. In the set where $u>k_{j+1}$ we can estimate \begin{align*} \frac{(u^\beta-k_{j+1}^\beta)^p_+}{\big(u^\frac{\beta+1}{2}-k_j^\frac{\beta+1}{2}\big)_+^2} = u^{m+p-3} \frac{(1-(k_{j+1}/u)^\beta)^p_+}{\big(1- (k_j/u)^\frac{\beta+1}{2}\big)_+^2} &\leq \frac{u^{m+p-3}}{\big(1- (k_j/k_{j+1})^\frac{\beta+1}{2}\big)^2} \\ &\leq \frac{c k^{m+p-3}}{\big(1- (k_j/k_{j+1})^\frac{\beta+1}{2}\big)^2}< c 2^{j} k^{m+p-3}, \end{align*} where the constant $c$ only depends on $m,p$. In the second last step we used $m+p<3$, and the fact that $k_{j+1}$ is comparable in size to $k$. Applying the previous estimate to the first term to the last line of \eqref{longcalc} and noting that in the second term we can replace $k_{j+1}$ by $k_j$ we obtain \begin{align*} \iint_{Q_{j+1}} &\phi^{p(\frac{n+M}{n})} \d x \d t \leq c\Big[ \iint_{Q_j} \big[ 2^{j} k^{m+p-3} |\nabla \varphi_j|^p + \varphi_j^{p-1}|\partial_t \varphi_j| \big] \big(u^\frac{\beta+1}{2}-k_j^\frac{\beta+1}{2}\big)_+^2 \d x \d t \Big]^\frac{n+p}{n}. \end{align*} Combining this estimate with the bounds for $\varphi_j$ and its derivatives leads to \begin{align*} \iint_{Q_{j+1}} \phi^{p(\frac{n+M}{n})} \d x \d t \leq c \Big( \frac{2^{(p+1)j}}{(1-\sigma)^p\tau}\Big[\Big(\frac{\tau}{\rho^p}\Big)k^{m+p-3}+1\Big] Y_j \Big)^\frac{n+p}{n}. \end{align*} From the last expression we see that if $k\geq \big(\frac{\tau}{\rho^p}\big)^\frac{1}{3-m-p}$ then \begin{align}\label{phi-integ-est} \iint_{Q_{j+1}} \phi^{p(\frac{n+M}{n})} \d x \d t \leq c \Big( \frac{2^{(p+1)j}}{(1-\sigma)^p\tau} Y_j \Big)^\frac{n+p}{n}. \end{align} Observe now that \begin{align}\label{Q_j-measure-est} |Q_j\cap \{u>k_{j+1}\}|k^{\beta+1}2^{-2(j+1)} &= |Q_j\cap \{u>k_{j+1}\}|(k_{j+1}^\frac{\beta+1}{2}-k_j^\frac{\beta+1}{2})^2 \\ \notag &\leq \iint_{Q_j\cap \{u>k_{j+1}\}}(u^\frac{\beta+1}{2}-k_j^\frac{\beta+1}{2})^2\d x \d t \leq Y_j. \end{align} Using \eqref{phi-integ-est} and \eqref{Q_j-measure-est} in \eqref{Y-jplusone_estim1} we end up with \begin{align}\label{iter-estim} Y_{j+1}\leq C b^j Y_j^{1+\delta}, \end{align} where \begin{align*} b=2^{(\frac{n+p}{n})(p+1)\frac{1}{q}+\frac{2}{q'}}, \hspace{5mm} C= \frac{c k^{-(\beta+1)\frac{1}{q'}}}{\big((1-\sigma)^p\tau\big)^\frac{n+p}{nq}}, \hspace{5mm}\delta=\frac{p}{nq}=\frac{M}{n+M}. \end{align*} and $c$ only depends on $m,n,p,C_0,C_1$. We want to show that $Y_j\to 0$. According to Lemma \ref{fastconvg} this is true provided that \begin{align*} Y_0\leq C^{-\frac{1}{\delta}}b^{-\frac{1}{\delta^2}}. \end{align*} Using the definition of $Y_0$ and the parameters we see that this is equivalent to \begin{align}\label{kcond} k\geq c\Big[ \big((1-\sigma)^p\tau\big)^{-\frac{n+p}{p}} \iint_{Q_{\rho,\tau}(z_o)}u^{\beta+1}\d x \d t\Big]^\frac{p}{p\beta n+(\beta+1)(p-n)}, \end{align} where $c$ is a constant depending only on $m,n,p,C_0,C_1$. Since \begin{align*} \iint_{Q_{\sigma \rho,\sigma\tau}(z_o)} (u^\frac{\beta+1}{2}-k^\frac{\beta+1}{2}\big)_+^2\d x \d t \leq Y_j \to 0, \end{align*} this means that $u\leq k$ almost everywhere in $Q_{\sigma \rho,(1+\sigma)\tau}(z_o)$. The only lower bounds for $k$ required in this argument were $k\geq \big(\frac{\tau}{\rho^p}\big)^\frac{1}{3-m-p}$ and \eqref{kcond}, so we have verified the estimate for the essential supremum. \end{proof} We end this section by proving that the estimate of Theorem \ref{theo:local_bdd} can be somewhat improved. This result will also be used in the reasoning leading to the Harnack estimate in Section \ref{sec:Harnack-est}. Note first that \eqref{nicerange-rephrased} can be rephrased as \begin{align*} (\beta+1)p+ n(m+p-3)>0. \end{align*} Thus there exists $r\in (0,\beta+1)$ such that \begin{align}\label{def:lambda-r} \lambda_r:=rp + n(m+p-3)>0. \end{align} The next theorem shows that there is an upper bound in terms of the $L^r$-norm of $u$. \begin{theo}\label{theo:Lr-Linfty} Let $r\in (0,\beta+1)$ be such that \eqref{def:lambda-r} is valid. Then for any cylinder $Q_{2\rho,2\tau}(z_o)\subset \Omega_T$, \begin{align}\label{essup-Lr-estim} \esssup_{Q_{\rho,\tau}(z_o)} u \leq c\Big[ \tau^{-\frac{n+p}{p}}\iint_{Q_{2\rho,2\tau}(z_o)}u^r\d x \d t\Big]^\frac{p}{\lambda_r} + c\Big(\frac{\tau}{\rho^p}\Big)^\frac{1}{3-m-p} \end{align} where the constant $c$ depends only on $r$ and the data. \end{theo} \begin{proof}[Proof] Define the increasing sequences \begin{align*} \rho_j:=(2-2^{-j})\rho, \hspace{7mm} \tau_j:=(2-2^{-j})\tau. \end{align*} Define cylinders $Q_j=Q_{\rho_j,\tau_j}(z_o)$. Applying Theorem \ref{theo:local_bdd} to the cylinder $Q_{j+1}$ with $\sigma=\rho_j/\rho_{j+1}=\tau_j/\tau_{j+1}$ and noting that $1-\sigma> 2^{-(j+2)}$ we end up with \begin{align*} \esssup_{Q_j} u &\leq c\Big[ 2^{j(n+p)}\tau_j^{-\frac{n+p}{p}}\iint_{Q_{j+1}}u^{\beta+1}\d x \d t\Big]^\frac{p}{p\beta n+(\beta+1)(p-n)} + \Big(\frac{\tau_j}{\rho_j^p}\Big)^\frac{1}{3-m-p} \\ & \leq c\Big[ 2^{j(n+p)}\tau^{-\frac{n+p}{p}}\iint_{Q_{j+1}}u^{\beta+1}\d x \d t\Big]^\frac{p}{p\beta n+(\beta+1)(p-n)} + \Big(\frac{2\tau}{\rho^p}\Big)^\frac{1}{3-m-p}, \end{align*} where in the second step we used the fact that $\rho_j\geq \rho$ and $\tau\leq \tau_j < 2\tau$. Denoting now $M_j:= \esssup_{Q_j} u$ and noting that $u\leq M_{j+1}$ a.e. in $Q_{j+1}$ we see that \begin{align*} M_j \leq c M_{j+1}^\frac{p(\beta+1-r)}{p\beta n+(\beta+1)(p-n)}\Big[ 2^{j(n+p)}\tau^{-\frac{n+p}{p}}\iint_{Q_{2\rho,2\tau}(z_o)}u^r\d x \d t\Big]^\frac{p}{p\beta n+(\beta+1)(p-n)} + \Big(\frac{2\tau}{\rho^p}\Big)^\frac{1}{3-m-p}. \end{align*} Due to \eqref{def:lambda-r}, the exponent of $M_{j+1}$ lies in the interval $(0,1)$. Applying Young's inequality to increase the exponent of $M_{j+1}$ to $1$ we end up with \begin{align*} M_j &\leq \varepsilon M_{j+1}+c(\varepsilon)\Big[ 2^{j(n+p)}\tau^{-\frac{n+p}{p}}\iint_{Q_{2\rho,2\tau}(z_o)}u^r\d x \d t\Big]^\frac{p}{\lambda_r} + \Big(\frac{2\tau}{\rho^p}\Big)^\frac{1}{3-m-p} \\ &= \varepsilon M_{j+1}+c(\varepsilon) b^j \Big[ \tau^{-\frac{n+p}{p}}\iint_{Q_{2\rho,2\tau}(z_o)}u^r\d x \d t\Big]^\frac{p}{\lambda_r} + \Big(\frac{2\tau}{\rho^p}\Big)^\frac{1}{3-m-p}, \end{align*} where $b=2^{\frac{p(n+p)}{\lambda_r}}$ and the constant $\varepsilon>0$ can be chosen freely. Iterating the last inequality we obtain \begin{align*} M_0 \leq \varepsilon^N M_N + c(\varepsilon)\Big[ \tau^{-\frac{n+p}{p}}\iint_{Q_{2\rho,2\tau}(z_o)}u^r\d x \d t\Big]^\frac{p}{\lambda_r}\sum^{N-1}_{j=0}(\varepsilon b)^j + \Big(\frac{2\tau}{\rho^p}\Big)^\frac{1}{3-m-p}\sum^{N-1}_{j=0}\varepsilon^j, \end{align*} for $N\geq 1$. Choosing $\varepsilon=\frac{1}{2b}$ we see that both sums on the right-hand side converge as $N\to \infty$. Since $M_N$ is bounded from above by the essential supremum of $u$ over $Q_{2\rho,2\tau}(z_o)$, the term $\varepsilon^N M_N$ vanishes in the limit and we end up with \eqref{essup-Lr-estim}. \end{proof} \section{H\"older continuity} In this setion we consider only $m$ and $p$ in the supercritical range \eqref{supercritical}. We show that in this case weak solutions are locally H\"older continuous. The starting point of the argument is a De Giorgi type lemma providing a sufficient condition for the reduction of the oscillation from above. First we introduce some notation. For $0 <\mu_+<\infty$ we denote \begin{align}\label{def:theta} \theta=\varepsilon\mu_+^{3-m-p}, \end{align} where $\varepsilon \in (0,1)$. A sufficiently small value of $\varepsilon$ will be chosen later in this section. Initially it is important that our results work for all $\varepsilon \in (0,1)$. \begin{lem}\label{lem:De_Giorgi_above} Let $u$ be a weak solution to \eqref{general} in the sense of Definition \ref{weakdef}. Suppose that we are given a number $0<\mu_+<\infty$, and let $\theta$ be chosen as in \eqref{def:theta}. Moreover, suppose $Q_{\rho,\theta\rho^p}(z_o) \subset \Omega_T$ is a parabolic cylinder satisfying $$ \esssup_{Q_{\rho,\theta \rho^p}(z_o)} u \leq \mu_+. $$ then there exists a constant $\nu_o$ depending only on $m,n,p, C_0, C_1$ such that if \begin{align} \label{assumption_level_1} |Q_{\rho,\theta\rho^p}(z_o)\cap \{u^\beta > \mu_+^\beta/2 \}|\leq \nu_o \varepsilon^\frac{n}{p} |Q_{\rho,\theta\rho^p}(z_o)| \end{align} then $$ u^\beta \leq \frac{3}{4}\mu_+^\beta $$ a.e.\ in $Q_{\rho/2,\theta(\rho/2)^p}(z_o)$. \end{lem} \begin{proof}[Proof] Define sequences of numbers and sets as follows: \begin{align*} \rho_j:= \frac{1}{2}\big(1+\frac{1}{2^j}\big)\rho, \hspace{5mm} k_j^\beta:=\big(1-\frac{1}{4}-\frac{1}{2^{j+2}}\big)\mu_+^\beta, \hspace{5mm} Q_j&:=Q_{\rho_j,\theta\rho_j^p}(z_o), \\ A_j:=Q_j\cap \{u>k_j\}, \hspace{5mm} Y_j&:=\frac{|A_j|}{|Q_j|}. \end{align*} We can now choose functions $\varphi_j\in C^\infty(Q_j;[0,1])$ vanishing near the parabolic boundary of $Q_j$ and satisfying $\phi_j=1$ on $Q_j$ and for which \begin{align*} |\nabla \varphi_j|\leq \rho^{-1} 2^{j+2}, \hspace{10mm} |\partial_t \varphi_j|\leq c_p \theta^{-1}\rho^{-p} 2^{jp}. \end{align*} Note that in the set where $u>k_{j+1}$ we have \begin{align}\label{shtevensh} u^\beta-k_j^\beta>k_{j+1}^\beta-k_j^\beta=\frac{\mu_+^\beta}{2^{j+3}}. \end{align} This observation and H\"older's inequality show that \begin{align}\label{A_jplusone-est} \frac{\mu_+^{\beta p}}{2^{(j+3)p}}|A_{j+1}|&\leq \iint_{A_{j+1}}(u^\beta-k_j^\beta)_+^p \d x \d t \\ &\leq \Big[ \iint_{A_{j+1}}(u^\beta-k_j^\beta)_+^{p\frac{(n+p)}{n}} \d x \d t\Big]^\frac{n}{n+p}|A_{j+1}|^\frac{p}{n+p}. \end{align} The integral in the last expression can be estimated using H\"older's inequality and \eqref{shtevensh} as \begin{align*} &\iint_{A_{j+1}}(u^\beta-k_j^\beta)_+^{p\frac{(n+p)}{n}} \d x \d t \leq \int_{T_{j+1}}\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^{p\frac{p}{n}}\chi_{A_{j+1}} (u^\beta-k_j^\beta)_+^p \d x \d t \\ &\leq \int_{T_{j+1}}\Big[\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^p\chi_{A_{j+1}}\d x\Big]^\frac{p}{n}\Big[\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^{p^*}\d x \Big]^\frac{p}{p^*}\d t \\ &\leq c2^{j(2-p)\frac{p}{n}}\mu_+^{\beta(p-2)\frac{p}{n}}\int_{T_{j+1}}\Big[\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^2\d x\Big]^\frac{p}{n}\Big[\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^{p^*}\d x \Big]^\frac{p}{p^*}\d t \\ &\leq c2^{j(2-p)\frac{p}{n}}\mu_+^{\beta(p-2)\frac{p}{n}}\Big[\esssup_{T_{j+1}}\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^2\d x\Big]^\frac{p}{n}\int_{T_{j+1}}\Big[\int_{B_{j+1}}(u^\beta-k_j^\beta)_+^{p^*}\d x \Big]^\frac{p}{p^*}\d t, \end{align*} where in the last step we have estimated one of the integrals over space upwards by taking the essential supremum in time. Note that by Lemma \eqref{estimates:boundary_terms} (ii) we have \begin{align*} \tfrac1c (u^\beta-k_j^\beta)_+^2\leq (u^{\beta-1}+k_j^{\beta-1})\b[u,k_j]\leq 2\mu_+^{\beta-1}\b[u,k_j]. \end{align*} Using this observation and introducing the cut-off functions $\varphi_j$ puts us into a position to apply Sobolev inequality and the energy estimate \eqref{caccioppoli} as follows. \begin{align*} &\iint_{A_{j+1}}(u^\beta-k_j^\beta)_+^{p\frac{(n+p)}{n}} \d x \d t \\ &\quad \leq c2^{j(2-p)\frac{p}{n}}\mu_+^{\frac{p}{n}(m+p-3)}\Big[\esssup_{T_j}\int_{B_j}\b[u,k_j]^+\varphi_j^p\d x\Big]^\frac{p}{n}\int_{T_j}\Big[\int_{B_j}[(u^\beta-k_j^\beta)_+\varphi_j]^{p^*}\d x \Big]^\frac{p}{p^*}\d t \\ &\quad \leq c2^{j(2-p)\frac{p}{n}}\mu_+^{\frac{p}{n}(m+p-3)}\Big[\esssup_{T_j}\int_{B_j}\b[u,k_j]^+\varphi_j^p\d x\Big]^\frac{p}{n}\int_{T_j} \int_{B_j}|\nabla [(u^\beta-k_j^\beta)_+\varphi_j]|^p\d x \d t \\ &\quad \leq c2^{j(2-p)\frac{p}{n}}\mu_+^{\frac{p}{n}(m+p-3)}\Big[\iint_{A_j}(u^\beta-k_j^\beta)_+^p|\nabla \varphi_j|^p + \b[u,k_j]\varphi_j^{p-1}|\partial_t\varphi_j|\d x \d t\Big]^\frac{n+p}{n}. \end{align*} The second term in the last integral can be estimated using Lemma \ref{estimates:boundary_terms} (iii) and the bound for $|\partial_t\varphi_j|$ as \begin{align*} \b[u,k_j]\varphi_j^{p-1}|\partial_t\varphi_j|\leq c \mu_+^{\beta+1} \theta^{-1}\rho^{-p}2^{jp} = c\varepsilon^{-1}\mu_+^{\beta p}\rho^{-p} 2^{jp}. \end{align*} Using this and the bound for $|\nabla \varphi_j|$ and $u$ we see that \begin{align*} \iint_{A_{j+1}}(u^\beta-k_j^\beta)_+^{p\frac{(n+p)}{n}} \d x \d t \leq c2^{j\frac{p}{n}(n+2)}\mu_+^{\frac{p}{n}(m+p-3)}(\varepsilon^{-1}\rho^{-p}\mu_+^{\beta p}|A_j|)^\frac{n+p}{n}. \end{align*} Combining this estimate with \eqref{A_jplusone-est} and the observation that $|A_{j+1}|\leq |A_j|$ we have \begin{align*} |A_{j+1}|&\leq c\varepsilon^{-1} 2^{jp[1+\frac{n+2}{n+p}]}\mu_+^{\frac{p}{n+p}(m+p-3)}\rho^{-p}|A_j|^{1+\frac{p}{n+p}} \\ &= c\varepsilon^{-\frac{n}{n+p}} b^j\theta^{-\frac{p}{n+p}}\rho^{-p}|A_j|^{1+\frac{p}{n+p}}, \end{align*} where $c$ and $b$ only depend on $m,n,p, C_0,C_1$. Dividing the last expression by $|Q_j|$ and noting that $|Q_j|$ is proportional to $\theta \rho^{n+p}$ we obtain \begin{align*} Y_{j+1}\leq c\varepsilon^{-\frac{n}{n+p}}b^j Y_j^{1+\frac{p}{n+p}}. \end{align*} Setting $\delta:=\frac{p}{n+p}$ we see that Lemma \ref{fastconvg} guarantees that $Y_j\to 0$ provided that \begin{align*} \frac{|Q_{\rho,\theta\rho^p}(z_o)\cap \{ u^\beta>\mu_+^\beta/2\}|}{|Q_{\rho,\theta\rho^p}(z_o)|} = Y_0 \leq (c\varepsilon^{-\frac{n}{n+p}})^{-\frac{1}{\delta}} b^{-\frac{1}{\delta^2}}= \varepsilon^\frac{n}{p}\nu_o, \end{align*} where $\nu_o= c^{-\frac{1}{\delta}}b^{-\frac{1}{\delta^2}}$ only depends on $m,n,p, C_0,C_1$. Since $|Q_j|$ is bounded from above, this also means that $|A_j|\to 0$. Furthermore, since \begin{align*} Q_{\rho/2,\theta(\rho/2)^p}(z_o)\cap \{u^\beta >\tfrac{3}{4}\mu_+^\beta\}\subset A_j, \end{align*} for all $j$, the measure of the set on the left hand side must be zero. \end{proof} \subsection{Reduction of the oscillation} We are now ready to prove the reduction of the oscillation in the case $\mu_-=0$. If the condition of the De Giorgi lemma holds, then we have a reduction of the oscillation from above. Suppose now that the condition in the De Giorgi lemma fails, i.e. \begin{align*} |Q_{\rho,\theta\rho^p}(z_o)\cap \{u^\beta > \mu_+^\beta/2 \}|> \nu_o \varepsilon^\frac{n}{p}|Q_{\rho,\theta\rho^p}(z_o)|. \end{align*} Then there is a set $\Delta \subset (t_o-\theta\rho^p,t_o)$ of positive measure such that \begin{align*} |\{x\in B_\rho(x_o)\,|\, u(x,\tau)>2^{-\frac{1}{\beta}}\mu_+\}|>\nu_o\varepsilon^\frac{n}{p} |B_\rho(x_o)|, \end{align*} for all $\tau\in \Delta$. Provided that $\bar{Q}_{2\rho,\theta\rho^p}\subset \Omega\times[0,T)$, the $L^1$-Harnack inequality of Theorem \ref{harnack} for the time-continuous representative of $u$ shows that for $\tau\in \Delta$, \begin{align}\label{harnapplic} \nu_o \varepsilon^\frac{n}{p} c_n\rho^n 2^{-\frac{1}{\beta}}\mu_+ &< 2^{-\frac{1}{\beta}}\mu_+|\{x\in B_\rho(x_o)\,|\, u(x,\tau)>2^{-\frac{1}{\beta}}\mu_+\}|\leq \int_{B_\rho(x_o)} u(x,\tau)\d x \\ &\leq \gamma \inf_{t\in (t_o-\theta\rho^p,t_o)} \int_{B_{2\rho}(x_o)} u(x,t)\d x + \gamma \Big(\frac{\theta \rho^p}{\rho^\lambda}\Big)^\frac{1}{3-m-p} \end{align} By the definition of $\lambda$ and $\theta$ we see that \begin{align*} \Big(\frac{\theta \rho^p}{\rho^\lambda}\Big)^\frac{1}{3-m-p}=\varepsilon^\frac{1}{3-m-p}\mu_+\rho^n. \end{align*} Moving this term to the right-hand side of \eqref{harnapplic} we obtain \begin{align}\label{jytkytsunami} \varepsilon^\frac{n}{p}(c - \gamma\varepsilon^\kappa)\mu_+\rho^n \leq \gamma \inf_{t\in (t_o-\theta\rho^p,t_o)} \int_{B_{2\rho}(x_o)} u(x,t)\d x, \end{align} where $c=c(m,n,p, C_0, C_1)$ and \begin{align*} \kappa=\frac{1}{3-m-p}-\frac{n}{p}, \end{align*} is a positive number by \eqref{supercritical}. If we now choose \begin{align*} \varepsilon:= \Big(\frac{c}{2\gamma}\Big)^\frac{1}{\kappa}, \end{align*} which clearly only depends on $m,n,p, C_0, C_1$ we also see from \eqref{jytkytsunami} that \begin{align}\label{nunnuka} C\mu_+\rho^n \leq \inf_{t\in (t_o-\theta\rho^p,t_o)} \int_{B_{2\rho}(x_o)} u(x,t)\d x, \end{align} for a constant $C=C(m,n,p, C_0, C_1)\leq 1$. Take now $\zeta>0$ and note that\ \begin{align*} \int_{B_{2\rho}(x_o)} u(x,t)\d x &= \int_{B_{2\rho}(x_o)\cap \{u(x,t)\geq \zeta\mu_+\}} u(x,t)\d x + \int_{B_{2\rho}(x_o)\cap \{u(x,t)<\zeta\mu_+\}} u(x,t)\d x \\ &\leq \mu_+|B_{2\rho}(x_o)\cap \{u(x,t)\geq \zeta \mu_+\}| + \zeta\mu_+ |B_{2\rho}(x_o)|. \end{align*} With the choice $\zeta:=C 2^{-(n+1)}/c_n$ where $C$ is the constant from \eqref{nunnuka}, the last estimate and \eqref{nunnuka} show that \begin{align}\label{sss} |B_{2\rho}(x_o)\cap \{u(x,t)\geq \zeta\mu_+\}|\geq \alpha |B_{2\rho}(x_o)| \end{align} for all $t\in (t_o-\theta\rho^p,t_o)$ for a constant $\alpha$ depending only on $m,n,p, C_0,C_1$. Suppose now that $Q_{32\rho, \theta \rho^p}(z_o)\subset \Omega_T$. This puts us in a position to apply Theorem \ref{theo:exppos} for a sufficiently small $M$. Namely, taking $M= \min\{\zeta,(\varepsilon/2^p)^\frac{1}{3-m-p}\}\mu_+$, we see that \eqref{sss} is still valid with $\zeta \mu_+$ replaced by $M$ and furthermore that \begin{align*} B_{32\rho}(x_o)\times(t_o-\delta M^{3-m-p}(2\rho)^p, t_o)\subset Q_{32\rho, \theta \rho^p}(z_o)\subset \Omega_T, \end{align*} where $\delta\in (0,1)$ is the constant from Theorem \ref{theo:exppos}. Hence, we may apply Theorem \ref{theo:exppos} with $s= t_o-\delta M^{3-m-p}(2\rho)^p$ and $\rho$ replaced by $2\rho$ to conclude that there is a $\xi\in (0,1)$ and $\tilde{\varepsilon}<\varepsilon$ depending only on $m,n,p,C_0,C_1$ such that \begin{align}\label{red_from_below} u\geq \xi \mu_+ \textrm{ in } B_{4\rho}(x_o)\times (t_o-\tilde{\varepsilon}\mu_+^{3-m-p}\rho^p,t_o), \end{align} which is the reduction of the oscillation from below. Combining the previous reasoning and Lemma \ref{lem:De_Giorgi_above}, we have shown the following. \begin{lem}\label{lem:mu-plus_red_osc} There are constants $\varepsilon, \gamma, \eta \in (0,1)$ depending only on $m,n,p,C_0,C_1$ such that for any weak solution $u$ and number $\mu_+>0$ satisfying the conditions $Q_{32\rho, \varepsilon\mu_+^{3-m-p}\rho^p}(z_o)\subset \Omega_T$ and $u\leq \mu_+$ on $Q_{\rho, \varepsilon\mu_+^{3-m-p}\rho^p}(z_o)$, we have \begin{align}\label{osc-red1} \essosc_{Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o)} u \leq \eta \mu_+. \end{align} Furthermore, one of the following condition must hold in the cylinder $Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o)$: \begin{align}\label{gandauli} &(i)\quad \esssup_{Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o)} u\leq \big(\frac{1+\eta}{2}\big)\mu_+, \textrm{ or } \\ \notag &(ii)\quad \essinf_{Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o)} u\geq \big(\frac{1-\eta}{2}\big)\mu_+. \end{align} \end{lem} \begin{proof}[Proof] By Lemma \ref{lem:De_Giorgi_above} and the previous reasoning, \eqref{osc-red1} is valid with $\gamma=\min\{ 2^{-p}, \frac{\tilde{\varepsilon}}{\varepsilon}\}$ and $\eta=\max \{ (3/4)^\frac{1}{\beta}, 1-\xi\}$, where $\tilde{\varepsilon}$ and $\xi$ are the constants appearing in \eqref{red_from_below}. Furthermore, if \eqref{gandauli} $(i)$ fails, \eqref{osc-red1} shows that we must have \begin{align*} \essinf_{Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o)} u\geq \big(\frac{1+\eta}{2}\big)\mu_+ -\eta\mu_+= \big(\frac{1-\eta}{2}\big)\mu_+, \end{align*} so that \eqref{gandauli} (ii) holds. \end{proof} \begin{lem}\label{lem:osc-red} There are constants $c$ and $\nu$ depending only on $m,n,p,C_0,C_1$ such that for any weak solution $u$ and number $\mu_+>0$ for which $Q_{32\rho, \varepsilon\mu_+^{3-m-p}\rho^p}(z_o)\subset \Omega_T$ and $u\leq \mu_+$ on $Q_{\rho, \varepsilon\mu_+^{3-m-p}\rho^p}(z_o)$, we have \begin{align}\label{r-rho-osc-red} \essosc_{Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z_o)} u \leq c \mu_+\Big(\frac{r}{\rho}\Big)^\nu, \end{align} for all $0< r \leq \rho$. Here, $\varepsilon$ is the constant from Lemma \ref{lem:mu-plus_red_osc}. \end{lem} \begin{proof}[Proof] Denote $C:= 2\max\{2,\gamma^{-\frac{1}{p}}\}$ where $\gamma$ is the constant from Lemma \ref{lem:mu-plus_red_osc} and define \begin{align*} \mu_+^j:=\Big(\frac{1+\eta}{2}\Big)^j\mu_+,\hspace{5mm} \rho_j:=\rho/C^j. \end{align*} With these choices, \begin{align*} Q_{\rho_1,\varepsilon(\mu^1_+)^{3-m-p}\rho_1^p}(z_o)\subset Q_{\frac{\rho}{2},\gamma\varepsilon\mu_+^{3-m-p}\rho^p}(z_o), \end{align*} and Lemma \ref{lem:mu-plus_red_osc} guarantees that \begin{align*} \essosc_{Q_{\rho_1,\varepsilon(\mu^1_+)^{3-m-p}\rho_1^p}(z_o)} u\leq \eta \mu_+ \end{align*} Furthermore, if we are in the case \eqref{gandauli} (i), we have $u\leq \mu_1$ on $Q_{\rho_1,\varepsilon(\mu^1_+)^{3-m-p}\rho_1^p}(z_o)$ and we may apply Lemma \ref{lem:mu-plus_red_osc} to this subcylinder instead to conclude that \begin{align*} \essosc_{Q_{\rho_2,\varepsilon(\mu^1_+)^{3-m-p}\rho_2^p}(z_o)} u\leq \eta \mu^1_+ \end{align*} Also, Lemma \ref{lem:mu-plus_red_osc} guarantees that one of the conditions of \eqref{gandauli} holds with $\rho$ replaced by $\rho_1$ and $\mu_+$ replaced by $\mu^1_+$. If condition (i) is true, we are again in a position to continue the iteration. Continuing in this way, we see that as long as we stay in case (i) at every step of the iteration we have \begin{align}\label{rutilus} \essosc_{Q_{\rho_j,\varepsilon(\mu^j_+)^{3-m-p}\rho_j^p}(z_o)} u &\leq \eta \mu^{j-1}_+, \\ \label{perca}\esssup_{Q_{\rho_{j-1}, \varepsilon(\mu^{j-1}_+)^{3-m-p}\rho_{j-1}^p}(z_o)} u &\leq \mu^{j-1}_+ \end{align} Either this estimate holds for every $j \in \ensuremath{\mathbb{N}}$, or there is a $k\in \ensuremath{\mathbb{N}}$ such that \eqref{rutilus} holds for all $j\in \{1,\dots, k\}$ and \begin{align}\label{lower_bnd_u} \essinf_{Q_{\frac{\rho_{k-1}}{2},\gamma\varepsilon(\mu^{k-1}_+)^{3-m-p}\rho_{k-1}^p}(z_o)} u\geq \big(\frac{1-\eta}{2}\big)\mu^{k-1}_+ = \big(\frac{1-\eta}{1+\eta}\big)\mu^k_+. \end{align} We assume for now the existence of such a $k$ and investigate its consequences. In the end we will show that the estimate \eqref{r-rho-osc-red} holds whether $k$ exists or not. Since \begin{align*} \frac{\rho_{k-1}}{2}=\tfrac{C}{2}\rho_k\geq 2\rho_k, \hspace{5mm} \gamma\varepsilon(\mu^{k-1}_+)^{3-m-p}\rho_{k-1}^p &=\gamma C^p \big( \tfrac{2}{1+\eta}\big)^{3-m-p}\varepsilon(\mu^k_+)^{3-m-p}\rho_k^p \\ &\geq 2^p \big( \tfrac{2}{1+\eta}\big)^{3-m-p}\varepsilon(\mu^k_+)^{3-m-p}\rho_k^p \\ &> \varepsilon (\mu^k_+)^{3-m-p}(2\rho_k)^p, \end{align*} it follows from \eqref{lower_bnd_u} and \eqref{perca} with $j=k$ that \begin{align*} \big(\frac{1-\eta}{1+\eta}\big)\mu^k_+ \leq u \leq \frac{2}{1+\eta}\mu_+^k,\hspace{7mm} \textrm{in } Q_{2\rho_k, \varepsilon (\mu^k_+)^{3-m-p} (2\rho_k)^p}(z_o). \end{align*} Up to a translation in the time variable this is exactly the situation of Lemma \ref{re-scaling} with $M=\mu_+^k$. By translation we may assume that $t_o=0$. Lemma \ref{re-scaling} shows that the function \begin{align*} v(x,t)=(\mu_+^k)^{-1}u\big(x, (\mu_+^k)^{3-m-p}t\big), \hspace{3mm}(x,t)\in Q_{2\rho_k, \varepsilon(2\rho_k)^p}(x_o,0). \end{align*} solves an equation of parabolic $p$-Laplace type, where the constants in the structure conditions only depend on $m,n,p,C_0,C_1$. Applying Lemma \ref{lem:p-parabolic_hold_cont} to $v$ then shows that for all $(x,t), (y,s)\in Q_{\rho_k, \varepsilon(\rho_k)^p}(x_o,0)$, \begin{align*} |v(x,t)-v(y,s)|\leq c\Big[\frac{|x-y|+|t-s|^\frac{1}{p}}{\rho_k}\Big]^{\nu_o}, \end{align*} where the constants $c$ and $\nu_o$ only depend on $m,n,p,C_0,C_1$. Since the fraction in the last estimate is bounded from above by $2+\varepsilon^\frac{1}{p}$ we see that for any $0<\nu\leq\nu_o$ we have \begin{align*} |v(x,t)-v(y,s)|\leq c(2+\varepsilon^\frac{1}{p})^{\nu_o-\nu}\Big[\frac{|x-y|+|t-s|^\frac{1}{p}}{\rho_k}\Big]^\nu < c(2+\varepsilon^\frac{1}{p})^{\nu_o}\Big[\frac{|x-y|+|t-s|^\frac{1}{p}}{\rho_k}\Big]^\nu, \end{align*} for all $(x,t), (y,s)\in Q_{\rho_k, \varepsilon(\rho_k)^p}(x_o,0)$. For the original function $u$ this translates into \begin{align}\label{u-hold-est} |u(x,t)-u(y,s)|\leq c\mu^k_+\Big[\frac{|x-y|+(\mu^k_+)^\frac{m+p-3}{p}|t-s|^\frac{1}{p}}{\rho_k}\Big]^\nu, \end{align} for all $(x,t),(y,s) \in Q_{\rho_k, \varepsilon (\mu^k_+)^{3-m-p} \rho_k^p}(z_o)$ and $0<\nu\leq\nu_o$. The constant $c$ still depends only on $m,n,p,C_0,C_1$. Now we are ready to prove \eqref{r-rho-osc-red}. For this, take $0< r \leq \rho$. Pick $j\in \ensuremath{\mathbb{N}}_0$ such that \begin{align*} \Big(\frac{1+\eta}{2}\Big)^{(j+1)\frac{(3-m-p)}{p}}\frac{\rho}{C^{j+1}} < r\leq \Big(\frac{1+\eta}{2}\Big)^{j\frac{(3-m-p)}{p}}\frac{\rho}{C^j}. \end{align*} From the left inequality we can deduce that \begin{align*} \ln \Big[\frac{r}{\rho}\Big] > \ln \Big[\frac{1}{C}\Big(\frac{1+\eta}{2}\Big)^\frac{3-m-p}{p}\Big] + j \ln \Big[\frac{1}{C}\Big(\frac{1+\eta}{2}\Big)^\frac{3-m-p}{p}\Big], \end{align*} and with some further manipulations that \begin{align}\label{j-estim} j> -1 -b \ln \Big[\frac{r}{\rho}\Big] , \end{align} for some $b>0$ depending only on $m,n,C_0,C_1$. Note that $r<\rho_j$ and \begin{align*} \varepsilon\mu_+^{3-m-p}r^p \leq \varepsilon (\mu^j_+)^{3-m-p}\rho_j^p, \end{align*} so $Q_{r, \varepsilon\mu_+^{3-m-p}r^p}(z_o)\subset Q_{\rho_j, \varepsilon (\mu^j_+)^{3-m-p}\rho_j^p}(z_o)$. If $j\leq k$ (or if $k$ does not exist, which means that \eqref{rutilus} is valid for all $j$) then \eqref{rutilus} and \eqref{j-estim} imply that \begin{align*} \essosc_{ Q_{r, \varepsilon\mu_+^{3-m-p}r^p}(z_o) } u\leq \eta \mu^{j-1}_+ = \frac{2\eta}{1+\eta}\mu_+ \Big[\frac{1+\eta}{2}\Big]^j< \eta\mu_+\Big[\frac{2}{1+\eta}\Big]^2 \Big[\frac{2}{1+\eta}\Big]^{b\ln[r/\rho]} = c \mu_+\Big(\frac{r}{\rho}\Big)^{\nu_1}, \end{align*} for some positive constants $c$ and $\nu_1$ depending only on $m,n,p,C_0,C_1$. Suppose now instead that $j>k$. Then $Q_{r, \varepsilon\mu_+^{3-m-p}r^p}(z_o)\subset Q_{\rho_k, \varepsilon (\mu^k_+)^{3-m-p}\rho_k^p}(z_o)$ so from \eqref{u-hold-est} we see that \begin{align*} \essosc_{ Q_{r, \varepsilon\mu_+^{3-m-p}r^p}(z_o) } u &\leq c\mu^k_+\Big[\frac{2r+(\mu^k_+)^\frac{m+p-3}{p}\varepsilon^\frac{1}{p}\mu_+^\frac{(3-m-p)}{p}r }{\rho_k}\Big]^\nu \\ &= c \Big(\frac{1+\eta}{2}\Big)^k\mu_+ \Big[\frac{2r+(\frac{2}{1+\eta})^{k\frac{(3-m-p)}{p}}\varepsilon^\frac{1}{p}r }{\rho/C^k}\Big]^\nu \\ &\leq c\Big[\Big(\frac{2}{1+\eta}\Big)^{\frac{\nu(3-m-p)}{p}-1}C^\nu\Big]^k \mu_+\Big(\frac{r}{\rho}\Big)^\nu. \end{align*} Observe now that the expression inside the square brackets can be made smaller than or equal to one by taking $\nu\leq \nu_2$ where the upper bound $\nu_2$ depends only on $C$ and $\eta$ and hence only on $m,n,p,C_0,C_1$. Taking now $\nu:=\min\{\nu_1,\nu_2\}$ we finally have verified that \eqref{r-rho-osc-red} holds in all cases. \end{proof} \subsection{H\"older continuity} Using Lemma \ref{osc-red1} we can now easily prove the local H\"older continuity. \begin{theo} Let $u$ be a weak solution in the sense of Definition \ref{weakdef}. Let $m$ and $p$ be in the supercritical range \eqref{supercritical}. Then $u$ is locally H\"older continuous in $\Omega_T$ and the H\"older exponent depends only on $m,n,p,C_0,C_1$. \end{theo} \begin{proof}[Proof] Let $z_o\in \Omega_T$. Pick $R>0$ such that the $(n+1)$-dimensional closed ball $\bar{B}^{n+1}_{2R}(z_o)$ centered at $z_o$ is contained in $\Omega_T$ and define \begin{align*} \mu_+=\esssup_{ \bar{B}^{n+1}_{2R}(z_o) } u <\infty. \end{align*} The number $\mu_+$ is finite since the range \eqref{supercritical} is contained in the range \eqref{nicerange} which according to Theorem \ref{theo:local_bdd} guarantees local boundedness. By picking a suitable representative of $u$, we may assume that $\mu_+$ is the actual supremum of $u$ on the ball $\bar{B}^{n+1}_{2R}(z_o)$. We can now choose $\rho>0$ so small that for all $z\in \bar{B}^{n+1}_{R}(z_o)$, we have \begin{align*} Q_{\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z)\subset \bar{B}^{n+1}_{2R}(z_o),\hspace{10mm} Q_{32\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z)\subset \Omega_T. \end{align*} From the first condition it follows that $u\leq \mu_+$ in every cylinder $Q_{\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z)$ where $z\in \bar{B}^{n+1}_{R}(z_o)$. Thus, according to Lemma \ref{lem:osc-red}, \begin{align}\label{aaaaa} \essosc_{Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z)} u \leq c \mu_+\Big(\frac{r}{\rho}\Big)^\nu, \end{align} for every $r\in (0,\rho)$ and $z\in \bar{B}^{n+1}_{R}(z_o)$. If in the above estimate we had the oscillation rather than the essential oscillation we could now apply \eqref{aaaaa} to any pair of points that are sufficiently close to each other. Since this is not case, we must first exclude a set of measure zero so that the different types of oscillation coincide. In order to ensure that we are only disregarding a set of measure zero, this should be done only for a countable number of cylinders. We now make this idea precise. For every $(z,r)$ in the countable set $[\bar{B}^{n+1}_{R}(z_o)\cap \mathbb{Q}^{n+1} ] \times [(0,\rho)\cap \mathbb{Q}]$, there is a set $N_r^z\subset Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z)$ of measure zero such that for all $(y,s)\in Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z)\setminus N^z_r$, \begin{align*} \essinf_{ Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z) } u \leq u(y,s) \leq \esssup_{ Q_{r,\varepsilon\mu_+^{3-m-p}r^p}(z) } u. \end{align*} Define $N=\cup_{(z,r)} N^z_r$, and suppose that $z_1,z_2 \in B^{n+1}_{R}(z_o)\setminus N$. We may also assume that $t_1\leq t_2$. Suppose first that $z_1\in Q_{\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z_2)\cup (B_\rho(x_2)\times\{t_2\})$. Then there is a sequence of numbers $(z^j)\subset B^{n+1}_{R}(z_o)\cap \mathbb{Q}^{n+1}$ such that $z^j\to z_2$, $t^j\geq t_2$, and $z_1 \in Q_{\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z^j)$ for all $j\in \ensuremath{\mathbb{N}}$. Define \begin{align*} \hat{r}_j&:= |x_1-x^j|<\rho,\hspace{7mm} \tilde{r}_j:= \Big(\frac{|t_1-t^j|}{\varepsilon\mu_+^{3-m-p}}\Big)^\frac{1}{p}<\rho, \\ \hat{r}&:= |x_1-x_2|<\rho,\hspace{7mm} \tilde{r}:= \Big(\frac{|t_1-t_2|}{\varepsilon\mu_+^{3-m-p}}\Big)^\frac{1}{p}<\rho. \end{align*} Take now $r_j\in (\max\{\hat{r}_j,\tilde{r}_j\}, \max\{\hat{r}_j,\tilde{r}_j\}+\frac{1}{j})\cap \mathbb{Q}$ such that $r_j<\rho$. Then $r_j$ converges to $\max\{\hat{r},\tilde{r}\}=:r$. Moreover, $z_1 \in Q_{r_j,\varepsilon\mu_+^{3-m-p}r^p_j}(z^j)\setminus N$ and also $z_2$ belongs to this set for large $j$ so \begin{align*} |u(z_1)-u(z_2)|\leq \essosc_{Q_{r_j,\varepsilon\mu_+^{3-m-p}r^p_j}(z^j)}u &\leq c \mu_+\Big(\frac{r_j}{\rho}\Big)^\nu \\ &\xrightarrow[j\to \infty]{} c \mu_+\Big(\frac{r}{\rho}\Big)^\nu \\ &\leq c \mu_+\rho^{-\nu} (|x_1-x_2| + \Big(\frac{|t_1-t_2|}{\varepsilon\mu_+^{3-m-p}}\Big)^\frac{1}{p})^\nu \\ &\leq C |z_1-z_2|^\frac{\nu}{p}, \end{align*} where the constant $C$ depends on the data and $\rho,\mu_+$. Suppose now instead that $z_1$ does not belong to the set $Q_{\rho,\varepsilon\mu_+^{3-m-p}\rho^p}(z_2)\cup (B_\rho(x_2)\times\{t_2\})$. Then \begin{align*} |u(z_1)-u(z_2)|\leq \frac{\max\{u(z_1),u(z_2)\}}{|z_1-z_2|^\frac{\nu}{p}}|z_1-z_2|^\frac{\nu}{p}\leq \mu_+ \min\{ \rho, \varepsilon\mu_+^{3-m-p}\rho^p\}^{-\frac{\nu}{p}} |z_1-z_2|^\frac{\nu}{p}. \end{align*} Thus, we have verified that for all $z_1,z_2\in \bar{B}^{n+1}_{R}(z_o)\setminus N$, \begin{align}\label{holder-est} |u(z_1)-u(z_2)|\leq C |z_1-z_2|^\frac{\nu}{p}, \end{align} for a constant $C=C(m,n,p,C_0,C_1,\mu_+,R)$. (Note that $\rho$ depends only on $R$, the data and $\mu_+$.) Since the set $N$ has measure zero, we can re-define $u$ at every point of $N$ as the unique limit guaranteed by \eqref{holder-est} when approaching the point through the set $\bar{B}^{n+1}_{R}(z_o)\setminus N$. In this way we obtain a representative of $u$ which satisfies \eqref{holder-est} for all points $z_1,z_2 \in \bar{B}^{n+1}_{R}(z_o)$. \end{proof} \section{Harnack estimates}\label{sec:Harnack-est} We conclude this paper considering the Harnack inequality for solutions of parabolic singular supercritical equations. Such results were proved in \cite{DiGiaVe1} for equations of parabolic $p$-Laplace and porous medium type. For doubly nonlinear equations see \cite{FoSoVe3} under more restrictive assumptions. Our method is based on the pattern scheme of \cite{DuMoVe}. \ Let us state and prove some lemmata. \begin{lem}[Measure-to-point estimate]\label{lem:MTP-est} Let $u\ge 0$ be a weak solution of \eqref{general}. Suppose that $B_{16\rho}(x_o)\times [t_o,t_o + M^{3-m-p}\rho^p] \subset \Omega_T$. Let $\mu\in(0,1]$ and suppose that \begin{align}\label{assumption-hehu} |B_\rho(x_o)\cap \{u(\cdot, t_o)\geq M\}|\geq \mu |B_\rho(x_o)|. \end{align} Then there exist constants $\xi,\tau\in (0,1)$ depending only on the data and $\mu$, such that \begin{align*} u\geq \xi M, \textrm{ in } B_{2\rho}(x_o)\times [t_o + \frac{\tau}{2} M^{3-m-p}\rho^p, t_o + \tau M^{3-m-p}\rho^p]. \end{align*} Moreover, $\tau$ can be chosen arbitrarily small by decreasing $\xi$. \end{lem} \begin{proof}[Proof] Assumption \eqref{assumption-hehu} and the fact that $B_\rho(x_o)\times [t_o,t_o+ M^{3-m-p}\rho^p]$ is contained in the domain $\Omega_T$ allow us to apply Lemma \ref{snails} to conclude that there exists $\epsilon(\mu)$ such that \begin{align}\label{pellini} |B_\rho(x_o)\cap \{ u(\cdot,t)\geq \epsilon M\}|\geq \frac{\mu}{2}|B_\rho(x_o)|, \end{align} for all $t \in (t_o, t_o + \delta M^{3-m-p}\rho^p)$. Here, $\delta =\delta(data, \mu) \in (0,1)$ is the constant from Lemma \ref{snails}. In order to facilitate the latter part of the proof we note that we may instead use $\delta =\delta(data, \frac{\mu}{2})$ which by the construction in the proof of Lemma \ref{snails} is a smaller number. Note that \eqref{pellini} remains valid if we replace $M$ by any $\theta M$, where $\theta \in (0,1]$. Since $B_{16\rho}(x_o)\times [t_o,t_o+M^{3-m-p}\rho^p]$ is contained in the domain, we may apply Theorem \ref{theo:exppos} with $M$ replaced by $\epsilon\theta M$, $\alpha=\frac{\mu}{2}$ and considering all $s$ in $(t_o, t_o + \delta M^{3-m-p}\rho^p)$ for which $s+\delta (\epsilon \theta M)^{3-m-p}\rho^p)\leq t_o +M^{3-m-p}\rho^p$. Thus, we obtain \begin{align*} u\geq \eta \epsilon \theta M \textrm{ in } B_{2\rho}(x_o)\times (t_o+(1-\varepsilon)\delta (\epsilon \theta M)^{3-m-p}\rho^p, t_o + \delta M^{3-m-p}\rho^p). \end{align*} Here, $\eta$ and $\varepsilon$ only depend on the data and $\mu$. For any $\tau \in (0, \delta)$ we may thus first choose $\theta$ so small that \begin{align*} (1-\varepsilon)\delta (\epsilon \theta )^{3-m-p} < \tau/2 \end{align*} and then choose $\xi = \eta \epsilon\theta$. \end{proof} We now prove an alternative form of the reduction of the oscillation which will be convenient in the sequel. \begin{lem}[Estimates of H\"older regularity] Let $u$ be a weak solution of \eqref{general} in $\Omega_{T}$ in the supercritical range. Then for any $S>0$ there exist constants $\bar C >0$ and $\bar \alpha>0$ depending only on $S$ and the data, such that if $Q_{32R, k^{3-m-p}R^p}(z_o)\subset \Omega_T$ for some $k, R>0$ then \begin{equation} \label{oscp<2} \sup_{Q_{R, k^{3-m-p}R^p}(z_o)}u\le S\, k\quad \Rightarrow\quad \osc_{Q_{r, k^{3-m-p}r^p}} u \le \bar C\, k\, \big(\frac{r}{R}\big)^{\bar\alpha},\quad r\le R. \end{equation} \end{lem} \begin{proof}[Proof] Let $\varepsilon$ be the constant from Lemma \ref{lem:mu-plus_red_osc} and define the re-scaled function \begin{align*} v(x,t)= S^{-1}u(x,t_o+\varepsilon^{-1}t), \hspace{7mm}(x,t)\in Q_{32R, \varepsilon k^{3-m-p} R^p}(x_o,0). \end{align*} Then $v$ satisfies an equation of type \eqref{general}, where the constants appearing in the structure conditions depend only on $S$ and the data from the original problem. Furthermore, \begin{align*} \sup_{Q_{R, \varepsilon k^{3-m-p} R^p}(x_o,0)} \leq k, \end{align*} so Lemma \ref{lem:osc-red} implies that for all $r\in (0,R]$, \begin{align*} \osc_{Q_{r,\varepsilon k^{3-m-p} r^p}(x_o,0)} v \leq \tilde{c} k \big(\frac{r}{R}\big)^{\bar\alpha}, \end{align*} where $\tilde{c}$ and $\bar{\alpha}$ only depend on $S$ and the data of the original problem. Expressing this estimate in terms of $u$ and the original coordinates we obtain the desired estimate with $\bar C = \tilde{c} S$. \end{proof} We will also use the following version of the expansion of positivity. \begin{lem}[Expansion of positivity] \label{epossing} There exists $\bar \lambda>p/(3-m-p)$ and, for any $\mu>0$, $c(\mu), \gamma_{1}(\mu), \gamma_{2}(\mu)\in \ (0, 1)$ depending only on $\mu$ and the data, such that if $u\ge 0$ is a solution in $B_{16R}(\bar{0})\times[0, k^{3-m-p}R^p]$ then \begin{align}\label{exposingu} &|B_{r}(\bar{0}) \cap \{u(\cdot, 0)\ge k\}|\ge \mu |B_r(\bar{0})| \\ \notag &\Rightarrow\quad \inf_{B_{\rho}}u\big(\cdot, k^{3-m-p}\, r^{p}\, \big(\gamma_{1}(\mu)+\gamma_{2}(\mu)\big(1-(r/\rho)^{\bar\lambda(3-m-p)-p}\big)\big)\ge c(\mu)\, k \Big(\frac{r}{\rho}\Big)^{\bar\lambda}, \end{align} whenever $r< \rho\le R$. Here, $\gamma_1(\mu)$ and $\gamma_2(\mu)$ are so small that $\gamma_1(\mu) + \gamma_2(\mu) \leq 1 $, which guarantees that the time level is contained in the interval $k^{3-m-p}R^p$. Moreover, the $\gamma_{i}(\mu)$ can be chosen arbitrarily small by lowering $c(\mu)$. \end{lem} \begin{proof}[Proof] Suppose that the measure condition of \eqref{exposingu} holds. Then, by Lemma \ref{lem:MTP-est}, we have \begin{align}\label{claim1-reformulated} u\geq \xi(\mu) k, \textrm{ in } B_{2r}(\bar{0})\times [\frac{\tau(\mu)}{2} k^{3-m-p}r^p, + \tau(\mu) k^{3-m-p}r^p]. \end{align} Denote $\xi_1:=\xi(1)$ and note that, since $m+p<3$, we can suppose that \begin{align}\label{b_1-bound} b_1:= 2^{p}\, \xi_1^{3-m-p}\leq \tfrac{1}{2}. \end{align} Consider first the case $2r\leq R$. We may now define \begin{align*} \rho_j &:=2^j r, \textrm{ for all } j\in \ensuremath{\mathbb{N}} \textrm{ such that } \rho_j \leq R, \\ \tau_1 &:= \tau(1)\leq \tfrac{1}{7}. \end{align*} Note that we are considering the case where at least $\rho_1$ is defined. The bound on $\tau_1$ can be obtained due to Lemma \ref{lem:MTP-est}. This might require shrinking $\xi_1$, but this does not violate the bound on $b_1$. We define recursively \begin{equation} \label{tn} t_0= \frac{\tau(\mu)}{2} k^{3-m-p}r^p, \qquad t_{j+1} = t_j + \frac{ \tau_1}{2}(\xi(\mu) k \xi_1^j)^{3-m-p}\rho^p_{j+1}. \end{equation} From \eqref{claim1-reformulated} it follows that $|B_{r}(\bar{0})\cap \{u(\cdot,t_0)\ge \xi(\mu)k\}|=|B_{r}(\bar{0})|$. Hence, we may apply Lemma \ref{lem:MTP-est} with $\mu=1$ repeatedly and obtain \begin{align}\label{hedeenand} u\ge \xi(\mu)\xi_1^j k \qquad \text{in }\quad B_{\rho_{j+1}}\times \big[t_j, t_j+\frac{\tau_1}{2}\, (\xi(\mu) k\, \xi_1^{j-1})^{3-m-p}\, \rho_{j}^{p}\big] \end{align} for all integers $j\geq 1$ such that $\rho_j \leq R$, provided that the end time of the cylinder in \eqref{hedeenand} does not exceed $k^{3-m-p}R^p$. In fact, this cannot happen, since an explicit calculation shows that for all integers $N\geq 1$, \begin{align}\label{t_N-ests} t_N &= \frac{\tau(\mu)}{2} k^{3-m-p}r^p + \frac{\tau_1}{2}k^{3-m-p}\xi(\mu)^{3-m-p}r^p2^p\sum^{N-1}_{j=0}b_1^j \\ \notag &\leq k^{3-m-p}R^p\frac{\tau_1}{2}\Big(1+2^p\frac{1-b_1^N}{1-b_1}\Big) \\ \notag &\leq k^{3-m-p}R^p 5 \tau_1, \end{align} where in the first step we used the fact that $\xi(\mu)\leq \xi_1<1$ and $\tau(\mu)\leq \tau_1$. Thus, we have \begin{align*} t_N+\frac{\tau_1}{2}\, (\xi(\mu) k\, \xi_1^{N-1})^{3-m-p}\, \rho_{N}^{p} \leq t_N + k^{3-m-p} R^p 2\tau_1 \leq k^{3-m-p}R^p 7 \tau_1 \leq k^{3-m-p}R^p, \end{align*} which means that the cylinders are all contained in the domain of $u$. From \eqref{b_1-bound} we infer $t_j + \frac{\tau_1}{2}\, (\xi(\mu)\, k \xi_1^{j-1})^{3-m-p}\, \rho_{j}^{p} \geq t_{j+1}$, and thus \eqref{hedeenand} implies that \[ u\ge \xi(\mu)\Big(\frac{r}{\rho_j}\Big)^{\bar{\lambda}} k \qquad \text{in }\quad B_{\rho_{j+1}}\times [t_j, t_{j+1}], \] where $\bar\lambda=-\log_{2}\xi_1 >p/(3-m-p)$. Using the first line of \eqref{t_N-ests} we can re-write $t_N$ as \begin{align*} t_N &= k^{3-m-p} r^p\Big[ \frac{\tau(\mu)}{2} + \frac{2^{p-1}\tau_1 \xi(\mu)^{3-m-p}}{(1-b_1)}(1-b_1^N)\Big] \\ &= k^{3-m-p} r^p\Big[ \gamma_1(\mu) + \gamma_2(\mu)\Big(1-\Big( \frac{r}{\rho_N}\Big)^{\bar{\lambda}(3-m-p)-p}\Big)\Big]. \end{align*} For an arbitrary $\rho \in [r,R]$ we now choose the smallest integer $N$ such that $\rho\leq 2^{N+1} r$. But this means that \begin{align*} \rho_N=2^N r\leq \rho\leq R. \end{align*} Thus, we may conclude that \begin{align*} u\geq \xi(\mu)\Big(\frac{r}{\rho_N}\Big)^{\bar{\lambda}} k \geq \xi(\mu)\Big(\frac{r}{\rho}\Big)^{\bar{\lambda}} k = c(\mu) \Big(\frac{r}{\rho}\Big)^{\bar{\lambda}} k \quad \textrm{ in } B_\rho\times [t_N, t_{N+1}]. \end{align*} It now suffices to note that since $\rho_N\leq \rho \leq \rho_{N+1}$, \begin{align*} [t_N,t_{N+1}] \ni k^{3-m-p} r^p\Big[ \gamma_1(\mu) + \gamma_2(\mu)\Big(1-\Big( \frac{r}{\rho}\Big)^{\bar{\lambda}(3-m-p)-p}\Big)\Big]. \end{align*} By the definitions it is clear that $\gamma_1(\mu)$ and $\gamma_2(\mu)$ can be made arbitrarily small by lowering $c(\mu)$. It only remains to consider the case that $2r>R$. But in this case a bound of the correct form follows already from \eqref{claim1-reformulated} since $r<\rho<2r$. \end{proof} Since we are considering the super-critical range, Theorem \ref{theo:Lr-Linfty} holds with $r=1$. Combining this result with the $L^1$- Harnack estimate of Theorem \ref{harnack}, we immediately obtain the following lemma. \begin{lem}\label{sl1} Let $u$ be a solution to \eqref{general} for some $m, p$ satisfying \eqref{supercritical} and suppose that $\bar Q_{4\rho, 2\tau}(z_o) \subset \Omega\times[0,T)$. Then \begin{equation}\label{l1har} \sup_{Q_{\rho,\tau}(z_o)} u \leq c\tau^{-\frac{n}{\lambda}} \Big[\inf_{t\in [t_o-2\tau, t_o]}\int_{B_{4\rho}(x_o)}u(x, t)\d x\Big]^{\frac{p}{\lambda}}+ c\Big(\frac{\tau}{\rho^p}\Big)^{\frac{1}{3-m-p}}, \end{equation} where $\lambda=p+n(m+p-3)$ and the constant $c$ only depends on $m,n,p,C_0,C_1$. \end{lem} Here we are able to use the actual infimum and supremum rather than their essential equivalents, since we are considering the continuous representative of $u$. Similar results have been shown previously in \cite[Appendix A]{DiGiaVe1} for the $p$-Laplacian with $p<2$ and in \cite{FoSoVe3} for singular doubly nonlinear equations under more restrictive assumptions. Now we are ready prove the final result of this paper. For simplicity, we have opted to formulate and prove the theorem for a cylinder centered at the origin, but obviously the result is translation invariant. Note that since an infimum can only increase when passing to a smaller set, we could replace the ball in the right estimate in \eqref{singharnack} by $B_{R/4}(\bar 0)$, so that the supremum and infimum are taken over the same ball. \begin{theo}[Harnack inequality] Let $u\ge 0$ solve \eqref{general} for some $m, p$ satisfying \eqref{supercritical}, in a domain containing $B_{34R}(\bar 0) \times [- T, T]$. Suppose that $u(0, 0)>0$ and \begin{equation} \label{tass} 4\, R^{p}\, \sup_{B_{2R}(\bar{0})}u(\cdot, 0)^{3-m-p}\le T. \end{equation} Then there exist constants $\bar C\ge 1$, $\bar\theta>0$ depending only on the data such that \begin{align} \label{singharnack} \bar C^{-1}\, &\sup_{B_{R/4}(\bar 0)} u(\cdot, s)\le u(0, 0)\le \bar C\, \inf_{B_{R}(\bar 0)}u(\cdot, t), \\ \notag &\textrm{for }- \bar\theta\, u(0, 0)^{3-m-p}\, R^{p}\le s, t\le\bar\theta\, u(0, 0)^{3-m-p}\, R^{p}. \end{align} \end{theo} \begin{proof}[Proof] In the cylinder $B_{34}(\bar 0)\times [-T', T']$, where $T'= T\, R^{-p}\, u(0, 0)^{m+p-3}$, the function \begin{align*} v(x,t)=u(0, 0)^{-1}\, u(R\, x, R^{p}\, u(0, 0)^{3-m-p}\, t), \end{align*} satisfies a doubly singular equation with the same structure conditions as the original equation. With these definitions, \eqref{tass} implies \begin{equation}\label{tass2} 1\le M^{3-m-p}:=\sup_{B_{1}(\bar 0)}v(\cdot, 0)^{3-m-p}\le T'/4, \end{equation} where the left inequality follows from the fact that $v(\bar{0},0)=1$. We first prove the $\inf$ bound in \eqref{singharnack}. Let $\bar\lambda > p/(3-m-p)$ be the expansion of positivity exponent, define $\psi(\rho)=(1-\rho)^{\bar\lambda}\, \sup_{\bar{B}_{\rho}}v(\cdot, 0)$ for $\rho\in [0, 1]$ and choose $\rho_{0}\in [0,1]$, $x_o\in \bar{B}_{\rho_{0}}(\bar 0)$ such that \[ \max_{[0, 1]}\psi=\psi(\rho_{0})=(1-\rho_{0})^{\bar\lambda}\, v_{0},\qquad v_{0}=v(x_o, 0)\ge 1. \] Let $\bar\xi\in [0, 1)$ be the unique number such that $(1-\bar\xi)^{-\bar\lambda}=2$. Setting $r=\bar\xi\, (1- \rho_{0})$ we have \begin{align} \label{padf} v_{0}\, r^{\bar\lambda}= \psi(\rho_0) \bar\xi^{\bar{\lambda}} \geq \bar\xi^{\bar\lambda}, \end{align} where we used the fact that $\psi(\rho_0)\geq \psi(0)=1$. Furthermore, we may estimate \begin{align}\label{padf2} \sup_{\bar B_{r}(x_{0})}v(\cdot, 0) &\leq (1-[\bar \xi(1-\rho_0)+\rho_0])^{-\bar{\lambda}} (1-[\bar \xi(1-\rho_0)+\rho_0])^{\bar{\lambda}} \sup_{\bar B_{\xi(1-\rho_0)+\rho_0}(\bar{0})}v(\cdot, 0) \\ \notag &= (1-\bar \xi)^{-\bar{\lambda}}(1-\rho_0)^{-\bar{\lambda}}\psi(\bar \xi(1-\rho_0)+\rho_0) \\ \notag &\leq (1- \bar \xi)^{-\bar{\lambda}}(1-\rho_0)^{-\bar{\lambda}}\psi(\rho_0) \\ \notag &= (1-\bar\xi)^{-\bar\lambda}\, v_{0} \\ \notag &=2\, v_{0}. \end{align} Let $a:=v_{0}^{3-m-p}\, r^{p}$. By construction $v_{0}\le M$ and by \eqref{tass2}, $B_{r}(x_o)\times [-4\, a, 4\, a]$ is contained in the domain of $v$. Thus we can apply Lemma \ref{sl1} to conclude that \begin{align}\label{btut} \sup_{B_{\frac{r}{4}}(x_o)\times [-a, a]}v&\le \frac{c}{a^{\frac{n}{n(m+p-3)+p}}} \Big( \int_{B_{r}(x_o)}v(x, 0)\, dx\Big)^{\frac{p}{n(m +p-3)+p}}+ c\, a^{\frac{1}{3-m-p}}\, r^{\frac{p}{m+p-3}} \\ \notag &\le c\,\frac{ (2\, v_{0}\, r^{n})^{\frac{p}{n(m+p-3)+p}}}{(v_{0}^{3-m-p}\, r^{p})^{\frac{n}{n(m+p-3)+p}}}+ c\, v_{0}\le c\, v_{0}, \end{align} where we used \eqref{padf2} to bound the integral. The constant $c$ depends only on the data. Since $a=v_{0}^{3-m-p}\, r^{p}$, we can apply \eqref{oscp<2} with $k=v_{0}$, and taking $S$ to be the constant $c$ from the last line of the previous estimate, in both $B_{r/4}(x_o)\times [-v_0^{3-m-p}(r/4)^p, 0]$ and $B_{r/4}(x_o)\times [v_0^{3-m-p}\rho^p -v_0^{3-m-p}(r/4)^p, v_0^{3-m-p}\rho^p]$ for any $\rho\leq r/4$ to get \[ {\rm osc}(v, B_{\rho}(x_o)\times [- v_0^{3-m-p}\rho^p, v_0^{3-m-p}\rho^p])\le \bar c\, v_{0}\, (\rho/r)^{\bar\alpha},\qquad \rho\le r/4, \] where the constants $\bar c$ and $\bar \alpha$ only depend on the data. This estimate also relies on the fact that $B_{8 r}(x_o)\times[-a,a]$ is contained in $B_{8}\times [-T', T']$, and hence in the domain of $v$. As $v(x_o)=v_o$ we infer that \begin{align*} v \ge v_o/2 \quad \textrm{ in } B_{\bar\eta r}(x_o)\times [-\bar\eta^{p}\, a, \bar\eta^{p}\, a], \end{align*} for some suitable $\bar\eta\in \ (0, 1/4)$ depending only on the data. Thus, \begin{align*} |B_r(x_o)\cap \{ v(\cdot,t)\ge v_{0}/2\}|\ge \bar\eta^{n}|B_r(x_o)|, \end{align*} for all $|t|\le v_{0}^{3-m-p}\, \bar\eta^p\, r^{p}$. For any such time, the cylinder $B_{32}(x_o)\times [t, t + (v_0/2)^{3-m-p}2^p]$ is contained in the domain of $v$, so we may apply Lemma \ref{epossing} with $k=v_0/2$ and $R=\rho=2$. Choosing the $\gamma_{i}(\bar\eta^{n})$ so small that $\gamma_{1}(\bar\eta^{n})+\gamma_{2}(\bar\eta^{n})<\bar\eta^p/2$, its conclusion implies, thanks to $B_{2}(x_{0})\supseteq B_{1}$, \begin{align*} \inf_{B_{1}} v(\cdot, t+ \gamma_{r} \, v_{0}^{3-m-p}\, r^{p})\ge \bar c\, v_{0}\, r^{\bar\lambda},\qquad \gamma_{r}:=\gamma_{1}(\bar\eta^{n})+\gamma_{2}(\bar\eta^{n})\big(1-(r/2)^{\bar\lambda(3-m-p)-p}\big)<\bar\eta^p/2 \end{align*} for all $|t|\le \bar\eta^p\, v_{0}^{3-m-p}\, r^{p}$. The latter readily gives $v(x, t)\ge \bar c\, v_{0}\, r^{\bar\lambda}$ for $x\in B_{1}$ and $|t|\le\bar\eta^p\, v_{0}^{3-m-p} \, r^{p}/2$. Finally, observe that since $r\le 1$ and $\bar\lambda\ge p/(3-m-p)$, it holds $v_{0}^{3-m-p} \, r^{p}\ge (v_{0}\, r^{\bar\lambda})^{3-m-p}$, so that \eqref{padf} yields $v(x, t)\ge \bar c\, \bar\xi^{\bar\lambda}=:1/\bar C$ for $x\in B_{1}$ and $|t|\le\bar\eta^p\, \bar\xi^{\bar\lambda(3-m-p)}/2=:\bar\theta$. Expressing this in terms of $u$, we obtain the estimate for the infimum in \eqref{singharnack}. To prove the bound for the supremum we proceed similarly. Indeed, let $x_{*}\in \bar B_{R}(\bar 0)$ be such that $u(x_{*},0)=\sup_{\bar B_{R}(\bar 0)}u(\cdot, 0)$ and define the rescaled translated function \begin{align*} w(x,t)=u(x_*,0)^{-1}u\big(x_*+Rx, R^p u(x_*,0)^{3-m-p}t\big), \quad (x,t)\in B_{65}(\bar{0})\times [-\tilde{T}, \tilde{T}], \end{align*} where $\tilde{T}=R^{-p}u(x_*,0)^{m+p-3}T$. Proceeding as before, we obtain that $w(x,t)\geq \frac{1}{\bar C}$ for $x\in \bar B_1(\bar{0})$ and $|t|\leq \bar \theta$. Writing this estimate in terms of $u$ we see that \begin{align*} u(x,t)\geq \frac{u(x_*,0)}{\bar C}, \quad x\in \bar B_{R}(x_*), \quad |t|\leq R^p u(x_*,0)^{3-m-p}\bar \theta. \end{align*} Noting that $\bar 0 \in \bar B_R(x_*)$, and taking into account the definition of $x_*$ we obtain \begin{align}\label{aather} \bar C^{-1} \sup_{\bar B_{R}(\bar 0)}u(\cdot, 0) \leq u(\bar 0, 0). \end{align} Since $u$ is a solution on $\bar B_R(\bar 0)\times [-H,H]$ with $H=4R^pu(\bar 0,0)^{3-m-p}$, we can combine \eqref{aather} and Lemma \ref{sl1} (with $t_o=H/4$ and $\tau=H/2$) to conclude similarly as in \eqref{btut} that \begin{align*} \sup_{B_{R/4}(\bar 0)\times [-H/4,H/4]} u \leq c\, u(\bar 0, 0), \end{align*} which concludes the proof. \end{proof}
\section{Introduction} Free-space optical (FSO) communications is a promising technique that can provide high data-rates for the next generation of wireless communication systems. Because of the availability of large chunks of unregulated spectrum available in the optical domain, high-speed data communications can be achieved with FSO systems. These systems have typically been used in deep space communications where the long link distances dictate that the transmitted energy be focused to achieve a small angle of divergence. However, more recently, big internet corporations---such as Facebook and Google---are employing FSO in the backhaul network in order to provide connectivity to regions of the world that still lack internet access \cite{Kaymak}. Because of the narrow beamwidth associated with the optical signal---as is the case for any ``directional'' communication system, such as Terahertz and millimeter wave systems---acquisition and tracking subsystems are needed in order to establish and maintain the link between the transmitter and the receiver terminals, respectively. \emph{Acquisition} is a process whereby two terminals obtain each others location in order to effectively communicate in a directional communications setting. \subsection{Motivation} In this paper, we have analyzed the adaptive acquisition schemes for low probability of detection/photon-limited optical channels. For a small detection probability, these adaptive algorithms provide a significantly better performance than the nonadaptive search schemes used in state-of-the-art acquisition systems. An example of a nonadaptive scheme is the spiral search that is argued to be optimal for a Rayleigh distributed receiver location in the uncertainty region, and outperforms other scanning approaches when the probability of detection is high \cite{XinLi, Bashir6}. However, for photon-limited channels that incur a small probability of detection, this scheme does not perform as well (as will be shown later in this study). Photon-limited channels exist in deep space communications where the long link distances result in a significant reduction of received signal photons \cite{Griffiths_MDPI:2018}. Additionally, such channels also exist in terrestrial FSO where the presence of fog or clouds results in a significant attenuation of transmitted energy. Because of low numbers of received signal/receiver noise photons \cite{Bell_AO:2000}\footnote{With the help of cryogenic receivers, the number of noise photons can be reduced significantly \cite{Griffiths_MDPI:2018}.}, the probability of detection for a \emph{Pulse Position Modulation} (PPM) or \emph{On-Off Keying} (OOK) receiver can take a serious hit. This also affects the acquisition performance since successful acquisition depends on detection probability of the transmitted pulse at the receiver. For the spiral scan, such low photon-rate channels will lead to several scans of the uncertainty region before the terminal is discovered. This wastes both time and energy during the acquisition stage. In addition to low photon rates, the probability of detection also suffers from a desire to achieve a low probability of false alarm during the acquisition stage. A reasonably low probability of false alarm is needed so that we do not ``misacquire'' the terminal: that is, the transmitter mistakenly decides that the receiver has been located in the uncertainty region, and begins to transmit data in the ``wrong'' direction. This misacquisition wastes energy and time, and results in restarting the acquisition process after the misacquisition event is detected. Therefore, during the detection process in the acquisition stage, we have to set the threshold high enough in order to set the probability of false alarm reasonably low. However, setting the threshold higher than usual also results in a lower probability of detection (please see the arguments in Section~\ref{Detect} regarding the threshold selection). After the acquisition stage is completed successfully, the threshold can be lowered in order to increase the probability of detection (or minimize the probability of error) for the purpose of decoding data symbols. The photon counting channel is modeled by a \emph{Poisson Point Process} (PPP). The studies \cite{Snyder} and \cite{Streit} provide an elegant treatment of the theory of PPP's. \subsection{Related Literature Review} The focus of this study is on attacking the acquisition problem in FSO purely from a signal processing/probabilistic perspective. Therefore, we will only review the papers that adopt a similar approach to the acquisition problem. In this regard, we were able to find three major studies on acquisition. The first article \cite{Wang} is focused on realizing secure acquisition between two mobile terminals. The idea is to use a double-loop raster scan so that the reception of the signal and the verification of identities through a IV code can be carried out in rapid succession. They have proposed an array of detectors at the receiver that acts both as a bearing/data symbol detector. The acquisition time is optimized in terms of signal-to-noise ratio and beam divergence among other parameters. The authors in \cite{XinLi} optimize the acquisition time as a function of the uncertainty sphere angle. Instead of scanning the entire uncertainty region, their idea is to scan a subregion of the uncertainty sphere that contains the highest probability mass. This is done in order to save time. The acquisition is carried out for a mobile satellite scenario, whose location coordinates at a certain point in time---obtained through ephemeris data---is designated as the center of the uncertainty sphere. The spiral scanning technique is used to locate the satellite. Instead of searching the whole sphere (three standard deviations for a Gaussian sphere), they search a fraction of the region (which is 1.3 times the standard deviation). If the satellite is missed in one search, the hope is that it will be located in the next search, and so on\footnote{The point in space for the next search, which will form the center of the new uncertainty sphere, is obtained from the ephemeris data. }. The authors in \cite{Bashir6} describe the signal acquisition technique for a stationary receiver that employs an array of small detectors. They conclude that an array of detectors minimizes the acquisition time as compared to one single detector of similar area as an array. They also consider the possibility of multiple scans of the uncertainty region in case the receiver is not acquired after a given scan. An upper bound on mean acquisition time is optimized with respect to beam radius, and the complementary cumulative distribution function of the upper bound is computed in closed-form. There is another body of work that discusses improvement in acquisition/tracking performance by offering hardware-based solutions. In this regard, we will cite a few important studies. The authors in \cite{Deng} propose to improve tracking performance with the help of camera sensors that direct the movement of control moment gyroscopes (CMG) in order to control a bifocal relay mirror spacecraft assembly. The main application of their work is to minimize the jitter/vibrations in the beam position using CMG's and fine tracking using fast steering mirrors. The work \cite{Kim} adopts gimbal less Micro-Electro-Mechanical Systems (MEMS) micro-mirrors for fast tracking of the time-varying beam position. The authors in \cite{Rzasa} examine the acquisition performance of a gimbal based pointing system in an experimental setting that utilizes spiral techniques for searching the uncertainty sphere. For literature on pointing error in free-space optical communications, the readers are referred to some recent work, such as \cite{Ansari, Zedini, Quwaiee, Issaid, Farid}. In order to comprehend tracking with an array of detectors, \cite{Bashir1, Bashir2, Bashir7} are helpful. \subsection{Contributions of This Study} \label{cont} In this paper, we have devised two adaptive acquisition schemes for photon-limited FSO channels. In the first part of the paper, we propose an adaptive acquisition scheme that divides the uncertainty region into a number of smaller subregions, and the subregions that correspond to the higher probability mass of the receiver's location are searched more frequently than the others. The intuition behind this scheme is the following argument: If the receiver is not discovered during the search of a subregion that has a higher probability mass attached to it, then there is a higher chance that we missed the receiver due to low probability of detection, and we can achieve better performance if we rescan this particular subregion a few times before we move on to explore subregions of lower probability mass. The scanning is done by search along a spiral, and significantly better performance can be obtained by optimizing the volumes of the subregions. We call this scheme the \emph{adaptive spiral search} technique. In the second part, we propose the \emph{shotgun} method which is a randomized acquisition scheme. In shotgun approach, the uncertainty region is scanned at locations that are sampled from a Gaussian distribution (also called the \emph{firing} distribution). By choosing the suitable variance of the firing distribution, the acquisition time can be minimized. For a low probability of detection, both these schemes provide a better acquisition time performance than the spiral search scheme given in \cite{Bashir6} and \cite{XinLi}. As we will see later in this study, the adaptive spiral search technique significantly outperforms the shotgun approach. However, the cost we pay is the requirement to meet ultra precise pointing of the beam on the spiral during scanning process. In contrast, the shotgun approach can do without stringent requirements on pointing accuracy. \subsection{Organization of This Paper} This paper is organized as follows. Section~\ref{UR} defines the uncertainty region, and the location statistics of the receiver in the uncertainty region. Section~\ref{Detect} deals with the derivation of the probability of missed detection and false alarm for the acquisition process. Section~\ref{ASSP} discusses introductory material pertaining to the adaptive spiral search technique. Section~\ref{ASS} explains the adaptive spiral search scheme, and walks the reader through the derivation of mean and complementary distribution function of acquisition time. The optimization of the acquisition time as a function of the radii of subregions is discussed in the same section. Section~\ref{SG} examines the shotgun approach. Section~\ref{Comp} compares the two acquisition approaches, and Section~\ref{Conc} summarizes the conclusions of this study. \section{Uncertainty Region and Scanning Technique} \label{UR} The \emph{uncertainty region}---or \emph{uncertainty sphere}, or the \emph{search region}---is a volume in space that is scanned by the initiator/transmitter terminal to locate the receiver terminal in order to establish a communications link. As discussed in detail in \cite{Bashir6}, the errors in the measurements of localization systems, and the errors in the pointing assembly of the transmitter, contribute to the volume of the uncertainty region: the larger the error variance, the greater the volume the transmitter has to scan in order to successfully complete the acquisition stage. The error in two dimensions in the uncertainty region is modeled by a two dimensional Gaussian distribution. If the error in each dimension is assumed to be independent with equal variance, the resulting distribution is a circularly symmetric Gaussian distribution, and the distance from the center is modeled as a Rayleigh distributed random variable. For the spiral scan technique, the acquisition time in this case becomes tractable to analyze since the time it takes to start from the center of the uncertainty region to the point where the receiver is located is modeled approximately by an exponential distribution for the successful detection scenario. However, as discussed in \cite{Bashir6}, the uncertainty region, in general, is represented by a general (elliptical) Gaussian distribution in two dimensions (correlated Gaussian errors in two dimensions with unequal variance). Nevertheless, as argued in \cite{Bashir6}, if the general error covariance matrix is known, any elliptical uncertainty region can be transformed to a circular uncertainty region by using an appropriate linear transformation, and the probability distribution of the acquisition time in the circular uncertainty region case is the same as the acquisition time distribution in the elliptical case. \begin{figure} \centering \includegraphics[scale=0.9]{spiral_and_grid} \caption{The transmitter scans the uncertainty sphere along the Archimedean spiral (shown in blue) in order to search the receiver. The distance between consecutive rotations $b$, and the step size on the spiral, is chosen according to the beam width of the scanning beam. The location at any point on the spiral is represented by $(r_s, \theta_s)$.} \label{ur} \end{figure} For a circular uncertainty region, the Archimedean spiral search technique provides an optimal performance in terms of acquisition time \cite{XinLi}. Since the spiral search scans the contours of higher probability mass first as opposed to contours of lower probability, it is easy to see---at least intuitively---as to why the spiral search will perform better than other search techniques for a circular uncertainty region. Fig.~\ref{ur} shows an example of a circular uncertainty sphere. For a general (elliptical) uncertainty sphere, the spiral scan method will be replaced by a similar technique that starts the scan from the center, and then moves outward along elliptical contours of Gaussian distribution. Let us say that there are two terminals---Terminal~A and Terminal~B---that want to set up a communication link with each other. In order to initiate the spiral scan, let us assume that Terminal~A will begin by pointing towards the center of the uncertainty region, transmit a pulse, and then listen for any feedback information from Terminal~B. If Terminal~B detects the pulse, it will send a signal back to Terminal~A on a low data-rate radio frequency (RF) feedback channel to confirm that the signal has been acquired. Otherwise, A will point to the next point on the spiral and transmit, and the process repeats itself until Terminal~B has been found. The time that Terminal~A waits before transmitting the next pulse is known as the \emph{dwell time}, and this time interval takes into account factors, such as receiver processing time and the round-trip-delay time. For more details in this regard, the reader is referred to \cite{Bashir6}. Once, Terminal~A discovers Terminal~B, Terminal~B starts the same process in order to locate Terminal~A. However, since Terminal~B now has information about Terminal~A's angle-of-arrival, the search region to locate Terminal~A will be much smaller. Thus, the total acquisition time is approximately the time that Terminal~A requires in order to locate Terminal~B. For a randomized search scheme such as the shotgun approach, the receiver location process is similar, except that the initiator/transmitter fires pulses at random locations inside the uncertainty region instead of moving precisely along a spiral. The receiver (Terminal~B) detects the pulse by executing a hypothesis test. The probability of detection and the probability of false alarm at the receiver is the subject of discussion in the next section. \section{Probability of Detection/False Alarm} \label{Detect} \subsection{Probability of Detection} The system will decide whether the receiver is detected at a given point in the uncertainty region by carrying out the following hypothesis test: \begin{align} \frac{p(Z|H_1) p(H_1)}{p(Z|H_0) p(H_0)} \underset{H_0}{\overset{H_1}{\lessgtr} } \gamma, \end{align} where $Z$ is the (random) photon count generated in the optical detector during an observation period, $\gamma$ is a (positive) threshold, and $H_1$ is the hypothesis that the terminal is present at a given point in $S(\Rc)$, and $H_0$ is the hypothesis that the receiver is not present. The probability of detection for a \emph{maximum a posteriori probability} (MAP) detector is \begin{align} P_D = P\left( \left\{\frac{p(Z|H_1) }{p(Z|H_0) } > \gamma_0 \right\} \right), \label{PD} \end{align} where $p(Z|H_1) \coloneqq \frac{e^{-(\lambda_s + \lambda_n) A T} ((\lambda_s + \lambda_n )A T)^Z}{Z!},$ $p(Z|H_0) \coloneqq \frac{e^{-\lambda_n A T} (\lambda_n A T)^Z}{Z!}$, $P(H_1) = \frac{r}{\sigma^2}e^{-\frac{r^2}{2\sigma^2}}, r \geq 0,$ and $P(H_0) = 1 - P(H_1).$ Additionally, $\gamma_0 \coloneqq \gamma \frac{p(H_0)}{p(H_1)}$. The number $r$ is the distance from the center of the uncertainty region. The quantity $(\lambda_s + \lambda_n)AT$ refers to the mean photon count for the signal plus noise ($H_1$) hypotheis, and $\lambda_n$ refers to the mean photon count for the noise only ($H_0$) hypothesis. The quantity $A$ is the area of the detector, and $T$ represents an observation interval. The constant $\gamma$ is an appropriate threshold chosen for some fixed \emph{probability of false alarm}, $P_{FA}$. Specifically, $ P_{FA} = P\left( \left\{\frac{p(Z|H_1) }{p(Z|H_0) } > \gamma_0 \right\} \right),$ where $Z$ is Poisson with mean $\lambda_n AT$. The probability of detection $P_D$ is a function of the signal power $\lambda_s AT$. The intensity of light, $\lambda_s$, that is impinging on the detector is usually assumed to be Gaussian distributed in two dimensions. In order to simplify the analysis, we approximate the Gaussian function with a cylinder function: the intensity is uniform over a circular region of radius $\rho$, and is zero elsewhere. Thus, for a constant transmitted signal power $P_s$, $\lambda_s$ should drop as $\rho$ is enlarged since $P_s = \lambda_s \pi \rho^2$, where $P_s$ is the transmitted signal power. Thus, $p(Z|H_1)$ becomes \begin{align} p(Z|H_1) \coloneqq \frac{\exp\left(-\left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) \left( \left( \frac{P_s}{\pi \rho^2} + \lambda_n \right) A T \right)^Z}{Z!}. \end{align} This goes to show that $P_D$ is a function of $\rho$ through the dependence of $p(Z|H_1)$ on $\rho$. The probability of detection, $P_D$, can be simplified analytically. The log-likelihood ratio can be written as \begin{align} \mathcal{L}(Z) & = \ln p(Z|H_1) - \ln p(Z|H_0) = -\left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T + Z \ln \left(\left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) + \lambda_n A T - Z \ln(\lambda_n A T). \end{align} Therefore, \begin{align} P_D &= P(\{ \mathcal{L}(Z) > \ln(\gamma)\}) = P\left( \left\{ Z > \gamma_0 \right\} \right) = 1 - P(\{ Z \leq \gamma_0 \}) \nonumber \\ &= 1 - \sum_{z=0}^{\lfloor \gamma_0 \rfloor} \frac{\exp\left(-\left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) \left( \left( \frac{P_s}{\pi \rho^2} + \lambda_n \right) A T \right)^z}{z!}= 1 - Q\left(\lfloor \gamma_0 + 1\rfloor, \left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right). \label{PD1} \end{align} The function $Q(x, y)$ is known as the \emph{regularized Gamma function} and is defined as $ Q(x, y) \triangleq \frac{\Gamma(x,y)}{\Gamma(x)}, \label{rgamma} $ where $\Gamma(x, y)$ is the \emph{upper incomplete Gamma function}: $ \Gamma(x, y) \triangleq \int_{y}^{\infty} t^{x-1} e^{-t}\, dt, $ and $ \Gamma(x) \triangleq \int_{0}^{\infty} t^{x-1} e^{-t}\, dt$. Finally, \begin{align} P_{FA} = 1 - Q\left(\lfloor \gamma_0 + 1\rfloor, \lambda_n A T \right). \label{PFA} \end{align} \section{Adaptive Spiral Search: Preliminaries}\label{ASSP} In the adaptive spiral search, the uncertainty region is divided into $N$ smaller regions or subregions, $S(\Rc_i)$ for $i= 0, \dotsc, N$, where $S(\Rc_i)$ is a sphere, centered at the origin, with radius $\Rc_i$, and $\Rc_0 < \Rc_1 < \dotsm < \Rc_N$, which implies that $S(\Rc_0) \subset S(\Rc_1) \subset \dotsm \subset S(\Rc_N)$. Additionally $\Rc_0 \coloneqq 0$, $S(\Rc_0) = \phi$, $\Rc \coloneqq \Rc_N$, and $S(\Rc_N)$ corresponds to the total uncertainty region. Fig.~\ref{fig_acq} shows that the uncertainty region $S(\Rc)$ divided into three subregions. In order to locate the receiver, the transmitter begins scanning from the origin (center of $S(\Rc)$) and finishes scanning $S(\Rc_1)$. If the receiver is not detected in this attempt, the transmitter initiates the second subscan by starting from the origin, and this time ends the scanning process when it has finished searching $S(\Rc_2)$. Thus, when the transmitter finishes searching $S(\Rc_2)$, it scans $S(\Rc_1)$ one more time and then scans the annular ring $S(\Rc_2)-S(\Rc_1)$. Hence, $S(\Rc_1)$ gets scanned a total of two times and $S(\Rc_2)-S(\Rc_1)$ is searched once when the transmitter ends its second subscan. In a similar vein, when the transmitter has finished scanning $\Rc_N$, region $S(\Rc_1)$ gets scanned $N$ times, region $S(\Rc_2)$ gets scanned $N-1$ times, and so on. We should make it clear here that the term \emph{subscan} is used to indicate a search attempt corresponding to a particular $S(\Rc_k), k = 1, \dotsc, N$, and we say that a (single) \emph{scan} has taken place when $S(\Rc_1)$ has been searched $N$ times, $S(\Rc_2)$ is searched $N-1$ times, and so on, until the region $S(\Rc_N)$ is searched once. If the receiver is not located during the first scan, the whole process is repeated until the time the receiver is located. Let us now consider the smallest sphere $S(\Rc_1)$ in the adaptive spiral scan. The time taken to scan this sphere is approximately $ T_d \frac{\Rc_1^2}{\rho^2}$, where $T_d$ is the dwell time. In this case, \begin{align} P(E_1) = P( E_{S_1}\cap E_{D_1}), \end{align} where $E_{S_1}$ is the event that receiver is present inside the sphere $S(\Rc_1)$, and $E_{D_1}$ is the event that receiver is detected in $S(\Rc_1)$. Moreover, $E_1$ is the event that the receiver is detected during the first attempt/subscan. It follows that, \begin{align} P(E_1) = P( E_{S_1} \cap E_{D_1} ) = \frac{P(E_{S_1} \cap E_{D_1}) } {P(E_{S_1})} P(E_{S_1}) = P(E_{D_1}|E_{S_1}) P(E_{S_1}). \end{align} In a similar fashion, \begin{align} E_{k} = A_1 \cup A_2 \cup \dotsm \cup A_k, \end{align} where $E_k$ is the event that the receiver is detected during the $k$th attempt/subscan. Let $E_{S_k}$ is the event that receiver is present inside the sphere $S(\Rc_k)$, and $E_{D_k}$ be the event that receiver is detected in $S(\Rc_k)$. The set $A_i$, for $i = 1, \dotsc, k$, is the event that the receiver lies in the set $\left(S(\Rc_i) - S(\Rc_{i-1}) \right)$, and is not detected in $(k-i)$ attempts, and detected in one attempt. The set $S(\Rc_i)- S(\Rc_{i-1})$ represents the difference set. It represents the annular ring formed by the difference of two concentric spheres: $S(\Rc_i)$ and $S(\Rc_{i-1})$. The reader may note that the sets $A_{i-1}\cap A_{i} = \phi$ since $\left(S(\Rc_i)-S(\Rc_{i-1})\right) \cap S(\Rc_{i-1}) = \phi.$ Thus, \begin{align} P(E_k) = \sum_{i=1}^k P(A_i). \label{Ek1} \end{align} We assume that the uncertainty in the location of the receiver is modeled by zero-mean, i.i.d, Gaussian random variables with variance $\sigma^2$. Let $E_{S_k}$ be the event that the receiver is present in the sphere $S(\Rc_k) $. Then, we have that, \begin{align} P(E_{S_k}) = \int_0^{\mathcal{R}_k} f_R(r)\, dr, \quad k = 1, \dotsc, N, \end{align} where $f_R(r) \coloneqq \frac{r}{\sigma^2} e^{-\frac{r^2}{\sigma^2}}, r \geq 0$. From \eqref{Ek1}, \begin{align} P(E_k)& = \sum_{i=1}^{k} P\left(E_{S_i}-E_{S_{i-1}} \left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) (1-P_D)^{k-i} P_D \nonumber \\ &= \sum_{i=1}^{k} \left[ P\left(E_{S_i} \left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) - P\left(E_{S_{i-1}} \left| \bigcap_{j=1}^{k-1} E_j^C \right) \right. \right] (1-P_D)^{k-i} P_D, \label{Ek} \end{align} where $P_D \coloneqq P(E_{D_1}| E_{S_1}) = \dotsm = P(E_{D_{k}} | E_{S_{k}})$. The probability of detection, $P_D$, is derived in Section~\ref{Detect}. It is shown in Appendix~\ref{A} that for a small $P_D$, $P \left( E_{S_i} \left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) \approx P(E_{S_i})$ for $i = 1, 2, \dotsc, k$. This means that for a small $P_D$, the observation that the receiver has not been located in the previous $k-1$ attempts does not alter the receiver's location distribution for the $k$th attempt. This is an important result that simplifies the analysis considerably. Therefore, \begin{align} P(E_k) \approx \sum_{i=1}^k \left[ P\left(E_{S_i} \right) - P\left(E_{S_{i-1}} \right) \right] (1-P_D)^{k-i} P_D. \label{Ek2} \end{align} Let the event $F$ denote the event that given the receiver is present in the uncertainty region $S(\Rc)$, the acquisition system fails to locate the receiver during one full scan of $S(\Rc)$ through the adaptive scheme. Then \begin{align} P(F) = \sum_{k=0}^{N-1} P(E_{S_{k+1}} - E_{S_{k}}) (1 - P_D)^{N-k}, \label{PF} \end{align} where $E_{S_0} \coloneqq \phi$, the empty set. We note that for the nondaptive acquisition scheme, \begin{align} P(F) = 1 - P_D. \end{align} \section{ Adaptive Spiral Search} \label{ASS} \subsection{Single Scan of $S(\mathcal{R})$} Due to low probability of detection, we may have to carry out a number of scans before the receiver is discovered in the uncertainty region. In this section, we are focused on the amount of time spent in the (successful or final) scan in order to locate the receiver, and we represent it by the random variable $V$. Then, $V$ is a ``mixed'' random variable, and is defined as \begin{align} V \coloneqq Y + X, \end{align} where $X$ is the random amount of time it takes for the system to detect the receiver during a ``successful'' subscan, and $Y$ represents the distribution of time that is ``wasted'' in unsuccessful subscans of the final scan. It can be seen that the value or distribution of $X$ will depend on area of the region in which the successful detection of the receiver takes place. Thus, given that the receiver is detected during the $k$th subscan, it is shown in the Appendix~\ref{B} that the conditional pdf of $X$ is represented by a \emph{truncated exponential} distribution: \begin{align} f_X(x|E_k) = \frac{1}{\eta_k}\alpha \exp\left( -\alpha x \right) \cdot \mathbbm{1}_{[0, T_d\Rc_k^2/\rho^2]}(x), \end{align} where $\mathbbm{1}_A(x)$ is the indicator function over some (measurable) set $A$, and $\eta_k$ is the normalization constant given by \begin{align} \eta_k \coloneqq \int_0^{\frac{T_d\Rc_k^2}{\rho^2}} \alpha e^{-\alpha x} \, dx = 1 - e^{-\alpha T_d \frac{\Rc_k^2}{\rho^2} }, \end{align} where $\alpha \coloneqq \frac{\rho^2}{2 T_d \sigma^2}$ \cite{Bashir6}. Before we define the distribution of $Y$, let us define $\R_k \coloneqq \sum_{i=1}^k \Rc_i^2$, $k = 1, \dotsc, N$. Then, the random variable $Y$ has a discrete distribution, and takes on the following values: $Y = T_d\frac{ \R_1}{\rho^2}$ when the receiver is detected in region $S(\mathcal{R}_2)$, $Y = T_d \frac{\R_2}{\rho^2}$ when the receiver is detected in region $S(\mathcal{R}_3)$, and $Y = T_D \frac{\R_{N-1}}{\rho^2}$ when the receiver is detected in $S(\mathcal{R})$. Finally, if the acquisition process fails in $S(\mathcal{R})$, then $Y = T_d\frac{\R_N}{\rho^2}$. More compactly, \begin{align} f_Y(y) = \sum_{k=0}^{N-1} P(E_{k+1})\delta\left( y - T_d\frac{\R_k}{\rho^2} \right) + P(F) \delta\left( y - T_d \frac{\R_N}{\rho^2} \right), \quad y > 0, \label{Y} \end{align} where $\delta(x)$ is the \emph{Dirac Delta Function}, and $\R_0 \coloneqq 0.$ When the next subscan starts, the prior information about the location of the receiver inside the uncertainty region remains unchanged. This is true because of the low probability of detection argument as discussed in Section~\ref{ASSP}. In other words, the value of $Y$ at any point does not give us any additional information about $X$. Thus $Y$ and $X$ are treated as independent random variables. For this scenario, \begin{align} f_V(v) = f_Y * f_X (v), \end{align} where $*$ represents the convolution operator. Therefore, we have that, \begin{align} f_V(v) &= \sum_{k=0}^{N-1} P(E_{k+1}) \frac{\alpha}{\eta_{k+1}} e^{ -\alpha \left(v - T_d\frac{\R_k}{\rho^2} \right) } \cdot \mathbbm{1}_{\left[T_d \R_k/\rho^2, T_d(\R_k + \Rc_{k+1}^2)/\rho^2\right)}(v)+ P(F) \delta\left( v - T_d \frac{\R_N}{\rho^2} \right) \end{align} for $0 \leq v \leq T_d\frac{\R_n}{\rho^2}$. We note that $\R_k + \Rc_{k+1}^2 = \R_{k+1}$. Additionally, for the sake of brevity, let us denote the factor $T_d\frac{\R_k}{\rho^2}$ by $\beta_k$ for $k = 0, \dotsc, N$. Then, \begin{align} f_V(v) &= \sum_{k=0}^{N-1} P(E_{k+1}) \frac{\alpha}{\eta_{k+1}} e^{ -\alpha \left(v - \beta_k \right) } \cdot \mathbbm{1}_{\left[\beta_k, \beta_{k+1} )/\rho^2\right)}(v)+ P(F) \delta\left( v - \beta_N \right) \end{align} \subsection{Multiple Scans of $S(\mathcal{R})$} In case the event $F$ occurs, we will have to repeat the whole scanning process. In this regard, let us define the total acquisition time as \begin{align} T = W + V'. \label{T} \end{align} The random variable $W$ represents the time it takes to complete multiple scans of the uncertainty region $S(\mathcal{R})$ with the adaptive scheme. It is given by \begin{align} W \coloneqq U \beta_N, \label{W} \end{align} where $\beta_N \coloneqq T_d \frac{\R_N}{\rho^2}$, and $U$ is a \emph{geometric} random variable with success probability $p \coloneqq P(F)$. The (discrete) distribution of $W$ is as follows: \begin{align} f_W(w) = (1-p)\sum_{i=0}^\infty p^{i}\delta(w - i \beta_N). \label{fW} \end{align} The random variable $V'$ is a modified version of random variable $V$, since $V'$ represents the amount of time taken in the final scan of the uncertainty region given that the successful detection of the receiver occurs in this particular scan, when the previous $W$ scans have failed to locate the receiver. Thus, there is no possibility of a ``failure'' in the final scan. Therefore, the distribution of $V'$ is the same as the distribution of $V$ given that the detection event, $D$, will occur in the final scan. That is, $f_{V'}(v) = f_V(v|D)$, where we obtain $f_V(v|D)$ in a straightforward manner by using \emph{law of total probability}: \begin{align} &f_V(v) = f_V(v|D)P(D) + f_V(v|D^C)P(D^C) \implies f_V(v|D) = \frac{f_V(v) - f_V(v|D^C)P(D^C)}{P(D)} \end{align} Since $f_V(v|D^C) = \delta(v-\beta_N)$ and $P(D) \coloneqq 1 - p$, and $P(D^C)= p$, \begin{align} f_{V'}(v) = f_V(v|D)= \frac{1}{1-p} \sum_{k=0}^{N-1} P(E_{k+1}) \frac{\alpha}{\eta_{k+1}} e^{ -\alpha \left(v - \beta_k \right) } \cdot \mathbbm{1}_{\left[\beta_k, \beta_{k+1} \right)}(v), \quad 0 \leq v < \beta_N. \end{align} From \eqref{T}, $f_{T}(t) = f_{W} * f_{V'} (t)$. Then, \begin{align} f_T(t) &= \sum_{i=0}^\infty p^i \sum_{k=0}^{N-1} P(E_{k+1}) \frac{\alpha}{\eta_{k+1}} e^{-\alpha \left(t - i\beta_N - \beta_k \right) }\cdot \mathbbm{1}_{[i\beta_N + \beta_k, i\beta_N + \beta_{k+1})}(t). \end{align} \subsection{ Expected Value and Complementary Cumulative Distribution Function of $T$} \subsubsection{Expected Value} The expected value of acquisition time is \begin{align} &\E[T] = \int_{-\infty}^{\infty} t f_T(t)\, dt = \sum_{i=0}^\infty p^i \sum_{k=0}^{N-1} P(E_{k+1})\int_{-\infty}^{\infty} t \frac{\alpha}{\eta_{k+1}} e^{-\alpha \left(t - i\beta_N - \beta_k \right) }\cdot \mathbbm{1}_{[i\beta_N + \beta_k, i\beta_N + \beta_{k+1})}(t)\, dt \\ &= \sum_{i=0}^\infty p^i \sum_{k=0}^{N-1} \frac{P(E_{k+1})}{\eta_{k+1}} \left( i\beta_N + \beta_k + \frac{1}{\alpha} - \left( i\beta_N + \beta_{k+1} +\frac{1}{\alpha} \right)e^{ -\alpha \left(\beta_{k+1} - \beta_k \right) } \right) \end{align} After a few more simplifications, we have that \begin{align} \E[T]& = \sum_{k=0}^{N-1}\frac{P(E_{k+1})}{\eta_{k+1}} \left( \sum_{i=0}^\infty i p^i \beta_N \left( 1 - e^{-\alpha(\beta_{k+1}-\beta_k)} \right) + \sum_{i=0}^\infty p^i \left( \beta_k - \beta_{k+1}e^{-\alpha\left( \beta_{k+1}-\beta_k \right)} + \frac{1}{\alpha} \left( 1 - e^{-\alpha \left( \beta_{k+1} -\beta_k \right)} \right) \right) \right). \end{align} The quantity $\sum_{i=0}^\infty i p^i = \frac{p}{(1-p)^2}$. Thus, \begin{align} &\E[T] = \sum_{k=0}^{N-1}\frac{P(E_{k+1})}{\eta_{k+1}} \left( \beta_N\left( 1 - e^{-\alpha \left( \beta_{k+1} - \beta_k \right)} \right) \frac{p}{(1-p)^2} + \frac{\beta_k - \beta_{k+1}e^{-\alpha \left( \beta_{k+1} - \beta_k \right)} + \frac{1}{\alpha} \left( 1 - e^{-\alpha \left( \beta_{k+1} - \beta_k \right)} \right) }{1-p} \right). \end{align} It should be noted that $P(E_{k+1})$, $p$, and $\beta$, are all functions of $\Rc_i$'s (or $r_i$'s). Specifically, using \eqref{Ek} and \eqref{PD1}, \begin{align} P( E_{k+1}) = \left(1 - Q\left(\lfloor \gamma_0 + 1\rfloor, \left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) \right)\sum_{i=1}^{k+1} \int_{\Rc_{i-1}}^{\Rc_i} \frac{r}{\sigma^2}e^{-\frac{r^2}{2\sigma^2}}\, dr \left( Q\left(\lfloor \gamma_0 + 1\rfloor, \left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) \right)^{k-i} , \end{align} for $k = 0, 1, \dotsc, N-1.$ Also, \begin{align} p = \sum_{k=0}^{N-1} \int_{\Rc_k}^{\Rc_{k+1}} \frac{r}{\sigma^2} e^{-\frac{r^2}{2\sigma^2}}\, dr \times \left(Q\left(\lfloor \gamma_0 + 1\rfloor, \left(\frac{P_s}{ \pi\rho^2} + \lambda_n \right) A T \right) \right)^{N-k}. \end{align} Finally, it can be shown that $\sum_{k=1}^N P(E_k) + p = 1.$ \begin{figure} \centering \includegraphics{plot_spiral_acq_time.pdf} \caption{Plots of average acquisition time as a function of number of subregions $N$ when the radii $\Rc_i$'s are uniformly distributed between 0 and $\Rc$ for different values of probability of detection $P_D$. The radius of uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver location inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, and dwell time $T_d = 0.1$ millisecond.} \label{fig1} \end{figure} \begin{figure} \centering \includegraphics{plot_spiral_ccdf.pdf} \caption{Plots of complementary cumulative distribution function $P(\{ T > \tau \})$ as a function of number of subregions $N$ when the radii $\Rc_i$'s are uniformly distributed between 0 and $\Rc$ for different values of probability of detection $P_D$. The radius of uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, dwell time $T_d = 0.1$ millisecond, and the time threshold $\tau = 80$ seconds. } \label{fig2} \end{figure} \begin{figure} \centering \includegraphics{plot_spiral_acq_time_opt.pdf} \caption{Plots of mean acquisition time as a function of number of subregions $N$ for the optimized and nonoptimized cases. The radius of uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, and dwell time $T_d = 0.1$ millisecond. } \label{fig3} \end{figure} \begin{figure} \centering \includegraphics{plot_spiral_ccdf_opt.pdf} \caption{Plots of complementary cumulative distribution function $P(\{ T > \tau \})$ as a function of number of subregions $N$ for the optimized and nonoptimized cases. The radius of uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, dwell time $T_d = 0.1$ millisecond, and time threshold $\tau = 80$ seconds. } \label{fig4} \end{figure} \subsubsection{Complementary Cumulative Distribution Function} \begin{align} &P(\{ T > \tau \}) = \int_{\tau}^\infty f_T(t)\, dt = \sum_{i=0}^\infty p^i \sum_{k=0}^{N-1} P(E_{k+1}) \int_{\tau}^\infty \frac{\alpha}{\eta_{k+1}} e^{-\alpha\left(t - i \beta_N - \beta_k \right)}\cdot \mathbbm{1}_{[i\beta_N + \beta_k, i\beta_N + \beta_{k+1} )}(t)\, dt. \end{align} In terms of indicator functions, the complementary distribution function can be written more simply as \begin{align} &P(\{ T > \tau \})= \sum_{i=0}^\infty p^i \sum_{k=0}^{N-1} \! P(E_{k+1}) \left( \mathbbm{1}_{[0, i\beta_N + \beta_k )}(\tau) + \mathbbm{1}_{[i\beta_N + \beta_k, i\beta_N + \beta_{k+1} )}(\tau) \frac{1}{\eta_{k+1}} \left(e^{-\alpha \left( \tau - i \beta_N - \beta_k \right) } - e^{-\alpha \left( \beta_{k+1} - \beta_k \right) }\right) \right). \end{align} After a few manipulations, we arrive at the following closed form expression of the complementary distribution function: \begin{align} P(\{ T > \tau \})&= \sum_{k=0}^{N-1}P(E_{k+1}) \left( \sum_{i = \max\left(0, \left\lfloor \frac{\tau-\beta_k}{\beta_N} \right\rfloor + 1 \right)}^\infty p^i + \sum_{i = \max\left(0, \left\lfloor \frac{\tau-\beta_{k+1}}{\beta_N} \right\rfloor + 1 \right)}^{\left\lfloor \frac{\tau-\beta_k}{\beta_N} \right\rfloor} \frac{1}{\eta_{k+1}} \left( p e^{\alpha \beta_N} \right)^i e^{-\alpha \left( \tau - \beta_k \right)} \right. \nonumber \\ & \left. - \sum_{i = \max\left(0, \left\lfloor \frac{\tau-\beta_{k+1}}{\beta_N} \right\rfloor + 1 \right)}^{\left\lfloor \frac{\tau-\beta_k}{\beta_N} \right\rfloor} \frac{1}{\eta_{k+1}} p^i e^{-\alpha \left( \beta_{k+1} - \beta_k \right) } \right) \nonumber \\ & = \sum_{k=0}^{N-1}P(E_{k+1}) \left( \frac{p^{\max\left(0, \left\lfloor \frac{\tau-\beta_k}{\beta_N} \right\rfloor + 1 \right)}}{1-p} + \frac{e^{-\alpha(\tau - \beta_k)}}{\eta_{k+1}} \times \left(p e^{\alpha \beta_N}\right)^{\max\left(0, \left\lfloor \frac{\tau-\beta_{k+1}}{\beta_N} \right\rfloor + 1 \right)} \times \frac{1 - \left(p e^{\alpha \beta_N}\right)^{L_k}}{1 - p e^{\alpha \beta_N}} \right.\nonumber \\ & \left. - \frac{e^{-\alpha(\beta_{k+1}-\beta_k)}}{\eta_{k+1}} \times p^{\max\left(0, \left\lfloor \frac{\tau-\beta_{k+1}}{\beta_N} \right\rfloor + 1 \right)} \times \frac{1 - p^{L_k}}{1 - p} \right), \end{align} where $L_k \coloneqq \left\lfloor \frac{\tau - \beta_k}{\beta_N} \right\rfloor - \max\left(0, \left\lfloor \frac{\tau-\beta_{k+1}}{\beta_N} \right\rfloor + 1 \right) + 1$. \begin{figure} \centering \includegraphics{plot_shotgun_acq_time.pdf} \caption{Plots of average acquisition time as a function of standard deviation of firing distribution $\sigma_0$ for the shotgun approach. The radius of uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, and dwell time $T_d = 0.1$ millisecond. The optimal value of $\sigma_0$ is $\sqrt{2}\sigma = 21.2132$ meters.} \label{fig8} \end{figure} \begin{figure} \centering \begin{tabular}{ll} \includegraphics[scale=0.9]{plot_shotgun_ccdf.pdf} & \includegraphics[scale=0.9]{plot_shotgun_ccdf_tau.pdf} \end{tabular} \caption{The plots of complementary cumulative distribution function as a function of standard deviation of firing distribution $\sigma_0$. Left: Plot of $P(\{ T > \tau \})$ for time threshold $\tau = 80$ seconds for different values of probability of detection $P_D$. Right: Plot of $P(\{ T > \tau \})$ for probability of detection $P_D = 0.05$ for different values of time threshold $\tau$. The radius of the uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, and dwell time $T_d = 0.1$ milliseconds for both the figures.} \label{fig10} \end{figure} \begin{figure} \centering \includegraphics{plot_rand_acq_time.pdf} \caption{Plots of average acquisition time as a function of probability of detection $P_D$ for the optimized shotgun and adaptive spiral schemes. The radius of the uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, and dwell time $T_d = 0.1$ millisecond. } \label{fig5} \end{figure} \begin{figure} \centering \includegraphics{plot_rand_ccdf.pdf} \caption{Plots of complementary cumulative distribution function $P(\{ T > \tau \})$ as a function of probability of detection $P_D$ for the optimized shotgun and adaptive spiral schemes. The radius of the uncertainty region $\Rc = 50$ meters, the standard deviation of the receiver position inside the uncertainty region $\sigma = 15$ meters, beam radius $\rho=0.2$ meters, dwell time $T_d = 0.1$ millisecond, and time threshold $\tau = 80$ seconds. } \label{fig6} \end{figure} \begin{figure} \centering \includegraphics[scale=1.5]{fig_adaptive_spiral.pdf} \caption{Distribution of regions for the adaptive spiral search scheme before and after optimization of mean acquisition time when the uncertainty region is divided into $N=7$ subregions. For probability of detection $P_D = 0.05$, the unoptimized and optimized schemes yield mean acquisition times of 69.19 and 53.27 seconds, respectively. } \label{fig7} \end{figure} \subsection{Optimization of $\E[T]$ and $P(\{T > \tau\})$} In this section, we look to optimize $\E[T]$ as a function of $\Rc_1, \dotsc, \Rc_{N-1}$ when $\rho$ is fixed. The optimization problem for $\E[T]$ and $P(\{ T > \tau \})$ is laid out as follows: \begin{equation*} \begin{aligned} & \underset{\Rc_1, \dotsc, \Rc_{N-1}}{\text{minimize}} & & f(\Rc_1, \dotsc, \Rc_N) \\ & \text{subject to} & & i) 0<\Rc_1 < \Rc_2 < \dotsm < \Rc_{N-1} < \Rc_N , \: i = 1, 2, \dotsc, N,\\ &&& ii) \rho = \rho_0,\\ & & & iii) P_R = P_0, \end{aligned} \end{equation*} where $f(\Rc_1, \dotsc, \Rc_N)$ is either $\E[T]$ or $P(\{ T > \tau\})$, $P_R$ is the received signal power, and$\rho_0$ and $P_0$ are constants. The optimization is not performed as a function of $\rho$, and the smallest possible value of $\rho$ (which is $\rho_0$) is chosen for scanning. This is because enlarging $\rho$ results in a further decrease in an already small probability of detection $P_D$, and instead of saving time by scanning with a larger beam radius, a larger time is incurred whenever $\rho > \rho_0$ (due to a poorer $P_D$). Finally, we want to point out that the solution of the optimization problem with the method of Lagrange multipliers is not straightforward in our case. Therefore, for the purpose of global optimization, we use a \emph{real-number genetic algorithm} to find the minimum of the objective function. For more details about the real-number genetic algorithm, the reader is referred to \cite{Rao}. \section{The Shotgun Approach}\label{SG} The so-called \emph{Shotgun} approach to acquisition is a randomised acquisition technique that involves firing the uncertainty region with signal pulses at certain locations in the region, where the locations are sampled according to a zero-mean Gaussian distribution in two dimensions. We term such a Gaussian distribution as the \emph{firing} distribution. In the remaining section, we derive the mean acquisition time and the complementary cumulative distribution function of the acquisition time for the shotgun approach. Let $\B$ be the event that the beam falls inside a ball of radius $\rho$ that contains the receiver. For the sake of analysis, we first assume that the receiver is located at a point $(x, y)$ inside the uncertainty region. Let $B_\rho(x, y)$ be such a ball of radius $\rho$ centered around $(x, y)$. We assume that when the beam center falls inside $B_\rho(x, y)$, the detector is completely covered by the beam, and there is a chance of detection. In this case, the probability of occurrence of $\B$, given that the receiver is located at $(x, y)$, is \begin{align} P(\B|x, y) = \iint_{B_\rho(x, y)} \frac{1}{2\pi \sigma_0^2} e^{-\left(\frac{x^2+y^2}{2\sigma_0^2} \right)} \, dx\, dy, \label{shot1} \end{align} where $\sigma_0^2$ is the variance of the firing distribution. For the practical case of $\rho << \sigma_0$, the expression in \eqref{shot1} is merely, \begin{align} P(\B|x,y) \approx \frac{\pi \rho^2}{2\pi \sigma_0^2} e^{-\left(\frac{x^2+y^2}{2\sigma_0^2} \right)} = \frac{ \rho^2}{2 \sigma_0^2} e^{-\left(\frac{x^2+y^2}{2\sigma_0^2} \right)}. \end{align} Let us use $p_D(x, y)$ to denote the probability of detection of the receiver when one shot is fired in the uncertainty region. Then, \begin{align} p_D(x, y) = P(\B|x, y) P_D. \end{align} In this case, the acquisition time, $T$, has the (geometric) distribution: \begin{align} f_T(t|x, y) \coloneqq \sum_{\ell = 1}^\infty (1-p_D(x, y))^{\ell-1} p_D(x, y) \delta(t - \ell T_d), \end{align} which implies that $\E[T|x, y] = \frac{T_d}{p_D(x, y)}$. \subsection{Mean Acqusition Time} The mean acquisition time can be shown to be \begin{align} \E[T]& = \int_{-\infty}^\infty \int_{-\infty}^\infty \E[T|x, y] f_{X Y}(x, y) \, dx \, dy = \int_{-\infty}^\infty \int_{-\infty}^\infty \frac{T_d}{p_D(x, y)} \frac{1}{2\pi \sigma^2} e^{-\left(\frac{x^2+y^2}{2\sigma^2} \right)}\, dx \, dy\nonumber \\ & = \frac{2 T_d \sigma_0^4}{\rho^2 P_D (\sigma_0^2 - \sigma^2)}, \text{ for } \sigma_0 > \sigma. \label{shot2} \end{align} The proof of \eqref{shot2} is given in the Appendix~\ref{C}. The mean acquisition time is optimized (minimized) with respect to $\sigma_0$. By taking the partial derivative of \eqref{shot2} with respect to $\sigma_0$, and setting the resulting derivative equal to zero, we obtain \begin{align} \sigma_0^* = \sqrt{2} \sigma. \end{align} \subsection{Complementary Cumulative Distribution Function} The conditional complementary cumulative distribution function of $T$ is derived as follows: \begin{align} &P(\{ T > \tau \}|x, y) = \int_\tau^\infty f_T(t|x, y) \, dt = \sum_{\ell = 1}^\infty (1-p_D(x, y))^{\ell-1} p_D(x, y) \int_\tau^\infty \delta(t - \ell T_d) \, dt\nonumber \\ & = \sum_{\ell = 1}^\infty (1-p_D(x, y))^{\ell-1} p_D(x, y) \cdot \mathbbm{1}_{[0, \ell T_d)}(\tau) = \frac{p_D(x, y)}{(1-p_D(x, y))} \sum_{\ell = \max\left(1, \left\lfloor \frac{\tau}{T_d} \right\rfloor + 1 \right)}^\infty (1-p_D(x, y))^{\ell} \nonumber \\ & = \left(1-p_D(x, y)\right)^{\max\left(1, \left\lfloor \frac{\tau}{T_d} \right\rfloor + 1 \right) - 1}. \label{ccdf} \end{align} Let us express the conditional complementary distribution in an alternative form that will help us obtain a closed-form expression when we average it with respect to the receiver location. Before we start the analysis, let us denote the factor $\max\left(1, \left\lfloor \frac{\tau}{T_d} \right\rfloor + 1 \right) - 1$ by the integer $n$. We can rewrite \eqref{ccdf} as \begin{align} &P(\{ T > \tau \}|x, y) = \left(1-p_D(x, y)\right)^n = \sum_{k=0}^{n} {{n} \choose {k} } (-1)^k (p_D(x, y))^k \nonumber \\ & = \sum_{k=0}^{n} {{n} \choose {k} } (-P_D)^k \left(\frac{ \rho^2}{2 \sigma_0^2} e^{-\left(\frac{x^2+y^2}{2\sigma_0^2} \right)}\right)^k = \sum_{k=0}^{n} {{n} \choose {k} } (-P_D)^k \left(\frac{ \rho^2}{2 \sigma_0^2}\right)^k \exp\left( {-\frac{x^2+y^2}{2 \frac{\sigma_0^2}{k} } } \right) \end{align} Thus, \begin{align} P(\{ T > \tau \}) &= \int_{-\infty}^\infty \int_{-\infty}^\infty P(\{ T > \tau \}|x, y) f_{XY}(x, y)\, dx \, dy \nonumber \\ & = \int_{-\infty}^\infty \int_{-\infty}^\infty \sum_{k=0}^{n} {{n} \choose {k} } (-P_D)^k \left(\frac{ \rho^2}{2 \sigma_0^2}\right)^k \exp\left( {-\frac{x^2+y^2}{2 \frac{\sigma_0^2}{k} } } \right) \frac{1}{2 \pi \sigma^2} \exp\left( - \frac{x^2+y^2}{2\sigma^2} \right) \, dx \, dy \nonumber \\ & = \sum_{k=0}^{n} {{n} \choose {k} } \left(\frac{-P_D \rho^2}{2 \sigma_0^2}\right)^k \frac{1}{2\pi \sigma^2} \int_{-\infty}^\infty \int_{-\infty}^\infty \exp\left( - \frac{(x^2 + y^2)}{2} \left( \frac{1}{\sigma^2} + \frac{k}{\sigma_0^2} \right) \right) \, dx \, dy \nonumber \\ & = \sum_{k=0}^{n} {{n} \choose {k} } \left(\frac{-P_D \rho^2}{2 \sigma_0^2}\right)^k \left(\frac{\sigma_0^2}{\sigma_0^2 + k \sigma^2} \right) \int_{-\infty}^\infty \int_{-\infty}^\infty \frac{1}{2\pi \left( \frac{\sigma^2 \sigma_0^2}{\sigma_0^2 + k \sigma^2} \right) } \exp\left( - \frac{(x^2 + y^2)}{2 \left( \frac{\sigma^2 \sigma_0^2}{\sigma_0^2 + k \sigma^2}\right)} \right) \, dx \, dy \nonumber \\ & = \sum_{k=0}^{n} {{n} \choose {k} } \left(\frac{-P_D \rho^2}{2 }\right)^k \left(\frac{1}{\sigma_0^2 + k \sigma^2} \right) \left( \frac{1}{\sigma_0^2} \right)^{k-1}, \label{ccdf1} \end{align} where, we note that $n = \max\left(1, \left\lfloor \frac{\tau}{T_d} \right\rfloor + 1 \right) - 1 = \max\left( 0, \left\lfloor \frac{\tau}{T_d} \right\rfloor \right)$. For a small $T_d$, $n$ can be a very large number, and it become very difficult to calculate \eqref{ccdf1} due to the factor ${n \choose k}$ (which is not easy to calculate when $n$ is large and $k$ is moderately large, $k < n$). However, all the three terms in the sum in \eqref{ccdf1} approach zero as $k >> 1$. Therefore, we don't have to compute the entire sum in \eqref{ccdf1} because the terms in the sum beyond some integer $n_0$ can be ignored, where $n_0 << n$. Thus, with $n_0$ as the upper limit in the sum, the complementary cumulative distribution can be computed easily with a small approximation error. The optimization of the complementary cumulative distribution function is carried out by differentiating \eqref{ccdf1} with respect to $\sigma_0$ and setting it equal to zero. However, the solution (which is $\sigma_0^*$, the minimizer), has to be computed numerically. We ought to note here that $\sigma_0^*$ is a function of both $\tau$ and $P_D$. \section{Performance Results and Comparison of Two Acquisition Schemes} \label{Comp} In order to compare the performance of the adaptive acquisition schemes, the number of signal photons detected during the observation interval is fixed at 25, and the number of noise photons is varied between 13 and 24. These photon counts result from the following system parameters: Received signal intensity $ = 6\times 10^{-8}$ Joules/square meters/second, average noise intensity $= 4\times 10^{-8}$ Joules/square meters/second, area of detector $ = 1$ square centimeter, wavelength of light $ =1550$ nanometers, pulse duration $=1$ microsecond, and photoconversion efficiency $=0.5$. By using these parameter values in \eqref{PD1} and \eqref{PFA} and choosing an appropriate threshold, we get the probability of detection to lie between 0.02 and 0.08, while the probability of false alarm is fixed at $1\times 10^{-12}$. Fig.~\ref{fig1} and Fig.~\ref{fig2} show the expected acquisition time and the complementary cumulative distribution function (ccdf) of acquisition time, respectively, as a function of number of subregions $N$ for the adaptive spiral search scheme. These curves correspond to the uniform spacing between the radii $\Rc_i$'s which is the nonoptimized scenario. We can see that the acquisition performance improves with $N$. However, as can be studied from these curves, the law of diminishing return takes effect when $N$ grows. Fig.~\ref{fig3} and Fig.~\ref{fig4} depict the gain in performance achieved by optimization of the radii of the subregions. As can be seen, the performance gains can be significant when $N$ is large. Fig.~\ref{fig7} shows the distribution of the radii $\Rc_i$'s for the optimized versus nonoptimized scenarios. Here, we remind the reader that the $N=1$ case corresponds to the regular spiral search that is employed in \cite{XinLi} and \cite{Bashir6}. It should be noted that we cannot choose $N$ arbitrarily large since the optimization of the radii $\Rc_i$ becomes computationally expensive for a large number of radii. As can be inferred from Fig.~\ref{fig3} and Fig.~\ref{fig4}, the performance gains with optimization of acquisition time for a smaller $N$ yields better results as compared to nonoptimized case when $N$ is large. The maximum value we chose for $N$ is 7 in this study for both the optimized and nonoptimized scenarios. Fig.~\ref{fig8} and Fig.~\ref{fig10} illustrate the mean acquisition time and the complementary cumulative distribution function, respectively, for the shotgun approach as a function of standard deviation of the firing distribution. We note that the optimal value $\sigma_0^*$ is a function of $P_D$ as well as $\tau$ in the case of the complementary cumulative distribution function, whereas, $\sigma_0^*$ is independent of $P_D$ for the mean acquisition time scenario (Fig.~\ref{fig8}). Fig.~\ref{fig5} and Fig.~\ref{fig6} represent the difference in performance between the shotgun approach and the adaptive spiral scheme as a function of $P_D$. Both schemes are optimized to give the best possible performance. As can be seen, the shotgun approach gives a better performance than the $N=1$ and $N=2$ scenarios from the perspective of complementary cumulative distribution function, but is outperformed by larger $N$ for the adaptive spiral search for higher $P_D$. Even though the shotgun approach does not perform as well as the adaptive spiral search for a larger $N$, this approach is still desirable from two important perspectives. Let us remember that in the spiral acquisition, we have to trace the spiral carefully while scanning the uncertainty region. This requires a very high pointing accuracy on the transmitter's part. In a real system, their is always a pointing error tolerance limit within which the transmitter system operates, and if the magnitude in error is significant, the performance of the adaptive spiral search can take a serious hit. Intuitively, we can see why this is true. If the transmitter misses the receiver due to the pointing error, it will have to scan an entire subregion before it gets a chance to shine light again on the receiver. On the other hand, the pointing error is not such a serious problem for the shotgun approach since the pointing error only results in slightly increasing the uncertainty volume (assuming that the GPS localization error and the transmitter's pointing error are independent random variables). In addition to a need for higher pointing accuracy, the optimization cost (cost of executing a real-number genetic algorithm in a multidimensional space) of adaptive spiral search may also make it a less suitable choice. On the other hand, the optimization of mean acquisition time as a function of $\sigma_0$ is very easy to carry out for the shotgun approach. However, the task of optimization of complementary cumulative distribution function for the shotgun scheme may be more computationally intensive. \section{Conclusion}\label{Conc} In this paper, we have proposed and analyzed two acquisition schemes, namely the adaptive spiral search, and the shotgun approach. In terms of acquisition time, both schemes perform better than the regular spiral search scheme for low probability of detection scenario. For a large number of subregions, the adaptive spiral search outperforms the shotgun technique. However, in order to gain better performance, the adaptive search spiral requires precise pointing by the transmitter in order to scan the region of uncertainty. Additionally, the optimization of adaptive spiral search using a genetic algorithm may also incur additional complexity overhead. This may tilt the balance in favor of shotgun approach which does not require higher pointing accuracy and larger optimization cost. \appendices \section{Probability of Receiver Location inside $E_{S_i}$}\label{A} Since, $\left(\bigcup_{j=1}^{k-1} E_j \right)^C = \bigcap_{j=1}^{k-1} E_j^C$, \begin{align} P\left(E_{S_i} \left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) = \int_0^{\Rc_i} f_R\left(r\left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) \, dr. \end{align} Now, \begin{align} f_R\left(r\left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) = \frac{ P\left(\bigcap_{j=1}^{k-1} E_j^C| R=r\ \right) f_R(r)} {P\left(\bigcap_{j=1}^{k-1} E_j^C \right)}. \label{1} \end{align} Moreover, we know that, \begin{align} P\left(\bigcap_{j=1}^{k-1} E_j^C| R=r\ \right) = \begin{dcases} 1, & r > \Rc_{k-1},\\ 1-P_D, & \Rc_{k-2} < r \leq \Rc_{k-1}, \\ 1 - (P_D + (1-P_D)P_D), & \Rc_{k-3} < r \leq \Rc_{k-2},\\ \vdots & \vdots \\ 1 - (P_D + (1-P_D)P_D + (1-P_D)^2 P_D + \dotsm + (1-P_D)^{k-2} P_D), & \Rc_0 < r \leq \Rc_1, \end{dcases} \end{align} where $R_0 = 0.$ We can see that if $P_D \approx 0 \implies P\left(\bigcap_{j=1}^{k-1} E_j^C| R=r\ \right) \approx 1$ for any $r$. Using this result in \eqref{1}, we conclude that for $P_D \approx 0$, $f_R\left(r\left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) \approx f_R(r)$ since $P\left(\bigcap_{j=1}^{k-1} E_j^C \right)$ is not a function of $r$, and acts only as a normalization constant. This shows that \begin{align} P\left(E_{S_i} \left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) = \int_0^{\Rc_i} f_R\left(r\left| \bigcap_{j=1}^{k-1} E_j^C \right. \right) \, dr \approx \int_0^{\Rc_i} f_R\left(r \right) \, dr = P(E_{S_i}). \end{align} \section{Conditional Distribution of $X$} \label{B} By Bayes Rule, the conditional distribution of the radius of the receiver location in the uncertainty region is: \begin{align} f_X(t|E_k) = \frac{P(E_k |t) f_X(t)}{P(E_k)}. \label{2} \end{align} Moreover, $P(E_k|t) = 0$ for $r > T_d\Rc_k^2/\rho^2,$ and \begin{align} P(E_k | t)=(1-P_D)^{k-i}P_D, \quad T_d\Rc_{i-1}^2/\rho^2 < t \leq T_d \Rc_i^2/\rho^2, i \leq k. \end{align} For $P_D\approx 0$, $P(E_k|T)\approx P_D$ for $ 0< t \leq T_d\Rc_k^2/\rho^2$. Thus, \eqref{2} can be approximated as \begin{align} f_X(t|E_k) = \frac{P_D}{P(E_k)} f_X(t) \cdot \mathbbm{1}_{ (0, T_d\Rc_k^2/\rho^2]}(t), \end{align} where $f_X(t) = \alpha \exp(-\alpha t) \cdot \mathbbm{1}_{[0, \infty)}(t),$ and $\frac{P_D}{P(E_k)}$ acts as a normalization constant. \section{Mean Acquisition Time for Shotgun Approach} \label{C} From \eqref{shot2}, we have that \begin{align} \E[X] &= \int_{-\infty}^\infty \int_{-\infty}^\infty \frac{T_d}{p_D(x, y)} \frac{1}{2\pi \sigma^2} e^{-\left(\frac{x^2+y^2}{2\sigma^2} \right)}\, dx \, dy = \int_{-\infty}^\infty \int_{-\infty}^\infty \frac{T_d}{\frac{1}{2\pi \sigma_0^2}\exp\left(\frac{ -(x^2+y^2)}{2\sigma_0^2} \right) \pi \rho^2 P_D} \times \frac{1}{2\pi \sigma^2} e^{-\left(\frac{x^2+y^2}{2\sigma^2} \right)}\, dx \, dy\nonumber \\ & = \frac{2 T_d \sigma_0^2}{\rho^2 P_D} \int_{-\infty}^\infty \frac{1}{2\pi \sigma^2}e^{-\left(\frac{x^2+y^2}{2\sigma^2} \right)} e^{\left(\frac{x^2+y^2}{2\sigma_0^2} \right)} \, dx \, dy = \frac{2 T_d \sigma_0^2}{\rho^2 P_D} \int_{-\infty}^\infty \frac{1}{2\pi \sigma^2}e^{-\left(\frac{(x^2+y^2)(\sigma_0^2-\sigma^2)}{2\sigma_0^2 \sigma^2} \right)} \, dx \, dy\nonumber \\ &= \frac{2 T_d \sigma_0^2}{\sigma^2 \rho^2 P_D}\times \frac{\sigma_0^2 \sigma^2}{(\sigma_0^2-\sigma^2)} \int_{-\infty}^\infty \frac{1}{2\pi \frac{\sigma_0^2 \sigma^2}{(\sigma_0^2-\sigma^2)} }\exp\left({-\frac{(x^2+y^2)}{ 2\frac{\sigma_0^2 \sigma^2}{(\sigma_0^2 - \sigma^2)} } }\right) \, dx \, dy \nonumber \\ & = \frac{2 T_d \sigma_0^4}{\rho^2 P_D (\sigma_0^2 - \sigma^2)}. \end{align}
\section{Introduction} \noindent Counting solutions is a well-known task in mathematics, computer science, and other areas \cite{ChakrabortyMeelVardi16a,DomshlakHoffmann07a,GomesKautzSabharwalSelman08a,SangBeameKautz05a}. In combinatorics, for instance, one characterizes the number of solutions to problems by means of mathematical expressions,~e.g., generating functions~\cite{DoubiletRotaStanley1972}. One particular counting problem, namely \emph{model counting} (\cSAT) asks to output the number of solutions of a given Boolean formula. While we stay in the realm of model counting, the findings of this work are also relevant for answer set programming. This is particularly true for tight programs (using, e.g., Clark's completion~\cite{Clark77}), but also interesting for applications of quantitative reasoning, solved by programs that are compiled to \SAT with the help of tools like lp2sat~\cite{Janhunen06} or lp2acyc~\cite{BomansonEtAl16}. Model counting and variants thereof have already been applied for solving a variety of real-world applications and questions in modern society related to reasoning~\cite{ChakrabortyMeelVardi16a,ChoiBroeckDarwiche15a,MeelEtAl17a,XueChoiDarwiche12a}. Such problems are typically considered very hard, since \cSAT is complete for the class \#P\xspace~\cite{BacchusDalmaoPitassi03,Roth96},~i.e., one can simulate any problem of the polynomial hierarchy with polynomially many calls~\cite{Toda91} to a~\cSAT solver. Taming this high complexity is possible with techniques from parameterized complexity~\cite{CyganEtAl15}. In fact, many of the publicly available~\cSAT instances show good structural properties after using regular preprocessors like pmc~\cite{LagniezMarquis14a}, see~\cite{FichteEtAl18c,FichteHecherZisser19a}. By good structural properties, we mean that graph representations of these instances have reasonably small \emph{treewidth}. The measure treewidth is a structural parameter of graphs which models the closeness of the graph of being a tree. Treewidth is one of the most cited % combinatorial invariants studied in parameterized complexity~\cite{CyganEtAl15} and was subject to algorithmics competitions~\cite{DellKomusiewiczTalmon18a}. The observation, stated above, that various recent problem instances for \#SAT have small treewidth, leads to the question whether a general framework that leverages treewidth is possible for counting problems. The general idea to develop such frameworks is indeed not new, since there are (a)~specialized solvers such as dynQBF, gpuSAT, and fvs-pace~\cite{CharwatWoltran17,FichteHecherZisser19a,KiljanPilipczuk18} as well as (b)~general systems that exploit treewidth like D-FLAT~\cite{BliemEtAl16}, Jatatosk~\cite{BannachBerndt19}, and sequoia~\cite{LangerEtAl12}. Some of these systems explicitly use \emph{dynamic programming (DP)} to directly exploit treewidth by means of so-called \emph{tree decompositions (TDs)}, whereas others provide some kind of declarative layer to model the problem (and perform decomposition and DP internally). In this work, we solve (counting) problems by means of explicitly specified DP algorithms, where essential parts of the DP algorithm are specified in form of SQL {\ttfamily SELECT} queries. The actual run of the DP algorithm is then delegated to our system~{\small\textsf{dpdb}}\xspace, which employs \emph{database management systems (DBMSs)}~\cite{Ullman89}. This has not only the advantage of naturally describing and manipulating the tables that are obtained during DP, but also allows {\small\textsf{dpdb}}\xspace to benefit from decades of database technology in form of the capability to deal with huge tables using a limited amount of main memory (RAM), dedicated database joins, query optimization, and data-dependent execution plans. Compared to other generic DP systems like D-FLAT~\cite{BliemEtAl16}, our system {\small\textsf{dpdb}}\xspace uses relational algebra (SQL) for specifying DP algorithms, which is even competitive with specialized systems for model counting, and therefore applicable beyond rapid prototyping. \paragraph{Contribution.} We implement a system {\small\textsf{dpdb}}\xspace for solving counting problems based on dynamic programming on tree decompositions, and present the following contributions. (i)~Our system {\small\textsf{dpdb}}\xspace uses database management systems to handle table operations needed for performing dynamic programming efficiently. The system {\small\textsf{dpdb}}\xspace is written in Python and employs PostgreSQL as DBMS, but can work with other DBMSs easily. (ii)~The architecture of {\small\textsf{dpdb}}\xspace allows to solve general problems of bounded treewidth that can be solved by means of table operations (in form of relational algebra and SQL) on tree decompositions. As a result, {\small\textsf{dpdb}}\xspace is a generalized framework for dynamic programming on tree decompositions, where one only needs to specify the essential and problem-specific parts of dynamic programming in order to solve (counting) problems. (iii)~Finally, we show how to solve the canonical problem \cSAT with the help of {\small\textsf{dpdb}}\xspace, where it seems that the architecture of {\small\textsf{dpdb}}\xspace is particularly well-suited. In more detail, we compare the runtime of our system with state-of-the-art model counters. We observe a competitive behavior and promising indications for future work. \paragraph{Prior Work} This is an extended version of a paper~\cite{FichteEtAl20} that appeared at the 22nd International Symposium on Practical Aspects of Declarative Languages. The new material includes improved and extended examples as well as a detailed description of our DP algorithms and how these algorithms can be implemented for the system {\small\textsf{dpdb}}\xspace. Further, we added two new DP algorithms for the additional problems \MSAT and \IDS, to demonstrate how to use {\small\textsf{dpdb}}\xspace: The problem \MSAT is similar to \SAT, but consists of hard clauses that need to be satisfied as well as soft clauses. The goal of \MSAT is to compute the maximum number of soft clauses that can be satisfied using only assignments that also satisfy all the hard clauses. Further, problem \IDS is a popular graph problem that aims for computing for a given graph, a set of vertices (called independent dominating set) such that there is no edge between these vertices and all the other vertices of the graph have an edge to at least one of the vertices in this set. Both problems can be easily extended to counting, where we require to compute the number of witnessing solutions. Finally, we added new experimental results, where we used the most recent version~12 of PostgreSQL as the underlying database management system, which operated on a ramdisk drive. \section{Preliminaries}% We assume familiarity with the terminology of graphs and trees. For details, we refer to the literature and standard textbooks~\cite{Diestel12}. \subsection{Boolean Satisfiability} We define Boolean formulas and their evaluation in the usual way, cf., ~\cite{KleineBuningLettman99}. % % A literal is a Boolean variable~$x$ or its negation~$\neg x$. A \emph{CNF formula}~$\varphi$ is a set of \emph{clauses} interpreted as conjunction. A clause is a set of literals interpreted as disjunction. For a formula or clause~$X$, we abbreviate by $\var(X)$ the variables that occur~in~$X$. % An \emph{assignment} of~$\varphi$ is a mapping $I: \var(\varphi) \rightarrow \{0,1\}$. The formula~$\varphi(I)$ \emph{under assignment~$I$} is obtained by removing every clause~$c$ from $\varphi$ that contains a literal set to~$1$ by $I$, and removing from every remaining clause of~$\varphi$ all literals set to~$0$ by~$I$. An assignment~$I$ is \emph{satisfying} if $\varphi(I)=\emptyset$. \emph{Problem \cSAT} asks to output the number of satisfying assignments of a formula. We also allow \emph{equality formulas}, which are Boolean formulas, where variables are expressions using equality. In more detail: Let $d$ be a fixed constant over domain~$\dom(v)$, where we call $d$ \emph{term constant}. Let $v$ and $v'$ be variables over some domain~$\dom(v)$ and $\dom(v')$, where we call $v$ and $v'$ \emph{term variables}. Then, an \emph{equality formula}~$\beta$ is an expression of the form~$v{=}d$ or $v{=}v'$. A \emph{term assignment~$J$} of equality formula~$\beta$ over term variables~$\tvar(\beta)$ assigns each domain variable~$v\in\tvar(\beta)$ a value over domain~$\dom(v)$. The Boolean formula~$\beta(J)$ \emph{under term assignment~$J$} is obtained as follows. First, we replace all expressions~$v{=}d$ in~$\beta$ by~$1$ if $J(v)=d$, all expressions~$v{=}v'$ by~$1$ if $J(v)=J(v')$, and by~$0$ otherwise. Second, we remove from the resulting clauses in~$\beta(J)$ each clause~$c$ that contains a literal set to~$1$. Finally, we remove from every remaining clause in~$\beta(J)$ every literal that is set to~$0$. We say a term assignment~$J$ is \emph{satisfying} if~$\beta(J)=\emptyset$. \subsection{Tree Decomposition and Treewidth}\label{sec:prelimns:tds} % Treewidth is widely used for fine-grained complexity analyzes and to establish algorithms that provide tractability when bounding the treewidth. While it is only defined for graphs and hence widely used in graph theory~\cite{BodlaenderKoster08}, one can define graph representations of input instances for a variety of problems. % Dedicated techniques then allow to solve problems from many domains such as propositional satisfiability~\cite{SamerSzeider10b}, artificial intelligence~\cite{GottlobSzeider07}, knowledge representation~\cite{GottlobPichlerWei06}, argumentation~\cite{FichteHecherMeier19}, non-monotonic reasoning~\cite{FichteHecherSchindler18a}, abduction in Datalog~\cite{GottlobPichlerWei07}, and databases~\cite{Grohe07}, probabilistic inference~\cite{Dechter99} (under the name bucket elimination) including constraint satisfaction, Fourier and Gaussian elimination for solving linear equalities and inequalities, and combinatorial optimization. While theoretical conditional lower bound results seem to discourage using algorithms that exploit bounded treewidth~\cite{PanVardi06,FichteHecherPfandler20}, dynamic programming along tree decompositions or related decompositions has recently been used to establish practical algorithms~\cite{FichteHecherZisser19a,DudekPhanVardi20}. % An algorithm that exploits small treewidth takes a tree decomposition, which is an arrangement of a graph into a tree, and evaluates the problem in parts, via dynamic programming (DP) on the tree decomposition. % Informally speaking, the tree decomposition provides an evaluation ordering, which one employs by a problem specific algorithm where the runtime of combinatorial hard part is bounded by a (potentially exponential) function of the treewidth~$w$. % Then, the underlying idea of treewidth is that it provides a measure for the closeness of a potential evaluation ordering which is simply a tree. % Below, we provide the formal definitions of the notions tree decomposition and treewidth. \begin{figure}[t]% \includegraphics[scale=1.2]{1-figs/simple_graph} \hspace{2em}% \includegraphics[scale=1.2]{1-figs/simple_td} \caption{Graph~$G$ % (left) with a TD~${\cal T}$ of graph~$G$ (right).}% \label{fig:graph-td}% \end{figure} A \emph{tree decomposition (TD)}~\cite{Kloks94a,CyganEtAl15} of a given graph~$G$ is a pair $\mathcal{T}=(T,\chi)$ where $T$ is a rooted tree and $\chi$ is a mapping which assigns to each node $t\in V(T)$ a set~$\chi(t)\subseteq V(G)$, called \emph{bag}, such that (i) $V(G)=\bigcup_{t\in V(T)}\chi(t)$ and $E(G)\subseteq\SB \{u,v\} \SM t\in V(T), \{u,v\}\subseteq \chi(t)\SE$; and (ii) for each $r, s, t\in V(T)$, such that $s$ lies on the path from~$r$ to $t$, we have $\chi(r) \cap \chi(t) \subseteq \chi(s)$. We let $\width(\mathcal{T}) \ensuremath{\,\mathrel{\mathop:}=} \max_{t\in V(T)}\Card{\chi(t)}-1$. The \emph{treewidth} $\tw(G)$ of $G$ is the minimum $\width({\mathcal{T}})$ over all TDs~$\mathcal{T}$ of $G$. For $k\in \mathcal{N}$ we can compute a tree decomposition of width~$k$ or output that none exists in time~$2^{\mathcal{O}{k^3}} \cdot \Card{V}$~\cite{BodlaenderKoster08}. \begin{example} Figure~\ref{fig:graph-td} depicts a graph~$G$ (left) and a TD~$\mathcal{T}$ of~$G$ (right) of width~$2$. The treewidth of~$G$ is also~$2$ since~$G$, contains a complete graph with~$3$ vertices~\cite{Kloks94a}. % % \end{example} Next, we give the definition of a standard restriction for TDs, so called nice TDs. A nice TD ensures that one needs to consider only a small number of case distinctions in a DP algorithm later. For a node~$t \in V(T)$, we say that $\type(t)$ is $\textit{leaf}$ if $t$ has no children and~$\chi(t)=\emptyset$; $\textit{join}$ if $t$ has children~$t'$ and $t''$ with $t'\neq t''$ and $\chi(t) = \chi(t') = \chi(t'')$; $\textit{intr}$ (``introduce'') if $t$ has a single child~$t'$, $\chi(t') \subseteq \chi(t)$ and $|\chi(t)| = |\chi(t')| + 1$; $\textit{rem}$ (``removal'') if $t$ has a single child~$t'$, $\chi(t') \supseteq \chi(t)$ and $|\chi(t')| = |\chi(t)| + 1$. If for every node $t\in V(T)$, % $\type(t) \in \{ \textit{leaf}, \textit{join}, \textit{intr}, \textit{rem}\}$, then the TD is called \emph{nice}. The conditions allow us to focus on each of the cases of our algorithms individually. \section{Dynamic Programming on Tree Decompositions}\label{sec:dp} In the preliminaries, we gave definitions for tree decompositions and treewidth and stated a variety of application areas. We mentioned that treewidth is widely used as a structural measure to establish tractability results when we consider in addition to the input size of the instance also the treewidth. % % If we want to exploit small treewidth of an input instance by an algorithm in practice, one can design a so called-dynamic programming (DP) algorithm, which works as follows: % Sub-problems are evaluated along the tree decomposition. At each node of the tree, information is gathered in tables. A table contains tuples of a fixed form that are designed to ensure certain properties. Then, a table algorithm maintains these tables during a post-order traversal. Thereby, it handles different cases according to the node contents of the TD and it ensures that properties required to solve the problem in parts sustain. % % The size of a table depends on the number of items in the bag, but is allowed to be exponential in the size of a bag. Hence, the overall technique works in linear time in the size of the problem and exponential in the bag size. % Intuitively, the tree decomposition fixes an order in which we evaluate our problem. % As a result, evaluating a problem along a tree decomposition allows for solving the problem at interest in parts, where the tree decomposition provides these parts and directs how solutions to the parts are supposed to be merged. More formally, a solver based on \emph{dynamic programming (DP)} % evaluates the input~$\mathcal{I}$ in parts along a given TD of a graph representation~$G$ of the input. Thereby, for each node~$t$ of the TD, intermediate results are % stored in a \emph{table}~$\tab{t}$. % This is achieved by running a so-called \emph{table algorithm}~$\algo{A}$, which is designed for a certain graph representation, and stores in~$\tab{t}$ results of problem parts of~$\mathcal{I}$, thereby considering tables~$\tab{t'}$ for child nodes~$t'$ of~$t$. % DP works for many problems~$\mathcal{P}$ as follows. % \begin{enumerate}% \item Construct a graph representation~$G$ of the given input instance~$\mathcal{I}$. \item Heuristically compute a tree decomposition~$\mathcal{T}=(T,\chi)$ of~$G$. \item\label{step:dp} Traverse the nodes in~$V(T)$ in post-order, i.e., perform a bottom-up traversal of~$T$. At every node~$t$ during post-order traversal, execute a table algorithm~$\algo{A}$ that takes as input $t$, bag $\chi(t)$, a \emph{local instance}~$\mathcal{P}(t,\mathcal{I})=\mathcal{I}_t$ depending on~$\mathcal{P}$, as well as previously computed child tables of~$t$ and stores the result in~$\tab{t}$. % % \item Interpret table~$\tab{n}$ for the root~$n$ of~$T$ in order to output the solution of~$\mathcal{I}$. \end{enumerate} When specifying a DP algorithm for a specific problem such as \#SAT, it is often sufficient to provide the data structures and the table algorithm for the specific problem as the general outline of the DP works the same for most problems. % Hence, we focus on table algorithms and their description in the following. Next, we state the graph representation and table algorithm that we need to solve the problem~$\mathcal{P}=\cSAT$~\cite{SamerSzeider10b}. % % First, we need the following graph representation. The \emph{primal graph}~$G_\varphi$ of a formula~$\varphi$ has as vertices its variables, where two variables are joined by an edge if they occur together in a clause of~$\varphi$. Given formula~$\varphi$, a TD~$\mathcal{T}=(T,\chi)$ of~$G_\varphi$ and a node~$t$ of $T$. Sometimes, we refer to the treewidth of the primal graph of a given formula by the \emph{treewidth of the formula}. Then, we let local instance~$\cSAT(t, \varphi)=\varphi_t$ be $\varphi_t \ensuremath{\,\mathrel{\mathop:}=} \SB c \SM c \in \varphi, \var(c) \subseteq \chi(t)\SE$, which are the clauses entirely covered by~$\chi(t)$. Table algorithm~$\algo{Sat}$ as presented in \algorithmcfname~\ref{alg:prim} shows all the cases that are needed to solve~\cSAT by means of DP over nice TDs. Each table~$\tab{t}$ consist of rows of the form~$\langle I, c\rangle$, where~$I$ is an assignment of~$\varphi_t$ and~$c$ is a counter. % Nodes~$t$ with~$\type(t)=\textit{leaf}$ consist of the empty assignment and counter~$1$, cf., Line~1. For a node~$t$ with introduced variable~$a\in\chi(t)$, we guess in Line~3 for each assignment~$\beta$ of the child table, whether~$a$ is set to true or to false, and ensure that~$\varphi_t$ is satisfied. When an atom~$a$ is removed in node~$t$, we project assignments of child tables to~$\chi(t)$, cf., Line~5, and sum up counters of the same assignments. For join nodes, counters of common assignments are multiplied, cf., Line~7. In Example~\ref{ex:running0} below, we explain the algorithm for a selected formula. \begin{algorithm}[t] \KwData{Node~$t$, bag $\chi(t)$, clauses~$\varphi_t$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table~$\tab{t}.$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \{ \langle \tuplecolor{red!62!black}{\emptyset}, \tuplecolor{green!62!black}{1} \rangle \}$% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \{ \langle \tuplecolor{red!62!black}{I \cup \{a \mapsto 0\}}, \tuplecolor{green!62!black}{c} \rangle$ % }% \hspace{9em}$|\; \langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{c} \rangle \in \tab{1}, \varphi_t(\tuplecolor{red!62!black}{I \cup \{a \mapsto 0\}})=\emptyset\} \cup$ \\ % \makebox[0.9cm][l]{}$\langle \tuplecolor{red!62!black}{I \cup \{a \mapsto 1\}}, \tuplecolor{green!62!black}{c} \rangle\hspace{10em} |\;% % \langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{c} \rangle \in \tab{1}, \varphi_t(\tuplecolor{red!62!black}{I \cup \{a \mapsto 1\}})=\emptyset\}\hspace{-5em}$\\ }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% \makebox[5cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \{ \langle \tuplecolor{red!62!black}{I\setminus\{a \mapsto 0, a \mapsto 1\}}$, % % % % % \tuplecolor{green!62!black}{% $\sum_{% c \in \text{C}(I) % } c \rangle\}$ }% % } \hspace{3.4em}$| \langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{\cdot} \rangle \in \tab{1} \}$\; % \tcc{$\text{C}(I)$ is the set that contains all counters for which assignments~$J$ are the same as $I$ after we remove a from the assignment~$I$} $\text{C}(I) \ensuremath{\,\mathrel{\mathop:}=} \{ c \SM \langle {J}, {c}\rangle \in \tab{1}, J\setminus\{a \mapsto 0, a \mapsto 1\} = I\setminus\{a \mapsto 0, a \mapsto 1\} \SE$ % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \{ \langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{c_1 \cdot c_2} \rangle$}\hspace{9em}$|\;\langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{c_1} \rangle \in \tab{1}, \langle \tuplecolor{red!62!black}{I}, \tuplecolor{green!62!black}{c_2} \rangle \in \tab{2} \}\hspace{-5em}$ % \vspace{-0.25em} % } % \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{Sat}(t,\chi(t),\varphi_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving \cSAT~\protect\cite{SamerSzeider10b}.} \label{alg:prim} % % % % % % % % % \end{algorithm}% \medskip \begin{example}\label{ex:running0}\vspace{-1.25em}% Consider formula~$\varphi\ensuremath{\,\mathrel{\mathop:}=} \{\overbrace{\{\neg a, b, c\}}^{c_1}, \overbrace{\{a, \neg b, \neg c\}}^{c_2}, \overbrace{\{a, d\}}^{c_3}, \overbrace{\{a, \neg d\}}^{c_4}\}$. % % % Satisfying assignments of formula~$\varphi$ are, e.g., $\{a\mapsto 1,b\mapsto 1, c\mapsto 0, d\mapsto 0\}$, $\{a\mapsto 1, b\mapsto 0,c\mapsto 1, d\mapsto 0\}$ or $\{a\mapsto 1, b\mapsto 1,c\mapsto 1, d\mapsto 1\}$. % % % In total, there are 6 satisfying assignments of~$\varphi$. % % % % Observe that graph~$G$ of Figure~\ref{fig:graph-td} depicts the primal graph~$G_\varphi$ of~$\varphi$. % % % Intuitively, ${\cal T}$ of Figure~\ref{fig:graph-td} allows to evaluate formula~$\varphi$ in parts. % % % % % Figure~\ref{fig:running1} illustrates a nice TD~$\mathcal{T}'=(\cdot, \chi)$ of the primal graph~$G_\varphi$ and tables~$\tab{1}$, $\ldots$, $\tab{12}$ that are obtained during the execution of~${\algo{Sat}}$ on nodes~$t_1,\ldots,t_{12}$. % % We assume that each row in a table $\tab{t}$ is identified by a number,~i.e., row $i$ corresponds to $\vec{u_{t.i}} = \langle I_{t.i}, c_{t.i} \rangle$. % Table~$\tab{1}=\SB \langle\emptyset, 1\rangle \SE$ has $\type(t_1) = \textit{leaf}$. % Since $\type(t_2) = \textit{intr}$, we construct table~$\tab{2}$ from~$\tab{1}$ by taking~$I_{1.i}\cup\{a\mapsto 0\}$ and $I_{1.i}\cup \{a \mapsto 1\}$ for each~$\langle I_{1.i}, c_{1.i}\rangle \in \tab{1}$. Then, $t_3$ introduces $c$ and $t_4$ introduces $b$. $\varphi_{t_1}=\varphi_{t_2}=\varphi_{t_3} = \emptyset$, but since $\chi(t_4) \subseteq \var(c_1)$ we have $\varphi_{t_4} = \{c_1,c_2\}$ for $t_4$. % % % In consequence, for each~$I_{4.i}$ of table~$\tab{4}$, we have $\{c_1,c_2\}({{I_{4.i}}})=\emptyset$ since \algo{Sat} enforces satisfiability of $\varphi_t$ in node~$t$. % % Since $\type(t_5) = \textit{rem}$, we remove variable~$c$ from all elements in $\tab{4}$ and sum up counters accordingly to construct $\tab{5}$. Note that we have already seen all rules where $c$ occurs and hence $c$ can no longer affect interpretations during the remaining traversal. We similarly create $\tab{6}=\{\langle \{a\mapsto 0\}, 3 \rangle, \langle \{a \mapsto 1\}, 3 \rangle\}$ and~$\tab{{10}}=\{\langle \{a \mapsto 1\}, 2 \rangle\}$. % Since $\type(t_{11})=\textit{join}$, we build table~$\tab{11}$ by taking the intersection of $\tab{6}$ and $\tab{{10}}$. Intuitively, this combines assignments agreeing on~$a$, where counters are multiplied accordingly. % % % By definition (primal graph and TDs), for every~$c \in \varphi$, variables~$\var(c)$ occur together in at least one common bag. % Hence, % since $\tab{12} = \{\langle \emptyset, 6 \rangle \}$, we can reconstruct for example model~$\{a\mapsto 1,b \mapsto 1, c\mapsto 0, d\mapsto 1\} = I_{11.1} \cup I_{5.4} \cup I_{9.2}$ of~$\varphi$ using highlighted (yellow) rows in Figure~\ref{fig:running1}. On the other hand, if~$\varphi$ was unsatisfiable, $\tab{12}$ would contain no values, i.e., $\tab{12}=\emptyset$. % % % % \end{example}% \begin{figure}[t] \resizebox{1\textwidth}{!}{% \includegraphics{1-figs/sat.pdf} } \caption{Selected tables obtained by DP on~${\cal T}'$ for~$\varphi$ of Example~\ref{ex:running0} using algorithm~\algo{Sat}.} \label{fig:running1} \end{figure} \section{Dynamic Programming on Tree Decompositions Expressed in Relational Algebra} % While algorithms that run dynamic programming on bounded treewidth can be quite useful for efficient problem solving in practice, implementations turn out to be tedious already for problems such as the propositional satisfiability problem. % In the following of the paper, we aim for rapid prototyping with dynamic programming by a declarative approach that ideally uses existing systems, gets parallel execution for free, and remains fairly efficient. % % In the previous section, we explained that the traversal of the tree decomposition and the overall methodology of the procedure stays the same. But the core of dynamic programming on tree decompositions for various problems is mostly the specification of the table algorithm that modifies a table based on previously computed tables. % Hence, one can often focus on the table algorithms and their descriptions. % % When recalling basics from databases 101 from undergraduate studies~\cite{ElmasriNavathe16} and taking a closer look on Algorithm~\ref{alg:prim} above, we can immediately spot that we are effectively describing a query on existing data that produces a new table by Algorithm~\ref{alg:prim}. % This motivates our idea to use a database management system to execute the query and specify the query in SQL. % % Before we can proceed with our idea to use databases for executing DP algorithms, we take a step back and recall that the theory of SQL queries is based on relational algebra. % Relational algebra allows us to describe our algorithms and later use SQL encodings for specifying the table algorithm. % % The intermediate step of stating the algorithm in a relation algebra description is twofold. First, we can immediately see the connection between the algorithms given in the literature, which allows us to use the existing algorithms without reproving all properties. % Second, we obtain a compact mathematical description, which is not just a lengthy and technical SQL query that might be hard to understand to researchers from the community who are usually not very familiar with practical databases and the usage of query languages. \subsection{Relational Algebra}% Before we start with details on our approach, we briefly recall basics in relational algebra. % The classical relational algebra was introduced by Codd~\shortcite{Codd70} as a mathematical framework for manipulating relations (tables). Since then, relational algebra serves as the formal background and theoretical basis in relational databases and their standard language \emph{SQL (Structured Query Language)} for querying tables~\cite{Ullman89}. % In fact, in the following, we need extended constructs, which have not been defined in the original framework by Codd, but are standard notions in databases nowadays~\cite{ElmasriNavathe16}. % For the understanding later, we would like to mention that the SQL table model and relational algebra model slightly differ. The SQL table model is a bag (multiset) model, rather than a set~\cite[Chapter 5]{Garcia-MolinaUllmanWidom09}. % Below we also use extended projection and aggregation by grouping. Sometimes these are defined on bags. We avoid this in the definitions in order to keep the algorithms close to the formal set based notation. % Finally, we would like to emphasize that we are not using relation algebra here as developed by Alfred Tarski for the field of abstract algebra, but really relational algebra as used in database applications and theory. A \emph{column}~$a$ is of a certain finite \emph{domain~$\dom(a)$}. Then, a \emph{row}~$r$ over set~$\attr(r)$ of columns is a set of pairs of the form~$(a, v)$ with~$a\in\attr(r),v\in \dom(a)$ such that for each~$a\in \attr(r)$, there is exactly one~$v\in\dom(a)$ with~$(a,v)\in r$. In order to \emph{access} the value~$v$ of an attribute~$a$ in a row~$r$, we sometimes write~$r.a$, which returns the unique value~$v$ with~$(a,v)\in r$. A \emph{table~$\tab{}$} is a finite set of rows~$r$ over set~$\attr(\tab{})\ensuremath{\,\mathrel{\mathop:}=}\attr(r)$ of columns, using domain~$\dom(\tab{})\ensuremath{\,\mathrel{\mathop:}=} \bigcup_{a\in \attr(\tab{})}\dom(a)$. We define \emph{renaming} of~$\tab{}$, given a set~$A$ of columns and a bijective mapping~$m:\attr(\tab{}) \rightarrow A$ with $\dom(a)=\dom(m(a))$ for~$a\in\attr(\tab{})$, by~$\rho_m(\tab{}) \ensuremath{\,\mathrel{\mathop:}=} \{(m(a),v) \mid (a,v)\in \tab{}\}$. In SQL, renaming can be achieved by means of the {\ttfamily AS} keyword. \emph{Selection} of rows in $\tab{}$ according to a given equality formula~$\varphi$ over term variables~$\attr(\tab{})$ is defined\footnote{We abbreviate for binary $v\in\attr(\tab{})$ with~$\dom(v)=\{0,1\}$, $v{=}1$ by~$v$ and~$v{=}0$ by~$\neg v$.} by~$\sigma_{\varphi}(\tab{})\ensuremath{\,\mathrel{\mathop:}=} \{ r \mid r\in \tab{}, \varphi(\ass(r))=\emptyset \}$, where function~$\ass$ provides the \emph{corresponding term assignment} of a given row~$r\in\tab{}$. Selection in SQL is specified using keyword {\ttfamily WHERE}. Given a relation~$\tab{}'$ with~$\attr(\tab{}')\cap\attr(\tab{})=\emptyset$. Then, we refer to the \emph{cross-join} by~$\tab{}\times \tab{}'\ensuremath{\,\mathrel{\mathop:}=} \{ r\cup r' \mid r\in \tab{}, r'\in \tab{}'\}$. Further, a \emph{$\theta$-join} (according to $\varphi$) corresponds to~$\tab{} \bowtie_\varphi \tab{}' \ensuremath{\,\mathrel{\mathop:}=} \sigma_\varphi(\tab{}\times \tab{}')$. Interestingly, in SQL a $\theta$-join can be achieved by specifying the two tables (cross-join) and adding the selection according to~$\varphi$ by means of {\ttfamily WHERE}. Assume in the following a set~$A\subseteq \attr(\tab{})$ of columns. Then, we let table~$\tab{}$ \emph{projected to~$A$} be given by $\Pi_{A}(\tab{})\ensuremath{\,\mathrel{\mathop:}=} \{r_A \mid r\in \tab{}\}$, where~$r_A \ensuremath{\,\mathrel{\mathop:}=} \{(a, v) \mid (a, v) \in r, a \in A\}$. This concept of projection can be lifted to \emph{extended projection~$\dot\Pi_{A,S}$}, where we assume in addition to~$A$, a set~$S$ of expressions of the form~$a \leftarrow f$, such that $a\in \attr(\tab{})\setminus A$, $f$ is an arithmetic function that takes a row~$r\in \tab{}$, and there is at most one such expression for each $a\in \attr(\tab{})\setminus A$ in~$S$. Formally, we define $\dot\Pi_{A,S}(\tab{})\ensuremath{\,\mathrel{\mathop:}=} \{r_A \cup r^S \mid r\in \tab{}\}$ with~$r^S \ensuremath{\,\mathrel{\mathop:}=} \{(a, f(r)) \mid a \in \attr(r), (a \leftarrow f) \in S\}$. SQL allows to specify (extended) projection directly after initiating an SQL query with the keyword {\ttfamily SELECT}. Later, we use \emph{aggregation by grouping~$_A G_{(a\leftarrow g)}$}, where we assume~$a\in\attr(\tab{})\setminus A$ and a so-called \emph{aggregate function~$g: 2^\tab{}\rightarrow \dom(a)$}, which intuitively takes a table of (grouped) rows. Therefore, we let~$_A G_{(a\leftarrow g)}(\tab{})\ensuremath{\,\mathrel{\mathop:}=} \{r\cup \{(a,g(\tab{}[r]))\} \mid r\in\Pi_{A}(\tab{})\}$, where $\tab{}[r]\ensuremath{\,\mathrel{\mathop:}=}\{r'\mid r'\in \tab{}, r\subseteq r'\}$. For this purpose, we use for a set~$S\subseteq \mathbb{S}$ of integers, the functions~$\text{\ttfamily SUM}$ for summing up values in~$S$, $\text{\ttfamily MIN}$ for providing the smallest integer in~$S$, as well as $\text{\ttfamily MAX}$ for obtaining the largest integer in~$S$, which are often used for aggregation in this context. The SQL standard uses projection ({\ttfamily SELECT}) to specify~$A$ as well as the aggregate function~$g$, such that these two parts are distinguished by means of the keyword {\ttfamily GROUP BY}. \begin{example} Assume a table~$\tab{1}\ensuremath{\,\mathrel{\mathop:}=}\{r_1, r_2, r_3\}$ of 2 columns~$a,b$ over Boolean domain $\dom(a)=\dom(b)=\{0,1\}$, where~$r_1\ensuremath{\,\mathrel{\mathop:}=}\{(a,1), (b,1)\}$, $r_2\ensuremath{\,\mathrel{\mathop:}=}\{(a,0), (b,0)\}$, $r_3\ensuremath{\,\mathrel{\mathop:}=}\{(a,0), (b,1)\}$. \begin{figure*}[h!] \centering\includegraphics{1-figs/ex_table} \end{figure*} \noindent Then, $r_3.a= {\color{red!50}0}$ and~$r_3.b={\color{blue!50}1}$. Rows can be swapped by renaming and we let~$\tab{2}\ensuremath{\,\mathrel{\mathop:}=} \rho_{\{a\mapsto b, b\mapsto a\}}\tab{1}$. \noindent Observe that, e.g., $\rho_{\{a\mapsto b, b\mapsto a\}}(\{r_3\})$ corresponds to $\{\{(a,1),(b,0)\}\}$,~i.e., considering $r_3$ and swapping $a$ and $b$. We select rows by using the selection~$\sigma$. For example, if we want to select rows where~$b=1$ (colored in blue) we can use~$\sigma_{b=1}(\tab{1})$. \begin{figure*}[h!] \centering\includegraphics{1-figs/ex_table3} \end{figure*} \noindent Hence, applying $\sigma_{b=1}(\tab{1})$ results in~$\{r_1,r_3\}$. Table~$\tab{1}$ can be~$\theta$-joined with~$\tab{2}$, but before, we need to have disjoint columns, which we obtain by renaming each column~$c$ to a fresh column~$c'$ as below by $\rho_{a\mapsto a', b\mapsto b'}\tab{2}$. Then, $\tau_3 \ensuremath{\,\mathrel{\mathop:}=} \tab{1}\bowtie_{a=a'\wedge b=b'}(\rho_{a\mapsto a', b\mapsto b'}\tab{2})$. \begin{figure*}[h!] \centering\includegraphics{1-figs/ex_table4} \end{figure*} \noindent Consequently, we have~$\tau_3 =\{\{(a,0),(a',0),(b,0),(b',0)\}, \{(a,1),(a',1),(b,1),(b',1)\}\}$. Extended projection allows not only to filter certain columns, but also to add additional columns. As a result, if we only select column~$a$ of each row of~$\tab{1}$, but add a fresh column~$c$ holding the sum of the values for~$a$ and~$b$, then $\dot\Pi_{\{a\},\{c\leftarrow a+b\}}\tab{1}$ corresponds to~$\{\{(a,1), (c,2)\}, \{(a,0),(c,0)\},$ $\{(a,0),(c,1)\}\}$. \begin{figure*}[h!] \centering\includegraphics{1-figs/ex_table5} \end{figure*} \noindent Grouping~$\tab{1}$ according to the value of column~$a$, where we aggregate each group by summing up the values of columns~$b$ in a fresh column~$d$, results in~$_{\{a\}}G_{d\,\leftarrow\, \tab{}\mapsto\text{\ttfamily SUM}(\{r.b\mid r\in\tab{}\})}(\tau_1)$, which simplifies to~$\{\{(a,1), (d,1)\}, \{(a,0),\{d,1)\}\}$ as illustrated below. \begin{figure*}[h!] \centering\includegraphics{1-figs/ex_table6} \end{figure*} \end{example} \begin{algorithm}[b] \KwData{Node~$t$, bag $\chi(t)$, local formula~$\varphi_t$, sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\{ \{{(\text{cnt}, 1)}\} \}}$ \label{line:leaf}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % $\tab{t}\ensuremath{\,\mathrel{\mathop:}=} \tab{1} \bowtie_{\tuplecolor{orange!55!red}{\varphi_t}} \tuplecolor{orange!55!red}{\{\{(\cid{a},0)\},\{(\cid{a},1)\}\}}$\label{line:intr} \hspace{-5em}\vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)}G}_{\tuplecolor{orange!55!red}{\text{cnt} \,\leftarrow\, \tab{}\mapsto \text{\ttfamily SUM}(\{r.\text{cnt}\mid r\in\tab{}\})}}(\Pi_{{\attr(\tab{1})\setminus\{\cid{a}}\}}\tab{1})$\label{line:rem} \hspace{-5em} \vspace{-0.1em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\{\text{cnt} \leftarrow\text{cnt} \cdot \text{cnt}'\}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{}{\bigwedge_{u\in\chi(t)}\cid{u}= \cid{u}'}} \rho_{\hspace{-.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:join} % % % % % % % % % \hspace{-5em}% % \vspace{-0.75em} % } % \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{Sat'}(t,\chi(t),\varphi_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving \cSAT.} \label{alg:primdb} % % % % % % % % % % \end{algorithm}% \subsection{Table Algorithms in Relational Algebra} Now, we are in the position to use relational algebra instead of set theory based notions to describe how tables are obtained during dynamic programming. The step from set notation to relational algebra is driven by the observation that in these table algorithms one can identify recurring patterns and one mainly has to adjust problem-specific parts of it. We continue the description with our problem~\cSAT. We picture tables~$\tab{t}$ for each TD node~$t$ as relations, where~$\tab{t}$ distinguishes a unique column~$\cid{x}$ for each~$x\in\chi(t)$. In addition, we require a column \emph{cnt} for counting in~\cSAT, or a column for modeling costs or weights in case of optimization problems. \algorithmcfname~\ref{alg:primdb} presents a table algorithm for problem~\cSAT that is equivalent to \algorithmcfname~\ref{alg:prim}, but relies on relational algebra for computing tables. % Since our description in relation algebra yields the same results as the set based-notation above, we omit formal correctness proofs. Nonetheless, we briefly explain below why both notations are identical. We highlight the crucial parts by coloring \algorithmcfname~\ref{alg:prim}. In particular, one typically derives for nodes~$t$ with~$\type(t)=\textit{leaf}$, a fresh initial table $\tab{t}$, cf., Line~\ref{line:leaf} of \algorithmcfname~\ref{alg:primdb}. Then, whenever a variable~$a$ is introduced, such algorithms often use~$\theta$-joins with a fresh initial table for the introduced variable~$a$. Hence, the new column represents the potential values for variable~$a$. In Line~\ref{line:intr}, the selection of the $\theta$-join is performed according to~$\varphi_t$,~i.e., corresponding to the local instance of~\cSAT. Further, for nodes~$t$ with~$\type(t)=\textit{rem}$, these table algorithms typically need projection. In case of \algorithmcfname~\ref{alg:primdb}, Line~\ref{line:rem} also needs grouping to sum up the counters for those rows of~$\tab{1}$ that concur in~$\tab{t}$. Thereby, rows are grouped according to values of columns~$\chi(t)$ and we keep only one row per group in table~$\tab{}$, where the fresh counter \emph{cnt} is the sum among all counters in~$\tab{}$. Finally, in Line~\ref{line:join} for a node~$t$ with~$\type(t)=\textit{join}$, we use extended projection and $\theta$-joins, where we join on the same truth assignments. This allows us later to leverage database technology for a usually expensive operation. % Extended projection is needed for multiplying the counters of the two rows containing the same assignment. \subsection{Table algorithms for selected problems} Dynamic programming algorithms are known for a variety of problems. % Standard texts in the area of parameterized algorithms and introductory lectures provide various specifications. For formal properties and detailed algorithm descriptions, we refer to other works~\cite{Bodlaender88}, \cite[Chapter 7]{CyganEtAl15}, \cite{Dechter99}, \cite{BannachBerndt19}. % Below, we present the table algorithms for a selection of combinatorial problems in relational algebra notation. % In order to simplify the presentation, we assume that the instance is given by~$\mathcal{I}$ and that the used tree decomposition is nice and given by $\mathcal{T}=(T,\chi)$. If the problem is a graph problem $\mathcal{T}$ is a TD of~$\mathcal{I}$, otherwise we implicitly assume that $\mathcal{T}$ is a TD of the primal graph of instance~$\mathcal{I}$. % For graph problems~$\mathcal{I}$ and a given node~$t$ of~$T$, we refer to the local instance of~$\mathcal{I}=G=(V,E)$ by \emph{local graph~$G_t$} and define it by $G_t \ensuremath{\,\mathrel{\mathop:}=} (V\cap\chi(t), E\cap [\chi(t)\times\chi(t)])$. \subsubsection*{Problem~$\cTCOL$} \begin{algorithm}[ht] \KwData{Node~$t$, bag $\chi(t)$, local graph~$G_t$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.\hspace{-5em}$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\{(\text{cnt}, 1)\}}$ \label{line:col:leaf2}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % $\tab{t}\ensuremath{\,\mathrel{\mathop:}=} % \tab{1} \bowtie_{\tuplecolor{orange!55!red}{\bigwedge_{\{u,v\}\in E(G_t)} u\neq v}} \tuplecolor{orange!55!red}{\{\{(a, 0)\}, \{(a, 1)\}, \ldots, \{(a,o)\}\}}$ \label{line:col:intr2} \hspace{-5em}\vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)}G}_{\tuplecolor{orange!55!red}{\text{cnt}\,\leftarrow\,\tab{}\mapsto\text{\ttfamily SUM}(\{r.\text{cnt}\mid r\in\tab{}\})}}(\Pi_{\attr(\tab{1})\setminus\{\cid{a}\}}\tab{1})$ \label{line:col:rem2}\hspace{-5em} \vspace{-0.1em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t), \tuplecolor{orange!55!red}{\{\text{cnt} \leftarrow\text{cnt} \cdot \text{cnt}'\}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{}{\bigwedge_{u\in\chi(t)}\cid{u}= \cid{u}'}} \rho_{\hspace{-0.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-0.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:col:join2} % % % % % % % % % \hspace{-5em}% % \vspace{-0.75em} % } \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{Col}(t,\chi(t),G_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving~$\cTCOL$.} \label{alg:col} \end{algorithm}% For a given graph instance~$\mathcal{I}=G=(V,E)$, an \emph{$o$-coloring} is a mapping~$\iota: V \rightarrow \{1,\ldots,o\}$ such that for each edge~$\{u,v\}\in E$, we have~$\iota(u)\neq \iota(v)$. Then, the problem~$\cTCOL$ asks to count the number of $o$-colorings of~$G$, whose local instance~$\cTCOL(t,G)$ is the local graph $G_t$. The table algorithm for this problem~$\cTCOL$ is given in Algorithm~\ref{alg:col}. Similarly to Algorithm~\ref{alg:primdb}, for (empty) leaf nodes, the counter~\emph{cnt} is set to~$1$ in Line~\ref{line:col:leaf2}. Whenever a vertex~$a$ is introduced, in Line~\ref{line:col:intr2}, one of the $o$ many color values for~$a$ are guessed and $\theta$-joined with the table~$\tab{1}$ for the child node of~$t$ such that only colorings with different values for two \emph{adjacent} vertices are kept. Similarly to Algorithm~\ref{alg:primdb}, whenever a vertex~$a$ is removed, Line~\ref{line:col:rem2} ensures that the column for~$a$ is removed and that counters~\emph{cnt} are summed up for rows that concur due to the removal of column~$a$. Then, the case for join nodes in Line~\ref{line:col:join2} is again analogous to Algorithm~\ref{alg:primdb}, where only rows with the same colorings in both child tables are kept and counters~\emph{cnt} are multiplied accordingly. \subsubsection*{Problem~\VC} \begin{algorithm}[ht] \KwData{Node~$t$, bag $\chi(t)$, local graph~$G_t$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.\hspace{-5em}$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\{(\text{card}, 0)\}}$ \label{line:vc:leaf2}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % $\tab{t}\ensuremath{\,\mathrel{\mathop:}=} % \tab{1} \bowtie_{\tuplecolor{orange!55!red}{\bigwedge_{\{u,v\}\in E(G_t)} u \vee v}} \tuplecolor{orange!55!red}{\{\{(a, 0)\}, \{(a, 1)\}\}}$ \label{line:vc:intr2} \hspace{-5em}\vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)}G}_{\tuplecolor{orange!55!red}{\text{card}\,\leftarrow\, \tab{}\mapsto\text{\ttfamily MIN}(\{r.\text{card} + r.a\mid r\in\tab{}\})}}(\Pi_{\attr(\tab{1})\setminus\{\cid{a}\}}\tab{1})$ \label{line:vc:rem2}\hspace{-5em} \vspace{-0.1em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\{\text{card} \leftarrow\text{card} + \text{card}'\}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{}{\bigwedge_{u\in\chi(t)}\cid{u}= \cid{u}'}} \rho_{\hspace{-0.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-0.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:vc:join2} % % % % % % % % % \hspace{-5em}% % \vspace{-0.75em} % } \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{VC}(t,\chi(t),G_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving~$\VC$.} \label{alg:vc} \end{algorithm}% Given a graph instance~$\mathcal{I}=G=(V,E)$, a \emph{vertex cover} is a set of vertices~$C\subseteq V$ of~$G$ such that for each edge~$\{u,v\}\in E$, we have~$\{u,v\}\cap C\neq \emptyset$. Then, \VC asks to find the minimum cardinality~$|C|$ among all vertex covers~$C$, i.e., $C$ is such that there is no vertex cover~$C'$ with~$|C'| < |C|$. Local instance~$\VC(t,G)\ensuremath{\,\mathrel{\mathop:}=} G_t$, where the local graph~$G_t$ is defined above. We use an additional column \emph{card} for storing cardinalities. The table algorithm for solving \VC is provided in Algorithm~\ref{alg:vc}, where, for leaf nodes the cardinality is $0$, cf., Line~\ref{line:vc:leaf2}. Then, when introducing vertex~$a$, we guess in Line~\ref{line:vc:intr2} whether~$a$ shall be in the vertex cover or not, and enforce that for each edge of the local instance at least one of the two endpoint vertices has to be in the vertex cover. Note that the additional cardinality column only takes removed vertices into account. More precisely, when a vertex $a$ is removed, we group in Line~\ref{line:vc:rem2} according to the bag columns~$\chi(t)$, where the fresh cardinality value is the minimum cardinality (plus 1 for~$a$ if~$a$ shall be in the vertex cover), among those rows that concur due to the removal of~$a$. The join node is similar to before, but in Line~\ref{line:vc:join2} we additionally need to sum up the cardinalities of two adjoining child table rows. \subsubsection*{Problem~\MSAT} \begin{algorithm}[ht] \KwData{Node~$t$, bag $\chi(t)$, local instance~$\mathcal{I}_t=(\varphi_t, \psi_t)$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.\hspace{-5em}$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\{(\text{card}, 0)\}}$ \label{line:msat:leaf2}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % $\tab{t}\ensuremath{\,\mathrel{\mathop:}=} % \tab{1} \bowtie_{\tuplecolor{orange!55!red}{\varphi_t}} \tuplecolor{orange!55!red}{\{\{(a, 0)\}, \{(a, 1)\}\}}$ \label{line:msat:intr2} \hspace{-5em}\vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, $a \not\in \chi(t)$ is removed, and~$\psi'$ are removed local soft-clauses}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)}G}_{\tuplecolor{orange!55!red}{\text{card}\,\leftarrow\,\tab{}\mapsto\text{\ttfamily MAX}(\{r.\text{card} + \Sigma_{c\in\psi'\hspace{-.1em},\,c(\ass(r))=\emptyset} 1\mid r\in\tab{}\})}}(\Pi_{\attr(\tab{1})\setminus\{\cid{a}\}}\tab{1})$ \label{line:msat:rem2}\hspace{-5em} \vspace{-0.15em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\{\text{card}\leftarrow\text{card} + \text{card}'\}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{}{\bigwedge_{u\in\chi(t)}\cid{u}= \cid{u}'}} \rho_{\hspace{-0.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-0.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:msat:join2} % % % % % % % % % \hspace{-5em}% % \vspace{-0.75em} % } \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{MSat}(t,\chi(t),\mathcal{I}_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving~$\MSAT$.} \label{alg:msat} \end{algorithm}% Given Boolean formulas~$\varphi$ and $\psi$, an instance of problem~$\MSAT$ is of the form~$\mathcal{I}=(\varphi, \psi)$ and we assume that~$\mathcal{T}$ is a TD of primal graph~$G_{\varphi\cup\psi}$. A solution to~\MSAT is a satisfying assignment~$I$ of \emph{hard-clauses}~$\varphi$ such that~$\Card{\SB c\SM c\in \psi, c(I)=\emptyset \SE}$ is maximized, i.e., $I$ is a satisfying assignment of~$\varphi$ that satisfies the maximum number of \emph{soft-clauses}~$\psi$ among all satisfying assignments of~$\varphi$. % We define the local instance~$\mathcal{I}_t\ensuremath{\,\mathrel{\mathop:}=}(\varphi_t, \psi_t)$ consisting of local formula~$\varphi_t$, referred to by~$\emph{local hard-clauses}$ and local formula~$\psi_t$, called~$\emph{local soft-clauses}$. The table algorithm for problem~\MSAT is given in Algorithm~\ref{alg:msat}, where we use column~\emph{card} for holding satisfied soft-clauses. Leaf tables only hold a cardinality value of~$0$ as in Line~\ref{line:msat:leaf2}. Then, similar to the table algorithm~\algo{Sat'} (cf., Algorithm~\ref{alg:primdb}), when introducing a variable~$a$, we guess the truth value and keep those rows, where local formula~$\varphi_t$ is satisfied. Whenever a variable~$a$ is removed in a node~$t$, we remove column~$a$ and group rows that have common values over columns~$\chi(t)$. Thereby, the new cardinality~\emph{card} for each group is the maximum among the values of~\emph{card} including the number of satisfied local soft-clauses~$\psi'$ of the child node of~$t$ that are removed in~$\psi_t$ (due to removal of~$a$). Finally, similar to Algorithm~\ref{alg:vc}, a join node sums up cardinalities of two child rows containing the same assignment. \subsubsection*{Problem~\IDS} \begin{algorithm}[ht] \KwData{Node~$t$, bag $\chi(t)$, local graph~$G_t$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.\hspace{-5em}$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\{(\text{card}, 0)\}}$ \label{line:ids:leaf2}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % \hspace{-1em}$\tab{t}\ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\bigcup_{u\in \chi(t)}\{d_u \leftarrow \bigvee_{\{u,v\}\in E(G_t)} d_u \vee v, \text{card} \leftarrow \text{card}\}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{\bigwedge_{\{u,v\}\in E(G_t)} \neg u \vee \neg v}} \tuplecolor{orange!55!red}{\{\{(a, 0), (d_a, 0)\}, \{(a, 1), (d_a, 1)\}\}})\hspace{-10em}$ \label{line:ids:intr2} \vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% \hspace{-1em}$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)\cup\tuplecolor{orange!55!red}{\{d_u\mid u\in\chi(t)\}}}G}_{\tuplecolor{orange!55!red}{\text{card}\,\leftarrow\, \tab{}\mapsto\text{\ttfamily MIN}(\{r.\text{card} + r.a\mid r\in\tab{}\})}}(\Pi_{\attr(\tab{1})\setminus\{a,\tuplecolor{orange!55!red}{\cid{d_a}}\}} \sigma_{\tuplecolor{orange!55!red}{d_a}}\tab{1})$ \label{line:ids:rem2}\hspace{-5em} \vspace{-0.1em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \hspace{-1em}\makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{{\bigcup_{u\in\chi(t)}\{d_u \leftarrow d_u \vee d_u', \text{card} \leftarrow \text{card} + \text{card}'\}}}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{}{\bigwedge_{u\in\chi(t)}\cid{u}= \cid{u}'}} \rho_{\hspace{-0.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-0.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:ids:join2} % % % % % % % % % \hspace{-5em}% % \vspace{-0.75em} % } \Return $\tab{t}$ \vspace{-0.25em} \caption{Table algorithm~$\algo{IDS}(t,\chi(t),G_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ for solving~$\IDS$.} \label{alg:ids} \end{algorithm}% Given a graph instance~$\mathcal{I}=G=(V,E)$, a \emph{dominating set} of~$G$ is a set of vertices~$D\subseteq V$ of~$G$, where each vertex~$v\in V$ is either in~$D$ or is adjacent some vertex in~$D$,~i.e., there is a vertex~$d\in D$ with~$\{d,v\}\in E$. A dominating set~$D$ is an \emph{independent dominating set} of~$G$, if there is no edge in~$E$ between vertices of~$D$. Then, the problem \IDS asks to find the minimum cardinality~$\Card{D}$ among all independent dominating sets~$D$ of~$G$ (if exists). We define local instance by~$\IDS(t,G)\ensuremath{\,\mathrel{\mathop:}=} G_t$. The table algorithm for solving \IDS is given in Algorithm~\ref{alg:ids}, where a table~$\tab{t}$ of a node~$t$ uses column~\emph{card} for cardinalities of potential dominating sets, and an additional Boolean column~$d_u$ per bag vertex~$u\in\chi(t)$. Intuitively, $d_u$ indicates whether vertex~$u$ is already ``dominated'', i.e., either~$u$ is in the dominating set or~$u$ has an adjacent vertex to the dominating set. Similar to before, leaf nodes set cardinality \emph{card} to~$0$, cf., Line~\ref{line:ids:leaf2}. For a node~$t$ with an introduced vertex~$a$, we guess in Line~\ref{line:ids:intr2} whether~$a$ shall be in the dominating set or not (and set~$d_a$ to~$0$ or~$1$, respectively). Then, % we only keep rows that are independent, i.e., $a$ can not be in the dominating set and adjacent to~$u$ in edges~$E(G_t)$ of local graph~$G_t$ at the same time. Finally, % values~$d_u$ (dominance status) for~$a$ and for neighbors of~$a$ are updated accordingly. When a vertex~$a$ is removed in a node~$t$, Line~\ref{line:ids:rem2} only keeps rows, where~$d_a$ is true, i.e., $a$ is indeed dominated, and removes columns~$a,d_a$. Further, we group rows according to their values to~$\chi(t)\cup\{d_u\mid u\in\chi(t)\}$ and for each group we set the cardinality to the minimum among the cardinalities of the group rows (including~$a$ if~$a$ is in the set). For join nodes~$t$, Line~\ref{line:ids:join2} sums up cardinalities of rows holding the same dominating set and treats a vertex~$u\in\chi(t)$ as dominated if it is dominated in at least one of the two rows. \medskip Similar to \VC and \cTCOL one can model several other (graph) problems. One could also think of counting the number of solutions to problem \VC, where both a column for cardinalities and one for counting is used. There, in addition to grouping, we additionally could use conditions over groups where only rows are kept whose column values for \emph{card} form the minimum within the group. \subsection{Generalizing the Patterns of Table Algorithms} \renewcommand*{\algorithmcfname}{Algorithm} \renewcommand*{\algorithmcfname}{Algorithm} \begin{algorithm}[tb] \KwData{Node~$t$, bag $\chi(t)$, local instance~$\mathcal{I}_t$, and a sequence $\langle \tab{1},\ldots \tab{\ell}\rangle$ of child tables.} \KwResult{Table $\tab{t}.\hspace{-5em}$} \lIf(\hspace{-1em}) % {$\type(t) = \textit{leaf}$}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \tuplecolor{orange!55!red}{\#\mathsf{leafTab}\#}$ \label{line:leaf2}% }% \uElseIf{$\type(t) = \textit{intr}$, and $a\hspace{-0.1em}\in\hspace{-0.1em}\chi(t)$ is introduced}{ % $\tab{t}\ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\#\mathsf{intrAddCols}\#}}(\tab{1} \bowtie_{\tuplecolor{orange!55!red}{\#\mathsf{intrFilter}\#}} \tuplecolor{orange!55!red}{\#\mathsf{intrTab}\#})$ \label{line:intr2} \hspace{-5em}\vspace{-0.05em} % }\vspace{-0.05em}% % \uElseIf{$\type(t) = \textit{rem}$, and $a \not\in \chi(t)$ is removed}{% $\tab{t} \ensuremath{\,\mathrel{\mathop:}=} {_{\chi(t)\cup\tuplecolor{orange!55!red}{\#\mathsf{remGroupCols}\#}}G}_{\tuplecolor{orange!55!red}{\#\mathsf{remAggr}\#}}(\Pi_{\attr(\tab{1})\setminus\{a,\tuplecolor{orange!55!red}{\#\mathsf{remCols}\#}\}} \sigma_{\tuplecolor{orange!55!red}{\#\mathsf{remFilter}\#}}\tab{1})$ \label{line:rem2}\hspace{-5em} \vspace{-0.1em} % } % \uElseIf{$\type(t) = \textit{join}$}{% \makebox[3.3cm][l]{$\tab{t} \ensuremath{\,\mathrel{\mathop:}=} \dot\Pi_{\chi(t),\tuplecolor{orange!55!red}{\#\mathsf{joinAddCols}\#}}(\tab{1} \bowtie_{\bigwedge_{u\in\chi(t)}u=u' \wedge {\tuplecolor{orange!55!red}{\#\mathsf{joinAddFilter}\#}}} \rho_{\hspace{-0.75em}\bigcup\limits_{u\in \attr(\tab{2})}\hspace{-0.75em}\{\cid{u}\mapsto \cid{u}'\}}\tab{2})$} \label{line:join2} % % % % % % % % % \hspace{-75em}% % \vspace{-0.75em} % } \Return $\tab{t}$ \vspace{-0.25em} \caption{Template table algorithm~$\algo{A}(t,\chi(t),\mathcal{I}_t,\langle \tab{1}, \ldots, \tab{\ell}\rangle)$ % for solving problem~$\mathcal{P}$.} \label{alg:template} \end{algorithm}% \renewcommand*{\algorithmcfname}{Algorithm} In the previous sections, we presented the table algorithms for solving a selection of combinatorial problems, namely, \cSAT, \cTCOL, \VC, \MSAT, and \IDS, by dynamic programming. As mentioned in Section~\ref{sec:prelimns:tds}, there are a variety of application areas where such algorithms allow for solving problems efficiently. % When specifying most algorithms, we focus on the table algorithm~$\algo{A}$, which is executed for each node~$t$ of~$T$ of the considered tree decomposition~$\mathcal{T}=(T,\chi)$ and computes a new table depending on the previously computed tables at the children of~$t$. % % From the descriptions above, it is easy to see that the algorithms effectively follow standard patterns. % % Therefore, we present a general template in Algorithm~\ref{alg:template}, where parts of table algorithms for problems that are typically problem-specific are replaced by colored placeholders of the form~$\textcolor{orange!55!red}{\#\mathsf{placeHolder}\#}$, cf., \algorithmcfname~\ref{alg:primdb}. % The general template of table algorithms works for many problems, including decision problems, counting problems as well as optimization problems. The intuition behind these placeholders is as follows: % For leaf nodes, the initial table (typically empty) can be specified using~$\textcolor{orange!55!red}{\#\mathsf{leafTab}\#}$. For introduce nodes, the potential cases for the introduced vertex~$a$ are given with the help of~$\textcolor{orange!55!red}{\#\mathsf{intrTab}\#}$. Then, according to the local instance, we only keep those rows that satisfy~$\textcolor{orange!55!red}{\#\mathsf{intrFilter}\#}$. The placeholder~$\textcolor{orange!55!red}{\#\mathsf{intrAddCols}\#}$ allows to add additional columns, which we often need when solving problems that involve counting or optimizing a value. In other words, placeholder~$\textcolor{orange!55!red}{\#\mathsf{intrAddCols}\#}$ in Line~\ref{line:intr2} of Algorithm~\ref{alg:template} uses extended projection, which % is needed for problems requiring changes on vertex introduction. Nodes, where an atom~$a$ is removed sometimes require to filter rows, which do not lead to a solution using~$\textcolor{orange!55!red}{\#\mathsf{remFilter}\#}$, and to remove columns concerning~$a$ by~$\textcolor{orange!55!red}{\#\mathsf{remCols}\#}$. Further, one oftentimes needs to aggregate rows according to the values of the columns of the bag and additional columns (given by~$\textcolor{orange!55!red}{\#\mathsf{remGroupCols}\#}$), where the aggregation is specified by~$\textcolor{orange!55!red}{\#\mathsf{remAggr}\#}$. Finally, for join nodes, one can specify an additional filter~$\textcolor{orange!55!red}{\#\mathsf{joinAddFilter}\#}$ that goes beyond checking equivalence of row values in the $\theta$-join operation. Further, depending on the problem one might need to add and update the values of additional columns by using extended projection in form of placeholder~$\textcolor{orange!55!red}{\#\mathsf{joinAddCols}\#}$. Note that while the algorithms presented here assume for simplicity nice tree decompositions, the whole architecture does not depend on certain restrictions of TDs, or whether it is nice or not. Instead, a table algorithm of any TD is simply specified by handling \emph{problem-specific} implementations of the placeholders of Algorithm~\ref{alg:template}, where the system following this architecture is responsible for interleaving and overlapping these cases within a node~$t$. In fact, we discuss an implementation of a system according to this architecture next, where it is crucial to implement non-nice TDs to obtain higher efficiency. \section{System~\protect{\small\textsf{dpdb}}\xspace: Dynamic Programming with Databases \& SQL} In this section, we present a general architecture to model table algorithms by means of database management systems. We move from relational algebra definitions to specifications of the table algorithms in terms of SQL queries. The overall architecture is follows the DP approach as presented in Section~\ref{sec:dp}. It works as depicted in Figure~\ref{fig:arch} where the steps highlighted in yellow and blue need to be specified depending on the problem~$\mathcal{P}$. Steps outside Step~3 are mainly setup tasks, the yellow ``E''s indicate \emph{events} that might be needed to solve more complex problems on the polynomial hierarchy. For example, one could create and drop auxiliary sub-tables for each node during Step~3 within such events. Observe that after the generation of a TD~$\mathcal{T}=(T,\chi)$, Step~2b automatically creates tables~$\tab{t}$ for each node~$t$ of~$T$, where the corresponding table columns of~$\tab{t}$ are specified in the blue part, i.e., within~$\algo{A}$. The \emph{default columns} of such a table~$\tab{t}$ that are assumed in this section foresee one column for each element of the bag~$\chi(t)$, where additional columns that are needed for solving the problem can be added. This includes additional auxiliary columns, which can be also counters or costs for counting or optimization, respectively. Besides the definition of table schemes, the blue part concerns the specification of the table algorithm by means of a procedural \emph{generator template} that describes how to obtain SQL code % for each node~$t$, thereby depending on~$\chi(t)$ and on the tables for child nodes of~$t$. This generated SQL code is then used internally for manipulation of tables~$\tab{t}$ during the tree decomposition traversal in Step~3 of dynamic programming. \begin{figure*}[t]% \centering% {\noindent\includegraphics[scale=0.9]{1-figs/figure.pdf}}% \caption{Architecture of Dynamic Programming with Databases. Steps highlighted in red are provided by the system depending on the specification of yellow and blue parts, which is given by the user for specific problems~$\mathcal{P}$. The yellow ``E''s represent events that can be intercepted and handled by the user. The blue part concentrates on table algorithm~$\algo{A}$, where the user specifies how SQL code~is~generated in a modular~way.} \label{fig:arch} \end{figure*} We implemented the proposed architecture of the previous section in the prototypical system {\small\textsf{dpdb}}\xspace. The system is open-source\footnote{Our system~{\small\textsf{dpdb}}\xspace is available under GPL3 license at~\href{https://github.com/hmarkus/dp_on_dbs/releases/tag/1.1}{\nolinkurl{github.com/hmarkus/dp_on_dbs}}.}, written in Python 3, and uses PostgreSQL as DBMS. We are certain that one can easily replace PostgreSQL by any other state-of-the-art relational database that uses SQL. In the following, we discuss implementation specifics that are crucial for a performant system that is still extendable and flexible. \paragraph*{Computing TDs.} TDs are computed mainly with the library \emph{htd} version~1.2 with default settings~\cite{AbseherMusliuWoltran17a}, % which finds TDs extremely quick also for interesting instances~\cite{FichteHecherZisser19a} due to heuristics. Note that {\small\textsf{dpdb}}\xspace directly supports the TD format of recent competitions~\cite{DellKomusiewiczTalmon18a}, i.e., one could easily replace the TD library. It is important not to enforce htd to compute nice TDs, as this would cause a lot of overhead later in {\small\textsf{dpdb}}\xspace for copying tables. However, in order to benefit from the implementation of $\theta$-joins, query optimization, and state-of-the-art database technology in general, we observed that it is crucial to limit the number of child nodes of every TD node. In result, when huge tables are involved, $\theta$-joins among child node tables cover at most a limited number of child node tables. Hence, the query optimizer of the database system can still come up with meaningful execution plans depending on the contents of the table. Nonetheless we prefer $\theta$-joins with more than just two tables, since binary $\theta$-joins already fix in which order these tables shall be combined, which already limits the query optimizer. Apart from this trade-off, we tried to outsource the task of joining tables to the DBMS, % since the performance of database systems highly depends on query optimization. % The actual limit, which is a restriction from experience and practice only, highly depends on the DBMS that is used. For PostgreSQL, we set a limit of at most~$5$ child nodes for each node of the TD,~i.e., each $\theta$-join covers at most 5 child tables. \paragraph*{Towards non-nice TDs.} Although this paper presents the algorithms for nice TDs (mainly due to simplicity), the system {\small\textsf{dpdb}}\xspace interleaves these cases as presented in \algorithmcfname~\ref{alg:template}. More precisely, the system executes one query per table~$\tab{t}$ for each node~$t$ during the traversal of TD~$\mathcal{T}$. This query consists of several parts and we briefly explain its parts from outside to inside in accordance with \algorithmcfname~\ref{alg:template}. First of all, the inner-most part concerns the \emph{row candidates} for~$\tab{t}$ consisting of the $\theta$-join among all child tables of~$\tab{t}$ as in Line~\ref{line:join} of \algorithmcfname~\ref{alg:template}. If there is no child node of~$t$, table $\tuplecolor{orange!55!red}{\#\mathsf{leafTab}\#}$ of Line~\ref{line:leaf} is used instead. Next, the result is cross-joined with $\tuplecolor{orange!55!red}{\#\mathsf{intrTab}\#}$ for each introduced variable as in Line~\ref{line:intr}, but without using the filter~$\tuplecolor{orange!55!red}{\#\mathsf{intrFilter}\#}$ yet. Then, the result is projected by using extended projection involving~$\chi(t)$ as well as both~$\tuplecolor{orange!55!red}{\#\mathsf{joinAddCols}\#}$ and~$\tuplecolor{orange!55!red}{\#\mathsf{intrAddCols}\#}$. Actually, there are different configurations of how {\small\textsf{dpdb}}\xspace can deal with the resulting row candidates. For debugging (see below) one could (1) actually materialize the result in a table, whereas for performance reasons, one should use (2) \emph{common table expressions (CTEs or {\ttfamily WITH}-queries)} or (3) \emph{sub-queries (nested queries)}, which both result in one nested SQL query per table~$\tab{t}$. On top of these row candidates, selection according to~$\tuplecolor{orange!55!red}{\#\mathsf{intrFilter}\#}$, cf., Line~\ref{line:intr}, is executed. Finally, the resulting table is plugged as table $\tab{1}$ into Line~\ref{line:rem}, where in particular the result is grouped by using both~$\chi(t)$\footnote{Actually, {\small\textsf{dpdb}}\xspace keeps only columns relevant for the table of the parent node of~$t$.} and~$\tuplecolor{orange!55!red}{\#\mathsf{remGroupCols}\#}$ and each group is aggregated by~$\tuplecolor{orange!55!red}{\#\mathsf{remAggr}\#}$ accordingly. It turns out that PostgreSQL can do better with sub-queries than CTEs, since we observed that the query optimizer oftentimes pushes (parts of) outer selections and projections into the sub-query if needed, which is not the case for CTEs, as discussed in the PostgreSQL manual~\cite[Sec. 7.8.1]{postgres}. On different DBMSs or other vendors, e.g., Oracle, it might be better to use CTEs instead. \begin{example}\label{ex:dbviews} Consider again Example~\ref{ex:running0} and Figure~\ref{fig:graph-td} and let us use table algorithm~$\mathsf{Sat'}$ with {\small\textsf{dpdb}}\xspace on formula~$\varphi$ of TD~$\mathcal{T}$ and Option (3): sub-queries, where the row candidates are expressed via a sub-queries. Then, for each node~$t_i$ of~$\mathcal{T}$, {\small\textsf{dpdb}}\xspace generates a view~$vi$ as well as a table~$\tab{i}$ containing in the end the content of~$vi$. Observe that each view only has one column~$\cid{a}$ for each variable~$a$ of~$\varphi$ since the truth assignments of the other variables are not needed later. This keeps the tables compact, only $\tab{1}$ has two rows, $\tab{2}$, and $\tab{3}$ have only one row. We obtain the following views. \begin{alltt}\small CREATE VIEW v1 AS SELECT a, sum(cnt) AS cnt FROM (WITH intrTab AS (SELECT 0 AS val UNION ALL SELECT 1) SELECT i1.val AS a, i2.val AS b, i3.val AS c, 1 AS cnt FROM intrTab i1, intrTab i2, intrTab i3) WHERE (NOT a OR b OR c) AND (a OR NOT b OR NOT c) GROUP BY a CREATE VIEW v2 AS SELECT a, sum(cnt) AS cnt FROM (WITH intrTab AS (SELECT 0 AS val UNION ALL SELECT 1) SELECT i1.val AS a, i2.val AS d, 1 AS cnt FROM intrTab i1, intrTab i2) WHERE (a OR d) AND (a OR NOT d) GROUP BY a CREATE VIEW v3 AS SELECT a, sum(cnt) AS cnt FROM (SELECT \ensuremath{\tab{1}}.a, \ensuremath{\tab{1}}.cnt * \ensuremath{\tab{2}}.cnt AS cnt FROM \ensuremath{\tab{1}}, \ensuremath{\tab{2}} WHERE \ensuremath{\tab{1}}.a = \ensuremath{\tab{2}}.a) GROUP BY a\end{alltt}% \end{example}% \paragraph*{Parallelization.} A further reason to not over-restrict the number of child nodes within the TD, lies in parallelization. In {\small\textsf{dpdb}}\xspace, we compute tables in parallel along the TD, where multiple tables can be computed at the same time, as long as the child tables are computed. Therefore, we tried to keep the number of child nodes in the TD as high as possible. In our system {\small\textsf{dpdb}}\xspace, we currently allow for at most 24 worker threads for table computations and 24 database connections at the same time (both pooled and configurable). On top of that we have 2 additional threads and database connections for job assignments to workers, as well as one dedicated watcher thread for clean-up and connection termination, respectively. \paragraph*{Logging, Debugging and Extensions.} Currently, we have two versions of the {\small\textsf{dpdb}}\xspace system implemented. One version aims for performance and the other one tries to achieve comprehensive logging and easy debugging of problem (instances), thereby increasing explainability. The former does neither keep intermediate results nor create database tables in advance (Step 2b), as depicted in Figure~\ref{fig:arch}, but creates tables according to an SQL {\ttfamily SELECT} statement. In the latter, we keep all intermediate results, we record database timestamps before and after certain nodes, provide statistics as,~e.g., width and number of rows. Further, since for each table~$\tab{t}$, exactly one SQL statement is executed for filling this table, we also have a dedicated view of the SQL {\ttfamily SELECT} statement, whose result is then inserted in~$\tab{t}$. Together with the power and flexibility of SQL queries, we observed that this helps in finding errors in the table algorithm specifications. Besides convient debugging, system {\small\textsf{dpdb}}\xspace immediately contains an extension for \emph{approximation}. There, we restrict the table contents to a maximum number of rows. This allows for certain approximations on counting problems or optimization problems, where it is infeasible to compute the full tables. Further, {\small\textsf{dpdb}}\xspace foresees a dedicated \emph{randomization} on these restricted number of rows such that we obtain different approximate results on different random seeds. Note that {\small\textsf{dpdb}}\xspace can be easily extended. Each problem can overwrite existing default behavior and {\small\textsf{dpdb}}\xspace also supports problem-specific argument parsers for each problem individually. Out-of-the-box, we support the formats DIMACS SAT and DIMACS graph~\cite{LiuZhongJiao06} as well as the common format for TDs~\cite{DellKomusiewiczTalmon18a}. \subsection*{Implementing table algorithms with~\protect{\small\textsf{dpdb}}\xspace for selected problems} The system {\small\textsf{dpdb}}\xspace allows for \emph{easy prototyping} of DP algorithms on TDs. In the following, we present the relevant parts of table algorithm implementations according to the template in \algorithmcfname~\ref{alg:template} for our selection of problems below\footnote{Prototypical implementations for problems~\cSAT as well as~\VC are readily available in~{\small\textsf{dpdb}}\xspace.}. More precisely, we give the SQL implementations of the table algorithms of the previous section in form of specifying the corresponding placeholders as given by the template algorithm~$\algo{A}$. Thereby, we only specify the placeholders needed for solving the problems,~i.e., placeholders of template algorithm~$\algo{A}$ that are not used (empty) are left out. To this end, we assume in this section for each problem a not necessarily nice TD~$\mathcal{T}=(T,\chi)$ of the corresponding graph representation of our given instance~$\mathcal{I}$, as well as any node~$t$ of~$T$ and its child nodes~$t_1, \ldots, t_\ell$. \paragraph*{Problem~$\cSAT$.} Given instance formula~$\mathcal{I}=\varphi$. Then, the specific placeholders of the template for~$\cSAT$ for a node~$t$ with $\varphi_t = \{\{l_{1,1},\ldots,l_{1,k_1}\}, \ldots, \{l_{n,1},\ldots,l_{n,k_n}\}\}$ that are required for {\small\textsf{dpdb}}\xspace to solve the problem are as follows. \begin{itemize} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{leafTab}\#$}:}{\ttfamily SELECT 1 AS cnt} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrTab}\#$}:}{\ttfamily SELECT 0 AS val UNION ALL SELECT 1} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$}:}{\ttfamily $(l_{1,1}$ OR $\ldots$ OR $l_{1,k_1})$ AND $\ldots$ AND $(l_{n,1}$ OR $\ldots$ OR $l_{n,k_n})$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remAggr}\#$}:}{\ttfamily SUM(cnt) AS cnt} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{joinAddCols}\#$}:}{\ttfamily \tab{1}.cnt * $\ldots$ * $\tab{\ell}$.cnt AS cnt } \end{itemize} If one compares this specification to Algorithm~\ref{alg:primdb}, one sees that conceptually the same idea is given above. However, for efficiency {\small\textsf{dpdb}}\xspace does not rely on nice TDs. Observe that for the plain decision problem~$\SAT$, where the goal is to decide only the existence of a satisfying assignment for given formula~$\varphi$, placeholder $\tuplecolor{orange!55!red}{\#\mathsf{leafTab}\#}$ would need to return the empty table and parts $\tuplecolor{orange!55!red}{\#\mathsf{remAggr}\#}$ and $\tuplecolor{orange!55!red}{\#\mathsf{joinAddCols}\#}$ are just empty since no counter~\emph{cnt} is needed. \paragraph*{Problem~$\cTCOL$.} Recall the problem~$\cTCOL$ and Algorithm~\ref{alg:col}. Let~$\mathcal{I}=G=(V,E)$ be a given input graph. Then, specific implementation parts for~$\cTCOL$ for a node~$t$ with~$E(G_t)=\{\{u_1,v_1\},\ldots,$ $\{u_n,v_n\}\}$ is given as follows. \begin{itemize} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{leafTab}\#$}:}{\ttfamily SELECT 1 AS cnt} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrTab}\#$}:}{\ttfamily SELECT 0 AS val UNION ALL $\ldots$ UNION ALL SELECT $o$} % \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$}:}{\ttfamily NOT $(\cid{u_1}=\cid{v_1})$ AND $\ldots$ AND NOT $(\cid{u_n}=\cid{v_n})$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remAggr}\#$}:}{\ttfamily SUM(cnt) AS cnt} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{joinAddCols}\#$}:}{\ttfamily $\tab{1}$.cnt * $\ldots$ * $\tab{\ell}$.cnt AS cnt } \end{itemize} \paragraph*{Problem~\VC.} Given any input graph~$\mathcal{I}=G=(V,E)$ of \VC. Then, problem $\VC$ for a node~$t$ with~$E(G_t)=\{\{u_1,v_1\},\ldots, \{u_n,v_n\}\}$ and removed vertices~$\chi(t)\setminus(\chi(t_1) \cup \ldots \cup \chi(t_\ell))=\{r_1,\ldots,r_{m}\}$ is specified by the following placeholders (cf., Algorithm~\ref{alg:vc}). \begin{itemize} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{leafTab}\#$}:}{\ttfamily SELECT 0 AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrTab}\#$}:}{\ttfamily SELECT 0 AS val UNION ALL SELECT 1} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$}:}{\ttfamily $(\cid{u_1}$ OR $\cid{v_1})$ AND $\ldots$ AND $(\cid{u_n}$ OR $\cid{v_n})$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remAggr}\#$}:}{\ttfamily MIN(card + $r_1$ + $\ldots$ + $r_m$) AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{joinAddCols}\#$}:}{\ttfamily $\tab{1}$.card + $\ldots$ + $\tab{\ell}$.card AS card}% % % % % \end{itemize} \paragraph*{Problem~\MSAT.} Given an instance~$\mathcal{I}=(\varphi, \psi)$ of problem~$\MSAT$. Then, the problem for a node~$t$ with local hard clauses~$\varphi_t = \{\{l_{1,1},\ldots,l_{1,k_1}\}, \ldots, \{l_{n,1},\ldots,l_{n,k_n}\}\}$ and local soft clauses~$\psi_t = \{\{l'_{1,1},\ldots,l'_{1,k'_1}\}, \ldots, \{l'_{p,1},\ldots,l_{p,k'_p}\}\}$ is specified by the following placeholders (cf., Algorithm~\ref{alg:msat}). \begin{itemize} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{leafTab}\#$}:}{\ttfamily SELECT 0 AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrTab}\#$}:}{\ttfamily SELECT 0 AS val UNION ALL SELECT 1} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$}:}{\ttfamily $(l_{1,1}$ OR $\ldots$ OR $l_{1,k_1})$ AND $\ldots$ AND $(l_{n,1}$ OR $\ldots$ OR $l_{n,k_n})$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remAggr}\#$}:}{\ttfamily MIN(card + $(l'_{1,1}$ OR $\ldots$ OR $l'_{1,k'_1})$ + $\ldots$ + }% \item[] \makebox[14em][l]{}{\ttfamily $(l'_{p,1}$ OR $\ldots$ OR $l'_{p,k'_p})$) AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{joinAddCols}\#$}:}{\ttfamily $\tab{1}$.card + $\ldots$ + $\tab{\ell}$.card AS card} % % \end{itemize} \paragraph*{Problem~\IDS.} Recall an instance~$\mathcal{I}=G=(V,E)$ of problem~$\IDS$ and table algorithm~$\algo{IDS}$ as given in Algorithm~\ref{alg:ids}. The implementation of table algorithm~$\algo{IDS}$ for~$\IDS$ for a node~$t$ assumes that~$E(G_t)=\{\{u_1,v_1\},\ldots,$ $\{u_n,v_n\}\}$. Further, we let bag~$\chi(t)=\{a_1,\ldots,a_k\}$, removed vertices~$\chi(t)\setminus(\chi(t_1) \cup \ldots \cup \chi(t_\ell))=\{r_1,\ldots,r_{m}\}$, and we let the~$w_i$ many neighbors~$N_i$ of each vertex~$a_i$ in~$G$ (with $1\leq i\leq k$) be given by~$N_i=\{e_{a_i,1}, \ldots, e_{a_i,w_i}\}$. Then, the SQL implementation can be specified as follows. \begin{itemize} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{leafTab}\#$}:}{\ttfamily SELECT 0 AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrTab}\#$}:}{\ttfamily SELECT 0 AS val, 0 AS d UNION ALL SELECT 1, 1} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$}:}{\ttfamily $($NOT $\cid{u_1}$ OR NOT $\cid{v_1})$ AND $\ldots$ AND $($NOT $\cid{u_n}$ OR NOT $\cid{v_n})$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{intrAddCols}\#$}:}{\ttfamily card, $d_{a_1}$ OR $e_{a_1,1}$ OR $\ldots$ OR $e_{a_1,w_1}$ AS $d_{a_1}$, $\ldots$} % \item[]\makebox[11.5em][l]{}{\ttfamily $d_{a_k}$ OR $e_{a_k,1}$ OR $\ldots$ OR $e_{a_k,w_k}$ AS $d_{a_k}$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remFilter}\#$}:}{\ttfamily $d_{a_1}$ AND $\ldots$ AND $d_{a_k}$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remAggr}\#$}:}{\ttfamily MIN(card + $r_1$ + $\ldots$ + $r_m$) AS card} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{remGroupCols}\#$}:}{\ttfamily $d_{a_1}$, $\ldots$, $d_{a_k}$} \item\makebox[8.25em][l]{\tuplecolor{orange!55!red}{$\#\mathsf{joinAddCols}\#$}:}{\ttfamily $\tab{1}$.card + $\ldots$ + $\tab{\ell}$.card AS card,}% % \item[]\makebox[8.25em][l]{}{\ttfamily $\tab{1}$.$d_{a_1}$ OR $\ldots$ OR $\tab{\ell}$.$d_{a_1}$ AS $d_{a_1}$, $\ldots$} \item[]\makebox[8.25em][l]{}{\ttfamily $\tab{1}$.$d_{a_k}$ OR $\ldots$ OR $\tab{\ell}$.$d_{a_k}$ AS $d_{a_k}$} % % \end{itemize} Note that implementations could generate and apply parts of this specification, as for example in \tuplecolor{orange!55!red}{$\#\mathsf{intrFilter}\#$} only edges that have not been checked so far in any descending node, need to be checked. % Similar to \VC, \cTCOL, % and \IDS one can model several related (graph) problems. One could also think of counting the number of solutions to problem \MSAT, where both, a column for cardinalities and one for counting is used. There, in addition to grouping with {\ttfamily GROUP BY} in {\small\textsf{dpdb}}\xspace, we additionally use the {\ttfamily HAVING} construct of SQL, where only rows are kept, whose column {\ttfamily card} is minimal. % % % % % \section{Experiments} \label{sec:experiments} We conducted a series of experiments using publicly available benchmark sets for~\cSAT. Our tested benchmarks~\cite{FichteEtAl18b} are publicly available and our results are also on github at \href{https://github.com/hmarkus/dp_on_dbs/tree/tplp}{\nolinkurl{github.com/hmarkus/dp_on_dbs/tplp}}. \subsection{Setup} \paragraph{Measure \& Resources.} We mainly compare wall clock time and number of timeouts. In the time we include \emph{preprocessing time} as well as \emph{decomposition time} for computing a % TD with a fixed random seed. % For parallel solvers we allowed access to 24 physical cores on machines. % We set a timeout of 900 seconds and limited available RAM to~14 GB per instance and solver. However, since our solver {\small\textsf{dpdb}}\xspace is a solver using multiple threads, we restricted the results of {\small\textsf{dpdb}}\xspace to a total of 900 seconds of CPU time. While allowing for all the other (parallel) solvers more than 900 seconds of CPU time. For {\small\textsf{dpdb}}\xspace, we only allowed 900 seconds of CPU time, but at the same time restricted to 900 seconds wall clock time. \paragraph{Benchmark Instances.} We considered a selection of overall 1494 instances from various publicly available benchmark sets~\cSAT consisting of % \instances{fre/meel} benchmarks\footnote{See: \href{http://tinyurl.com/countingbenchmarks}{\nolinkurl{tinyurl.com/countingbenchmarks}}}(1480 instances), % and \instances{c2d} benchmarks\footnote{See: \href{http://reasoning.cs.ucla.edu/c2d/results.html}{\nolinkurl{reasoning.cs.ucla.edu/c2d}}} (14 instances). We preprocessed the instances by the \cSAT preprocessor \emph{pmc}~\cite{LagniezMarquis14a}, similar to results of recent work on~\cSAT~\cite{FichteHecherZisser19a}, where it was also shown that more than 80\% of the \cSAT instances have primal treewidth below~19 after preprocessing. For preprocessing with \emph{pmc} we used the recommended options \texttt{-vivification -eliminateLit -litImplied -iterate=10 -equiv -orGate -affine}, which ensures that model counts are preserved. \paragraph{Benchmarked system \protect{\small\textsf{dpdb}}\xspace.} We used PostgreSQL 12 for our system~{\small\textsf{dpdb}}\xspace on a tmpfs-ramdisk (/tmp) that could grow up to at most 1 GB per run. To ensure comparability with previous results~\cite{FichteEtAl20}, where we had employed PostgreSQL 9.5 for our system~{\small\textsf{dpdb}}\xspace, we also considered the configuration~{\small\textsf{dpdb pg9}}\xspace that uses the preinstalled database system PostgreSQL 9.5 without any ramdisk at all (plain hard disk). However, we observed major performance increases of {\small\textsf{dpdb}}\xspace compared to {\small\textsf{dpdb pg9}}\xspace. We allow parallel execution for the database management system PostgreSQL with access to all cores of the benchmarking system. However, we restrict the total CPU time to ensure that we do not bias system resources towards dpdb. % % \paragraph{Other benchmarked systems.} In our experimental work, we present results for the most recent versions of publicly available \cSAT solvers, namely, \href{http://reasoning.cs.ucla.edu/c2d/download.php}{\textit{c2d}~2.20}~\cite{Darwiche04a}, \href{http://www.cril.univ-artois.fr/KC/d4.html}{\textit{d4}~1.0}~\cite{LagniezMarquis17a}, \href{https://bitbucket.org/haz/dsharp}{\textit{DSHARP}~1.0}~\cite{MuiseEtAl12a}, \href{http://reasoning.cs.ucla.edu/minic2d/}{\textit{miniC2D}~1.0.0}~\cite{OztokDarwiche15a}, \href{http://www.cril.univ-artois.fr/KC/eadt.html}{\textit{cnf2eadt}~1.0}~\cite{KoricheLagniezMarquisThomas13a}, \href{http://www.sd.is.uec.ac.jp/toda/code/cnf2obdd.html}{\textit{bdd\_{}minisat}~1.0.2}~\cite{TodaSoh15a}, and \href{http://reasoning.cs.ucla.edu/sdd/}{\textit{sdd}~2.0}~\cite{Darwiche11a}, which are all based on % knowledge compilation techniques. \begin{figure}[t] % % \centering \resizebox{1\columnwidth}{!}{\includegraphics{1-figs/plot_pmc.pdf}} % % % % % % % \caption{Runtime for the top 15 solvers over {all}~\cSAT instances. % % % The x-axis refers to the number of instances and the y-axis depicts the runtime sorted in ascending order for each solver individually.} \label{fig:runtime} \end{figure} We also considered rather recent approximate solvers \href{https://bitbucket.org/kuldeepmeel/approxmc}{\textit{ApproxMC2}, \textit{ApproxMC3}}~\cite{ChakrabortyEtAl14a}, {\href{https://github.com/meelgroup/ganak}{\textit{ganak}}}~\cite{SharmaEtAl19}, and \href{http://cs.stanford.edu/~ermon/code/STS.zip}{\textit{sts}~1.0}~\cite{ErmonGomesSelman12a}, as well as % CDCL-based solvers \href{https://www.cs.rochester.edu/u/kautz/Cachet/cachet-wmc-1-21.zip}{\textit{Cachet}~1.21}~\cite{SangEtAl04}, \href{http://tools.computational-logic.org/content/sharpCDCL.php}{\textit{sharpCDCL}}\footnote{See: \href{http://tools.computational-logic. org/content/sharpCDCL.php}{\nolinkurl{tools.computational-logic. org}}}, % and \href{https://sites.google.com/site/marcthurley/sharpsat}{\textit{sharpSAT}~13.02}~\cite{Thurley06a}. Finally, we also included multi-core solvers \href{https://github.com/daajoe/GPUSAT/releases/tag/v0.815-pre}{\textit{gpusat}~1.0 and \textit{gpusat}~2.0}~\cite{FichteEtAl18c,FichteHecherZisser19a}, which both are based on dynamic programming, as well as \textit{countAntom}~1.0~\cite{BurchardSchubertBecker15a} on 12 physical CPU cores, which performed better than on 24 cores. Experiments were conducted with default~solver~options. Note that we excluded distributed solvers such as dCountAntom~\cite{BurchardSchubertBecker16a} and DMC~\cite{LagniezMarquisSzczepanski18a} from our experimental setup. Both solvers require a cluster with access to the Open-MPI framework~\cite{GabrielFaggBosilca04} and fast physical interconnections. Unfortunately, we do not have access to OpenMPI on our cluster. Nonetheless, our focus are shared-memory systems and since dpdb might well be used in a distributed setting, it leaves an experimental comparison between distributed solvers that also include dpdb as subsolver to future work. \paragraph{Benchmark Hardware.} Almost all solvers were executed on a cluster of 12 nodes. Each node is equipped with two Intel Xeon E5-2650 CPUs consisting of 12 physical cores each at 2.2 GHz clock speed, 256 GB RAM and 1 TB hard disc drives (\emph{not} an SSD) Seagate ST1000NM0033. % The results were gathered on Ubuntu~16.04.1 LTS machines with disabled hyperthreading on kernel~4.4.0-139. % As we also took into account solvers using a GPU, for~{{gpusat1}}\xspace and~{{gpusat2}}\xspace we used a machine equipped with a consumer GPU: Intel Core i3-3245 CPU operating at 3.4 GHz, 16 GB RAM, and one Sapphire Pulse ITX Radeon RX 570 GPU running at 1.24 GHz with 32 compute units, 2048 shader units, and 4GB VRAM using driver amdgpu-pro-18.30-641594 and OpenCL~1.2. The system operated on Ubuntu~18.04.1 LTS with kernel 4.15.0-34. \newcommand{\inacc}[1]{\ensuremath{\diamond{}}#1} \begin{table}[tb] \centering \resizebox{1\columnwidth}{!}{% \includegraphics{1-figs/runtime.pdf} } \caption{% Number of solved~\cSAT instances, preprocessed by pmc and grouped by intervals of upper bounds of the treewidth. time[h] is the cumulated wall clock time in hours, where unsolved instances are counted as 900 seconds. }% \label{tab:sat:merged} \end{table}% \subsection{Results} % Figure~\ref{fig:runtime} illustrates the top 15 solvers, where instances are preprocessed by pmc, % in a cactus-like plot, which provides an overview over all the benchmarked~\cSAT instances. The x-axis of these plots refers to the number of instances and the y-axis depicts the runtime sorted in ascending order for each solver individually. Overall, {\small\textsf{dpdb}}\xspace seems to be quite competitive and beats most of the solvers, as for example d4, countAntom, c2d, ganak, sharpSAT, dsharp, and approxmc. Interestingly, {\small\textsf{dpdb}}\xspace solves also instances, whose treewidth upper bounds are larger than~41. Surprisingly, {\small\textsf{dpdb pg9}}\xspace shows a different runtime behavior than the other solvers. We believe that the reason lies in an initial overhead caused by the creation of the tables that seems to depend on the number of nodes of the used TD. There, \emph{I/O operations} of writing from main memory to hard disk seem to kick in. This disadvantage is resolved if benchmarking {\small\textsf{dpdb}}\xspace on recent versions of PostgreSQL (version~12) and using tmpfs-ramdisks instead of plain hard disks. Table~\ref{tab:sat:merged} presents more detailed runtime results, showing a solid second place for {\small\textsf{dpdb}}\xspace as our system solves the vast majority of the instances. % Notably, it seems that the ganak solver is among the fastest on a lot of instances. We observed that ganak has the fastest runtime on 633 instances, when considering results of all~15 presented solvers. Assume we only have instances up to an upper bound\footnote{These upper bounds were obtained via decomposer htd in at most two seconds.} of treewidth~35. Then, if only instances with TDs up to width~50 are considered, {\small\textsf{dpdb}}\xspace solves about the same number of instances than miniC2D solves. % % % % % \section{Final Discussion \& Conclusions} We presented a generic system~{\small\textsf{dpdb}}\xspace for explicitly exploiting treewidth by means of dynamic programming on databases. The idea of~{\small\textsf{dpdb}}\xspace is to use database management systems (DBMSs) for table manipulation, which makes it (i)~easy and elegant to perform \emph{rapid prototyping} for problems with DP algorithms and (ii)~allows to leverage decades of database theory and database system tuning. It turned out that all the cases that occur in dynamic programming can be handled quite elegantly with plain SQL queries. Our system~{\small\textsf{dpdb}}\xspace can be used for both decision and counting problems, thereby also considering optimization. We see our system particularly well-suited for counting problems, especially, since it was shown that for model counting (\cSAT) instances of practical relevance typically have small treewidth~\cite{FichteHecherZisser19a}. In consequence, we carried out preliminary experiments on publicly available instances for~\cSAT, where we see competitive behavior compared to most recent solvers. \subsection*{Future Work} Our results give rise to several research questions. We want to push towards other database systems and vendors. For example, we expect major improvements in commercial database management systems due to the availability of efficient enterprise features. In particular, we expect in the DBMS Oracle that the behavior when we use different strategies on how to write and evaluate our SQL queries,~e.g., sub-queries compared to common table expressions. Currently, we do not create or use any indices, as preliminary tests showed that \emph{meaningful B*tree indices} are hard to create and creation is oftentimes too expensive. % Further, the exploration of bitmap indices, as available in Oracle \emph{enterprise DBMS} would be worth trying in our case (and for~\cSAT), since one can efficiently combine database columns by using extremely \emph{efficient bit operations}. It would also be interesting to investigate whether operating system features to handle memory access can be helpful~\cite{FichteMantheyStecklina20}. In addition, one might consider dpdb in the setting of distributed algorithms such as dCountAntom~\cite{BurchardSchubertBecker16a} and DMC~\cite{LagniezMarquisSzczepanski18a}. It might be worth to rigorously test and explore our extensions on limiting the number of rows per table for \emph{approximating} \cSAT or other counting problems, cf.,~\cite{ChakrabortyMeelVardi16a,MeelEtAl17a,SharmaEtAl19} and compare to the recent winners of the newly established model counting competition~\cite{FichteHecherHamiti20}. Recent results~\cite{HecherThierWoltran20} indicate that by using hybrid solving and abstractions our results can also be extended to projected model counting~\cite{FichteEtAl18d}. Another interesting research direction is to study whether efficient data representation techniques on DBMSs can be combined with dynamic programming in order to lift our solver to quantified Boolean formulas. It would also be interested to consider other measures such as (fractional) hypertree width~\cite{FichteHecherSzeider20,DzulfikarFichteHecher19} and investigate whether tree decompositions with additional properties~\cite{JegouTerrioux14} or other heuristics to compute tree decompositions improve solving~\cite{Strasser17}. Furthermore, interesting directions for future research would be to implement counting various problems in our framework, such as in constraint satisfaction~\cite{DurandMengel15,KhamisNgoRudra16}, constraint networks~\cite{JegouTerrioux14}, argumentation~\cite{FichteHecherMeier19}, description logics~\cite{FichteHecherMeier21}, or epistemic logic programming~\cite{HecherMorakWoltran20}. \section*{System and License} Our system~{\small\textsf{dpdb}}\xspace is available under GPL3 license at~\href{https://github.com/hmarkus/dp_on_dbs/releases/tag/1.1}{\nolinkurl{github.com/hmarkus/dp_on_dbs}}. \section*{Acknowledgements} Part of this work was done while Johannes K. Fichte was visiting the Simons Institute for the Theory of Computing. % Main work was carried out while he was a PostDoc at TU Dresden. % The work has been supported by the Austrian Science Fund (FWF), Grants Y698 and P32830, as well as the Vienna Science and Technology Fund, Grant WWTF ICT19-065. % % % Markus Hecher is also affiliated with the University of Potsdam, Germany. % \bibliographystyle{acmtrans}
\section*{Introduction} In this paper, we consider the edge ideals whose minimal free resolution has relatively large number of linear steps. Let $I$ be a graded ideal in the polynomial ring $S=\mathbb{K}[x_1,\ldots,x_n]$, where $\mathbb{K}$ is a field, generated by homogeneous polynomials of degree $d$. The ideal is called $r$-steps linear, if $I$ has a linear resolution up to the homological degree $r$, that is the graded Betti numbers $\beta_{i,i+j}(I)$ vanish for all $i\leq r$ and all $j>d$. The number \[ \mathrm{index}(I)=\inf\{r:\ \text{$I$ is not $r$-steps linear}\} \] is called the Green--Lazarsfeld index (or briefly index) of $I$. A related invariant, called the $N_{d,r}$-property, was first considered by Green and Lazarsfeld in \cite{GL1, GL2}. In the paper \cite{BC} the index was introduced for the quotient ring $S/I$, where $I$ is generated by quadratics, to be the largest integer $r$ such that the $N_{2,r}$-property holds. It is in general very hard to determine the value of the index. One reason is that this value, in general, depends on the characteristic of $\mathbb{K}$. The index of quadratic monomial ideals is more studied in the literature taking advantage of some combinatorial methods. Indeed, since the index is preserved passing through polarization, one may reduce to the case of squarefree quadratic monomial ideals which can be viewed as the edge ideals of simple graphs, and the index of these ideals is proved to be characteristic independent, see \cite[Theorem~2.1]{EGHP}. The main question regarding the study of the index of edge ideals is to classify the graphs with respect to the index of their edge ideals, in particular, it is more interesting to see when the index attains its largest or smallest value. In 1990, Fr\"oberg \cite{Fr} classified the graphs whose edge ideals have a linear resolution. A graded ideal $I$ is said to have a linear resolution if $\mathrm{index}(I)=\infty$. In fact Fr\"oberg showed that given a graph $G$, its edge ideal $I(G)$ has a linear resolution over all fields if and only if the complement $\bar{G}$ of $G$ is chordal, which means that all cycles in $\bar{G}$ of length $>3$ have a chord. In 2005, Eisenbud et al. \cite{EGHP} gave a purely combinatorial description of the index of edge ideals in terms of the size of the smallest cycle(s) of length $>3$ in the complementary graph, c.f. Theorem~\ref{index of graphs}. This result shows that the index gets its smallest value $1$ if and only if $G$ admits a gap, i.e. $\bar{G}$ contains an induced cycle of length $4$. If the index of $I$ attains the largest finite value, we have $\mathrm{index}(I)=\mathrm{pd}(I)$, where $\mathrm{pd}(I)$ denotes the projective dimension of $I$. In this case the ideal $I$ is said to have maximal finite index, see \cite{BHZ}. In \cite[Theorem~4.1]{BHZ}, it was shown that the edge ideal $I(G)$ has maximal finite index if and only if $\bar{G}$ is a cycle of length~$>3$. In this paper, we proceed one more step and consider the edge ideals $I(G)$ with $\mathrm{index}(I(G))=\mathrm{pd}(I(G))-1$. We call them edge ideals with almost maximal finite index. In Section~\ref{classify} of this paper we precisely determine the simple graphs whose edge ideals have this property, see Theorem~\ref{check-out}. These graphs are presented in Figures~\ref{type a}--\ref{type d}. In particular, it is deduced that the property of having almost maximal finite index is characteristic independent for edge ideals, though this is not the case for ideals generated in higher degrees, as discussed in the beginning of Section~\ref{classify}. It is also seen that the graded Betti numbers of these edge ideals do not depend on the characteristic of the base field. We will compute the Betti numbers in the non-linear strands in Proposition~\ref{Bettis of almost}. The main tool used throughout this section is Hochster's formula, Formula~(\ref{Hochster}). In the second half of the paper we study the index of powers of edge ideals with almost maximal finite index. Although, for arbitrary ideals, many properties such as depth, projective dimension or regularity stabilize for large powers (see e.g., \cite{Ba,Ch,Ca,Co, CHT,HH, HHZh1,HHZ1,HW}), their initial behaviour is often quite mysterious. However, edge ideals behave more controllable from the beginning. In the study of the index of powers of edge ideals, one of the main results is due to Herzog, Hibi and Zheng \cite[Theorem~3.2]{HHZh1}. They showed that for a graph $G$, all powers of the edge ideal $I(G)$ have a linear resolution if and only if so does $I(G)$. On the other hand, it was shown in \cite[Theorem~3.1]{BHZ} that all powers of $I(G)$ have index $1$ if and only if $I(G)$ has also index $1$. In the same paper it was proved that if $I(G)$ has maximal finite index~$>1$, then $I(G)^s$ has a linear resolution for all $s\geq 2$. This shows that chordality of the complement of $G$ is not a necessary condition on $G$ so that all high powers of its edge ideal have a linear resolution. Francisco, H\`a and Van~Tuyl proved, in a personal communication, that being gap-free is a necessary condition for a graph $G$ in order that a power of its edge ideal has a linear resolution (see also \cite[Proposition~1.8]{NP}). However, Nevo and Peeva showed, by an example, that being gap-free alone is not a sufficient condition so that all high powers of the edge ideal have a linear resolution \cite[Counterexample~1.10]{NP}. Later, Banerjee \cite{Ba}, and Erey \cite{Er, Er1} respectively proved that if a gap-free graph $G$ is also cricket-free or diamond-free or $C_4$-free, then the ideal $I(G)^s$ has a linear resolution for all $s\geq 2$. The definition of these concepts are recalled in Section~\ref{powers of almost maximal}. Section~\ref{powers of almost maximal} is devoted to answer the question whether the high powers of edge ideals with almost maximal finite index have a linear resolution. Not all graphs whose edge ideals have this property are cricket-free or diamond-free. However, using some formulas for an upper bound of the regularity of either powers of edge ideals or in general monomial ideals offered in \cite[Theorem~5.2]{Ba}, and \cite[Lemma~2.10]{DHS} respectively, we give a positive answer to this question in case the graphs are gap-free, see Theorem~\ref{powers}. We will prove this theorem in several parts, mainly in Theorem~\ref{main G_a3} and Theorem~\ref{I^k has lin res}. Theorem~\ref{powers} together with \cite[Theorem~4.1]{BHZ} yield the following consequence which is a partial generalization of the result of Herzog et al. in \cite[Theorem~3.2]{HHZh1}. \begin{thm}\label{bound} Let $G$ be a simple gap-free graph and let $I\subset S$ be its edge ideal. Suppose $\mathrm{pd}(I)\!-\!\mathrm{index}(I)\leq\!1$. Then $I^s$ has a linear resolution over all fields for any $s\geq 2$. \end{thm} One may ask which is the largest integer $c$ such that Theorem~\ref{bound} remains valid if one replaces $\mathrm{pd}(I) - \mathrm{index}(I) \leq 1$ by $\mathrm{pd}(I) - \mathrm{index}(I) \leq c$. Computation by {\em Macaulay~2}, \cite{M2}, shows that in the example of Nevo and Peeva \cite[Counterexample~1.10]{NP}, $\mathrm{index}(I)=2$, and $\mathrm{pd}(I)=8$. Hence $c$ must be an integer with $1\leq c\leq 5$. \subsection*{Acknowledgement} Research was supported by a grant from IPM. This work was initiated while the author was resident at MSRI during the Spring 2017 semester and supported by National Science Foundation under Grant No. DMS-1440140. Theorem~\ref{check-out} is a consequence of a question David Eisenbud asked the author. She would like to thank him for the invaluable discussions throughout her postdoctoral fellowship at MSRI. She also extends her gratitude to Rashid Zaare-Nahandi for his comments on this manuscript. Finally, the author would like to express her appreciation to the anonymous referee for the remarkable comments and useful suggestions which helped to improve the manuscript. \section{Preliminaries}\label{section 1} In this section we recall some concepts, definitions and results from Commutative Algebra and Combinatorics which will be used throughout the paper. Let $S=\mathbb{K}[x_1, \ldots, x_n]$ be the polynomial ring over a field $\mathbb{K}$ with $n$ variables, and let $M$ be a finitely generated graded $S$-module. Let the sequence $$ 0\to F_p\to\cdots \to F_2 \to F_1 \to F_0 \to M \to 0 $$ be the minimal graded free resolution of $M$, where for all $i \geq 0$ the modules $F_i = \oplus_j S(-j)^{\beta_{i,j}^{\mathbb{K}}(M)}$ are free $S$-modules of rank $\beta_{i}^{\mathbb{K}}(M):=\sum_{j}\beta_{i,j}^{\mathbb{K}}(M)$. The numbers $\beta_{i,j}^{\mathbb{K}}(M) = \dim_{\mathbb{K}} \mbox{Tor}^S_i(M, \mathbb{K})_j$ are called the \textit{graded Betti numbers} of $M$ and $\beta_i^{\mathbb{K}}(M)$ is called the $i$-th {\em Betti number} of $M$. We write $\beta_{i,j}(M)$ for $\beta_{i,j}^{\mathbb{K}}(M)$ when the field is fixed. The {\em projective dimension} of $M$, denoted by $\mathrm{pd}(M)$, is the largest $i$ for which $\beta_{i}(M)\neq 0$. The {\em Castelnuovo-Mumford regularity } of $M$, $\mathrm{reg}(M)$, is defined to be $$\mathrm{reg}(M)=\sup\{j-i:\ \beta_{i,j}(M)\neq 0\}.$$ Let $I$ be a graded ideal of $S$ generated in a single degree $d$. The {\em Green--Lazarsfeld index} (briefly index) of $I$, denoted by $\mathrm{index}(I)$, is defined to be $$\mathrm{index}(I)=\inf\{i:\ \beta_{i,j}(I)\neq 0,\ \text{for some } j>i+d\}.$$ Since $\beta_{0,j}(I)=0$ for all $j>d$, one always has $\mathrm{index}(I)\geq 1$. The ideal $I$ is said to have a {\em $d$-linear resolution} if $\mathrm{index}(I)=\infty$. This means that for all $i$, $\beta_{i}(I)=\beta_{i,i+d}(I)$, and this is the case if and only if $\mathrm{reg}(I)=d$. Otherwise $\mathrm{index}(I)\leq \mathrm{pd}(I)$. In case $I$ has the largest possible finite index, that is $\mathrm{index}(I)=\mathrm{pd}(I)$, $I$ is said to have {\em maximal finite index}. \medspace In Section~\ref{classify} of this paper we deal with squarefree monomial ideals generated in degree $2$. These ideals are the edge ideals of simple graphs. Recall that a {\em simple} graph is a graph with no loops and no multiple edges, and given a graph $G$ on the vertex set $[n]:=\{1,\ldots,n\}$, its edge ideal $I(G)\subset S$ is an ideal generated by all quadratics $x_ix_j$, where $\{i,j\}$ is an edge in $G$. We denote by $E(G)$ the set of all edges of $G$, and by $V(G)$ the vertex set of $G$. For a vertex $v\in V(G)$, the neighbourhood $N_G(v)$ of $v$ in $G$ is defined to be $$N_G(v)=\{u\in V(G):\ \{u,v\}\in E(G) \}.$$ The complement $\bar{G}$ of $G$ is a graph on $V(G)$ whose edges are those pairs of $V(G)$ which do not belong to $E(G)$. The simplicial complex $$\Delta(G)=\{F\subseteq V(G):\ \text{for all } \{i,j\}\subseteq F \text{ one has } \{i,j\} \in E(G)\}$$ is called the {\em flag complex} of $G$. The {\em{independence complex}} of $G$ is the flag complex of $\bar{G}$. One can check that $I(G)=I_{\Delta(\bar{G})}$, where $I_{\Delta(\bar{G})}$ is the Stanley-Reisner ideal of $\Delta(\bar{G})$. We assume that the reader is familiar with the definition and elementary properties of simplicial complexes. For more details consult with \cite{HHBook}. \medspace The main tool used widely in Section~\ref{classify} for the computation of the graded Betti numbers is Hochster's formula~\cite[Theorem~8.1.1]{HHBook}. Let $\Delta$ be a simplicial complex on $[n]$, and let $\tilde{C}(\Delta, \mathbb{K})$ be the augmented oriented chain complex of $\Delta$ over a field $\mathbb{K}$ with the differentials \begin{align*} &\quad\quad\quad\quad\quad\quad \partial_i: \bigoplus_{F\in\Delta\atop \dim F=i}\mathbb{K}F\to \bigoplus_{G\in\Delta\atop \dim G=i-1}\mathbb{K}G,\\ &\partial_i([v_0,\ldots,v_{i}])=\sum_{0\leq j\leq i}(-1)^{j}[v_0,v_1,\ldots, v_{j-1},v_{j+1}, \ldots, v_{i}], \end{align*} where by $[v_0,v_1,\ldots,v_{i}]$ we mean the face $\{v_0,v_1,\ldots,v_{i}\}\subseteq [n]$ of $\Delta$ with $v_0<v_1<\cdots<v_i$. Hochster's formula states that for the Stanley-Reisner ideal $I:=I_{\Delta}\subset S$ one has \begin{eqnarray}\label{Hochster} \beta_{i,j}(I)=\sum_{W\subseteq [n],\ |W|=j} \dim_\mathbb{K} \widetilde{H}_{j-i-2}(\Delta_W;\mathbb{K}), \end{eqnarray} where $\Delta_W$ is the induced subcomplex of $\Delta$ on $W$ and $\widetilde{H}_i(\Delta_W;\mathbb{K})$ is the $i$-th reduced homology of the complex $\widetilde{C}(\Delta_W, \mathbb{K})$. We denote by $\partial_i^W$ the differentials of the chain complex $\widetilde{C}(\Delta_W, \mathbb{K})$. \medspace Theorem~\ref{index of graphs} which is due to Eisenbud et al. \cite{EGHP} provides a combinatorial method for determining the index of the edge ideal of a graph. To this end, one needs to consider the length of the minimal cycles of the complementary graph. A minimal cycle is an induced cycle of length$>3$, and by an induced cycle we mean a cycle with no chord. The length of an induced cycle $C$ is denoted by $|C|$. \begin{thm}[{\cite[Theorem~2.1]{EGHP}}]\label{index of graphs} Let $I(G)$ be the edge ideal of a simple graph $G$. Then $$\mathrm{index}(I(G))=\inf\{|C|: \ C \text{ is a minimal cycle} \text{ in } \bar{G}\}-3.$$ \end{thm} \section{Edge ideals with almost maximal final index}\label{classify} A graded ideal $I\subset S$ is said to have {\em almost maximal finite index} over $\mathbb{K}$ if $\mathrm{index}(I)=\mathrm{pd}(I)-1$. Since, in general, $\mathrm{pd}(I)$ and $\mathrm{index}(I)$ depend on the characteristic of the base field, the property of having almost maximal finite index may also be characteristic dependent. For example, setting $\Delta$ to be a triangulation of a real projective plane, the Stanley-Reisner ideal of $\Delta$ is generated in degree $3$ and it has almost maximal finite index over all fields of characteristic $2$, while it has a linear resolution over other fields (cf. \cite[\S 5.3]{BHBook}). However, as we will see in Corollary~\ref{final note}, in the case of quadratic monomial ideals, having almost maximal finite index is characteristic independent. Note that, although by Theorem~\ref{index of graphs}, the index of an arbitrary edge ideal does not depend on the base field, its projective dimension may depend. M.~Katzman presents a graph in \cite[Section~4]{Ka} whose edge ideal has different projective dimensions over different fields. \medspace In this section, we give a classification of the graphs whose edge ideals have almost maximal finite index. We will present this classification in Theorem~\ref{check-out}, but before, we need some intermediate steps which give more insight about the complement of such graphs. Unless otherwise stated, throughout this section, $G$ is a simple graph on the vertex set $[n]$ and $\bar{G}$ is its complement, $\Delta$ denotes the independence complex $\Delta(\bar{G})$, and $\partial$, $\partial^W$ denote respectively the differentials of the augmented oriented chain complexes of $\Delta(\bar{G})$, $\Delta(\bar{G})_W$ over a fixed field $\mathbb{K}$. \medspace First, in order to avoid repetition of some arguments, we gather some facts which will be used frequently in the sequel in the following Observation. Meanwhile, we also fix some notation. \begin{remno}\label{connected induced graphs}\hfill\par\rm Let $G$ be a simple graph on the vertex set $[n]$ and let $I:=I(G)\subset S$ be its edge ideal. {\bf (O-1)} The graph $G$ is connected if and only if its flag complex $\Delta(G)$ is connected. On the other hand for an arbitrary simplicial complex $\Gamma$ and any field $\mathbb{K}$, $$\dim_\mathbb{K}\widetilde{H}_0(\Gamma;\mathbb{K})=(\text{Number of connected components of }\Gamma)-1,$$ see \cite[Problem~8.2]{HHBook}. Moreover, for any subset $W\subseteq [n]$ one has $\Delta(G_W)=\Delta(G)_W$, where $G_W$ is the induced subgraph of $G$ on the vertex set $W$. It follows that $G_W$ is connected if and only if $\widetilde{H}_0(\Delta(G)_W;\mathbb{K})=0$. Now if $\beta_{i,i+2}(I)=0$ for some $i$, then by Hochster's formula $\widetilde{H}_{0}(\Delta_W;\mathbb{K})=0$ and hence $\bar{G}_W$ is connected for all $W\subseteq [n]$ with $|W|=i+2$. \medskip {\bf (O-2)} Throughout, by $P=u_1-u_2-\cdots-u_r$ in $G$ we mean a path in $G$ on $r$ distinct vertices with the set of edges $\bigcup_{1\leq i\leq r-1}\{\{u_i,u_{i+1}\}\}$. If, in addition $\{u_1,u_r\}\in E(G)$, then $C=u_1-u_2-\cdots-u_{r}-u_1$ is a cycle in $G$. Then \begin{align}\label{cycle kernel} T(C):=(\sum_{1\leq i\leq r-1}[u_i,u_{i+1}])-[u_1,u_{r}]\in \ker \partial^{\Delta(G)}_1, \end{align} where $\partial^{\Delta(G)}$ denotes the differentials of the chain complex of $\Delta(G)$. It is shown in \cite[Theorem~3.2]{Co} that $\widetilde{H}_1(\Delta(G); \mathbb{K})\neq 0$ if and only if there exists a minimal cycle $C$ in $G$ such that $T(C)\notin \mathrm{Im\ } \partial_2^{\Delta(G)}$. Indeed, it is proved that $\widetilde{H}_1(\Delta(G); \mathbb{K})$ is minimally generated by the nonzero homology classes $T(C)+\mathrm{Im\ } \partial_2^{\Delta(G)}$, where $C$ is a minimal cycle in $G$. If $C$ is the base of a cone whose apex is the vertex $u_{r+1}$, then $$T(C)=\partial_{2}^{\Delta(G)}((\sum_{1\leq i\leq r-1}[u_{r+1},u_i,u_{i+1}])-[u_{r+1},u_1,u_{r}])$$ which implies that $T(C)+\mathrm{Im\ }\partial_2^{\Delta(G)}=0$. Recall that an $r$-gonal {\em cone} with the apex $a$ is a graph $G'$ with the vertex set $V(G')=V(C)\cup\{a\}$, where $a\notin V(C)$ and $C$ is an $r$-cycle in $G'$ which is called the base of $G'$, and $E(G')=E(C)\cup\{\{a,u_i\}: u_i\in V(C)\}$. \medskip {\bf (O-3)} Now let $D$ be an $r$-gonal dipyramid in $G$; that is a subgraph of $G$ with the vertex set $V(D)=V(C)\cup\{a,b\}$ and $E(D)= \bigcup_{1\leq i\leq r}\left(\{a,u_i\}\cup\{b,u_i\}\right) \cup E(C)$ where $C$ is an $r$-cycle as above which is called the {\em waist } of $D$. Then \begin{align}\label{dipyramid kernel} T(D):=(\sum_{1\leq i\leq r-1}[a,u_i,u_{i+1}]-[b,u_i,u_{i+1}])-[a,u_1,u_{r}]+[b,u_1,u_{r}]\in \ker \partial_2^{\Delta(G)}. \end{align} \par {\bf (O-4)} Suppose $\mathrm{index}(I)=t$. By Theorem~\ref{index of graphs}, $\bar{G}$ contains a minimal cycle $C=u_1-u_2-\cdots-u_{t+3}-u_1$ which has the smallest length among all minimal cycles of $\bar{G}$. \begin{itemize} \item[$(i)$] If $\beta_{t+1,t+4}(I)=0$, then $\widetilde{H}_{1}(\Delta_W;\mathbb{K})=0$ for all $W\subseteq [n]$ with $|W|=t+4$. Set $W=\{u_{t+4}\}\cup V(C)$ for an arbitrary vertex $u_{t+4}\in [n]\setminus V(C)$. Then $C$ is a minimal cycle in $\bar{G}_W$ and $T(C)\in\ker\partial_1^{W}$ implies that $T(C)\in\mathrm{Im\ }\partial_2^{W}$. It follows that each edge $e$ of $C$ is contained in a $2$-face $F_e$ of ${\Delta_W}$. Since $C$ is minimal, we must have $F_e=e\cup\{u_{t+4}\}$ which means that $u_{t+4}$ is adjacent to all vertices of $C$ in $\bar{G}$ and hence $\bar{G}_W$ is a cone. \item[$(ii)$] If $\beta_{t+2,t+5}(I)=0$, then $\widetilde{H}_{1}(\Delta_W;\mathbb{K})=0$ for all $W\subseteq [n]$ with $|W|=t+5$. Set $W=\{u_{t+4}, u_{t+5}\}\cup V(C)$ for arbitrary vertices $u_{t+4}, u_{t+5}\in [n]\setminus V(C)$. As in (i), $T(C)=\partial_2^{W}(L)$ for some $L\in \bigoplus_{F\in \Delta_W\atop{\dim F=2}} \mathbb{K}F$, and hence each edge of $C$ is contained in a $2$-face of $\Delta_W$. It follows that for each edge $e$ of $C$ either $\{u_{t+4}\}\cup e\in\Delta_W$ or $\{u_{t+5}\}\cup e\in \Delta_W$. If for all $e\in E(C)$ one has $\{u_{t+4}\}\cup e\in\Delta_W$, then $\Delta_W$ contains a cone. Same holds if we replace $u_{t+4}$ with $u_{t+5}$. Suppose $\{u_{t+4}\}\cup e, \{u_{t+5}\}\cup e' \notin\Delta_W$ for some $e, e'\in E(C)$, which implies that $u_{t+4}, u_{t+5}$ are not adjacent to all vertices of $C$ in $\bar{G}$. Without loss of generality suppose $\{u_{t+5},u_1,u_2\}\notin \Delta_W$. It follows that $\{u_{t+4}\}\cup\{u_1,u_2\}\in \Delta_W$. If $\{u_1,u_2\}$ is the only edge $e$ of $C$ with $\{u_{t+4}\}\cup e\in\Delta_W$, then for all $e'\in E(C)$ with $e'\neq \{u_1,u_2\}$ one has $\{u_{t+5}\}\cup e'\in \Delta_W$. In particular, $\{u_1,u_{t+3}, u_{t+5}\},\{u_2,u_3,u_{t+5}\}\in \Delta_W$ which implies by the definition of $\Delta_W=\Delta(\bar{G}_W)$ that $\{u_{t+5},u_1,u_2\}\in \Delta_W$, a contradiction. Since $u_{t+4}$ is not adjacent to all vertices of $C$ in $\bar{G}$, and since $\{u_{t+4},u_1\},\{u_{t+4},u_2\}\in E(\bar{G})$, it follows that there exists $3\leq j\leq t+3$ such that $\{u_j, u_{t+4}\}\notin E(\bar{G})$. Let $a, b $ be respectively the biggest and the smallest integers with $2\leq a<j<b\leq t+3$ for which $\{u_a,u_{t+4}\},\{u_b,u_{t+4}\}\in E(\bar{G})$. If such $b$ does not exist we let $b=1$ which implies that $a\neq 2$ because otherwise $\{u_{t+5}\} \cup e' \in \Delta_W$ for all $e' \in E(C) \setminus \{\{u_1, u_2\}\}$, so $u_{t+5}$ is adjacent to all vertices of $C$ in $\bar{G}$. Now if $b\neq 1$, then $C':=u_{t+4}-u_a-u_{a+1}-\cdots-u_{b}-u_{t+4}$ is a minimal cycle in $\bar{G}_W$ of length $b-a+2$, and if $b=1$ then $C':=u_{t+4}-u_a-u_{a+1}-\cdots-u_{t+3}-u_{1}-u_{t+4}$ is a minimal cycle of length $t+6-a$. Since $\mathrm{index}(I)=t$, we must have $|C'|\geq t+3$ in either case, and so $\{a,b\}=\{1,3\}$ if $b=1$, and $\{a,b\}=\{2,t+3\}$ if $b\neq 1$. In both cases the vertex $u_{t+4}$ is adjacent to only three successive vertices of $C$ in $\bar{G}$. Without loss of generality we may assume that $u_1,u_2,u_3$ are these three vertices. Thus $u_{t+4}$ is adjacent to only two edges $\{u_1,u_2\}, \{ u_2,u_3\}$ of $C$ in $\bar{G}$ and hence $\{u_1,u_3,u_4\ldots, u_{t+3}\}\subseteq N_{\bar{G}}(u_{t+5})$. It follows that $\{u_{t+5}, u_2\}\notin E(\bar{G})$ because $u_{t+5}$ is not adjacent to all vertices of $C$ in $\bar{G}$. Thus we get the minimal $4$-cycle $C'':=u_{t+5}-u_1-u_2-u_3-u_{t+5}$. It follows that $t=1$ because $\mathrm{index}(I)=t$. Therefore $|C|=4$ and the only $2$-faces of $\Delta_W$ containing an edge of $C$ are $\{u_1,u_2,u_5\}, \{u_2,u_3,u_5\}, \{u_3,u_4,u_6\}, \{u_1,u_4,u_6\}$. But no linear combination of theses faces will result in $L$ with $\partial_{2}^{W}(L)=T(C)$. We need more $2$-faces in $\Delta_W$. It follows that $\{u_i, u_5,u_6\}\in \Delta_W$ for some $1\leq i\leq 4$. In particular, $\{u_5,u_6\}\in E(\bar{G})$. This forms a graph $\bar{G}_W$ which is drawn as the graph $G_{(d)_2}$ in Figure~\ref{type d}. \item[$(iii)$ ]If $\beta_{t+2,t+6}(I)=0$, then $\widetilde{H}_{2}(\Delta(\bar{G})_W;\mathbb{K})=0$ for all $W\subseteq [n]$ with $|W|=t+6$. Suppose $\bar{G}$ contains a dipyramid $D$ with the vertex set $\{u_{t+4}, u_{t+5}\}\cup V(C)$, where the waist $C$ is a minimal cycle of length $t+3$. Set $W=\{u_{t+4}, u_{t+5},u_{t+6}\}\cup V(C)$ for arbitrary vertex $ u_{t+6}\in [n]\setminus (V(C)\cup \{u_{t+4}, u_{t+5}\})$. Then by (O-3) one has $T(D)\in \ker\partial_2^{W}$ and hence $T(D)\in \mathrm{Im\ }\partial_3^W$. This implies that each $2$-face of $D$ is contained in a $3$-face of ${\Delta_W}$. Since $C$ is minimal, it follows that either $\{u_{t+4},u_{t+5}\}\in E(\bar{G})$ or $\{u_{t+4}, u_{t+5}\}\cup V(C)\subseteq N_{\bar{G}}(u_{t+6})$. \end{itemize} \end{remno} \begin{ex}\label{mesal} Here we give $7$ types of the graphs $G$ whose edge ideal $I:=I(G)$ has almost maximal finite index over all fields. Indeed, we present the complementary graphs $\bar{G}$ for which $\mathrm{pd}(I)=\mathrm{index}(I)+1$. Take $t = 1$ for the cases (c) and (d) below. Since the smallest minimal cycles in the following graphs $\bar{G}$ are of length $t+3\geq 4$, by Theorem~\ref{index of graphs} we have $\mathrm{index}(I)=t$. We show that $\mathrm{pd}(I)=t+1$. Note that as it is also clear from Hochster's formula, $\beta_{i,j}(I)=0$ for all $j<i+2$ and hence, in order to show that $\mathrm{pd}(I)=t+1$ it is enough to prove $\beta_{t+1,j}(I)\neq 0$ for some $j\geq t+3$ and $\beta_{t+2,j}(I)= 0$ for all $t+4\leq j\leq n$. The argument below is independent of the choice of the base field. \medspace \indent (a) Let $\bar{G}$ be either of the graphs $G_{(a)_1}, G_{(a)_2}, G_{(a)_3}$ shown in Figure~\ref{type a} with $t\geq 1$. The two graphs $G_{(a)_1}, G_{(a)_2}$ have one minimal cycle $C=1-2-\cdots-(t+3)-1$, and the graph $G_{(a)_3}$, has two minimal cycles $C$ and $C'=1-(t+4)-3-4-\cdots-(t+3)-1$. Setting $W=[t+4]$, we have $T(C)\in \ker \partial_1^W$ by (O-2). Since $t>0$, there are edges of $C$ in all three graphs which are not contained in a $2$-face of $\Delta_W$. In particular, $T(C)\notin \mathrm{Im\ }\partial_2^W$. Hence $\widetilde{H}_1(\Delta_W;\mathbb{K})\neq 0$ which implies that $\beta_{t+1,t+4}(I)\neq 0$. Thus $\mathrm{pd}(I)\geq t+1$. If $\beta_{t+2,j}(I)\neq 0$ for some $j$, then there exists $W\subseteq [t+4]$ with $|W|=j$ such that $\widetilde{H}_{|W|-t-4}(\Delta_W;\mathbb{K})\neq 0$. It then follows that $W=[t+4]$ and $\widetilde{H}_0(\Delta_W;\mathbb{K})\neq 0$. But ${\bar{G}}_W=\bar{G}$ is connected meaning that $\Delta_W$ is connected, by (O-1). Hence $\widetilde{H}_0(\Delta_W;\mathbb{K})=0$, a contradiction. Therefore $\mathrm{pd}(I)=t+1$. \begin{figure}[ht!] \begin{center} \hspace*{-2cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.4cm,y=0.4cm] \clip(54.5,3.2) rectangle (68.5,14); \draw [color=black] (64.,10.)-- (60.04207935839705,9.202683366710461); \draw (59.2,9.98) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (62.6,6) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \draw (60.7,7.2) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (63.2,11.2) node[anchor=north west] {\begin{scriptsize}t+4\end{scriptsize}}; \draw (58.6,12.4) node[anchor=north west] {\begin{scriptsize}t+3\end{scriptsize}}; \draw (62.5,4.5) node[anchor=north west] {$G_{(a)_1}$}; \draw [shift={(64.,10.)},line width=0.4pt] plot[domain=5.257759132311878:5.982897107046088,variable=\t]({1.*4.037431066773457*cos(\t r)+0.*4.037431066773457*sin(\t r)},{0.*4.037431066773457*cos(\t r)+1.*4.037431066773457*sin(\t r)}); \draw [shift={(64.,10.)},color=black] plot[domain=0.21715133778930423:5.982897107046091,variable=\t]({1.*4.037431066773395*cos(\t r)+0.*4.037431066773395*sin(\t r)},{0.*4.037431066773395*cos(\t r)+1.*4.037431066773395*sin(\t r)}); \begin{scriptsize} \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (60.39320973638185,11.814363142597488) circle (1.5pt); \draw [fill=black] (60.04207935839705,9.202683366710461) circle (1.5pt); \draw [fill=black] (61.10367540176967,7.187144966296193) circle (1.5pt); \draw [fill=black] (68.,10.) circle (0.3pt); \draw [fill=black] (67.98,9.76) circle (0.3pt); \draw [fill=black] (63,6.1) circle (1.5pt); \draw [fill=black] (67.96341651367774,9.465941589917382) circle (0.3pt); \end{scriptsize} \end{tikzpicture} \hspace*{-1.4cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.4cm,y=0.4cm] \clip(54.5,3.2) rectangle (68.5,14); \draw [color=black] (64.,10.)-- (60.04207935839705,9.202683366710461); \draw [color=black] (64.,10.)-- (61.10367540176967,7.187144966296193); \draw (59.2,9.98) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (60.7,7.2) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (62.6,6) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \draw (63.2,11.2) node[anchor=north west] {\begin{scriptsize}t+4\end{scriptsize}}; \draw (58.6,12.4) node[anchor=north west] {\begin{scriptsize}t+3\end{scriptsize}}; \draw (62.5,4.5) node[anchor=north west] {$G_{(a)_2}$}; \draw [shift={(64.,10.)},line width=0.4pt] plot[domain=5.257759132311878:5.982897107046088,variable=\t]({1.*4.037431066773457*cos(\t r)+0.*4.037431066773457*sin(\t r)},{0.*4.037431066773457*cos(\t r)+1.*4.037431066773457*sin(\t r)}); \draw [shift={(64.,10.)},color=black] plot[domain=0.21715133778930423:5.982897107046091,variable=\t]({1.*4.037431066773395*cos(\t r)+0.*4.037431066773395*sin(\t r)},{0.*4.037431066773395*cos(\t r)+1.*4.037431066773395*sin(\t r)}); \begin{scriptsize} \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (60.39320973638185,11.814363142597488) circle (1.5pt); \draw [fill=black] (60.04207935839705,9.202683366710461) circle (1.5pt); \draw [fill=black] (61.10367540176967,7.187144966296193) circle (1.5pt); \draw [fill=black] (68.,10.) circle (0.3pt); \draw [fill=black] (67.98,9.76) circle (0.3pt); \draw [fill=black] (63,6.1) circle (1.5pt); \draw [fill=black] (67.96341651367774,9.465941589917382) circle (0.3pt); \end{scriptsize} \end{tikzpicture} \hspace*{-1.4cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.4cm,y=0.4cm] \clip(54.5,3.2) rectangle (68.5,14); \draw [color=black] (64.,10.)-- (60.04207935839705,9.202683366710461); \draw [color=black] (64.,10.)-- (61.10367540176967,7.187144966296193); \draw [color=black] (64.,10.)-- (63,6.1); \draw (64.6,6) node[anchor=north west] {\begin{scriptsize}4\end{scriptsize}}; \draw (62.6,6) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \draw (59.2,9.98) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (60.7,7.2) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (63.2,11.2) node[anchor=north west] {\begin{scriptsize}t+4\end{scriptsize}}; \draw (58.6,12.4) node[anchor=north west] {\begin{scriptsize}t+3\end{scriptsize}}; \draw (62.5,4.5) node[anchor=north west] {$G_{(a)_3}$}; \draw [shift={(64.,10.)},line width=0.4pt] plot[domain=5.257759132311878:5.982897107046088,variable=\t]({1.*4.037431066773457*cos(\t r)+0.*4.037431066773457*sin(\t r)},{0.*4.037431066773457*cos(\t r)+1.*4.037431066773457*sin(\t r)}); \draw [shift={(64.,10.)},color=black] plot[domain=0.21715133778930423:5.982897107046091,variable=\t]({1.*4.037431066773395*cos(\t r)+0.*4.037431066773395*sin(\t r)},{0.*4.037431066773395*cos(\t r)+1.*4.037431066773395*sin(\t r)}); \begin{scriptsize} \draw [fill=black] (65,6.1) circle (1.5pt); \draw [fill=black] (63,6.1) circle (1.5pt); \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (60.39320973638185,11.814363142597488) circle (1.5pt); \draw [fill=black] (60.04207935839705,9.202683366710461) circle (1.5pt); \draw [fill=black] (61.10367540176967,7.187144966296193) circle (1.5pt); \draw [fill=black] (68.,10.) circle (0.3pt); \draw [fill=black] (67.98,9.76) circle (0.3pt); \draw [fill=black] (67.96341651367774,9.465941589917382) circle (0.3pt); \end{scriptsize} \end{tikzpicture} \end{center} \vspace*{-.2cm} \caption{The graphs $G_{(a)_i}$}\label{type a} \end{figure} \indent (b) Let $\bar{G}$ be the graph $G_{(b)}$ in Figure~\ref{type b}, where $t\geq 1$ and $\{i,t+4\}\in E({\bar{G}})$ for all $i\in[t+3]$. Then $\bar{G}$ has one minimal cycle $C=1-2-\cdots-(t+3)-1$ as in (a). Setting $W=[t+3]\cup\{t+5\}$, we have $T(C)\in \ker \partial_1^W\setminus \mathrm{Im\ } \partial_2^W$. It follows that $\beta_{t+1,t+4}(I)\neq 0$. Therefore $\mathrm{pd}(I)\geq t+1$. For any $W\subseteq [t+5]$ with $|W|=t+4$, $\bar{G}_W$ is connected. So $\beta_{t+2,t+4}(I)=0$. Suppose $W=[t+5]$. Although $T(C)\in \ker \partial_1^W$ one also has $T(C)\in \mathrm{Im\ } \partial_2^W$, because $C$ is the base of a cone with apex ${t+4}$. Hence according to (O-2), $\beta_{t+2,t+5}(I)=0$. It follows that $\mathrm{pd}(I)=t+1$. \begin{figure}[ht!] \begin{center} \hspace*{-1.8cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.4cm,y=0.4cm] \clip(54.5,5.8) rectangle (68.5,14.1); \draw [color=black] (64.,10.)-- (60.04207935839705,9.202683366710461); \draw [color=black] (64.,10.)-- (61.10367540176967,7.187144966296193); \draw (59.2,9.98) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (60.7,7.2) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (63.2,11.2) node[anchor=north west] {\begin{scriptsize}t+4\end{scriptsize}}; \draw (58.6,12.4) node[anchor=north west] {\begin{scriptsize}t+3\end{scriptsize}}; \draw [shift={(64.,10.)},line width=0.4pt] plot[domain=5.257759132311878:5.982897107046088,variable=\t]({1.*4.037431066773457*cos(\t r)+0.*4.037431066773457*sin(\t r)},{0.*4.037431066773457*cos(\t r)+1.*4.037431066773457*sin(\t r)}); \draw [color=black] (64.,10.)-- (60.39320973638185,11.814363142597488); \draw [color=black] (56.47518012335943,6.228129663627268)-- (60.04207935839705,9.202683366710461); \draw [color=black] (56.47518012335943,6.228129663627268)-- (61.10367540176967,7.187144966296193); \draw (54.7,6.7) node[anchor=north west] {\begin{scriptsize}t+5\end{scriptsize}};; \draw [shift={(64.,10.)},color=black] plot[domain=0.21715133778930423:5.982897107046091,variable=\t]({1.*4.037431066773395*cos(\t r)+0.*4.037431066773395*sin(\t r)},{0.*4.037431066773395*cos(\t r)+1.*4.037431066773395*sin(\t r)}); \draw [color=black] (64.,10.)-- (65.63698868515817,9.130168501265073); \draw [color=black] (64.,10.)-- (65.66097247720477,10.689114984293646); \begin{scriptsize} \draw [fill=black] (64.,10.) circle (1.5pt); \draw [fill=black] (60.39320973638185,11.814363142597488) circle (1.5pt); \draw [fill=black] (60.04207935839705,9.202683366710461) circle (1.5pt); \draw [fill=black] (61.10367540176967,7.187144966296193) circle (1.5pt); \draw [fill=black] (56.47518012335943,6.228129663627268) circle (1.5pt); \draw [fill=black] (68.,10.) circle (0.3pt); \draw [fill=black] (67.98,9.76) circle (0.3pt); \draw [fill=black] (67.96341651367774,9.465941589917382) circle (0.3pt); \draw [fill=black] (65.46910214083202,10.137487767221996) circle (0.3pt); \draw [fill=black] (65.47,9.93) circle (0.3pt); \draw [fill=black] (65.44511834878543,9.729763302429909) circle (0.3pt); \end{scriptsize} \end{tikzpicture} \end{center} \vspace*{-.2cm} \caption{The graph $G_{(b)}$}\label{type b} \end{figure} \indent (c) Let $\bar{G}$ be the graph $G_{(c)}$ shown in Figure~\ref{type c}. This graph consists of $3$ minimal cycles of length $4$. So $\mathrm{index}(I)=1$. Moreover, $\beta_{2,5}(I)\neq 0$ because $T(C)\in \ker \partial_1\setminus \mathrm{Im\ }\partial_2$, for all minimal cycles $C$ in $\bar{G}$, and $\beta_{3,5}(I)=0$ because $\bar{G}$ is connected. Hence $\mathrm{pd}(I)=\!2$. \begin{figure}[ht!] \begin{center} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.6cm,y=0.6cm] \clip(7.,4) rectangle (12.5,8.1); \draw (8.,4.)-- (12.,4.); \draw (12.,4.)-- (12.,8.); \draw (12.,8.)-- (8.,8.); \draw (8.,8.)-- (8.,4.); \draw (12.,8.)-- (8.,4.); \draw (7.3,4.553017458995247) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (12,4.553017458995247) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (9.8,6.84034134932995) node[anchor=north west] {\begin{scriptsize}5\end{scriptsize}}; \draw (7.3,8.3) node[anchor=north west] {\begin{scriptsize}4\end{scriptsize}}; \draw (12,8.3) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \begin{scriptsize} \draw [fill=black] (8.,4.) circle (1.5pt); \draw [fill=black] (12.,4.) circle (1.5pt); \draw [fill=black] (12.,8.) circle (1.5pt); \draw [fill=black] (8.,8.) circle (1.5pt); \draw [fill=black] (10.,6.) circle (1.5pt); \end{scriptsize} \end{tikzpicture} \end{center} \caption{The graph $G_{(c)}$}\label{type c} \end{figure} \medskip (d) Let $\bar{G}$ be either of the graphs $G_{(d)_1}, G_{(d)_2}$ in Figure~\ref{type d}. Both graphs have three minimal cycles of length~$4$. Since $G_{(d)_1}$ is a dipyramid, by (O-3) one has $\widetilde{H}_2(\Delta(\overline{G_{(d)_1}});\mathbb{K})\neq 0$ which implies that $\beta_{2,6}(I(\overline{G_{(d)_1}}))\neq 0$. Although, $G_{(d)_2}$ is not a dipyramid, it contains the minimal cycle $C=1-2-3-4-1$ which gives a nonzero homology class of $\widetilde{H}_1(\Delta(\overline{G_{(d)_2}})_W;\mathbb{K})\neq 0$, where $W=V(C)\cup\{5\}$. Hence $\beta_{2,5}(I(\overline{G_{(d)_2}}))\neq 0$. Therefore $\mathrm{pd}(I)\geq 2$ in both cases. To prove that $\mathrm{pd}(I)=2$ it is enough to show that $\beta_{3,5}(I)=\beta_{3,6}(I)=0$. Considering any subset $W$ of $[6]$ with $|W|=5$, $\bar{G}_W$ and so $\Delta_W$ is connected in both cases. It follows that $\widetilde{H}_0(\Delta_W;\mathbb{K})=0$, and hence $\beta_{3,5}(I)=0$. Now $\widetilde{H}_1(\Delta;\mathbb{K})=0$ because except for the cycle $C=1-2-3-4-1$ in $G_{(d)_2}$, all other minimal cycles in $G_{(d)_1}, G_{(d)_2}$ are bases of some cones and for the cycle $C$, we have $$T(C)=\partial_2^W([1,2,5]+[2,3,5]+[3,4,6]-[1,4,6]-[3,5,6]+ [1,5,6]).$$ Consequently, $\beta_{3,6}(I)=0$ and hence $\mathrm{pd}(I)=2$. \begin{figure}[ht!] \begin{center} \hspace*{-.5cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.55cm,y=0.55cm] \clip(5.,0) rectangle (11.5,9.4); \draw (8.,6.)-- (11.,6.); \draw (11.,6.)-- (8.74,4.98); \draw (8.74,4.98)-- (5.66,4.98); \draw (5.66,4.98)-- (8.,6.); \draw (8.48,8.86)-- (11.,6.); \draw (8.48,8.86)-- (8.74,4.98); \draw (8.48,8.86)-- (5.66,4.98); \draw [dash pattern=on 1pt off 1pt] (8.48,8.86)-- (8.,6.); \draw (8.,2.)-- (8.74,4.98); \draw (8.,2.)-- (5.66,4.98); \draw [dash pattern=on 1pt off 1pt] (8.,2.)-- (8.,6.); \draw (8.,2.)-- (11.,6.); \draw (5.2,4.99) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \draw (8.74,5.22) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (11.,6.4) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (7.4,6.6) node[anchor=north west] {\begin{scriptsize}4\end{scriptsize}}; \draw (8.2,9.62) node[anchor=north west] {\begin{scriptsize}5\end{scriptsize}}; \draw (7.7,2.) node[anchor=north west] {\begin{scriptsize}6\end{scriptsize}}; \draw (7.2,1) node[anchor=north west] {$G_{(d)_1}$}; \begin{scriptsize} \draw [fill=black] (8.,6.) circle (1.5pt); \draw [fill=black] (11.,6.) circle (1.5pt); \draw [fill=black] (8.74,4.98) circle (1.5pt); \draw [fill=black] (5.66,4.98) circle (1.5pt); \draw [fill=black] (8.48,8.86) circle (1.5pt); \draw [fill=black] (8.,2.) circle (1.5pt); \end{scriptsize} \end{tikzpicture} \hspace{2.5cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.55cm,y=0.55cm] \clip(5.,0) rectangle (11.5,9.5); \draw (8.,6.)-- (11.,6.); \draw (11.,6.)-- (8.74,4.98); \draw (8.74,4.98)-- (5.66,4.98); \draw (5.66,4.98)-- (8.,6.); \draw (8.48,8.86)-- (11.,6.); \draw (8.48,8.86)-- (8.74,4.98); \draw (8.48,8.86)-- (5.66,4.98); \draw [dash pattern=on 1pt off 1pt] (8.48,8.86)-- (8.,6.); \draw (8.,2.)-- (5.66,4.98); \draw [dash pattern=on 1pt off 1pt] (8.,2.)-- (8.,6.); \draw (8.,2.)-- (11.,6.); \draw (5.2,4.99) node[anchor=north west] {\begin{scriptsize}3\end{scriptsize}}; \draw (8.74,5.22) node[anchor=north west] {\begin{scriptsize}2\end{scriptsize}}; \draw (11.,6.4) node[anchor=north west] {\begin{scriptsize}1\end{scriptsize}}; \draw (7.4,6.6) node[anchor=north west] {\begin{scriptsize}6\end{scriptsize}}; \draw (8.2,9.62) node[anchor=north west] {\begin{scriptsize}5\end{scriptsize}}; \draw (7.7,2.) node[anchor=north west] {\begin{scriptsize}4\end{scriptsize}}; \draw (7.2,1) node[anchor=north west] {$G_{(d)_2}$}; \begin{scriptsize} \draw [fill=black] (8.,6.) circle (1.5pt); \draw [fill=black] (11.,6.) circle (1.5pt); \draw [fill=black] (8.74,4.98) circle (1.5pt); \draw [fill=black] (5.66,4.98) circle (1.5pt); \draw [fill=black] (8.48,8.86) circle (1.5pt); \draw [fill=black] (8.,2.) circle (1.5pt); \end{scriptsize} \end{tikzpicture} \end{center} \vspace*{-.3cm} \caption{The graphs $G_{(d)_i}$}\label{type d} \end{figure} \end{ex} Next lemma gives more intuition about the length of minimal cycles in $\bar{G}$, when $I(G)$ has almost maximal finite index. For an integer $k$, we show by $\overline{k}$ the remainder of $k$ modulo $t+3$, i.e. $\overline{k}\equiv k\pmod{t+3}$ with $0 \leq \overline{k} < t + 3$, where $t\geq 1$ is an integer. \begin{lem}\label{sedaghashang} Let $G$ be a simple graph on $[n]$. Assume $I:=I(G)$ has almost maximal finite index. Then any minimal cycle in $\bar{G}$ is of length $\mathrm{index}(I)+3$. \end{lem} \begin{proof} Let $\mathrm{index}(I)=t$. Then $\mathrm{pd}(I)=t+1$ which means that $\beta_{i,j}(I)=0$ for all $i>t+1$ and all $j$. Using Theorem~\ref{index of graphs}, there exists a minimal cycle $C$ in $\bar{G}$ of length $t+3$ which has the smallest length among all the minimal cycles in $\bar{G}$. Let $C=u_1-u_2-\cdots-u_{t+3}-u_1$. Suppose $C'\neq C$ is a minimal cycle in $\bar{G}$ with $C'=v_1-v_2-\cdots-v_l-v_1$. Setting $W=V(C')$ and $T(C')$ as defined in (\ref{cycle kernel}) one has $T(C')\in \ker \partial_1^W$, while $\mathrm{Im\ }\partial_2^W=0$. Hence $\widetilde{H}_{1}(\Delta_W;\mathbb{K})\neq 0$. Hochster's formula implies that $\beta_{l-3,l}(I)\neq 0$. Since $\beta_{i,j}(I)=0$ for all $i>t+1$, we have $l\leq t+4$. We claim that $l<t+4$. Since $t+3$ is the smallest length of a minimal cycle in $\bar{G}$, it follows that $l=t+3$, as desired. \medskip {\em Proof of the claim:} Suppose $l=t+4$ and let $u\in [n]\setminus V(C')$. Note that such $u$ exists since otherwise $V(C)\subset [n]=V(C')$ which implies that $C'$ is not minimal. Let $W=V(C')\cup\{u\}$. Since $\beta_{t+2,t+5}(I)= 0$, it follows that $\widetilde{H}_{1}(\Delta_W;\mathbb{K})= 0$. Therefore, $T(C')\in \ker \partial_1^W$ implies that $T(C')\in \mathrm{Im\ } \partial_2^W$. Hence, $\{u, v_i\}\in E(\bar{G})$ for all $1\leq i\leq t+4$. On the other hand, since $n>t+4$ there exist $v, v'\in [n]\setminus V(C)$ with $v\neq v'$. Setting $W=V(C)\cup\{v,v'\}$, by \textbf{(O-4)}(ii), either of the following cases happens: \begin{itemize} \item[(i)] either $\{v,u_i\}\in E(\bar{G})$ for all $u_i\in V(C)$ or $\{v',u_i\}\in E(\bar{G})$ for all $u_i\in V(C)$; \item[(ii)] else, $t=1$ and $\Delta_W$ is isomorphic to the graph $G_{(d)_2}$ in Figure~\ref{type d}. In particular, $\{v,v'\}\in E(\bar{G})$. \end{itemize} We show that $V(C)\cap V(C')= \emptyset$. Suppose on contrary that $V(C)\cap V(C')\neq \emptyset$, say $u_1\in V(C')$. Then $\{u_j, u_1\}\in E(\bar{G})$ for all $u_j\in V(C)\setminus V(C')$. Since $C$ is minimal we conclude that $V(C)\setminus V(C')\subseteq \{u_2,u_{t+3}\}$. Therefore $\{u_1,u_3,\ldots,u_{t+2}\}\subset V(C')$. Note that $V(C)\setminus V(C')\neq \emptyset$ because otherwise $V(C)\subset V(C')$ which does not hold. If $|V(C)\setminus V(C')|=1$, without loss of generality we may suppose $V(C)\setminus V(C')=\{u_{t+3}\}$. Then since $|V(C')|-|V(C)|=1$, we have $|V(C')\setminus V(C)|=2$. Let $v_{j_1},v_{j_2}\in V(C')\setminus V(C)$. Then $V(C')=\{v_{j_1},v_{j_2}\}\cup\{u_1,\ldots,u_{t+2}\}$ with $\{v_{j_1},v_{j_2}\}\cap\{u_1,\ldots,u_{t+2}\}=\emptyset$. Suppose (i) happens for $v_{j_1},v_{j_2}$. We may assume that $\{v_{j_1}, u_i\}\in E(\bar{G})$ for all $1\leq i\leq t+3$. Since $t\geq 1$, $|\{u_1,\ldots,u_{t+2}\}|\geq 3$ which implies that $v_{j_1}$ is adjacent to at least $3$ vertices of $C'$ in $\bar{G}$ which contradicts the minimality of $C'$. So (i) cannot happen when $|V(C)\setminus V(C')|=1$. Therefore by (ii), $t=1$ and the induced subgraph of $\bar{G}$ on $V(C)\cup\{v_{j_1},v_{j_2}\}$ is isomorphic to $G_{(d)_2}$. Since $V(C')\subset V(C)\cup\{v_{j_1},v_{j_2}\}$, the cycle $C'$ which is of length $5$ is an induced subgraph of $G_{(d)_2}$. This is a contradiction because all cycles in $G_{(d)_2}$ are of length $4$. Therefore $|V(C)\setminus V(C')|=2$. It follows from $V(C)\setminus V(C')=\{u_2,u_{t+3}\}$ that $V(C')=\{v_{j_1},v_{j_2}, v_{j_3}\}\cup\{u_1,u_3,\ldots,u_{t+2}\}$ with $\{v_{j_1},v_{j_2}, v_{j_3}\}\cap\{u_1,u_3,\ldots,u_{t+2}\}=\emptyset$. If at least two of the vertices $v_{j_1},v_{j_2},v_{j_3}$, say $v_{j_1},v_{j_2}$, are adjacent to all vertices of $C$ in $\bar{G}$, then $v_{j_1}-u_1-v_{j_2}-u_3-v_{j_1}$ is a $4$-cycle in $C'$ which contradicts the minimality of $C'$, because $|C'|\geq 5$. Hence at most one vertex from $v_{j_1},v_{j_2},v_{j_3}$ is adjacent to all vertices of $C$ in $\bar{G}$. If none of them is adjacent to all $u_i$ in $\bar{G}$, by (ii) we have $\{v_{j_1},v_{j_2}\},\{v_{j_2},v_{j_3}\},\{v_{j_1},v_{j_3}\}\in E(\bar{G})$ and hence $C'$ contains a triangle which is a contradiction. Therefore, exactly one vertex among $v_{j_1},v_{j_2},v_{j_3}$, say $v_{j_1}$, is adjacent to all vertices $u_i$ in $\bar{G}$. Now $\{u_1,u_3,\ldots,u_{t+2}\}\subset V(C')$ and minimality of $C'$ imply that $t=1$ and that $v_{j_1}$ is not adjacent to $v_{j_2},v_{j_3}$. Setting $W=\{v_{j_2},v_{j_3}\}\cup V(C)$, since (i) does not happen for this $W$, one concludes that $\Delta_W$ is isomorphic to $G_{(d)_2}$. Therefore $\{v_{j_2},v_{j_3}\}\in E(\bar{G})$ and, in $\bar{G}$ the vertex $v_{j_2}$ is adjacent to three successive vertices $u_{\overline{i-1}}, u_{i}, u_{\overline{i+1}}$ of $C$, and the vertex $v_{j_3}$ is adjacent to $u_{\overline{i+1}}, u_{\overline{i+2}}, u_{\overline{i-1}}$, where $1\leq i\leq 4$. Since $\{v_{j_2},v_{j_3}\}\in E(C')$, and since $V(C')=\{v_{j_1}, v_{j_2},v_{j_3},u_1,u_3\}$, it follows that either $i=1$ or $i=3$, otherwise $C'$ is not minimal. Without loss of generality suppose $i=1$. Thus $v_{j_2}$ is adjacent to $u_1,u_2,u_4$ but not to $u_3$, and $v_{j_3}$ is adjacent to $u_2,u_3,u_4$ but not to $u_1$. Setting $W=V(C)\cup\{v_{j_1},v_{j_2},v_{j_3}\}$ one has \begin{align*} T'=(&\sum_{1\leq i\leq 3}[v_{j_1},u_i,u_{i+1}])-[v_{j_1},u_1,u_4]- [v_{j_2},u_1,u_{2}]+[v_{j_2},u_1,u_{4}]-[v_{j_3},u_2,u_{3}]\\ &-[v_{j_3},u_3,u_4]+[v_{j_2},v_{j_3},u_2]-[v_{j_2},v_{j_3},u_4]\in\ker\partial_2^W. \end{align*} Since $\beta_{3,7}(I)=0$, we have $T'\in \mathrm{Im\ } \partial_3^W$ which requires that $\Delta_W$ contains faces of dimension $3$ which is not the case here, a contradiction. Consequently, $V(C)\cap V(C')= \emptyset$, as desired. Setting $W=\{u_j\}\cup V(C')$ for some $1\leq j\leq t+3$, since $T(C')\in \ker\partial_1^W$ and $\beta_{t+2,t+5}(I)=0$ we conclude that $u_j$ is adjacent to all vertices of $C'$ in $\bar{G}$. In particular, $\{u_1,v_i\}, \{u_3,v_i\}\in E(\bar{G})$ for all $1\leq i\leq t+4$. Let $W=V(C')\cup\{u_1,u_3\}$. Then $\Delta_W$ consists of an induced dipyramid $D$. Thus $T(D)\in \ker \partial_2^W$, while $\mathrm{Im\ } \partial_3^W=0$, where $T(D)$ is defined in (\ref{dipyramid kernel}). It follows that $\widetilde{H}_{2}(\Delta_W;\mathbb{K})\neq 0$ and so $\beta_{t+2,t+6}(I)\neq 0$, a contradiction. Therefore $l<t+4$ and the claim follows. \end{proof} In the next corollary we highlight some information obtained from Observation~\ref{connected induced graphs} about the vertices not belonging to a minimal cycle. \begin{cor}\label{ostad} Let $G$ be a simple graph on $[n]$. Assume $I:=I(G)$ has almost maximal finite index. Let $C$ be a minimal cycle in $\bar{G}$. Then \begin{itemize} \item[(a)] all vertices in $[n]\setminus V(C)$ are adjacent to some vertex in $V(C)$ in the graph $\bar{G}$. \item[(b)] For any pair of vertices $v,v'\in [n]\setminus V(C)$ whenever $|N_{\bar{G}}(v)\cap V(C)|\leq 2$, then $V(C)\subseteq N_{\bar{G}}(v')$. \item[(c)] If $\mathrm{index}(I)=1$, then there are at most two vertices in $[n]\setminus V(C)$ which are not adjacent to all vertices of ${C}$ in $\bar{G}$. \item[(d)] If $\mathrm{index}(I)>1$, then there is at most one vertex in $[n]\setminus V(C)$ which is not adjacent to all vertices of ${C}$ in $\bar{G}$. \end{itemize} \end{cor} \begin{proof} Let $\mathrm{index}(I)=t$. By assumption $\mathrm{pd}(I)=t+1$. By Lemma~\ref{sedaghashang} all minimal cycles of $\bar{G}$ are of length $t+3$. Let $C=u_1-u_2-\cdots-u_{t+3}-u_1$ be a minimal cycle of $\bar{G}$. (a) Let $u_{t+4}\in [n]\setminus V(C)$, and set $W=V(C)\cup \{u_{t+4}\}$. Since $\beta_{t+2,t+4}(I)=0$ we conclude that $\bar{G}_W$ is connected using (O-1). It follows that $u_{t+4}$ is adjacent to some vertex of $C$ in the graph $\bar{G}$. \medspace (b) If $|[n]\setminus V(C)|\leq 1$, then there is nothing to prove. Suppose $u_{t+4},u_{t+5}\in [n]\setminus V(C)$. Set $W= V(C)\cup\{u_{t+4},u_{t+5}\}$. Since $\beta_{t+2,t+5}(I)=0$, (O-4)(ii) implies that for each edge $e$ of $C$ we either have $e\cup\{u_{t+4}\}\in \Delta_W$ or $e\cup\{u_{t+5}\}\in \Delta_W$. This in particular shows that if $u_{t+4}$ is adjacent to at most $2$ vertices of $C$ in $\bar{G}$, then $u_{t+5}$ is adjacent to all of them in $\bar{G}$. \medspace (c) Suppose $u_{5},u_{6}\in [n]\setminus V(C)$ are not adjacent to all vertices of $C$ in $\bar{G}$. The argument in (O-4)(ii) shows that we may assume that $\{u_1,u_2,u_3\}\subseteq N_{\bar{G}}(u_5)$ but $u_4\notin N_{\bar{G}}(u_5)$ and $\{u_1,u_3,u_4\}\subseteq N_{\bar{G}}(u_6)$ but $u_2\notin N_{\bar{G}}(u_6)$. Now suppose $u_7\in [n]\setminus V(C)$ is not adjacent to all vertices of $C$ in $\bar{G}$. By replacing $u_6$ with $u_7$ in (O-4)(ii) one sees that $u_7$ is not adjacent to $u_2$ in $\bar{G}$, and replacing $u_5$ with $u_7$ in the same argument shows that $u_7$ is adjacent to $u_2$ in $\bar{G}$, a contradiction. \medspace (d) Suppose $u_{t+4},u_{t+5}$ are two vertices in $[n]\setminus V(C)$ which are not adjacent to all vertices of $C$ in $\bar{G}$. The argument in (O-4)(ii) shows that $t=1$, a contradiction. \end{proof} The crucial point in the classification of the edge ideals with almost maximal finite index is to determine the number of the vertices of the graph with respect to the index of the ideal. In the following, we compute this number. \begin{prop}\label{number of vertices} Let $G$ be a simple graph on $[n]$ with no isolated vertex such that $I=I(G)$ has almost maximal finite index $t$. Then $G$ has either $n=t+4$ or $n=t+5$ vertices. \end{prop} \begin{proof} Since $\mathrm{index}(I)=t$ there is a minimal cycle $C=u_1-u_2-\cdots-u_{t+3}-u_1$ in $\bar{G}$. Moreover, $\bar{G}\neq C$, because otherwise $\mathrm{pd}(I)=\mathrm{index}(I)$ by \cite[Theorem~4.1]{BHZ}. Since $C$ is a minimal cycle, $\bar{G}\neq C$ means that there exists $v\in [n]\setminus V(C)$. Therefore $n\geq t+4$. Suppose on contrary that $n> t+5$. So $n-|V(C)|>2$. Suppose first $t>1$. It follows from Corollary~\ref{ostad}(d) that there exist $u_{t+4},u_{t+5}\in [n]\setminus V(C)$ such that $u_{t+4},u_{t+5}$ are adjacent to all vertices of $C$ in $\bar{G}$. Therefore $C':=u_{t+4}-u_1-u_{t+5}-u_3-u_{t+4}$ is a $4$-cycle. Since $t>1$, $C'$ is not minimal and hence $\{u_{t+4},u_{t+5}\}\in E(\bar{G})$. \medspace Since $u_{t+4}, u_{t+5}$ are not isolated in $G$, there exist $v_1, v_2\in [n]\setminus (V(C)\cup \{ u_{t+4}, u_{t+5}\})$ such that $\{v_1, u_{t+4}\}, \{v_2,u_{t+5}\}\notin E(\bar{G})$. By Corollary~\ref{ostad}(a), $v_1, v_2$ are adjacent to some vertices of $C$ in $\bar{G}$. If $v_1$ is adjacent to at least two vertices in $\bar{G}$, say $u_a, u_b\in V(C)$ such that $b\neq \overline{a+1}$ and $a\neq \overline{b+1}$, then we will have a minimal $4$-cycle $v_1-u_a-u_{t+4}-u_b-v_1$ which contradicts $t>1$. Thus $v_1$ is adjacent to either one vertex $u_a$ or two vertices $u_a, u_{\overline{a+1}}$ of $C$ in $\bar{G}$. In particular, $v_1$ is not adjacent to all vertices of $C$ in $\bar{G}$. Same holds for $v_2$. Corollary~\ref{ostad}(d) implies that $v_1=v_2$. If $v_1$ is adjacent to only one vertex $u_a$ of $C$ in $\bar{G}$, setting $W=\{u_{t+4},v_1\}\cup V(C)\setminus \{u_a\}$, $\Delta_W$ is not connected and so $\beta_{t+2,t+4}(I)\neq 0$, a contradiction. Therefore, $v_1$ is adjacent to $u_a, u_{\overline{a+1}}$ in $\bar{G}$. Setting $W=\{u_{t+4},u_{t+5},v_1\}\cup V(C)\setminus \{u_a, u_{\overline{a+1}}\}$, $\Delta_W$ is not connected and so $\beta_{t+2,t+4}(I)\neq 0$, a contradiction. Consequently, $n\leq t+5$ when $t>1$. \iffalse all vertices of $C$ in $\bar{G}$, then we have a minimal $4$-cycle as $v_1-u_1-u_{t+4}-u_3-v_1$ which contradicts $t>1$. then setting $W=V(C)\cup\{u_{t+4}, u_{t+5}, v_1\}$, $\Delta_W$ contains an induced dipyramid on the vertex set $W\setminus\{u_{t+5}\}$ and hence $\ker\partial_2^W\neq 0$. Since $\beta_{t+2,t+6}(I)=0$ we have $\ker\partial_2^W= \mathrm{Im\ }\partial_3^W$. This happens if and only if $v_1$ is adjacent to $u_{t+5}$ in $\bar{G}$. In particular, $v_1\neq v_2$. Similarly, if $v_2$ is adjacent to all vertices of $C$, then $v_2$ and $u_{t+4}$ are adjacent in $\bar{G}$. Now if $\{v_1,v_2\}\notin E(\bar{G})$, then setting $W= V(C)\cup\{v_1,v_2, u_{t+4}\}$, $\Delta_W$ contains an induced dipyramid on $W\setminus\{u_{t+4}\}$ and since $\{v_1, u_{t+4}\}\notin E(\bar{G})$ we have $\widetilde{H}_{2}(\Delta_W;\mathbb{K})=0$ and hence $\beta_{t+2,t+6}(I)\neq 0$, a contradiction. Thus $\{v_1,v_2\}\in E(\bar{G})$. Now set $W=V(C)\cup\{u_{t+4}, u_{t+5}, v_1,v_2\}$ and thus \begin{align*} T=&\sum_{1\leq i\leq 3}\left([u_{t+4},u_{t+5},u_i,u_{i+1}]-[u_{t+4},v_2,u_i,u_{i+1}]+[u_{t+5}, v_1, u_i,u_{i+1}]+[v_1,v_2,u_i,u_{i+1}]\right)\\ &-[u_{t+4},u_{t+5},u_1,u_{4}]+[u_{t+4},v_2,u_1,u_4]-[u_{t+5}, v_1,u_1,u_4]-[v_1,v_2,u_1,u_4]\in\ker\partial_3^W \end{align*} Since $\beta_{t+2, t+7}(I)=0$, we must have $T\in \mathrm{Im\ }\partial_4^W$ which implies that $\Delta_W$ has faces of dimension $4$ which does not hold. Thus either $v_1$ or $v_2$. \fi \iffalse Thus there exists $1\leq j\leq t+3$, such that $v_1$ is not adjacent to $u_j$ in $\bar{G}$. The same holds for $v_2$. Corollary~\ref{ostad}(d) implies that $v_1=v_2$. Without loss of generality suppose $v_1$ is not adjacent to $u_1$. By Corollary~\ref{ostad}(a), $v_1$ is adjacent to some vertex of $C$ in $\bar{G}$. Suppose there are at least two vertices of $C$ adjacent to $v_1$ in $\bar{G}$ and suppose $1< a< b\leq t+3$ are respectively the smallest and the biggest integers such that $u_a,u_b$ are adjacent to $v_1$ in $\bar{G}$. If $b=a+1$, then $v_1$ is adjacent to only two vertices $u_a, u_{a+1}$ in $\bar{G}$. Setting $W=\{u_{t+4},u_{t+5},v_1\}\cup V(C)\setminus \{u_a, u_{a+1}\}$, $\Delta_W$ is not connected and so $\beta_{t+2,t+4}(I)\neq 0$, a contradiction. Thus $b>a+1$. It follows that $C'=v_1-u_b-u_{{b+1}}-\cdots-u_{t+3}-u_1-u_2-\cdots-u_{a}-v_1$ is a minimal cycle of length $t+5+a-b=t+3$ by Lemma~\ref{sedaghashang}. It follows that $b=a+2$ and consequently $u_{t+4}-u_a-v_1-u_b-u_{t+4}$ is a minimal $4$-cycle which contradicts $t>1$. \fi \medspace Now suppose $t=1$. Since $n-|V(C)|>2$ we have $n\geq 7$. By Corollary~\ref{ostad}(c), at least one vertex, say $v_1$ in $[n]\setminus V(C)$ is adjacent to all vertices of $C$ in $\bar{G}$. Since $v_1$ is not isolated in $G$, there exists $v_2\in [n]\setminus(V(C)\cup \{v_1\})$ such that $\{v_1,v_2\}\notin E(\bar{G})$. We claim that $v_2$ is not adjacent to some vertex of $C$ in $\bar{G}$. \medspace {\em Proof of the claim:} Suppose on contrary that $v_2$ is adjacent to all vertices of $C$ in $\bar{G}$. Then we get an induced dipyramid $D$ on the vertex set $V(C)\cup\{v_1,v_2\}$. Now set $W=V(C)\cup \{v_1,v_2,v_3\}$ for some $v_3\in [n]\setminus(V(C)\cup \{v_1,v_2\})$. Since $\beta_{3,7}(I)=0$ we have $T(D)\in \mathrm{Im\ }\partial_{3}^W$, with $T(D)$ similar to the one in (\ref{dipyramid kernel}), which implies that each $2$-face of $D$ is contained in a $3$-face of $\Delta_W$ and hence $v_3$ is adjacent to all vertices of $V(C)\cup \{v_1,v_2\}$ in $\bar{G}$. As $v_3$ is not isolated in $G$, there exists $v_4\in [n]\setminus(V(C)\cup \{v_1,v_2,v_3\})$ such that $\{v_3,v_4\}\notin E(\bar{G})$. Replacing $v_3$ with $v_4$ in the above argument we conclude that $v_4$ is also adjacent to all vertices of $V(C)\cup \{v_1,v_2\}$ in $\bar{G}$. Now set $W=\{v_1,v_2,v_3,v_4\}\cup V(C)$. Then \vspace*{-.55cm} \begin{align*} T=&\sum_{1\leq i\leq 3}\left([v_1,v_3,u_i,u_{i+1}]-[v_1,v_4,u_i,u_{i+1}]-[v_2,v_3,u_i,u_{i+1}]+[v_2,v_4,u_i,u_{i+1}]\right)\\ &-[v_1,v_3,u_1,u_4]+[v_1,v_4,u_1,u_4]+[v_2,v_3,u_1,u_4]-[v_2,v_4,u_1,u_4]\in\ker\partial_3^W \end{align*} while $T\notin\mathrm{Im\ }\partial_{4}^W$, because $\Delta_W$ contains no $4$-face. This implies that $\beta_{3,8}(I)\neq 0$ which is a contradiction. So the claim follows. \vspace{0cm} Without loss of generality suppose $\{v_2,u_4\}\notin E(\bar{G})$. Now consider $v'_3\in [n]\setminus (V(C)\cup\{v_1,v_2\})$. We show that $v'_3$ is adjacent to all vertices of $C$ in $\bar{G}$. Otherwise, setting $W=\{v_2,v'_3\}\cup V(C)$ the same discussion as in (O-4)(ii) shows that $\bar{G}_W$ is isomorphic to the graph $G_{(d)_2}$ in Figure~\ref{type d}, where $\{v'_3,u_2\}\notin \bar{G}_W$. Hence setting $W=\{v_1,v_2,v'_3\}\cup V(C)$, we have \begin{align*} T'=(&\sum_{1\leq i\leq 3}[v_1,u_i,u_{i+1}])-[v_1,u_1,u_4]- [v_2,u_1,u_{2}]-[v_2,u_2,u_{3}]-[v'_3,u_3,u_{4}]\\ &+[v'_3,u_1,u_4]-[v_2,v'_3,u_1]+[v_2,v'_3,u_3]\in\ker\partial_2^W, \end{align*} while $T'\notin \mathrm{Im\ }\partial^W_3$ because $\{v_2,u_1,u_2\}$ is not contained in a $3$-face of $\Delta_W$, and we get a contradiction. Thus $v'_3$ is adjacent to all vertices of $C$ in $\bar{G}$. It follows that setting $W=\{v_1,v_2,v'_3\}\cup V(C)$, a dipyramid $D$ with the vertex set $V(C)\cup \{v_1,v'_3\}$ lies in $\Delta_W$ and so $T(D)\in \ker\partial_{2}^W$ which implies that $T(D)\in \mathrm{Im\ }\partial_{3}^W$. Thus each $2$-face of $D$ is contained in a $3$-face of $\Delta_W$. Since $v_2$ is not adjacent to $u_4$ in $\bar{G}$, we conclude that $\{v_1,v'_3\}\in E(\bar{G})$. Note that by $\beta_{3,5}(I)= 0$, setting $W=V(C)\cup \{v_2\}$, the vertex $v_2$ is adjacent to some vertex $u_i$ of $V(C)$ in $\bar{G}$. Now setting $W=\{v_1,v_2\}\cup V(C)\setminus\{u_i\}$, the same reason implies that $v_2$ is adjacent to some vertex $u_j$ in $V(C)\setminus\{u_i\}$ in the graph $\bar{G}$. Finally, setting $W=\{v_1,v_2, v'_3\}\cup V(C)\setminus \{u_i,u_j\}$ indicates that in the graph $\bar{G}$ the vertex $v_2$ is adjacent to either three vertices $u_i,u_j,u_k$ of $C$ or it is adjacent to the two vertices $u_i,u_j$ of $C$ and to $v'_3$. We show that in the first case $v_2$ is also adjacent to $v'_3$ in $\bar{G}$. Suppose the first case happens. Since $\{v_2,u_4\}\notin E(\bar{G})$, setting $W=\{v_1,v_2,v'_3,u_1,u_3,u_4\}$ we have a minimal cycle $C':=v_2-u_3-u_4-u_1-v_2$ in $\bar{G}_W$ with $T(C')\in \ker\partial_1^W$. Since $\beta_{3,6}(I)=0$, any edge of $C'$ must be contained in a $2$-face of $\Delta_W$ and since $\{v_1,v_2\}\notin E(\bar{G})$ it follows that $v_2$ is adjacent to $v'_3$ in $\bar{G}$. Now since $v'_3$ is not isolated in $G$, there exists $v'_4\in [n]\setminus (V(C)\cup \{v_1,v_2,v'_3\})$ with $\{v'_3,v'_4\}\notin E(\bar{G})$. Replacing $v'_3$ with $v'_4$ in the above discussion, we see that $v'_4$ is adjacent to all vertices of $C$ in $\bar{G}$. Setting $W=V(C)\cup \{v_2,v'_3,v'_4\}$, we have an induced dipyramid $D$ on the vertex set $V(C)\cup\{v'_3,v'_4\}$ with $T(D)\in \ker\partial^W_{2}$ and since $\{v_2,u_4\}\notin \bar{G}_W$ we have $T(D)\notin \mathrm{Im\ }\partial^W_{3}$ that is a contradiction with $\beta_{3,7}(I)=0$. Thus $n\leq t+5$ when $t=1$. \end{proof} Now we are ready to state the main result of this section which determines the graphs whose edge ideals have almost maximal finite index. \begin{thm}\label{check-out} Let $G$ be a simple graph on $[n]$ with no isolated vertex and let $I=I(G)\subset\!S$. Then $I$ has almost maximal finite index if and only if $\bar{G}$ is isomorphic to one of the graphs given in Example~\ref{mesal}. \end{thm} \begin{proof} The ``if" implication follows from Example~\ref{mesal}. We prove the converse. Suppose $\mathrm{index}(I)=t$. Then there is a minimal cycle $C:=u_1-u_2-\cdots-u_{t+3}-u_1$ in $\bar{G}$. Moreover, by Proposition~\ref{number of vertices} there exists $u_{t+4}\in [n]\setminus V(C)$ which by Corollary~\ref{ostad}(a) is adjacent to some vertex $u_i$ of $V(C)$ in $\bar{G}$. Without loss of generality we may assume that $i=1$. By Proposition~\ref{number of vertices} we have $n-(t+3)\leq 2$. We consider two cases: \medspace {\em Case} (i): Suppose $[n]\setminus V(C)=\{u_{t+4}\}$ and let $1\leq l\leq t+3$ be the largest integer such that $\{u_{l},u_{t+4}\}\in E(\bar{G})$. \item[$\bullet$] If $l=1$, then $\bar{G}=G_{(a)_1}$ in Figure~\ref{type a}. \item[$\bullet$] If $l=2$, then $\bar{G}=G_{(a)_2}$ in Figure~\ref{type a}. \item[$\bullet$] If $3\leq l<t+3$, then there is a minimal cycle $C'=u_1-u_{t+4}- u_l- u_{l+1}-\cdots-u_{t+3}-u_1$ of length $t+6-l$. By Lemma~\ref{sedaghashang}, $t+6-l=t+3$ which implies $l=3$. If $\{u_2,u_{t+4}\}\notin E(\bar{G})$, then we will have a minimal $4$-cycle on the vertex set $\{u_1,u_2,u_3,u_{t+4}\}$. It follows from Lemma~\ref{sedaghashang} that $|C|=4$. Hence, $\bar{G}$ is isomorphic to $G_{(c)}$ in Figure~\ref{type c}. If $\{u_2,u_{t+4}\}\in E(\bar{G})$, then $\bar{G}=G_{(a)_3}$ in Figure~\ref{type a}. \item[$\bullet$] If $l=t+3$, then since $G$ does not have isolated vertices, there exists $1<j<t+3$, such that $\{u_{t+4},u_j\}\notin E(\bar{G})$. Let $k,k'$ with $1\leq k< j<k'\leq t+3$ be respectively the largest index and the smallest index such that $\{u_k,u_{t+4}\}, \{u_{k'},u_{t+4}\}\in E(\bar{G})$. It follows that $C'=u_{t+4}-u_k- u_{k+1}-\cdots-u_{k'}-u_{t+4}$ is a minimal cycle and hence $|C'|=k'-k+2=t+3$. Therefore we have either $(k,k')=(1,t+2)$ or $(k,k')=(2,t+3)$. In both cases $\bar{G}$ is isomorphic to $G_{(a)_3}$. {\em Case} (ii): Suppose $[n]\setminus V(C)=\{u_{t+4},u_{t+5}\}$. By Corollary~\ref{ostad}(a) both $u_{t+4},u_{t+5}$ are adjacent to at least one vertex of $C$ in $\bar{G}$. \item[$\bullet$] Suppose in the graph $\bar{G}$ the vertex $u_{t+4}$ is adjacent to at most $2$ vertices of $C$ one of which is $u_1$. Then $u_{t+5}$ is adjacent to all vertices of $C$ in $\bar{G}$ by Corollary~\ref{ostad}(b). Since $\Delta_W$ is connected for $W=[n]\setminus \{u_1\}$, we conclude that $u_{t+4}$ is adjacent to some vertex in $[n]\setminus \{u_1\}$ in $\bar{G}$ and since $u_{t+5}$ is not isolated in $G$, $u_{t+5}$ is not adjacent to $u_{t+4}$ in $\bar{G}$ and hence $u_{t+4}$ is adjacent to some $u_j\in V(C)$ with $j\neq 1$ in $\bar{G}$. We show that either $j=2$ or else $j=t+3$. Otherwise there is a minimal cycle $C':=u_{t+4}-u_1-u_2-\cdots-u_j-u_{t+4}$ of length $j+1$ which is equal to $t+3$, by Lemma~\ref{sedaghashang}. Thus $j=t+2$ which implies that $C'':=u_{t+4}-u_{t+2}-u_{t+3}-u_1-u_{t+4}$ is a minimal $4$-cycle and hence $t=1$. But $T(C''')\in \ker\partial_1\setminus\mathrm{Im\ }\partial_{2}$, where $C''':=u_{5}-u_3-u_{6}-u_1-u_{5}$ is a minimal $4$-cycle in $\bar{G}$. It follows that $\beta_{3,6}(I)\neq 0$, a contradiction. Thus either $j=2$ or else $j=t+3$ and hence $\bar{G}$ is isomorphic to $G_{(b)}$ in Figure~\ref{type b}. Same holds if we interchange $u_{t+4}$ and $u_{t+5}$ in the above argument. \item[$\bullet$] Now suppose $u_{t+4}, u_{t+5}$ are adjacent to at least $3$ vertices of $C$ in $\bar{G}$. If $u_{t+4}$ as well as $u_{t+5}$ is not adjacent to some vertices of $C$ in $\bar{G}$, then as seen in the argument of (O-4)(ii), the graph $\bar{G}$ is isomorphic to $G_{(d)_2}$ in Figure~\ref{type d}. Now consider the case that at least one of the vertices $u_{t+4}, u_{t+5}$, say $u_{t+5}$, is adjacent to all vertices of $C$ in $\bar{G}$. The argument below also works if we interchange $u_{t+4}, u_{t+5}$. Suppose $u_{t+4}$ is adjacent to (at least) three vertices $u_1, u_k, u_j$ of $C$ with $1<k<j\leq t+3$ in the graph $\bar{G}$. Since $u_{t+5}$ is not isolated in $G$, we have $\{u_{t+4},u_{t+5}\}\notin E(\bar{G})$. If $(k,j)\neq (2,t+3)$, then we get the minimal $4$-cycle $C'=u_{t+4}-u_{1}-u_{t+5}-u_l-u_{t+4}$, where $l=k$ if $k\neq 2$, and else $l=j$, and hence $t=1$. If $(k,j)= (2,t+3)$, then we get the minimal $4$-cycle $C''=u_{t+4}-u_{2}-u_{t+5}-u_{t+3}-u_{t+4}$ and so $t=1$ also in this case. From $t=1$ we conclude that $u_1, u_k, u_j$ are successive vertices in $C$. Without loss of generality we may assume that $(k,j)=(2,3)$. Since $\{u_5,u_6\}\notin E(\bar{G})$, in case $\{u_{5}, u_4\}\notin E(\bar{G})$, the graph $\bar{G}$ is isomorphic to $G_{(d)_2}$, and in case $\{u_{5}, u_4\}\in E(\bar{G})$, it is isomorphic to $G_{(d)_1}$ in Figure~\ref{type d}. This completes the proof. \end{proof} All the arguments so far in this section were characteristic independent; consequently \begin{cor}\label{final note} The property of having almost maximal finite index for edge ideals is independent of the characteristic of the base field. In other words, given a simple graph $G$, its edge ideal $I(G)$ has almost maximal finite index over some field if and only if it has this property over all fields. \end{cor} \begin{cor}\label{depth} Let $G$ be a simple graph on $[n]$ with no isolated vertex such that $I=I(G)\subset\!S$ has almost maximal finite index. Then over all fields \begin{align*} \mathrm{pd} (I)=\begin{cases} n-3 \quad \text{if } \bar{G}=G_{(c)} \text{ or } G_{(a)_i},\ i=1,2,3,\\ n-4 \quad \text{if } \bar{G}=G_{(b)}\text{ or } G_{(d)_i}, \ i=1,2.\end{cases} \end{align*} In particular, $3\leq \mathrm{depth} (I)\leq 4$. \end{cor} \begin{proof} Let $\mathrm{index}(I)=t$. By Theorem~\ref{check-out}, $\bar{G}\in\{G_{(a)_1}, G_{(a)_2}, G_{(a)_3}, G_{(b)}, G_{(c)}, G_{(d)_1}, G_{(d)_2}\}$. It follows that \begin{align*} \hspace{1cm} n=\begin{cases} t+4\quad \text{if } \bar{G}=G_{(c)}, G_{(a)_i},\ i=1,2,3,\\ t+5\quad \text{if } \bar{G}=G_{(b)}, G_{(d)_i},\ i=1,2.\end{cases} \end{align*} Since $\mathrm{pd}(I)=t+1$, the assertion follows. The last assertion follows from the Auslander-Buchsbaum formula. \end{proof} In the rest of this section we study the last graded Betti numbers of edge ideals with almost maximal finite index. We first see in the following lemma that the graded Betti numbers of the edge ideals with this property are independent of the characteristic of the base field. The proof takes a great benefit of Katzman's paper \cite{Ka}. \begin{lem}\label{char 2} Let $I\subset S$ be the edge ideal of a simple graph with almost maximal finite index. Then the Betti numbers of $I$ are characteristic independent. \end{lem} \begin{proof} \cite[Theorem~4.1]{Ka} states that the Betti numbers of the edge ideals of the graphs with at most $10$ vertices are independent of the characteristic of the base field. It follows that the graded Betti numbers of $I=I(G)$ with $\mathrm{index} (I)=t$ are characteristic independent when $\bar{G}\in \{G_{(c)},G_{(d)_1}, G_{(d)_2}\}$. By \cite[Corollary~1.6, Lemma~3.2(b)]{Ka}, if $G$ has a vertex $v$ of degree $1$ or at least $|V(G)|-4$, then the Betti numbers of $I(G)$ are characteristic independent if and only if the Betti numbers of $I(G-\{v\})$ are characteristic independent. Here $G-\{v\}$ is the induced subgraph of $G$ on $V(G)\setminus\{v\}$. Since the vertex $t+4$ is of degree one in $\overline{G_{(b)}}$, it follows that the Betti numbers of $I(\overline{G_{(b)}})$ are characteristic independent if and only if so are the Betti numbers of $I(\overline{G_{(a)_2}})$. For $\bar{G}\in \{G_{(a)_i}:\ 1\leq i\leq 3\}$, since $t+4$ is adjacent to at least $t$ vertices in the graph $G$ and since $|V(G)|=t+4$, it is enough to show that the Betti numbers of $I(G-\{t+4\})$ are characteristic independent. But $G-\{t+4\}$ is the complement of a minimal cycle of length $t+3$. Note that by Hochster's formula, all the linear Betti numbers $\beta_{i,i+2}(I)$ are obtained from computing the dimension of $\widetilde{H}_0(\Delta(\bar{G})_W;\mathbb{K})$ with $W\subseteq V(G)$ and $|W|=i+2$, and this dimension equals the number of connected components of $\bar{G}_W$ minus one. Therefore these Betti numbers do not depend on the characteristic of the base field, see also \cite[Corollary~1.2(b)]{Ka}. Moreover, as seen in \cite[Theorem~4.1, Proposition~4.3]{BHZ}, the edge ideal of the complement of a minimal cycle has one nonzero non-linear Betti number $\beta_{t,t+3}(I)=1$ over all fields. Therefore the Betti numbers of $I(G-\{t+4\})$ are characteristic independent, as desired. \end{proof} For the edge ideals with linear resolution all non-linear Betti numbers are zero. For the edge ideals with maximal finite index $t$, it is seen in \cite{EGHP, BHZ} that there is only one nonzero non-linear Betti number $\beta_{t,t+3}(I)=1$ over all fields. In the case of ideals with almost maximal finite index with $\mathrm{index}(I)=t$, the non-linear Betti numbers appear in the last two homological degrees of the minimal free resolution. By the arguments that we had so far, it is easy to compute the $(t+1)$-th graded Betti numbers and also $t$-th non-linear Betti numbers, where $I$ is the edge ideal with almost maximal finite index. Nevertheless, in the cases $\bar{G}=G_{(c)}$ and $\bar{G}=G_{(d)_i}$ for $i=1,2$ one can see the whole Betti table, using {\em Macaulay 2}, \cite{M2}. Note that since all the graphs in Example~\ref{mesal} have at most $t+5$ vertices, where $\mathrm{index}(I(G))=t$, and since the edge ideals are generated in degree $2$, by Hochster's formula it is enough to consider $\beta_{i,j}(I(G))$ for $ i+2\leq j\leq t+5$. \begin{prop}\label{Bettis of almost} Let $G$ be a graph such that $I:=I(G)$ has almost maximal finite index $t$. Then over all fields, $\beta_{t,t+4}(I)=\beta_{t,t+5}(I)=0$ and \begin{align*} \beta_{t,t+3}(I)=\begin{cases} 1\quad \text{if } \bar{G}=G_{(a)_1} \text{ or } G_{(a)_2}\text{ or } G_{(b)},\\ 2\quad\text{if } \bar{G}=G_{(a)_3},\\ 3\quad\text{otherwise},\end{cases} \end{align*} \begin{align*} \beta_{t+1,t+3}(I)&=\begin{cases} 1\quad \text{if } \bar{G}=G_{(a)_1} \text{ or } G_{(b)},\\ 0\quad\text{otherwise,}\end{cases}\\ \beta_{t+1,t+4}(I)&=\begin{cases} 2\quad \text{if } \bar{G}=G_{(c)} \text{ or } G_{(d)_2},\\ 0\quad\text{if }\bar{G}=G_{(d)_1},\\ 1\quad\text{otherwise,}\end{cases}\\ \beta_{t+1,t+5}(I)&=\begin{cases} 1\quad \text{if } \bar{G}=G_{(d)_1},\\ 0\quad\text{otherwise.}\end{cases} \end{align*} In particular, \begin{align*} \hspace*{-2.cm}\mathrm{reg} (I)=\begin{cases} 4\quad \text{if } \bar{G}=G_{(d)_1},\\ 3\quad\text{otherwise.}\end{cases} \end{align*} \end{prop} \begin{proof} All the equalities are straightforward consequences of the use of Hochster's formula and Observation~\ref{connected induced graphs}. However, the Betti number $\beta_{t,t+3}(I)$ can be also deduced from \cite[Theorem~4.6]{FG}. It is worth to emphasize that although $\widetilde{H}_1(\Delta,\mathbb{K})$ is spanned by the set of $0\neq T(C)+\mathrm{Im\ }\partial_2$ for all minimal cycles $C$ of $\bar{G}$, this set may not be a basis. In case $\bar{G}=G_{(c)}$, the graph $\bar{G}$ has three minimal cycles $C$ of length $4$ with $T(C)\notin \mathrm{Im\ }\partial_{2}$, but for the cycle $C=1-2-3-4-1$, $T(C)$ is a linear combination of $T(C'), T(C'')$, where $C', C''$ are the two other cycles of $G_{(c)}$. Hence $\dim_{\mathbb{K}}\widetilde{H}_1(\Delta(G_{(c)}),\mathbb{K})=2$. In the case of $G_{(a)_3}$, we have $0\neq T(C)+ \mathrm{Im\ }\partial_{2}$, where $C$ is the minimal cycle on $[t+3]$, but $T(C)$ is a linear combination of $T(C'), T(C''),T(C''')$, where $C'$ is the minimal cycle on $[t+4]\setminus \{2\}$, and $C'', C'''$ are the two triangles in $G_{(a)_3}$ and hence $\dim_\mathbb{K}\widetilde{H}_1(\Delta(G_{(a)_3}),\mathbb{K})=1$. \end{proof} \section{Powers of edge ideals with large Index}\label{powers of almost maximal} Due to a result of Herzog, Hibi and Zheng, \cite[Theorem~3.2]{HHZh1}, if the edge ideal $I:=I(G)$ has a linear resolution, that is $\mathrm{index} (I)=\infty$, then all of its powers have a linear resolution as well. In case $I$ has maximal finite index $t>1$, then by \cite[Corollary~4.4]{BHZ} the ideal $I^s$ has a linear resolution for all $s\geq 2$. Note that in general for any edge ideal $I$ with $\mathrm{index}(I)=1$, one has $\mathrm{index}(I^s)=1$ for all $s\geq 2$, see Remark~\ref{part 2 of theorem} below. In this section we investigate when the higher powers of the edge ideal $I$ with almost maximal finite index have a linear resolution. Indeed, the aim of this section is to prove the following: \begin{thm}\label{powers} Let $G$ be a simple graph with no isolated vertex whose edge ideal $I(G)\subset S$ has almost maximal finite index. Then $I(G)^s$ has a linear resolution for all $s\geq 2$ if and only if $G$ is gap-free. \end{thm} { Theorem~\ref{powers} follows from Remarks~\ref{part 2 of theorem} and \ref{part 1 of theorem}, and Theorems~\ref{main G_a3} and \ref{I^k has lin res}. Indeed,} we will see in Remark~\ref{part 1 of theorem} that this theorem holds for $G$ with $G\in\{\overline{G_{(a)_1}}, \overline{G_{(a)_2}}\}$ with $t>1$. For $G=\overline{G_{(a)_3}}$ with $t>1$ and $G=\overline{G_{(b)}}$ we will prove the assertion in Theorem~\ref{main G_a3} and Theorem~\ref{I^k has lin res}, respectively. As it is mentioned in Remark~\ref{part 2 of theorem} below, all other graphs whose edge ideals have almost maximal finite index contain a gap. Recall that a {\em gap} in a graph $G$ is an induced subgraph on $4$ vertices and a pair of edges with no vertices in common which are not linked by a third edge; see the graph $G_1$ in Figure~\ref{gcd}. The graph $G$ is called {\em gap-free} if it does not admit a gap; equivalently if $\bar{G}$ does not contain an induced $4$-cycle. This property plays an important role in the study of the resolution of powers of edge ideals; for example \begin{prop}\label{gap free}{$($Francisco-H\`a-Van Tuyl; unpublished, see \cite[Proposition~1.8]{NP} and \cite[Theorem~3.1]{BHZ}$)$} Let $G$ be a simple graph. If $I(G)^s$ has a linear resolution for some $s\geq 1$, then $G$ is gap-free. \end{prop} On the other hand, \begin{rem}\rm \label{part 2 of theorem} A more precise statement about the gap-free graphs is given in \cite[Theorem~3.1]{BHZ} which says that for a graph $G$ the following are equivalent: \begin{itemize} \item[(a)] $G$ admits a gap; \item[(b)] $\mathrm{index}(I(G)^s)=1$ for all $s\geq 1$; \item [(c)] there exists $s\geq 1$ with $\mathrm{index}(I(G)^s)=1$. \end{itemize} If $G$ is the graph whose complement is one of $G_{(a)_1}, G_{(a)_2}, G_{(a)_3}, G_{(b)}$ with $t=1$, or one of $G_{(c)}, G_{(d)_1}, G_{(d)_2}$, then $G$ has a gap. So by the above equivalence $\mathrm{index}(I(G)^s)=1$ for all $s\geq 1$ in this case. \end{rem}\rm In order to prove Theorem~\ref{powers} for $G=\overline{G_{(a)_3}}$ with $t>1$, we need the following result of Banerjee~\cite{Ba}. \begin{thm} \cite[Theorem~5.2]{Ba}\label{Banerjee1} Let $G$ be a simple graph and let $I:=I(G)$ be its edge ideal. Let $\mathcal{G}(I^s)=\{m_1,\ldots, m_r\}$. Then for all $s\geq1$ $$\mathrm{reg}(I^{s+1})\leq\max\{\mathrm{reg}(I^s),\ \mathrm{reg}(I^{s+1}: m_k) + 2s \text{ for } 1\leq k\leq r \},$$ where $(I^{s+1}: m_k)$ denotes the colon ideal, i.e., $(I^{s+1}: m_k)=\{f\in S:\ fm_k\in I^{s+1}\}$. \end{thm} As a consequence of this theorem, Banerjee showed in \cite[Theorem~6.17]{Ba} that for any gap-free and cricket-free graph $G$, the ideal $I(G)^s$ has a linear resolution for all $s\geq 2$. A {\em cricket} is a graph isomorphic to the graph $G_2$ in Figure~\ref{gcd}, and a graph $G$ is called {\em cricket-free} if $G$ contains no cricket as an induced subgraph. Two other classes of graphs which produce edge ideals whose higher powers have linear resolution were given by Erey. She proved in \cite{Er, Er1} that $I(G)^s$ has a linear resolution for all $s\geq 2$ if $G$ is gap-free and also it is either diamond-free or $C_4$-free. A {\em diamond} is a graph isomorphic to the graph $G_3$ in Figure~\ref{gcd}, and a {\em diamond-free} graph is a graph with no diamond as its induced subgraph. A $C_4$-free graph is a graph which does not contain a $4$-cycle as an induced subgraph; i.e. its complement is gap-free. \begin{figure}[ht!] \hspace{.1cm} \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=.5cm,y=.5cm] \clip(2.7,5.3) rectangle (22,11.5); \draw [line width=.7pt] (3,11)-- (3,7); \draw [line width=.7pt] (5,11)-- (5,7); \draw [line width=.7pt] (9.04,10.98)-- (9.04,6.98); \draw [line width=.7pt] (11,9)-- (9.04,6.98); \draw [line width=.7pt] (11,9)-- (9.04,10.98); \draw [line width=.7pt] (11,9)-- (13,11); \draw [line width=.7pt] (11,9)-- (13,7); \draw [line width=.7pt] (17.02,11)-- (17.02,7); \draw [line width=.7pt] (21.02,7)-- (17.02,7); \draw [line width=.7pt] (21.02,11)-- (21.02,7); \draw [line width=.7pt] (21.02,11)-- (17.02,11); \draw [line width=.7pt] (17.02,11)-- (21.02,7); \draw (3.5,6.3) node[anchor=north west] {$G_1$}; \draw (10.5,6.3) node[anchor=north west] {$G_2$}; \draw (18.5,6.3) node[anchor=north west] {$G_3$}; \begin{scriptsize} \draw [fill=black] (3,11) circle (1.5pt); \draw [fill=black] (3,7) circle (1.5pt); \draw [fill=black] (5,11) circle (1.5pt); \draw [fill=black] (5,7) circle (1.5pt); \draw [fill=black] (9.04,10.98) circle (1.5pt); \draw [fill=black] (9.04,6.98) circle (1.5pt); \draw [fill=black] (11,9) circle (1.5pt); \draw [fill=black] (13,11) circle (1.5pt); \draw [fill=black] (13,7) circle (1.5pt); \draw [fill=black] (17.02,11) circle (1.5pt); \draw [fill=black] (17.02,7) circle (1.5pt); \draw [fill=black] (21.02,7) circle (1.5pt); \draw [fill=black] (21.02,11) circle (1.5pt); \end{scriptsize} \end{tikzpicture} \caption{$G_1$ a gap, $G_2$ a cricket, $G_3$ a diamond} \label{gcd} \end{figure} \begin{rem}\rm \label{part 1 of theorem} Clearly, the graphs $\overline{G_{(a)_1}}, \overline{G_{(a)_2}}$ are cricket-free and hence the statement of Theorem~\ref{powers} holds in these two cases using \cite[Theorem~6.17]{Ba}. Note that these graphs are gap-free for $t\geq 2$. On the other hand, the graphs $\overline{G_{(a)_3}}$ and $\overline{G_{(b)}}$ contain crickets for large enough $t$. Indeed, if $t\geq 3$, then the induced subgraph of $\overline{G_{(a)_3}}$ on the vertex set $\{1,2,3, 5,t+4\}$, and if $t\geq 2$, then the induced subgraph of $\overline{G_{(b)}}$ on $\{3,4,5,t+4,t+5\}$ are isomorphic to a cricket. These graphs are not diamond-free in general as well, because for $t\geq 3$, the induced subgraphs on the vertex sets $\{2,4,6,t+4\}$ and $\{3,5,6,t+5\}$ form respectively diamonds in $\overline{G_{(a)_3}}$ and $\overline{G_{(b)}}$. They are not even $C_4$-free for $t\geq 3$ since ${G_{(a)_3}}$ and ${G_{(b)}}$ contain gaps. Therefore, when $G\in \{\overline{G_{(a)_3}},\overline{G_{(b)}}\}$ and $t$ is large enough, one cannot take benefit of the results of Banerjee or Erey to deduce Theorem~\ref{powers}. \end{rem}\rm It is shown in \cite[Section~6]{Ba} that for the edge ideal $I$ of a simple graph $G$ and the minimal generator $m_k$ of $I^s$, $s\geq1$, the ideal $(I^{s+1}: m_k)$ is a quadratic monomial ideal whose polarization coincides with the edge ideal of a simple graph with the construction explained in Lemma~\ref{Banerjee3} below. For the details about the polarization technique, the reader may consult with \cite{HHBook}. Throughout this section, for an edge $e=\{i,j\}$ of a graph $G$ its associated quadratic monomial $x_ix_j$ is denoted by ${\bf x}_e$. \begin{lem} \cite[Lemma~6.11]{Ba}\label{Banerjee3} Let $G$ be a simple graph with the edge ideal $I:=I(G)$, and let $m_k={\bf x}_{e_1}\cdots {\bf x}_{e_s}$ be a minimal generator of $I^s$, where $e_1,\ldots, e_s$ are some edges of $G$. Then the polarization $(I^{s+1}: m_k)^{pol}$ of the ideal $(I^{s+1}: m_k)$ is the edge ideal of a new graph $G_{e_1\ldots e_s}$ with the following structure: \begin{itemize} \item[(1)] $V(G)\subseteq V(G_{e_1\ldots e_s})$, $E(G)\subseteq E(G_{e_1\ldots e_s})$. \item[(2)] Any two vertices $u, v$, $u\neq v$, of $G$ that are even-connected with respect to $e_1\cdots e_s$ are connected by an edge in $G_{e_1\ldots e_s}$. \item[(3)] For every vertex $u$ which is even-connected to itself with respect to $e_1\cdots e_s$ there is a new vertex $u'\notin V(G)$ which is connected to $u$ in $G_{e_1\ldots e_s}$ by an edge and not connected to any other vertex $($so $\{u,u'\}$ is a whisker in $G_{e_1\ldots e_s}$$)$. \end{itemize} \end{lem} In \cite{Ba}, two vertices $u$ and $v$ of a graph $G$ ($u$ may be same as $v$) are said to be {\em even-connected} with respect to an $s$-fold product $e_1\cdots e_s$ in $G$ if there is a path $P=p_0-p_1-\cdots-p_{2k+1}$, $k\geq 1$, in $G$ such that: \begin{itemize} \item[(1)] $p_0=u, p_{2k+1}=v.$ \item[(2)] For all $0\leq l \leq k-1$, $\{p_{2l+1}, p_{2l+2}\}=e_i$ for some $1\leq i\leq s$. \item[(3)] For all $i$, $|\{l:\ 0\leq l\leq k-1, \ \{p_{2l+1}, p_{2l+2} \}=e_i \} | \leq | \{j :\ 1\leq j\leq s, \ e_j=e_i \} |$. \item[(4)] For all $0 \leq r \leq 2k$, $\{p_r, p_{r+1}\}$ is an edge in $G$. \end{itemize} \medskip Now we are ready to prove Theorem~\ref{powers} for $G=\overline{G_{(a)_3}}$ with $t>1$. \begin{thm}\label{main G_a3} Let $G$ be a graph on $n\geq 6$ vertices such that $G_{(a)_3}$ is its complement. Let $I:=I(G)$ be the edge ideal of $G$. Then $I^s$ has a linear resolution for $s\geq 2$. \end{thm} \begin{proof} Note that $t+4=n\geq 6$ implies that $t>1$. We first show that for any $s\geq 1$ and any $s$-fold product $e_1\cdots e_s$ of the edges in $G$, the graph $\overline{G_{e_1\cdots e_s}}$ is chordal, where $G_{e_1\cdots e_s}$ is a simple graph explained in Lemma~\ref{Banerjee3} with the edge ideal $I(G_{e_1\cdots e_s})=(I^{s+1}:\ {\bf x}_{e_1}\cdots {\bf x}_{e_s})^{pol}$. Since by \cite[Lemmas~6.14, 6.15]{Ba}, any induced cycle of $\overline{G_{e_1\cdots e_s}}$ is an induced cycle of $\bar{G}$, we conclude that if $\overline{G_{e_1\cdots e_s}}$ contains an induced cycle $C$ of length $>3$, then $C\in \{C_1, C_2\}$, where $C_1=1-2-\cdots-(t+3)-1$ and $C_2=1-(t+4)-3-4-\cdots-(t+3)-1$. Thus, in order to prove that $\overline{G_{e_1\cdots e_s}}$ is chordal, we need to show that $C_1,C_2$ are not induced cycles in $\overline{G_{e_1\cdots e_s}}$ for $s\geq 1$. We claim that there exist $k,l\in V(G_{e_1\cdots e_s})$ such that $\{k,l\}\in E(G_{e_1\cdots e_s})\cap E(C_r)$, $r=1,2$. It follows that $C_r$ is not a subgraph of $\overline{G_{e_1\cdots e_s}}$, as desired \medspace \textit {Proof of the claim:} Let $e_1=\{i,j\}$ with $i<j$ and let $s\geq 1$. We choose $\{k,l\}\in E(C_1)$ as follows: \begin{itemize} \item[$(a)$] If $e_1=\{4,t+4\}$, then let $k=1$ and $l=t+3$; \item[$(b)$] if $e_1=\{1,t+2\}$, then let $k=3$ and $l= 2$; \item[$(c)$] if $e_1=\{2,t+3\}$, then let $k=4$ and $l= 3$; \item[$(d)$] otherwise, let $k=\overline{i-2}$ and $l=\overline{i-1}$. \end{itemize} Since $C_2$ is obtained from $C_1$ by replacing $2$ with $t+4$, in order to find $\{k,l\}\in E(C_2)$, we choose $\{k,l\}\in E(C_2)$ as suggested in $(a)-(d)$ with an extra condition that if $\{k,l\}$ is obtained from $(b),(d)$ and it contains $2$, then we replace $2$ with $t+4$ in this pair. \medspace By the above choices of $k,l$, although $\{k,l\}\notin E(G)$, we have $\{k,i\}, \{j, l\}\in E(G)$. It follows that $k-i-j-l$ is a path in $G$ and hence, by definition, $k$ and $l$ are even-connected with respect to $e_1\cdots e_s$. Therefore $\{k,l\}\in E(G_{e_1\cdots e_s})$. This completes the~proof~of~the~claim. \medspace Now since $\overline{G_{e_1\cdots e_s}}$ is chordal for $s\geq 1$, by \cite[Theorem~1]{Fr}, $I(G_{e_1\cdots e_s})$ has a $2$-linear resolution for $s\geq 1$. It follows that for any choice of the edges $e_1,\ldots, e_s$ of $G$ one has \begin{align*}\mathrm{reg}((I^{s+1}:\ {\bf x}_{e_1}\cdots {\bf x}_{e_s}))=\mathrm{reg}((I^{s+1}:\ {\bf x}_{e_1}\cdots {\bf x}_{e_s})^{pol})=\mathrm{reg}(I(G_{e_1\cdots e_s}))=2 \end{align*} The first equality follows from \cite[Corollary~1.6.3]{HHBook}. By Proposition~\ref{Bettis of almost} we have $\mathrm{reg}(I)=3$. Theorem~\ref{Banerjee1} implies that $\mathrm{reg}(I^2)\leq 4$. Since $I^2$ is generated in degree $4$ we conclude that $\mathrm{reg}(I^2)=4$. Now induction on $s>1$ and using Theorem~\ref{Banerjee1} yield the assertion. \end{proof} \medskip Now it remains to prove Theorem~\ref{powers} for $\overline{G_{(b)}}$. The crucial point in the proof of Theorem~\ref{powers} for $\overline{G_{(a)_3}}$ was to show that $\mathrm{reg}((I(\overline{G_{(a)_3}})^{s+1}:\ m_k))=2$ for all minimal generators $m_k$ of $I(\overline{G_{(a)_3}})^{s}$. Having proved this statement, we deduced that the upper bound of $\mathrm{reg}(I(\overline{G_{(a)_3}})^{s+1})$ in Theorem~\ref{Banerjee1} is $2s+2$ and hence the desired conclusion was followed. The same method will not work for $\overline{G_{(b)}}$. Indeed, computations by {\em Macaulay~2}, \cite{M2}, shows that $\mathrm{reg}((I(\overline{G_{(b)}})^{s+1}:\ m_k))=3$, where $s\geq 1$ and $m_k=x_{t+5}^sx_{t+4}^s$ is a minimal generator of $I(\overline{G_{(b)}})^{s}$. Hence the upper bound of $\mathrm{reg}(I(\overline{G_{(b)}})^{s+1})$ in Theorem~\ref{Banerjee1} is at least $2s+3$ which is greater than the degree of the generators of $I(\overline{G_{(b)}})^{s+1}$ and consequently one cannot deduce that this ideal has a linear resolution only by computing the upper bound in Theorem~\ref{Banerjee1}. Therefore in order to prove Theorem~\ref{powers} for $\overline{G_{(b)}}$ we need some other tool. This tool is provided in the following result of Dao et al. \begin{lem}\label{Dao}{\cite[Lemma~2.10]{DHS}} Let $I\subset S$ be a monomial ideal, and let $x$ be a variable appearing in some generator of $I$. Then $$\mathrm{reg}(I)\leq \max\{\mathrm{reg}((I:x)) + 1,\mathrm{reg}(I+(x))\}.$$ Moreover, if $I$ is squarefree, then $\mathrm{reg}(I)$ is equal to one of these terms. \end{lem} We will apply this result for $I:=I(\overline{G_{(b)}})^{s+1}$, $s\geq 1$, and $x:=x_{t+5}$. In Theorem~\ref{linquo of square} we will compute the regularity of the ideal $(I(\overline{G_{(b)}})^{s+1}:x_{t+5})$, $s\geq 1$, by showing that it has linear quotients. Recall that a graded ideal $I$ is said to have {\em linear quotients} if there exists a homogeneous generating set of $I$, say $\{f_1,\ldots,f_m\}$, such that the colon ideal $\left((f_1,\ldots,f_{i-1}):f_i\right)$ is generated by variables for all $i>1$. By \cite[Theorem~8.2.1]{HHBook} equigenerated ideals with linear quotients have a linear resolution. In the next result, Proposition~\ref{step1}, we provide a step of the proof of Theorem~\ref{linquo of square} which is a bit long yet easy to follow. In the proof of this proposition and also Theorem~\ref{linquo of square} we need to order the generators of the given ideals. To this end we should first order the multisets of edges of the associated graphs. We will use the following order in both proofs: \medspace {\em Let $G$ be a simple graph. For $e=\{i,j\}\in E(G)$ with $i<j$ and $e'=\{i',j'\}$ with $i'<j'$, we let $e<e'$ if either $i<i'$ or $i=i'$ with $j<j'$. Let $r\geq 1$. We denote by $\mathbf{e}:=(e_{i_1},\ldots,e_{i_{r}})$ the multiset $\{e_{i_1},\ldots,e_{i_{r}}\}$ of the edges of $G$, where $e_{i_1}\leq\cdots\leq e_{i_{r}}$. If $\mathbf{e'}:=(e_{i'_1},\ldots,e_{i'_{r}})$ is another ordered multiset in $E(G)$ of the same size $r$, we let $\mathbf{e}\leq \mathbf{e'}$ if either $\mathbf{e}=\mathbf{e'}$ or else there exists $1\leq j\leq r$ such that $e_{i_l}=e_{i'_l}$ for all $l<j$ and $e_{i_j}<e_{i'_j}$.} \medspace For the ordered multiset $\mathbf{e}:=(e_{i_1},\ldots,e_{i_{r}})$ of the edges of the graph $G$, we denote by $\x{\mathbf{e}}$ the monomial $\x{e_{1}}\cdots\x{e_{r}}$. Moreover, we denote by $\mathrm{supp}(m)$ the set of all variables dividing the monomial $m\in S$ and also denote by $\deg_{m}x_{i}$ the largest integer $d$ such that $x_i^d$ divides $m$. We use the notation $m|m'$ ($m\centernot|m'$ resp.) when a monomial $m$ divides (does not divide resp.) a monomial $m'$. \begin{prop}\label{step1} Let $C=1-2-\cdots-(t+3)-1$, $t\geq 1$, be a cycle graph and let $t+4$ be a vertex not belonging to $C$. Then for $s\geq 0$ the ideal $L=I(\bar{C})^{s}(x_3,\ldots,x_{t+4})$ has linear quotients. \end{prop} \begin{proof} For $s=0$ the assertion is obvious. Suppose $s\geq 1$. We order the edges of $G:=\bar{C}$ as described above. Each element $m$ in the minimal generating set $\mathcal{G}(L)$ of $L$ can be written as $m=\x{\e{}}x_k$, where $\e{}=(e_{1},\ldots, e_{{s}})$ is an ordered multiset of the edges of $\bar{C}$ and $x_{k}\in \{x_3,\ldots,x_{t+4}\}$. Note that there may be different multisets associated to $m$ and hence different presentations of $m$ as above. In this case we consider the presentation of $m$ whose associated ordered multiset of the edges is the smallest. This means that if there is another presentation of $m$ as $\x{\e{}'}x_{k'}$ with $\e{}\neq \e'{}$, then we consider the presentation $\x{\e{}}x_k$ for $m$ if $\e{}<\e{}'$. By this setting, each minimal generator $m_l$ of $L$ has a unique {\em smallest} presentation $m_l=\x{\e{l}}x_k$, where $\e{l}$ denotes the smallest multiset of the edges associated to $m_l$. Now we order the generators of $L$ as follows: for $m_q,m_l\in\mathcal{G}(L)$ with $m_q=\x{\e{q}}x_{k'}$, $m_l=\x{\e{l}}x_{k}$, we let $m_q<m_l$ if either $\mathbf{e}_q<\mathbf{e}_{l}$ or $\mathbf{e}_q=\mathbf{e}_{l}$ with $k'<k$. Suppose $\mathcal{G}(L)=\{m_1,\ldots,m_r\}$ with $m_1<\!\cdots\!<m_r$. We show that for any $m_l\in\!\mathcal{G}(L)$ with $l\!>1$, the ideal $\left((m_1,\ldots, m_{l-1}):m_l\right)$ is generated by some variables. Set $J_l:=(m_1,\ldots, m_{l-1})$. By \cite[Proposition~1.2.2]{HHBook}, the ideal $(J_l:m_l)$ is generated by the elements of the set $\{m_q/\gcd(m_q,m_l):\ 1\leq q\leq l-1\}$. Let $m_{q,l}:=m_q/\gcd(m_q,m_l)$ for $m_q<m_l$. Suppose $m_l=\mathbf{x}_{\mathbf{e}_l} x_k$, $m_q=\mathbf{x}_{\mathbf{e}_q} x_{k'}$ with $\mathbf{e}_l:=(e_{1},\ldots,e_{s})$, $\mathbf{e}_q:=(e'_{1},\ldots,e'_{s})$ and $3\leq k, k'\leq t+4$. Let $e_{i}=\{a_i, b_i\}$, $e'_{i}=\{a'_i, b'_i\}$ with $1\leq a_i<b_i-1\leq t+2$ and $1\leq a'_i<b'_i-1\leq t+2$ for $1\leq i\leq s$. In order to show that $(J_l:m_l)$ is generated by variables, we show that for each $q<l$, there exists $p<l$ such that $m_{p,l}$ is of degree one and it divides $m_{q,l}$. If $\deg m_{q,l}=1$, then we set $p:=q$ and so we are done. Assume that $\deg m_{q,l}>1$. First suppose $q=1$. Then $m_q=x_1^sx_3^{s+1}$. If $x_1| m_{q,l}$, then there exists $1\leq i\leq s$ with $1\notin e_i=\{a_i,b_i\}$. If $b_i\neq t+3$, then set $e:=\{1,b_i\}$ and if $b_i=t+3$ with $a_i\neq 2$, set $e:=\{1,a_i\}$. Now set $m_p:=(\x{\e {l}}\x{e}/\x{e_i})x_k$. Since $e<e_i$ we have $p<l$. Moreover, $m_{p,l}=x_1$ and so we are done in this case. Suppose $e_i=\{2,t+3\}$ for all $e_i\in \e{l}$ with $1\notin e_i$. It follows that $x_3|m_{q,l}$. If $k\neq 3$, then set $m_p:=\x{\e{l}}x_{3}$. Since $3<k$ we have $p<l$ and $m_{p,l}=x_3$. If $k=3$, then set $e:=\{1,3\}$ and $m_p:=(\x{\e {l}}\x{e}/\x{e_i})x_{t+3}$. Now suppose $x_1\centernot| m_{q,l}$. Then $x_3|m_{q,l}$ and $1\in e_i$ for all $1\leq i\leq s$, and since $\deg m_{q,l}>1$ there exists $e_i\in\e{l}$ with $3\notin e_i$. Set $e:=\{1,3\}$ and $m_p:=(\x{\e {l}}\x{e}/\x{e_i})x_k$. So we are done if $q=1$. Now suppose $q>1$ and for all $q'<q$ there is $p'<l$ with $\deg m_{p',l}=1$ and $m_{p',l}|m_{q',l}$. We prove the assertion by induction on $q$. Suppose there exist $e'_i\in \mathbf{e}_q$ and $e_j\in\mathbf{e}_l$ with $e'_i=e_j$. The monomials $m'_{l}:= m_l/\mathbf{x}_{e_j}, m'_q:=m_q/\mathbf{x}_{e'_i}$ belong to $I(\bar{C})^{s-1}(x_3,\ldots,x_{t+4})$ and $m'_q<m'_l$ and $m_{q,l}=m'_q/\gcd(m'_q,m'_l)$. If there exists $m'_p\in I(\bar{C})^{s-1}(x_3,\ldots,x_{t+4})$ with $m'_p<m'_l$, where $m'_p/\gcd(m'_p,m'_l)$ is of degree one dividing $m'_q/\gcd(m'_q,m'_l)$, then setting $m_p:=m'_p\mathbf{x}_{e_i}$ one has $m_p\in J_l$ and $\deg m_{p,l}=1$, where $m_{p,l}$ divides $m_{q,l}$, as desired. So it is enough to prove the assertion for $m'_q,m'_l$. Consequently, from now on we may suppose that $\mathbf{e}_q\cap \mathbf{e}_l=\emptyset$. In particular, $\mathbf{e}_q\neq\mathbf{e}_l$ and hence $\mathbf{e}_q<\mathbf{e}_l$. Since $\mathbf{e}_q, \mathbf{e}_l$ do not share an edge, it follows that $e'_1<e_1$ which means that either $a'_1<a_1$ or $a'_1=a_1$ with $b'_1<b_1$. {\em Case} (i): $a'_1<a_1$. If $a'_1=k$, then $3\leq k<a_1<b_1-1$ implies that $e:=\{k, b_1\}\in E(\bar{C})$ with $e<e_1$ and hence by interchanging $x_{a_1}$ in $\x{e_{1}}$ and $x_k$ we get a smaller presentation for $m_l$, a contradiction. Therefore $a'_1\neq k$. Note that $a'_1<a_1\leq a_i<b_i$ for all $i$. Thus $x_{a'_1}\centernot|m_l$ which implies that $x_{a'_1}|m_{q,l}$. Since $a'_1<b_i-1$ for all $i$, we have $e:=\{a'_1,b_i\}\in E(\bar{C})$, unless $\{a'_1,b_i\}=\{1,t+3\}$. If $\{a'_1,b_i\}=\{1,t+3\}$ for all $i$ and if there exists $i$ with $a_i\neq 2$, then set $e:=\{a'_1,a_i\}$. In both cases we have $e<e_i$ and hence $m_p:= (\x{\e {l}}\x{e}/\x{e_i})x_k<m_l$ with $m_{p,l}=x_{a'_1}$. Suppose $a'_1=1$ and $e_i=\{2,t+3\}$ for all $i$. We have $k\in\{3,t+3,t+4\}$, because otherwise by interchanging $x_{t+3}$ in $\x{e_i}$ and $x_k$ we get a smaller presentation for $m_l$, a contradiction. If $k=3$, then set $e:=\{1,3\}$ and $m_p:=(\x{\e {l}}\x{e}/\x{e_i})x_{t+3}$. If $k\in\{t+3,t+4\}$, since $b'_1\notin\{2,t+3,t+4\}$, we have $x_{b'_1}\centernot|m_l$ and hence $x_{b'_1}|m_{q,l}$. Set $m_p:=\x{\e{l}}x_{b'_1}$. \medspace {\em Case} (ii): $a'_1=a_1$ and $b'_1<b_1$. If $x_{b'_1}|m_{q,l}$ then set $m_p:=(\x{\e {l}}\x{e'_1}/\x{e_1})x_k$. Suppose $x_{b'_1}\centernot|m_{q,l}$ and hence $x_{b'_1}|m_l$. If $k=b'_1$, then interchanging $x_{b_1}$ in $\x{e_1}$ and $x_k=x_{b'_1}$ will result in a smaller presentation for $m_l$, a contradiction. Therefore, $k\neq b'_1$ and hence $b'_1\in e_h$ for some $e_h\in\e{l}$. Thus $e_h\neq e_1$. If $b$ is another vertex of $e_h$, then $b\in\{b_1,b_1-1,\overline{b_1+1}\}$ since otherwise we get a smaller presentation of $m_l$ by interchanging $b_1$ in $e_1$ and $b'_1$ in $e_h$, a contradiction. Since $\deg m_{q,l}>1$, we have $\mathrm{supp}(m_{q,l})\neq \{x_{t+4}\}$. Thus $x_a|m_{q,l}$ for some $a\neq t+4$. If $b_1\notin \{a,\overline{a-1},\overline{a+1}\}$ ($b\notin \{a,\overline{a-1},\overline{a+1}\}$ resp.), then set $e:=\{a,b_1\}$ ($e:=\{a,b\}$ resp.) and $m_p:=(\x{\e {l}}\x{e'_1}\x{e}/(\x{e_1}\x{e_h}))x_k$. Suppose $b_1, b\in \{a,\overline{a-1},\overline{a+1}\}$ for all $a\neq t+4$ with $x_a|m_{q,l}$. If $b_1= \overline{a+1}$, since $b_1>1$ we have $a\neq t+3$ and $b_1=a+1$. Since $a_1<b'_1-1<b_1-1=a$ one has $e:=\{a_1,a\}\in E(\bar{C})$. Set $m_p:=(\x{\e{l}}\x{e}/\x{e_1})x_k$. Now suppose $b_1\in \{a,\overline{a-1}\}$ for all $a$ with $x_a|m_{q,l}$ and $a\neq t+4$. If $a=1$, then since $a'_1=a_1$ is the smallest vertex in $\e{q}$ one has $a_1=1$ and $b_1\in\{1,t+3\}$ which is a contradiction. If $a\in\{2,3\}$, then $b_1\in \{1,2,3\}$ which is again a contradiction because $1\leq a_1<b'_1-1<b_1-1$. Therefore, $a\geq 4$ for all $a$ with $x_a|m_{q,l}$. In particular, $\overline{a-i}=a-i$ for $a\neq t+4$ and $i=1,2,3$. If $a<k$, then set $m_p:=\x{\e{l}}x_a$ and so we are done. Suppose $a\geq k$ for all $a$ with $x_a|m_{q,l}$. Since $\deg m_{q,l}>1$, there exists $a$ with $x_a\in\mathrm{supp}(m_{q,l})\cap \mathrm{supp}(\x{\e{q}})$. Suppose $e'_{i_1}=\{a,c\}\in\e{q}$. If $x_{c}|m_{q,l}$, then $c\neq t+4$ implies that $b_1\in \{a,a-1\}\cap\{c,{c-1}\}$. But $c\notin \{a,a-1,\overline{a+1}\}$ and hence $ \{a,a-1\}\cap\{c,{c-1}\}=\emptyset$, a contradiction. Thus $x_{c}\centernot|m_{q,l}$ and consequently $x_{c}|m_l$. Suppose $c=k$. Then $c\leq a$ and since $\{a,c\}\in E(\bar{C})$ we have $c<a-1$. If $c\neq {a-2}$, then $b\in \{a,{a-1},\overline{a+1}\}$ implies that $e:=\{c, b\}\in E(\bar{C})$. Set $m_p:=(\x{\e{l}}\x{e}\x{e'_1}/(\x{e_1}\x{e_h}))x_a$. We have $m_p\leq m_l$. If $m_p=m_l$, then $b_1=a$ which implies that $(\x{\e{l}}\x{e}\x{e'_1}/(\x{e_1}\x{e_h}))x_a$ is a smaller presentation for $m_l$, a contradiction. Thus $m_p<m_l$ and $m_{p,l}=x_a$, as desired. Now suppose $k=c={a-2}$. Then $a\geq 5$, and $a_1\in\{a-1,a-2,{a-3}\}$ since otherwise $\{a_1,a-2\}\in E(\bar{C})$ and by interchanging $x_{b_1}$ in $\x{e_1}$ and $x_k=x_{a-2}$ in the presentation of $m_l$ we get a smaller presentation which is a contradiction. From $a_1\in\{a-1,a-2,{a-3}\}$, and $a_1+1<b'_1<b_1\in \{a,a-1\}$ we conclude that $a_1={a-3}$, $b'_1=a-1$ and $b_1=a$. Thus $b\in \{a,a-1,\overline{a+1}\}$ implies that $b=\overline{a+1}$ and therefore interchanging $x_{b'_1}$ in $\x{e_h}$, where $e_h=\{b'_1,b\}=\{a-1,\overline{a+1}\}$, and $x_k=x_{a-2}$ will give a smaller presentation, a contradiction. { Note that since $a\geq 5$, we have $\{b, a-2\}=\{\overline{a+1}, a-2\}\in E(\bar{C})$. } Assume now that $c\neq k$. Then there is $e_{i_2}\in\e{l}$ with $c\in e_{i_2}$. If $d$ is another vertex of $e_{i_2}$, then we may assume that $d<a$, because $\e{q}\cap\e{l}=\emptyset$ and if $d>a$, then we can set $m_p:=(\x{\e{l}}\x{e'_{i_1}}/\x{e_{i_2}})x_k$ which yields the result. First assume that $b_1=a$. If $b'_1\leq d$, since $a_1+1<b'_1\leq d<a=b_1$, we have $e:=\{a_1,d\}\in E(\bar{C})$ with $e<e_1$ and hence interchanging $a$ in $e_1$ and $d$ in $e_{i_2}$ will give a smaller presentation for $m_l$, a contradiction. Thus $b_1=a$ implies that $b'_1>d$ and since $d<b'_1<b_1$ we have $e:=\{d, b_1\}\in E(\bar{C})$, because otherwise $d=1$ and $b_1=t+3$ and since $a_1\leq d$ we have $a_1=1$ and $e_1=\{1,t+3\}$, a contradiction. Moreover, $e_{i_2}\neq e_1,e_h$. Set $m_p:=(\x{\e{l}}\x{e'_1}\x{e}\x{e'_{i_1}}/(\x{e_1}\x{e_{i_2}}\x{e_h}))x_k$. We have $m_p\leq m_l$. If $b=a$, then $(\x{\e{l}}\x{e'_1}\x{e}\x{e'_{i_1}}/(\x{e_1}\x{e_{i_2}}\x{e_h}))x_k$ is a smaller presentation for $m_l$, a contradiction. Hence $b\neq a$ and thus $m_p<m_l$ with $m_{p,l}=x_a$. Now assume that $b_1= a-1$ which implies that $b\in \{a,a-1\}$, because $b\in\{b_1-1, b_1,\overline{b_1+1}\}\cap\{a-1,a,\overline{a+1}\}$. If $d<b'_1$, then $d<b'_1<b_1=a-1\leq b$. If $\{d,b\}= \{1,t+3\}$, then $d=1$ implies that $a_1=1$ and since $c\neq a-1$ we have $e_1\neq e_{i_2}$ which implies that $\{1,a-1\}=e_1<e_{i_2}=\{1,c\}$ and hence $b_1=a-1<c$. Moreover, $b=t+3\in \{a-1,a\}$ implies that $a=t+3$ and hence $c=t+3$, a contradiction to $\{a,c\}\in E(\bar{C})$. Thus $\{d,b\}\neq \{1,t+3\}$ which implies that $e:=\{d,b\}\in E(\bar{C})$. Set $m_p:=(\x{\e{l}}\x{e}\x{e'_1}\x{e'_{i_1}}/(\x{e_h}\x{e_1}\x{e_{i_2}}))x_k$. Thus we may suppose that $b'_1\leq d$. If $d<a-1$, then set $e:=\{a_1,d\}$ and since $e_1\neq e_{i_2}$ we set $m_p:=(\x{\e{l}}\x{e}\x{e'_{i_1}}/(\x{e_1}\x{e_{i_2}}))x_k$. Suppose now that $d=a-1$. Note that from $k\leq a$ we conclude that $k\in\{a-1,a\}$ since otherwise if $k=a-2$, then by interchanging $x_{b_1}=x_{a-1}$ in $\x{e_1}$ and $x_{k}=x_{a-2}$ we get a smaller presentation for $m_l$, and if $k<a-2$, setting $e:=\{k,b\}$, we again get $(\x{\e{l}}\x{e'_1}\x{e}/(\x{e_1}\x{e_h}))x_{a-1}$ as a smaller presentation for $m_l$. If $x_{a-1}|m_{q,l}$, or if $\deg_{m_q}x_{a-1}< \deg_{m_l}x_{a-1}$, then set $m_{q'}:=(\x{\e{q}}\x{e_{i_2}}/\x{e'_{i_1}})x_{k'}$. Since $m_{q'}<m_q$ and since $\mathrm{supp}(m_{q',l})\subseteq\mathrm{supp}(m_{q,l})$, by induction hypothesis we are done. Suppose $\deg_{m_q}x_{a-1}= \deg_{m_l}x_{a-1}$. Since $x_{a-1}|m_l$ we have $x_{a-1}|m_q$ as well. Note that $k'\neq a-1$, otherwise interchanging $x_{k'}$ and $x_a$ in $\x{e'_{i_1}}$ will result in a smaller presentation for $m_q$, a contradiction. It follows that there exists $e'_{i_3}=\{a-1,f\}\in \e{q}$ for some $f$ with $f\neq c, a_1$ because $\e{q}\cap \e{l}=\emptyset$. If $x_f|m_{q,l}$, then we must have $a-1=b_1\in \{f,\overline{f-1}, \overline{f+1}\}$, a contradiction. Thus $x_f\centernot|m_{q,l}$. As $f\neq a,a-1$ we have $f\neq b$ and also $f\neq k$ which implies that $f$ appears in an edge of $\e{l}$. If $f=b'_1$, then again $\e{q}\cap\e{l}=\emptyset$ implies that $b=a$. Therefore we have $e'_{i_1}=\{a,c\}, e'_{i_3}=\{a-1, b'_1\}\in \e{q}$ and $e_{i_2}=\{a-1,c\}, e_h=\{a,b'_1\}\in \e{l}$ which contradict the fact that $\e{l}$ and $\e{q}$ are the smallest multisets associated to $m_l$ and $m_q$, respectively. Thus $f\neq b'_1$ and hence $f\notin e_1\cup e_h\cup e_{i_2}\cup\{k\}$. It follows that there exists $e_{i_4}\neq e_1,e_{i_2}, e_h$ such that $e_{i_4}=\{f,g\}\in \e l$ for some $g$ with $g\neq a-1$. If $g>a$, { then $a\leq t+2$ and hence $\overline{a+1}=a+1$. } We have $f\neq a+1$ because otherwise we will have $g>a+2$ and since $k\in\{a,a-1\}$ by interchanging $x_f$ in $\x{e_{i_4}}$ and $x_k$ one gets a smaller presentation for $m_l$ which is a contradiction. {Note that assuming $f=a+1$ one deduces from $g>a$ and $g\notin \{a,a+1,\overline{a+2}\}$ that $a+1<g\leq t+3$ and hence $\overline{a+2}=a+2$.} Now set $e:=\{f,a\}\in E(\bar{C})$ and $m_p:=(\x{\e{l}}\x{e}/\x{e_{i_4}})x_k$. If $g=a$, then we have $e'_{i_1}=\{a,c\}, e'_{i_3}=\{a-1, f\}\in \e{q}$ and $e_{i_2}=\{a-1,c\}, e_{i_4}=\{a,f\}\in \e{l}$ which again contradict the fact that $\e{l}$ and $\e{q}$ are the smallest multisets associated to $m_l$ and $m_q$, respectively. Thus $g\neq a$ which implies that $g<a-1$. If $g\notin \{a_1,a_1+1, \overline{a_1-1}\}$, then interchanging $a-1$ in $e_1$ and $g$ in $e_{i_4}$ will give a smaller presentation for $m_l$, a contradiction. Thus $g\in \{a_1,a_1+1, \overline{a_1-1}\}$. Since $g\geq a_1$ we have $g\in \{a_1, a_1+1\}$. If $g=a_1$, then $e_1\leq e_{i_4}$ implies that $f\geq a-1$. Since $f\neq a, a-1$ we have $f>a$. This in particular implies that $a\neq t+3$ and hence it follows from $a_1+1<a-1$ that $e:=\{a_1, a\}\in E(\bar{C})$. Now set $m_p:=(\x{\e{l}}\x{e}/\x{e_{i_4}})x_k$. Suppose $g=a_1+1$. Then $e:=\{a_1, f\}\in E(\bar{C})$ because $a_1\leq f$ and $f\notin \{a_1,a_1+1\}$ by $e_{i_4}=\{f, a_1+1\}\in\e{l}$. Moreover, $e':=\{a_1+1, a-1\}\in E(\bar{C})$ because $a_1+1<b'_1<a-1$. If $f<a-1$, then $(\x{\e{l}}\x{e}\x{e'}/(\x{e_1}\x{e_{i_4}})x_k$ is a smaller presentation for $m_l$ which is a contradiction. Thus $f>a$ and hence set $m_p:=(\x{\e{l}}\x{e''}/\x{e_{i_4}})x_k$, where $e'':=\{a_1+1, a\}$. This completes the proof. \end{proof} Now we extend the ideal $L$ of Proposition~\ref{step1} to another ideal which contains $L$ and has linear quotients. \begin{thm}\label{linquo of square} Let $I\subset S$ be the edge ideal of the graph $G=\overline{G_{(b)}}$, with $t\geq 1$. Then the ideal $(I^{s+1}:x_{t+5})$ has linear quotients for all $s\geq 0$. \end{thm} \begin{proof} Set $J:= (I^{s+1}:x_{t+5})$. We first determine the minimal generating set $\mathcal{G}(J)$ of $J$. Note that $E(G)=E(\bar{C})\cup\{x_{t+5}x_i:\ 3\leq i\leq t+4\}$, where $C=1-2-\cdots-(t+3)-1$ is the unique induced cycle of $G_{(b)}$ of length$>3$. Hence, $$I^{s+1}=\sum_{k=0}^{s+1}I(\bar{C})^{s+1-k}(x_{t+5})^k(x_3,\ldots,x_{t+4})^k.$$ By \cite[Proposition~1.2.2]{HHBook}, the ideal $J$ is generated by monomials $m/\gcd(m, x_{t+5})$, where $m\in I^{s+1}$. It follows that $$J=I(\bar{C})^{s+1}+\sum_{k=0}^{s}I(\bar{C})^{s-k}(x_{t+5})^k(x_3,\ldots,x_{t+4})^{k+1}.$$ Since each edge of $\bar{C}$ contains a vertex in $\{3,\ldots,t+3\}$, we have $I(\bar{C})^{s+1}\subset I(\bar{C})^{s}(x_3,\ldots,x_{t+4})$. Therefore, $$J=\sum_{k=0}^{s}I(\bar{C})^{s-k}(x_{t+5})^k(x_3,\ldots,x_{t+4})^{k+1}.$$ For $0\leq k\leq s$, let $L_{k}:=I(\bar{C})^{s-k}(x_{t+5})^k(x_3,\ldots,x_{t+4})^{k+1}$. Clearly, for $0\leq k, k'\leq s$ with $k\neq k'$ we have $\mathcal{G}(L_k)\cap\mathcal{G}(L_{k'})=\emptyset$, where $\mathcal{G}(L_{k})$ denotes the minimal generating set of $L_k$. Therefore $\mathcal{G}(J)$ is the disjoint union of all $\mathcal{G}(L_k)$ for $0\leq k\leq s$. In particular, $J$ is generated by monomials of degree $2s+1$. For $s=0$, $J$ is generated by variables and hence we have the assertion. Suppose $s\geq 1$. We order the multisets of the edges of $\bar{C}$ as described before Proposition~\ref{step1}. Each element $m_l$ of $\mathcal{G}(L_k)$ can be written as $m_l=\x{\e{l}}{x_{t+5}}^k\x{l}$, where $\e{l}=(e_{1},\ldots,e_{{s-k}})$ is an ordered multiset of the edges of $\bar{C}$ of size $s-k$ with $e_i=\{a_i,b_i\}$, $a_i<b_i$, and $\x{l}:=x_{j_1}\cdots x_{j_{k+1}}$ with $3\leq j_1\leq \cdots\leq j_{k+1}\leq t+4$. Similar to the proof of Proposition~\ref{step1} we consider the {\em smallest} presentation for $m_l$, i.e. the one in which $\e{l}$ is the smallest possible multiset associated to $m_l$. So this presentation is unique. Now we give an order on the generators of $J$. { To this end we use the lexicographic order $<_{lex}$ on the monomials of the ring $S$ induced by $x_1<x_2<\cdots<x_{t+5}$; see \cite[Section~2.1.2]{HHBook} for the definition of the lexicographic order. } For $m_q,m_l\in \mathcal{G}(J)$ we let $m_q<m_l$ in the following cases: \begin{itemize} \item $m_q\in L_{k'}$ and $m_l\in L_{k}$ with $0\leq k'<k\leq s$; \item $m_q,m_l\in L_k$ for some $0\leq k\leq s-1$ and either $\mathbf{e}_q<\mathbf{e}_{l}$ or $\mathbf{e}_q=\mathbf{e}_{l}$ with $\mathbf{x}_q<_{lex}\mathbf{x}_l$; \item $m_q,m_l\in L_s$, and { either $m_q\neq x_{t+5}^sx_i^{s+1}, m_l\neq x_{t+5}^sx_j^{s+1}$ for all $3\leq i, j\leq t+4$ with $m_q<_{lex}m_l$, or $m_q= x_{t+5}^sx_i^{s+1}$ and $m_l= x_{t+5}^sx_j^{s+1}$ for some $3\leq i<j\leq t+4$, or $m_q\neq x_{t+5}^sx_i^{s+1}$ for all $3\leq i\leq t+4$ and $m_l= x_{t+5}^sx_j^{s+1}$ for some $3\leq j\leq t+4$.} \end{itemize} Suppose $\mathcal{G}(J)=\{m_1,\ldots,m_r\}$ with $m_1<\!\cdots\!<m_r$. We show that for any $m_l\in\!\mathcal{G}(J)$ with $l\!>1$, the ideal $\left((m_1,\ldots, m_{l-1}):m_l\right)$ is generated by some variables. Set $J_l:=(m_1,\ldots, m_{l-1})$. By \cite[Proposition~1.2.2]{HHBook}, the ideal $(J_l:m_l)$ is generated by the elements of the set $\{m_q/\gcd(m_q,m_l):\ 1\leq q\leq l-1\}$. Let $m_{q,l}:=m_q/\gcd(m_q,m_l)$ for $m_q<m_l$. Suppose $m_q=\x{\e q}x_{t+5}^{k'}\x{q}\in \mathcal{G}(L_{k'})$ with $0\leq k'\leq s$ and $\mathbf{e}_{q}=(e'_1,\ldots,e'_{s-k'})\subseteq E(\bar{C})$ with $e'_i=\{a'_i,b'_i\}$, $a'_i<b'_i$, and $\mathbf{x}_{q}=x_{j'_1}\cdots x_{j'_{k'+1}}$ with $3\leq j'_1\leq \cdots\leq j'_{k'+1}\leq t+4$, and suppose $m_l\in \mathcal{G}(L_{k})$ with $k'\leq k\leq s$. Suppose $\deg m_{q,l}>1$. We show that there is $1\leq p<l$ such that $\deg m_{p,l}=1$ and $m_{p,l}| m_{q,l}$. This will imply that $J$ has linear quotients. We may assume $k\geq 1$ because by Proposition~\ref{step1}, $L_0=I(\bar{C})^{s}(x_3,\ldots,x_{t+4})$ has linear quotients. By the same argument as in the proof of Proposition~\ref{step1} we may assume that $\e{q}\cap \e{l}=\emptyset$. First assume $q=1$. Then $m_q=x_1^sx_3^{s+1}$ and $x_1|m_{q,l}$, because $k\geq 1$. { If $x_3|\x{l}$, then set $e:=\{1,3\}$ and $m_p:=\x{e}m_l/(x_3x_{t+5})\in L_{k-1}$. Otherwise we have $x_3|m_{q,l}$ and we may set $m_p:=m_lx_3/x_{j_i}$ for some $j_i$.} Suppose now that $q>1$ and suppose that for all $m_{q'}$ with $q'<q$ there exists $m_{p'}<m_l$ with $\deg m_{p',l}=1$ and $m_{p',l}|m_{q',l}$. We prove the assertion by induction on $q$. Note that \begin{enumerate} \item[(a)] $x_{t+5}\notin \mathrm{supp}(m_{q,l})$, because $\deg_{m_q}x_{t+5}\leq \deg_{m_l}x_{t+5}$. \item[(b)] Assume $a\in \{3,4,\ldots, j_{k+1}-1\}$. Except for the case where $k=s$ with $m_l= x_{t+5}^sx_a^{s}x_{j_{s+1}}$, one has $x_a\in (J_l:m_l)$, because $m_p:=x_am_l/x_{j_{k+1}}\in J_l$ and $m_{p,l}=x_a$. \item[(c)] If $k=s$ and $m_l=x_{t+5}^s x_a^{s}x_{j_{s+1}}$, where $3\leq a<j_{s+1}-1<t+3$, then $e\!:=\{a,j_{s+1}\}\in E(\bar{C})$ and by setting $m_p:=\x{e}m_l/(x_{j_{s+1}}x_{t+5})$ one has $m_p\in L_{s-1}\subseteq J_l$ and $x_a\in (J_l:m_l)$. \item[(d)] For any $a$ with $j_{k+1} + 1 < a < t + 4$, we have $x_a \in (J_l : m_l)$ because $m_p:=\mathbf{x}_em_l/(x_{t+5}x_{j_{k+1}})\in L_{k-1}\subseteq J_l$. \end{enumerate} \medspace If $\mathrm{supp}(m_{q,l}) \cap \{x_3, x_4, \ldots , x_{j_{k+1}-1}\}\neq \emptyset$, then we are done. Indeed, assume that there exists $x_a \in \mathrm{supp}(m_{q,l})\cap\{x_3, x_4, \ldots , x_{j_{k+1}-1}\}$. Then by (b) and (c), it is sufficient to check only the case where $k = s$, $m_l = x^s_{t+5}x^s_ax_{j_{s+1}}$, and $j_{s+1} \in \{a + 1, t + 4\}$. Since $\deg_{m_q}x_a\geq s+1$, if $m_q\in L_s$, then $m_q=x_{t+5}^sx_a^{s+1}>m_l$, a contradiction. Thus $m_q\notin L_s$ and hence there exists $e'_i\in \e{q}$ with $a\in e'_i$. Suppose $d$ is another vertex of $e'_i$. Since $d\notin\{a,a+1, t+4,t+5\}$ we have $x_d|m_{q,l}$. Set $m_p:=\x{e'_i}m_l/(x_ax_{t+5})$. Then $m_p<m_l$ and $m_{p,l}=x_d$ and so we are done. \medspace Moreover, if $x_a\in \mathrm{supp}(m_{q,l})\cap \{x_{j_{k+1}+2}, \ldots, x_{t+3}\}$, then we are again done by (d). Thus, using (a) and the above discussion, we may suppose that \begin{eqnarray}\label{pizza} \mathrm{supp}(m_{q,l})\subseteq \{x_1,x_2,x_{j_{k+1}},x_{j_{k+1}+1}, x_{t+4}\}\setminus\{x_{t+5}\} \end{eqnarray} \iffalse First assume $B\subseteq\{1,2\}$. Thus $m_l\notin L_s$ and hence $\e{q}\neq \emptyset\neq \e{l}$. If $1\in B$, there exists $e'_{i}=\{a'_{i},b'_{i}\}\in\e{q}$ with $1\notin e'_{i}$. If $a'_{i}\neq 2$ set $e:=\{1,a'_{i}\}$, else if $b'_{i}\neq t+3$ set $e:=\{1,b'_{i}\}$. Thus $m_{q'}:=\x{e}m_q/\x{e'_{i}}<m_q$ and $m_{q',l}$ divides $m_{q,l}$. By induction hypothesis we are done. Suppose for all $e'_{i}\in\e{q}$ with $1\notin e'_{i}$ one has $e'_{i}=\{2,t+3\}$. Since $\deg_{m_q}{x_1}<\deg_{m_l}{x_1}$ there exists $e_j=\{1,b_{j}\}\in\e{l}$ with $b_{j}\neq 1,2,t+3$ and since $\e{q}\cap\e{l}=\emptyset$ we have $\deg_{\x{e_q}}{x_{b_{j}}}<\deg_{\x{e_l}}{x_{b_{j}}}$ for all such $b_{j}$. Since $b_{j}\notin B$, we must have $x_{b_{j}}|\x{q}$. If $b_{j}\neq 3$ by interchanging $x_{b_{j}}$ in $\x{q}$ and $x_{t+3}$ in $\x{e'_{i}}$ we get a smaller presentation of $m_q$ which is a contradiction. Thus $b_{j}=3$. Set $m_{q'}:=\x{e_j}x_{t+3}m_q/(\x{e'_{i}}x_3)$. Then $m_{q'}<m_q$ and $m_{q',l}|m_{q,l}$ and so we are done by induction hypothesis. Now assume $1\notin B$ and hence$2\in B$. There exists $e'_{i}=\{a'_{i},b'_{i}\}\in\e{q}$ with $2\neq a'_{i}<b'_{i}$. If $a'_{i}\neq 1$, set $e:=\{2,b'_{i}\}$ and $m_{q'}:=\x{e}m_q/\x{e'_{i}}$. Then $m_{q'}<m_q$ and $m_{q',l}|m_{q,l}$ and so we are again done by induction hypothesis. Suppose $e'_{i}=\{1,b'_{i}\}$ for all $e'_i\in \e{q}$ with $2\notin e'_{i}$. It follows that $x_1|m_{q,l}$ because otherwise $s-k'=\deg_{m_q}x_1+\deg_{m_q}x_2<\deg_{m_l}x_1+\deg_{m_l}x_2\leq s-k$ and hence $k'>k$, a contradiction. Since $2\in B$, there exists $e_j=\{2,b_j\}\in \e{l}$. If $b_j\neq t+3$, then set $e:=\{1,b_j\}$ and $m_p:=\x{e}m_l/\x{e_j}$. Suppose $b_j=t+3$ for all $e_j\in\e{l}$ with $2\in e_j$. Since $m_l$ has the smallest presentation, we have $\mathrm{supp}(\x{l})\subseteq\{x_3,x_{t+3},x_{t+4}\}$. If $x_3|\x{l}$, then set $e:=\{1,3\}$ and $m_p:=\x{e}x_{t+3}m_l/(\x{e_j}x_3)$. Suppose $\mathrm{supp}(\x{l})\subseteq\{x_{t+3},x_{t+4}\}$. Now if $x_{b'_i}|m_{q,l}$, then set $m_p:=x_{b'_i}m_l/x_r$, where $x_r|\x{l}$. If $x_{b'_i}\centernot|m_{q,l}$, then $b'_i\in e_f$ for some $e_f\in \e{l}$. Note that $e_f\neq e'_i$ because $\e{q}\cap\e{l}=\emptyset$. Now set $e:=\{1,b'_i\}$ and $m_p:=\x{e}m_l/\x{e_f}$. \iffalse Thus by (\ref{pizza}), we may suppose that { if $b\in B\setminus\{1,2{, t+5}\}\neq \emptyset$, then } \begin{eqnarray}\label{pizza} \mathrm{supp}(m_{q,l})\subseteq \{x_1,x_2,x_{j_{k+1}}, x_{j_{k+1}+1}\}\setminus\{x_{t+4},x_{t+5}\}. \end{eqnarray} Let $x_a|m_{q,l}$. \fi Suppose now that $B\setminus\{1,2\}\neq \emptyset$. \fi Note that \begin{itemize} \item[(i)] if $x_1\in \mathrm{supp}(m_{q,l})$ and $j_1\neq {t+3}, t+4$, then set $e:=\{1,j_1\}$ and $m_p:=\x{e}m_l/(x_{j_1}x_{t+5})$; \item[(ii)] if $x_2\in \mathrm{supp}(m_{q,l})$ and there exists $j_i\neq 3,{t+4}$, $1\leq i\leq k+1$, then set $e:=\{2,j_i\}$ and $m_p:=\x{e}m_l/(x_{j_i}x_{t+5})$; \item[(iii)] if $x_{j_{k+1}}\in \mathrm{supp}(m_{q,l})$ and $j_1<j_{k+1}-1{ <t+3}$, then set $e:=\{j_1,j_{k+1}\}$ and $m_p:=\x{e}m_l/(x_{j_1}x_{t+5})$; \item[(iv)] if $x_{j_{k+1}+1}\in \mathrm{supp}(m_{q,l})$ and $j_1<j_{k+1}{ <t+3}$, then set $e:=\{j_1,j_{k+1}+1\}$ and $m_p:=\x{e}m_l/(x_{j_1}x_{t+5})$. \end{itemize} Thus, by (\ref{pizza}) it remains to find $m_p$ in the following cases: \begin{itemize} \item[(v)] $x_1\in \mathrm{supp}(m_{q,l})$ and $j_1\in \{{t+3}, t+4\}$; \item[(vi)] $x_2\in \mathrm{supp}(m_{q,l})$; and $j_i\in \{3,{t+4}\}$ for all $1\leq i\leq k+1$; { \item[(vii)] $x_{j_{k+1}}\in \mathrm{supp}(m_{q,l})$ and either $j_1\in\{ j_{k+1}-1,j_{k+1}\}$ or $j_{k+1}=t+4$; \item[(viii)] $x_{j_{k+1}+1}\in \mathrm{supp}(m_{q,l})$ and either $j_1=j_{k+1}$ or $j_{k+1}=t+3$; \item[(ix)] $x_{t+4}\in\mathrm{supp}(m_{q,l})$. } \end{itemize} { In (viii) we have $j_{k+1}\neq t+4$ because $x_{t+5}\notin \mathrm{supp}(m_{q,l})$. Since we will check the case $x_{t+4}\in\mathrm{supp}(m_{q,l})$ in (ix), we may suppose in Case~(vii) that $j_{k+1}\neq t+4$ and in Case~(viii) that $j_{k+1}\neq t+3$. Moreover, having $j_1\in \{j_{k+1}-1, j_{k+1}\}$ in (vii) we have either $x_{j_1}\in \mathrm{supp}(m_{q,l})$ with $\mathrm{supp}(\x{l})= \{x_{j_1}\}$ or $x_{j_1+1}\in \mathrm{supp}(m_{q,l})$ with $\mathrm{supp}(\x{l})= \{x_{j_1}, x_{j_1+1}\}$. In Case~(viii), since $j_1=j_{k+1}$ we get $x_{j_1+1}\in \mathrm{supp}(m_{q,l})$ and $\mathrm{supp}(\x{l})=\{x_{j_1}\}$. So combining the two cases (vii) and (viii), we will end up with the following ones: \begin{itemize} \item[(vii')] $x_{j_1}\in \mathrm{supp}(m_{q,l})$ and $\mathrm{supp}(\x{l})=\{x_{j_{1}}\}$; \item[(viii')] $x_{j_1+1}\in \mathrm{supp}(m_{q,l})$ and either $\mathrm{supp}(\x{l})=\{x_{j_{1}}\}$ or $\mathrm{supp}(\x{l})=\{x_{j_{1}}, x_{j_1+1}\}$. \end{itemize}} So we replace (vii), (viii) with (vii'), (viii'). Now we prove the assertion in the above five cases. Note that since $m_q\neq m_l$ there exists $1\leq b\leq t+5$ such that $\deg_{m_q}x_b<\deg_{m_l}x_b$. Suppose $B$ is the set of all such $b$. \medspace Case~(v): Since $j_1\in \{t+3,t+4\}$ we have $\mathrm{supp}(\x{l})\subseteq \{x_{t+3},x_{t+4}\}$ and hence $j_{k+1}\in \{t+3,t+4\}$ implies that $\mathrm{supp}(m_{q,l})\subseteq\{x_1,x_2,x_{t+3}{, x_{t+4}}\}$ by (\ref{pizza}). Since $x_1\in \mathrm{supp}(m_{q,l})$, there exists $e'_i\in\e{q}$ with $e'_i=\{1,b'_i\}$ for some $3\leq b'_i\leq t+2$. Since $x_{b'_i}\notin\{x_1,x_2,x_{t+3},x_{t+4}\}$ we have $x_{b'_i}|m_l$, and it follows from $\mathrm{supp}(\x{l})\subseteq \{x_{t+3},x_{t+4}\}$ that $x_{b'_i}\centernot|\x{ l}$. Thus there exists $e_j\in\e{l}$ with $b'_i\in e_j$. If $d$ is another vertex of $e_j$, then $d> 1$ because $\e{l}\cap\e{q}=\emptyset$. Set $m_p:=\x{e'_i}m_l/\x{e_j}$ and so we are done in this case. This case together with (i) imply that if $x_1|m_{q,l}$, then we have the desired $m_p$. Suppose in the remaining cases that $x_1\notin\mathrm{supp}(m_{q,l})$. \medspace Case~(vi): Since $x_{j_{k+1}}\in \mathrm{supp}(\x{l})\subseteq \{x_3,x_{t+4}\}$ we have $\mathrm{supp}(m_{q,l})\subseteq\{x_2,x_{3},x_4{, x_{t+4}}\}$ by (\ref{pizza}). Since $x_2\in \mathrm{supp}(m_{q,l})$, there exists $e'_i\in\e{q}$ with $e'_{i}=\{2,b'_{i}\}$ for some $4\leq b'_{i}\leq t+3$. First suppose $m_l\in L_s$. Then $m_l=x_{t+5}^s\x{l}$ and $x_{b'_{i}}\centernot|m_l$ because $\mathrm{supp}(\x{l})\subseteq \{x_3,x_{t+4}\}$. Thus $x_{b'_{i}}|m_{q,l}$ and therefore $b'_{i}=4$. In case $x_{t+4}|\x l$ we set $m_p:=x_{4}m_l/x_{t+4}$. Otherwise, we have $m_l=x_{t+5}^sx_3^{s+1}$, and hence we can set $m_p:=x_{t+5}^sx_3^{s}x_{4}$. Suppose now that $m_l\notin L_s$. There exists $e_{j}=\{a_{j},b_{j}\}\in\e{l}$ with $a_{j}\neq 2$. If $a_{j}\neq 1$ then set $e:=\{2,b_{j}\}$ and $m_p:=\x{e}m_l/\x{e_{j}}$. Suppose that $e_{j}=\{1,b_{j}\}$ for all $e_{j}\in\e{l}$ with $2\notin e_{j}$. If $x_{b'_{i}}|m_{q,l}$, then $b'_{i}=4$. If $x_{t+4}|\x{l}$, then set $m_p:=x_{4}m_l/x_{t+4}$. Otherwise, we have $\mathrm{supp}(\x{l})=\{x_3\}$. Then $b_{j}=3$ for all $e_j = \{1, b_j\} \in \e l$, since otherwise we get a contradiction to the fact that we have considered the smallest presentation for $m_l$. If $x_2|m_l$, then there exists $e_{r}=\{2,b_{r}\}\in \e{l}$, where $b_{r}>4$ because $\e{q}\cap\e{l}=\emptyset$. Then set $m_p:=\x{e'_{i}}m_l/\x{e_{r}}$. If $x_2\centernot|m_l$, then $m_l=x_{t+5}^kx_1^{s-k}x_3^{s+1}$. Thus $3\in B$ because $3\notin e'_i = \{2, 4\}\in \e q$. If $1\in B$, then set $e:=\{1,4\}$ and $m_{q'}=\x{e}m_q/\x{e'_i}$, and if $1\notin B$, then there exists $e'_f=\{1,b'_f\}\in \e{q}$ with $b'_f>3$ because $e_j=\{1, 3\} \in \e l$ and $\e q \cap \e l = \emptyset$, so set $m_{q'}=\x{e_j}m_q/\x{e'_f}$ and use induction. Now suppose $x_{b'_i}\centernot|m_{q,l}$. Since $\mathrm{supp}(\x{l})\subseteq\{x_3,x_{t+4}\}$, we have $e_r:=\{1,b'_i\}\in \e{l}$ because all edges in $\e{l}$ contain either $1$ or $2$ and $\e{q}\cap\e{l}=\emptyset$. Since $b'_i>3$ we have $\mathrm{supp}(\x{l})=\{x_{t+4}\}$ because otherwise we get a smaller presentation for $m_l$. If $1\notin B$, then $e'_f:=\{1,b'_f\}\in \e{q}$ with $b'_f\neq b'_i$ because $\e{q}\cap\e{l}=\emptyset$. If $x_{b'_f}|m_{q,l}$, then set $m_p:=x_{b'_f}m_l/x_{t+4}$. If $x_{b'_f}\centernot|m_{q,l}$, then we have $\{2,b'_f\}\in \e{l}$ since $\e{q}\cap\e{l}=\emptyset$ and each edge of $m_l$ contains either $1$ or $2$. Now we have $\{1,b'_i\}, \{2,b'_f\}\in \e{l}$ and $\{1,b'_f\}, \{2,b'_i\}\in \e{q}$ which contradict the fact that both $\e{q}, \e{l}$ are the smallest multisets associated to $m_q,m_l$ respectively. Suppose $1\in B$. Then we can use inductive hypothesis for $m_{q'}:=\x{e_r}m_q/\x{e'_i}$. So we are done in this case too. By settling this case and according to Case~(ii) we have the desired $m_p$ if $x_2|m_{q,l}$. Suppose in the remaining cases that $\mathrm{supp}(m_{q,l})\subseteq\{x_{j_{k+1}}, x_{{j_{k+1}}+1}{ , x_{t+4}}\}$. \medspace Case~(vii') Since $\mathrm{supp}(\x l)=\{x_{j_1}\}$, we have $\mathrm{supp}(m_{q,l})\subseteq\{x_{j_1}, x_{j_1+1}, { x_{t+4}\}}$. There exists $e'_{i_1}=\{j_1,c\}\in\e{q}$ for some $c$ because otherwise $\deg_{m_q}x_{j_1}\leq k'+1\leq k+1=\deg_{m_l}x_{j_1}$, a contradiction. It follows that $j_1\leq t+3$. Since $x_c\centernot|m_{q,l}$ we have $x_c|m_l$ and since $c\neq j_1$, there exists $e_{i_2}=\{c,d\}\in \e{l}$ for some $d$. By $\e{q}\cap\e{l}=\emptyset$, we have $d\neq j_1$. Note that $d<j_1$, because otherwise interchanging $x_d$ in $\x{e_{j}}$ and $x_{j_1}$ in $\x{l}$ will result in a smaller presentation of $m_l$. Suppose $d\!<\!j_1\!-\!1$. { If $\!\{d,\!j_1\}\!\neq\!\{1,\!t+3\}$,} then set $e\!:=\!\{d,\!j_1\}$ and $m_p\!:=\!\x{e}\x{e'_{i_1}}\!m_l/(\x{e_{i_2}}\!x_{j_1}\!x_{t+5})$. { If $\{d, j_1\}= \{1,t+3\}$, then in case $1\in B$, set $m_{q'}:=\x{e_{i_2}}m_q/\x{e'_{i_1}}<m_q$ and use induction. In case $1\notin B$, there exists $e'_{i_3}=\{1,f\}\in \e{q}$ for some $f\notin\{ c, 1,2,t+3, t+4\}$ which implies that $x_f\centernot| m_{q,l}$. Hence $x_f|m_l$ and thus $e_{i_4}=\{f,g\}\in \e{l}$ for some $g\neq 1$. If $g=t+3$, then $\{c,t+3\}, \{1,f\}\in \e q$ and $\{1,c\}, \{f,t+3\}\in \e l$ which contradict the fact that $\e{q}$ and $\e{l}$ both have minimum presentations. Thus $g\neq t+3$. If $g\neq t+2$, set $e:=\{g,t+3\}$ and $m_p:=\x{e}\x{e'_{i_1}}\x{e'_{i_3}}m_l/(\x{e_{i_2}}\x{e_{i_4}}x_{t+3}x_{t+5})$, and if $g=t+2$, set $e=\{1,t+2\}, e'=\{f, t+3\}$ and $m_p:=\x{e}\x{e'}\x{e'_{i_1}}m_l/(\x{e_{i_2}}\x{e_{i_4}}x_{t+3}x_{t+5})$. } Suppose $d=j_1-1$. If $j_1-1\in B$, then set $m_{q'}:=\x{e_{i_2}}m_q/\x{e'_{i_1}}$ and use induction hypothesis. If $j_1-1\notin B$, then $x_{j_1-1}|m_q$. If $x_{j_1-1}|\x{q}$, then interchanging $x_{j_1-1}$ in $\x{q}$ and $x_{j_1}$ in $\x{e'_{i_1}}$ will give a smaller presentation of $m_q$, a contradiction. Therefore there exists $e'_{i_3}=\{j_1-1, f\}\in \e{q}$ for some $f\neq c$. Then $f\notin \{j_1-2,j_1-1, j_1\}$. If $x_f|m_{q,l}$, then $f={j_1+1}$. Set $m_p:=\x{e'_{i_1}}\x{e'_{i_3}}m_l/(\x{e_{i_2}}x_{j_1}x_{t+5})$. Suppose $x_f\centernot|m_{q,l}$. It follows that there exists $e_{i_4}=\{f, g\}\in \e{l}$ for some $g\neq j_1-1$. We have $f\neq {j_1+1}$ because otherwise, it follows that $g\notin \{j_1,j_1-1,{j_1+1}\}$ which implies that $m_l$ will have a smaller presentation by interchanging $x_f$ in $\x{e_{i_4}}$ and $x_{j_1}$ in $\x{l}$. Since $f\neq j_1+1$ we have either $g< j_1-1$ or $g=j_1$ because otherwise one can interchange $x_g$ in $\x{e_{i_4}}$ and $x_{j_1}$ in $\x{l}$ to get a smaller presentation. If $g=j_1$, then we have $\{j_1,c\}, \{j_1-1, f\}\in \e{q}$ and $\{j_1-1, c\}, \{j_1,f\}\in \e{l}$ which contradict the fact that both $\e{q}, \e{l}$ are the smallest multisets associated to $m_q, m_l$, respectively. Thus $g<j_1-1$. { In case $\{g, j_1\}\neq \{1,t+3\}$, set $e:=\{g, j_1\}$ and $m_p:=\x{e'_{i_1}}\x{e'_{i_3}}\x{e}m_l/(\x{e_{i_2}}\x{e_{i_4}}x_{j_1}x_{t+5})$. In case $\{g, j_1\}= \{1,t+3\}$, set $e:=\{1,t+2\}, e':=\{f,t+3\}$ and $m_p:=\x{e'_{i_1}}\x{e}\x{e'}m_l/(\x{e_{i_2}}\x{e_{i_4}}x_{t+3}x_{t+5})$. Note that since $e'_{i_3}, e_{i_4}\in E(\bar{C})$ we have $f\notin \{1,t+2,t+3\}$ and hence $e'\in E(\bar{C})$. Thus we are done in this case too. } \medspace { In general, if $x_{j_1}\in \mathrm{supp}(m_{q,l})$, then by (\ref{pizza}) we have ${j_1}\in \{j_{k+1}, j_{k+1}+1, t+4\}$. But ${j_1}\leq j_{k+1}$ implies that $j_1=j_{k+1}$ and hence $\mathrm{supp}{(\x l)}=\{x_{j_1}\}$. Thus by the discussion in (vii') we are done if $x_{j_1}\in \mathrm{supp}(m_{q,l})$. Therefore, we may assume in the rest of the proof that $x_{j_1}\notin\mathrm{supp}(m_{q,l})$.} \medspace Case~(viii'): Since $\mathrm{supp}(\x l)\subseteq\{x_{j_1},x_{j_1+1}\}$, we have $\mathrm{supp}(m_{q,l})\subseteq\{x_{j_1+1},x_{j_1+2},x_{t+4}\}$ by (\ref{pizza}). Moreover, if $j_1+1= t+4$, then $\mathrm{supp}(m_{q,l})=\{x_{t+4}\}$ and since this case will be discussed in (ix) we may assume here that $j_1+1\neq t+4$. Assume first that $x_{j_1}|\x{\e q}$. Then $e'_{i_1}=\{j_1,c\}\in\e{q}$ for some $c$. Since $c\notin\{j_1, j_1+1\}$, we have $e_{i_2}=\{c,d\}\in\e l$ for some $d$. Since $\e{q}\cap \e l=\emptyset$ and since we have the smallest presentation of $m_l$ we have $d<j_1$. { If $\{d, j_1+1\}\neq \{1,t+3\}$, then } set $e:=\{d,j_1+1\}$ and $m_p:=\x{e'_{i_1}}\x{e}m_l/(\x{e_{i_2}}x_{j_1}x_{t+5})$. { If $\{d, j_1+1\}=\{1,t+3\}$, then set $e:=\{c, t+3\}, e':=\{1,t+2\}$ and $m_p:=\x{e}\x{e'}m_l/(\x{e_{i_2}}x_{t+2}x_{t+5})$. Note that $e:=\{c, t+3\}\in E(\bar{C})$ because $c\notin \{1,t+2,t+3\}$. Now assume $x_{j_1}\centernot|\x{\e q}$. Suppose $x_{j_1+1}\centernot|\x{\e q}$. Since $x_{j_1+1}|m_{q,l}$ we have $x_{j_1+1}|\x q$. If $x_{j_1+2}|\x{\e q}$, then $e:=\{a,j_1+2\}\in \e q$ for some $a\notin\{j_1+1, j_1+2, \overline{j_1+3}\}$. Since $x_{j_1}\centernot|\x{\e q}$ we have $a\neq j_1$ too. Thus $\{a, j_1+1\}\in E(\bar{C})$ and hence one can interchange $x_{j_1+2}$ in $\x e$ and $x_{j_1+1}$ in $\x q$ to get a smaller presentation for $m_q$, a contradiction. Thus $x_{j_1+2}\centernot|\x{\e q}$. Therefore $\mathrm{supp}(\x{\e q})\cap \mathrm{supp}(m_{q,l})=\emptyset$ which implies that $\x{\e q}|\x{\e l}$ and since $k'\leq k$ we have $\e q=\e l$. But $\e{q}\cap \e l=\emptyset$ implies that $\e q=\emptyset =\e l$. Thus $m_q, m_l\in L_s$. If $m_l=x_{t+5}^sx_{j_1}^{s+1}$, then set $m_p:=x_{t+5}^sx_{j_1}^{s}x_{j_1+1}$. Suppose $m_l= x_{t+5}^sx_{j_1}^{r}x_{j_1+1}^{s+1-r}$, where $0<r<s+1$. By the order of the generators of $L_s$ we have $m_q\neq x_{t+5}^sx_{j_1+1}^{s+1}$. Since $\mathrm{supp}(m_q)\subseteq \mathrm{supp}(m_{q,l})\cup \mathrm{supp}(m_l)\subseteq \{x_{j_1}, x_{j_1+1},x_{j_1+2},x_{t+4}, x_{t+5}\}$ and $m_q<m_l$, we have $x_{j_1}\in \mathrm{supp}(m_q)$. If $x_{j_1+2}\in \mathrm{supp}(m_q)$ ($x_{t+4}\in \mathrm{supp}(m_q)$ resp.), then set $m_{q'}:=x_{j_1+1}m_q/x_{j_1+2}$ ($m_{q'}:=x_{j_1+1}m_q/x_{t+4}$ resp.) and use induction. Otherwise, we have $m_q=x_{t+5}^sx_{j_1}^{r'}x_{j_1+1}^{s+1-r'}$ with $0<r'<r$ because $m_q<m_l$. Set $m_{q'}:=x_{j_1}m_q/x_{j_1+1}$ and use induction. } \iffalse If $m_q=x_{t+5}^sx_{j_1+1}^{s+1}$, then since $m_q<m_l$ we have $m_l=x_{t+5}^sx_{i}^{s+1}$ for some $i>j_1+1$ which is a contradiction since $x_{j_1}|m_l$. Therefore $m_q\neq x_{t+5}^sx_{j_1+1}^{s+1}$. According to the order of the generators, since $\e q=\e l$ we have $\x{q}<_{lex}\x{l}$. Since $\mathrm{supp}(\x{l})\subseteq \{x_{j_1}, x_{j_1+1}\}$ and since $x_{j_1+1}|m_{q,l}=\x{q}/\gcd(\x{q},\x{l})$, it follows that $\deg_{\x{q}}x_{j_1+1}>\deg_{\x{l}}x_{j_1+1}$ which implies that $\deg_{\x{q}}x_{j_1}<\deg_{\x{l}}x_{j_1}$ because $k'=k$. But since $\mathrm{supp}(m_{q,l})=\{x_{j_1+1}\}$ we conclude that $\mathrm{supp}(\x{q})\subseteq \{x_{j_1}, x_{j_1+1}\}$ and hence we get a contradiction with $\x{q}<_{lex}\x{l}$. \fi Suppose now that $x_{j_1+1}|\x{\e q}$. There exists $e'_{i_1}=\{j_1+1, c\}\in\e{q}$ for some $c$. Since $x_c\notin \mathrm{supp}(\x l)\cup\mathrm{supp}(m_{q,l})$, there exists $e_{i_2}=\{c,d\}\in \e{l}$ for some $d$ with $d\neq j_1+1$. If $d>j_1+1$, then set $m_p:=\x{e'_{i_1}}m_l/\x{e_{i_2}}$. If $d<j_1-1$, then set $e:=\{d,j_1\}$ which is an edge of $\bar{C}$ because $j_1\neq t+3$. Now set $m_p:=\x{e}\x{e'_{i_1}}m_l/(\x{e_{i_2}}x_{j_1}x_{t+5})$. If $d=j_1-1$, then $c\neq j_1-1$ and hence one can set $e:=\{j_1-1,j_1+1\}, e':=\{c,j_1\}$ which are edges of $\bar{C}$. Now set $m_p:=\x{e}\x{e'}m_l/(\x{e_{i_2}}x_{j_1}x_{t+5})$. Suppose $d=j_1$ which implies that $c\neq j_1-1$. It follows that $x_{j_1}\centernot|\x{q}$ because otherwise, interchanging $x_{j_1}$ in $\x{q}$ and $x_{j_1+1}$ in $\x{e'_{i_1}}$ will give a smaller presentation for $m_q$. Since $x_{j_1}\centernot|\x{\e q}$ we have ${j_1}\in B$. Set $m_{q'}=\x{e_{i_2}}m_q/\x{e'_{i_1}}$ and use induction. So we are done also in this case. \iffalse If ${j_1}\notin B$, then $x_{j_1}|m_q$. Note that $x_{j_1}\centernot|\x{q}$ because otherwise, interchanging $x_{j_1}$ in $\x{q}$ and $x_{j_1+1}$ in $\x{e'_{i_1}}$ will give a smaller presentation for $m_q$. Therefore $e'_{i_3}=\{j_1,f\}\in \e{q}$ for some $f\neq c$. Since $f\notin \{j_1+1, j_1\}$ we have $e_{i_4}=\{f,g\}\in \e l$ for some $g$ with $g<j_1$ because $\e{q}\cap\e{l}=\emptyset$ and if $g>j_1$, then there will be a smaller presentation for $m_l$ by interchanging $x_{g}$ in $\x{e_{i_4}}$ and $x_{j_1}$ in $\x{l}$, a contradiction. { In case $\{g, j_1+1\}\neq \{1,t+3\}$, set $e:=\{g, j_1+1\}$ and $m_p:=\x{e}\x{e'_{i_3}}m_l/(\x{e_{i_4}}x_{j_1}x_{t+5})$, and otherwise set $e:=\{1,t+2\}$ and $m_p:= \x{e}\x{e'_{i_1}}\x{e'_{i_3}}m_l/(\x{e_{i_2}}\x{e_{i_4}}x_{t+2}x_{t+5})$. So we are doe also in this case. \fi { Now by (iii), (iv), (vii') and (viii') we may assume in the remaining case that $\mathrm{supp}(m_{q,l})=\{x_{t+4}\}$.} \medspace Case~(ix): If there exists $b\in B\setminus\{1,2, t+5\}$, then setting $m_{q'}:=x_bm_q/x_{t+4}$, we are done by induction hypothesis. Suppose $B\subseteq \{1,2,t+5\}$. If $1\in B$, then $m_q, m_l\notin L_s$ and there exists $e'_{i}=\{a'_{i},b'_{i}\}\in\e{q}$ with $1\notin e'_{i}$. If $a'_{i}\neq 2$ set $e:=\{1,a'_{i}\}$, else if $b'_{i}\neq t+3$ set $e:=\{1,b'_{i}\}$. Then $m_{q'}:=\x{e}m_q/\x{e'_{i}}<m_q$ and $m_{q',l}$ divides $m_{q,l}$. By induction hypothesis we are done. Suppose for all $e'_{i}\in\e{q}$ with $1\notin e'_{i}$ one has $e'_{i}=\{2,t+3\}$. Since $\deg_{m_q}{x_1}<\deg_{m_l}{x_1}$ there exists $e_j=\{1,b_{j}\}\in\e{l}$ with $b_{j}\neq 1,2,t+3$ and since $\e{q}\cap\e{l}=\emptyset$ we have $\deg_{\x{e_q}}{x_{b_{j}}}=0$ for all such $b_{j}$. Since $b_{j}\notin B$, we must have $x_{b_{j}}|\x{q}$. If $b_{j}\neq 3$ by interchanging $x_{b_{j}}$ in $\x{q}$ and $x_{t+3}$ in $\x{e'_{i}}$ we get a smaller presentation of $m_q$ which is a contradiction. Thus $b_{j}=3$. Set $m_{q'}:=\x{e_j}x_{t+3}m_q/(\x{e'_{i}}x_3)$. Then $m_{q'}<m_q$ and $m_{q',l}|m_{q,l}$ and so we are done by induction hypothesis. Now assume $1\notin B$ and $2\in B$. Again $m_q, m_l\notin L_s$ and there exists $e'_{i}=\{a'_{i},b'_{i}\}\in\e{q}$ with $2\neq a'_{i}<b'_{i}$. If $e'_{i}=\{1,b'_{i}\}$ for all $e'_i\in \e{q}$ with $2\notin e'_{i}$, then $x_1|m_{q,l}$ because otherwise $s-k'=\deg_{m_q}x_1+\deg_{m_q}x_2<\deg_{m_l}x_1+\deg_{m_l}x_2\leq s-k$ and hence $k'>k$, a contradiction. But $x_1\in \mathrm{supp}(m_{q,l})=\{x_{t+4}\}$ is also a contradiction. Therefore there exists $e'_{i}=\{a'_{i},b'_{i}\}\in\e{q}$ with $2< a'_{i}<b'_{i}$. Set $e:=\{2,b'_{i}\}$ and $m_{q'}:=\x{e}m_q/\x{e'_{i}}$. Then $m_{q'}<m_q$ and $m_{q',l}|m_{q,l}$ and so we are again done by induction hypothesis. { Suppose now that $B=\{t+5\}$. Since $\mathrm{supp}(m_{q,l})=\{x_{t+4}\}$ we have \begin{eqnarray}\label{simple} \x{\e{q}}(\x{q}/m_{q,l})=\x{\e{l}}\x{l}. \end{eqnarray} Since $\deg_{m_q}x_{t+5}<\deg_{m_l}x_{t+5}$, we have $k'<k$. Moreover, $\deg_{m_l}x_1+\deg_{m_l}x_2\leq s-k$ which implies by (\ref{simple}) that at most $s-k$ edges of $\e q$ contain either $1$ or $2$. Now we choose $s-k+1$ edges $e''_1,\ldots, e''_{s-k+1} \in \e{q}$ with the property that no edge in $\e{q}\setminus \{e''_1,\ldots, e''_{s-k+1}\}$ contains $1$ or $2$. Set $\e{p}:=\{{e''_1}, \ldots, e''_{s-k+1}\}$ and $\x{p}:=x_{t+4}\x{\e{q}}\x{q}/(\x{\e p}m_{q,l})$. It follows from the choice of $\e p$ that neither $x_1$ nor $x_2$ divides $\x p$. Hence $m_p:=\x{\e{p}}x_{t+5}^{k-1}\x{p}\in L_{k-1}$. Since by (\ref{simple}), we have $\x{\e p}\x p/x_{t+4}=\x{\e{l}}\x{l}$, we conclude that $m_{p,l}=x_{t+4}$. This completes the proof.} \end{proof} Now we use Theorem~\ref{linquo of square} to show that $I(\overline{G_{(b)}})^k$ has a linear resolution for $s\geq 2$ when $G_{(b)}$ does not have an induced $4$-cycle, that is the number of its vertices is more than or equal to $7$. \begin{thm}\label{I^k has lin res} Let $G$ be a graph on $n\geq 7$ vertices such that $G_{(b)}$ is its complement. Let $I:=I(G)$ be the edge ideal of $G$. Then $I^s$ has a linear resolution for $s\geq 2$. \end{thm} \begin{proof} By construction, $n=t+5$, where $t\geq 2$. We apply Lemma~\ref{Dao} for $I^s$ and $x:=x_{t+5}$ to prove the assertion. To this end, we first compute $\mathrm{reg}(I^s+( x_{t+5}))$. Setting $C=1-2-\cdots-(t+3)-1$, for all $s\geq 1$ we have \begin{align*} I^s+( x_{t+5})&=(I(\bar{C})+(x_{t+5})(x_3,\ldots, x_{t+4}))^s+(x_{t+5}) =I(\bar{C})^s+(x_{t+5}). \end{align*} Since $x_{t+5}$ does not appear in the support of the generators of $I(\bar{C})^s$, we have $$\mathrm{reg}(I^s+(x_{t+5}))=\mathrm{reg}(I(\bar{C})^s+(x_{t+5}))=\mathrm{reg}(I(\bar{C})^s).$$ It is proved in \cite[Corollary~4.4]{BHZ} that $I(\bar{C})^s$ has a linear resolution for $s\geq 2$ when $|C|>4$, which is the case here because $t+3>4$. Thus $\mathrm{reg}(I^s+(x_{t+5}))= 2s$ for $s\geq 2$. On the other hand $(I^s:x_{t+5})$ has linear quotients by Theorem~\ref{linquo of square}, and it is seen in its proof that $(I^s:x_{t+5})$ is generated in degree $2s-1$ for $s\geq 1$. Therefore, $(I^s:x_{t+5})$ has a $(2s-1)$-linear resolution for $s\geq 1$, see \cite[Theorem~8.2.1]{HHBook}, and hence $\mathrm{reg}((I^s:x_{t+5}))=2s-1$. Now using Lemma~\ref{Dao} we have $\mathrm{reg}(I^s)\leq 2s$ for $s\geq 2$. Since $I^s$ is generated in degree $2s$ we conclude that $I^s$ has a linear resolution for $s\geq 2$. \end{proof}
\section{Introduction} In this paper we study the pricing of exchange options when the underlying assets have stochastic volatility and correlation. Its main contribution is the proposal of a approximated closed-form formula under this framework. \\ The exchange of two assets is used to hedge against the changes in price of underling assets by betting on the difference between both.\\ The price of these instruments has been first considered in \cite{marg} under a standard bivariate Black-Scholes model, where a closed-form formula for the pricing is provided. The results have been extended in \cite{chea2,chea} to the case of a jump-diffusion model, while in \cite{exchir} it has been considered the pricing of the derivative under stochastic interest rates.\\ It is well known that constant correlation and volatilities assumed in the context of a Black-Scholes model are not supported by empirical evidence. In the seminal paper of Heston, see \cite{Hes}, the pricing of option contracts under stochastic volatility is studied. The idea is extended to stochastic correlation in \cite{AEO12}, while still considering constant volatilities.\\ As an alternative view to correlation, models for the covariance process have been proposed. The pricing of exchanges under stochastic covariance is adopted in Olivares and Villamor(2018), see \cite{Olvillamor}. See for example \cite{Fonseca} for the Wishart model and \cite{pigor} for an Ornstein-Uhlenbeck Levy type model.\\ We consider a bivariate continuous-time GARCH process to model the correlation combined with a pricing method based on a Taylor expansion of the conditional Margrabe price. Continuous-time GARCH processes as limits of the embedded discrete-time counterpart have been proposed, for example, in \cite{drost} or \cite{brock}. See also \cite{hull12}. \\ The organization of the paper is the following:\\ In section 2 we introduce the model, discuss the approximated pricing formula and compute the first and second order moment of the underlying assets, their volatilities and their correlations, whose proofs are deferred to the appendix. In section 3 we discuss the numerical results for the pricing of exchange options between WTI and Brent type oil futures. Finaly, we present the conclusions. \section{Pricing exchange options in models with stochastic correlation } Let $(\Omega ,\mathcal{F}, (\mathcal{F}_{t})_{t \geq 0}, P)$ be a filtered probability space. We denote by $\mathcal{Q}$ a risk-neutral equivalent martingale measure(EMM) and $E_{\mathcal{Q}}$ the expected value with respect to the measure $\mathcal{Q}$. For a process $(X_t)_{t \geq 0}$, the integrated process associated with it is denoted by $(X^+_t)_{t \geq 0}$ and defined as: \begin{equation*} X^+_t= \int_0^t X_s\;ds \end{equation*} The functions $f_{X}(x)$ and $f_{X/Y}(x/y)$ are respectively the probability density function (p.d.f.) of the random vector $X$ and the conditional p.d.f. of the random vector $X$ on the random vector $Y$.\\ A two-dimensional adapted stochastic process $(S_t)_{t \geq 0}=(S^{(1)}_t,S^{(2)}_t)_{t \geq 0}$, where their components are prices of certain underlying assets, is defined on the filtered probability space above.\\ We assume that the process of prices has a dynamic under $\mathcal{Q}$ given by: \begin{eqnarray}\label{modpri1} dS^{(1)}_t &=& r\,S^{(1)}_t\, dt +\sigma_t^{(1)}\,S^{(1)}_t\, dZ_t^{(1)}\\ \label{modpri2} dS^{(2)}_t &=&r\,S^{(2)}_t\, dt +\sigma_t^{(2)}\,\sqrt{1-\rho_t^{(2)}}\,S^{(2)}_t\, dZ_t^{(2)}+\sigma_t^{(2)}\,\rho_t\,S^{(2)}_t\,dZ_t^{(1)} \end{eqnarray} where the $(\sigma_t)_{t \geq 0}=(\sigma_t^{(1)},\sigma_t^{(2)})_{t \geq 0}$ is the volatility process and $\rho_{t}$ is the instantaneous correlation coefficient, which in our models are going to be stochastic. \\ The payoff of a European exchange option, with maturity at time $T>0$ is: \begin{equation}\label{eq:payoff} h(S_T)=(cS^{(1)}_T-m S^{(2)}_T)_+ \end{equation} where $m$ is the number of assets of type two exchanged against $c$ assets of type one. To simplify we assume $c=m=1$.\\ The volatilities are modeled as an Ornstein-Ulenbeck processes: \begin{equation}\label{eq:vol} d\sigma_t^{(j)}=-\alpha_j \sigma_t^{(1)}+ \beta_j dW_t^{(j)},\; j=1,2 \end{equation} The Brownian motions $(W_t^{(1)})_{t \geq 0}$ and $(W_t^{(2)})_{t \geq 0}$ have instantaneous correlation $\rho_V$.\\ By Ito formula: \begin{eqnarray}\label{eq: svol1} dV^{(j)}_t&=& c_1(V^{(j)}_L-V^{(j)}_t)\,dt +\xi_j \sigma^{(j)}_t\, dW_t^{(j)},\; j=1,2 \\ \label{eq: corr} d \rho_t &=& \bar\gamma\,(\bar\Gamma_L- \,\rho_t)\,dt+\bar\alpha \,\sqrt{1- \rho_t^2 }\,d\bar W_t \end{eqnarray} where $V_t=(V^{(1)}_t , V^{(2)}_t)_{t \geq 0}$, with $V^{(j)}_t=(\sigma_t^{(j)})^2, j=1,2$ is the process of squared volatilities. The parameters $V_L=(V^{1}_L, V^{2}_L)$ and $c_j>0$ are respectively the mean-reverting level and rate of the squared volatility processes while $\bar\Gamma_L$ and $\bar\gamma$ play a similar role in the correlation process. \\ The two components of the Brownian motion $(Z_t)_{t \geq 0}=(Z_t^{(1)},\,Z_t^{(2)})_{t \geq 0}$ are assumed to be independent of the second set of Brownian motions $(W_t)_{t \geq 0}=(W_t^{(1)},\, W_t^{(2)})_{t \geq 0}$ and $\bar W_t$. \begin{remark}\label{rem:par} Parameters in models (\ref{eq:vol}) and (\ref{eq: svol1}) are related by $c_j=2 \alpha_j$, $V^j_L=\frac{\beta^2_j}{2 \alpha_j}$ and $\xi_j=2 \beta_j$. \end{remark} Next, we find an expression for the price of the exchange contract. Notice that the price of this contract at time $t$, $0 \leq t \leq T$ with maturity at $T$ is given by: \begin{equation}\label{eq:pri} C_t=e^{-r(T-t)}E_{\mathcal{Q}}[ h(S_T)] \end{equation} Its terminal value is $C_T=h(S_T)$.\\ The price of the exchange contract at time $t$, $t< T$, depends on the behavior of the processes $( V_s, \rho_s)_{ t \leq s \leq T}$ described by equations (\ref{eq: svol1})-(\ref{eq: corr}) and integrated on the interval $[t,T]$. It depends also on the spot prices, volatilities and correlation at time $t$. For simplicity in the notations we explicitly drop this last dependence. For the same reason, we analyze only the case $t=0$. \\ Hence: \begin{eqnarray}\nonumber C_0 &=& e^{-r T}\,\,\int_{\mathbb{R}^5}h(x)f_{S_T, V^+_T, \rho^+_T}(x) \;dx\\ \nonumber &=& e^{-r T}\,\,\int_{\mathbb{R}^3}\left[\int_{\mathbb{R}^2}C_T(x', x'')f_{S_T/ V^+_T, \rho^+_T}(x'/x'') \right]f_{ V^+_T, \rho^+_T}(x'')\;dx'' \\ \label{eq:partpri} &=& \int_{\mathbb{R}^3}C_M(x'')f_{V^+_T, \rho^+_T}(x'')\;dx'' \end{eqnarray} where $x=(x', x'') \in \mathbb{R}^5$. \\ The function $C_M(x'')=e^{-r(T-t)}\int_{\mathbb{R}^2}C_T( x',x'')f_{S_T/ V^+_T, \rho^+_T}(x'/x'')\;dx'$ is the Margrabe price conditionally on $(V^+_T, \rho^+_T)=x''$. After conditioning it equals the Margrabe price, see \cite{marg}. A closed-form for the latter is given by: \begin{equation}\label{eq:pricemag} C_{M}(V^+_T, \rho^+_T)=e^{-r T}S^{(1)}_t N(d_1(v^+_T))-e^{-rT}S^{(2)}_t N(d_2(v^+_T)) \end{equation} with: \begin{eqnarray*} d_1(v^+_T)&=&\frac{\log \left(\frac{ S^{(1)}_t}{ S^{(2)}_t} \right)+\frac{1}{2}v^+_T }{\sqrt{v^+_T} }\\ d_2(v^+_T)&=&\frac{\log \left(\frac{ S^{(1)}_t}{ S^{(2)}_t} \right)-\frac{1}{2}v^+_T }{\sqrt{v^+_T} }=d_1(v^+_T)-\sqrt{v^+_T} \end{eqnarray*} where: \begin{equation*} v^+_T=V^{1,+}_T+V^{2,+}_T-2 \sqrt{V^{1,+}_T V^{2,+}_T} \rho^+_T \end{equation*} and $(V^+_t)_{t \geq 0}=(V^{1,+}_t, V^{2,+}_t)_{t \geq 0}$.\\ Next, to approximate the price in equation (\ref{eq:pri}) we consider a second order Taylor expansion of the conditional Margrabe price $C_{M}(x), x \in \mathbb{R}^3$ around the average values given by $x_0=(E_{\mathcal{Q}}(V^{1,+}_T), E_{\mathcal{Q}}(V^{2,+}_T), E_{\mathcal{Q}}(\rho^+_T))$. It leads to: \begin{eqnarray}\nonumber \hat{C}_M(x) &=& C_M(x_0)+\frac{\partial C_M(x_0)}{\partial x_1}(x_1-x_{0,1})+\frac{\partial C_M(x_0)}{\partial x_2}(x_2-x_{0,2})+\frac{\partial C_M(x_0)}{\partial x_3}(x_{0,3}-x_0)\\ \nonumber &+& \frac{1}{2}\frac{\partial^2 C_M(x_0)}{\partial x^2_1}(x_1-x_{0,1})^2 + \frac{1}{2}\frac{\partial^2 C_M(x_0)}{\partial x^2_2}(x_2-x_{0,2})^2 \\ \nonumber &+& \frac{1}{2} \frac{\partial^2 C_M(x_0)}{\partial x^2_{3}}(x_3-x_{0,3})^2 + \frac{\partial^2 C_M(x_0)}{\partial x_1 x_2}(x_1-x_{0,1})(x_2-x_{0,2})\\ \nonumber &+& \frac{\partial^2 C_M(x_0)}{\partial x_1 x_3}(x_1-x_{0,1})(x_3-x_{0,3})+ \frac{\partial^2 C_M}{\partial x_2 x_3}(x_0)(x_2-x_{0,2})(x_3-x_{0,3})\\ \label{eq:taylor} && \end{eqnarray} Combining equations (\ref{eq:partpri}) and (\ref{eq:taylor}) we have the price $C_0$ is approximated by: \begin{eqnarray}\nonumber \hat{C}_0 &=& C_M(x_0)+ \frac{1}{2}\frac{\partial^2 C_M(x_0)}{\partial x^2_1}Var_{\mathcal{Q}}(V^{1,+}_T) + \frac{1}{2}\frac{\partial^2 C_M(x_0)}{\partial x^2_2}Var_{\mathcal{Q}}(V^{2,+}_T) \\ \nonumber &+& \frac{1}{2} \frac{\partial^2 C_M(x_0)}{\partial x^2_{3}}Var_{\mathcal{Q}}(\rho^+_T) + \frac{\partial^2 C_M(x_0)}{\partial x_1 x_2}cov_{\mathcal{Q}}(V^{1,+}_T, V^{2,+}_T)\\ \label{eq:price} \end{eqnarray} Notice that the Margrabe price $C_M(x) \in C^{\infty}(\mathbb{R}^3)$ except in a set of zero Lebesgue measure.\\ We substitute equation (\ref{eq:taylor}) into (\ref{eq:partpri}). Noticing that: \begin{eqnarray*} \int_{\mathbb{R}^3} (x_1-x_{0,1})f_{V^+_T, \rho^+_T}(x)\;dx &=& \int_{\mathbb{R}} (x_1-x_{0,1})\left[\int_{\mathbb{R}^2}f_{V^+_T, \rho^+_T}(x)\;dx_2\;x_3 \right]\;x_1\\ &=& \int_{\mathbb{R}} (x_1-x_{0,1})f_{V^{1,+}_T}(x_1) dx_1=E_{\mathcal{Q}}(V^{1,+}_T-E_{\mathcal{Q}}(V^{1,+}_T))=0\\ \int_{\mathbb{R}^3} (x_2-x_{0,2})f_{V^+_T, \rho^+_T}(x)\;dx &=& \int_{\mathbb{R}} (x_2-x_{0,2})\left [\int_{\mathbb{R}^2}f_{V^+_T, \rho^+_T}(x)\;dx_1\;x_3 \right]\;x_2\\ &=& \int_{\mathbb{R}} (x_2-x_{0,2})f_{V^{2,+}_T}(x_2) dx_2=E_{\mathcal{Q}}(V^{2,+}_T-E_{\mathcal{Q}}(V^{2,+}_T))=0\\ \int_{\mathbb{R}^3} (x_3-x_{0,3})f_{V^+_T, \rho^+_T}(x)\;dx &=& \int_{\mathbb{R}} (x_3-x_{0,3})\left [\int_{\mathbb{R}^2}f_{V^+_T, \rho^+_T}(x)\;dx_1\;x_2 \right]\;x_3\\ &=& \int_{\mathbb{R}} (x_3-x_{0,3})f_{\rho^{+}_T}(x_3) dx_3=E_{\mathcal{Q}}(\rho^{+}_T-E_{\mathcal{Q}}(\rho^{+}_T))=0\\ \end{eqnarray*} Hence, we have equation (\ref{eq:price}). \begin{remark} Sensitivities with respect to the parameters in the contract can be computed in a similar way. For example, an approximation of the deltas in the exchange contract are obtaining by differentiating equation (\ref{eq:price}) with respect to the price of the underlying assets. \end{remark} Computing derivatives of the Margrabe price, given by equation (\ref{eq:pricemag}), with respect to the volatilities and correlation is straightforward. This aspect is addressed in appendix B.\\ In order to estimate the option pricing function above we need to compute the moments of $(V^{1,+}_T, V^{+,2}_T,\rho^+_T)$. To this end we introduce the following notations: \begin{eqnarray*} mr_j(t)&=& E[\rho^j_t],\; mr^+_j(t)=E[(\rho^+_t)^j],\; j=1,2\\ mv_{j,k}(t)&=& E[(V^{(k)}_t)^j],\; mv^+_{j,k}(t)=E[(V^{k,+}_t)^j]\; j,k=1,2\\ mv_{12}(t)&=& E[V^{(1)}_t V^{(2)}_t],\; mv^+_{12}(t)= E[V^{1,+}_t V^{2,+}_t] \end{eqnarray*} Results are given in the propositions below, while proofs are deferred to appendix A. \begin{proposition}\label{prop:momentsrho} Let the correlation process $( \rho_t)_{t \geq 0}$ satisfy equation (\ref{eq: corr}). Then: \begin{eqnarray}\label{eq:exprho} E_{\mathcal{Q}}(\rho^+_t) &=& \bar \Gamma_L t+\left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right)(1-e^{-\bar\gamma t}) \\ \nonumber Var_{\mathcal{Q}}(\rho^+_t) &=& b_0+ \left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right)^2 +\left(b_1+2\bar \Gamma_L \left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right)\right)t\\ \nonumber &+& (b_2+ \bar\Gamma^2_L) t^2+ \left(b_3- 2 \bar\Gamma_L \left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right) \right)t e^{-\bar\gamma t}+b_4 e^{-(2\bar\gamma+\bar\alpha^2)t}\\ \nonumber &-& \left(b_0+b_4+2 \left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right)^2 \right) e^{-\bar\gamma t}+ \left(\frac{\rho_0-\bar\Gamma_L}{\bar\gamma}\right)^2 e^{-2 \bar\gamma t}\\ \label{eq:varrho} && \end{eqnarray} where: \begin{eqnarray*} a_1 &=& \frac{2 \bar\gamma \bar \Gamma^2_L+ \bar\alpha^2 }{2\bar\gamma+\bar\alpha^2}, a_2 = \frac{2 \bar\gamma \bar \Gamma_L(\rho_0-\bar \Gamma_L)}{\bar\gamma+\bar\alpha^2}\\ b_0 &=& \frac{1}{\bar\gamma^2} \left( -a_1+\rho^2_0-2 \bar \Gamma_L+\frac{2}{\bar\gamma^2} \right.\\ &-& \left. \frac{\bar \alpha^2}{\bar\gamma^2}\left(1+\frac{a_1}{\bar\gamma}+ a_2\right)-\frac{\alpha^2 (\rho^2_0-a_1-a_2)}{ \bar\gamma(2 \bar\gamma+\bar\alpha^2)} \right)\\ b_1 &=& \frac{1}{\bar\gamma} \left( -a_2+ 2 \bar \Gamma_L- \frac{2}{\bar\gamma^2}+ \frac{\bar\alpha^2}{\bar\gamma}- \frac{a_1 \bar\alpha^2}{\bar\gamma^2} \right) \\ b_2 &=& 1, \; b_3 = \frac{a_2 \bar\alpha^2}{\bar\gamma^3} \\ b_4 &=& -\frac{\bar\alpha^2}{\bar\gamma^2}\frac{(\rho^2_0-a_1-a_2)}{(2 \bar\gamma+\bar\alpha^2)(\bar\gamma+\bar\alpha^2)} \end{eqnarray*} \end{proposition} Second order moments and covariance of the integrated squared volatility are given in the propositions above: \begin{proposition}\label{prop:momentsv} Let the process $( V_t)_{t \geq 0}$ satisfy equations (\ref{eq: svol1})-(\ref{eq: vol2}). Then: \begin{eqnarray}\label{eq:firstmomvol} mv^+_{1,j}(t) &=& V^{(j)}_L t +\frac{V^{(j)}_0-V^{(j)}_L}{c_j}(1-e^{-c_jt}) \\ \nonumber mv^+_{2,j}(t) &=& P_1(t)+c e^{-c_j t}+g_0 e^{-2c_j t}+g_1 e^{-3c_j t}+g_2 t e^{-c_j t}\\ Var_{\mathcal{Q}}[V_t^{+,j}]&=& mv^+_{2,j}(t)-[mv^+_{1,j}(t)]^2 \end{eqnarray} with: \begin{eqnarray*} P_1(t)&=&\frac{1}{c^3_j}(V^{(j)}_L)^2 t^2+\frac{1}{c^3_j} \left((2-\frac{V^{(j)}_L}{c_j})V^{(j)}_L+ \xi^2_j V^{(j)}_L\right)t\\ &+& \frac{1}{c^3_j} \left( (V^{(j)}_0)^2+\frac{2(V^{(j)}_L)^2}{c^2_j}- \frac{\xi^2_j V^{(j)}_L}{c_j}\right)\\ c &=& \frac{1}{c^3_j}(\frac{1}{c_j}\xi^2_j V^{(j)}_L+d_0+\frac{d_1}{2}-\frac{2(V^{(j)}_L)^2 }{c^2_j})\\ g_0 &=& - \frac{1}{c^3_j}[d_0+(V^{(j)}_0)^2-d_1]\\ g_1 &=& - \frac{1}{c^3_j},g_2 = \frac{1}{c^3_j} \left[\xi^2_j ( V^{(j)}_0-V^{(j)}_L) \right] \end{eqnarray*} \end{proposition} \begin{proposition}\label{eq:covvol} Let the process $( V_t)_{t \geq 0}$ satisfy equations (\ref{eq: svol1})-(\ref{eq: vol2}). Then: \begin{eqnarray}\nonumber cov( V^{(1)}_t, V^{(2)}_t) &=& mv^+_{12}- mv^+_{1,1}(t)mv^+_{1,2}(t) \end{eqnarray} where: \begin{eqnarray}\nonumber mv^+_{12}(t) &=& E_{\mathcal{Q}}[V_t^{+,1}V_t^{+,2}]= \frac{1}{c_1 c_2} \left[ P_3(t)- (V^{(1)}_0+ c_1 V^{(1)}_L t) mv_{1,2}(t) - (V^{(2)}_0+c_2 V^{(2)}_L t )mv_{1,1}(t) \right.\\ \nonumber &+& \left. ms_{12}(t) -\xi_1 \xi_2 \rho_V e^{-c_1 t} B_1(t) - \xi_1 \xi_2 \rho_V e^{-c_2 t}B_2(t) + \xi_1 \xi_2 \rho_V A(t) \right] \end{eqnarray} where: \begin{eqnarray*} P_3(t)&=& V^{(1)}_0 V^{(2)}_0+ c_2 V^{(1)}_0 V^{(2)}_L t+ c_1 V^{(2)}_0 V^{(1)}_L t +c_1 c_2 V^{(1)}_L V^{(2)}_L t^2 \\ A(t) &=& \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2)}\left( t- \frac{2}{c_1+c_2}(1-e^{-\frac{1}{2}(c_1+c_2)t}) \right)+\frac{2(\sigma_0^{(1)} \sigma_0^{(2)})}{c_1+c_2}((1-e^{-\frac{1}{2}(c_1+c_2)t}))\\ B_j(t) &=& \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2)}\left(\frac{1}{c_j}(e^{c_j t}-1) - \frac{2(-1)^j}{c_2-c_1}(e^{\frac{1}{2}(-1)^j(c_2-c_1)t}-1) \right)\\ &+& \sigma_0^{(1)} \sigma_0^{(2)}(\frac{2(-1)^j}{c_2-c_1}(e^{\frac{1}{2}(-1)^j(c_2-c_1)t}-1)) \end{eqnarray*} The functions $m^+_{1,j}(t)$ are given by equation (\ref{eq:firstmomvol}) while: \begin{eqnarray*} ms_{12}(t) &=& \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2}\left( 1-\exp(-\frac{1}{2}(c_1+c_2)t) \right)+\sigma_0^{(1)} \sigma_0^{(2)}\exp(-\frac{1}{2}(c_1+c_2)t)\\ m_{1,j}(t) &=& V^{(j)}_L +(V^{(j)}_0-V^{(j)}_L)e^{-c_jt} \end{eqnarray*} \end{proposition} \begin{figure}[htb!] \begin{center} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{corrwtibrentprices2.pdf}} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{corrlogretwtibrent.pdf}} \caption{Left: Fifty days moving window correlation coefficient between WTI and Brent daily future prices . Right: Same window for the log-returns}\label{fig:brentwti} \end{center} \end{figure} \begin{figure}[htb!] \begin{center} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{simwtibren.pdf}} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{volat.pdf}}}\hspace{5pt} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{simcorr.pdf}} \caption{Counterclockwise from the top left figure a simulated series of prices, while the top right figure shows a realization of the squared volatilities. The series in the bottom is a simulated trajectory of the correlation process.}\label{fig:simtraject} \end{center} \end{figure} \begin{figure}[htb!] \begin{center} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{cmargvsvol12.pdf}} \subfigure[]{ \resizebox*{7cm}{!}{\includegraphics{cmargvsvol1rho.pdf}}}\hspace{5pt} \caption{A change in the prices of an exchange contract with respect to squared volatilities(left) and the correlation(right). }\label{fig:mcvsvol} \end{center} \end{figure} \section{Numerical results} We consider the series of daily closure prices per barrel in US dollars in NYSE of types WTI(blue) and Brent (red), period Dec 2013 to Jan 2019 and the corresponding log-returns. Both series of prices exhibit similar patterns and, as it is expected, are highly correlated. The overall correlation of the series of prices is equal to $98$\% while the correlation of the log-returns is $3.81$\%. However, when the correlation is computed on a sliding windows of 50 days it exhibits notable random variations. See figures \ref{fig:brentwti}a) and b). \\ A summary of the first forth moments of the log-return series is shown in table \ref{tab:statsum}. A high kurtosis indicates the presence of heavy-tailed distribution in both commodities. \begin{table}[htp!] \centering \begin{tabular}{|c|c|c|c|c|} \hline Asset& Mean & Standard deviation & Skewness & Kurtosis \\ \hline WTI & -0.0003 & 0.0211 & 0.1089 & 6.0696 \\ \hline Brent &-0.0004 & 0.0201 & 0.1473 & 5.9818 \\ \hline \end{tabular} \caption{First four moments of log-returns WTI, Brent, US/Can}\label{tab:statsum} \end{table} To illustrate the behavior of the components in the model we take the following set of parameters in table \ref{tab:par}. As initial prices of both assets values $S^{(1)}_0=100, S^{(2)}_0=100$ dollars are taken, initial squared volatilities $V_0=(0.3,0.3)$, the initial correlation $\rho_0=0.8$, correlation between the Brownian motions in the volatility $\rho_v=0.80$, the mean-reverting levels and rates of the volatility processes are $V_L=(1,1)$ respectively while analogous parameters in the correlation processes are $\bar{\Gamma}=0.8$ and $\bar{\gamma}=0.8$. The annual interest rate is $r=4$\%, and the simulation time is one year. Parameters were chosen for illustrative proposes. Other parameters are shown in table \ref{tab:par}. \begin{table}[htp!] \centering \begin{tabular}{|c|c|c|c|} \hline Asset& WTI sqr. vol. & Brent sqr. vol. & Correlation \\ Component & & &\\ \hline MR level & $V^{(1)}_L=1$ & $V^{(2)}_L=1$ & $\bar{\Gamma}=0.8$ \\ \hline MR rate & $c_1=1$ & $c_2=1$ & $\bar{\gamma}=0.8$ \\ \hline vol. & $xi_1=1$ & $xi_2=1$ & $\bar{\alpha}=1$\\ \hline Initial values & $V^{(1)}_0=0.3$& $V^{(2)}_0=0.3$ & $\rho_0=0.7$ \\ \hline \end{tabular} \caption{Parametric set for the squared volatilities and correlation sets.}\label{tab:par} \end{table} The results of the simulation are shown in figure \ref{fig:simtraject}. The top left graph represents the series of prices, while the top right figure shows a realization of the squared volatilities. The series in the bottom is a simulated trajectory of the correlation process. A change in the prices of an exchange contract with respect to squared volatilities and the correlation are shown in figure \ref{fig:mcvsvol}. The remaining parameters are held constant. Prices are calculated according to a Monte Carlo procedure with $10^5$ realizations. \section{Conclusions} Taylor approximation offers a suitable method to price exchanges contracts beyond the classic framework developed originally by Margrabe. In the parametric set considered it produces accurate results with less computational effort than a traditional Monte Carlo approach. \section{Appendix} \subsection{Appendix A: Moments of the volatility and correlation} \textbf{Proof of proposition \ref{prop:momentsrho}} \begin{proof} For the first moment notice that: \begin{equation}\label{eq:rholin} \rho_t = \rho_0+ \bar\gamma\, \bar \Gamma_L t- \bar\gamma \int_0^t \rho_s\;ds+\bar\alpha \int_0^t \sqrt{1- \rho_s^2 }\,d\bar W_s \end{equation} Taking expected value on both sides: \begin{equation*} mr_1(t):= E_{\mathcal{Q}}(\rho_t) = \rho_0+ \bar\gamma\,\bar \Gamma_L t- \bar\gamma \int_0^t mr_1(s) \;ds \end{equation*} Differentiating we get: \begin{equation*} mr_1'(t)= \bar\gamma \bar \Gamma_L - \bar\gamma mr_1(t) \end{equation*} whose solution is: \begin{equation*} mr_1(t)= \bar \Gamma_L + (\rho_0-\bar \Gamma_L)e^{-\bar\gamma t} \end{equation*} Similarly, for the integrated process: \begin{eqnarray*} E_{\mathcal{Q}}(\rho^+_t) &=& \int_0^t \bar \Gamma_L + (\rho_0-\bar \Gamma_L)e^{-\bar\gamma s}\;ds\\ &=& \bar \Gamma_L t+\left(\frac{\rho_0-\bar \Gamma_L}{\bar\gamma}\right)(1-e^{-\bar\gamma t}) \end{eqnarray*} To compute the second moment we first apply Ito formula to $f(x)=x^2$ and the correlation process. Hence: \begin{eqnarray*} \rho^2_t &=& \rho^2_0+ 2 \int_0^t \rho_s d \rho_s+ <\rho_t>\\ &=& \rho^2_0+ 2 \bar\gamma \bar \Gamma_L \int_0^t \rho_s\;ds - 2 \bar\gamma \int_0^t \rho^2_s\;ds+2 \bar\alpha \int_0^t \rho_s \sqrt{1- \rho_s^2 }\,d\bar W_s\\ &+& \bar\alpha^2 \int_0^t (1- \rho_s^2 )\,ds\\ &=& \rho^2_0+ \bar\alpha^2 t + 2 \bar\gamma \bar \Gamma_L \int_0^t \rho_s\;ds-(\bar\alpha^2+2 \bar\gamma)\int_0^t \rho^2_s\;ds \\ &+& 2 \bar\alpha \int_0^t \rho_s \sqrt{1- \rho_s^2 }\,d\bar W_s \end{eqnarray*} Taking expected value: \begin{eqnarray*} E_{\mathcal{Q}}(\rho^2_t) &=& \rho^2_0+ \bar\alpha^2 t + 2 \bar\gamma \bar \Gamma_L \int_0^t E_{\mathcal{Q}}(\rho_s)\;ds-(\bar\alpha^2+2 \bar\gamma)\int_0^t E_{\mathcal{Q}}(\rho^2_s)\;ds \end{eqnarray*} or after differentiating: \begin{eqnarray*} mr'_2(t)&+& (2\bar\gamma+\bar\alpha^2 )mr_2(t) = 2 \bar\gamma \bar \Gamma_L mr_1(t)+ \bar\alpha^2 \\ mr_2(0) &=& \rho^2_0 \end{eqnarray*} its solution is: \begin{eqnarray}\label{eq:smomrho} mr_2(t) &=& a_1 + a_2 e^{-\bar\gamma t}+ (\rho^2_0-a_1-a_2) e^{-(2\bar\gamma+\bar\alpha^2)t} \end{eqnarray} Next, notice that we have: \begin{eqnarray*} \frac{mr^{+}_{2}}{dt} &=& 2 E_{\mathcal{Q}}[\rho^+_t \rho_t] \end{eqnarray*} From equation (\ref{eq:rholin}): \begin{eqnarray*} E_{\mathcal{Q}}(\rho_t+\bar\gamma \rho^+_t)^2&=& E_{\mathcal{Q}}(\rho_0+ \bar\gamma\, \bar \Gamma_L t+\bar\alpha \int_0^t \sqrt{1- \rho_s^2 }\,d\bar W_s)^2 \end{eqnarray*} Expanding both sides in the equation above we have: \begin{eqnarray*} LHS=E_{\mathcal{Q}}(\rho_t+\bar\gamma \rho^+_t)^2&=& E_{\mathcal{Q}}(\rho^2_t)+2 \bar\gamma E_{\mathcal{Q}}(\rho_t \rho^+_t)+\bar\gamma^2 E_{\mathcal{Q}}( \rho^+_t)^2\\ &=& mr_2(t)+ \bar\gamma \frac{mr^{+}_{2}}{dt}+\bar\gamma^2 mr^+_{2}(t) \end{eqnarray*} and \begin{eqnarray*} RHS&=& (\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+2 (\rho_0+ 2 \bar\gamma\, \bar \Gamma_L t)\bar\alpha E_{\mathcal{Q}}(\int_0^t \sqrt{1- \rho_s^2 }\,d\bar W_s)\\ &+& \bar\alpha^2 E_{\mathcal{Q}} \left(\int_0^t \sqrt{1- \rho_s^2 }\,d\bar W_s \right)^2\\ &=& (\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 E_{\mathcal{Q}}(\int_0^t \sqrt{1- \rho_s^2 }\,d\bar W_s)^2\\ &=& (\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 E_{\mathcal{Q}} \left(\int_0^t (1- \rho_s^2)\,ds \right)\\ &=& (\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 (t- \int_0^t mr_2(s)\;ds) \end{eqnarray*} From equation (\ref{eq:smomrho}): \begin{eqnarray*} \int_0^t mr_2(s)\;ds &=& \int_0^t (a_1 + a_2 e^{-\bar\gamma s}+ (\rho^2_0-a_1-a_2) e^{-(2\bar\gamma+\bar\alpha^2)s}\;ds\\ &=& a_1 t + \frac{a_2}{\bar\gamma}(1-e^{-\bar\gamma t})+ \frac{\rho^2_0-a_1-a_2}{2\bar\gamma+\bar\alpha^2}(1-e^{-(2\bar\gamma+\bar\alpha^2)t}) \end{eqnarray*} Hence, \begin{eqnarray*} \frac{mr^{+}_{2}}{dt} + \bar\gamma mr^+_{2}(t)&=& b(t) \end{eqnarray*} where: \begin{eqnarray*} b(t)&=& \frac{1}{\bar\gamma}\left(-mr_2(t)+(\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 t-\frac{\bar\alpha^2}{\bar\gamma}\int_0^t mr_2(s)\;ds \right)\\ &=& \frac{1}{\bar\gamma}\left(-mr_2(t)+(\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 t \right. \\ &-& \frac{1}{\bar\gamma} \left. \left(a_1 t + \frac{a_2}{\bar\gamma}(1-e^{-\bar\gamma t})+ \frac{\rho^2_0-a_1-a_2}{2\bar\gamma+\bar\alpha^2}(1-e^{-(2\bar\gamma+\bar\alpha^2)t}) \right) \right) \end{eqnarray*} and initial condition $mr_{+,2}(0)=0$.\\ Using the integrating factor $e^{\bar\gamma t}$ we find that its solution is: \begin{eqnarray}\label{eq:bt} mr^+_{2}(t) &=& e^{-\bar\gamma t}\int e^{\bar\gamma t}b(t)\;dt+c e^{-\bar\gamma t} \end{eqnarray} But: \begin{eqnarray*} \int e^{\bar\gamma t}b(t)\;dt &=& \frac{1}{\bar\gamma} \int e^{\bar\gamma t} \left(-mr_2(t)+(\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2+ \bar\alpha^2 t \right) \\ &-& \frac{\bar\alpha^2}{\bar\gamma^2} \int e^{\bar\gamma t} \left(a_1 t + \frac{a_2}{\bar\gamma}(1-e^{-\bar\gamma t})+ \frac{\rho^2_0-a_1-a_2}{2\bar\gamma+\bar\alpha^2}(1-e^{-(2\bar\gamma+\bar\alpha^2)t}) \right) \;dt \end{eqnarray*} Moreover, from equation (\ref{eq:smomrho}): \begin{eqnarray*} \int e^{\bar\gamma t} mr_2(t)\;dt &=& \int e^{\bar\gamma t} (a_1 + a_2 e^{-\bar\gamma t}+ (\rho^2_0-a_1-a_2) e^{-(2\bar\gamma+\bar\alpha^2)t}) \;dt\\ &=& \frac{a_1}{\bar\gamma}e^{\bar\gamma t} + a_2 t - \frac{\rho^2_0-a_1-a_2}{\bar\gamma+\bar\alpha^2} exp(-(\bar\gamma+\bar\alpha^2)t)) \\ \int (\rho_0+ \bar\gamma\, \bar \Gamma_L t)^2e^{\bar\gamma t}\;dt &=& \frac{\rho^2_0}{\bar\gamma}e^{\bar\gamma t}+2 \bar\gamma \bar \Gamma_L (\frac{1}{\bar\gamma}e^{\bar\gamma t}t-\frac{1}{\bar\gamma^2}e^{\bar\gamma t})\\ &+& \bar\gamma^2 \bar \Gamma^2_L(\frac{1}{\bar\gamma}t^2e^{\bar\gamma t}-\frac{2}{\bar\gamma}t e^{\bar\gamma t}+\frac{2}{\bar\gamma^3} e^{\bar\gamma t})\\ &=& [\rho^2_0+2 \bar\gamma \bar \Gamma_L(t-\frac{1}{\bar\gamma})+t^2-\frac{2}{\bar\gamma}t +\frac{2}{\bar\gamma^2}] \frac{1}{\bar\gamma}e^{\bar\gamma t}\\ \int t e^{\bar\gamma t} \;dt &=& [t-\frac{1}{\bar\gamma^2}] \frac{1}{\bar\gamma}e^{\bar\gamma t} \end{eqnarray*} Hence: \begin{eqnarray*} \int e^{\bar\gamma t}b(t)\;dt &=& -\frac{1}{\bar\gamma^2}a_1 e^{\bar\gamma t}-(\frac{a_2}{\bar\gamma})t + \left(\frac{\rho^2_0-a_1-a_2}{\bar\gamma(\bar\gamma+\bar\alpha^2)} \right) e^{-(\bar\gamma+\bar\alpha^2)t}\\ &+& \frac{1}{\bar\gamma^2}(\rho^2_0+2 \bar\gamma \bar \Gamma_L(t-\frac{1}{\bar\gamma})+t^2-\frac{2}{\bar\gamma}t +\frac{2}{\bar\gamma^2}) e^{\bar\gamma t}\\ &+& \frac{\bar\alpha^2}{\bar\gamma^2}\left(t- \frac{1}{\bar\gamma^2} \right) e^{\bar\gamma t}\\ &-& \frac{\bar\alpha^2}{\bar\gamma^2} \left( \frac{a_1}{\bar\gamma}(t-\frac{1}{\bar\gamma^2})e^{\bar\gamma t}+ \frac{a_2}{\bar\gamma^2}e^{\bar\gamma t}- \frac{a_2}{ \bar\gamma}t \right.\\ &+& \left. \frac{\rho^2_0-a_1-a_2}{ \bar\gamma(2 \bar\gamma+\bar\alpha^2)}e^{\bar\gamma t}+\frac{\rho^2_0-a_1-a_2}{(2 \bar\gamma+\bar\alpha^2)(\bar\gamma+\bar\alpha^2)}e^{-(\bar\gamma+\bar\alpha^2)t}\right) \end{eqnarray*} Combining the expressions above into equation (\ref{eq:bt}) we have: \begin{eqnarray*} mr^+_{2}(t) &=& b_0+b_1t+b_2 t^2+b_3 t e^{-\bar\gamma t}+b_4 e^{-(2\bar\gamma+\bar\alpha^2)t}+c e^{-\bar\gamma t} \end{eqnarray*} From the initial conditions $c=-b_0-b_4$.\\ Combining the first and second moments of $\rho^+_t$ we obtain the expression for the variance in equation \ref{eq:varrho}. \end{proof} \textbf{Proof of proposition \ref{prop:momentsv}} \begin{proof} To compute the first and second moments we proceed similarly to the proof of proposition 2.3. Notice equations for squared volatilities are of mean-reverting square root type s.d.e's as well.\\ Hence: \begin{eqnarray*} mv_{1,j}(t) &=& V^{(j)}_L +(V^{(j)}_0-V^{(j)}_L)e^{-c_jt}\\ mv^+_{1,j}(t)&=& E_{\mathcal{Q}}[V_t^{+,j}]= V^{(j)}_L t +\frac{V^{(j)}_0-V^{(j)}_L}{c_j}(1-e^{-c_jt}) \end{eqnarray*} Moreover, \begin{eqnarray*} (V^{(j)}_t)^2 &=& (V^{(j)}_0)^2+ 2 \int_0^t V^{(j)}_s d V^{(j)}_s+ <V^{(j)}_t>\\ &=& (V^{(j)}_0)^2+ 2 c_j V^{(j)}_L V^{j,+}_t - 2 c_j \int_0^t (V^{(j)}_s)^2\;ds+2 \xi_j \int_0^t V^{(j)}_s \sigma^{(j)}_s \,dW^{(j)}_s\\ &+& \xi_j^2 V^{j,+}_t\\ &=& (V^{(j)}_0)^2+ (2 c_j V^{(j)}_L+\xi^2_j) V^{j,+}_t-2 c_j \int_0^t (V^{(j)}_s)^2\;ds \\ &+& 2 \xi_j \int_0^t V^{(j)}_s \sigma^{(j)}_s\,dW^{(j)}_s \end{eqnarray*} Taking expected value on both sides: \begin{eqnarray*} mv_{2,j}(t) &=& (V^{(j)}_0)^2+ (2 c_j V^{(j)}_L+\xi^2_j) \int_0^t mv_{1,j}(s)\;ds-2 c_j \int_0^t mv_{2,j}(s)\;ds \end{eqnarray*} or \begin{eqnarray*} mv'_{2,j}(t)&+& 2c_j mv_{2,j}(t)=(2 c_j V^{(j)}_L+\xi^2_j)mv_{1,j}(t) \\ mv_{2,j}(0) &=& (V^{(j)}_0)^2 \end{eqnarray*} with $c(t)=(2 c_j V^{(j)}_L+\xi_j^2)mv_{1,j}(t)$.\\ Its solution is: \begin{eqnarray*} mv_{2,j}(t) &=& e^{-2c_j t} \int e^{2 c_j t}c(t)\;dt+d_2 e^{-2c_j t} \end{eqnarray*} But: \begin{eqnarray*} \int e^{2 c_j t}c(t)\;dt &=& (2 c_j V^{(j)}_L+\xi_j^2) \int e^{2 c_j t}mv_{1,j}(t) \;dt\\ &=& (2 c_j V^{(j)}_L+\xi_j^2) \int e^{2 c_j t}(V^{(j)}_L +(V^{(j)}_0-V^{(j)}_L)e^{-c_jt}) \;dt\\ &=& (2 c_j V^{(j)}_L+\xi_j^2) (\frac{V^{(j)}_L}{2 c_j}e^{2 c_j t}+\frac{V^{(j)}_0-V^{(j)}_L}{c_j}e^{c_j t}) \end{eqnarray*} Then: \begin{eqnarray}\label{eq:smomrho} mv_{2,j}(t) &=& d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t} \end{eqnarray} where: \begin{eqnarray*} d_0 &=& (2 c_j V^{(j)}_L+\xi_j^2)\frac{ V^{(j)}_L}{2 c_j}\\ d_1 &=& (2 c_j + \xi_j^2)\frac{(V^{(j)}_0-V^{(j)}_L)}{c_j}\\ d_2 &=& (V^{(j)}_0)^2-d_0-d_1 \end{eqnarray*} Next, notice that we have: \begin{eqnarray}\label{eq:rhorhomas} \frac{dmv^+_{2,j}}{dt} &=& 2 E_{\mathcal{Q}}[V^{(j,+)}_t V^{(j)}_t] \end{eqnarray} Now: \begin{eqnarray}\nonumber E_{\mathcal{Q}}(V^{(j)}_t+c_j V^{j,+}_t)^2&=& E_{\mathcal{Q}}[V^{(j)}_0+ c_j\, V^{(j)}_L t+\xi_j \int_0^t\sigma^{(j)}_s \,dW^{(j)}_s]^2\\ \nonumber &=& (V^{(j)}_0+ c_j\, V^{(j)}_L t)^2+2(V^{(j)}_0+c_j V^{(j)}_L t) \xi_j E_{\mathcal{Q}}\left(\int_0^t \sigma^{(j)}_s \,dW^{(j)}_s \right)\\ \nonumber &+& \xi^2_j E_{\mathcal{Q}}\left(\int_0^t \sigma^{(j)}_s \,dW^{(j)}_s \right)^2\\ \label{eq:rhs} &=& (V^{(j)}_0+ c_j\, V^{(j)}_L t)^2+ \xi^2_j \int_0^t mv_{1,j}(s)\;ds \end{eqnarray} On the other hand, after expanding the expression above and taking into account equation (\ref{eq:rhorhomas}): \begin{eqnarray}\label{eq:mv2plus} E_{\mathcal{Q}}(V^{(j)}_t+c_j V^{j,+}_t)^2&=& mv_{2,j}(t)+c_j\frac{dmv^+_{2,j}}{dt}+ c^2_j mv^+_{2,j} \end{eqnarray} Hence, equating equations (\ref{eq:rhs}) and (\ref{eq:rhorhomas}) we have that $mv^+_{2,j}$ satisfies: \begin{eqnarray} \label{eq:intvsqvol} \frac{d mv^+_{2,j}}{dt}+ c_j mv^+_{2,j}(t) &=&d(t)\\ \nonumber mv^+_{2,j}(0) &=& 0 \end{eqnarray} with: \begin{eqnarray*} d(t)&=& \frac{(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2}{c_j}+ \frac{\xi^2_j}{c_j} \int_0^t mv_{1,j}(s)\;ds -\frac{1}{c_j} mv_{2,j}(t)\\ &=&\frac{(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2}{c_j}+ \frac{\xi^2_j}{c_j} \int_0^t V^{(j)}_L +(V^{(j)}_0-V^{(j)}_L)e^{-c_jt}\;ds \\ &-& \frac{1}{c_j}(d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t})\\ &=&\frac{(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2}{c_j}+ \frac{\xi^2_j}{c_j} V^{(j)}_L t -\frac{\xi^2_j }{c^2_j}(V^{(j)}_0-V^{(j)}_L)e^{-c_jt} \\ &-& \frac{1}{c_j}(d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t}) \end{eqnarray*} The solution of equation (\ref{eq:intvsqvol}) is: \begin{eqnarray}\nonumber mv^+_{2,j}(t) &=& e^{-c_j t} \int e^{c_j t}d(t)\;dt+c e^{-c_j t}\\ \nonumber &=& e^{-c_j t} \int e^{c_j t}\left[\frac{(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2}{c_j}+ \frac{\xi^2_j}{c_j} V^{(j)}_L t -\frac{\xi^2_j }{c^2_j}(V^{(j)}_0-V^{(j)}_L)e^{-c_jt} \right. \\ \nonumber &-& \left. \frac{1}{c_j}(d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t}) \right]\;dt+c e^{-c_j t}\\ \nonumber &=& \frac{e^{-c_j t}}{c_j} \int e^{c_j t}\left[(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2+ \xi^2_j V^{(j)}_L t -\frac{\xi^2_j }{c_j}(V^{(j)}_0-V^{(j)}_L)e^{-c_jt} \right. \\ \nonumber &-& \left. (d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t} ) \right]\;dt+d_3 e^{-c_j t}\\ \label{eq:diff2mom} && \end{eqnarray} Moreover: \begin{eqnarray*} && \int e^{c_j t}(V^{(j)}_0+ c_j\, V^{(j)}_L t)^2\;dt = \frac{(V^{(j)}_0)^2}{c_j}V^{(j)}_0 e^{c_j t}+ 2 c_j\, V^{(j)}_L \int t e^{c_j t} \;dt + (V^{(j)}_L )^2 c^2_j \int t^2 e^{c_j t} \;dt\\ &=& \frac{(V^{(j)}_0)^2}{c_j}e^{c_j t}+ 2 c_j V^{(j)}_0 V^{(j)}_L (\frac{t}{c_j}e^{c_j t}-\frac{1}{c^2_j}e^{c_j t})+ c^2_j (V^{(j)}_L )^2 (\frac{t^2}{c_j}e^{c_j t}- \frac{2 t}{c^2_j}e^{c_j t}+\frac{2 }{c^3_j}e^{c_j t})\\ &=& \frac{e^{c_j t}}{c_j}\left[c^2_j(V^{(j)}_L)^2 t^2+2( c_j V^{(j)}_0 V^{(j)}_L- c_j (V^{(j)}_L)^2) t + (V^{(j)}_0)^2+2(V^{(j)}_L)^2 \right] \end{eqnarray*} \begin{eqnarray*} \int e^{c_j t} \xi^2_j V^{(j)}_L t \;dt &=& \frac{\xi^2_j V^{(j)}_L}{c_j}e^{c_j t}(t-\frac{1}{c_j})\\ \int e^{c_j t} \frac{\xi^2_j }{c_j}(V^{(j)}_0-V^{(j)}_L)e^{-c_jt} \;dt &=& \frac{\xi^2_j }{c_j}(V^{(j)}_0-V^{(j)}_L)t\\ \int e^{c_j t} (d_0 + d_1 e^{-c_j t}+ d_2 e^{-2c_j t}) \;dt &=& \frac{d_0}{c_j} e^{c_j t}\\ &+& d_1 t-\frac{d_2}{c_j}e^{-c_j t}\\ &=& -\frac{e^{-c_j t}}{c_j}[d_0+(V^{(j)}_0)^2-d_1+\frac{d_1}{2}e^{-c_j t}] \end{eqnarray*} Therefore substituting in equation (\ref{eq:diff2mom}): \begin{eqnarray*} mv^+_{2,j}(t) &=& \frac{1}{c^3_j}\left[(V^{(j)}_L)^2 t^2+(2 c_j - \frac{V^{(j)}_L}{c_j})V^{(j)}_L t + (V^{(j)}_0)^2+\frac{2(V^{(j)}_L)^2}{c^2_j} \right]\\ &+& \frac{\xi^2_j V^{(j)}_L}{c^3_j}(t-\frac{1}{c_j})+ \frac{\xi^2_j e^{-c_j t}}{c^3_j}(V^{(j)}_0-V^{(j)}_L)t\\ &-& \frac{e^{-2c_j t}}{c^3_j}[d_0+(V^{(j)}_0)^2-d_1+\frac{d_1}{2}e^{-c_j t}] +d_3 e^{-c_j t} \end{eqnarray*} Where, from the initial conditions: \begin{equation*} d_3=\frac{1}{c^3_j}[\frac{1}{c_j}\xi^2_j V^{(j)}_L+d_0+\frac{d_1}{2}-\frac{2(V^{(j)}_L)^2 }{c^2_j}] \end{equation*} \end{proof} \textbf{Proof of proposition \ref{eq:covvol}} \begin{proof} To compute the covariance of the integrated squared volatilities we start noticing that $ <\sigma_t^{(1)}, \sigma_t^{(2)}>=\beta_1 \beta_2 \rho_V t$. Therefore by integration by parts formula: \begin{eqnarray*} \sigma_t^{(1)} \sigma_t^{(2)} &=& \sigma_0^{(1)} \sigma_0^{(2)}+ \int_0^t \sigma_s^{(1)} d \sigma_s^{(2)}+ \int_0^t \sigma_s^{(2)} d \sigma_t^{(1)}+ <\sigma_t^{(1)}, \sigma_t^{(2)}>\\ &=& \sigma_0^{(1)} \sigma_0^{(2)}- \alpha_2 \int_0^t \sigma_s^{(1)} \sigma_s^{(2)} ds+ \beta_2 \int_0^t \sigma_s^{(1)}dW_t^{(2)} \\ &-& \alpha_1 \int_0^t \sigma_s^{(1)} \sigma_s^{(2)} ds+ \beta_1 \int_0^t \sigma_s^{(2)}dW_t^{(1)}+ \beta_1 \beta_2 \rho_V t \end{eqnarray*} Taking expected value on both sides: \begin{eqnarray*} E_{\mathcal{Q}}[\sigma_t^{(1)} \sigma_t^{(2)}] &=& \sigma_0^{(1)} \sigma_0^{(2)}- (\alpha_1+\alpha_2) \int_0^t E_{\mathcal{Q}}[\sigma_s^{(1)} \sigma_s^{(2)}]\;ds + \beta_1 \beta_2 \rho_V t \end{eqnarray*} The expression above leads to the differential equation: \begin{equation*} ms'_{12}(t)+ (\alpha_1+\alpha_2)ms_{12}(t)-\beta_1 \beta_2 \rho_V=0 \end{equation*} with $ms_{12}(t)= E_{\mathcal{Q}}[\sigma_t^{(1)} \sigma_t^{(2)}]$.\\ Its solution is: \begin{equation*} ms_{12}(t)=\frac{\beta_1 \beta_2 \rho_V}{\alpha_1+\alpha_2}\left( 1-e^{-(\alpha_1+\alpha_2)t} \right)+\sigma_0^{(1)} \sigma_0^{(2)}e^{-(\alpha_1+\alpha_2)t} \end{equation*} With the reparametrization in remark \ref{rem:par} it becomes: \begin{equation}\label{eq:covsigmas} ms_{12}(t)=\frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2}\left( 1-\exp(-\frac{1}{2}(c_1+c_2)t) \right)+\sigma_0^{(1)} \sigma_0^{(2)}\exp(-\frac{1}{2}(c_1+c_2)t) \end{equation} Moreover, from equation (\ref{eq: svol1}): \begin{eqnarray*} V_t^{(1)} V_t^{(2)} &=& V_0^{(1)} V_0^{(2)}+ \int_0^t V_s^{(1)} d V_s^{(2)}+ \int_0^t V_s^{(2)} d V_s^{(1)}+ <V_t^{(1)}, V_t^{(2)}>\\ &=& V_0^{(1)} V_0^{(2)}+c_2 V^{(2)}_L t-c_2 \int_0^t V_s^{(1)} V_s^{(2)} ds+ \xi_2 \int_0^t V_s^{(1)}\sigma_s^{(2)}dW_t^{(2)} \\ &+& c_1 V^{(1)}_L t-c_1 \int_0^t V_s^{(2)} V_s^{(1)} ds+ \xi_1 \int_0^t V_s^{(2)}\sigma_s^{(1)}dW_t^{(1)}+ \xi_1 \xi_2 \rho_V \int_0^t \sigma_s^{(1)}\sigma_s^{(2)}ds \end{eqnarray*} Again, taking expected value on both sides of the equation above and differentiating: \begin{equation*} mv'_{12}(t)=c_1V^{(1)}_L +c_2 V^{(2)}_L-(c_1+c_2)mv_{12}(t)+\xi_1 \xi_2 \rho_V m_{12}(t) \end{equation*} whose solution is given by: \begin{eqnarray*} mv_{12}(t) &=& e^{-(c_1+c_2)t}\xi_1 \xi_2 \rho_V \int e^{(c_1+c_2)s}ms_{12}(s)\;ds+ c e^{-(c_1+c_2)t}\\ &=& e^{-(c_1+c_2)t}\xi_1 \xi_2 \rho_V \int e^{(c_1+c_2)s}[\frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2}\left( 1-e^{-\frac{1}{2}(c_1+c_2)s} \right)\;ds\\ &+&\sigma_0^{(1)} \sigma_0^{(2)}\xi_1 \xi_2 \rho_V e^{-(c_1+c_2)t} \int e^{(c_1+c_2)s} e^{-\frac{1}{2}(c_1+c_2)s}\;ds + c e^{-(c_1+c_2)t}\\ &=& \frac{(\xi_1 \xi_2 \rho_V)^2}{2(c_1+c_2)}e^{-(c_1+c_2)t} \int e^{(c_1+c_2)s}\;ds- \frac{(\xi_1 \xi_2 \rho_V)^2}{2(c_1+c_2)}e^{-(c_1+c_2)t} \int \exp(\frac{1}{2}(c_1+c_2)s)\;ds\\ &+&\sigma_0^{(1)} \sigma_0^{(2)}\xi_1 \xi_2 \rho_V e^{-(c_1+c_2)t} \int e^{\frac{1}{2}(c_1+c_2)s}\;ds + c e^{-(c_1+c_2)t}\\ &=& \frac{(\xi_1 \xi_2 \rho_V)^2}{2(c_1+c_2)^2}- \frac{(\xi_1 \xi_2 \rho_V)^2}{(c_1+c_2)^2}e^{-\frac{1}{2}(c_1+c_2)t}+ \frac{2\sigma_0^{(1)} \sigma_0^{(2)}\xi_1 \xi_2 \rho_V}{c_1+c_2} e^{-\frac{1}{2}(c_1+c_2)t} + c e^{-(c_1+c_2)t} \end{eqnarray*} From the initial condition $ mv_{12}(0)=V_0^{(1)} V_0^{(2)}$ we have that: \begin{equation*} c=V_0^{(1)} V_0^{(2)}+\frac{1}{2}\frac{(\xi_1 \xi_2 \rho_V)^2}{(c_1+c_2)^2}-\frac{2\sigma_0^{(1)} \sigma_0^{(2)}\xi_1 \xi_2 \rho_V}{c_1+c_2} \end{equation*} On the other hand, from equation (\ref{eq: svol1}): \begin{eqnarray*} V^{j,+}_t&=& \frac{1}{c_j}[V^{(j)}_0+c_1 V^{(j)}_L t-V^{(j)}_t +\xi_j \sigma^{(j)}_t\, dW_t^{(j)}]\\ V^{(j)}_t &=& V^{(j)}_0 e^{-c_j t}+V^{(j)}_L(1-e^{-c_j t})+\xi_j e^{-c_j t} \int_0^t e^{c_j s}\sigma^{(j)}_s \, dW_t^{(j)} \end{eqnarray*} Hence: \begin{eqnarray*} mv^+_{12}(t) &:=& E_{\mathcal{Q}}[V^{1,+}_t V^{2,+}_t]\\ &=& \frac{1}{c_1 c_2} E_{\mathcal{Q}}[(V^{(1)}_0+c_1 V^{(1)}_L t-V^{(1)}_t +\xi_1 \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s)(V^{(2)}_0+c_2 V^{(2)}_L t-V^{(2)}_t +\xi_2 \int_0^t \sigma^{(2)}_s\, dW^{(2)}_s)]\\ &=& \frac{1}{c_1 c_2} \left[ V^{(1)}_0 V^{(2)}_0+ c_2 V^{(1)}_0 V^{(2)}_L t- V^{(1)}_0 E_{\mathcal{Q}}[V^{(2)}_t] + \xi_2 V^{(1)}_0 E_{\mathcal{Q}}[\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s] \right. \\ &+& c_1 V^{(2)}_0 V^{(1)}_L t +c_1 c_2 V^{(1)}_L V^{(2)}_L t^2-c_1 V^{(1)}_L t E_{\mathcal{Q}}[V^{(2)}_t]+c_1 \xi_2 V^{(1)}_L t E_{\mathcal{Q}}[ \int_0^t \sigma^{(2)}_s\, dW^{(2)}_s] \\ &-& V^{(2)}_0 E_{\mathcal{Q}}[V^{(1)}_t]-c_2 V^{(2)}_L t E_{\mathcal{Q}}[V^{(1)}_t]+E_{\mathcal{Q}}[V^{(1)}_t V^{(2)}_t]-\xi_2 E_{\mathcal{Q}}[V^{(1)}_t \int_0^t \sigma^{(2)}_s\, dW^{(2)}_s]\\ &+& \xi_1 V^{(2)}_0 E_{\mathcal{Q}}[ \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s]+c_2 \xi_1 V^{(2)}_L t E_{\mathcal{Q}}[ \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s]\\ &-& \left. \xi_1 E_{\mathcal{Q}}[V^{(2)}_t \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s]+ \xi_1 \xi_2 E_{\mathcal{Q}}[\int_0^t \sigma^{(1)}_s\, dW^{(1)}_s\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s] \right] \end{eqnarray*} Now, we have that: \begin{eqnarray*} E_{\mathcal{Q}}[ \int_0^t \sigma^{(j)}_s\, dW^{(j)}_s] &=& 0,\; j=1,2\\ E_{\mathcal{Q}}[\int_0^t \sigma^{(1)}_s\, dW^{(1)}_s \int_0^t \sigma^{(2)}_s\, dW^{(2)}_s] &=& E_{\mathcal{Q}}\langle \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s \rangle= \rho_V \int_0^t m_{12}(s)\;ds\\ E_{\mathcal{Q}}[V^{(1)}_t \int_0^t \sigma^{(2)}_s\, dW^{(2)}_s]&=& E_{\mathcal{Q}}[(V^{(1)}_0 e^{-c_1 t}+V^{(1)}_L(1-e^{-c_1 t})\\ &+& \xi_1 e^{-c_1 t} \int_0^t e^{c_1 s}\sigma^{(1)}_s \, dW_s^{(1)})\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s]\\ &=& (V^{(1)}_0 e^{-c_1 t}+V^{(1)}_L(1-e^{-c_1 t}))E_{\mathcal{Q}}[\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s]\\ &+& \xi_1 e^{-c_1 t} E_{\mathcal{Q}}[\int_0^t e^{c_1 s}\sigma^{(1)}_s \, dW_t^{(1)}\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s]\\ &=& \xi_1 e^{-c_1 t} E_{\mathcal{Q}} \langle \int_0^t e^{c_1 s}\sigma^{(1)}_s \, dW_s^{(1)},\int_0^t \sigma^{(2)}_s\, dW^{(2)}_s \rangle\\ &=& \xi_1 \rho_V e^{-c_1 t} \int_0^t e^{c_1 s}m_{12}(s)\;ds \end{eqnarray*} Similarly: \begin{equation*} E_{\mathcal{Q}}[V^{(2)}_t \int_0^t \sigma^{(1)}_s\, dW^{(1)}_s]=\xi_2 \rho_V e^{-c_2 t} \int_0^t e^{c_2 s}m_{12}(s)\;ds \end{equation*} Therefore: \begin{eqnarray*} mv^+_{12}(t) &:=& \frac{1}{c_1 c_2} \left[ P_3(t)- (V^{(1)}_0+ c_1 V^{(1)}_L t) mv_{1,2}(t) - (V^{(2)}_0+c_2 V^{(2)}_L t )mv_{1,1}(t) \right.\\ &+& ms_{12}(t) -\xi_1 \xi_2 \rho_V e^{-c_1 t} B_1(t) - \left. \xi_1 \xi_2 \rho_V e^{-c_2 t}B_2(t) + \xi_1 \xi_2 \rho_V A(t) \right] \end{eqnarray*} where: \begin{equation*} P_3(t)=V^{(1)}_0 V^{(2)}_0+ c_2 V^{(1)}_0 V^{(2)}_L t+ c_1 V^{(2)}_0 V^{(1)}_L t +c_1 c_2 V^{(1)}_L V^{(2)}_L t^2 \end{equation*} Moreover, from equation (\ref{eq:covsigmas}) \begin{eqnarray*} A(t) &=& \int_0^t ms_{12}(s) \;ds=\frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2}\left( t- \int_0^t e^{-\frac{1}{2}(c_1+c_2)s}\;ds \right)+\sigma_0^{(1)} \sigma_0^{(2)}\int_0^t e^{-\frac{1}{2}(c_1+c_2)s}\;ds\\ &=& \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2)}\left( t- \frac{2}{c_1+c_2}(1-e^{-\frac{1}{2}(c_1+c_2)t}) \right)+\frac{2 \sigma_0^{(1)} \sigma_0^{(2)}}{c_1+c_2}(1-e^{-\frac{1}{2}(c_1+c_2)t})\\ B_j(t) &=& \int_0^t e^{c_j s}ms_{12}(s)\;ds = \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2)}\left(\frac{1}{c_j}(e^{c_j t}-1) - \int_0^t e^{c_j-\frac{1}{2}(c_1+c_2)s}\;ds \right)\\ &+& \sigma_0^{(1)} \sigma_0^{(2)}\int_0^t e^{c_j-\frac{1}{2}(c_1+c_2)s}\;ds\\ &=& \frac{\xi_1 \xi_2 \rho_V}{2(c_1+c_2)}\left(\frac{1}{c_j}(e^{c_j t}-1) - \frac{2(-1)^j}{c_2-c_1}(e^{\frac{1}{2}(-1)^j(c_2-c_1)t}-1) \right)\\ &+& \sigma_0^{(1)} \sigma_0^{(2)}\frac{2(-1)^j}{c_2-c_1}(e^{\frac{1}{2}(-1)^j(c_2-c_1)t}-1) \end{eqnarray*} \end{proof} \subsection{Appendix B: Derivatives of the Margrabe price} Derivatives of the Margrabe price are computed by elementary differentiation. Indeed, for the function: \begin{equation*} M_4(x) = x_{1}\,x_{2}-2\,\sqrt{x_{1}}\,\sqrt{x_{2}}\,x_{3} \end{equation*} We see that: \begin{eqnarray*} \frac{\partial M_4(x)}{\partial x_1} &=& x_{2}-\frac{\sqrt{x_{2}}\,x_{3}}{\sqrt{x_{1}}},\; \frac{\partial M_4(x)}{\partial x_2}= x_{1}-\frac{\sqrt{x_{1}}\,x_{3}}{\sqrt{x_{2}}} \\ \frac{\partial M_4(x)}{\partial x_3} &=& -2\,\sqrt{x_{1}}\,\sqrt{x_{2}} \end{eqnarray*} The second derivatives of $M_4(x)$ are: \begin{eqnarray*} \frac{\partial^2 M_4(x)}{\partial x^2_1} &=& \frac{\sqrt{x_{2}}\,x_{3}}{2\,{x_{1}}^{3/2}}, \; \frac{\partial^2 M_4(x)}{\partial x_1 \partial x_2} = 1-\frac{x_{3}}{2\,\sqrt{x_{1}}\,\sqrt{x_{2}}} \\ \frac{\partial^2 M_4(x)}{\partial x_1 \partial x_3} &=& -\frac{\sqrt{x_{2}}}{\sqrt{x_{1}}},\; \frac{\partial^2 M_4(x)}{\partial^2 x_2}=\frac{\sqrt{x_{1}}\,x_{3}}{2\,{x_{2}}^{3/2}}\\ \frac{\partial^2 M_4(x)}{\partial x_2 \partial x_3} &=& -\frac{\sqrt{x_{1}}}{\sqrt{x_{2}}},\;\frac{\partial^2 M_4(x)}{\partial x^2_3} = 0 \end{eqnarray*} Regarding the function: \begin{eqnarray*} d_1(x) &=& M_3 M^{-\frac{1}{2}}_4(x)-\frac{1}{2}M^{\frac{1}{2}}_4(x)\\ &=& \frac{M_{3}}{\sqrt{x_{1}\,x_{2}-2\,\sqrt{x_{1}}\,\sqrt{x_{2}}\,x_{3}}}-\frac{\sqrt{x_{1}\,x_{2}-2\,\sqrt{x_{1}}\,\sqrt{x_{2}}\,x_{3}}}{2} \end{eqnarray*} where $M_3=\log \left(\frac{ S^{(1)}_t}{ S^{(2)}_t} \right)$, the first and second derivatives of $ d_1(x)$ are: \begin{eqnarray*} \frac{\partial d_1(x)}{\partial x_j} &=&- \frac{1}{2} M_3 M^{-\frac{3}{2}}_4(x)\frac{\partial M_4(x)}{\partial x_j}-\frac{1}{4}M^{\frac{1}{2}}_4(x)\frac{\partial M_4(x)}{\partial x_j}, j=1,2,3\\ \frac{\partial^2 d_1(x)}{\partial x_j \partial x_k} &=& \frac{3}{4} M_3 M^{-\frac{5}{2}}_4(x)\frac{\partial M_4(x)}{\partial x_j}\frac{\partial M_4(x)}{\partial x_4}- \frac{1}{2} M_3 M^{-\frac{3}{2}}_4(x)\frac{\partial^2 M_4(x)}{\partial x_j \partial x_k}\\ &+& \frac{1}{8} M^{-\frac{3}{2}}_4(x)\frac{\partial M_4(x)}{\partial x_j}\frac{\partial M_4(x)}{\partial x_k}- \frac{1}{4}M^{-\frac{1}{2}}_4(x)\frac{\partial^2 M_4(x)}{\partial x_j \partial x_k}, j,k=1,2,3 \end{eqnarray*} Finally: \begin{eqnarray*} \frac{\partial C_M(x)}{\partial x_j} &=& M_1 f_Z(d_1(x))\frac{\partial d_1(x)}{\partial x_j}-M_2 f_Z(d_1(x))\frac{\partial d_1(x)}{\partial x_j}, j=1,2,3\\ \frac{\partial^2 C_M(x)}{\partial x_j \partial x_k} &=& M_1 \left(\frac{\partial f_Z(d_1(x))}{\partial x_k} \frac{\partial d_1(x)}{\partial x_j}+ f_Z(d_1(x))\frac{\partial^2 d_1(x)}{\partial x_j \partial x_k} \right)\\ &-& M_2 \left(\frac{\partial f_Z(d_2(x))}{\partial x_k} \frac{\partial d_2(x)}{\partial x_j}+ f_Z(d_2(x))\frac{\partial^2 d_2(x)}{\partial x_j \partial x_k} \right)\\ &=& M_1 \left(-d_1(x) f_Z(d_1(x)) \frac{\partial d_1(x)}{\partial x_j} \frac{\partial d_1(x)}{\partial x_k}+ f_Z(d_1(x))\frac{\partial^2 d_1(x)}{\partial x_j \partial x_k} \right)\\ &-& M_2 \left(-d_2(x) f_Z(d_2(x))\frac{\partial d_2(x)}{\partial x_j} \frac{\partial d_1(x)}{\partial x_k}+ f_Z(d_2(x))\frac{\partial^2 d_2(x)}{\partial x_j \partial x_k} \right) \end{eqnarray*}
\section{Introduction} \label{Sec:1} We are living in the era of artificial intelligence (AI) and the advancement of deep learning is fueling AI to spread over rapidly \cite{deepLearning_nature15}, \cite{deeplearningBook16}. Among different deep learning models, convolutional neural network(CNN) \cite{wu2017introduction, o2015introduction, Ghosh2020} has shown outstanding performance in different high level computer vision task such as image classification \cite{Krizhevsky2012, zeiler14, simonyan14, szegedy15, he16, lecun98, lecun90, Sabour2017, Hu17, Sultana2018}, object detection \cite{Girshick2016, He2014, Girshick2015, Ren2015, He2017, Dai2016, Redmon2015, Liu2016, Redmon2017, Zhang2017, Lin2017, Peng2017, WANG201962, Sultana2019} etc. Though the advent and success of AlexNet \cite{Krizhevsky2012} turned the field of computer vision towards CNN from traditional machine learning algorithms. But the concept of CNN was not a new one. It started from the discovery of Hubel and Wiesel \cite{hubel68} which explained that there are simple and complex neurons in the primary visual cortex and the visual processing always starts with simple structures such as oriented edges. Inspired by this idea, David Marr gave us the next insight that vision is hierarchical \cite{Marr1982}. Kunihiko Fukushima was deeply inspired by the work of Hubel and Wiesel and built a multi-layered neural network called Neocognitron \cite{Fukushima1980} using simple and complex neurons. It was able to recognize patterns in images and was spatial invariant. In 1989, Yann LeCun turned the theoretical idea of Neocognitron into a practical one called LeNet-5 \cite{LeCun1989}. LeNet-5 was the first CNN developed for recognizing handwritten digits. LeCun et al. used back propagation \cite{LeCun1988}\cite{lecun98} algorithm to train his CNN. The invention of LeNet-5 paved the way for the continuous success of CNN in various high-level computer vision tasks as well as motivated researchers to explore the capabilities of such networks for pixel-level classification problems like image segmentation. The key advantage of CNN over traditional machine learning methods is the ability to learn appropriate feature representations for the problem at hand in an end-to-end training fashion instead of using hand-crafted features that require domain expertise \cite{GU2018354}. Applications of image segmentation are very vast. From the autonomous car driving \cite{Brabandere_2017_CVPR_Workshops} to medical diagnosis \cite{RIZWANIHAQUE2020100297, SONG201940}, the requirement of the task of image segmentation is everywhere. Therefore, in this article, we have tried to give a survey of different image segmentation models. This survey study has covered recent CNN-based state-of-the-art. Mainly semantic segmentation and instance segmentation of an image are discussed. Herein, we have described comparative architectural details of notable different state-of-the-art image segmentation models. Also, different aspects of those models are presented in tabular form for clear understanding. In addition, we have given a glimpse of recent state-of-the-art panoptic segmentation models. \subsection{Contributions of this paper} \begin{itemize} \item Gives taxonomy and survey of the evolution of CNN based image segmentation. \item Explores elaborately some CNN based popular state-of-the-art segmentation models. \item Compares training details of those models to have a clear view of hyper-parameter tuning. \item Compares the performance metrics of those state-of-the-art models on different datasets. \end{itemize} \subsection{Organization of the Article} Starting from the introduction in section 1, the paper is organized as follows: In section 2, we have given background details of our work. In sections 3 and 4, semantic segmentation and instance segmentation works are discussed respectively with some subsections. In section 5, Panoptic segmentation is presented in brief. The paper is concluded in section 6. \section{Background Details}\label{seg} \subsection{Why Convolutional Neural Networks?} The computer vision has various tasks among them image segmentation as mentioned in section \ref{seg} is the focus of this article. Various researchers are addressing this task in different way using traditional machine learning algorithms like in \cite{Viola2001, Vaillant1994, Dollar2009} with the help various technique such as thresholding \cite{Sivakumar2014}, region growing \cite{Omez2007,Mary2012}, edge detection \cite{Huang2010, al2010,ma1997}, clustering \cite{Zheng2018, Mehmet1990, Kavitha2010, Ali2006, Galbiati2009, Franek2011, Alush2013, Yarkony2012}, super-pixel \cite{Chang2012, XIe2019}, etc for years. Most of the successful works are based on handcrafted machine learning features such as HOG \cite{Dalal2005,chang2011, tuermer2013, gupta2014}, SIFT \cite{Burger2016, Akira2008}, etc. First of all, feature engineering needs domain expertise and the success of those machine learning-based models was slowed down around the era when deep learning was started to take over the world of computer vision. To give a outstanding performance, deep learning only needs data and it does not need any traditional handcrafted feature engineering techniques. Also, traditional machine learning algorithm can not adjust itself for a wrong prediction. On the other hand, deep learning has that capability to adapt itself according to the predicted result. Among different deep learning algorithms, CNN got tremendous success in different fields of computer vision as well as grab the area of image segmentation \cite{srinivas2016taxonomy, chen2014semantic}. \subsection{Image Segmentation} \label{seg} In computer vision, image segmentation is a way of segregating a digital image into multiple regions according to the different properties of pixels. Unlike classification and object detection, it is typically a low-level or pixel-level vision task as the spatial information of an image is very important for segmenting different regions semantically. Segmentation aims to extract meaningful information for easier analysis. In this case, the image pixels are labeled in such a way that every pixel in an image shares certain characteristics such as color, intensity, texture, etc. \cite{PAL19931277, zaitoun2015survey}. \begin{figure}[htb] \centering \includegraphics[scale=0.37]{image/types_seg} \caption{Different types of image segmentation} \label{types_seg} \end{figure} Mainly, image segmentation is of two types: semantic segmentation and instance segmentation. Also, there is another type called panoptic segmentation\cite{Kirillov2018} which is the unified version of two basic segmentation processes. Figure \ref{types_seg} shows different types of segmentation and figure \ref{all_seg} shows the same with examples. In subsequent sections, we have elaborately discussed state-of-the-art of different CNN-based image segmentations. \begin{figure}[htb] \centering \includegraphics[scale=0.55]{image/all_seg} \caption{An example of different types of image segmentation. From \cite{kirillov2019panoptic}}. \label{all_seg} \end{figure} In addition, CNN is also used successfully for video object segmentation. In a study \cite{Caelles2017}, Caelles et al. have first used a Fully convolutional network for one-shot video object segmentation. In another study \cite{Oh2018}, the authors have used ResNet \cite{he16} based Siamese Encoder with Global Convolutional Block for video object segmentation. On the other hand Miao et al. have used a CNN based semantic segmentation network and proposed Memory Aggregation Network (MA-Net) \cite{miao2020memory} to handle interactive video object segmentation(iVOS). The authors of \cite{yang2020collaborative} has used a CNN based semantic segmentation network as a base network for Collaborative Video Object Segmentation by Foreground-Background Integration(CFBI). These are some of CNN- based video segmentation models that got state-of-the-art results on various video segmentation datasets. Due to the scope and size of the article, we have not covered this topic in detail in the present article. \section{Semantic Segmentation} \label{sem_seg} Semantic segmentation describes the process of associating each pixel of an image with a class label \cite{WEI2016234}. Figure \ref{fsem_seg} shows the black-box view of semantic segmentation. After the success of AlexNet in 2012, we have got different successful semantic segmentation models based on CNN. In this section, we have present a survey of the evolution of CNN based semantic segmentation models. In addition, we have brought up here an elaborate exploration of some state-of-the-art models. \begin{figure}[htb] \centering \includegraphics[width=.9\linewidth]{image/sem_seg} \caption{The process of semantic segmentation.} \label{fsem_seg} \end{figure} \subsection{Evolution of CNN based Semantic Segmentation Models} The application of CNN in semantic segmentation models has started with a huge diversity. In study \cite{Farabet2013}, the authors have used multi-scale CNN for scene labeling and achieved state-of-the-art results in the Sift flow \cite{Liu2011}, the Bercelona dataset \cite{Tighe2010} and the Standford background dataset \cite{Gould2009}. R-CNN \cite{Girshick2014} used selective search \cite{Uijlings2013} algorithm to extract region proposals first and then applied CNN upon each proposal for PASCAL VOC semantic segmentation challenge \cite{Everingham2007}. R-CNN achieved record result over second order pooling ($O_2 P$) \cite{Carreira2012} which was a leading hand-engineered semantic segmentation system at that time. At the same time, Gupta et al. \cite{gupta2014} used CNN along with geocentric embedding on RGB-D images for semantic segmentation. Among different CNN based semantic segmentation models, Fully Convolutional Network(FCN) \cite{Long2017}, as discussed in subsection \ref{ss_fcn}, gained the maximum attention and an FCN based semantic segmentation model trend has emerged. To retain the spatial information of an image, FCN based models removed fully connected layers of traditional CNN. In studies \cite{Mostajabi2014} and \cite{Szegedy2014}, the authors have used contextual features and achieved state of the art performance. Recently, in \cite{YangHu2019}, the authors have used fully convolutional two stream fusion network for interactive image segmentation. Chen et al aggregate `atrous' algorithm and conditional random (CRF) field in semantic segmentation and proposed DeepLab \cite{chen2014} as discussed in subsection \ref{ss_dialation}. Later the authors have incorporated `Atrous Special Pyramid Pooling (ASPP)' in DeepLabv2 \cite{Chen2016}. DeepLabv3 \cite{Chen2017} has gone further and used a cascaded deep ASPP module to incorporate multiple contexts. All three versions of DeepLab have achieved good results. Deconvnet \cite{Noh2015} used convolutional network followed by hierarchically opposite de-convolutional network for semantic segmentation as discussed in section \ref{ss_tdbu}. Ronneberger et al used a U-shaped network called U-Net \cite{Ronneberger2015} which has a contracting and an expansive pathway to approach semantic segmentation. Contracting path extracts feature maps and reduces spatial information as a traditional convolution network. Expansive pathway takes the contracted feature map as input and apply an up-convolution. Section \ref{ss_tdbu} discussed the model in more detail. Recently, in \cite{Nabil2020}, the authors have used U-Net with $multiRes$ block for multimodal biomedical image segmentation and got better result than using classical U-Net. SegNet \cite{Badrinarayanan2015} is a encoder-decoder network for semantic segmentation. The encoder is a basic VGG16 network excluding FC layers. The decoder is identical to encoder but the layers are hierarchically opposite. SegNet is discussed in section \ref{ss_tdbu}. The basic architectural intuition of U-Net, Deconvnet, and SegNet are similar except some individual modifications. The second half of those architectures is the mirror image of the first half. Liu et al. mixed the essence of global average pooling and L2 normalization layer in FCN \cite{Long2017} architecture, and proposed ParseNet \cite{Liu2015} to achieve state of the art result in various datasets. Zhao et al. proposed Pyramid Scene Parsing Network(PSPNet) \cite{Zhao2016}. They have used Pyramid Pooling Module on top of the last extracted feature map to incorporate global contextual information for better segmentation. Peng et al. used the idea of global convolution using a large kernel to apply the advantage of both local and global features. Pyramid Attention Network (PAN) \cite{LiH2018}, ParseNet \cite{Liu2015}, PSPNet\cite{Zhao2016} and GCN\cite{PengC2017} have used global context information with local feature to have better segmentation. Sections \ref{ss_gc} and \ref{ss_rfmc} will discuss those models in detail. Fully convolutional DenseNet \cite{he16} is used to address semantic segmentation in \cite{Brahimi2019, Towaki2019}. DeepUNet \cite{ LiR2017}, a ResNet based FCN, used to segment sea land. At the same time, ENet\cite{Paszke16}, ICNet\cite{zhao2018} are used as real-time semantic segmentation models for the autonomous vehicles. Some recent works \cite{Chieh2018, liu2019auto, Sun2019} have used combination of encoder-decoder architecture and dilated convolution for better segmentation. Transfer learning or domain adaption also uses for semantic segmentation \cite{ZHANG2019105444}. Kirillov et al.\cite{he27pointrend} used point-based rendering in DeepLabV3\cite{Chen2017} and in semanticFPN to produce state-of-the-art semantic segmentation models. Researcher from different field of deep learning has also infused CNN to address semantic segmentation. In study\cite{luc2016semantic}, the authors have trained CNN along with adversial network. Luo et al. have also used CNN as generator and discriminator in a adversial network and proposed Category level Advisory Network(CLAN)\cite{Luo2018}. In \cite{Luo2019S}, The authors have used same configuration as CLAN with information bottleneck for domain adaptive semantic segmentation and proposed Information Bottlenecked Adversarial Network(IBAN) and Significance-aware Information Bottlenecked Adversarial Network (SIBAN). In another study \cite{LuoY2018}, the authors have used CNN based adversial network named Macro-Micro Adversila Network (MMAN) for human parsing. Some researcher have used CNN models for attention based image segmentation. Wang et al. used Non-local Neural Network in \cite{Wang2018}. Huang et al. used DeepLab for feature map extraction and then the feature maps are fed into recurrent criss cross attention module \cite{Huang2019} for semantic segmentation. In another study \cite{ZhaoH2018}, The authors have aggregated long range contextual information in convolutional feature map using global attention network to address scene parsing. In \cite{Fu2019}, the authors have used dual attention network in combination of CNN for scene segmentation. \subsection{Some popular state-of-the-art semantic segmentation models}\label{ss_model} In this section, we are going to explore architectural details of some state of the art CNN based semantic segmentation models in detail. The models are categorized on the basis of the most impotant feature used. At the end of each categorical discussion, we have also briefly discussed the advantages and weaknesses of a particular model category. \subsubsection{Based on Fully Convolutional Network:} \label{ss_fcn} \textbf{FCN:} Long et al. proposed the idea of Fully Convolutional Network(FCN) \cite{Long2017} to address the semantic segmentation task. They have used AlexNet\cite{Krizhevsky2012}, VGGNet\cite{simonyan14} and GoogleNet\cite{szegedy15}(all three pre-trained on ILSVRC \cite{ILSVRC15} data) as base models. They transferred these models from classifiers to dense FCN by substituting fully connected layers with $1\times1$ convolutional layers and append a $1\times1$ convolution with channel dimension 21 to predict scores for each of the 20 PASCAL VOC \cite{Everingham2010} classes and background class. \begin{figure}[htb] \centering \includegraphics[width=.98\linewidth]{image/FCN-VGG16} \caption{Architecture of FCN32s, FCN16s, FCN8s} \label{fcn} \end{figure} This process produces a class presence heat map in low resolution. The authors have experienced that among FCN-AlexNet, FCN-VGG16 and FCN-GoogLeNet, FCN-VGG16 gave the highest accuracy on PASCAL VOC 2011 validation dataset. So, they choose the FCN-VGG16 network for further experiments. As the network produces coarse output locations, the authors used bilinear interpolation to upsample the coarse output $32\times$ to make it pixel dense. But this upsampling was not enough for fine-grained segmentation. So they have used skip connection\cite{Bishop2006} to combine the final prediction layer and feature-rich lower layers of VGG16 and call this combination as $deep$ $jet$. Figure \ref{fcn} shows different $deep$ $ jet$s : FCN-16s and FCN-8s and FCN-32s. Among them, FCN-8s gave the best result in PASCAL VOC 2011 \& 2012 \cite{Everingham2010} test dataset and FCN-16s gave the best result on both NYUDv2 \cite{Silberman2012} \& SIFT Flow \cite{Liu2011} datasets. Major changes in FCN which helped the model to achieve state of the art result are the base model VGG16, bipolar interpolation technique for up-sampling the final feature map and skip connection for combining low layer and high layer features in the final layer for fine-grained semantic segmentation. FCN has used only local information for semantic segmentation but only local information makes semantic segmentation quite ambiguous as it looses global semantic context of the image. To reduce ambiguity contextual information from the whole image is much helpful. \subsubsection{Based on Dialtation/Atrous convolution:} \label{ss_dialation} \textbf{Dialatednet:} Traditional CNN, used for classification tasks, loses resolution in its way and it is not suitable for dense prediction. Yu and Koltun have introduced a modified version of traditional CNN, called dialated convolution or DialatedNet \cite{YuK15}, to accumulate multi-scale contextual information systematically for better segmentation without suffering the loss of resolution. DialatedNet is like a rectangular prism of convolutional layers, unlike conventional pyramidal CNN. Without losing any spatial information, it can support the exponential expansion of receptive fields as shown in figure \ref{Dialatednet}. \begin{figure}[htb] \centering \includegraphics[width=.71\linewidth]{image/dialatednet} \caption{(a) 1-dialatednet with receptive field $3\times3$, (b) 2-dialatednet with receptive field $7\times7$ and (c)-dialatednet with receptive field $15\times15$. From \cite{YuK15}}. \label{Dialatednet} \end{figure} \textbf{DeepLab:} Chen et al. has brought together methods from Deep Convolutional Neural Network(DCNN) and probabilistic graphical model. The authors have faced two technical difficulties in the application of DCNN to semantic segmentation: down sampling and spatial invariance. To handle the first problem, they have employed `atrous' \cite{mallat1999} algorithm for efficient dense computation of CNN. Figure \ref{hole} and \ref{hole2} shows atrous algorithm in 1-D and in 2-D. To handle the second problem, they have applied a fully connected pairwise conditional random field (CRF) to capture fine details. In addition, the authors have reduced the size of the receptive field $6\times$ than the original VGG16 \cite{simonyan14} network to reduce the time consumption of the network and also used multi-scale prediction for better boundary localization. \begin{figure*}[htb] \centering \subfloat[]{\includegraphics[width=6cm]{image/hole}\label{hole}} \hspace{2mm} \subfloat[]{\includegraphics[width=6cm]{image/hole2}\label{hole2}}\\ \caption{ Illustration of atrous algorithm (a) in 1-D, when kernel size=3, input-stride=2 and output-stride=1. From \cite{chen2014} and (b) in 2-D, when kernel size $3\times 3$, with rate 1, 6 and 24. From \cite{Chen2017}} \label{rcnn_sppnet} \end{figure*} Advantage of dilation based model is that it helps to retain spatial resolution of the image to produce dense prediction. But use of dilation convolution isolates image pixels from its global context which makes it prone to misclassification. \subsubsection{Based on Top-down/Bottom-up approach:}\label{ss_tdbu} \textbf{Deconvnet:} Deconvnet \cite{Noh2015}, proposed by Noh et al., has a convolutional and de-convolutional network. The convolutional network is topologically identical with the first 13 convolution layers and 2 fully connected layers of VGG16\cite{simonyan14} except for the final classification layer. As in VGG16, pooling and rectification layers are also added after some of the convolutional layers. The De-convolutional network is identical to the convolutional network but hierarchically opposite. It also has multiple series of deconvolution, un-pooling and rectification layers. All the layers of convolutional and de-convolutional network extract feature maps except the last layer of the de-convolutional network which generates pixel-wise class probability maps of the same size as the input image. In the deconvolutional network, the authors have applied unpooling which is the reverse operation of the pooling operation of the convolutional networks to reconstruct the original size of activation. Following \cite{zeiler14} and \cite{Zeiler2011}, unpooling is done using max-pooling indices which are stored at the time of convolution operation in the convolutional network. To densify enlarged but sparse un-pooled feature maps, convolution like operation is done using multiple learned filters by associating single input activation with multiple outputs. Unlike FCN, the authors applied their network on object proposals extracted from the input image and produced pixel-wise prediction. Then they have aggregated outputs of all proposals to the original image space for segmentation of the whole image. This instance wise segmentation approach handles multi-scale objects with fine detail and also reduces training complexity as well as memory consumption for training. To handle the internal covariate shift in the network, the authors have added batch normalization \cite{Bjorck2018} layer on top of convolutional and de-convolutional layers. The architecture of Deconvnet is shown in figure \ref{Deconvnet}. \begin{figure}[htb] \centering \includegraphics[width=.98\linewidth]{image/Deconvnet} \caption{Convolution-Deconvolution architecture of Decovnet. From \cite{Noh2015}} \label{Deconvnet} \end{figure} \textbf{U-Net:} U-Net \cite{Ronneberger2015} is a U-shaped semantic segmentation network which has a contracting path and an expansive path. Every step of the contracting path consists of two consecutive $3\times3$ convolutions followed by ReLU nonlinearity and max-pooling using $2\times2$ window with stride 2. During the contraction, the feature information is increased while spatial information is decreased. On the other hand, every step of the expansive path consists of up-sampling of feature map followed by a $2\times2$ up-convolution. This reduces the feature map size by a factor of 2. Then the reduced feature map is concatenated with the corresponding cropped feature map from the contracting path. Then two consecutive $3\times3$ convolution operations are applied followed by ReLU nonlinearity. In this way, the expansive pathway combines the features and spatial information for precise segmentation. The architecture of U-Net is shown in figure \ref{u_net}. \begin{figure}[htb] \centering \includegraphics[scale=0.23]{image/U_net} \caption{Contracting and expansive architecture of U-Net. From \cite{Ronneberger2015}} \label{u_net} \end{figure} \textbf{SegNet:} SegNet \cite{Badrinarayanan2015} has encoder-decoder architecture followed by a final pixel-wise classification layer. The encoder network has 13 convolutional layers as in VGG16 \cite{simonyan14} and the corresponding decoder part also has 13 de-convolutional layers. The authors did not use fully connected layers of VGG16 to retain the resolution in the deepest layer and it reduces the number of parameters from 134M to 14.7M. In each layer in the encoder network, a convolutional operation is performed using a filter bank to produce feature maps. Then, to reduce internal covariate shift the authors have used batch normalization \cite{Ioffe2015} \cite{Badrinarayanan2015(BN)} followed by ReLU \cite{agarap2018} nonlinearity operation. Resulting output feature maps are max-pooled using a $2\times2$ non-overlapping window with stride 2 followed by a sub-sampling operation by a factor of 2. A combination of max-pooling and sub-sampling operation achieves better classification accuracy but reduces the feature map size which leads to lossy image representation with blurred boundaries which is not ideal for segmentation purposes where boundary information is important. To retain boundary information in the encoder feature maps before sub-sampling, SegNet stores only the max-pooling indices for each encoder map. For semantic segmentation, the output image resolution should be the same as the input image. To achieve this, SegNet does up-sampling in its decoder using the stored max-pooling indices from the corresponding encoder feature map resulting high-resolution sparse feature map. To make the feature maps dense, the convolution operation is performed using a trainable decoder filter bank. Then the feature maps are batch normalized. The high-resolution output feature map produced form final decoder is fed into a trainable multi-class softmax classifier for pixel wise labeling. The architecture of SegNet is shown in figure \ref{SegNet}. \begin{figure}[htb] \centering \includegraphics[width=.92\linewidth]{image/SegNet} \caption{Encoder-decoder architecture of SegNet. From \cite{Badrinarayanan2015}} \label{SegNet} \end{figure} \textbf{FC-DenseNet:} DenseNet \cite{he16} is a CNN based classification network that contains only a down-sampling pathway for recognition. J\'egou et al. \cite{JegouDVRB16} has extended DenseNet by adding an up-sampling pathway to regain the full resolution of the input image. To construct the up-sampling pathway, the authors followed the concept of FCN. They have referred the down-sampling operation of DenseNet as Transition Down (TD) and up-sampling operation in extended DenseNet as Transition UP (TU) as shown in figure \ref{FCDense}. The rest of the convolutional layers follows the sequence of Batch Normalization, ReLU, $3\times3$ convolution and dropout of 0.2 as shown in the top right block in figure \ref{FCDense}. The up-sampling pathway used the sequence of dense block \cite{he16} instead of convolution operation of FCN and used transposed convolution as an up-sampling operation. The up-sampling feature maps are concatenated with the feature maps derived from corresponding layers of the down-sampling pathway. In figure \ref{FCDense}, these long skip connections are shown as yellow circle. \begin{figure}[htbp] \centering \includegraphics[scale=0.35]{image/FCDNet} \caption{Architecture of Fully Convolutional DenseNet for semantic segmentation with some building blocks. From \cite{JegouDVRB16}} \label{FCDense} \end{figure} As the upsampling rate of FCN based model in final layer is very high, it produces coarse output in final layer. So fine-grained semantic segmentation is not possible. On the other hand top-down/bottom-up approach based models used gradually increasing upsampling rate which leads to more accurate segmentation. But in this case the model also lacks incorporation of global contextual information. \subsubsection{Based on Global Context:} \label{ss_gc} \textbf{ParseNet:} \label{ss_parse} Liu et al. proposed an end-to-end architecture called ParseNet \cite{Liu2015} which is an improvement of Fully Convolution Neural Network \cite{Long2017}. The authors have added global feature or global context information for better segmentation. In figure \ref{ParseNet}, the model description of ParseNet is shown. Till convolutional feature map extraction, the ParseNet is the same as FCN \cite{Long2017}. After that, the authors have used global average pooling to extract global contextual information. Then the pooled feature maps are un-pooled to get the same size as input feature maps. Now, the original feature maps and un-pooled feature maps are combined for predicting the final classification score. As the authors have combined two different feature maps from two different layers of the network, those feature maps would be different in scale and norm. To make the combination work, they have used two L2 normalization layers: one after global pooling and another after the original feature map extracted from FCN simultaneously. This network achieved state-of-the-art performance on ShiftFlow \cite{Liu2011}, PASCAL-context \cite{mottaghi2014} and near the state of the art on PASCAL VOC 2012 dataset. \begin{figure}[htb] \centering \includegraphics[width=.9\linewidth]{image/ParseNet} \caption{ParseNet Model Design \cite{Liu2015}} \label{ParseNet} \end{figure} \textbf{GCN:} Like ParseNet, Global Convolution Network \cite{PengC2017} has also used global features along with local features to make the pixel-wise prediction more accurate. \begin{figure}[htbp] \centering \includegraphics[scale=0.20]{image/GCN} \caption{ Pipeline network of GCN. From \cite{PengC2017}} \label{GCN} \end{figure} The task of semantic segmentation is the combination of classification and localization tasks. These two tasks are contradictory in nature. The classification should be transformation invariant and localization should be transformation sensitive. Previous state-of-the-art models focused on localization more than classification. In GCN, the authors did not use any fully connected layers or global pooling layers to retain spatial information. On the other hand, they have used a large kernel size (global convolution) to make their network transformation invariant in the case of pixel-wise classification. To refine the boundary further the authors have used Boundary Refinement (BR) block. As shown in figure \ref{GCN}, ResNet is used as a backbone. GCN module is inserted in the network followed by the BR module. Then score maps of lower resolution are up-sampled with a deconvolution layer, and then added up with higher ones to generate new score maps for final segmentation. \textbf{EncNet:} Zhang et al. have applied the idea of global context introducing novel context encoding module. The authors have used Semantic Encoding Loss(SE-loss) to help incorporation of global scene context information. This loss unit helps in regularizing the network training procedure in such a way that the network can predicts the presence of different category objects as well as learns the semantic context of an image. Using the above mentioned idea, the authors have proposed Context Encoding Network (EncNet)\cite{Zhang2018} as shown in figure \ref{EncNet}. The network contains a pre-trained Deep ResNet. On top of the ResNet, Context Encoding Model is used. The authors have used dialation strategy, multi GPU Batch Normalization and Memory efficient encoding layer to enhance the acuuracy of semantic segmetation. \begin{figure}[htbp] \centering \includegraphics[scale=0.45]{image/EncNet} \caption{ EncNet from \cite{Zhang2018} (Notation: FC $\rightarrow$ Fully Convolutional Layer,Conv $\rightarrow$ Convolutional Layer, Encode $\rightarrow$ Encoding Layer and $\otimes$ $\rightarrow$ Channel wise multiplication )} \label{EncNet} \end{figure} Though application of global convolution helps to improve accuracy but it lacks the scaling information of multi scale objects. \subsubsection{Based on receptive field enlargement and multi-scale context incorporation:}\label{ss_rfmc} \textbf{DeepLabv2 and DeepLabV3:} The authors of DeepLab modified their network using Atrous Special Pooling Pyramid (ASPP) to aggregate multi-scale features for better localization and proposed DeepLabv2 \cite{Chen2016}. Figure \ref{aspp} shows ASPP. This architecture used both ResNet \cite{he16} and VGGNet\cite{simonyan14} as base network. \begin{figure}[htb] \centering \includegraphics[width=.95\linewidth]{image/aspp} \caption{Atrous Spatial Pooling Pyramid. From \cite{Chen2017}} \label{aspp} \end{figure} In DeepLabv3\cite{Chen2017}, to incorporate multiple contexts in the network, the authors have used cascaded modules and have gone deeper especially with the ASPP module. \textbf{PSPNet:} Pyramid Scene Parsing Network(PSPNet) \cite{Zhao2016}, proposed by Zhao et al., has used global contextual information for better segmentation. In this model, the authors have used Pyramid Pooling Module on top of the last feature map extracted using dilated FCN. In Pyramid Pooling Module, feature maps are pooled using 4 different scales corresponding to 4 different pyramid levels each with bin size $1\times1$, $2\times2$, $3\times3$ and $6\times6$. \begin{figure}[htbp] \centering \includegraphics[width=.96\linewidth]{image/PSPNet} \caption{PSPNet Model Design. From \cite{Zhao2016}} \label{PSPNet} \end{figure} To reduce dimension, the pooled feature maps are convolved using $1\times1$ convolution layer. The output of the convolution layers are up-sampled and concatenated to the initial feature maps to finally combine the local and the global contextual information. Then, those output are again processed by a convolutional layer to generate the pixel-wise prediction. In this network, the pyramid pooling module observes the whole feature map in sub-regions with a different locations. In this way, the network understands a scene better which also leads to better semantic segmentation. In figure \ref{PSPNet}, the architecture of PSPNet is shown. \textbf{Gated-SCNN:} Takikawa et al. proposed Gated - Shape CNN(GSCNN) \cite{Towaki2019} for Semantic Segmentation. As shown in figure \ref{GSCNN}, GSCNN consists of two streams of networks: regular stream and shape stream. The regular stream is a classical CNN for processing semantic region information. Shape stream consists of multiple Gated Convolution Layer (GCL) which process boundary information of regions using low-level feature maps from the regular stream. Outputs of both streams are fed into a fusion module. In fusion modules, both outputs are combined using Atrous Special Pyramid Pooling \cite{Chen2016} module. The use of ASPP helps their model to preserve multi-scale contextual information. Finally, the Fusion module produced semantic region of objects with a refined boundary. \begin{figure}[htbp] \centering \includegraphics[scale=0.40]{image/Gated_scnn} \caption{Architecture of Gated Shape CNN for semantic segmentation. From \cite{Towaki2019}} \label{GSCNN} \end{figure} The process of enlarging the receptive field using multi-resolution pyramid based representation helps the above model to incorporate scale information of objects to acquire fine-grained semantic segmentation. But capturing contextual information using receptive field enlargement may not be the only solution left for better semantic segmentation. \subsection{Discussion} From the year 2012, different CNN based semantic segmentation models have emerged in successive years to date. In subsection \ref{sem_seg}, we have described major up-gradation in the networks of various state-of-the-art models for better semantic segmentation. Among different models, Fully Convolutional Network (FCN) has set a path for semantic segmentation. Various models have used FCN as their base model. DeepLab and its versions have used atrous algorithm in different ways. SegNet, DeconvNet, U-Net have a similar architecture where the second part of those architectures is hierarchically opposite of the first half. ParseNet, PSPNet, and GCN have addressed semantic segmentation with respect to global contextual information. FC-DenseNet used top-down/bottom-up approach to incorporate low-level features with high-level features. So far, we have seen that the performance of a semantic segmentation model depends on the internal architecture of a network. In following subsections, we will see that it also depends on some other aspects such as the size of the data set, number of semantically annotated data, different training hyperparameters, optimization algorithm, loss function, etc. We have shown those different comparative aspects of each model in tabular form. \subsubsection{Optimization details of different State-of-the-art Semantic Segmentation Models:} Table \ref{TD_SS} shows different optimization details of different models where we can see that the success of a model not only depends on the architecture. Comparison of different models with respect to optimization or training details shows that most of the researcher used stochastic gradient descent (SGD) as optimization algorithm but with different mini batch size of images. The choice of mini-batch size depends also on the number of GPU used to train a particular model.It is also shown here that most of the researcher have used momentum approximately same as 0.9. The main important feature in training a model is choosing the learning rate so that the model can converge in a optimized way. Regularization term is also an important factor in model training to combat overfitting. So, as network design, choosing appropriate hyperparameters is also a crucial thing in training to reach to a desirable accuracy. \begin{table}[htb!] \caption{ Optimization details of different state-of-the-art semantic segmentation models} \label{TD_SS} \scriptsize \begin{center} \begin{tabularx}{\textwidth}{|X|X|X|p{3cm}|c|X|} \hline \textbf{Name of \newline the model }& \textbf{Optimization Algorithm} &\textbf{Mini \newline Batch Size}&\textbf{Learning Rate}&\textbf{Momentum}&\textbf{Weight \newline Decay} \\ \hline FCN-VGG16 \cite{Long2017}& SGD \cite{Bottou2010}& 20 images& 0.0001 &0.9 &0.0016 or 0.0625 \\ \hline DeepLab \cite{chen2014}&SGD &20 images & initially 0.001 (0.01 for final classification layer), increasing it by 0.1 at every 2000 iteration.&0.9&0.0005 \\ \hline Deconvnet \cite{Noh2015} &SGD&- & 0.01 &0.9 &0.0005\\ \hline U-Net \cite{Ronneberger2015}&SGD & Single image & &0.99 &$ $ \\ \hline DialatedNet \cite{YuK15}&SGD&14 images&0.001&0.9& -\\ \hline ParseNet \cite{Liu2015} &SGD& & $1e-9$ &0.9 &$ $ \\ \hline SegNet \cite{Badrinarayanan2015}&SGD& 12 images & 0.1 & 0.9 &$ $ \\ \hline GCN \cite{PengC2017}& SGD& Single image & &0.99 &0.0005 \\ \hline PSPNet \cite{Zhao2016} &SGD&16 images & `poly' learning rate with base learning rate of 0.01 and power to 0.9 &0.9 &0.0001 \\ \hline FC-DenseNet103 \cite{JegouDVRB16}&SGD& &initially $1e-3$ with an exponential decay of 0.995& &$1e-4$\\\hline EncNet \cite{Zhang2018}&SGD& 16 images& 0.001 with the power of 0.9& 0.9 &0.0001\\\hline Gated-SCNN \cite{Towaki2019}&SGD&16 images&$1e-2$ with polynomial decay policy& 0&\\\hline \end{tabularx} \end{center} \end{table} \begin{table}[htb!] \caption{Base Model, data preprocessing technique and loss functions of different state-of-the-art semantic segmentation models.} \label{TD_SS2} \tiny \begin{center} \begin{tabularx}{\linewidth}{|p{1.2cm}|X|X|X|}\hline \textbf{Name of \newline the model } & \textbf{Base \newline Network} &\textbf{Data pre-processing} &\textbf{Loss \newline Funtion}\\ \hline FCN-VGG16 \cite{Long2017}&AlexNet\cite{Krizhevsky2012}, VGGnet\cite{ simonyan14}, GoogLeNet\cite{szegedy15} (All pre-trained on ILSVRC dataset \cite{ILSVRC15})& &Per-pixel multinomial logistic loss \\ \hline DeepLab \cite{chen2014}&VGG16 \cite{ simonyan14} pre-trained on ILSVRC dataset &Data augmentation using extra annotated data of \cite{Hariharan2011}&Sum of cross-entropy loss \\ \hline Deconvnet \cite{Noh2015} &VGG16 pre-trained on ILSVRC dataset&Data augmentation using extra annotated data of \cite{Hariharan2011} & \\ \hline U-Net \cite{Ronneberger2015}&FCN \cite{Long2017}&Data augmentation by applying random elastic deformation to the available training images& Cross entropy loss \\ \hline DialateNet \cite{YuK15} & VGG16 \cite{ simonyan14}&Data augmentation using extra annotated data of \cite{Hariharan2011}& \\ \hline ParseNet \cite{Liu2015}&FCN \cite{Long2017}& & \\ \hline SegNet \cite{Badrinarayanan2015} &VGG16 \cite{ simonyan14}&Local contrast normalization to RGB data &Cross \newline entropy loss \\ \hline GCN \cite{PengC2017}&ResNet152 \cite{he16} as feature network and FCN-4 \cite{Long2017} as segmentation network &Semantic Boundaries Dataset \cite{Hariharan2011} is used as auxiliary dataset & \\ \hline PSPNet \cite{Zhao2016} &Pretrained ResNet \cite{he16} & Data augmentation: random mirror and random resize between 0.5 and 2, random rotation between -10 and 10 degrees, random Gaussian blur & Four losses:\newline \textbullet{ Additional loss for initial result generation} \newline \textbullet{ Final loss for learning the residue later}\newline \textbullet{ Auxiliary loss for shallow layers}\newline \textbullet{ Master branch loss for final prediction}\\ \hline FC-DenseNet \cite{JegouDVRB16} &DensNet \cite{he16} &Data augmentation using random cropping and vertical flipping &\\\hline EncNet \cite{Zhang2018} &ResNet & Data augmentation using random flipping, scaling, rotation and finally cropping & Semantic Encoding loss\\\hline Gated-SCNN \cite{Towaki2019} &ResNet101\cite{he16} and WideResNet\cite{ZagoruykoK16}&&\textbullet{ Segmentation loss for regular stream }\newline \textbullet{ Dual task loss for shape stream}\newline \textbullet\textbullet{ Standard binary cross entropy loss for boundary refinement} \newline \textbullet\textbullet{ Standard cross entropy for semantic segmentation} \\\hline \end{tabularx} \end{center} \end{table} \begin{table}[htb!] \caption{ Some important features of different state-of-the-art semantic segmentation models } \label{TD_SS3} \centering \scriptsize \begin{tabularx}{\textwidth}{|p{2cm}|X| }\hline \textbf{Model} & \textbf{Important Features} \\ \hline FCN-VGG16 &\textbullet{ Dropout is used to reduce overfitting} \newline \textbullet{ End to end trainable} \\ \hline DeepLab &\textbullet{ End to end trainable}\newline \textbullet{ Piecewise training for DCNN and CRF} \newline \textbullet{ Inference time during testing is 8frame per second}\newline \textbullet{ Used Atrous Special Pyramid Pooling module for aggregating multi-scale features} \\ \hline Deconvnet & \textbullet{ Used edge-box to generate region proposal}\newline \textbullet{ Used Batch Normalization to reduce internal covariate shift and removed dropout}\newline \textbullet{ Two-stage training for easy examples and for more challenging examples}\newline \textbullet { End to end trainable}\newline \textbullet { Drop-out layer is used at the end of the contracting path} \\\hline U-Net&\textbullet{ End to end trainable} \newline \textbullet{ Inference time for testing was less than 1 sec per image} \\ \hline DialatedNet & Two stage training: \newline \textbullet { Front end module with only dilated convolution} \newline \textbullet{ Dilated convolution with multi-scal context module } \\ \hline ParseNet & \textbullet{ End to end trainable}\newline \textbullet{ Batch Normalization is used}\newline \textbullet{ Drop-out of 0.5 is used in deeper layers} \\ \hline SegNet& \textbullet{ Different Ablation study} \\ \hline GCN & \textbullet{ Large Kernel Size} \newline \textbullet{ Included Global Contextual information}\\ \hline PSPNet & \textbullet{ End to end training} \newline \textbullet{ Contains dialated convolution} \newline \textbullet{ Batch normalization} \newline \textbullet{ Used pyramid pooling module for aggregating multi-scale features} \\ \hline FC-DensNet& \textbullet{ Initialized the model with HeUniform\cite{HeZR015} and trained it with RMSprop dataset\cite{DauphinVCB15}} \newline \textbullet{ Used dropout of 0.2}\newline \textbullet{ Used the model parameters efficiently}\\\hline EncNet& \textbullet{ Used Context Encoding Module }\newline \textbullet{ Applied SE-loss to incorporate global semantic context }\\\hline Gated -SCNN& \textbullet{ End to end trainable} \newline \textbullet{ Applied ablation study }\\\hline \end{tabularx} \end{table} Table \ref{TD_SS2} presents base network (pre-trained on ImageNet \cite{Russakovsky2015} dataset), data pre-processing technique (basically data augmentation) and different loss function used for different models. Choosing of base network of a semantic segmentation model changes overtime according to the evolution of classification model. Optimization of a model always starts with some kind of data pre-processing. Different researcher have used different technique to pre-process the data. Most commonly used data preprocessing technique is data augmentation. As a loss function, cross entropy loss is used in most cases. Also, according to the complexity of model design, researchers have used different loss function to get higher accuracy. So, the choice of base network, data pre-processing technique, loss function etc are also very important to design a successful model. \begin{table}[h] \caption{Comparative accuracy of different semantic segmentation models in terms of mean average precision (mAP) as Intersection over Union (IoU)} \label{table4} \centering \scriptsize \begin{tabularx}{\textwidth}{|l|c|X|X| }\hline \textbf{Model} & \textbf{Year} & \textbf{Used Dataset} & \textbf{mAP as IoU} \\ \hline FCN-VGG16 \cite{Long2017} & 2014& Pascal VOC 2012 \cite{Everingham2007} & 62.2\% \\ \hline DeepLab\cite{chen2014} & 2014& Pascal VOC 2012 & 71.6\% \\ \hline Deconvnet\cite{Noh2015} &2015&Pascal VOC 2012 & 72.5\% \\\hline U-Net\cite{Ronneberger2015}& 2015&ISBI cell tracking challenge 2015 & 92\% on PhC-U373 and 77.5\% on DIC-HeLa dataset \\ \hline DialatedNet \cite{YuK15}&2016 &Pascal VOC 2012 &73.9\% \\ \hline ParseNet \cite{Liu2015}&2016 & \textbullet { ShiftFlow \cite{Liu2011}} \newline \textbullet { PASCAL- Context \cite{mottaghi2014}}\newline \textbullet { Pascal VOC 2012} & 40.4\% \newline 36.64\% \newline 69.8\% \\ \hline SegNet \cite{Badrinarayanan2015}& 2016&\textbullet{ CamVid road scene segmentation \cite{BrostowFC09}} \newline \textbullet{ SUN RGB-D indoor scene segmentation\cite{SongLX15}}&60.10\% \newline \newline 31.84\%\\ \hline GCN\cite{PengC2017} &2017 &\textbullet{ PASCAL VOC 2012} \newline \textbullet{Cityscapes \cite{Cordts2016}} & 82.2\% \newline 76.9\% \\ \hline PSPNet \cite{Zhao2016} &2017 & \textbullet{ PASCAL VOC 2012} \newline \textbullet{ Cityscapes} & 85.4\% \newline 80.2\% \\ \hline FC-DenseNet103 \cite{JegouDVRB16}&2017&\textbullet{ CamVid road scene segmentation } \newline \textbullet{ Gatech\cite{RazaGE15}}& 66.9\% \newline 79.4\% \\\hline EncNet \cite{Zhang2018}&2018& \textbullet{ Pascal VOC 2012 } \newline \textbullet{ Pascal Context}& 85.9\% \newline 51.7\% \\\hline Gated-SCNN \cite{Towaki2019}&2019&\textbullet{ Cityscapes}& 82.8\%\\\hline \end{tabularx} \end{table} To give a clear view on the success of each model, we have listed some important features of each state-of-the-art model in table \ref{TD_SS3}. \subsubsection{Comparative Performance of State-of-the-art Semantic Segmentation Models:} In this section, we are going to show the comparative result of different state-of-the-art semantic segmentation models on various datasets in table \ref{table4}. The performance metric used here is mean average precision (mAP) as Intersection over Union (IoU) threshold. To have a better understanding, we have listed them in chronological order. \section{Instance Segmentation}\label{is} Like semantic segmentation, the applicability of CNN has been spread over instance segmentation too. Unlike semantic segmentation, instance segmentation masks each instance of an object contained in an image independently \cite{wu2016bridging, HariharanAGM14}. The task of object detection and instance segmentation are quite correlated. In object detection, researchers use the bounding box to detect each object instance of an image with a label for classification. Instance segmentation put this task one step forward and put a segmentation mask for each instance. Concurrent to semantic segmentation research, instance segmentation research has also started to use the convolutional neural network(CNN) for better segmentation accuracy. Herein, we are going to survey the evolution of CNN based instance segmentation models. In addition, we are going to bring up here an elaborate exploration of some state-of-the-art models for instance segmentation task. \subsection{Evolution of CNN based Instance Segmentation Models:} CNN based instance segmentation has also started its journey along with semantic segmentation. As we have mentioned in section \ref{is} that instance segmentation task only adds a segmentation mask to the output of object detection task. That is why most of the CNN based instance segmentation models have used different CNN based object detection models to produce better segmentation accuracy and to reduce test time. Hariharan et al. have followed the architecture of R-CNN \cite{Girshick2014} object detector and proposed a novel architecture for instance segmentation called Simultaneous Detection and Segmentation(SDS) \cite{HariharanAGM14} which is a 4 step instance segmentation model as described in section \ref{is_bb}. Till this time CNN based models have only used the last layer feature map for classification, detection and even for segmentation. In 2014, Hariharan et al. have again proposed a concept called Hyper-column \cite{Hariharan14a} which has used the information of some or all intermediate feature maps of a network for better instance segmentation. The authors added the concept of Hyper-column to SDS and their modified network achieved better segmentation accuracy. Different object detector algorithms such as R-CNN, SPPnet \cite{He2014}, Fast R-CNN \cite{Girshick2015} have used two stages network for object detection. The first stage detects object proposals using Selective Search \cite{Uijlings2013} algorithm and second stage classify those proposals using different CNN based classifier. Multibox \cite{ErhanSTA13, SzegedyREA14}, Deepbox \cite{KuoHM15}, Edgebox \cite{Zitnick2014} have used CNN based proposal generation method for object detection. Faster R-CNN \cite{Ren2015} have used CNN based `region proposal network (RPN)' for generating box proposal. However, the mode of all these proposal generations is using a bounding box and so the instance segmentation models. In parallel to this, instance segmentation algorithms such as SDS and Hyper-column have used Multi-scale Combinatorial Grouping (MCG)\cite{Arbelaez2014} for region proposal generation. DeepMask \cite{Pinheiro2015}, as discussed in section \ref{is_mask}, has also used CNN based RPN as Faster R-CNN to generate region proposals so that the model can be trained end to end. Previous object detection and instance segmentation modules such as \cite{Girshick2014}, \cite{He2014}, \cite{Girshick2015}, \cite{Ren2015} \cite{HariharanAGM14}, \cite{Hariharan14a}, \cite{Pinheiro2015} etc. have used computationally expensive external methods for generating object level or mask level proposals like Selective Search, MCG, CPMC \cite{Carreira2012}, RPN etc. Dai et al. \cite{Dai2015} break the tradition of using a pipeline network and did not use any external mask proposal method. The authors have used a cascaded network for incorporating features from different CNN layers for instance segmentation. Also, the sharing of convolution features leads to faster segmentation models. Detail of the network is discussed in section \ref{is_bb}. SDS, DeepMask, Hyper-columns have used feature maps from top layers of the network for object instance detection which leads to coarse object mask generation. Introduction of skip connection in \cite{Long2014, XieT15, Pierre2012, Zagoruyko16} reduces the coarseness of masks which is more helpful for semantic segmentation rather instance segmentation. Pinheiro et. al.\cite{Pinheiro2016} have used their model to generate a coarse feature map using CNN and then refined those models to get pixel-accurate instance segmentation masks using a refinement model as described in section \ref{is_mask}. In papers \cite{Torralba2003}, \cite{Semanet2012}, \cite{Szegedy2014}, \cite{He2014}, \cite{BellZBG15}, \cite{Hariharan14a}, \cite{Long2017}, \cite{Derek2012}, researchers used contextual information and low level features into CNN in various ways for better segmentation. Zagoruko et al. \cite{Zagoruyko16} has also used those ideas by integrating skip connection, foveal structure and integral loss in Fast R-CNN \cite{Girshick2015} for better segmentation. Further description is given in section \ref{is_mpn}. Traditional CNNs are translation invariant i.e images with the same properties but with different contextual information will score the same classification score. Previous models, specially FCN, used a single score map for semantic segmentation. But for instance segmentation, a model must be translation variant so that the same image pixel of different instances having different contextual information can be segmented separately. Dai et al \cite{Dai2016} integrated the concept of relative position into FCN to distinguish multiple instances of an object by assembling a small set of score maps computed from the different relative positions of an object. Li et al \cite{LiQDJW16} extended the concept of \cite{Dai2016} and introduced two different position-sensitive score maps as described in section \ref{is_rp}. SDS, Hypercolumn, CFM \cite{DaiH014}, MNC \cite{Dai2015}, MultiPathNet\cite{Zagoruyko16} used two different subnetworks for object detection and segmentation which prevent the models to become an end to end trainable. On the other hand \cite{Liang2015},\cite{LiuS2016} extends instance segmentation by grouping or clustering FCNs score map which involves a large amount of post-processing. \cite{LiQDJW16} introduced a joint formulation of classification and segmentation masking sub-networks in an efficient way. While \cite{ArnabT17, BaiU16, KirillovLASR16, LiuJSR2017} have used semantic segmentation models, Mask R-CNN \cite{He2017} extends the object detection model Faster R-CNN by adding a binary mask prediction branch for instance segmentation. In \cite{HuangZ2019}, Huang et al infused a network block in Mask R-CNN to learn the predicted mask in a qualitative way and proposed Mask Scoring R-CNN. Recently, Kirillov et al.\cite{Alex2019} used point-based rendering in Mask R-CNN and produce state-of-the-art instance segmentation model. The authors of \cite{Uhrig2016}, \cite{Chen2017MaskLab} has introduced direction features to predict different instances of a particular object. \cite{Uhrig2016} has used template matching technique with direction feature to extract the center of an instance whereas \cite{Chen2017MaskLab} followed the assembling process of \cite{LiQDJW16, Dai2016} to get instances. The papers \cite{KongYCS16, ZagoruykoLLPGCD16, BaiU16, Hariharan14a} have used features form intermediate layers for better performance. Liu et al.\cite{Liu2018} have also used the concept of feature propagation from a lower level to top-level and built a state-of-the-art model based on Mask R-CNN as discussed in section \ref{is_fp}. In \cite{Newell2017}, Newell et al used a novel idea to use CNN with associative embedding for joint detection and grouping to handle instance segmentation. Object detection using the sliding window approach gave us quite successful work such as Faster R-CNN, Mask R-CNN, etc. with refinement step and SSD\cite{Liu2016}, RetinaNet\cite{Lin2017} without using refinement stage. Though sliding window approach is popular in object detection but it was missing in case of instance segmentation task. Chen et al. \cite{Chen2019} have introduced dense instance segmentation to fill this gap and introduced TensorMask. \subsection{Some State-of-the-art Instance Segmentation Models:}\label{is_model} In this section, we are going to elaborately discuss architectural details of some state-of-the-art CNN based instance segmentation models. The models are categorized on the basis of the most impotant feature used. At the end of each categorical discussion, we have also briefly discussed the advantages and weaknesses of a particular model category in brief. \subsubsection{Based on bounding box proposal generation:} \label{is_bb} \textbf{SDS:} Simultaneous Detection and Segmentation (SDS) \cite{HariharanAGM14} model consists of 4 steps for instance segmentation. The steps are proposal generation, feature extraction, region classification, and region refinement respectively. \begin{figure}[htb] \centering \includegraphics[width=.95\linewidth]{image/sds} \caption{Architecture of SDS Network. From \cite{HariharanAGM14}} \label{sds} \end{figure} On input image, the authors have used Multi-scale Combinatorial Grouping(MCG) \cite{Arbelaez2014} algorithm for generating region proposals. Then each region proposals are fed into two CNN based sibling networks. As shown in figure \ref{sds}, the upper CNN generates a feature vector for bounding box of region proposals and the bottom CNN generates a feature vector for segmentation mask. Two feature vectors are then concatenated and class scores are predicted using SVM for each object candidate. Then non-maximum suppression is applied on the scored candidates to reduce the set of same category object candidates. Finally, to refine surviving candidates CNN feature maps are used for mask prediction. \textbf{Multi-task Network Cascades (MNC):} Dai et al. \cite{Dai2015} used a network with the cascaded structure to share convolutional features and also used region proposal network (RPN) for better instance segmentation. The authors have decomposed the instance segmentation task into three sub tasks: instance differentiation (class agnostic bounding box generation for each instance), mask estimation (estimated a pixel-level mask/instance ) and object categorization (instances are labeled categorically). They proposed Multi-task Network Cascades (MNC) to address these sub-tasks in three different cascaded stages to share convolutional features. As shown in figure \ref{mnc}, MNC takes an arbitrary sized input which is a feature map extracted using VGG16 network. Then at the first stage, the network generates object instances from the output feature map as class agnostic bounding boxes with an objectness score using RPN. Shared convolutional features and output boxes of stage-1 then go to the second stage for regression of mask level class-agnostic instances. Again, shared convolutional features and output of the previous two stages are fed into the third stage for generating category score for each instance. \begin{figure}[htb] \centering \includegraphics[width=.94\linewidth]{image/mnc} \caption{Three stage architecture of Multi-task Network Cascades. From \cite{Dai2015}.} \label{mnc} \end{figure} \textbf{Mask R-CNN:} Mask R-CNN\cite{He2017} contains three branches for predicting class, bounding-box and segmentation mask for instances within a region of interest (RoI). This model is the extension of Faster R-CNN. As Faster R-CNN, Mask R- CNN contains two stages. In the first stage, it uses RPN to generate RoIs. Then to preserve the spatial location, the authors have used RoIAlign instead of RoIPool as in Faster R-CNN. In the second stage, it simultaneously predicts a class label, a bounding box offset and a binary mask for each individual RoI. In Mask R-CNN, the prediction of binary mask for each class was independent and it was not a multi-class prediction. \begin{figure}[htb] \centering \includegraphics[width=.85\linewidth]{image/mask_rcnn} \caption{Architecture of Mask R-CNN. From\cite{He2017}.} \label{mrcnn} \end{figure} Generation of bounding box is computationally cost effective and its very helpful for detecting object. But its leads to computationally expensive alignment procedures. Also bounding box generation based models needs to generate masks for each instance separately. To overcome this problem researcher tried to generate segmentation mask proposal instead of bonding box proposal. \subsubsection{Based on segmentation mask proposal generation:}\label{is_mask} \textbf{DeepMask:} DeepMask \cite{Pinheiro2015} used CNN to generate segmentation proposals rather than less informative bounding box proposal algorithms such as Selective Search, MCG, etc. \begin{figure}[htb] \centering \includegraphics[width=.93\linewidth]{image/DeepMask} \caption{Model illustration of DeepMask. From \cite{Pinheiro2015}.} \label{Deepmask} \end{figure} DeepMask used VGG-A \cite{simonyan14} model (discarding last max-pooling layer and all fully connected layers) for feature extraction. As shown in figure \ref{Deepmask}, the feature maps are then fed into two sibling branches. The top branch which is the CNN based object proposal method of DeepMask predicts a class-agnostic segmentation mask and bottom branch assigns a score for estimating the likelihood of patch being centered on the full object. The parameters of the network are shared between the two branches. \textbf{SharpMask:} DeepMask generates accurate masks for object-level but the degree of alignment of the mask with the actual object boundary was not good. SharpMask \cite{Pinheiro2016} contains a bottom-up feed-forward network for producing coarse semantic segmentation mask and a top-down network to refine those masks using a refinement module. The authors have used feed-forward DeepMask segmentation proposal network with their refinement module and named it as SharpMask. As shown in figure \ref{sharpmask}, the bottom-up CNN architecture produces coarse mask encoding. Then the output mask encoding is fed into a top-down architecture where a refinement module un-pool it using matching features from the bottom-up module. This process continues until the reconstruction of the full resolution image and the final object mask. \begin{figure}[htb] \centering \includegraphics[scale=0.6]{image/sharpmask} \caption{Bottom-up/top-down architecture of SharpMask. From \cite{Pinheiro2016}.} \label{sharpmask} \end{figure} Segmentation mask proposal generation using CNN helps the models to have better accuracy. But it does not have the power of capturing instances of object with different scales. \subsubsection{Based on multi-scale feature incorporation:}\label{is_mpn} \textbf{MultiPath Network:} Zagoruko et al. integrate three modifications in the Fast R-CNN object detector and proposed Multipath Network \cite{Zagoruyko16} for both object detection and segmentation tasks. Three modifications are skip connections, foveal structure, and integral loss. Recognition of small objects without context is difficult. That is why, in \cite{Torralba2003}, \cite{Semanet2012}, \cite{Szegedy2014}, \cite{He2014}, \cite{GidarisK15}, the researcher used contextual information in various ways in CNN based model for better classification of objects. In Multipath Network, the authors have used four contextual regions called foveal regions. The view size of those regions are $1\times$, $1.5\times$, $2\times$, $4\times$ of the original object proposal. \begin{figure}[htb] \centering \includegraphics[width=.94\linewidth]{image/mpn} \caption{Architecture of MultiPath Network. From \cite{Zagoruyko16}.} \label{mpn} \end{figure} On the other hand, researchers of \cite{BellZBG15}, \cite{Hariharan14a}, \cite{Long2017}, \cite{Derek2012} has used feature from higher-resolution layers of CNN for effective localization of small objects. In Multipath Network, the authors have connected third, fourth and fifth convolutional layers of VGG16 to the four foveal regions to use multi-scale features for better object localization. Figure \ref{mpn} shows the architectural pipeline of MultiPath Network. Feature maps are extracted from an input image using the VGG16 network. Then using skip connection those feature maps go to four different Foveal Region. The output of those regions are concatenated for classification and bounding box regression. The use of the DeepMask segmentation proposal helped their model to be the 1st runner-up in MS COCO 2015 \cite{Lin2014} detection and segmentation challenges. This model tried to incorporate multi-scale feature maps to become scale invariant and also used skip connection to incorporate contextual information for better segmentation. But it lacks knowledge about relative position of an object instances. \subsubsection{Based on capturing relative position of object instances:}\label{is_rp} \textbf{InstanceFCN:} The fully convolutional network (FCN) is good for single instance segmentation of an object category. But it can not distinguish multiple instances of an object. Dai et al have used the concept of relative position in FCN and proposed instance sensitive fully convolutional network (InstanceFCN) \cite{Dai2016} for instance segmentation. The relative position of an image is defined by a $k\times k$ grid on a square sliding window. This produces a set of $k^2$ instance sensitive score maps rather than one single score map as FCN. Then the instance sensitive score maps are assembled according to their relative position in a $m\times m$ sliding window to produce object instances. In DeepMask\cite{Pinheiro2015}, shifting sliding window for one stride leads to the generation of two different fully connected channels for the same pixel which is computationally exhaustive. In InstanceFCN, the authors have used the concept of local coherence \cite{Barnes2009} which means sliding a window does not require different computations for a single object. Figure \ref{ifcn} shows the architecture of InstanceFCN. \begin{figure}[htb] \centering \includegraphics[scale=0.32]{image/Ifcn} \caption{Architecture of Instance-sensitive fully convolutional network. From \cite{Dai2016}.} \label{ifcn} \end{figure} \textbf{FCIs:} InstanceFCN introduced position-sensitive score mapping to signify the relative position of an object instance but the authors have used two different sub networks for object segmentation and detection. Because of two different networks, the solution was not end to end. Li et al. \cite{LiQDJW16} proposed the first end to end trainable fully convolutional network based model in which segmentation and detection are done jointly and concurrently in a single network by score map sharing as shown in figure \ref{fcis}. Also instead of the sliding window approach, the model used box proposals following \cite{Ren2015}. The authors have used two different position-sensitive score maps: position-sensitive inside score maps and position sensitive outside score maps. These two score maps depend on detection score and segmentation score of a pixel in a given region of interests (RoIs) with respect to different relative position. As shown in figure \ref{fcis} RPN is used to generate RoIs. Then RoIs are used on score maps to detect and segment object instances jointly. \begin{figure}[htb] \centering \includegraphics[width=.93\linewidth]{image/FCIs} \caption{Architecture of FCIs. From \cite{LiQDJW16}.} \label{fcis} \end{figure} \textbf{MaskLab:} MaskLab \cite{Chen2017MaskLab} has utilized the merits of both semantic segmentation and object detection to handle instance segmentation. The authors have used Faster R-CNN\cite{Ren2015} (ResNet-101\cite{he16} based) for predicting bounding boxes for object instances. Then they have calculated semantic segmentation score maps for labeling each pixel semantically and direction score maps for predicting individual pixels direction towards the center of its corresponding instance. Those score maps are cropped and concatenated for predicting a coarse mask for target instance. The mask is then again concatenated with hyper-column features\cite{Hariharan14a} extracted from low layers of ResNet-101 and processed using a small CNN of three layers for further refinement. \begin{figure}[htb] \centering \includegraphics[width=.93\linewidth]{image/masklab} \caption{Architecture of MaskLab. From \cite{Chen2017MaskLab}.} \label{mlab} \end{figure} Using position sensitive score maps the above models tried to capture the relative position of object instances. \subsubsection{Based on feature propagation:}\label{is_fp} \textbf{PANet:} The flow of information in the convolutional neural network is very important as the low-level feature maps are information-rich in terms of localization and the high-level feature maps are rich in semantic information. Liu et al. focused on this idea. Based on Mask R-CNN and Feature Pyramid Network(FPN) \cite{Lin2016}, they have proposed a Path Aggregation Network (PANet) \cite{Liu2018} for instance segmentation. PANet used FPN as its base network to extract features from different layers. To propagate the low layer feature through the network, a bottom-up augmented path is used. Output of each layer is generated using previous layers high-resolution feature map and a coarse map from FPN using a lateral connection. Then an adaptive pooling layer is used to aggregate features from all levels. In this layer, a RoIPooling layer is used to pool features from each pyramid level and element wise max or sum operation is used to fuse the features. As Mask R-CNN, the output of the feature pooling layer goes to three branches for prediction of the bounding box, prediction of the object class and prediction of the binary pixel mask. Using feature propagation network and pooling pyramid, this model incorporates low to high level feature as well as multi-scale features which leads to information rich instance segmentation. \begin{figure}[htb] \centering \includegraphics[scale=0.29]{image/panet} \caption{Architecture of PANet. From \cite{Liu2018}.} \label{panet} \end{figure} \subsubsection{Based on sliding window approach:}\label{is_sw} \textbf{TensorMask:} Previous instance segmentation models used methods in which the objects are detected using bounding box then segmentation is done. Chen et al. have used the dense sliding window approach instead of detecting the object in a bounding box named TensorMask \cite{Chen2019}. The main concept of this architecture is the use of structured high-dimensional (4D) tensors to present mask over an object region. A 4D tensor is a quadruple of (V, U, H, W). The geometric sub-tensor (H, W) represents object position and (V, U) represents the relative mask position of an object instance. Like feature pyramid network, TensorMask has also developed a pyramid structure, called $tensor bipyramid$ over a scale-indexed list of 4D tensors to acquire the benefits of multi-scale. \subsection{Discussion:} In the previous subsection \ref{is_model}, we have presented important architectural details of different state-of-the-art models. Among them, some models are based on different object detection models such as R-CNN, Fast R-CNN, Faster R-CNN, etc. Some models are based on semantic segmentation models such as FCN, U-Net, etc. SDS, DeepMask, SharpMask are based on proposal generation. InstanceFCN, FCIs, MaskLab calculate position-sensitive score maps for instance segmentation. PANet emphasized on feature propagation across the network. TensorMask used the sliding window approach for dense instance segmentation. So, architectural differences help different models to achieve success in various instance segmentation dataset. On the other hand, fine-tuning of hyper-parameters, data pre-processing methods, choice of the loss function and optimization function, etc are also played an important role in the success of a model. In this subsections, we are going to present some of those important features in a comparative manner. \subsubsection{Optimization Details of State-of-the-art Instance Segmentation Models:} The training and optimization process is very crucial for a model to become successful. Most of the state-of-the-art models used stochastic gradient descent(SGD) \cite{Goyal2017} as an optimization algorithm with different initialization of corresponding hyper parameters such as mini-batch size, learning rate, weight decay, momentum etc. Table \ref{TD_IS} shows those hyper-parameters in a comparative way. As semantic segmentation, most of the instance segmentation models used momentum of 0.9 with different weight decay. Variation of choosing a learning rate is also not much. \begin{table}[htb!] \caption{Optimization details of different state-of-the-art instance segmentation models} \label{TD_IS} \tiny \begin{center} \begin{tabularx}{\textwidth}{|X|X|X|p{3cm}|c|X|}\hline \textbf{Name of \newline the model }& \textbf{Optmization Algorithm} &\textbf{Mini \newline Batch Size}&\textbf{Learning Rate}&\textbf{Momentum}&\textbf{Weight \newline Decay} \\ \hline DeepMask \cite{Pinheiro2015}&SGD&32 images&0.001&0.9&0.00005\\ \hline MNC \cite{Dai2015}&SGD&1 images per GPU, total 8 GPUs are used&0.001 for 32k iteration, 0.0001 for next 8K iteration && \\\hline MultPath Network \cite{Zagoruyko16}&SGD&4 images,1 image per GPU, each with 64 object proposals&initially 0.001, after 160k iterations, it was reduced to 0.0001&-&-\\\hline SharpMask \cite{Pinheiro2016}&SGD&&$1e^{-3}$&&\\\hline InstanceFCN \cite{Dai2016}&SGD&8 images each with 256 sampled windows, 1 image/GPU&0.001 for initial 32k iterations and 0.0001 for the next 8k.&0.9&0.0005 \\\hline FCIs \cite{LiQDJW16}&SGD&8 images/batch, 1 image per GPU&0.001 for the first 20k and 0.0001 for the next 10k iterations&& \\\hline Mask R-CNN \cite{He2017}&SGD& 16 images/batch, 2 images per GPU &0.02 for first 160k iteration and 0.002 for next 120k iterations&0.0001& 0.9\\\hline PANet \cite{Liu2018}&SGD&16 images&0.02 for 120k iterations and 0.002 for 40k iterations& 0.0001&0.9\\\hline TensorMask \cite{Chen2019}&SGD&16 images, 2 images per GPU &0.02 with linear warm-up\cite{Goyal2017} of 1k iteration &0.9&0.0005 \\\hline \end{tabularx} \end{center} \end{table} \begin{table}[htb!] \caption{Base Model, data preprocessing technique and loss functions of different Stat-of-the-art models.} \label{TD_IS2} \tiny \begin{center} \begin{tabularx}{\linewidth}{|p{1.2cm}|X|X|X|}\hline \textbf{Name of \newline the model } & \textbf{Base \newline Network} &\textbf{Data pre-processing} &\textbf{Loss \newline Funtion}\\ \hline SDS &&& \\\hline DeepMask&VGG-A pretrained on ImageNet dataset&\textbullet{ Randomly jitter `canonical' positive examples for increasing the model's robustness} \newline\textbullet{ Applied translation shift, scale deformation and horizontal flip for data augmentation}&Sum of binary logistic regression losses\newline \textbullet{ One for each location of the segmentation network}\newline\textbullet{ Other for the objectness score}\\\hline MNC &\textbullet{ VGG-16}\newline \textbullet{ ResNet-101}&&Unified loss function\newline\textbullet{ RPN loss for box regression/instance}\newline \textbullet{ Mask regression loss/instance}\newline\textbullet{ loss function for categorizing instances}\newline\textbullet{ Inference time per image is 1.4sec}\\\hline MultPath Network & Fast R-CNN&Horizontal flip as data augmentation&Integral loss function: \newline\textbullet{ Integral log loss function for classification }\newline\textbullet{ Bounding box function}\\\hline SharpMask &DeepMask&&Same as used in DeepMask \\\hline InstanceFCN &VGG-16, pretrained on ImageNet&Arbitray sized images are used for training with scale jittering following \cite{He2014}&Logistic regression loss for predicting abjectness score and segment instances \\\hline FCIs &ResNet-101&& \\\hline Mask R-CNN &Faster R-CNN based on ResNet &&Multi-task loss: \newline\textbullet{ log loss function for classification }\newline\textbullet{ L1 loss function for bounding box regression }\newline\textbullet{ Average binary cross entropy loss for mask prediction} \\\hline MaskLab \cite{Chen2017MaskLab}&ResNet-101 based Faster R-CNN pre-trained on ImageNet&& \\\hline PANet &ResNet-50, ResNeXt-101\cite{XieGDTH16} based Mask R-CNN and FPN && \\\hline TensorMask &ResNet-50, FPN&Scale jittering is used& Weighted sum of all task loss specially for mask, per-pixel binary classification loss is used. Focal loss is used to handle foreground background class imbalance. \\\hline \end{tabularx} \end{center} \end{table} \begin{table}[htb!] \caption{ Some important features of different state-of-the-art instance segmentation models } \label{TD_IS3} \centering \scriptsize \begin{tabularx}{\textwidth}{|p{2cm}|X| }\hline \textbf{Model} & \textbf{Important Features} \\ \hline SDS &\textbullet{ Used MCG to generate region proposals}\newline \textbullet{ Used segmentation data from SBD\cite{Hariharan2011}} \\\hline DeepMask&\textbullet{ The inference time in MS COCO is 1.6s per image} \newline\textbullet{ The inference time in PASCAL VOC 2007 is 1.2s per image}\ \\\hline MNC&\textbullet{ End to End trainable}\newline\textbullet{ Convolutional feature sharing leads to reduction of test time of 360ms/image. } \\\hline Multi-path Network &\textbullet{ Skip Connection for sharing feature among multiple levels}\newline\textbullet{ Foveal structure to capture multi-scale object}\newline\textbullet{ Integrated loss function for improving localization }\newline\textbullet{ DeepMask region proposal algorithm to generate region proposals}\newline \textbullet{ Training time 500ms/image}\\\hline SharpMask & \textbullet{ Bottom-up/top-down approach}\newline\textbullet{ DeepMask used in bottom-up network to generate object proposal} \newline\textbullet{ Top-down network is stack of refinement model which aggregate features from corresponding layers from bottom-up path } \newline\textbullet{ Two stage training: One for bottom-up and another for top-down network}\\\hline InstanceFCN &\textbullet{ A small set of score maps computed from different relative position of an image patch are assembled for predicting the segmentation mask}\newline\textbullet{ Applied `hole algorithm\cite{chen2014}' in last three layers of VGGNet } \\\hline FCIs &\textbullet{ End to end trainable FCN based model}\newline\textbullet{ Based on position sensitive inside and outside score map}\newline\textbullet{ Inference time 0.24 seconds/image}\newline\textbullet{ Six times faster than MNC} \\\hline Mask R-CNN &\textbullet{ RoIAlign layers are used instead of RoIPool layer to preserve special location}\newline\textbullet{ Inference time was 200 ms per frame } \\\hline MaskLab & \textbullet{ Used atrous convolution to extract denser feature map to control output resolution}\newline\textbullet{ End to end trainable model}\newline\textbullet{ To cover 360 degree of an instance 8 directions are used with 4 number of distance quantization bins for direction pooling} \\\hline PANet & \textbullet{ FPN is used as Backbone network}\newline\textbullet{ Adaptive feature pooling layer is introduced}\\\hline TensorMask&\textbullet{ Dense instance segmentation using sliding window approach}\newline\textbullet{ The model works on 4D tensor} \\\hline \end{tabularx} \end{table} Different models have used different CNN based classification, Object detection and semantic segmentation model as their base network according to the availability. It is an open choice to the researchers to choose a base model (may be pre-trained on some dataset) according to their application domain. Most of the data preprocessing basically includes different data augmentation technique. Differences in loss function depend on the variation of the model architecture as shown in table \ref{TD_IS2}. Table \ref{TD_IS3} is showing some important features of different models. \begin{table*}[htb!] \centering \caption{Comparison of different instance segmentation models as average precision according to IoU threshold } \label{C_IS} \tiny \begin{tabularx}{\textwidth}{|c|c|X|X| } \hline \textbf{Model} & \textbf{Year} & \textbf{Used Dataset} & \textbf{mAP as IoU} \\ \hline SDS &2014&\textbullet{ PASCAL VOC 2011} $\longrightarrow$\newline \textbullet{ PASCAL VOC 2012} $\longrightarrow$&51.6\% \newline 52.6\% \\ \hline DeepMask &2015&\textbullet{ PASCAL VOC}\newline\textbullet{ MS COCO}&Fast R-CNN using DeepMask outperforms original Fast R-CNN and achieved 66.9\% accuracy on PASCAL VOC 2007 test dataset\\\hline MNC&2016 &\textbullet{ PASCAL VOC 2012} $\longrightarrow$\newline \textbullet{ MS COCO 2015} $\longrightarrow$&63.5\% on validation set\newline 39.7\% on $test-dev set$ \newline (both mAP@).5 IoU threshold) \\\hline MultPath Network &2015&MS COCO 2015 $\longrightarrow$&25.0\%(AP), 45.4\%($AP^{50}$) and 24.5\% ($AP^{75})$, all on test dataset.\newline Superscripts of AP denotes IoU threshold\\\hline SharpMask +MPN \cite{Zagoruyko16}&2016&MS COCO 2015 $\longrightarrow$&25.1\%(AP), 45.8\%($AP^{50}$) and 24.8\% ($AP^{75}$), all on test dataset. Superscripts of AP denotes IoU threshold\\\hline InstanceFCN+MNC &2016&PASCAL VOC 2012 validation dataset & 61.5\%([email protected]) and 43.0\%([email protected]) \\\hline FCIs &2017&\textbullet{ Pascal voc 2012 $\longrightarrow$}\newline\textbullet{ MS COCO 2016$\longrightarrow$} & 65.7\%([email protected]) and 52.1\%([email protected]) 59.9\%([email protected])(ensemble)\\\hline Mask R-CNN &2017&MS COCO&60.0\%($AP^{50}$) and 39.4\% ($AP^{75}$) , all on test dataset.Superscripts of AP denotes IoU threshold \\\hline MaskLab&2018&MS COCO (test-dev) $\longrightarrow$& 61.1\%([email protected]) and 40.4\%([email protected]) \\\hline PANet &2018 &\textbullet{ MS COCO 2016 $\longrightarrow$}\newline\textbullet{ MS COCO 2017$\longrightarrow$}&65.1\%($AP^{50}$) and 45.7\% ($AP^{75}$)\newline69.5\%($AP^{50}$) and 51.3\% ($AP^{75}$) , (Mask AP).Superscripts of AP denotes IoU threshold \\\hline TensorMask &2019&MS COCO (test-dev) & 37.3\% (AP), 59.5\%($AP^{50}$) and 39.5\% ($AP^{75}$).Superscripts of AP denotes IoU threshold\\\hline \end{tabularx} \end{table*} \subsubsection{Comparative Performance of State-of-the-art Instance Segmentation Models:} Around 2014, concurrent with semantic segmentation task, CNN based instance segmentation models have also started gaining better accuracy in various data sets such as PASCAL VOC, MS COCO, etc. In table \ref{C_IS}, we have shown the comparative performance of various state-of-the-art instance segmentation models on those datasets in chronological order. \section{Panoptic Segmentation} Panoptic segmentation (PS) \cite{kirillov2019panoptic, Daan2019, Liu2019, AKirillov2019, Xiong2019, Petrovai2019} is the combination of semantic segmentation and instance segmentation. This is a new research area these days. In this task, we need to associate all the pixels in the image with a semantic label for classification and also identify the instances of a particular class. The output of a panoptic segmentation model will contain two channels: one for pixel's label (semantic segmentation) and another for predicting each pixel instance (instance segmentation). In the following paragraphs we have given some examples of recently designed panoptic segmentation models. \subsection{Some popular state-of-the-art panoptic segmentation Models} Krillov et al. first proposed panoptic segmentation \cite{kirillov2019panoptic} by unifying semantic segmentation and instance segmentation to encompass both stuff and thing classes. The have used novel panoptic quality (PQ) metric to measure the performance of the segmentation. Their model produces simple but general output. The authors have used their model on Cityscapes, ADE20K \cite{Zhou2017}and Mapillary Vista \cite{Neuhold2017} datasets and got better accuracy on segmentation. \textbf{OANet: }Liu et al. proposed end-to-end Occlusion Aware Network(OANet) \cite{Liu2019} for panoptic segmentation. The authors have used Feature Pyramid Network to extract feature maps from the input image. Upon extracted feature they have applied two different branches: One for semantic segmentation and another for instance segmentation. Mask R-CNN is used for instance segmentation branch. Output of both branches are fed into novel Spatial Ranking Module for final output of panoptic segmentation. They have applied their model on COCO panoptic segmentation benchmark and got promising results. \begin{figure}[htbp] \centering \includegraphics[scale=0.50]{image/OANet} \caption{Architecture of Occlusion Aware Network(OANet). From \cite{Liu2019}} \label{OANet} \end{figure} \textbf{UPSNet:} Xiong et al. proposed a unified panoptic segmentation network (UPSNet) \cite{Xiong2019} to handle panoptic segmentation. The authors have used ResNet and FPN based Mask R-CNN as a backbone network to extract convolutional feature map. Those convolutional feature maps are fed into three sub-networks: for Semantic segmentation,for instance segmentation and for panoptic segmentation. Smantic segmentation sub-network consists of deformable convolutional network \cite{DaiJHYYGHY2017} for segmenting staff classes. Instance segmentation sub-network consists of three branch for bounding box regression, classification and sementation mask. All the outputs from these two subnetwork further goes to the panoptic segmentation sub-network for final panoptic segmentation. The authors have used teir model on Cityscapes and COCO datasets. \begin{figure}[htbp] \centering \includegraphics[scale=0.60]{image/UPSNet} \caption{Architecture of unified panoptic segmentation network (UPSNet). From \cite{Xiong2019}} \label{UPSNet} \end{figure} \textbf{Multitask Network for Panoptic Segmentation:}Andra Petrovai and Sergiu Nedevschi have proposed an end to end trainable multi-task network \cite{Petrovai2019} for panoptic Segentation with the capability of object occlusion and scene depth ordering. As \cite{Xiong2019}, the authors have used ResNet and FPN based back bone network for multi-scale feature extraction. the output of backbone network fed into 4 individual sub-networks for four tasks. First sub-network is for object detection and classification using Faster R-CNN, Second one is for instance segmentation using Mask R-CNN, third one is for semantic segmentation using pyramid pooling module as used in PSPNet \cite{Zhao2016} and fourth one is for panoptic segmentation. The authors have used their model on Cityscapes dataset and got 75.4\% mIoU and 57.3\% PQ. \begin{figure}[!htb] \centering \includegraphics[scale=0.40]{image/Multitask_network_PS} \caption{Architecture of Multitask Network for Panoptic Segmentation. From \cite{Petrovai2019}} \label{Mtnps} \end{figure} \section{Conclusion} Image segmentation is a challenging work as it needs spatially variant features to preserve the context of a pixel for semantic labeling. Semantic segmentation categorizes each pixel with a semantic label whereas instance segmentation segments individual instances of objects contained in an image. The success of recent state-of-the-art models depends mostly on different network architecture. Except for that, various other aspects such as choice of the optimization algorithm, the value of hyper-parameters, data-preprocessing technique, choice of the loss function, etc are also responsible for becoming a successful model. In our article, we have presented the evolution of Convolutional Neural Networks based image segmentation models. We have categorically explored some state-of-the-art segmentation models along with their optimization details, and a comparison among the performance of those models on different datasets. Lastly, we have given a glimpse of recent state-of-the-art panoptic segmentation models. The application area of image segmentation is vast. According to the requirement of the application task, a suitable model can be applied using some domain-specific fine-tuning using dataset.  Overall this article gives systematic ideas about present state-of-the-art image segmentation that will help researchers of this area for further proceedings. \section*{Acknowledgment} The authors of the article are thankful to the editor and anonymous reviewers for mentioning some comments and suggestions on initial submission. For such comments and suggestions, the article got this present shape.  \bibliographystyle{elsarticle-num} \footnotesize{
\section{Introduction} In recent years, both fundamental and applied research in deep learning has rapidly developed. In image processing and natural language processing, it has led to significantly better classification rates than previous state-of-the-art algorithms~\cite{SIG-039}. Therefore, there has been a growing interest in applying deep neural networks (DNNs) to various fields of applied research. Such an effort can also be seen in electroencephalographic (EEG) data processing and classification. A well-known application of EEG classification is a brain-computer interface (BCI)~\cite{McFarland:2011:BIC:1941487.1941506} which allows immobile persons to operate devices only by decoding their intent from EEG signal without any need for muscle involvement. A significant challenge in BCI systems is to recognize the intention of the user correctly since the brain components of interest often have a significantly lower amplitude than random EEG signal~\cite{McFarland:2011:BIC:1941487.1941506}. DNNs often do not require costly feature engineering, and thus could lead to more universal and reliable EEG classification. However, recent review of the field reached a conclusion that so far, these benefits have not been convincingly presented in the literature~\cite{Lotte_2018}. Many studies did not compare the studied DNN to state-of-the-art BCI methods or performed biased comparisons, with either suboptimal parameters for the state-of-the-art competitors or with unjustified choices of parameters for the DNN~\cite{Lotte_2018}. Similar conclusion has been reached in another review of DNN and EEG~\cite{DBLP:journals/corr/abs-1901-05498}. Many related papers suffer from poor reproducibility: a majority of papers would be hard or impossible to reproduce given the unavailability of their data and code~\cite{DBLP:journals/corr/abs-1901-05498}. Moreover, one of the drawbacks of DNNs is having to collect a large training dataset. Typical BCI datasets have very small numbers of training examples, since BCI users cannot be asked to perform thousands of mental operations before actually using the BCI. To overcome this problem, it has been proposed to obtain BCI applications with very large training data bases, e.g. for multi-subject classification. Multi-subject classification has one more advantage --- it solves the problem of DNN long training times. Instead, a universal BCI system can be trained only once and then just applied to a new dataset from a new user without any additional training.~\cite{Lotte_2018} Guess the number (GTN) is a simple P300 event-related potential (ERP) BCI experiment. Its aim is to ask the measured participant to pick a number between 1 and 9. Then, he or she is exposed to corresponding visual stimuli. The P300 waveform is expected following the selected (target) number. During the measurement, experimenters try to guess the selected number based on manual evaluation of average ERPs associated with each number. Finally, both the numbers thought and guesses of the experimenters are recorded as metadata. 250 school-age children participated in the experiments that were carried out in elementary and secondary schools in the Czech Republic. Only three EEG channels (Fz, Cz, Pz) were recorded to decrease preparation time. Nevertheless, to the author's best knowledge, this is the largest P300 BCI dataset available so far.~\cite{pmid28350376} The main aim of this paper is to evaluate one of the deep learning models, convolutional neural networks (CNN) for classification of P300 BCI data. Unlike most related studies, multi-subject classification was performed with the future goal of developing a universal BCI. Two state-of-the art BCI classifiers were used as baseline to minimize the risk of biased comparison. To avoid overtraining, cross-validation and final testing using a previously unused part of the dataset were performed. Another aim of this manuscript is to evaluate some CNN parameters in this application. \subsection{State-of-the-art} Although various BCI algorithms have been evaluated and published in recent decades, there is still no feature extraction or machine learning algorithm clearly established as state-of-the-art. However, several studies have focused on reviews and comparisons with partly consistent results. In~\cite{Krusienski_2006}, a comparison of several classifiers (Pearson's correlation method, Fisher's linear discriminant analysis (LDA), stepwise linear discriminant analysis (SWLDA), linear support-vector machine (SVM), and Gaussian kernel support vector machine (nSVM)) was performed on 8 healthy subjects. It was shown that SWLDA and LDA achieved the best overall performance. As originally proposed by Blankertz~\cite{Blankertz2011} and also confirmed in a recent review~\cite{Lotte_2018}, shrinkage LDA is another useful tool for BCI, particularly with small training datasets. In~\cite{Manyakov:2011:CCM:2043294.2064930}, the authors demonstrated that LDA and Bayesian linear discriminant analysis (BLDA) were able to beat other classification algorithms. Efforts to develop a universal multi-subject P300 BCI machine learning have been relatively rare in the literature. In~\cite{notraining_sameperformance_p300}, the authors developed a generic shrinkage LDA classifier using the training data of 18 subjects. The performance was evaluated with the data of 7 subjects. It was concluded that generic classifier achieved comparable results regarding the effectiveness and efficiency as personalized classifiers. \section{Methods} \subsection{Data acquisition} The data described in detail and accessible in~\cite{pmid28350376} were used in subsequent experiments. The measurements were taken between 8 am and 3 pm. Unfortunately, the environment was usually quite noisy since many children and also many electrical devices were present in the room at the same time. However, in any case there were no people standing or moving behind the monitor or in the close proximity of the measured participant. The participants were stimulated with numbers between 1 and 9 flashing on the monitor in random order. The numbers were white on the black background. The inter-stimulus interval was set to 1500 ms. The following hardware devices were used: the BrainVision standard V-Amp amplifier, standard small or medium 10/20 EEG cap, monitor for presenting the numbers, and two notebooks necessary to run stimulation and recording software applications. The reference electrode was placed at the root of the nose and the ground electrode was placed on the ear. To speed up the guessing task, only three electrodes, Fz, Cz and Pz, were active. The stimulation protocol was developed and run using the Presentation software tool produced by Neurobehavioral Systems, Inc. The BrainVision Recorder was used for recording raw EEG data. The participants were school-age children and teenagers (aged between 7 and 17; average age 12.9), 138 males and 112 females. All participants and their parents were informed about the programme of the day and the experiments carried out. All participants took part in the experiment voluntarily. The gender, age, and laterality of the participants were collected. No personal or sensitive data were recorded. \subsection{Preprocessing and feature extraction} \begin{figure}[h] \includegraphics[scale=0.85]{figures/epochavg.pdf} \caption{Comparison of target and non-target epoch grand averages. As expected, there is a large P300 component following the target stimuli. Note that the P300 average latency is somewhat delayed compared to what is commonly reported in the literature~\cite{luck05introduction}.} \label{fig:epochavg} \end{figure} The data were preprocessed as follows: \begin{enumerate} \item From each participant of the experiments, short parts of the signal (i.e. ERP trials, epochs) associated with two numbers displayed were extracted. One of them was the target (thought) number. Another one was randomly selected number out of the remaining stimuli between 1 and 9. Consequently, similar number of training examples for both classification classes (target, non-target) was extracted. The extracted epochs were stored into a file (available in~\cite{DVN/G9RRLN_2019}). \item For epoch extraction, intervals between 200 ms prestimulus and 1000 ms poststimulus were used. The prestimulus interval between -200 ms and 0 ms was used for baseline correction, i.e. computing average of this period and subtracting it from the data. Thus given the sampling frequency of 1 kHz, 11532 x 3 x 1200 (number of epochs x number of EEG channels x number of samples) data matrix was produced. \item To skip severely damaged epochs, especially caused by eye blinks or bad channels, amplitude threshold was set to 100 $ \mu V$ according to common guidelines (such as in~\cite{luck05introduction}). Any epoch $x[c, t]$ with $c$ being the channel index and $t$ time was rejected if: \begin{equation} \max_{c, t}|x[c, t]| > 100 \end{equation} With this procedure, 30.3~\% of epochs were rejected. In Fig.~\ref{fig:epochavg}, grand averages of accepted epochs (across all participants) are depicted. \end{enumerate} \paragraph{Feature extraction} Many deep learning methods such as CNN are designed to avoid significant feature engineering~(\cite{DBLP:journals/corr/abs-1206-5538} and \cite{journals/corr/ZeilerF13}). On the other hand, linear classifiers usually perform better when the dimensionality of the original data matrix is reduced, and only the most significant features are extracted~\cite{Blankertz2011}. In the parameter optimization phase, state-of-the-art classifiers were used either with original data dimension, or after feature selection proposed in~\cite{Blankertz2011} to compare the performance. The feature extraction method was based on averaging time intervals of interest and merging these averages across all relevant EEG channels to get reduced spatio-temporal feature vectors (Windowed means feature extraction, WM). In line with recommendations for P300 BCIs, a priori time window was initially set between 300 ms and 500 ms after stimuli~\cite{Tan:2010:BIA:1855009}. This time window was further divided into 20 equal-sized time intervals in which amplitude averages were computed. Therefore, with three EEG channels, the dimensionality of feature vectors was reduced to 60. Finally, these feature vectors were scaled to zero mean and unit variance. \subsection{Classification} \label{subsec:Classification} \begin{figure}[h] \includegraphics[scale=0.8]{figures/flowChart.pdf} \caption{Flowchart of preprocessing, feature extraction and data splitting applied.} \label{fig:flowchart} \end{figure} Fig. \ref{fig:flowchart} depicts procedures used to extract features and split the data for classification. \paragraph{Data splitting} Before classification, the data were randomly split into training (75~\%) and testing (25~\%) sets. Using the training set, 30 iterations of Monte-Carlo cross-validation (again 75:25 from the subset) were performed to optimize parameters. Results using the holdout testing set were computed in each cross-validation iteration and averaged at the end of the processing. No parameter decision was based on the holdout set. \paragraph{LDA} State-of-the-art~\cite{Blankertz2011} LDA with eigenvalue decomposition used as the solver, and automatic shrinkage using the Ledoit-Wolf lemma~\cite{Ledoit110} was applied. \paragraph{SVM} The implementation was based on libsvm~\cite{CC01a}. Both recommendations in the literature~\cite{Fan:2008:LLL:1390681.1442794} and validation subsets were used to find the optimal parameters. Finally, penalty parameter $C$ was set to 1, the kernel cache was 500 MB, and degree of the polynomial kernel function was set to 3. One-vs-rest decision function of shape with the RBF kernel type and shrinking heuristics were used. \paragraph{CNN} Convolutional neural networks were implemented in Keras \cite{chollet2015keras}. They were configured to maximize classification performance on the validation subsets. Its structure is depicted in Figure~\ref{fig:model}. Initially, after empirical parameter tuning based on cross-validation, the parameters were selected as follows: \begin{itemize} \item The first convolutional layers had six 3~x~3 filters. The filter size was set to cover all three EEG channels. Both the second filter dimension and number of filters were tuned experimentally. \item In both cases, dropout was set to 0.5. \item The output of the convolutional layer was further downsampled by a factor of 8 using the average pooling layer. \item ELU activation function~\cite{Clevert2016FastAA} was used for both convolutional and dense layers as recommended in related literature~\cite{DBLP:journals/corr/SchirrmeisterSF17}. Compared to sigmoid function, ELU mitigates the vanishing gradient problem using the identity for positive values. Moreover, in contrast to rectified linear units (ReLU), ELUs have negative values which allow them to push mean unit activations closer to zero while ensuring a noise-robust deactivation state~\cite{Clevert2016FastAA}. The parameter $\alpha > 0$ was set to~1. \begin{equation*} f(x) = \begin{cases} x & \text{if } x > 0 \\ \alpha (e^{x} - 1) & \text{if } x \leq 0 \end{cases} \end{equation*} \item Batch size was set to 16. \item Cross-entropy was used as the loss function. \item Adam~\cite{adam} optimizer was used for training because it is computationally efficient, has little memory requirements and is frequently used in the field~\cite{DBLP:journals/corr/abs-1901-05498}. \item The number of training epochs was set to 30. \item Early stopping with the patience parameter of 5 was used. \end{itemize} \begin{figure}[h] \includegraphics[scale=0.45]{figures/model.pdf} \caption{Architecture of the convolutional neural network. There was one convolutional layer, one dense layer, and finally a softmax layer for binary classification (target / non-target). Batch normalization and dropout followed both the convolutional and dense layers. } \label{fig:model} \end{figure} \section{Results} As mentioned above, cross-validation for hyperparameter estimation was followed by testing on a holdout set. Accuracy, precision, recall and AUC (Area under the ROC Curve) have been computed~\cite{hossin2015review}. In the validation phase, the aim was to reach the configuration yielding the highest accuracy while ensuring it is not at the expense of precision and recall. In Figure~\ref{fig:trainingloss}, an example of searching for an optimal configuration of CNN weights and biases based on the training and validation sets is shown. \begin{figure}[h] \includegraphics[scale=0.7]{figures/lossTraining.pdf} \caption{Decrease of classification loss based on the baseline CNN architecture is shown. Although training loss kept declining throughout all 30 epochs, validation loss reached the minimum after only five epochs. Because the patience parameter was set to five, in this case, the training was stopped after 10 epochs. As seen from the growing difference between training and validation loss, further training would lead to substantial overtraining.} \label{fig:trainingloss} \end{figure} \subsection{Effect of parameter modifications on validation performance} \label{sec:optimization} \paragraph{Feature extraction for LDA and SVM} Parameter optimization of the classifiers themselves has been discussed above. Additionally, different feature extraction settings were compared regarding the average classification results achieved during cross-validation. Results of the comparisons are depicted in Table~\ref{valfe}. Accuracy had an increasing trend when the time window got prolonged to 800 ms and 1000 ms. It can be speculated that the standard apriopri time window is not enough for capturing target to non-target differences when classifying children data that display a large variety in their P300 components. As expected, classification performance with WM features was slightly higher than for preprocessed epochs without feature extraction. Based on the results, both LDA and SVM configured as described above with the time window between 300 ms and 1000 ms were used in the testing phase. \begin{table} \caption{Average cross-validation classification results based on the feature extraction method with the LDA classifier configured as described in Subsection~\ref{subsec:Classification}. Averages from 30 repetitions and related sample standard deviations (in brackets) are reported. WM - Windowed means (time intervals relative to stimuli onsets in square brackets).}\label{valfe} \begin{tabular}{|l|l|l|l|l|} \hline Feature extraction & AUC & Accuracy & Precision & Recall\\ \hline WM [300 - 500 ms] & 59.56 \% (1.04) & 59.54 \% (1.04) & 59.48 \% (1.83) & 61.69 \% (2.08) \\ WM [300 - 800 ms] & 60.94 \% (1.04) & 60.93 \% (1.05) & 60.75 \% (1.9) & 63.38 \% (1.85) \\ \textbf{WM [300 - 1000 ms]} & 61.77 \% (0.9) & \textbf{\underline{61.76}} \% (0.91) & 61.45 \% (1.9) & 64.64 \% (1.48) \\ None & 61.09 \% (1.13) & 61.08 \% (1.13) & 61.68 \% (1.67) & 59.90 \% (1.35) \\ \hline \end{tabular} \end{table} \paragraph{CNN} The neural network architecture described above was used as the starting point. However, some parameter modifications were explored regarding their effect on the validation classification results. The results are shown in Table~\ref{valresults}. Performance mostly displayed only small and insignificant changes with these parameter modifications. Consistently with~\cite{DBLP:journals/corr/SchirrmeisterSF17}, batch normalization led to slightly better accuracy. Moreover, the absence of batch normalization made the results less predictable and more fluctuating as can be seen in standard deviation of recall. Another clear decrease in performance was observed without dropout regularization. Finally, average pooling was better than max pooling for the validation data. Consequently, the initial configuration described in Subsection~\ref{subsec:Classification} was used for testing. \begin{table} \caption{Average cross-validation classification results based on the CNN parameter settings. Averages from 30 repetitions and related sample standard deviations (in brackets) are reported. CNN configuration described in Subsection~\ref{subsec:Classification} was used as the baseline model.}\label{valresults} \begin{tabular}{|l|l|l|l|l|} \hline Changed parameter & AUC & Accuracy & Precision & Recall\\ \hline \textbf{None} & 66.12 \% (0.68) & \textbf{\underline{62.18}} \% (0.94) & 62.76 \% (1.95) & 61.34 \% (2.63) \\ RELUs instead of ELUs & 66.36 \% (0.62) & 61.85 \% (1.15) & 62.7 \% (2.19) & 60.1 \% (3.04) \\ Filter size (3, 30) & 65.84 \% (0.49) & 61.95 \% (1.18) & 62.7 \% (2.1) & 60.5 \% (3.91) \\ 12 conv. filters & 66.31 \% (0.51) & 61.83 \% (1.1) & 62.3 \% (2.21) & 61.6 \% (3.08) \\ No batch normalization & 65.99 \% (0.77) & 60.55 \% (1.52) & 61.02 \% (3.16) & 61.5 \% (7.21) \\ Dropout 0.2 & 67.67 \% (0.65) & 60.8 \% (1.49) & 61.33 \% (2.31) & 60.33 \% (4.0) \\ No dropout & 68.63 \% (1.11) & 59.49 \% (1.2) & 59.61 \% (1.93) & 60.7 \% (4.44) \\ Dense (150) & 66.07 \% (0.8) & 61.81 \% (0.95) & 62.33 \% (1.83) & 61.18 \% (2.49) \\ Two dense l. (120-60) & 65.72 \% (0.77) & 62.11 \% (0.9) & 63.14 \% (2.03) & 59.5 \% (2.55) \\ Max- instead of AvgPool & 64.23 \% (1.15) & 58.94 \% (1.94) & 60.22 \% (4.18) & 59.24 \% (13.76) \\ \hline \end{tabular} \end{table} \begin{figure}[h] \includegraphics[scale=0.7]{figures/plottest.pdf} \caption{Testing results for single trial classification (error bars show standard deviations).} \label{fig:results} \end{figure} \subsection{Testing results} Based on the results in Subsection~\ref{sec:optimization}, both feature extraction method for LDA and SVM, and CNN configuration achieving the best average accuracy during cross-validation were selected for the testing phase. Figure~\ref{fig:results} shows the achieved results. All tested models achieved comparable classification results. LDA had the highest classification recall (around 67 \%). Single trial classification accuracy stayed within the range between 62~\% and 64~\%. Averaging of epochs associated with the same markers is a standard ERP technique for increasing signal-to-noise ratio~\cite{luck05introduction}. When averaging, repeated ERPs including the P300 are amplified while continuous random EEG noise is suppressed. Because even in P300 BCIs, repeated stimulation is usually used to achieve good performance~\cite{pmid21067970}, it is worth exploring how once trained classifiers can generalize to averaged epochs. Therefore, consecutive groups of one to six neighboring epochs from the testing set were used instead of single trials. Fig.~\ref{fig:resultsavg} depicts the results achieved. With averaging, classification accuracy increased from original 61 - 64~\% up to 76 - 79~\%. There were no significant differences among classifiers, although CNN displayed slightly higher standard deviations. \begin{figure}[h] \includegraphics[scale=0.75]{figures/plotaveraging.pdf} \caption{Testing results when averaging neighboring epochs (error bars show standard deviations).} \label{fig:resultsavg} \end{figure} \section{Discussion} Single trial classification accuracy was between 62~\% and 64~\% for all tested classification models without significant differences. Similar results have been commonly reported in the literature. For example, in~\cite{6599576}, 65~\% single trial accuracy was achieved (using one to three EEG channels and personalized training data). In~\cite{DBLP:journals/corr/abs-1712-01977}, 40~\% to 66~\% classification accuracy was reported, highly dependent on the tested subject. Comparably, this manuscript achieved similar performance for a large multi-subject dataset of school-age children. On single trial level, CNN achieved comparable performance to both LDA and SVM. Similar performance was also achieved when applying averaged testing epochs. However, CNN seemed slightly less stable and more dependent on training/validation split as can be seen in standard deviations. Consistently with related deep learning literature~\cite{DBLP:journals/corr/SchirrmeisterSF17}, a combination of ELUs, dropout and batched normalization were beneficial for classification performance. Unlike many image classification applications, average pooling was better than max pooling, perhaps because it is not associated with data loss. Even less prominent features may contribute to classifier discriminative abilities. To further verify how the CNN was able to classify between targets and non-targets, the network was exposed to all target, or all non-target patterns. Average hidden layer outputs (the 4th average pooling layer used as an example) across these conditions were calculated and shown in Fig.~\ref{fig:hiddenoutputs}. There is a clear difference between some CNN outputs although the most remain stable across both conditions. \begin{figure}[!h] \centering \includegraphics[scale=0.4]{figures/hidden_tn.pdf} \caption{Average outputs of the 4th (pooling) layer are depicted after the CNN was exposed to all target / non-target patterns. X-axis corresponds to indices of convolutional filters (six in total). Y-axis is the output of convolution originally corresponding to time information, after average pooling further downsampled by a factor of 6. There is a clear difference in outputs, mainly in the bottom part of the maps. However, many outputs seem independent of classification labels, poorly contributing to CNN discrimination abilities.} \label{fig:hiddenoutputs} \end{figure} In our previous work~\cite{icaisc2017}, we applied stacked autoencoders (SAE) to the same GTN dataset. In contrast with the current work, manual feature extraction using discrete wavelet transform was performed. Instead of single trial classification, success rate of detecting the number thought based on multiple single trial classification results was computed. Maximum success rate on the testing dataset was 79.4~\% for SAE, 75.6~\% for LDA and 73.7~\% for SVM. It seems that while SAE combined with traditional feature engineering and involving multiple trials per marker can outperform linear classifiers, the same benefits cannot be repeated when applying CNN to single trial classification of raw EEG data. Computational efficiency is another important factor to consider when applying the methods in online BCI systems. Experimental comparison was performed with Intel Core i7-7700K, four cores, 4.2 GHz, 64 GB RAM and NVIDIA GeForce GTX 1050 Ti GPU. CNN took 46 seconds to train on CPU and 26 s to train on GPU. Both LDA and SVM were much faster to train, with 300 ms and 1600 ms, respectively. However, training times were not critical in the presented experiment since any universal classifier needs to be trained just once and not with every new BCI user. Testing times were calculated relative to one processed feature vector and were low enough for all classifiers (CNN took 0.3 ms to classify one pattern on CPU and 0.1 ms on GPU, LDA took 0.1 ms and SVM 0.2 ms). It can be concluded that all tested algorithms can be used in online BCIs. Neural networks are slower to train and this could be a problem for personalised BCIs, retrained with each new user. There are several limitations of the reported experiments. As a noise suppression procedure, severely damaged epochs (with amplitude exceeding $\pm 100 \mu V$ when compared to baseline) were rejected before further processing. While epoch rejection is beneficial for classification accuracy, on the other hand, it would also lead to lower bit-rates when used in on-line P300 BCI systems because of data loss. Artifact correction methods based on Independent Component Analysis were not feasible because of the low number of EEG channels (three). Moreover, the low number of EEG channels could have a detrimental effect on classification performance because of limited spatial information provided on the input. Another possible limitation was that there might be an architecture of CNN that would lead to better classification performance and had not been discovered by the author. However, several manipulations of CNN parameters were tested using cross-validation, including adding a new dense layer, with only very modest changes in validation classification accuracy. Recent review of EEG and DNNs~\cite{DBLP:journals/corr/abs-1901-05498} studies reported the median gain in accuracy of DNNs over traditional baselines to be 5.4~\%. It also revealed significant challenges in the field. Low number of training examples is a common complaint especially for event-related data that contain the relevant information in time domain. In this case, only a small fraction of continuous EEG measurement near the onset of trials can be used and strategies such as overlapping time windows to obtain more examples in frequency domain are not feasible. In the current study, 11,532 epochs were used which is below mean number of examples (251,532) and medium number of examples (14,000) in the reviewed papers~\cite{DBLP:journals/corr/abs-1901-05498}. Strategies such as data augmentation can be considered to increase the number of training examples to be sufficient for DNNs. Moreover, half of the studies~\cite{DBLP:journals/corr/abs-1901-05498} used between 8 and 62 EEG channels. Adding more channels to Fz, Cz and Pz could increase spatial resolution and accuracy but would also increase preparation time and the participant's discomfort. In future work, more on the effect of number of EEG channels on the P300 classification accuracy can be investigated. Furthermore, soft or hard thresholding based on discrete wavelet transform can be considered for noise cancellation~\cite{pmid23142653}. Another line of research would be to propose different deep learning models for the same classification task, with extensive parameter grid search, or genetic algorithms. Based on the recent review of the field~\cite{DBLP:journals/corr/abs-1905-04149}, frequently cited and promising networks include Recurrent Neural Networks, especially Long short-term memory (LSTM). Moreover, a CNN layer to capture spatial patterns can be followed by a LSTM layer for temporal feature extraction~\cite{DBLP:journals/corr/abs-1905-04149}. \section{Conclusion} The aims of the presented experiments were to compare CNN with baseline classifiers (LDA, SVM) using a large multi-subject P300 dataset. CNN was applied to raw ERP epochs (with the dimensionality of 3~x~1200). Baseline classifiers were applied to windowed means features (with the dimensionality of 60). Empirical parameter optimization was performed using cross-validation and classifiers were tested on a holdout set. Various CNN parameters are discussed. Single trial classification accuracy was between 62~\% and 64~\% for all tested models with CNN able to match but not outperform its competitors. When the trained models were applied to averaged trials in the testing phase, accuracy increased up to 76 - 79~\%. Achieved accuracy is comparable with state-of-the-art despite using a multi-subject dataset from 250 children. Potential explanation of the results are discussed. Based on the results, LDA and SVM with state-of-the-art feature extraction still seem to be a good choice for P300 classification, especially with relatively small training datasets. CNN might need more spatial information in the data (by means of more channels) to better understand the patterns. Alternatively, the dataset was not large enough for CNN to prove its benefits and e.g. data augmentation techniques could help to overcome this obstacle. Both the preprocessed data~\cite{DVN/G9RRLN_2019} and Python codes~\cite{VarekaBitbucket} are available to ensure reproducibility of the experiments. \section*{Acknowledgement} This publication was supported by the project LO1506 of the Czech Ministry of Education, Youth and Sports under the program NPU I. \clearpage \bibliographystyle{splncs04}
\section{Introduction} We denote by $\mathbb{Z}$, $\mathbb{Z}_+$, ${\mathbb Z}_-$, $\mathbb{N}$ and $\mathbb{C}$ the sets of all integers, nonnegative integers, nonpositive integers, positive integers and complex numbers, respectively. For any $n\in {\mathbb N}$, let $A_n^+$ and $A_n$ be the polynomial algebra ${\mathbb C}\xspace[t_1,\dots,t_n]$ and the Laurent polynomial algebra ${\mathbb C}\xspace[t_1^{\pm 1},\dots,t_n^{\pm 1}]$ respectively. The Witt algebras $W_n^+$ and $W_n$ are the Lie algebras of derivations of $A_n^+$ and $A_n$ respectively. $W_n^+$ (resp. $W_n$) is also the Lie algebra of vector fields on ${\mathbb C}\xspace^n$ (resp. the torus ${\mathbb{T}}^n$). Representation theory of Witt algebra $W_{n}$ has been well-developed. Simple weight modules with finite-dimensional weight spaces (also called Harish-Chandra modules) for the Virasoro algebra (which is the universal central extension of $W_{1}$) were conjectured by V. Kac in \cite{K2} and classified by O. Mathieu in \cite{Ma}. Such modules for $W_n$ were conjectured by E. Rao in \cite{E2} and classified by Y. Billig and V. Futorny in \cite{BF1}. The $A_{n}$-cover method developed in \cite{BF1} turns out to be extremely useful. And the representation theory for solenoidal Lie algebras (also called the centerless higher rank Virasoro algebras ) developed in \cite{Su1,LZ2,BF2} serves as a bridge between $W_1$ and $W_n$ in \cite{BF1}. Very recently, simple weight modules with finite-dimensional weight spaces for Witt superalgebra are classified in \cite{XL, Liu1}. For more related results, we refer the readers to \cite{BF2, E1, E2, Sh} and the references therein. The first classification result on representations of $W_n^+$ was obtained by A. Rudakov in 1974-1975, see \cite{R1}, \cite{R2}. A. Rudakov’s main result, roughly speaking, classified all irreducible representations which satisfy a natural continuity condition. Simple weight modules with finite-dimensional weight spaces for $W_1^+$ were classified also by O. Mathieu in \cite{Ma}. The classification of such modules for $W_n^+$ ($n\ge 2$) has been a long-standing open problem after that and turns out to be very hard. In 1999, a complete description of the supports of all simple weight modules of $W_n^+$ was given by I. Penkov and V. Serganova in \cite{PS}. As we know, the classification of bounded weight modules is one of the most important step in the classification of simple weight modules with finite weight spaces over various Lie (super)algebras, such as simple finite-dimensional Lie algebras and $W_n$. In 2016, A. Cavaness and D. Grantcharov classified all simple bounded weight modules of $W_2^+$ in \cite{CG}. In \cite{LLZ}, the tensor module (also called Shen-Larsson module) $F(P,M)=P\otimes M$ for a simple weight module $P$ over the Weyl algebra $K_n^+={\mathbb C}\xspace[t_1,\ldots,t_n,\frac{\partial}{\partial t_1},\ldots, \frac{\partial}{\partial t_n}]$ and a simple weight $\mathfrak{gl}_n({\mathbb C}\xspace)$ module $M$ were defined and studied. These kind of weight modules provided a lot of simple weight $W_n^+$ modules with various support sets. In this paper, we classify all simple bounded weight $W_n^+$ modules. Any such module is isomorphic to the simple quotient of a tensor module $F(P,M)=P\otimes M$ for a simple weight module $P$ over the Weyl algebra $K_n^+={\mathbb C}\xspace[t_1,\ldots,t_n,\frac{\partial}{\partial t_1},\ldots, \frac{\partial}{\partial t_n}]$ and a finite dimensional simple $\mathfrak{gl}_n({\mathbb C}\xspace)$ module $M$. Our method is different from that of \cite{CG} for $n=2$. The method and result in this paper will be used to study the representations of various Lie algebras, see \cite{HL,LX}. Let ${\mathbb C}\xspace^{n\times 1}$ be the natural $n$-dimensional representation of $\mathfrak{gl}_n$ and let $V(\delta_k,k)$ be its $k$-th exterior power, $k = 0,\ldots,n$. For any simple weight $K_n^+$ module $P$ and $k=1,2,\ldots n$, the tensor module $F(P,V(\delta_k,k))$ has a simple submodule $L_n(P,k)={\rm span}\{\sum_{i=1}^n(\partial_i v)\otimes(e_i^T\wedge u)|v\in P,u\in V(\delta_{k-1},k-1)\},$ where $e_1,\ldots,e_n$ is the standard basis of ${\mathbb C}\xspace^n$. The main result in this paper is as follows. \begin{theorem}\label{main2} Any simple bounded weight $W_n^+$ module $V$ is isomorphic to one of the following simple bounded $W_n^+$ weight modules: \begin{itemize} \item[(a)] the one-dimensional trivial module; \item[(b)] the tensor module $F(P,M)$, where $P$ is a simple weight $K_n^+$ module and $M$ is a simple finite dimensional $\mathfrak{gl}_n$ module that is not isomorphic to $V(\delta_l,l),l=0,1,\dots,n$; \item[(c)] $L_n(P,l)$, where $l\in \{1,2,\dots,n\}$ and $P$ is a simple weight $K_n^+$ module. \end{itemize} \end{theorem} Note that the simple weight $K_n^+$ modules and simple finite dimensional $\mathfrak{gl}_n$ modules are known. This theorem gives an explicit description of all simple bounded weight $W_n^+$ modules. The paper is arranged as follows. In Section 2, we collect some basic notations and results for later use. In Section 3, we show that all simple weight $AW_n^+$ modules with a finite dimensional weight space are the tensor modules, see Theorem \ref{classi-1}. Then we have the classification of all bounded weight $AW_n^+$ modules, see Theorem \ref{cusAW}. In section 4, we give the proof of Theorem \ref{main2}. This is achieved by developing the $A_n^+$-cover theory for $W_n^+$ modules and using the results in Section 3. \section{Denotations and Preliminaries} In this section, we collect some basic notations and results for later use. Let $\partial_{i}=\frac{\partial}{\partial{t_i}}$ and $d_i=t_i\frac{\partial}{\partial{t_i}}$ for any $i=1, 2, \cdots, n$. Recall that the Witt algebra $ W_n=\sum_{i=1}^n{ A}_n\partial_{i}$ has the following Lie bracket: $$[\sum\limits_{i=1}^{n}f_{i}\partial_{i},\sum\limits_{j=1}^{n}g_j\partial_{j}]= \sum\limits_{i,j=1}^{n}(f_{j}\partial_{j} (g_{i})-g_{j}\partial_{j}(f_{i}))\partial_{i},$$ where all $f_{i}, g_j\in A_n$, and the classical Witt algebra $ W_n^+=\sum_{i=1}^n{ A}_n^+\partial_{i}$ is a Lie subalgebra of $W_n$. The Weyl algebras $K_n^+$ and $K_n$ are the unital associative algebras ${\mathbb C}\xspace[t_1,\cdots,t_n,\partial_{1},\cdots,\partial_{n}]$ and ${\mathbb C}\xspace[t_1^{\pm 1},\dots,t_n^{\pm 1},\partial_1,\dots,\partial_n]$, respectively. For any $\alpha\in{\mathbb Z}^n$, write $\alpha=(\alpha_1,\alpha_2,\ldots \alpha_n), t^\alpha=t_1^{\alpha_1}\dots t_n^{\alpha_n}$ and $\partial^\alpha=\partial_1^{\alpha_1}\dots\partial_n^{\alpha_n}$ for convenience. It is well-known that both $W_n$ and $W_n^+$ are simple Lie algebras and $D=\oplus_{i=1}^n{\mathbb C}\xspace d_i$ is a Cartan subalgebra of $W_n$ and $W_n^+$ (a maximal abelian subalgebra that is diagonalizable on $W_n$ with respect to the adjoint action). Let $\tilde{W}_n^+=W_n^+\ltimes A_n^+$ be the Lie algebra with $$[t^\alpha\partial_i,t^\beta]=t^\alpha\partial_i(t^\beta),\ \forall \alpha,\beta\in{\mathbb Z}_+^n,\ i\in\{1,\dots,n\}.$$ A $\tilde{W}_n^+$ module $V$ is called an $AW_n^+$ module if $A_n^+$ acts on $V$ associatively, i.e., $$t^\alpha (t^\beta v)=t^{\alpha+\beta} v,\ t^0 v=v,\ \forall \alpha,\beta\in{\mathbb Z}_+^n,v\in V.$$ Let $\mathfrak{g}$ be any Lie subalgebra of $\tilde{W}_n$ that contains $D$ or the associative algebras $K_n^+, K_n$. A $\mathfrak{g}$ module $V$ is called a weight module if the action of $D$ on $V$ is diagonalizable, i.e., $V=\oplus_{\alpha\in {\mathbb C}\xspace^n }V_\alpha$, where $V_\alpha=\{v\in V\ |\ d_i v=\alpha_iv,\forall i=1,2,\ldots,n\}$ is called the weight space with weight $\alpha$. Denote by ${\rm supp}(V)=\{\alpha\in {\mathbb C}\xspace^n\ |\ V_\alpha\neq 0\}$ the support set of $V$. A weight $\mathfrak{g}$ module is called bounded if the dimensions of its weight spaces are uniformly bounded by a constant positive integer. Let $K_{(i)}^+={\mathbb C}\xspace[t_i,\partial_i]$ be the subalgebra of $K_n^+$. Then each $K_{(i)}^+$ is isomorphic to $K_1^+$ and $$K_n^+\cong K_{(1)}^+\otimes\dots\otimes K_{(n)}^+.$$ \begin{lemma} \cite{FGM}\label{lem2.1} {\rm 1.} Any simple weight ${\mathbb C}\xspace[t_i,\partial_i]$ modules is isomorphic to one of the following simple weight ${\mathbb C}\xspace[t_i,\partial_i]$ modules: $$t_i^{\lambda_i}{\mathbb C}\xspace[t_i,t_i^{-1}], {\mathbb C}\xspace[t_i], {\mathbb C}\xspace[t_i,t_i^{-1}]/{\mathbb C}\xspace[t_i],$$ where $\lambda_i\in {\mathbb C}\xspace\setminus {\mathbb Z}$. {\rm 2.} Let $P$ be any simple weight $K_n^+$ module, then $P\cong V_1\otimes \cdots \otimes V_n$, where $V_i$ is a simple ${\mathbb C}\xspace[t_i,\partial_i]$ module. Therefore, the support set of any simple weight $K_n^+$ module is of the form $X=X_1\times\dots\times X_n$, where $X_i\in\{\lambda_i+{\mathbb Z},{\mathbb Z}_+,-{\mathbb N}\}$, $\lambda_i\in {\mathbb C}\xspace\setminus {\mathbb Z}$. \end{lemma} We denote by $E_{i,j}$ the $n\times n$ matrix with $1$ as its $(i,j)$-entry and 0 as other entries. We have the general linear Lie algebra $$\mathfrak{gl}_n=\sum_{1\leq i, j\leq n}{\mathbb C}\xspace E_{i,j}.$$ Let $\mathfrak{H}={{\rm span}}\{E_{ii}\,|\,1\le i\le n\}$ and $\mathfrak h={{\rm span}}\{h_{i}\,|\,1\le i\le n-1\}$ where $h_i=E_{ii}-E_{i+1,i+1}$. A $\mathfrak{gl}_n$ module $V$ is called a weight module if the action of $\mathfrak{H}$ on $V$ is diagonalizable, i.e., $V=\oplus_{\alpha\in {\mathbb C}\xspace^n}V_\alpha$, where $V_\alpha=\{v\in V\ |\ E_{ii} v=\alpha_iv,i=1,2,\ldots,n\}$ is called the weight space of $V$ with the weight $\alpha$. Denote by ${\rm supp}(V)=\{\alpha\in {\mathbb C}\xspace^n \ |\ V_\alpha\neq 0\}$ the support set of $V$. A $\sl_n$ module $V$ is called a weight module if the action of $\mathfrak h$ on $V$ is diagonalizable, i.e., $V=\oplus_{\lambda \in \mathfrak h^*}V_\lambda$, where $V_\lambda=\{v\in V\ |\ h v=\lambda (h) v,\forall h\in \mathfrak h\}$ is called the weight space of $V$ with the weight $\lambda$. Denote by ${\rm supp}(V)=\{\lambda\in \mathfrak h^* \ |\ V_\lambda\neq 0\}$ the support of $V$. Let $\Lambda^+=\{\lambda\in\mathfrak h^*\,|\,\lambda(h_i)\in{\mathbb Z}_+ \text{ for } i=1,2,...,n-1\}$ be the set of dominant weights with respect to $\mathfrak h$. For any $\psi\in \Lambda^+$, let $V(\psi)$ be the simple $\sl_n$ module with highest weight $\psi$. We make $V(\psi)$ into a $\mathfrak{gl}_n$ module by defining the action of the identity matrix $I$ as some scalar $b\in\mathbb{C}$. We denote the resulting $\mathfrak{gl}_n$ module as $V(\psi,b)$. Define the fundamental weights $\delta_i\in\mathfrak h^*$ by $\delta_i(h_j)=\delta_{i,j}$ for all $i,j=1,2,..., n-1$. For convinience, we define $\delta_0=\delta_n=0\in \mathfrak h^*$. It is well-known that the $\mathfrak{gl}_n$ module $V(\delta_k, k), k=0,1,\ldots,n$ can be realized as the exterior product $\bigwedge^k(\mathbb{C}^{n\times 1})$ with the action given by $$X(v_1\wedge\cdots\wedge v_k)=\sum\limits_{i=1}^k v_1\wedge\cdots v_{i-1}\wedge Xv_i\cdots\wedge v_k, \,\,\forall \,\, X\in \mathfrak{gl}_n.$$ We set $\bigwedge^0(\mathbb{C}^{n\times 1})={\mathbb C}\xspace$ and $v\wedge a=av$ for any $v\in{\mathbb C}\xspace^{n\times 1}, a\in{\mathbb C}\xspace$. Let $P$ be a module over the associative algebra $K_n^+$ and $M$ be a $\mathfrak{gl}_n$ module. Then from \cite{LLZ}, we have the $AW_n^+$ module $F(P, M)=P\otimes_{{\mathbb C}\xspace} M$ with the actions \begin{equation}\begin{split}\label{Action1} &t^{\alpha}\partial_{j}\cdot (g\otimes v)=(t^{\alpha}\partial_{j} g)\otimes v+ \sum_{i=1}^n(\partial_{i}(t^{\alpha})g)\otimes (E_{ij}v)\\ &t^\alpha\cdot(g\otimes v)=(t^\alpha g)\otimes v \end{split}\end{equation} for all $\alpha\in {\mathbb Z}_+^n, g\in P$ and $v\in M.$ If $M$ is a weight $\mathfrak{gl}_n$ module and $P$ is a weight $K_n^+$ module, we have \begin{eqnarray}\label{weispa} &F(P,M)_\nu=\bigoplus_{\alpha\in{\mathbb C}\xspace^n}P_{\nu-\alpha}\otimes M_\alpha,\forall\nu\in{\mathbb C}\xspace^n,\\ &{\rm supp}(F(P,M))={\rm supp}(P)+{\rm supp(M)}. \end{eqnarray} Let $P$ be a $K_n^+$ module. For any $l\in\{1,\dots,n\}$, define a $W_n^+$-submodule of $F(P,V(\delta_l,l))$ by \begin{equation}\label{eq-quotient}L_n(P,l)={\rm span}\{\sum_{i=1}^n(\partial_i\cdot v)\otimes(e_i\wedge u)|v\in P,u\in V(\delta_{l-1},l-1)\}.\end{equation} \begin{lemma}\cite{LLZ}\label{quotient}Let $P$ be a simple weight $K_n^+$ module and $M$ be a simple weight $\mathfrak{gl}_n$ module. Then \begin{itemize} \item[(a)] $F(P,M)$ is simple as $W_n^+$ module if $M\ncong V(\delta_l,l)$ for any $l\in\{0,1,\dots,n\}$; \item[(b)] Any $W_n^+$ simple sub-quotient of $F(P,V(\delta_0,0))$(resp. $F(P,V(\delta_n,n))$) is either trivial or isormophic to $L(P,1)$ (resp. $L(P,n)$). \item[(c)] if $l=1,\dots,n-1$, then any simple $W_n^+$ sub-quotient of $F(P,V(\delta_l,l))$ is isomorphic to $L_n(P,l)$, $L_n(P,l+1)$ or the one-dimensional trivial module. \end{itemize} \end{lemma} \section{$AW_n^+$ modules} In this section, we will classify the simple bounded weight $AW_n^+$ modules. For any Lie algebra $\mathfrak{g}$, let $U(\mathfrak{g})$ be the universal enveloping algebra of $\mathfrak{g}$. By the PBW Theorem, $U(\tilde{W}_n^+)=U(A_n^+)\cdot U(W_n^+)$. Let $\mathcal{I}$ be the left ideal of $U(\tilde{W}_n^+)$ generated by $t^0-1$ and $t^\alpha\cdot t^\beta-t^{\alpha+\beta},\alpha,\beta\in{\mathbb Z}_+^n$. It is easy to see that $\mathcal{I}$ is in fact an ideal of $U(\tilde{W}_n^+)$. Hence we have the quotient associative algebra $\bar{U}=U(\tilde{W}_n^+)/{\mathcal{I}}$. From PBW Theorem, we may identify $A_n$ and $W_n^+$ with their images in $\bar{U}$ respectively. Then $\bar{U}=A_n^+\cdot U(W_n^+)$. Clearly, $A_n^+\cdot W_n^+$ is a Lie subalgebra of $\bar{U}$ with a standard basis $\{t^{\alpha}\cdot t^{\beta}\partial_j|\alpha,\beta\in {\mathbb Z}_+^n, j=1,2,\ldots n\}$. In fact, we have $$[a\cdot x,b\cdot y]=(a\cdot x(b))\cdot y-(b\cdot y(a))\cdot x+ab\cdot[x,y],\forall a,b\in A_n^+,x,y\in W_n^+.$$ For any $\alpha,\beta\in{\mathbb Z}^n$, write $\alpha\leqslant\beta$ if $\alpha_i\leqslant\beta_i$ for all $i\in\{1,\dots,n\}$. For any $\alpha\in{\mathbb Z}_+^n,i\in\{1,\dots,n\}$, let \begin{equation}\label{X} X_{\alpha,i}=\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose\beta}t^\beta\cdot t^{\alpha-\beta}\partial_i\in A_n^+\cdot W_n^+\subset \bar{U},\end{equation} where $|\beta|=\beta_1+\dots+\beta_n,{\alpha\choose \beta}={\alpha_1\choose\beta_1}\dots{\alpha_n\choose\beta_n}$ and ${0\choose 0}:=1$. For any $\alpha\in{\mathbb Z}_+^n,i\in\{1,\dots,n\}$, we have \begin{equation}\label{basis-change}\begin{split} &\sum_{0\leqslant\beta\leqslant\alpha}{\alpha\choose \beta} t^\beta\cdot X_{\alpha-\beta,i}\\ &=\sum_{0\leqslant\beta\leqslant\alpha}{\alpha\choose \beta} t^\beta\cdot\sum_{0\leqslant\beta'\leqslant\alpha-\beta}{\alpha-\beta\choose{\beta'}}(-1)^{|\beta'|}t^{\beta'}\cdot t^{\alpha-\beta-\beta'}\partial_i\\ &=\sum_{0\leqslant\beta\leqslant\alpha}\sum_{0\leqslant\beta'\leqslant\alpha-\beta} {\alpha\choose {\beta+\beta'}} {{\beta+\beta'}\choose \beta }(-1)^{|\beta'|}t^{\beta+\beta'}\cdot t^{\alpha-\beta-\beta'}\partial_i\\ &=\sum_{0\leqslant\gamma\leqslant\alpha}\sum_{0\leqslant\beta\leqslant\gamma}{\gamma\choose \beta}{\alpha\choose \gamma}(-1)^{|\gamma-\beta|}t^\gamma\cdot t^{\alpha-\gamma}\partial_i\\ &=t^\alpha\partial_i+\sum_{0<\gamma\leqslant\alpha}(1-1)^{|\gamma|}{\alpha\choose\gamma} t^\gamma\cdot t^{\alpha-\gamma}\partial_i\\ &=t^\alpha\partial_i.\end{split} \end{equation} Let $$T:={\rm span}\{X_{\alpha,i}|\alpha\in{\mathbb Z}_+^n\setminus\{0\},i=1,\dots,n\}$$ and $$\Delta:={\rm span}\{\partial_1,\dots,\partial_n\}={\rm span}\{X_{0,i}|i=1,\dots,n\}.$$ \begin{lemma}\label{lem3.1}{\rm (1).} $\{X_{\alpha,i}|\alpha\in{\mathbb Z}_+^n,i\in\{1,\dots,n\}$ forms an $A_n^+$ basis of $A_n^+\cdot W_n^+$. {\rm (2).} $T=\{x\in A_n^+\cdot W_n^+|[x,\Delta]=[x,A_n^+]=0\}$. Hence $T$ is a Lie subalgebra of $\bar{U}$. \end{lemma} \begin{proof} Since $\{t^\alpha\cdot t^\beta\partial_i|\alpha,\beta\in{\mathbb Z}_+^n,i=1,\dots,n\}$ is a basis of $A_n^+\cdot W_n^+$, it is easy to see that $\{X_{\alpha,i}|\alpha\in{\mathbb Z}_+^n,i=1,\dots,n\}$ is $A_n^+$ linearly independent. And from (\ref{basis-change}), we have (1). Let $T_1=\{x\in A_n^+\cdot W_n^+|[x,\Delta]=[x,A_n^+]=0\}$. We compute $$[X_{\alpha,i},t^\gamma]=\gamma_i \sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta }t^{\alpha+\gamma-e_i}=0,\forall\alpha\in{\mathbb Z}_+^n\setminus\{0\},i\in\{1,\dots,n\},\gamma\in{\mathbb Z}_+^n.$$ For any $i,j\in\{1,\dots,n\},\alpha\in{\mathbb Z}_+^n\setminus\{0\}$, from \begin{eqnarray*} & &\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta}(\alpha-\beta)_jt^\beta\cdot t^{\alpha-\beta-e_j}\partial_i\\ &=&\sum_{e_j\leqslant\beta\leqslant\alpha+e_j}(-1)^{|\beta|-1}{\alpha\choose{\beta-e_j}}((\alpha-\beta)_j+1)t^{\beta-e_j}\cdot t^{\alpha-\beta}\partial_i\\ &=&\sum_{e_j\leqslant\beta\leqslant\alpha}(-1)^{|\beta|-1}{\alpha\choose \beta}\beta_jt^{\beta-e_j}\cdot t^{\alpha-\beta}\partial_i\\ &=&-\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta}\beta_jt^{\beta-e_j}\cdot t^{\alpha-\beta}\partial_i, \end{eqnarray*} we have $[\partial_j,X_{\alpha,i}]=[\partial_j,\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta}t^\beta\cdot t^{\alpha-\beta}\partial_i]=\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta}\beta_jt^{\beta-e_j}\cdot t^{\alpha-\beta}\partial_i+\sum_{0\leqslant\beta\leqslant\alpha}(-1)^{|\beta|}{\alpha\choose \beta}(\alpha_j-\beta_j)t^\beta\cdot t^{\alpha-\beta-e_j}\partial_i=0 $. Hence $T\subset T_1$. On the other hand, for any $x\in T_1$, from (1) we may write $x=x_1+x_2\in T_1$, where $x_1\in A_n^+\cdot T$ and $x_2\in A_n^+\cdot\Delta$. The fact that $[x,a]=[x_2,a]=0$ for all $a\in A_n^+$ implies that $x_2=0$. Then $[\partial_i,x]=[\partial_i,x_1]=0$ implies that $x_1\in T$. So we have $T_1\subset T$. Therefore, we have (2). \end{proof} \begin{lemma}\label{lem3.2} There is an associative algebra isomorphism $\pi_1: K_n^+\otimes U(T)\rightarrow \bar{U}$ with \begin{equation}\pi_1(t^{\alpha} \partial^{\beta}\otimes 1)=t^{\alpha} \cdot \partial^{\beta}, \pi_1(1\otimes y)=y,\forall \alpha,\beta\in {\mathbb Z}_+^n, y\in T. \end{equation} \end{lemma} \begin{proof} Note that $T$ is a Lie subalgebra of $\bar{U}$ and $K_{n}^+$ is isomorphic to the associative subalgebra of $\bar{U}$ generated by $t_1,\ldots,t_n, \partial_1,\ldots,\partial_n$. So the restrictions of $\pi_1$ on $K_n^+$ and $U(T)$ are well-defined. From Lemma \ref{lem3.1}, $\pi_1(K_n^+)$ and $\pi_1(U({T}))$ are commutative in $\bar{U}$. Hence $\pi_1$ is a well-defined homomorphism of associative algebras. Let $\mathfrak{g}=A_n^+\otimes T+(A_n^+\cdot\Delta+A_n^+)\otimes{\mathbb C}\xspace$. Then it's easy to see that $\iota:=\pi_1|_{\mathfrak{g}}:\mathfrak{g}\rightarrow A_n^+\cdot W_n^++A_n^+$ is a Lie algebra isomorphism. Therefore, the restriction of $\iota^{-1}$ to $\tilde{W}_n^+=W_n^++A_n^+$ gives a Lie algebra homomorphism $\eta:\tilde{W}_n^+\rightarrow K_n^+\otimes U(T)$ with $$\eta(t^\alpha)=t^\alpha\otimes 1,\eta(t^\alpha\partial_i)=\sum_{0\leqslant\beta\leqslant\alpha}(_\beta^\alpha)t^\beta\otimes X_{\alpha-\beta,i}.$$ Then we have the associative algebra homomorphism $\tilde{\eta}:U(\tilde{W}_n^+)\rightarrow K_n^+\otimes U(T)$. Clearly, $$t^0-1,t^\alpha\cdot t^\beta-t^{\alpha+\beta}\in {\rm Ker}\ \tilde{\eta},\forall\alpha,\beta\in{\mathbb Z}_+^n.$$ Consequently, we have the induced associative algebra homomorphism $\bar{\eta}:\bar{U}\rightarrow K_n^+\otimes U(T)$. Obviously, $\bar\eta=\pi_1^{-1}$, which gives the lemma. \end{proof} Let $\mathfrak{m}$ be the ideal of $A_n^+$ generated by $t_1,\dots,t_n$. Then $\mathfrak{m}={\rm span}\{t^\alpha|\alpha\in{\mathbb Z}_+^n\setminus\{0\}\}$ and $\mathfrak{m}\Delta$ is a subalgebra of $W_n^+$. \begin{lemma}\label{TmD} The linear map $\pi_2:\mathfrak{m}\Delta\rightarrow T$ defined by $$\pi_2(t^\alpha\partial_i)=X_{\alpha,i},\alpha\in{\mathbb Z}_+^n\setminus \{0\},i=1,\dots,n,$$ is an isomorphism of Lie algebras. \end{lemma} \begin{proof} $\pi_2$ is clearly an isomorphism of vector spaces. Consider the following combination of natural Lie algebra homomorphisms: $$\mathfrak{m}\Delta\subset\mathfrak{m}\cdot\Delta+A_n^+\cdot T\rightarrow(\mathfrak{m}\cdot\Delta+A_n^+\cdot T)/(\mathfrak{m}\cdot\Delta+\mathfrak{m}\cdot T)\rightarrow(A_n^+\cdot T)/(\mathfrak{m}\cdot T)\rightarrow T$$ This homomorphism, which maps $t^\alpha\partial_i$ to $X_{\alpha,i}$, is just the linear map $\pi_2$. \end{proof} For any $k\in{\mathbb N}$, $\mathfrak{m}^k\Delta$ is easily seen as an ideal of $\mathfrak{m}\Delta$. \begin{lemma}\label{gln} {\rm (1).} $\mathfrak{m}\Delta/\mathfrak{m}^2\Delta\cong \mathfrak{gl}_n$. {\rm (2).} Suppose $V$ is a simple weight $\mathfrak{m}\Delta$ module. Then $\mathfrak{m}^2\Delta V=0$. Thus $V$ can be regarded as a simple weight $\mathfrak{gl}_n$ module via the isomorphism in (1). \end{lemma} \begin{proof} (1). It is straight forward to verify that the linear map \begin{equation}\pi_3:\mathfrak{gl}_n \rightarrow\mathfrak{m}\Delta/\mathfrak{m}^2\Delta\end{equation}mapping $E_{i,j}$ to $t_i\partial_j+\mathfrak{m}^2\Delta,i,j=1,\dots,n$, is a Lie algebra isomorphism. (2). It is clear that the adjoint action of $d$ on $W_n^+$ is diagonalizable. More precisely, we have $$(W_n^+)_{k-1}={\rm span}\{t^\alpha\partial_i\big|\alpha\in{\mathbb Z}_+^n,|\alpha|=k,i=1,\dots,n\},\forall k\in{\mathbb Z}_+.$$ It follows that $$W_n^+=\oplus_{l=-1}^\infty(W_n^+)_l,\mathfrak{m}^k\Delta=\oplus_{l=k-1}^\infty(W_n^+)_l,\forall k\in{\mathbb N}.$$ As a simple weight $\mathfrak{m}\Delta$ module. Let $0\ne v\in V_{\lambda}$ for some $\lambda\in {\rm supp}(V)$. Then $V=U(\mathfrak{m}\Delta)v$. So the action of $d=d_1+\cdots+d_n$ on $V$ is diagonalizable and the eigenvalues are contained in $\lambda+{\mathbb Z}_+$. Also, $\mathfrak{m}^2\Delta V$ is a submodule of $V$ with the eigenvalues of $d$ on $\mathfrak{m}^2\Delta V$ in $\lambda+{\mathbb N}$. So $v_{\lambda}\not\in\mathfrak{m}^2\Delta\cdot V$. From the simplicity of $V$, we have $\mathfrak{m}^2\Delta V=0$. \end{proof} We therefore have the associative algebra homomorphism $\pi: \bar{U}\stackrel{\pi_1^{-1}}{\longrightarrow}K_n^+\otimes U(T)\stackrel{1\otimes \pi_2^{-1}}{\longrightarrow} K_n^+\otimes U(\mathfrak{m}\Delta)\rightarrow K_n^+\otimes U(\mathfrak{m}\Delta/\mathfrak{m}^2\Delta) \stackrel{1\otimes \pi_3^{-1}}{\longrightarrow} K_n^+\otimes U(\mathfrak{gl}_n)$ with \begin{align}\label{pi} &\pi(t^{\alpha})=t^{\alpha}\otimes 1,\pi(t^{\alpha}\partial_i)=(t^{\alpha}\partial_i)\otimes 1+\sum_{j=1}^n \partial_j(t^{\alpha})\otimes E_{j,i}.\end{align} Let $\sigma:L\rightarrow L'$ be any homomorphism of Lie algebras or associative superalgebras, and $V$ be any $L'$ module. We make $V$ into an $L$ module by $x\cdot v=\sigma(x) v,\forall x\in L, v\in V$. The resulting module will be denoted by $V^{\sigma}$. Then for any $K_n^+$ module $P$ and any $\mathfrak{gl}_n$ module $M$, from definition of $F(P,M)$ and (\ref{pi}) we have \begin{equation}\label{def2-tensor}F(P,M)=(P\otimes M)^{\pi}.\end{equation} We need the following result on $K_n^+$ modules. \begin{lemma}\label{Kmod} Any nonzero weight $K_n^+$ module has a simple submodule. \end{lemma} \begin{proof} Let $V$ be a nonzero weight $K_n^+$ module and $v$ be a nonzero weight vector of weight $\lambda$. Then $K_n^+\cdot v$ is a submodule of $V$ with one-dimensional weight spaces. Let $I$ be the left ideal of $K_n^+$ generated by $t_1\cdot\partial_1-\lambda_1,\dots,t_n\cdot\partial_n-\lambda_n$. Then $K_n^+\cdot v$ is a quotient of the $K_n^+$ module $K_n^+/I\cong t_1^{\lambda_1}{\mathbb C}\xspace[t_1,t_1^{-1}]\otimes\dots\otimes t_n^{\lambda_n}{\mathbb C}\xspace[t_n,t_n^{-1}]$. From Lemma \ref{lem2.1} , each $t_i^{\lambda_i}{\mathbb C}\xspace[t_i,t_i^{-1}]$ is a weight $K_{(i)}^+={\mathbb C}\xspace[t_i,\partial_i]$ module of length $\le 2$. So $K_n^+/I$ has a composition series of length $\le 2^n$. Therefore, $K_n^+\cdot v$ hence $V$ must have a simple submodule. \end{proof} The following result is well-known. \begin{lemma}\label{WotimesV} Let $A,B$ be two unital associative algebras with $B$ having a countable basis. {\rm (1).} If $M$ is a simple module over $A\otimes B$ that contains a simple $B={\mathbb C}\xspace\otimes B$ submodule $V$, then $M\cong W\otimes V$ for a simple $A$ module $W$. {\rm (2).} If $W$ and $V$ are simple modules over $A$ and $B$ respectively, then $W\otimes V$ is a simple module over $A\otimes B$. \end{lemma} \begin{theorem}\label{classi-1} Suppose that $V$ is a simple weight $AW_n^+$ module with $dim\ V_\lambda<\infty$ for some $\lambda\in {\rm supp}(V)$. Then $V$ is isomorphic to a tensor module $F(P,M)$, where $P$ is a simple weight $K_n^+$ module, $M$ is a simple weight $\mathfrak{gl}_n$ module. \end{theorem} \begin{proof} Let $H={\rm span}\{X_{e_i,i},t_i\cdot\partial_i|i=1,\dots,n\}\subset \bar{U}$. Then $H$ is an abelian Lie algebra and $H\cdot V_\lambda\subset V_\lambda$. So $V_\lambda$ contains a common eigenvector $v$ of $H$. Let $\rho: K_n^+\otimes U(\mathfrak{m}\Delta)\stackrel{1\otimes \pi_2}{\longrightarrow} K_n^+\otimes U(T)\stackrel{\pi_1}{\longrightarrow} \bar{U}$ be the associative isomorphism. Then $V^{\rho}$ is a simple $K_n^+\otimes U(\mathfrak{m}\Delta)$ module and $v$ is a common eigenvector of $\rho^{-1}(H)={\rm span}\{1\otimes d_i, d_i\otimes 1|i=1,2,\ldots, n\}\subset K_n^+\otimes U(\mathfrak{m}\Delta)$. Note that the adjoint action of $\rho^{-1}(H)$ on $K_n^+\otimes U(\mathfrak{m}\Delta)$ is diagonalizable, and $V^{\rho}=(K_n^+\otimes U(\mathfrak{m}\Delta)) v$. Therefore, $\rho^{-1}(H)$ is diagonalizable on $V^{\rho}$. By Lemma \ref{Kmod}, $K_n^+v$ hence $V^{\rho}$ has a simple $K_n^+$ submodule $P$. From Lemma \ref{WotimesV}, we have $V^{\rho}\cong P\otimes M$ for some simple $\mathfrak{m}\Delta$ module $M$. So $\rho^{-1}(H)$ is diagonalizable on $P\otimes M$. Now we have $M$ is a simple weight $\mathfrak{m}\Delta$ module. By Lemma \ref{gln}, $\mathfrak{m}^2\Delta M=0$, $M$ is a simple weight $\mathfrak{gl}_n$ module and $V^{\pi^{-1}}\cong P\otimes M$ as $K_n^+\otimes U(\mathfrak{gl}_n)$ modules. Now from (\ref{def2-tensor}), we have $V\cong F(P,M)$, where $P$ is a simple weight $K_n^+$ module, $M$ is a simple weight $\mathfrak{gl}_n$ module.\end{proof} \begin{lemma}\label{lem-cusp} Let $P$ be a simple weight $K_n^+$ module and $M$ be a simple weight $\mathfrak{gl}_n$ module. Then $F(P,M)$ is bounded if and only if $M$ is finite dimensional. \end{lemma} \begin{proof} The sufficiency follows easily from (\ref{weispa}) and Lemma \ref{lem2.1} (2). Now suppose to the contrary that $\dim\ M=\infty$ and there exists an $N\in {\mathbb N}$ such that $\dim F(P,M)_{\gamma}\le N$ for all $\gamma\in {\rm supp}(F(P,M))$. By the simplicity of $M$, ${\rm supp}(M)\subset\mu+{\mathbb Z}^n$ for any weight $\mu$ of $M$. It is well known that the simple weight $\mathfrak{gl}_n({\mathbb C}\xspace)$ module $M$ has infinitely many weights. Hence there are $N+1$ nonzero weight vectors $w_0,w_1,\dots,w_N$ with pairwise different weights $\mu,\mu+\alpha^{(1)},\dots,\mu+\alpha^{(N)}\in {\rm supp}(M)$, respecitvely. Fixed an $l\in {\mathbb N}$ such that $-(l,l,\ldots,l)\le \alpha^{(i)}\le (l,l.\ldots,l)$ for all $i=1,2,\ldots,N$. By Lemma \ref{lem2.1} (2), there is a $\lambda\in {\rm supp}(P)$ such that $\lambda+\beta\in {\rm supp}(P)$ for all $\beta\in {\mathbb Z}^n$ with $-(l,l,\ldots,l)\le \beta \le (l,l.\ldots,l)$. Let $v_0, v_1,\ldots, v_N$ be nonzero weight vectors of $P$ with weight $\lambda,\lambda-\alpha^{(1)},\ldots, \lambda-\alpha^{(N)}$, respectively. Then $\{v_i\otimes w_i |i=0,1,\dots,N\}$ are linearly independent in $F(P,M)$. On the other hand, these vectors are all contained in the same weight space $V_{\lambda+\mu}$. So $\dim\ V_{\lambda+\mu}\geqslant N+1$. which is a contradiction. \end{proof} From Theorem \ref{classi-1} and Lemma \ref{lem-cusp}, we have \begin{theorem}\label{cusAW} Suppose that $V$ is a simple bounded weight $AW_n^+$ module. Then $V$ is isomorphic to a tensor module $F(P,M)$, where $P$ is a simple weight $K_n^+$ module, $M$ is a simple finite-dimensional $\mathfrak{gl}_n$ module. \end{theorem} \begin{example} We are going to classify simple Harish-Chandra $AW_2^+$ modules in this example. Let $V$ be any simple Harish-Chandra $AW_2^+$ module. From Theorem \ref{classi-1} $V\cong F(P,M)$ for some simple $K_2^+$ module and some simple weight $\mathfrak{gl}_2$ module. From Theorem \ref{cusAW}, we know that $V$ is bounded if and only if $M$ is finite dimensional. Now suppose that $V$ is not bounded. Then $M$ is infinite dimensional. By Lemma \ref{lem2.1}, there is a weight $\lambda\in {\mathbb C}\xspace^2$ of $P$ such that ${\rm supp}(P)=\lambda+Q_1\times Q_2$, where $Q_1,Q_2\in\{{\mathbb Z},{\mathbb Z}_+,-{\mathbb Z}_+\}$. Interchange the subscript of $t_1,t_2$ if necessary, we can assume that \begin{equation}\label{assume1}Q_1\times Q_2={\mathbb Z}\times{\mathbb Z},{\mathbb Z}\times{\mathbb Z}_+,{\mathbb Z}\times{\mathbb Z}_-,{\mathbb Z}_+\times{\mathbb Z}_+,{\mathbb Z}_+\times{\mathbb Z}_-\ or\ {\mathbb Z}_-\times{\mathbb Z}_-.\end{equation} It is well known that the simple weight $\mathfrak{gl}_2$ module $M$ is a simple weight module over the subalgebra $\sl_2$ with one-dimensional weight spaces, and that $E_{1,1}+E_{2,2}$ acts as a scalar on $M$. It follows that there is a weight $\mu$ of $M$ such that $$\{(\mu'-\mu)(E_{1,1}-E_{2,2})|\mu'\in supp(M)\}=2Q_3,$$ where $Q_3\in\{{\mathbb Z},{\mathbb Z}_+,{\mathbb Z}_-\}$. So ${\rm supp}(M)=\{\mu+(i,-i)|i\in Q_3\}$. By (\ref{weispa}), ${\rm supp}(V)=\{\lambda+\mu+(k+i,l-i)|(k,l,i)\in Q_1\times Q_2\times Q_3\}$. Since the weight spaces of $P$ and $M$ are all finite dimensional, the dimensions of weight spaces of $V$ are uniquely determined by $Q_1,Q_2,Q_3$. More explicitly, for any $k',l'\in{\mathbb Z}$, $0<V_{\lambda+\mu+(k',l')}<\infty$ if and only if the equations $$k+i=k',l-i=l'$$ have finite solutions $(k,l,i)$ in $Q_1\times Q_2\times Q_3$. Computing case by case, we conclude that under the condition (\ref{assume1}) (1)$F(P,M) $ is a simple Harish-Chandra module if and only if it has a finite dimensional weight space. (2)$F(P,M)$ is a simple Harish-Chandra module if and only if $$Q_1\times Q_2={\mathbb Z}_+\times{\mathbb Z}_+,{\mathbb Z}_-\times{\mathbb Z}_-$$ or $$Q_1\times Q_2\times Q_3={\mathbb Z}\times{\mathbb Z}_+\times{\mathbb Z}_-,{\mathbb Z}_+\times{\mathbb Z}_-\times{\mathbb Z}_+,{\mathbb Z}\times{\mathbb Z}_-\times{\mathbb Z}_+.$$ \end{example} \section{simple bounded weight weight $W_n^+$ modules} Now we aim to classify all simple bounded weight $W_n^+$ modules. Firstly, we give some results on weight modules over $W_1$ or $W_1^+$. For any $a,b\in {\mathbb C}\xspace$, let $V_{a,b}$ be the weight module of $W_1$ with basis $\{v_{a+s}|s\in{\mathbb Z}\}$, where the action of $W_1$ is given by $$t_1^kd_1\cdot v_{a+s}=(a+s+kb)v_{b+k+s},\forall k,s\in{\mathbb Z}.$$ Set ${0\choose 0}=1$ and define a class of elements in $U(W_1)$: \begin{eqnarray*}&\Omega_{k,s}^{(m)}=\sum_{i=0}^m(-1)^i{m\choose i}t_1^{k-i}d_1\cdot t_1^{s+i}d_1.\end{eqnarray*} Clearly, \begin{equation}\label{O,P1}\Omega_{k,s}^{(m+1)}=\Omega_{k,s}^m-\Omega_{k-1,s+1}^m.\end{equation} Let $\omega_{k,s}^{(m)}=\sum_{i=0}^m(-1)^i{m\choose i}t^{m+k-i}\partial\cdot t^{s+i}\partial$. Then $\omega_{k,s}^{(m)}=\Omega_{m+k-1,s-1}^{(m)}$. Clearly $\omega_{k,s}^{(m)}\in U(W_1^+)$ if $k,s,m\in {\mathbb Z}_+$, and \begin{equation}\label{O,P}\omega_{k,s}^{(m+1)}=\omega_{k+1,s}^{(m)}-\omega_{k,s+1}^{(m)}.\end{equation} \begin{lemma}\cite[Lemma 3.2]{BF1}\label{lemma4.1}For any $k,s\in {\mathbb Z}_+$, $\omega_{k,s}^{(3)}$ annihilates every simple Harish-Chandra $W_1$ module. \end{lemma} Denote $\{X,Y\}=XY+YX$. \begin{lemma} Let $m, k, s\in {\mathbb Z}_+$ with $m \geq 2$. Then \begin{equation}\label{Omega}\begin{split} &\sum_{i=0}^{m}\sum_{j=0}^{m}(-1)^{i+j}{m\choose i}{m\choose j}(\{\omega_{k+1+m-i,s+1+m-j}^{(m)},\omega_{i,j}^{(m)}\} -\{\omega_{k+1+m-i,m-j}^{(m)},\omega_{s+1+i,j}^{(m)}\})\\ =&(k+1)(s+1)\omega_{k,s}^{(4m)}. \end{split}\end{equation} \end{lemma} \begin{proof} The left hand side of (\ref{Omega}) equals \begin{equation}\label{BFOmega}\sum_{i=0}^{m}\sum_{j=0}^{m}(-1)^{i+j}{m\choose i}{m\choose j}(\{\Omega_{k+2m-i,s+m-j}^{(m)},\Omega_{m-1+i,j-1}^{(m)}\} -\{\Omega_{k+2m-i,m-1-j}^{(m)},\Omega_{s+m+i,j-1}^{(m)}\}).\end{equation} By \cite{BF1}(1.1), (\ref{BFOmega}) equals \begin{eqnarray*} (s+1)(k+1)\Omega_{k+4m-1,s-1}^{(4m)}=(k+1)(s+1)\omega_{k,s}^{(4m)}. \end{eqnarray*} \end{proof} In \cite{Ma}, Mathieu gave a complete classification of simple Harish-Chandra modules over $W_1$ or $W_1^+$. Suppose $V$ is a simple Harish-Chandra $W_1^+$ module. By \cite{Ma}, $V$ is a subquotient of the $W_1^+$ module $V_{a,b}$ for some $a, b\in{\mathbb C}\xspace$. Then $\omega_{k,s}^3\cdot V=0$ for all $k,s\in{\mathbb Z}_+$. Also, we have \begin{equation}\label{w1supp} {\rm supp}(V)=a+{\mathbb Z},\lambda+{\mathbb Z}_+,\lambda+{\mathbb Z}_-\ or\ 0 \end{equation} for some $\lambda\in a+{\mathbb Z}$. \begin{lemma}\label{lem4.3} For every $l\in{\mathbb N}$ there is an $m\in{\mathbb N}$ such that for all integers $m'\ge m$ and $k,s\in {\mathbb Z}_+$, $\omega_{k,s}^{m'}$ annihilates every Harish-Chandra $W_1^+$ module with a composition series of length no more than $l$. \end{lemma} \begin{proof} In view of (\ref{O,P}), we need only prove that for every $l\in{\mathbb N}$ there is an $m\in{\mathbb N}$ such that for all integers $k,s\in {\mathbb Z}_+$, $\omega_{k,s}^{(m)}$ annihilates every Harish-Chandra $W_1^+$ module $V$ with a composition series of length $l$. We will prove this by induction on $l$. From Lemma \ref{lemma4.1}, we have the statement holds for $l=1$. Now suppose that $l>1$ and let $$0=V_0\subset V_1\subset\dots\subset V_{l-1}\subset V_l=V$$ be a composition series of $V$. By the induction hypothesis, there is an integer $m_0\geqslant 2$ such that $\omega_{k,s}^{(m_0)} V_{l-1}=0$ for all $k,s\in {\mathbb Z}_+$. Then $$\omega_{k,s}^{(m_0)}\cdot\omega_{p,q}^{(m_0)} V\subset\omega_{k,s}^{(m_0)} V_{l-1}=0,\forall k,s,p,q\in{\mathbb Z}_+$$ By Lemma \ref{Omega}, we get $\omega_{k,s}^{(m)} V=0$ for $m=4m_0$ and all $k,s\in{\mathbb Z}_+$. \end{proof} \begin{corollary}\label{cusW1} For every $r\in{\mathbb N}$ there is an $m\in{\mathbb N}$ such that for all $r,s\in {\mathbb Z}_+$, $\omega_{k,s}^{m}$ annihilates every bounded weight $W_1^+$ module $V$ with $\dim\ V_{\lambda}\le r$ for all $\lambda\in {\rm supp}(V)$. \end{corollary} \begin{proof} For $\lambda\in {\rm supp}(V)$, $V_{\lambda+{\mathbb Z}}=\oplus_{i\in {\mathbb Z}} V_{\lambda+i}$ is a $W_1^+$ submodule. (\ref{w1supp}) implies that $V_{\lambda+{\mathbb Z}}$ has at most $3r$ simple sub-quotients. From Lemma $\ref{lem4.3}$, there exists an $m\in {\mathbb N}$ such that $\omega_{k,s}^{m}$ annihilates every Harish-Chandra $W_1^+$ module with a composition series of length no more than $3r$. Hence $\omega_{k,s}^{m} V_{\lambda+{\mathbb Z}}=0$. The corollary follows. \end{proof} Now we consider the bounded weight $W_n^+$ modules. For any $j\in\{1,\dots,n\}$, let $W_{(j)}^+={\rm span}\{t_j^k\partial_j|k\in{\mathbb Z}_+\}$. $W_{(j)}^+$ is a subalgebra of $W_n^+$ isomorphic to $W_1^+$. For any $m\in{\mathbb Z}_+,j\in\{1,\dots,n\},\alpha,\beta\in{\mathbb Z}_+^n$, we define \begin{eqnarray*} \omega_{\alpha,\beta}^{m,j,l,p}=\sum_{i=0}^m(-1)^i{m\choose i}t^{\alpha+(m-i)e_j}\partial_l\cdot t^{\beta+ie_j}\partial_p. \end{eqnarray*} Then \begin{equation}\omega_{\alpha+e_j,\beta}^{m,j,l,p}-\omega_{\alpha,\beta+e_j}^{m,j,l,p}=\omega_{\alpha,\beta}^{m+1,j,l,p}.\end{equation} \begin{lemma}\label{cusWn} Suppose that $V$ is a bounded weight $W_n^+$ module with $dim\ V_{\lambda}\leqslant r$ for all $\lambda\in {\rm supp}(V)$. Then there is an $m\in{\mathbb N}$ such that $\omega_{\alpha,\beta}^{m,j,l,p}\cdot V=0$ for all $j,l,p=1,2,\ldots,n;\alpha,\beta\in {\mathbb Z}_+^n$. \end{lemma} \begin{proof} By Corollary \ref{cusW1}, there is an $m\in{\mathbb N}$ such that \begin{equation}\Omega_{ke_j,se_j}^{m,j,j,j}\in {\rm ann}(V),\forall j\in\{1,2,\ldots, n\},k,s\in{\mathbb Z}_+\end{equation} where ${\rm ann}(V)=\{x\in U(W_n^+)| xV=0\}$. For any $\alpha\in{\mathbb Z}_+^n,k,s\in{\mathbb Z}_+$, we have \begin{equation}\begin{split}&f_j^m(\alpha,k,s):= [t^\alpha\partial_j,\Omega_{ke_j,se_j}^{m,j,j,j}]\\ &=[t^\alpha\partial_j,\sum_{i=0}^m(-1)^i{m\choose i}t^{(k+m-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j]\\ &=\sum_{i=0}^m(-1)^i{m\choose i}((k+m-i-\alpha_j)t^{\alpha+(k+m-i-1)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & +(s+i-\alpha_j)t^{(k+m-i)e_j}\cdot t^{\alpha+(s+i-1)e_j}\partial_j)\in {\rm ann}(V).\end{split} \end{equation} Then \begin{eqnarray*} & &f_j^{(m)}(\alpha,k,s+1)-f_j^m(\alpha+e_j,k,s)\\ &=&\sum_{i=0}^m(-1)^i{m\choose i}(k+m-i-\alpha_j)t^{\alpha+(m+k-1-i)e_j}\partial_j\cdot t^{(s+1+i)e_j}\partial_j\\ & &-\sum_{i=0}^m(-1)^i{m\choose i}(k+m-i-\alpha_j-1)t^{\alpha+(m+k-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & &+2\sum_{i=0}^m(-1)^i{m\choose i}t^{(k+m-i)e_j}\partial_j\cdot t^{\alpha+(s+i)e_j}\partial_j\in {\rm ann}(V). \end{eqnarray*} Now we have \begin{eqnarray*} g_j^{(m)}(\alpha,k,s)&:=&(f_j^{(m)}(\alpha,k+1,s+1)-f_j^{(m)}(\alpha+e_j,k+1,s))\\ & &-(f_j^{(m)}(\alpha+e_j,k,s+1)-f_j^{(m)}(\alpha+2e_j,k,s))\\ &=&2\sum_{i=0}^m(-1)^i{m\choose i}t^{\alpha+(m+k-i)e_j}\partial_j\cdot t^{(s+1+i)e_j}\partial_j\\ & &-2\sum_{i=0}^m(-1)^i{m\choose i}t^{\alpha+(m+k+1-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & &+2\sum_{i=0}^m(-1)^i{m\choose i}t^{(m+k+1-i)e_j}\partial_j\cdot t^{\alpha+(s+i)e_j}\partial_j\\ & &-2\sum_{i=0}^m(-1)^i{m\choose i}t^{(m+k-i)e_j}\partial_j\cdot t^{\alpha+(s+i+1)e_j}\partial_j\\ &=& 2\omega_{\alpha+ke_j,(s+1)e_j}^{m,j,j,j}-2\omega_{\alpha+(k+1)e_j,se_j}^{m,j,j,j} +2\omega_{(k+1)e_j,\alpha+se_j}^{m,j,j,j}-2\omega_{ke_j,\alpha+(s+1)e_j}^{m,j,j,j}\\ &=&2\omega_{ke_j,\alpha+se_j}^{m+1,j,j,j}-2\omega_{\alpha+ke_j,se_j}^{m+1,j,j,j} \in {\rm ann}(V). \end{eqnarray*} Therefore, \begin{eqnarray*} & &\frac{1}{2}g_j^{(m)}(\alpha,k,s+1)-\frac{1}{2}g_j^{(m)}(\alpha+e_j,k,s)\\ &=&\omega_{\alpha+(k+1)e_j,se_j}^{m+1,j,j,j}-\omega_{\alpha+ke_j,(s+1)e_j}^{m+1,j,j,j}\\ &=&\omega_{\alpha+ke_j,se_j}^{m+2,j,j,j}\in {\rm ann}(V). \end{eqnarray*} For any $\alpha,\beta\in{\mathbb Z}_+^n,s\in{\mathbb Z}_+,j\in\{1,\dots,n\}$, we compute out \begin{eqnarray*} & &f_j^m(\beta,\alpha,s):= [t^\beta\partial_j,\omega_{\alpha,se_j}^{m+2,j,j,j}]\\ &=&\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}[t^\beta\partial_j,t^{\alpha+(m+2-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j]\\ &=&\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}((\alpha_j+m+2-\beta_j-i)t^{\alpha+\beta+(m+1-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & &+(s-\beta_j+i)t^{\alpha+(m+2-i)e_j}\partial_j\cdot t^{\beta+(s+i-1)e_j}\partial_j)\in {\rm ann}(V).\end{eqnarray*} Thus \begin{eqnarray*} & &f_j^{(m)}(\beta,\alpha,s+1)-f_j^{(m)}(\beta+e_j,\alpha,s)\\ &=&\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}(\alpha_j-\beta_j+m+2-i)t^{\alpha+\beta+(m+1-i)e_j}\partial_j\cdot t^{(s+i+1)e_j}\partial_j\\ & &-\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}(\alpha_j-\beta_j+m+1-i)t^{\alpha+\beta+(m+2-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & &+2\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}t^{\alpha+(m+2-i)e_j}\partial_j\cdot t^{\beta+(s+i)e_j}\partial_j\in {\rm ann}(V). \end{eqnarray*} We have \begin{eqnarray*} & &(f_j^{(m)}(\beta,\alpha+e_j,s+1)-f_j^{(m)}(\beta+e_j,\alpha+e_j,s))\\ & &-(f_j^{(m)}(\beta+e_j,\alpha,s+1)-f_j^{(m)}(\beta+2e_j,\alpha,s))\\ &=&2\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}t^{\alpha+\beta+(m+2-i)e_j}\partial_j\cdot t^{(s+i+1)e_j}\partial_j\\ & &-2\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}t^{\alpha+\beta+(m+3-i)e_j}\partial_j\cdot t^{(s+i)e_j}\partial_j\\ & &+2\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}t^{\alpha+(m+3-i)e_j}\partial_j\cdot t^{\beta+(s+i)e_j}\partial_j\\ & &-2\sum_{i=0}^{m+2}(-1)^i{m+2\choose i}t^{\alpha+(m+2-i)e_j}\partial_j\cdot t^{\beta+(s+i+1)e_j}\partial_j\\ &=&2\omega_{\alpha+\beta,(s+1)e_j}^{(m+2),j,j,j}-2\omega_{\alpha+\beta+e_j,se_j}^{(m+2),j,j,j}+2\omega_{\alpha+e_j,\beta+se_j}^{(m+2),j,j,j}-2\omega_{\alpha,\beta+(s+1)e_j}^{(m+2),j,j,j}\\ &=&2\omega_{\alpha,\beta+se_j}^{m+3,j,j,j}-2\omega_{\alpha+\beta,se_j}^{m+3,j,j,j}\in {\rm ann}(V). \end{eqnarray*} Thus \begin{equation}\label{jjj}\omega_{\alpha,\beta}^{m+3,j,j,j}\in {\rm ann}(V),\forall \alpha,\beta\in{\mathbb Z}_+^n.\end{equation} Let $\gamma\in{\mathbb Z}_+^n$ and $l\in \{1,2,\ldots,n\}\setminus \{ j\}$. We have \begin{eqnarray*} & &[t^\gamma\partial_l,\omega_{\alpha,\beta}^{m+3,j,j,j}]\\ &=&[t^\gamma\partial_l,\sum_{i=0}^{m+3}(-1)^i{m+3\choose i}t^{\alpha+(m+3-i)e_j}\partial_j\cdot t^{\beta+ie_j}\partial_j]\\ &=&\sum_{i=0}^{m+3}(-1)^i{m+3\choose i}\Big(\alpha_l t^{\alpha+\gamma-e_l+(m+3-i)e_j)}\partial_j\cdot t^{\beta+ie_j}\partial_j-\gamma_jt^{\alpha+\gamma+(m+2-i)e_j}\partial_l\cdot t^{\beta+ie_j}\partial_j\\ & &+\beta_lt^{\alpha+(m+3-i)e_j}\partial_j\cdot t^{\beta+\gamma-e_l+ie_j}\partial_j -\gamma_jt^{\alpha+(m+3-i)e_j}\partial_j\cdot t^{\beta+\gamma+(i-1)e_j}\partial_l\Big)\\ &= &\alpha_l \omega_{\alpha+\gamma-e_l,\beta}^{m+3,j,j,j}+\beta_l \omega_{\alpha,\beta+\gamma-e_l}^{m+3,j,j,j}-\gamma_j(\omega_{\alpha+\gamma-e_j,\beta}^{m+3,j,l,j}+\omega_{\alpha,\beta+\gamma-e_j}^{m+3,j,j,l})\in {\rm ann}(V). \end{eqnarray*} We have\begin{equation*} f^{(m)}(\alpha,\beta,\gamma,l,j):= \gamma_j(\omega_{\alpha+\gamma-e_j,\beta}^{m+3,j,l,j}+\omega_{\alpha,\beta+\gamma-e_j}^{m+3,j,j,l})\in {\rm ann}(V). \end{equation*} Therefore \begin{eqnarray*} & &(\gamma_j+1)f^{(m)}(\alpha,\beta+e_j,\gamma,l,j)-\gamma_jf^{(m)}(\alpha,\beta,\gamma+e_j,l,j)\\ &=&\gamma_j(\gamma_j+1)(\omega_{\alpha+\gamma-e_j,\beta+e_j}^{m+3,j,l,j}-\omega_{\alpha+\gamma,\beta}^{m+3,j,l,j}) =-\gamma_j(\gamma_j+1)\omega_{\alpha+\gamma-e_j,\beta}^{m+4,j,l,j}\in {\rm ann}(V). \end{eqnarray*} Taking $\gamma=e_j$, we get \begin{equation}\label{jlj} \omega_{\alpha,\beta}^{m+4,j,l,j}\in {\rm ann}(V). \end{equation} Similarly we have \begin{equation}\label{jjl} \omega_{\alpha,\beta}^{m+4,j,j,l}\in {\rm ann}(V). \end{equation} For any $p\in \{1,2,\ldots,n\}\setminus \{j\},\alpha,\beta,\gamma\in{\mathbb Z}_+^n$, we have \begin{eqnarray*} & &[t^\gamma\partial_p,\omega_{\alpha,\beta}^{m+4,j,l,j}]\\ &=&[t^\gamma\partial_p,\sum_{i=0}^{m+4}(-1)^i{m+4\choose i}t^{\alpha+(m+4-i)e_j}\partial_l\cdot t^{\beta+ie_j}\partial_j]\\ &=&\sum_{i=0}^{m+4}(-1)^i{m+4\choose i}\Big(\alpha_p t^{\alpha+\gamma-e_p+(m+4-i)e_j}\partial_l\cdot t^{\beta+ie_j}\partial_j-\gamma_lt^{\alpha+\gamma-e_l+(m+4-i)e_j}\partial_p\cdot t^{\beta+ie_j}\partial_j\\ & &+\beta_p t^{\alpha+(m+4-i)e_j}\partial_l\cdot t^{\beta+\gamma-e_p+ie_j}\partial_j-\gamma_j t^{\alpha+(m+4-i)e_j}\partial_l\cdot t^{\beta+\gamma+(i-1)e_j}\partial_p\Big)\\ &=& \alpha_p\omega_{\alpha+\gamma-e_p,\beta}^{m+4,j,l,j}-\gamma_l\omega_{\alpha+\gamma-e_l,\beta}^{m+4,j,p,j}+\beta_p\omega_{\alpha,\beta+\gamma-e_p}^{m+4,j,l,j}-\gamma_j\omega_{\alpha,\beta+\gamma-e_j}^{m+4,j,l,p}\in {\rm ann}(V).\end{eqnarray*} Combining this with (\ref{jlj}), we have $\gamma_j\omega_{\alpha,\beta+\gamma-e_j}^{m+4,j,l,p}\in {\rm ann}(V)$. Taking $\gamma=e_j$, we obtain $\omega_{\alpha,\beta}^{m+4,j,l,p}\in {\rm ann}(V)$. This together with (\ref{jjj}),(\ref{jlj}) and (\ref{jjl}) gives \begin{equation}\omega_{\alpha,\beta}^{m+4,j,l,p}\in {\rm ann}(V),\forall \alpha,\beta\in {\mathbb Z}_+^n;j,l,p\in \{1,2,\ldots,n\}.\end{equation} The lemma follows after replacing $m$ with $m+4$. \end{proof} Let $V$ be a weight $W_n^+$ module. Since $W_n^+$ is itself a weight $W_n^+$ module, $W_n^+\otimes V$ is a weight $W_n^+$ module with $$(W_n^+\otimes V)_\lambda=\oplus_{\alpha\in {\mathbb Z}^n}(W_n^+)_{\alpha}\otimes V_{\lambda-\alpha},\forall \lambda\in {\mathbb C}\xspace^n.$$ Define the action of $A_n^+$ on $W_n^+\otimes V$ by $$t^\alpha\cdot(t^\beta\partial_i\otimes v)=t^{\alpha+\beta}\partial_i\otimes v,\forall \alpha,\beta\in{\mathbb Z}_+^n,i\in\{1,\dots,n\},v\in V.$$ It's easy to verify that $W_n^+\otimes V$ now has an $AW_n^+$ module structure. Define a linear map $\theta:W_n^+\otimes V\rightarrow V$ by $$\theta(t^\alpha\partial_i\otimes v)=t^\alpha\partial_i\cdot v,\forall \alpha\in{\mathbb Z}_n^+,i\in\{1,\dots,n\},v\in V.$$ This is a $W_n^+$ module homomorphism with image $W_n^+\cdot V$. Let $$K(V)=\{x\in {\rm Ker} \theta|A_n^+\cdot x\subset {\rm Ker} \theta\}.$$ Then $K(V)$ is an $AW_n^+$-submodule of $W_n^+\otimes V$. Let $$\hat V=(W_n^+\otimes V)/K(V).$$ The $AW_n^+$ module $\hat V$ is called the $A$-cover of $V$ if $W_n^+V=V$. Naturally, $\theta$ induces a $W_n^+$ module homomorphism $\hat\theta:\hat V\rightarrow V$. \begin{theorem}\label{covercus} Suppose that $V$ is a simple bounded weight $W_n^+$ module. Then $\hat V$ is bounded. \end{theorem} \begin{proof} It is obvious if $V$ is trivial. Now we assume that $V$ is nontrivial. Then $W_n^+V=V$ and ${\rm supp}(V)\subset\lambda+{\mathbb Z}^n$ for some $\lambda\in {\rm supp}(V)$. Let $m$ be as in Lemma \ref{cusWn}. Let $S={\rm span}\{t^\alpha\partial_i\big|0\leqslant\alpha_j\leqslant m,i,j=1,\dots,n\}$ be a subspace of $W_n^+$. Then $\dim S=n^2(m+1)$. So $S\otimes V$ is a $H$-submodule of $W_n^+\otimes V$ with $$\dim\ (S\otimes V)_{\mu}\leqslant n^2(m+1)r,\forall \mu \in \lambda+{\mathbb Z}^n.$$ We will prove that $W_n^+\otimes V=S\otimes V+K(V)$, which implies that $\hat V=(W_n^+\otimes V)/K(M)$ bounded. Recall that $V=W_n^+V$. All we need to do is to prove that $t^\alpha\partial_l\otimes t^{\beta}\partial_p v \in S\otimes V+K(M) $ for all $\alpha,\beta \in{\mathbb Z}_+^n,l,p\in\{1,\dots,n\}, v\in V$. For any $\alpha\in{\mathbb Z}_+^n$, define $|\alpha|=\alpha_1+\dots+\alpha_n$. We will prove this by induction on $|\alpha|$. The statement is clearly true if $|\alpha|\leqslant m$ or $\alpha_j\leqslant m$ for all $j$. Now suppose that $\alpha_j>m$ for some $j\in\{1,\dots,n\}$. From Lemma 4.5 and the definition of $K(V)$, we know that $$\sum_{i=0}^m(-1)^i{m\choose i}t^{\alpha-ie_j}\partial_l\otimes t^{\beta+ie_j}\partial_p\cdot v\in K(V).$$ Since $|\alpha-ie_j|<|\alpha|$ for all $i\in\{1,\dots,m\}$, by the induction hypothesis we have $t^{\alpha-ie_j}\partial_l\otimes t^{\beta+ie_j}\partial_p\cdot v\in S\otimes V+K(M)$. Therefore, $t^\alpha\partial_l\otimes t^{\beta}\partial_p v =\sum_{i=0}^m(-1)^i{m\choose i}t^{\alpha-ie_j}\partial_l\otimes t^{\beta+ie_j}\partial_p\cdot v-\sum_{i=1}^m(-1)^i{m\choose i}t^{\alpha-ie_j}\partial_l\otimes t^{\beta+ie_j}\partial_p\cdot v\in S\otimes V+K(V)$ as desired.\end{proof} \begin{lemma}\label{AWlength} Let $V$ be a bounded weight $AW_n^+$ module with ${\rm supp}(V)\subset\lambda+{\mathbb Z}^n$ and $\dim V_\mu \leqslant N,\forall \mu\in{\rm supp}(V)$. Then $V$ must have a composition series of length $\le N\cdot 2^n$. \end{lemma} \begin{proof} Since $V$ is bounded, any simple $AW_n^+$ sub-quotient of $V$ must be of the form $F(P,M)$ by Theorem \ref{cusAW}, where $P$ is a simple weight $K_n^+$ module and $M$ is a simple weight $\mathfrak{gl}_n$ module. By Lemma \ref{lem2.1}, $P$ has a weight $\lambda'$ such that $\lambda'+X\subset {\rm supp}(P)$, where $X=X_1\times\dots\times X_n,X_1,\dots,X_n\in\{{\mathbb Z}_+,-{\mathbb Z}_+\}$. Let $\lambda''$ be a weight of $M$. Then $\lambda'+\lambda''+X\subset {\rm supp}(F(P,M))$. Also, since ${\rm supp}(V)\subset\lambda+{\mathbb Z}^n$, there is a $\beta\in{\mathbb Z}^n$ such that $\lambda'+\lambda''=\lambda+\beta$. Suppose that $V$ does not have a composition series of length $\le N\cdot 2^n$. Then $V$ has $AW_n^+$ submodules $$0\subsetneq V_1\subsetneq\dots\subsetneq V_{N\cdot 2^n+1}.$$ From the discussed above, for any $i=1,2,\ldots,N\cdot 2^n+1$, there exists $\beta^{(i)}\in{\mathbb Z}^n$ and $X^{(i)}=X_{i1}\times\dots\times X_{in}$ with $X_{i1},\dots,X_{in}\in\{{\mathbb Z}_+,-{\mathbb Z}_+\}$, such that $\lambda+\beta^{(i)}+X^{(i)}\subset {\rm supp}(V_i/V_{i-1})$. Then there is an $i_0\in\{1,\dots,N\cdot 2^n+1\}$ such that the set $I=\{i\in\{1,\dots,N\cdot 2^n+1\}\ |\ X^{(i)}=X^{(i_0)}\}$ has at least $N+1$ elements. Without loss of generality, we assume that $X^{(i_0)}={\mathbb Z}_+^j\times(-{\mathbb Z}_+)^{n-j}$ for some $j\in\{0,\dots,n\}$. Let $\beta=(\beta_1,\dots,\beta_n)\in{\mathbb Z}^n$ with $\beta_k={\rm max}\{\beta^{(i)}_k|i\in I\}$ for all $k\in\{1,\dots,j\}$ and $\beta_k={\rm min}\{\beta^{(i)}_k|i\in I\}$ for all $k\in\{j+1,\dots,n\}$. Then $\lambda+\beta\in{\rm supp}(V_i/V_{i-1})$ for all $i\in I$. It follows that $\dim V_{\lambda+\beta}\geqslant N+1$, which is a contradiction. \end{proof} \begin{lemma}\label{quot} Let $V$ be a simple bounded weight $W_n^+$ module, then $V$ is a simple quotient of $F(P,M)$, where $P$ is a simple weight $K_n^+$ module and $M$ is a finite dimensional simple $\mathfrak{gl}_n$ module. \end{lemma} \begin{proof}It is obvious if $V$ is trivial. Suppose that $V$ is nontrivial. Then $W_n^+\cdot V=V$ by the simplicity of $V$. Let $\hat V$ be the $A$-cover of $V$ and $\theta:\hat V\rightarrow V$ be the $W_n^+$ module homomorphism defined above. From Theorem \ref{covercus}, we know that $\hat V$ bounded. From Lemma \ref{AWlength}, we know that $\hat V$ has finite length as $AW_n^+$ module. Let $$0=\hat V_0\subset\hat V_1\subset\dots\subset\hat V_k=\hat V$$ be a composition series of $AW_n^+$-submodules in $\hat V$. Then each $\theta(\hat V_i),i\in\{0,\dots,k\}$, is a $W_n^+$-submodule of $V$. So there is a $s\in\{1,\dots,k\}$ such that $\theta(\hat V_s)=V$ and $\theta(\hat V_{s-1})=0$. Consequently, $V$ must be isomorphic to a simple $W_n^+$-quotient of the simple bounded weight $AW_n^+$ module $V_s/V_{s-1}$. From Theorem \ref{cusAW}, $V_s/V_{s-1}$ isomorphic to $F(P,M)$ for some simple weight $K_n^+$ module $P$ and some finite dimensional simple $\mathfrak{gl}_n$ module $M$. Hence the lemma follows. \end{proof} Theorem \ref{main2} follows from Lemma \ref{quot} and Lemma \ref{quotient}. {\bf Ackowledgement.} {This work is partially supported by NSF of China (Grant 11471233, 11771122, 11971440)}.
\section{Introduction} Sporting events, specifically games between pairs of teams, are a form of paired comparison experiment, where one team (the winner) is chosen over the other (the loser). The Bradley-Terry model associates the probability of the outcome of each paired comparison with the inherent strengths of each team. Estimates of these strengths can be used to construct a rating system which allows the ranking of teams based on game outcomes when imbalances in strength of schedule make simple winning percentage (fraction of games won) an unfair basis for ranking. Because the strength parameters are also associated with the probabilities of game results, they can be used to predict the outcome of future games. This paper considers the application of this technique to NCAA Division I Men's Ice Hockey, the highest level of college hockey competition in the United States. The paper is organized as follows: In \sref{s:intro-bt} we define the Bradley-Terry model and its use in constructing posterior estimates of team strengths. In \sref{s:intro-collegehockey} we describe the particulars of the college hockey season and postseason. In \sref{s:probabilities} we describe several methods for estimating the posterior predictive probabilities of the outcome of future games. In \sref{s:applications}, we describe two applications of these techniques: the evaluation of the model constructed from the regular season by use of a Bayes factor associated with NCAA tournament results; and the \textit{Pairwise Probability Matrix}, used during the season to construct predicted probabilities for a team's ranking associated with the NCAA tournament selection criteria. \subsection{The Bradley-Terry Model} \label{s:intro-bt} Given a set of $t$ teams, the Bradley-Terry-Zermelo model \cite{BRADLEY01121952,Zermelo1929} associates with each team $i=1,\ldots,t$ a log-strength parameter $\lambda_i$, and defines the probability of team $i$ winning a given game with team $j$ such that the odds ratio is the ratio of their strengths, i.e., the probability is \begin{equation} \theta_{ij} = \frac{e^{\lambda_i}}{e^{\lambda_i}+e^{\lambda_j}} = \logistic(\lambda_i-\lambda_j) \end{equation} In this paper, we will work in terms of the log-strength $\lambda_i\in(-\infty,\infty)$. Given a series of games among the teams in which a pair of teams $i,j$ play $n_{ij}=n_{ji}$ times, the Bradley-Terry model defines a probability for a set of outcomes $D$ which includes $w_{ij}$ wins (and $n_{ij}-w_{ij}$ losses) for team $i$ against team $j$: \begin{equation} P(D|\{\lambda_i\}) = \prod_{i=1}^{t}\prod_{j=1}^{t} \theta_{ij}^{w_{ij}} = \prod_{i=1}^{t}\prod_{j=i+1}^{t} \theta_{ij}^{w_{ij}}(1-\theta_{ij})^{n_{ij}-w_{ij}} \end{equation} Note that if the order of the outcomes of games between pairs of teams is ignored, the sampling distribution for $w_{ij}$ is \begin{equation} p(\{w_{ij}\}|\{\lambda_i\}) = \prod_{i=1}^{t}\prod_{j=i+1}^{t}\binom{n_{ij}}{w_{ij}} \theta_{ij}^{w_{ij}}(1-\theta_{ij})^{n_{ij}-w_{ij}} \end{equation} but the inferences about parameters $\{\lambda_i\}$ are unchanged. The log-likelihood can be written in terms of the total number of wins $v_i=\sum_{j=1}^{t} w_{ij}$ as \begin{equation} \ln P(D|\{\lambda_i\}) = \sum_{i=1}^{t} v_i\lambda_i -\frac{1}{2}\sum_{i=1}^{t}\sum_{j=1}^{t} n_{ij} \ln\left(e^{\lambda_i}+e^{\lambda_j}\right) \end{equation} so that the maximum likelihood equations are \begin{equation} v_i = \sum_{j=1}^{t} n_{ij} \frac{e^{\ML{\lambda}_i}}{e^{\ML{\lambda}_i}+e^{\ML{\lambda}_j}} = \sum_{j=1}^{t} n_{ij}\ML{\theta}_{ij} \end{equation} The maximum-likelihood log-strengths $\{\ML{\lambda}_i\}$ are those for which the predicted number of wins $\sum_{j=1}^{t} n_{ij}\ML{\theta}_{ij}$ for each team equals the actual number $v_i$. They can be found, e.g., by Ford's method, in which one iterates the equation\cite{Ford:1957} \begin{equation} \ML{\lambda}_i = \ln \left( v_i\left/ \sum_{j=1}^{t} \frac{n_{ij}}{e^{\ML{\lambda}_i}+e^{\ML{\lambda}_j}} \right. \right) \end{equation} Because the maximum-likelihood equations depend only on the differences $\ML{\lambda}_i-\ML{\lambda}_j$, the estimates $\{\ML{\lambda}_i\}$ are defined only up to an overall additive constant. Given a prior distribution $f(\{\lambda_i\}|I)$ for the log-strengths, the posterior distribution given the game results $D$ will be \begin{equation} f(\{\lambda_i\}|D,I) \propto P(D|\{\lambda_i\})\,f(\{\lambda_i\}|I) \end{equation} The maximum a posteriori (MAP) estimates $\{\MP{\lambda_i}\}$ of the log-strengths will be the solution to \begin{equation} v_i + \left. \frac{\partial}{\partial\lambda_i} \lnf(\{\lambda_j\}|I) \right\rvert_{\{\lambda_j=\MP{\lambda}_j\}} = \sum_{j=1}^{t} n_{ij}\MP{\theta}_{ij} \end{equation} For the sake of mathematical simplicity, we will often use the Haldane prior\footnote{So named because the marginal prior distribution for any $\theta_{ij}$ will follow the Haldane prior \cite{Haldane1932,Jeffreys1939}, which is the limit of a $\text{Beta}(\alpha,\beta)$ distribution as $\alpha,\beta\rightarrow 0$.} \begin{equation} f(\{\lambda_i\}|I_0) = \text{constant} \end{equation} This is an improper prior but can be formally understood as the limiting form of a family of normalized priors. Other convenient families of priors\cite{Whelan2017} are the generalized logistic prior \begin{equation} f(\{\lambda_i\}|I_{\eta}) = \prod_{i=1}^{t} \frac{\Gamma(2\eta)}{[\Gamma(\eta)]^2} \frac{1}{(1+e^{\lambda_i})^\eta(1+e^{-\lambda_i})^\eta} \end{equation} and the Gaussian prior \begin{equation} f(\{\lambda_i\}|I_{\sigma}) = \prod_{i=1}^{t} \frac{1}{\sigma\sqrt{2\pi}} \,\exp\left( -\frac{(\lambda_i)^2}{2\sigma^2} \right) \end{equation} The Haldane prior is the limit of the generalized logistic prior as $\eta\rightarrow 0$ and the Gaussian prior as $\sigma\rightarrow\infty$. Since the generalized logistic prior has \begin{equation} \lnf(\{\lambda_j\}|I_{\eta}) = \sum_{j=1}^{t}\left[-\eta\ln(1+e^{-\lambda_j}) -\eta\ln(1+e^{\lambda_j})\right] + \text{constant} \end{equation} and \begin{equation} \frac{\partial}{\partial\lambda_i} \lnf(\{\lambda_j\}|I_{\eta}) = \frac{\eta\,e^{-\lambda_i}}{1+e^{-\lambda_i}} -\frac{\eta\,e^{\lambda_i}}{1+e^{\lambda_i}} = \eta(1-2\theta_{i0}) \end{equation} where $\theta_{i0}=\logistic(\lambda_i)$ is the probability that team $i$ would win a game against a team with log-strength zero. This means that the MAP equations with the generalized logistic prior are \begin{equation} \eta + v_i = 2\eta\MP{\theta}_{i0} + \sum_{j=1}^{t} n_{ij}\MP{\theta}_{ij} \end{equation} This is just the same as we'd obtain from the maximum-likelihood equations after the addition of $2\eta$ ``fictitious games'' against a team with log-strength zero, half wins and half losses, for each team. As such, the MAP equations can be solved by a straightforward extension of Ford's method. With the Gaussian prior, the MAP equations become \begin{equation} v_i = \frac{\MP{\lambda}_i}{\sigma^2} + \sum_{j=1}^{t} n_{ij}\MP{\theta}_{ij} \end{equation} Note that these cannot in general be solved by iterating \begin{equation} \MP{\lambda}_i = \ln \left( \frac{ v_i - \frac{\MP{\lambda}_i}{2\sigma^2} }{ \sum_{j=1}^{t} \frac{n_{ij}}{e^{\MP{\lambda}_i}+e^{\MP{\lambda}_j}} } \right) \end{equation} as suggested in \cite{Phelan2017} because, for small values of $\sigma$, the argument of the logarithm may become negative. \subsection{College Hockey} \label{s:intro-collegehockey} The NCAA (National Collegiate Athletic Association) Men's Division I Ice Hockey competition consists, at present, of 60 teams which play approximately 30 to 40 games each during the season. At the end of the season, 16 teams are selected (the champions of six conference tournaments, plus an additional 10 teams chosen according to a set of selection criteria related to the outcomes of their games) to play in a single-elimination tournament to determine the national champion. As the games during the season are played within six conferences (with one team currently competing as an independent), with additional non-conference games, in-season tournaments, and conference playoff tournaments, teams will typically face schedules of differing strengths. Rating systems have thus been devised to evaluate their game results more fairly than would be possible by simply comparing winning percentages (fraction of games won). The selection criteria for the NCAA tournament are of this sort, notably the ratings percentage index (RPI) which combines a team's winning percentage with average winning percentages of its opponents and opponents' opponents. The maximum-likelihood Bradley-Terry strengths are also used, under the name ``Ken's Ratings for American College Hockey'' (KRACH)\cite{KRACH1993}. In addition to a win or a loss, some college hockey games can end in a tie. In computing NCAA selection criteria, a team which wins (whether in regulation play or overtime) is awarded 2 points, a team which loses receives 0 points, and if a game ends in a tie (after overtime), each team receives 1 point. (Penalty shootouts, which may occur after a tie in some competitions, are not considered for NCAA selection purposes.) In principle, one could use an extension of the Bradley-Terry model with an additional parameter or parameters accounting for the probability of ties. \cite{Rao1967,Davidson1970,Joe1990} However, this is complicated by the fact that some college hockey games can end in ties, while others (mostly conference playoff and NCAA tournament games, but also some games in in-season invitational tournaments) continue in overtime until a winner is decided. Rather than keep track of the two sorts of games, in this work we perform all computations with ties contributing $0.5$ to the win total and $0.5$ to the loss total for each team. While this introduces a conceptual inconsistency (since the formulas were derived without consideration for the possibility of ties), it poses no impediment to the calculations, and ties are rare enough that no pathological conclusions have yet been encountered. \section{Posterior Predictive Probabilities} \label{s:probabilities} In this paper, we are interested in the calculation of posterior predictive probabilities. I.e., given a set of results $D$ and a choice of prior $I$, so that the Bayesian Bradley-Terry model produces a posterior pdf $f(\{\lambda_i\}|D,I)$, what is the probability that some future games will have outcome $O$? This outcome may be a specified set of wins and losses, but it may also be a more coarse-grained alternative, such as that a particular team is chosen for the tournament field by winning its conference championship game or finishing the season well enough according to the selection criteria. If $P(O|\{\lambda_i\})$ is the probability of that outcome using the Bradley-Terry model with log-strengths $\{\lambda_i\}$ (which might itself be calculated according to some non-trivial summation technique) then the posterior predictive probability for $O$ given the previous results $D$ and prior information $I$ is obtained by marginalizing over the log-strengths: \begin{equation} \label{e:postpred} P(O|D,I) = \int_{-\infty}^{\infty}\cdots \int_{-\infty}^{\infty} P(O|\{\lambda_i\})\,f(\{\lambda_i\}|D,I)\, d^{t}\!\lambda \end{equation} While the integrand of \eqref{e:postpred} may be straightforward to construct, the $t$-dimensional integral is in general impossible to evaluate analytically and impractical to compute via direct numerical integration. One approach is to draw samples from the posterior $f(\{\lambda_i\}|D,I)$ via Markov Chain Monte Carlo methods, such as the Hamiltonian Monte Carlo used in \cite{Phelan2017}. In this paper, we consider simpler techniques which apply approximation methods. \subsection{MAP Evaluation} \label{s:probabilities-MAP} The simplest method is to use the Bradley-Terry model with the team strength parameters set to their maximum a posteriori values $\{\MP{\lambda}_i\}$, and evaluate $P(O|\{\MP{\lambda}_i\})$. This is equivalent to replacing the full posterior $f(\{\lambda_i\}|D,I)$ with a $t$-dimensional delta function at the MAP point. While this is convenient, it is clearly an oversimplification, since it fails to account for the posterior uncertainty in the team strengths. \subsection{Gaussian Approximation} \label{s:probabilities-gauss} One way to quantify the uncertainty in the posterior, and obtain a better approximation, is to Taylor expand the log-posterior $\lnf(\{\lambda_i\}|D,I)$ about the MAP point and obtain a Gaussian approximation \begin{equation} g(\{\lambda_i\}|D,I) =\text{const}\times \exp\left( -\frac{1}{2}\sum_{i=1}^{t}\sum_{j=1}^{t} \left[\lambda_i-\MP{\lambda}_i\right] H_{ij} \left[\lambda_j-\MP{\lambda}_j\right] \right) \end{equation} where the Hessian matrix $\{H_{ij}\}$ has elements \begin{equation} \begin{split} H_{ij} &= -\left. \frac{\partial^2}{\partial\lambda_i\,\partial\lambda_j} \lnf(\{\lambda_i\}|D,I) \right\rvert_{\{\lambda_k=\MP{\lambda}_k\}} \\ &= -n_{ij}\MP{\theta}_{ij}\MP{\theta}_{ji} + \delta_{ij}\sum_{k=1}^{t}\MP{\theta}_{ik}\MP{\theta}_{ki} - \left. \frac{\partial^2}{\partial\lambda_i\,\partial\lambda_j} \lnf(\{\lambda_i\}|I) \right\rvert_{\{\lambda_k=\MP{\lambda}_k\}} \end{split} \end{equation} For the Haldane prior, the last term vanishes; for the generalized logistic prior it is \begin{equation} -\left. \frac{\partial^2}{\partial\lambda_i\,\partial\lambda_j} \lnf(\{\lambda_i\}|I_{\eta}) \right\rvert_{\{\lambda_k=\MP{\lambda}_k\}} = \delta_{ij}\, \MP{\theta}_{i0}(1-\MP{\theta}_{i0}) \end{equation} and for the Gaussian prior, it is \begin{equation} -\left. \frac{\partial^2}{\partial\lambda_i\,\partial\lambda_j} \lnf(\{\lambda_i\}|I_{\sigma}) \right\rvert_{\{\lambda_k=\MP{\lambda}_k\}} = \frac{\delta_{ij}}{\sigma^2} \end{equation} The Gaussian approximation is a multivariate Gaussian distribution with mean $\{\MP{\lambda}_i\}$ and a variance-covariance matrix $\{\Sigma_{ij}\}$ which is the matrix inverse of the Hessian $\{H_{ij}\}$. Given a suitable prior distribution, $\{H_{ij}\}$ is invertible. Using the Haldane prior produces a Hessian matrix \begin{equation} H_{ij} = -n_{ij}\ML{\theta}_{ij}\ML{\theta}_{ji} + \delta_{ij}\sum_{k=1}^{t}\ML{\theta}_{ik}\ML{\theta}_{ki} = \sum_{k=1}^{t} h_k \ell^{(k)}_i \ell^{(k)}_j \end{equation} Where we have decomposed the Hessian matrix using its orthonormal eigenvectors $\sum_{i=1}^{t}\ell^{(k)}_i \ell^{(\ell)}_i=\delta_{k\ell}$, $\sum_{j=1}^{t}H_{ij}\ell^{(k)}_j=h_k \ell^{(k)}_i$, $h_i\le h_{i+1}$. There will be at least one zero eigenvalue $h_1=0$, corresponding to the eigenvector $\{\ell^{(1)}_i\}=\{\frac{1}{\sqrt{t}},\frac{1}{\sqrt{t}},\ldots,\frac{1}{\sqrt{t}}\}$. If all of the maximum-likelihood estimates $\{\ML{\lambda}_i-\ML{\lambda}_j\}$ are finite and well-determined\cite{Albert1984,Santner1986,ButlerWhelan}, which will nearly always be the case late in a season with as many games as college hockey, the other eigenvalues $\{h_i|i=2,\ldots,t\}$ will all be positive. Since the transformation $\lambda_i\rightarrow\lambda_i + a\ell^{(1)}_i$, for any $a\in\mathbb{R}$, doesn't change the probabilities $P(O|\{\lambda_i\})$, we can replace the Gaussian approximate distribution, which leaves $\sum_{i=1}^{t}\ell^{(1)}_i\lambda_i$ unspecified, and is therefore unnormalizable, with one which fixes $\sum_{i=1}^{t}\ell^{(1)}_i\lambda_i=0$. This is a multivariate Gaussian distribution whose mean is $\{\ML{\lambda}_i\}$ and whose variance-covariance matrix is the Moore-Penrose pseudo-inverse\cite{penrose_1955} of $H_{ij}$, i.e., \begin{equation} \Sigma_{ij} = \sum_{k=2}^{t} \frac{\ell^{(k)}_i \ell^{(k)}_j}{h_k} \ , \end{equation} defined such that \begin{equation} \sum_{k=1}^{t} \Sigma_{ik}H_{kj} = \sum_{k=1}^{t} H_{ik}\Sigma_{kj} = \delta_{ij} - \ell^{(1)}_i \ell^{(1)}_j \ . \end{equation} Depending on the specifics of the outcome $O$, it may be possible to evaluate the approximate integral \begin{equation} P(O|D,I) \approx \int_{-\infty}^{\infty}\cdots \int_{-\infty}^{\infty} P(O|\{\lambda_i\})\,g(\{\lambda_i\}|D,I)\, d^{t}\!\lambda \end{equation} analytically using the Gaussian approximation. More likely it will be necessary to use a Monte Carlo technique, drawing $N$ samples $\{\lambda_i^{(s)}\}$ from the multivariate Gaussian distribution $N_{t}(\{\MP{\lambda}_i\},\{\Sigma_{ij}\})$ and estimating \begin{equation} \label{e:gausssample} P(O|D,I) \approx \frac{1}{N} \sum_{s=1}^{N} P(O|\{\lambda_i^{(s)}\}) \end{equation} \subsection{Importance Sampling} \label{s:probabilities-importance} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{gaussimpratiohist} \caption{Histogram of weights in importance sampling using $1000$ draws from a multivariate ($t=60$, one degenerate degree of freedom) Gaussian sampling distribution with to approximate the Bradley-Terry posterior, starting with the Haldane prior and the results of the 2018-2019 NCAA Division I Men's Ice Hockey season prior to NCAA tournament selection. The dashed line indicates average weight of $0.001$.} \label{f:gaussimpratiohist} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{crosssection} \caption{Cross-section (conditional distribution) of the log-posterior $\lnf(\{\lambda_i^{(s)}\}|D,I)$ through the point with the highest weight in the Gaussian importance sampling. While the multivariate Gaussian is a good approximation for some distance from the MAP point, the presence of $t-1=59$ meaningful parameters means that even seemingly large outliers can occur in the Gaussian sample} \label{f:crosssection} \end{figure} Since $g(\{\lambda_i\}|D,I)$ is only an approximation to $f(\{\lambda_i\}|D,I)$, a natural correction to \eqref{e:gausssample} is to use importance sampling, weighting the probability $P(O|\{\lambda_i^{(s)}\})$ coming from each Monte Carlo draw by a factor \begin{equation} w_s \propto \frac{f(\{\lambda_i^{(s)}\}|D,I)}{g(\{\lambda_i^{(s)}\}|D,I)} \end{equation} so that \begin{equation} P(O|D,I) \approx \frac{\sum_{s=1}^{N} w_s P(O|\{\lambda_i^{(s)}\})} {\sum_{s=1}^{N} w_s} \ . \end{equation} If there are values of $\{\lambda_i\}$ for which \begin{equation} \frac{g(\{\lambda_i^{(s)}\}|D,I)}{f(\{\lambda_i^{(s)}\}|D,I)} \gg \frac{1}{N}\sum_{s'=1}^N \frac{g(\{\lambda_i^{(s')}\}|D,I)}{f(\{\lambda_i^{(s')}\}|D,I)} \ , \end{equation} the importance sampling procedure may produce erratic results. We see this effect when we use the Gaussian approximation for importance sampling. We see in \fref{f:gaussimpratiohist} that a few outliers produce large weight factors to try to adjust for the fact that the tail of the posterior is longer than that of the approximate Gaussian distribution. This is illustrated in \fref{f:crosssection}, which shows a slice through the log-posterior including the maximum-likelihood point $\{\ML{\lambda}_i\}$ and the point $\{\lambda_i^{(\hat{s})}\}$ with the largest importance sampling weight. The lower $x$-axis shows the projection of the vector $\{\lambda_i\}$ onto the unit vector $\{u_i\}$ defined by \begin{equation} u_i = \frac{\lambda_i^{(\hat{s})}-\ML{\lambda}_i} {\sqrt{\sum_{j=1}^t (\lambda_j^{(\hat{s})}-\ML{\lambda}_j)^2}} \end{equation} The upper $x$-axis shows the normalized distance \begin{equation} \sqrt{ \sum_{i=1}^{t}\sum_{j=1}^{t} \left[\lambda_i-\ML{\lambda}_i\right] H_{ij} \left[\lambda_j-\ML{\lambda}_j\right] } \end{equation} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{chi59dens} \caption{Marginal probability density function for the normalized distance from the maximum-likelihood point under multivariate Gaussian random sampling, which is a $\chi(59)$ random variable. Essentially all the probability weight is between 5 and 10 sigma from the ML point.} \label{f:chi59dens} \end{figure} from the maximum-likelihood point. The largest importance sampling rate occurs at a normalized distance of ${9.072}$-sigma from the ML point. This is not as large an outlier as it might seem. With $t-1=59$ meaningful parameters, the normalized distance in a Gaussian Monte Carlo will be a chi-distributed random variable with $t-1=59$ degrees of freedom, whose probability density function is shown in \fref{f:chi59dens}. It shows that the samples are overwhelmingly likely to be found between 5 and 10 sigma from the ML point. This means that using a ``heavy-tailed'' distribution such as the multivariate Student-$t$ distribution will not improve the situation. While the Student-$t$ distribution has more support at large distances relative to the maximum-likelihood point, essentially none of the random samples will be near the ML point. Instead, the differently-shaped tails of the $t$-distribution would cause points less far from the ML point to be undersampled relative to points farther out, producing larger outliers in the normalized weights. This is illustrated in \fref{f:crosssection} for a multivariate Student-$t$ distribution with $\nu=59$ degrees of freedom. The covariance matrix has been scaled up so that a one-dimensional ``slice'' through the maximum, i.e., the conditional distribution \cite{Ding2016} is a Student-$t$ distribution with $\nu+(t-1)-1$ degrees of freedom and (pseudo-)inverse scale matrix $\{H_{ij}\}$. Given that the departure of the posterior from normality (at least in this example) is a matter of slight skewness than heavy tails, an avenue for future exploration is importance sampling with a skew distribution, as proposed in \cite{Swartz2005,WangSwartz}. \section{Applications} \label{s:applications} \subsection{Evaluation via Bayes Factor} \label{s:applications-bayes} In \sref{s:probabilities}, we described methods to calculate or approximate the probability of future outcomes $O$ using the Bradley-Terry model. We now describe a simple method for evaluating any set of predictions. Suppose $P(O|M_1,D,I)$ and $P(O|M_2,D,I)$ are the probabilities assigned to a future outcome $O$ by two different methods $M_1$ and $M_2$, given past results $D$ and any additional information $I$. (These should be defined so that $\sum_O P(O|M,D,I)=1$ for any exhaustive set of mutually exclusive outcomes $\{O\}$.) A general method for comparing $M_1$ and $M_2$ is the Bayes factor \begin{equation} B_{12} = \frac{P(O|M_1,D,I)}{P(O|M_2,D,I)} \end{equation} which is the factor by which the posterior odds ratio for $M_1$ over $M_2$ increases relative to the prior odds ratio: \begin{equation} \frac{P(M_1|O,D,I)}{P(M_2|O,D,I)} = \frac{P(O|M_1,D,I)}{P(O|M_2,D,I)} \frac{P(M_1|I)}{P(M_2|I)} = B_{12} \frac{P(M_1|I)}{P(M_2|I)} \end{equation} We can apply this technique to any method of generating probabilities for future outcomes of hockey games (not just Bradley-Terry). We can think of the results $D$ as ``training data'' and the outcome $O$ as describing the ``evaluation data'' of the rest of the games. We consider a straightforward example, where the training data are the games of each season prior to tournament selection and the evaluation data are the NCAA tournament games, with $O$ being the actual sequence of results which occurred. Note that for this evaluation calculation, we don't actually need to know $P(O|M,D,I)$ for each possible outcome, only for the exact sequence of results which occurred. For convenience, we compare each model to a ``tossup model'' $M_0$ in which each team is assigned a 50\% chance to win each game, for which $P(O|M_0,D,I)=2^{-n_O}$ where $n_O$ is the number of games in the evaluation data set. Evidently $B_{12}=B_{10}/B_{20}$. If $M_{\text{mle}}$ is the MAP evaluation method of \sref{s:probabilities-MAP}, in which all probabilities are independently assigned using the maximum-likelihood Bradley-Terry estimates (the KRACH ratings), \begin{equation} B_{\text{mle}0} = \prod_{g=1}^{n_O} 2\ML{\theta}_{w_gl_g} \end{equation} where $w_g$ is the winner and $l_g$ the loser of game $g$. So we see that for each game predicted ``correctly'' (winner assigned a greater than 50\% probability), the Bayes factor increases by a factor of up to $2$. However, for each game predicted ``incorrectly'' (winner assigned a less than 50\% probability), the Bayes factor decreases. If a result occurs which the model considered impossible, the Bayes factor is zero. We can illustrate this with the results of the 2019 NCAA tournament, in \fref{f:KRACH2019BF} We see that the Bayes factor using all the results of the tournament is actually slightly lower than 1. This is because the upset of American International College defeating St.~Cloud State was such a surprise according to the model. \begin{figure}[t!] \label{f:KRACH2019BF} \centering \includegraphics[width=\textwidth]{KRACH2019BF} \caption{Evolution of the Bayes factor for the predictions of the maximum likelihood Bradley Terry model (KRACH) over the 2019 NCAA tournament. } \end{figure} If we compute the Bayes factor using the predictions and outcomes of multiple NCAA tournaments (using the game results from each season to produce probabilities for that season's tournament), we begin to see distinctions between models. In \fref{f:NCAABF} we plot the evolution of this cumulative Bayes factor over the NCAA tournaments from 2003 (the first year of the current 16-team format) to 2019. In addition to the maximum likelihood/KRACH model, we plot the Bayes factor for a model with a generalized logistic prior with $\eta=1$ (estimated using the Gaussian approximation and 20,000 Monte Carlo draws)\footnote{Note that \fref{f:NCAABF} contains the results of four different Monte Carlo simulations (each with 20,000 draws for each season) plotted on top of one another, to illustrate that the integrals of the Gaussian-approximated posterior have been estimated accurately. If a similar exercise is performed with Gaussian importance sampling, the four simulations give vastly different posterior predictive probabilities, indicating the algorithm is not stable enough to estimate the small probability associated with one particular sequence of results.}, along with a simple model based on the win ratios $v_i/(n_i-v_i)$ for each team, where the probability that team $i$ will beat team $j$ is assumed to be $\theta^{\text{wr}}_{ij}$, where \begin{equation} \frac{\theta^{\text{wr}}_{ij}}{\theta^{\text{wr}}_{ji}} = \frac{\theta^{\text{wr}}_{ij}}{1-\theta^{\text{wr}}_{ij}} = \sqrt{\frac{v_i}{n_i-v_i}\frac{n_j-v_j}{v_j}} \end{equation} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{NCAABF} \caption{Evolution of the Bayes factor for the predictions of the three models over the NCAA tournament since the 16-team format was introduced in 2003: the maximum likelihood Bradley Terry model (KRACH), a model with a generalized logistic prior with $\eta=1$ and a na\"{\i}ve model where the probability for a team to win a game is proportional to the square root of its win ratio (wins divided by losses) without regard to strength of schedule.} \label{f:NCAABF} \end{figure} We can see that 17 tournaments of 15 games each are enough to show that the Bradley-Terry model is clearly preferred to the model using win ratios without including strength of schedule, which is in turn better than declaring each game a tossup. It is not enough, however, to establish a preference between the Haldane and generalized logistic priors, although their predictions have not always been identical. \subsection{The Pairwise Probability Matrix} \label{s:applications-matrix} The Pairwise Probability Matrix \cite{Wodon2017} is a tool to predict the probability that each team will make the NCAA tournament. It typically runs with a few weeks remaining before the end of the conference tournaments and the selection of the tournament field. In its current configuration (2018-2019 season), it takes a set of Bradley-Terry log-strengths $\{\lambda_i\}$ and estimates the probability $P(O|\{\lambda_i\})$ for an outcome $O$ (typically a team being selected for the NCAA tournament) as follows: \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{probabilitymatrix-crop} \caption{An excerpt of the Pairwise Probability Matrix display, displaying estimated probabilities entering the final day of games (2019 March 23) before NCAA tournament selection. Excerpt from \texttt{https://www.collegehockeynews.com/ratings/probabilityMatrix.php}} \label{f:probabilitymatrix} \end{figure} \begin{enumerate} \item A set of $N=20,\!000$ Monte Carlo trials are run. In each trial: \begin{enumerate} \item The remaining games of the season are simulated; in each game, a winner is randomly chosen according to the probability predicted by the Bradley-Terry model. For instance, if team $i$ plays team $j$, the probability that $i$ will win is modelled as $\theta_{ij}=\logistic(\lambda_i-\lambda_j)$, and team $i$ is assigned as the winner if a $\text{Uniform}(0,1)$ random draw is less than $\theta_{ij}$. \item The games to be played are not pre-determined, but may depend on the results of other games earlier in the simulation (e.g., the loser of a game may be eliminated from a conference tournament). \item When all the games have been simulated, teams are evaluated according to the NCAA selection criteria, including an ordering based on pairwise comparisons, and automatic qualification for the winners of conference tournaments. \end{enumerate} \item The probability of an outcome $O$ is approximated as the fraction of Monte Carlo simulations in which it occurs. \end{enumerate} At present, the ratings used are the maximum likelihood estimates $\{\ML{\lambda_i}\}$, expressed as KRACH ratings $\{100\,e^{\ML{\lambda_i}}\}$, so that the probability of a future outcome given past game results $D$ is approximated as in \sref{s:probabilities-MAP}: \begin{equation} P(O|D,I) \approx P(O|\{\ML{\lambda}_i\}) \approx \frac{1}{N}\sum_{s=1}^N I^{(s)}(O) \ , \end{equation} where $I^{(s)}(O)=1$ if $O$ occurs in Monte Carlo trial $s$ and $0$ if not. An excerpt of a typical display, taken before the final day of games of the 2018-2019 season, is shown in \fref{f:probabilitymatrix}. \subsubsection{Shortcomings of the MLE Probabilities} \label{s:applications-matrix-CrQn} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{gaussimpCrQnprob} \caption{Marginal posterior distribution on $\theta_{\text{Cr}\text{Qn}}$, the probability for Cornell to defeat Quinnipiac using the Haldane prior. Note that the maximum likelihood estimate $\ML{\theta}_{\text{Cr}\text{Qn}}$ associated with the KRACH ratings is not the maximum of the marginal posterior, because of the transformation of the probability density function. The theoretical curve uses the Gaussian approximation, and the histograms are four replications of the marginal posterior estimated using importance sampling with the Gaussian approximation and 20,000 samples each, as described in \sref{s:applications-matrix-demo}} \label{f:CrQnprob} \label{f:gaussimpCrQnprob} \end{figure} As demonstrated in \sref{s:applications-bayes}, the KRACH/MLE Bradley-Terry model produces reasonably accurate predictions when applied late in the college hockey season, based on the use of the model to assign probabilities to NCAA tournament outcomes. However, it can lead to some potentially inaccurate probabilities, in particular in underestimating the probabilities of unlikely events or sequences of events. As an illustration, we consider the situation on 2018 March 9, when Cornell and Quinnipiac began a best-of-three playoff series. Their respective KRACH ratings were $415.3$ and $93.30$, so the estimated probability of Cornell winning the game was $81.7\%$. However, there was still some uncertainty in the difference of their Bradley-Terry log-strengths, as illustrated in \fref{f:CrQnprob}. Applying the Gaussian approximation of \sref{s:probabilities-gauss}, we get posterior predictive probability for Cornell to defeat Quinnipiac of \begin{equation} \int_0^1 \theta_{\text{Cr}\text{Qn}}\,f(\theta_{\text{Cr}\text{Qn}}|D,I) \,d\theta_{\text{Cr}\text{Qn}} \approx80.0\% \end{equation} \begin{figure}[t!] \centering \includegraphics[width=\textwidth]{gaussimpCrQnseries} \caption{Marginal posterior distribution on the probability $\theta_{\text{Cr}\text{Qn}}^2 + 2(1-\theta_{\text{Cr}\text{Qn}})\theta_{\text{Cr}\text{Qn}}^2$ for Cornell to defeat Quinnipiac in a best-of-three series, using the Haldane prior. The theoretical curve uses the Gaussian approximation, and the histograms are four replications of the marginal posterior estimated using importance sampling with the Gaussian approximation and 20,000 samples each, as described in \sref{s:applications-matrix-demo}} \label{f:CrQnseries} \label{f:gaussimpCrQnseries} \end{figure} An additional effect of the uncertainty is that the game results are not independent. If Cornell lost one game with Quinnipiac, it would mean the difference of their Bradley-Terry log-strengths was more likely to be below $\ML{\lambda}_{\text{Cr}}-\ML{\lambda}_{\text{Qn}}$ than above it, and the adjusted posterior probability they would lose another game would be higher.\footnote{In practice, one calculates the probability for the whole sequence of results, but it can be conceptually understood according to the Bayesian updating of posteriors, where $P(O_1,O_2|D,I)=P(O_2|O_1,D,I)P(O_1|D,I)$.} This is reflected in \fref{f:CrQnseries}, which shows that while the probabilities from the KRACH ratings would give Cornell a {91.1}\% chance to win two out of three games with Quinnipiac, the actual posterior predictive probability (using the Gaussian approximation) is \begin{equation} \int_0^1 \left[ \theta_{\text{Cr}\text{Qn}}^2 + 2(1-\theta_{\text{Cr}\text{Qn}})\theta_{\text{Cr}\text{Qn}}^2 \right] \, f(\theta_{\text{Cr}\text{Qn}}|D,I) \,d\theta_{\text{Cr}\text{Qn}} \approx88.2\% \end{equation} \subsubsection{Proposed Modification to the Pairwise Probability Matrix} \label{s:applications-matrix-modification} Re-calculating the KRACH ratings to account for each simulated game result would address the correlations between game results, but not the uncertainties arising from the asymmetries of the marginal distributions for probabilities like $\theta_{\text{Cr}\text{Qn}}$. It would also be rather computationally intensive. Instead, we propose to modify the Monte Carlo algorithm to improve the estimate of probabilities using the Gaussian approximation of \sref{s:probabilities-gauss} or the importance sampling method of \sref{s:probabilities-importance}. The modified Monte Carlo workflow would be \begin{enumerate} \item The multivariate Gaussian approximation is constructed to the posterior distribution from the Bradley-Terry log-strengths using the Haldane prior with the constraint $\sum_{i=1}^{t} \lambda_i=0$; the peak is at the maximum-likelihood point $\{\ML{\lambda_i}\}$ and the variance-covariance matrix is the pseudo-inverse $\{\Sigma_{ij}\}$ of the Hessian matrix $H_{ij} = -n_{ij}\ML{\theta}_{ij}\ML{\theta}_{ji} + \delta_{ij}\sum_{k=1}^{t}\ML{\theta}_{ik}\ML{\theta}_{ki}$. \item A set of $N=20,\!000$ Monte Carlo trials are run. In each trial: \begin{enumerate} \item A random draw $\{\lambda^{(s)}_{i}|i=1,\ldots,t\}$ is made from the multivariate normal $N_{t}(\{\MP{\lambda}_i\},\{\Sigma_{ij}\})$ \item If importance sampling is to be used, the ratio $w_s \propto \frac{f(\{\lambda_i^{(s)}\}|D,I)}{g(\{\lambda_i^{(s)}\}|D,I)}$ of the exact posterior to the sampling distribution, at the point $\{\lambda^{(s)}_{i}\}$, is recorded. \item The games are simulated using a win probability matrix\\ $\theta^{(s)}_{ij}=\logistic(\lambda^{(s)}_i-\lambda^{(s)}_j)$ as in the current algorithm. \item The sequence of games and NCAA selection criteria are created from the series of game results as they are now. \end{enumerate} \item If importance sampling is not used, the probability of an outcome $O$ is approximated as the fraction of Monte Carlo simulations in which it occurs \begin{equation} P(O|D,I) \approx \frac{1}{N}\sum_{s=1}^N I^{(s)}(O) \end{equation} If importance sampling is used, the outcomes are weighted by the ratio $w_s$, normalized such that $\sum_{s=1}^N w_s=1$: \begin{equation} P(O|D,I) \approx \frac{\sum_{s=1}^N w_s\,I^{(s)}(O)}{\sum_{s=1}^N w_s} = \sum_{s=1}^N w_s\,I^{(s)}(O) \end{equation} \end{enumerate} \subsubsection{Demonstration of Modifications} \label{s:applications-matrix-demo} The modifications proposed in \\ \sref{s:applications-matrix-modification} have not yet been integrated into the generation of the Pairwise Probability Matrix. However, we can demonstrate their impact by recomputing the probabilities shown in \sref{s:applications-matrix-CrQn}. Using the game results of the 2018-2019 season prior to 2018 March 9, we construct the Gaussian approximation $g(\{\lambda_i\}|D,I)$ to the posterior $f(\{\lambda_i\}|D,I)$. We then draw $N=20,\!000$ samples $\{\lambda_i^{(s)}\}$ from this distribution, and calculate the weights $w_s\propto\frac{f(\{\lambda_i^{(s)}\}|D,I)}{g(\{\lambda_i^{(s)}\}|D,I)}$. For each sample, we have a probability $\theta_{\text{Cr}\text{Qn}}^{(s)}=\logistic(\lambda^{(s)}_{\text{Cr}}-\lambda^{(s)}_{\text{Wn}})$ that Cornell will defeat Quinnipiac in a game, and a probability \begin{equation} \pi_{\text{Cr}\text{Qn}}^{(s)} = (\theta_{\text{Cr}\text{Qn}}^{(s)})^2 + 2 (1-\theta_{\text{Cr}\text{Qn}}^{(s)})(\theta_{\text{Cr}\text{Qn}}^{(s)})^2 \end{equation} that Cornell will win a three-game series. We simulate a subset of the Pairwise Probability Matrix Monte Carlo as follows. For each sample $s$ we make three draws from a Bernoulli distribution with probability $\theta_{\text{Cr}\text{Qn}}^{(s)}$. If the first draw, $W_{\text{Cr}\text{Qn}}^{(s)}$, is one, we assign that sample as a win for Cornell; if it is zero, we assign that as a loss for Cornell. If two or more of the three draws for a sample are one, we set $S_{\text{Cr}\text{Qn}}^{(s)}=1$ (series win for Cornell); otherwise we set $S_{\text{Cr}\text{Qn}}^{(s)}=0$ (series loss for Cornell). \begin{table}[t!] \label{t:simsCrQn} \centering \caption{Results of simulations using the Gaussian approximation with and without importance sampling to estimate the probability, expressed as a percentage, of Cornell winning a game, or a best-of-three series, with Quinnipiac, as of 2018 March 9.} \begin{tabular}{l|c|c|c} \multicolumn{4}{c}{Game (KRACH probability = $81.7\%$)} \\ \hline & integration & MC integration & MC simulation \\ \hline Gaussian approx & $80.0$ & $80.0$, $80.1$, $80.0$, $79.9$ & $80.2$, $80.0$, $79.7$, $79.8$ \\ \hline \multicolumn{2}{c|}{Importance sampling} & $81.8$, $81.7$, $81.4$, $81.5$ & $81.8$, $81.6$, $81.8$, $81.9$ \end{tabular} \begin{tabular}{l|c|c|c} \multicolumn{4}{c}{Series (KRACH probability = $91.1\%$)} \\ \hline & integration & MC integration & MC simulation \\ \hline Gaussian approx & $88.2$ & $88.2$, $88.3$, $88.1$, $88.0$ & $88.3$, $88.5$, $87.7$, $87.9$ \\ \hline \multicolumn{2}{c|}{Importance sampling} & $89.8$, $89.8$, $89.5$, $89.6$ & $89.8$, $89.9$, $89.6$, $89.7$ \end{tabular} \end{table} To estimate the probability of Cornell winning a single game against Quinnipiac, assuming the Gaussian approximation (which was analytically computed in \sref{s:applications-matrix-CrQn} to be $80.0\%$ by numerical integration of the marginal Gaussian posterior on $\lambda_{\text{Cr}}-\lambda_{\text{Qn}}$), we can perform two different calculations: A Monte Carlo average $\frac{1}{N}\sum_{s=1}^N \theta_{\text{Cr}\text{Qn}}^{(s)}$ of the single-game probability, or the fraction $\frac{1}{N}\sum_{s=1}^N W_{\text{Cr}\text{Qn}}^{(s)}$ of the of simulations in which Cornell wins the first game. The latter is the analogue of what would be computed in the Pairwise Probability Matrix. To adjust the single-game computation using importance sampling, we again have two options: A weighted Monte Carlo average $\sum_{s=1}^N w_s\,\theta_{\text{Cr}\text{Qn}}^{(s)}$ of the single-game probability, or the sum of the weights $\sum_{s=1}^N w_s\,W_{\text{Cr}\text{Qn}}^{(s)}$ of the of simulations in which Cornell wins the first game. The latter is the analogue of what would be computed in the Pairwise Probability Matrix. To test these, and estimate Monte Carlo errors, we performed four replications of the whole process (with 20,000 Monte Carlo samples each). The histograms of the simulated probabilities $\theta_{\text{Cr}\text{Qn}}^{(s)}$, weighted by $w_s$, are plotted in \fref{f:gaussimpCrQnprob}. We see that there are some heavily-weighted outliers (the largest weights in the four replications are $0.00399$, $0.00686$, $0.00488$, and $0.00509$, compared to an average weight of $0.00005$). However, when we estimate the single-game probabilities using importance sampling, summarized in \tref{t:simsCrQn}, they all come out consistently, slightly below 82\%, and we can distinguish a small difference between the probability predicted with and without importance sampling. This is also reflected in the histograms in \fref{f:gaussimpCrQnprob}, where we can see that, despite the outliers, the overall shape of the estimated posterior appears to be skewed a bit further right than the one derived from the Gaussian approximation on $\{\lambda_i\}$. Note that the effects of including the posterior uncertainty, and going from the Gaussian approximation to the posterior estimated by importance sampling, cancel out, and the estimated probability is quite close to that calculated from the maximum-likelihood/KRACH approximation. We will see when we consider three-game series that this cancellation is a coincidence. To estimate the probability of Cornell winning a best-of-three series against Quinnipiac, assuming the Gaussian approximation (which was computed in\\ \sref{s:applications-matrix-CrQn} using numerical integration as $88.2\%$), we can again perform two calculations: A Monte Carlo average $\frac{1}{N}\sum_{s=1}^N \pi_{\text{Cr}\text{Qn}}^{(s)}$ of the single-game probability, or the fraction $\frac{1}{N}\sum_{s=1}^N S_{\text{Cr}\text{Qn}}^{(s)}$ of the of simulations in which Cornell wins the first game. The latter is the analogue of what would be computed in the Pairwise Probability Matrix. Similarly, when we use importance sampling, we can compute either a weighted Monte Carlo average $\sum_{s=1}^N w_s\,\pi_{\text{Cr}\text{Qn}}^{(s)}$ of the best-of-three probability, or the sum of the weights $\sum_{s=1}^N w_s\,S_{\text{Cr}\text{Qn}}^{(s)}$ of the of simulations in which Cornell wins the three-game series. The latter is the analogue of what would be computed in the Pairwise Probability Matrix. The histograms of the simulated probabilities $\pi_{\text{Cr}\text{Qn}}^{(s)}$, weighted by $w_s$, are plotted in \fref{f:gaussimpCrQnseries}, and the probabilities are summarized in \tref{t:simsCrQn}. We see that the Monte Carlo simulations of the games are somewhat more robust than the Monte Carlo averages, but the results are consistent, just below 90\%, and noticeably different from both the Gaussian approximation (about 88\%) and the maximum likelihood/KRACH probability of 91.1\%. \section{Discussion} We have illustrated some applications of the Bradley-Terry model to college hockey. The model, in its maximum-likelihood form, is already used to rank teams as the basis of the KRACH ratings. Because the Bradley-Terry strength parameters naturally produce probabilities of game outcomes, the model can also be used for the prediction of future outcomes based on past results. In \sref{s:probabilities} we showed how to go beyond the maximum-likelihood values of these probabilities to account for posterior uncertainties in the parameters and estimate posterior predictive probabilities. One can avoid the use of full Markov Chain Monte Carlo methods by approximating the relevant marginalization integrals using a multivariate Gaussian approximation to the posterior and/or importance sampling. In \sref{s:applications} we exhibited two applications of these posterior predictive probabilities. The first used these probabilities to evaluate the models (Bradley-Terry or otherwise) generating them. Constructing a Bayes factor for the NCAA tournament results using the probabilities predicted using the pre-tournament results shows, over time, the superiority of Bradley-Terry models to a na\"{\i}ve model based only on each team's win/loss ratio. It would be illuminating to compare the Bradley-Terry model to more sophisticated alternatives such as the Ratings Percentage Index (RPI), but that is non-trivial because the RPI doesn't naturally produce predictive probabilities. Finally, the Pairwise Probability Matrix is a natural application of the Bradley-Terry model to assign probabilities to the outcome of the last few weeks of a college hockey season, in terms of which teams qualify for the NCAA tournament. The current application uses Monte Carlo simulation to estimate these probabilities from the maximum-likelihood Bradley-Terry parameters (KRACH ratings). We have proposed a modification to this program where, at each Monte Carlo iteration the ratings are also randomly drawn from an approximation to their posterior distribution. This should more accurately account for posterior uncertainties in the parameters and induced correlations of future game outcomes. \bibliographystyle{acm}
\section{Introduction} A generalized quantum group ${\mc U}(\epsilon)$ associated to $\epsilon=(\epsilon_1,\ldots,\epsilon_n)$ with $\epsilon_i\in\{0,1\}$ is a Hopf algebra introduced in \cite{KOS}, which appears in the study of solutions to the tetrahedron equation or the three-dimensional Yang-Baxter equation. The generalized quantum group ${\mc U}(\epsilon)$ of type $A$ is equal to the usual quantum affine algebra of type $A_{n-1}^{(1)}$, when $\epsilon$ is homogeneous, that is, $\epsilon_i=\epsilon_j$ for all $i\neq j$. But it becomes a more interesting object when $\epsilon$ is non-homogeneous, which is closely related to the quantized enveloping algebra associated to an affine Lie superalgebra \cite{Ya99}, or which can be viewed as an affine analogue of the quantized enveloping algebra of the general linear Lie superalgebra $\mathfrak{gl}_{M|N}$ \cite{Ya94}, where $M$ and $N$ are the numbers of $0$ and $1$ in $\epsilon$, respectively. We remark that the subalgebra $\ring{\mc U}(\epsilon)$ of ${\mc U}(\epsilon)$ associated to the Lie superalgebra $\mathfrak{gl}_{M|N}$ was also introduced in \cite{CWZ} independently, as symmetries appearing in the study of wave functions of quantum mechanical systems \cite{Za}. When the parameter $\epsilon$ is standard, that is, $\epsilon_{M|N}=(0^M,1^N)$, it is shown in \cite{KOS} that there exists a unique $R$ matrix on the tensor product of finite-dimensional ${\mc U}(\epsilon_{M|N})$-modules $\mc{W}_{s,\epsilon}(x)$, which correspond to fundamental representations of type $A_{N-1}^{(1)}$ with spectral parameter $x$ when $N\geq 3$. Indeed, the $R$ matrix is obtained by reducing the solution of the tetrahedron equation, and the uniqueness follows from the irreducibility of tensor product $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ for generic $x$ and $y$. An explicit spectral decomposition of the associated $R$ matrix is obtained by analyzing the maximal vectors with respect to $\ring{\mc U}(\epsilon_{M|N})$. By applying fusion construction using the $R$ matrix in \cite{KOS}, a family of irreducible ${\mc U}(\epsilon_{M|N})$-modules is constructed in \cite{KO}, which are parametrized by rectangular partitions inside an $(M|N)$-hook. Moreover the existence of their crystal base is proved together with a combinatorial description of the associated crystal graphs. It can be viewed as a natural super-analogue of Kirillov-Reshetikhin modules (simply KR modules) of type $A_{\ell}^{(1)}$, which is a most important family of finite-dimensional irreducible modules of quantum affine algebras (cf.~\cite{CH,KR2}). The results in \cite{KOS} and \cite{KO} suggests that there is a close connection between finite-dimensional representations of ${\mc U}(\epsilon_{M|N})$ and $U_q(A_{n-1}^{(1)})$. The purpose of this paper is to extend the results in \cite{KOS} and \cite{KO} to arbitrary parameter sequence $\epsilon$, and find a more concrete connection between the finite-dimensional representations of ${\mc U}(\epsilon)$ and $U_q(A_{\ell}^{(1)})$. From a viewpoint of representations of $\mathfrak{gl}_{M|N}$, the sequence $\epsilon$ represents the type of Borel subalgebras of $\mathfrak{gl}_{M|N}$, which are not conjugate to each other. It is not obvious whether the representation theory of ${\mc U}(\epsilon)$ is the same under a different choice of permutations of $\epsilon_{M|N}$. For example, if we change the Borel in the generalized quantum group, then the defining relations and the crystal structure associated to ${\mc U}(\epsilon)$-modules become much different from the ones with respect to $\epsilon_{M|N}$ as $\epsilon$ gets far from $\epsilon_{M|N}$ (cf.~\cite{BKK,K09}). We first show that there exists a unique $R$ matrix on the tensor product of finite-dimensional ${\mc U}(\epsilon)$-modules $\mc{W}_{s,\epsilon}(x)$ of fundamental type (Theorem \ref{thm:existence of R-matrix}). Since the existence of $R$ matrix for arbitrary $\epsilon$ was shown in \cite{KOS}, it suffices to prove the irreducibility of tensor product $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ for generic $x$ and $y$. We use a method completely different from \cite{KOS}. Indeed, motivated by the work \cite{CL}, we introduce a functor called {truncation}, and show that it sends any ${\mc U}(\epsilon)$-module with polynomial weights to a ${\mc U}(\epsilon')$-module, preserving the comultiplications in tensor product, where $\epsilon'$ is a subsequence of $\epsilon$. This in particular enables us to define an oriented graph structure on $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ when $x=y=1$ with additional arrows other than the ones associated to ${\mc U}(\epsilon)$. With this structure, we prove the connectedness of the crystal (Theorem \ref{thm:main theorem-1}), and hence the irreducibility for generic $x$ and $y$. Next, we prove that the truncation functor is compatible with the $R$ matrix. This immediately implies that the spectral decomposition of the $R$ matrix for ${\mc U}(\epsilon)$ is the same as that of type $A_{\ell}^{(1)}$ (Theorem \ref{thm:spectral decomp}) and hence does not depend on the choice of $\epsilon$. As an application, we construct a family of irreducible ${\mc U}(\epsilon)$-modules $\mc{W}^{(r)}_{s,\epsilon}$ which yields the usual KR modules under truncation (Theorem \ref{thm:W_s^{(r)}}). We conjecture that $\mc{W}^{(r)}_{s,\epsilon}$ has a crystal base as in the case of $\epsilon=\epsilon_{M|N}$. We expect that the compatibility of truncation with the $R$ matrix will also play a crucial role in understanding arbitrary finite-dimensional ${\mc U}(\epsilon)$-modules in connection with those of type $A_\ell^{(1)}$. There are other recent works on the finite-dimensional representations of quantum affine {\em superalgebra} associated to $\mathfrak{gl}_{M|N}$ \cite{Z14,Z16,Z17}. It would be interesting to compare with these results. The paper is organized as follows. In Section \ref{sec:GQG}, we review basic materials for a generalized quantum group and its crystal base. In Section \ref{sec:poly reps}, we present the classical Schur-Weyl duality for $\ring{\mc U}(\epsilon)$ and then realize the irreducible polynomial representation of $\ring{\mc U}(\epsilon)$. In Section \ref{sec:R matrix}, we prove the main theorem on the existence of the $R$ matrix. In Section \ref{sec:KR modules}, we construct KR type modules of ${\mc U}(\epsilon)$ using the $R$ matrix.\vskip 3mm {\bf Acknowledgement} The authors would like to thank Euiyong Park and Masato Okado for helpful discussions and thank Shin-Myung Lee for careful reading of the manuscript and comments. \section{Generalized quantum group ${\mc U}(\epsilon)$ of type $A$}\label{sec:GQG} \subsection{Generalized quantum group} We fix a positive integer $n\geq 4$. Let $\epsilon=(\epsilon_1,\cdots,\epsilon_n)$ be a sequence with $\epsilon_i\in \{0,1\}$ for $1\leq i\leq n$. We denote by $\mathbb{I}$ the linearly ordered set $\{1<2<\cdots <n\}$ with $\mathbb{Z}_2$-grading given by $\mathbb{I}_0=\{\,i\,|\,\epsilon_i=0\,\}$ and $\mathbb{I}_1=\{\,i\,|\,\epsilon_i=1\,\}$. We assume that $M$ is the number of $i$ with $\epsilon_i=0$ and $N$ is the number of $i$ with $\epsilon_i=1$ in $\epsilon$. We denote by $\epsilon_{M|N}$ the sequence when $\epsilon_1=\dots=\epsilon_M=0$ and $\epsilon_{M+1}=\dots=\epsilon_n=1$. Let $P=\bigoplus_{i\in \mathbb{I}}\mathbb{Z}\delta_i$ be the free abelian group generated by $\delta_i$ with a symmetric bilinear form $(\,\cdot\,|\,\cdot\,)$ given by $(\delta_i|\delta_j)=(-1)^{\epsilon_i}\delta_{ij}$ for $i,j\in \mathbb{I}$. Let $\{\,\delta^\vee_i\,|\,i\in \mathbb{I}\,\}\subset P^\vee:={\rm Hom}_\mathbb{Z}(P,\mathbb{Z})$ be the dual basis such that $\langle \delta_i, \delta^\vee_j \rangle =\delta_{ij}$ for $i,j\in \mathbb{I}$. Let $I=\{\,0,1,\ldots,n-1\,\}$ and \begin{equation*}\label{eq:simple root} \alpha_i=\delta_i-\delta_{i+1},\quad \alpha_i^\vee = \delta^\vee_i-(-1)^{\epsilon_i+\epsilon_{i+1}}\delta^\vee_{i+1} \quad (i\in I). \end{equation*} Throughout the paper, we understand the subscript $i\in I$ modulo $n$. When $\epsilon=\epsilon_{M|N}$, the Dynkin diagram associated to the Cartan matrix $(\langle \alpha_j,\alpha^\vee_i \rangle)_{0\leq i,j\leq n}$ is \vskip 4mm \begin{center} \hskip -4cm \setlength{\unitlength}{0.25in} \begin{picture}(24,4) \put(7.95,1){\makebox(0,0)[c]{$\bigcirc$}} \put(10.2,1){\makebox(0,0)[c]{$\cdots$}} \put(12.4,1){\makebox(0,0)[c]{$\bigcirc$}} \put(16.3,1){\makebox(0,0)[c]{$\bigcirc$}} \put(18.45,1){\makebox(0,0)[c]{$\cdots$}} \qbezier(8.1,1.25)(10.4,3.4)(14.2,3.5) \qbezier(14.8,3.5)(18.45,3.4)(20.45,1.25) \put(8.2,1){\line(1,0){1.5}} \put(10.6,1){\line(1,0){1.5}} \put(12.7,1){\line(1,0){1.5}} \put(14.8,1){\line(1,0){1.2}} \put(16.55,1){\line(1,0){1.4}} \put(18.9,1){\line(1,0){1.4}} \put(14.5,1){\makebox(0,0)[c]{$\bigotimes$}} \put(14.5,3.5){\makebox(0,0)[c]{$\bigotimes$}} \put(20.6,1){\makebox(0,0)[c]{$\bigcirc$}} \put(14.5,2.8){\makebox(0,0)[c]{\tiny $\alpha_{0}$}} \put(14.5,0.3){\makebox(0,0)[c]{\tiny $\alpha_{M}$}} \put(8,0.3){\makebox(0,0)[c]{\tiny $\alpha_{1}$}} \put(20.6,0.3){\makebox(0,0)[c]{\tiny $\alpha_{n-1}$}} \put(12.5,0.3){\makebox(0,0)[c]{\tiny $\alpha_{M-1}$}} \put(16.4,0.3){\makebox(0,0)[c]{\tiny $\alpha_{M+1}$}} \end{picture} \end{center}% \noindent where $\bigotimes$ denotes an isotropic simple root. Let $q$ be an indeterminate. We put $I_{\rm even}=\{\,i\in I\,|\,(\alpha_i|\alpha_i)=\pm 2\,\}$ and $I_{\rm odd}=\{\,i\in I\,|\,(\alpha_i|\alpha_i)=0\,\}$, and set \begin{equation*} q_i=(-1)^{\e_i} q^{(-1)^{\e_i}}= \begin{cases} q & \text{if $\epsilon_i=0$},\\ -q^{-1} & \text{if $\epsilon_i=1$},\\ \end{cases} \quad (i\in I). \end{equation*} \begin{df}\label{def:U(e)} {\rm We define ${{\mc U}}(\epsilon)$ to be the associative $\mathbb{Q}(q)$-algebra with $1$ generated by $q^{h}, e_i, f_i$ for $h\in P^\vee$ and $i\in I$ satisfying {\allowdisplaybreaks \begin{align} & q^0=1, \quad q^{h +h'}=q^{h}q^{h'} \hskip 2.5cm (h, h' \in P^{\vee}),\label{eq:Weyl-rel-1} \\ & \omega_je_i\omega_j^{-1}=q_{j}^{\langle\alpha_i,\delta_j^\vee\rangle}e_i,\quad \omega_jf_i\omega_j^{-1}=q_{j}^{-\langle\alpha_i,\delta_j^\vee\rangle}f_i, \label{eq:Weyl-rel-2} \\ & e_if_j - f_je_i =\delta_{ij}\frac{\omega_i\omega_{i+1}^{-1} - \omega_i^{-1}\omega_{i+1}}{q-q^{-1}},\label{eq:Weyl-rel-3}\\ & e_i^2= f_i^2 =0 \hskip 4.5cm (i\in I_{\rm odd}),\label{eq:Weyl-rel-4} \end{align} where $\omega_j=q^{(-1)^{\e_i}\delta^\vee_j}$ ($j\in \mathbb{I}$), and the Serre-type relations \begin{equation}\label{eq:Serre-rel-1} \begin{split} &\ \, e_i e_j - e_j e_i = f_i f_j - f_j f_i =0, \hskip 1cm \text{($|i-j|>1$)},\\ & \begin{array}{ll} e_i^2 e_j- (-1)^{\epsilon_i}[2] e_i e_j e_i + e_j e_i^2= 0,\\ f_i^2 f_j- (-1)^{\epsilon_i}[2] f_i f_j f_i+f_j f_i^2= 0, \end{array} \ \hskip 1cm\text{($i\in I_{\rm even}$ and $|i-j|=1$)}, \end{split} \end{equation} and \begin{equation}\label{eq:Serre-rel-2} \begin{array}{ll} e_{i}e_{i-1}e_{i}e_{i+1} - e_{i}e_{i+1}e_{i}e_{i-1} + e_{i+1}e_{i}e_{i-1}e_{i} \\ \hskip 2cm - e_{i-1}e_{i}e_{i+1}e_{i} + (-1)^{\epsilon_i}[2]e_{i}e_{i-1}e_{i+1}e_{i} =0, \\ f_{i}f_{i-1}f_{i}f_{i+1} - f_{i}f_{i+1}f_{i}f_{i-1} + f_{i+1}f_{i}f_{i-1}f_{i} \\ \hskip 2cm - f_{i-1}f_{i}f_{i+1}f_{i} + (-1)^{\epsilon_i}[2]f_{i}f_{i-1}f_{i+1}f_{i} =0, \end{array}\quad \text{($i\in I_{\rm odd}$)}. \end{equation}} We call ${\mc U}(\epsilon)$ the {\em generalized quantum group of affine type $A$ associated to $\epsilon$} (see \cite{KOS}). } \end{df} Put $k_i=\omega_i\omega_{i+1}^{-1}$ for $i\in I$. Then we have for $i,j\in I$ \begin{equation*} k_ie_jk_i^{-1}=D_{ij}e_j,\quad k_if_jk_i^{-1}=D_{ij}^{-1}f_j,\quad e_if_j - f_je_i =\delta_{ij}\frac{k_i - k_i^{-1}}{q-q^{-1}}, \end{equation*} where $D_{ij}=q_{i}^{\langle\alpha_j,\delta_i^\vee\rangle} q_{i+1}^{-\langle\alpha_j,\delta_{i+1}^\vee\rangle}$. There is a Hopf algebra structure on ${\mc U}(\epsilon)$, where the comultiplication $\Delta$, the antipode $S$, and the couint $\varepsilon$ are given by \begin{equation}\label{eq:comult-1} \begin{split} \Delta(q^h)&=q^h\otimes q^h, \\ \Delta(e_i)&= e_i\otimes 1 + k_i^{-1}\otimes e_i , \\ \Delta(f_i)&= f_i\otimes k_i + 1\otimes f_i, \\ \end{split} \end{equation} \begin{gather*} S(q^h)=q^{-h}, \ \ S(e_i)=-e_ik_i^{-1}, \ \ S(f_i)=-k_if_i,\\ \varepsilon(q^h)=1,\ \ \varepsilon(e_i)=\varepsilon(f_i)=0, \end{gather*} for $h\in P^\vee$ and $i\in I$. Let $\eta$ be the anti-automorphism on ${\mc U}(\epsilon)$ defined by \begin{equation*}\label{eq:antiauto-1} \eta(q^h)=q^h,\quad \eta(e_i)=q_if_ik^{-1}_i,\quad \eta(f_i)=q^{-1}_ik_ie_i, \end{equation*} for $h \in P^{\vee}$ and $i\in I$. It satisfies $\eta^2=id$ and \begin{equation*}\label{eq:antiauto-2} \Delta \circ \eta= (\eta \otimes \eta)\circ \Delta. \end{equation*} We have an isomorphism between ${\mc U}(\epsilon)$ and ${\mc U}(\widetilde\epsilon)$ where $\widetilde\epsilon$ is obtained from $\epsilon$ by permutation of $\epsilon_i$'s, which is not an isomorphism of Hopf algebras \cite[Theorem 2.7]{Ma} (cf. \cite[37.1]{Lu93}). \begin{thm}\label{thm:reflection} For $1\leq i\leq n-1$, let $\widetilde\epsilon=(\widetilde\epsilon_1,\dots,\widetilde\epsilon_n)$ be the sequence given by exchanging $\epsilon_i$ and $\epsilon_{i+1}$ in $\epsilon$. Then there exists an isomorphism of algebras $\tau_i : {\mc U}(\epsilon) \longrightarrow {\mc U}(\widetilde\epsilon)$ given by \begin{equation*} \begin{split} &\tau_i(k_i)=k_i^{-1},\quad\tau_i(e_i)=-f_ik_i,\quad \tau_i(f_i)= -k_i^{-1}e_i,\\ &\tau_i(k_j)=k_ik_j,\quad\tau_i(e_j)=[e_i,e_j]_{D_{ij}},\quad \tau_i(f_j)= [f_j,f_i]_{D_{ij}^{-1}} \quad (|i-j|=1),\\ &\tau_i(k_j)=k_j,\quad\tau_i(e_j)=e_j,\quad \tau_i(f_j)= f_j \quad (|i-j|>1), \end{split} \end{equation*} where the inverse map is given by \begin{equation*} \begin{split} &\tau_i^{-1}(k_i)=k_i^{-1},\quad\tau_i^{-1}(e_i)=-k_i^{-1}f_i,\quad \tau_i^{-1}(f_i)= -e_ik_i,\\ &\tau_i^{-1}(k_j)=k_ik_j,\quad\tau_i^{-1}(e_j)=[e_j,e_i]_{D_{ij}},\quad \tau_i^{-1}(f_j)= [f_i,f_j]_{D_{ij}^{-1}} \quad (|i-j|=1),\\ &\tau_i^{-1}(k_j)=k_j,\quad\tau_i^{-1}(e_j)=e_j,\quad \tau_i^{-1}(f_j)= f_j \quad (|i-j|>1). \end{split} \end{equation*} \end{thm} \qed \subsection{Crystal base of ${\mc U}(\epsilon)$-modules} For a ${\mc U}(\epsilon)$-module $V$ and $\mu=\sum_{i}\mu_i\delta_i\in P$, let \begin{equation*} V_\mu = \{\,u\in V\,|\,\omega_i u= q_i^{\mu_i} u \ \ (i\in \mathbb{I}) \,\} \end{equation*} be the $\mu$-weight space of $V$. For a non-zero vector $u\in V_\mu$, we denote by ${\rm wt}(u)=\mu$ the weight of $u$. Let $P_{\geq0}=\sum_{i\in \mathbb{I}}\mathbb{Z}_{\geq 0}\delta _i$ and let $\mc{O}_{\geq0}$ be the category of ${\mc U}(\epsilon)$-modules with objects $V$ such that \begin{equation}\label{eq:polynomial weight} V=\bigoplus_{\mu\in P_{\ge 0}}V_\mu \quad \text{with}\ \dim V_\mu < \infty. \end{equation} which is closed under taking submodules, quotients and tensor products. \begin{rem}{\rm There is another comultiplication on ${\mc U}(\epsilon)$ given by \begin{equation}\label{eq:comult-2} \begin{split} \Delta_+(q^h)&=q^h\otimes q^h, \\ \Delta_+(e_i)&= 1\otimes e_i+ e_i\otimes k_i, \\ \Delta_+(f_i)&= k_i^{-1} \otimes f_i + f_i\otimes 1, \end{split} \end{equation} (while $\Delta_+^{\rm op}$ is used in \cite{KO}). Let $\otimes$ and $\otimes_+$ denote the tensor product with respect to $\Delta$ and $\Delta_+$, respectively. For ${\mc U}(\epsilon)$-modules $M$ and $N$, we have a ${\mc U}(\epsilon)$-linear isomorphism $\psi : M\otimes N \longrightarrow M\otimes_+ N$ given by \begin{equation}\label{eq:isomorphism for two comult} \psi(u\otimes v) = \left(\prod_{i\in \mathbb{I}}q_i^{\mu_i\nu_i}\right)\, u\otimes v, \end{equation} for $u\in M_\mu$ and $v\in N_\nu$ with $\mu=\sum_i\mu_i\delta_i$ and $\nu=\sum_i\nu_i\delta_i$. } \end{rem} Let us recall the notion of crystal base for $V\in \mc{O}_{\ge 0}$ \cite{KO} (cf.~\cite{BKK}). The Kashiwara operators $\tilde{e}_i$ and $\tilde{f}_i$ on $V$ for $i\in I$ are defined as follows. Suppose that $u\in V_\mu$ is given. {\em Case 1}. Suppose that $i \in I_{\rm odd}$ and $(\epsilon_i,\epsilon_{i+1})=(0,1)$. We define \begin{equation*} \tilde{e}_i u =\eta(f_i) u =q_i^{-1}k_ie_i u,\quad \tilde{f}_i u=f_i u. \end{equation*} {\em Case 2.} Suppose that $i \in I_{\rm odd}$ and $(\epsilon_i,\epsilon_{i+1})=(1,0)$. We define \begin{equation*} \tilde{e}_i u=e_i u,\quad\tilde{f}_i u=\eta(e_i) u=q_if_ik^{-1}_iu. \end{equation*} {\em Case 3.} Suppose that $i \in I_{\rm even}$ and $(\epsilon_i,\epsilon_{i+1})=(0,0)$. Let $\zeta: U_q(\mathfrak{sl}_2) \rightarrow {\mc U}(\epsilon)_i$ be the $\mathbb{Q}(q)$-algebra isomorphism given by $\zeta(e)=e_i$, $\zeta(f)=f_i$ and $\zeta(k)=k_i$, where $U_q(\mathfrak{sl}_2)=\langle e,f,k^{\pm 1} \rangle$ is the usual quantum group for $\mathfrak{sl}_2$ with relation $kek^{-1}=q^2 e$, $kfk^{-1}=q^{-2} f$, $ef-fe=\frac{k-k^{-1}}{q-q^{-1}}$. The induced comultiplication $\Delta^\zeta :=(\zeta^{-1} \otimes \zeta^{-1})\circ \Delta \circ \zeta$ on $U_q(\mathfrak{sl_2})$ is \begin{equation*} \begin{split} \Delta^\zeta(k^{\pm1})&=k^{\pm1} \otimes k^{\pm1},\\ \Delta^\zeta(e)&=k^{-1} \otimes e+e\otimes1,\\ \Delta^\zeta(f)&=1 \otimes f + f \otimes k. \end{split} \end{equation*} So we define $\tilde{e}_i$ and $\tilde{f}_i$ on $V$ to be the usual Kashiwara operators on the lower crystal base of $U_q(\mathfrak{sl_2})$-module induced from $\zeta$. In other words, if $u=\sum_{k \geq 0} f_i^{(k)}u_k$, where $f_i^{(k)}=f_i^k/[k]!$ and $e_iu_k=0$ for $k\geq 0$, then we define \begin{equation*} \tilde{e}_iu=\sum_{k\geq1}f_i^{(k-1)}u_k,\quad \tilde{f}_iu=\sum_{k\geq0}f_i^{(k+1)}u_k. \end{equation*} {\em Case 4.} Suppose that $i \in I_{even}$ and $(\epsilon_i,\epsilon_{i+1})=(1,1)$. Let $\xi: U_q(\mathfrak{sl_2}) \rightarrow {\mc U}(\epsilon)_i$ be the $\mathbb{Q}(q)$-algebra homomorphism given by $\xi(e)=-e_i$, $\xi(f)=f_i$ and $\xi(k)=k^{-1}_i$. Then the induced comultiplication $\Delta^\xi$ on $U_q(\mathfrak{sl_2})$ is \begin{equation*} \begin{split} \Delta^\xi(k^{\pm1})&=k^{\pm1} \otimes k^{\pm1},\\ \Delta^\xi(e)&=k \otimes e+e\otimes1,\\ \Delta^\xi(f)&=1 \otimes f + f \otimes k^{-1}. \end{split} \end{equation*} So we define $\tilde{e}_i$ and $\tilde{f}_i$ on $V$ to be the Kashiwara operators on the upper crystal base of $U_q(\mathfrak{sl}_2)$-module induced from $\xi$. In other words, if $u=\sum_{k \geq 0} f_i^{(k)}u_k$, where $e_iu_k=0$ for $k\geq 0$ and $l_k=\langle {\rm wt}(u_k),\alpha_i^\vee\rangle$, then we define \begin{equation*} \tilde{e}_iu=\sum_{k\geq1}q^{-l_k+2k-1}f_i^{(k-1)}u_k,\quad \tilde{f}_iu=\sum_{k\geq 0}q^{l_k-2k-1}f_i^{(k+1)}u_k. \end{equation*} Let $A_0$ be the subring of $\mathbb{Q}(q)$ consisting of $f(q)/g(q)$ with $f(q), g(q)\in \mathbb{Q}[q]$ and $g(0)\neq 0$. \begin{df}\label{def:cry}{\rm Let $V \in \mc{O}_{\ge 0}$ be given. A pair $(L,B)$ is a crystal base of $V$ it if satisfies the following conditions: \begin{itemize} \item[(1)] $L$ is an $A_0$-lattice of $V$ and $L=\bigoplus_{\mu \in P_{\geq 0}}L_\mu$, where $L_\mu=L \cap V_\mu$, \item[(2)] $B$ is a signed basis of $L/qL$, that is $B=\mathbf{B}\cup -\mathbf{B}$ where $\mathbf{B}$ is a $\mathbb{Q}$-basis of $L/qL$, \item[(3)] $B= \bigsqcup_{\mu \in P_{\geq 0}} B_\mu$ where $B_\mu \subset (L/qL)_\mu$, \item[(4)] $\tilde{e}_i L \subset L, \tilde{f}_i L \subset L$ and $\tilde{e}_iB \subset B \cup \{0\}, \tilde{f}_iB \subset B \cup \{0\}$ for $i \in I$, \item[(5)] $\tilde{f}_ib=b'$ if and only if $\tilde{e}_ib'=\pm b$ for $i\in I$ and $b, b' \in B$. \end{itemize}} \end{df} Let us call $B/\{\pm 1\}$ a crystal of $V$, which is an $I$-colored oriented graph. We have a tensor product rule for crystals (see \cite{BKK} and \cite[Proposition 3.4]{KO}). \begin{prop}\label{prop:tensor product rule} Let $V_1, V_2\in \mc{O}_{\geq 0}$ be given. Suppose that $(L_i,B_i)$ is a crystal base of $V_i$ for $i=1,2$. Then $(L_1\otimes L_2, B_1\otimes B_2)$ is a crystal base of $V_1\otimes V_2$, where $B_1\otimes B_2\subset (L_1/qL_1)\otimes (L_2/qL_2)=L_1\otimes L_2/qL_1\otimes L_2$. Moreover, $\widetilde{e}_i$ and $\widetilde{f}_i$ act on $B_1\otimes B_2$ as follows: \begin{itemize} \item[(1)] if $i\in I_{\rm odd}$ and $(\epsilon_i,\epsilon_{i+1})=(0,1)$, then {\allowdisplaybreaks \begin{equation}\label{eq:tensor product rule for odd +} \begin{split} \widetilde{e}_i(b_1\otimes b_2)=& \begin{cases} b_1\otimes \widetilde{e}_i b_2, & \text{if }\langle {\rm wt}(b_2),\alpha^\vee_i\rangle>0, \\ \widetilde{e}_i b_1\otimes b_2, & \text{if }\langle {\rm wt}(b_2),\alpha^\vee_i\rangle=0, \end{cases} \\ \widetilde{f}_i(b_1\otimes b_2)=& \begin{cases} b_1\otimes \widetilde{f}_ib_2, & \text{if }\langle {\rm wt}(b_2),\alpha^\vee_i\rangle >0, \\ \widetilde{f}_ib_1\otimes b_2, & \text{if }\langle {\rm wt}(b_2),\alpha^\vee_i\rangle=0, \end{cases} \end{split} \end{equation}} \item[(2)] if $i\in I_{\rm odd}$ and $(\epsilon_i,\epsilon_{i+1})=(1,0)$, then {\allowdisplaybreaks \begin{equation}\label{eq:tensor product rule for odd -} \begin{split} \widetilde{e}_i(b_1\otimes b_2)=& \begin{cases} b_1\otimes \widetilde{e}_i b_2, & \text{if }\langle {\rm wt}(b_1),\alpha^\vee_i\rangle=0, \\ \widetilde{e}_i b_1\otimes b_2, & \text{if }\langle {\rm wt}(b_1),\alpha^\vee_i\rangle>0, \end{cases} \\ \widetilde{f}_i(b_1\otimes b_2)=& \begin{cases} b_1\otimes \widetilde{f}_i b_2, & \text{if }\langle {\rm wt}(b_1),\alpha^\vee_i\rangle =0, \\ \widetilde{f}_ib_1\otimes b_2, & \text{if }\langle {\rm wt}(b_1),\alpha^\vee_i\rangle>0, \end{cases} \end{split} \end{equation}} \item[(3)] if $i\in I_{\rm even}$ and $(\epsilon_i,\epsilon_{i+1})=(0,0)$, then {\allowdisplaybreaks \begin{equation}\label{eq:tensor product rule for even +} \begin{split} &\widetilde{e}_i(b_1\otimes b_2)= \begin{cases} b_1 \otimes \widetilde{e}_ib_2, & \text{if $\varphi_i(b_2)\geq\varepsilon_i(b_1)$}, \\ \widetilde{e}_ib_1 \otimes b_2, & \text{if $\varphi_i(b_2)<\varepsilon_i(b_1)$},\\ \end{cases} \\ &\widetilde{f}_i(b_1\otimes b_2)= \begin{cases} b_1 \otimes \widetilde{f}_ib_2, & \text{if $\varphi_i(b_2)>\varepsilon_i(b_1)$}, \\ \widetilde{f}_ib_1 \otimes b_2, & \text{if $\varphi_i(b_2)\leq\varepsilon_i(b_1)$}, \end{cases} \end{split} \end{equation}} \item[(4)] if $i\in I_{\rm even}$ and $(\epsilon_i,\epsilon_{i+1})=(1,1)$, then {\allowdisplaybreaks \begin{equation}\label{eq:tensor product rule for even -} \begin{split} &\widetilde{e}_i(b_1\otimes b_2)= \begin{cases} \widetilde{e}_i b_1 \otimes b_2, & \text{if $\varphi_i(b_1)\geq\varepsilon_i(b_2)$}, \\ b_1 \otimes \sigma_i \widetilde{e}_ib_2, & \text{if $\varphi_i(b_1)<\varepsilon_i(b_2)$},\\ \end{cases} \\ &\widetilde{f}_i(b_1\otimes b_2)= \begin{cases} \widetilde{f}_ib_1 \otimes b_2, & \text{if $\varphi_i(b_1)>\varepsilon_i(b_2)$}, \\ b_1 \otimes \sigma_i \widetilde{f}_i b_2, & \text{if $\varphi_i(b_1)\leq\varepsilon_i(b_2)$}, \end{cases} \end{split} \end{equation}} where $\sigma_i=(-1)^{({\rm wt}(b_1),\alpha_i)}$. \end{itemize} \end{prop} \noindent{\bfseries Proof. } The proof is almost the same as in \cite[Proposition 3.4]{KO}, where the order of tensor product is reversed due to a different convention of comultiplication. \qed \begin{rem}\label{rem:natural repn and crystal} {\rm Let ${\mathcal V}=\bigoplus_{i\in \mathbb{I}}\mathbb{Q}(q)v_i$ denote the ${\mc U}(\epsilon)$-module, where \begin{equation}\label{eq:natural repn} \omega_i v_j = q_i^{\delta_{ij}}v_j,\quad e_k v_j = \delta_{k\, j-1}v_{j-1},\quad f_k v_j =\delta_{kj}v_{j+1}, \end{equation} for $i,j\in \mathbb{I}$ and $k\in I$. It is clear that the pair $\mathcal{L}=\bigoplus_{i\in \mathbb{I}}A_0 v_i$ and $\mathcal{B}=\{\,\pm v_i \pmod{q\mathcal{L}} \,|\,i\in I\,\}$ is a crystal base of $\mathcal V$. The crystal structure on $\mathcal{B}^{\otimes \ell}/\{\pm 1\}$ for $\ell\geq 1$ can be described explicitly by Proposition \ref{prop:tensor product rule}, which is the same as in \cite{BKK} or \cite{KO} except that the tensor product order is reversed. } \end{rem} \section{Schur-Weyl duality and polynomial representations of $\ring{\mc U}(\epsilon)$}\label{sec:poly reps} \subsection{Schur-Weyl duality} Put $\ring{I}=I\setminus \{0\}$. Let $\ring{{\mc U}(\epsilon)}$ be the $\mathbb{Q}(q)$-subalgebra of ${\mc U}(\epsilon)$ generated by $q^h$ and $e_i, f_i$ for $h\in P^\vee$ and $i\in \ring{I}$. Let us consider ${\mathcal V}=\bigoplus_{i\in \mathbb{I}}\mathbb{Q}(q)v_i$ in \eqref{eq:natural repn} as a $\ring{\mc U}(\epsilon)$-module. Fix $\ell\ge 2$. Let $\Phi_\ell : \ring{\mc U}(\epsilon)\longrightarrow {\rm End}_{\mathbb{Q}(q)}({\mathcal V}^{\otimes \ell})$ denote the action of $\ring{\mc U}(\epsilon)$ on ${\mathcal V}^{\otimes \ell}$ via \eqref{eq:comult-1}. Note that $\mathcal V^{\otimes \ell}$ is semisimple (see \cite[Corollary 4.1]{KO}). Assume that $\epsilon_1=0$. We have a $\ring{\mc U}(\epsilon)$-linear map $R : {\mathcal V}^{\otimes 2}\longrightarrow {\mathcal V}^{\otimes 2}$ given by \begin{equation}\label{eq:finite R matrix} \begin{split} R(v_i\otimes v_j) = \begin{cases} q^{-1}q_i^{-1} v_i\otimes v_j, & \text{if $i=j$},\\ q^{-1} v_j\otimes v_i, & \text{if $i>j$},\\ (q^{-2}-1)v_i\otimes v_j + q^{-1} v_j\otimes v_i, & \text{if $i<j$}, \end{cases} \end{split} \end{equation} satisfying the Yang-Baxter equation; \begin{equation*} R_{12}R_{23}R_{12} = R_{23}R_{12}R_{23}, \end{equation*} where $R_{ij}$ denotes the map acting as $R$ on the $i$-th and the $j$-th component and the identity elsewhere on ${\mathcal V}^{\otimes 3}$ (cf. \cite{J}). Let $\mathcal{H}_\ell(q^{-2})$ be the Iwahori-Hecke algebra of type $A$ over $\mathbb{Q}(q)$ generated by $h_i$ for $i\in \{1,\dots,\ell-1\}$ subject to the relations; \begin{equation*} \begin{split} &(h_i-q^{-2})(h_i+1)=0, \\ & h_ih_j =h_jh_i, \quad\quad\ (|i-j|>1),\\ & h_ih_jh_i=h_jh_ih_j \quad (|i-j|=1), \end{split} \end{equation*} for $i, j\in \{1,\dots,\ell-1\}$. Let $W$ be the symmetric group on $\{1,\dots,\ell\}$ and $s_i=(i\ i+1)$ be the transposition for $1\leq i\leq \ell-1$. For $w\in W$, $\ell(w)$ denote the length of $w$ and let $h(w)$ be the element in $\mathcal{H}_\ell(q^{-2})$ associated to $w$ such that $h(s_i)=h_i$ for $1\leq i\leq \ell-1$. We can check that there exists a well-defined action of $\mathcal{H}_\ell(q^{-2})$ on ${\mathcal V}^{\otimes \ell}$, say, $\Psi_\ell : \mathcal{H}_\ell(q^{-2}) \longrightarrow {\rm End}_{\mathbb{Q}(q)}({\mathcal V}^{\otimes \ell})$, where $\Psi_\ell(h_i)$ acts as $R$ on the $i$-th and $(i+1)$-th component and the identity elsewhere. Then we have an analogue of Schur-Weyl duality for $\ring{\mc U}(\epsilon)$ (cf.~\cite{J}) as follows. The proof is similar to the case when $\epsilon_i=0$ for all $i$. \begin{thm}\label{thm:Schur-Weyl duality} We have \begin{equation*} {\rm End}_{\mathcal{H}_\ell(q^{-2})}({\mathcal V}^{\otimes \ell}) = \Phi_\ell(\ring{\mc U}(\epsilon)), \quad {\rm End}_{\ring{\mc U}(\epsilon)}({\mathcal V}^{\otimes \ell}) = \Psi_\ell({\mathcal H}_\ell(q^{-2})). \end{equation*} \end{thm} \qed \subsection{Polynomial representations of $\ring{\mc U}(\epsilon)$} Recall that $M$ is the number of $i$'s with $\epsilon_i=0$ and $N$ is the number of $i$'s with $\epsilon_i=1$ in $\epsilon$. Let $\mathscr{P}$ be the set of all partitions. A partition $\lambda=(\lambda_i)_{i\ge 1}\in \mathscr{P}$ is called an $(M|N)$-hook partition if $\lambda_{M+1}\leq N$ (cf.~\cite{BR}). We denote the set of all $(M|N)$-hook partitions by $\mathscr{P}_{M|N}$. For a Young diagram $\lambda$, a tableau $T$ obtained by filling $\lambda$ with letters in $\mathbb{I}$ is called semistandard if (1) the letters in each row (resp. column) are weakly increasing from left to right (resp. from top to bottom), (2) the letters in $\mathbb{I}_0$ (resp. $\mathbb{I}_1$) are strictly increasing in each column (resp. row). Let ${SST}_\epsilon(\lambda)$ be the set of all semistandard tableaux of shape $\lambda$. Then $SST_\epsilon(\lambda)$ is non-empty if and only if $\lambda\in \mathscr{P}_{M|N}$. For $T\in SST_\epsilon(\lambda)$, let $w(T)$ be the word given by reading the entries in $T$ column by column from left to right, and from bottom to top in each column. For $T\in SST_{\epsilon}(1^r)$ with $r\geq 1$, let $d(T)=\sum_{u<v}d_ud_v$, where $d_u$ is the number of occurrences of $u$ in $T$ for $u\in \mathbb{I}$. In general, for a column-semistandard tableau $T$, that is, each column of $T$ is semistandard, we define $d(T) = \sum_{k\geq 1}d(T_k)$, where $T_k$ is the $k$-th column from the left. We fix $\ell\geq 2$, and let $W$ denote the symmetric group on $\{1,\dots,\ell\}$. Suppose that $\lambda\in\mathscr{P}$ is given with $\sum_{i\geq 1}\lambda_i=\ell$. Let $T_+^\lambda$ be the standard tableau obtained by filling $\lambda$ with $\{1,\dots,\ell\}$ row by row from top to bottom and from left to right in each row, and let $T_-^\lambda$ be the tableau obtained by filling $\lambda$ with $\{1,\dots,\ell\}$ column by column from left to right and from top to bottom in each column. Let $w_\lambda\in W$ be such that $w_\lambda (T_-^\lambda)=T_+^\lambda$, where $w_\lambda (T_-^\lambda)$ is the tableau obtained by acting $w_\lambda$ on the letters in $T_-^\lambda$. Let $W^\lambda_+$ (resp. $W^\lambda_-$) be the Young subgroup of $W$ stabilizing the rows (resp. columns) of $T^\lambda_+$ (resp. $T^\lambda_-$). Then the $q$-deformed Young symmetrizer is given by \begin{equation} Y^\lambda(q) = h(w_\lambda^{-1})e^\lambda_+ h(w_\lambda) e^\lambda_-, \end{equation} (\cite{G}) where \begin{equation*} e_+^\lambda =\sum_{w\in W^\lambda_+} h(w),\quad e_-^\lambda =\sum_{w\in W^\lambda_-}(-q^2)^{-\ell(w)} h(w). \end{equation*} For $1\leq u<v\leq \ell$, let $W_{uv}=\langle\, s_i \,|\, u\leq i\leq v-1 \rangle$. Suppose that $a$ is a letter in $T^\lambda_-$ such that $a+1$ is located in the same column. We put $C_a=1+h_a$. Then we have \begin{align} Y^\lambda(q) C_a &=0,\label{eq:column relation} \end{align} Next, suppose that $a$ is a letter in $T^\lambda_-$, where there is another letter $d$ to the right. Let $b$ be the letter at the bottom of column where $a$ is placed, and $c=b+1$ the letter at the top of the column where $d$ is placed. Let $\mathcal{G}^\lambda_a$ be the set of minimal length right coset representatives of $W_{ab}\times W_{cd}$ in $W_{ad}$. We define the {\em Garnir element} at $a$ to be \begin{equation} G^\lambda_a = \sum_{w\in \mathcal{G}^\lambda_a} (-q^2)^{\ell(w)} h(w). \end{equation} The collection of boxes in the Young diagram $\lambda$ corresponding to the letters from $a$ to $d$ in $T^\lambda_-$ is called a {\em Garnir belt} at $a$. Then we have the following relations \cite[(15)]{BKW}; \begin{align} Y^\lambda(q) G^\lambda_a &=0 \label{eq:Garnir relation}. \end{align} Let $T$ be a tableau of shape $\lambda$ with letters in $\mathbb{I}$, and let $T(i)$ be the letter in $T$ at the position corresponding to $i$ in $T^\lambda_-$ for $1\leq i\leq \ell$. Let \begin{equation*} v_T = Y^\lambda(q)\left(v_{T(1)}\otimes \dots \otimes v_{T(\ell)}\right). \end{equation*} For $\sigma\in W$, let $T^\sigma$ be the tableau given by replacing $T(i)$ with $T(\sigma(i))$ for $1\leq i\leq \ell$. Let $a$ be a letter in $T^\lambda_-$ with $d$ to the right in the same row and with $b,c$ as above. Let $w_0$ be the longest element in $W_{ab}\times W_{cd}$, and let $\tilde{\mathcal{G}}^\lambda_a = w_0{\mathcal{G}}^\lambda_a w_0$. Let $u_1,\dots, u_s$ and $u_{s+1},\dots, u_{r+s}$ be the letters in $T$ corresponding to $c,\dots,d$ and $a,\dots,b$ in $T^\lambda_-$, respectively. Then we may identify $\sigma\in \tilde{\mathcal{G}}^\lambda_a$ with a permutation on $\{1,\dots,r+s\}$ satisfying $\sigma(1)<\dots<\sigma(s)$ and $\sigma(s+1)<\dots<\sigma(s+r)$ so that $T^{\sigma}$ is the tableau obtained from $T$ by replacing $u_i$'s with $u_{\sigma(i)}$'s for $1\leq i\leq r+s$. With this identification, we let $\tilde{\ell}(\sigma)$ be the length of $\sigma$ as a permutation on $\{1,\dots,r+s\}$, and put \begin{equation*}\label{eq:XY for sigma} \begin{split} X_{\sigma}&=\{\,i\,|\,1\leq i\leq s,\ s+1\leq \sigma^{-1}(i)\leq s+r\,\},\\ Y_{\sigma}&=\{\,j\,|\,s+1\leq j\leq s+r,\ 1\leq \sigma^{-1}(j)\leq r\,\}. \end{split} \end{equation*} \begin{lem}\label{lem:Garnir relation} Suppose that $T$ is column-semistandard such that either $T(a)=T(d)\in \mathbb{I}_1$ or $T(a)>T(d)$. Then under the above hypothesis, we have \begin{equation*} v_T= - \sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a,\sigma \ne 1} (-q)^{{\tilde{\ell}(\sigma)}+m(\sigma,T)}v_{T^{\sigma}}, \end{equation*} where \begin{equation*} \begin{split} m(\sigma,T) = & - \big\vert\{\,(i,j)\,|\,1\leq i<j \leq s,\ {i \notin X_\sigma, j\in X_\sigma},\ u_i=u_j\,\} \big\vert \\ & - \big\vert\{\,(k,l)\,|\ s+1 \leq k<l \leq s+r,\ {k\in Y_\sigma, l \notin Y_\sigma},\ u_k=u_l\,\} \big\vert \\ & + \big\vert\{\,(x,y)\,|\,1 \leq x\leq s,\ s+1\leq y\leq s+r,\ {\text{$x\in X_\sigma$ or $y\in Y_\sigma$}},\ u_x=u_y\,\} \big\vert. \end{split} \end{equation*} \end{lem} \noindent{\bfseries Proof. } We have $v_T = Y^\lambda(q) v$, where $v=\left(v_{T(1)}\otimes \dots \otimes v_{T(\ell)}\right)$. Following the above notations, we have $v=v'\otimes v_{u_{1+s}} \otimes \cdots \otimes v_{u_{r+s}} \otimes v_{u_{1}} \otimes \cdots v_{u_{s}} \otimes v''$. Note that \begin{equation*} v_{T^{w_0}} = Y^\lambda(q)\left( v'\otimes v_{u_{r+s}} \otimes \cdots \otimes v_{u_{1+s}} \otimes v_{u_{s}} \otimes \cdots v_{u_{1}} \otimes v'' \right), \end{equation*} where $u_{r+s}\ge \dots u_{1+s}=T(a)\ge u_s=T(d) \ge \dots \ge u_1$. For $w\in {\mathcal{G}}^\lambda_a$, we have by \eqref{eq:finite R matrix} and \eqref{eq:column relation} \begin{equation}\label{columngarnir} \begin{split} & h(w)\left( v'\otimes v_{u_{r+s}} \otimes \cdots \otimes v_{u_{1+s}} \otimes v_{u_{s}} \otimes \cdots v_{u_{1}} \otimes v'' \right)\\ =&q^{-\ell(w)}(-q)^{m(\sigma,T^{w_0})} \left( v'\otimes v_{u_{\sigma(r+s)}} \otimes \cdots \otimes v_{u_{\sigma(1+s)}} \otimes v_{u_{\sigma(s)}} \otimes \cdots \otimes v_{u_{\sigma(1)}} \otimes v'' \right), \end{split} \end{equation} where $\sigma$ is the permutation on $\{1,\dots,r+s\}$ corresponding to $w_0ww_0$ and \begin{equation*} m(\sigma,T^{w_0}) = \big\vert \{\,(i,j)\,|\,i<j,\ \sigma^{-1}(i)< \sigma^{-1}(j),\ u_i=u_j \,\} \big\vert. \end{equation*} Hence it follows from \eqref{eq:Garnir relation} and that \eqref{columngarnir} \begin{equation*} \begin{split} 0&=Y^{\lambda}(q)G^{\lambda}_a(q) \left( v'\otimes v_{u_{r+s}} \otimes \cdots \otimes v_{u_{1+s}} \otimes v_{u_{s}} \otimes \cdots v_{u_{1}} \otimes v'' \right) \\ &=Y^{\lambda}(q)\sum_{w\in \mathcal{G}^\lambda_a}(-q^2)^{\ell(w)}h(w) \left( v'\otimes v_{u_{r+s}} \otimes \cdots \otimes v_{u_{1+s}} \otimes v_{u_{s}} \otimes \cdots v_{u_{1}} \otimes v'' \right)\\ &=Y^{\lambda}(q)\sum_{w\in \mathcal{G}^\lambda_a}(-q)^{\ell(w)+m(\sigma,T^{w_0})} \left( v'\otimes v_{u_{\sigma(r+s)}} \otimes \cdots \otimes v_{u_{\sigma(1+s)}} \otimes v_{u_{\sigma(s)}} \otimes \cdots v_{u_{\sigma(1)}} \otimes v'' \right)\\ &=\sum_{w\in \mathcal{G}^\lambda_a}(-q)^{\ell(w)+m(\sigma,T^{w_0})}v_{T^{w_0w}} =\sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a}(-q)^{\tilde\ell(\sigma)+ m(\sigma,T^{w_0})}v_{T^{\sigma w_0}}. \end{split} \end{equation*} We have \begin{equation}\label{eq:aux0} \sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a} (-q)^{\tilde\ell({\sigma})+m(\sigma, T^{w_0})}v_{(T^{\sigma})^{w_0}}=0. \end{equation} For $\sigma\in \tilde{\mathcal{G}}^\lambda_a$, let $U^{\sigma}$ be the subtableau of $T^{\sigma}$ corresponding to the Garnir belt at $a$, where $U=U^{\rm id}$. We define $d_a(T^\sigma)$ in the same way as in $d(T)$ only by using the letters in $U^\sigma$. Let {$l_p>\dots>l_1\geq r_q>\dots>r_1$} be the distinct letters appearing in $U$, where $l_i$ and $r_j$ are located in the left and right columns of $U$, respectively. Let $m_i$ (resp. $n_j$) be the number of occurrences of $l_i$'s (resp. $r_j$'s) in $U$, which remain in the same column after applying $\sigma$. Let $m'_i$ (resp. $n'_i$) be the number of $l_i$'s (resp. $r_j$'s) which are placed on the right (resp. left) column of $U^\sigma$ after applying $\sigma$ to $U$. Note that $\sum_{i}m'_i=\sum_{j}n'_j$ {\em Case 1}. Suppose that $l_1\neq r_q$. We have \begin{equation}\label{eq:aux1} \begin{split} d_a(T) &= \sum_{1\le i<j\le p}(m_i+m'_i)(m_j+m'_j) + \sum_{1\le k<l\le q}(n_k+n'_k)(n_l+n'_l), \end{split} \end{equation} while \begin{equation}\label{eq:aux2} \begin{split} &d_a(T^\sigma) \\ &= \sum_{1\le i<j\le p}(m_im_j + m'_im'_j) + \sum_{i,k}m_in'_k +\sum_{1\le k<l\le q}(n_kn_l + n'_kn'_l) + \sum_{j,l}m'_jn_l\\ &=\sum_{1\le i<j\le p}(m_im_j + m'_im'_j) + \sum_{i}m_i \sum_k n'_k +\sum_{1\le k<l\le q}(n_kn_l + n'_kn'_l) + \sum_{j}m'_j\sum_{l}n_l.\\ \end{split} \end{equation} Since we have \begin{equation*} \begin{split} m(\sigma,T^{w_0}) = & \quad\ \big\vert\{\,(i,j)\,|\ 1\leq i<j\leq s,\ {i\in X_{\sigma}, j\not\in X_{\sigma}},\ u_i=u_j\,\} \big\vert \\ & + \big\vert\{\,(k,l)\,|\,s+1\leq k<l \leq s+r,\ {k\not\in Y_{\sigma}, l\in Y_{\sigma}},\ u_k=u_l\,\} \big\vert, \\ m(\sigma,T) = & - \big\vert\{\,(i,j)\,|\,1\leq i<j \leq s,\ {i \notin X_\sigma, j\in X_\sigma},\ u_i=u_j\,\} \big\vert \\ & - \big\vert\{\,(k,l)\,|\ s+1 \leq k<l \leq s+r,\ {k\in Y_\sigma, l \notin Y_\sigma},\ u_k=u_l\,\} \big\vert, \end{split} \end{equation*} one can check easily that { \begin{equation}\label{eq:aux3} m(\sigma,T^{w_0}) - m(\sigma,T) = \sum_{1\le i\le p}m_im'_i +\sum_{1\le j\le q} n_jn'_j. \end{equation}} By \eqref{eq:aux1}, \eqref{eq:aux2}, and \eqref{eq:aux3}, we have \begin{equation}\label{eq:aux4} d_a(T) - d_a(T^\sigma) = m(\sigma,T) - m(\sigma,T^{w_0}). \end{equation} By \eqref{eq:column relation}, \eqref{eq:aux0} and \eqref{eq:aux4}, we have \begin{equation*}\label{eq:aux5} \begin{split} 0=& \sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a} (-q)^{\tilde\ell({\sigma})+m(\sigma, T^{w_0})}v_{(T^{\sigma})^{w_0}} = \sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a} (-q)^{\tilde\ell({\sigma})+m(\sigma, T^{w_0}) - d_a(T^{\sigma})}v_{T^{\sigma}}\\ =& \sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a} (-q)^{\tilde\ell({\sigma})+m(\sigma, T) - d_a(T)}v_{T^{\sigma}} =(-q)^{- d_a(T)}\sum_{\sigma\in \tilde{\mathcal{G}}^\lambda_a} (-q)^{\tilde\ell({\sigma})+m(\sigma, T)}v_{T^{\sigma}}. \end{split} \end{equation*} This proves the identity in the lemma. {\em Case 2}. Suppose that Suppose that $l_1 = r_q$. In this case, $d_a(T)$ is the same as in {\em Case 1}, and \begin{equation*} d_a(T)-d_a(T^\sigma) = - \sum_{1\le i\le p}m_im'_i - \sum_{1\le j\le q} n_jn'_j + m_pn'_1 + m'_p n_1. \end{equation*} Note that \begin{equation*} \begin{split} m(\sigma,T^{w_0}) = & \quad\ \big\vert\{\,(i,j)\,|\ 1\leq i<j\leq s,\ {i\in X_{\sigma}, j\not\in X_{\sigma}},\ u_i=u_j\,\} \big\vert \\ & + \big\vert\{\,(k,l)\,|\,s+1\leq k<l \leq s+r,\ {k\not\in Y_{\sigma}, l\in Y_{\sigma}},\ u_k=u_l\,\} \big\vert \\ &+ \big\vert\{\,(x,y)\,|\,1 \leq x\leq s,\ s+1\leq y\leq s+r,\ x\in X_\sigma, y\in Y_\sigma, u_x=u_y\,\} \big\vert , \end{split} \end{equation*} where the last summand is equal to $m'_pn'_1$. By similar arguments as in \eqref{eq:aux3}, we have \begin{equation*}\label{eq:aux6} d_a(T) - d_a(T^\sigma) = m(\sigma,T) - m(\sigma,T^{w_0}). \end{equation*} This also proves the identity in the lemma as in \eqref{eq:aux4}. \qed \vskip 2mm For $\lambda\in \mathscr{P}_{M|N}$ with $\sum_{i}\lambda_i=\ell$, let \begin{equation}\label{eq:Ve(la)} V_\epsilon(\lambda)=\sum_{T\in SST_\epsilon(\lambda)}\mathbb{Q}(q)v_T. \end{equation} Let $H_\lambda$ be the tableau in $SST_\epsilon(\lambda)$, which is defined inductively as follows: \begin{itemize} \item[(1)] Fill the first row (resp. column) of $\lambda$ with $1$ if $\epsilon_1=0$ (resp. $\epsilon_1=1$). \item[(2)] Suppose that we have filled a subdiagram of $\lambda$ from $1$ to $i$. Then fill the first row (resp. column) of the remaining diagram with $i+1$ if $\epsilon_{i+1}=0$ (resp. $\epsilon_{i+1}=1$). \end{itemize} \begin{ex}{\rm Suppose that $n=5$, $\epsilon=(0,1,1,0,0)$ and $\lambda=(6,5,4,2,1)$. In this case, we have \begin{equation*} H_{\lambda}= \raisebox{3ex}{ \ytableausetup {mathmode, boxsize=1.0em} \begin{ytableau} {1} & {1} & {1}& {1}& {1}& {1}\\ {2} & {3}& {4}& {4}&{4} \\ {2} & {3}& {5}& {5} \\ {2} & {3} \\ {2} \\ \end{ytableau}} \end{equation*} } \end{ex} \begin{prop}\label{prop:poly repn} We have the following. \begin{itemize} \item[(1)] $V_\epsilon(\lambda)$ is a $\ring{\mc U}(\epsilon)$-submodule of $\mc{V}^{\otimes\ell}$. \item[(2)] $V_\epsilon(\lambda)$ is an irreducible $\ring{\mc U}(\epsilon)$-module with basis $\{\,v_T\,|\,T\in SST_\epsilon(\lambda)\,\}$. \item[(3)] $v_{H_\lambda}$ is a highest weight vector in $V_\epsilon(\lambda)$. \end{itemize} \end{prop} \noindent{\bfseries Proof. } (1) It is clear that $V_\epsilon(\lambda)$ is invariant under $q^{h}$ for $h\in P^\vee$. It suffices to check $f_i V_\epsilon(\lambda)\subset V_\epsilon(\lambda)$ for $i\in \ring{I}$ since the proof for $e_i$ is the same. The proof is similar to the case when $\epsilon=(0,\dots,0)$ (cf.~\cite{Ful}). For column-semistandard tableaux $U$ and $V$ of shape $\lambda$, we define $U<V$ if there exists $1\le k\le \ell$ such that $U(k)<V(k)$ and $U(k')=V(k')$ for $k<k'\le \ell$. Suppose that $T\in SST_\epsilon(\lambda)$ is given. By \eqref{eq:comult-1}, $f_i v_T$ is a $\mathbb{Q}(q)$-linear combination of $v_{T'}$'s, where we may assume that $T$ is column-semistandard by \eqref{eq:column relation}. If such $T'$ is not semistandard, then we may apply Lemma \ref{lem:Garnir relation} to $T'$ so that $v_{T'}$ is a linear combination of $T''$'s which is column-semistandard and $T'<T''$. Repeating this process finitely many times, we conclude that $f_iT$ is a linear combination of $v_S$'s for some $S\in SST_\epsilon(\lambda)$. Therefore, have $f_iV_\epsilon(\lambda)\subset V_\epsilon(\lambda)$. (2) Since $V_\epsilon(\lambda) = Y^\lambda(q)\mc{V}^{\otimes \ell}$ and $Y^\lambda(q)$ is a primitive idempotent up to scalar multiplication \cite{G}, it follows from Theorem \ref{thm:Schur-Weyl duality} that $V_\epsilon(\lambda)$ is an irreducible $\ring{\mc U}(\epsilon)$-module. Recall that the dimension of the irreducible $\mathcal{H}_\ell(q^{-2})$-module $S^\lambda$ generated by $Y^\lambda(q)$ is the number of standard tableaux of shape $\lambda$. We may have an analogue of the Robinson-Schensted type correspondence, which is a bijection from the set of words of length $\ell$ with letters in $\mathbb{I}$ to the set of pair of standard tableau and semistandard tableau of shape $\lambda$ (cf.~\cite{BR}). Comparing the dimensions of $\mc{V}^{\otimes \ell}$ and its decomposition into $\mathcal{H}(q^{-2})\otimes \ring{\mc U}(\epsilon)$-module $S^\lambda\otimes V_\epsilon(\lambda)$, we conclude that $\dim_{\mathbb{Q}(q)}V_\epsilon(\lambda)$ is equal to $|SST_\epsilon(\lambda)|$, and hence $\{\,v_T\,|\,T\in SST_\epsilon(\lambda)\,\}$ is a linear basis of $V_\epsilon(\lambda)$. (3) The character of $V_\epsilon(\lambda)$ is equal to that of polynomial representations of the general linear Lie superalgebra $\mathfrak{gl}_{M|N}$ corresponding to $\lambda\in \mathscr{P}_{M|N}$, and ${\rm wt}(v_{H_\lambda})$ is maximal \cite[Theorem 2.55]{CW}. This implies that $e_i v_{H_\lambda}=0$ for all $i\in \ring{I}$ and hence $v_{H_\lambda}$ is a highest weight vector. \qed \begin{rem}\label{rem:character of poly} {\rm The character of $V_\epsilon(\lambda)$ for $\lambda\in \mathscr{P}_{M|N}$ is called a hook Schur polynomial \cite{BR}, which depends only on $\epsilon$ up to permutations. The tensor product of two polynomial representations is completely reducible and the multiplicity of each irreducible component is given by usual Littlewood-Richardson coefficient. } \end{rem} \subsection{Crystal base of $V_\epsilon(\lambda)$} Let $\lambda\in \mathscr{P}_{M|N}$ be given. We may define an $\ring I$-colored oriented graph structure by identifying $T$ with $w(T)^{\rm rev}$, the reverse word of $w(T)$. Let \begin{equation}\label{eq:LB for lambda} \begin{split} L_\epsilon(\lambda) &=\bigoplus_{T\in SST_\epsilon(\lambda)}A_0 v_T^*,\\ B_\epsilon(\lambda) &=\{\,\pm v_T^*\!\!\!\!\pmod{qL_\epsilon(\lambda)}\,|\,T\in SST_\epsilon(\lambda)\,\}, \end{split} \end{equation} where $v_T^*=q^{-d(T)}v_T$ for $T\in SST_\epsilon(\lambda)$. \begin{lem}\label{lem:crystal base of column and row} When $\lambda=(1^r)$ or $(r)$ for $r\geq 1$, $(L_\epsilon(\lambda),B_\epsilon(\lambda))$ is a crystal base of $V_\epsilon(\lambda)$, and the crystal $B_\epsilon(\lambda)/\{\pm 1\}$ is isomorphic to $SST_\epsilon(\lambda)$. \end{lem} \noindent{\bfseries Proof. } The proof is similar to that of \cite[Proposition 3.3]{KO}. \qed \begin{prop} Suppose that $\epsilon=\epsilon_{M|N}$. For $\lambda\in \mathscr{P}_{M|N}$, $(L_\epsilon(\lambda),B_\epsilon(\lambda))$ is a crystal base of $V_\epsilon(\lambda)$. \end{prop} \noindent{\bfseries Proof. } The proof is similar to that of \cite[Theorem 4.4]{LT}. Let $(\mathcal{L}(\lambda),\mathcal{B}(\lambda))$ be given by \begin{equation*}\label{eq:(L,B)} \begin{split} \mathcal{L}(\lambda)&=\sum_{r\geq 0,\, i_1,\ldots,i_r\in \ring I}A_0 \widetilde{x}_{i_1}\cdots\widetilde{x}_{i_r}v_\lambda, \\ \mathcal{B}(\lambda)&=\{\,\pm \,{\widetilde{x}_{i_1}\cdots\widetilde{x}_{i_r}v_\lambda}\!\!\! \mod{q L(\lambda)}\,|\,r\geq 0, i_1,\ldots,i_r\in \ring I\,\}\setminus\{0\}, \end{split} \end{equation*} where $v_\lambda$ is a highest weight vector in $V_\epsilon(\lambda)$ and $x=e, f$ for each $i_k$. Following the same arguments in \cite{BKK}, it is shown in \cite{KO} that $(\mathcal{L}(\lambda),\mathcal{B}(\lambda))$ is a crystal base of $V_\epsilon(\lambda)$. The crystal $\mathcal{B}(\lambda)/\{\pm 1\}$ is equal to $SST_\epsilon(\lambda)$ which is connected. Let $\mu=(\mu_1,\dots,\mu_r)=\lambda'$ be the conjugate partition of $\lambda$, and \begin{equation*} V_\epsilon^\mu = V_\epsilon((1^{\mu_1}))\otimes \dots \otimes V_\epsilon((1^{\mu_r})). \end{equation*} Let $I^\mu_\epsilon$ be the subspace of $V_\epsilon^\mu$ spanned by the vectors induced from the relation \eqref{eq:Garnir relation}, which includes the relations in Lemma \ref{lem:Garnir relation}. Since $I^\mu_\epsilon$ is a $\ring{\mc U}(\epsilon)$-submodule, the quotient $V_\epsilon^\mu/I^\mu_\epsilon$ is isomorphic to $V_\epsilon(\lambda)$ by Proposition \ref{prop:poly repn}. So we have a well-defined $\ring{\mc U}(\epsilon)$-linear map \begin{equation*} \pi^\mu : V^\mu_\epsilon \longrightarrow V_\epsilon(\lambda) \end{equation*} given by $\pi^\mu(v_{T_1}\otimes \dots \otimes v_{T_r})=v_T$ where $T$ is the column semistandard tableau whose $i$-th column (from the left) is $T_i$ for $1\leq i\leq r$. Since the decomposition of $V^{\mu}$ is equal to the usual Pieri rule of Schur functions, it has exactly one component isomorphic to $V_\epsilon(\lambda)$. Hence $\pi^\mu$ is equal to the projection onto $V_\epsilon(\lambda)$ up to scalar multiplication. Let $L_\epsilon^\mu = L_\epsilon((1^{\mu_1}))\otimes \dots \otimes L_\epsilon((1^{\mu_r}))$ be the crystal lattice of $V^\mu_\epsilon$. By \cite[Theorem 4.14]{KO}, $\pi^\mu(L_\epsilon^\mu)$ is a crystal lattice of $V_\epsilon(\lambda)$ whose ${\rm wt}(H_{\lambda})$-weight space is equal to $A_0v^*_{H_\lambda}$. Since the crystal of $V_\epsilon(\lambda)$ is connected, we conclude that $\{\,v^*_T\,|\,T\in SST_\epsilon(\lambda)\,\}$ is an $A_0$-basis of $\pi^\mu(L_\epsilon^\mu)$ which is equal to $L_\epsilon(\lambda)$. \qed \begin{rem}\label{rem:crystal base of poly} {\rm For arbitrary $\epsilon$, the $\ring I$-colored oriented graph $SST_\epsilon(\lambda)$ is not in general connected (see \cite{K09} for more details). Furthermore, it is not known yet whether $V_\epsilon(\lambda)$ has a crystal base for any $\lambda\in \mathscr{P}_{M|N}$. We expect that $(L_\epsilon(\lambda),B_\epsilon(\lambda))$ in \eqref{eq:LB for lambda} is a crystal base of $V_\epsilon(\lambda)$. } \end{rem} \section{$R$ matrix for finite-dimensional ${\mc U}(\epsilon)$-modules}\label{sec:R matrix} \subsection{Finite-dimensional ${\mc U}(\epsilon)$-modules of fundamental type} Let $\mathbb{Z}_+$ be the set of non-negative integers. Let \begin{equation*} \mathbb{Z}^n_+(\epsilon)=\{\,{\bf m}=(m_1,\ldots,m_n)\,|\,\text{$m_i\in \mathbb{Z}_+$ if $\epsilon_i=0$, $m_i\in \{0,1\}$ if $\epsilon_i=1$, ($i\in \mathbb{I}$)}\,\}. \end{equation*} For ${\bf m}\in \mathbb{Z}_+^n(\epsilon)$, let $|{\bf m}|=m_1+\dots+m_n$. For $i\in \mathbb{I}$, put ${\bf e}_i=(0,\cdots, 1,\cdots, 0)$ where $1$ appears only in the $i$-th component. For $s\in \mathbb{Z}_{+}$, let \begin{equation*} \mc{W}_{s,\epsilon} = \bigoplus_{\substack{{\bf m}\in \mathbb{Z}^n_+(\epsilon), |{\bf m}|=s}}\mathbb{Q}(q)|{\bf m}\rangle \end{equation*} be the $\mathbb{Q}(q)$-vector space spanned by $|{\bf m}\rangle$ for ${\bf m}\in \mathbb{Z}^n_+(\epsilon)$ with $|{\bf m}|=s$. For a parameter $x\in \mathbb{Q}(q)$, we denote by $\mc{W}_{s,\epsilon}(x)$ a ${\mc U}(\epsilon)$-module $V$, where $V=\mc{W}_{s,\epsilon}$ as a $\mathbb{Q}(q)$-space and the actions of $e_i, f_i, \omega_j$ are given by \begin{equation*}\label{eq:W_l} \begin{split} e_i |{\bf m}\rangle &= \begin{cases} x^{\delta_{i,0}}{q^{m_{i+1}-m_{i}-1}}[m_{i+1}]|{\bf m} + {\bf e}_{i} -{\bf e}_{i+1} \rangle, & \text{if ${\bf m} + {\bf e}_{i} -{\bf e}_{i+1}\in\mathbb{Z}_+^n(\epsilon)$},\\ 0,& \text{otherwise}, \end{cases} \\ f_i |{\bf m}\rangle &= \begin{cases} x^{-\delta_{i,0}}{q^{m_{i}-m_{i+1}-1}}[m_{i}]|{\bf m} - {\bf e}_{i} + {\bf e}_{i+1} \rangle, & \text{if ${\bf m} - {\bf e}_{i} + {\bf e}_{i+1}\in\mathbb{Z}_+^n(\epsilon)$},\\ 0,& \text{otherwise}, \end{cases}\\ \omega_j |{\bf m}\rangle &= q_j^{m_j} |{\bf m} \rangle, \end{split} \end{equation*} for $i\in I$, $j\in \mathbb{I}$, and ${\bf m}=(m_1,\ldots,m_n)\in \mathbb{Z}^n_+(\epsilon)$. Here we understand ${\bf e}_0={\bf e}_n$. \begin{rem}{\rm We may identify $\mc{W}_{s,\epsilon}(x)$ with $V_\epsilon((s))$ \eqref{eq:Ve(la)} as a $\ring{\mc U}(\epsilon)$-module, where $|{\bf m}\rangle$ corresponds to $v_T$, where $T$ is the tableau of shape $(s)$ with $m_i$ the number of occurrences of $i$ in $T$ ($i\in \mathbb{I}$). Also the map \begin{equation}\label{eq:iso phi} \phi(|{\bf m}\rangle)= q^{-\sum_{i<j}m_im_j}|{\bf m}\rangle \end{equation} gives an isomorphism of ${\mc U}(\epsilon)$-modules from $\mc{W}_{s,\epsilon}(x)$ to itself with another ${\mc U}(\epsilon)$-action defined in \cite[(2.15)]{KO}.} \end{rem} Let us regard $\mc{W}_{s,\epsilon}=\mc{W}_{s,\epsilon}(1)$ and set \begin{equation}\label{eq:crystal base of W(r)} \begin{split} \mathcal{L}_{s,\epsilon} &=\bigoplus_{{\bf m}\in \mathbb{Z}_+^n(\epsilon), |{\bf m}|=s}A_0 | {\bf m} \rangle,\quad \mathcal{B}_{s,\epsilon} =\{\,\pm |{\bf m}\rangle \!\!\! \pmod{q\mathcal{L}_{s,\epsilon}}\,|\ {\bf m}\in \mathbb{Z}_+^n(\epsilon), |{\bf m}|=s\,\}. \end{split} \end{equation} \begin{prop} For $s\in \mathbb{Z}_{+}$, the pair $(\mathcal{L}_{s,\epsilon},\mathcal{B}_{s,\epsilon})$ is a crystal base of $\mc{W}_{s,\epsilon}$, where the crystal $\mathcal{B}_{s,\epsilon}/\{\pm 1\}$ is connected. \end{prop} \noindent{\bfseries Proof. } It follows from the same arguments as in Lemma \ref{lem:crystal base of column and row} that $(\mathcal{L}_{s,\epsilon},\mathcal{B}_{s,\epsilon})$ is a crystal base of $\mc{W}_{s,\epsilon}$. The crystal $SST_\epsilon((s))$ is connected with highest element $H_{(s)}$. Since the crystal $\mathcal{B}_{s,\epsilon}/\{\pm 1\}$ of $\mc{W}_{s,\epsilon}$ is equal to $SST_\epsilon((s))$ as an $\ring I$-colored graph, $\mathcal{B}_{s,\epsilon}/\{\pm 1\}$ is connected as an $I$-colored oriented graph. \qed \subsection{Subalgebra ${\mc U}(\epsilon')$}\label{subsec:subalg e'} Suppose that {$n\geq 4$} and let $\epsilon=(\epsilon_1,\dots,\epsilon_n)$ be given. Let $\epsilon'=(\epsilon'_1,\dots,\epsilon'_{n-1})$ be the sequence obtained from $\epsilon$ by removing $\epsilon_i$ for some $i\in \mathbb{I}$. {We further assume that $\epsilon'$ is homogeneous when $n=4$, that is, $\epsilon'=(000)$ or $(111)$.} Put $I'=\{0,1,\cdots,n-2\}.$ Let us denote by $\omega'_l$, $e'_j$, and $f'_j$ the generators of ${\mc U}(\epsilon')$ for $1 \leq l \leq n-1 $ and $j \in I'$, where $k'_j=\omega'_j(\omega'_{j+1})^{-1}$. Let us define $K_j, E_j, F_j$ for $j \in I'$ as follows: {\em Case 1}. Assume that $2\leq i\leq n-1$. For $j\in I'$, put \begin{equation}\label{eq:generators for e'} \begin{split} K_j &= \begin{cases} k_j, & \text{if $j\leq i-2$},\\ k_{i-1}k_{i}, & \text{if $j= i-1$},\\ k_{j+1}, & \text{if $j\geq i$}, \end{cases}\\ E_j &= \begin{cases} e_j, & \text{if $j\leq i-2$},\\ [e_{i-1},e_{i}]_{D_{i-1\,i}}, & \text{if $j= i-1$},\\ e_{j+1}, & \text{if $j\geq i$}, \end{cases}\quad F_j = \begin{cases} f_j, & \text{if $j\leq i-2$},\\ [f_{i},f_{i-1}]_{D_{i-1\,i}^{-1}}, & \text{if $j= i-1$},\\ f_{j+1}, & \text{if $j\geq i$}. \end{cases} \end{split} \end{equation} {\em Case 2}. Assume that $i=n$. For $j\in I'$, put \begin{equation}\label{eq:generators for e'-2} \begin{split} K_j &= \begin{cases} k_j, & \text{if $j\neq 0$},\\ k_{n-1}k_{0}, & \text{if $j=0$},\\ \end{cases}\\ E_j &= \begin{cases} e_j, & \text{if $j\neq 0$},\\ [e_{n-1},e_{0}]_{D_{n-1\,0}}, & \text{if $j=0$},\\ \end{cases}\quad F_j = \begin{cases} f_j, & \text{if $j\neq 0$},\\ [f_{0},f_{n-1}]_{D_{n-1\,0}^{-1}}, & \text{if $j=0$}.\\ \end{cases} \end{split} \end{equation} {\em Case 3}. Assume that $i=1$. For $j\in I'$, put \begin{equation}\label{eq:generators for e'-3} \begin{split} K_j &= \begin{cases} k_{0}k_{1}, & \text{if $j=0$},\\ k_{j+1}, & \text{if $j\neq 0$}, \end{cases}\\ E_j &= \begin{cases} [e_{0},e_{1}]_{D_{0\,1}}, & \text{if $j=0$},\\ e_{j+1}, & \text{if $j\neq 0$}, \end{cases}\quad F_j = \begin{cases} [f_{1},f_{0}]_{D_{0\,1}^{-1}}, & \text{if $j=0$},\\ f_{j+1}, & \text{if $j\neq 0$}. \end{cases} \end{split} \end{equation} \begin{thm}\label{thm:folding homomorphism} There exists a homomorphism of $\mathbb{Q}(q)$-algebras $\phi : {\mc U}(\epsilon') \longrightarrow {\mc U}(\epsilon)$ such that \begin{equation*} \phi(k'_j)=K_j,\quad \phi(e'_j)=E_j,\quad \phi(f'_j)=F_j\quad (j\in I'). \end{equation*} \end{thm} \noindent{\bfseries Proof. } Let us prove {\em Case 1} since the the proof of the other cases are similar. Let $\widetilde\epsilon=(\widetilde\epsilon_1,\dots\widetilde\epsilon_n)$ be the sequence obtained from $\epsilon$ by exchanging $\epsilon_i$ and $\epsilon_{i+1}$, and let $\tau_i : {\mc U}(\epsilon) \longrightarrow {\mc U}(\widetilde\epsilon)$ be the isomorphism in Theorem \ref{thm:reflection}. Put $\Omega_j=\omega_j$ for $1\leq j \leq i-1$ and $\omega_{j+1}$ for $i\leq j \leq n-1$, and let $\phi(\omega'_j)=\Omega_j, \phi(e'_j)=E_j,$ and $\phi(f'_j)=F_j$ for $j=1,\cdots, n-1$. Let us check that $\Omega_j, E_j, F_j$ satisfy the relations in Definition \ref{def:U(e)}. Note that $D_{i-1 i}=q_i^{-1}$. First, the relations \eqref{eq:Weyl-rel-1} and \eqref{eq:Weyl-rel-2} are trivial. Let us check that \eqref{eq:Weyl-rel-3} holds. Let $E_j$ and $F_l$ be given for $j,l \in I'$. If $j\neq l$ or $j=l\neq i-1$, then it is clear. When $j=l=i-1$, we have $\tau_i^{-1}(e_{i-1})=[e_{i-1},e_i]_{D_{i-1\,i}}=E_{i-1}$, $\tau^{-1}(f_{i-1})=F_{i-1}$, and $\tau^{-1}(k_{i-1})=K_{i-1}$. Hence \eqref{eq:Weyl-rel-3} holds. We can check the relation \eqref{eq:Weyl-rel-4} by the same argument. Next, consider the relations \eqref{eq:Serre-rel-1}. The first one is immediate. So it is enough to show the second one. We may only consider four non-trivial cases when the pair of relevant indices in $I'$ are $(i-2,i-1), (i-1,i-2),(i-1,i),(i,i-1)$ with the first index in the pair in $I'_{\rm even}$. In case of $(i-2,i-1)$, we have \begin{equation*} \begin{split} &E_{i-2}^2E_{i-1}-(-1)^{\epsilon_{i-2}}[2]E_{i-2}E_{i-1}E_{i-2}+E_{i-1}E_{i-2}^2\\ &{=e_{i-2}^2e_{i-1}e_{i}-q_i^{-1}e_{i-2}^2e_{i}e_{i-1}-(q_{i-1}+q_{i-1}^{-1})e_{i-2}e_{i-1}e_ie_{i-2}}\\ &\quad {+(q_{i-1}+q_{i-1}^{-1})q_i^{-1}e_{i-2}e_ie_{i-1}e_{i-2}+e_{i-1}e_ie_{i-2}^2-q_i^{-1}e_ie_{i-1}e_{i-2}^2.} \end{split} \end{equation*} which is zero, since $e_{i-2}^2e_{i-1}+e_{i-1}e_{i-2}^2=(q_{i-1}+q_{i-1}^{-1})e_{i-2}e_{i-1}e_{i-2}$ and hence {\begin{equation*} \begin{split} &e_{i-2}^2e_{i-1}e_i-(q_{i-1}+q_{i-1}^{-1})e_{i-2}e_{i-1}e_ie_{i-2}+e_{i-1}e_ie_{i-2}^2=0,\\ &-q_i^{-1}e_{i-2}^2e_ie_{i-1}+q_i^{-1}(q_{i-1}+q_{i-1}^{-1})e_{i-2}e_ie_{i-1}e_{i-2}-q_i^{-1}e_ie_{i-1}e_{i-2}^2=0. \end{split} \end{equation*}} The proof for $(i,i-1)$ is the same. In case of $(i-1,i-2)$ and $(i-1,i)$, the proof reduces to the case of $(i-2,i-1)$ or $(i,i-1)$ by applying $\tau_i$ to $E_l$'s for $l= i-2,i-1,i$. Finally let us check the relation \eqref{eq:Serre-rel-2}. We may only consider the cases when the relevant triple of indices in $I'$ are $(i-3,i-2,i-1), (i-2,i-1,i), (i-1,i,i+1)$ with the index in the middle in $I'_{\rm odd}$. In case of $(i-1,i,i+1)$ and $i \in I'_{\rm odd}$, we have \begin{equation*} \begin{split} &E_{i}E_{i-1}E_{i}E_{i+1} - E_{i}E_{i+1}E_{i}E_{i-1} + E_{i+1}E_{i}E_{i-1}E_{i} \\ &\hskip 2.2cm - E_{i-1}E_{i}E_{i+1}E_{i} + (-1)^{\epsilon_i}[2]E_{i}E_{i-1}E_{i+1}E_{i} \\ &= e_{i+1}(e_{i-1}e_i-q_{i}^{-1}e_ie_{i-1})e_{i+1}e_{i+2} - e_{i+1}e_{i+2}e_{i+1}(e_{i-1}e_i-q_{i}^{-1}e_ie_{i-1}) \\ &\quad + e_{i+2}e_{i+1}(e_{i-1}e_i-q_{i}^{-1}e_ie_{i-1})e_{i+1} - (e_{i-1}e_i-q_{i}^{-1}e_ie_{i-1})e_{i+1}e_{i+2}e_{i+1} \\ &\quad + {(-1)^{\epsilon_{i+1}}[2]}e_{i+1}(e_{i-1}e_i-q_{i}^{-1}e_ie_{i-1})e_{i+2}e_{i+1}, \end{split} \end{equation*} which is zero by \eqref{eq:Serre-rel-2} for ${\mc U}(\epsilon)$ with respect to $i+1 \in I_{\rm odd}$. The proof for $(i-3,i-2,i-1)$ is the same. The proof for $(i-2,i-1,i)$ reduces to the previous cases by applying $\tau_i$ to $E_l$ for $l=i-2,i-1,i$. We leave the proof for $F_j$'s to the reader. \qed \vskip 2mm \subsection{Truncation to ${\mc U}(\epsilon')$-modules} Let $\epsilon'$ be as in Section \ref{subsec:subalg e'}. Suppose that $M'$ is the number of $j$'s with $\epsilon'_j=0$ and $N'$ is the number of $j$'s with $\epsilon'_j=1$ in $\epsilon'$. For a submodule $V$ of $\mathcal{V}^{\otimes \ell}$ ($\ell\geq1$), we define \begin{equation}\label{eq:truncation-1} \mathfrak{tr}^\epsilon_{\epsilon'}(V) = \bigoplus_{\substack{\mu\in {\rm wt}(V) \\ (\mu|\delta_i)=0}}V_\mu, \end{equation} where ${\rm wt}(V)$ is the set of weights of $V$. For any submodules $V,W$ of a tensor power of $\mc{V}$, it is clear that \begin{equation*} \mathfrak{tr}^\epsilon_{\epsilon'}(V\otimes W)=\mathfrak{tr}^\epsilon_{\epsilon'}(V)\otimes \mathfrak{tr}^\epsilon_{\epsilon'}(W), \end{equation*} as a vector space. \begin{lem}\label{lem:truncation of natural repn} Let $\mc{V}'=\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{V})$. Then \begin{itemize} \item[(1)] $\mc{V}'$ is isomorphic to the natural representation of $\ring{\mc U}(\epsilon')$ given in \eqref{eq:natural repn}, \item[(2)] $\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{V}^{\otimes \ell})$ is isomorphic to $\mc{V}'^{\otimes \ell}$ as a $\ring{\mc U}(\epsilon')$-module. \end{itemize} \end{lem} \noindent{\bfseries Proof. } (1) Let us assume that $2\leq i\leq n-2$ since the proof for the other cases is similar. Let $j\in \ring {(I')}$ and $k\in \mathbb{I}\setminus\{i\}$ given. It is clear from \eqref{eq:generators for e'} that \begin{equation*}\label{eq:natural for e'-1} E_jv_k= \begin{cases} v_j, & \text{if $k= j+1$},\\ 0, & \text{if $k\neq j+1$}, \end{cases} \quad (j\leq i-2),\quad E_jv_k= \begin{cases} v_{{j+1}}, & \text{if $k= j+2$},\\ 0, & \text{if $k\neq j+2$}, \end{cases}\quad (j\geq i). \end{equation*} When $j=i-1$, we have $E_{i-1}=e_{i-1}e_i-q^{-1}_ie_ie_{i-1}$, and \begin{equation*}\label{eq:natural for e'-2} E_{i-1}v_k= \begin{cases} v_{i-1}, & \text{if $k= i+1$},\\ 0, & \text{if $k\neq i+1$}. \end{cases} \end{equation*} We have similar formulas for $F_j$ for $j\in \ring {(I')}$. Hence $\mc{V}'$ is invariant under the action of $\ring{\mc U}(\epsilon')$. In fact, $\mathcal{V}'$ is isomorphic to the natural representation of $\ring{\mc U}(\epsilon')$ \eqref{eq:natural repn}. (2) We see that the actions of $E_j, F_j, K_j$ $(j\in \ring {(I')})$ on $\mc{V}'\otimes\mc{V}'$ are equal to those of \begin{equation}\label{eq:action of e' on tensor power} K_j^{-1} \otimes E_j + E_j\otimes 1 ,\quad 1\otimes F_j + F_j\otimes K_j, \quad K_j\otimes K_j, \end{equation} respectively. This implies that $\mc{V}'\otimes\mc{V}'$ and hence $(\mc{V}')^{\otimes \ell}$ are invariant under the action of $\ring{\mc U}(\epsilon')$. For example, in case of $E_{i-1}=e_{i-1}e_i-q^{-1}_ie_ie_{i-1}$, we have \begin{equation*} \begin{split} \Delta(E_{i-1}) &=\Delta(e_{i-1})\Delta(e_{i})-q^{-1}_i\Delta(e_{i})\Delta(e_{i-1})\\ &=k_{i-1}^{-1}k_i^{-1}\otimes e_{i-1}e_i + k_{i-1}^{-1}e_i\otimes e_{i-1}+ k_{i}^{-1}e_{i-1}\otimes e_{i} + e_{i-1}e_i\otimes 1 \\ &\ \ -q^{-1}_i ( k_i^{-1}k_{i-1}^{-1}\otimes e_ie_{i-1} + k_{i}^{-1}e_{i-1}\otimes e_{i}+ k_{i-1}^{-1}e_{i}\otimes e_{i-1} + e_{i}e_{i-1}\otimes 1 ). \end{split} \end{equation*} Then the action of $\Delta(E_{i-1})$ on $\mathcal{V}'\otimes \mathcal{V}'$ is equal to $k_{i}^{-1}k_{i-1}^{-1}\otimes e_{i-1}e_i + e_{i-1}e_{i}\otimes 1$, and hence $K_{i-1}^{-1}\otimes E_{i-1} + E_{i-1}\otimes 1$. \qed \begin{prop}\label{prop:truncation of poly} Let $\lambda \in \mathscr{P}_{M|N}$ be given. \begin{itemize} \item[(1)] $\mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))$ is a $\ring{\mc U}(\epsilon')$-submodule of $V_\epsilon(\lambda)$ via $\phi$. \item[(2)] $\mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))$ is non-zero if and only if $\lambda\in \mathscr{P}_{M'|N'}$. In this case, we have \begin{equation*} \mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda)) \cong V_{\epsilon'}(\lambda), \end{equation*} as a $\ring{\mc U}(\epsilon')$-module. \end{itemize} \end{prop} \noindent{\bfseries Proof. } (1) It follows from Lemma \ref{lem:truncation of natural repn} and \begin{equation}\label{eq:truncation-2} \mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))=\mathfrak{tr}^\epsilon_{\epsilon'}(Y^\lambda(q){\mathcal V}^{\otimes \ell}) =Y^\lambda(q)\mathfrak{tr}^\epsilon_{\epsilon'}({\mathcal V}^{\otimes \ell}) =Y^\lambda(q)\mathfrak{tr}^\epsilon_{\epsilon'}({\mathcal V})^{\otimes \ell}=Y^\lambda(q)(\mc{V}')^{\otimes \ell}. \end{equation} (2) Note that $SST_{\epsilon'}(\lambda)\subset SST_{\epsilon}(\lambda)$. By Proposition \ref{prop:poly repn} and \eqref{eq:truncation-2}, we see that $\mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))$ is a $\mathbb{Q}(q)$-span of $\{\,v_{T'}\,|\, T'\in SST_{\epsilon'}(\lambda)\,\}$, which in fact forms a basis. This implies that $\mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))$ is non-zero if and only if $\lambda\in \mathscr{P}_{M-1|N}$ when $\epsilon_i=0$, and $\lambda\in \mathscr{P}_{M|N-1}$ when $\epsilon_i=1$. Hence, $\mathfrak{tr}^\epsilon_{\epsilon'}(V_\epsilon(\lambda))$ is isomorphic to $V_{\epsilon'}(\lambda)$ when it is non-zero by \eqref{eq:action of e' on tensor power} and Proposition \ref{prop:poly repn}. \qed \begin{cor} Let $V,W$ be submodules of a tensor power of $\mc{V}$. Then \begin{itemize} \item[(1)] $\mathfrak{tr}^\epsilon_{\epsilon'}(V)$, $\mathfrak{tr}^\epsilon_{\epsilon'}(W)$, and $\mathfrak{tr}^\epsilon_{\epsilon'}(V\otimes W)$ are $\ring{\mc U}(\epsilon')$-modules via $\phi$, \item[(2)] $\mathfrak{tr}^\epsilon_{\epsilon'}(V\otimes W)\cong\mathfrak{tr}^\epsilon_{\epsilon'}(V)\otimes \mathfrak{tr}^\epsilon_{\epsilon'}(W)$ as $\ring{\mc U}(\epsilon')$-modules. \end{itemize} \end{cor} \noindent{\bfseries Proof. } Since $\mc{V}^{\otimes \ell}$ is completely reducible, it follows from Proposition \ref{prop:truncation of poly} and \eqref{eq:action of e' on tensor power}. \qed \vskip 2mm We may define $\mathfrak{tr}^\epsilon_{\epsilon'}$ and have similar results for ${\mc U}(\epsilon)$-modules in $\mathcal O_{\geq 0}$. \begin{prop}\label{prop:truncation of fund} \mbox{} \begin{itemize} \item[(1)] For $s\in\mathbb{Z}_+$ and $x\in \mathbb{Q}(q)$, $\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{s,\epsilon}(x))$ is a ${\mc U}(\epsilon')$-submodule of $\mc{W}_{s,\epsilon}(x)$ via $\phi$, and \begin{equation*} \mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{s,\epsilon}(x)) \cong \mc{W}_{s,\epsilon'}(x). \end{equation*} Moreover, $(\mathfrak{tr}^\epsilon_{\epsilon'}(\mathcal{L}_{s,\epsilon}),\mathfrak{tr}^\epsilon_{\epsilon'}(\mathcal{B}_{s,\epsilon}))$ is a crystal base of $\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{s,\epsilon})$ isomorphic to $(\mathcal{L}_{s,\epsilon'},\mathcal{B}_{s,\epsilon'})$. \item[(2)] For $l,m\in\mathbb{Z}_+$ and $x,y\in \mathbb{Q}(q)$, $\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y))$ is a ${\mc U}(\epsilon')$-module via $\phi$, and \begin{equation*} \mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y))\cong\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{l,\epsilon}(x))\otimes \mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{m,\epsilon}(y)), \end{equation*} as ${\mc U}(\epsilon')$-modules. \end{itemize} \end{prop} \noindent{\bfseries Proof. } The proof is the same as in Proposition \ref{prop:truncation of poly}. \qed \subsection{Irreducibility of $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$} Let us show that $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ is irreducible for $l,m\in\mathbb{Z}_+$ and generic $x,y\in \mathbb{Q}(q)$. When $\epsilon=\epsilon_{M|N}$, the irreducibility is shown in \cite{KOS}. In this paper, we give a different proof of it, which is also available for arbitrary $\epsilon$. \begin{thm}\label{thm:main theorem-1} For $l,m\in\mathbb{Z}_+$, $\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon}$ is irreducible. \end{thm} \noindent{\bfseries Proof. } Let us assume without loss of generality that $M, N\geq 1$ with $\epsilon_1=0$. Let $(\mathcal{L}_{s,\epsilon},\mathcal{B}_{s,\epsilon})$ be the crystal base of $\mc{W}_{s,\epsilon}$ in \eqref{eq:crystal base of W(r)} for $s=l,m$. By Proposition \ref{prop:tensor product rule}, $(\mathcal{L}_{l,\epsilon}\otimes \mathcal{L}_{m,\epsilon},\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon})$ is a crystal base of $\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon}$. If $M=1$, then it is proved in \cite{KO} that $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$ is connected. Since $\dim_{\mathbb{Q}(q)}(\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon})_{(l+m)\delta_1}=1$ and $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$ is connected, it follows from \cite[Lemma 2.7]{BKK} that $\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon}$ is irreducible. We assume that $M\geq 2$. Set $\epsilon'=\epsilon_{M|0}$, which is the subsequence of $\epsilon$ obtained by removing all $\epsilon_i=1$'s. Note that the length of $\epsilon'$ may be less than 4 so that ${\mc U}(\epsilon')$ is not well-defined, but $\mathfrak{tr}^\epsilon_{\epsilon'}$ can be defined in the same way as in \eqref{eq:truncation-1}. We put \begin{equation*} \mathcal{W}_{s,\epsilon'}:=\mathfrak{tr}^\epsilon_{\epsilon'}(\mathcal{W}_{s,\epsilon}),\quad \mathcal{L}_{s,\epsilon'}:=\mathfrak{tr}^\epsilon_{\epsilon'}(\mathcal{L}_{s,\epsilon})\subset \mathcal{L}_{s,\epsilon},\quad \mathcal{B}_{s,\epsilon'}:=\mathfrak{tr}^\epsilon_{\epsilon'}(\mathcal{B}_{s,\epsilon})\subset \mathcal{B}_{s,\epsilon}. \end{equation*} Let $1\leq j_1<\dots<j_M\leq n$ be such that $\epsilon_{j_k}=0$ for $1\leq k\leq M$. By Theorem \ref{thm:folding homomorphism}, we have a $U_q(\mathfrak{sl}_2)$-action on $\mc{W}_{l,\epsilon'}\otimes \mc{W}_{m,\epsilon'}$ corresponding to the pair $(\epsilon_{j_k},\epsilon_{j_{k+1}})$ or $(\epsilon_{j_M},\epsilon_{j_1})$. For $0\leq k\leq M-1$, let us denote by $\widetilde{e}_{k'}$ and $\widetilde{f}_{k'}$ the Kashiwara operators corresponding to $(\epsilon_{j_k},\epsilon_{j_{k+1}})$ when $k\neq 0$ and to $(\epsilon_{j_M},\epsilon_{j_1})$ when $k=0$. If we put $I'=\{\,k'\,|\,k=0,\dots,M-1 \,\}$, then $\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}$ is invariant under $\widetilde{e}_{k'}$ and $\widetilde{f}_{k'}$ for $k'\in I'$, and hence $\mathcal{B}_{l,\epsilon'}\otimes \mathcal{B}_{m,\epsilon'}/\{\pm 1\}$ is an $I'$-colored oriented graph. Since $\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}\subset \mathcal{L}_{l,\epsilon}\otimes \mathcal{L}_{m,\epsilon}$ and $\mathcal{B}_{l,\epsilon'}\otimes \mathcal{B}_{m,\epsilon'}\subset \mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}$, we may regard $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$ as an $(I\sqcup I')$-colored oriented graph. Let ${\bf b}=|{\bf m}_1\rangle\otimes |{\bf m}_2\rangle\in \mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}$ be given. We will show that ${\bf b}$ is connected to $|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$, which implies that $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$ is connected as an $(I\sqcup I')$-colored oriented graph. Let us write ${\bf m}_i=(m_{i1},\dots,m_{in})$ for $i=1,2$. We first claim that there exists a sequence $i_1,\dots,i_r\in I$ such that $(\epsilon_{i_k},\epsilon_{i_{k}+1})\neq (0,0)$ for $1\leq k\leq r$ and \begin{equation}\label{eq:path to usual affine type} {\bf b}':=\widetilde{x}_{i_1}\dots\widetilde{x}_{i_r} {\bf b} \equiv |{\bf m}'_1\rangle\otimes |{\bf m}'_2\rangle \pmod{q\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}}, \end{equation} for some $|{\bf m}'_1\rangle\in \mc{W}_{l,\epsilon'}$ and $|{\bf m}'_2\rangle\in \mc{W}_{m,\epsilon'}$, where $\widetilde{x}_{i_s}=\widetilde{e}_{i_s}$ or $\widetilde{f}_{i_s}$ for each $1\leq s\leq r$. Suppose that there exists $k$ with $\epsilon_k=1$ such that $m_{1k}=1$ or $m_{2k}=1$. Let $i$ and $j$ be the maximal and minimal indices respectively such that $i<k<j$ and $\epsilon_i=\epsilon_j=0$. If there is no such $(i,j)$, then we have $\epsilon=\epsilon_{M|N}$ and identify this case with the one of $\epsilon=(0^{M-1},1^N,0)$. Since we will choose $i_1,\dots, i_r$ in $\{i,i+1,\dots,j-1\}$, we may assume for simplicity that $m_{ab}=0$ for $a=1,2$ and $b\not\in \{i,\dots, j\}$. Let us use induction on $L=|{\bf m}_1|+|{\bf m}_2|$. Suppose that $L=1$. If $m_{1k}=1$, then $\widetilde{f}_{j-1}\widetilde{f}_{j-2}\dots\widetilde{f}_{k}{\bf b}$ satisfies \eqref{eq:path to usual affine type}. If $m_{2k}=1$, then $\widetilde{e}_{i}\widetilde{e}_{i+1}\dots\widetilde{e}_{k-1}{\bf b}$ satisfies \eqref{eq:path to usual affine type}. Suppose that $L>1$. We may assume that $\widetilde{f}_{i+1} {\bf b}=\widetilde{f}_{i+2} {\bf b}= \dots =\widetilde{f}_{j-1} {\bf b}=0$. Then by tensor product rule in Proposition \ref{prop:tensor product rule} we have \begin{equation}\label{eq:m step1} \begin{split} {\bf m}_1&= m_{1i}{\bf e}_i + \sum_{x\leq u\leq y}{\bf e}_u + \sum_{z\leq v\leq j-1}{\bf e}_v + m_{1j}{\bf e}_j , \\ {\bf m}_2&= m_{2i}{\bf e}_i + \sum_{y+1\leq v\leq j-1}{\bf e}_v + m_{2j}{\bf e}_j, \end{split} \end{equation} for some $i<x<y<z<j$. Here we assume that $\sum_{z\leq v\leq j-1}{\bf e}_v$ in ${\bf m}_1$ is empty if there is no such $z$. Now we take the following steps to construct ${\bf b}'$ in \eqref{eq:path to usual affine type}. {Step 1}. If there exists $z$ such that $y<z<j$ and $m_{1z}=\dots=m_{1j-1}=1$, then by applying $\widetilde{f}_{z}\widetilde{f}_{z-1}\dots\widetilde{f}_{j-1}$ to ${\bf b}$, ${\bf m}_1$ in \eqref{eq:m step1} is replaced by \begin{equation}\label{eq:m step1-2} m_{1i}{\bf e}_i + \sum_{x\leq u\leq y}{\bf e}_u + \sum_{z+1\leq v\leq j-1}{\bf e}_v + (m_{1j}+1){\bf e}_j. \end{equation} Repeating this step, \eqref{eq:m step1-2} is replaced by \begin{equation*}\label{eq:m step 1-3} m_{1i}{\bf e}_i + \sum_{x\leq u\leq y}{\bf e}_u + (m_{1j}+j-z){\bf e}_j. \end{equation*} Hence we may assume that ${\bf m}_1$ in \eqref{eq:m step1} is of the form $m_{1i}{\bf e}_i + \sum_{x\leq u\leq y+1}{\bf e}_u + m_{1j}{\bf e}_j$. {Step 2}. If $m_{1j}=0$, then we have \begin{equation*} \widetilde{f}_{j-1}{\bf b}=|{\bf m}_1\rangle \otimes |{\bf m}_2-{\bf e}_{j-1}+{\bf e}_{j}\rangle. \end{equation*} Hence we may apply the induction hypothesis to conclude \eqref{eq:path to usual affine type}. {Step 3}. If $m_{ij}\neq 0$, then by applying $\widetilde{e}_i\widetilde{e}_{i+1}\dots\widetilde{e}_{j-2}\widetilde{e}_{j-1}$ to ${\bf b}$, ${\bf m}_1$ and ${\bf m}_2$ are replaced by \begin{equation*}\label{eq:m step 3-1} \begin{split} & m_{1i}{\bf e}_i + \sum_{x\leq u\leq y+1}{\bf e}_u + (m_{1j}-1){\bf e}_j, \\ & (m_{2i}+1){\bf e}_i + \sum_{y+2\leq v\leq j-1}{\bf e}_v + m_{2j}{\bf e}_j, \end{split} \end{equation*} respectively. Repeating this step $d$ times such that $m_{1j}-d\geq 0$ and $y+d+1\leq j$, ${\bf m}_1$ and ${\bf m}_2$ are replaced by \begin{equation*}\label{eq:m step 3-2} \begin{split} & m_{1i}{\bf e}_i + \sum_{x\leq u\leq y+d}{\bf e}_u + (m_{1j}-d){\bf e}_j, \\ & (m_{2i}+d){\bf e}_i + \sum_{y+d+1\leq v\leq j-1}{\bf e}_v + m_{2j}{\bf e}_j, \end{split} \end{equation*} respectively. We may keep this process until $m_{1j}-d=0$, which belongs to the case in {\em Step 2}, or $\sum_{y+d+1\leq v\leq j-1}{\bf e}_v$ is empty. In the latter case, ${\bf m}_1$ is replaced by $m_{1i}{\bf e}_i + \sum_{x\leq u\leq j-1}{\bf e}_u + (m_{1j}-d){\bf e}_j$ so that we may apply $\widetilde{f}_{j-1}$ and use induction hypothesis to have ${\bf b}'$. This proves the claim. By construction of ${\bf b}'$ and its weight, we have \begin{equation*} {\bf b}'- |{\bf m}'_1\rangle\otimes |{\bf m}'_2\rangle\in \left(\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}\right)\cap \left(q\mathcal{L}_{l,\epsilon}\otimes \mathcal{L}_{m,\epsilon}\right)=q\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}, \end{equation*} and hence ${\bf b}'\in (\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}/q\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'})\subset (\mathcal{L}_{l,\epsilon}\otimes \mathcal{L}_{m,\epsilon}/q\mathcal{L}_{l,\epsilon}\otimes \mathcal{L}_{m,\epsilon})$. If $M=2$, then it is easy to show that ${\bf b}'=|{\bf m}'_1\rangle\otimes |{\bf m}'_2\rangle\in \mathcal{B}_{l,\epsilon'}\otimes \mathcal{B}_{m,\epsilon'}$ is connected to $|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$ under $\widetilde{e}_{k'}$ and $\widetilde{f}_{k'}$ for $k=0,1$. If $M\geq 3$, then we can also show that ${\bf b}'=|{\bf m}'_1\rangle\otimes |{\bf m}'_2\rangle\in \mathcal{B}_{l,\epsilon'}\otimes \mathcal{B}_{m,\epsilon'}$ is connected to $|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$ by using the fact that $\mathcal{B}_{l,\epsilon'}\otimes \mathcal{B}_{m,\epsilon'}/\{\pm 1\}$ is a connected crystal of type $A_{M-1}^{(1)}$ (cf.~\cite{AK}). Finally, since $\dim_{\mathbb{Q}(q)}(\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon})_{(l+m)\delta_1}=1$ and $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$ is connected, it follows from \cite[Lemma 2.7]{BKK} that $\mc{W}_{l,\epsilon}\otimes \mc{W}_{m,\epsilon}$ is irreducible. This completes the proof. \qed \begin{cor}\label{cor:irreducibility} For $l,m\in\mathbb{Z}_+$ and generic $x,y\in \mathbb{Q}(q)$, $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ is irreducible. \end{cor} \noindent{\bfseries Proof. } It follows from \cite[Lemma 3.4.2]{KMN}. \qed \subsection{Existence of $R$ matrix} For $l,m\in\mathbb{Z}_+$ and $x,y\in\mathbb{Q}(q)$, consider a non-zero $\mathbb{Q}(q)$-linear map $R$ on $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ such that \begin{equation}\label{eq:R matrix} \begin{split} \Delta^{\rm op}(g) \circ R = R \circ \Delta (g), \end{split} \end{equation} for $g\in {\mc U}(\epsilon)$, where $\Delta^{\rm op}$ is the opposite coproduct of $\Delta$ in \eqref{eq:comult-1}, that is, $\Delta^{\rm op}(g) = P \circ \Delta(g) \circ P $ and $P(a\otimes b)=b\otimes a$. We denote it by $R(z)$, where $z=x/y$, since $R$ depends only on $z$. We say that $R(z)$ satisfies the Yang-Baxter equation if we have \begin{equation}\label{eq:YB equation} R_{12}(u)R_{13}(uv)R_{23}(v)=R_{23}(v)R_{13}(uv)R_{12}(u), \end{equation} on $\mc{W}_{s_1,\epsilon}(x_1)\otimes \mc{W}_{s_2,\epsilon}(x_2)\otimes \mc{W}_{s_3,\epsilon}(x_3)$ with $u=x_1/x_2$ and $v=x_2/x_3$ for $(s_1),(s_2),(s_3)\in \mathscr{P}_{M|N}$. Here $R_{ij}(z)$ denotes the map which acts as $R(z)$ on the $i$-th and the $j$-th component and the identity elsewhere. We call $R(z)$ the {\em (quantum) $R$ matrix}. \begin{thm}\label{thm:existence of R-matrix} Let $l, m\in \mathbb{Z}_+$ given with $(l), (m)\in \mathscr{P}_{M|N}$. Suppose that $\epsilon_1=0$. There exists a unique non-zero linear map $R(z)\in {\rm End}_{\mathbb{Q}(q)}(\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y))$ satisfying \eqref{eq:R matrix} and \eqref{eq:YB equation}, and $R(z)(|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle)=|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$ for generic $x,y\in \mathbb{Q}(q)$. \end{thm} \noindent{\bfseries Proof. } The existence of such a map for arbitrary $\epsilon$ is proved in \cite[Theorem 5.1]{KOS} with respect to $\Delta_+$ in \eqref{eq:comult-2}, say $R_+$. Let \begin{equation}\label{eq:chi} \chi=\psi\circ(\phi\otimes \phi), \end{equation} where $\psi$ and $\phi$ are given in \eqref{eq:isomorphism for two comult} and \eqref{eq:iso phi}, respectively. Then \begin{equation*} R:=\chi^{-1}\circ R_+\circ \chi \end{equation*} satisfies the conditions \eqref{eq:R matrix} and \eqref{eq:YB equation}, and $R(z)(|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle)=|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$ with respect to $\Delta$. The uniqueness follows from the irreducibility in Corollary \ref{cor:irreducibility} and normalization by $R(z)(|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle)=|l{\bf e}_1\rangle\otimes |m{\bf e}_1\rangle$. \qed \begin{rem}{\rm If $M=0$, then the existence of $R$ matrix is already known. Hence we may assume that $M\geq 1$. If $\epsilon_1=1$, then we may choose the smallest $i\in \mathbb{I}_0$ so that there exists a unique $R$ matrix satisfying $R(z)(|l{\bf e}_i\rangle\otimes |m{\bf e}_i\rangle)=|l{\bf e}_i\rangle\otimes |m{\bf e}_i\rangle$. } \end{rem} \section{Kirillov-Reshetikhin modules}\label{sec:KR modules} \subsection{Spectral decomposition} Suppose that $\epsilon=(\epsilon_1,\dots,\epsilon_n)$ is given with $n\geq 4$. Recall that $M$ is the number of $i$'s with $\epsilon_i=0$ and $N$ is the number of $i$'s with $\epsilon_i=1$ in $\epsilon$. Let $l,m\in\mathbb{Z}_+$ be given. Let $R_\epsilon(z)$ be the $R$ matrix on $\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)$ in Theorem \ref{thm:existence of R-matrix}. We have as a $\ring{\mc U}(\epsilon)$-module, \begin{equation*}\label{eq:decomp of W_l and W_m} \mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y) \cong \bigoplus_{t\in H(l,m)} V_\epsilon((l+m-t,t)), \end{equation*} where $H(l,m)=\{\,t\,|\,0\leq t\leq \min\{l,m\}, (l+m-t,t)\in \mathscr{P}_{M|N}\,\}$. Let us take a sequence $\epsilon''=(\epsilon''_1,\dots,\epsilon''_{n''})$ of $0,1$'s with $n''\gg n$ satisfying the following: \begin{itemize} \item[(1)] $\epsilon$ is a subsequence of $\epsilon''$, \item[(2)] we have as a $\ring{\mc U}(\epsilon'')$-module \begin{equation*}\label{eq:decomp of W_l and W_m-e''} \mc{W}_{l,\epsilon''}(x)\otimes \mc{W}_{m,\epsilon''}(y) \cong \bigoplus_{0\leq t\leq \min\{l,m\}} V_{\epsilon''}((l+m-t,t)), \end{equation*} \item[(3)] if $\epsilon'=\epsilon_{M''|0}$ with $M''=|\{\,i\,|\,\epsilon''_i=0\,\}|\gg 0$, then we have as a $\ring{\mc U}(\epsilon')$-module \begin{equation*}\label{eq:decomp of W_l and W_m-e'} \mc{W}_{l,\epsilon'}(x)\otimes \mc{W}_{m,\epsilon'}(y) \cong \bigoplus_{0\leq t\leq \min\{l,m\}} V_{\epsilon'}((l+m-t,t)), \end{equation*} \end{itemize} Let $R_{\epsilon''}(z)$ and $R_{\epsilon'}(z)$ denote the $R$ matrices on $\mc{W}_{l,\epsilon''}(x)\otimes \mc{W}_{m,\epsilon''}(y)$ and $\mc{W}_{l,\epsilon'}(x)\otimes \mc{W}_{m,\epsilon'}(y)$, respectively. \begin{lem}\label{lem:comm diagram of R matrix} For $\upepsilon=\epsilon$ or $\epsilon'$, we have the following commutative diagram: \begin{equation*}\label{eq:comm diagram of R matrix} \xymatrixcolsep{4pc}\xymatrixrowsep{2pc}\xymatrix{ \mc{W}_{l,\epsilon''}(x)\otimes \mc{W}_{m,\epsilon''}(y) \ar@{->}^{PR_{\epsilon''}(z)}[r] \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\upepsilon}}[d] &\ \mc{W}_{m,\epsilon''}(y)\otimes \mc{W}_{l,\epsilon''}(x) \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\upepsilon}}[d] \\ \mc{W}_{l,\upepsilon}(x)\otimes \mc{W}_{m,\upepsilon}(y) \ar@{->}^{PR_{\upepsilon}(z)}[r] &\ \mc{W}_{m,\upepsilon}(y)\otimes \mc{W}_{l,\upepsilon}(x)}\quad \end{equation*} \end{lem} \noindent{\bfseries Proof. } For $\upepsilon=\epsilon$ or $\epsilon'$, the restriction of $PR_{\epsilon''}(z)$ on $\mathfrak{tr}^{\epsilon''}_{\upepsilon}\left(\mc{W}_{l,\epsilon}(x)\otimes \mc{W}_{m,\epsilon}(y)\right)$, which gives a well-defined ${\mc U}(\upepsilon)$-linear endomorphism. By Proposition \ref{prop:truncation of fund} and Theorem \ref{thm:existence of R-matrix}, the restricted $R$ matrix is the quantum $R$ matrix on $\mc{W}_{l,\upepsilon}(x)\otimes \mc{W}_{m,\upepsilon}(y)$, which proves the commutativity of the diagram. \qed For $0\leq t\leq \min\{l,m\}$, let $v'(l,m,t)$ be the highest weight vectors of $V_{\epsilon'}((l+m-t,t))$ in $\mc{W}_{l,\epsilon'}(x)\otimes \mc{W}_{m,\epsilon'}(y)$ such that \begin{equation*} \begin{split} & v'(l,m,t)\in \mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'},\\ & v'(l,m,t)\equiv | l{\bf e}_1 \rangle\otimes | (m-t){\bf e}_1 + t{\bf e}_2 \rangle \pmod{q\mathcal{L}_{l,\epsilon'}\otimes \mathcal{L}_{m,\epsilon'}}. \end{split} \end{equation*} We also define $v'(m,l,t)$ in the same manner. For $0\leq t'\leq \min\{l,m\}$, we may regard \begin{equation*} V_{\epsilon}((l+m-t,t))\subset V_{\epsilon''}((l+m-t,t)), \quad V_{\epsilon'}((l+m-t,t))\subset V_{\epsilon''}((l+m-t,t)) \end{equation*} as a $\mathbb{Q}(q)$-space, and let $\mathcal P^{l,m}_{t} : \mc{W}_{l,\epsilon''}(x)\otimes \mc{W}_{m,\epsilon''}(y) \longrightarrow \mc{W}_{m,\epsilon''}(y)\otimes \mc{W}_{l,\epsilon''}(x)$ be a $\ring{\mc U}(\epsilon'')$-linear map given by $\mathcal P^{l,m}_{t}(v'(l,m,t'))=\delta_{tt'}v'(m,l,t')$. Then we have the following spectral decomposition of $PR_{\epsilon''}(z)$ \begin{equation*} PR_{\epsilon''}(z)= \sum_{0\leq t\leq \min\{l,m\}}\rho_t(z) \mathcal P^{l,m}_t, \end{equation*} for some $\rho_t(z)\in \mathbb{Q}(q)$. By Proposition \ref{prop:truncation of poly} and Lemma \ref{lem:comm diagram of R matrix}, we also have the following spectral decomposition of $PR_{\upepsilon}(z)$ \begin{equation}\label{eq:R for e and e'} \begin{split} PR_{\epsilon'}(z)&= \sum_{0\leq t\leq \min\{l,m\}}\rho_t(z) \mathcal P^{l,m}_t,\\ PR_{\epsilon}(z)&= \sum_{t\in H(l,m)}\rho_t(z) \mathcal P^{l,m}_t, \end{split} \end{equation} where we understand $\mathcal{P}^{l,m}_t$ as defined on $\mc{W}_{l,\upepsilon}(x)\otimes \mc{W}_{m,\upepsilon}(y)$. Then we have the following explicit description of $PR_\epsilon(z)$, which is proved in case of $\epsilon=\epsilon_{M|N}$ \cite{KOS}. \begin{thm}\label{thm:spectral decomp} We have \begin{equation}\label{eq:spectral M=0} PR_\epsilon(z) = \sum_{t=\max\{l+m-n,0\}}^{\min\{l,m\}}\left(\prod_{i=t+1}^{\min\{l,m\}}\frac{z-q^{l+m-2i+2}}{1-q^{l+m-2i+2}z}\right)\mathcal P^{l,m}_t \qquad (M=0), \end{equation} \begin{equation}\label{eq:spectral M=1} PR_\epsilon(z)= \sum_{t=0}^{\min\{l,m,n-1\}}\left(\prod_{i=1}^{t}\frac{1-q^{l+m-2i+2}z}{z-q^{l+m-2i+2}}\right)\mathcal P^{l,m}_t\hskip 2cm (M=1), \end{equation} \begin{equation}\label{eq:spectral M>1} PR_\epsilon(z)= \sum_{t=0}^{\min\{l,m\}} \left(\prod_{i=1}^{t}\frac{1-q^{l+m-2i+2}z}{z-q^{l+m-2i+2}}\right)\mathcal P^{l,m}_t \hskip 2cm (2\leq M\leq n), \end{equation} where we assume that $\rho_{\min\{l,m\}}(z)=1$ in \eqref{eq:spectral M=0} and $\rho_0(z)=1$ in \eqref{eq:spectral M=1} and \eqref{eq:spectral M>1}. \end{thm} \noindent{\bfseries Proof. } We may consider the case of $1\leq M\leq n$ only since the case when $M=0$ is known (see \cite[(5.6)]{KO} or \cite[(6.10)]{KOS}). It is well-known that $PR_{\epsilon'}(z)$ for $\epsilon'=\epsilon_{M''|0}$ has the following spectral decomposition \begin{equation*} PR_{\epsilon'}(z)= \sum_{0\leq t\leq \min\{l,m\}}\rho'_t(z) \mathcal P^{l,m}_t, \end{equation*} where \begin{equation*} \rho'_0(z)=1,\quad \rho'_t(z)=\prod_{i=1}^{t}\frac{1-q^{l+m-2i+2}z}{z-q^{l+m-2i+2}} \qquad(1\leq t\leq \min\{l,m\}), \end{equation*} (cf.~\cite[(5.8)]{KO} or \cite[(6.16)]{KOS}). We remark that $\chi(v'(l,m,t))$ and $\chi(v'(m,l.t))$ for $0\leq t\leq \min\{l,m\}$ are the same scalar multiplications of the highest weight vectors in \cite[(6.14)]{KOS}, where $\chi$ is as in \eqref{eq:chi}. Hence it follows from \eqref{eq:R for e and e'} that \begin{equation*} \rho_t(z)=\rho'_t(z) \quad (t\in H(l,m)), \end{equation*} which completes the proof. \qed \subsection{Kirillov-Reshetikhin modules} As an application of Theorem \ref{thm:spectral decomp}, let us construct a family of irreducible ${\mc U}(\epsilon)$-modules in $\mathcal{O}_{\geq 0}$ which corresponds to usual Kirillov-Reshetikhin modules under truncation. Let us assume that $1\leq M \leq n-1$ since the results when $M\in \{0, n\}$ are well-known \cite{KMN2}. Fix $s\geq 1$ and put $V_x=\mathcal{W}_{s,\epsilon}(x)$ for $x\in \mathbb{Q}(q)$. We take a normalization \begin{equation* \check{R}(z) = \left(\prod_{i=1}^s \frac{z-q^{2s-2i+2}}{1-q^{2s-2i+2}z}\right) PR(z), \end{equation*} where $R(z)$ is the $R$ matrix on $V_x\otimes V_y$. Since $(s^2)\not\in \mathscr{P}_{M|N}$ if and only if $M=1$ and $s>n-1$, we have \begin{equation*}\label{eq:normalized R} \check{R}(z)= \begin{cases} \sum_{t=0}^{n-1}\left(\prod_{i=t+1}^{s}\dfrac{z-q^{2s-2i+2}}{1-q^{2s-2i+2}z}\right)\mathcal P^{s,s}_t,& \text{if $(s^2)\not\in \mathscr{P}_{M|N}$},\\ \mathcal P^{s,s}_s + \sum_{t=0}^{s-1}\left(\prod_{i=t+1}^{s}\dfrac{z-q^{2s-2i+2}}{1-q^{2s-2i+2}z}\right)\mathcal P^{s,s}_t,& \text{if $(s^2)\in \mathscr{P}_{M|N}$}. \end{cases} \end{equation*} For $r\geq 2$, let $W$ denote the group of permutations on $r$ letters generated by $s_i=(i\ i+1)$ for $1\leq i\leq r-1$. By Theorem \ref{thm:existence of R-matrix}, we have ${\mc U}(\epsilon)$-linear maps \begin{equation*} \check{R}_w(x_1,\ldots,x_r) : V_{x_1}\otimes \cdots\otimes V_{x_r} \longrightarrow V_{x_{w(1)}}\otimes \cdots\otimes V_{x_{w(r)}} \end{equation*} for $w\in W$ and generic $x_1,\ldots, x_r$ satisfying the following: \begin{equation*}\label{eq:R matrix for w} \begin{split} &\check{R}_1(x_1,\ldots,x_r) = {\rm id}_{V_{x_1}\otimes \cdots\otimes V_{x_r}},\\ &\check{R}_{s_i}(x_1,\ldots,x_r) = \left(\otimes_{j<i}{\rm id}_{V_{x_j}}\right)\otimes \check{R}(x_i/x_{i+1}) \otimes \left(\otimes_{j>i+1}{\rm id}_{V_{x_j}}\right),\\ &\check{R}_{ww'}(x_1,\ldots,x_r) = \check{R}_{w'}(x_{w(1)},\ldots,x_{w(r)})\check{R}_{w}(x_1,\ldots,x_r), \end{split} \end{equation*} for $w, w'\in W$ with $\ell(ww')=\ell(w)+\ell(w')$. Let $w_0$ denote the longest element in $W$. By Theorem \ref{thm:spectral decomp}, $\check{R}_{w_0}(x_1,\ldots,x_r)$ does not have a pole at $q^{2k}$ for $k\in \mathbb{Z}_+$ as a function in $x_1,\ldots,x_r$. Hence we have a ${\mc U}(\epsilon)$-linear map \begin{equation*} \begin{split} \check{R}_r := \check{R}_{w_0}(q^{r-1},q^{r-3},\cdots, q^{1-r}) : V_{q^{r-1}}\otimes \cdots\otimes V_{q^{1-r}} \longrightarrow V_{q^{1-r}}\otimes \cdots\otimes V_{q^{r-1}}. \end{split} \end{equation*} Then we define a ${\mc U}(\epsilon)$-module \begin{equation}\label{eq:KR module} \mc{W}_{s,\epsilon}^{(r)} := {\rm Im}\check{R}_r. \end{equation} It is proved in \cite{KO} that $\mc{W}_{s,\epsilon}^{(r)}$ is irreducible when $\epsilon=\epsilon_{M|N}$, where the proof uses the crystal base of polynomial representation of ${\mc U}_{M|N}(\epsilon)$. Now we give another proof of the irreducibility of $\mc{W}_{s,\epsilon}^{(r)}$, which is available for arbitrary $\epsilon$. \begin{thm}\label{thm:W_s^{(r)}} Let $r, s\geq 1$ be given. Then $\mc{W}_{s,\epsilon}^{(r)}$ is non-zero if and only if $(s^r)\in \mathscr{P}_{M|N}$. In this case, $\mc{W}_{s,\epsilon}^{(r)}$ is irreducible, and it is isomorphic to $V_\epsilon((s^r))$ as a $\ring{\mc U}(\epsilon)$-module. \end{thm} \noindent{\bfseries Proof. } Let us take a sequence $\epsilon''=(\epsilon''_1,\dots,\epsilon''_{n''})$ of $0,1$'s satisfying the following: \begin{itemize} \item[(1)] $\epsilon$ is a subsequence of $\epsilon''$, \item[(2)] we have as a $\ring{\mc U}(\epsilon'')$-module \begin{equation}\label{eq:decomp w.r.t. e''} V_{\epsilon''}((s))^{\otimes r}\cong \bigoplus_{\lambda\in\mathscr{P}} V_{\epsilon''}(\lambda)^{\oplus K_{\lambda (s^r)}}, \end{equation} where $K_{\lambda (s^r)}$ is the Kostka number associated to $\lambda$ and $(s^r)$ (cf.~Remark \ref{rem:character of poly}), \item[(3)] if $\epsilon'=\epsilon_{M''|0}$ with $M''=|\{\,i\,|\,\epsilon''_i=0\,\}|$, then we have as a $\ring{\mc U}(\epsilon')$-module \begin{equation}\label{eq:decomp w.r.t. e'} V_{\epsilon'}((s))^{\otimes r}\cong \bigoplus_{\lambda\in\mathscr{P}} V_{\epsilon'}(\lambda)^{\oplus K_{\lambda (s^r)}}. \end{equation} \end{itemize} Let us define a ${\mc U}(\epsilon'')$-module $\mc{W}_{s,\epsilon''}^{(r)}$ by the same way as in \eqref{eq:KR module}, where $\check{R}''_r$ and $V''_x$ denote the corresponding ones. We define $\mc{W}_{s,\epsilon'}^{(r)}$, $\check{R}'_r$ and $V'_x$ similarly. By Lemma \ref{lem:comm diagram of R matrix}, we have the following commutative diagram: \begin{equation*}\label{eq:comm diagram of R matrix-2} \xymatrixcolsep{4pc}\xymatrixrowsep{2pc}\xymatrix{ V''_{q^{r-1}}\otimes \cdots\otimes V''_{q^{1-r}} \ar@{->}^{\check{R}''_r}[r] \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\epsilon'}}[d] &\ V''_{q^{1-r}}\otimes \cdots\otimes V''_{q^{r-1}} \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\epsilon'}}[d] \\ V'_{q^{r-1}}\otimes \cdots\otimes V'_{q^{1-r}} \ar@{->}^{\check{R}'_r}[r] &\ V'_{q^{1-r}}\otimes \cdots\otimes V'_{q^{r-1}}}\quad \end{equation*} By \eqref{eq:decomp w.r.t. e''}, \eqref{eq:decomp w.r.t. e'} and Proposition \ref{prop:truncation of poly}, the decomposition of $\mc{W}_{s,\epsilon''}^{(r)}$ into polynomial $\ring{\mc U}(\epsilon'')$-modules is the same as that of $\mc{W}_{s,\epsilon'}^{(r)}$ into polynomial $\ring{\mc U}(\epsilon')$-modules. It is well-known that $\mc{W}_{s,\epsilon'}^{(r)}$ is irreducible and isomorphic to $V_{\epsilon'}((s^r))$ as a $\ring{\mc U}(\epsilon')$-module since ${\mc U}(\epsilon'')\cong U_{q}(A_{M''-1}^{(1)})$. Therefore, $\mc{W}_{s,\epsilon''}^{(r)}$ is irreducible and isomorphic to $V_{\epsilon''}((s^r))$ as a $\ring{\mc U}(\epsilon'')$-module. Again by Lemma \ref{lem:comm diagram of R matrix}, we have the following commutative diagram: \begin{equation*}\label{eq:comm diagram of R matrix-3} \xymatrixcolsep{4pc}\xymatrixrowsep{2pc}\xymatrix{ V''_{q^{r-1}}\otimes \cdots\otimes V''_{q^{1-r}} \ar@{->}^{\check{R}''_r}[r] \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\epsilon'}}[d] &\ V''_{q^{1-r}}\otimes \cdots\otimes V''_{q^{r-1}} \ar@{->}^{\mathfrak{tr}^{\epsilon''}_{\epsilon'}}[d] \\ V_{q^{r-1}}\otimes \cdots\otimes V_{q^{1-r}} \ar@{->}^{\check{R}_r}[r] &\ V_{q^{1-r}}\otimes \cdots\otimes V_{q^{r-1}}}\quad \end{equation*} Since $\mathfrak{tr}^{\epsilon''}_{\epsilon'}(V_{\epsilon''}((s^r)))$ is non-zero if and only if $(s^r)\in \mathscr{P}_{M|N}$, which is equal to $V_{\epsilon}((s^r))$ in this case, it follows that $\mc{W}_{s,\epsilon}^{(r)}$ is non-zero if and only if $(s^r)\in \mathscr{P}_{M|N}$. This implies in this case that $\mc{W}_{s,\epsilon}^{(r)}$ is irreducible, and it is isomorphic to $V_\epsilon((s^r))$ as a $\ring{\mc U}(\epsilon)$-module. \qed The following can be proved by similar arguments. \begin{cor} Suppose that $(s^r)\in \mathscr{P}_{M|N}$ is given. \begin{itemize} \item[(1)] If $r\leq M$ and $M\geq 3$, then $\mathfrak{tr}^\epsilon_{\epsilon'}\left(\mc{W}_{s,\epsilon}^{(r)}\right)$ is the Kirillov-Reshetikhin module of type $A_{M-1}^{(1)}$ corresponding to the partition $(s^r)$, where $\epsilon'=\epsilon_{M|0}$. \item[(2)] If $s\leq N$ and $N\geq 3$, then $\mathfrak{tr}^\epsilon_{\epsilon'}\left(\mc{W}_{s,\epsilon}^{(r)}\right)$ is the Kirillov-Reshetikhin module of type $A_{N-1}^{(1)}$ corresponding to the partition $(r^s)$, where $\epsilon'=\epsilon_{0|N}$. \end{itemize} \end{cor} \begin{rem}{\rm As in case of $\epsilon=\epsilon_{M|N}$ \cite{KO}, we also expect that $\mc{W}^{(r)}_{s,\epsilon}$ has a crystal base for arbitrary $\epsilon$ (cf.~Remark \ref{rem:crystal base of poly}). } \end{rem} One may use a similar argument as in the proof of Theorem \ref{thm:W_s^{(r)}} to prove the irreducibility of a tensor product of $\mc{W}_{l,\epsilon}(x)$'s and its image under $R$ matrix in some special cases. Let $l_1,\dots,l_r\in \mathbb{Z}_+$ and $x_1,\dots,x_r\in \mathbb{Q}(q)$ be given and let $\epsilon'=\epsilon_{M|0}$. \begin{prop}\label{prop:irreducibility-1} If $M$ is sufficiently large and $\mc{W}_{l_1,\epsilon'}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon'}(x_r)$ is irreducible, then $\mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r)$ is also irreducible. \end{prop} \noindent{\bfseries Proof. } Suppose that $\mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r)$ is not irreducible and let $W$ be a proper non-trivial submodule. Since $M$ is sufficiently large, the multiplicity of $V_\epsilon(\lambda)$ for $\lambda\in \mathscr{P}$ in $\mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r)$ is equal to that of $V_{\epsilon'}(\lambda)$ for $\lambda\in \mathscr{P}$ in $\mc{W}_{l_1,\epsilon'}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon'}(x_r)$ (cf.~Remark \ref{rem:character of poly}). This also holds for $W$ and $\mathfrak{tr}^\epsilon_{\epsilon'}(W)$, which implies that $\mathfrak{tr}^\epsilon_{\epsilon'}(W)$ is a proper non-zero subspace of $\mathfrak{tr}^\epsilon_{\epsilon'}(\mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r))$. Since $\mathfrak{tr}^\epsilon_{\epsilon'}(W)=W\cap \mathfrak{tr}^\epsilon_{\epsilon'}\left(\mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r)\right)$, it follows that $\mathfrak{tr}^\epsilon_{\epsilon'}(W)$ is a proper non-zero ${\mc U}(\epsilon')$-submodule, which is a contradiction. \qed \begin{rem}{\rm Proposition \ref{prop:irreducibility-1} together with the irreducibility of $\mc{W}_{l,\epsilon'}\otimes \mc{W}_{m,\epsilon'}$ also implies Theorem \ref{thm:main theorem-1} when $M\geq 3$. But we do not know whether it holds for $M=2$. We also would like to point out that the proof of Theorem \ref{thm:main theorem-1} has its own interest since it describes a new connected crystal graph structure on $\mathcal{B}_{l,\epsilon}\otimes \mathcal{B}_{m,\epsilon}/\{\pm 1\}$. } \end{rem} \begin{prop}\label{prop:irreducibility-2} Suppose that $x_i/x_{i+1}\not\in q^{-2\mathbb{Z}_+}$ for $1\leq i\leq r-1$. If $M$ is sufficiently large and the image of $$\check{R}'_{w_0}(x_1,\dots,x_r) : \mc{W}_{l_1,\epsilon'}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon'}(x_r) \longrightarrow \mc{W}_{l_r,\epsilon'}(x_r)\otimes \cdots \otimes \mc{W}_{l_1,\epsilon'}(x_1)$$ is irreducible, then the image of $$\check{R}_{w_0}(x_1,\dots,x_r) : \mc{W}_{l_1,\epsilon}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon}(x_r) \longrightarrow \mc{W}_{l_r,\epsilon}(x_r)\otimes \cdots \otimes \mc{W}_{l_1,\epsilon}(x_1)$$ is also irreducible, where $\check{R}'_{w_0}(x_1,\dots,x_r)$ is the restriction of $\check{R}_{w_0}(x_1,\dots,x_r)$ on $\mc{W}_{l_1,\epsilon'}(x_1)\otimes \cdots \otimes \mc{W}_{l_r,\epsilon'}(x_r)$. \end{prop} \noindent{\bfseries Proof. } It follows from Lemma \ref{lem:comm diagram of R matrix} and the same argument as in Proposition \ref{prop:irreducibility-1}. \qed {\small
\section{Introduction} Retail product image classification is the problem of deciphering a retail product from its image. This recognition of products from images is needed in a lot of Computer Vision applications in the real world like self-checkout shops, retail execution measurement and shopper behavior observation. Convnets (Convolutional Neural Networks) have been shown to give the best performance for many image classification datasets. Transfer Learning is a method to train a Deep Learning model on a small dataset by finetuning a model pretrained on a larger dataset. This practice is especially more prevalent with convnets which respond very well to this method. This work aims to figure out the best method to finetune deep convnets for different types of retail product classification datasets. Classifying and identifying retail product images is a very important component of systems where one needs to automate or analyze retail practices. It can help in making a self-checkout store by providing an interface to recognize products for automatic billing, help automate retail supply chain by automating product logging, can help automatically evaluate retail-execution evaluation when combined with a retail product object detector or help analyze consumer behavior in retail stores in combination with a video analysis system. Deep Learning algorithms have gathered interest recently due to their performance and applicability in the real world\cite{1}. Convolutional Neural Networks (convnets), a type of Deep Learning algorithm has beaten the state of the art results for various Computer Vision tasks like image classification\cite{2}, object detection\cite{3} and image matching\cite{4}. In scenarios like identifying retail products, where often only a relatively small number of training images per class are available (sometimes just a few product packshots\cite{7}), finetuning\cite{5} of pre-trained weights is generally the preferred mode to train the convnet in use. Few shot classification techniques\cite{6} are often used in combination with finetuning when only a few images per class are present. Our aim in this work is to come up with a set of tricks which give high accuracy across different retail product classification datasets when finetuning convnets. Our contributions in this work are : 1. We introduce Local-Concepts-Accumulation layer, which gets consistent accuracy gains across datasets, 2. We show that Maximum-Entropy loss\cite{6} can be used as an auxiliary loss in combination with Local-Concepts-Accumulation to increase the classification accuracy even more, 3. We show that a model of the exact same size pretrained on Instagram and then imagenet\cite{8} gives better accuracy than a model pretrained just on Imagenet. \section{Related Work} Deep Learning\cite{1} systems have been making inroads into many cognitive automation tasks. In case of retail, there is a lot of scope to make existing workflows efficient using Deep Learning. Localizing and classifying retail objects on retail shelves has been studied in the past. Traditional Image Processing features SIFT\cite{17} and Harris corners\cite{18} have been used for detecting and identifying retail products. \cite{16} proposes using SIFT features\cite{17} with a hybrid approach combining SVM with HMM/CRF for context aware product detection and identification. \cite{13} introduces Grozi-120 dataset and uses SIFT\cite{17} for product identification as baseline. \cite{14} introduces CAPG-GP dataset and uses a combination of Deep Learning\cite{5} and SIFT\cite{17}/BRISK\cite{23} for product recognition. \cite{19} compares visual bag of words and deep learning on grozi dataset for both detection on shelves and classification. \cite{20} tries out dense pixel based matching, bag of words and genetic algorithms for exemplar based product matching. \cite{21} uses Object Detection algorithms for one-shot product detection and identification. \cite{22} uses BRISK features\cite{23} and graphs to verify planograms. \cite{24} uses GAN based training of convnet embeddings for fine-grained product image classification. With the recent introduction of generic retail object detectors from retail shelves like \cite{3} and \cite{25}, the problem of retail object detection from shelves and retail object identification can be separately solved. In this work, we show methods to improve finetuning\cite{5} of convnets for image classification of retail objects. Convnets have been shown to work very well for image classification problems\cite{10}. It has also been shown that models pretrained on imagenet dataset can be finetuned on other smaller datasets\cite{5} for classification to achieve better accuracy. ResNext architecture\cite{2} is one of the best-performing deep learning architectures for image classification. ResNext architecture has residual connections with bottleneck dimensions between layers and also has multiple paths within each layer. Resnext architecture when trained on a larger instagram dataset and finetuned on imagenet, gives state of the art accuracy on imagenet\cite{8}. It is shown, such a network trained on instagram, also called ResNext-WSL\cite{9} is very robust to image noise and perturbations\cite{11}. Traditionally, image matching techniques using descriptors like BRISK\cite{23} and SIFT\cite{17} have also been used to identify retail products. Superpoint\cite{4} is a convnet based keypoint detection and keypoint matching algorithms that has recently shown better results than SIFT. Superpoint is trained on a synthetic dataset and then finetuned on image augmentations to become invariant to various distortions. We use Superpoint as a baseline in all benchmark tasks. Fine-grained classification is a classification task where classes of images are visually similar to each other. Maximum Entropy Loss\cite{6} has been used to make classification in such scenario more effective. We use Maximum Entropy loss as we find the 'lack of diversity of features' hypothesis true in all retail product image classification, just like it is true in fine-grained classification. \section{Methodology} We present three tricks which make convnets more effective at recognizing retail product images. We try this on three different datasets which represent different scenarios which arise while working with retail images in real world. First trick we present is that a convnet\cite{8} pretrained on instagram\cite{9} images and then finetuned later on imagenet works better for retail product classification than a convnet pretrained on imagenet\cite{10} alone. The second trick is the new type of neural network layer called Local-Concepts-Accumulation we introduce, which can be used while finetuning convnets for retail product image classification. Local-Concepts-Accumulation layer is a simple layer which can be added while finetuning any off-the-shelf convnet. The third trick is to train a multitask learning based classifier using Maximum Entropy loss as an auxiliary loss. We show that these tricks incrementally give good gains for retail product image classification. \subsection{Finetuning an Instagram pretrained model} ResNext\cite{2} architecture has shown state of the art classification accuracy on classification tasks in the past. We thus chose it as our baseline architecture to finetune for retail product image classification. It has been shown that a ResNext model pretrained on instagram\cite{9} images using hashtags as training labels before finetuning it on imagenet\cite{10} gives state of the art results on imagenet classification\cite{8}. This convnet, also known as ResNext-WSL model, has been shown to have more robustness on common image corruptions and perturbations\cite{11}. We show that using a pretrained ResNext-WSL with the same number of parameters gives better accuracy than a pretrained ResNext on imagenet (we refer this ResNext model pretrained just on imagenet as ResNext-INet henceforth to contrast it with ResNext-WSL). We use the \textquotedblleft resnext-101\_32X8\textquotedblright{} pretrained models (both ResNext-INet and ResNext-WSL) available from pytorch\cite{12} repositories for finetuning. Both the networks require exactly the same resources for finetuning as they have the same number of parameters and we finetune them with exactly the same hyperparameters. We find that finetuning ResNext-WSL gets gains in accuracy for all datasets we work on. It seems that ResNext-WSL gets better gain in accuracy on datasets where test images have more noise and distortions. \subsection{Local-Concepts-Accumulation layer} We introduce a new layer called Local-Concepts-Accumulation (LCA layer) which can be added to any convnet architecture as its penultimate layer while training or finetuning. We show that adding LCA layer while finetuning convnets for retail product image classification gives sizable gains in accuracy across all datasets we present our results on. The hypothesis to use this layer is that there are multiple large or small \textquoteleft local concepts\textquoteright{} in retail product images which when individually recognized and then aggregated can be used to classify the product. \begin{figure}[htbp] \includegraphics[width=1\linewidth]{spatial_concepts} \caption{Figure showing hypothesized local concepts on a retail product. The top left image is of the retail object itself. The top right image is of various possible local concepts marked on image. The bottom row has images showing all the possible local concepts shown individually.} \end{figure} The hypothesis further is that when a convnet is trained to classify pooled features from the last layer, it focuses more on the global look and feel of the retail product rather than on the local features. When we use different local concepts as features and aggregate their contribution with equal importance, the classifier focuses on both individual local concepts and global look and feel. It is proposed that focusing on local concepts would give a boost in classification accuracy. \begin{figure}[htbp] \begin{centering} \textsf{\includegraphics[width=1\linewidth]{LCALayer}} \par\end{centering} \caption{This figure explains the implementation of Local Context Aggregation Layer (LCA Layer). The feature maps of pretrained convnet (size \#FMs X Height X Width) are averaged pooled by kernels of different sizes and the pooled feature maps are then scrambled into vectors of \#FMs size. These vectors are then passed through a Fully Connected layer to give rise to different \textquotedblleft Local Concepts\textquotedblright{} vectors. The Local Concepts Vectors are then aggregated by averaging into the final vector for the image.} \end{figure} Implementation-wise, in a LCA layer, we build features for all possible local concepts in an image and aggregate them by averaging. These aggregated features are then fed to the classifier layer. This LCAlayer can be used during finetuning any pretrained convnet when placed between pretrained layers and classification layer. The implementation of LCA layer can be visualized in Figure2. \begin{figure}[htbp] \begin{centering} \includegraphics[width=1\linewidth]{Architecture} \par\end{centering} \caption{This figure shows the final Neural Network being finetuned for the retail product image classification problem statement. The LCA layer is placed between the final classification layer and pretrained convolutional layers of ResNext.} \end{figure} For a resnext-101\_32X8 architecture, LCAlayer is placed between the pretrained convolutional layers of the ResNext architecture and the last FC classification layer. All possible rectangle and square kernels larger than 1X1 are used to average pool the feature map from pretrained network and get corresponding pooled feature maps. The number of feature maps remains the same before and after each individual average pool operation. Now all the pooled feature maps after average pool operations are scrambled into vectors, each of dimension of number of feature maps in ResNext pretrained output. Each of these vectors is passed through a fully connected layer followed by Relu nonlinearity. Figure 3 shows arrangement of layers when finetuning the ResNext architecture along with LSA layer. The Neural Network is trained with Stochastic Gradient Descent with Momentum. \subsection{Maximum Entropy loss as an auxiliary loss} Maximum Entropy loss has been previously used for fine grained visual classification\cite{6}. We show that using Maximum Entropy loss as an auxiliary loss in retail product image classification loss betters the accuracy of the convnet. This might be due to the fact that the diversity of features in retail dataset is not as high as real world objects and diversity of features within classes is not that high too. Authors of \cite{6} propose that Maximum Entropy loss can be useful in such circumstances. The structure of the loss function can be found in Figure 4. \begin{figure}[htbp] \begin{centering} \textsf{\includegraphics[width=1\linewidth]{maximum-entropy-loss}} \par\end{centering} \caption{The Maximum Entropy Loss Function} \end{figure} The description of Entropy (quantity H in equation of Maximum Entropy Loss) over a conditional distribution can be found in Figure 5. \begin{figure}[htbp] \begin{centering} \includegraphics[width=1\linewidth]{EntropyOfConditionalProbability} \par\end{centering} \caption{Entropy over a conditional probability distribution} \end{figure} A weighted average between Negative Likelihood loss and Maximum Entropy loss is used as the final loss term for finetuning the neural networks. \section{Datasets} In this section, we describe the various datasets used for experiments. We also explain how these datasets are analogues to real-world problem statements. \subsection{Baselines} We choose two baselines to show the effectiveness of our method. The first baseline is a simple finetuning\cite{5} of a ResNext\cite{2} model pretrained on imagenet only (referred to as ResNext-INet). These baselines give an idea about how much the tricks we implement one on the top of other, aid classification accuracy. The other baseline is keypoint detection and matching using convnet based Superpoint algorithm\cite{4}. This is because keypoint matching based identification is common in many retail product image classification systems. Also, Superpoint is one of the leading methods for keypoint detection and feature matching. This gives us a good upper bound on what retail product identification systems using image matching could achieve. \subsection{Grozi-120 dataset} Grozi-120 dataset\cite{13} (available at \href{http://grozi.calit2.net/grozi.html}{link}) is a dataset having images of 120 retail products. Some products in the dataset are for example : Cheerios, Cheez-it, Snickers etc. We take in-vitro images of retail products as training data and in-situ images were taken as testing data. Typically, the number of in-vitro images is 4-6 per class. These in-vitro training images are packshots\cite{7} taken from the internet and thus many augmentation techniques were applied on the images before finetuning the convnet for classification. Figure 6 shows a few pairs of in-vitro / in-situ images. In real world use cases, such type of classification problem often comes up where one gets only pack shots for training and the classifier trained has to work on images from shops/retail outlets. \begin{figure}[htbp] \begin{centering} \textsf{\includegraphics[width=1\linewidth]{dsgrozids}} \par\end{centering} \caption{Train and test pairs of images from Grozi-120 dataset.} \end{figure} \subsection{CAPG-GP dataset} CAPG-GP\cite{14} (available at \href{\%20http://zju-capg.org/capg-gp.html}{link}) dataset has 102 retail products for fine grained one-shot classification. All products have just one training image. However, the training images are not pack shots but a small number of good quality images of actual products. In real world, an analogous classification problem often comes up where a few high quality images are available to train the classifier and the classifier trained is supposed to work on product images from shops/retail outlets. Image augmentations to incorporate different types of distortions into train set are introduced while the convnet is finetuned. Figure 7 shows a few pairs of train and test set images. \begin{figure}[htbp] \begin{centering} \includegraphics[width=1\linewidth]{dsCAPG} \par\end{centering} \caption{Train and Test pairs of images from CAPG-GP dataset.} \end{figure} \subsection{DM4VM dataset} DM4VM dataset (available at \href{https://www.dropbox.com/s/n8zh37udjmrydad/20150320_DM4VM_dataset.zip?dl=0}{link})\cite{15} is a dataset of 10 retail products with 60-70 images in training set per product and approximately 30 images per product in the test set. Both the training and test images appear to be real world images taken from shelves. Figure 8 shows pairs of train and test set images. A real world usecase analogous to this dataset is when data is collected from real world shelves and is annotated in a considerable number to train a classifier which again has to work in similar domain as training data. \begin{figure}[htbp] \begin{centering} \includegraphics[width=1\linewidth]{dsDM4VM} \par\end{centering} \caption{Train and Test pairs from DM4VM dataset.} \end{figure} \section{Results} We now present the results of our experiments on various datasets to show the accuracy gains the proposed tricks achieve. As mentioned earlier, our baselines are classification by image matching (keypoint detection + keypoint matching) using Superpoint\cite{4} and finetuning Resnext\cite{2} pretrained on Imagenet (ResNext-INet). We then show accuracy of our tricks added one on the top of the other. We show results when finetuning ResNext-WSL\cite{8} on the retail product classification datasets. When ResNext-WSL is trained along with addition of the LCA layer, the model thus trained is referred to as ResNext-WSL-LCAlayer. When Resnext-WSL with LCA layer is finetuned with a mutlitask learning loss combining Negative Likelihood loss and Maximum-Entropy loss, the model is called ResNext-WSL-LCAlayer-ME. The performance numbers are test set classification accuracy in \%age. \begin{table}[htbp] \caption{Accuracy of various baselines and proposed methods} \centering{}% \begin{tabular}{|c|c|c|c|} \hline Method / Dataset & Grozi-120 & CAPG-GP & DM4VM\tabularnewline \hline Image Matching with Superpoint & 44.8\% & 84.7\% & 96.16\%\tabularnewline \hline ResNext-INet & 58.66\% & 83.9\% & 99.3\%\tabularnewline \hline ResNext-WSL & 60.4\% & 84.1\% & 100\%\tabularnewline \hline ResNext-WSL-LCAlayer & 70.8\% & 90.4\% & 100\%\tabularnewline \hline ResNext-WSL-LCAlayer-ME & 72.3\% & 92.2\% & 100\%\tabularnewline \hline \end{tabular} \end{table} When we analyze the results, we can come to a set of conclusions. ResNext-WSL gets better accuracy than ResNext-INet for all datasets, but its gets a relatively higher accuracy boost in Grozi-120, where the test images have a lot of distortions and noise. We can attribute this to the robustness pretraining it on instagram gives to the model. Adding an LCAlayer gives a sizable accuracy boost in all the datasets showing it is a good methodology for any type of retail product image classification problem. Max-Entropy loss gives an accuracy boost across all datasets too, reinforcing that the hypothesis of the inventors that, it is a good add-on loss wherever low-diversity of features is seen in the training data. \section{Conclusions} We propose multiple tricks that better the accuracy of retail product image classification in multiple datasets. The technique of using a instagram and later imagenet pretrained convnet instead of imagenet pretrained convnet only is very simple to apply and gives performance boost without adding any parameters. A new layer for neural networks is proposed called LCA layer which, when added during finetuning, gives consistent accuracy gain across all datasets. We also show that using maximum-entropy loss as an auxiliary loss makes the classifier work better. \appendices{} \section*{Acknowlegment} I thank my colleagues Srikrishna, Sonaal and Harshita for their help in calculating baselines using keypoint matching as well as in the implementation of maximum entropy loss. \bibliographystyle{IEEEtran}
\section{Introduction} \label{sec:1} Convolutional Neural Networks (CNNs) have enabled accurate/reliable Computer-Aided Diagnosis (CAD), occasionally outperforming expert physicians~\cite{hwang2018development,wu2019TMI,mckinney2020}. However, such research results cannot be easily transferred to a clinical environment. Artificial Intelligence (AI) and Healthcare sides have a huge gap around technology, funding, and people~\cite{allen2019}. In Japan, the biggest challenge lies in medical data sharing because each hospital has different ethical codes and tends to enclose collected data without annotating them for AI research. This differs from the US, where National Cancer Institute provides annotated medical images~\cite{Clark13}. Therefore, a Research Center for Medical Big Data was launched in November 2017: collaborating with 6 Japanese medical societies and 6 institutes of informatics, we collected large-scale annotated medical images for CAD research. Using over 60 million available images, we achieved prominent research results, presented at major Computer Vision~\cite{Tokunaga19} and Medical Imaging conferences~\cite{Kanayama19}. Moreover, we published 6 papers~\cite{Han1,Han2,han2019combining,han2019learning,han2019synthesizing,han2019learning2} on Generative Adversarial Network (GAN)-based medical image augmentation~\cite{Goodfellow}. Since the GANs can generate realistic samples with desired pathological features \textit{via} many-to-many mappings, they could mitigate the medical data paucity \textit{via} Data Augmentation (DA) and physician training. Aiming to further identify/bridge the gap between AI and Healthcare sides in Japan towards developing medical AI fitting into a clinical environment in five years, we hold a workshop for $7$ Japanese people with various AI and/or Healthcare background. Moreover, to confirm the clinical relevance for diagnosis of the pathology-aware GAN methods, we conduct a questionnaire survey for $9$ Japanese physicians who interpret Computed Tomography (CT) and Magnetic Resonance (MR) images in daily practice. Fig.~\ref{fig1} outlines our investigation\vspace{0.1cm}. \noindent \textbf{Contributions.} Our main contributions are as follows: \vspace{-0.1cm} \begin{itemize} \item \textbf{AI and Healthcare Workshop}: We firstly hold a clinically valuable AI-envisioning workshop among Medical Imaging experts, physicians, and Healthcare/Informatics generalists to bridge the gap between AI/Healthcare sides. \item \textbf{Questionnaire Survey for Physicians}: We firstly present both qualitative/quantitative questionnaire evaluation results for many physicians about research-proven medical AI. \item \textbf{Information Conversion}: Clinical relevance discussions imply that our pathology-aware GAN-based interpolation and extrapolation could overcome medical data paucity \textit{via} DA and physician training. \end{itemize} \vspace{-0.4cm} \begin{figure}[t!] \centering \centerline{\includegraphics[width=0.72\linewidth]{fig1.eps}} \caption{Overview of our discussions towards developing clinically relevant AI-powered diagnosis systems: (\textit{i}) A workshop for 7 Japanese people with various AI and/or Healthcare background to develop medical AI fitting into a clinical environment in five years; (\textit{ii}) A questionnaire survey for 9 Japanese physicians to confirm our pathology-aware GAN-based realistic/diverse image augmentation's clinical relevance---the medical DA requires high diversity whereas the physician training requires high realism.} \label{fig1} \vspace{-0.4cm} \end{figure} \vspace{-0.2cm} \section{Pathology-aware GAN-based Image Augmentation} \label{sec:2} \vspace{-0.15cm} In terms of interpolation, GAN-based medical image augmentation is reliable because acquisition modalites (e.g., X-ray, CT, MR) can display the human body's strong anatomical consistency at fixed position while clearly reflecting inter-subject variability~\cite{hsieh2009computed,brown2014magnetic}. This is different from natural images, where various objects can appear at any position; accordingly, to tackle large inter-subject/pathology/modality variability, we proposed to use noise-to-image GANs (e.g., random noise samples to diverse pathological images) for (\textit{i}) medical DA and (\textit{ii}) physician training~\cite{Han1}. While the noise-to-image GAN training is much more difficult than training image-to-image GANs~\cite{tmenova2019cyclegan} (e.g., a benign image to a malignant one), it can increase image diversity for further performance boost. Regarding the DA, the GAN-generated images can improve CAD based on supervised learning~\cite{frid2018gan,Madani,konidaris2018generative}. For the physician training, the GANs can display novel desired pathological images and help train medical trainees despite infrastructural/legal constraints~\cite{finlayson2018towards}. However, we have to devise effective loss functions and training schemes for such applications. Diversity matters more for the DA to sufficiently fill the real image distribution, whereas realism matters more for the physician training not to confuse the trainees. So, how can we perform GAN-based DA/physician training with only limited annotated images? Always in collaboration with physicians, for improving 2D classification, we combined the noise-to-image and image-to-image GANs~\cite{Han2,han2019combining}. Nevertheless, further DA applications require pathology localization for detection and advanced physician training needs the generation of images with abnormalities, respectively. To meet both clinical demands, we proposed 2D/3D bounding box-based GANs conditioned on pathology position/size/appearance. Indeed, the bounding box-based detection requires much less physicians' annotation effort than segmentation \cite{rundo2018NC}. In terms of extrapolation, the pathology-aware GANs are promising because common and/or desired medical priors can play a key role in the conditioning---theoretically, infinite conditioning instances, external to the training data, exist and enforcing such constraints have an extrapolation effect \textit{via} model reduction~\cite{stinis2019enforcing}. For improving 2D detection, we proposed Conditional Progressive Growing of GANs that incorporates rough bounding box conditions incrementally into a noise-to-image GAN (i.e., Progressive Growing of GANs~\cite{Karras}) to place realistic/diverse brain metastases at desired positions/sizes on $256 \times 256$ MR images~\cite{han2019learning}. Since the human body is 3D, for improving 3D detection, we proposed 3D Multi-Conditional GAN that translates noise boxes into realistic/diverse $32 \times 32 \times 32$ lung nodules \cite{alShabi2019lung} placed at desired position/size/attenuation on CT scans~\cite{han2019synthesizing}. Interestingly, inputting the noise box with the surrounding tissues has the effect of combining the noise-to-image and image-to-image GANs. We succeeded to (\textit{i}) generate images even realistic for physicians and (\textit{ii}) improve detection using synthetic training images, respectively; they require different loss functions and training schemes. However, to exploit our pathology-aware GANs as a (\textit{i}) non-expert physician training tool and (\textit{ii}) clinical decision support system, we need to confirm their clinical relevance for diagnosis---such information conversion~\cite{hondamulti} techniques to overcome the data paucity, not limited to our pathology-aware GANs, would become a clinical breakthrough. \vspace{-0.25cm} \section{Methods} \label{sec:3} \vspace{-0.15cm} \subsection{AI and Healthcare Workshop} \vspace{-0.05cm} \label{sec:3.1} \begin{itemize} \item \textbf{Subjects:} $2$ Medical Imaging experts (i.e., a Medical Imaging researcher and a medical AI startup entrepreneur), $2$ physicians (i.e., a radiologist and a psychiatrist), and $3$ Healthcare/Informatics generalists (i.e., a nurse and researcher in medical information standardization, a general practitioner and researcher in medical communication, and a medical technology manufacturer's owner and researcher in health disparities)\\ \begin{table*}[t!] \caption[Workshop program to (\textit{i}) know the overview of Medical Image Analysis and (\textit{ii}) find the intrinsic gap and solutions between AI researchers/Healthcare workers.]{Workshop program to (\textit{i}) know the overview of Medical Image Analysis and (\textit{ii}) find the intrinsic gap and its solutions between AI researchers/Healthcare workers. \textbf{*} indicates activities given by a facilitator (i.e., the first author), such as lectures.} \label{tab8_1} \centering \scalebox{0.73} { \begin{tabular}{ll} \Hline\noalign{\smallskip} {\bfseries Time} (mins) & \bfseries Activity \\\noalign{\smallskip}\hline\noalign{\smallskip} & \bfseries Introduction \\ 10 & 1. Explanation of the workshop's purpose and flow\textbf{*} \\ 10 & 2. Self-introduction and explanation of motivation for participation \\ 5 & 3. Grouping into two groups based on background\textbf{*}\\ \noalign{\smallskip}\hline\noalign{\smallskip} & \bfseries Learning: Knowing Medical Image Analysis \\ 15 & 1. TED speech video watching: \textit{Artificial Intelligence Can Change} \textit{the future of Medical Diagnosis}\textbf{*}\\ 35 & 2. Lecture: Overview of Medical Image Analysis including state-of-the-art research, well-known\\ & challenges/solutions, and the summary of our pathology-aware GAN projects\textbf{*}\\ & (its video in Japanese: \url{https://youtu.be/rTQLknPvnqs})\\ 10 & 3. Sharing expectations, wishes, and worries about Medical Image Analysis \\ & (its video in Japanese: \url{https://youtu.be/ILPEGga-hkY})\\ 10 & Intermission\\ \noalign{\smallskip}\hline\noalign{\smallskip} & \bfseries Thinking: Finding How to Develop Robust Medical AI\\ 25 & 1. Identifying the intrinsic gap between AI/Healthcare sides after sharing their common and different \\ & thinking/working styles\\ 60 & 2. Finding how to develop gap-bridging medical AI fitting into a clinical environment in five years\\ 10 & Intermission\\ \noalign{\smallskip}\hline\noalign{\smallskip} & \bfseries Summary \\ 25 & 1. Presentation\\ 10 & 2. Sharing workshop impressions and ideas to apply obtained knowledge \\ & (its video in Japanese: \url{https://youtu.be/F31tPR3m8hs})\\ 5 & 3. Answering a questionnaire about satisfaction and further comments\\ 5 & 4. Closing remarks\textbf{*}\\ \noalign{\smallskip}\Hline\noalign{\smallskip} \end{tabular} } \vspace{-0.6cm} \end{table*} \vspace{-0.17cm} \item \textbf{Experiments:} As its program shows (Table~\ref{tab8_1}), during the workshop, we conduct 2 activities: (\textit{Learning}) Know the overview of Medical Image Analysis, including state-of-the-art research, well-known challenges/solutions, and the summary of our pathology-aware GAN projects; (\textit{Thinking}) Find the intrinsic gap and its solutions between AI researchers and Healthcare workers after sharing their common and different thinking/working styles. This workshop was held on March 17th, 2019 at Nakayama Future Factory, Open Studio, The University of Tokyo, Tokyo, Japan. \end{itemize} \vspace{-0.6cm} \subsection{Questionnaire Survey for Physicians} \label{sec:3.2} \vspace{-0.05cm} \begin{itemize} \item \textbf{Subjects:} $3$ physicians (i.e., a radiologist, a psychiatrist, and a physiatrist) committed to (at least one of) our pathology-aware GAN projects and $6$ project non-related radiologists without much AI background. This paper's authors are surely not included.\\ \vspace{-0.25cm} \item \textbf{Experiments:} Physicians are asked to answer the following questionnaire within 2 weeks from December 6th, 2019 after reading 10 summary slides written in Japanese about general Medical Image Analysis and our pathology-aware GAN projects along with example synthesized images. We conduct both qualitative (i.e., free comments) and quantitative (i.e., five-point Likert scale~\cite{allen2007likert}) evaluation: Likert scale 1 $=$ very negative, 2 $=$ negative, 3 $=$ neutral, 4 $=$ positive, 5 $=$ very positive.\\ \item \textbf{Question 1:} Are you keen to exploit medical AI in general when it achieves accurate and reliable performance in the near future? (five-point Likert scale) Please tell us your expectations, wishes, and worries (free comments). \item \textbf{Question 2:} What do you think about using GAN-generated images for DA? (five-point Likert scale) \item \textbf{Question 3:} What do you think about using GAN-generated images for physician training? (five-point Likert scale) \item \textbf{Question 4:} Any comments/suggestions about our projects towards developing clinically relevant AI-powered systems based on your experience? \end{itemize} \section{Results} \label{sec:4} \subsection{Workshop Results} \label{sec:4.1} \noindent We show the clinically-relevant findings from this Japanese workshop.\\ \ \\ \textbf{Gap between AI and Healthcare Sides}\\ \ \\ \noindent \textbf{Gap 1:} AI, including Deep Learning, provides unclear decision criteria, does it make physicians reluctant to use it for diagnosis in a clinical environment? \begin{itemize} \item \textbf{Healthcare side}: We rather expect applications other than diagnosis. If we use AI for diagnosis, instead of replacing physicians, we suppose a \textit{reliable second opinion}, such as alert to avoid misdiagnosis, based on various clinical data not limited to images---every single diagnostician is anxious about their diagnosis. AI only provides minimum explanation, such as a heatmap showing attention, which makes persuading not only the physicians but also patients difficult. Thus, the physicians' intervention is essential for intuitive explanation. Methodological safety and feeling safe are different. In this sense, pursuing explainable AI generally decreases AI's diagnostic accuracy~\cite{adadi2018peeking}, so physicians should still serve as mediators by engaging in high-level conversation or interaction with patients. Moreover, according to the medical law in most countries including Japan, only doctors can make the final decision. The first autonomous AI-based diagnosis without a physician was cleared by the Food and Drug Administration in 2018~\cite{abramoff2018pivotal}, but such a case is exceptional.\\ \vspace{-0.2cm} \item \textbf{AI side}: Compared with other systems or physicians, Deep Learning's explanation is not particularly poor, so we require too severe standards for AI; the word \textit{AI} is excessively promoting anxiety and perfection. If we could thoroughly verify the reliability of its diagnosis against physicians by exploring uncertainty measures~\cite{nair2020exploring}, such intuitive explanation would be optional. \end{itemize} \noindent \textbf{Gap 2:} Are there any benefits to actually introducing medical AI? \vspace{-0.05cm} \begin{itemize} \item \textbf{Healthcare side}: After all, even if AI can achieve high accuracy and convenient operation, hospitals would not introduce it without any commercial benefits. Moreover, small clinics, where physicians are desperately needed, often do not have CT or MR scanners~\cite{jankharia2008commentary}.\\ \vspace{-0.2cm} \item \textbf{AI side}: The commercial deployment of medical AI is strongly tied to diagnostic accuracy; so, if it can achieve significantly outstanding accuracy at various tasks in the near future, patients would not visit hospitals/clinics without AI. Accordingly, introducing medical AI would become profitable in five years. \end{itemize} \noindent \textbf{Gap 3:} Is medical AI's diagnostic accuracy reliable? \vspace{-0.05cm} \begin{itemize} \item \textbf{Healthcare side}: To evaluate AI's diagnostic performance, we should consider many metrics, such as sensitivity and specificity. Moreover, its generalization ability for medical data highly relies on inter-scanner/inter-individual variability~\cite{oConnor2017healthy}. How can we evaluate whether it is suitable as a clinically applicable system?\\ \vspace{-0.2cm} \item \textbf{AI side}: Generally, alleviating the risk of overlooking the diagnosis is the most important, so sensitivity matters more than specificity unless their balance is highly disturbed. Recently, such research on medical AI that is robust to different datasets is active~\cite{Rundo2}. \end{itemize} \newpage \noindent \textbf{How to Develop Medical AI Fitting into a Clinical Environment in Five Years}\\ \noindent \textbf{Why:} Clinical significance/interpretation \vspace{-0.1cm} \begin{itemize} \item \textbf{Challenges}: We need to clarify which clinical situations actually require AI introduction. Moreover, AI's early diagnosis might not be always beneficial for patients.\\ \vspace{-0.2cm} \item \textbf{Solutions}: Due to nearly endless disease types and frequent misdiagnosis coming from physicians' fatigue, we should use it as alert to avoid misdiagnosis~\cite{vandenberghe2017relevance} (e.g., reliable second opinion), instead of replacing physicians. It should help prevent oversight in diagnostic tests not only with CT and MR, but also with blood data, chest X-ray, and mammography before taking CT and MR~\cite{li2019medical}. It could be also applied to segmentation for radiation therapy~\cite{agn2016generative}, neurosurgery navigation~\cite{abi2018machine}, and pressure ulcers' echo evaluation. Along with improving the diagnosis, it would also make the physicians' workflow easier, such as by denoising~\cite{yang2018low}. Patients should decide whether they accept AI-based diagnosis under informed consent. \end{itemize} \noindent \textbf{How:} Data acquisition \vspace{-0.1cm} \begin{itemize} \item \textbf{Challenges}: Ethical screening in Japan is exceptionally strict, so acquiring and sharing large-scale medical data/annotation are challenging---it also applies to Europe due to General Data Protection Regulation~\cite{rumbold2017effect}. Considering the speed of technological advances in AI, adopting it for medical devices is difficult in Japan, unlike in medical AI-ready countries, such as the US, where the ethical screening is relatively loose in return for the responsibility of monitoring system stability. Moreover, whenever diagnostic criteria changes, we need further reviews and software modifications. For example, the Tumor-lymph Node-Metastasis (TNM) classification~\cite{sobin2011tnm} criteria changed for oropharyngeal cancer in 2018 and for lung cancer in 2017, respectively. Diagnostic equipment/target changes also require large-scale data/annotation acquisition again.\\ \vspace{-0.2cm} \item \textbf{Solutions}: For Japan to keep pace, the ethical screening should be adequate to the other leading countries. Currently, overseas research and clinical trials are proceeding much faster, so it seems better to collaborate with overseas companies than to do it in Japan alone. Moreover, complete medical checkup, which is extremely costly, is unique in East Asia, thus Japan could be superior in individuals' multiple medical data---Japan is the only country, where most workers aged 40 or over are required to have medical checkups once a year regardless of their health conditions by the Industrial Safety and Health Act~\cite{nawata2016evaluation}. To handle changes in diagnostic criteria/equipment and overcome dataset/task dependency, it is necessary to establish a common database creation workflow~\cite{mansour2019visual} by regularly entering electronic medical records into the database. For reducing data acquisition/annotation cost, AI techniques, such as GAN-based DA~\cite{han2019synthesizing} and domain adaptation~\cite{ghafoorian2017transfer}, would be effective. \end{itemize} \noindent \textbf{How:} Commercial deployment \vspace{-0.1cm} \begin{itemize} \item \textbf{Challenges}: Hospitals currently do not have commercial benefits to actually introduce medical AI. \\ \vspace{-0.2cm} \item \textbf{Solutions}: For example, it would be possible to build AI-powered hospitals~\cite{chen2019feasibility} operated with less staff. Medical manufacturers could also standardize data format~\cite{laplante2016hearing}, such as for X-ray, and provide some AI services. Many IT giants like Google are now working on medical AI to collect massive biomedical datasets~\cite{morley2019google}, so they could help rural areas and developing countries, where physician shortage is severe~\cite{jankharia2008commentary}, at relatively low cost. \end{itemize} \noindent \textbf{How:} Safety and feeling safe \vspace{-0.1cm} \begin{itemize} \item \textbf{Challenges}: Considering multiple metrics, such as sensitivity and specificity~\cite{rossini2016diagnostic}, and dataset/task dependency~\cite{huang2018medical}, accuracy could be unreliable, so ensuring safety is challenging. Moreover, reassuring physicians and patients is important to actually use AI in a clinical environment~\cite{krittanawong2018rise}.\\ \vspace{-0.2cm} \item \textbf{Solutions}: We should integrate various clinical data, such as blood test biomarkers and multiomics, with images~\cite{li2019medical}. Moreover, developing bias-robust technology is important since confounding factors are inevitable~\cite{li2018fully}. To prevent oversight, prioritizing sensitivity over specificity is essential while maintaining a balance~\cite{jain2017addressing}. We should also devise education for medical AI users, such as result interpretation, to reassure patients~\cite{wartman2019reimagining}. \end{itemize} \vspace{-0.4cm} \subsection{Questionnaire Survey Results} \label{sec:4.2} We show the questions and Japanese physicians' response summaries. Concerning the following \textbf{Questions 1,2,3}, Fig.~\ref{fig2} visually summarizes the expectation scores on medical AI (i.e., general medical AI, GANs for DA, and GANs for physician training) from both 3 project-related physicians and 6 project non-related radiologists.\\ \noindent \textbf{Question 1:} Are you keen to exploit medical AI in general when it achieves accurate and reliable performance in the near future? \vspace{-0.1cm} \begin{itemize} \item \textbf{Response summary}: As expected, the project-related physicians are AI-enthusiastic while the project non-related radiologists are also generally very positive about the medical AI. Many of them appeal the necessity of AI-based diagnosis for more reliable diagnosis because of the lack of physicians. Meanwhile, other physicians worry about its cost and reliability. We may be able to persuade them by showing expected profitability (e.g., currently CT scanners have an earning rate 16\% and CT scans require 2-20 minutes for interpretation in Japan). Similarly, we can explain how experts annotate medical images and AI diagnoses disease based on them (e.g., multiple physicians, not a single one, can annotate the images \textit{via} discussion). \end{itemize} \newpage \begin{figure}[t!] \centering \centerline{\includegraphics[width=0.9\linewidth]{fig2.eps}} \caption{Bar chart of the expectations on medical AI, expressed by five-point Likert scale scores, from 9 Japanese physicians: 3 project-related physicians and 6 project non-related radiologists, respectively. The vertical rectangles and error bars denote the average scores with 95\% confidence intervals.} \label{fig2} \vspace{-0.4cm} \end{figure} \noindent \textbf{Question 2:} What do you think about using GAN-generated images for DA?\vspace{-0.1cm} \begin{itemize} \item \textbf{Response summary}: As expected, the project-related physicians are very positive about the GAN-based DA while the project non-related radiologists are also positive. Many of them are satisfied with its achieved accuracy/sensitivity improvement when available annotated images is limited. However, similarly to their opinions on general Medical Image Analysis, some physicians question its reliability. \end{itemize} \noindent \textbf{Question 3:} What do you think about using GAN-generated images for physician training?\vspace{-0.1cm} \begin{itemize} \item \textbf{Response summary}: We generally receive neutral feedback because we do not provide a concrete physician training tool, but instead general pathology-aware generation ideas with example synthesized images---thus, some physicians are positive, and some are not. A physician provides a key idea about a pathology-coverage rate for medical student/expert physician training, respectively. For extensive physician training by GAN-generated atypical images, along with pathology-aware GAN-based extrapolation, further GAN-based extrapolation would be valuable. \end{itemize} \newpage \noindent \textbf{Question 4:} Any comments/suggestions about our projects towards developing clinically relevant AI-powered systems based on your experience?\vspace{-0.1cm} \begin{itemize} \item \textbf{Response summary}: Most physicians look excited about our pathology-aware GAN-based image augmentation projects and express their clinically relevant requests. The next steps lie in performing further GAN-based extrapolation, developing reliable and clinician-friendly systems with new practice guidelines, and overcoming legal/financial constraints. \end{itemize} \vspace{-0.45cm} \section{Conclusion} \vspace{-0.1cm} Our first clinically valuable AI-envisioning workshop between people with various AI and/or Healthcare background reveals the intrinsic gap between both sides and its preliminary solutions. Regarding clinical significance/interpretation, medical AI could play a key role in supporting physicians with diagnosis, therapy, and surgery. For data acquisition, countries should utilize their unique medical environment, such as complete medical checkup for Japan. Commercial deployment could come as AI-powered hospitals and medical manufacturers' AI service. To assure safety and feeling safe, we should integrate various clinical data and devise education for medical AI users. We believe that such solutions on \textit{Why} and \textit{How} would play a crucial role in connecting inter-disciplinary research and clinical applications. Through a questionnaire survey for physicians, we confirm our pathology-aware GANs' clinical relevance for diagnosis as a clinical decision support system and non-expert physician training tool: many physicians admit the urgent necessity of general AI-based diagnosis while welcoming our GAN-based DA to handle the lack of medical images. Thus, GAN-powered physician training is promising only under careful tool designing. We find that better DA and expert physician training require further generation of images with abnormalities. Therefore, for better GAN-based extrapolation, we plan to conduct (\textit{i}) generation by parts with coordinate conditions~\cite{lin2019coco}, (\textit{ii}) generation with both image and radiogenomic conditions~\cite{xu2019correlation}, and (\textit{iii}) transfer learning among different body parts and disease types. Whereas this paper only explores the Japanese medical context and pathology-aware GANs, our findings are more generally applicable and can provide insights into the clinical practice in other countries. \vspace{-0.3cm} \bibliographystyle{splncs}
\section{Introduction} Deep models, such as deep neural networks, have seen a tremendous growth in their range of applications, growth that far outpaced our theoretical understanding of them. One of the major outstanding questions is to understand their generalizing power: why a deep model fitted with a relatively small amount of data provides good performance for data points well outside its training set? On the one hand, fitting parameters uniquely to training data is very likely to not generalize well, on the other hand, having an underdetermined model leaves open the question of how to select among the many candidate parameters that fit the data. The training stage of a model can be cast as an optimization procedure in which a cost function is minimized. This cost function measures a chosen notion of distortion between model parameters and training data. For underdetermined models, the cost function has a large number of minima; in fact, very often a continuum of them. When optimizing a cost function with many minima, the optimization method used dictates which minimum is selected. This is in stark contrast with, say, a typical convex optimization problem, where there is no uncertainty due to multiple minima and the effect of the optimization method is confined to the speed of convergence. This non-uniqueness of solutions is in many applications seen as little more than an inconvenience, and when one needs to obtain a unique solution, regularization methods, such as Tykhonov regularization, are nowadays well-understood. The issue at hand here is that the methods yielding the best generalizing power for deep models do not have {\it explicit} regularization terms, but are often simple gradient methods, thus offering no understanding of what makes a good set of parameters for the purpose of generalization. The theory of implicit regularization aims to uncover the rules of selection of parameters that are hidden in the training of deep models. It does so via the introduction of an auxiliary optimization problem, whose solution should be essentially unique and coincide with the local minimum selected~\cite{neyshabur2014search,neyshabur2017geometry,soudry2018implicit}. This auxiliary problem is thought of as {\it regularizing} the original problem {\it implicitly}. \paragraph{The conjecture and our approach} In order to better understand implicit regularization, the authors of~\cite{implicitregmatr2017} put forward a remarkable gradient flow: the function minimized is \begin{equation}\label{eq:defJ1}J(X)= \sum_{i=1}^q (\operatorname{tr}(A_iX)-y_i)^2,\end{equation} where $X$ and $A_i$'s are positive semi-definite matrices, and $y_i$ positive numbers\footnote{The additional assumption that the $A_i$'s are positive semi-definite and $y_i >0$ allows us to simplify the proof by making sure that all optimization problems are feasible. This assumption can be relaxed at the expanse of additional cases to treat in the proofs, which we omit here.}. The authors then conjecture that a gradient-like flow of $J$, when initialized near zero and in the underdetermined regime (i.e., $q\ll n^2$, where $n$ is the dimension of $X$, we take here the definition to mean $q\leq n$.), converges arbitrarily close to a global minimizer of the problem $$\min \|X\|_* \quad \mbox{ s.t. } \operatorname{tr}(A_iX)=y_i,$$ where $\|\cdot\|_*$ is the nuclear norm. The {\it explicitly} regularized problem is thus $$\min J(X)+ \lambda \|X\|_*.$$ The best known results in the literature about the conjecture on implicit regularization in matrix factorization are the ones in~\cite{implicitregmatr2017}: they showed it held for (i) the case $q=1$ and (ii) the case of $q \geq 1$ {\it commuting matrices} $A_i$, i.e., matrices so that $A_iA_j-A_jA_i = 0$, with initial state $X_0=I$, $I$ being the identity matrix. Their analysis was based on finding explicit forms of the solution of the gradient flow ODE for $X$. The approach we take in this paper is entirely different. However, we show in Example~\ref{ex:comm} below how their analysis of commuting matrices fits within our framework, and as a consequence, we provide a rather unexpected characterization of the convergence point in this case (see below Example~\ref{ex:comm}). Our analysis leads us to believe that the conjecture of~\cite{implicitregmatr2017} is {\it ``mostly true''}. We mean by this that while the conjecture is not true in its strictest form, a possibility raised by the authors of the original paper in fact, and further substantiated in~\cite{arora2019implicit}, there are regimes in which it is provably true (the {\it tame spectrum} regime, defined herein), and when moving away from this regime, the performance appears to degrade only slowly. Using the results of our analysis, we can also manufacture settings in which the prediction of the conjecture does not hold even approximately; but for ``typical'' data, it appears to hold. Interestingly, we relate the performance to the {\it spectral gap} of $\sum_{i=1}^q A_i$ and verify that for moderate to large spectral gaps, implicit regularization occurs. In the proof, we make use of elementary notions from Morse theory and dynamical systems, and we refer the reader to~\cite{milnor2016morse, banyaga2013lectures} for thorough introductions, as we keep the review of known material to a minimum in this paper. We summarize the proof of the conjecture below, after having introduced our general blueprint. We then conclude and provide numerical evidence supporting our conclusion. The entirety of the proof of the conjecture is relegated to the Appendix. \section{Implicit Regularization: towards a general theory}\label{sec:impltheory} Implicit regularization is in essence a notion of {\it compatibility} between two optimization problems. We propose here a way to quantify and understand this compatibility. \subsection{Primal and regularization problems} The first of the two problems is what we term the {\bf primal or training} problem, it is given by \begin{equation}\label{eq:primalprob}\min J(\mu;x),\quad \mbox{ via } \dot x = f(\mu,x),\ x(0) = x_0(\mu)\end{equation} where $\mu$ represent parameters or data, $x$ is the variable we are optimizing over (the parameters of the model to be fitted), and $\dot x = f(\mu; x)$ the method used to optimize $J$, e.g. $f(x) = -\frac{\partial J}{\partial x}$. We assume that $J(\mu;x)$ is at least $C^2$ in $x$. (In fact, $J$ is {\it real analytic} for the case of implicit regularization in matrix factorization). A presentation of the primal problem should always include a description of the optimization method used (here, $f(\mu;x)$) and initial state $x_0(\mu)$. We denote by $\varphi_t(x_0)$ the solution at time $t$ of the ODE in~\eqref{eq:primalprob} with $x(0)=x_0$, and by $\operatorname{Crit} J$ the set of {\bf critical points} of $J(\mu,x)$, that is, the set of zeros of $\frac{\partial J}{\partial x}$. This set of course depends on $\mu$, but we often omit the explicit dependence to keep the notation simple. We denote by $\operatorname{Crit}_0 J$ the set of {\it minima} of $J$, and refer to the locally stable zeros of $f$ as {\bf sinks}. When using the {\bf gradient flow} $f(\mu;x)= - \operatorname{grad} J$, the sinks are the local minima of $J$. The cases of interest are the ones where $\operatorname{Crit}_0 J$ has large cardinality, and even contains connected components.\footnote{We note that if $f$ is known, the function $J$ is in fact not required. The set of critical points of $J$ can be replaced by the sets of zero of $f$, and minima by locally stable zeros of $f$, etc.} Unless $\operatorname{Crit}_0 J$ is a singleton, the local minima to which~\eqref{eq:primalprob} will converge depends on the initial state and the optimization method chosen.\footnote{We consider below gradient with respect to a metric defined by the data $\mu$. Hence $\operatorname{grad} J$ is not necessarily equal to $\frac{\partial J}{\partial x}$} The second optimization problem, which we term the {\bf regularization problem}, describes to {\it which element} of $\operatorname{Crit}_0 J$ the primal problem converges. It is a problem of the form \begin{equation}\label{eq:defoS}{ \mathbf R}:\ \min K(\mu;x)\quad \mbox{s.t. } r(\mu;x) = 0,\end{equation} where $K$ is a differentiable real-valued function and $r$ an $\mathbb{R}^q$-valued function. Both $K$ and $r$ can depend on $\mu$. The {\bf feasible set} of ${ \mathbf R}$, denoted by $\operatorname{Feas}({ \mathbf R})$, is the zero set of $r$ . It is required to be included in the set of minima of $J$: \begin{equation}\label{eq:deffeas}\operatorname{Feas}({ \mathbf R}):=\{x \mid r(x) = 0 \}\subseteq \operatorname{Crit}_0 J.\end{equation} Said otherwise: {\it feasible points of ${ \mathbf R}$ are minima of $J$}. Since the trajectories of a gradient flow generically converge to a point in $\operatorname{Crit}_0 J$, this requirement simply ensures that the regularization problem selects one such point. \subsection{Pre-critical sets and compatible problems} We say that the primal problem is (exactly) {\bf implicitly regularized} by the regularization problem if for all $\mu$, $$\varphi_\infty(\mu;x_0) \in \arg \min K(\mu;x) \quad \mbox{ s.t. } r(\mu;x) = 0.$$ If $\varphi_\infty(\mu; x_0)$ is approximately a minimizer of $K$, we refer to the above as {\bf approximately implicitly regularized}. It is important to note that in the regularization problem, the optimization method is irrelevant, as we simply seek global minima. Many variations on this definition are possible, such as requiring that it holds for all $x_0$, or that we converge to any minima of $K(x)$, not necessarily a global one. The following space, which we call the {\bf pre-critical set} of ${ \mathbf R}$ will play an essential role in implicit regularization: \begin{equation}\label{eq:defcritstar} \operatorname{Crit}^*_\mu { \mathbf R}:=\{x \in \mathbb{R}^n\mid \frac{\partial K(\mu;x)}{\partial x}+ \lambda^\top \frac{\partial r(\mu;x)}{\partial x} =0 \mbox{ for some } \lambda \in \mathbb{R}^q\}.\end{equation} We can also define $\operatorname{Crit}^*_\mu { \mathbf R}$ as the projection onto the $x$-coordinates of the set $A:= \{ (x,\lambda) \in \mathbb{R}^{n \times q} \mid \frac{\partial K(\mu;x)}{\partial x}+ \lambda^\top \frac{\partial r(\mu;x)}{\partial x} =0\}.$ This is a space of $x \in \mathbb{R}^n$ which can be critical points of the Lagrangian $L(\mu; x,\lambda) = K(\mu;x) + \lambda^\top r(\mu;x)$ of problem ${ \mathbf R}$. More abstractly, we can think of it as the graph, over $\mathbb{R}^q$, of the implicitly defined function $x(\lambda)$ given by $\frac{\partial K}{\partial x}+ \lambda^\top \frac{\partial r}{\partial x} =0$. This space can be fairly complex: multi-valued, containing several connected components and non-smooth points, as we will observe in the examples below. The terminology pre-critical set comes from the fact that points in $\operatorname{Crit}^* { \mathbf R}$ which are in $\operatorname{Feas}({ \mathbf R})$ are critical points of ${ \mathbf R}$: $\operatorname{Crit} { \mathbf R} = \operatorname{Feas}({ \mathbf R}) \cap \operatorname{Crit}^* { \mathbf R}$. The space $\operatorname{Crit}^* { \mathbf R}$ has a natural role in implicit regularization: if $\operatorname{Crit}^* { \mathbf R}$ is an {\it invariant subspace}\footnote{Recall that $S$ is an invariant subspace for the dynamics $\dot x = f(x)$ if for $x_0 \in S$, the solution $x(t) \in S$ for all $t$.} for the primal dynamics, then implicit regularization is in a sense more likely to occur: indeed, if we initialize the primal flow in this space, or if this space is an attractor for the primal flow, the primal flow converges to a critical point of the Lagrangian of ${ \mathbf R}$; said otherwise, it shows that {\it the regularization problem is well-matched to the primal problem}. Furthermore, since we are interested in minimizers of ${ \mathbf R}$, it is sufficient to consider components of $\operatorname{Crit}^* { \mathbf R}$ containing the minimizers of $K$, we call such a set of these components $\operatorname{Crit}^*_{\mu,0} { \mathbf R}$ or simply $\operatorname{Crit}_{0}^* { \mathbf R}$. Denote by $M$ a set of data point $\mu$. We have the following definition: \begin{definition}[Compatible primal and regularization problems]\label{def:compat} We say that the primal problem~\eqref{eq:primalprob} and the regularization problem ${ \mathbf R}$ of Eq.~\eqref{eq:defoS} are {\bf compatible} over $M$ if the space $\operatorname{Crit}^*_{\mu,0} { \mathbf R}$ is invariant for $f(\mu;x)$, for all $\mu \in M$. \end{definition} We illustrate the definition on four examples. In particular, we revisit the approach of~\cite{implicitregmatr2017} on implicit regularization on matrix factorization and show that Definition~\ref{def:compat} yields new insights to it. \begin{exampleA}[Trivial regularization problem]\label{ex1}\normalfont Starting from the primal problem, it is always possible to construct a regularization problem. Perhaps the simplest one, which we term the {\bf trivial} regularization problem, is given by $$K(\mu;x) = \|\varphi_\infty(\mu,x_0)-x\|^2.$$ We call it trivial since the set $\operatorname{Crit}^*_\mu { \mathbf R}$ for this regularization problem consists of the singleton $\{\varphi_\infty(\mu;x_0)\}$. The regularization problem and primal problem are thus compatible in the sense of Def.~\ref{def:compat}, since $\varphi_\infty(x_0)$ is an equilibrium point of Eq.~\eqref{eq:primalprob}, and thus an invariant set for the dynamics. $ \rule{.08in}{.08in}$ \end{exampleA} \begin{exampleA}\label{ex2}\normalfont Let $x, \mu_i \in \mathbb{R}^n$, and $y_i \in \mathbb{R}$, for $1 \leq i \leq q$. Set $$J(\mu;x)= \sum_{i=1}^q (\mu_i^\top x - y_i)^2.$$ Using the gradient for the Euclidean inner product as optimization method, and setting $x_0(\mu)=0$, we have \begin{equation}\label{ex:srik}\dot x = -\sum_{i=1}^q (\mu_i^\top x - y_i)\mu_i, \quad x_0 = 0.\end{equation} This problem is implicit regularized by the regularization problem $${ \mathbf R}: \min \frac{1}{2}\|x\|^2 \quad \mbox{ s.t. } \mu_i^\top x - y_i = 0.$$ To see this, it suffices to solve the linear differential equation~\eqref{ex:srik}. We obtain in this case that $$\operatorname{Crit}^* { \mathbf R} = \{ x \in \mathbb{R}^n \mid x+ \sum_{i=1}^q \lambda_i \mu_i =0 \mbox{ for some } \lambda \in \mathbb{R}^q\},$$ equivalently, $\operatorname{Crit}^* { \mathbf R} = \operatorname{span} \{\mu _i\}$. This set is clearly invariant for the dynamics~\eqref{ex:srik} and thus the problems are compatible in the sense of Definition~\ref{def:compat}, with $M = \mathbb{R}^n$. \rule{.08in}{.08in} \end{exampleA} In the following example, the set $\operatorname{Crit}^* { \mathbf R}$ has a richer structure than in the previous two examples. \begin{exampleA}[Matrix factorization with $q=1$] \normalfont Let $A \in \mathbb{R}^{n \times n}$ be a positive definite matrix with distinct eigenvalues, $U \in \mathbb{R}^{n \times n}$ and $y$ be a positive number. Consider the primal problem $$J(U)= (\operatorname{tr}(A UU^\top) -y)^2, \quad \frac{d}{dt} U = -(\operatorname{tr}(AUU^\top)-y) A U, U(0)=U_0,$$ and the regularization problem $$ \min \operatorname{tr} UU^\top \quad \mbox{ s.t. } \operatorname{tr}(AUU^\top) = y.$$ Writing $X=UU^\top$, it is easy to see that it is the problem of implicit regularization in matrix factorization. A short calculation, which uses the fact that $A$ is symmetric, yields $$\operatorname{Crit}^* { \mathbf R} = \{ U \in \mathbb{R}^{n \times n} \mid (I-\lambda A)U=0\mbox{ for some }\lambda \in \mathbb{R}\}.$$ The equation $(I-\lambda A)U$ admits non-trivial solutions only for $\lambda \in \operatorname{spec}(A)$, where we denote by $\operatorname{spec}(A)$ the set of eigenvalues of $A$, and in this case $U=vw^\top$, where $v$ is an eigenvector corresponding to $\lambda$, and $w\in \mathbb{R}^n$ is arbitrary. Hence $$\operatorname{Crit}^* { \mathbf R} = \cup_{\lambda_i \in \operatorname{spec}(A)} \{v_i w^\top \mid w \in \mathbb{R}^n, v_i \mbox{ an eigenvector corresponding to }\lambda_i\},$$ this set is the union of $n$-dimensional subspaces of $\mathbb{R}^{n \times n}$. Now recalling that eigenvectors of $A$ are orthogonal, it is easy to verify that each branch of $\operatorname{Crit}^*{ \mathbf R}$ is invariant for the dynamics of $U$ given above, thus showing compatibility of the primal and selection problems. \rule{.08in}{.08in} \end{exampleA} The final example addresses the case studied in~\cite{implicitregmatr2017}. \begin{exampleA}[Matrix factorization with commuting matrices]\label{ex:comm} \normalfont Now assume we have $q$ positive definite matrices $A_i$, with primal problem $$J(U)= \sum_{i=1}^q(\operatorname{tr}(A_i UU^\top) -y_i)^2, \quad \frac{d}{dt} U = -\sum_{i=1}^q(\operatorname{tr}(A_iUU^\top)-y_i) A_i U, U(0)=U_0$$ and regularization problem $$ \min \operatorname{tr} UU^\top \quad \mbox{ s.t. } \operatorname{tr}(A_iUU^\top) = y_i, i=1,\ldots, q$$ The set pre-critical set is $$\operatorname{Crit}^* { \mathbf R} = \{ U \in \mathbb{R}^{n \times n} \mid (I-\sum_{i=1}^q\lambda_i A_i)U=0\mbox{ for some }\lambda \in \mathbb{R}\}.$$ This set is in general difficult to study, as it requires to determine when the affine space of matrices $I+\operatorname{span}\{A_i\}$ contains rank deficient matrices. If we assume that the $A_i$ commute, however, the situation is far simpler: commuting symmetric matrices admit a common set of eigenvectors, hence there exists an orthogonal matrix $V$ such that $ A_i =VD_iV^\top$, where $D_i$ is a diagonal matrix, with diagonal entries $d_{ij}$, $i=1,\ldots,q, j=1,\ldots, n$, and the columns of $V$ are eigenvectors of the $A_i$. We denote these columns by $v_i$. Now let $I \subseteq \{1,\ldots,n\}$ be a subset of cardinality $q$. We can, generically for the $d_i$'s, find a unique solution $\lambda=(\lambda_1,\ldots, \lambda_q)$ to the linear system $$\sum_{i=1}^q \lambda_i d_{i,k} =1, k \in I. $$ With these $\lambda_i$'s, a short calculation shows that the matrix $(I- \sum_{i=1}^q \lambda_i A_i)=V(I- \sum_{i=1}^q \lambda_i D_i)V^\top$ has a kernel of dimension $q$, spanned by the vectors $v_i, i \in I$. There are ${n \choose q}$ such subsets $I$, and to each of them corresponds a vector $\lambda \in \mathbb{R}^q$ and thus a component of dimension $q\times n$ of $\operatorname{Crit}^* { \mathbf R}$: $$\{U \in \mathbb{R}^{n \times n} \mid U = v w^\top, w \in \mathbb{R}^n, v \in \operatorname{span}\{v_i \mid i \in I\} \}.$$ Similarly as in the previous example, this set is easily seen to be invariant for the primal dynamics. The analysis suggests that when the flow converges to a rank one matrix (which we show below is the case) $$X=vv^\top,$$ then there exists $q$ eigenvectors in the common set of eigenvectors of the $A_i$ so that $v$ is a linear combination of these $q$ eigenvectors. Said otherwise, there exists a {\it sparse vector} $x \in \mathbb{R}^n$, with $\|x\|_0 \leq q$ so that $$v = Vx.$$ This is a non-trivial statement when $q <n$, and we verified it in simulations. Note that there are ${n \choose q}$ such linear subspaces, and when $q$ is large, they can intersect non-trivially. \rule{.08in}{.08in} \end{exampleA} \subsection{A blueprint for implicit regularization} The criterion of Definition~\ref{def:compat} by itself is clearly not sufficient for implicit regularization to occur. For example, since the space $\operatorname{Crit}_0 J$ contains points $x$ not in $\operatorname{Feas}({ \mathbf R})$, one can converge to a non-feasible point for ${ \mathbf R}$, even when initialized in $\operatorname{Crit}^* { \mathbf R}$. More, even if $\operatorname{Feas}({ \mathbf R}) = \operatorname{Crit}_0 J$, saddle points of the primal dynamics can become local sinks in an invariant space, allowing for the primal flow to converge to a non-feasible point. This criterion, however, provides us with a general blueprint to study implicit regularization: \begin{enumerate} \item Identify a set of $\mu$'s for which primal and regularization problems are compatible. Denote this set by $M$. Of course, the larger the set, the better. \item Verify that when initialized in the pre-critical set $\operatorname{Crit}^*_0 { \mathbf R}$ with $\mu \in M$, the primal dynamics will converge to a feasible point: $$\varphi_{\infty}(x_0) \in \operatorname{Feas}({ \mathbf R}) \quad\mbox{generically for } x_0 \in \operatorname{Crit}^* { \mathbf R}$$ This entails verifying that no saddles of $J$ are local sinks for the dynamics in $\operatorname{Crit}^* { \mathbf R}$. \item Verify that under the above conditions, the primal dynamics in fact converges to a minimum of $K$ (the first two points guarantee it converges to a critical point). \end{enumerate} If these three items are met, a form of implicit regularization holds: for initial conditions $x_0(\mu) \in \operatorname{Crit}_0^* { \mathbf R}$, and $\mu \in M$, implicit regularization is generically true. If only the first two points are verified, a weaker form of implicit regularization, whereby the primal flow converges to a critical point of the regularization problem, and not necessarily a global minimum, holds. Depending on the flavor of implicit regularization one is after, additional steps can be pursued. We consider here the following two: \begin{enumerate} \item[4.] If $x_0$ is independent of $\mu$, verify that the primal dynamics converges to $\operatorname{Crit}^* { \mathbf R}$ from $x_0$. \item[5.] Verify that when $\mu \notin M$, the performance does not degrade drastically (i.e., the primal converge to an approximate minimizer of the regularization problem. \end{enumerate} The last item is in general difficult to verify rigorously, but one can appeal to continuity to obtain qualitative statements. We also note that the items are not completely independent from each other. For example, if some local sinks in the invariant space $\operatorname{Crit}^*_0 { \mathbf R}$ are saddles of the general dynamics, flow lines near that saddle will escape the vicinity of $\operatorname{Crit}^*_0 { \mathbf R}$, and point 4 is less likely to hold. We will revisit this point in detail later in the paper. A key point of the blueprint is to identify an as large as possible set $M$ of a data points for which implicit regularization is exact. For the first three examples given above, $M$ was equal to the entire space of possible $\mu$'s. For the last examples, it was the set of commuting matrices. Another aspect is the dimension of the pre-critical set: in the first example, its dimension was zero, whereas in the second, it was $q$. Adopting a more subjective point of view, we can say that the regularization described in Example~\ref{ex1} is not as useful or surprising as the one of Example~\ref{ex2}. A useful heuristic is that the {\it larger the dimension} of the pre-critical set $\operatorname{Crit}^* { \mathbf R}$, the more useful the implicit regularization is. Finally, we mention that not all sets $M$ are equivalent for implicit regularization insofar as item $5$ is concerned. For example, the set exhibited in Example~\ref{ex:comm}, which originated from the paper~\cite{implicitregmatr2017}, does not lend itself well to generalization. This was in fact pointed out by the authors of the paper, though they arrived at this conclusion from a very different perspective, namely looking for {\it explicit solutions} of the primal problem. We reach this conclusion by noting that if we perturb one matrix $A_i$ by a small amount, the trajectory of the primal system can stray very far from $\operatorname{Crit}^*{ \mathbf R}$. Our proof below will exhibit a different set $M$, which we refer to as matrices with {\it tame spectrum}\footnote{We say that positive semi-definite matrices $A_i$, $i=1,\ldots, q$ have a tame spectrum if the eigenvalues of $\sum_{i=1}^q A_i)$ are given by $\{\alpha, \beta,\cdots, \beta, 0,\ldots, 0\}$ for some $\alpha>\beta >0$. See Def.~\ref{def:LE}.} , that is better suited to study implicit regularization in matrix factorization. \subsection{How to determine the implicit regularizer?} A fundamental goal in the area is to {\it determine} the implicit regularizer ${ \mathbf R}$ given a primal flow. We provide here a brief overview of how our blueprint provides a path to obtain such regularizer, but we postpone a thorough analysis to a forthcoming publication. We consider the training problem with cost $J = \sum_{i=1}^q l(\mu_i,x)$, where $l$, the {\it loss function}, depends on data points $\mu_i$ and parameters $x$. We assume that $l$ is positive semi-definite with minimum at zero, hence $\min J =0$. In Example~\ref{ex2} , $l(\mu,x)= (c^\top x - y)^2$ (and $\mu = (c,y)$), and in Example~\ref{ex:comm}, $l(\mu,x) = \operatorname{tr}(AX)-y$, with $\mu = (A,y)$. The primal flow is taken to be the natural gradient of $J$: \begin{equation}\label{eq:defgradJloss}\dot x = -\sum_{i=1}^q \frac{\partial \l}{\partial x}(\mu_i,x)=f(\mu,x). \end{equation} Following our Ansatz, we need to find a function $K(x)$ so that the regularization problem ${ \mathbf R}: \min K(x) \quad \mbox{ s.t. } l(\mu_i,x)=0$ is compatible with the above primal flow; said otherwise, so that $\operatorname{Crit}^* { \mathbf R}$ is invariant for~\eqref{eq:defgradJloss}. We can show, but we omit the derivation here, that this requirement of invariance reduces to the system of partial differential equations (with unknowns $K$ and $\lambda_i$) \begin{equation}\label{eq:mastereq} \frac{\partial^2 K}{\partial x^2}f(\mu,x) + \sum_{i=1}^q\lambda_i \frac{\partial^2 l}{\partial x^2}(\mu_i,x) f(\mu,x)=0. \end{equation} This partial differential relation has a simple interpretation: the Hessian of $K$, acting on $f$, is a linear combination of the Hessians of $l$ at the datapoints $\mu_i$, acting on $f$. As an example of how one can use this equation to determine potential implicit regularizers, consider the case of a loss function \begin{equation}\label{eq:exloss}l(\mu,x) = \sigma(c^\top x - y),\end{equation} where $\sigma$ is a twice differentiable real-valued (nonlinear) function with minimal value zero, $c \in \mathbb{R}^n$ and $y \in \mathbb{R}$. Its derivative and Hessian are given by \begin{equation} \label{eq:derivativessigm} \frac{\partial l}{\partial x} = \sigma'(c^\top x -y)c \quad \mbox{ and }\quad \frac{\partial^2 l}{\partial x^2} = \sigma''(c^\top x-y)c c^\top, \end{equation} where $\sigma'$ and $\sigma''$ are the first and second derivatives of $\sigma$, respectively. We use the shorthand $\sigma_i:=\sigma(\mu_i,x)$. One can then use Eq.~\eqref{eq:mastereq} to produce candidate regularization problems. For the case described in Eq.~\eqref{eq:exloss}, a short calculation easily produces two such candidates. Using the specific form of $f$ given in~\eqref{eq:defgradJloss}, we find that taking $\partial^2 K/\partial x^2$ to be a multiple of the identity matrix is a solution of~\eqref{eq:mastereq} for $\lambda_i= d\log(\sigma'_i)(\sum_j c_i^\top c_j \sigma'_j)^{-1}$ (here, $d\log f = d/dx(\log(f))$). Clearly, taking $K=\|x\|^2$ fits the requirement and thus yields a regularization problem compatible with the primal problem. Another candidate is $K=x^\top Q x$ with $Q = \sum_{i=1}^q c_ic_i^\top$, and $\lambda_i= (\sigma''_i)^{-1}$, but in this case the regularizer depends on the data. More can be extracted from Eq.~\eqref{eq:mastereq}, but this is outside the scope of this paper. \paragraph{Implicit regularization in matrix factorization} We now focus the above discussion to implicit regularization for matrix factorization, and describe the contents of the remainder of the paper in more details. In a nutshell, we will illustrate how to apply items 1-5 of the above blueprint to the conjecture proposed in~\cite{implicitregmatr2017}. The primal problem is given by the differential equation \begin{equation}\label{eq:flow1}\frac{d}{dt} X = -\sum_{i=1}^q (\operatorname{tr}(A_iX) - y_i) (A_i X+XA_i) ,\quad X(0)= X_0\delta\end{equation} where $X_0 \in \mathbb{R}^{n \times n}$ is a positive semi-definite matrix, $\delta$ is small constant (e.g. $10^7$ times smaller than the $y_i$'s, $\|A_i\|$'s and $\|X_0\|$), the $A_i \in \mathbb{R}^{n \times n}$ are positive semi-definite and $y_i>0$, for $1 \leq i \leq q$. We will describe below the function $J$ this flow minimizes. This type of matrix differential equation has a long history. Related flows were shown by Brockett in~\cite{brockett1991dynamical} to solve a variety of combinatorial problems, and the monograph~\cite{helmke2012optimization} provides an in-depth look at many of their characteristics. For example, it is easy to see that the flow of~\eqref{eq:flow1} preserves the cone of positive semi-definite matrices and moreover if $\operatorname{rank}(X_0) = k$, then $\operatorname{rank} (X(t)) \leq k$ for $t \in [0,\infty]$~\cite{helmke2012optimization}. It was observed that when initialized near zero, i.e., when $\delta$ is small, the flow of~\eqref{eq:flow1} converged to (near) an $X^*$ with the property \begin{equation}\label{eq:sel1} { \mathbf R}: X^* \in \arg \min_{X} \|X\|_* \quad \mbox{ s.t. } \operatorname{tr} (A_iX) = y_i, 1\leq i \leq q,\end{equation} where $\|X\|_*=\operatorname{tr} X$ is the {\it nuclear} or {\it trace norm} of $X$. With our terminology, it was conjectured, roughly speaking, that the regularization problem ${ \mathbf R}$ of Eq.~\eqref{eq:sel1} approximately regularizes the flow of Eq.~\eqref{eq:flow1} in the limit $\delta \to 0$. While convergence of the flow to the set of matrices that meet the constraints $\operatorname{tr}(A_iX)=y_i$ may not appear surprising given the form of~\eqref{eq:flow1}, convergence to a {\it global }minimum of ${ \mathbf R}$ was certainly unexpected. As already mentioned, we believe that exact regularization as in Example~\ref{ex2} does not take place here, but yet via exhibiting a set of $\mu$'s for which it does, one can expect implicit regularization to be approximately true (as in step 5 of the blueprint). \begin{remark}\label{rem:relax} We consider below (see Eq.~\eqref{eq:optimprobgen}) the family of problems $${ \mathbf R}_k: \min \| X\|_* \quad \mbox{ s.t. }\quad \operatorname{tr} (A_iX)=y_i, \operatorname{rank} X=k,$$ parametrized by the rank $k$ of $X$, $k=1,\ldots,n$. We then, in essence, show that under certain assumptions, the solution of the rank constrained problem with $k=1$ and the problem with $k=n$ agree (see Theorem~\ref{th:equivnfullselecmin}). Said otherwise, it says that under these assumptions, the convex relaxation (problem with $k=n$) of the rank constrained problem ($k=1$) is exact. It is in a sense remarkable that the conditions guaranteeing compatibility of primal and regularization problem also yield exact relaxation. \end{remark} We provide below a summary of the steps taken in the proof of the conjecture: \begin{enumerate} \item We show that the flow of~\eqref{eq:flow1} {\it always} goes near a rank $1$ matrix, denote it by $X_1$. {\it (Theorem~\ref{th:rk1bottle})} \item We introduce the so-called {\it normal form} for the system, and show that it exists generically in the underdetermined regime (termed {\it rank spread condition}). The normal form makes much of the proof more transparent. ({\it Lem.~\ref{lem:P} and Prop.~\ref{prop:optnormcoord}}) The construction of the normal form itself can be omitted at first reading, and one can immediately study the normal system described in Eq.~\eqref{eq:nomsys}, and the corresponding regularization problem~\eqref{eq:optx}. \item We show that the function $J$ of Eq.~\eqref{eq:defJ1} is a Morse-Bott function and the primal flow is a gradient of this function for a metric defined by the $A_i$'s. ({\it Th.~\ref{th:morsebott}}) \item We show that the conjecture holds for commuting generalized projection matrices. This part is meant to illustrate the use of the items above by showing how they immediately provide extensions on the extant result in the area, and can be skipped at first reading. ({\it Prop.~\ref{prop:commproj} and Cor.~\ref{cor:commproj}}) \item We introduce the {\it tame spectrum condition}. It describes a set $M$ of parameters for which the pre-critical set $\operatorname{Crit}_0^*{ \mathbf R}$ is invariant for the dynamics $\rightarrow$ the problems are compatible over tame matrices. ({\it Def.~\ref{def:LE}, Th.~\ref{th:compat}}) \item We show that $\operatorname{Crit}_0^*{ \mathbf R}$ and $\operatorname{Crit}_0 J$ intersect transversally and that no saddles of $J$ are sinks in $\operatorname{Crit}_0^* { \mathbf R}$ $\rightarrow$ when $X_0 \in \operatorname{Crit}_0^* { \mathbf R}$, the flow converges to a feasible point of ${ \mathbf R}$. ({\it Th.~\ref{th:rank1}}). \item We show that $X_1$ of item 1 {\it belongs} to $\operatorname{Crit}_0^* { \mathbf R}$ $\rightarrow$ when initialized near zero, the flow always goes near $\operatorname{Crit}_0^* { \mathbf R}$. ({\it Prop.~\ref{prop:winLv}}) \item We show, relying on Lojasiewicz inequality, that when initialized near $\operatorname{Crit}_0^* { \mathbf R}$, the flow converges to a point near $\operatorname{Crit}_0^* { \mathbf R}$. ({\it Prop.~\ref{prop:closeLoja}}). \end{enumerate} The above items roughly cover points $1,2$ and $4$ of the blueprint. The analysis for point $3$ is done in the last part: \begin{itemize} \item[9.] Introduce {\it intrinsic} coordinates on $\operatorname{Crit}^*_0 { \mathbf R}$. Write the dynamics and regularization problem in these coordinates (we call them reduced coordinates). ({\it Lem.~\ref{lem:reddyn}}). \item[10.] Show that in $\operatorname{Crit}_0^* { \mathbf R}$, $J$ becomes a {\it Morse} function, that it has $3^q$ critical points, of which $2^q$ are minima, and only $2$ of these correspond to global minima of ${ \mathbf R}$. ({\it Th.~\ref{th:reddyngradient}}). \item[11.] Show that when initialized at the $X_1$ of item $1$, the flow converges to one of the two {\it global} minima of ${ \mathbf R}$ (only sketch the last part) ({\it Cor.~\ref{cor:lambdasign}}). \item[12.] Show that under the tame spectrum hypothesis, there always exists a global minimum of ${ \mathbf R}$ of rank $1$. ({\it Th.~\ref{th:equivnfullselecmin}}) $\rightarrow$ studying the problem in $\operatorname{Crit}^*_0 { \mathbf R}$ can be done without loss of generality. \end{itemize} \section{Background and notation} \paragraph{Problem set-up} Let $n,q$ be positive integers and let $A_i \in \mathbb{R}^{n \times n}$ be real symmetric positive semi-definite (psd) matrices of rank $r_i$ and $y_i$ be positive numbers, for $i=1, \ldots, q$. We denote by $S_{k,n}$ the space of psd matrices in $\mathbb{R}^{n \times n}$ of rank at most $k$ and write $S_n$ for $S_{n,n}$. The primal (training) problem is the Cauchy problem \begin{equation}\label{eq:mainsys} \dot X(t) = - \sum_{i=1}^q \left(\operatorname{tr}(A_iX(t))-y_i\right) \left(A_iX(t)+X(t)A_i\right), \quad X(0)= X_0\delta \end{equation} where $X_0$ is a real symmetric matrix and $\delta>0$ a constant. We observe that $\dot X = \dot X^\top$, i.e., symmetric matrices are an invariant set of system~\eqref{eq:mainsys}, and hence $X(t)$ is symmetric for all $t > 0$ for which the solution exists.\footnote{We show below that a simple Lyapunov argument establishes existence of solutions for $t>0$, and will thus omit this qualifier from now on.} In fact, more is true: system~\eqref{eq:mainsys} leaves the cone of positive semidefinite matrices invariant and does not increase rank as mentioned earlier. Hence, if $X_0$ is positive semidefinite of rank $k$, then $X(t)$ is also psd and of rank at most $k$. This motivates the introduction of the flow \begin{equation}\label{eq:mainUsys} \dot U(t) = - \sum_{i=1}^q\left(\operatorname{tr}(A_iUU^\top)-y_i\right) A_i U(t),\quad U(0)=U_0, \end{equation} where $U \in \mathbb{R}^{n \times k}$, whose trajectories can be mapped onto trajectories of~\eqref{eq:mainsys} as follows: \begin{lemma}\label{lem:equivXU} Let $U(t)$ be the solution of~\eqref{eq:mainUsys} with $U_0 \in \mathbb{R}^{n \times k}$, and let $X(t)$ be the solution of~\eqref{eq:mainsys} with $X_0=U_0U_0^\top$, then $U(t)=X(t)$ when they exist. \end{lemma} To verify that the Lemma holds, it suffices to differentiate $\bar X(t):=U(t)U(t)^\top$ and observe that $\bar X$ and $X$ then obey the same Cauchy problem. If $X_0$ is of rank $k$, we note that there exists an $O(k)$-parametrized family of $U_0$ so that $X_0=U_0U_0^\top$, where $O(k)$ is the orthogonal group in dimension $r$. From now on, we use the notation \begin{equation}\label{eq:defrho} \rho_i:=\operatorname{tr}(A_iUU^\top)-y_i, \end{equation} or, depending on the context, $\rho_i:=\operatorname{tr}(A_iX)-y_i.$ Consider the real-valued function \begin{equation}\label{eq:maincostU} J(U) := \frac{1}{4}\sum_{i=1}^q(\operatorname{tr}(A_iUU^\top)-y_i)^2. \end{equation} A short calculation shows that the flow~\eqref{eq:mainUsys} is the {\it gradient flow} of~\eqref{eq:maincostU} for the Euclidean inner product on $\mathbb{R}^{n \times n}$: $$\operatorname{grad} J(U) = \sum_{i=1}^q\rho_i A_i U(t).$$ From Lemma~\ref{lem:equivXU}, we conclude that the function \begin{equation}\label{eq:maincost} J(X) = \frac{1}{2}\sum_{i=1}^q\left(\operatorname{tr}(A_iX)-y_i\right)^2 \end{equation} is a Lyapunov function for the flow~\eqref{eq:mainsys}. We also say that~\eqref{eq:mainsys} is {\it gradient-like} for $J$. (Note that we overload the notation for $J$ as well; the context will dispel possible confusions). This fact can be used to show existence of solutions of Eq.~\eqref{eq:mainsys}. We now introduce a slight generalization of the {\bf regularization problem} for implicit regularization, allowing for a rank $1 \leq k \leq n$ for $X$ (and $U$) \begin{equation} \label{eq:optimprobgen}{ \mathbf R}_k: \min_{X \in S_{n,k}} \operatorname{tr} X \quad \mbox{ s.t. } \operatorname{tr} (A_i X) = y_i, \quad i=1,\ldots,q \end{equation} and its equivalent in the $U$ coordinates \begin{equation} \label{eq:optimprobgenU} { \mathbf R}_k:\min_{U \in \mathbb{R}^{n \times k}} \operatorname{tr} UU^\top \quad \mbox{ s.t. } \operatorname{tr} (A_i UU^\top ) = y_i, \quad i=1,\ldots,q. \end{equation} The cases $k=1$ and $k=n$ will be of most interest to us. \paragraph{Notation and conventions}\label{ssec:notation} We gather here some of the notation used throughout the paper. We let $e_i$ be the vector in $\mathbb{R}^n$ with all entries equal to $0$, except for the $i$th one, which is equal to $1$. In general, the dimension of the matrices and vectors introduced in this section will depend on the context (e.g., $e_i$ could be a vector in $\mathbb{R}^m$ with $m < n$ as well). We generally use $c>0$ to denote positive constant. The value of $c$ can change throughout the argument without further comments. We denote by $I$ the identity matrix. When we need to emphasize the dimension, we write $I_n$ for the identity matrix in $\mathbb{R}^{n \times n}$. We let $O(n)$ be the orthogonal group: $\Theta \in O(n)$ if $\Theta \Theta^\top = I$. Let $X$ be a positive semi-definite (psd) matrix. We say that $X$ is of {\bf $\epsilon$-rank $r$} if there exists a psd matrix $X_r \in S_{r,n}$ so that \begin{equation}\label{eq:ang}\|X-X_r\|/\|X_r\| \leq \epsilon.\end{equation} We will also informally say that $X$ is {\bf essentially of rank} $r$. For example, if $X$ is itself of rank $r$, then the previous inequality is trivially met. This type of bound is necessary to quantify when a matrix is close to a subset of low rank matrices, since the zero matrix is in the closure of the sets of matrices of rank $k$ for all $k$. Indeed, $I\delta$ is arbitrarily close, in the Euclidean distance, to the set of rank $1$ matrices but is of $\epsilon$-rank $1$ only for $\epsilon \geq 1$. A more geometric interpretation of~\eqref{eq:ang} is that the angle between the lines spanned by $X$ and $X_r$ is small when $\epsilon$ is small. We say that $x$ is $\epsilon$-close to $y$ is $\|x-y\| \leq \epsilon$. For a matrix $B \in \mathbb{R}^{n \times p}$, we denote by $\operatorname{span}\{B\}$ the vector subspace of $\mathbb{R}^n$ spanned by the columns of the $B$. Given a collection $N$ of disjoint subsets $$N_1,\ldots, N_q \subseteq \{1,\ldots,m\},$$ we denote by $\mathcal{D}_N$ the vector space of diagonal matrices with entries $d_i$ satisfying $d_i = d_j$ if $i,j \in N_k$ for some $1 \leq k \leq q$. For example, if $N_1=\{1,2\}$ and $N_2=\{3 \}$ then matrices in $\mathcal{D}_N$ are of the form $\operatorname{diag}([\alpha, \alpha, \beta])$, $\alpha, \beta \in \mathbb{R}$. Throughout the paper, we also use \begin{equation}\label{eq:def:Ei} E_i : = \sum_{j \in N_i} e_je_j^\top, \end{equation} the sets $N_i$ will be clear from the context. The $E_i$'s are thus diagonal matrices with $0$ on the diagonal, except in the entries indexed by $N_i$, which are 1. Continuing the previous example, we have $$E_1 = \operatorname{diag}(1,1,0) \mbox{ and } E_2 = \operatorname{diag}(0,0,1).$$ We let $|N_i|$ be the cardinality of $N_i$. Given a vector $x \in \mathbb{R}^n$, we denote by $\bar x_i\in \mathbb{R}^{n}$ its canonical projection onto the column span of $E_i$. For the sets $N_i$ described above, we have $$\bar x_1 = \begin{pmatrix} x_1 & x_2 & 0\end{pmatrix}^\top \mbox{ and }\bar x_2 =\begin{pmatrix}0 & 0 & x_3 \end{pmatrix}^\top.$$ Depending on the context, we may omit the zero entries and consider $\bar x_1 \in \mathbb{R}^2$ and $\bar x_2 \in \mathbb{R}$ or, more generally, $\bar x_i \in \mathbb{R}^{|N_i|}$. For a matrix $U \in \mathbb{R}^{n \times n}$, we denote by $(u)_{1..m,1..n}$ the submatrix of size $m \times n$ obtained by keeping the rows $1,\ldots, m$ and columns $1,\ldots, n$. Given a vector subspace $L \subset \mathbb{R}^n$, we denote by $L^\perp$ its Euclidean orthogonal, i.e. $x \in L^\perp$ if $x^\top y =0$ for all $y \in L$. Recall that $f(n)=\Theta(g(n))$ if there exists constants $c_1<c_2$ so that $c_1g(n) \leq f(n) \leq g(n)$ for all $n$ large enough. \section{The rank $1$ matrix bottleneck}\label{sec:bottleneck} The rank-$1$ bottlneck property of the flow refers to the fact that when initialized near zero, without any additional assumptions, the flow of Eq.~\eqref{eq:mainsys} will be of $\varepsilon$-rank $1$ at some time $t_1$, for an arbitrarily small $\varepsilon$ provided that $X_0$ is small enough. The proof of the rank $1$ bottleneck property contains two steps. In the first step, we exhibit a linear ODE and show that its solutions have the rank $1$ bottleneck property. In the second step, we show that the system of Eq.~\eqref{eq:mainUsys} follows the trajectory of this linear ODE closely for a positive time $t_1$. The two steps together easily yield the proof for the general nonlinear system of Eq.~\eqref{eq:mainsys}. \paragraph{Rank $1$ bottleneck for linear systems} The following result shows that the trajectories of linear differential equation $\dot V = A V$, $A$ a positive semi-definite matrix, which start at a small, non-zero initial condition $V(0)$ of arbitrary rank, will eventually be of $\epsilon$-rank $1$ generically for $V(0)$. If $V(0)$ is also of rank $1$, then the statement is trivially true. \begin{lemma}\label{lem:solinapprox} Let $A \in \mathbb{R}^{n \times n}$ be a symmetric positive semi-definite matrix, $V_0 \in \mathbb{R}^{n \times n}$. Define $V(t,\delta):=e^{At}V_0\delta.$ Then, generically for $A$ and $V_0$, there exists a matrix-valued function $V_1(t,\delta)$ of rank $1$ such that for all $\epsilon>0$, there exists $t^*>0$, so that $$\frac{\|V_1(t,\delta)-V(t,\delta)\|}{\|V_1(t,\delta)\|}\leq \epsilon, \mbox{ for all } t \geq t^*, \delta >0$$ Furthermore, $\|V_1(t,\delta)\| = \Theta(\delta)$ for all fixed $t>0$.\end{lemma} \begin{proof} Let $P \in O(n)$ be so that $PAP^\top=D$ where $D$ is a diagonal matrix with diagonal entries $d_1 \geq d_2 \geq \cdots \geq d_n\geq 0$ and let $\bar V(t) := PV(t)P^\top$. Then $\bar V(t) = e^{Dt}\bar V_0$, where $\bar V_0 = PV_0P^\top\delta$. Because $e^{Dt}$ is diagonal, we have $$\bar V(t) = \sum_{i=1}^n e^{d_it} e_i \bar V_{0,i}\delta,$$ where $\bar V_{0,i}$ is the $i$th row of $\bar V_0$. Define \begin{equation}\label{eq:defV1lem}\bar V_1(t,\delta):= e^{d_1 t} e_1 \bar V_{0,1}\delta.\end{equation} Then $\|\bar V_1(t,\delta)\| = e^{d_1t} \|\bar V_{0,1}\|\delta$ and $$\|\bar V(t,\delta)-\bar V_1(t,\delta)\| = \|\sum_{i=2}^n e^{d_i t}e_i\bar V_{0,i}\delta\| \leq c (n-1) e^{d_2t} \delta.$$ Normalizing by the norm of $\bar V_1(t)$, we have $$\frac{\|\bar V(t,\delta)-\bar V_1(t,\delta)\|}{\|\bar V_1(t,\delta)\|} \leq \frac{(n-1) e^{d_2t}c \delta}{e^{d_1t} \|\bar V_{0,1}\|\delta} \leq c e^{(d_2-d_1)t}.$$ Generically for $A$, $d_2 - d_1 <0$, and thus taking $t^*$ large enough yields the first statement. The second statement is obvious from~\eqref{eq:defV1lem}. \end{proof} \paragraph{The error system} The following result gives conditions under which the trajectories of~\eqref{eq:mainUsys} are well-approximated by trajectories of $\dot V=AV$. Clearly, the approximation will be valid only for a bounded set $[0,T]$, as the solutions $V(t)$ generically diverge, whereas the solutions of~\eqref{eq:mainUsys}, being trajectories of the gradient flow of $J$, are easily seen to be bounded. \begin{lemma}\label{lem:errorU} Let $A_i$ be positive semi-definite matrices and $y_i >0$, $i=1\ldots q$, and set $$A:= \sum_{i=1}^qy_i A_i.$$ Let $U(t,\delta)$ be the solution of~\eqref{eq:mainUsys} with initial condition $U(0)=U_0\delta$, for $U_0 \in \mathbb{R}^{n\times n}$ nonzero, and let $V(t,\delta)$ be the solution of $\dot V = AV$, $V(0)=U(0)$. Then, for all $0 < \epsilon <1$ and $t^*>0$, there is $\delta_1 >0$ so that $$\|U(t,\delta)-V(t,\delta)\| \leq \epsilon$$ for all $0 < \delta < \delta_1$, $0 \leq t \leq t^*$. Furthermore, $\|U(t,\delta)-V(t,\delta)\| = O(\delta^3)$ for $0 < \delta \leq \delta_1$, $0 \leq t\leq t^*$. \end{lemma} \begin{proof}Using the matrix $A$ introduced in the Lemma's statement, we can rewrite~\eqref{eq:mainUsys} as $$\dot U = -\sum_{i=1}^q(\operatorname{tr}(A_i UU^\top)-y_i) A_i U= AU - \sum_{i=1}^q\operatorname{tr}(A_i UU^\top)A_i U.$$ Consider the system $$\dot V = AV,\quad V(0) = U_0$$ where, without loss of generality, we assume that $U_0$ is of unit norm. Set $E(t) = V(t)-U(t)$. Then, differentiating $E$, we obtain \begin{align*}\dot E &= AE+\sum_{i=1}^q\operatorname{tr}(A_i UU^\top)A_i U \\&= (A-\sum_{i=1}^q\operatorname{tr}(A_i UU^\top)A_i)E + \sum_{i=1}^q\operatorname{tr}(A_i UU^\top)A_iV.\end{align*} Replacing $UU^\top$ by $VV^\top -V^\top E-E^\top V +EE^\top$ in the previous equation, we get \begin{multline}\dot E = \left[A-\sum_{i=1}^q\operatorname{tr}\left(A_i (VV^\top -V^\top E-E^\top V +EE^\top)\right)A_i\right]E \\+ \sum_{i=1}^q\operatorname{tr}\left(A_i (VV^\top -V^\top E-E^\top V +EE^\top)\right)A_iV \end{multline} Now set $z := \|E\|$. Because $y_i >0$, then $A_i \leq c A$ for some constant $c$ depending on the $y_i$'s; without loss of generality, we take $c \geq 1$. We let $\lambda $ be a largest eigenvalue of $cA$, which, generically for $A_i, y_i$ is unique. Then $\|V\| \leq e^{\lambda t} \delta$ and we obtain the bound (recall that $\frac{d}{dt} \|e\| \leq \| \dot e\|$) \begin{equation}\label{eq:oderho}\dot z \leq (\lambda+q(e^{2\lambda t}\delta^2+2e^{\lambda t}\delta z+z^2)\lambda^2)z +q\lambda^2(e^{2\lambda t}\delta^2+2e^{\lambda t}\delta z + z^2)e^{\lambda t} \delta.\end{equation} Now let $z_1 (t)$ be the solution of the differential equation \begin{align}\label{eq:oderho1}\dot z_1 &= (\lambda+q\lambda^2(e^{2\lambda t}\delta^2+2e^{\lambda t}\delta +1))z_1 +q\lambda^2(e^{2\lambda t}\delta^2+2e^{\lambda t}\delta z_1 + z_1)e^{\lambda t} \delta\\ &= (\lambda+q\lambda^2(3e^{2\lambda t}\delta^2+2e^{\lambda t}\delta+e^{\lambda t}\delta +1))z_1 + q\lambda^2e^{3\lambda t}\delta^3. \end{align} with $z_1(0)=0$. The above is a linear time-varying ODE with positive coefficient for $z_1$ and a positive independent term $q\lambda^2e^{3\lambda t}\delta^3$. Hence, its solution is positive and, when it exists, smooth. Let $t_1>0$ be the first time for which $z_1(t_1)=1$. For all $0 \leq t \leq t_1$, $\dot z \leq \dot z_1$ and hence $z(t) \leq z_1(t)$. The solution of equation~\eqref{eq:oderho1} is given explicitly by \begin{multline}\label{eq:solrho1} z_1(t)=\delta^3\lambda^2q\exp\left(t \lambda\left(\lambda q+1\right)+3\delta\lambda qe^{\lambda t}+\frac{3}{2}q\delta^2 \lambda e^{2 \lambda t})\right)\\ \int_{0}^{t} \exp\left(-\frac{\lambda}{2}\left(3 qe^{2\lambda s} \delta^2 +6 qe^{\lambda s} \delta- 4 s + 2 \lambda qs\right)\right) ds. \end{multline} From the above equation, we see that for any $t^*>0$ and $\epsilon>0$ we can choose $\delta_1$ small enough so that $z_1(t^*) < \epsilon$ and thus, if moreover $\epsilon<1$, $z(t^*) < \epsilon$. This proves the first statement. To obtain the second the statement, let $t^*>0$ and $\epsilon>0$ be fixed and $\delta_1$ chosen so that $z_1(t^*) \leq \epsilon$. Let \begin{multline}k(\delta):= \exp\left(t^* \lambda\left(\lambda p+1\right)+3\delta\lambda pe^{\lambda t^*}+\frac{3}{2}p\delta^2 \lambda e^{2 \lambda t^*})\right)\\ \int_{0}^{t^*} \exp\left(-\frac{\lambda}{2}\left(3 qe^{2\lambda s} \delta^2 +6 qe^{\lambda s} \delta- 4 s + 2 \lambda qs\right)\right) ds \end{multline} Then it is easy to see that $\min_{0 \leq \delta \leq \delta_1} k(\delta) :=k^*> 0$. Then $z_1(t^*) \leq k^*\lambda^2q\delta^3 = O(\delta^3)$. \end{proof} \paragraph{Rank $1$ bottleneck for the flow} We now put the results of the previous two paragraphs together to show that when initialized near zero, the solutions of~\eqref{eq:mainsys} will be essentially of rank $1$ for some $t_1 \geq 0$. \begin{theorem}[Rank one bottleneck]\label{th:rk1bottle} Let $U(t,\delta)$ be the solution of~\eqref{eq:mainUsys} with initial state $U(0)=U_0\delta$. Then, generically for $U_0$, $A_i$ and $y_i>0$, $i=1,\ldots,q$, for all $0<\epsilon<1$, there exists $t^*>0, \delta >0$ and $ U_1 \in \mathbb{R}^{n \times n}$ of rank 1 so that $\frac{\|U(t^*,\delta)-U_1\|}{\|U_1\|} \leq \epsilon$. \end{theorem} \begin{proof} Let $A = \sum_{i=1}^qy_i A_i$, and $V(t)$ be the solution of $\dot V = AV, V(0)=U_0\delta$. Then, using Lemma~\ref{lem:solinapprox}, we can find $V_1(t,\delta)$, a rank one matrix-valued function and $t^*>0$ so that $$\frac{\|V_1(t,\delta) - V(t)\|}{\|V_1(t,\delta)\|} \leq \epsilon/2$$ for all $\delta>0$ and $t\geq t^*$. Using Lemma~\ref{lem:errorU}, we can find for $t^*>0$, a $\delta_1 >0$ so that ${\|U(t^*,\delta)-V(t^*,\delta)\|} \leq \epsilon/2$, for $0<\delta<\delta_1$. Furthermore, since $\|V_1(t^*,\delta)\|= \Theta(\delta)$ by Lemma~\ref{lem:solinapprox}, and $\|U(t^*,\delta)-V(t^*,\delta)\| = O(\delta^3)$ for $0<\delta<\delta_1$, by Lemma~\ref{lem:errorU}, we can find $\delta>0$ so that $ \frac{\|U(t^*,\delta)-V(t^*,\delta)\|}{\|V_1(t^*,\delta)\|} \leq \epsilon/2$. The result is now a consequence of the triangle inequality (with $U_1:=V_1(t^*,\delta)$). \end{proof} Setting $X(t)=UU^\top(t)$, we obtain as Corollary: \begin{corollary} Let $X(t)$ be the solution of~\eqref{eq:mainsys} with initial state $X(0)=X_0\delta$. Then for all $0<\epsilon<1$, there exists $t^*>0, \delta >0$ and $ X_1 \in \mathbb{R}^{n \times n}$, a symmetric positive semidefinite matrix of rank 1, so that $$\frac{\|X(t^*)-X_1\|}{\|X_1\|} \leq \epsilon.$$ \end{corollary} \begin{remark}\label{rem:defv1} From the proof of Lemma~\ref{lem:solinapprox}, and in particular from Eq.~\eqref{eq:defV1lem}, one can see that the range space of $V_1(t^*,\delta)$ is spanned the eigenvector corresponding to the largest eigenvalue of $A=\sum_{i=1}^qy_iA_i$. \end{remark} The following Corollary specializes the result to the case of $U_0$ of rank $1$. It will be needed below. \begin{corollary}\label{cor:rank1botrank1} Under the assumptions of Th.~\ref{th:rk1bottle} and generically for $A_i$, $y_i >0$, $1 \leq i \leq q$, and $U_0 \in \mathbb{R}^n$, for all $0<\epsilon<1$, there exists $t^*>0, \delta >0$ and $U_1 \in \mathbb{R}^{n}$ so that $\frac{\|U(t^*,\delta)-U_1\|}{\|U_1\|} \leq \epsilon$ and $U_1$ is an eigenvector of $\sum_{i=1}^q y_i A_i$ associated with the largest eigenvalue. \end{corollary} \section{Compatibility of primal and regularization problems}\label{sec:compatibl} In this second part of the analysis, we first describe conditions under which the implicit regularization for matrix factorization is exactly true. The first condition is called the rank-spread condition. Under this condition, we can exhibit a normal form for the system~\eqref{eq:mainUsys} which renders its subsequent analysis particularly transparent. As already mentioned, this condition is more restrictive than needed; we will comment on this aspect in Sec.~\ref{sec:conclusion}. We then introduce the tame spectrum assumption, which we believe is more fundamental to {\it exact} implicit regularization. Under these two assumptions, we show that the pre-critical set $\operatorname{Crit}^* { \mathbf R}$ is invariant for the dynamics~\eqref{eq:mainUsys}, and furthermore, $\operatorname{Crit}^* { \mathbf R}$ contains {\it all the minima} of $J(U)$. \subsection{Rank spreak condition and a normal form}\label{ssec:normalform} We denote by $r_i$ the rank of the psd matrix $A_i \in \mathbb{R}^{n \times n}$, $1 \leq i \leq q$. We assume that $\sum_{i=1}^q r_i \leq n.$ To each matrix $A_i$, we assign an index set $N_i \subseteq \{1,\ldots,n\}$, $| N_i| = r_i$ such that for $i \neq j$, $N_i \cap N_j = \emptyset$. We set $N:= \cup_{i=1}^q N_i$. We can in fact choose, without loss of generality, the following assignment: define the cumulative sums \begin{equation}\label{eq:defmi} m_i := \sum_{j=1}^i r_i, \quad m_0:=0\quad \mbox{and } m := \sum_{j=1}^q r_i, \end{equation} and let \begin{equation}\label{eq:defNi}N_i:= \{m_{i-1}+1,\ldots, m_i\} \mbox{ and } r_i = |N_i|.\end{equation} Because the matrices $A_i$ are positive semi-definite, there exists $B_i \in \mathbb{R}^{n \times r_i}$ so that \begin{equation} \label{eq:defBi} A_i = B_i B_i^\top.\end{equation} Note that the $B_i$'s are not unique, but each is determined up to an $O(r_i)$ symmetry. We have the following definition: \begin{definition}[Rank spread condition]\label{def:rankspread} We say that the matrices $A_i$, $i=1,\ldots, q$, satisfy the rank spread condition if $m := \sum_{i=1}^q r_i \leq n$ and $$\dim \operatorname{span}\{ B_i, i=1,\ldots,q\} =m,$$ where the $B_i$ are as in Eq.~\eqref{eq:defBi}. \end{definition} This condition is met generically in the under-determined regime. It is easy to see that the definition above is independent of the particular choice of $B_i$'s. The following result is key in establishing a normal form for the gradient flow~\eqref{eq:mainUsys}. Recall that $e_i$ is the vector in $\mathbb{R}^n$ with all entries equal to 0 except for the $i$th one, which is equal to 1. \begin{lemma}\label{lem:P} Let $A_i$ be positive semi-definite matrices of rank $r_i$ satisfying the rank spread condition, $i=1\ldots q$, and let $N_i \subseteq \{1,\ldots,n\}$ be given as in Eq.~\eqref{eq:defNi}. Denote by $$L_i:= \operatorname{span} \{e_j \mid j \in N_i\},$$ and let $L:= \oplus_{i=1}^q L_i$. Then there exist an invertible matrix $P \in \mathbb{R}^{n \times n}$ with the following properties, for $1 \leq i \leq q$: \begin{enumerate} \item $P^\top A_i P$ is the identity on $L_i$, and has $L_i^\perp$ as kernel. \item The matrices $M_i:= P^{-1} A_i P$ define injective maps $M_i:L_i \to L$ and, in particular, $M_i L_i^\perp = 0$. \item The matrix $P^\top P$ is block diagonal, with leading block of size $m$, and lower block equal to the $(n-m) \times (n-m)$ identity matrix. Furthermore, the leading block of $P^\top P$ is the inverse of the leading block of $\sum_{i=1}^qP^{-1}A_iP$. \end{enumerate} \end{lemma} \begin{proof} Because the $A_i$ are positive semidefinite of rank $r_i$, we can write $A_i = B_iB_i^\top$, for some $B_i \in \mathbb{R}^{n \times r_i}$. The rank spread condition guarantees that $m=\sum_{i=1}^q r_i \leq n$. Hence, we can define the matrix $B \in \mathbb{R}^{n \times m}$ with columns equal to the columns of the matrices $B_i$, with columns $m_0+1$ to $m_1$ taken from $B_1$, $m_1+1$ to $m_2$ taken from $B_2$, etc., where the $m_i$'s were defined in Eq.~\eqref{eq:defmi}. Set $B^\perp \in \mathbb{R}^{n \times (n-m)}$ to be a matrix with orthonormal columns spanning the orthogonal subspace of the column span of $B$: namely, $B^\perp$ satisfies $$ (B^\perp)^\top B^\perp = I\mbox{ and } B^\top B^\perp =0.$$ We now define \begin{equation}\label{eq:defP}P := \left[ B (B^\top B)^{-1}\quad B^\perp \right] \in \mathbb{R}^{n \times n}.\end{equation} By construction, $P$ is invertible and $P^\top$ maps each column vector of the matrices $B_i$ to (necessarily distinct) vectors of the canonical basis of $\mathbb{R}^n$. In particular, $$\operatorname{span}\{P^\top B_i\} = \operatorname{span} \{e_j \mid j \in N_i\}.$$ Writing $A_i$ as $B_i B_i^\top$ and using this fact, we obtain the first item. The second and third items follow directly from an evaluation of the matrix products. For the second item, it is helpful to first verify that $P^{-1}$ is equal to $$P^{-1} = \begin{bmatrix} B^\top \\ (B^\perp)^\top \end{bmatrix}.$$ \end{proof} In coordinates, the first item states that $P^\top A_i P$ is a diagonal matrix with all entries equal to 0, save for the diagonal entries indexed in $N_i$, which are equal to 1. Recalling the definition given in Eq.~\eqref{eq:def:Ei}, we have $$P^\top A_i P = E_i.$$ The second item states that $P^{-1}A_iP$ is a matrix whose last $n-m$ rows are equal to 0, and whose columns are all 0 save for the columns indexed in $N_i$. \paragraph{Normal form} Relying on Lemma~\ref{lem:P}, we now construct a normal form for the flow of Eq.~\eqref{eq:mainUsys}. We do so in the general case of $X$ of rank $k$, corresponding to $U \in \mathbb{R}^{n \times k}$, since we often will use the case $k=1$ below. Recall that $\rho_i(U)=\operatorname{tr}(A_iUU^\top)-y_i$ and the flow of interest is $$ \dot U =- \sum_{i=1}^q \rho_i A_iU.$$ We assume that the $A_i, i=1,\ldots, q$ satisfy the rank spread condition of Def.~\ref{def:rankspread}. Let $P \in \mathbb{R}^{n \times n}$ be as in Lemma~\ref{lem:P} and introduce $\bar U \in \mathbb{R}^{n \times k}$ satisfying $$P\bar U = U,$$ then the above equation becomes \begin{equation}\label{eq:dynbU} \dot {\bar U} = - \sum_{i=1}^q \rho_i(P \bar U) P^{-1}A_iP \bar U. \end{equation} From item (1) in Lemma~\ref{lem:P}, we have that $$\rho_i(P \bar U)=\operatorname{tr}(\bar U^\top P^\top A_i P \bar U)-y_i = \operatorname{tr}(\bar U^\top E_i \bar U)-y_i = \sum_{j \in N_i} \sum_{l=1}^k \bar u_{jl}^2,$$ hence $\rho_i(P \bar U)$ depends only on the {\it rows} of $\bar U$ indexed by $N_i$. From item (2) in Lemma~\ref{lem:P}, we have that $P^{-1}A_iP$ has kernel $L_i^\perp$. Putting the above two observations together, we have that $\rho_i(P\bar U) P^{-1}A_iP\bar U$ only depends on the entries $\bar u_{jl}$ of $\bar U$ with $j \in N_i$. Since $E_j$ maps into $L_j$ and $E_j^2=E_j$, we have the relation $$P^{-1}A_iP E_j = P^{-1}A_i P \delta_{ij},$$ where $\delta_{ij}$ is the Kronecker delta (i.e., $\delta_{ij}=1$ if and only if $i=p$, and is zero otherwise). We thus have the following relation: $$\sum_{i=1}^q \rho_i P^{-1}A_i P = \sum_{i=1}^q P^{-1}A_i P \sum_{j=1}^q \rho_j E_j.$$ Observe that $\sum_{j=1}^p \rho_j E_j$ maps $L \to L$ and can be expressed over this space as a diagonal matrix $D(\bar U)$ with $m$ non-zero entries, and with $\rho_i$ on the diagonal entries indexed by $N_i$. From item 3 in Lemma~\ref{lem:P}, we see that $\sum_{i=1}^p P^{-1}A_i P$ maps $L$ to itself, and $L^\perp$ to itself as well. Furthermore, when restricted to $L$, $\sum_{i=1}^p P^{-1}A_i P$ can be expressed as a matrix $Q \in S_m$ (in fact, a direct calculation using the explicit form for $P$ given in the proof of Lemma~\ref{lem:P} shows that $Q = B^\top B$.), and when restricted to $L^\perp$, it is the zero map. With the above observations in mind, set \begin{equation}\label{eq:defVnormal}x :=\begin{pmatrix} \bar u_{11} & \cdots& \bar u_{1k} \\ \vdots & & \vdots \\ \bar u_{m1} & \cdots & \bar u_{mk} \end{pmatrix}.\end{equation} The {normal form} comprises two sets of equations. The first is \begin{equation}\label{eq:nomsys} \frac{d}{dt} x = -QDx, \end{equation} where $Q=B^\top B$ as described above, and $$D:=D(x)=\sum_{i=1}^q (\operatorname{tr}(x^\top E_i x)-y_i)E_i$$ where, with a slight abuse of notation, we set $E_i = \sum_{j \in N_i} e_je_j^\top$ but with $e_j \in \mathbb{R}^m$ and $\rho_i(x)=\operatorname{tr}(x^\top E_i x)-y_i$. The second set of equations deals with the variables in the rows of $\bar U$ below the $m$th row (if there are any) and is given by \begin{equation}\label{eq:dynbarUzero}\frac{d}{dt} {\bar u}_{jl}=0\quad \mbox{ for } j \notin \cup_{i} N_i, l=1,\ldots,k .\end{equation} In summary, the {\bf normal form or normal system} is given by Eqns.~\eqref{eq:nomsys} and~\eqref{eq:dynbarUzero}; it is obtained by changing variables, and observing that in the new variables, the dynamics of a subset of the variables is given by Eq.~\eqref{eq:nomsys}, and the dynamics of the remaining variables is zero. \paragraph{The regularization problem in normal coordinates} We now write the optimization problem ${ \mathbf R}$ in the normal coordinates. We again working in the case of arbitrary rank $k$ (see~\eqref{eq:optimprobgenU}) \begin{equation}\label{eq:optbarU}: { \mathbf R}_k: \min_{ U \in \mathbb{R}^{n\times k}} \|U\|^2 \quad \mbox{ s.t. } \operatorname{tr} (A_i UU^\top) = y_i, \quad i=1,\ldots,q. \end{equation} Let $P$ be as in the statement of the Lemma~\ref{lem:P} and let $E_i = \sum_{j \in N_i} e_je_j^\top$ for the $N_i$ defined in~\eqref{eq:defNi}. \begin{proposition}\label{prop:optnormcoord} Consider the minimization problem over $\mathbb{R}^{m \times k}$ \begin{equation} \label{eq:optx} { \mathbf R}_k: \min_{x \in \mathbb{R}^{m\times k}} \operatorname{tr}(x^\top Q^{-1}x) \quad \mbox{s.t. } \operatorname{tr}(x^\top E_i x) =y_i, i=1,\ldots,q\end{equation} where $Q^{-1}$ is the leading $p \times p$ block of $P^\top P$, $P$ as is Lemma~\ref{lem:P}, and let $x^*$ be a minimizer. Then $ U^*:=\begin{pmatrix} (Px^*) ^\top & 0 \end{pmatrix}^\top \in \mathbb{R}^{n\times k}$ is a minimizer of the problem of Eq.~\eqref{eq:optbarU}. \end{proposition} We emphasize that the matrix $Q$ appearing in the above lemma is the one of the normal system of Eq.~\eqref{eq:nomsys}. With a slight abuse of notation, we refer to the problem above as ${ \mathbf R}$ as well, since it is related to the one of Eq.~\eqref{eq:optimprobgenU} by a change of variables. \begin{proof} Starting with the problem of Eq.~\eqref{eq:optimprobgenU}, and setting $P\bar U = U$, we get that it is equivalent to $$\min_{\bar U \in \mathbb{R}^{n\times k}} \operatorname{tr}(\bar U^\top P^\top P \bar U) \quad \mbox{s.t. } \operatorname{tr}(\bar U^\top P^\top A_i P \bar U) = y_i,\quad 1\leq i \leq q.$$ Using item~1 of Lemma~\ref{lem:P}, the constraints become $\operatorname{tr}(\bar U^\top E_i \bar U) = y_i.$ Observe that the variables $\bar u_{jl}$ are not constrained if $j > m$, where we recall that $m$ is defined in Eq.~\eqref{eq:defmi}. Furthermore, from item~3 of Lemma~\ref{lem:P}, $P^\top P$ is block diagonal with a leading block of size $m$, which we denoted by $Q^{-1}$, and a lower principal block equal to the identity matrix. Hence $$\operatorname{tr} (\bar U^\top P^\top P \bar U) = \operatorname{tr} \left( (\bar u)_{1..m,1..k} Q^{-1}(\bar u)_{1..m,1..k}^\top\right)+ \operatorname{tr} \left( (\bar u)_{m+1..k,1..k} (\bar u)_{m+1..k,1..k}^\top\right)$$ We conclude from the above equation that a constrained minimizer is so that $$\bar u_{jl} =0,\quad \mbox{ for } j=m+1,\ldots,n, l=1,\ldots,k$$ Letting $x \in \mathbb{R}^{m \times k}$ be $$x=(\bar u_{il})_{i=1,\ldots,m, l= 1,\ldots, k},$$ we recover the problem stated in Eq.~\eqref{eq:optx}. \end{proof} \paragraph{A Morse-Bott function and a metric} We now derive the {\it function} and the {\it inner product} for which the flow in normal variables is a gradient. We furthermore show that this function is a so-called {\it Morse-Bott function}, i.e., a $C^2$ function whose critical set is a closed manifold, and whose Hessian evaluated at any point of the critical set has a kernel equal to the tangent space to the critical set at this point. Unless explicitly mentioned, we ignore the variables $\bar u_{jl}$ with $j >m$ when we refer to the normal form. This can be done without loss of generality since the dynamics of these variables is trivial. Recall that the inner product induced by $Q$ is defined as $\langle x_1,x_2\rangle := x_1^\top Q x_2,$ for $x_1,x_2 \in \mathbb{R}^n$ and that the gradient of $J$ for this inner product is $$\operatorname{grad} J = Q^{-1} \frac{\partial J}{\partial x}.$$ \begin{theorem}\label{th:morsebott} Let the sets $N_i$, $i=1,\ldots,q$ be disjoint and so that $\cup_{i=1}^q N_i=\{1,\ldots,m\}$ and $k \in \{1,\ldots, n\}$. Consider the normal dynamics $$\dot x = -QD(x)x,$$ where $Q \in \mathbb{R}^{m \times m}$ is a positive definite matrix, $x \in \mathbb{R}^{m \times k}$ $D(x)=\sum_{i=1}^q\rho_i E_i$ with $y_i >0$, $\rho_i(x) = \operatorname{tr}( x^\top E_ix)-y_i$, and $E_i = \sum_{j \in N_i} e_j e_j^\top$. Define the function $$J_k(x) = \frac{1}{4}\sum_{i=1}^q (\operatorname{tr}(x^\top E_i x)-y_i)^2.$$ Then \begin{enumerate} \item the normal dynamics is the gradient flow of $J_k$ for the inner product induced by $Q^{-1}$. \item The function $J_k$ is a Morse-Bott function. \item\label{it:propminrho} The set of local minima of $J_k$ is given by $x \in \mathbb{R}^{m\times k}$ such that $\rho_i(x)=0$, $i=1,\ldots, q$. \end{enumerate} \end{theorem} We denoted the set of local minima of $J_k$ by $\operatorname{Crit}_0 J_k$. The above Proposition thus says that \begin{equation}\label{eq:defCS1} \operatorname{Crit}_0 J_k:= \{x \in \mathbb{R}^{m \times k} \mid \rho_i(x) = 0, i=1\ldots, q \}. \end{equation} \begin{proof} With this notation, it is easy to verify that for $l=1,\ldots,k$, \begin{equation}\label{eq:zergrad}\frac{\partial J_k}{\partial x_{jl}} = \rho_i x_{jl}\quad \mbox{ if } j \in N_i,\end{equation} from which we obtain that $\frac{\partial J_k}{\partial x} = \sum_{i=1}^q \rho_i E_ix = D(x)x$. This proves the first statement. Since $Q$ is non-degenerate, we obtain that $\operatorname{grad} J_k=0$ if and only if \begin{equation}\label{eq:defzeroJ} \rho_i(x) x_{jl} =0\quad \mbox{ for all } l=1,\ldots,k, j\in N_i, i=1\ldots, q.\end{equation} In order to verify that $J_k$ is a Morse-Bott function, we need to verify that its zero set is a closed submanifold of $\mathbb{R}^{n\times n}$, that the Hessian of $J_k$ is non-degenerate at isolated critical points, and that the kernel of the Hessian spans the tangent space at the critical submanifolds. From Eq.~\eqref{eq:defzeroJ}, we have that the critical set of $J_k$ is given by the intersection of $q$ subsets given by either $\rho_i(x)=0$, or $x_{jl}=0, j \in N_i, l=1,\ldots,k$, for $i=1,\ldots,q$. We see that the zero-set of $\rho_i(x)=\sum_{j \in N_i}\sum_{l=1}^k x_{jl}^2 -y_i$ is a {\it closed} subset of $\mathbb{R}^{m \times nk}$---in fact a sphere of radius $\sqrt{y_i}$ contained in $\mathbb{R}^{r_i \times k}$, where we recall that $|N_i|= r_i$---and so is the linear subspace defined by $x_{jl}=0, j \in N_i, l=1,\ldots,k$. We conclude that $\operatorname{Crit} J_k$ is the intersection of closed sets and thus is closed. To evaluate the Jacobian of $\frac{\partial J_k}{\partial x_{jl}}$, it is easier to first write this matrix as a vector. We do so in a {\it row first} fashion. Hence we now represent $x$ as a column vector $X \in \mathbb{R}^{mk}$ with entries $$X=(x_{11}, x_{12}, x_{1k},x_{21},\ldots,x_{mk})^\top.$$ A short calculation shows that with this notation, we have \begin{equation}\label{eq:gradJX}\frac{\partial J_k}{\partial X} = (D \otimes I_n) X=:D_1X,\end{equation} where $\otimes$ is the Kronecker product. Now recall the definition of the sets $N_i$, we denote by $M_i$ their counterparts after vectorization; more precisely, $M_i$ contains the indices of the the $X_j$ who were in a row with index in $N_i$: $$j \in M_i \Leftrightarrow X_j = x_{i'l}\quad \mbox{ for some } i' \in N_i, l=1,\ldots,k.$$ The set $M_i$ has cardinality $k r_i$. As before, we let $E_i \in \mathbb{R}^{mk \times mk}$ be the diagonal matrix with zero entries except for the ones indexed by $M_i$, which are one, and we set $\bar X_i = E_i X$. The matrix $D_1$ is a diagonal matrix, with entries $(D_1)_{jj} = \rho_i $ if $j \in M_i$, or said otherwise, $$D_1 = \sum_{i=1}^q \rho_i E_i.$$ From Eq.~\eqref{eq:gradJX}, the critical set of $J_k$ is easily seen to be defined by the intersection of the zero sets $\rho_i(X) X_j =0$, $j \in M_i$. Differentiating $\rho_i(X)$, we obtain $\frac{\partial \rho_i}{\partial X} = \sum_{j \in M_i}2X_j e_j$. Hence, a short calculation shows that \begin{multline}\frac{\partial^2 J}{\partial X^2} = \sum_{i=1}^q\left[ \rho_i E_i + \sum_{j \in M_i} 2X_j e_j (E_iX)^\top \right]=\sum_{i=1}^q\left[ \rho_i E_i + \sum_{j,l \in M_i} 2X_jX_l e_je_l\right] \\ =\sum_{i=1}^q \left[\rho_i E_i + 2 \bar X_i \bar X_i^\top \right] \end{multline} where we used the facts that $E_i = \sum_{l \in M_i} e_le_l^\top$ and $e_l^\top X = X_l$. The previous relation shows that the matrix of second derivatives is block diagonal, with blocks of size $|M_i|$, and that, additionally, block $i$ only depends on $X_j$ with $j \in M_i$. Therefore, it is sufficient to verify that the non-degeneracy condition holds for each block of $\frac{\partial ^2J}{\partial X^2}$\footnote{Alternatively, one could immediately argue that is is sufficient to verify that each term of $J$ is Morse-Bott, since the terms do not share variables.}. Let $X$ be a zero of $\operatorname{grad} J$, and first assume that $\rho_i(X)=0$. The corresponding zero-set is then a sphere of radius $\sqrt{y_i}$ in $\mathbb{R}^{|M_i|}$) and the $i$th block of $\frac{\partial J_k^2}{\partial X^2}$ is $\bar X_i \bar X_i^\top$. When evaluated on the set $\rho_i(X)=\rho_i(\bar X_i)=0$, the vector $\bar X_i$ is clearly non-zero, and is {\it normal} to the set $\rho_i(X)=0$. Hence the kernel of $\bar X_i \bar X_i^\top$ is exactly the tangent space of $\rho_i(\bar X_i)=0$. Now assume that $X_j =0$ for all $j \in M_i$. Then the zero-set is $0$ dimensional in $\mathbb{R}^{|M_i|}$. The $i$th block of $\frac{\partial^2 J_k}{\partial X^2}$ is $-y_iE_i$, which has no kernel in $\mathbb{R}^{|M_i|}$ as required. This shows that $J_k$ is a Morse-Bott function. To prove the last part, it suffices to observe that at any critical point $X \in \mathbb{R}^{mk}$ such that $\rho_i(X)=0$, the corresponding block of the Hessian is $\bar X_i\bar X_i^\top$, which is positive semi-definite. Hence the Hessian at the points belonging to the intersection of the sets defined by $\rho_i(X)=0$, $i=1,\ldots,q$ is positive semi-definite, and thus these points are minima. Reciprocally, for critical points such that $\bar X_i = 0$ for any $i$, the corresponding block of the Hessian is $ -y_i E_i$, which is negative definite. Such points cannot be minimizers. \end{proof} The critical set of $J_k$ can be visualized geometrically with ease. Consider the vectorized coordinates described in the proof of Theorem~\ref{th:morsebott}. We can write $\mathbb{R}^{mk}$ as the product $\mathbb{R}^{r_1k} \times \mathbb{R}^{r_2k} \times \cdots \times \mathbb{R}^{r_qk}.$ For each $i=1,\ldots,q$, choose either $\rho_i(\bar X_i)=0$, which is a sphere of radius $\sqrt{y_i}$ in $\mathbb{R}^{r_ik}$, or $\bar X_i=0$, which is the origin of $\mathbb{R}^{rn_i}$. The cross product of these $q$ elements is a component of the critical set. Alternatively, we can consider $\rho_i(X)=0$ to be a subset of $\mathbb{R}^{mk}$ (i.e., a sphere cross-product the plane spanned by $e_j, j \notin M_i$), and similarly for $\bar X_i=0$ (i.e., the plane spanned by $e_j, j \notin M_i$). A component of the critical set is then the intersection of these sets in $\mathbb{R}^{mk}$. The two points of view are equivalent. For example, take $m=3, k=1$ and $N_1=\{1,2\}$, $N_2=\{3\}$, and put coordinates $(x,y,z)\in \mathbb{R}^3$ on the state-space. The component of the critical set given by $\rho_1=0$, $\rho_2=0$ is then the union of two disjoint circles of radius $\sqrt{y_1}$, centered around the $z$ axis, and in the planes $z=\pm \sqrt{y_2}$. The component of the critical set given by $\rho_1=0$ and $\bar X_3 = 0$ is a circle of radius $\sqrt{y_1}$ centered at the origin and in the plane $z=0$. Similarly, if $m=4,k=1$ and $N_1=\{1,2\}$, $N_2=\{3,4\}$, the zero set determined by $\rho_i=0$, $i=1,2$ is a torus (the product of two circles) in $\mathbb{R}^4$. The previous Theorem shows the following important fact: the set of local minima of $J_k$ is exactly the feasible set of ${ \mathbf R}$. Recalling that a gradient flow converges generically for the initial condition to a local minimum, we have as a Corollary that the flow of the primal problem will converge generically to a feasible point of ${ \mathbf R}$: \begin{corollary} \label{cor:convnormaldyn} Consider the normal system of Eq.~\eqref{eq:nomsys} $$\dot x =- QDx,$$ with $x \in \mathbb{R}^{m \times k}$. Then $\operatorname{Feas}({ \mathbf R}_k) = \operatorname{Crit}_0(J_k)$ and, in particular, generically for $x(0)$, the solution converges to $x^* \in \operatorname{Feas}({ \mathbf R}_k)$. \end{corollary} \subsection{The case of commuting generalized projection matrices.} As a direct consequence of the construction of the normal form, we can show that various forms of implicit regularization take place in the particular case of commuting {\it generalized} projection matrices (defined below). This extends on the result of~\cite{implicitregmatr2017} insofar as we do not require the initial condition of the flow to be a multiple of the identity. Recall that a symmetric matrix $A$ is a projection matrix if $A^2=A$. This implies, in particular, that the spectrum of $A$ only contains $0$ and $1$. We say that $A$ is a {\bf generalized projection matrix} if $A^2 = \gamma A$ for some positive number $\gamma$. In particular, note that all rank $1$ psd matrices are generalized projection matrices. \begin{proposition}[Commuting generalized projection matrices]\label{prop:commproj} Assume that $A_i$, $i=1,\ldots,q$ are generalized projection matrices satisfying the rank spread condition, and that they pairwise commute. Then, generically for $X_0$, for all $\varepsilon >0$, there exists $\delta >0$ so that $\varphi_\infty(X_0\delta)$ is $\epsilon$-close to a minimizer of~\eqref{eq:optimprobgen}. \end{proposition} The above proposition says that the regularization problem ${ \mathbf R}$ of Eq.~\eqref{eq:defoS} approximately regularizes the main system~\eqref{eq:mainsys}. It holds true for the rank $k$ of $X$ between $1$ and $n$. \begin{proof}We work in normal coordinates. Starting from the primal problem in $U$ variables~\eqref{eq:mainUsys}, we introduce $P \bar U = U$, with $P$ as in Lemma~\ref{lem:P} and the normal variables $x \in \mathbb{R}^{m \times k}$ (see Eq.~\eqref{eq:defVnormal}), and $\bar u_{jl}$, $j >m$. Now write $A_i=B_iB_i^\top$, $i=1,\ldots, q$ for some $B_i\in \mathbb{R}^{n \times r_i}$. Without loss of generality, we can assume that the $B_i$ have orthogonal columns and, as a consequence of the generalized projection assumption, these columns have necessarily the same norm. The fact that the $A_i$'s pairwise commute tells us that $B_iB_i^\top B_jB_j^\top =B_jB_j^\top B_iB_i^\top$, and the fact that they satisfy the rank spread condition tells us that $\operatorname{span}\{B_i\} \cap \operatorname{span}\{B_j\} = \{0\}$. From the above two facts, we obtain that $B_i^\top B_j =0$ and thus conclude that $B_i$ and $B_j$ have orthogonal columns. Therefore, the corresponding matrix $Q$ is diagonal, with the diagonal entries $q_{jj}=q_{j'j'}$ equal for $j,j' \in N_i$, and $Q^{-1}$ has the same form. From Proposition~\ref{prop:optnormcoord}, we know that the minimizers in normal coordinates are so that $\bar u_{jl}=0$ for $j > m$ and $l=1,\ldots, k$, and $x$ is a minimizer of $\operatorname{tr}(x^\top Q^{-1}x)$. From the form $Q^{-1}$ described above, we have \begin{equation}\label{eq:propinter1}\operatorname{tr}(x^\top Q^{-1}x) = \sum_{i=1}^q q_{ii}^{-1} \sum_{j\in N_i,l=1,\ldots,k} x_{jl}^2.\end{equation} Recall that the constraints of the regularization problem ${ \mathbf R}$ are $\sum_{j \in N_i} \sum_{l=1}^k x_{jl}^2 = y_i$. Hence, for {\it any} matrix $x$ satisfying the constraints, the cost is $\operatorname{tr}(x^\top Q^{-1}x)=\sum_{i=1}^q q_{ii}^{-1} y_i$. Thus the minima of ${ \mathbf R}$ are so that $x$ is feasible for ${ \mathbf R}$, and $\tilde u_{jl}=0$, $j>m, l=1,\ldots,k$. We now show that the primal problem converges to a point arbitrarily close to global minimum of ${ \mathbf R}$. We have that $x$ obeys the equation of the normal system~\eqref{eq:nomsys} \begin{equation}\label{eq:dynVrecall}\dot x = -QD(x)x\end{equation} with $ D(x)=\sum_{i=1}^m (\operatorname{tr}(x^\top E_i x)-y_i)E_i=\sum_{i=1}^m \rho_i E_i$ and from Eq.~\eqref{eq:dynbarUzero} $$\tilde u_{jl}(t)=\bar u_{jl}(0),\quad \mbox{ for } m <j \leq n.$$ From Corollary~\ref{cor:convnormaldyn}, we know that the system~\eqref{eq:dynVrecall} converges generically to $x^* \in \mathbb{R}^{m \times k}$ so that $\operatorname{tr}\left((x^*)^\top E_i x^*\right) =\sum_{j \in N_i} \sum_{l=1}^n x_{jl}^2 = y_i, \quad i=1,\ldots, q,$ i.e., $x^*$ is feasible for ${ \mathbf R}$. Choosing $\delta$ small enough, $u_{jl}$, $j>m$ is as small as needed. \end{proof} The following corollary can be extracted from the proof of Prop.~\ref{prop:commproj}: for $m=n$, the convergence is global, and not only for small initial conditions: \begin{corollary}[Commuting generalized projection matrices]\label{cor:commproj} Assume that $A_i$, $i=1,\ldots,q$ are generalized projection matrices of respective ranks $r_i$, satisfying the rank spread condition, that they pairwise commute and that $m = \sum_{i=1}^q r_i=n$ Then, generically for $X_0$, $\varphi_\infty(X_0\delta)$ is $\epsilon$-close to a minimizer of~\eqref{eq:optimprobgen}. \end{corollary} \subsection{Tame spectrum assumption and compatibility of primal and regularization problems } We now present what we believe is the main mechanism at the heart of implicit regularization for matrix factorization. In the previous case, namely the case of commuting projection matrices $A_i$, once the flow converged to the constraint set $\operatorname{Feas}({ \mathbf R})$---and we showed this happened generically for the initial condition since the flow was gradient and its set of minima was equal to the feasible set of the regularization problem---the fact that $\delta$ was small guaranteed that the system converged to {\it near} a minimizer of ${ \mathbf R}$. Said otherwise, in normal coordinates, the role of the small initial condition was particularly transparent and, in particular, results of Sec.~\ref{sec:bottleneck} were not needed. Of course, this mechanism by itself does not explain the implicit regularization phenomenon. We exhibit in this section a different, and more complex, dynamical process taking place following the discussion of Section~\ref{sec:impltheory}. To this end, we will introduce the so-called {\it tame spectrum} assumption. Essentially, this assumption identifies a set $M$ for which primal and regularization are compatible. Throughout this subsection, we assume that $X$ is {\it of rank 1}, or equivalently that $k=1$ and $U \in \mathbb{R}^n$. We now introduce the tame spectrum assumption. \paragraph{The tame spectrum assumption} We start with the following simple lemma: \begin{lemma}\label{lem:defleade} Let $A_i$, $i=1,\ldots, q$ be psd matrices satisfying the rank spread condition and so that $\sum_{i=1}^q A_i$ has spectrum $\{\alpha',\beta',\ldots,\beta', 0, \ldots, 0\}$. Then the matrix $Q$ of the normal system~\eqref{eq:nomsys} has spectrum $\{\alpha',\beta',\ldots,\beta'\}$. \end{lemma} \begin{proof} Let $B_i \in \mathbb{R}^{n \times r_i}$ be such that $A_i=B_iB_i^\top$. Let $B \in \mathbb{R}^{n \times m}$, $m = \sum_{i=1}^q r_i$, be the matrix whose columns are the columns of the $B_i$. On the one hand, from the proof of Lemma~\ref{lem:P}, we know that $Q=B^\top B$ and from the rank spread condition, $Q$ is of full rank. On the other hand, $\sum_{i=1}^q A_i = BB^\top$, from which the result follows. \end{proof} It is easy to see that when $Q\in \mathbb{R}^{m \times m}$ is symmetric positive definite and has a spectrum as $\{ \alpha', \beta', \ldots, \beta'\}$, then there exists a vector $v \in \mathbb{R}^m$ and constants $\alpha> \beta >0$ so that $Q$ can be expressed as \begin{equation}\label{eq:defQleading}Q:= \alpha vv^\top + \beta I.\end{equation} We call $v$ the {\bf leading eigenvector} of $Q$. Note that in Lemma~\ref{lem:defleade}, we can replace the assumption that the $A_i$ satisfy the rank spread condition with the requirement that $\sum_{i=1}^q A_i$ has rank $m$, where we recall that $m =\sum_{i=1}^q r_i$ and $r_i = \operatorname{rank} A_i$. The parameter $\alpha$ is the {\it spectral gap} of $Q$. \begin{definition}[Tame spectrum assumption]\label{def:LE} We say that the positive semidefinite matrices $A_i$, $i=1,\ldots,q$ satisfy the tame spectrum assumption if $\sum_{i=1}^q A_i$ is a psd matrix of rank $m$ with spectrum $\{\alpha',\beta',\cdots,\beta',0,\cdots 0,\}$, with $\alpha' , \beta' > 0$, and the corresponding leading eigenvector of $Q$ is so that $\|\bar v_i\|^2 := v^\top E_i v \neq 0$, $i=1,\ldots,q$. \end{definition} The condition that $\|\bar v_i\| \neq 0$ is generic for the $A_i$. The role of this assumption is to weed out particular cases, requiring lengthy computations, in the proofs below. Recall the definition of the vector space $\mathcal{D}_N$ in Sec.~\ref{ssec:notation}. The elements of $\mathcal{D}_N$ can be written as $\sum_{i=1}^q \nu_i E_i$, with $\nu_i \in \mathbb{R}$ and $E_i$ as in Eq.~\eqref{eq:def:Ei}. The following vector subspace of $\mathbb{R}^m$ will play an important role: given a non-zero vector $v \in \mathbb{R}^m$, we define \begin{equation}\label{eq:defLv}\Lambda_v := \left\{ x \in \mathbb{R}^m \mid x= \Lambda v \mbox{ for some } \Lambda \in \mathcal{D}_N \right\}. \end{equation} \paragraph{Compatibility of primal and regularization problems} We now show that under the tame spectrum assumption, the primal and regularization problems are compatible. We do so in three steps: \begin{lemma}\label{lem:invdyn1} Assume that the $A_i$, $i=1,\ldots,q$, satisfy the tame spectrum assumption, with leading eigenvector $v \in \mathbb{R}^m$. The normal dynamics of Eq.~\eqref{eq:nomsys}, with $x\in \mathbb{R}^m$, leaves $\Lambda_v$ invariant, where $v$ is the leading eigenvector of $Q$. \end{lemma} \begin{proof} Let $x \in \Lambda_v$ and $\Lambda \in \mathcal{D}_N$ so that $x = \Lambda v$. Since $\Lambda_v$ is a vector space, $T_x\Lambda_v = \Lambda_v$ for all $x \in \Lambda_v$. The dynamics of Eq.~\eqref{eq:nomsys} is the sum of two terms, $\alpha vv^\top D(x)x$ and $\beta D(x)x$. The first term is clearly in $T_x\Lambda_v$. Since $D(x)\in \mathcal{D}_N$, so is $D(x)\Lambda$ and we conclude that the second term is in $T_x\Lambda_v$ as well, which proves the result. \end{proof} The next result show that the set of minima of $J_1(x)$---we denoted that set by $\operatorname{Crit}_0 J_1(x)$---and $\Lambda_v$ intersect transversally and that moreover the intersection is a finite set of points. This result will be key to study the dynamics of the primal problem in $\Lambda_v$. \begin{lemma}\label{lem:cor:transv}Assume that the tame spectrum assumption with leading eigenvector $v$ holds. Then $\Lambda_v$ intersects the set $\operatorname{Crit}_0 J_1$ transversally, and this intersection is a finite set of points of cardinality $2^q$. \end{lemma} \begin{proof} Let $x = \Lambda v \in \Lambda_v$. Then since $\Lambda = \sum_{i=1}^q \lambda_i E_i$ for some $\lambda_i \in \mathbb{R}$, and since $\rho_i(x)=\rho_i(E_i x)$ by definition of $\rho_i$, we have that points in the intersection $x\in \Lambda_v \cap\operatorname{Crit}_0 J_1(x)$ are solutions of $\rho_i(\bar x_i)=\rho(\lambda_i \bar v_i)=0$ or, equivalently, $$\lambda_i^2 \|\bar v_i\|^2 = y_i, \quad i=1,\ldots, q.$$ Hence, there are $2^q$ points of intersection, characterized by $\lambda_i = \pm \sqrt{y_i}/\|v_i\|$, and these points are pairwise distinct. To see that the intersection is transversal, recall that $\operatorname{Crit}_0 J_1$ is a product of $q$ spheres $S^{|N_i|-1}\subset \mathbb{R}^{|N_i|}$, each of codimension one in $\mathbb{R}^{|N_i|}$. Similarly, $\Lambda_v$ is the product of $q$ lines $\lambda_i \bar v_i \subset \mathbb{R}^{|N_i|}$. A line through the origin in Euclidean space always intersects a sphere centered at the origin transversally, which proves the claim. \end{proof} The importance of $\Lambda_v$ stems from the following observation. Consider the optimization problem in normal coordinates, described in Eq.~\eqref{eq:optx}. Its pre-critical set is given by \begin{equation}\label{eq:ELoptx}\operatorname{Crit}^* { \mathbf R}_1 = \{ x \in \mathbb{R}^m \mid x = Q\Lambda x,\quad \mbox{ for some } \Lambda \in \mathcal{D}_N\}\end{equation} Given a vector $v \in \mathbb{R}^m$, we denote by $v^\perp$ its orthogonal subspace in $\mathbb{R}^m$. Namely, $$v^\perp = \{ x \in \mathbb{R}^m \mid v^\top x =0\}.$$ We can express $\operatorname{Crit}^* { \mathbf R}_1$ explicitly as follows: \begin{lemma}\label{lem:crits1} Assume that the tame spectrum assumption holds with leading eigenvector $v \in \mathbb{R}^m$. Then $$\operatorname{Crit}^* { \mathbf R}_1 = \Lambda_v \cup v^\perp.$$ \end{lemma} Note that $\Lambda_v$ and $v^\perp$ intersect generically at more than $\{0\}$, since $v^\perp$ is of dimension $m-1$. \begin{proof} Let $ x \in \operatorname{Crit}^* { \mathbf R}_1$. Then $x$ satisfies $$(I -\beta \Lambda) x =\alpha vv^\top \Lambda x$$ for some $\Lambda \in \mathcal{D}_N$. Assume first that $(x, \Lambda)$ is such that $v^\top \Lambda x =a \neq 0$, i.e. $\Lambda x \notin v^\perp$. Then $x$ satisfies $$(I-\beta \Lambda)x = a v.$$ Since $\bar v_i \neq 0$ by the tame spectrum assumption, and since $I-\beta \Lambda \in \mathcal{D}_N$, we conclude that $I-\beta \Lambda$ is invertible, with an inverse in $\mathcal{D}_N$, and $x \in \Lambda_v$. Now assume that $(x,\Lambda)$ is such that $\Lambda x \in v^\perp$. Then $a=0$ and $x$ satisfies $x = \beta \Lambda x$. Plugging this relation in $v^\top \Lambda x=0$, we obtain that $v^\top x =0$ and thus $x \in v^\perp$, which concludes the proof. \end{proof} The following lemma says that the minimal values of ${ \mathbf R}_1$ are obtained for $x \in \Lambda_v$, thus it will be sufficient to consider the component $\Lambda_v$ of $\operatorname{Crit}^* { \mathbf R}_1$. \begin{lemma}\label{lem:Lvincl}Assume that the tame spectrum assumption holds with leading eigenvector $v\in\mathbb{R}^m$. Consider the cost function $K$ of optimization problem ${ \mathbf R}_1$ and set $a_1:=\min K \mbox{ s.t. } x\in v^\perp \cap \operatorname{Feas}({ \mathbf R}_1)$ and $a_2= \min K \mbox{ s.t. } \Lambda_v \cap \operatorname{Feas}({ \mathbf R}_1)$. Then $a_1 \geq a_2$. \end{lemma} If either intersection in the Lemma statement is empty, the corresponding $a_i$ is set to $+\infty$. \begin{proof} Under the assumptions of the Lemma, we have that $Q=\alpha vv^\top +\beta I$. Using this expression for $Q$ in Eq.~\eqref{eq:ELoptx}, we obtain that ${ \mathbf R}_1$ is \begin{equation} \min_{x \in \mathbb{R}^m} K(x):=x^\top (-\alpha' vv^\top + \beta I) x \quad \mbox{ s.t. } x^\top E_i x = y_i, i = 1,\ldots, q\end{equation} where $\alpha', \beta >0$. If $x \in v^\perp \cap \operatorname{Feas}({ \mathbf R}_1)$, then the cost reduces to $K(x)=\beta \|x\|^2 = \beta \sum_{i=1}^q \sqrt{y_i}$, for all $x \in v^\perp$ satisfying the constraints. Hence $a_1=\beta \sum_{i=1}^q \sqrt{y_i}$. Note that $\beta \sum_{i=1}^q \sqrt{y_i}$ is in fact an upper bound for $K(x), x \in \operatorname{Feas}({ \mathbf R}_1)$, since the term $x^\top vv^\top x$ is a square. From Lemma~\ref{lem:cor:transv}, we know that $\operatorname{Crit}_0 J_1$ intersects $\Lambda_v$, and from Corollary~\ref{cor:convnormaldyn}, we know that $\operatorname{Crit}_0 J_1 = \operatorname{Feas} ({ \mathbf R}_1)$. Hence $\Lambda_v \cap \operatorname{Feas}({ \mathbf R}_1)$ is non-empty. The value of the cost at these points is upper bounded by $\beta\sum_{i=1}^q \sqrt{y_i}$, which is the value of the cost of $v^\perp$, which proves the claim. \end{proof} We set, in view of the above Proposition, $$\operatorname{Crit}_0^* { \mathbf R}_1 = \Lambda_v.$$ As a consequence of Lemmas~\ref{lem:invdyn1},~\ref{lem:cor:transv},~\ref{lem:crits1} and~\ref{lem:Lvincl}, we have shown the following: \begin{theorem}\label{th:compat} Under the tame spectrum assumption, the primal problem described by $J_1$, and the regularization problem ${ \mathbf R}_1$ are compatible in the sense of Def.~\ref{def:compat}, with $\operatorname{Crit}_0^* { \mathbf R}_1 = \Lambda_v$. \end{theorem} \paragraph{Convergence to critical points of the regularization problem} Having established that the primal and regularization problems are compatible, we now show that when initialized in $\Lambda_v$, the flow converges generically to a critical point of the regularization problem---recall that by critical point of the regularization problem, we mean a point $x \in \operatorname{Crit}^* { \mathbf R}$ that meets the constraints $\rho_i(x)=0$. We already know that all minima of the regularization problem are in $\Lambda_v$ (Lemma~\ref{lem:Lvincl}), that $\Lambda_v$ intersects $\operatorname{Crit}_0 J_1$ transversally, and that $\operatorname{Feas}({ \mathbf R}_1) = \operatorname{Crit}_0 J_1$ (Theorem~\ref{th:morsebott}). This is not sufficient to show convergence to $\operatorname{Feas}({ \mathbf R}_1)$ when in $\Lambda_v$ however, as the dynamics in $\Lambda_v$ can have sinks that are saddles point for the general primal dynamics. We thus show now that all the sinks of the flow restricted to $\Lambda_v$ are also in $\operatorname{Crit}_0 J_1$; said otherwise, no locally stable critical point of the flow restricted to the invariant subspace $\Lambda_v$ is a saddle or regular point for the dynamics in $\mathbb{R}^m$. \begin{theorem}\label{th:rank1} Assume that the tame spectrum assumption holds with leading eigenvector $v$. Then the dynamics of the the normal system~\eqref{eq:nomsys}, with $x \in \mathbb{R}^m$, is such that generically for $x_0 \in \Lambda_v$, $x(t)$ converges to a critical point of the regularization problem~\eqref{eq:optx}. In particular, all the sinks for the normal dynamics restricted to the invariant subspace $\Lambda_v$ are sinks for the normal dynamics in $\mathbb{R}^m$. \end{theorem} \begin{proof} Because $J_1$ is a Morse-Bott function by Theorem~\ref{th:morsebott}, and the intersection of its critical set with $\Lambda_v$ is transversal and of dimension $0$, the restriction of $J_1:\Lambda _v \to \mathbb{R}$ is a Morse function. Hence starting from $x_0$, the flow converges to a critical point of $J_1$ and, generically, to a minimum of $J_1$. Furthermore $x \in \Lambda_v \cap \operatorname{Crit} J_1$ is a sink for the dynamics in $\Lambda_v$ only if (1) $x$ is a local minimum of $J_n(x)$ or (2) a saddle point of $J_1(x)$ {\it and} the Hessian of $J_1(x)$ is positive definite on $\Lambda_v$. We thus need to show that there are no local sink of type (2) to prove the proposition. To this end, recall from the proof of Theorem~\ref{th:morsebott} that the critical points of the gradient of $J_1(x)$ are characterized by $\rho_i(\bar x_i) \bar x_i=0$, for some $1 \leq i \leq q$, and that the Hessian of $J_1(x)$ is block diagonal. To fix ideas, consider a saddle point so that $\bar x_1 = 0$. The leading $r_1 \times r_1$ block of the Hessian at such point is $-y_i E_i$. The line $$\lambda_1 \begin{pmatrix} \bar v_1 \\ 0\\ \vdots \\mathbf{0} \end{pmatrix},$$ with $\lambda_1 \in \mathbb{R}$ is clearly included in $\Lambda_v$, and the Hessian of $J_1(x)$ at this saddle point, restricted to this line, is negative definite. Hence saddles so that $\bar x_1=0$ are not local sinks in the dynamics restricted to $\Lambda_v$, but saddle points as well. The same reasoning applies to any $i=1,\ldots,q$, which concludes the proof. \end{proof} \paragraph{Convergence to $\operatorname{Crit}^*_0{ \mathbf R}$} We now show that when initialized near $0$, the primal flow goes arbitrarily close to the invariant space $\Lambda_v$, which we know contain all minimizers of the regularization problem. \begin{proposition}\label{prop:winLv} Assume that the tame spectrum assumption holds, with leading eigenvector $v \in \mathbb{R}^m$. Let $W \in \mathbb{R}^n$ be an eigenvector of $\sum_{i=1}^q y_i A_i$ associated to the largest eigenvalue, and let $w:= (P^{-1}W)_{1,\ldots,m}$, where $P$ is the matrix of Lemma~\ref{lem:P}. Then, generically for $y_i>0$, $i=1,\ldots,q$, we have $w \in \Lambda_v$. \end{proposition} Recall that from Corollary~\ref{cor:rank1botrank1}, we know that when initialized near zero, the primal flow goes arbitrarily close to such a $W$. The above Proposition thus says that {\it the flow in normal coordinates goes arbitrarily close to a vector $w \in \Lambda_v$.} \begin{proof} From Lemma~\ref{lem:P}, $\sum_{i=1}^q y_i P^{-1}A_iP \in \mathbb{R}^{n \times n}$ is a block diagonal matrix with leading block $Q(\sum_{i=1}^q y_i E_i) \in \mathbb{R}^{m \times m}$, and other entries zero. Since $W$ is an eigenvector of $\sum_{i=1}^q y_i A_i$ associated to the largest eigenvalue, $w$ is an eigenvector associated to the largest eigenvalue of $Q(\sum_{i=1}^q y_i E_i) \in \mathbb{R}^{m \times m}$. Explicitly, $$(\alpha vv^\top + \beta I)(\sum_{i=1}^q y_i E_i) w = \mu w,$$ for some $\mu >0$. Set $ a_1:=\sum_{i=1}^q y_i v^\top E_i w$ and $\alpha_1:= \alpha a_1$; we get \begin{equation}\label{eqq:condlambdawv}\alpha_1 v = (\mu I- \beta \sum_{i=1}^q y_i E_i) w.\end{equation} We now show that $ w \in \Lambda_v$. The proof is similar to parts of the proof of Lemma~\ref{lem:Lvincl}. By construction, $(\mu I- \beta \sum_{i=1}^q y_i E_i) \in \mathcal{D}_N$. If $\alpha_1 \neq 0$, recalling that $\bar v_i \neq 0$ by assumption, we see that $(\mu I- \beta \sum_{i=1}^q y_i E_i)$ is invertible and the claim is proven. If $\alpha_1=0$, the previous relation implies that $y_i E_i = \beta/\mu I$ or $\bar w_i =0$, for $i=1,\ldots,q$. If all $\bar w_i$ vanish, then $w=0$, which is a contradiction. Thus, assume that $\bar w_i \neq 0$ for some $1 \leq i \leq q$, then $y_i = \beta/\mu$, which is not generic for $y$. Hence $\mu I-\beta(\sum y_i E_i) $ is generically, for $y_i >0$, invertible, which concludes the proof \end{proof} The following Corollary says that when writing $w = \Lambda v$, the matrix $\Lambda$ has either all positive or all negative entries. We will need this result in the next section. \begin{corollary}\label{cor:lambdasign} Let $w$ be as in the statement of Prop.~\ref{prop:winLv}, and write $w = \Lambda v = \sum_{i=1}^q \lambda_i E_i v.$ Then $\lambda_i \leq 0$ for $i=1,\ldots,q$ or $\lambda_i \geq 0$ for $i=1,\ldots,q$. \end{corollary} \begin{proof} Starting from Eq.~\eqref{eqq:condlambdawv}, it is enough to show that $\mu - \beta y_i \geq 0$, for $i=1,\ldots,q$, where $\mu$ is the largest eigenvalue of $ (\alpha vv^\top + \beta I)(\sum_{i=1}^q y_i E_i)$. Whether $\lambda_i \leq 0$ or $\lambda_i \geq 0$ is then decided by the sign of $\alpha_1$, defined above Eq.~\eqref{eqq:condlambdawv}. Set $D_y = \sum_{i=1}^q y_i E_i$ and denote by $D^{1/2}$ its square root. Then a short calculation shows that $(\alpha vv^\top + \beta I)D_y$ and $$R:=D_y^{1/2}(\alpha vv^\top + \beta I)D_y^{1/2}$$ have the same eigenvalues and $R$ is positive definite. Set $\bar v = D_y^{1/2}v$ and write $R=\alpha \bar v \bar v^\top + \beta D_y.$ Since $\mu$ is the largest eigenvalue of $R$, $$\mu I -(\alpha \bar v \bar v^\top + \beta D_y) \geq 0,$$i.e. it is positive semi-definite. Thus $\mu I-\beta D_y \geq \alpha \bar v \bar v^\top\geq 0$. Since $D_y$ is diagonal, with $y_i$ on the diagonal entries, the result is proven. \end{proof} The following Proposition shows that if $x_0$ is a point in $\Lambda_v$ that converges, under the primal gradient flow, to a critical point $x^*$, then starting close enough to $x_0$ guarantees that the flow will converge to a point close to $x^*$. Note that the fact that all sinks in $\Lambda_v$ were also sinks in $\mathbb{R}^m$ plays a key role here: if $x^*$ were a sink in $\Lambda_v$ and a saddle for the general dynamics, with an unstable direction necessarily outside of $\Lambda_v$, the flow lines would escape the vicinity of $\Lambda_v$ along this line. This fact is used implicitly below when appealing to the property that if $x^*$ is a sink in $\Lambda_v$, then $J_1(x^*)=0$. \begin{proposition}\label{prop:closeLoja} Assume that the tame spectrum assumption holds, with leading eigenvector $v \in \mathbb{R}^m$. Let $x_0 \in \Lambda_v$ be such that $\varphi_\infty(x_0)=x^*\in \Lambda_v$, where $\varphi_t(x_0)$ is the solution of the normal dynamics $\dot x = -QDx$ at time $t$ with initial state $x_0$. Then generically for $x_0$, for all $\epsilon >0$, there exists $\delta >0$, so that for all $x_1$ with $\|x_1-x_0\|<\delta$, $\|\varphi_{\infty}(x_1)-x^*\|<\epsilon.$ \end{proposition} Note that the above statement is obvious in two cases: if $x^*$, in addition to being an isolated sink in $\Lambda_v$, is also an isolated sink in $\mathbb{R}^m$ or if $x_1 \in \Lambda_v$ as well. \begin{proof} From Theorem~\ref{th:rank1}, we know that generically for $x_0$, $x^* \in \operatorname{Crit}_0 J_1$, the set of sinks for the normal dynamics in $\mathbb{R}^n$. From the remark above, we can assume without loss of generality that $x^*$ belongs to a connected component of $\operatorname{Crit}_0 J_1$ of dimension larger than $0$. From Theorem~\ref{th:morsebott}, we know that the sinks are such that $\rho_i(x^*)=0$, $i=1,\ldots,q$, which implies that $J_1(x^*)=0$. Recall the Lojasiewicz inequality~\cite[Prop. 1, p 67]{loja1965}: for an analytic function $J_1(x)$, there exists a $\delta_1>0$ so that for all $x$ with $\|x-x^*\|<\delta_1$, there exists $\frac{1}{2} \leq \theta<1$, and a constant $c>0$ so that \begin{equation}\label{eq:lojagrad}|J_1(x)|^\theta \leq c \| \operatorname{grad} J_1(x)\|.\end{equation} Now consider the solution $x(t)$ of the normal dynamics $\dot x = -\operatorname{grad} J_1(x)$ initialized at $x_2$ near $x^*$. Denote by $$a := \min_{x \in (\operatorname{Crit} J_1 - \operatorname{Crit}_0 J_1)} J_1(x).$$ That is, $a$ is the lowest value of a critical point of $J_1$ which is not a local minimum, for which we already know that $J_1 =0$. Assume, perhaps taking $x_2$ closer to $x^*$, that $J_1(x_2)<a$. The following argument, showing that the length of the gradient flow line starting from $x_2$ is bounded, is classical. Since $J_1(x(t)) > 0$ away from the critical set $\operatorname{Crit} J_1$, we can write \begin{align*} \frac{d}{dt} J_1(x(t))^{1-\theta} &= (1-\theta) (\operatorname{grad} J_1(x(t)))^\top \dot x(t) J_1(x(t))^{-\theta} \\ &= -(1-\theta) \|\operatorname{grad} J_1(x(t))\|^2 J_1(x(t))^{-\theta} \\ & \geq -\frac{1-\theta}{c} \| \operatorname{grad} J_1(x(t))\| \geq -\frac{1-\theta}{c} \|\dot x\|. \end{align*} where we used Lojasiewicz inequality to obtain the last line. We thus have that \begin{align*} \operatorname{Length}(x(t))= \int_0^\infty \|\dot x(t)\| dt & \leq -\frac{c}{1-\theta} J_1(x(t))^{1-\theta}|_0^\infty\\ & \leq k J_1(x_2)^{1-\theta} \end{align*} for some $k>0$ and where we used the fact that $J_1(\varphi_{\infty}(x_2))=0$, which is an easy consequence of the facts that $J_1(x_2)<a$ and that a gradient flow converges to its critical set. Hence, the length of trajectory of the normal system initialized at $x_2$ near $x^*$ has a length bounded by $kJ_1(x_2)^{1-\theta}$. Since $J_1(x)$ is continuous, we can choose $0<\delta_2<\min(\delta_1,\epsilon/2)$ small enough so that for all $x_2$ with $\|x_2-x^*\|<\delta_2$, the following two items hold: (1) $k J_1(x_2)^{1-\theta} < \varepsilon/2$ and (2) $J_1(x_2)<a$ . The first item ensures that the length of the gradient flow line starting from $x_2$ is upper-bounded by $\epsilon/2$, and the second one ensures that this gradient flow line converges to $x_2^*$ such that $J(x_2^*)=0$, as discussed above. Because $\lim_{t \to \infty} \varphi_t(x_0)=x^*$, there exists $T>0$ so that $\|\varphi_T(x_0)-x^*\|< \delta_2/2$. Furthermore, since the flow $\varphi_t(x)$ is continuous in both $t$ and $x$, there exists $\delta>0$ so that $\|\varphi_{T}(x)-\varphi_{T}(x_0)\|<\delta_2/2$ for all $x$ so that $\|x-x_0\|<\delta.$ It is now easy to see that for such $x$ so that $\|x-x_0\|<\delta$, $\lim_{t \to \infty} \varphi_t(x)$ is within $\epsilon$ of $x^*$. Indeed, by construction, for such $x$, $\|\varphi_T(x)-x^*\|< \delta_2$. Hence $$\|\varphi_{\infty}(x) - x^*\| \leq \|\varphi_{\infty}(x) - \varphi_{T}(x)\| + \|\varphi_{T}(x) - x^*\|,$$ and the first term is bounded by the length of the gradient flow line, which is bounded by $\epsilon/2$, and the second term is upper bounded by $\epsilon/2$ by construction. \end{proof} \section{Positivity and convergence to a global minimum} We have seen in the previous section that when initialized in $\Lambda_v$, the primal flow is the gradient of a Morse function whose minima all satisfied the constraints of the regularization problem, hence trajectories converged, generically for $x_0 \in \Lambda_v$, to $\operatorname{Feas}({ \mathbf R}_1)$. From Lemma~\ref{lem:cor:transv}, we know that the intersection of $\operatorname{Crit}_0 J_1$ and $\Lambda_v$ consists of $2^q$ points. Hence, the primal flow converges a priori to any one of these. It is easy to verify that the $2^q$ sinks of the flow in $\Lambda_v$ yield different value of the cost function of the regularization problem ${ \mathbf R}_1$. What is perhaps the most surprising aspect of implicit regularization for matrix factorization is that the flow will converge to (near) a {\it global minima} of the regularization problem ${ \mathbf R}_1$. This is due, as we will see below, to the appearance of positive definite matrices with {\it positive} entries when the problem is considered in $\Lambda_v$. We add the assumption here that $v$ has no zero entries. This assumption holds generically for the $A_i$, and could be removed at the expense of longer proofs. In previous sections, we derived properties of the flow in $\Lambda_v$ without deriving the explicit form of the flow in that space. In this section, the proofs are more transparent in coordinates suited to the dynamics $\Lambda_v$ and thus we start by deriving the explicit form of the normal dynamics in $\Lambda_v$. To this end, we introduce the {\bf reduced variables} $z \in \mathbb{R}^q$, defined by removing from $x$ the repeated entries. Precisely, for $x \in \Lambda_v$ then there exists a diagonal matrix $\Lambda \in \mathcal{D}_N$ so that $x = \Lambda v.$ The matrix $\Lambda$ can uniquely be written as \begin{equation}\label{eq:definvar}\Lambda=:\sum_{i=1}^q \lambda_i E_i,\end{equation} which defines the $\lambda_i$. The reduced variables are rescaled $\lambda_i$, precisely \begin{equation}\label{eq:redvar} z_i:=\lambda_i \|\bar v_i\|. \end{equation} Note that by the tame spectrum assumption, $\|\bar v_i\| \neq 0$ and the above is well defined. Introduce the following vector \begin{equation}\label{eq:defbarv} \bar v = \begin{pmatrix} \|\bar v_1\| & \cdots & \|\bar v_q \| \end{pmatrix}^\top \in \mathbb{R}^q \end{equation} It is a vector with positive entries. We furthermore denote by $D_v$ the diagonal matrix $$D_{\bar v}:= \operatorname{diag}(\bar v) \in \mathbb{R}^{q \times q}, \quad D_v := \operatorname{diag}(v) \in \mathbb{R}^{m \times m}$$ Note that $D_{\bar v}$ is invertible by the tame spectrum assumption. We now express the normal dynamics in the reduced variables: \begin{lemma}\label{lem:reddyn} Assume that the tame spectrum assumption holds, with leading eigenvector $v \in \mathbb{R}^m$. Consider the normal dynamics $\dot x = -QDx$, $x \in \mathbb{R}^m$. Define $G \in \mathbb{R}^{q \times q}$ to be the positive semi-definite matrix with entries $g_{ij} = \|\bar v_i\|\|\bar v_j\|$, i.e. \begin{equation}\label{eq:defG}G= \bar v \bar v^\top \in \mathbb{R}^{q \times q}.\end{equation} Then the dynamics in reduced variables is given by \begin{equation}\label{eq:reddyn} \dot z = -\left( \alpha G+\beta I\right) F(z)z, \end{equation}where $F(z)$ is a diagonal matrix with entries $f_i(z) =z_i^2 - y_i$ \end{lemma} \begin{proof} Starting from the normal dynamics, replacing $x$ by $\Lambda v$, we obtain $\dot \Lambda v = -QD\Lambda v$. Now use the fact that since $\Lambda$ is diagonal, $\Lambda v = D_v \operatorname{diag}(\Lambda)$, (recall that $\operatorname{diag}$ applied to a vector yields a diagonal matrix and when applied to a diagonal matrix, it yields a vector) and the fact that diagonal matrices commute to obtain \begin{equation} \frac{d}{dt} \operatorname{diag}(\Lambda) =- D_v^{-1}QD_v D\operatorname{diag}(\Lambda) = -(\alpha D_v^{-1} vv^\top D_v + \beta I)D\operatorname{diag}(\Lambda), \end{equation} where we used the fact that $Q=\alpha vv^\top + \beta I$. Consider the matrix $ D_v^{-1} vv^\top D_v.$ Clearly, it is of rank $1$, and a short calculation shows that it is explicitly given by $$D_v^{-1} vv^\top D_v= \begin{pmatrix} v_1^2 & \cdots & v_m^2\\\vdots & \ddots & \vdots \\v_1^2 & \cdots & v_m^2\end{pmatrix};$$ note that it has identical rows. We obtain, using the explicit form of $D_v^{-1} vv^\top D_v$ just derived, shows that $$\dot \lambda_l = -\alpha\sum_{i=1}^q \sum_{j \in N_i} v_j^2 \rho_i(x) \lambda_i - \beta \rho_l(x) \lambda_l.$$ We simplify the above expression as follows: (i) $\sum_{j \in N_i} v_j^2 \rho_i(x) \lambda_i = \| \bar v_i\|^2 \rho_i(x) \lambda_i$ and (ii) $\rho_i(x) = x^\top E_i x - y_i = v^\top \Lambda E_i \Lambda v-y_i$, and recalling that $\Lambda = \sum_{i=1}^q \lambda_i E_i$ and that $E_iE_j = 0$ if $ i \neq j$, we obtain $$\rho_i(x) = \lambda_i^2 \|\bar v_i\|^2-y_i.$$ We conclude that $$ \dot \lambda_l = -\alpha \sum_{i=1}^q \|\bar v_i\|^2 (\|\bar v_i\|^2 \lambda_i^2 -y_l) \lambda_i -\beta (\lambda_l^2 \|\bar v_l\|^2-y_i)\lambda_l.$$ Replace $\lambda_i$ by $z_i/\|\bar v_i\|$ in the last expression to get $$\dot z_l =- \alpha\sum_{i=1}^q \|\bar v_i\| \|\bar v_l\|(z_i^2 - y_i) z_i -\beta (z_l^2 - y_l)z_l,$$ as announced. \end{proof} The matrix $\alpha G+\beta I$ is a positive definite matrix with {\it positive entries}. The latter fact will play a role in the next section. Thanks to the former, it defines an inner product on $\mathbb{R}^q$ and so does its inverse. We use this fact in the following result, characterizing the flow the normal dynamics in $\Lambda_v$ more precisely than in the previous section. To this end, let $J_r$ be a Morse function on $\mathbb{R}^q$. The {\bf index} of a critical point $x$ of $J_r$ is defined as the number of negative eigenvalues of the Hessian of $J_r$ evaluated at $x$. Note that local minima have index zero and local maxima have index $q$. As before, we denote by $\operatorname{Crit} J_r$ the set of critical points of $J_r$. We decompose it as $$\operatorname{Crit} J_r = \cup_{i=0}^q \operatorname{Crit}_i J_r$$ where $\operatorname{Crit}_i J_r$ is the set of critical points of $J_r$ of index $i$ (this agrees with our definition of $\operatorname{Crit}_0 J_r$ as the set of local minima of $J_r$). We have the following result: \begin{theorem}\label{th:reddyngradient} The reduced dynamics of Eq.~\eqref{eq:reddyn} is the gradient flow of the Morse function \begin{equation}\label{eq:defJ}J_r:=\frac{1}{4}\sum_{i=1}^q (z_i^2- y_i)^2 \end{equation} for the inner product $\langle x,y\rangle:=x^\top \left( \alpha G+\beta I\right)^{-1} y$. The critical points of $J_r$ have entries in the set $\{-\sqrt{y_i},0,\sqrt{y_i})$ and $|\operatorname{Crit} J_r|=3^q$. Furthermore, the index of a critical point $z$ is equal to the number of zero entries in $z$, consequently $$|\operatorname{Crit}_i J_r| = 2^{q-i}{q \choose i}.$$ \end{theorem} \begin{proof} We first observe that $\frac{\partial J_r}{\partial z_i} = (z_i^2-y_i)z_i= f_i(z)z_i$, where $f_i(z)=(z_i^2-y_i)$ is as in the statement of Lemma~\ref{lem:reddyn}. Thus \begin{equation}\label{eq:defJrz}\frac{\partial J_r}{\partial z} = F(z) z,\end{equation} from which we see that the normal dynamics in reduced coordinates is the gradient flow of $J_r$ for the inner product described in the statement of the Theorem. The critical points of $J_r$ are so that $(z_i^2-y_i)z_i=0$ or, equivalently, $$z_i \in \{- \sqrt{y_i},0,\sqrt{y_i}\}$$ and there are $3^q$ of them as announced. To determine the index of the critical points, recall that the signature of the Hessian at a critical point is independent of the inner product~\cite{milnor2016morse}. Hence, it suffices to analyze the matrix of second derivatives of $J_r$. It is easy to see from Eq.~\eqref{eq:defJrz} that $\frac{\partial^2 J_r}{\partial z^2}$ is diagonal, with entries $$\frac{\partial^2 J_r}{\partial z_i^2} = 3z_i^2-y_i.$$ From the above equation, we see that the index of a critical point $z$ is precisely the number of entries of $z$ that are zero, and that there are two choices for non-zero entries. This yields the last statement of the Theorem. \end{proof} As mentioned at the beginning of this section, we know that, generically for $z_0 \in \mathbb{R}^q$, the reduced dynamics will converge to a point in $\operatorname{Crit}_0 J_r$, and that there are $2^q$ such points and that they all correspond to $x$ satisfying the constraints of~\eqref{eq:optx}. However, the corresponding value of the objective function is not the same for all elements of $\operatorname{Crit}_0 J_r$. To see this, first recall that from Lemma~\ref{lem:Lvincl}, we know that all minimizers of the regularization problem are in $\Lambda_v$. Hence, we can without loss of generality study the regularization problem in reduced coordinates. Denote by $\mathbbm{1}$ the matrix of all one entries. The regularization problem in reduced coordinates takes following form: \begin{proposition}\label{prop:optred} Consider the constrained optimization problem $${ \mathbf R}_1: \min x^\top Q^{-1} x \quad \mbox{ s.t. } x^\top E_i x = y_i, \quad i=1,\ldots,q,\mbox{ and } x \in \Lambda_v$$ where $Q=\alpha vv^\top + \beta I$. Let $x^*=\Lambda^*v$ be a critical point of this problem, with $\Lambda^* = \sum_{i=1}^q \lambda_i^* E_i.$ Then $z^* = \lambda_i^* \|v_i\|$ is a critical point of \begin{equation}\label{eq:optz}{ \mathbf R}_r: \min z^\top (-\alpha' \mathbbm{1} + \beta I) z,\quad \mbox{ s. t. } z_i^2 = y_i.\end{equation} Furthermore, the problem has 2 global minima, at $z_i = \sqrt{y_i}$, $i=1,\ldots,q,$ and $z_i = -\sqrt{y_i}$, $i=1,\ldots,q,$. \end{proposition} \begin{proof} Since $x \in \Lambda_v$, there exists $\Lambda \in \mathcal{D}_N$ so that $x = \Lambda v$. Plugging this last relation in the problem ${ \mathbf R}_1$, it becomes $$\min v^\top \Lambda Q^{-1} \Lambda v \quad \mbox{ s. t. } \|\bar v_i\|^2 \lambda_i^2 = y_i, i=1,\ldots,q.$$ Recall that $\Lambda v = D_v\operatorname{diag}(\Lambda)$, and $\operatorname{diag}(\Lambda)=\sum_{i=1}^q \sum_{j\in N_i} \lambda_i e_j$, and use the fact that $Q^{-1} = -\alpha' vv^\top + \beta' I$ for some constants $\alpha', \beta' >0$, to rewrite the cost in the above problem as $$\operatorname{diag}(\Lambda)^\top D_v( -\alpha' vv^\top + \beta' I) D_v \operatorname{diag}(\Lambda).$$ We have that $D_v v = \begin{pmatrix} v_1^2 & \cdots & v_m^2 \end{pmatrix}^\top$, and thus \begin{align*} v^\top D_v \operatorname{diag}(\Lambda)^\top &= \begin{pmatrix} v_1^2 & \cdots & v_m^2 \end{pmatrix}(\sum_{i=1}^q \sum_{j\in N_i} \lambda_i e_j)\\ &=\sum_{i=1}^q \sum_{j \in N_i} v_j^2 \lambda_i = \sum_{i=1}^q \|\bar v_i\|^2 \lambda_i\\ &= \bar v^\top \lambda. \end{align*} For the second term of the cost, we have \begin{align*} \operatorname{diag}(\Lambda)^\top D_v D_v \operatorname{diag}(\Lambda)&= v^\top \Lambda^2 v= \sum_{i=1}^q \lambda_i^2 v^\top E_i v \\ &= \sum_{i=1}^q \lambda_i^2 \|\bar v_i\|^2.\\ \end{align*} Putting the two terms together, the cost is $-\alpha' \lambda^\top \bar v \bar v^\top \lambda +\sum_{i=1}^q \lambda_i^2 \|\bar v_i\|^2.$ Replacing $\lambda_i$ by $z_i/\| \bar v_i\|$ or in matrix form $\lambda = D_{\bar v}^{-1} z$, the regularization problem becomes $\min z^\top D_{\bar v}^{-1} \bar v \bar v^\top D_{\bar v}^{-1} z + \sum_{i=1}^q z_i^2$. Since $D_{\bar v}^{-1} v$ is the vector of all ones, we get $$\min z^\top (-\alpha' \mathbbm{1} +\beta I)z \quad \mbox{ s.t. } z_i^2 =y_i, i=1,\ldots,q,$$ as announced. To prove that the global minima are such that the entries of the vector $z$ have the same sign, recall that the $2^q$ feasible points for the problem ${ \mathbf R}_r$ of Eq.~\eqref{eq:optz} are so that $z_i = \pm \sqrt{y_i}$. Writing $\mathbbm{1}=ee^\top$, where $e$ is the vector of all ones, we see that in order to minimize $z^\top (-\alpha' \mathbbm{1} + \beta' I) z$, we need to maximize $|e^\top z|$, from which the statement follows. \end{proof} The next Proposition shows that converging to a global minimum of ${ \mathbf R}_r$ in $\Lambda_v$, which took place when the dynamics was constrained to the subspace of rank $1$ matrices, implies that the primal problem has converged to a global minimum of the original regularization problem ${ \mathbf R}$. \begin{theorem}\label{th:equivnfullselecmin} Assume that the tame spectrum assumption holds with leading eigenvector $v \in \mathbb{R}^m$. Then there are global minima of the regularization problem ${ \mathbf R}_k$, which are of rank $1$. \end{theorem} Recall that in normal coordinates, the regularization problem takes the form \begin{equation} \label{eq:optx2} { \mathbf R}_k: \min_{x \in \mathbb{R}^{m\times k}} \operatorname{tr}(x^\top Q^{-1}x) \quad \mbox{s.t. } \operatorname{tr}(x^\top E_i x) =y_i, i=1,\ldots,q\end{equation} and that from Proposition~\ref{prop:optnormcoord} we know that minimizers of ${ \mathbf R}$ are of the form $(Px, 0)^\top$, where $x$ is a minimizer of ${ \mathbf R}_k$ with $k=n$. \begin{proof} Recall that if $Q=\alpha vv^\top + \beta I$, with $\alpha, \beta >0$, then $Q^{-1} = -\alpha' vv^\top + \beta' I$, with $\alpha', \beta' >0$. Furthermore, since the tame spectrum assumption implied the rank spread condition, we know that $\sum_{i=1}^q E_i = I_m$. Thus $$\sum_{i=1}^q \operatorname{tr}(x^\top E_i x)= \operatorname{tr} (x^\top x) = \sum_{i=1}^q y_i.$$ Plugging this relation into the cost, we get $$ x^\top Q^{-1} x = - \alpha' \operatorname{tr} (x^\top vv^\top x) + \beta' \sum_{i=1}^q y_i.$$ We thus need to show that there is a global maximum of rank $1$ for the problem \begin{equation}\label{eq:optglobinter}\operatorname{T}_k: \max_{x \in \mathbb{R}^{m \times k}} \operatorname{tr} (x^\top vv^\top x) \quad \mbox{s.t. } \operatorname{tr}(x^\top E_i x) =y_i, i=1,\ldots,q.\end{equation} Denote by $x^j$, $j=1,\ldots, k$, the $j$th column of $x$. We will show that the above problem admits a global maximum with $x^j=0$ for $j \geq 2$. The proof goes by induction on $k$. We start with $k=2$, and for ease of notation, we let $x=x^1$ and $z=x^2$. The problem~\eqref{eq:optglobinter} is $$\max (|v^\top x|^2+|v^\top z|^2) \quad \mbox{ s.t. } x^\top E_i x + z^\top E_i z = y_i, i=1,\ldots, q.$$ The terms of the cost function can be expressed as $$|v^\top x|^2 = |\sum_{i=1}^q \bar v^\top_i \bar x_i|^2,$$ and similarly for $|v^\top z|^2$, while the constraints are $x^\top E_i x + z^\top E_i z= \|\bar x_i\|^2 +\|\bar z_i\|^2.$ We can thus rewrite~\eqref{eq:optglobinter} as \begin{equation}\label{eq:optglobinter2}\max (|\sum_{i=1}^q \bar v^\top_i \bar x_i|^2+|\sum_{i=1}^q \bar v^\top_i \bar z_i|^2)\quad \mbox{ s.t. } \|\bar x_i\|^2 + \|\bar z_i \|^2 = y_i, i=1,\ldots, q\end{equation} We claim that if a pair $x,z$ is a global maximizer of~\eqref{eq:optglobinter2}, then the terms $\bar v_i^\top \bar x_i$ are sign-consistent, for $i=1,\ldots,q$, and similarly for $\bar v_i^\top \bar z_i$. Indeed, if $x$ (resp.\ $z$) satisfies the constraints, changing the sign of $\bar x_i$ (resp.\ $\bar z_i$) yields an $x$ (resp.\ $z$) that also does satisfy the constraints but changes the sign of $\bar v_i^\top \bar x_i$. For {\it any} $x$ satisfying the constraints, arranging the signs of $\bar x_i$ so that $\bar v^\top_i \bar x_i$ are consistent clearly increases $|\sum_{i=1}^q \bar v_i^\top \bar x_i|$, and similarly for $z$, which proves the claim. We assume without loss of generality that all terms $\bar v_i^\top \bar x_i$ and $\bar v_i^\top \bar z_i$ are positive. We now furthermore claim that if $x,z$ is a global maximizer of~\eqref{eq:optglobinter2}, then the pairs $\bar x_i$ and $\bar z_i$ are both aligned with each other, and aligned with $\bar v_i.$ Indeed, assume it is not the case for $\bar x_i$, $1 \leq i \leq q$, and without loss of generality, all $\bar v_i^\top \bar x_i$, $\bar v_i^\top \bar z_i$ are positive. Consider the map $\bar x_i \to \Theta \bar x_i$, $\Theta \in SO(|N_i|)$: keeping all other entries of $x,z$ constant, it maps a feasible point to another feasible point since $\|\Theta \bar x_i\|^2= \|\bar x_i\|^2$. This map is surjective onto the sphere of radius $\|\bar x_i\|$ and thus contains a vector aligned with $\bar v_i$ in its image. Maximizing over $\Theta$ the quantity $\bar v_i^\top \Theta \bar x_i$, which is clearly done when $\Theta$ is such that $\Theta\bar x_i$ is aligned with $\bar v_i$, provides a feasible point with a higher cost, which proves the claim. We can thus exhibit global maximizers $x,z$ of problem~\eqref{eq:optglobinter} so that $$\bar x_i =\lambda_i \bar v_i \mbox{ and } \bar z_i = \mu _i \bar v_i, \quad i=1,\ldots, q,$$ for some $\mu_i, \lambda_i\geq 0$, $i=1,\ldots, q$. Plugging this into~\eqref{eq:optglobinter2}, we have that $\lambda_i,\mu_i$ are solutions of \begin{equation} \label{eq:optglobinter3} \max \left((\sum_{i=1}^q\lambda_i \|\bar v_i\|^2)^2 +(\sum_{i=1}^q\mu_i \|\bar v_i\|^2)^2\right) \quad \mbox{ s.t. } \lambda_i^2+\mu_i^2 = \frac{y_i}{\|\bar v_i\|^2}, i=1,\ldots,q.\end{equation} We now claim that if the pair $\lambda,\mu \in \mathbb{R}^q$ is a global maximizer of~\eqref{eq:optglobinter3}, then one of the following two alternatives hold: \begin{enumerate} \item there exists a constant $c > 0$ such that \begin{equation} \label{eq:lmuc} \lambda_i = c \mu_i,\quad \mbox{ for } i=1, \ldots,q, \end{equation} \item $\lambda >0$ and $\mu = 0$ or $\lambda = 0$ and $\mu >0$, where the inequalities are to be understood entrywise. \end{enumerate} To see this, introduce the Lagrange multipliers $\nu_i, i=1,\ldots, q$ and differentiate the Lagrangian of problem~\eqref{eq:optglobinter3} with respect to $\lambda_i$ and $\mu_i$. We obtain \begin{equation} \left\lbrace \begin{aligned} \frac{\partial}{\partial \lambda_i}&:\sum_{i=1}^q\lambda_i \|\bar v_i\|^2 - \nu_i \lambda_i &=0\\ \frac{\partial}{\partial \mu_i}&:\sum_{i=1}^q\mu_i \|\bar v_i\|^2 - \nu_i \mu_i &=0 \end{aligned}\right. \end{equation} Assume that $\lambda_1=0$, then $\sum_{i=2}^q \lambda_i \|\bar v_i\|^2 =0$. Since we know that $\lambda_i \geq 0$, this implies that $\lambda_i=0$ for $i=1,\ldots,q$. Hence $\lambda =0$. It is easy to see that having $\mu=0$ additionally is not a maximizer. The same holds when switching the role of $\mu$ and $\lambda$. This shows the second alternative holds. We can now assume that $\lambda_i \neq 0,\mu_i \neq 0$ for all $1 \leq i \leq q$ (otherwise, we are back to the case above). Solve the above equation for $\nu_i$, and we get that $$\frac{\sum_{i=1}^q\lambda_i \|\bar v_i\|^2 }{\lambda_i}=\frac{\sum_{i=1}^q\mu_i \|\bar v_i\|^2 }{\mu_i}, \quad i=1,\ldots,q.$$ Since the terms in the numerators are the same for all $i$, the ratios $\lambda_i/\mu_i$ are all the same, which proves the first alternative. In either case, this implies the global maximizer of $T_2$ is of rank $1$. When $\mu=0$ or $\lambda=0$, the cost in~\eqref{eq:optglobinter3} is easily seen to be $(\sum_{i=1}^q\sqrt{y_i}\|\bar v_i\|)^2$, and when $\lambda_i=c \mu_i$ for $i=1,\ldots, q$, the constraints yields $\lambda_i^2 = \frac{y_i}{(1+c^2)\|\bar v_i\|^2}$. Plugging this into the cost in~\eqref{eq:optglobinter3}, we see that the cost is the same at such points. We conclude that there are global maximizers with $\mu_i=0$, $i=1,\ldots, q$, which proves the claim for $k=2$. We are now done with the base case of the induction, and proceed with the induction step. Assume that there is a global maximum $x \in \mathbb{R}^{m\times (k-1)}$ for $\operatorname{T}_{k-1}$ so that $x^1$ is the only non-zero column. We show that the statement holds true for $\operatorname{T}_{k}$. To this end, let $z \in \mathbb{R}^{m \times k}$ be a global maximum for $\operatorname{T}_k$. We have that $z$ obeys $$\max (\sum_{j=1}^{k-1} |v^\top z^j|^2 + |v^\top z^k|^2) \quad \mbox{ s.t. } \sum_{j=1}^{k-1} (z^j)^\top E_i z^j + (z^k)^\top E_i z^k =y_i.$$ Let $\tilde z \in \mathbb{R}^{m \times (k-1)}$ be a global maximizer of $$\max \sum_{j=1}^{k-1} |v^\top \tilde z^j|^2 \quad \mbox{ s.t. } \sum_{j=1}^{k-1} (\tilde z^j)^\top E_i \tilde z^j =y_i- (z^k)^\top E_i z^k.$$ We can assume using the induction hypothesis that only $\tilde z^1$ is non-zero. Let $w \in \mathbb{R}^{m \times k}$ be the concatenation of $\tilde z$ and $z^k$. Then $w \in \operatorname{Feas}(\mathrm{T}_k)$ by construction, and it is also a global maximizer. Since $w$ only has two non-zero columns, it is also the solution of the problem $$\max |v^\top w^1|^2+|v^\top w^k|^2 \quad \mbox{ s.t. } (w^1)^\top E_i w^1 + (w^k)^\top E_i w^k = y_i, i=1,\ldots, q$$ where $w^j=0, j=2,\ldots,k-1.$ We have shown above that this problem admits a solution so that $w^k=0$. Hence, there is a global optimizer $x$ of $\mathrm{T}_k$ with only one non-zero column, which concludes the proof of the Proposition. \end{proof} \paragraph{Convergence to the global minima of ${ \mathbf R}_n$} We now argue that the primal dynamics will converge to near a global minimum of the regularization problem ${ \mathbf R}_1$. From Corollary~\ref{cor:rank1botrank1}, we know that for some $t_1>0$, $U(t_1,\delta)$ is arbitrarily close to a matrix $U_1$ of rank $1$. Without loss of generality (thanks to Lemma~\ref{lem:equivXU}), we can assume that $U_1=u_1e_1^\top$, where $u_1 \in \mathbb{R}^n$ is an eigenvector of $\sum_{i=1}^q y_i A_i$ corresponding to the largest eigenvalue (see Corollary~\ref{cor:rank1botrank1}). We know from Proposition~\ref{prop:winLv} that $u_1 \in \Lambda_v$, and if the dynamics is initialized close to $\Lambda_v$, it converges to a point close to $\Lambda_v$ (by Proposition~\ref{prop:closeLoja}). Assuming for a moment that $X(0)$ is of rank $1$, we thus want to show that when initialized at $u_1$, the normal dynamics (in $\mathbb{R}^n$) converges to a global minimum of the regularization problem ${ \mathbf R}_1$ in $\mathbb{R}^n$. From Theorem~\ref{th:equivnfullselecmin}, we know that it is also a global minimum of ${ \mathbf R}_n$. The results of the previous section guaranteed that when initialized at $u_1$, the flow will converge generically to a critical point of ${ \mathbf R}_1$. We know that we can consider the system in the reduced coordinates of Eq.~\eqref{eq:redvar}, and the corresponding dynamics is given in Eq.~\eqref{eq:reddyn}. We have shown in Theorem~\ref{th:reddyngradient} that this dynamics was gradient for a Morse function $J_r$ had exactly $2^q$ local minima, one local minima per orthant. On the one hand, from Prop.~\ref{prop:optred}, the global minima of the regularization problem ${ \mathbf R}$ are in the positive orthant and negative orthant. On the other hand, from Corollary~\ref{cor:lambdasign}, we know that if we write $u_1 = \Lambda v$, $\lambda_i$ are either all negative or all positive, $i=1,\ldots,q$, which implies that in normal coordinates, we can assume that the flow is initialized in either the positive or negative orthant. It thus suffices to show that when initialized at a small value in the positive or negative orthant, the primal dynamics will converge to the sink in that orthant. We can do so by exhibiting positively invariant subspace for the dynamics. We illustrate how this can be done in the case $q=2$; a similar approach applies to $q >2$. Recall that $Q=\alpha'G+\beta' I$ with $G=\bar v \bar v^\top$, with $\bar v \in \mathbb{R}^q$ a vector with {\it strictly positive} entries. Assume without loss of generality that $\|\bar v_2\| > \|\bar v_1\|=1$. We claim that the following subset of $\mathbb{R}^2$ is positively invariant for the gradient flow: \begin{equation}\label{eq:defsetD} z \in D \mbox{ if } \left\lbrace \begin{aligned} z_1 &>0\\ z_2 &>0\\ z_2 &< \gamma_1 z_1+\sqrt{y_2}\\ z_2 &> \gamma_2 z_1-\sqrt{y_1} \end{aligned}\right. \end{equation} for some $\gamma_1,\gamma_2>0$. We illustrate the set in Figure~\ref{fig:invset}. Note that the points $(0, \sqrt{y_1})$ and $(\sqrt{y_2},0)$ are saddle points of the dynamics. The global minimum $(\sqrt{y_1},\sqrt{y_2})$ belongs to this set and is the only sink in this set. To verify that the set is invariant, one has to show that the vector field, when evaluated at the set's boundary, points toward the inside of the set (which is well-defined, since the set is a closed, contractible set of codimension 0). For the sides $z_1=0, 0 \leq z_2 \leq \sqrt{y_2}$, and $z_2=0, 0 \leq z_1 \leq \sqrt{y_1}$, this is clear from the expression of the dynamics~\eqref{eq:reddyn}: when $z_1=0$ and $0 \leq z_2 \leq \sqrt{y_2}$, we see that $\dot z_2 >0$, and similarly $\dot z_1>0$ on the boundary $z_2=0, 0 \leq z_1 \leq \sqrt{y_1}$. A normal vector to the side $z_2 =\gamma_1 z_1+\sqrt{y_2}$ is the vector $\vec{n}_1=[\gamma_1, -1]^\top$. It thus suffices to verify that $\vec{n}_1^\top \operatorname{grad} J_n |_{z_1 \geq 0, z_2=x1+\sqrt{y_2} \geq 0}$. Taking, for example, $\gamma_1 = \|\bar v_2\|$, we obtain \begin{multline}\vec{n}_1^\top \operatorname{grad} J_n |_{ z_2=z_1+\sqrt{y_2} \geq 0}\\=(\beta \|\bar v_2\| (\|\bar v_2\| - 1)) z_1^3 + (3 \beta \|\bar v_2\| \sqrt{y_2}) z_1 + (\beta \|\bar v_2\| (y_1 + 2 y_2)) z_1. \end{multline} When $z_1>0$, since all the coefficients are positive, the previous expression is clearly positive. A similar approach with $\gamma_2= \|\bar v_2\| +\beta/\alpha$ yields a similar result for the other boundary. In the case $q \geq 3$, the complexity of writing down the boundary of the invariant subspace increases exponentially, and we omit this here. \begin{figure} \centering \includegraphics{implicitregv6-figure0} \caption{The area inside the red boundary is invariant for the dynamics and contains a unique sink at $(\sqrt{y_1},\sqrt{y_2})$.}\label{fig:invset} \end{figure} \paragraph{The case of $X$ of full rank} When the primal flow is initialized {\it exactly} at a matrix $X_0$ of rank $1$, and the tame spectrum assumption holds, using the above arguments, one can show that this dynamics will converge close to a global minimizer of the regularization problem of ${ \mathbf R}_n$. We know from the first part of the paper that, whether or not the tame spectrum assumption holds, the primal system will go arbitrarily close to a rank $1$ matrix, and that the space of rank $1$ matrices is invariant for the dynamics. However, even with the tame spectrum assumption, a result such as Prop.~\ref{prop:closeLoja} cannot be used to show that the dynamics remains close (up to $t=+\infty$) to the set of rank one matrices. The {\it additional requirement} here is that $\alpha\gg \beta$. More precisely, if the tame spectrum assumption holds and $\alpha$ is much larger than $\beta$, then we will remain close to the set of rank one matrices. The intuition behind this fact is the following: consider the normal dynamics $$\dot x = (\alpha vv^\top + \beta I) QD(x) x,$$ with $x \in \mathbb{R}^{m \times n}$. Then clearly the term $\alpha vv^\top QD(x) x$ does not contribute to the columns of $x$ becoming more linearly independent, since its contribution to $\dot x^j$ is aligned with $v$ for all columns $x^j$. The term $\beta I D(x) x$ can increase the rank however. Hence if $\alpha \gg 0$, the dynamics, which we know starts arbitrarily close to a rank one matrix, will converge to its equilibrium before other modes in $x$, which can arise thanks to $\beta I D(x) x$ grow large. An asymptotic analysis (for large spectral gap, i.e. $\alpha$ large) is possible, but we omit it here). We confirm this analysis in simulations. \section{Conclusion and numerical validation}\label{sec:conclusion} We have provided in the appendix an in-depth analysis of implicit regularization for matrix factorization following the blueprint provided in Section~\ref{sec:impltheory}. Amongst the main findings was that under certain conditions, namely the tame spectrum condition, implicit the primal and regularization problem are compatible and approximate implicit regularization provably holds. We now discuss briefly the assumption and provide numerical evidence showing that when the tame spectrum assumption is in a sense squarely contradicted, the regularization problem and the points to which the primal flow converge seem to differ even in the limit $\delta \to 0$, where we recall that $\delta$ is the magnitude of the initial condition. \paragraph{What else can be proved about implicit regularization for matrix factorization?} We focused in the appendix on providing a complete proof of the parts of the blueprint when the techniques involved could be applied to other settings besides matrix factorization. As such, we omitted some aspects of what would constitute a complete proof of the conjecture of~\cite{implicitregmatr2017}. Most notably, we did not provide bounds guaranteeing that when the primal system starts near a rank $1$ matrix with span in the invariant subspace $\Lambda_v$, it converges to a point of rank $1$ close to that subspace. We emphasize again that it is here important to verify that the limit point of the trajectory of the flow, when initialized {\it near} the precritical space $\operatorname{Crit}_0^* { \mathbf R}_n$, does not leave the vicinity of that subspace. An important fact supporting this outcome is of course that there are no saddle point of the general dynamics (i.e. the dynamics not restricted to $\operatorname{Crit}_0^* { \mathbf R}_n$) that reduce to sinks (i.e. locally stable equilibria) in $\operatorname{Crit}_0^* { \mathbf R}_n$. Besides this, as we mentioned earlier, the hypotheses can be relaxed. For example, as a consequence of the rank spread condition, the intersection of the range spaces of the matrices $A_i$ only contains $\{0\}$. This leaves out the trivial case of commuting, full rank (or generically any rank) matrices. One can extend the approach presented here to allow for matrices whose range spaces do not intersect trivially, but at the expense of a much heavier notation and computations. In particular, relaxing the rank spread assumption results in a version of the normal dynamics of the type $QDx$ where now $D$ is a {\it block} diagonal matrix, instead of a diagonal matrix. Finally, we mention that the relaxation mentioned in Remark~\ref{rem:relax} may be worth exploring on its own. The conditions under which it holds are constraining, but we show in simulations (see Fig.~\ref{fig:effecttame}) that the solution we obtain is close to optimal when the assumptions are violated. \paragraph{Numerical validation} We present here numerical evidence supporting the conclusions made in the paper. We do not make a broad numerical study of implicit regularization for matrix factorization---we refer the reader to~\cite{implicitregmatr2017,arora2019implicit} for such studies--- but focus on addressing a few points, namely: how robust are the results when the tame spectrum assumption is not exactly met, and does implicit regularization hold when we strongly break the hypothesis? The tame spectrum assumption can be thought of as having two characteristics: the value of $\alpha $, which is equal to the spectral gap of the matrix $\sum_{i=1}^q A_i$, and the fact that $n-1$ smallest eigenvalues of $\sum_{i=1}^q A_i$ are equal. We thus explore how the performance depends on variations in these two aspects. To obtain the results below, we solved the ODE~\eqref{eq:mainsys} and the regularization problem~\eqref{eq:maincostU} numerically. We denote by $\varphi_\infty(x_0)$ the point to which the ODE converged, and by $\min { \mathbf R}$ the solution of the regularization problem obtained numerically. In order to measure the performance of the regularization problem and identify to which point the primal converges, one needs to carefully chose a metric reflecting how well the problem has been regularized, and insure that this metric can be efficiently computed. The most appropriate metric, namely $ \operatorname{dist}(\varphi_\infty(x_0)), \arg \min { \mathbf R})$, is unfortunately not easy to compute in general. Indeed, while we showed when the tame spectrum assumption holds exactly, the set $\arg \min { \mathbf R}$ is essentially of cardinality two, and the two values can be computed analytically, this may not hold when the assumption is not met exactly: the set can have high-cardinality, and numerical methods can land on an element which is far away from $\varphi_\infty(x_0)$, yet a closer element in $\arg \min{ \mathbf R}$ may exist. To avoid having to approximate the contents of the $\arg \min$-set in the general case, we instead use the average ratio \begin{equation}\label{eq:relerrratio}\operatorname{Relative Error}:=\frac{K(\varphi_{\infty}(x_0)) - K(\min { \mathbf R})}{K(\max { \mathbf R}) - K(\min { \mathbf R})}, \end{equation} where we denoted by $\max { \mathbf R}$ the maximal value of $K(x)$ under the constraints $\rho_i(x)=0$.\footnote{Here, we assumed that $m=n$, i.e., the $V$ variables of the normal dynamics (see Sec.~\ref{ssec:normalform}) are of the same dimension as the original variables. Clearly, if this does not hold, then $\max { \mathbf R} = \infty$.} We normalized by the difference $K(\max { \mathbf R}) - K(\min { \mathbf R})$ for two reasons: first, it gives us a scale-free quantity and, perhaps more importantly, in many cases, a small difference $K(\varphi_{\infty}(x_0)) - K(\min { \mathbf R})$ misleadingly suggests that implicit regularization takes place, but in fact only reflects a set of parameters for which $K(\varphi_{\infty}(x_0)) - K(\min { \mathbf R})$ is {\it always} small. Another aspect we investigated is the dependence of the spectrum of $\varphi_\infty(x_0)$ on the spectral gap. We mentioned at the end of the previous section, without giving a formal proof, that as $\alpha$ increases, $\varphi_\infty(x_0)$ is closer to being of rank one, and the overall performance improves. In order to measure the distance of a rank one matrix, one could use the singular values (here, eigenvalues in fact) of $\varphi_\infty(x_0)$, but this measure is again unit dependent. We use here instead the ratio \begin{equation}\label{eq:defspectralratio}\operatorname{SpectralRatio}:=\frac{\lambda_{1}}{\sum_{i=1}^n \lambda_i},\end{equation} where $\lambda_1 \geq \cdots \geq \lambda_n$ are the eigenvalues of $\varphi_\infty(x_0)$. Hence if $\varphi_\infty(x_0)$ is of rank $1$, the ratio above is one. In the worst case, all eigenvalues are equal and the ratio is $\frac{1}{n}$. \paragraph{Effect of spectral gap} In a first set of simulations, we let $n=7, q=3$ and $m=7$. We sampled $N=10^4$ triplet of matrices $A_1 \in S_3,A_2 \in S_2 ,A_3\in S_2$. We took $\delta = 10^{-10}$ and solved the ODE for $T=2500$, after verifying that for a typical run, the ODE solver had converged in less than $T=50$. The initial condition is $X(0)=X_0\delta$ where $X_0= U_0U_0^\top$, and $U_0$ is sampled from a Gaussian ensemble with zero mean and unit norm. The $y_i$ where sampled from a uniform distribution with support $(0,5]$. We show in Fig.~\ref{fig:effectalphadeterm} the average relative error and spectral ratio as a function of the spectral gap $\alpha$, where $\beta =1 $. We see that the relative error indeed decreases rapidly as the spectral gap increases and, furthermore, performance is highly correlated with the spectral ratio as predicted. \paragraph{Effect of equality of smaller eigenvalues}In a second set of simulations, we explore the effect of violating the tame spectrum assumption. To this end, we sampled $N=10^4$ pair of matrices $A_1,A_2 \in S_2$, hence $m=n=4$. The eigenvalues of $\sum_{i=1}^4 A_i$ are so that $\lambda_1=1.5$, and $\lambda_2,\ldots,\lambda_4$ are sampled independently at random from a uniform distribution with support $[1,1+\gamma]$. Hence for $\gamma=0$, the tame spectrum assumption is met exactly, but as $\gamma$ increases, the variance in the lower eigenvalues is increased. Since for increasing $\gamma$, the spectral gap {\it decreases}, we also measured the performance for pairs $A_i$ with spectrum of the associated $Q$ being $\{1,1,1,1.5\}$ and $\{1.25,1.25,1.25,1.5\}$. We see from this experiment, see Fig.~\ref{fig:effectbeta}, that increasing the variance in the lower eigenvalues affects performance {\it minimally} when compared to the effect of the spectral gap. \paragraph{Limit $\delta \to 0$ and tame spectrum assumption} In a last set of experiments, we investigated whether one should expect that when the tame spectrum assumption is not met, the limit as the size of $x_0$ goes to zero still implies implicit regularization. To this end, we plot the relative error as a function of $\delta$. For this case, we let $n=m=4$ and $q=2$. We let the spectrum of $\sum_{i=1}^4 A_i$ be $\{1,1,1,2\}$ and $\{1,1,2,2\}$, where we understand the second case as {\it strongly breaking} the tame spectrum assumption. We see in Fig.~\ref{fig:effecttame} that in the former case, simulations seem to indicate that as $\delta \to 0$, the relative error indeed vanishes, whereas in the latter case, it reaches a minimum for a certain value of $\delta >0$, indicating that $\varphi_\infty(x_0)$ does not converge to the minimum of ${ \mathbf R}$. \begin{figure}[h!] \pgfplotsset{compat=1.11} \centering \includegraphics[scale=1]{implicitregv6-figure1} \caption{The relative error of Eq.~\eqref{eq:relerrratio} and spectral ratio of Eq.~\eqref{eq:defspectralratio} as a function of the spectral gap $\alpha$.}\label{fig:effectalphadeterm} \end{figure} \begin{figure}[h!] \centering \pgfplotsset{compat=1.11} \includegraphics{implicitregv6-figure2} \caption{The relative error as a function of the dispersion of the eigenvalues $\lambda_2,\cdots,\lambda_4$. They are sampled uniformly at random from a uniform distribution with support $[1,1+\gamma]$. The eigenvalue $\lambda_1=\frac{3}{2}$. We compare with the relative error with spectrum $\{1,1,1,\frac{3}{2}\}$ and $\{\frac{5}{4},\frac{5}{4},\frac{5}{4},\frac{3}{2},\}$.}\label{fig:effectbeta} \end{figure} \begin{figure}[h!] \centering \includegraphics{implicitregv6-figure3} \caption{Relative error as a function of $\delta=10^{-x}$, where the primal flow~\eqref{eq:mainsys} is initialized at $\delta X_0$, and the spectrum of $\sum_{i=1}^q A_i$ is $\{1,1,1,2\}$ (i.e.,tame spectrum assumption met) or $\{1,1,2,2\}$.}\label{fig:effecttame} \end{figure} \bibliographystyle{plain}
\section{Introduction} Causal modeling has been recognized as a potential solution to many challenging problems in machine learning (ML)~\cite{pearl2019}. Current approaches operating at the intersection between causality and ML can be roughly split into three different classes. The first, focus on the prediction of the consequences of different actions, policies, and interventions, aiming to improve decision making. These approaches attempt to answer ``what if" counterfactual questions such as ``What if I had treated a patient differently?". The second class focus on the generation of invariant/stable predictions aiming to improve model generalization under dataset shifts~\cite{quionero2009}, while the third class is largely concerned with the estimation of causal effects and only uses ML techniques as a tool to improve the estimation of causal effects. (These approaches will be reviewed in more detail in the Related work section.) In this paper, our goal is to generate causality-inspired predictions that only leverage associations generated by the causal mechanisms that we are interested in modeling. To this end, we propose a simple counterfactual approach to train ``causality-aware" predictive models, where we train and evaluate ML algorithms on (counterfactually) simulated features which retain only the associations of interest. For instance, in anticausal prediction tasks influenced by mediators and/or confounders where we are interested in the direct effects of the outcome on the features, we simulate counterfactual features containing only the associations generated by the direct causal effects. This ability to generate learners that only leverage associations generated by the causal relations of interest is important in practice. For instance, in situations where confounding is unstable across the training and target populations (while direct causal effects are stable), the approach can be used to generate more stable predictions. Furthermore, in situations where the confounders and/or mediators represent sensitive variables, the approach can also be used to generate predictions that are free from the direct influence of the sensitive variables\footnote{The approach can also be used to generate predictions that are exclusively driven by associations generated by sensitive variables. Such models could be used, for example, to demonstrate how the sensitive variables can still impact the predictive performance of a learner, even when they are not included as inputs in the model.}. (In this paper, however, we present synthetic data illustrations focusing on stable prediction applications, rather than on the analysis of sensitive variables.) We focus on linear models, where analytical results connecting covariances, causal effects, and prediction mean squared error (MSE) are readily available. At first sight, the proposed approach appears to require the strong assumption that one needs to know the full causal graph describing the data generation process. We point out, however, that this is not the case. The approach only requires partial domain knowledge about which variables represent potential confounders and/or mediators. Noteworthy, we will describe how we can always reparameterize the model in a way that the covariance generated by the causal relations among the features is pushed towards the feature error terms (and similarly for the covariances among the mediators and the covariances among the confounders) so that we can safely generate counterfactual data without even knowing how these variables are causally related. In practice, this is an important advantage in applications involving high-dimensional feature spaces and metadata, where it is unlikely that domain knowledge about these causal relationships will be available. We also investigate the stability of the proposed approach with respect to (w.r.t.) dataset shifts~\cite{quionero2009}. A standard assumption in supervised ML is that the training and test sets are independent and identically distributed. In practice, however, this assumption is often violated, and dataset shifts are commonly observed in the real world. At the same time, ML models are often capable of leveraging subtle statistical associations between the input ($\bfX$) and outcome ($Y$) variables in the training data, including spurious associations generated by confounders ($\bfC$) and other sources of biases in the data. As a consequence, predictions from confounded learners are often unstable across shifted test sets, and can fail to generalize. We focus on dataset shifts generated by selection biases~\cite{heckman1979,hernan2004,bareinboim2012} affecting the joint distribution of the confounders and outcome variable, $P(\bfC, Y)$. In real word applications, selection biases often lead to the collection of non-representative training sets and represent an important challenge for ML. While simple approaches such as matching and inverse probability weighting can be used to neutralize these issues in situations where the joint distribution of $\bfC$ and $Y$ in the target population is known, here we focus on the case where the test set can be shifted in unknown ways w.r.t. $P(\bfC, Y)$. This more challenging setting requires more sophisticated adjustment methods, which are sometimes applied to the training data alone with the hope that training an unconfounded model will be enough to generate stable predictions in shifted test sets. Here, we show that this is insufficient, and that deconfounding both the training and test set features can produce more stable predictions. \vspace{-0.2cm} \section{Related work} \vspace{-0.2cm} Causal approaches based on counterfactual thinking have been used in the context of ML applications to predict the outcomes of different actions, policies, and interventions using non-experimental data~\cite{bottou2013,swaminathan2015,johansson2016,schulam2017}. The goal is to make ``what if" predictions of the consequences of different actions in order to guide decisions. These approaches, however, are only applicable in situations where the ``treatment" variables correspond to features of the ML model, so that prediction goes in the same direction of the causal effect (i.e., the features influence the response variable). Our approach, on the other hand, focus on static anticausal ML tasks where the response influences the features. Our work is similar in spirit to invariant prediction approaches~\cite{peters2016,ghassami2017,heinze2018,rojascarulla2018,magliacane2018,irm2019} or stable prediction approaches~\cite{kuang2018,subbaswamy2018,subbaswamy2019,kuang2020} in the sense that it can also be used to generate predictions based on the stable properties of the data, without absorbing unstable spurious associations. Invariant prediction approaches, however, rely on multiple training sets to learn invariances while the causality-aware (and stable prediction) approaches only requires a single training set. Some stable prediction approaches require, nonetheless, full knowledge of the causal graph~\cite{subbaswamy2018}, or can only be directly used in causal prediction tasks~\cite{kuang2018,kuang2020}, while the causality-aware method only requires partial knowledge of the causal graph, and is suited to anticausal tasks. (Supplementary Section 1 provides more detailed discussions on these more closely related approaches.) Supervised ML has also been extensively used to aid the estimation of causal effects, where it can potentially attenuate model mispecification issues~\cite{kreif2019}. In particular, supervised ML has been used to: (i) improve the calculation of propensity scores~\cite{mccaffrey2004,westreich2010,lee2010,wyss2014,pirracchio2015,zhu2015}; (ii) fit regression approaches to estimate outcome models~\cite{hill2011,austin2012,hahn2017}; and (iii) also for the development of double-robust approaches that combine propensity score and outcome regression approaches together~\cite{gruber2010,chernozhukov}. In this paper, however, we take an opposite strategy where instead of using ML to improve causal inference we leverage (partial) causal knowledge to improve the explainability and robustness of ML predictions. \section{Preliminaries} Throughout the text we let $\bfX = (X_1, X_2, \ldots, X_{n_X})^T$, $\bfC = (C_1, C_2, \ldots, C_{n_C})^T$, and $\bfM = (M_1, M_2, \ldots, M_{n_M})^T$ represent, respectively, sets of features, confounders, and mediators, \begin{wrapfigure}{r}{0.15\textwidth} \vskip -0.2in $$ {\footnotesize \[email protected]{ & *+[F-:<10pt>]{\bfC} \ar[dl] \ar[dr] \ar[dd] & \\ *+[F-:<10pt>]{\bfX} & & *+[F-:<10pt>]{Y} \ar[ll] \ar[dl] \\ & *+[F-:<10pt>]{\bfM} \ar[ul] & \\ }} $$ \vskip -0.1in \caption{Anticausal prediction task.} \label{fig:causal.anticausal} \end{wrapfigure} while $Y$ represents the response (outcome) variable. The causality-aware counterfactual versions of $\bfX$ and $\bfM$ are represented, respectively, by $\bfX^\ast$ and $\bfM^\ast$. Following~\cite{pearl2009,spirtes2000}, we adopt a mechanism-based approach to causation, where the statistical information encoded in the joint probability distribution of a set of variables is supplemented by a \textit{directed acyclic graph} (DAG) describing our qualitative assumptions about the causal relation between the variables. Following~\cite{scholkopf2012} we denote prediction tasks where the response influences the features as \textit{anticausal prediction tasks}, whereas tasks where the features influence the response are denoted as \textit{causal prediction tasks}. Figure \ref{fig:causal.anticausal} presents the DAG of a general anticausal predictive task, where $\bfX$, $\bfC$, and $\bfM$ are organized into arbitrary DAG subdiagrams (see Supplementary Figure S6 for an illustrative example). \section{The proposed approach} \subsection{The univariate case} For the sake of clarity, we first describe our approach in the special case where $\bfX$, $\bfC$, and $\bfM$ are composed of a single variable. We describe how to use counterfactual reasoning to simulate features where the association between the response and the features is due exclusively to the causal effects of interest. For simplicity, we assume that the data is generated from a standardized linear model\footnote{Note that any linear model $Z^o_k = \mu_k + \Sigma_j \beta_{kj} Z^o_j + U^o_k$, where $Z^o_k$ represents the original data, can be reparameterized into its equivalent standardized form $Z_k = \sum_{j} \theta_{kj} Z_j + U_k$, where $Z_k = (Z^o_k - E(Z^o_k))/\sqrt{Var(Z^o_k)}$ represent standardized variables with $E(Z_k) = 0$ and $Var(Z_k) = 1$; $\theta_{{Z_k}{Z_j}} = \beta_{{Z_k}{Z_j}} \sqrt{Var(Z^o_j)/Var(Z^o_k)}$ represent the path coefficients; and $U_k = U^o_k/\sqrt{Var(Z^o_k)}$ represent the standardized error terms.}, so that the variances of $X$, $C$, $M$, and $Y$ are equal to 1, and the direct causal effect of a variable $Z_j$ on another variable $Z_k$ is represented by the path coefficient~\cite{wright1934}, $\theta_{{Z_k}{Z_j}}$. The anticausal task presented in Figure \ref{fig:causal.anticausal} is represented by the set of structural equations, $C = U_C$, $Y = \theta_{YC} \, C + U_Y$, $M = \theta_{MC} \, C + \theta_{MY} Y + U_M$, and $X = \theta_{XC} \, C + \theta_{XM} \, M + \theta_{XY} \, Y + U_X$, where $U_C$, $U_Y$, $U_M$, and $U_X$ are independent background (residual) variables. Using Wright's method of path analysis~\cite{wright1934}, we have that the total covariance (correlation) between $X$ and $Y$, $$ Cov(X, Y) = \underbrace{\theta_{XY}}_{X \leftarrow Y} + \underbrace{\theta_{XM} \, \theta_{MY}}_{X \leftarrow M \leftarrow Y} + \underbrace{\theta_{XC} \, \theta_{YC}}_{X \leftarrow C \rightarrow Y}~. $$ can be decomposed into the contribution of the direct causal path, $Y \rightarrow X$, the indirect causal path $Y \rightarrow M \rightarrow X$, and the spurious association generated by the backdoor path $X \leftarrow C \rightarrow Y$. Clearly, the predictive performance of any ML model trained with data generated by this model will be biased by the influence of the confounder $C$ since the learner will leverage the total association between $X$ and $Y$ during training. Now, suppose that our goal is to build a ML model whose predictive performance is only informed by the direct influence of $Y$ on $X$ and is free from the influence of $C$, as well as, from the indirect influence of $Y$ that is mediated by $M$. To this end, we need to simulate counterfactual data where the association between $X$ and $Y$ is due exclusively to the direct causal effect of $Y$ on $X$. In other words, we want to simulate counterfactual feature data, $X^\ast$, such that $Cov(X^\ast, Y) = \theta_{XY}$. In theory, this could be done by simulating data according to the twin network\footnote{The twin network approach provides a graphical method for evaluating conditional independence relations between counterfactual and factual variables. The basic idea is to use two networks, one representing the factual world and the other the counterfactual world, which share the same background (residual) variables. The factual network (shown to the left of the residual terms) represents the data generation process for the original data, while the counterfactual network (show to the right of the residual terms) shows the modified causal model.}~\cite{balke1994,pearl2009} in Figure \ref{fig:directtwin}, where the new counterfactual feature data, $X^\ast$, is generated from the model $X^\ast = \theta_{XY} Y + U_X$. (In practice, we can estimate $\theta_{XY}$ and $U_X$ by regressing $X$ on $C$, $M$ and $Y$, and simulate the counterfactual feature data using $\hat{X}^\ast = X - \hat{\theta}_{XC} C = \hat{\theta}_{XY} Y + \hat{U}_X$. In other words, we can employ a variation of Pearl's ``abduction, action, prediction" approach to simulate deterministic counterfactuals~\cite{pearl2009,pearl2016}. In the next subsection we explain in detail how the proposed approach differs from Pearl's approach at the ``action" step.) Direct calculation of the covariance between $X^\ast$ and $Y$ shows that, \begin{align} Cov&(X^\ast, Y) = Cov(\theta_{XY} Y + U_X, Y) = \theta_{XY} \, Var(Y) + Cov(U_X, Y) = \theta_{XY}~. \label{eq:anticausal.direct} \end{align} \begin{wrapfigure}{r}{0.27\textwidth} \vskip -0.1in {\scriptsize $$ \[email protected]{ & & U_X \ar[dll] \ar[drr] & & \\ *+[F-:<10pt>]{X} & & U_C \ar[dl] \ar[dr] & & *+[F-:<10pt>]{X^\ast} \\ & *+[F-:<10pt>]{C} \ar[ul] \ar[ddl] \ar[d] & U_M \ar[dl] \ar[dr] & *+[F-:<10pt>]{C} \ar[rdd] \ar[d] && \\ & *+[F-:<10pt>]{M} \ar[uul] && *+[F-:<10pt>]{M} && \\ *+[F-:<10pt>]{Y} \ar[uuu] \ar[ur] & & U_Y \ar[ll] \ar[rr] & & *+[F-:<10pt>]{Y} \ar[uuu] \ar[ul] \\ } $$} \vskip -0.2in \caption{Twin network approach in the case where the direct effect represents the causal effect of interest.} \label{fig:directtwin} \vskip -0.1in \end{wrapfigure} Supplementary Section 2 describes the cases where the goal is to build a ML model whose predictive performance is only informed by the indirect causal effect of $Y$ on $X$, as well as, when the goal is to capture the predictive performance informed by the spurious associations generated by the confounder alone. At this point, a natural question is whether alternative interventions would also work. In Supplementary Section 3, we show that a requirement for the intervention to work is that $Y$ is not altered by the intervention. Furthermore, in Supplementary Section 4 we also show that node-splitting transformations in SWIGs~\cite{richardson2013} can also be used as alternative interventions. \noindent \textbf{Remarks} It is important to highlight that our proposed interventions are different from Pearl's atomic $do(Z=z)$ interventions, and that our counterfactual approach is implemented using a modification of Pearl's ``abduction, action, prediction" procedure for the computation of deterministic counterfactuals. While in Pearl's approach the action step is enforced by a $do(Z=z)$ intervention, where the causal structural model $Z = f(pa(Z), U_Z)$ is replaced by $Z = z$, our interventions are different. For instance, in the case where the direct effect represents the causal effect of interest, our intervention corresponds to replacing $X = f_X(pa(X), U_X) = f_X(C, M, Y, U_X)$ by $X = f_X(pa(X) \setminus \{C \cup M\}, U_X) = f_X(Y, U_X)$. (Note that while our interventions at the action step differs from Pearl's approach, the abduction and prediction steps are still the same.) Also, from a more ``philosophical" point of view, note that even though our proposed interventions represent a different type of microsurgery on the structural causal models, they are still consistent with Lewis' framework of possible worlds~\cite{lewis2013}. Instead of considering counterfactual worlds that develop from different actions than the actions taken in the factual world, our approach considers counterfactual worlds where the data generation mechanisms/laws are different from the mechanisms/laws of the factual world\footnote{As an example, consider an anticausal prediction task described by the DAG $\[email protected]{C \ar[r] \ar@/^0.5pc/[rr] & X & Y \ar[l]}$, where $Y$ represents the severity score of a disease, $X$ represents a symptom, $C$ represents age, and where the goal is to predict $Y$ using $X$, after removing the spurious association generated by $C$. In our proposed approach, we consider a counterfactual world, $\[email protected]{C \ar@/^0.5pc/[rr] & X^\ast & Y \ar[l]}$, where age no longer influences the symptom $X$. Note that this intervention can be seen as a type of soft or stochastic intervention where the data generation process differs from the natural system only in the mechanism associated with the feature $X$. Related types of soft/stochastic interventions have been studied in~\cite{correiabareiboim2020,kocaoglu2019,eberhardt2007,malinsky2018}.}. Observe, as well, that our interventions operate at the population level, rather than at the individual level. \subsection{The multivariate case} Next, we extend our results to the multivariate case, where the nodes $\bfX$, $\bfC$, and $\bfM$ in Figure \ref{fig:causal.anticausal} represent arbitrary DAG subdiagrams. But first, we describe how we can always reparameterize linear structural causal models in a way that, in practice, we do not need to know how the DAG subdiagrams are organized in order to estimate the causal effects and the residuals employed in the computation of the counterfactual data. \subsubsection{Reparameterization in linear models} For linear structural causal models, we can always reparameterize any arbitrary DAG model to a simpler model where the covariance structure between the observed variables is ``pushed" to the unobserved error terms. Figure \ref{fig:dagsimplification} provides an illustrative example of this well-known fact in the structural equations modelling literature~\cite{sobel1987,bollen1989}. \begin{wrapfigure}{r}{0.58\textwidth} {\footnotesize $$ \[email protected]{ (a) & U_{X_1} \ar[r] & *+[F-:<10pt>]{X_1} \ar[ddl]|-{\theta_{{X_2}{X_1}}} \ar[dddd]|-{\theta_{{X_3}{X_1}}} && (b) & U_{X_1} \ar[r] \ar@/^1.0pc/[ddr]|-{\theta_{{X_2}{X_1}}} \ar@/_3.6pc/[ddddr]|-{\theta_{{X_3}{X_1}} + \theta_{{X_2}{X_1}} \theta_{{X_3}{X_2}}} & W_{X_1} \ar[r] & *+[F-:<10pt>]{X_1} \\ && \\ U_{X_2} \ar[r] & *+[F-:<10pt>]{X_2} \ar[ddr]|-{\theta_{{X_3}{X_2}}} &&&& U_{X_2} \ar[r] \ar@/^1.1pc/[ddr]|-{\theta_{{X_3}{X_2}}} & W_{X_2} \ar[r] & *+[F-:<10pt>]{X_2} \\ && \\ & U_{X_3} \ar[r] & *+[F-:<10pt>]{X_3} &&& U_{X_3} \ar[r] & W_{X_3} \ar[r] & *+[F-:<10pt>]{X_3} \\ } $$} \vskip -0.1in \caption{Original (a) and reparameterized (b) models.} \label{fig:dagsimplification} \end{wrapfigure} The DAG in panel a represents the actual data generation process for the variables $\bfX = (X_1, X_2, X_3)^T$, where the error terms $\bfU_X = (U_{X_1}, U_{X_2}, U_{X_3})^T$ are independent, whereas the DAG in panel b shows the reparameterized model with correlated error terms $\bfW_X = (W_{X_1}, W_{X_2}, W_{X_3})^T$. The set of linear structural causal models describing the DAG in Figure \ref{fig:dagsimplification}a is given by, $\bfX = \bfTheta_{XX} \, \bfX + \bfU_X$, which can be reparameterized as $\bfX = \bfW_X$, where $\bfW_X = (\bfI - \bfTheta_{XX})^{-1} \bfU_X$\footnote{Explicitly, we have that, {\tiny \begin{equation*} \underbrace{ \begin{pmatrix} X_1 \\ X_2 \\ X_3 \\ \end{pmatrix}}_{\bfX} = \underbrace{ \begin{pmatrix} 0 & 0 & 0 \\ \theta_{{X_2}{X_1}} & 0 & 0 \\ \theta_{{X_3}{X_1}} & \theta_{{X_3}{X_2}} & 0 \\ \end{pmatrix}}_{\bfTheta_{XX}} \underbrace{ \begin{pmatrix} X_1 \\ X_2 \\ X_3 \\ \end{pmatrix}}_{\bfX} + \underbrace{ \begin{pmatrix} U_{X_1} \\ U_{X_2} \\ U_{X_3} \\ \end{pmatrix}}_{\bfU_X}~, \;\;\; \underbrace{ \begin{pmatrix} W_{X_1} \\ W_{X_2} \\ W_{X_3} \\ \end{pmatrix}}_{\bfW_X} = \underbrace{ \begin{pmatrix} 1 & 0 & 0 \\ \theta_{{X_2}{X_1}} & 1 & 0 \\ \theta_{{X_3}{X_1}} + \theta_{{X_2}{X_1}} \theta_{{X_3}{X_2}} & \theta_{{X_3}{X_2}} & 1 \\ \end{pmatrix}}_{(\bfI - \bfTheta_{XX})^{-1}} \underbrace{ \begin{pmatrix} U_{X_1} \\ U_{X_2} \\ U_{X_3} \\ \end{pmatrix}}_{\bfU_X}~. \end{equation*}} Note that because model $\bfX = \bfW_X$ is just a reparameterization of model $\bfX = \bfTheta_{XX} \, \bfX + \bfU_X$, we have that the association structure between the $X_j$ variables is still the same after the model reparameterization. Observe, as well, that for any arbitrary DAG, the matrix $(\bfI - \bfTheta_{XX})$ is always invertible (as fully explained in Supplementary Section 5.1).}. Next, we describe the above reparameterization for the arbitrary anticausal predictive task. From the DAG in Figure \ref{fig:causal.anticausal}, we have that the joint distribution of the anticausal prediction tasks is factorized as, \begin{equation*} P(\bfC, Y, \bfM, \bfX) \, = \, P(\bfC) \, P(Y \mid \bfC) \, P(\bfM \mid \bfC, Y) \, P(\bfX \mid \bfC, \bfM, Y)~, \end{equation*} where the components of this factorization are described, respectively, by the structural causal models, \begin{align*} \bfC &= \bfTheta_{CC} \, \bfC + \bfU_C~, \hspace{1.0cm} Y = \bfTheta_{YC} \, \bfC + U_Y~, \\ \bfM &= \bfTheta_{MM} \, \bfM + \bfTheta_{MC} \, \bfC + \bfTheta_{MY} \, Y + \bfU_M~, \\ \bfX &= \bfTheta_{XX} \, \bfX + \bfTheta_{XC} \, \bfC + \bfTheta_{XM} \, \bfM + \bfTheta_{XY} \, Y + \bfU_X~, \end{align*} where $\bfU_C$, $U_Y$, $\bfU_M$, and $\bfU_X$ are vectors of independent error terms with zero mean and finite variance; $\bfTheta_{CC}$, $\bfTheta_{MM}$, and $\bfTheta_{XX}$ represent, respectively, square matrices of dimension $n_C \times n_C$, $n_M \times n_M$, and $n_X \times n_X$, containing the path coefficients connecting the confounders among themselves, the mediators among themselves and the features among themselves; and $\bfTheta_{YC}$, $\bfTheta_{MC}$, $\bfTheta_{MY}$, $\bfTheta_{XC}$, $\bfTheta_{XM}$, and $\bfTheta_{XY}$, represent retangular matrices of path coefficients connecting variables from separate sets. (For instance, $\bfTheta_{MC}$, corresponds to a $n_M \times n_C$ matrix of path coefficients connecting confounder variables to mediator variables, whereas $\bfTheta_{XY}$, corresponds to a $n_X \times 1$ matrix of path coefficients connecting the response to the features.) Using simple algebraic manipulations, we can re-write the above linear structural models as, \begin{align*} \bfC &= \bfW_C~, \hspace{1.0cm} Y = \bfGamma_{YC} \, \bfC + W_Y~, \\ \bfM &= \bfGamma_{MC} \, \bfC + \bfGamma_{MY} \, Y + \bfW_M~, \\ \bfX &= \bfGamma_{XC} \, \bfC + \bfGamma_{XM} \, \bfM + \bfGamma_{XY} \, Y + \bfW_X~, \end{align*} where $W_Y = U_Y$, and $\bfW_V = (\bfI - \bfTheta_{VV})^{-1} \bfU_V$ for $V$ equal to $C$, $M$, or $X$, and $\bfGamma_{YC} = \bfTheta_{YC}$, and $\bfGamma_{ZV} = (\bfI - \bfTheta_{ZZ})^{-1} \bfTheta_{ZV}$ for $\{Z,V\}$ pairs equal to $\{M,C\}$, $\{M,Y\}$, $\{X,C\}$, $\{X,M\}$, and $\{X,Y\}$. Supplementary Section 5 presents a concrete illustrative example of the above reparameterization. \subsubsection{Estimation of causal effects and residuals in the reparameterized model} In practice, our counterfactual approach requires the estimation of causal effects and residuals using regression models. For an anticausal task, we regress each feature $X_j$, $j = 1, \ldots, n_X$, on the set of observed confounders and mediators using the regression equations, $X_j = \sum_{k=1}^{n_C} \gamma_{{X_j}{C_k}} C_k + \sum_{k=1}^{n_M} \gamma_{{X_j}{M_k}} M_k + \gamma_{{X_j}{Y}} \, Y + W_{X_j}$, to estimate the causal effects $\hat{\gamma}_{{X_j}{C_k}}$, $\hat{\gamma}_{{X_j}{M_k}}$, $\hat{\gamma}_{{X_j}{Y}}$, and residuals $\hat{W}_{X_j}$ using least squares\footnote{Here, we assume that the number of samples is larger than the number of covariates in the regression fits, and that multicolinearity is not an issue too. Note that we do not need to assume Gaussian error terms.}, and then generate counterfactual features by adding back the estimated residuals to a linear predictor containing only the causal effects of interest. That is, in order to estimate the predictive performance that is separately due to direct causal effects, indirect causal effects, or confounding, we generate counterfactual features using, respectively, $\hat{\bfX}^\ast = \hat{\bfGamma}_{XY} Y + \hat{\bfW}_X$, $\hat{\bfX}^\ast = \hat{\bfGamma}_{XM} \, \hat{\bfM}^\ast + \hat{\bfW}_X$\footnote{Where, $\hat{\bfM}^\ast = M - \hat{\bfGamma}_{MC} \, C = \hat{\bfGamma}_{MY} \, Y + \hat{\bfW}_M$ is calculated by first fitting the regressing models $M_j = \sum_{k=1}^{n_C} \gamma_{{M_j}{C_k}} C_k + \gamma_{{M_j}{Y}} \, Y + W_{M_j}$, to estimate the causal effects $\hat{\gamma}_{{M_j}{C_k}}$, $\hat{\gamma}_{{M_j}{Y}}$ and error terms $\hat{W}_{M_j}$.}, or $\hat{\bfX}^\ast = \hat{\bfGamma}_{XC} \, \bfC + \hat{\bfW}_X$. Importantly, note that when we regress $X_j$ on $\bfC$, $\bfM$, and $Y$ only the coefficients associated with the parents of $X_j$ in the reparameterized model will be statistically different from zero (for large enough sample sizes). Therefore, in practice, we don't need to know before hand which variables are the parents of $X_j$ in the reparameterized model. The parent set will be learned automatically from the data by the regression model fit. (This, of course, assumes the absence of unmeasured confounders. Supplementary Section 6 provides further remarks on potential identification issues.) \subsubsection{The connection between covariances and causal effects in the multivariate general case} Here, we extend the univariate results of Section 4.1 to the multivariate case (see Supplementary Section 7 for the proofs). \begin{theorem} Consider an anticausal prediction task: \begin{enumerate}[leftmargin=*] \item For causal effects generated by the paths in $Y \rightarrow \bfX$, if $\bfX^\ast$ is given by $\bfX^\ast = \bfGamma_{XY} \, Y + \bfW_X$, then $Cov(\bfX^\ast, Y) = \bfGamma_{XY}$. \item For causal effects generated by the paths in $Y \rightarrow \bfM \rightarrow \bfX$, if $\bfX^\ast$ is given by $\bfX^\ast = \bfGamma_{XM} \, \bfM^\ast + \bfW_X$, and $\bfM^\ast = \bfGamma_{MY} \, Y + \bfW_M$, then $Cov(\bfX^\ast, Y) = \bfGamma_{XM} \, \bfGamma_{MY}$. \item For the spurious associations generated by the paths in $\bfX \leftarrow \bfC \rightarrow Y$, if $\bfX^\ast$ is given by $\bfX^\ast = \bfGamma_{XC} \, \bfC + \bfW_X$, then $Cov(\bfX^\ast, Y) = \bfGamma_{XC} \, Cov(\bfC) \, \bfGamma_{YC}^T$. \end{enumerate} \end{theorem} The above result, together with the estimation approach described In Section 4.2.2, show that by generating causality-aware counterfactual features, $\bfX^\ast$, and then training and evaluating ML learners on this counterfactual data, we are able to leverage only the associations generated by the causal mechanisms of interest. Quite importantly, because the counterfactual data is estimated from the reparameterized model, the approach does not require full knowledge of the causal graph. It suffices to know which variables are confounders and which are mediators. \section{Confounding adjustment in anticausal tasks} \subsection{An algorithmic description for confounding adjustment} When the goal is confounding adjustment, the causality-aware features are generated according to Algorithm 1. \begin{algorithm}[!h] \caption{Causality-aware feature computation in anticausal prediction tasks}\label{alg:counterfactual.adjustment} \KwData{Training data, $\{\bfX_{tr}, \bfC_{tr}, Y_{tr}\}$; test set features and confounders, $\{\bfX_{ts},\bfC_{ts}\}$.} \ShowLn \For{each feature $X_j$} { \ShowLn $\bullet$ Using the training set, estimate regression coefficients and residuals from, $X_{j,tr} = \mu_j^{tr} + \beta_{{X_j} Y}^{tr} \, Y_{tr} + \sum_i \beta_{{X_j} {C_i}}^{tr} \, C_{i,tr} + W_{X_j}^{tr}$, and then compute the respective counterfactual feature as, $\hat{X}_{j,tr}^{\ast} = \hat{\mu}_j^{tr} + \hat{\beta}_{{X_j} Y}^{tr} \, Y_{tr} + \hat{W}_{X_j}^{tr}$. \\ \ShowLn $\bullet$ Using the test set, compute the counterfactual feature, $\hat{X}_{j,ts}^{\ast} = X_{j,ts} - \sum_i \hat{\beta}_{{X_j} {C_i}}^{tr} \, C_{i,ts}$. } \KwResult{Counterfactual features, $\hat{\bfX}^{\ast}_{tr}$ and $\hat{\bfX}^{\ast}_{ts}$.} \end{algorithm} Observe that the algorithm requires test set confounding data (but not the test set labels). Note that for large sample sizes, and under the assumption that the causal effects are stable between the training and test sets, we have that $\hat{\beta}_{{X_j} {C_i}}^{tr} \approx \hat{\beta}_{{X_j} {C_i}}^{ts}$ so that we can estimate the test set counterfactual features without using test set labels since, \begin{align*} X_{j,ts}^{\ast} &= X_{j,ts} - \sum \hat{\beta}_{{X_j} {C_i}}^{tr} \, C_{i,ts} \approx X_{j,ts} - \sum \hat{\beta}_{{X_j} {C_i}}^{ts} \, C_{i,ts} = \hat{\mu}_j^{ts} + \hat{\beta}_{{X_j} Y}^{ts} \, Y_{ts} + \hat{W}_{X_j}^{ts}~. \end{align*} \subsection{Dataset shifts generated by selection biases} In anticausal prediction tasks, dataset shifts in the joint distribution of the confounders and outcome variable, $P(\bfC, Y)$, are often caused by selection biases. The confounded anticausal prediction task influenced by selection bias is described by the causal graph in Figure \ref{fig:anticausal.task}, where the auxiliary \begin{wrapfigure}{r}{0.19\textwidth} \vskip -0.1in $$ \[email protected]{ & *+[F-:<10pt>]{\bfC} \ar[dl] \ar[dr] \ar[r] & *+[F]{S} \\ *+[F-:<10pt>]{\bfX} & & *+[F-:<10pt>]{Y} \ar[ll] \ar[u]} $$ \vskip -0.1in \caption{} \vskip -0.1in \label{fig:anticausal.task} \end{wrapfigure} variable $S$ indicates the presence of a selection mechanism contributing to the association between $\bfC$ and $Y$. (Here, $S$ represents a binary variable which indicates whether the sample was included or not in the dataset, and the square frame around $S$ indicates that our dataset is generated conditional on $S$ being set to 1. Note that, the application of the d-separation criterion~\cite{pearl2009} to the causal graph shows that because $S$ is a collider, we have that, conditional on $S = 1$, the additional path $\bfC \rightarrow S \leftarrow Y$ is open and, therefore, contributes to the association between $\bfC$ and $Y$.) In the stability analysis that we present in the next subsection, we assume that the causal effects $\bfBeta_{XY}$ and $\bfBeta_{XC}$ and the residual covariance, $Cov(\bfU_X)$, are the same across the training and test sets, so that $P(\bfX \mid \bfC, Y)$ is stable. We also assume that the causal effect $\beta_{YC}$ is stable, and that the dataset shifts in $P(\bfC, Y)$ are generated by selection biases. \subsection{Stability under dataset shifts of $P(\bfC, Y)$ generated by selection biases} While it might seen intuitive that training a learner on unconfounded data will prevent it from learning the confounding signal and, therefore, will lead to more stable predictions in shifted target populations\footnote{Examples of approaches that only adjust the training data include pre-processing techniques to reduce discrimination in ML~\cite{calders2009,kamiran2012}.}, here we show that adjusting the training data alone is insufficient, and that better stability can be achieved by deconfounding the test set features as well. Next, we present an analysis of this issue using a toy linear model example (the result, nonetheless, holds for more general linear models, as described in Supplementary Section 8). Consider the causal graph in $\[email protected]{C \ar[r] \ar@/^0.5pc/[rr] & X & Y \ar[l]}$ where $C = U_C$, $Y = \beta_{YC} \, C + U_Y$, and $X = \beta_{XY} \, Y + \beta_{XC} \, C + U_X$, with $E[U_V] = 0$, $Var(U_V) = \sigma^2_V$, for $V = \{C, Y, X\}$. The goal is to predict the outcome $Y$ using the feature $X$. Assume without loss of generality that the data has been centered. Let $\hat{Y} = X_{ts} \hat{\beta}_{tr}$ represent the test set prediction from a linear regression model, where $\hat{\beta}_{tr}$ represents the coefficient estimated with the training data, and $X_{ts}$ represents the test set feature. By definition the expected MSE is given by, \begin{align} E[(Y_{ts} - \hat{Y})^2] &= E[Y^2_{ts}] + E[\hat{Y}^2] - 2 E[\hat{Y} Y_{ts}] = Var[Y_{ts}] + E[\hat{Y}^2] - 2 Cov(\hat{Y}, Y_{ts}) \nonumber \\ &= Var[Y_{ts}] + \hat{\beta}_{tr}^2 Var[X_{ts}] - 2 \hat{\beta}_{tr} Cov(X_{ts}, Y_{ts})~, \label{eq:expected.mse} \end{align} where the expectation is w.r.t. the test set (so that $\hat{\beta}_{tr}$ is a fixed constant w.r.t. the expectation). For any approach which does not process the test set features we have that, \begin{align*} Var(X_{ts}) &= Var(\beta_{XY} Y_{ts} + \beta_{XC} C + U_X) \\ &= \sigma^2_X + \beta_{XY}^2 Var(Y_{ts}) + \beta_{XC}^2 Var(C_{ts}) + 2 \beta_{XY} \beta_{XC} Cov(Y_{ts}, C_{ts})~, \end{align*} \begin{align*} Cov(X_{ts}, Y_{ts}) &= Cov(\beta_{XY} Y_{ts} + \beta_{XC} C_{ts} + U_X, Y_{ts}) = \beta_{XY} Var(Y_{ts}) + \beta_{XC} Cov(Y_{ts}, C_{ts}) \end{align*} showing that both $Var(X_{ts})$ and $Cov(X_{ts}, Y_{ts})$ depend on $Cov(Y_{ts}, C_{ts})$ (so that the $E[MSE]$ will be unstable under dataset shifts of the association between the confounder and the outcome variable). On the other hand, we have that for the causality-aware approach, \begin{equation*} Var(X_{ts}^\ast) = Var(\beta_{XY} Y_{ts} + U_X) = \beta_{XY}^2 Var(Y_{ts}) + \sigma^2_X~, \end{equation*} \begin{equation*} Cov(X_{ts}^\ast, Y_{ts}) = Cov(\beta_{XY} Y_{ts} + U_X, Y_{ts}) = \beta_{XY} Var(Y_{ts})~, \end{equation*} do not depend on $Cov(Y_{ts}, C_{ts})$, so that the $E[MSE]$ will be stable w.r.t. this particular type of dataset shift (although, as shown by eq. (\ref{eq:expected.mse}) it will be still influenced by dataset shifts on $Var(Y_{ts})$). Note that this is true even when we apply a confounding adjustment to the training set (a situation where the $\hat{\beta}_{tr}$ estimate is not influenced by the spurious associations generated by the confounder). This explains why it is not enough to deconfound the training features alone. While training a regression model using deconfounded features allows us to estimate deconfounded model weights, $\hat{\bfBeta}_{tr}$, the prediction $\hat{Y} = \bfX_{ts} \hat{\bfBeta}_{tr}$ is a function of both the trained model $\hat{\bfBeta}_{tr}$ and the test set feature, $\bfX_{ts}$. As a consequence, if we do not deconfound the test set features, the expected MSE will still be influenced by the confounders (since, in anticausal prediction tasks, the original test set features, $X_{j,ts} = \beta_{{X_j}Y} Y_{ts} + \beta_{XC} C_{ts} + U_{X_j}$ are still functions of the confounder variable). This point is described in more general terms in Supplementary Section 9, where we show that the expected value of an arbitrary performance metric is still a function of $C_{ts}$ when the features $X_{j,ts}$ are generated by arbitrary structural causal model $X_{j,ts} = f(Y_{ts}, C_{ts}, U_X^{ts})$, even when we train the ML model using deconfounded training set features, $X_{j,tr}^\ast = f^\ast(Y_{tr}, U_X^{tr})$. \subsection{Synthetic data experiments} We illustrate the above points in synthetic data experiments investigating the influence of dataset shifts in $P(\bfC, Y)$ on the predictive performance (measured by MSE). In order to investigate the influence of shifts in $Var(Y_{ts})$ on the prediction stability, we performed two experiments, where $Var(Y_{ts})$ was kept constant in the first, but was allowed to vary in the second. In both experiments, we compared the causality-aware adjustment against two alternative approaches denoted as \textit{baseline 1} and \textit{baseline 2} adjustments. The \textit{baseline 1} adjustment represents approaches that remove the causal effect of the confounders on the features in the training set alone, while \textit{baseline 2} represents approaches that remove the association between the confounders and the output in the training set alone (see Supplementary Section 10 for further details). For completeness we also report results based on the ``\textit{no adjustment}" approach, where no adjustments are applied to the training or test sets. Each experiment was based on 1,000 replications where, for each replication, we generated training sets with $Var(Y_{ts}) = 1$, $Var(C_{ts}) = 1$, and $Cov(C_{ts}, Y_{ts}) = 0.8$, and 9 distinct test sets showing increasing amounts of dataset shifts in the $P(\bfC, Y)$ relative to the training data. In the first experiment (the fixed $Var(Y_{ts})$ case), this was accomplished by varying $Cov(Y_{{ts}}, C_{{ts}})$ according to $\{0.8$, $0.6$, $0.4$, $0.2$, $0.0$, $-0.2$, $-0.4$, $-0.6$, $-0.8\}$ across the 9 test sets, and by varying $Var(C_{{ts}})$ according to $\{1.00$, $1.25$, $1.50$, $1.75$, $2.00$, $2.25$, $2.50$, $2.75$, $3.00\}$, while keeping $Var(Y_{{ts}})$ fixed at 1. In the second experiment (the varying $Var(Y_{ts})$ case), we varied $Cov(Y_{{ts}}, C_{{ts}})$ as before, but kept $Var(C_{{ts}})$ fixed at 1, while increasing $Var(Y_{{ts}})$ according to $\{1.00$, $1.25$, $1.50$, $1.75$, $2.00$, $2.25$, $2.50$, $2.75$, $3.00\}$ across the test sets. Our experiments were based on linear models containing 10 features and 1 confounder, and on training and test sets containing 1,000 samples. (See Supplementary Section 10 for further details on the synthetic data generation and simulation parameter choices.) The causal effects $\bfBeta_{XY}$, $\bfBeta_{XC}$, and $\beta_{YC}$ and $Cov(\bfU_X)$ were kept constant across the training and test sets in order to guarantee that $P(\bfX \mid \bfC, Y)$ was stable. Figures \ref{fig:mpower.aucs.stability.regr.e1} and \ref{fig:mpower.aucs.stability.regr.e2} report the results for the fixed and varying $Var(Y_{ts})$ cases, respectively. In both figures, panels a to d report boxplots of the MSE scores (y-axis) across 1,000 simulation replications for the 9 test sets (x-axis), while panel e presents a comparison of the stability-errors, defined as the standard deviation of the MSE scores across the 9 test sets in each simulation replication. Figure \ref{fig:mpower.aucs.stability.regr.e1} reports the results for the first experiment. Note that because we kept $Var(Y_{ts})$ constant across the test sets we see perfect stability for the causality-aware approach (panel a). (Observe that varying $Cov(Y_{ts}, C_{ts})$ and $Var(C_{ts})$ has no influence on the stability of the results, since the expected MSE for the causality-aware approach only depends on $Var(Y_{ts})$.) Figure \ref{fig:mpower.aucs.stability.regr.e2} reports results for the second experiment based on increasing $Var(Y_{ts})$ values. As expected, we now observe instability in the causality-aware approach too. The causality-aware predictions, however, are still more stable than the predictions from the other approaches. \begin{figure*}[!h] \centerline{\includegraphics[width=\linewidth]{synthetic_data_stability_regression_e1}} \vskip -0.1in \caption{Synthetic data experiment results for the fixed $Var(Y_{ts})$ case.} \label{fig:mpower.aucs.stability.regr.e1} \end{figure*} \begin{figure*}[!h] \centerline{\includegraphics[width=\linewidth]{synthetic_data_stability_regression_e2}} \vskip -0.1in \caption{Synthetic data experiment results for the increasing $Var(Y_{ts})$ case.} \label{fig:mpower.aucs.stability.regr.e2} \end{figure*} \section{Final remarks} This paper has three main contributions. First, we describe a novel counterfactual approach to train ``causality-aware" predictive models, which leverages only the associations generated by the causal mechanisms of interest. Second, by leveraging a reparameterization of the linear structural causal models (described in Section 4.2.1), we show that the approach does not require full knowledge of the data generation process. It suffices to know which variables are confounders and mediators, without knowing how these variables are causally related. This represent an important practical advantage of the method relative to alternative approaches such as counterfactual normalization~\cite{subbaswamy2018}, which requires knowledge of the full causal graph. Third, we investigate the stability properties of the method w.r.t. dataset shifts generated by selection biases. We show that the $E[MSE]$ for adjustment approaches that fail to deconfound the test set features will be unstable w.r.t. shifts in $Cov(\bfC, Y)$, even when the ML models are trained with unconfounded data (and there are no shifts in $Var(Y_{ts})$). This is an important observation that (we feel) is not well appreciated in the ML community. One important drawback of the approach is its reliance on the linearity assumption. The present work, however, represents a first step that, we believe, will serve as inspiration for more flexible approaches. Along these lines, in a separate contribution~\cite{achaibubneto2020c} (where we compare the causality-aware approach against the residualization confounding adjustment - an ad-hoc approach, widely used in applied fields such as neuroimaging), we describe an extension of the causality-aware approach to additive models. Furthermore, in another separate contribution~\cite{achaibubneto2020b}, we also describe how the causality-aware approach (based on linear models) can still be used to deconfound the feature representations learned by deep neural network models in classification tasks. The key idea is that by training a highly accurate DNN using softmax activation at the classification layer, we have that, by construction, the feature representation learned by the last layer prior to the output layer will fit well a logistic regression model (since the softmax activation used to classify the outputs of the DNN is essentially performing logistic regression classification). This reference illustrates the practicality of the causality-aware approach in real world applications. (Finally, while this work has focused on anticausal tasks, we present some analogous results for causal prediction tasks in Supplementary Section 11.)
\section{Introduction} \label{SEC:Introduction} In 1990 the US Congress requested for NASA to establish two workshops to focus on the identification of potentially hazardous small bodies and on methods of altering their orbits to prevent impact \citep{milani2002}. The workshops led to the establishment of the \textit{Sentry earth impact monitoring} system \citep{Sentry}. If a hazardous asteroid is identified early enough prior to impact, it would be possible to mitigate the impact by means of an appropriate space mission to alter the asteroid's orbit through a gravitational tugboat \citep{10.2307/26060526} or by obliterating it with a nuclear warhead \citep{BARBEE201837}. Both mitigation strategies require many years of preparation, which makes the early detection of hazardous objects vital for allowing ample time to prepare such missions. The Sentry system adopts a Monte Carlo approach in which millions of virtual objects are launched with orbital parameters that are statistically sampled from within the error ellipse of the observed asteroids. The impact probability is subsequently determined based on the fraction of virtual asteroids that reach Earth within some predetermined striking distance \citep{milani2002}. In this approach, the orbits of many asteroids are integrated numerically and the final parameter space is considered to represent the probability-density distribution of the respective objects. The calculation of this probability density distribution relies on the algorithm and implementation used to integrate the orbits of the asteroids. The time scale over which such integrations remain reliable depends on the degree to which the asteroid's orbit is chaotic, that is, it depends on the value of the largest positive Lyapunov exponent. Additionally, the reliability of such integrations depends on the ability of the integrator to obtain a solution, such that the integration complies to the concept of nagh Hoch\footnote{Nagh Hoch is a concept stating that an ensemble of random initial realizations in a wide range of parameters gives statistically the same result as the converged solutions of the same ensemble of realizations.} \citep{PORTEGIESZWART2018160}. \par Both of these concepts are not guaranteed with regard to the adopted numerical schemes and the results reach questionable proportions as soon as the asteroid experiences a close encounter with any object other than the Earth. In the latter case, the phase space of possible solutions grows exponentially due to the chaotic nature of the equations of motion. Establishing the chaotic nature of an asteroid is limited by the accuracy of its orbital determination. This is generally realized by observing any particular asteroid a number of times. These observations result in a data arc, the fraction of the orbit over which the object has been observed. The adopted Monte-Carlo method used in the Sentry system is expected to be reliable for at most a few dozen years \citep{HorizonsManual} for asteroids whose observed data arc is shorter than a month, which comprises 12.9\% of all smallbodies \citep{dastcom5}. Considering the high degree of chaotic motion (small Lyapunov time scale) in asteroids and the consequential exponential divergence of its orbit, one might wonder if it is worth the effort to perform extensive computer simulations to track the orbital trajectories of a large number of particles so long as the veracity of the orbital integration cannot be guaranteed. For the most chaotic asteroids, the impact probability depends acutely on the statistics of the adopted method and a more coarse grained approach to identify potentially hazardous objects may suffice. This approach would free up computer time to provide a more reliable impact probability for the most promising candidate impostors. We explore the population of asteroids and, in particular, the potentially dangerous ones by means of automatic machine recognition through a combination of numerical integrations and a trained neural network similar to the architectures described in \citet{ref1} and \citet{ref2}, which were used for classifying hazardous taxonomy and solar sail transfer time estimation respectively. It is a statistical approach in which we determine the prospect for impact of the known population of asteroids gathered from the \textit{dastcom5} off-line database \citep{dastcom5}. Our analysis is mediated by an artificial neural-network dubbed HOI\footnote{This also means ``Hello'' in the Dutch language.} for Hazardous Object Identifier, which was trained on a population of known impactors (KI) and a random sample from the observed database using the \textit{TensorFlow} framework \citep{TensorFlow}. The KIs are machine-generated from an integrated population of asteroids that start their orbit on a random position of Earth's surface and are launched radially away with the varying speeds. These objects are subsequently integrated backward in time together with the planets in the Solar System for up to 20,000 years. To train HOI, these computer generated KIs are then mixed with a subset of observed asteroids, which we assume to be known non-impacting objects. The trained network is then used on another random selection of observed asteroids in order to identify potential impactors (PIs). All the objects that were not identified by the model as PIs, which were not initially labeled as KIs, are referred to as unidentified objects (UOs). We begin by describing HOI's architecture in Section\,\ref{SEC:arch}, followed by a discussion of the generation of the small-body datasets in Section\,\ref{SEC:Data}. The results are examined in Section\,\ref{SEC:Results} and conclusions are drawn in Section\,\ref{SEC:Conclusions}. All the code used to train the neural network, generate data, and evaluate the results are publicly available on GitHub\footnote{ \url{https://github.com/mrteetoe/HOI}}. \section{Hazardous Object Identifier (HOI)} \label{SEC:arch} In general, neural networks are particularly well-suited for recognizing complex patterns hidden in multidimensional datasets. In our particular case, we strive to identify observed objects that have topologically similar trajectories to the trajectories of the population of KIs. Because we are no longer reliant on calculations that attempt to estimate the asteroids position at a particular point in time, the network is more resilient to perturbations of the initial conditions, that is, chaotic motion. The problem at hand is a discrete binary classification task, where the two mutually exclusive classes for the observed objects are either potential impactors (PIs) or unidentified objects (UOs). For the purpose of our experiments, the UOs are what we would consider ``benign objects'', meaning objects that are identified as having a negligible chance of colliding with the Earth. To quantify the network's accuracy, the standard cross-entropy cost function is used. This is defined as: \begin{equation} \label{cost_function} H(y,\hat{y})=-\sum_i^{N} y_i \text{ln}(\hat{y}_i)+(1-y_i)\text{ln}(1-\hat{y}_i). \end{equation} Here $y$ is the actual value, or label, $\hat{y}$ is the predicted value, and $N$ is the total amount of predictions. This cost function has the convenient property that its derivative with respect to some input weight, $w$, scales linearly with the difference between the label and predicted value \citep{Nielson}: \begin{equation} \frac{\partial C}{\partial w}=\frac{1}{N}\sum^{N}_i x(\hat{y}_i-y_i) \end{equation} Here $x$ is the input value by which $w$ is multiplied. To minimize (\ref{cost_function}), the \textit{Adam Optimizer} is used, which expands upon na\"{i}ve stochastic gradient descent by adapting its learning rate based on both the average of the first and second moments of the gradients \citep{AdamOptimizer}. Empirically, it is observed that this optimizer reduces the cost function to the lowest value with the fewest number of iterations relative to the other algorithms available in TensorFlow. \par Each object fed into the HOI is represented by a five-element vector where each vector is the Keplerian elements of the asteroid around the sun including the semi-major axis (\textit{a}), eccentricity (\textit{e}), inclination (\textit{i}), the mean speed (\textit{N}), and the specific angular momentum (\textit{H}). These five orbital elements fully characterize the shape of an asteroid trajectory around the sun, but not its orientation as the longitude of the ascending node $\Omega$ and argument of periapsis $\omega$ are omitted. \par \begin{figure}[t] \hspace*{-0.4cm} \includegraphics[width=83mm]{1_network_hoi.png} \centering \caption{\label{FIG:HOI_Design} HOI network architecture. The input layer is comprised of five nodes, which is followed by two hidden layers of seven and three nodes, and an output layer of a single node.} \end{figure} A diagram showing the HOI architecture is presented in Fig. \ref{FIG:HOI_Design}. The input layer is a vector of $five$ neurons that matches the dimensionality of the input, which is followed by two hidden layers that are composed of seven and three neurons, respectively, from the input layer. The output layer is composed of a single neuron whose values are restrained between 0 and 1 by virtue of the sigmoid function. Here, objects with a rating of 0.5 or above are classified as PI while those below the threshold are classified as UO. This neural network architecture was arrived at by a combination of empirical experimentation and the incorporation of domain knowledge. We wanted to provide the network with enough degrees of freedom to properly generalize the orbital elemental profiles of KI but to avoid giving it so many degrees of freedom that the network would overfit to the training datasets. \par The described architecture results in 69 free parameters: 59 weights and ten biases \footnote{Following the architecture described, the number of free parameters can be calculated as follows: the input is fed through layers which are comprised of 7, 3, and 1 neuron(s). This results in 5$\times$7+7$\times$3+3$\times$1 weights and 7+3 biases, as only the hidden layers have bias parameters.}. To optimize these parameters, the network is trained on five randomly selected sub-sets of 100,000 observed and KI objects over 20 epochs, which took less than five minutes on a CPU-type laptop without a GPU. The training was halted when the relative loss decrease per epoch was less than $1\%$ to prevent overfitting. At the end of the training process, the network's performance was validated with a subset of 20,000 KI and 20,000 observed objects that had been held out of the training process. Furthermore, all potentially hazardous objects (PHOs)\footnote{All objects with a minimum orbit intersection distance of 0.05 AU or less and an absolute magnitude (H) of 22.0 or less are considered PHOs \citep{NasaPHA}.} were held out of the training process and used exclusively for testing purposes. Fig. \ref{FIG:loss} shows how the training and validation loss decreased per training epoch, while the fraction of PHO hazardous objects identified simultaneously increased. \begin{figure}[t] \hspace*{-0.3cm} \includegraphics[width=83mm]{cost_curve_val.png} \centering \caption{\label{FIG:loss} Normalized training and validation losses plotted against the training epoch number, along with the fraction of PHOs identified by the network.} \end{figure} We gave the observed objects and KIs labels of 0.1 and 0.9, respectively. Here, higher numbers correspond with a larger probability of colliding with Earth. The label of 0.9 was chosen for the KIs to represent calculations of the KI trajectories which are not converged solutions \citep{2014ApJ...785L...3P} and to show that several perturbing effects in the Solar System were neglected during the simulations, implying that all of the KIs will, in fact, not collide with Earth when their respective velocities are negated. To arrive at the label of 0.1 for the observed objects, we assumed that any individual observed object is very likely to be benign by the following logic: first, all of the PHOs which have considerably larger probability to collide with the Earth compared with the rest of the observed population are not used in HOI training. As a result, their labeling does not degrade the network's ultimate performance. Second, impacts from large objects are rare \citep{Chapman} as the impact frequency of an asteroid collision decreases with the cube of an asteroid's diameter. Earth collisions with 5 kilometer asteroids occur approximately every 20 million years, while those with a 100 meter asteroids occur every 500 years \citep{Bostrom}. Because 98.4\% of the observed objects used for our experiments are greater than 100 meters in diameter\footnote{This assumes an albedo of 0.15 for all small bodies.}, we can use the following formula to estimate an upper-bound of the number of expected Earth impacts from asteroids in our sample within the next 20,000 years: \begin{equation} \label{num_collisions} N_{collisions}=\int^{\infty}_{100}\frac{4\times10^7}{D^3}=2000, \end{equation} Where $D$ is the diameter of an asteroid. Given that over 700,000 objects were used in HOI training, the number of 2000 mislabeled objects implies that 0.3\% of the observed labels are inaccurate. As discussed further in the following sections, although our sample contains only a small fraction of misclassified non-impactors, they still may effect the ability of HOI to accurately identify an impactor. \section{Data generation and acquisition} \label{SEC:Data} \subsection{Observed objects} We extracted $736,496$ minor bodies from NASA's \textit{dastcom5} database \citep{dastcom5}. A percentage of 95.5\% of the extracted objects are main-belt asteroids, 3.2\% are asteroids that are not in the main belt (such as Apollo or Trojan asteroids), 0.7\% are comets, 0.2\% are Kuiper-belt objects, and the remaining 0.4\% is composed of a plethora of miscellaneous objects, such as planetary satellites and centaurs \citep{SolarSystemObjects}. These proportions, however, are not representative of the actual small-body populations because there is considerable observational bias towards the closer main-belt asteroids in comparison with more distant objects \citep{KBO_Population}. \subsection{Generating a database of known impactors} We generated an ensemble of 330,000 KIs according to Algorithm \ref{generate-ki} to act as examples of hazardous objects. Here virtual objects are launched from future positions of Earth's surface and then integrated backward in time to the present era. The idea is that the virtual objects' trajectories would be similar to that of an asteroid observed in the present that would strike the Earth or come very close to it at some point in the future. \footnote{An object, for example, that is launched from the Solar System at the year 2318, and is then integrated backwards in time 300 years, would create an example of a present day asteroid that would strike the Earth in 300 years after the velocity vectors are negated to account for the time reversal. As explained in Section \ref{SEC:arch}, the asteroids are not guaranteed to collide with Earth due to the finite precision of the integrations.} \begin{algorithm}[h] \caption{KI generation algorithm. Here, $T_0$ is the earliest Solar System orientation, $T_1$ is the latest orientation, $n$ is the number of KIs, and $\Delta T=(T_1-T-0)/n$}\label{generate-ki} \begin{algorithmic}[1] \State{T=$[T_0, T_0 + \Delta t, T_0 + 2 \Delta t, ..., T_0 + (n-1) \Delta t, T_1]$} \For{each $\tau$ in $T$} \State \parbox[t]{\dimexpr\textwidth-\leftmargin-\labelsep-\labelwidth}{Initialize the Solar System's planets' velocities and \\ positions with values corresponding to epoch \textit{$\tau$}.} \State \parbox[t]{\dimexpr\textwidth-\leftmargin-\labelsep-\labelwidth}{Launch a virtual object perpendicularly from Earth's \\ surface with a velocity magnitude randomly drawn \\ from an even distribution between 15 and 45km/s.} \State \parbox[t]{\dimexpr\textwidth-\leftmargin-\labelsep-\labelwidth}{Integrate the object backward in time along with all \\ other Solar System objects until the present epoch.} \State \parbox[t]{\dimexpr\textwidth-\leftmargin-\labelsep-\labelwidth}{If the object has left the Solar System or spun into the \\ sun, discard it and rerun the simulation.} \EndFor \end{algorithmic} \end{algorithm} The future launch dates, defined by the orientation of the Solar System, are evenly distributed between 300 and 20,000 years in the future, which correspond to $T_0$ and $T_1$ values of 2318 and 22018, respectively. The launching velocities are selected to bracket the Earth's and Solar System's escape speeds of 11.2 and 42.5km/s, respectively. We deliberately did not attempt to mimic the observed asteroid impact velocities to allow the neural network to learn from the full range of parameters, rather than just based on a hand-selected subsample. \section{Results} \label{SEC:Results} \subsection{Identifying Earth-impacting asteroids} The training of the network led to the positive identification of 95.25\% of the KIs that were not part of the training and 90.99\% of the PHOs as PIs. Additionally, 1.94\% of the observed objects that were not classified as PHOs were identified as PIs. The high fraction of correctly identified KIs indicates that HOI positively recognizes most objects that are constructed to strike Earth. This result is not unexpected because HOI was specifically tuned to identify artificial KI objects. A more meaningful metric of performance is the percentage of PHOs identified. Although 9.01\% PHOs were not classified as potential impactors, HOI is approximately 47 (90.99/1.94) times more likely to select a PHO over some other observed object. To further evaluate the effectiveness of HOI, we performed simulations to compare the closest Earth approaches of PIs and UOs. To run these simulations, we began by loading the positions and velocities of the asteroids and other Solar System objects corresponding to January 1, 2018. We then integrated all of the bodies forward in time for a thousand years while saving the closest approach that the asteroids made relative to Earth. The trajectories of all the 14,680 observed PIs and an equal number of randomly selected UO asteroids were computed. The distributions of the closest Earth approaches achieved during these simulations are plotted in Fig. \ref{FIG:Closeness_Histogram}. \begin{figure}[h] \hspace*{-0.35cm} \includegraphics[width=83mm]{3_Closest_Approach_Together.pdf} \centering \caption{\label{FIG:Closeness_Histogram} Closest approaches to Earth achieved in the next 1000 years for all the observed PIs and an equal number of randomly selected UOs. 108 PIs and 884 UOs are not plotted because their closest approaches exceeded the x-axis limits of 2 \,au. Every object that reach Earth within 0.01\,au and 99.9\% of objects within 0.05\,au are identified by HOI as PIs. } \end{figure} To investigate why HOI only identified approximately nine-tenths of PHOs as PIs, the thousand-year integrations described above were additionally performed for all PHOs. We present in Fig.\, \ref{FIG:Closeness_PHOs} the distributions of these closest approaches. The distributions of identified PHOs and unidentified PHOs are similar, therefore the fraction of PHOs identified as PIs could be used as a measure of the network's performance. Additionally, all objects that did not approach Earth within at least 0.5\,au could be considered misclassified PIs. This cut-off is not arbitrary but based, rather, on the minimum distance achieved by approximately 99.7\%, or $3\sigma$, of PHOs. In the case of HOI, 12.2\% of the PIs are outside of this threshold and are therefore considered misclassified. The root of this misclassification likely stems from the approximations made in the labeling schemes described in Section \ref{SEC:arch}. \begin{figure}[h] \hspace*{-0.44cm} \includegraphics[width=85mm]{closest_approach_PHO.png} \centering \caption{\label{FIG:Closeness_PHOs} Closest approach distances to Earth reached for PHOs in the coming 1000 years.} \end{figure} A total of $13,258$ asteroids identified by HOI as KIs are not listed by NASA as PHOs. In our thousand-year integrations, $4472$ of these objects approached within 0.05\,au of Earth while $2015$ approached within 0.02\,au. In Table.\,\ref{TAB:Short_List} we present a short list of 11 notable asteroids with absolute magnitudes of less than 22, data arcs of less than 31 days, and closest approaches less than 0.02\,au. \begin{table}[] \begin{tabular}{lcrlr} \hline \hline \bf{Designation} & \bf{CA} & \bf{$t_{\rm CA}$} & \bf{H} & \bf{arc} \\ & [au] & [Year] & [mag] & [day] \\ \hline 2005 RV24 & 0.020 & Feb. 2374 & 20.60 & 28 \\ 2008 UV99 & 0.013 & April 2332 & 20.03 & 1 \\ 2011 BU10 & 0.006 & April 2920 & 21.30 & 18 \\ 2011 HH1 & 0.012 & July 2923 & 21.7 & 13 \\ 2011 WC44 & 0.018 & Feb. 2679 & 20.5 & 31 \\ 2013 AG76 & 0.013 & Dec. 2638 & 20.3 & 24 \\ 2014 GL35 & 0.018 & July 2556 & 20.6 & 23 \\ 2014 TW57 & 0.017 & Sept. 2165 & 20.1 & 24 \\ 2014 WD365 & 0.017 & Sept. 2735 & 19.7 & 5 \\ 2017 DQ36 & 0.013 & Dec. 2131 & 19.3 & 29 \\ 2017 JE3 & 0.016 & July 2741 & 21.9 & 23 \\ \hline \hline \vspace{0.5cm} \end{tabular} \label{TAB:Short_List} \caption{Potential impactor shortlist: relatively large minor bodies with a short data arcs that were identified as PIs by HOI but are not considered PHOs. Along with their closest approaches (CA) in au, the month and year that their closest approaches occurred ($t_{\rm CA}$), their absolute magnitudes (H), and their data arc lengths in days (arc) are tabulated.} \end{table} The absolute magnitude threshold of 22 was chosen so that only asteroids that have the potential of causing regional devastation unprecedented in human history would make the shortlist. Assuming a geometric albedo between 0.05 and 0.25 and a spherical shape, objects with an absolute magnitude of 22 are estimated to have diameters between from 100\,m to 236\,m. For perspective, Tunguska object which flattened 2,000 square kilometers of forest in Siberia was estimated to have a diameter of between 50-80\,m \citep{Tunguska}. The month long data-arc limit is selected because the Monte-Carlo method adopted by NASA is particularly ill-suited for calculating the impact probabilities of such uncertain orbits. As a consequence, these objects are the most likely to be overlooked as PHOs. \subsection{Comparing various populations of object} The characteristics of the simulated KIs and the observed objects are compared to better understand how HOI differentiates between the two populations. In Fig. \ref{FIG:Object_Trajectories} we present 100 trajectories of observed objects and KIs. \begin{figure*}[t!] \hspace*{-0.40cm} \includegraphics[width=170mm]{5_Trajectories.pdf} \centering \caption{\label{FIG:Object_Trajectories} Illustration of the difference between the trajectories of observed objects (left) and KIs (right). The observed objects tend to have circular orbits which lie in the orbital plane of Earth around the Sun, whereas the KIs exhibit a much broader distribution in eccentricity and inclination. These characteristics, however, are not mutually exclusive and could be one the root causes of HOI's imperfect classification.} \end{figure*} There are profound differences between the orbital elements of the two distinct populations of objects. Our artificial population of objects launched from Earth tend to have highly eccentric and inclined orbits, whereas the observed objects tend to have circular orbits confined near the ecliptic plane. For the observed objects, the orbital plane is essentially empty within approximately 2\,au of the Sun, while for the KIs this is the most densely occupied space. This object distribution should be expected considering that all the KIs were generated $1\pm0.017$\,au away from the Sun along the Earth's orbit and that the integration times were not sufficiently long enough to allow considerable outward migration of the objects. The \textit{a} versus \textit{e} ratio is an important factor in an object's identification, as illustrated in Fig. \ref{FIG:AvsE}. A curve is drawn to highlight an apparent ``classification boundary'', which is above 95.2\% of PI and below 90.3\% of unidentified observed objects. Although the boundary is an indicator of an object's potential classification, it is not definite, which is understandable considering that HOI takes five orbital elements as input for each object instead of just the \textit{a} and \textit{e} orbital elements. \section{Conclusions} \label{SEC:Conclusions} We designed, constructed, and trained a fairly simple neural network aimed at classifying asteroids with the potential to impact the Earth over the coming $20,000$ years. Our method takes the observed orbital elements as input and provides a classifier for the expectation value for the object's striking Earth. The network was able pick out 95.25\% of the KIs when mixed into a set of observed asteroids which are not expected to strike Earth. When applied to the entire population of observed asteroids, the network was able to identify approximately nine-tenths of the asteroids identified by NASA as PIs and along with virtually every other observed asteroid that approached within 0.05\,au of Earth. We generated a short list of network identified PIs which NASA does not label as PHOs, mainly because the observed orbital elements are so uncertain that NASA's Monte Carlo approach to determine their Earth-striking probability fails. The network classifies an object as a PI or UO within $0.25$ milliseconds, which is negligible compared to the time required for the Monte-Carlo method employed by NASA. \begin{figure*}[t!] \hspace*{-0.50cm} \includegraphics[width=170mm]{6_AvsE.pdf} \centering \caption{\label{FIG:AvsE} Plots the semi-major axis versus the eccentricity for 2,000 PI, UO and KI objects, respectively, from top to bottom. The dotted blue lines represent the aphelion and perihelion distances of Earth's orbit and the teal curves represent the ``classification boundary'' where objects below are likely to be classified as PIs and those above are likely to be classified as benign.} \end{figure*} Follow-up calculations over a time-span of 1000 years revealed that 12.2\% of the PIs identified by the network did not come within 0.5\,au of Earth. This may imply that thee asteroids pose no direct threat on the time scale considered. Integrating their orbits for a longer time-frame, however, this is impractical because of the large uncertainty in their orbital elements and the relatively small Lyapunov timescale for these objects. We look forward to improving the network's classification accuracy. The network, as we show in Fig.\,\ref{FIG:HOI_Design}, is the result of a great deal of experimentation in network depth, width, and (sub)selection input parameters. It is possible that the structure preserving mimetic architectures motivated by the underlying Keplerian topology of the orbits could allow us to achieve a higher quality of prediction accuracy but this still requires a considerable degree of further experimentation. Another improvement could be carried out by considering a stricter labeling scheme in which some probability statistics for impacting the Earth could be taken into account. \begin{acknowledgements} We thank the Microsoft Cooperation for access to the Azure cloud on which many of the calculations presented here are performed. John D. Hefele thanks Sander van den Hoven for his mentoring during his internship at Microsoft Amsterdam. This work was supported by the Netherlands Research School for Astronomy (NOVA), NWO (grant \# 621.016.701 [LGM-II]). \end{acknowledgements} \bibliographystyle{aa}
\section*{Appendix}\label{sec:spp} In the following, we prove the equivalence between the $H_0$-conditional MSE in (\ref{eq:idealloss}) and the unconditional weighted MSE in (\ref{eq:idealloss2}). Let us focus on the first term of the loss in (\ref{eq:idealloss}), i.e.: \begin{equation}\label{eq:app1} \begin{split} \mathcal{L}_1(\vartheta)&=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\left.\delta(\boldsymbol{X},\hat{\boldsymbol{X}})\:\right|H_0\right]=\\ &=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\left.\delta(\boldsymbol{X},G(\boldsymbol{Y}))\:\right|H_0\right]. \end{split} \end{equation} Plugging the expression of the $L_2$ squared distance into (\ref{eq:app1}) leads to: \begin{equation} \mathcal{L}_1(\vartheta)=\frac{1}{n}\sum_{i=1}^n\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\left.||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\:\right|H_0\right], \end{equation} where $n=h\cdot w$ and $G_i(\boldsymbol{Y})$ is the vector corresponding in $G(\boldsymbol{Y})$ to the $i$-th pixel of the patch ($i=1,2,\ldots,n$). We assume that the sample pairs $(\boldsymbol{x}_i,\boldsymbol{y}_i)$ associated with the pixels in the patch are mutually independent when conditioned to the ``no-change" hypothesis $H_0$, and that all $\boldsymbol{x}_i$ and $\boldsymbol{y}_i$ vectors are continuous random vectors ($i=1,2,\ldots,n$). The former is a rather classical conditional independence assumption, which is frequently accepted in change detection studies~\cite{bovolo2015time,mercier2008conditional,akbari2016polarimetric,solarna2018markovian}. The latter is very common, and the reformulation in the case of discrete or mixed variables is straightforward. Accordingly: \begin{equation}\label{eq:app2} \begin{split} \mathcal{L}_1(\vartheta)&=\frac{1}{n}\sum_{i=1}^n\mathbb{E}_{\boldsymbol{x}_i,\boldsymbol{Y}}\left[\left.||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\:\right|H_0\right]=\\ &=\frac{1}{n}\sum_{i=1}^n\int||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\,p(\boldsymbol{x}_i,\boldsymbol{Y}|H_0)\,d\boldsymbol{x}_i d\boldsymbol{Y}, \end{split} \end{equation} where $p(\boldsymbol{x}_i,\boldsymbol{Y}|H_0)$ is the joint probability density function (PDF) of $\boldsymbol{x}_i$ and $\boldsymbol{Y}$ conditioned to $H_0$, and the Lebesgue integral is implicitly extended over the whole multidimensional space of all components of $\boldsymbol{x}_i$ and $\boldsymbol{Y}$. Thanks to the law of total probability ($i=1,2,\ldots,n$): \begin{equation} p(\boldsymbol{x}_i,\boldsymbol{Y})=P(H_0)p(\boldsymbol{x}_i,\boldsymbol{Y}|H_0)+P(H_1)p(\boldsymbol{x}_i,\boldsymbol{Y}|H_1), \end{equation} where $p(\boldsymbol{x}_i,\boldsymbol{Y})$ is the unconditional joint PDF of $\boldsymbol{x}_i$ and $\boldsymbol{Y}$, $p(\boldsymbol{x}_i,\boldsymbol{Y}|H_1)$ is their joint PDF conditioned to $H_1$, and $P(H_0)$ and $P(H_1)$ are the prior probabilities of the two hypotheses. Straightforward algebraic manipulations allow proving that: \begin{equation}\label{eq:app5} p(\boldsymbol{x}_i,\boldsymbol{Y}|H_0)=\psi(\boldsymbol{x}_i,\boldsymbol{Y})p(\boldsymbol{x}_i,\boldsymbol{Y}), \end{equation} where: \begin{equation}\label{eq:app3} \psi(\boldsymbol{x}_i,\boldsymbol{Y})=\frac{1}{P(H_0)+P(H_1)\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})} \end{equation} and where: \begin{equation} \Lambda(\boldsymbol{x}_i,\boldsymbol{Y})=\frac{p(\boldsymbol{x}_i,\boldsymbol{Y}|H_1)}{p(\boldsymbol{x}_i,\boldsymbol{Y}|H_0)} \end{equation} is the likelihood ratio associated with the two hypotheses~\cite{VanTrees}. Plugging (\ref{eq:app5}) into (\ref{eq:app2}) yields: \begin{equation} \begin{split} \mathcal{L}_1(\vartheta)&=\frac{1}{n}\sum_{i=1}^n\int||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\,\psi(\boldsymbol{x}_i,\boldsymbol{Y})p(\boldsymbol{x}_i,\boldsymbol{Y})\,d\boldsymbol{x}_i d\boldsymbol{Y}=\\ &=\frac{1}{n}\sum_{i=1}^n\mathbb{E}_{\boldsymbol{x}_i,\boldsymbol{Y}}\left[||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\,\psi(\boldsymbol{x}_i,\boldsymbol{Y})\right]=\\ &=\frac{1}{n}\sum_{i=1}^n\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\,\psi(\boldsymbol{x}_i,\boldsymbol{Y})\right], \end{split} \end{equation} where in the last equality the conditional independence of the $(\boldsymbol{x}_i,\boldsymbol{y}_i)$ pairs ($i=1,2,\ldots,n$) has been used again. Given the notation in (\ref{eq:delta}) for the weighted $L_2$ squared loss, we can conclude that: \begin{equation}\label{eq:app4} \begin{split} \mathcal{L}_1(\vartheta)&=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\frac{1}{n}\sum_{i=1}^n||G_i(\boldsymbol{Y})-\boldsymbol{x}_i||_2^2\,\psi(\boldsymbol{x}_i,\boldsymbol{Y})\right]=\\ &=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\delta(\boldsymbol{X},G(\boldsymbol{Y})|\boldsymbol\Psi)\right]=\\ &=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\delta(\boldsymbol{X},\hat{\boldsymbol{X}}|\boldsymbol\Psi)\right], \end{split} \end{equation} where $\boldsymbol\Psi$ is the $n$-dimensional vector collecting all terms $\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ that weigh the $L_2$ loss (i.e., $\Psi_i=\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ for $i=1,2,\ldots,n$). This proves the equivalence, under the aforementioned conditional independence assumption, between the $H_0$-conditional MSE term involving $\boldsymbol{X}$ and $\hat{\boldsymbol{X}}$ in (\ref{eq:idealloss}) and the corresponding term in the unconditional weighted MSE in (\ref{eq:idealloss2}). The same argument can be used to prove the equivalence between the MSE terms involving $\boldsymbol{Y}$ and $\hat{\boldsymbol{Y}}$. Furthermore, focusing on the $i$-th pixel of the patch ($i=1,2,\ldots,n$), we note that the likelihood ratio $\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})$ takes values in $[0,+\infty)$. Hence, according to (\ref{eq:app3}), $\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ takes values in $(0,1/P(H_0)]$. Specifically, small values of $\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ are obtained in the case of large values of $\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})$ (in the limit case, $\psi(\boldsymbol{x}_i,\boldsymbol{Y})\longrightarrow0^+$ if $\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})\longrightarrow+\infty$). Following the reasoning of a Bayesian likelihood ratio test, these comments suggest that, if $\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ takes a small value, then the $i$-th pixel likely belongs to $H_1$~\cite{VanTrees}. Vice versa, values of $\psi(\boldsymbol{x}_i,\boldsymbol{Y})$ close to the maximum $1/P(H_0)$ are achieved if $\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})$ is small (in particular, $\psi(\boldsymbol{x}_i,\boldsymbol{Y})=1/P(H_0)$ if and only if $\Lambda(\boldsymbol{x}_i,\boldsymbol{Y})=0$) -- a configuration that suggests that the $i$-th pixel likely belongs to $H_0$~\cite{VanTrees}. This confirms the interpretation of small and large values of the components of $\boldsymbol\Psi$ in relation to membership to ``change" or ``no-change," respectively. Similar comments hold with regard to the components of $\boldsymbol\Phi$. \section{Conclusions}\label{sec:concl} In this work we proposed two deep convolutional neural network architectures for heterogeneous change detection: the X-Net and the ACE-Net. In particular, we used an affinity-based change prior learnt from the input data to obtain an unsupervised algorithm. This prior was used to drive the training process of our architectures, and the experimental results proved the effectiveness of our framework. Both outperformed consistently state-of-the-art methods, and each has its own advantages: the X-Net proved to produce very stable and consistent performance and reliable transformations of the data; the ACE-Net showed to be able to achieve the best results, at the cost of higher complexity and a more diligent training. \section{Acknowledgement} The project and the first author was funded by the Research Council of Norway under research grant no.\ 251327. We gratefully acknowledge the support of NVIDIA Corporation by the donation of the GPU used for this research. The authors thank Devis Tuia for valuable discussions. \section{Experimental results}\label{sec:results} First, the three datasets used in this work are presented in \Cref{subsec:data}. \Cref{subsec:net_sett} provides the details of our experimental setup. Then, the proposed prior computation is compared against its previous version in \Cref{subsec:pre_comp}. For simplicity, we refer to the latter as prior computation (PC) and to the former as improved PC (IPC). The improvements are demonstrated by qualitative comparisons and further reflected in reductions of the computation time. Finally, in \Cref{subsec:res} the performance of the proposed networks is compared against the one obtained with several methods from the heterogeneous CD literature. Along with the mean elapsed times, this section reports the area under the curve (AUC), the overall accuracy (OA), the $F1$ score and Cohen’s Kappa Coefficient $\kappa$~\cite{cohen1960coefficient}. The experiments were performed on a machine running Ubuntu 14 with a 8-core CPU @ $2.7$ GHz. Moreover, $64$ GB of RAM and an NVIDIA GeForce GTX TITAN X (Maxwell) allowed to reduce considerably the training times through parallel computation. The methods were all implemented in Python using TensorFlow 1.4.0. \subsection{Datasets}\label{subsec:data} \subsubsection{Forest fire in Texas} Bastrop County in Texas was struck by a forest fire during September-October, 2011. The Landsat 5 TM and the Earth Observing-1 Advanced Land Imager (EO-1 ALI) acquired two multispectral optical images before and after the event. The resulting co-registered and cropped images of size $1520 \times 800$ are displayed in false colour in Fig.\ \ref{fig:L5} and Fig. \ref{fig:ALI}\footnote{Distributed by LP DAAC, http://lpdaac.usgs.gov \label{foot1}}. Some of the spectral bands of the instruments ($7$ and $10$ in total, respectively) overlap, so the signatures of the land covers involved are partly similar. Volpi \textit{et al.}~\cite{volpi2015spectral} provided the ground truth shown in Fig.\ \ref{fig:GT1}. \begin{figure}[hb!] \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/x.jpg} \caption{Landsat 5 ($t_1$)} \label{fig:L5} \end{subfigure} \hfill \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/y.jpg} \caption{EO-1 ALI ($t_2$)} \label{fig:ALI} \end{subfigure} \hfill \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/Ground_truth.jpg} \caption{Ground Truth} \label{fig:GT1} \end{subfigure} \caption{Forest fire in Texas. Landsat 5 ($t1$), (b) EO-1 ALI ($t2$), (c) ground truth.} \label{fig:dataset1} \end{figure} \subsubsection{Flood in California} \begin{figure}[ht!] \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/x.jpg} \caption{Landsat 8 ($t_1$)} \label{fig2:L8} \end{subfigure} \hspace*{\fill}% \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/y.jpg} \caption{Sentinel-1A ($t_2$)} \label{fig2:S1A} \end{subfigure} \hspace*{\fill}% \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Ground_Truth.jpg} \caption{Ground Truth} \label{fig:GT2} \end{subfigure} \caption{Flood in California. (a) Landsat 8 ($t_1$), (b) Sentinel-1A ($t_2$), (c) ground truth.} \label{fig2:dataset2} \end{figure} Fig.\ \ref{fig2:L8} displays the RGB channels of a Landsat 8 acquisition$^1$ covering Sacramento County, Yuba County and Sutter County, California, on 5 January 2017. The OLI and TIRS sensors on Landsat 8 together acquire data in $11$ channels, from deep blue up to thermal infrared. The same area was affected by a flood, as can be seen in Fig.\ \ref{fig2:S1A}. This is a Sentinel-1A\footnote{Data processed by ESA, http://www.copernicus.eu/} acquisition, recorded in polarisations VV and VH on 18 February 2017. The ratio between the two intensities is included both as the blue component of the false colour composite in \ \ref{fig2:S1A} and as the third channel provided as input to the networks. The ground truth in Fig.\ \ref{fig:GT2} is provided by Luppino \textit{et al.}~\cite{luppino2019unsupervised}. Originally of $3500 \times 2000$ pixels, these images were resampled to $850 \times 500$ pixels to reduce the computation time. \subsubsection{Constructions in China} The SAR image in Fig.\ \ref{fig3:RS2} and the coregistered optical image in Fig.\ \ref{fig3:QBL7} were acquired in June 2008 and in September 2012 respectively over the Shuguang village next to Dongying City, China. Both images have $593 \times 921$ pixels with a spatial resolution of 8 meters, and the ground truth in Fig.\ \ref{fig3:GT3} highlights the edification of buildings which took the place of some farmlands. \begin{figure}[hb!] \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/t1.png} \caption{SAR image at $t_1$} \label{fig3:RS2} \end{subfigure} \hspace*{\fill}% \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/t2.png} \caption{Optical RGB image at $t_2$} \label{fig3:QBL7} \end{subfigure} \hspace*{\fill}% \begin{subfigure}[t]{0.30\columnwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/ROI.png} \caption{Ground Truth} \label{fig3:GT3} \end{subfigure} \caption{Constructions in China. (a) RADARSAT-2 ($t_1$), (b) Quickbird / Landsat 7 ($t_2$), (c) ground truth.} \label{fig3:dataset3} \end{figure} \subsection{Experimental setup}\label{subsec:net_sett} \subsubsection{X-Net and ACE-Net} For the design of the proposed methods, we opted for CNNs with fully convolutional layers. One of the advantages is their flexibility with respect to the input size. At first, one can use batches of small patches extracted from the original images for the training, but once this stage is over, the banks of filters can be applied directly to the whole dataset at once. Since the goal is to transform each pixel from one domain to another and regularisation of the autoencoders is efficiently handled by other network constraints, there is no need to have a bottleneck in the code layer of the ACE-Net, that is, to reduce the size of the input height and width to compress the data. Hence, $3 \times 3$ filters were applied without stride on the input patches, whose borders were padded with zeros. In the X-Net, both networks have four layers: The first three consist of $100$, $50$, and $20$ filters; The last layer matches the number of channels of the translated data, with $|\mathcal{Y}|$ filters for $F(\boldsymbol{X})$ and $|\mathcal{X}|$ filters for $G(\boldsymbol{Y})$. The encoders of the ACE-Net have three layers of $100$, $50$, and $20$ filters, and these numbers are reversed for the decoders. The ACE-Net discriminator is the only network which, after three convolutional layers with $64$, $32$, and $16$ filters, deploys a fully-connected layer with one output neuron. Concerning the activation functions, a leaky ReLU~\cite{maas2013rectifier} was chosen with the slope for negative arguments set equal to $\beta=0.3$. The last layer of each network represents an exception: The sigmoid was selected for the discriminator, which must provide outputs between $0$ and $1$, whereas for every other network the hyperbolic tangent was chosen because our data was normalised between $-1$ and $1$. With this range of data values the training was sped up as expected~\cite{lecun2012efficient}. Batch normalisation~\cite{ioffe2015batch} turned out to be unnecessary and was discarded, as it did not improve the optimisation and it actually slowed down our experiments. After each layer, dropout is applied with a dropout rate of $20\%$ during the training phase to enhance the robustness of the framework against overfitting and input noise~\cite{srivastava2014dropout}. Also, data augmentation helps increasing the size of the training sample by introducing some more variety in the data: Before feeding the patches to the network, these were randomly flipped and rotated. The weights in $\boldsymbol{\vartheta}$ were initialised with a truncated normal distribution according to~\cite{glorot2010understanding} and the biases were initialised as zeros. For every epoch of the training $10$ batches were used, each containing $10$ patches of size $100 \times 100$. The Adam optimizer~\cite{reddi2018on} minimised the loss function for $240$ epochs at a learning rate of $10^{-5}$. The weights of the loss functions in the ACE-Net are five: $w_{\mathrm{adv}}=1$; $w_{\mathrm{AE}}=0.2$; $w_{\mathrm{cyc}}=2$; $w_{\alpha}=3$; and $w_{\vartheta}=0.001$. The X-Net uses only three of these, namely $w_{\mathrm{cyc}}$, $w_{\alpha}$ and $w_{\vartheta}$, and the same values were used for these. After several training epochs, a preliminary evaluation of the difference image $d$ is computed and scaled to fall into the range $[0,1]$, and the prior is updated as $\boldsymbol{\Pi} = 1 - d$. In this way, pixels associated with a large $d$ entry are penalised by a small weight, whereas the opposite happens to pixels more likely to be unchanged. The $\boldsymbol{\Pi}$ is updated at two milestones placed at one third and two thirds of the total epochs, namely at epoch $80$ and epoch $160$. This form of self-supervision paradigm has already proven robust in other tasks such as deep clustering~\cite{caron2018deep} and deep image recovery~\cite{ulyanov2018deep}. \subsubsection{SCCN and CAN} We implemented two methods as state-of-the-art competitors, namely SCCN~\cite{liu2016deep} and the conditional adversarial network in~\cite{niu2018conditional}, which is from now on referred to as CAN. A brief description of these methods can be found in the last paragraph of \Cref{sec:sccn} and \Cref{sec:cgan}, respectively. The most important aspect of the compared architectures is their ability to transform the data and, consequently, the quality of the obtained difference image $d$, whereas the postprocessing applied to $d$ is not considered relevant in the present comparison. Therefore, although~\cite{liu2016deep} and~\cite{niu2018conditional} deploy different filtering and thresholding techniques, the methods selected in this work are used on all the difference images for a fair comparison of the final change maps. The implementations of the SCCN and the CAN were as faithful as possible based on the details shared in~\cite{liu2016deep} and~\cite{niu2018conditional}. \iffalse Notwithstanding, some aspects of the SCCN were not explained in detail. In~\cite{liu2016deep}, a factor $\lambda$ is used both as the weight of a regularising term in the loss function, and as the threshold used to binarise the difference image in order to iteratively flag/unflag changed pixels. Given the two code images of $20$ channels with values between $0$ and $1$, the norms of the pixel-wise difference bewteen them can go from $0$ to $\sqrt{20}$, which is approximately $4.5$. However, $\lambda$ was set equal to $0.2$, which seems reasonable as a weight but clearly too low as a threshold. Since it is not clear whether the norms should be normalised (or the threshold multiplied) by the maximum norm $\sqrt{20}$, we opted for using the Otsu's method to find the optimal threshold for every iteration. \fi However, to make the SCCN work we had to replace a fixed parameter described in the paper with the output of Otsu's method to find an optimal threshold for the difference image in the iterative refinement of the change map. We also had to interpret the description in~\cite{liu2016deep}: To avoid trivial solutions, we implemented their pretraining phase with decoders having one coupling layer (convolutional layer with filters of $1\times1$) and $250$ epochs. This was empirically found to be the minimum amount of epochs needed to consistently obtain a meaningful representation of the data in the code space to be used as starting point for the training procedure. Also, in~\cite{liu2016deep} Liu \textit{et al.}selected a rigorous stopping criterion for the latter, but it was hardly reached during our experiments, so a maximum number of epochs was set to $500$. \subsubsection{Comparisons with other methods} In order to better frame our architectures within the state-of-the-art of heterogeneous CD, we also present a comparison on the widely used benchmark dataset of the constructions in China. There are several versions of this dataset in terms of image sizes and ground truth, so we focused on the methods from the literature which used the same version, to ensure that all considered results are fully comparable. Beside SCCN and CAN, we report for this dataset the results obtained by several methods. The mixed-norm-based (MNB) method by Touati \textit{et al.}~\cite{touati2019reliable}, the coupling translation network (CPTN) by Gong \textit{et al.}~\cite{gong2019coupling}, and the coupled dictionary learning (ICDL) method by Gong \textit{et al.}~\cite{gong2016coupled} are unsupervised. Instead, the post-classification comparison (PCC)~\cite{chuvieco2016fundamentals}, the conditional copulas (CC) method by Mercier \textit{et al.}~\cite{mercier2008conditional}, and the anomaly feature learning (AFL) method by Touati \textit{et al.}~\cite{touati2020anomaly} are supervised approaches. For the experimental setup and implementation details of these methods applied to this specific dataset, we refer to their original papers. Although these methods are evaluated on the same dataset, the supervised ones make use of training samples (e.g., on the "no-change" class or on the thematic classes in the scene). In terms of change detection performance, this is a clear advantage over unsupervised method, however, it comes with the cost of manual annotation based on experts' knowledge or data collection on location. Therefore, the results must be interpreted fairly, since unsupervised methods do not make use of this kind of input but on the other hand they do not require any user prompt. Finally, we stress another distinction: SCCN, CAN, CPTN and AFL deploy deep neural networks, so they present a similar methodological framework with respect to the proposed architectures, whereas PCC, CC, MNB, and ICDL rely on more traditional machine learning and pattern recognition techniques. \begin{figure*}[ht!] \begin{center} \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/Aff/Aff_old_NO_STRIDE.jpg} \caption{PC, $\Delta=1$} \label{fig:old_no_tx} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/Aff/Aff_new_NO_STRIDE.jpg} \caption{IPC, $\Delta=1$} \label{fig:new_no_tx} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/Aff/Aff_old_STRIDE_20.jpg} \caption{PC, $\Delta=20$} \label{fig:old_stride_tx} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Texas/Aff/Aff_new_STRIDE_20.jpg} \caption{IPC, $\Delta=20$} \label{fig:new_stride_tx} \end{subfigure} \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Aff/Aff_old_NO_STRIDE.jpg} \caption{PC, $\Delta=1$} \label{fig:old_no_cal} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Aff/Aff_new_NO_STRIDE.jpg} \caption{IPC, $\Delta=1$} \label{fig:new_no_cal} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Aff/Aff_old_STRIDE_20.jpg} \caption{PC, $\Delta=20$} \label{fig:old_stride_cal} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Aff/Aff_new_STRIDE_20.jpg} \caption{IPC, $\Delta=20$} \label{fig:new_stride_cal} \end{subfigure} \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/Aff/Aff_old_NO_STRIDE.png} \caption{PC, $\Delta=1$} \label{fig:old_no_ch} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/Aff/Aff_new_NO_STRIDE.png} \caption{IPC, $\Delta=1$} \label{fig:new_no_ch} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/Aff/Aff_old_STRIDE_20.png} \caption{PC, $\Delta=20$} \label{fig:old_stride_ch} \end{subfigure} \hspace{0.02\textwidth}% \begin{subfigure}[t]{0.22\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/China/Aff/Aff_new_STRIDE_20.png} \caption{IPC, $\Delta=20$} \label{fig:new_stride_ch} \end{subfigure} \end{center} \caption{Results on the three datasets for the PC and the IPC, for $\Delta=1$ and for $\Delta=20$.} \label{fig:affm} \end{figure*} \subsection{PC vs IPC}\label{subsec:pre_comp} The effects of the proposed modifications to the affinity matrix analysis are evaluated by a visual comparison of the results obtained by both the PC and the IPC. Based on~\cite{luppino2019unsupervised}, a patch size of $k=20$ was selected for all the experiments. Fig.\ \ref{fig:affm} shows the outcomes for the three datasets in the two most extreme cases, namely with strides of $\Delta=1$ and $\Delta=k$. In the first column, one can notice how the PC provides more blurry results where the areas highlighted by their $\alpha$ values have soft edges. In contrast, the images in the second column were obtained with the IPC and they unarguably represent a more precise result with sharp edges and smaller segments of highlighted pixels. The third column shows the strong impact that a large $\Delta$ has on the outcomes of PC. The PC method's assignment of one value to an entire patch leads to the tiled pattern mentioned in \Cref{subsec:affinity}. Instead, the IPC is not as affected by the stride applied to the patch shifts, as shown in the fourth column of Fig.\ \ref{fig:affm}. \begin{table}[b!] \centering \caption{Approximate $\lvert \mathcal{P} \rvert$ and computation time of the two methods applied to the three datasets for $\Delta=1$ and $\Delta=k$.} \label{tab:Aff} \begin{tabular}{ c c | c c c } \toprule \multicolumn{2}{c}{\,} & $\lvert \mathcal{P} \rvert$ & PC & IPC \\ \midrule \multirow{2}{*}{Texas} & $\Delta = 1$ & $1.2\times10^6$ & 45 min & 76 min\\ & $\Delta = 20$ & $ 3\times10^3$ & 2:37 min& 6 min \\ \hline \multirow{2}{*}{California} & $\Delta = 1$ & $ 4\times10^5$ & 15 min & 24 min\\ & $\Delta = 20$ & $ 1\times10^3$ & 0:37 min & 1:45 min \\ \hline \multirow{2}{*}{China} & $\Delta = 1$ & $5.2\times10^5$ & 35 min & 62 min \\ & $\Delta = 20$ & $ 1\times10^3$ & 0:40 min & 2:20 min \\ \bottomrule \end{tabular} \end{table} Table \ref{tab:Aff} reports an approximate total number of patches $\lvert \mathcal{P} \rvert$ and the computation time spent by the two methods on the three datasets for the two considered cases. As it can be seen, the major drawback of setting $\Delta=1$ is the large value of $|\mathcal{P}|$. Recall that we propose to apply the IPC three times: with $k_{small} = 10$ and $k = 20$ to the images at the original sizes, and with $k=20$ to the images resampled at half the sizes. \begin{table*}[ht!] \centering \caption{Mean and standard deviation of the evaluation metrics for the four methods applied to the Texas dataset. Best results are in bold.} \label{tab:metrics_tx} \begin{tabular}{c | c c c c c } \toprule \, & AUC & OA & F1 & $\kappa$ & $t$ \\ \midrule $\boldsymbol{\alpha}$ & 0.956 & 0.922 & 0.695 & 0.652 & 42 min\\ \toprule ACE-Net & 0.968 (0.12) & 0.951 (0.008) & 0.747 (0.047) & 0.720 (0.051) & 42 + 13 min \\ \hline X-Net & \textbf{0.968 (0.007)} & \textbf{0.961 (0.006)} & \textbf{0.785 (0.049)} & \textbf{0.767 (0.028)} & 42 + 7 min\\ \hline CAN~\cite{niu2018conditional}& 0.951 (0.009) & 0.925 (0.006) & 0.587 (0.048) & 0.548 (0.050) & 69 min \\ \hline SCCN~\cite{liu2016deep} & 0.893 (0.14) & 0.880 (0.010) & 0.613 (0.309) & 0.551 (0.362) & 16 min \\ \bottomrule \end{tabular} \end{table*} \begin{table*}[ht!] \centering \caption{Mean and standard deviation of the evaluation metrics for the four methods applied to the California dataset. Best results are in bold.} \label{tab:metrics_cal} \begin{tabular}{c | c c c c c } \toprule \, & AUC & OA & F1 & $\kappa$ & $t$ \\ \midrule $\boldsymbol{\alpha}$ & 0.803 & 0.788 & 0.281 & 0.204 & 13 min\\ \toprule ACE-Net & 0.881 (0.008) & \textbf{0.915 (0.007)} & 0.459 (0.027) & 0.415 (0.030) & 13 + 12 min \\ \hline X-Net & 0.892 (0.006) & 0.911 (0.004) & 0.447 (0.019) & 0.402 (0.021) & 13 + 6 min \\ \hline CAN~\cite{niu2018conditional}& 0.857 (0.008) & 0.904 (0.005) & 0.424 (0.020) & 0.365 (0.023) & 21 min \\ \hline SCCN~\cite{liu2016deep} & \textbf{0.920 (0.002)} & 0.903 (0.007) & \textbf{0.500 (0.015)} & \textbf{0.454 (0.017)} & 15 min\\ \bottomrule \end{tabular} \end{table*} Finally, for the training of the ACE-Net and the X-Net we opted for $k=20$ and $\Delta = 5$, for which the proposed approach took approximately $42$ min, $13$ min, and $19$ min for the Texas, California, and China datasets, respectively. \subsection{Results} \label{subsec:res} For the first two datasets, the two proposed techniques and the previous SCCN and CAN methods were applied. Each of the four architectures was initialised randomly and trained for $100$ independent runs. The average (standard deviation) of the evaluation metrics are reported in Table \ref{tab:metrics_tx} and Table \ref{tab:metrics_cal}, together with the average training times. As a reference, the results achieved by directly filtering and thresholding the prior $\boldsymbol{\alpha}$ are also included. Recall that the X-Net and the ACE-Net require the computation of $\alpha$ as pre-training step: in practice, its computational time must be accounted for and added to the training time of the two architectures. The X-Net is the simplest framework, and this explains its fast training procedure. The ACE-Net and the SCCN have similar complexities, so they require similar times. By contrast, the CAN paper~\cite{niu2018conditional} defines one training epochs as using all $5\times 5$ non-overlapping patches in the images, and the computational load of training grows accordingly with image size. One may suggest to train the networks on a subsample of patches randomly picked at every epoch, but there may be a trade-off between speed and performance. \iffalse \begin{figure}[b!] \begin{center} \includegraphics[width=\columnwidth,keepaspectratio]{Kappa_SOTA_Texas.png} \end{center} \caption{Boxplots of \iffalse the AUC (a) and \fi the $\kappa$ coefficient for the four methods applied to the Texas dataset. The red horizontal line shows the $\kappa$ achieved with the affinity matrices comparison.} \label{fig:plots_tx} \end{figure} In Fig.\ \ref{fig:plots_tx}, the results of the four methods on the Texas dataset are compared.\fi Focusing on Table \ref{tab:metrics_tx}, The X-Net and the CAN show stable and consistent performance. The ACE-Net and the SCCN sometimes reach higher values of the evaluation metrics than the X-net, but the average is lower and the variance is high. The performance obtained starting from $\boldsymbol{\alpha}$ suggests that technically the IPC algorithm can be used to perform heterogeneous CD autonomously, yet its application as a prior for the X-Net and the ACE-Net yields the best results. A different scenario was found for the California dataset in Table \ref{tab:metrics_cal}. The ACE-Net outperforms the X-Net and the CAN in terms of average $\kappa$, but has more variability. The SCCN performs best on this dataset as measured by its $\kappa$, which reaches significantly higher values than the other algorithms, and with a low variability when compared to SCCN behaviour for the Texas dataset. However, upon closer inspection the transformations applied by this method on this dataset are not as intended and the performance is degenerate, which will be explained in \Cref{sec:limits}. In this case, the computation of $\boldsymbol{\alpha}$ as heterogeneous CD does not seem as reliable, but it still boosts the performance of the ACE-Net and the X-Net. \iffalse \begin{figure}[b!] \begin{center} \includegraphics[width=\columnwidth,keepaspectratio]{Kappa_SOTA_California.png} \end{center} \caption{Boxplots of \iffalse the AUC (a) and \fi the $\kappa$ coefficient for the four methods applied to the California dataset. The red horizontal line shows the $\kappa$ achieved with the affinity matrices comparison.} \label{fig:plots_cal} \end{figure} \fi Finally, the results obtained by the state-of-the-art methods on the China dataset, along with the ones obtained by ACE-Net and X-Net, are reported in Table \ref{tab:metrics_ch}. In addition, we note that the multidimensional scaling (MDS) method by Touati \textit{et al.}~obtained an OA of $0.967$ in~\cite{touati2018change}. Again, the result obtained by filtering and thresholding the prior $\boldsymbol{\alpha}$ is included as reference, and the comments about the performance of $\boldsymbol{\alpha}$ for the California dataset apply also here. The first part of Table \ref{tab:metrics_ch} consists of supervised methods, which are purposely separated from the rest: although they are evaluated on the same dataset, they require supervision and user prompt for sample selection, which makes the comparison with the other methods unfair. We also remark that our architectures are applied with the same hyperparameters for all the datasets, whereas the hyperparameters used in~\cite{niu2018conditional,gong2019coupling} for the other methods were tuned on a case-by-case basis. Both the ACE-Net and the X-Net outperform the other unsupervised methods, with the latter reaching higher values. These results are discussed further in \Cref{sec:limits}. \begin{table}[hb!] \centering \caption{Evaluation metrics for the methods applied to the China dataset. The results indicated with $^\dag$ and $\ddag$ are reported by~\cite{gong2019coupling} and~\cite{niu2018conditional} respectively. Best results are in bold.} \label{tab:metrics_ch} \begin{tabular}{c | c c c c c } \toprule \, & AUC & OA & F1 & $\kappa$ \\ \midrule $\boldsymbol{\alpha}$ & 0.848 & 0.699 & 0.248 & 0.171\\ \toprule AFL~\cite{touati2020anomaly} & - & \textbf{0.980} & \textbf{0.732} & \textbf{0.722}\\ \hline $\ddag$CC~\cite{mercier2008conditional} & 0.938 & 0.951 & 0.523 & 0.444 \\ \hline $\ddag$PCC & - & 0.821 & 0.335 & 0.257 \\ \toprule X-Net & \textbf{0.987} & \textbf{0.984} & \textbf{0.731} & \textbf{0.696} \\ \hline ACE-Net & 0.980 & 0.982 & 0.726 & 0.689\\ \hline $\dag$SCCN~\cite{liu2016deep} & 0.959 & 0.976 & 0.728 & 0.679 \\ \hline CAN~\cite{niu2018conditional}& 0.976 & 0.978 & 0.717 & 0.662 \\ \hline CPTN~\cite{gong2019coupling} & 0.963 & 0.978 & 0.672 & 0.662\\ \hline $\dag$ICDL~\cite{gong2016coupled} & 0.921 & 0.951 & 0.469 & 0.444 \\ \hline MNB~\cite{touati2019reliable} & - & 0.884 & 0.370 & 0.324\\ \hline \bottomrule \end{tabular} \end{table} Fig.\ \ref{fig:tx_res}, Fig.\ \ref{fig:cal_res}, and Fig.\ \ref{fig:ch_res} show examples of output delivered by each of the four methods on the three datasets. False colour images of the original and transformed images are composed with a subset of three channels from those available. Translated images are shown for the X-Net and the ACE-Net, followed by the resulting difference image and a confusion map (CM), which allows to visualise the accuracy of the results: TN are depicted in black, TP in white, FN in red, and FP in green. For the CAN and SCCN algorithms, the translated images are replaced with the equivalent images used by these methods to compute the difference image. For the CAN algorithm, these are a generated image $\hat{\boldsymbol{Y}}$ and a approximated image $\tilde{\boldsymbol{Y}}$ in the $\mathcal{Y}$ domain. For the SCCN algorithm, these are code images $\boldsymbol{Z}_\mathcal{X}$ and $\boldsymbol{Z}_\mathcal{Y}$ from a common latent space. \section{Introduction} \subsection{Background} \IEEEPARstart{T}{he} goal of change detection (CD) methods based on earth observation data is to recognise changes on Earth by comparing two or more satellite or aerial images covering the same area at different times~\cite{singh1989review}. Multitemporal applications include the monitoring of long term trends, such as deforestation, urban planning, and earth resources surveys, whereas bi-temporal applications mainly regard the assessment of natural disasters, for example earthquakes, oil spills, floods, and forest fires~\cite{luppino2017clustering}. This paper will focus on the latter case, and more specifically on the scenario where the changes must be detected from two satellite images with high to medium spatial resolution (10 to 30 meters). These resolutions allow to detect changes in ground coverage (forest, grass, bare soil, water etc.) below hectare scale, but are not suitable to deal with changes affecting small objects on meter scale (buildings, trees, cars etc.). At these resolutions it is common to assume that co-registration can be achieved by applying simple image transformations such as translation, rotation, and re-sampling~\cite{zhan2018iterative,liu2016deep,liu2018change,zhu2017deep}. This means that each pixel in the first image and its corresponding one in the second image represent the same point on the Earth. Consequently, even a simple pixel-wise operation (e.g.\ a difference or a ratio) would highlight changes when working with homogeneous data~\cite{liu2016deep,niu2018conditional,khan2017forest}, i.e.\ data collected by the same sensor, under the same geometries and seasonal or weather conditions, and using the same configurations and settings. More robust and efficient approaches consider complex algorithms rather than simple mathematical operations to detect changes, and many examples of homogeneous CD methods can be found in the literature~\cite{khan2017forest,gong2016change,gong2017feature,lyu2016learning,mou2018learning}. \subsection{Motivation} To rely on only one data acquisition modality represents a limitation, both in terms of response time to sudden events and in terms of temporal resolution when monitoring long-term trends. To exemplify, heterogeneous change detection algorithms facilitate rapid change analyses by being able to utilise the first available image, regardless of modality~\cite{dalla2015challenges,ghamisi2019multisource}. They also allow to increase the number of samples in a time series of acquisitions by inserting images from multiple sensors. On one hand, this allows to exploit the images acquired by all the available sensors, but on the other hand raises additional challenges. Heterogeneous sensors usually measure different physical quantities, meaning that one terrain type might be represented by dissimilar statistical models from sensor to sensor, while surface signatures and their internal relations may change completely across different instruments~\cite{liu2016deep,niu2018conditional,gong2019coupling}. For example, optical and synthetic aperture radar (SAR) payloads are dominantly used for CD in remote sensing~\cite{zhao2017discriminative,zhan2018log} and they are often seen as complementary: the use of optical instruments is affected by solar illumination and limited to low cloud coverage, whilst SAR can operate at any time and under almost any weather conditions, because clouds are transparent to electromagnetic waves at SAR frequencies. On the other hand, optical data take real values affected by a modest additive Gaussian noise (mainly due to atmospheric disturbance, thermal and shot noise inside the sensor), whose effect can be easily accounted for~\cite{landgrebe2005signal}, whereas SAR feature vectors take complex values representing the coherent sum of the backscattered echoes, which can present high fluctuations from one pixel to the next both in amplitude and phase, resulting in the so-called speckle, a multiplicative effect which is more challenging to mitigate~\cite{moreira2013tutorial}. In few words, it is not guaranteed that the data acquired by heterogeneous sources lie in a common domain, and a direct comparison is meaningless without processing and co-calibrating the data first~\cite{luppino2017clustering}. Heterogeneous CD methods are meant to cope with these issues, and as discussed in~\cite{gong2016coupled,luppino2019unsupervised}, there is not a unique way to categorize them. However, two general criteria to group them are the following: \begin{enumerate*} \item unsupervised methods or supervised methods; \item deep learning methods or traditional signal processing methods. \end{enumerate*} The analysis in this paper will exclusively cover unsupervised frameworks. Since they do not require any supervised information about the change, they are usually more appealing than the supervised counterparts. Indeed, collecting labelled data is often costly and nontrivial, both in terms of the time and competence required~\cite{zhan2018iterative,zhan2018log}. Concerning the second distinction, deep learning has become the state-of-the-art in many image analysis tasks, including in the field of remote sensing~\cite{liu2016deep,zhu2017deep}. Deep learning methods can achieve high performance thanks to the flexibility of neural networks, which are able to apply highly nonlinear transformations to any kind of input data. For these reasons, the analysis of the literature will mainly focus on deep learning, although many important methods, based on minimum energy~\cite{touati2018energy}, nonlinear regression~\cite{luppino2019unsupervised}, dictionary learning~\cite{gong2016coupled},~\cite{ferraris2019coupled}, manifold learning~\cite{prendes2015new}, fractal projections~\cite{mignotte2020fractal}, or copula theory~\cite{mercier2008conditional} are worth mentioning. We refer the interested readers to \cite{luppino2019unsupervised} for a state-of-the-art analysis on heterogeneous CD based on more classical methods. We point out that heterogeneous CD can be framed within the general context of multimodal data fusion, which broadly encompasses all processing, learning, and analysis methodologies aimed at jointly exploiting different data modalities. In remote sensing, these modalities most typically correspond to different sensors, missions, spatial resolutions, or acquisition properties (e.g., incidence angle, radar polarization, and spectral channels)~\cite{gomezchova2015multimodal}. Note that heterogeneous CD methods are effective also to deal with the simpler case in which the heterogeneity between the images is merely due to different environmental conditions at the moment of the acquisitions (weather, time of the day, season, and so forth). We refer the reader to the review paper in~\cite{gomezchova2015multimodal} for a general taxonomy of multimodal fusion in remote sensing, with examples of multiresolution, multiangular, multisensor, multitemporal, and spatial-spectral fusion using a variety of methodological approaches, including deep learning and also discussing a CD case study. In the case of image classification, recent examples of multimodal approaches based on deep neural networks include the multimodal deep learning framework in~\cite{hong2020morediverse}, the multisensor and multiscale method in~\cite{audebert2018beyond} for semantic labeling in urban areas, and the technique in~\cite{benedetti2018m3} for land cover mapping from multimodal satellite image time series. The role of shallow and deep learning approaches in the area of feature extraction -- with focus on hyperspectral imagery and involving various data fusion concepts -- has recently been reviewed in~\cite{rasti2020feature}. The scientific outcome of a recent international contest in the area of multimodal fusion with open satellite and ancillary/geospatial data has been presented in~\cite{yokoya2018opendata}. \subsection{Proposed method} We propose to combine traditional machine learning and pattern recognition techniques with deep image translation architectures to perform unsupervised CD based on heterogeneous remote sensing data. More specifically, a comparison of domain-specific affinity matrices allows us to retrieve in a self-supervised manner the \emph{a priori} change indicator, referred to as the prior, driving the training process of our deep learning methods. In particular, our aim is to provide a reliable and informative prior, representative of the whole feature space, which is an alternative with respect to other priors previously used for heterogeneous CD, such as randomly initialised change maps, clustering/post-classification-comparison outputs, or supervised sample selection. The proposed prior computation method is an efficient approach that provides more useful information than randomly-initialised change maps, which are associated with convergence problems and inconsistent overall performance. It is directly and automatically obtainable from the input data without need of any tuning and, as opposed to clustering methods, it does not require to select sensible hyperparameters such as the number of clusters, which strictly depends on the area under investigation and the number of land covers present in the scene. The advantage with respect to post-classification and supervised sample selection is that the latter make use of prior information which can be difficult to obtain, or user prompt or in-situ measurements, which are time-consuming and/or expensive. Instead, none of the aforementioned information are required by the proposed approach. Two architectures are proposed: The X-Net is composed of two fully convolutional networks, each dedicated to mapping the data from one domain to the other; The ACE-Net consists of two autoencoders whose code spaces are aligned by adversarial training. Their performance and consistency are tested against two recent state-of-the-art methods on three benchmark datasets, illustrating how the proposed networks perform favourably as compared to them. Summing up, the main contributions of this work are: \begin{itemize} \item A novel procedure to obtain a priori information on structural changes between the images based on a comparison of intramodal information on pixel relations. \item Two neural network architectures designed to perform unsupervised change detection, which explicitly incorporate this prior. \end{itemize} Moreover, this work represents a valuable contribution to the field of study as the proposed framework for heterogeneous change detection is made publicly available at this link: \url{https://github.com/llu025/Heterogeneous_CD}, together with the re-implementation of the two reference methods, as well as the three datasets used in this paper. The remainder of this article is structured as follows: \Cref{sec:related_work} describes the theoretical background and the related work. \Cref{sec:method} introduces the reader to the notation, the proposed procedure and the architectures. Results on three datasets are presented in \Cref{sec:results}. \Cref{sec:limits} includes a discussion of the main features and drawbacks of each method used in this work. \Cref{sec:concl} concludes the paper and summarises the proposed method and obtained results. \section{Discussion}\label{sec:limits} \subsection{Comparison among X-Net, ACE-Net, SCCN, and CAN} Stability and consistency are the advantages of the X-Net and CAN algorithms. They both provide good results on the selected datasets, with the former performing better. The X-Net has other positive aspects, for example the simplicity of its architecture composed of only two CNNs of few layers each, yielding a total number of $|\vartheta|\sim 1.3\times10^5$ parameters, and fast convergence during training thanks to a limited number of terms in the loss function. The same cannot be said about the CAN. The framework counts three fully connected networks with $|\vartheta|\sim 3.1\times10^5$, and the use of all possible $5 \times 5$ patches as input makes its training epochs time consuming, especially for bigger datasets like the Texas one. In addition, it shows a high tendency to miss some of the changes due to unwanted alignment of changed areas in the generated and the approximated images. This can be noticed by the high amount of FN in Fig.\ \ref{fig:cgan_cm_tx} and Fig.\ \ref{fig:cgan_cm_cal}. The ACE-Net has a large amount of parameters ($|\vartheta|\sim 2.8\times10^5$), and together with its complex loss function they guarantee the flexibility that allows to achieve the best overall performance on the three datasets. However, the complexity is also the main drawback of this architecture, because it implies a difficult and possibly slow convergence, which also results in higher variability in performance. In conclusion, it has the potential to outperform the other methods, but a costly optimisation of its parameters might be necessary. The SCCN requires a thorough analysis. First of all, this network is very simple: it consists of two symmetric networks with four layers and the total amount of parameters is just $|\vartheta|\sim 6\times10^3$. Its parameters space is thus limited when compared to its contenders. This may explain why the method often fails to converge and provides very poor results on the first dataset (see Table \ref{tab:metrics_tx}). The very good results displayed in Table \ref{tab:metrics_cal} instead are explained by a visual inspection of the image translations it performs on the California dataset. After preliminary training of the two encoders, the one transforming $\boldsymbol{Y}$ is frozen, while the other is taught to align the codes of those pixels which are flagged as unchanged. However, it can be seen in Fig.\ \ref{fig:sccn_xa_cal} that the encoder is not able to capture more than the background average colour of Fig.\ \ref{fig:sccn_ya_cal}, which can be characterized as degenerate behaviour. Basically, the difference image in Fig.\ \ref{fig:sccn_d_cal} is highlighting the water bodies of the SAR image in Fig.\ \ref{fig2:S1A}, and this coincidentally results in high accuracy when detecting the flood. The same situation was faced when freezing the other encoder, and this issue was encountered similarly on the China dataset, as it can be seen in Fig.\ \ref{fig:sccn_xa_ch}. Note that high number of training epochs ($500$) in our customized implementation of the SCCN was beneficial for the Texas dataset, since it managed to converge more often to a meaningful solution, but it did not make much of a difference on the other two datasets, for which the method consistently brings the loss function to a local minimum that corresponds to a degenerate result within the first hundred of epochs, and then not being able to improve it further. \subsection{Discussion of the results on the benchmark dataset} The experiments on the China dataset offer a broader view in relation to the state-of-the-art. In general, one can appreciate that there is a trade-off between performance and interpretability: CC, PCC, ICDL, and MNB formalize well-defined intuitions -- with different degrees of complexity --, and their results can be easily interpreted, but they do not achieve the same performance as the other methods. PCC is an intuitive and very simple approach, but is quite ineffective when the two separate classifications of the single images are not very accurate because it accumulates their errors. The concept of ICDL of using sparse dictionaries to map data into a common space is also intuitive, but its performance is less accurate in the application to this dataset as compared to the other considered methods. The same can be said for CC and MNB, whose approaches can be broadly interpreted as examples of feature engineering aimed at heterogeneous CD. Another notable detail is the performance gap between the aforementioned CC, PCC, ICDL, and MNB, which deploy more traditional machine learning algorithms, and the deep learning methods, namely AFL, X-Net, ACE-Net, SCCN, CAN, and CPTN. Focusing on the $\kappa$ coefficient and on the considered benchmark dataset, the algorithms in the former group do not obtain higher values than $0.44$, whereas the algorithms in the latter reach $0.66$ and above. More in particular, CPTN and ACE-Net are similar architectures with two AEs sharing their code spaces and adversarial losses. However, CPTN places two discriminators at the output of the AEs to set apart real reconstructed images from fake transformed images, whereas ACE-Net has only one discriminator acting in the code space. The results in \Cref{tab:metrics_ch} suggest higher effectiveness of the proposed ACE-Net configuration in the application to the China dataset. Finally, we recall that AFL also deploys AEs, but it uses a training set made of patches selected from unchanged areas to enforce the alignment of the code spaces. Still, the results obtained by the proposed unsupervised methodologies are in line with the ones of this supervised approach. This further suggests the effectiveness of the developed affinity prior in capturing information on unchanged areas in an unsupervised manner and of the proposed X-Net and ACE-Net architectures in taking benefit from this information. \subsection{Ablation study} In order to compare the contribution of each component of our networks, an ablation study was carried out on the \textit{California} dataset. Alongside, we evaluated the impact of the proposed prior. Moreover, we investigated whether the overall performance can benefit from adding adversarial learning on the image contents, i.e.\ by adding two more discriminators, one for each input space, where the translated data are compared to the original data from the same domain. \begin{table*}[t!] \centering \caption{Ablation study on the California dataset: mean values (standard deviations) of metrics obtained before thresholding (AUC) and after thresholding (OA, F1, $\kappa$) with the two methodologies applied with different configurations. Best results are in bold.} \label{tab:abl_tran} \begin{tabular}{ c c | c c c c} \toprule \multicolumn{2}{c}{\,} & AUC & OA & F1 & $\kappa$ \\ \midrule \multirow{5}{*}{X-Net} & Discr Output & $0.864 (0.017)$ & $0.891 (0.013)$ & $0.412 (0.035)$ & $0.359 (0.040)$ \\ & No Alpha & $0.876 (0.004)$ & $0.908 (0.003)$ & $0.439 (0.012)$ & $0.392 (0.013)$ \\ & No Cycle & $0.883 (0.008)$ & $0.910 (0.005)$ & $0.433 (0.025)$ & $0.387 (0.027)$ \\ & No Milestones & $0.873 (0.006)$ & $0.897 (0.005)$ & $0.423 (0.015)$ & $0.372 (0.017)$ \\ & Proposed & $\textbf{0.892 (0.006)}$ & $\textbf{0.911 (0.004)}$ & $\textbf{0.447 (0.019)}$ & $\textbf{0.402 (0.021)}$ \\ \hline \multirow{7}{*}{ACE-Net} & Discr Output & $0.870 (0.041)$ & $0.884 (0.079)$ & $0.419 (0.059)$ & $0.367 (0.070)$ \\ & No Alpha & $0.865 (0.030)$ & $0.907 (0.018)$ & $0.434 (0.041)$ & $0.387 (0.047)$ \\ & No Cycle & $0.881 (0.11)$ & $0.908 (0.006)$ & $0.429 (0.028)$ & $0.382 (0.032)$ \\ & No Milestones & $0.866 (0.030)$ & $0.892 (0.009)$ & $0.402 (0.041)$ & $0.350 (0.045)$ \\ & Proposed & $\textbf{0.881 (0.008)}$ & $\textbf{0.915 (0.007)}$ & $\textbf{0.459 (0.027)}$ & $\textbf{0.415 (0.030)}$ \\ & No Discr & $0.872 (0.008)$ & $0.912 (0.005)$ & $0.455 (0.025)$ & $0.411 (0.027)$ \\ & No Recon & $0.875 (0.016)$ & $0.912 (0.006)$ & $0.447 (0.029)$ & $0.403 (0.032)$ \\ \bottomrule \end{tabular} \end{table*} \iffalse \begin{figure}[h!] \begin{center} \includegraphics[width=\linewidth,keepaspectratio]{Kappa_OmittedTran_California.png} \caption{Ablation study on the California dataset. The two methodologies are applied with different configurations. Best viewed in colours.} \label{fig:abl_tran} \end{center} \end{figure} \fi The results in Table \ref{tab:abl_tran} were obtained with the X-Net and the ACE-Net applied with different configurations: \begin{itemize} \item \textbf{Discr Output:} with two added discriminators \item \textbf{No Alpha:} with a randomly initialised prior. \item \textbf{No Cycle:} without cycle-consistency. \item \textbf{No Milestone:} without the two milestone updates. \item \textbf{Proposed:} as proposed. \item \textbf{No Discr:} without the discriminator for the code contents (ACE-Net only). \item \textbf{No Recon:} without the reconstruction loss (ACE-Net only). \end{itemize} As it can be noticed, discarding any element from the total loss function of the two methods is not beneficial. Similarly, the gain of using the proposed prior rather than a random one is considerable. Also, the update of the prior at the two milestones is shown to improve the performance. Instead, the same cannot be said about adding the two discriminators for adversarial learning on the image contents. \begin{figure*}[ht!] \begin{center} \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/Texas/x.jpg} \caption{$\text{Input image: }\boldsymbol{X}$} \label{fig:x_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/Texas/Best_x_hat.jpg} \caption{$\text{ACE-Net transl.: }\boldsymbol{\hat{X}}$} \label{fig:ace_xh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/Texas/x_hat.jpg} \caption{$\text{X-Net translation: }\boldsymbol{\hat{X}}$} \label{fig:x_xh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/Texas/y_hat.jpg} \caption{$\text{CAN generation: }\boldsymbol{\hat{Y}}$} \label{fig:cgan_xh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/Texas/H_X_After.jpg} \caption{$\text{SCCN code: }\!\boldsymbol{Z}_\mathcal{X}$} \label{fig:sccn_xa_tx} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/Texas/y.jpg} \caption{$\text{Input image: }\boldsymbol{Y}$} \label{fig:y_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/Texas/Best_y_hat.jpg} \caption{$\text{ACE-Net transl.: }\boldsymbol{\hat{Y}}$} \label{fig:ace_yh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/Texas/y_hat.jpg} \caption{$\text{X-Net translation: }\boldsymbol{\hat{Y}}$} \label{fig:x_yh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/Texas/x_hat.jpg} \caption{$\text{CAN approximation: }\boldsymbol{\tilde{Y}}$} \label{fig:cgan_yh_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/Texas/H_Y_After.jpg} \caption{$\!\text{SCCN code: }\boldsymbol{Z}_\mathcal{Y}$} \label{fig:sccn_ya_tx} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/Texas/Aff/Aff.jpg} \caption{$\text{Improved prior: }\boldsymbol{\alpha}$} \label{fig:alpha_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/Texas/Best_d_filtered.jpg} \caption{$\text{ACE-Net diff. image}$} \label{fig:ace_d_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/Texas/d_filtered.jpg} \caption{$\text{X-Net diff. image}$} \label{fig:x_d_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/Texas/d_filtered.jpg} \caption{$\text{CAN difference image}$} \label{fig:cgan_d_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/Texas/d_filtered.jpg} \caption{$\text{SCCN difference image}$} \label{fig:sccn_d_tx} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.45cm 0 0},clip]{Figures/Exp/Texas/Ground_truth.jpg} \caption{Ground truth} \label{fig:gt_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/Texas/Best_Confusion_map.jpg} \caption{ACE-Net CM} \label{fig:ace_cm_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/Texas/Confusion_map.jpg} \caption{X-Net CM} \label{fig:x_cm_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/Texas/Confusion_map.jpg} \caption{CAN CM} \label{fig:cgan_cm_tx} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/Texas/Confusion_map.jpg} \caption{SCCN CM} \label{fig:sccn_cm_tx} \end{subfigure} \end{center} \caption{Texas dataset. \textbf{First column}: Input images $\boldsymbol{X}$ (a) and $\boldsymbol{Y}$ (f), IPC output $\boldsymbol{\alpha}$ (k), and ground truth (p); \textbf{Second column}: Transformed images $\boldsymbol{\hat{X}}$ (b) and $\boldsymbol{\hat{Y}}$ (g) obtained with the ACE-Net, their difference image (l) and resulting confusion map (CM) (q); \textbf{Third column}: Transformed images $\boldsymbol{\hat{X}}$ (c) and $\boldsymbol{\hat{Y}}$ (h) obtained with the X-Net, their difference image (m) and resulting CM (r); \textbf{Fourth column}: Generated SAR image $\hat{\boldsymbol{Y}}$ (d) and approximated image $\boldsymbol{\tilde{Y}}$ (i) obtained with CAN, their image difference (n), and resulting CM (s); \textbf{Fifth column}: Code images $\boldsymbol{Z}_\mathcal{X}$ (e) and $\boldsymbol{Z}_\mathcal{Y}$ (j) obtained with SCCN, their image difference (o), and resulting confusion CM (t).} \label{fig:tx_res} \end{figure*} \begin{figure*}[ht!] \begin{center} \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/x.jpg} \caption{Input image: $\boldsymbol{X}$} \label{fig:x_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/ACE/California/Best_x_hat.jpg} \caption{ACE-Net transl.: $\boldsymbol{\hat{X}}$} \label{fig:ace_xh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/XNET/California/x_hat.jpg} \caption{X-Net translation: $\boldsymbol{\hat{X}}$} \label{fig:x_xh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/CAN/California/y_hat.jpg} \caption{CAN generation: $\boldsymbol{\hat{Y}}$} \label{fig:cgan_xh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/SCCN/California/H_X_After.jpg} \caption{SCCN code: $\boldsymbol{Z}_\mathcal{X}$} \label{fig:sccn_xa_cal} \end{subfigure} \newline \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/y.jpg} \caption{Input image: $\boldsymbol{Y}$} \label{fig:y_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/ACE/California/Best_y_hat.jpg} \caption{ACE-Net trans.: $\boldsymbol{\hat{Y}}$} \label{fig:ace_yh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/XNET/California/y_hat.jpg} \caption{X-Net translation: $\boldsymbol{\hat{Y}}$} \label{fig:x_yh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/CAN/California/x_hat.jpg} \caption{CAN approx.: $\hat{\boldsymbol{X}}$} \label{fig:cgan_yh_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/SCCN/California/H_Y_After.jpg} \caption{SCCN code: $\boldsymbol{Z}_\mathcal{Y}$} \label{fig:sccn_ya_cal} \end{subfigure} \newline \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Aff/Aff.jpg} \caption{Improved prior: $\boldsymbol{\alpha}$} \label{fig:alpha_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/ACE/California/Best_d_filtered.jpg} \caption{ACE-Net diff. image} \label{fig:ace_d_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/XNET/California/d_filtered.jpg} \caption{X-Net diff. image} \label{fig:x_d_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/CAN/California/d_filtered.jpg} \caption{CAN diff. image} \label{fig:cgan_d_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/SCCN/California/d_filtered.jpg} \caption{SCCN diff. image} \label{fig:sccn_d_cal} \end{subfigure} \newline \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/Cal/Ground_Truth.jpg} \caption{Ground truth} \label{fig:gt_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/ACE/California/Best_Confusion_map.jpg} \caption{ACE-Net CM} \label{fig:ace_cm_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/XNET/California/Confusion_map.jpg} \caption{X-Net CM} \label{fig:x_cm_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/CAN/California/Confusion_map.jpg} \caption{CAN CM} \label{fig:cgan_cm_cal} \end{subfigure} \hfill \begin{subfigure}[t]{0.155\textwidth} \includegraphics[width=\linewidth,keepaspectratio]{Figures/Exp/SCCN/California/Confusion_map.jpg} \caption{SCCN CM} \label{fig:sccn_cm_cal} \end{subfigure} \hfill \end{center} \caption{California dataset. \textbf{First column}: Input images $\boldsymbol{X}$ (a) and $\boldsymbol{Y}$ (f), IPC output $\boldsymbol{\alpha}$ (k), and ground truth (p); \textbf{Second column}: Transformed images $\boldsymbol{\hat{X}}$ (b) and $\boldsymbol{\hat{Y}}$ (g) obtained with the ACE-Net, their difference image (l) and resulting confusion map (CM) (q); \textbf{Third column}: Transformed images $\boldsymbol{\hat{X}}$ (c) and $\boldsymbol{\hat{Y}}$ (h) obtained with the X-Net, their difference image (m) and resulting CM (r); \textbf{Fourth column}: Generated SAR image $\hat{\boldsymbol{Y}}$ (d) and approximated image $\boldsymbol{\tilde{Y}}$ (i) obtained with CAN, their image difference (n), and resulting CM (s); \textbf{Fifth column}: Code images $\boldsymbol{Z}_\mathcal{X}$ (e) and $\boldsymbol{Z}_\mathcal{Y}$ (j) obtained with SCCN, their image difference (o), and resulting confusion CM (t).} \label{fig:cal_res} \end{figure*} \begin{figure*}[ht!] \begin{center} \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/China/t1.png} \caption{$\text{Input image: }\boldsymbol{X}$} \label{fig:x_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/China/x_hat.png} \caption{$\text{ACE-Net transl.: }\boldsymbol{\hat{X}}$} \label{fig:ace_xh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/China/x_hat.png} \caption{$\text{X-Net translation: }\boldsymbol{\hat{X}}$} \label{fig:x_xh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/China/t1_y_hat.png} \caption{$\text{CAN generation: }\boldsymbol{\hat{Y}}$} \label{fig:cgan_xh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/China/H_X_After.png} \caption{$\text{SCCN code: }\!\boldsymbol{Z}_\mathcal{X}$} \label{fig:sccn_xa_ch} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/China/t2.png} \caption{$\text{Input image: }\boldsymbol{Y}$} \label{fig:y_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/China/y_hat.png} \caption{$\text{ACE-Net transl.: }\boldsymbol{\hat{Y}}$} \label{fig:ace_yh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/China/y_hat.png} \caption{$\text{X-Net translation: }\boldsymbol{\hat{Y}}$} \label{fig:x_yh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/China/t2_x_hat.png} \caption{$\text{CAN approximation: }\boldsymbol{\tilde{Y}}$} \label{fig:cgan_yh_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/China/H_Y_After.png} \caption{$\!\text{SCCN code: }\boldsymbol{Z}_\mathcal{Y}$} \label{fig:sccn_ya_ch} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/China/Aff/Aff.png} \caption{$\text{Improved prior: }\boldsymbol{\alpha}$} \label{fig:alpha_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/China/d_filtered.png} \caption{$\text{ACE-Net diff. image}$} \label{fig:ace_d_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/China/d_filtered.png} \caption{$\text{X-Net diff. image}$} \label{fig:x_d_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/China/d_filtered.png} \caption{$\text{CAN difference image}$} \label{fig:cgan_d_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/China/d_filtered.png} \caption{$\text{SCCN difference image}$} \label{fig:sccn_d_ch} \end{subfigure} \newline \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.45cm 0 0},clip]{Figures/Exp/China/ROI.png} \caption{Ground truth} \label{fig:gt_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/ACE/China/Confusion_map.png} \caption{ACE-Net CM} \label{fig:ace_cm_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/XNET/China/Confusion_map.png} \caption{X-Net CM} \label{fig:x_cm_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/CAN/China/Confusion_map.png} \caption{CAN CM} \label{fig:cgan_cm_ch} \end{subfigure} \hfill \begin{subfigure}[t]{0.175\textwidth} \includegraphics[width=\linewidth,keepaspectratio,trim={0 2.5cm 0 0},clip]{Figures/Exp/SCCN/China/Confusion_map.png} \caption{SCCN CM} \label{fig:sccn_cm_ch} \end{subfigure} \end{center} \caption{China dataset. \textbf{First column}: Input images $\boldsymbol{X}$ (a) and $\boldsymbol{Y}$ (f), IPC output $\boldsymbol{\alpha}$ (k), and ground truth (p); \textbf{Second column}: Transformed images $\boldsymbol{\hat{X}}$ (b) and $\boldsymbol{\hat{Y}}$ (g) obtained with the ACE-Net, their difference image (l) and resulting confusion map (CM) (q); \textbf{Third column}: Transformed images $\boldsymbol{\hat{X}}$ (c) and $\boldsymbol{\hat{Y}}$ (h) obtained with the X-Net, their difference image (m) and resulting CM (r); \textbf{Fourth column}: Generated SAR image $\hat{\boldsymbol{Y}}$ (d) and approximated image $\boldsymbol{\tilde{Y}}$ (i) obtained with CAN, their image difference (n), and resulting CM (s); \textbf{Fifth column}: Code images $\boldsymbol{Z}_\mathcal{X}$ (e) and $\boldsymbol{Z}_\mathcal{Y}$ (j) obtained with SCCN, their image difference (o), and resulting confusion CM (t).} \label{fig:ch_res} \end{figure*} \section{Methodology}\label{sec:method} The same geographical region is scanned by two sensors whose pixel measurements lie in domains $\mathcal{X}$ and $\mathcal{Y}$, respectively. The first sensor captures an image $\mathcal{I_X} \in \mathcal{X}^{H \times W}$ at time $t_1$, and the other sensor an image $\mathcal{I_Y}\in\mathcal{Y}^{H \times W}$ at time $t_2$. $H$ and $W$ denote the common height and width of the images, that are obtained through coregistration and resampling. The feature spaces $\mathcal{X}$ and $\mathcal{Y}$ have dimensions $|\mathcal{X}|$ and $|\mathcal{Y}|$. We further assume that a limited part of the image has changed between time $t_1$ and $t_2$. The final goal of the presented method is to transform data consistently from one domain to the other. To do so, it is crucial to learn a one-to-one mapping between the land cover signatures of one domain and the corresponding signatures in the other. Since no prior information is available, a reasonable option is to learn a mapping from every pixel in $\mathcal{I_X}$ to the corresponding pixel in $\mathcal{I_Y}$ and vice versa. A possibility would be to train two regression functions \begin{align*} \hat{\boldsymbol{Y}} &= F(\boldsymbol{X}):\mathcal{X}^{h\times w}\to\mathcal{Y}^{h\times w} \\ \hat{\boldsymbol{X}} &= G(\boldsymbol{Y}):\mathcal{Y}^{h\times w}\to\mathcal{X}^{h\times w} \end{align*} to map image patches $\boldsymbol{X}\!\in\!\mathcal{X}^{h\times w}\!\subseteq\!\mathcal{I_X}$ and $\boldsymbol{Y}\!\in\!\mathcal{Y}^{h\times w}\!\subseteq\!\mathcal{I_Y}$ between the image domains by using the entire images $\mathcal{I_X}$ and $\mathcal{I_Y}$ as training data. However, the presence of areas affected by changes would distort the learning process, because they would promote a transformation from one land cover in one domain to a different land cover in the other domain. For example, forests and fire scars may be erroneously connected, as may land and flooded land. To reduce the impact of these areas on training, we first perform a preliminary analysis to highlight changes. Then, the contribution of each pixel to the learning process is inversely weighted with a score expressing the chance of it being affected by a change. In this section, we first describe the algorithm providing the preliminary change analysis. We then propose two deep learning architectures and, finally, explain how they can exploit the prior computed in the change analysis. \subsection{Prior computation}\label{subsec:affinity} To compute a measure of similarity between multimodal samples based on affinity matrices, we adopt an improved version of the original method proposed in our previous work~\cite{luppino2019unsupervised}. Please notice that the following procedure is totally unsupervised and does not require any ancillary information or knowledge about the data nor about the acquiring sensors. A $k \times k$ sliding window covers an area $p$ of both $\mathcal{I_X}$ and $\mathcal{I_Y}$, from which a pair of corresponding patches $\boldsymbol{X}$ and $\boldsymbol{Y}$ are extracted. $\boldsymbol{X}_i$ ($\boldsymbol{Y}_i$) and $\boldsymbol{X}_j$ ($\boldsymbol{Y}_j$) stand for feature vector $i$ and $j$ of patch $\boldsymbol{X}$ ($\boldsymbol{Y}$), with $i,j\in\{1,\dots,k^2\}$. The distance between a pixel pair $(i,j)$ is defined as $d^{m}_{i,j}$, where the modality $m\in\{\mathcal{X},\mathcal{Y}\}$ depends on whether the samples are taken from $\boldsymbol{X}$ or $\boldsymbol{Y}$. The appropriate choice of distance measure depends on the domain and the underlying data distribution. The hypothesis of Gaussianity for imagery acquired by optical sensors is commonly assumed~\cite{bovolo2007theoretical,bovolo2015time}. Concerning SAR intensity data, a logarithmic transformation is sufficient to bring it to near-Gaussianity~\cite{luppino2017clustering,zhan2018log}. We use the computationally efficient Euclidean distance, as it is suitable for (nearly) Gaussian data. Once computed, the distances between all pixel pairs can be converted to affinities, intended as values describing how close two points are in some feature space according to a metric~\cite{koutroumbas2008pattern}, for instance by the Gaussian kernel: \begin{equation} A^{m}_{i,j} = \exp\left\{-\frac{\left(d^{m}_{i,j}\right)^2}{h_m^2}\right\}\, \in \left(0,1\right], \quad i,j\in\{1,\dots,k^2\}\,. \label{eq:affm} \end{equation} $A^{m}_{i,j}$ are the entries of the affinity matrix $A^{m} \in \mathbb{R}^{k^2 \times k^2}$ for the given patch and modality $m$. Here, the term affinity is used as synonym for similarity, as it has been widely used in the machine learning literature, especially with methods based on graph theory, such as spectral clustering and Laplacian eigenmaps~\cite{von2007tutorial,shi2000normalized,liu2017learning,cheng2018depth,maire2016affinity,chung1997spectral}. The kernel width $h_m$ is domain-specific and can be determined automatically. Our choice is to set it equal to the average distance to the $K^{th}$ nearest neighbour for all data points in the relevant patch ($\boldsymbol{X}$ or $\boldsymbol{Y}$), with $K=\frac{3}{4}k^2$. In this way, a characteristic distance within the patch is captured by this heuristic, which is robust with respect to outliers \cite{myhre2012mixture}. Silverman's rule of thumb~\cite{wand1995kernel} and other common approaches to determine the kernel width have not proven themselves effective in our experimental evaluation, so they were discarded. Once the two affinity matrices are computed, a matrix $D$ holding the element-wise absolute differences $D_{i,j} = \lvert A_{i,j}^{\mathcal{X}} - A_{i,j}^{\mathcal{Y}} \rvert$ can be obtained. Our previous algorithm \cite{luppino2019unsupervised} would at this point evaluate the Frobenius norm of $D$ and assign its value to all the pixels belonging to $p$. Then, the $k \times k$ window is shifted one pixel and the procedure is iterated for the set $\mathcal{P}$ of all overlapping patches $p$ that can be extracted from the image. The final result for each pixel is derived by averaging the set $\mathcal{S}^F$ of Frobenius norms obtained with all the patches covering that pixel. Clearly, the loop over the patches in $\mathcal{P}$ is computationally heavy, although when shifting a patch one pixel, most of the already computed pixel distances can be reused. If $N= H\cdot W$ is the total number of pixels in the images, the cardinality of $\mathcal{P}$ is \begin{equation} \begin{split} \lvert\mathcal{P}\rvert & = (H-k+1)\cdot(W-k+1) \\ & = N -(H + W)(k-1) + (k-1)^2\,. \end{split} \end{equation} Shifting the sliding window by a factor larger than one will speed up the algorithm, but with the result that the final map of averaged Frobenius norms exhibits an unnatural tile pattern. To address this issue, we propose to compute the following mean over the rows of $D$ (or columns, since $A^{\mathcal{X}}$ and $A^{\mathcal{Y}}$ are symmetrical, hence so is $D$): \begin{equation} \alpha_i = \frac{1}{k^2} \sum_{j=1}^{k^2} \lvert A^{\mathcal{X}}_{i,j} - A^{\mathcal{Y}}_{i,j} \rvert, \quad i\in\{1,\dots,k^2\} \label{eq:alpha} \end{equation} The main rationale for this operation is that pixels affected by changes are the ones perturbing the structural information captured by the affinity matrices, and so, on average, their corresponding rows in $D$ should present larger values. We can also choose to look at $D$ as the affinity matrix of a change graph, with change affinities $D_{i,j}$ that indicate whether the relation between pixel $i$ and $j$ has changed. The row sums of $D$ become vertex degrees of the graph that sum the change affinities of individual pixels. A high vertex degree suggests that many pixel relations have changed, and that the pixel itself is subject to a change. The scaling of the vertex degree by $1/k^2$ normalises and fixes the range of $\alpha_i$ to $[0,1]$, which simplifies both thresholding and probabilistic interpretation. Another advantage of the vertex degree is that it isolates evidence about change for a single pixel, whereas the Frobenius norm of $D$ accumulates indications of change for an entire patch and provides change evidence that is less localised. In conclusion, $\alpha_i$ contains more reliable information and, most importantly, relates only to a single pixel $i$. It is therefore possible to introduce a shift factor $\Delta > 1$, which on one hand means that the final result becomes an average over a smaller set $\mathcal{S}^\alpha$, but on the other hand speeds up the computations considerably. Potentially, this shift can be as large as the patch size, reducing the amount of patches by a factor of $k^2$. However, this is not desirable, since each pixel will be covered only once, leaving us with a set $S^\alpha$ of one element and no room for averaging. \begin{figure*}[ht!] \hfill \begin{minipage}{.48\columnwidth} \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Radar.pdf} \caption{$\boldsymbol{X}$ (SAR) at $t_1$} \label{fig1:sar} \end{subfigure}\\[1ex] \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Optical.pdf} \caption{$\boldsymbol{Y}$ (optical) at $t_2$} \label{fig1:opt} \end{subfigure} \end{minipage}% \begin{minipage}{.48\columnwidth} \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Aff1.pdf} \caption{$A^{\mathcal{X}}$} \label{fig1:aff1} \end{subfigure}\\[1ex] \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Aff2.pdf} \caption{$A^{\mathcal{Y}}$} \label{fig1:aff2} \end{subfigure} \end{minipage}% \begin{minipage}{.48\columnwidth} \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Diff.pdf} \caption{$D=\lvert A^{\mathcal{X}} - A^{\mathcal{Y}} \rvert$} \label{fig1:diff} \end{subfigure} \end{minipage}% \begin{minipage}{.48\columnwidth} \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/Test.pdf} \caption{Prior image $\boldsymbol{\alpha}$} \label{fig1:test} \end{subfigure}\\[1ex] \begin{subfigure}{\linewidth} \centering \includegraphics[width=0.8\linewidth,keepaspectratio]{Figures/Method/Toy_data/CD.pdf} \caption{Confusion map (thresholded $\boldsymbol{\alpha}$)} \label{fig1:cd} \end{subfigure} \end{minipage} \hfill \caption{Toy example. \subref{fig1:sar}) Patch from the SAR image at time $t_1$; \subref{fig1:opt}) Corresponding patch in the optical image at time $t_2$; \subref{fig1:aff1}-\subref{fig1:diff}) Affinity matrices and their absolute difference; \subref{fig1:test}) Prior image $\boldsymbol{\alpha}$ obtained from $D$ by applying \eqref{eq:alpha}; \subref{fig1:cd}) Confusion map obtained by thresholding $\boldsymbol{\alpha}$, with true positives (white) and true negatives (black). Best viewed in colour.} \label{fig:toy_example} \end{figure*} The toy example in Fig.\ \ref{fig:toy_example} helps to explain the effectiveness of the proposed approach. To make this case easier to explain, $\Delta$ is set equal to $k$: each pixel in the image is covered only once. Fig.\ \ref{fig1:sar} simulates a patch $\boldsymbol{X}$ of $8 \times 8$ pixels extracted from a SAR image captured at $t_1$. It consists of four blocks representing four different classes, whose pixel intensities are affected by speckle (large variability associated with the multiplicative signal model of SAR images). The corresponding patch $\boldsymbol{Y}$ extracted from an optical image at $t_2$ is depicted in Fig.\ \ref{fig1:opt}; The same classes are disposed in the same way and the pixel intensities are affected by additive Gaussian noise. Changes are introduced by placing 4 pixels representing each class in the bottom right of each block of $\boldsymbol{Y}$. In this way, all the possible transitions between one class and the others occur between $t_1$ and $t_2$. Clearly, a transition from one class to another represents a change, whereas no change occurs when the same class is present at the two dates. The $64 \times 64$ affinity matrices $A^{\mathcal{X}}$ and $A^{\mathcal{Y}}$ computed from $\boldsymbol{X}$ and $\boldsymbol{Y}$ are depicted in Fig.\ \ref{fig1:aff1} and \ref{fig1:aff2}. They both show a regular squared pattern, with high affinities in red and low affinities in blue, which corresponds to the the block structure of $\boldsymbol{X}$ and $\boldsymbol{Y}$. Moreover, the latter presents the expected irregularities and perturbations due to the introduced changed pixels that are breaking the block pattern in Fig.\ \ref{fig1:opt}. Once the change affinity matrix $D$ is evaluated (Fig.\ \ref{fig1:diff}), it can be transformed by \eqref{eq:alpha} into the $8 \times 8$ image of the prior $\alpha_i$ shown in Fig.\ \ref{fig1:test}, where dark (bright) pixels indicate small (large) values of $\alpha_i$. This prior image is denoted $\boldsymbol{\alpha}$. Finally, one may retrieve a CD map by thresholding $\boldsymbol{\alpha}$, which in this case matches the ground truth with $100$\% accuracy, as shown in Fig.\ \ref{fig1:cd} by the confusion map where only true positives (white) and true negatives (black) are present. \begin{algorithm} \begin{spacing}{1.2} \caption{Evaluation of $\boldsymbol{\alpha}$:}\label{alg:aff} \begin{algorithmic} \FORALL{patches $p_\ell, \ell \in \{1,\dots,|\mathcal{P}|\}$} \STATE Compute $d_{i,j}^{m} \> \forall i,j \in p_\ell^{m}, \, m = \boldsymbol{X},\boldsymbol{Y}$ \STATE Determine $h^{\boldsymbol{X}}_\ell$ and $h^{\boldsymbol{Y}}_\ell$ \vspace{0.8pt} \STATE Compute $A_{i,j}^{m}=\exp\left\{-\left(\frac{d_{i,j}^{m}}{h^{m}_\ell}\right)^2\right\}, \, m = \boldsymbol{X},\boldsymbol{Y}$ \vspace{1pt} \STATE Compute $\alpha_{i,\ell} = \frac{1}{k^2} \sum_j \lvert A^{\boldsymbol{X}}_{i,j} - A^{\boldsymbol{Y}}_{i,j} \rvert \, \forall i \in p_\ell$ \STATE Add $\alpha_{i,\ell}$ to the set $\mathcal{S}^\alpha_i \, \forall i \in p_\ell$ \ENDFOR \FORALL{pixels $i \in \{1,\dots,N\}$} \STATE Compute $\alpha_{i} = \frac{1}{\lvert\mathcal{S}_i^\alpha\rvert} \underset{\{\ell\,|\,\alpha_{i,\ell} \in \mathcal{S}_i^\alpha\}}{\sum}\alpha_{i,\ell}$ \ENDFOR \end{algorithmic} \end{spacing} \end{algorithm} Given the set $\mathcal{P}$ of all the image patches of size $k \times k$ spaced by a step size $\Delta$, Algorithm \ref{alg:aff} summarises the procedure to obtain a set of priors $\{\alpha_i\}_{i=1}^N$ for the whole dataset, which can be rearranged into the image $\boldsymbol{\alpha}\in \mathbb{R}^{H \times W}$. For each pixel $i\in\{1,\dots,N\}$ in the image, the mean over $\mathcal{S}_i^\alpha$ is computed, where $\mathcal{S}_i^\alpha$ is the set of the $\alpha_{i,\ell}$ obtained with all the patches $p_\ell\in\mathcal{P}$ covering pixel $i$. If $\Delta$ is a factor of $k$, this average is calculated over $\left(\nicefrac{k}{\Delta}\right)^2$ values. The size $k$ has an important role in the effectiveness of this methodology, because the patches $p$ could be too small or too big to capture the shapes and the patterns within them. To reduce the sensitivity to this parameter, one may suggest to use different values of $k$ for Algorithm \ref{alg:aff} and combine the results in an ensemble manner. For example, once $k$ is defined, the method can be applied also for $k_\textit{small} = \nicefrac{k}{2}$ and $k_\textit{big} = 2 \cdot k$. However, the size of the matrices containing first $d_{i,j}^{m}$ and then $A_{i,j}^{m}$ exhibits a quadratic growth with respect to $k$, thus becoming quickly unfeasible in terms of memory usage and computational time. Hence, instead of applying the method to the original images with $k_\textit{big}$, we suggest to down-sample the images by a factor of $2$, apply the algorithm with $k$, and re-scale the output to the original size. This procedure might introduce artifacts and distortions, but their effects are mitigated when combined with the results obtained with $k_\textit{small}$ and $k$. In the following subsections, we explain how to exploit the outcome of Algorithm \ref{alg:aff} to train the proposed deep learning architectures in absence of supervision. \subsection{X-Net: Weighted Translation Network}\label{subsec:crossed} \begin{figure}[b!] \centering \includegraphics[width=0.50\columnwidth]{Figures/Method/Domain_1.png} \caption{First proposed framework, where two domains and two transformations which can translate data across them.} \label{fig:domains1} \end{figure} \begin{figure*}[t!] \centering \includegraphics[width=1.9\columnwidth]{Figures/Method/xnet_arrows_mod.png} \caption{Data flow of the X-Net. Two CNNs transform data from the domain of $\boldsymbol{X}$ to the domain of $\boldsymbol{Y}$ and vice versa. Solid lines going through them indicate data transferred from one domain to the other, dashed lines indicate data re-transformed back to their original domain.} \label{fig:xnet} \end{figure*} The main goal of our approach is to map data across two domains. As Fig.\ \ref{fig:domains1} illustrates, this means to train a function $F(\boldsymbol{X})\!:\!\mathcal{X}^{h\times w}\!\to\!\mathcal{Y}^{h\times w}$ to transform data between the domains of $\boldsymbol{X}$ and $\boldsymbol{Y}$, and a second function $G(\boldsymbol{Y}):\mathcal{X}^{h\times w}\to\mathcal{Y}^{h\times w}$ to do the opposite. The two mapping functions can be implemented as convolutional neural networks (CNNs). Hence, the training can be carried out by the minimisation of an objective function with respect to the set $\vartheta$ of parameters of the two networks. The objective function, commonly referred to as the loss function $\mathcal{L}(\vartheta)$, is defined \textit{ad hoc} and usually consists of a weighted sum of loss terms, where each relates to a specific objective or property that we want from the solution. For this particular framework, we introduce three loss terms. Note that from now on we refer to training patches of much larger size than the patch size $k$ of \Cref{subsec:affinity} used to compute the affinity-based prior. \subsubsection{Weighted translation loss} For a pair of patches $\{\boldsymbol{X},\boldsymbol{Y}\}$, we want in general the domain translation to satisfy: \begin{equation}\label{eq:approxhat} \begin{split} \hat{\boldsymbol{Y}} = F(\boldsymbol{X}) \simeq \boldsymbol{Y}\,, \\ \hat{\boldsymbol{X}} = G(\boldsymbol{Y}) \simeq \boldsymbol{X}\,, \end{split} \end{equation} where $\hat{\boldsymbol{Y}} = F(\boldsymbol{X})$ and $\hat{\boldsymbol{X}} = G(\boldsymbol{Y})$ stand for the data transformed from one domain into the other. However, pixels that are likely to be changed shall not fulfill the same requirements, i.e., condition (\ref{eq:approxhat}) should be satisfied in unchanged areas but should not be enforced in changed ones in order not to hinder the capability of the proposed method to discriminate changes. More formally, if $H_0$ and $H_1$ indicate the ``no-change" and ``change" hypotheses, respectively, then in a least mean-square error (MSE) framework, it would be desired that the network parameters ideally minimized the following MSE conditioned to "no-change": \begin{equation}\label{eq:idealloss} \mathcal{L}_{H_0}(\vartheta)=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\left.\delta(\boldsymbol{X},\hat{\boldsymbol{X}})\right|H_0\right]+\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\left.\delta(\boldsymbol{Y},\hat{\boldsymbol{Y}})\right|H_0\right], \end{equation} where $\delta(\boldsymbol{A},\boldsymbol{B})$ indicates the squared $L_2$ distance between two equal-sized $h\times w$ patches $\boldsymbol{A}$ and $\boldsymbol{B}$, i.e.: \begin{equation} \delta(\boldsymbol{A},\boldsymbol{B})= \frac{1}{h\cdot w}\displaystyle\sum_{i=1}^{h\cdot w}\lVert\boldsymbol{a}_i-\boldsymbol{b}_i\rVert_2^2\,. \end{equation} Here, $\boldsymbol{a}_i$ and $\boldsymbol{b}_i$ denote the vectors associated with the $i$-th pixel in patches $\boldsymbol{A}$ and $\boldsymbol{B}$, respectively ($i=1,2,\ldots,h\cdot w$). Estimating the expectations in~\eqref{eq:idealloss} is straightforward using a training set for $H_0$, as it has been done in \cite{touati2020anomaly}. However, a training set is unavailable in the fully unsupervised scenario that is considered here.\\ We prove in the Appendix that, under mild conditional independence assumptions, the conditional loss $\mathcal{L}_{H_0}(\vartheta)$ can be equivalently rewritten as: \begin{equation}\label{eq:idealloss2} \mathcal{L}_{H_0}(\vartheta)=\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\delta(\boldsymbol{X},\hat{\boldsymbol{X}}|\boldsymbol\Psi)\right]+\mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\left[\delta(\boldsymbol{Y},\hat{\boldsymbol{Y}}|\boldsymbol\Phi)\right], \end{equation} where $\delta(\boldsymbol{A},\boldsymbol{B}|\boldsymbol{W})$ indicates a squared $L_2$ distance weighted on a vector of weights $\boldsymbol{W}=[W_1,W_2,\ldots,W_{h\cdot w}]^T$, i.e.: \begin{equation}\label{eq:delta} \delta(\boldsymbol{A},\boldsymbol{B}|\boldsymbol{W}) = \frac{1}{h\cdot w}\displaystyle\sum_{i=1}^{h\cdot w}W_i\lVert\boldsymbol{a}_i-\boldsymbol{b}_i\rVert_2^2\,, \end{equation} and where $\boldsymbol\Psi$ and $\boldsymbol\Phi$ are $(h\cdot w)$-dimensional weight vectors whose components are defined in terms of the joint probability distributions of $\boldsymbol{X}$ and $\boldsymbol{Y}$, given $H_0$ and $H_1$. Accordingly, the $H_0$-conditional MSE in (\ref{eq:idealloss}) is equivalent to an unconditional but suitably weighted MSE. In particular, it is also proven in the appendix that the $i$-th component of $\boldsymbol\Psi$ takes values in the interval: \begin{equation} 0<\Psi_i\leq\frac{1}{P(H_0)}, \end{equation} where $P(H_0)$ is the prior probability of ``no-change." This prior is strictly positive since we assumed at the beginning of this section that the changes affected a limited part of the image. According to a reasoning based on likelihood ratio testing (see Appendix), the lower end $\Psi_i\simeq0$ suggests that the $i$-th pixel of the patch is likely changed, and the upper end $\Psi_i\simeq1/P(H_0)$ suggests that it is likely unchanged ($i=1,2,\ldots,h\cdot w$). The same statement holds for the components of $\boldsymbol\Phi$ as well. This is consistent with the aforementioned interpretation of the equivalence between the $H_0$-conditional non-weighted MSE in (\ref{eq:idealloss}) and the unconditional weighted MSE in (\ref{eq:idealloss2}) because the $i$-th pixel does not contribute to the loss in (\ref{eq:idealloss2}) when it is likely changed. Vice versa, it gives its maximum contribution when it is likely unchanged. Without training samples, estimating the expectations in (\ref{eq:idealloss2}) is as difficult as estimating those in (\ref{eq:idealloss}) because the weight vectors depend on the joint conditional distributions of $\boldsymbol{X}$ and $\boldsymbol{Y}$. Therefore, in the proposed method, we leverage on the reformulation as a weighted unconditional MSE in (\ref{eq:idealloss2}) to define an approximation of the $H_0$-conditional MSE in (\ref{eq:idealloss}) by making use of the affinity prior defined in (\ref{eq:alpha}). As discussed in Section~\ref{subsec:affinity}, every pixel pair $\{\boldsymbol{x}_i,\boldsymbol{y}_i\}$ will be associated with a precomputed prior, $\alpha_i$, that measures through affinity reasoning its chances of being changed. We exploit this information to approximate (\ref{eq:idealloss2}) as follows: \begin{equation}\label{eq:weighted} \mathcal{L}_{\alpha}\!\left(\vartheta\right) = \mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\!\left[\delta(\hat{\boldsymbol{X}},\boldsymbol{X}|\boldsymbol{\Pi})\right] + \mathbb{E}_{\boldsymbol{X},\boldsymbol{Y}}\!\left[\delta(\hat{\boldsymbol{Y}},\boldsymbol{Y}|\boldsymbol{\Pi})\right]\,, \end{equation} where $\boldsymbol{\Pi}=[\Pi(\alpha_1),\dots,\Pi(\alpha_{h\cdot w})]^T$, and $\Pi(\alpha):[0,1]\to[0,1]$ is a monotonically decreasing function that maps $\alpha_i$, measuring the chances of change, into $\Pi_i$, that is used to weigh the contribution of the $i$-th pixel to the loss function ($i=1,2,\ldots,h\cdot w$). Specifically, $\Pi(\alpha_i)$ is supposed to be close to zero when the $i$-th pixel is likely changed (i.e., when $\alpha_i\simeq1$) and close to one when it is likely unchanged (i.e., $\alpha_i\simeq0$). Methodologically, the weighted translation loss $\mathcal{L}_{\alpha}(\vartheta)$ in (\ref{eq:weighted}) is meant as an approximation of (\ref{eq:idealloss2}) -- and thus of the desired conditional non-weighted MSE in (\ref{eq:idealloss}) --, up to a positive multiplicative constant equal to $1/P(H_0)$. We use the simple $\Pi(\alpha) = 1-\alpha$, but other choices can be considered. \subsubsection{Cycle-consistency loss} In their seminal work on CycleGANs~\cite{zhu2017unpaired}, Zhu \textit{et.\ al} pointed out that domain translations should respect the principle of cycle-consistency: Ideally, if $F(\boldsymbol{X})$ and $G(\boldsymbol{Y})$ are perfectly tuned, it must hold true that \begin{equation} \begin{split} \boldsymbol{\dot{X}} = G(\hat{\boldsymbol{Y}}) = G\left(F(\boldsymbol{X})\right) \simeq \boldsymbol{X}\,, \\ \boldsymbol{\dot{Y}} = F(\hat{\boldsymbol{X}}) = F\left(G(\boldsymbol{Y})\right) \simeq \boldsymbol{Y}\,, \end{split} \end{equation} where $\boldsymbol{\dot{X}} = G(\hat{\boldsymbol{Y}})$ and $\boldsymbol{\dot{Y}} = F(\hat{\boldsymbol{X}})$ indicate the data re-transformed back to the original domains. Consequently, the cycle-consistency loss term is defined as: \begin{equation} \mathcal{L}_{\mathrm{cyc}}\left(\vartheta\right) = \mathbb{E}_{\boldsymbol{X}}\left[\delta(\dot{\boldsymbol{X}},\boldsymbol{X})\right] + \mathbb{E}_{\boldsymbol{Y}}\left[\delta(\dot{\boldsymbol{Y}},\boldsymbol{Y})\right]\,. \end{equation} Note that training with the cycle-consistency principle does not require paired data. \subsubsection{Total Loss Function} The third and last term of the loss function is a weight decay regularisation term, which reduces overfitting by controlling the magnitude of the network parameters $\vartheta$. The total loss function becomes \begin{equation} \mathcal{L}(\vartheta) = \left\{ w_{\mathrm{cyc}} \mathcal{L}_{\mathrm{cyc}}(\vartheta) + w_{\alpha} \mathcal{L}_{\alpha}(\vartheta) + w_{\vartheta} \left\lVert\vartheta\right\rVert^2_2\right\}. \end{equation} Optimisation is carried out by seeking its global minimum with respect to $\vartheta$. The weights $w_{\mathrm{cyc}}$, $w_{\alpha}$ and $w_{\vartheta}$ are set to balance the impact of the terms. Fig.\ \ref{fig:xnet} shows the scheme of the X-Net: One CNN plays the role of $F(\boldsymbol{X})$, the other represents $G(\boldsymbol{Y})$. Solid lines going through them indicate data transferred from one domain to the other, dashed lines indicate data re-transformed back to their original domain. The patches from $\boldsymbol{X}$ and $\boldsymbol{Y}$ are used both as input and targets for the CNNs. Recall that the patch prior $\boldsymbol{\alpha}$ is computed in advance, as explained in \Cref{subsec:affinity}. For an easier representation, $\boldsymbol{\alpha}$ is deliberately depicted in Fig.\ \ref{fig:xnet} as computed on the fly. \subsection{ACE-Net: Adversarial Cyclic Encoder Network} \begin{figure}[ht!] \centering \includegraphics[width=0.85\columnwidth]{Figures/Method/Domain_2.png} \caption{Second proposed framework: a latent space $\mathcal{Z}$ is introduced between domains $\mathcal{X}$ and $\mathcal{Y}$, and four regression functions mapping data across them. In this case, $F(\boldsymbol{X})=D_\mathcal{Y}\left(E_\mathcal{X}\left(\boldsymbol{X}\right)\right)$ and $G(\boldsymbol{Y}) = D_\mathcal{X}\left(E_\mathcal{Y}\left(\boldsymbol{Y}\right)\right)$.} \label{fig:domains2} \end{figure} \begin{figure*}[ht!] \centering \includegraphics[width=1.9\columnwidth]{Figures/Method/ace.png} \caption{Data flow of the ACE-Net. The encoders $E_\mathcal{X}\left(\boldsymbol{X}\right)$ and $E_\mathcal{Y}\left(\boldsymbol{Y}\right)$ transform incompatible data into two code spaces, which are aligned by adversarial training against the discriminator $\mathfrak{D}\left(\boldsymbol{Z}\right)$. The decoders $D_\mathcal{X}\left(\boldsymbol{Z}\right)$ and $D_\mathcal{Y}\left(\boldsymbol{Z}\right)$ are taught to map data from the latent space back into the original spaces. For simplicity, only the loss terms related to $\boldsymbol{X}$ and their corresponding data flows are depicted. Dash lines refer to data which have been transformed already once, have gone through the framework again and have been transformed back into their original domain.} \label{fig:ACEnet} \end{figure*} Inspired by Murez \emph{et al.} \cite{murez2018image}, we expand the X-Net framework by introducing a latent space $\mathcal{Z}$ between domain $\mathcal{X}$ and domain $\mathcal{Y}$. Differently from the X-Net, this architecture consists of five CNNs. The first four networks are image regression functions (see Fig.\ \ref{fig:domains2}): Encoders $E_\mathcal{X}\left(\boldsymbol{X}\right):\mathcal{X}^{h\times w}$ and $E_\mathcal{Y}\left(\boldsymbol{Y}\right):\mathcal{Y}^{h\times w}$ transform data from the original domains into the new common space and a representation referred to as the code: $\boldsymbol{Z}\in\mathcal{Z}^{h\times w}$. Note that the spatial dimensions of $\boldsymbol{Z}$, $h$ and $w$, are equal to those of $\boldsymbol{X}$ and $\boldsymbol{Y}$. This is an empirical choice, as this is seen to produce best image translation and change detection performance. Bottlenecking (dimensionality reduction) at the code layer is not needed for regularisation, as with conventional autoencoders, due to the constraints imposed by loss functions associated with cross-domain mapping. The decoders $D_\mathcal{X}\left(\boldsymbol{Z}\right):\mathcal{Z}^{h\times w}\to\mathcal{X}^{h\times w}$ and $D_\mathcal{Y}\left(\boldsymbol{Z}\right):\mathcal{Z}^{h\times w}\to\mathcal{Y}^{h\times w}$ map latent space data back into their original domains. The fifth network is a discriminator, which is described later. Despite the added complexity, is simple to notice an analogy between the two schemes, namely: $F(\boldsymbol{X})=D_\mathcal{Y}\left(E_\mathcal{X}\left(\boldsymbol{X}\right)\right)$ and $G(\boldsymbol{Y}) = D_\mathcal{X}\left(E_\mathcal{Y}\left(\boldsymbol{Y}\right)\right)$. Therefore, we can include the same loss terms that the X-Net uses: weighted translation loss and cycle-consistency loss, in addition to the weight decay regularisation term. In this case, \begin{equation} \begin{split} \hat{\boldsymbol{X}} &= G(\boldsymbol{Y}) = D_\mathcal{X}\left(E_\mathcal{Y}\left(\boldsymbol{Y}\right)\right)\,, \\ \hat{\boldsymbol{Y}} &= F(\boldsymbol{X}) = D_\mathcal{Y}\left(E_\mathcal{X}\left(\boldsymbol{X}\right)\right)\,, \\ \boldsymbol{\dot{X}} &= G(\hat{\boldsymbol{Y}}) = D_\mathcal{X}\left(E_\mathcal{Y}\left(D_\mathcal{Y}\left(E_\mathcal{X}\left(\boldsymbol{X}\right)\right)\right)\right)\,, \\ \boldsymbol{\dot{Y}} &= F(\hat{\boldsymbol{X}}) = D_\mathcal{Y}\left(E_\mathcal{X}\left(D_\mathcal{X}\left(E_\mathcal{Y}\left(\boldsymbol{Y}\right)\right)\right)\right)\,. \end{split} \end{equation} Nonetheless, the ACE-Net framework allows to define two additional loss terms. \subsubsection{Reconstruction Loss} The composite functions $D_{\mathcal X}(E_{\mathcal X}(\boldsymbol{X}))$ and $D_{\mathcal Y}(E_{\mathcal Y}(\boldsymbol{Y}))$ constitute autoencoders, whose goal is to reproduce their input as faithfully as possible in output. This means that the reconstructed images $\Tilde{\boldsymbol{X}}$ and $\Tilde{\boldsymbol{Y}}$ must satisfy: \begin{equation} \begin{split} \Tilde{\boldsymbol{X}} &= D_\mathcal{X}\left(E_\mathcal{X}\left(\boldsymbol{X}\right)\right) \simeq \boldsymbol{X}\,, \\ \Tilde{\boldsymbol{Y}} &= D_\mathcal{Y}\left(E_\mathcal{Y}\left(\boldsymbol{Y}\right)\right) \simeq \boldsymbol{Y}\,. \end{split} \end{equation} Consequently, we introduce the reconstruction loss term: \begin{equation}\label{eq:recon} \mathcal{L}_{\mathrm{AE}}\left(\vartheta_{\mathrm{AE}}\right) = \mathbb{E}_{\boldsymbol{X}}\left[\delta(\tilde{\boldsymbol{X}},\boldsymbol{X})\right] + \mathbb{E}_{\boldsymbol{Y}}\left[\delta(\tilde{\boldsymbol{Y}},\boldsymbol{Y})\right]\,, \end{equation} where $\vartheta_{\mathrm{AE}}$ denotes all parameters in the autoencoders, consisting of $E_\mathcal{X}(\boldsymbol{X})$, $D_\mathcal{Y}(\boldsymbol{Z})$, $E_\mathcal{Y}(\boldsymbol{Y})$ and $D_\mathcal{X}(\boldsymbol{Z})$. \subsubsection{Adversarial Code Alignment Losses} Even after implementing the cycle-consistency loss and the weighted translation loss, there is no guarantee that the latent domain is the same for both AEs. Although the code layers might align in distribution, there is still a risk that class signatures do not correspond due to mode swapping or other perturbations in feature space. To ensure that they align both in distribution and in feature space location of classes, we apply adversarial training and feed a discriminator with a stack of the two codes. The discriminator $\mathfrak{D}(\boldsymbol{Z}):\mathcal{Z}^{h\times w}\to[0,1]$ is rewarded if it is able to distinguish the codes, whereas the generators (i.e.\ the encoders) are penalised when the discriminator succeeds. Let successful discrimination be defined as: $\mathfrak{D}(E_\mathcal{X}(\boldsymbol{X}))=1$ and $\mathfrak{D}(E_\mathcal{Y}(\boldsymbol{Y}))=0$. Thus, the last two loss terms become: \begin{equation} \!\!\mathcal{L}_{\mathfrak D}\!\left(\vartheta_{\mathfrak D}\right) = \mathbb{E}_{\boldsymbol{X}}\!\!\left[\left(\mathfrak{D}\!\left(E_\mathcal{X}\!\left(\boldsymbol{X}\right)\right)\!-\!1\right)^2\right] + \mathbb{E}_{\boldsymbol{Y}}\!\!\left[\mathfrak{D}\!\left(E_\mathcal{Y}\!\left(\boldsymbol{Y}\right)\right)^2\right] \label{eq:discr} \end{equation} \begin{equation} \!\!\mathcal{L}_{\mathcal Z}\!\left(\vartheta_{E}\right) = \mathbb{E}_{\boldsymbol{X}}\!\!\left[\mathfrak{D}\!\left(E_\mathcal{X}\!\left(\boldsymbol{X}\right)\right)^2\right] + \mathbb{E}_{\boldsymbol{Y}}\!\!\left[\left(\mathfrak{D}\!\left(E_\mathcal{Y}\!\left(\boldsymbol{Y}\right)\right)\!-\!1\right)^2\right] \label{eq:code} \end{equation} where the discrimination loss $\mathcal{L}_{\mathfrak D}$ is used to adjust the parameters $\vartheta_{\mathfrak D}$ of the discriminator. The code layer is used as generator, and the code loss $\mathcal{L}_{\mathcal Z}$ is used to train the parameters $\vartheta_{E}$ of the encoders $E_\mathcal{X}(X)$ and $E_\mathcal{Y}(Y)$ that generate the codes. The adversarial scheme is evident from \eqref{eq:discr} and \eqref{eq:code}, the two generators and the discriminator aim at the opposite goal and, therefore, have opposite loss terms. As in \cite{zhu2017unpaired}, we choose an adversarial objective function based on mean squared errors rather than a logarithmic one. Note that two discriminators could also have been placed after the decoders to distinguish transformed \textit{fake} data from the reconstructed ones, as in \cite{gong2019coupling}. However, to train two additional networks and find a good balance between all the involved parties is not trivial and require the correct design of each and every network in the architecture, on top of which fine-tuning of all the involved weights must be carried out. In conclusion, we decided to have a less complex framework with just one discriminator for the code space. \subsubsection{Total loss function} The total loss function $\mathcal{L}(\vartheta)$ in this case is composed of six terms: \begin{equation} \begin{split} \mathcal{L}(\vartheta) = & w_{\mathrm{adv}}\left[\mathcal{L}_{\mathcal Z}\left(\vartheta_{E}\right)+\mathcal{L}_{\mathfrak D}\left(\vartheta_{\mathfrak D}\right)\right] + \\ & w_{\mathrm{AE}} \mathcal{L}_{\mathrm{AE}}\left(\vartheta_{\mathrm{AE}}\right) + w_{\mathrm{cyc}} \mathcal{L}_{\mathrm{cyc}}(\vartheta_{\mathrm{AE}}) + \\ & w_{\alpha} \mathcal{L}_{\alpha}(\vartheta_{\mathrm{AE}}) + w_{\vartheta} \left\lVert\vartheta\right\rVert^2_2 \, . \end{split} \end{equation} The weights balancing the adversarial losses ($w_{\mathrm{adv}}$), the reconstruction loss ($w_{\mathrm{AE}}$), the cycle-consistency loss ($w_{\mathrm{cyc}}$), the weighted translation loss ($w_{\alpha}$), and the weight regularisation ($w_{\vartheta}$) must be tuned. Fig.\ \ref{fig:ACEnet} show the schematics of the ACE-Net. For simplicity, the arrows represent the data flow involving only the loss terms related to $\boldsymbol{X}$. $\boldsymbol{Y}$ in this image is used only to produce its code and as a target for translation from $\boldsymbol{X}$. The flow diagram for loss terms related to $\boldsymbol{Y}$ would be symmetric. Solid arrows represent images going through the encoder-decoder pairs only once (namely $\Tilde{\boldsymbol{X}}$ and $\hat{\boldsymbol{Y}}$), dashed arrows are the second half of the cycle leading to $\dot{\boldsymbol{X}}$. The discriminator $\mathfrak{D}\left(\boldsymbol{Z}\right)$ takes as input $E_\mathcal{X}\left(\boldsymbol{X}\right)$ and $E_\mathcal{Y}\left(\boldsymbol{Y}\right)$ and tries to tell them apart. \subsection{Change extraction} At this stage of the proposed methodology, any homogeneous change detection technique could be used to highlight changes. Among these, we must choose the most appropriate according to the characteristics of the data. However, the translated images go through severely nonlinear transformations, and defining an analytical model describing their statistics is not trivial. Moreover, the main objective of this work is to propose two translation methods, whose contribution might be concealed by a more complex homogeneous change detection approach. Therefore, image subtraction is the most appropriate operation: its requirement is that the original images and the translated ones are in the same domain, which is the final goal of the translation networks. Once the X-Net and the ACE-Net are trained and the transformed images $\hat{\boldsymbol{X}}$ and $\hat{\boldsymbol{Y}}$ obtained, the elements of two distance images $d^\mathcal{X}$ and $d^\mathcal{Y}$ can be computed as the vector norms of the pixel-wise subtractions \begin{equation*} d^{\mathcal{X}}_i = \lVert\hat{\boldsymbol{x}}_i-\boldsymbol{x}_i\rVert_2\quad \mathrm{and}\quad d^{\mathcal{Y}}_i = \lVert\hat{\boldsymbol{y}}_i-\boldsymbol{y}_i\rVert_2 \end{equation*} for all pixels $i\in\{1,\dots,N\}$, where $\boldsymbol{x}_i$, $\boldsymbol{y}_i$, $\hat{\boldsymbol{x}}_i$ and $\hat{\boldsymbol{y}}_i$ represent, respectively, pixels of $\boldsymbol{X}$, $\boldsymbol{Y}$, $\hat{\boldsymbol{X}}$ and $\hat{\boldsymbol{Y}}$. \iffalse \begin{equation} \begin{aligned} d_m^{\boldsymbol{X}} = \left\lVert\hat{\boldsymbol{x}}_m-\boldsymbol{x}_m\right\rVert_2\,, \\ d_m^{\boldsymbol{Y}} = \left\lVert\hat{\boldsymbol{y}}_m-\boldsymbol{y}_m\right\rVert_2 \end{aligned} \, m \in \{1,\dots,M\} \end{equation} \fi These difference images are normalised and combined together so that changes are highlighted, whereas false alarms that are present in only one of the two distance images are suppressed. Outliers might affect the two normalisations, so the distances in $d^{\mathcal{X}}$ and $d^{\mathcal{Y}}$ beyond three standard deviations of the mean values are clipped. We combine the normalised distance images with a simple average and obtain the final difference image $d$. The latter is then filtered and thresholded to achieve a binary segmentation, which provides the final goal of a CD method: the change map. Concerning filtering, the method proposed in~\cite{krahenbuhl2011efficient} is used. It exploits spatial context to filter $d$ with a fully connected conditional random field model. It defines pairwise edge potentials between all pairs of pixels in the image by a linear combination of Gaussian kernels in an arbitrary feature space. The main downside of the iterative optimisation of the random field is that it requires the propagation of all the potentials across the image. However, this highly efficient algorithm reduces the computational complexity from quadratic to linear in the number of pixels by approximating the random field with a mean field whose iterative update can be computed using Gaussian filtering in the feature space. The number of iterations and the kernel width of the Gaussian kernels are the only hyperparameters manually set, and we opted to tune them according to \cite{luppino2019unsupervised}: $5$ iterations and a kernel width of $0.1$. Finally, it is fundamental to threshold the filtered difference image correctly: a low threshold yields unnecessary false alarms. Vice versa, a high threshold increases the number of missed changes. Methods such as~\cite{otsu1979threshold,kapur1985new,shanbhag1994utilization,yen1995new} are able to set the threshold automatically. Among these, we selected the well known Otsu's method~\cite{otsu1979threshold}. \section{Related work}\label{sec:related_work} The most common solution to compare heterogeneous data is to transform them and make them compatible. This is the main reason why many of the heterogeneous CD methods are related to the topics of domain adaptation and feature learning. In the following we list the main deep learning architectures that are found in the heterogeneous CD literature, along with some examples of methods implementing them. \subsection{Stacked Denoising Autoencoders} \subsubsection{Background} The autoencoder (AE) is a powerful deep learning architecture which has proven capable of solving problems like feature extraction, dimensionality reduction, and clustering~\cite{hinton2006reducing}. A denoising AE (DAE) is a particular type of AE trained to reconstruct an input signal that has been artificially corrupted by noise. The stacked denoising autoencoder (SDAE) is probably the most used model to infer spatial information from data and learn new representations and features. SDAEs are trained following the same procedure as DAEs, but their ability of denoising is learned in a layerwise manner by injecting noise into one layer at the time, starting from the outermost layer and moving on towards the innermost one~\cite{vincent2010stacked}. In the following, some examples from the heterogeneous change detection literature are presented. \subsubsection{Applications}\label{sec:sccn} Su \textit{et al.}~\cite{su2017deep} used change vector analysis to distinguish between three classes: unchanged areas, positive changes and negative changes, as defined in~\cite{bovolo2007theoretical}. They exploit two SDAEs to extract relevant features and transfer the data into a code space, where code differences from co-located patches are clustered to achieve a preliminary distinction between samples from the three classes. These samples are then used to train three distinct mapping networks, each of which learns to take the features extracted from one image as input and transform them into plausible code features related to another image. The goal of the first network is to reproduce the expected code from the latter image in case of a positive change, the second aims to do the same in case of a negative change, and the last takes care of the \textit{no-change} case. A pixel is eventually assigned to the class corresponding to the reproduced code showing the smallest difference with the original code from the second image. In a very similar fashion, Zhang \textit{et al.}~\cite{zhang2016cd} first use a spatial details recovery network trained on a manually selected set to coregister the two images, but then extract relevant features from them with two SDAEs trained in an unsupervised fashion. Starting from these transformed images, manual inspection, post-classification comparison or clustering provides a coarse change map. This is used to select examples of unchanged pairs of pixels, which are used to train a mapping network. Once the data are mapped into a common domain, feature similarity analysis highlights change pixels, which are isolated from the rest by segmentation; In a paper by Zhan \textit{et al.}~\cite{zhan2018log}, SAR data are log-transformed and stacked together with the corresponding optical data. Next, a SDAE is used to extract two relevant feature maps from the stack, one for each of the input modalities. These are then clustered separately and the results are compared to obtain a difference image. The latter is segmented into three clusters: pixels certain to belong to changed areas, pixels certain to belong to unchanged areas, and uncertain pixels. Finally, the pixels labelled with certainty are used to train a classification network, which is then able to discriminate the uncertain pixels into the \textit{change} and \textit{no-change} clusters, providing the final binary change map. Zhan \textit{et al.\ }~\cite{zhan2018iterative} proposed to learn new representative features for the two images by the use of two distinct SDAEs. A mapping network is then trained to transform these extracted features into a common domain, where the pixels are forced to be similar (dissimilar) according to their probability of belonging to the unchanged (changed) areas. The probability map is initialised randomly and the training alternates between two phases: updating the parameters of the mapping network according to the probabilities, and updating the map according to the output of the network. Once the training reaches its stopping criterion, the difference between the two feature maps is obtained. Instead of producing a binary change map, this method introduces a hierarchical clustering strategy that highlights different types of change as separate clusters. The symmetric convolutional coupling network (SCCN) was proposed by Liu \textit{et al.}~\cite{liu2016deep}: After two SDAEs are pretrained separately on each image, their decoders are removed, one of the encoders is frozen, and the other is fine-tuned by forcing the codes of the pixels most likely to not represent changes to be similar. The pixel probability of \textit{no-change} is initialised randomly, and is updated iteratively and alternately together with the parameters of the encoders. A stable output of the objective function is eventually reached and the probability map is finally segmented into the usual binary change map. This method was later improved in~\cite{zhao2017discriminative} by modifying slightly the objective function and the probability map update procedure. \subsection{Generative Adversarial Networks} \subsubsection{Background} Among the most important methods in the literature of domain adaptation and data transformation are the generative adversarial networks (GANs). Proposed by Goodfellow \textit{et al.\ }in~\cite{goodfellow2014generative}, these architectures consist of two main components competing against each other. Drawing samples from a random distribution, a generator aims at reproducing samples from a specific target distribution as output. On the other hand, a discriminator has the goal to distinguish between \textit{real} data drawn from the target distribution and \textit{fake} data produced by the generator. Through an adversarial training phase, the generator becomes better at producing fake samples and it is rewarded when it fools the discriminator, whereas the latter improves its discerning skills and is rewarded when it is able to detect fake data. Both the two parts try to overcome their opponent and become better, benefiting from this competition. A drawback of this method is the difficulty in balancing the strength of the two components. Their efforts have to be equal, otherwise one will start to dominate the other, hindering the simultaneous improvement of both. Conditional GANs~\cite{Isola_2017_CVPR} are a particular case, where fake data is generated from a distribution conditioned on the input data. This architecture is suitable for the task of \textit{image-to-image translation}: images from one domain are mapped into another (e.g.\ drawings or paintings into real pictures, winter landscapes into summer ones, maps of cities into aerial images). \subsubsection{Applications}\label{sec:cgan} The potential of this method to transform data acquired from one satellite sensor into another is striking, and it was first explored in~\cite{merkle2018exploring} to match optical and SAR images. The dataset used consists of pairs of co-located optical and SAR images acquired at the same time. The generator learns during training to produce a plausible SAR image starting from the optical one, without knowing what the corresponding real SAR data look like. The same optical image and one of the two SAR images, either the generated or the original, are provided to the discriminator, which has to infer whether the images are a \textit{real} or \textit{fake} pair. For testing, the generator takes the optical images as input and provides the synthetic SAR data, whereas the original SAR data become the ground truth. In~\cite{niu2018conditional}, the same concept is applied to perform heterogeneous CD. The scheme is always the same: a generator tries to reproduce SAR patches starting from the corresponding optical ones, and a discriminator aims at detecting these \textit{fake} patches. In order to facilitate a direct comparison, they \iffalse therefore \fi introduce an approximation network which learns to transform the original SAR patches into the generated ones. Note that the training of all these networks must be carried out on patches not containing change pixels, and any other patch must be flagged and excluded from this process. At first, all the flags are set to \textit{no-change}. Then these steps are iterated: the conditional GAN is updated, the approximation network is tuned accordingly, and finally the generated and approximated patches are compared to flag the ones containing changes. Once the training phase is over, the generated image and the approximated image are pixel-wise subtracted and segmented binarily. \subsection{Cyclic Generative Adversarial Networks} \subsubsection{Background} A more complex framework than the conditional GAN is the cycle GAN~\cite{zhu2017unpaired}. The idea is simple: instead of using just one generator-discriminator couple dealing with the transformation from domain $\mathcal{X}$ to domain $\mathcal{Y}$, another tandem generator-discriminator is added to do the vice versa. This means that the framework can be tested for so-called \textit{cycle consistency}: It should be possible to perform a composite translation of data from domain $\mathcal{X}$ to domain $\mathcal{Y}$, and then onwards to domain $\mathcal{X}$ (denoted $\mathcal{X}\!\to\!\mathcal{Y}\!\to\!\mathcal{X}$), and the full translation cycle should reproduce the original input. Equivalently, the cycle $\mathcal{Y}\!\to\!\mathcal{X}\!\to\!\mathcal{Y}$ should reproduce the original input in domain $\mathcal{Y}$. In~\cite{murez2018image}, this framework is applied and extended further: Along with the two input domains $\mathcal{X}$ and $\mathcal{Y}$, a latent space $\mathcal{Z}$ is introduced in between them. Data from the original domains are transformed to $\mathcal{Z}$, where they should ideally not be discernible. Thus, four generators are used to map data across domains: from $\mathcal{X}$ to $\mathcal{Z}$, from $\mathcal{Z}$ to $\mathcal{Y}$, from $\mathcal{Y}$ to $\mathcal{Z}$, and from $\mathcal{Z}$ to $\mathcal{X}$. The accurate reconstruction of the images is the first enforced principle: Data mapped from domain $\mathcal{X}$ ($\mathcal{Y}$) to $\mathcal{Z}$ must be mapped back correctly to $\mathcal{X}$ ($\mathcal{Y}$). The next requirement is cycle-consistency: Starting from $\mathcal{X}$ ($\mathcal{Y}$) and going first to $\mathcal{Z}$ and then to $\mathcal{Y}$ ($\mathcal{X}$), the images must go back to $\mathcal{X}$ ($\mathcal{Y}$) passing through $\mathcal{Z}$ again and match exactly with the original input. Concerning the discriminators, there are three: one should distinguish whether data mapped into $\mathcal{Z}$ come originally from $\mathcal{X}$ or $\mathcal{Y}$; another discriminates between original images from $\mathcal{X}$ and images which started from $\mathcal{Y}$ and performed half a cycle; the third does the same in domain $\mathcal{Y}$. \subsubsection{Applications} Inspired by these concepts, Gong \textit{et al.\ } proposed the coupling translation networks to perform heterogeneous CD~\cite{gong2019coupling}. However, their architecture is simpler. Two variational AEs are combined so that their encoders separately take as input optical and SAR patches, respectively, and the two codes produced are stacked together. The stacked code is then decoded by both decoders and each of those yields two output patches: one is the reconstruction of the input patch from the same domain, the other is the transformation of the input patch from the opposite domain. The latter must be detected by a discriminator which is taught to discern reconstructed data from \textit{fake} transformed data. This framework has only two discriminators, one after each decoder, whereas the code spaces of the two AEs are aligned throughout the training, eventually becoming the common latent domain, namely $\mathcal{Z}$. Together with the adversarial loss, the reconstruction and the cycle-consistency drive the learning process, which enables the two networks to translate data across domains, such that a direct comparison is feasible. In the following section we explain how our methodology fits in this picture, framed in-between cycle-consistency and adversarial training.
\section{Introduction} \label{int} Neutrinos play an important role in the evolution of stellar objects. The physics of neutrinos is relevant at all stages of the stellar evolution, starting from the supernova explosions~\cite{bethe,janka,burrows}. After such event, the remaining matter forms a compact object where the neutrinos are one of the key elements for understanding this process~\cite{burrowsb, jankab}. There are many mechanisms which produce neutrinos in a neutron star. A complete review on this point can be found in~\cite{Ya01}. The possible reactions depends on the neutron star region under consideration. In the neutron star crust one has electron--positron annihilation ($e^{-} e^{+} \to \nu \bar{\nu}$), photon decay ($\gamma \to \nu \bar{\nu}$), electron--nucleus bremsstrahlung ($e^{-}(A,Z) \to e^{-}(A,Z) \nu \bar{\nu} $), neutron--nucleus bremsstrahlung ($n(A,Z) \to n(A,Z) \nu \bar{\nu} $), neutron--neutron bremsstrahlung ($n n \to n n \nu \bar{\nu} $), Cooper pairing of neutrons ($n n \to \nu \bar{\nu} $), among others. In the neutron star core, we quote just a few of all the possible reactions: baryon direct Urca ({\it e.g.} $p \, l \to n \nu_{e}$, $p \, l \to \Sigma \nu_{e}$), baryon modified Urca ({\it e.g.} $p B \, l \to n B \nu_{e}$, $p B \, l \to \Sigma B \nu_{e}$), baryon bremsstrahlung ({\it e.g.} $n n \to nn \nu \bar{\nu}$), lepton modified Urca ({\it e.g.} $e^{-} p \to \mu \, p \bar{\nu}_{\mu} \nu_{e}$) and Coulomb bremsstrahlung ({\it e.g.} $l \, p \to l \, \nu \bar{\nu}$). Certainly, the emission of neutrinos is considered the main mechanism for the neutron star cooling~\cite{Sh96, Ya04}. In the analysis of this emission, the neutrino mean free path $\lambda$ is of central importance. Depending on the conditions of density and temperature, the neutrino mean free path ranges from small values compared with the neutron star radius, up to very large values. In the absence of magnetic field this has been extensively discussed in the literature (see for instance~\cite{tubbs,sawyer,iwamoto,backman,haensel87,Ho91,Re97,Re98,ReddyT,Re99,Bu98,Na99,Sh03,Ma03}). The neutrino mean free path tells us about the neutrino emissivity from the neutron star and therefore the degree of cooling of the compact object. The addition of a strong magnetic field modifies these processes. Observational data on the magnetic field strength in the neutron star surface indicates that this magnitude varies within the range B$=10^{8}$--$10^{15}$G. A comprehensive and detailed review of the magnetic field in a neutron stars can be found in~\cite{Re03} and references therein. The magnetic field strength in the surface of a neutron star such as a young radiopulsar ($\tau \sim 10^{3}-10^{7}$yr) has values in the range B$=10^{11}$--$10^{13}$G. For an old radiopulsar ($\tau \sim 10^{8}-10^{10}$yr) this value decrease to B$=10^{8}$--$10^{9}$G, while also in the surface of a magnetar this value rise up to B$\sim 10^{15}$G and it can grow by several orders of magnitude in its dense interior~\cite{Du92}. The stability condition requiring that the total neutron star energy be negative leads to an upper bound on the magnetic field strength of B$\lesssim 10^{18}$G~\cite{Le77}. The magnetic field establish a preferred axis for the neutron star, making the emission of neutrinos asymmetrical. This asymmetry has astrophysical implications and perhaps, the most important one is as a possible mechanism for the explanation of the ``pulsar kick problem": the observation that pulsars do not move with the velocity of its progenitor star, but rather with a substantially greater speed. Even thought this model has been objected as the only source to explain the problem pulsar kick (see for instance~\cite{Sa08}), an asymmetry of $\sim 1\%$ would be enough to understand this behavior~\cite{La98}. There are two main mechanisms responsible for this asymmetry. One is the effect of the magnetic field on the oscillation of the neutrinos~\cite{Ku96}. The second source of asymmetry are the parity violation reactions which take place inside the neutron star~\cite{La98,Bi93,Ch93,Bi97,Ho98,Ba99,Ch02,Sh05,Ka06,Ma11,Ma12,To19}. This last approach is the one that we adopt in this work. In this work we analyze the asymmetry in the neutrino mean free path for the absorption reaction $\nu + n \to e^{-} + p$, in hot dense neutron matter. In a previous paper we have discussed the scattering process $\nu + n \to \nu' + n'$~\cite{To19}. By considering both reactions, the asymmetry in the neutrino emission can be originated from the differential cross section and from the neutrino mean free path (which is the inverse of the total cross section per unit volume). These two mechanism are independent and should be considered simultaneously to account for the actual asymmetric neutrino emission. While the first one is restricted to the scattering reaction and it gives us information on the way in which the weak interaction scatters the neutrinos, for the mean free path both reactions are present and it tells us about how often a neutrino interacts with a neutron. We consider that the mean free path is the relevant variable in this problem: if the mean free path is much larger than the size of the compact object itself, then the asymmetry in the differential cross section would not act, since it would be unlikely to have a collision. As we have already mentioned, we consider the absorption reaction which takes place in hot dense neutron matter under a strong magnetic field. The magnetic field induces some degree of polarization of the system, which is partially responsible for the asymmetry in the mean free path. At this point, it is worth to mention that the total neutrino cross section shows a dependence on the angle of the incoming neutrino with respect to the magnetic field also in free space~\cite{Sh05}. Neutron matter is described using the Equation of State (EoS) developed in~\cite{Ag11,Ag14}. In this approach, we describe the nuclear interaction using the non--relativistic Skyrme potential model within a Hartree--Fock approximation. This work is organized as follows. In Section~\ref{nacs} we present the formalism for the neutrino mean free path. This is done in two sub--sections where we discuss the EoS in first place and then we give some details on the derivation of the cross section per unite volume. In the next step, we discuss our results in Section~\ref{Results}, where we also include the scattering mean free path previously evaluated. Finally, in Section~\ref{Summary} we give some conclusions. \section{The Neutrino Absorption Cross Section} \label{nacs} In this section we present an expression for the neutrino absorption cross section in hot neutron matter under a strong constant magnetic field. Much of the information in this section have been already published in other works and we have done a summary of them for the convenience of the reader. But also because we add some specific information which should be given in the right context of our problem. The absorption reaction under consideration is the absorption of a neutrino by a neutron, having an electron and a proton as the final state, \begin{equation} \nu \, + \, n \, \rightarrow \, e^{-} \, + \, p, \label{reacabs} \end{equation} where the Feynman diagram for this reaction is drawn in Fig.~\ref{figme1}. This reaction can take place either in free space or within a dense medium. We are considering pure hot non--relativistic neutron matter and to evaluate the cross section we need two basic elements: in first place, a model for the neutron matter. This means that we have to develop an Equation of State (EoS) for the dense medium under the influence of a strong magnetic field, from which we obtain the physical state of the system, characterized by the polarization, the single particle energies and the chemical potential for equilibrium. The second element is the evaluation of the diagram in Fig.~\ref{figme1} itself, using the standard rules for the evaluation of diagrams. In particular, we should employ a model for the weak--interaction which mediate this reaction. In two sub--section we address these points. \subsection{The EoS model using a Skyrme interaction} \label{eossi} The EoS is evaluated using Hartree-Fock approximation with the Skyrme interaction~\cite{Ag11,Ag14}. We assume a system of neutrons within a strong magnetic field at finite temperature. The neutrons interact through the strong interaction among each other and with the external magnetic field. From the EoS, we obtain the degree of polarization of the system, the single particle energies of the neutrons and their chemical potential. This is done by giving the density of the system, its temperature and the intensity of the magnetic field, which we consider as a constant field in the $\hat{z}$--direction. This hypothesis on the magnetic field is not an important restriction as it should be employed locally (as well as the density and the temperature). For the whole neutron star one can implement a realistic model for the magnetic field. The curvature of such a field would allow us to consider it as locally uniform due to the scale of the neutrino--neutron absorption reaction. Now we briefly describe how we obtain the different outcomes from the EoS. For a more detailed analysis we refer the reader to~\cite{Ag11,Ag14,To19}. The starting point is to define the adequate thermodynamical potential for our problem. For a system within a magnetic field ${\vec B}$, we employ, \begin{equation} {\cal U}={\cal F} - {\vec {\cal M}}\cdot {\vec B}, \label{tp} \end{equation} where ${\cal F}$ and ${\vec {\cal M}}$ are, respectively, the Helmhotz free energy density and the magnetization per unit volume of the system. The expression for the density of the system is given by, \begin{equation} \rho= \sum_{s_n=\pm 1} \frac{1}{(2 \pi)^{3}} \int d^{3} p_{n} f_{s_n}(E_{n},\mu_n, T). \label{dent} \end{equation} Here $E_{n}$, $\mu_n$ and $T$ stands for the neutron single particle energy, its chemical potential and the temperature, respectively. The function $f_{s_n}(E_{n},\mu_n, T)$, in thermal equilibrium is given by the Fermi--Dirac particle distribution function, \begin{equation} f_{s_i}(E_{i},\mu_i, T)=\frac{1}{1+\exp[(E_{i}-\mu_i(T))/T]} \ . \label{fdd0} \end{equation} It is straightforward to define the spin up and down partial densities as $\rho_{+}$ and $\rho_{-}$, respectively. We have $\rho=\rho_{+}+\rho_{-}$. The spin asymmetry is, \begin{equation} {\it A}= \frac{1}{\rho} \, \sum_{s_n=\pm 1} \frac{s_n}{(2 \pi)^{3}} \int d^{3} p_{n} f_{s_n}(E_{n},\mu_n, T), \label{spinasym} \end{equation} or equivalently, ${\it A}=(\rho_{+}-\rho_{+})/(\rho_{+}+\rho_{+})$. At this point it is convenient to give the expression for the neutron single particle energy, $E_n$. Using the Hartree--Fock model with the Skyrme interaction, we have~\cite{Ag11,Ag14}, \begin{equation} E_n = m_n \, + \, \frac{p_n^2}{2m^{*}_{s_n}} - s_n \mu_{Bn} B\, + \, \frac{v_{s_n}}{8}, \label{speexp} \end{equation} where $\mu_{Bn}=-1.913 \mu_N$ is the anomalous magnetic moment of the neutron in units of the nuclear magneton $\mu_N$. The potential term, $v_{s_n}$ depends on the density, the temperature and the magnetic field, but not on the momentum and it is given by, \begin{equation} v_{s_n}=a_0 (1- s_n {\it A}) \rho+2 (b_0+s_n b_1) \, {\cal K}_{s_n=1}, \label{SkmPot} \end{equation} where, \begin{equation} {\cal K}_{s_n} = \frac{1}{(2 \pi)^{3}} \, \int \, d^{3} p \; p^{2} f_{s_n}(E_{n},\mu_n, T) \, . \label{SkmKIn} \end{equation} The constants $a_0=4 t_0 (1-x_0) +2 t_3 \rho^{\sigma} (1-x_3)/3$, $b_0=t_1(1 - x_1)+ 3 t_2 (1 + x_2)$ and $b_1=- t_1(1 - x_1)+t_2 (1 + x_2/2) $, are written in terms of the standard parameters of the Skyrme model, $t_0$, $t_1$, $t_2$, $x_0$, $x_1$, $x_2$ and $\sigma$. In Eq.~(\ref{speexp}), for the effective mass we have, \begin{equation} \frac{1}{m^*_{s}}=\frac{1}{m_n}+\frac{1}{4}\, \rho \, ( b_0 + s \, b_1 \, {\it A} ) . \label{SkmEffMass} \end{equation} The chemical potential corresponding to the physical state, does not depend on the spin projection of the neutron due to the minimization process. To see this point we write, \begin{equation} \mu_{s_n}=\frac{\partial {\cal U}}{\partial \rho_{s_n}}. \label{e:cp} \end{equation} This expression can be rewritten in terms of the spin asymmetry ${\it A}$, as, \begin{equation} \mu_{s_n} = \frac{\partial {\cal U}}{\partial \rho }+s_n \left(\frac{1-s_n {\it A}}{\rho}\right) \frac{\partial {\cal U}}{\partial {\it A}}. \label{cp2} \end{equation} The difference between the two chemical potentials is then, \begin{equation} \mu_+ - \mu_- =\frac{2}{\rho}\frac{\partial {\cal U}}{\partial {\it A}} \, \label{cp3} \end{equation} which shows, that the minimization of ${\cal U}$ with respect to {\it A} implies the existence of a unique chemical potential in the physical state. We should emphasized that this minimization is performed with the constrain of a fixed density. This is a self--consistent process: we need $\mu_{n}$ to evaluate $\rho_{+}$ and $\rho_{-}$, which defines the spin asymmetry ${\it A}$, needed in the single particle energy, etc. Summarizing, given the density, temperature and the magnetic field of the system, from the EoS we obtain the actual physical state, characterized by the chemical potential, the single particle energies of the neutrons and the spin asymmetry which is a global property of the system. \subsection{The Absorption Neutrino Cross Section for a polarized system} \label{ncspol} In this sub--section we show an expression for the absorption neutrino cross section per unite volume for a polarized system. The formalism of this sub--section is taken from the work of Arras and Lai~\cite{Ar99}, where the reader can find a complete derivation. We briefly summarized some elements for convenience and we also add some particular expressions not given in~\cite{Ar99}, that we need in our work. The aim of this sub--section is to write an analytical expression for the mean free path for the absorption reaction $\nu + n \to e^{-} + p$, depicted in~Fig.~\ref{figme1}. From this diagram, the weak interaction is given by the effective Hamiltonian, \begin{equation} {\cal H}_{int} = \frac{G_F}{\sqrt{2}} \, \bar{\Psi}_{p} \gamma_{\mu} (g_V-g_A \gamma_5) \Psi_{n} \, \bar{\Psi}_{e} \gamma^{\mu} (1- \gamma_5) \Psi_{\nu} \, + \, H.c. \label{effH} \end{equation} Here $G_F$ is the Fermi weak coupling constant ($G_F/(\hbar c)^{3}=1.16637(1) \times 10^{-5}$~GeV$^{-2}$). For the vector and axial--vector couplings we have $g_V=0.973$ and $g_A=1.197$, respectively. The total absorption cross section per unit volume can be written as, \begin{equation} \frac{\sigma_{abs}}{V} = \int \, d \Pi_{p} \, d \Pi_{e} \, d \Pi_{n} \, {\cal W}^{abs}_{fi} \, (1-f_{s_p}(E_{p},\mu_p, T)) (1-f_{s_e}(E_{e},\mu_e, T)) f_{s_n}(E_{n},\mu_n, T). \label{cs1} \end{equation} In this expression ${\cal W}^{abs}_{fi}$ is the transition rate, which is linked to the Hamiltonian through the $S$--matrix. The $S$--matrix is defined as, \begin{equation} S_{fi}= \imath \,\int \, d^{4}x \, {\cal H}_{int}. \label{smatrix} \end{equation} The square of $S_{fi}$, divided by time is the transition rate: \begin{equation} {\cal W}^{abs}_{fi} = \frac{\mid S_{fi} \mid^{\, 2}}{t}. \label{tranW} \end{equation} The Eq.~(\ref{cs1}), is in fact the Fermi Golden Rule, where we sum over final states and average over the initial ones, if we do not know the initial state. We are considering massless neutrinos which are left-handed (or polarized), we assign also a value for its momentum and direction. That is, we know the initial state for the neutrino. In the same equation, the $\int \, d \Pi_{N}$ represents the state summation for the particle $N$. Is is convenient to show the explicit expression for each particle, together the corresponding single particle energy. Protons and electrons are charged particles and therefore, their energy levels are partially quantized according to the Landau levels. In particular, the single particle energy for a proton which interacts only with a constant magnetic field (which we take as the $\hat{z}$--direction) is, \begin{equation} E_{p}=m_p+\frac{p^{2}_{\, p,z}}{2 m_{p}}+\frac{e B}{m_p} \, (N_p+\frac{1}{2}) \, - \,s_p \mu_{Bp} B , \label{spprot0} \end{equation} where $\mu_{Bp}=2.793 \mu_N$ and $N_p=0$, 1, 2, ... is the energy level quantum number for the proton Landau state. The quantization axis for a charge particle is perpendicular to the magnetic field--direction. For the proton state summation we have, \begin{equation} \int \, d \Pi_{p} \, = \sum^{N_{p, \, max}}_{N_p=0} \,\sum^{R_{p, \, max}}_{R_p=0} \, \sum_{s_p=\pm 1} \int^{\infty}_{-\infty} d p_{p, \, z} \; \frac{L \, p_{p, \, z}}{2 \pi}, \label{sumsn} \end{equation} where $N_{p, \, max}$ is determined by the conservation of energy and $R_{p}$ is the quantum number for the proton guiding center, where the cutoff $R_{p, \, max} \simeq e B {\cal A}/2 \pi$ (the degeneracy of the Landau level) limits the guiding center to lie within the normalization volume $V= {\cal A} L$, where $L$ is the length along the $\hat{z}$--axis and ${\cal A}$ is the area. Due to the small mass of the electron, we have employed the relativistic expression for the energy, \begin{equation} E_{e}=(m^{2}_{e} + 2 e B N_e + p^{2}_{e, \, z})^{1/2}, \label{spee0} \end{equation} where $N_e=0$, 1, 2, ... is the energy level quantum number for the electron Landau state. The particular value for the magnetic moment for the electron allows us to employ a single index ($N_e$) in its energy. To specify the quantum state of the electron we need also $\sigma_{e}=\pm 1$, the spin projection along ${\bf \Pi=}{\bf p}_e+ e {\bf A}$ and $R_e=$0, 1, 2, ... which plays the same role as for the proton. For a detail discussion on the solution of the Dirac equation for the electron we refer the reader to~\cite{So68}. The summation for the electron is then, \begin{equation} \int \, d \Pi_{e} \, = \sum^{N_{e, \, max}}_{N_e=0} \, \sum_{\sigma_e=\pm 1} \, c(N_e,\sigma_e) \,\sum^{R_{e, \, max}}_{R_e=0} \int^{\infty}_{-\infty} d p_{e, \, z} \; \frac{L \, p_{e, \, z}}{2 \pi}, \label{sumsn2} \end{equation} where the function $c(N_e,\sigma_e)=1-\delta_{N_e, \, 0} \delta_{\sigma_{e},-\sigma_{e 0}}$, with $\sigma_{e 0}=-$sgn$(p_{e, \, z})$. This function is equal to one, except for its null value when $N_e=0$ and $\sigma_{e}=-\sigma_{e 0}$. This is needed because for the ground Landau level, the electron spin is opposite to the magnetic field. This means that we can only have the spin projection $\sigma_{e 0}$~\footnote{Just for clarity, we simplify this point by given the non--relativistic limit. In this case, we have $N_e=n+1/2+\tilde{s_e}$, with $n=0$, 1, 2, ... and $\tilde{s_e}=\pm1/2$. First we consider the ground state $N_e=0$, therefore $n=0$ and $\tilde{s_e}=-1/2$, having only one possible spin projection. If we take a fixed value for $N_e$, with the condition that it is not equal to zero, then we can have the two spin projections: $N_e=n+1/2+\mid\tilde{s_e}\mid$ and $N_e=n'+1/2-\mid\tilde{s_e}\mid$, with $n'=n+1$.}. The cutoff $R_{e, \, max}$ takes the same value as for the proton. The single particle energies in Eqs.~(\ref{spprot0}) and (\ref{spee0}), are the ones employ in this work, as we are considering pure neutron matter. Once the neutrino is absorbed by the neutron, the final proton and electron do not find others fermions of the same kind. In this sense, in Eq.~(\ref{cs1}), we should make the replacement $(1-f_{s_p}(E_{p},\mu_p, T)) (1-f_{s_e}(E_{e},\mu_e, T)) \rightarrow 1$. However, we will retain these functions to preserve a more general expression. Finally, for the neutron, we have, \begin{equation} \int \, d \Pi_{n} \, = \sum_{s_n=\pm 1} \frac{1}{(2 \pi)^{3}} \int d^{3} p_{n}. \label{sumsn3} \end{equation} The single particle energy for the neutron has been already given in Eq.~(\ref{speexp}). As we have mentioned, in Eq.~(\ref{cs1}), we sum over all possible final states and we average over the initial ones. The next step is to insert all wave functions into this equation and obtain the final expression for the neutrino cross section. This procedure is developed in full detail in~\cite{Ar99}, we will not repeat it here. We employ a non--relativistic wave function for neutron. In this point we are interested in the spin term of this wave function. In unpolarized matter, one makes an average over the spin up and down contributions, $\ket{u}$ and $\ket{d}$, respectively. For polarized matter, we employ a single mixed spin wave function $\ket{\chi_{n}}$ (for details see Appendix~B in~\cite{To19}), \begin{equation} \ket{\chi_{n}} = \sqrt{\frac{1+{\it A}}{2}} \, \ket{u} + \sqrt{\frac{1-{\it A}}{2}} \, \ket{d}, \label{spinwf} \end{equation} where ${\it A}$ is the spin asymmetry as defined in Eq.~(\ref{spinasym}). The mean value of the spin projection operator $\hat{S}_{z}$, using this wave function is, \begin{equation} \bra{\chi_{n}} \hat{S}_{z} \ket{\chi_{n}}={\it A} \, \frac{\hbar}{2} \ , \label{spinwfmv} \end{equation} which is the same as the mean value of the spin projection operator for the whole system, as required by the mean value for a mixed wave function~\cite{Cohen}. In what follows, we employ the neutron spin wave function in Eq.~(\ref{spinwf}), for the evaluation of the cross section. We give now the expression for the cross section. To do so, one has to replace each particle wave function in Eq.~(\ref{cs1}). As mentioned, the procedure is developed in detail in the~\cite{Ar99}. With the addition of the neutron spin wave function it is obtained, \begin{eqnarray} \frac{\sigma_{abs}}{V} & = & \frac{G^{2}_F}{2} \, \frac{e B}{2 \pi} \, \sum^{N^{max}_{e}}_{N_e=0} \, \int^{\infty}_{-\infty} \frac{d \, p_{e, \, z}}{2 \pi} (1-f_{N_e}(E_{e},\mu_e, T)) \, \sum^{N^{max}_{p}}_{N_p=0} \, \int^{\infty}_{-\infty} \frac{d^{\, 2} p_{n, \, \perp}}{(2 \pi)^{2}} \, \sum_{s_p=\pm 1} \nonumber \\ & \times & \Biggl( \biggl(\frac{1+{\it A}}{2} \biggr) S_{s_p,1,N_p,N_e} L_{\mu\nu} N^{\mu\nu} \mid_{s_p,1} + \biggl( \frac{1-{\it A}}{2}\biggr) S_{s_p,-1,N_p,N_e} L_{\mu\nu} N^{\mu\nu} \mid_{s_p,-1} \Biggr), \label{cs2} \end{eqnarray} where $p_{\, n,\perp} = \sqrt{p^{2}_{\, n,x}+p^{2}_{\, n,y}}$. In this expression $L_{\mu\nu}$ and $ N^{\mu\nu}$ are the leptonic and hadronic tensors, respectively, as defined in Eqs.~(D12) and (D13) in~\cite{Ar99}. We have introduced the structure function for the absorption process as, \begin{eqnarray} S_{s_p,s_n,N_p,N_e} & = & \int^{\infty}_{-\infty} \, \frac{d p_{\, n,z}}{2 \pi} \, \int^{\infty}_{-\infty} \, \frac{d p_{\, p,z}}{2 \pi} \, (2 \pi)^{2} \, \delta(E_e+E_p-|p_{\nu}|-E_n) \nonumber \\ &\times& \delta(p_{\, e,z}+p_{\, p,z}-p_{\, \nu,z}-p_{\, n,z}) \; f_{s_n}(E_n,\mu_n,T) \, (1-f_{s_p}(E_p,\mu_p,T)). \label{stfun0} \end{eqnarray} An analytical expression for this function is given in the Appendix~\ref{strucfunc}, where at variance with~\cite{Ar99}, this function is evaluated in the case where $m_p \neq m_n$. Finally, the contraction of the leptonic and hadronic currents are given by, \begin{eqnarray} L_{\mu\nu} N^{\mu\nu}\mid_{s_p,s_n}(N_e=0)&=& \theta(p_{e, \,z}) \, I^2_{0,N_p }(t) \, \biggl( g_V^2 +3 g_A^2 +\left(g_V^2 - g_A^2\right) \cos(\theta_{\nu}) \nonumber\\ &&+2 g_A \left(g_A + g_V\right)\left( s_p+s_n \cos(\theta_{\nu}) \right) -2g_A\left(g_A-g_V \right)\left( s_n+s_p \cos(\theta_{\nu})\right)\nonumber\\ && + \left( g_V^2-g_A^2 +\left(g_V^2+3g_A^2\right)\cos(\theta_{\nu}) \right) \, s_n s_p \biggr), \label{trazaNe0} \end{eqnarray} where $\theta_{\nu}$ is the angle among the neutrino and the magnetic field and the function $I_{N_{e},N_p }(t)$ is given by, \begin{equation} I_{N_{e},N_p }(t) = \biggl( \frac{N_p!}{N_e!} \biggr)^{1/2} \exp^{-t/2} t^{(N_e-N_p)/2} {\cal L}^{N_e-N_p}_{N_p}(t), \label{funcI} \end{equation} where $t=\omega^{2}_{\perp}/2 e B$ and for the definition of the Laguerre polynomials ${\cal L}^{i}_{j}$, we have adopted the one from~\cite{Ab72}. When $N_e \geq 1$, we have, \begin{eqnarray} L_{\mu\nu} N^{\mu\nu}\mid_{s_p,s_n}(N_e \geq 1)&=& g_V^2 \, \biggl( I^2_{N_{e}-1,N_p }(t) \Sigma^{-}_{N_e}(p_{e, \,z}) + I^2_{N_{e},N_p }(t) \Sigma^{+}_{N_e}(p_{e, \,z}) \biggr) (1+s_n s_p)\nonumber\\ &+&g_A^2 \, \biggl( I^2_{N_{e}-1,N_p }(t) \Sigma^{-}_{N_e}(p_{e, \,z}) \, (3+\cos(\theta_{\nu})+2 (s_n-s_p) (1+\cos(\theta_{\nu}))\nonumber\\ &&-s_n s_p (1+ 3 \cos(\theta_{\nu})))+I^2_{N_{e},N_p }(t) \Sigma^{+}_{N_e}(p_{e, \,z}) \, (3-\cos(\theta_{\nu})\nonumber\\ &&-2 (s_n-s_p) (1-\cos(\theta_{\nu}))-s_n s_p (1+ 3 \cos(\theta_{\nu})))\biggr)\nonumber\\ &+& 2 g_V g_A \, \biggl(I^2_{N_{e}-1,N_p }(t) \Sigma^{-}_{N_e}(p_{e, \,z}) (-1+\cos(\theta_{\nu}))\nonumber\\ &&+ I^2_{N_{e},N_p }(t) \Sigma^{+}_{N_e}(p_{e, \,z}) (1+\cos(\theta_{\nu}))\biggr) (s_n + s_p), \label{trazaNeNp} \end{eqnarray} where, \begin{equation} \Sigma^{\pm}_{N_e}(p_{e, \,z}) \equiv \frac{1}{2} \, \biggl( 1 \pm \frac{p_{e, \,z}}{\mid (p^{2}_{e, \,z}+2 e B N_e)^{1/2} \mid} \biggr). \label{sigmael} \end{equation} The expression in Eq.~(\ref{trazaNe0}), is the same as the one in~\cite{Ar99}. But for the one in Eq.~(\ref{trazaNeNp}), we have considered all spin terms. Note that the neutrino mean free path is obtained from the cross section as $\lambda_{abs}=(\sigma_{abs}/V)^{-1}$. In the next section we discuss our results. \section{Results and discussion} \label{Results} We present now our results for the neutrino mean free path in homogeneous hot neutron matter under the presence of a strong magnetic field. We consider a range of densities of $0.04 \leq\rho \leq 0.4$ fm$^{-3}$, corresponding approximately to the outer core region a neutron star, temperatures up to T=30 MeV and different values of the magnetic field intensity ranging from B=$0$ up to B=$10^{18}$ G. The EoS is evaluated within the Hartree--Fock model, using LNS Skyrme interaction developed by Cao {\it et al.}~\cite{Ca06}. We have developed our formalism assuming a particular form for the single--particle energy for the neutron, which is the one from the Skyrme model. This expression is shown in Eq.~(\ref{speexp}). In~\cite{To19} we have employed the same model together with the Brueckner--Hartree--Fock (BHF) approach using the Argonne V18 \cite{argonne} nucleon-nucleon potential supplemented with the Urbana IX \cite{urbana} three-nucleon force. In that work we have obtained a good agreement between both models for the inelastic dispersion of neutrinos by neutrons. Note that the LNS Skyrme interaction is specially suitable for a comparison with the BHF--model, since its parameters were determined by fitting the nuclear matter EoS calculated in the BHF framework. Before the discussion of our results, it is convenient to make a summary of the spin asymmetry of the system, which have been already analyzed in~\cite{To19} for the same interaction (see in particular the Fig.~3). The spin asymmetry ${\it A}$ characterizes the degree of polarization of the system. That is, we consider a system of neutrons interacting with each other through the strong interaction and with an external strong magnetic field. The strong interaction favors an equal number of neutrons with spin up and down ({\it i.e. A=}0), while the magnetic field tries to align all the neutron spins antiparallel to it ({\it i.e. A=}-1). The actual value for ${\it A}$ is then obtained through an energy minimization calculation from the EoS, as discussed in sub-Section~\ref{eossi}. As expected, the magnitude of {\it A} increases for decreasing densities and also for growing values of the magnetic field. In fact, within the range of B from $10^{14}$G up to $2.5 \times 10^{18}$G, we have $\log_{10}(\mid A \mid) \cong a \log_{10}(B)+b$, where $a \cong 1$ and $b$ is approximately constant for a fixed value of the density (this behavior is depicted in panels $b)$ and $d)$ in Fig.~3, in~\cite{To19}). Our concern is the neutrino mean free path and the corresponding cross section has different values according to the state of polarization of the neutron matter. This is developed in the following lines. We turn now to the analysis of the absorption structure function as defined in Eq.~(\ref{stfun0}). An analytical expression for this structure function is given in the Appendix~\ref{strucfunc}. At variance with the well studied structure function for the dispersion mean free path (see Eq.~(23) in~\cite{To19}), this structure function has some particular features which deserves to be discussed. One should keep in mind that our structure function represents only a fraction of the proton--neutron phase space and due to this, it depends on many variables. Beyond its rather simple expression, it is the great number of independent variables which makes it difficult to analyze. Following the same pattern as for the dispersion structure function, we plot the absorption structure function as a function of $q_0$ (the energy transfer by the weak interaction). But instead of using a fix value for $q_z$, we employ $q_z \cong q_0 - |\vec p_{\nu}| (1-\cos(\theta_{\nu}))$. This expression is obtained by solving the first two expressions in Eqs.~(\ref{enemc}), for $q_z>0$ and $E_e \cong p_{\, e,z}$. In Fig.~\ref{figme2} we plot the structure function at a fixed density for different proton--neutron spin projections, denoted as $s_p,s_n=\, uu, \, ud, \,du$ and $dd$. In this figure we study the effect of the magnetic field over the structure function. The first obvious result is that the split among the different spin components is more relevant for $B=10^{18}$G. This split is due to two main elements. In first place, to the coupling of the magnetic field with the magnetic moment of protons and neutrons: from Eqs.~(\ref{spepn}) we notice that there is an energy shift of $\Delta E=(s_p \mu_{Bp}-s_n \mu_{Bn}) B$. Keeping in mind that $\mu_{Bp}>0$ and $\mu_{Bn}<0$, the main source of the split is understood. Secondly, the neutron effective mass depends on its spin projection, which represents the second contribution to the split. However, due to the particular Skyrme model that we have employed, this effect is small. The shape of the different structure functions is linked to the single--particles energies and to the chemical potential derived from the EoS. But it is the area under the different functions which really matters: comparing the different areas, the bigger ones leads to bigger cross sections and smaller mean free paths. Let us call the different areas under each structure functions as $\int S_{s_p,s_n,N_p,N_e}$. From Fig.~\ref{figme2} and assuming that the whole area contributes to the cross section, we notice that $\int S_{uu,0,0} < \int S_{ud,0,0}$ and $\int S_{du,0,0} < \int S_{dd,0,0}$: for a fix proton spin projection, the contribution for neutrons with spin up is smaller than the one with spin down. The same behavior takes place for the dispersion structure function, having the same origin, which is the character of the phase space for polarization matter: the phase space for neutrons with spin up is smaller than that of neutrons with spin down. A complete discussion on this point is given in~\cite{To19}. A corollary of this discussion is that the structure function has a clear spin dependence and in the spin summation in Eq.~(\ref{cs2}), it can not be taken as a common factor. In the following two figures, we limit ourselves to one spin configuration for simplicity, as the other contributions have the same behavior. In Fig.~\ref{figme3}, we show the $N_p$--dependence of the structure function for two values of the magnetic field. By drawing the structure function for $N_p=0$ and for $N_p=20$, we observe an energy shift stemming from the $(N_p+1/2) \, e B/m_p$--term in the proton single particle energy. Being this term proportional to $B$, it is straightforward to understand that this shift is one order of magnitude bigger for $B=10^{18}$G than for $B=10^{17}$G. The problem here is up to which $N_p$--value should we sum up. Or equivalently, which is the biggest value for $q_0$. The value for $q_0$ is limited by the conservation of energy: $|p_{\nu}|+E_n=E_e+E_p$. The initial energy of the system depends on the particular values of the momentum carried by each particle, its potential energy and the value for the magnetic field. Note that $q_0=|p_{\nu}| - E_{e}$: $|p_{\nu}|$ has a fixed value and $E_e < |p_{\nu}|+E_n$. This gives a maximum value for $q_0$, keeping in mind that $E_p \cong 0$ is not a realistic situation. This is the first constrain to the value for $N_p$, but as we discuss soon $N_p$ has also restrictions by the accessible phase space. Before ending this paragraph, it is worth to mention that $N_e$ is indirectly present in $q_0$. This quantum number is part of the electron single particle energy. In this figure, we have employed the approximate equality, $q_z \cong q_0 - |\vec p_{\nu}| (1-\cos(\theta_{\nu}))$, which is valid only if $N_e=0$. A similar figure can be done for $N_e \neq 0$, but leading to the same conclusions. Coming back the the energy conservation $E_e+E_p=|p_{\nu}|+E_n$, it is convenient to make some comment on the relative values for $N_p$ and $N_e$. We show a simple model to compare the $N_p$--contribution to the proton energy term $\Delta E_{Np} \equiv N_p e B/m_p$ with the corresponding term for the electron, $\Delta E_{Ne} \equiv (m^{2}_{e} + 2 e B N_e)^{1/2}-m_{e}$. By defining $\Delta E_{tot} \equiv \Delta E_{Np}+\Delta E_{Ne}$ and just to give an example, we set the maximum possible value for $\Delta E_{tot}$, at $\Delta E^{max}_{tot}=64$MeV. We consider two cases: $i)$ B$=10^{18}$G, we have $\Delta E_{Np=10}=63$MeV, but $\Delta E_{Ne=1}=108$MeV, which means that no electron Landau level contributes to the cross section and we have to sum $N_p$ from zero up to ten. $ii)$ B$=10^{17}$G, $\Delta E_{Np=100}=63$MeV and in this case, $\Delta E_{Ne=3}=59$MeV. Then, we have combinations among the proton and the electron Landau levels: $N_p=100$ and $N_e=0$, $N_p=0$ and $N_e=3$, $N_p=1$ and $N_e=1$, etc. Due to the small electron mass, the energy gap is always bigger for the electron. In Fig.~\ref{figme4}, which is the last one for the structure function, we consider the temperature dependence of this function for $B=10^{18}$G and for three values of the temperature T$=5$, $15$ and $30$MeV. By comparing this results with the ones from the dispersion structure function (see Fig.~4a in~\cite{To19}), we notice that the behavior of the absorption structure function with temperature is quite different from the one in the dispersion process. For the dispersion process, the area under the structure function strongly grows with temperature. At variance, for the absorption one, the areas are similar, but with a clear decrease as one increases the temperature. The absorption structure function represents only a part of the available phase space and as so, gives a different result. A complete analysis of the temperature dependence requires the full phase space of the problem. This is done soon, when we discuss the temperature dependence of the neutrino mean free path. We have considered the absorption structure function with some detail, because it helps us to understand the mean free path. Another ingredient is the function $I^{2}_{N_e,N_p}(t)$ (see Eqs.~(\ref{funcI})), which we have plot in Fig.~\ref{figme5} for different values of $N_p$ and $N_e$. As discussed in Section~\ref{nacs}, this function is part of the wave function of charged particles in a constant magnetic field: the energy levels are quantized for an axis perpendicular to the magnetic field direction and has continuum values parallel to the field. This is a function of $t=\omega^{2}_{\perp}/2 e B$ and in the panel $a)$ in this figure, we consider different values for $N_p$ with a fixed $N_e=0$. In panel $b)$ we take $N_p=100$ for two values of $N_e$. Our concern is how this function affects the result for the neutrino mean free path. Keeping in mind that $\int^{\infty}_{0} \, dt \, I^{2}_{N_e,N_p}(t) = 1$, the weight of this function is linked to the maximum value for $t$. The maximum value for $\omega_{\perp}=[(p_{\, n,x}+p_{\nu, x})^{2}+(p_{\, n,y}+p_{\nu, y})^{2}]^{1/2}$, results from the particle distribution function $f_{s_n}(E_{n},\mu_n, T)$ and the neutrino momentum. For the same $\omega^{max}_{\perp}$, different values for the magnetic field give different $t^{max}$. Together with the structure function, this $t^{max}$--value establish a constrain over the maximum values for $N_p$ and $N_e$. We turn now to the analysis of the neutrino absorption mean free path. We conclude our study by adding the dispersion contribution, which have been discussed in~\cite{To19}. The behavior of these two contributions with temperature and with the magnetic field is very different. Due to this and for the benefit of the reader, we recall some aspects of the dispersion cross section in the following paragraphs. The presence of a constant magnetic field, establishes a preferred direction in space and consequently, the total cross section depends both on the magnitude of the momentum of the incoming neutrino and on the angle $\theta_{\nu}$ between its momentum and the direction of the magnetic field. For the dispersion reaction, an incoming angle of $\theta_{\nu}=\pi/2$ results in a cross section almost identical to the one in the absence of the magnetic field. This is because the phase space for this reaction is barely modified by the magnetic field. As we show soon, this is not the case for the absorption reaction, where the phase space (of final states) is substantially modified by the magnetic field. In first place, in Eq.~(\ref{cs2}) we sum over all spin components. However and by taking for simplicity the $N_e=0$ case, the weak dynamics from Eq.~(\ref{trazaNe0}) already gives us some relevant information about this sum. In Table~\ref{asymmt}, we show results from Eq.~(\ref{trazaNe0}), where we have used $g_V=0.973$ and $g_A=1.197$. From this table, we can see that contributions with the spin down for the proton are zero for $du$ and are almost negligible for $dd$. Moreover, for the two extreme values for $\theta_{\nu}$, only one spin component contributes to the cross section: the $uu$--component for $\theta_{\nu}=0$ and the $ud$--component for $\theta_{\nu}=\pi$. Each component is weighed by a different factor, even thought these factors are similar in magnitude. This fact, together with the different shapes for the spin components of the absorption structure function shown in Fig.~\ref{figme2}, contribute to the asymmetry in the neutrino absorption cross section. Another ingredient is the partial polarization of the system, which is represented by the spin asymmetry ${\it A}$. \begin{table}[h] \begin{center} \caption{Some values for the function $[L_{\mu\nu} N^{\mu\nu}/I^2_{0,N_p }(t)](s_p,s_n,\cos(\theta_{\nu}))$ from Eq.~(\ref{trazaNe0}) for $p_{e, \,z}>0$. Note that this function has no dimensions.} \label{asymmt} \vskip 2mm \begin{tabular}{ccccc} \hline\hline ~~~$s_p, \, s_n$~~~ &~~~~$\theta_{\nu}=0$~~~~&~~~~$\theta_{\nu}=\pi/2$~~~~&~~~~$\theta_{\nu}=\pi$~~~~& \\ \hline $uu$ & $18.84$ &$9.42$ & $~0.$ & \\ $ud$ & $0.$ &$11.46$ & $~~22.92$ & \\ $du$ & $0.$ &$0.$ & $\sim 0.$ & \\ $dd$ & $~~0.20$ &$~~0.10$ & $~~~0.$ & \\ \hline\hline \end{tabular} \end{center} \end{table} In Fig.~\ref{figme6}, we present our result for the absorption neutrino mean free path as a function of the density, at a temperature T$=15$MeV, for two values of the magnetic field B$=10^{17}$G and B$=10^{18}$G and for three different angles of the incoming neutrino. If we compare these results with the dispersions ones (see Fig.~10 in~\cite{To19}), we notice that the mean free path shows the same qualitative behavior. But, at variance with the dispersion case, the magnitude of the absorption mean free path has a strong dependence with the magnetic field. From B$=10^{17}$G to B$=10^{18}$G there is an important reduction in the mean free path. The reason for this reduction is due to the magnetic dependence of the phase space for final states. An increase of this phase space result in an increase of the cross section and consequently a reduction in the mean free path. As we have already discussed, when the magnetic field grows, the number of the Landau levels which contribute to the cross section decrease. But the degeneracy of the levels, given by $e B A/2 \pi$, grows. Therefore, for increasing values of the magnetic field there is some kind of competition between the increase of the final phase space due to the degeneracy and the reduction in the number of Landau levels. From our numerical results, it turns out that within a range for the magnetic field between B$=10^{16}$G up to B$=10^{18}$G, the absorption neutrino mean free path decrease for increasing values of the magnetic field. Referring now to the maximum values for $N_p$ and $N_e$, we can give only indicative values, as they change with density (they depend also on the temperature, on the single particle energies and on the chemical potential). For $\rho=0.16$fm$^{-3}$, we have $N_p \simeq 150$ and $N_e \simeq 10$ for B$=10^{17}$G, while the values for B$=10^{18}$G are $N_p \simeq 15$ and $N_e = 0$. In the next step, we analyze the temperature dependence of the absorption neutrino mean free path. In Fig.~\ref{figme7}, we consider three temperatures: T$=5, \; 15$ and $30$MeV, for B$=10^{17}$G and B$=10^{18}$G. For simplicity, we have plotted only the results for $\theta_{\nu}=\pi/2$ and for the energy of the neutrino we have used the prescription $|\vec p_{\nu}| = 3 T$. Our results show that the temperature dependence is rather weak, specially when compared with the dispersion case. To understand this behavior it is useful to compare the dispersion structure function in Fig.~3,~\cite{To19} with the absorption ones in Fig.~\ref{figme4}: the area of the absorption structure function decreases, instead of increasing. This means that the absorption mean free path should increase for higher temperature values. However, our structure function spread over a wider energy region as the temperature grows, populating more Landau levels. The increase in the number of Landau levels turn down the value of the mean free path. The combined result is a small decrease in the absorption mean free path with temperature. The temperature dependence is further explored in Fig.~\ref{figme8}, where the neutrino absorption mean free path is depicted as a function of the momentum of the neutrino for three values of the temperature, B$=10^{18}$G, a density $\rho=0.16$fm$^{-3}$ and $\theta_{\nu}=\pi/2$. The $|\vec p_{\nu}|$--dependence of the neutrino mean free path shows a qualitative agreement for both the dispersion and absorption reactions. This is because the structure function is larger for larger values of the momentum of the neutrino. For the absorption reaction, for an increasing value for $|\vec p_{\nu}|$ we have more energy in the initial state and therefore more Landau levels contribute to the mean free path. The reduction in the structure function for higher temperatures obviously remains. The interplay among these elements for the absorption reaction, results in a neutrino mean free path almost independent of the temperature. This is a particular result and we can not give a deeper explanation. Having in mind the rule $|\vec p_{\nu}| = 3 T$ and going back to Fig.~\ref{figme7}, we notice the same result: the mean free path for T$=5$MeV ($|\vec p_{\nu}|=15$MeV) is clearly separated from the ones for T$=15$ ($|\vec p_{\nu}|=45$MeV) and $30$MeV ($|\vec p_{\nu}|=90$MeV), for all densities. At this point, it is clear that the phase space for the final state in the absorption reaction is very different from the one in the dispersion reaction due to the magnetic field. The magnetic field can be reduced continuously up to B$=0$. In the absence of magnetic field, the phase space for absorption and for the dispersion reaction is the same~\cite{ReddyT}. In Fig.~\ref{figme9}, we show the absorption neutrino mean free path for magnetic fields B=$0$, $10^{17}$G and $10^{18}$G, $\theta_{\nu}=\pi/2$ and two temperatures: T=$5$MeV in panel $a)$ and T=$15$MeV in panel $b)$. Note that in panel $a)$ we have employed a logarithmic scale for $\lambda_{abs}$. The absorption mean free path for B$=0$ has a different functional dependence with the density and a very pronounced temperature--dependence, consistent with the one for the dispersion reaction. Let us recall that the phase space for the dispersion reaction is barely affected by the magnetic field. It is not a trivial subject to perform the limit from a strong magnetic field to B$=0$. This discussion goes beyond the scope of the present contribution and we refer the reader to~\cite{Ar99,Sh05} for details on how to perform this limit process. In what follows, we focus on the asymmetry of the neutrino mean free path. In the panel $a)$ in Fig.~\ref{figme10}, we show $\lambda_{abs}$ as a function of the magnetic field intensity. This is done at a density $\rho=0.16$fm$^{-3}$, T$=15$MeV and for three angles: $\theta_{\nu}=0$, $\pi/2$ and $\pi$. As the magnitude of $\lambda_{abs}$ decreases for increasing values of the magnetic field, this figure is somehow misleading because the asymmetry is not clearly seen. Due to this, we have defined the quantity, \begin{equation} \zeta_{abs} =\frac{\lambda_{abs}(\theta_{\nu})-\lambda_{abs}(\theta_{\nu}=\pi/2)}{\lambda_{abs}(\theta_{\nu}=\pi/2)} \ , \label{mfpasym} \end{equation} which gives a more accurate idea of the increase of the asymmetry in the neutrino mean free path. The $\zeta_{abs}$--function is depicted in the panel $b)$ in the same figure. As already discussed, the magnetic field establish a preference axis in space. Our results show that it is more likely for a neutrino moving antiparallel to the magnetic field ($\theta_{\nu}=\pi$) to be absorbed, than a one which moves parallel to it. Assuming an isotropic production of neutrinos, this implies that more neutrinos are emitted parallel to the magnetic field. In an actual neutron star model, the whole magnetic field can not be considered as a constant vector field. Our model should be applied locally, according to the geometry of the field. The asymmetry in the mean free path for both the absorption and for the dispersion reactions, results from the interplay among several elements. Considering the different interactions which take place in the process, we have: $i)$ the results from Table~\ref{asymmt}, give us information on the weak--interaction contribution to the asymmetry in the mean free path. $ii)$ the strong--interaction, which favors the situation ${\it A}=0$ and $iii)$ the coupling of the magnetic field with protons, neutrons and electrons, which tends to polarized the system. The balance among these two last elements leads to the equilibrium values for the spin asymmetry ${\it A}$, the effective masses and the chemical potential. For simplicity, sometimes all these contributions are summarized in one single quantity: the spin asymmetry ${\it A}$. In Fig.~\ref{figme11}, we show the mean free path, under the same conditions of panel $b)$ in Fig.~\ref{figme6}, but evaluating the neutrino mean free path putting arbitrarily ${\it A}=0$ (continuous lines in the figure). For comparison we give also the results from Fig.~\ref{figme6} (dotted lines). We can see that the isolated contribution from ${\it A}$, does not explain the main contribution to the mean free path asymmetry. Our point here, is that the evaluation of the asymmetry in the neutrino mean free path requires a consistent model, starting from the EoS and considering all the just mentioned elements. As a final point, we include the dispersion contribution to the mean free path. The addition of this contribution gives the total neutrino mean free path, $\lambda_{tot}$, \begin{equation} \lambda_{tot} = \left(\frac{1}{\lambda_{abs}}+\frac{1}{\lambda_{dis}} \right)^{-1}. \label{mfptot} \end{equation} Results for $\lambda_{dis}$ have been taken from~\cite{To19}. We give our results for this quantity in Figs.~\ref{figme12} and \ref{figme13}. In the first figure we show $\lambda_{tot}$ as a function of the density, for B$=10^{17}$ and $=10^{18}$G, three angles for the incoming neutrino: $\theta_{\nu}=0$, $\pi/2$ and $\pi$ and a temperature T$=15$MeV. The second figure has the same variables except for the temperature where we have employed T$=30$MeV. In both figures we have included also $\lambda_{abs}$ for $\theta_{\nu}=\pi/2$. This is done as a reference of the relative importance of the absorption contribution. Before we go on with our analysis, it is worth to recall that $\lambda_{abs}$ and $\lambda_{dis}$ have very different behavior for the temperatures and the magnetic fields considered in the present contribution. While $\lambda_{dis}$ has a strong dependence with temperature and its value for $\theta_{\nu}=\pi/2$ is almost independent of the magnetic field, $\lambda_{abs}$ has a weak dependence with temperature and it decreases for increasing values of the magnetic field. This contrasts with the result for B$=0$: in this case both $\lambda_{abs}$ and $\lambda_{dis}$ have the same (strong) dependence with temperature and due to the values of the coupling constants, one has $\lambda_{abs} < \lambda_{dis}$. By comparing now the panel $a)$ and $b)$ in Fig.~\ref{figme12}, we notice that the dispersion reaction is as important as the absorption one for B$=10^{17}$G, while it is negligible for B$=10^{18}$G. This is because of the dependence of $\lambda_{abs}$ with the magnetic field. By doing the same comparison in Fig.~\ref{figme13}, we notice that the dispersion contribution becomes more important, due to the strong temperature dependence of $\lambda_{dis}$. We want to finish the discussion on our results, by performing a quantitative analysis of the asymmetry. To this end, we define the mean free path asymmetry as, \begin{equation} \chi_{tot} =\frac{\lambda_{tot}(\theta_{\nu}=0)-\lambda_{tot}(\theta_{\nu}=\pi)}{<\lambda_{tot}(\theta_{\nu})>} \ , \label{chimfp} \end{equation} where we have employed $<\lambda_{tot}(\theta_{\nu})> \cong (\lambda_{tot}(\theta_{\nu}=0)+\lambda_{tot}(\theta_{\nu}=\pi))/2$. Note that for the dispersion reaction, one has $<\lambda_{tot}(\theta_{\nu})> = \lambda_{tot}(\theta_{\nu}=\pi/2)$. We give numerical values for $\chi_{tot}$ in Table~\ref{asymmtot}, for three values of the density and for B$=10^{17}$G and $10^{18}$G, with temperatures of T$=15$MeV and $30$MeV. As expected, the mean free path asymmetry is more important for the stronger magnetic fields. The reduction in $\chi_{tot}$ for higher values of the density is because the strong interaction becomes more important. Let us recall that the strong intereaction favors a non-polarized system. Some increase of $\chi_{tot}$ at $\rho=0.40$fm$^{-3}$ is particular to many of the Skyrme--parameterizations. Beyond this difficulty, we have preferred to employ the same parametrization as in~\cite{To19}, in order to make a fair comparison of both contributions to the total mean free path. The increase of the temperature leads to a decrease in the mean free path asymmetry. This result seems intuitively correct, as temperature reduce the spin asymmetry ${\it A}$. However, it is convenient to give some details on the origin of this results. In first place, $\lambda_{abs}$ has a weak temperature--dependence. On the other hand, $\lambda_{dis}$ depends strongly with the temperature, but it mean free path asymmetry ($\chi_{dis}$), is rather independent of the temperature. The last element is that the absorption mean free path asymmetry is bigger than the dispersion one. This is because in the absorption reaction we deal with charged particles which have a stronger interaction with the magnetic field. Now, as temperature grows, the $\lambda_{dis}$ contribution to $\chi_{tot}$ becomes more important, which leads to smaller values for $\chi_{tot}$, which explains the temperature dependence of our results in this table. \begin{table}[t] \begin{center} \caption{Mean free path asymmetry $\chi_{tot}$, as a function of the density for two values of the magnetic field intensity and two values of the temperature.} \label{asymmtot} \begin{tabular}{cccccccc} \hline\hline ~~~$\rho$~[fm$^{-3}$]~~~ &~~~~& \multicolumn {2}{c}{~~~~$\chi_{tot}(B=10^{17}G)$~~~~} &~~~~&\multicolumn {2}{c}{~~~~$\chi_{tot}(B=10^{18}G)$~~~~} &~~~~ \\ \cline{3-4}\cline{6-7} & & ~~~T$=15$MeV ~~~& ~~~T$=30$MeV~~~ & & ~~~T$=15$MeV~~~ & ~~~T$=30$MeV~~~ & \\ \hline $0.050$ & & $0.112$&$0.068$ & & $0.740$&$0.565$ & \\ $0.160$ & & $0.088$&$0.034$ & & $0.579$&$0.479$ & \\ $0.400$ & & $0.094$&$0.042$ & & $0.603$&$0.506$ & \\ \hline\hline \end{tabular} \end{center} \end{table} In the last point for this section, we make some comparison with other works. We start with the work of S. Shinkevich and A. Studenikin~\cite{Sh05}. This work makes a similar analysis, but using a relativistic framework in free space. In free space, it is the total cross section the magnitude that makes sense. The spin asymmetry {\it A} (named as $S$ in that work), is taken as an input of the model ({\it i.e.} it is not explicitly evaluated). The spin asymmetry is incorporated to their results by making the replacement $s_n \to {\it A}$. In the absence of dense medium, this replacement leads to the correct expression. We have an overall agreement with their results, having in mind that in our case the effect of the dense medium is important and the comparison is only qualitative. In our case, a dense medium imposes restrictions on the available phase space, which depends on the temperature. The net effect is a smoothing of the results in relation to theirs. The work by D.A. Baiko and D.G. Yakovlev~\cite{Ba99}, a formalism similar to ours is employed. However, they focus on very low temperatures, being the scope of this paper different than ours. To the best of our knowledge perhaps the most complete analysis on the subject has been made by Maruyama~{\it et al.}~\cite{Ma12}. We should quote that we have obtained a general agreement with all these papers. What sets us apart from the other works is the treatment we make of the equation of state. We have determined the EoS with a magnetic field and from this we obtain spin--dependent single particle energies and a chemical potential which lead to specific values for $\rho_{+}$ and $\rho_{-}$, the density of neutron with spin up and down, respectively. Even though the spin asymmetry {\it A}, appears explicitly in the expression for the cross section, an accurate evaluation of the structure function requires single particles and chemical potential consistent with the value of the magnetic field. \section{Summary and Conclusions} \label{Summary} In this work we have evaluated the neutrino mean free path for the absorption reaction $\nu + n \to e^{-} + p$, in hot dense neutron matter under a strong magnetic field. In first place, we have evaluated an EoS using the Hartree-Fock model with an Skyrme interaction with a strong magnetic field. As mentioned, we have a proton and an electron as final state. Being charged particles in a magnetic field, their quantum state is partially quantized, showing the so-called Landau levels. Due to this quantization, the phase space of final states is quite different from that of the same reaction but in the absence of a magnetic field. This contrast with the scattering reaction ($\nu + n \to \nu' + n'$), where the phase space of final states are very similar. While for B$=0$ the absorption reaction is always more important than the dispersion one, when B$\neq 0$, the situation is different: $\lambda_{abs}$ has a weak dependence with the temperature and decreases when the magnetic field grows, while $\lambda_{dis}$ has a strong dependence with the temperature (it decreases for growing values of T), and for $\theta_{\nu}=\pi/2$ is almost independent of the magnetic field. Therefore, in the presence of a strong magnetic field, either $\lambda_{abs}$ or $\lambda_{dis}$ can be the dominant contribution depending on the temperature. As a corollary of this behavior $\lambda_{abs}$ can be important for low temperatures as long as the magnetic field is strong. For not null magnetic field, the neutrino mean free path depends on the angle between the neutrino momentum and the magnetic field (which we take as $\hat{z}$--axis). This establish a preferred direction in space resulting in an asymmetrical emission. This asymmetry is the result of the interplay among the weak, strong and electromagnetic interactions. The weak interaction is the responsible for the reaction $\nu + n \to \nu' + n'$, giving as a result a transition matrix element which depends on the spin of the particles involved. On the other hand, by solving the EoS for hot dense neutron matter under a strong magnetic field, we obtain a partially polarized system, from which we obtain single particle energies and the chemical potential needed for the evaluation of the neutrino mean free path. As already mentioned, the EoS gives us the equilibrium situation among the strong interaction (which favors ${\it A=0}$) and the coupling to the magnetic field (${\it A \to -1}$). It is worth to mention that this kind of analysis is quite involved for a more complex medium. If we simple add protons to the medium (see for instance~\cite{Ag15}), we need to work with two spin asymmetries: the one for neutrons and another one for protons. In this case, we already have Landau levels in the initial state and the whole scheme should be re--formulated. Our results shows that the shortest neutrino mean free path is obtained for neutrinos moving anti--parallel to the magnetic field. As a consequence it is expected that the flux of emitted neutrinos parallel to the magnetic field is bigger than the one in the opposite direction. In Eq.~(\ref{chimfp}) we have defined the mean free path asymmetry $\chi_{tot}$, in order to account for this asymmetry in a quantitative way. We have obtained rather big values for $\chi_{tot}$. However, it would be speculative to draw a conclusion from these values: the geometry of the magnetic field in a neutron stars should be considered as well as the local density and temperature. Moreover, as discussed in the last paragraph, the actual composition of a neutron star is more complex. In any case, we consider that in the search for an explanation for the pulsar kick problem, this asymmetry can not be ignored. In this work we have tried to give a self-consistent treatment of the mean free path for neutrinos, starting from the EoS and putting special emphasis in its asymmetry. Both the weak transition matrix element and the EoS contribute to the asymmetry in the neutrino mean free path. We have employed pure hot dense neutron matter due to it simplicity and because it is a reasonable assumption that this model represents one important contribution to the problem. Nuclear correlations beyond the mean field could have a relevant effect on the mean free path and its asymmetry. One way to deal with these correlations is the so-called ring approximation (see for instance~\cite{Pe09a,Pe09b}). But there are other correlations that can be also important. From this, our aim for a next work is to analyze the role of nuclear correlations beyond the mean field on the neutrino mean free path. \newpage
\subsubsection*{Acknowledgments} This work was supported by the National Key Research and Development Program of China (No. 2018YFB0505000) and the Alibaba-Zhejiang University Joint Institute of Frontier Technologies. Fan Yang would like to thank Qingchen Yu for her helpful feedback on early drafts of this paper. \section{Appendix} \subsection{MHA implementation} Each attention head $k \in [K]$ is separately parameterized and operates as follows. For $\forall (j, i) \in \mathcal{E}$, it produces a message vector $\bm{\beta}_{j \to i}^k$ together with an unnormalized scalar weight $\omega_{j \to i}^k$. Then for $\forall i \in \mathcal{V}$, it aggregates all messages sent to $i$ in a permutation-invariant manner: \[ \big\{ \alpha_{p \to i}^k \big\}_{p \in \mathcal{N}^{-}_i} = \text{softmax}\left( \big\{ \omega_{p \to i}^k \big\}_{p \in \mathcal{N}^{-}_i} \right) \;,\quad \mathbf{a}_i^k = {\textstyle \sum_{p \in \mathcal{N}^{-}_i}}\:{ \alpha_{p \to i}^k \bm{\beta}_{p \to i}^k } \;. \] Putting all $K$ heads together, it turns out that \( \mathcal{M}_{j \to i} = \{ ( \omega_{j \to i}^k\,,\, \bm{\beta}_{j \to i}^k ) \}_{k=1}^K \) and $\mathcal{A}_i = \{ \mathbf{a}_i^k \}_{k=1}^K$. Specifically, each attention head is parameterized in a query-key-value style: \begin{gather*} \forall i \in \mathcal{V}: \quad \tilde{\mathbf{v}}_i = \text{MLP}_v(\mathbf{v}_i) \in \mathbb{R}^{\tilde{d}_v} \; , \quad \tilde{\mathbf{h}}_i = [\mathbf{h}_i, \tilde{\mathbf{v}}_i, \mathbf{g}] \\ \M{Q} = \tilde{\mathbf{H}} \mathbf{W}_Q \; , \quad \M{A} = \tilde{\mathbf{H}} \mathbf{W}_A \; , \quad \M{C} = \tilde{\mathbf{H}} \mathbf{W}_C \\ \bm{\beta}_{j \to i} = \mathbf{c}_j \;, \quad \omega_{j \to i} = \V{q}^{\top}_i \V{a}_j / \sqrt{d_q} + \text{MLP}_e(\mathbf{e}_{ji}) \in \mathbb{R} \end{gather*} for $\tilde{d} = d + \tilde{d}_v + d_g$, $\mathbf{W}_Q \in \mathbb{R}^{\tilde{d} \times d_q}$, $\mathbf{W}_A \in \mathbb{R}^{\tilde{d} \times d_q}$, and $\mathbf{W}_C \in \mathbb{R}^{\tilde{d} \times d_c}$. \subsection{Model details} In this work, the READOUT function is implemented by passing the concatenation of the outputs of a \emph{mean} aggregator and an element-wise \emph{max} aggregator through a gated activation unit. The transition densities in the generative model are specified to be: \begin{gather} f_{\theta}^g\big( \mathbf{z}_t^g \big| \mathbf{h}_t^g \big) = \text{Normal} \left( \cdot \middle| \bm{\mu}_{\theta}^g \left( \mathbf{h}_t^g \right), \bm{\Sigma}_{\theta}^g\left( \mathbf{h}_t^g \right) \right) \; , \\ f_{\theta}^{\star} \big( \mathbf{Z}_t \big| \mathbf{H}_t \big) = \prod_{i=1}^N{ \text{Normal} \left( \mathbf{z}_t^{(i)} \middle| \bm{\mu}_{\theta}^{\star} \left( \mathbf{h}_t^{(i)} \right), \bm{\Sigma}_{\theta}^{\star} \left( \mathbf{h}_t^{(i)} \right) \right) } \; , \end{gather} where $\bm{\mu}_{\theta}^g$ and $\bm{\Sigma}_{\theta}^g$ (similarly $\bm{\mu}_{\theta}^{\star}$ and $\bm{\Sigma}_{\theta}^{\star}$) are 3-layer MLPs that share their first layer. $\bm{\Sigma}_{\theta}^g$ and $\bm{\Sigma}_{\theta}^{\star}$ output diagonal covariance matrices using the softplus activation. The proposal densities $r_{\phi}^g$ and $r_{\phi}^{\star}$ are specified in a similar way. Then GNFs can be stacked on top of $f_{\theta}^{\star}$ and $r_{\phi}^{\star}$ to make them more expressive. \subsection{Experiments} We use the Adam optimizer with an initial learning rate of 0.001 and a gradient clipping of 1.0 for all experiments. The learning rate was annealed according to a linear cosine decay. We set $\beta_1 = \beta_2 = 1.0$ for the auxiliary losses in all experiments. \paragraph{Synthetic toy dataset.} A typical example in the dataset is visualized in Figure \ref{fig:toy-example}. The architectures of the models are specified as follows. \begin{enumerate}[label={(\alph*)}] \item VRNN: Using 128-dimensional latent variables and a two-layer, 512-unit GRU. \item GNN-AR: Using a two-layer GNN and an one-layer, 128-unit GRU shared by all nodes. \item R-SSM: We let $d_g = d_z = 8$. All RNNs are specified to be two-layer, 32-unit LSTMs. All MLPs use 64 hidden units. The generative model and the proposal both use a 4-head MHA layer. 4 SMC samples and a batch size of 16 are used in training. \end{enumerate} \begin{figure} \center \includegraphics[width=\linewidth]{img/toy/241} \caption{An example from the toy dataset ($N = 36$, $T = 80$).}\label{fig:toy-example} \end{figure} \paragraph{Basketball player movement.} We let $d_g = d_z = 32$. All RNNs are specified to be two-layer, 64-unit LSTMs and all MLPs use 256 hidden units. The generative model uses one 8-head MHA layer and the proposal uses two 8-head MHA layers. Each GNF uses an additional MHA layer shared by the functions $s(\cdot)$ and $t(\cdot)$. 4 SMC samples and a batch size of 64 are used in training. Eight selected rollouts from the trained model are visualized in Figure \ref{fig:bball-rollouts}. \begin{figure} \centering \includegraphics[width=.225\linewidth]{img/bball/1} \: \includegraphics[width=.225\linewidth]{img/bball/2} \: \includegraphics[width=.225\linewidth]{img/bball/3} \: \includegraphics[width=.225\linewidth]{img/bball/5} \\[\baselineskip] \includegraphics[width=.225\linewidth]{img/bball/6} \: \includegraphics[width=.225\linewidth]{img/bball/7} \: \includegraphics[width=.225\linewidth]{img/bball/8} \: \includegraphics[width=.225\linewidth]{img/bball/9} \caption{Selected rollouts from the trained model. Black dots represent the starting points.} \label{fig:bball-rollouts} \end{figure} \paragraph{Road traffic.} We let $d_g = d_z = 8$. A 32-dimensional embedding for each sensor is jointly learned as a part of the vertex attribute. All RNNs are specified to be two-layer, 32-unit LSTMs and all MLPs use 64 hidden units. The generative model and the proposal both use two 8-head MHA layers. 3 SMC samples and a batch size of 16 are used in training. \newpage \subsection{Training}\label{subsec:app-train} We optimize the VSMC bound estimated by the following SMC algorithm: \begin{algorithm} \caption{Estimate the VSMC bound $\mathcal{L}_K^{\text{SMC}}$} \label{alg:vsmc} \begin{algorithmic} \STATE {\bfseries Input:} graph $\mathcal{G}$, observations $\mathbf{X}_{1:T}$, exogenous inputs $\mathbf{U}_{1:T}$ \STATE {\bfseries Require:} generative model $\{ f_{\theta}^g, f_{\theta}^{\star}, g_{\theta} \}$, proposal $\{ r_{\phi}^g, r_{\phi}^{\star} \}$, number of particles $K$ \STATE \FOR{$k = 1 \ldots K$} \STATE Simulate $\mathbf{z}_{1, k}^g \sim r_{\phi}^g (\cdot | \mathcal{G}, \mathbf{X}_1, \mathbf{U}_1 )$ \STATE Simulate $\mathbf{Z}_{1, k} \sim r_{\phi}^{\star} (\cdot | \mathbf{z}_{1, k}^g, \mathcal{G}, \mathbf{X}_1, \mathbf{U}_1)$ \STATE Set \( w_1^k = \frac{ f_{\theta}^g(\mathbf{z}_{1, k}^g) f_{\theta}^{\star}(\mathbf{Z}_{1, k} | \mathbf{z}_{1, k}^g,\, \mathcal{G},\, \mathbf{U}_1) \prod_{i=1}^{N}{ g_{\theta}( \mathbf{x}_1^{(i)} | \mathbf{z}_{1, k}^{(i)},\, \mathbf{z}_{1, k}^g,\,\ldots) } }{ r_{\phi}^g(\mathbf{z}_{1, k}^g | \ldots) r_{\phi}^{\star}(\mathbf{Z}_{1, k} | \ldots) } \) \ENDFOR \STATE Initialize $\hat{\mathcal{L}}^{\text{SMC}}_K = \log{ \sum_{k=1}^{K}{\nicefrac{w_1^k}{K}} }$ \STATE \FOR{$t = 2 \ldots T$} \STATE $\{ \mathbf{z}_{<t, k}^g, \mathbf{Z}_{<t, k} \}_{k=1}^K = \text{RESAMPLE}(\{ \mathbf{z}_{<t, k}^g, \mathbf{Z}_{<t, k}, w_{t-1}^k \}_{k=1}^K )$ \FOR{$k = 1 \ldots K$} \STATE Simulate $\mathbf{z}_{t, k}^g \sim r_{\phi}^g (\cdot | \mathbf{z}_{<t, k}^g, \mathbf{Z}_{<t, k}, \mathcal{G}, \mathbf{X}_{\leq t}, \mathbf{U}_{\leq t} )$ \STATE Simulate $\mathbf{Z}_{t, k} \sim r_{\phi}^{\star} (\cdot | \mathbf{z}_{\leq t, k}^g, \mathbf{Z}_{<t, k}, \mathcal{G}, \mathbf{X}_{\leq t}, \mathbf{U}_{\leq t})$ \STATE Set \( w_t^k = \frac{ f_{\theta}^g(\mathbf{z}_{t, k}^g | \ldots) f_{\theta}^{\star}(\mathbf{Z}_{t, k} | \mathbf{z}_{\leq t, k}^g,\, \mathbf{Z}_{<t, k},\, \ldots) \prod_{i=1}^{N}{ g_{\theta}( \mathbf{x}_t^{(i)} | \mathbf{z}_{t, k}^{(i)},\, \mathbf{z}_{\leq t, k}^g,\, \mathbf{Z}_{<t, k},\, \ldots) } }{ r_{\phi}^g(\mathbf{z}_{t, k}^g | \ldots) r_{\phi}^{\star}(\mathbf{Z}_{t, k} | \ldots) } \) \STATE Set $\mathbf{z}_{\leq t, k}^g = (\mathbf{z}_{<t, k}^g, \mathbf{z}_{t, k}^g )$, $\mathbf{Z}_{\leq t, k} = (\mathbf{Z}_{<t, k}, \mathbf{Z}_{t, k})$ \ENDFOR \STATE Update $\hat{\mathcal{L}}^{\text{SMC}}_K = \hat{\mathcal{L}}^{\text{SMC}}_K + \log{ \sum_{k=1}^{K}{\nicefrac{w_t^k}{K}} }$ \ENDFOR \STATE \STATE {\bfseries Output:} $\hat{\mathcal{L}}^{\text{SMC}}_K$ \end{algorithmic} \end{algorithm} In our model, dependencies on $\mathbf{z}_{<t, k}^g$ and $\mathbf{Z}_{<t, k}$ are provided through the compact RNN states $\mathbf{h}_{t, k}^g$ and $\mathbf{H}_{t, k}$. When GNFs are used in $f_{\theta}^{\star}$ and $r_{\phi}^{\star}$, density calculation and backpropagation are automatically handled by the TensorFlow Probability library. To estimate the auxiliary objectives $\mathcal{L}_1^{\text{aux}}$ and $\mathcal{L}_2^{\text{aux}}$, we reuse the resampled unweighted particles $\{ \{ \mathbf{z}_{1:t, k}^g, \mathbf{Z}_{1:t, k} \}_{k=1}^K \}_{t=1}^{T-1}$ generated by Algorithm \ref{alg:vsmc} to form Monte Carlo estimations for them: \[ \hat{\mathcal{L}}_1^{\text{aux}} = \sum_{t=1}^{T-1} \sum_{i=1}^N \frac{1}{K} \log \frac{ \lambda_{\psi, 1}( \hat{\mathbf{z}}_{t, k}^{(i)}, \mathbf{c}_t^{(i)} ) }{ \sum_{ \mathbf{c} \in \Omega_{t,i} }{ \lambda_{\psi, 1}( \hat{\mathbf{z}}_{t, k}^{(i)}, \mathbf{c} ) } } , \; \hat{\mathcal{L}}_2^{\text{aux}} = \sum_{t=1}^{T-1} \sum_{i=1}^N \frac{1}{K} \log \frac{ \lambda_{\psi, 2}( \hat{\mathbf{h}}_{t, k}^{(i)}, \mathbf{c}_t^{(i)} ) }{ \sum_{ \mathbf{c} \in \Omega_{t,i} }{ \lambda_{\psi, 2}( \hat{\mathbf{h}}_{t, k}^{(i)}, \mathbf{c} ) } } \] where $\hat{\mathbf{z}}_{t, k}^{(i)} = [\mathbf{z}_{t, k}^g, \mathbf{z}_{t, k}^{(i)}]$, $\hat{\mathbf{h}}_{t, k}^{(i)} = \text{MLP}_{\psi}( \sum_{ j \neq i \, \wedge \, j \in \mathcal{N}_i^{-} }{ \mathbf{h}_{t, k}^{(j)} } )$, and $\Omega_{t,i}$ is a set that contains $\mathbf{c}_t^{(i)}$ and some negative samples selected from the future summaries of other vertices within the minibatch. \newpage \subsection{Graph Normalizing Flow}\label{subsec:app-gnf} \begin{figure}[H] \center \includegraphics[width=\linewidth]{img/GNF-vertical} \caption{Visual illustration of a GNF. Multiple GNFs can be stacked together to achieve more expressive transformation.}\label{fig:gnf} \end{figure} The element-wise affine layer is proposed by \citet{glow} for normalizing the activations. Its parameters $\bm{\gamma} \in \mathbb{R}^D$ and $\bm{\beta} \in \mathbb{R}^D$ are initialized such that the per-channel activations have roughly zero mean and unit variance at the beginning of training. The invertible linear transformation $\mathbf{W} \in \mathbb{R}^{D \times D}$ is parameterized using a QR decomposition \cite{emerging}. \section{Preliminaries} In this work, an attributed directed graph is given by a 4-tuple: $\mathcal{G} = (\mathcal{V}, \mathcal{E}, \mathbf{V}, {\tens{E}})$, where $\mathcal{V} = [N] \coloneqq \{1, \dotsc, N\}$ is the set of vertices, $\mathcal{E} \subseteq [N] \times [N]$ is the set of edges, $\mathbf{V} \in \mathbb{R}^{N \times d_v}$ is a matrix of static vertex attributes, and ${\tens{E}} \in \mathbb{R}^{N \times N \times d_e}$ is a sparse tensor storing the static edge attributes. The set of direct predecessors of vertex $i$ is notated as $\mathcal{N}^{-}_i = \left\{ p \middle| (p, i) \in \mathcal{E} \right\}$. We use the notation $\mathbf{x}_i$ to refer to the $i$-th row of matrix $\mathbf{X}$ and write $\mathbf{x}_{ij}$ to indicate the $(i, j)$-th entry of tensor ${\tens{X}}$ (if the corresponding matrix or tensor appears in the context). For sequences, we write $\mathbf{x}_{\leq t} = \mathbf{x}_{1:t} \coloneqq (\mathbf{x}_1, \ldots, \mathbf{x}_t)$ and switch to $\mathbf{x}_t^{(i)}$ for referring to the $i$-th row of matrix $\mathbf{X}_t$. \subsection{Graph Neural Networks} GNNs are a class of neural networks developed to process graph-structured data and support relational reasoning. Here we focus on vertex-centric GNNs that iteratively update the vertex representations of a graph $\mathcal{G}$ while being \emph{equivariant} \cite{eq-gn} under vertex relabeling. Let $\mathbf{H} \in \mathbb{R}^{N \times d}$ be a matrix of vertex representations, in which the $i$-th row $\mathbf{h}_i \in \mathbb{R}^d$ is the vectorized representation attached to vertex $i$. Conditioning on the static graph structure and attributes given by $\mathcal{G}$, a GNN just takes the vertex representations $\mathbf{H}$ along with some graph-level context $\mathbf{g} \in \mathbb{R}^{d_g}$ as input and returns new vertex representations $\mathbf{H}'\in \mathbb{R}^{N \times d'}$ as output, i.e., $\mathbf{H}' = \text{GNN}(\mathcal{G}, \mathbf{g}, \mathbf{H})$. When updating the representation of vertex $i$ from $\mathbf{h}_i$ to $\mathbf{h}_i^{\prime}$, a GNN takes the representations of other nearby vertices into consideration. Popular GNN variants achieve this through a multi-round message passing paradigm, in which the vertices repeatedly send messages to their neighbors, aggregate the messeages they received, and update their own representations accordingly. Formally, the operations performed by a basic block of a message-passing GNN are defined as follows: \begin{align} \label{eq:gnn-msg-fn} \forall (j, i) \in \mathcal{E} &: & \mathcal{M}_{j \to i} &= \text{MESSAGE}\left( \mathbf{g}, \mathbf{v}_j, \mathbf{v}_i, \mathbf{e}_{ji}, \mathbf{h}_j, \mathbf{h}_i \right) \\ \label{eq:gnn-agg-fn} \forall i \in \mathcal{V} &: & \mathcal{A}_i &= \text{AGGREGATE}\left( \left\{ \mathcal{M}_{p \to i} \right\}_{p \in \mathcal{N}^{-}_i} \right) \\ \label{eq:gnn-cmb-fn} \forall i \in \mathcal{V} &: & \mathbf{h}'_i &= \text{COMBINE}\left( \mathbf{g}, \mathbf{v}_i, \mathbf{h}_i, \mathcal{A}_i \right) \end{align} Throughout this work, we implement Equations \eqref{eq:gnn-msg-fn} and \eqref{eq:gnn-agg-fn} by adopting a multi-head attention mechanism similar to \citet{transformer} and \citet{gat}. For Equation \eqref{eq:gnn-cmb-fn}, we use either a RNN cell or a residual block \cite{he}, depending on whether the inputs to GNN are RNN states or not. We write such a block as $\mathbf{H}' = \text{MHA}( \mathcal{G}, \mathbf{g}, \mathbf{H} )$ and give its detailed implementation in the Appendix. A GNN simply stacks $L$ separately-parameterized MHA blocks and iteratively computes $\mathbf{H} \eqqcolon \mathbf{H}^{(0)}, \ldots, \mathbf{H}^{(L)} \eqqcolon \mathbf{H}'$, in which $\mathbf{H}^{(l)} = \text{MHA}( \mathcal{G}, \mathbf{g}, \mathbf{H}^{(l-1)} )$ for $l = 1, \ldots, L$. We write this construction as $\mathbf{H}' = \text{GNN}(\mathcal{G}, \mathbf{g}, \mathbf{H})$ and treat it as a black box to avoid notational clutter. \subsection{State-Space Models} State-space models are widely applied to analyze dynamical systems whose true states are not directly observable. Formally, an SSM assumes the dynamical system follows a latent state process $\left\{\mathbf{z}_t \right\}_{t \geq 1}$, which possibly depends on exogenous inputs $\{\mathbf{u}_t \}_{t \geq 1}$. Parameterized by some (unknown) static parameter $\theta$, the latent state process is characterized by an initial density $\mathbf{z}_1 \sim \pi_{\theta}(\cdot | \mathbf{u}_1)$ and a transition density $\mathbf{z}_{t+1} \sim f_{\theta}\left( \cdot \middle| \mathbf{z}_{\leq t}, \mathbf{u}_{\leq t+1} \right)$. Moreover, at each time step, some noisy measurements of the latent state are observed through an observation density: $\mathbf{x}_t \sim g_{\theta}\left( \cdot \middle| \mathbf{z}_{\leq t}, \mathbf{u}_{\leq t} \right)$ . The joint density of $\mathbf{x}_{1:T}$ and $\mathbf{z}_{1:T}$ factors as: $ p(\mathbf{x}_{1:T}, \mathbf{z}_{1:T} | \mathbf{u}_{1:T}) = \pi_{\theta}( \mathbf{z}_1 | \mathbf{u}_1 ) \prod_{t=2}^{T}{f_{\theta}( \mathbf{z}_t | \mathbf{z}_{<t}, \mathbf{u}_{\leq t} )} \prod_{t=1}^{T}{g_{\theta}( \mathbf{x}_t | \mathbf{z}_{\leq t}, \mathbf{u}_{\leq t} )} $. The superior expressiveness of SSMs can be seen from the fact that the marginal predictive distribution $p(\mathbf{x}_t | \mathbf{x}_{<t}, \mathbf{u}_{\leq t}) = \int p(\mathbf{x}_t, \mathbf{z}_{\leq t} | \mathbf{x}_{<t}, \mathbf{u}_{\leq t}) \: \mathrm{d}\mathbf{z}_{\leq t}$ can be far more complex than unimodal distributions and their finite mixtures that are common in AR models. Recently developed deep SSMs use RNNs to compress $\mathbf{z}_{\leq t}$ (and $\mathbf{u}_{\leq t}$) into fixed-size vectors to achieve tractability. As shown in next section, R-SSM can be viewed as enabling multiple individual deep SSMs to communicate. \subsection{Normalizing Flows} Normalizing flows \cite{nf} are invertible transformations that have the capability to transform a simple probability density into a complex one (or vice versa). Given two domains $\mathcal{X} \subseteq \mathbb{R}^D$ and $\mathcal{Y} \subseteq \mathbb{R}^D$, let $f: \mathcal{X} \to \mathcal{Y}$ be an invertible mapping with inverse $f^{-1}$. Applying $f$ to a random variable $\mathbf{z} \in \mathcal{X}$ with density $p(\mathbf{z})$, by the \emph{change of variables} rule, the resulting random variable $\mathbf{z}' = f(\mathbf{z}) \in \mathcal{Y}$ will have a density: \[ p(\mathbf{z}') = p(\mathbf{z}) \left| \det \frac{\partial f^{-1}}{\partial \mathbf{z}'} \right| = p(\mathbf{z}) \left| \det \frac{\partial f}{\partial \mathbf{z}} \right|^{-1} \] A series of invertible mappings with cheap-to-evaluate determinants can be chained together to achieve complex transformations while retaining efficient density calculation. This provides a powerful way to construct expressive distributions. \section{Conclusions} In this work, we present a deep hierarchical state-space model in which the state transitions of correlated objects are coordinated by graph neural networks. To effectively learn the model from observation data, we develop a structured posterior approximation and propose two auxiliary contrastive prediction tasks to help the learning. We further introduce the graph normalizing flow to enhance the expressiveness of the joint transition density and the posterior approximation. The experiments show that our model can outperform or match the state-of-the-arts on several time series modeling tasks. Directions for future work include testing the model on high-dimensional observations, extending the model to directly learn from visual data, and including discrete latent variables in the model. \section{Appendix} \paragraph{Basic Attention Mechanism.} Given the vertex features $\mathbf{H} \in \mathbb{R}^{n \times d}$, we use five parameter matrices $\mathbf{W}_Q \in \mathbb{R}^{d \times d_k}$, $\mathbf{W}_K \in \mathbb{R}^{d \times d_k}$, $\mathbf{W}_V \in \mathbb{R}^{d \times d_v}$, $\mathbf{W}_S \in \mathbb{R}^{d \times d_v}$ and $\mathbf{W}_R \in \mathbb{R}^{d \times d_v}$ to linearly transform them into queries, keys, values and sender/receiver attributes, respectively: $\{\M{Q}, \M{K}, \M{V}, \M{S}, \M{R}\} = \mathbf{H} \mathbf{W}_{\{Q,K,V,S,R\}}$. Below we use the notation $\V{q}_i$ to refer to the $i$-th column vector of $\V{Q}^{\top}$. For each directed edge $(j, i) \in \mathcal{E}$, we compute its compatibility $c_{j \to i} = \V{q}^{\top}_i \V{k}_j / \sqrt{d_k} \in \mathbb{R}$ , i.e., the scaled dot-product similarity between receiver's query and sender's key. Then for each vertex $i \in \mathcal{V}$, we turn the compatibilities of its incoming edges into attention weights: $ \{a_{p \to i}\}_{p \in \mathcal{N}^{-}_i} = \omega \left( \{c_{p \to i}\}_{p \in \mathcal{N}^{-}_i} \right) $. Here $\mathcal{N}^{-}_i = \left\{p \middle| (p, i) \in \mathcal{E}\right\}$ is the set of direct predecessors of vertex $i$, and $\omega(\cdot)$ is an activation function discussed below. The raw message sent from $j$ to $i$ is computed as $\V{m}_{j \to i} = \sigma(\V{s}_j \odot \V{r}_i + \V{v}_j)$ , where $\odot$ denotes the Hadamard product and $\sigma(\cdot)$ is an activation function specified to be $\sigma(x) = x \cdot \text{sigmoid}(x)$ in this work. Finally each vertex attentively aggregates all raw messages it received: $\V{m}_i = \sum_{p \in \mathcal{N}^{-}_i} a_{p \to i} \V{m}_{p \to i}$, and the new vertex features are obtained by projecting aggregated messages $\V{M} = \big[ \V{m}_1, \V{m}_2, \ldots, \V{m}_n \big]^{\top}$ back to a $d$-dimensional space: $\mathbf{H}' = \V{M}\mathbf{W}_B$, where $\mathbf{W}_B \in \mathbb{R}^{d_v \times d}$ is another parameter matrix. We write this attention mechanism as $\mathbf{H}' = \text{ATT}(\mathcal{G}, \mathbf{H}; \mathbf{W}_{*}, \omega)$, where $\mathbf{W}_* = \mathbf{W}_{\{Q,K,V,S,R,B\}}$. In above, to enable the message $\V{m}_{j \to i}$ to depend on both $\mathbf{h}_j$ and $\mathbf{h}_i$, we have modified the Transformer-style attention by letting $\V{m}_{j \to i} = \sigma(\V{s}_j \odot \V{r}_i + \V{v}_j)$, where $\V{s}_j$ and $\V{r}_i$ are obtained through two additional transformations $\mathbf{W}_S$ and $\mathbf{W}_R$. Besides, we enable using an activation function other than softmax to produce the attention weights, e.g., in 3.3 we use uniform weights to ease the scalable learning procedure. Finally, as pointed in [2][3], in practice it is often beneficial to allow different types of messages by using multiple attention heads. Let $M \in \mathbb{Z}^+$ be a hyperparameter and $\lambda = \{\mathbf{W}_*^{(i)} \}_{i=1}^{M}$. We use $M$ separately parameterized attention heads to compute the new vertex features: \begin{equation} \text{MHA}(\mathcal{G}, \mathbf{H}; \lambda, \omega) = \sum_{i=1}^M{ \text{ATT}(\mathcal{G}, \mathbf{H}; \mathbf{W}_*^{(i)}, \omega) } \end{equation} \paragraph{Attention-based GNNs.} An MHA unit only simulates first-order information propogation on the given graph. In order to capture higher-order interactions, here we further present how to stack multiple layers of MHA into a GNN block. Let $L \in \mathbb{Z}^+$ be a hyperparameter and $\mathbf{H}^{(0)} = \mathbf{H}$ be the initial vertex features. We iteratively compute $\mathbf{H}^{(1)}, \mathbf{H}^{(2)}, \ldots, \mathbf{H}^{(L)} \eqqcolon \mathbf{H}'$ as follows: \[ \M{U}^{(l)} = \text{MHA}\left( \mathcal{G}, \mathbf{H}^{(l-1)}; \lambda^{(l)}, \omega \right) \] \[ \mathbf{h}_i^{(l)} = \text{COMBINE}\left( \mathbf{h}_i^{(l-1)}, \V{u}_i^{(l)} \right) \] for $i = 1, \ldots, n$, where $\M{U}^{(l)} \in \mathbb{R}^{n \times d}$ is the matrix of per-vertex updates at layer $l$, and $\text{COMBINE}$ is a function that updates $\mathbf{h}_i^{(l-1)}$ to $\mathbf{h}_i^{(l)}$ conditioning on $\V{u}_i^{(l)}$. In our case $\text{COMBINE}$ is specified to be a gated recurrent unit (GRU). In the presentation below we write this GNN construction as $\mathbf{H}' = \text{GNN}^{M,L,\omega}(\mathcal{G}, \mathbf{H})$ and treat it as a black box to avoid notational clutter. \subsection{Generative Model} For simplicity, assuming $\text{RNN}_{\theta}$ is an LSTM and the dimensionality of its cell state is specified to be $d_h$, then $\mathbf{h}_t^{(i)} \in \mathbb{R}^{2d_h}$, $\mathbf{h}_1^{(i)} = \V{0}$, $\tilde{\mathbf{h}}_t^{(i)} \in \mathbb{R}^{d_h}$ and $\V{c}_t^{(i)} \in \mathbb{R}^{d_h}$. Here $\text{FF}_{\theta}$ is a feed-forward layer that combines two LSTM states and uses $\tanh(\cdot)$ as its activation function, while $f_{\theta}$ and $g_{\theta}$ are tractable distributions parameterized by the output of ‎proper neural networks, e.g., multilayer perceptrons (MLPs). In this work we take $ f_{\theta} \left( \cdot \middle| \V{c}_t^{(i)} \right) = \mathcal{N} \left( \cdot \middle| \bm{\mu}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}), \bm{\Sigma}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}) \right) $ , where $\bm{\mu}_{\theta}$ and $\bm{\Sigma}_{\theta}$ are 2-layer MLPs that share their first layer. $g_{\theta}$ is specified in a similar way, although depending on the observations a non-Gaussian distribution may be used. \subsection{Scalable Learning} The learning objective and gradient estimator above involve the full dataset $\{\mathbf{x}_{1:T}^{(i)}\}_{i=1}^N$, resulting in expensive optimization steps if $N$ or $T$ is large. To scale the proposed model to large datasets, here we make an assumption that the distribution of the latent state $\mathbf{z}_t^{(i)}$ could be well estimated using only vertex $i$'s observations and past states. This enable us to use a simple structured inference network $ q'_{\phi}\left( \mathbf{Z}_{1:T} \middle| \mathbf{X}_{1:T} \right) = \prod_{t=1}^T{q'_{\phi}(\mathbf{Z}_t | \mathbf{Z}_{<t}, \mathbf{X}_{\leq t})} $, where $ q'_{\phi}(\mathbf{Z}_t | \mathbf{Z}_{<t}, \mathbf{X}_{\leq t}) = \prod_{i=1}^N{q'_{\phi}(\mathbf{z}_t^{(i)} | \mathbf{z}_{<t}^{(i)}, \mathbf{x}_{\leq t}^{(i)})} $ is obtained by replacing $\tilde{\M{B}}_t = \M{B}_t$ into \eqref{eq:2}. Then we optimize the simpler variational autoencoder (VAE) objective instead: \begin{equation} \mathcal{L}^{\text{VAE}}(\theta, \phi) = \mathbb{E}_{q'_{\phi}\left( \mathbf{Z}_{1:T} \middle| \mathbf{X}_{1:T} \right)} \left[ \log \frac{ p_{\theta}\left( \mathbf{X}_{1:T} \middle| \mathbf{Z}_{1:T} \right) p_{\theta}\left( \mathbf{Z}_{1:T} \right) }{ q'_{\phi}\left( \mathbf{Z}_{1:T} \middle| \mathbf{X}_{1:T} \right) } \right] \end{equation} The VAE objective is equivalent to $\mathcal{L}_1^{\text{SMC}}$ if the same proposals are used. In our case, it factors as a summation over all time steps: $ \mathcal{L}^{\text{VAE}}(\theta, \phi) = \sum_{t=1}^T{ \mathbb{E}_{q'_{\phi}\left( \mathbf{Z}_{<t} \middle| \mathbf{X}_{<t} \right)} \left[ \mathcal{F}_t \right] } $, where $\mathcal{F}_t$ is the per-step variational free energy defined as: \begin{equation} \label{eq:3} \begin{split} \mathcal{F}_t \coloneqq \: & \mathbb{E}_{\prod_{i=1}^N{q'_{\phi}(\mathbf{z}_t | \mathbf{z}_{<t}, \mathbf{x}_{\leq t})}} \left[ \sum_{i=1}^N{ \log g_{\theta}\left( \mathbf{x}_t^{(i)} \middle| \mathbf{z}_t^{(i)} \right) } \right] \\ & - \sum_{i=1}^N{ \text{KL}\left( q'_{\phi}(\mathbf{z}_t^{(i)} | \mathbf{z}_{<t}^{(i)}, \mathbf{x}_{\leq t}^{(i)} ) \middle\| f_{\theta}( \mathbf{z}_t^{(i)} \middle| \V{c}_t^{(i)} ) \right) } \end{split} \end{equation} To optimize $\mathcal{L}^{\text{VAE}}$ in an effective manner, we propose using graph sampling and truncated backpropagation through time (T-BPTT) to deal with large $N$ and $T$, respectively. \paragraph{Graph Sampling.} When there are a large number of vertices, we are interested in using a sampled subset of them to estimate $\mathcal{L}^{\text{VAE}}$ (and the reparameterized gradient) at each optimization step. It turns out that the key challenge here is to estimate $\V{c}_t^{(i)}$ in \eqref{eq:3}, which is produced by the GNN in the generative model and thus depends on the sampled trajactories of vertex $i$'s $L$-hop neighbors. Here we use neighborhood sampling [6] to approximate $\V{c}_t^{(i)}$, then estimate the two terms of \eqref{eq:3} separately. Specifically, at each iteration, we pick a starting vertex $i$ uniformly at random, and simulate a random walk on the \emph{reverse} graph with restart probability $1/L$. We donate the set of visited vertices as $\mathcal{S} = \{n_k\}_{k=1}^{|\mathcal{S}|}$, and let $\omega(c_{p \to j}) = 1/|\mathcal{N}_j^- \cap \mathcal{S}|$. Then we estimate the VAE objective as: \[ \mathcal{L}^{\text{VAE}}(\theta, \phi) \approx \sum_{t=1}^T{ \mathbb{E}_{ \prod_{k=1}^{|\mathcal{S}|}{ q'_{\phi} \left(\mathbf{z}_{<t}^{(n_k)} \middle| \mathbf{x}_{<t}^{(n_k)} \right) } } \left[ \tilde{\mathcal{F}}_t \right] } \], where $\tilde{\mathcal{F}}_t$ is defined to be: \begin{equation} \label{eq:4} \begin{split} \tilde{\mathcal{F}}_t \coloneqq \: & \mathbb{E}_{ \prod_{k=1}^{|\mathcal{S}|}{ q'_{\phi} \left(\mathbf{z}_t^{(n_k)} \middle| \mathbf{z}_{<t}^{(n_k)}, \mathbf{x}_{\leq t}^{(n_k)} \right) } } \left[ \frac{N}{|\mathcal{S}|} \sum_{k=1}^{|\mathcal{S}|}{ \log g_{\theta}\left( \mathbf{x}_t^{(n_k)} \middle| \mathbf{z}_t^{(n_k)} \right) } \right] \\ & - N \cdot \text{KL}\left( q'_{\phi}(\mathbf{z}_t^{(i)} | \mathbf{z}_{<t}^{(i)}, \mathbf{x}_{\leq t}^{(i)} ) \middle\| f_{\theta}( \mathbf{z}_t^{(i)} \middle| \hat{\V{c}}_t^{(i)} ) \right) \end{split} \end{equation} \paragraph{T-BPTT.} T-BPTT is widely employed to train RNNs on long sequences, and it can be adapted to our case in a similar way. For large $T$, we partition $X_{1:T}$ into a sequence of segments $\{\mathbf{X}_{t:t+P-1}\}_{t=1}^{\lfloor T/P \rfloor}$, maintain the boundary states ($\mathbf{H}_{t+P-1}$ and $\tilde{\mathbf{B}}_{t+P-1}$), and perform truncated backpropagation on each segment. When $N$ is also large, T-BPTT and graph sampling can be used together. \paragraph{Enhancing VSMC with HIS.} The above proposal design $ q_{\phi}\left(\mathbf{Z}_t \middle| \mathbf{Z}_{<t}, \mathbf{X}_{\leq t} \right) = \prod_{i=1}^{N}{ s_{\phi} \left(\cdot \middle| \V{c}_t^{(i)}, \V{b}_t^{(i)} \right) } $ yields a mean-field variational family, which can be not flexible enough to include members close to the optimal proposal $p_\theta \left(\mathbf{Z}_t \middle| \mathbf{X}_t, \mathbf{Z}_{<t} \right)$. Here we follow the idea in the Hamiltonian variational autoencoder (HVAE) approach and replace the importance sampling step in SMC with HIS targeting the optimal proposal. Specifically, let $a_{t-1}^k$ be the $k$-th resampled ancestor index at time $t$, and for notational simplicity let $j = a_{t-1}^k$. For the ancestral path $\mathbf{Z}_{<t}^j$, we first propose a sample from the proposal distribution: $ \tilde{\mathbf{Z}}_t^k \sim q_{\phi}\left( \cdot \middle| \mathbf{Z}_{<t}^j, \mathbf{X}_{\leq t} \right) $, then use target-informed inhomogeneous Hamiltonian dynamics to deterministically transform $\tilde{\mathbf{Z}}_t^k$ into some new value $\mathbf{Z}_t^k$, and finally compute the importance weight $w_t^k$ for the new particle $\mathbf{Z}_{1:t}^k \coloneqq (\mathbf{Z}_{<t}^j, \mathbf{Z}_t^k)$ properly. The detailed HIS procedure is given in the Appendix. When serving as a sequential generative model, RNN is often augmented with a parameterized output distribution from some simple distribution family, e.g., Gaussian for continuous data. Despite the convenience of tractable likelihood, it has been observed that such architecture is not sufficient to capture the complexity of true data distributions \cite{softmax}. In VRNN \cite{vrnn}, the variational approximation is structured in the form of filtering distributions. In SRNN \cite{srnn}, the variational approximation is designed to mimic smoothing distributions that take the future observations into account. Z-forcing \cite{zf} introduces an auxiliary cost which forces the latent variables to reconstruct the summaries of future observations. It has been observed that such auxiliary task substantially improves the performance of long-term predictions \cite{zf-rl}. The state vectors are either coded in a specific form or produced by a learned perceptual frontend. The whole model is trained with an objective given by tasks such as future state prediction and scene reconstruction. We comment that they focus on performing position estimation and forecasting with partially observed visual information, whereas we focus on jointly modeling the dynamics of interacting objects given individual-level observations Below, we first briefly introduce the VSMC objective and then present the design of proposal distributions. It is appealing to augment our model with a joint meansurement model and a perceptual module to directly learn from visual data, and we leave this for future work These models decompose the scene into a set of objects repesented by state vectors, and model the interations and dynamics using the neural message passing mechanism. Stochastic RNNs can be viewed as special SSMs in which part of the latent state transition is deterministic and the observation at previous time step serves as the input of current time step. Compared to autoregressive models, SSMs that do not depend on observations enable sampling latent state transitions without generating the intermediate observations, which is an appealing property for scenarios such as model-based reinforcement learning when the observation space is high-dimensional. Several recent works \paragraph{Correlated Time Series Modeling.} Finally we point out that correlated time series modeling has been studied extensively in the spatio-temporal settings \cite{st-book}. Examples include approaches based on Gaussian process \cite{gp} that model the spatio-temporal correlation using covariance functions, and statistical dynamic models that model interactions using Markov random fields \cite{tpami-tracking,nested-smc}. In this section, we empirically evaluate the proposed R-SSM on a variety of time series modeling tasks to demonstrate its utility. In \ref{ssec:1}, we illustrate the benefits of relational state space modeling through a toy example. In \ref{ssec:2}-\ref{ssec:5}, we evaluate the modeling capability and forecasting performance of R-SSM on several datasets from various domains, including physics simulations, sports tracking and road traffic. Overall, we compare R-SSM with following baseline models: \begin{itemize} \item \textbf{RNNs.} We consider two LSTM baselines: (1) LSTM-indep, which uses an LSTM to autoregressively model the observations of each individual object and shares the parameters across all objects; and (2) LSTM-joint, which runs a global LSTM to autoregressively model the concatenated observations of all objects. \item \textbf{Stochastic RNNs.} Stochastic RNNs are generally considered to have higher modeling capability than vanilla RNNs, thank to the addition of latent random variables. Our experiments include comparisons with VRNN, SRNN and Z-forcing. \item \textbf{GNNs.} Recent work have shown on simulated and real-world data that GNN-based forward models support accurate future predictions. We compare our model with several representative models whose implementations are publicly available, including Interaction Networks, Graph Networks, DCRNN and NRI. \end{itemize} \subsection{Web Traffic} \label{ssec:5} Wikimedia Foundation maintains publicly consumable hourly pageview statistics for every Wikipedia articles, providing a good test bed to examine the effectiveness of the scalable training procedure. We develop our experiment based on a preprocessed public dataset[kaggle]. It consists of approximately 145K time series, each of which records the daily view counts of a Wikipedia article contributed by one type of agents (mobile, desktop, spider, and all). We select 9K time series that correspond to overall access to all English articles covered by this dataset. These time series span 983 days from January 1st, 2015 to September 10th, 2017. We fit and validate our model using the data of 2015 and 2016, and test the forecasting accuracy on the data of 2017. To construct a graph for these articles, we consult the wiki-topcats dataset and connect two articles if the intersection of their categories is nonempty. The top-k largest categories are excluded to avoid resulting a dense graph. In addition, we make use of the Wikipedia Clickstream dataset, another public dataset maintained by Wikimedia Foundation. It contains (referer, resource) pairs extracted from the request logs of Wikipedia, i.e., samples of hyperlinks between Wikipedia articles. We connect two articles if a pair corresponding to them is found. \item \textbf{NYC Traffic Speed}[nyc] made publicly available by NYCDOT. It provides the average traffic speed of 100 street sections within the five boroughs of NYC, measured at 5-minute intervals. Each street section is described as a sequence of latitude/longitude points. To construct the graph, we connect two street sections if the geodesic distance between the closest pair of points from them is below a threshold. Specifically, we use the R package imputeTS and choose an imputation algorithm which is based on seasonal decomposition and Kalman smoothing. \subsection{Physics Simulations} \label{ssec:2} In this subsection, we examine our proposed model on simulated physical systems consisting of interacting particles. Following the settings in \citet{nri}, we simulate the trajectories of charged particles and particles connected by springs. In the charged particles model, 10 particles are bounded inside a 2D box through elastic collisions and interact pairwisely via electric forces given by Coulomb's law. The springs model is similar, in which each pair of particles are connected via a spring with a probability 0.5, and the forces are given by Hooke's law. In each simulation, given randomly sampled initial locations, the equations of motion are solved using 10,000 steps of leapfrog integration, and the trajectories are generated by subsampling each 100 steps. We simulate 50K examples for training and 10K examples for validation and test, respectively. \begin{table}[h] \caption{Multi-step prediction error of different models for particle simulations.} \label{particle-table} \input{data/particles/metrics} \centering \end{table} To enable correlated sampling, a possible alternative is a Gaussian Markov random field (GMRF), but it is in general computationally expensive and nontrivial to implement. . These works differ in the way they wire the latent variables and the parameterization for the variational distributions. and rely on GNNs to automatically discover the dynamical coordination of players (ignoring the ball and the defense team) and focus their applications in dynamics modeling here to help infer the state of each object from visual observations This is expected because seq2seq models explicitly optimize the multistep prediction error. We find that using another affine layer to add a skip connection from the mean of base Gaussian distribution to the final GNF output helps the optimization. \section{Experiments} We implement R-SSM using the TensorFlow Probability library \cite{tfd}. The experiments are organized as follows: In Section \ref{subsec:toy}, we sample a toy dataset from a simple stochastic multi-object model and validate that R-SSM can fit it well while AR models and non-relational models may struggle. In Section \ref{subsec:ball}, R-SSM is compared with state-of-the-art sequential LVMs for multi-agent modeling on a basketball gameplay dataset, and the effectiveness of GNF is tested through ablation studies. Finally, in Section \ref{subsec:traffic}, the prediction performance of R-SSM is compared with strong GNN-based seq2seq baselines on a road traffic dataset. Due to the space constraint, the detailed model architecture and hyperparameter settings for each dataset are given in the Appendix. Below, all values reported with error bars are averaged over 3 or 5 runs. \subsection{Synthetic toy dataset} \label{subsec:toy} First we construct a simple toy dataset to illustrate the capability of R-SSM. Each example in this dataset is generated by the following procedure: \begin{gather} \mathcal{G} \sim \text{SBM}(N, K, p_0, p_1) , \quad \mathbf{v}_i \sim \text{Normal}(\V{0}, \M{I}) , \quad z_0^{(i)} \sim \text{Normal}(0, 1) \nonumber \\ \label{eq:toy} \tilde{z}_t^{(i)} = \bm{\eta}^{\top} \mathbf{v}_i + \alpha_1 {\textstyle \sum}_{j \in \mathcal{N}_i}^{}{z_{t-1}^{(j)}} / |\mathcal{N}_i| + \alpha_2 z_{t-1}^{(i)} \\ z_t^{(i)} \sim \text{Normal}\big( \cos( \tilde{z}_t^{(i)} ), \sigma_z^2 \big) , \quad x_t^{(i)} \sim \text{Normal}\big( \tanh( \varepsilon z_t^{(i)} ), \sigma_x^2 \big) \nonumber \end{gather} for $i = 1, \ldots, N$ and $t = 1, \ldots, T$. Here $\text{SBM}$ is short for the symmetric stochastic block model, in which each vertex $i$ belongs to exact one of the $K$ communities, and two vertices $i$ and $j$ are connected with probability $p_0$ if they are in the same community, $p_1$ otherwise. A vertex-specific covariate vector $\mathbf{v}_i \in \mathbb{R}^{d_v}$ is attached to each vertex $i$, and by Equation \eqref{eq:toy}, the state of each vertex $i$ can be affected by its neighbors $\mathcal{N}_i$. Choosing the parameters $d_v = 4$, $N = 36$, $K = 3$, $p_0 = 1/3$, $p_1 = 1/18$, $T = 80$, $\alpha_1 = 5.0$, $\alpha_2 = -1.5$, $\bm{\eta} = [ -1.5, 0.4, 2.0, -0.9 ]^{\top}$, $\sigma_x = \sigma_z = 0.05$, and $\varepsilon = 2.5$, we generate 10K examples for training, validation, and test, respectively. A typical example is visualized in the Appendix. Despite the simple generating process, the resulting dataset is highly challenging for common models to fit. To show this, we compare R-SSM with several baselines, including \begin{enumerate*}[label={(\alph*)}] \item VAR: Fitting a first-order vector autoregression model for each example; \item VRNN: A variational RNN \cite{vrnn} shared by all examples; \item GNN-AR: A variant of the recurrent decoder of NRI \cite{nri}, which is exactly a GNN-based AR model when given the ground-truth graph. \end{enumerate*} VAR and VRNN are given access to the observations $\{ x_{1:T}^{(i)} \}_{i=1}^N$ only, while GNN-AR and R-SSM are additionally given access to the graph structure $(\mathcal{V}, \mathcal{E})$ (but not the vertex covariates). GNF is not used in R-SSM because the true joint transition distribution is factorized over vertices. \begin{wraptable}{r}{0.525\textwidth} \centering \caption{Test log-likelihood and prediction performance comparisons on the synthetic toy dataset.}\label{tbl:toy} \input{data/toy/metrics} \end{wraptable} For each model, we calculate three metrics: \begin{enumerate*}[label={(\arabic*)}] \item LL: Average log-likelihood (or its lower bound) of test examples; \item MSE: Average mean squared one-step prediction error given the first 75 time steps of each test example; \item CP: Average coverage probability of a 90\% one-step prediction interval. \end{enumerate*} For non-analytic models, point predictions and prediction intervals are computed using 1000 Monte Carlo samples. The results are reported in Table \ref{tbl:toy}. The generating process involves latent factors and nonlinearities, so VAR performs poorly as expected. VRNN largely underfits the data and struggles to generalize, which may be caused by the different topologies under the examples. In contrast, GNN-AR and R-SSM generalize well as expected, while R-SSM achieves much higher test log-likelihood and produces good one-step probabilistic predictions. This toy case illustrates the generalization ability of GNNs and suggests the importance of latent variables for capturing the uncertainty in stochastic multi-object systems. We also observed that without $\mathcal{L}_1^{\text{aux}}$ the training dynamics easily get stuck in posterior collapse at the very early stage, and adding $\mathcal{L}_2^{\text{aux}}$ help improve the test likelihood. \begin{table} \centering \caption{ Test log-likelihood and rollout quality comparisons on the basketball gameplay dataset (offensive players only). } \input{data/basketball/metrics} \label{tbl:player} \end{table} \subsection{Basketball gameplay}\label{subsec:ball} In basketball gameplay, the trajectories of players and the ball are highly correlated and demonstrate rich, dynamic interations. Here we compare R-SSM with a state-of-the-art hierarchical sequential LVM for multi-agent trajectories \cite{weak-sup}, in which the per-agent VRNNs are coordinated by a global "macro intent" model. We note it as MI-VRNN. The dataset\footnote{Data Source: STATS, copyright 2019.} includes 107,146 training examples and 13,845 test examples, each of which contains the 2D trajectories of ten players and the ball recorded at 6Hz for 50 time steps. Following their settings, we use the trajectories of offensive team only and preprocess the data in exactly the same way to make the results directly comparable. The complete graph of players is used as the input to R-SSM. Several ablation studies are performed to verify the utility of the proposed ideas. In Table \ref{tbl:ball}, we report test likelihood bounds and the rollout quality evaluated with three heuristic statistics: average speed (feet/step), average distance traveled (feet), and the percentage of out-of-bound (OOB) time steps. The VRNN baseline developed by \citet{weak-sup} is also included for comparison. Note that the VSMC bound $\mathcal{L}_{1000}^{\text{SMC}}$ is a tighter log-likelihood approximation than the ELBO (which is equivalent to $\mathcal{L}_{1}^{\text{SMC}}$). The rollout statistics of R-SSMs are calculated from 150K 50-step rollouts with 10 burn-in steps. Several selected rollouts are visualized in the Appendix. As illustrated in Table \ref{tbl:player}, all R-SSMs outperform the baselines in terms of average test log-likelihood. Again, we observed that adding $\mathcal{L}_1^{\text{aux}}$ is necessary for training R-SSM successfully on this dataset. Training with the proposed auxiliary loss $\mathcal{L}_2^{\text{aux}}$ and adding GNFs do improve the results. R-SSM with 8 GNFs (4 in prior, 4 in proposal) achieves higher likelihood than R-SSM with 4 GNFs, indicating that increasing the expressivity of joint state distributions helps fit the data better. As for the rollout quality, the OOB rate of the rollouts sampled from our model matches the ground-truth significantly better, while the other two statistics are comparable to the MI-VRNN baseline. In Table \ref{tbl:ball}, we also provide preliminary results for the setting that additionally includes the trajectory of the ball. This enables us to compare with the results reported by \citet{graph-vrnn-cvpr} for Graph VRNN (GVRNN). The complete graph of ball and players served as input to R-SSM is annotated with two node types (player or ball) and three edge types (player-to-ball, ball-to-player or player-to-player). R-SSM achieves competitive test likelihood, and adding GNFs helps improve the performance. We point out that several noticeable design choices of GVRNN may help it outperform R-SSM: \begin{enumerate*}[label={(\roman*)},font={\bfseries}] \item GVRNN uses a GNN-based observation model, while R-SSM uses a simple factorized observation model. \item GVRNN encodes $\mathbf{X}_{1:t-1}$ into $\mathbf{H}_t$ and thus enables the prior of $\mathbf{Z}_t$ to depend on past observations, which is not the case in R-SSM. \item GVRNN uses several implementation tricks, e.g., predicting the changes in observations only ($\mathbf{X}_t = \mathbf{X}_{t-1} + {\Delta \mathbf{X}}_t$) and passing raw observations as additional input to GNNs. \end{enumerate*} We would like to investigate the effect of these interesting differences in future work. \begin{table} \parbox{.45\linewidth}{ \centering \caption{ Test log-likelihood comparison on the basketball gameplay dataset (offensive players plus the ball). } \input{data/basketball/ball-metrics} \label{tbl:ball} } \hfill \parbox{.5\linewidth}{ \centering \caption{Forecast MAE comparison on the METR-LA dataset. $h$ is the number of steps predicted into the future. The $\mathbf{X}_{t-h}$ baseline outputs $\mathbf{X}_{t-h}$ to predict $\mathbf{X}_t$.}\label{tbl:traffic-mae} \input{data/traffic/table-mae} \label{tbl:traffic-mae} } \end{table} \subsection{Road traffic}\label{subsec:traffic} Traffic speed forecasting on road networks is an important but challenging task, as the traffic dynamics exhibit complex spatiotemporal interactions. In this subsection, we demonstrate that R-SSM is comparable to the state-of-the-art GNN-based seq2seq baselines on a real-world traffic dataset. The METR-LA dataset \cite{dcrnn} contains 4 months of 1D traffic speed measurements that were recorded via 207 sensors and aggregated into 5 minutes windows. For this dataset, all conditional inputs $\mathcal{G} = (\mathcal{V}, \mathcal{E}, \mathbf{V}, {\tens{E}})$ and $\mathbf{U}_{1:T}$ are provided to R-SSM, in which $\mathcal{E}$ is constructed by connecting two sensors if their road network distance is below a threshold, $\mathbf{V}$ stores the geographic positions and learnable embeddings of sensors, ${\tens{E}}$ stores the road network distances of edges, and $\mathbf{U}_{1:T}$ provides the time information (hour-of-day and day-of-week). We impute the missing values for training and exclude them from evaluation. GNF is not used because of GPU memory limitation. Following the settings in \citet{dcrnn}, we train our model on small time windows spanning 2 hours and use a 7:1:2 split for training, validation, and test. The comparison of mean absolute forecast errors (MAE) is reported in Table \ref{tbl:traffic-mae}. The three forecast horizons correspond to 15, 30, and 60 minutes. We give point predictions by taking the element-wise median of 2K Monte Carlo forecasts. Compared with DCRNN \cite{dcrnn} and GaAN \cite{gaan}, R-SSM delivers comparable short-term forecasts but slightly worse long-term forecasts. We argue that the results are admissible because: \begin{enumerate*}[label={(\roman*)},font={\bfseries}] \item By using MAE loss and scheduled sampling, the DCRNN and GaAN baselines are trained on the multi-step objective that they are later evaluated on, making them hard to beat. \item Some stochastic systems are inherently unpredictable beyond a few steps due to the process noise, e.g., the toy model in Section \ref{subsec:toy}. In such case, multi-step MAE may not be a reasonable metric, and probabistic forecasts may be prefered. The average coverage probabilities (CP) of 90\% prediction intervals reported in Table \ref{tbl:traffic-mae} indicate that R-SSM provides good uncertainty estimates. \item Improving the multi-step prediction ability of deep SSMs is still an open problem with a few recent attempts \cite{zf-rl,rssm}. We would like to explore it in future work. \end{enumerate*} \section{Introduction} Many real-world dynamical systems can be decomposed into smaller interacting subsystems if we take a fine-grained view. For example, the trajectories of coupled particles are co-determined by per-particle physical properties (e.g., mass and velocity) and their physical interactions (e.g., gravity); traffic flow can be viewed as the coevolution of a large number of vehicle dynamics. Models that are able to better capture the complex behavior of such multi-object systems are of wide interest to various communities, e.g., physics, ecology, biology, geoscience, and finance. State-space models (SSMs) are a wide class of sequential latent variable models (LVMs) that serve as workhorses for the analysis of dynamical systems and sequence data. Although SSMs are traditionally designed under the guidance of domain-specific knowledge or tractability consideration, recently introduced deep SSMs \cite{deep-lvm} use neural networks (NNs) to parameterize flexible state transitions and emissions, achieving much higher expressivity. To develop deep SSMs for multi-object systems, graph neural networks (GNNs) emerge to be a promising choice, as they have been shown to be fundamental NN building blocks that can impose \emph{relational inductive bias} explicitly and model complex interactions effectively \cite{gn}. Recent works that advocate GNNs for modeling multi-object dynamics mostly make use of GNNs in an autoregressive (AR) fashion. AR models based on recurrent (G)NNs can be viewed as special instantiations of SSMs in which the state transitions are restricted to being deterministic \cite[Section 4.2]{deep-lvm}. Despite their simplicity, it has been pointed out that their modeling capability is bottlenecked by the deterministic state transitions \cite{vrnn,srnn} and the oversimplified observation distributions \cite{softmax}. In this study, we make the following contributions: \begin{enumerate*}[label={(\roman*)},font={\bfseries}] \item We propose the relational state-space model (R-SSM), a novel hierarchical deep SSM that simulates the stochastic state transitions of interacting objects with GNNs, extending GNN-based dynamics modeling to challenging stochastic multi-object systems. \item We suggest using the graph normalizing flow (GNF) to construct expressive joint state distributions for R-SSM, further enhancing its ability to capture the joint evolutions of correlated stochastic subsystems. \item We develop structured posterior approximation to learn R-SSM using variational inference and introduce two auxiliary training objectives to facilitate the learning. \end{enumerate*} Our experiments on synthetic and real-world time series datasets show that R-SSM achieves competitive test likelihood and good prediction performance in comparison to GNN-based AR models and other sequential LVMs. The remainder of this paper is organized as follows: Section 2 briefly reviews neccesary preliminaries. Section 3 introduces R-SSM formally and presents the methods to learn R-SSM from observations. Related work is summarized in Section 4 and experimental evaluation is presented in Section 5. We conclude the paper in Section 6. \section{Relational State-Space Model} Suppose there is a dynamical system that consists of multiple interacting objects, and observing this system at a specific time is accomplished by acquiring measurements from every individual object simultaneously. We further assume these objects are homogeneous, i.e., they share the same measurement model, and leave systems whose constituents are nonhomogeneous for future work. To generatively model a time-ordered series of observations collected from this system, the straightforward approach that builds an individual SSM for each object is usually unsatisfactory, as it simply assumes the state of each object evolves independently and ignores the interactions between objects. To break such an independence assumption, our main idea is to let multiple individual SSMs interact through GNNs, which are expected to capture the joint state transitions of correlated objects well. \begin{figure} \label{fig:gen-model} \centering \begin{subfigure}[b]{0.3\textwidth} \includestandalone[width=\textwidth]{img/generative-model} \caption{Generative model.} \label{fig:gen-model} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \includestandalone[width=\textwidth]{img/generative-model-collapsed} \caption{Collapsed generative model.} \label{fig:gen-model-collapsed} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\textwidth} \includestandalone[width=\textwidth]{img/proposal} \caption{Inference model.} \label{fig:proposal} \end{subfigure} \caption{Graphical structures of R-SSM. Diamonds represent deterministic states and circles represent random variables. To be concise, the dependencies on the graph $\mathcal{G}$ and exogenous inputs $\mathbf{U}_{1:T}$ are not shown. (b) is the result of collapsing all deterministic states in (a) and writing $\mathcal{Z}_t = (\mathbf{z}_t^g, \mathbf{Z}_t)$. In (c), solid lines represent the computation shared with the generative model and dashed lines represent additional computation for inference. } \end{figure} \subsection{Generative model} Given the observations for a multi-object dynamical system, our model further assumes its interaction structure is known as prior knowledge. The interaction structure is provided as a directed graph, in which each object corresponds to a vertex, and a directed edge indicates that the state of its head is likely to be affected by its tail. In situations where such graph structure is not available, a complete graph can be specified. However, to model dynamical systems comprising a large number of objects, it is often beneficial to explicitly specify sparse graph structures, because they impose stronger relational inductive bias and help save the computational cost. A relational state-space model assumes a set of correlated dynamical subsystems evolve jointly under the coordination of graph neural networks. Formally, given a graph $\mathcal{G} = (\mathcal{V}, \mathcal{E}, \mathbf{V}, {\tens{E}})$, in which an edge $(i, j) \in \mathcal{E}$ indicates that the state of vertex $j$ may be affected by vertex $i$. Let $\mathbf{u}_{t}^{(i)} \in \mathbb{R}^{d_u}$ and $\mathbf{x}_{t}^{(i)} \in \mathbb{R}^{d_x}$ be the input and observation for vertex $i$ at time step $t$, respectively. For $T$ steps, we introduce a set of unobserved random variables $\{\mathbf{z}_{1:T}^{(i)}\}_{i=1}^N$, in which $\mathbf{z}_{t}^{(i)} \in \mathbb{R}^{d_z}$ represents the latent state of vertex $i$ at time step $t$. Furthermore, we introduce a global latent variable $\mathbf{z}_t^g \in \mathbb{R}^{d_g}$ for each time step to represent the global state shared by all vertices. Conditioning on the graph and exogenous inputs, an R-SSM factorizes the joint density of observations and latent states as follows: \begin{multline} \label{eq:r-ssm-joint-density} p_{\theta} \left( \big\{ \mathbf{x}_{1:T}^{(i)} \big\}_{i=1}^N, \big\{ \mathbf{z}_{1:T}^{(i)} \big\}_{i=1}^N, \mathbf{z}_{1:T}^g \middle| \mathcal{G}, \big\{ \mathbf{u}_{1:T}^{(i)} \big\}_{i=1}^N \right) = \\ \prod_{t=1}^{T}{ f_{\theta}\left( \big\{ \mathbf{z}_t^{(i)} \big\}_{i=1}^N, \mathbf{z}_t^g \middle| \big\{ \mathbf{z}_{<t}^{(i)} \big\}_{i=1}^N, \mathbf{z}_{<t}^g, \mathcal{G}, \big\{ \mathbf{u}_{\leq t}^{(i)} \big\}_{i=1}^N \right) } \\ \prod_{t=1}^{T}{\prod_{i=1}^{N}{ g_{\theta} \left( \mathbf{x}_t^{(i)} \middle| \mathbf{z}_t^{(i)}, \mathbf{z}_{\leq t}^g, \big\{ \mathbf{z}_{<t}^{(i)} \big\}_{i=1}^N, \mathcal{G}, \big\{ \mathbf{u}_{\leq t}^{(i)} \big\}_{i=1}^N \right) }} \end{multline} For notational simplicity, we switch to the matrix notation $\mathbf{Z}_t = \big[\mathbf{z}_t^{(1)}, \mathbf{z}_t^{(2)}, \ldots, \mathbf{z}_t^{(N)} \big]^{\top}$ from now on. The joint transition density $f_{\theta}$ is further factorized as a product of global transition density $f_{\theta}^g$ and local transition density $f_{\theta}^{\star}$, i.e., \( f_{\theta}\left(\mathbf{Z}_t, \mathbf{z}_t^g \middle| \ldots \right) = f_{\theta}^g\left(\mathbf{z}_t^g \middle| \ldots \right) f_{\theta}^{\star}\left(\mathbf{Z}_t \middle| \mathbf{z}_t^g, \ldots \right) \) . To instantiate these conditional distributions, a GNN accompanied by RNN cells is adopted to recurrently compress the past dependencies at each time step into fixed-size context vectors. Specifically, the observations are assumed to be generated from following process: \begin{align*} \tilde{\mathbf{h}}_t^{(i)} = \text{RNN}_{\theta}^v\big( \mathbf{h}_{t-1}^{(i)}, \big[ \mathbf{z}_{t-1}^{(i)}, \mathbf{u}_t^{(i)} \big] \big) , \quad & \tilde{\mathbf{h}}_t^g = \text{READOUT}_{\theta}\big( \mathcal{G}, \tilde{\mathbf{H}}_t \big) \\ \mathbf{h}_t^g = \text{RNN}_{\theta}^g\big( \mathbf{h}_{t-1}^g, \big[ \mathbf{z}_{t-1}^g, \tilde{\mathbf{h}}_t^g \big] \big) , \quad & \mathbf{z}_t^g \sim f_{\theta}^g\big( \cdot \big| \mathbf{h}_t^g \big) \\ \mathbf{H}_t = \text{GNN}_{\theta}\big( \mathcal{G}, \mathbf{z}_t^g, \tilde{\mathbf{H}}_t \big) , \quad & \mathbf{Z}_t \sim f_{\theta}^{\star} \big( \cdot \big| \mathbf{H}_t \big) \\ & \mathbf{x}_t^{(i)} \sim g_{\theta}\big( \cdot \big| \mathbf{z}_t^{(i)}, \mathbf{h}_t^{(i)}, \mathbf{z}_t^g, \mathbf{h}_t^g \big) \end{align*} for $i = 1, \ldots, N$ and $t = 1, \ldots, T$, where $\mathbf{h}_0^{(i)} = \mathbf{h}_0^{\ast}$ and $\mathbf{z}_0^{(i)} = \mathbf{z}_0^{\ast}$. Here $\mathbf{h}_0^g$, $\mathbf{z}_0^g$, $\mathbf{h}_0^{\ast}$ and $\mathbf{z}_0^{\ast}$ are learnable initial states. The READOUT function aggregates the context vectors of all vertices into a global context vector in a permutation-invariant manner. The global transition density $f_{\theta}^g$ is specified to be a diagonal Gaussian distribution whose mean and variance are parameterized by the output of a multilayer perceptron (MLP), and the local transition density $f_{\theta}^{\star}$ will be discussed later. The local observation distribution $g_{\theta}$ can be freely selected in line with the data, and in our experiments it is either a Gaussian distribution or a mixture of logistic distributions parameterized by MLPs. The graphical structure of two consecutive steps of the generating process is illustrated in Figure \ref{fig:gen-model}. An intuitive way to think about this generative model is to note that the $N + 1$ latent state processes interact through the GNN, which enables the new state of a vertex to depend on not only its own state trajectory but also the state trajectories of other vertices and the entire graph. \subsection{Learning and inference} As illustrated in Figure \ref{fig:gen-model-collapsed}, writing $\mathcal{Z}_t = (\mathbf{z}_t^g, \mathbf{Z}_t)$ and suppressing the dependencies on the graph $\mathcal{G}$ and exogenous inputs $\mathbf{U}_{1:T}$, an R-SSM can be interpreted as an ordinary SSM in which the entire graph evolves as a whole, i.e., the joint density of latent states and observations factors as: $ p(\mathbf{X}_{1:T}, \mathcal{Z}_{1:T}) = \prod_{t=1}^{T}{p_{\theta}(\mathcal{Z}_t|\mathcal{Z}_{<t}) p_{\theta}(\mathbf{X}_t|\mathcal{Z}_t)} $. Given observations $\mathbf{X}_{1:T}$, we are interested in learning unknown parameters $\theta$ and inferring unobserved states $\mathcal{Z}_{1:T}$. For the learning task we wish to maximize the marginal likelihood $ p_{\theta}(\mathbf{X}_{1:T}) = \int p_{\theta}(\mathbf{X}_{1:T}, \mathcal{Z}_{1:T}) \: \mathrm{d}\mathcal{Z}_{1:T} $, but in our case the integral is intractable. We adopt a recently developed variational inference (VI) approach called variational sequential Monte Carlo (VSMC) \cite{vsmc-1,vsmc-2,vsmc-3}, which maximizes a variational lower bound on the log marginal likelihood instead and learns the proposal distributions for the inference task simultaneously. Given a sequence of proposal distributions $\{q_{\phi}\left(\mathcal{Z}_t \middle| \mathcal{Z}_{<t}, \mathbf{X}_{\leq t} \right)\}_{t=1}^T$ parameterized by $\phi$, running the sequential Monte Carlo (SMC) algorithm with $K$ particles yields an unbiased marginal likelihood estimator $ \hat{p}_{\theta,\phi,K}(\mathbf{X}_{1:T}) = \prod_{t=1}^{T}{\big[ \nicefrac{1}{K} \sum_{k=1}^{K}{w_t^k} \big]} $, where $w_t^k$ is the unnormalized importance weight of particle $k$ at time $t$. The variational lower bound is obtained by applying the Jensen's inequality: \begin{equation} \mathcal{L}_K^{\text{SMC}}(\theta, \phi) \coloneqq \mathbb{E} \left[ \log \hat{p}_{\theta,\phi,K}(\mathbf{X}_{1:T}) \right ] \leq \log \mathbb{E} \left[ \hat{p}_{\theta,\phi,K}(\mathbf{X}_{1:T}) \right ] = \log p_{\theta}(\mathbf{X}_{1:T}) \end{equation} Assuming the proposal distributions are reparameterizable \cite{vae}, we use the biased gradient estimator $ \nabla \mathcal{L}_K^{\text{SMC}}(\theta, \phi) \approx \mathbb{E}[\nabla \log \hat{p}_{\theta, \phi, K}(\mathbf{X}_{1:T})] $ to maximize $\mathcal{L}_K^{\text{SMC}}$. \paragraph{Proposal design.} We make the proposal for $\mathcal{Z}_t$ depend on the information up to time $t$ and share some parameters with the generative model. We also choose to factorize \( q_{\phi}\left(\mathcal{Z}_t \middle| \ldots \right) = r_{\phi}^g \left( \mathbf{z}^g_t \middle| \ldots \right) r_{\phi}^{\star} \left( \mathbf{Z}_t \middle| \mathbf{z}^g_t, \ldots \right) \) . The proposal distributions for all time steps are structured as follows: \begin{align*} \tilde{\mathbf{b}}_t^{(i)} = \text{RNN}_{\phi}\big( \mathbf{b}_{t-1}^{(i)}, \big[ \mathbf{x}_t^{(i)}, \mathbf{u}_t^{(i)} \big] \big) , \quad & \tilde{\mathbf{b}}_t^g = \text{READOUT}_{\phi, 1}\big(\mathcal{G}, \tilde{\mathbf{B}}_t \big) \\ \mathbf{B}_t = \text{GNN}_{\phi}\big( \mathcal{G}, \tilde{\mathbf{b}}_t^g, \tilde{\mathbf{B}}_t \big) , \quad & \mathbf{b}_t^g = \text{READOUT}_{\phi, 2}\big(\mathcal{G}, \mathbf{B}_t \big) \\ \mathbf{z}_t^g \sim r_{\phi}^g\big( \cdot \big| \mathbf{h}_t^g, \mathbf{b}_t^g \big) , \quad & \mathbf{Z}_t \sim r_{\phi}^{\star} \big( \cdot \big| \mathbf{H}_t, \mathbf{B}_t \big) \end{align*} for $i = 1, \ldots, N$ and $t = 1, \ldots, T$, where $\mathbf{h}_t^g$ and $\mathbf{H}_{1:T}$ are computed using the relevant parts of the generative model. $r_{\phi}^g$ is specified to be a diagonal Gaussian parameterized by an MLP, and $r_{\phi}^{\star}$ will be discussed soon. Here $\mathbf{B}_t$ can be interpreted as a \emph{belief state} \cite{td-vae}, which summarizes past observations $\mathbf{X}_{\leq t}$ (and inputs $\mathbf{U}_{\leq t}$) deterministically. The graphical structure of this proposal design is shown in Figure \ref{fig:proposal}, and the detailed VSMC implementation using this proposal is given in Appendix \ref{subsec:app-train}. \subsection{Graph Normalizing Flow} The local transition density $f_{\theta}^{\star} \left( \mathbf{Z}_t \big| \ldots \right)$ and the local proposal density $r_{\phi}^{\star} \left( \mathbf{Z}_t \middle| \ldots \right)$ may be parameterized in several ways. One simple and efficient starting point is (block-)diagonal Gaussian distribution: $f_{\theta}^{\star} \left( \mathbf{Z}_t \big| \ldots \right) = \prod_{i=1}^{N}\mathcal{N}(\mathbf{z}_t^{(i)} | \ldots )$, which assumes that the object states are conditionally independent, i.e., the joint state distribution is completely factorized over objects. We believe that such an independence assumption is an oversimplification for situations where the joint state evolution is multimodal and highly correlated. One possible way to introduce inter-object dependencies is modeling joint state distributions as Markov random fields (MRFs) \cite{nested-smc}, but this will significantly complicate the learning. Here we introduce the Graph Normalizing Flow (GNF) \footnote{GNF has been independently developed by \citet{gnf} for different purpose.}, which adapts Glow \cite{glow} to graph settings and enables us to build expressive joint distributions for correlated random variables indexed by graph nodes. As described earlier, the key ingredient for a flow is a series invertible mappings that are iteratively applied to the samples of a base distribution. Now we are interested in the case where the samples are vertex states $\mathbf{Z}_t$, and thus the invertible mappings should be further constrained to be \emph{equivariant} under vertex relabeling. This rules out popular autoregressive flows, e.g., IAF \cite{iaf} and MAF \cite{maf}. Our GNF is built upon the \emph{coupling} layer introduced in \citet{real-nvp}, which provides a flexible framework to construct efficient invertible mappings. A GNF coupling layer splits the input $\mathbf{Z} \in \mathbb{R}^{N \times D}$ into two parts, $\mathbf{Z}_a \in \mathbb{R}^{N \times d}$ and $\mathbf{Z}_b \in \mathbb{R}^{N \times (D - d)}$. The output $\mathbf{Z}' \in \mathbb{R}^{N \times D}$ is formed as: \[ \mathbf{Z}'_a = \mathbf{Z}_a \; , \quad \mathbf{Z}'_b = \mathbf{Z}_b \odot \exp\big(s(\mathbf{Z}_a)\big) + t(\mathbf{Z}_a) \; , \quad \mathbf{Z}' = [\mathbf{Z}'_a, \mathbf{Z}'_b] \; , \] where $\odot$ denotes the element-wise product, and the functions $s(\cdot)$ and $t(\cdot)$ are specified to be GNNs to enforce the equivariance property. A GNF combines a coupling layer with a trainable element-wise affine layer and an invertible $1 \times 1$ convolution layer \cite{emerging}, organizing them as: \( \text{Input} \rightarrow \text{Affine} \rightarrow \text{Coupling} \rightarrow \text{Conv}_{1\times1} \rightarrow \text{Output} \). A visual illustration of this architecture is provided in Appendix \ref{subsec:app-gnf}. In order to obtain more expressive prior and variational posterior approximation, the local transition density and local proposal density can be constructed by stacking multiple GNFs on top of diagonal Gaussian distributions parameterized by MLPs. With the message passing inside the coupling layers, GNFs can transform independent noise into correlated noise and thus increase model expressivity. The $1 \times 1$ convolution layers free us from manually permuting the dimensions, and the element-wise affine layers enable us to tune their initial weights to stablize training. \subsection{Auxiliary contrastive prediction tasks} In our initial experiments, we found that learning R-SSM suffered from the \emph{posterior collpase} phenomenon, which is a well known problem in the training of variational autoencoders (VAEs). It means that the variational posterior approximation $q_{\phi}(\mathcal{Z}_t|\mathcal{Z}_{<t}, \mathbf{X}_{\leq t})$ degenerate into the prior $f_{\theta}(\mathcal{Z}_t|\mathcal{Z}_{<t})$ in the early stage of optimization, making the training dynamics get stuck in undesirable local optima. Besides, we also encountered a more subtle problem inherent in likelihood-based training of deep sequential models. That is, for relatively smooth observations, the learned model tended to only capture short-term local correlations but not the interaction effects and long-term transition dynamics. Motivated by recent advances in unsupervised representation learning based on mutual information maximization, in particular the Contrastive Predictive Coding (CPC) approach \cite{cpc}, we alleviate these problems by forcing the latent states to perform two auxiliary contrastive prediction tasks. At each time step $t$, the future observations of each vertex $i$ are summarized into a vector using a backward RNN: $\mathbf{c}_t^{(i)} = \text{RNN}_{\psi}(\mathbf{x}_{>t}^{(i)} )$. Then we define two auxiliary CPC objectives: \[ \mathcal{L}_1^{\text{aux}} = \mathbb{E} \left[ \sum_{t=1}^{T-1} \sum_{i=1}^N \log \frac{ \lambda_{\psi, 1}( \hat{\mathbf{z}}_t^{(i)}, \mathbf{c}_t^{(i)} ) }{ \sum_{ \mathbf{c} \in \Omega_{t,i} }{ \lambda_{\psi, 1}( \hat{\mathbf{z}}_t^{(i)}, \mathbf{c} ) } } \right] , \; \mathcal{L}_2^{\text{aux}} = \mathbb{E} \left[ \sum_{t=1}^{T-1} \sum_{i=1}^N \log \frac{ \lambda_{\psi, 2}( \hat{\mathbf{h}}_t^{(i)}, \mathbf{c}_t^{(i)} ) }{ \sum_{ \mathbf{c} \in \Omega_{t,i} }{ \lambda_{\psi, 2}( \hat{\mathbf{h}}_t^{(i)}, \mathbf{c} ) } } \right] \] where $\hat{\mathbf{z}}_t^{(i)} = [\mathbf{z}_t^g, \mathbf{z}_t^{(i)}]$, $\hat{\mathbf{h}}_t^{(i)} = \text{MLP}_{\psi}( \sum_{ j \neq i \, \wedge \, j \in \mathcal{N}_i^{-} }{ \mathbf{h}_t^{(j)} } )$, and $\Omega_{t,i}$ is a set that contains $\mathbf{c}_t^{(i)}$ and some negative samples. The expectation is over negative samples and the latent states sampled from the filtering distributions. The positive score functions $\lambda_{\psi, 1}$ and $\lambda_{\psi, 2}$ are specified to be simple log-bilinear models. Intuitively, $\mathcal{L}_1^{\text{aux}}$ encourages the latent states to encode useful information that helps distinguish the future summaries from negative samples. $\mathcal{L}_2^{\text{aux}}$ encourages the deterministic states to reflect the interaction effects, as it contrastingly predicts the future summary of vertex $i$ based on the states of $i$'s neighbors only. The negative samples are selected from the future summaries of other vertices within the minibatch. The final objective to maximize is $\mathcal{L} = \mathcal{L}_K^{\text{SMC}} + \beta_1 \mathcal{L}_1^{\text{aux}} + \beta_2 \mathcal{L}_2^{\text{aux}}$, in which $\beta_1 \geq 0$ and $\beta_2 \geq 0$ are tunable hyperparameters. The procedure to estimate this objective is described in Appendix \ref{subsec:app-train}. \section{Related Work} \paragraph{GNN-based dynamics modeling.} GNNs \cite{gnn-09,gcn-15,ggnn,gcn-16,mpnn,graph-sage,gat,gnn-power,eq-gn} provide a promising framework to learn on graph-structured data and impose relational inductive bias in learning models. We refer the reader to \citet{gn} for a recent review. GNNs (or neural message passing modules) are the core components of recently developed neural physics simulators \cite{in,vin,obj-1,obj-2,gn-icml,lifeifei-1,fluid} and spatiotemporal or multi-agent dynamics models \cite{social-lstm,vain,dcrnn,gaan,r-forward,chen-aaai2020}. In these works, GNNs usually act autoregressively or be integrated into the sequence-to-sequence (seq2seq) framework \cite{seq2seq}. Besides, recently they have been combined with generative adversarial networks \cite{gan} and normalizing flows for multi-agent forecasting \cite{social-gan,social-bigat,precog}. R-SSM differs from all these works by introducing structured latent variables to represent the uncertainty on state transition and estimation. \paragraph{GNNs in sequential LVMs.} A few recent works have combined GNNs with a sequential latent variable model, including R-NEM \cite{r-nem}, NRI \cite{nri}, SQAIR \cite{seq-air}, VGRNN \cite{vgrnn}, MFP \cite{mfp}, and Graph VRNN \cite{graph-vrnn,graph-vrnn-cvpr}. The latent variables in R-NEM and NRI are discrete and represent membership relations and types of edges, respectively. In contrast, the latent variables in our model are continuous and represent the states of objects. SQAIR is also a deep SSM for multi-object dynamics, but the GNN is only used in its inference network. VGRNN is focused on modeling the topological evolution of dynamical graphs. MFP employs a conditional VAE architecture, in which the per-agent discrete latent variables are shared by all time steps. The work most relevant to ours is Graph VRNN, in which the hidden states of per-agent VRNNs interact through GNNs. Our work mainly differs from it by introducing a global latent state process to make the model hierarchical and exploring the use of normalizing flows as well as the auxiliary contrastive objectives. More subtle differences are discussed in Section \ref{subsec:ball}. \paragraph{Deep LVMs for sequential data.} There has been growing interest in developing latent variable models for sequential data with neural networks as their building blocks, among which the works most relevant to ours are stochastic RNNs and deep SSMs. Many works have proposed incorporating stochastic latent variables into vanilla RNNs to equip them with the ability to express more complex data distributions \cite{storn,vrnn,srnn,zf,zf-rl} or, from another perspective, developing deep SSMs by parameterizing flexible transition and emission distributions using neural networks \cite{dmm,kvae,s-ssm,ss-lstm,rssm}. Approximate inference and parameter estimation methods for nonlinear SSMs have been extensively studied in the literature \cite{smc-tutorial,pmcmc,particle,nasmc,vbf,avf,td-vae,vb-smc}. We choose VSMC \cite{vsmc-1,vsmc-2,vsmc-3} as it combines the powers of VI and SMC. The posterior collapse problem is commonly addressed by KL annealing, which does not work with VSMC. The idea of using auxiliary costs to train deep SSMs has been explored in Z-forcing \cite{zf,zf-rl}, which predicts the future summaries directly rather than contrastingly. As a result, the backward RNN in Z-forcing may degenerate easily. \subsection{State Space Models} **S**tate **S**pace **M**odels are a class of latent variable models designed for modeling dynamical systems. SSMs assume that at each time step `t`, the dynamical system is in some state `z[t]`. Moreover, the state `z[t]` is _**latent**_, means that we cannot directly observe it. Instead, we can only observe some noisy measurements `x[t]` of the latent state: `x[t] ~ g(•|z[t]) <=> x[t] = r(z[t], u[t])`, where `r` is the observation function and `u[t]` is random noise. We call `g` the observation probability density function. In addition, the latent state `z[t]` will _stochastically_ move to a new state `z[t+1]` through a transition probability density function `f`: `z[t+1] ~ f(•|z[t]) <=> z[t+1] = s(z[t], v[t])`, where `s` is the transition function and `v[t]` is random noise. The whole generating process is: starting from some initial latent state `z[1]`, we observe `x[1]`; then the dynamical system move to new latent state `z[2]`, and we observe `x[2]`; and so on. This process can be expressed as the factorized form of joint probability density: `p(x[1:T], z[1:T]) = f(z[1])g(x[1]|z[1]) \product_t_from_2_to_T f(z[t]|z[t-1])g(x[t]|z[t])`. [Figure 2](#fig-2) shows the general graphical model of SSM. SSMs model the uncertainty in both observations and transitions, making them generally more powerful than autoregressive models. In practice, the observation and tansition functions can be implemented as neural networks, to make the model flexible enough. We thus choose SSM as our basic time series model, and, as introduced in next subsection, enhance its capabilities by letting it cooperate with GNN. \subsection{Proposal Models} Suppose we have built a SSM for modeling the obvervation time series of a single vertex, and its parameters are shared across all vertices `{v_i: i = 1...N}`. This is the option [_(2)_](#opt-2) in the [background](#background) section. As we have argued, the problem with this method is that it just assumes the dynamical systems of vertices are evolving independently: `p({z_i[t+1]: i = 1...N}|{z_i[t]: i = 1...N}) = f(z_1[t+1]|z_1[t])...f(z_N[t+1]|z_N[t])`. This simplified assumption is not true in our cases, because the current state of one vertex may affect not only the future state of itself, but also the future state of its neighbors. As mentioned previously, our main idea is to introduce GNN for modeling the updating process of multiple correlated latent states. Now let us move to the option [_(3)_](#opt-3) and build a single SSM for **all** vertices. Specifically, let `Z[t] = {z_i[t]: i = 1...N}` and `X[t] = {x_i[t]: i = 1...N}`. Note that this is not the concatenating vector approach, because here `Z[t]` and `X[t]` are ordered sets rather than concatenated vectors. The factorized joint density of this SSM is: `p(X[1:T], Z[1:T]) = f(Z[1])g(X[1]|Z[1]) \product_t_from_2_to_T f(Z[t]|Z[t-1])g(X[t]|Z[t])`. Now the remaining problem is how to implement the transition density `f` and observation density `g`. Here we build the transition density with GNNs and leave the observation density simple. More specifically, **multiple layers of GNN** are used for modeling the joint state transitions of all vertices: `Z[t+1] ~ f(•|Z[t]) <=> Z[t+1] = s(GNN_ML(G, Z[t]), V[t])`, where `s` is some custom function and `V[t]` are random noise. Then given the latent state `z_i[t]` of some vertex `v_i` at time step `t`, the observation `x_i[t]` only depends on `z_i[t]`: `x_i[t] ~ g(•|z_i[t]) <=> x_i[t] = r(z_i[t], u_i[t])`, where `r` is the per-vertex observation function and `u_i[t]` is random noise. We call this model **GNN-SSM**, and its graphical model is shown in [Figure 3](#fig-3). By incorporating GNNs in our generative model, we get efficiencies in number of model parameters, amount of training data, and running time, thus achieve the desired **scalability** and **flexibility**. One question immediately comming along is how to learn the parameters of this model. Latent variable models are generally hard to learn because of the existence of latent random variables. Fortunately, recent advances of **variational inference** methods (e.g., variational autoencoders) make scalable learning of some latent variable models possible. We have developed two methods based on variational inference and more recent **variational sequential Monte Carlo** respectively to learn our proposed model. Currently we are working on experiment design and it is expected that our model will be competitive with state-of-the-arts. \[ \mathbf{z}_0 \sim \mu_{\theta}(\cdot) \] \[ \left. \mathbf{z}_t \middle| \mathbf{z}_{1:t-1} \right. \sim f_{\theta}\left(\cdot \middle| \mathbf{h}_t\right), \mathbf{h}_t = \text{LSTM}_{\theta}(\mathbf{h}_{t-1}, \mathbf{z}_{t-1}) \] \[ \left. \mathbf{x}_t \middle| \mathbf{z}_t \right. \sim g_{\theta}\left(\cdot \middle| \mathbf{z}_t\right) \] illustrated \mathcal{N} \left( \cdot \middle| \bm{\mu}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}), \bm{\Sigma}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}) \right) $ f_{\theta} \left( \cdot \middle| \V{c}_t^{(i)} \right) = \mathcal{N} \left( \cdot \middle| \bm{\mu}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}), \bm{\Sigma}_{\theta}^{\mathbf{z}}(\V{c}_t^{(i)}) \right) $ Importance Weight \[ w_t^k = \frac{ p_{\theta}\left( \mathbf{X}_t \middle| \mathbf{Z}_t^k \right) p_{\theta}\left( \mathbf{Z}_t^k \middle| \mathbf{Z}_{<t}^{A_t^k} \right) }{ q_{\phi}\left( \mathbf{Z}_t^k \middle| \mathbf{Z}_{<t}^{A_t^k}, \mathbf{X}_{1:T} \right) } \] The unbiasedness implies $ \mathbb{E} \left[ \hat{p}_{\theta,\phi, K}(\mathbf{X}_{1:T}) \right] = p_{\theta}(\mathbf{X}_{1:T}) $ , softmax $ \exp(c_{j \to i}) / \sum_{p \in \mathcal{N}^{-}_i}{\exp(c_{p \to i})} $ $\lambda = \{ \V{W}_Q, \V{W}_K, \V{W}_V, \V{W}_S, \V{W}_R, \V{W}_M \}$ \[ \V{Q}=\mathbf{H} \V{W}_Q\,,\quad \V{K}=\mathbf{H} \V{W}_K\,,\quad \V{V}=\mathbf{H} \V{W}_V\,,\quad \V{S}=\mathbf{H} \V{W}_S\,,\quad \V{R}=\mathbf{H} \V{W}_R \] \[ \mathbf{h}_t^{(i)} = \text{LSTM}_{\theta}\left( \mathbf{h}_{t-1}^{(i)}, \mathbf{z}_{t-1}^{(i)} \right) \] \[ \V{b}_t^{(i)} = \text{LSTM}_{\phi}\left( \V{b}_{t+1}^{(i)}, \mathbf{x}_t^{(i)} \right) \] \[ \big\{ \tilde{\V{b}}_t^{(i)} \big\}_{i=1}^n = \text{GNN}_{\phi}\left( \mathcal{G}', \big\{ \V{b}_t^{(i)} \big\}_{i=1}^n \right) \] \[ \big\{ \tilde{\mathbf{h}}_t^{(i)} \big\}_{i=1}^n = \text{GNN}_{\phi}\left( \mathcal{G}, \big\{ \mathbf{h}_t^{(i)} \big\}_{i=1}^n \right) \] \[ \tilde{\mathbf{z}}_t^{(i)} = \text{MLP}\left([\tilde{\mathbf{h}}_t^{(i)}, \tilde{\V{b}}_t^{(i)}]\right) \] \[ \left. \mathbf{z}_t^{(i)} \middle| \big\{ \mathbf{z}_{1:t-1}^{(i)} \big\}_{i=1}^n \big\{ \mathbf{z}_{1:t-1}^{(i)} \big\}_{i=1}^n \right. \sim \mathcal{N} \left( \cdot \middle| \text{MLP}_{\phi}^{\V{\mu}_{\mathbf{z}}, \V{\sigma}^2_{\mathbf{z}}} \big( \tilde{\mathbf{z}}_t^{(i)} \big) \right) \] [hvae] has proposed to augment the variational autoencoder (VAE) by using target-informed inhomogeneous Hamiltonian dynamics to deterministically transform the the samples sampled from variational posterior approximation, resulting in Hamiltonian VAE (HVAE). \sum_{t=1}^T{ \log \frac{ p_{\theta}\left( \mathbf{X}_t \middle| \mathbf{Z}_t \right) p_{\theta}\left( \mathbf{Z}_t \middle| \mathbf{Z}_{<t} \right) }{ q'_{\phi}\left( \mathbf{Z}_t \middle| \mathbf{Z}_{<t}, \mathbf{X}_{\leq t} \right) } } Although simple HMM and LDS are widely used, recent work either incorperate Gaussian process and neural networks into SSMs to capture complex nonlinear transitions and/or measurements, or inject latent random variables into vanilla recurrent neural networks (RNNs) to enhance their modeling capability while in effect making RNNs become SSMs up to additional inputs. From this perspective, vanilla RNNs are also SSMs whose state transitions are deterministic
\section{Introduction} \label{sec01} \setcounter{equation}{0} The magnetic moment of an electron is related to its angular momentum by the $g$-factor. The magnetic moment of a free electron is associated with its spin angular moment only and the magnitude of the electron $g$-factor (or more precisely the electron spin $g$-factor) is $\approx 2.002\,319$ \cite{Odom2007}. In atoms, both orbital angular momentum and spin angular momentum of electron contribute to the magnetic moment of an atomic electron and the spin $g$-factor has to be replaced by the Land\'{e} $g$-factor. Furthermore, in crystalline solids, the Land\'{e} $g$-factor (or in what follows simply $g$-factor) may be, in principle, site dependent. From the solid-state-physics side, one can mention a number of spin-chain compounds with regularly alternating $g$-factor values \cite{Niazi2002,Yin2013,Yin2015,Bhatt2014,CuMoDy,Kenzelmann2005,FeMnCu,Oshikawa1997,Coronado1986}. Thus, one-dimensional copper-iridium oxide Sr$_3$CuIrO$_6$ which contains both 3$d$ (Cu$^{2+}$) and 5$d$ (Ir$^{4+}$) magnetic ions can be well described by an effective spin-1/2 ferromagnetic Heisenberg model with an Ising-like exchange anisotropy ($\Delta\approx 2.5$) \cite{Niazi2002,Yin2013}. Moreover, the Cu sites carry the Cu spin $s=1/2$ with $g$-factor $\approx 2$ and the Ir sites carry the Ir isospin $s=1/2$ with $g$-factor $\approx -3$ \cite{Yin2013,Yin2015}. Another instance is a one-dimensional molecular magnet [\{Co$^{\rm{II}}(\Delta)$Co$^{\rm{II}}(\Lambda)$\}(ox)$_2$(phen)$_2$]$_n$ \cite{Bhatt2014}. Magnetic properties of this compound can be explained using a one-dimensional Ising-chain model with two different exchange couplings and two different $g$-factors, $2.5$ and $2.1$. Next example of single-chain molecular magnet is a coordination polymer compound $[\{(\text{CuL})_2\text{Dy}\}\{\text{Mo}(\text{CN})_8\}]\cdot\text{2CH}_3\text{CN}\cdot\text{H}_2\text{O}$, in which L$^{2-}$ is N,N-propylenebis(3-methoxysalicylideneiminato). The magnetic unit cell in this compound contains four magnetic ions with three different values of the $g$-factors. The presence of highly anisotropic Dy$^{3+}$ ion makes possible an exact solution for the corresponding spin-chain model \cite{CuMoDy}. One more example is the spin-1/2 chain antiferromagnet CuCl$_2\cdot$2((CD$_3$)$_2$SO) \cite{Kenzelmann2005}. There are results of very recent studies of another heterotrimetallic coordination-polymer single-chain magnet with large difference between the $g$-factors of the magnetic ions in the magnetic unit cell, $[\text{Cu}^{II}\text{Mn}^{II}(\text{L}^{1})][\text{Fe}^{III}(\text{bpb})(\text{CN})_2]\cdot\text{ClO}_4\cdot\text{H}_2\text{O}$ \cite{FeMnCu}. In this system, a staggered $g$-tensor and/or Dzyaloshinskii-Moriya interactions lead to a staggered field along $x$ direction upon application of a uniform field along $z$ direction. As a result, a spin-1/2 antiferromagnetic Heisenberg chain with an alternating $g$-factor emerges (see also Ref.~\cite{Oshikawa1997} discussing the quasi-one-dimensional spin-1/2 antiferromagnet Cu benzoate). Finally, one may also mention a two-sublattice one-dimensional system Ni$_2$(EDTA)(H$_2$O)$_4\cdot$2H$_2$O, the magnetic behavior of which was discussed in terms of a spin-1 $g_1-g_2$ antiferromagnetic Heisenberg (or Ising) chain with $g_1/g_2$ about $1.1$ \cite{Coronado1986}. From the theoretical side, since the $g$-factor enters many standard lattice models of crystalline solids, it is quite natural to address a question about the consequences of a regular non-uniformity of the $g$-factor for the observable magnetic properties. There are several exact calculations for the spin-chain systems aimed on exploring the essential effects of nonuniform $g$-factors. Spin-1/2 $XY$ chains provide an excellent playground for such analysis because they correspond to noninteracting fermions \cite{Lieb1961,Katsura1962}. Prior work, which is closely related to our study, concerns the two-sublattice \cite{Kontorovich1968,perk1975} and the inhomogeneous periodic (i.e., with several sites in a cell which periodically repeats) \cite{Lima2006} spin-1/2 $XX$ chain in a $z$-aligned field with various interaction constant and $g$-factor values. The reported results refer to the magnetization, susceptibility and equal-time two-spin $zz$ correlation functions \cite{Kontorovich1968,perk1975}, as well as to some dynamic quantities related to correlations of the average cell operators \cite{Lima2006}. The continued-fraction method was also used to figure out the magneto-thermal properties of the general inhomogeneous isotropic $XX$ chain including the case of random Lorentzian transverse field \cite{Zaburannyi2000}. The same program has been performed also for the quantum Ising chain \cite{quantIsing1}. In the most recent papers, the detailed analysis of the ground-state properties for general boundary conditions for the quantum Ising chain with the period-2 modulated transverse field have been done \cite{quantIsing2}. Free-fermion models in which the period-2 alternation of the nearest-neighbor interactions is accompanied by multiple spin exchange were considered in Refs.~\cite{Zvyagin2006,Zvyagin2010,Zvyagin2016}. $XX$ chains is the extreme limit of the Heisenberg chains with an $XY$-like exchange anisotropy. The opposite limiting case is the Ising chains. Recently, a spin-1/2 Ising chain with period-2 regularly alternating $g$-factors has been studied in context of unusual properties of Sr$_3$CuIrO$_6$ \cite{Yin2013,Yin2015}. Moreover, this material, as was mentioned above, features not only alternating $g$-factors of magnetic ion along the chain, but also the negative sign of the one of them. Negative $g$-factors (for the pseudospin operators) are interesting by themselves as they are the result of strong interplay between the ligand field and spin-orbit interaction \cite{ata08,chi12,chi13}. Very recently it has been shown that even in the simplest case of ferromagnetic Ising model with $g$-factors of different sign on bipartite lattice, the frustration takes place and there are configurations containing ordered and disordered sublattices at the same time \cite{Yin2015,tor18}. Rigorous results for finite quantum spin clusters and an Ising-Heisenberg chain with different $g$-factors have been obtained recently in Ref.~\cite{Ohanyan2015}. In the present paper we report results of the systematic study of the spin-1/2 $XX$ chain in a transverse field with regularly alternating $g$-factors including the case when $g$-factors have different sings. We pay special attention to manifestation of regularly alternating $g$-factors in the transverse magnetization, the static $zz$ susceptibility, as well as in the two dynamic structure factors $S_{zz}(\kappa,\omega)$ and $S_{xx}(\kappa,\omega)$. $S_{yy}(\kappa,\omega)$ behaves identically to $S_{xx}(\kappa,\omega)$ due to the symmetry of the model. Dynamic quantities are accessible experimentally and therefore understanding of the effects generated by nonuniform $g$-factors may be useful for interpreting experimental data. The recent development of the exact and numerical calculations of the spin dynamic structure factors for the integrable one-dimensional quantum spin systems are really impressive \cite{caux}. However, the examined in what follows spin-chain model, although corresponds to noninteracting fermions, may be of interest for the full Heisenberg exchange interaction case too: Since the seminal papers by G.~M\"{u}ller et al. \cite{Mueller1981} we know that many dynamic features of the spin-1/2 Heisenberg chain can be analyzed starting from the free-fermion limit. It might be worth it to list here the main findings of the present paper. \begin{itemize} \item We have performed the detailed study of the dynamic properties. We calculated the dynamic structure factors $S_{zz}(\kappa,\omega)$ and $S_{xx}(\kappa,\omega)$ and inspected how they change in the external magnetic field for different period-2 alternations of $g$-factors. \item In the case when both $g$-factors are of the same sign, the correspondence between the boundaries of the $zz$ and $xx$ structure factors is still present. \item On the contrary, if $g_1 g_2 \leq 0$, a large enough magnetic field leads to the highly intense modes in the $xx$ structure factor. \item Analyzing the absorption intensity $I_{\alpha}(\omega,h)$, we found that in the Voigt configuration ($\alpha=z$), the model with uniform $g$-factors does not have any response. In the case when $g_2$ differs from $g_1$, we obtain the nonzero contribution to the absorption intensity. For sufficiently large frequencies $\omega>2|J|$ (where $J$ denotes the exchange coupling) the van Hove singularity arises at the magnetic field $h=\sqrt{\omega^2-4J^2}/|g_1-g_2|$. \item In the Faraday configuration ($\alpha=x$), the situation is a bit different. The absorption spectra can be observed in the uniform case. It shows a broad maximum at some resonance field. The alternation of $g$-factor leads to the doubling of this resonance line. \item Although in our study we focus on the exactly solvable $XX$ chain, we know that such analysis of dynamics is useful for understanding a more realistic case of the Heisenberg chains. Many qualitative features (e.g., doubling of the resonance line) of the absorption profiles can be found also in case of Heisenberg of $XXZ$-model with alternating $g$-factors. \end{itemize} The rest of the paper is organized as follows. We begin with introducing the model to be studied and the free-fermion representation of the model which emerges after applying the Jordan-Wigner transformation, Sec.~\ref{sec02}. After that we discuss the magnetization and the susceptibility in the ground state (Sec.~\ref{sec03}) and some finite-temperature quantities (Sec.~\ref{sec04}). In Sec.~\ref{sec05} we examine the dynamic structure factors of the model. We report the results for $S_{zz}(\kappa,\omega)$ obtained mainly analytically and for $S_{xx}(\kappa,\omega)$ obtained mainly numerically. We conclude the paper with a summary, Sec.~\ref{sec06}. \section{The model and its free-fermion representation} \label{sec02} \setcounter{equation}{0} In the present study, we consider the spin-1/2 isotropic $XY$ chain in a transverse (i.e., aligned along $z$ axis) magnetic field. The peculiarity of the model is the regularly alternating $g$-factor which acquires periodically two values, $g_1$ and $g_2$. The Hamiltonian of the model reads \begin{eqnarray} \label{201} H &=& \sum_{l=1}^{\frac{N}{2}} \left[ J\left(s_{2l-1}^x s_{2l}^x + s_{2l-1}^y s_{2l}^y + s_{2l}^x s_{2l+1}^x + s_{2l}^y s_{2l+1}^y\right) \right. \nonumber\\ &&\left. - g_1 \mu_{\rm{B}} {\sf{H}} s_{2l-1}^z - g_2 \mu_{\rm{B}} {\sf{H}} s_{2l}^z \right]. \end{eqnarray} Here $J$ is the exchange interaction (we may put $\vert J\vert=1$ without loss of generality), $\mu_{{\rm{B}}}$ is the Bohr magneton, ${\sf{H}}$ is the value of the magnetic field measured, e.g., in Teslas (then with $\mu_{{\rm{B}}}\approx 0.67171$K/T the field $h=\mu_{{\rm{B}}}{\sf{H}}$ is measured in Kelvins), and $g_1\mu_{{\rm{B}}}{\sf{H}}=g_1h$, $g_2\mu_{{\rm{B}}}{\sf{H}}=g_2h$. Furthermore, $N$ is the number of lattice sites which is assumed to be even, and periodic boundary conditions are imposed for convenience. After introducing \begin{eqnarray} \label{202} g_{\pm}=\frac{g_1\pm g_2}{2}, \end{eqnarray} we can rewrite Eq.~(\ref{201}) in a more compact form \begin{eqnarray} \label{203} &&H=\sum_{l=1}^N\left[J\left(s_l^x s_{l+1}^x + s_l^y s_{l+1}^y\right) - h_l s_{l}^z\right], \nonumber\\ &&h_l= [g_+ - (-1)^lg_-]h. \end{eqnarray} This is the Hamiltonian of the spin-1/2 isotropic $XY$ chain in a regularly alternating (with period 2) transverse magnetic field. The defined model is exactly solvable by making use of the famous Jordan-Wigner fermionization \cite{Lieb1961,Katsura1962} (see also Refs.~\cite{Derzhko2001,Derzhko2008}). In terms of the Jordan-Wigner fermions the spin Hamiltonian (\ref{203}) becomes \begin{eqnarray} \label{204} H=\sum_{l=1}^N\left[\frac{J}{2}\left(c_l^\dagger c_{l+1} + c_{l+1}^\dagger c_l \right) -h_l\left(c_l^\dagger c_l -\frac{1}{2}\right)\right]. \end{eqnarray} Again periodic boundary conditions are implied in Eq.~(\ref{204}) \cite{note1}. After the Fourier transformation \begin{eqnarray} \label{205} &&c_l=\frac{1}{\sqrt{N}}\sum_\kappa e^{-i\kappa l} c_\kappa, \nonumber\\ &&\kappa=\frac{2\pi j}{N}, \quad j=-\frac{N}{2},-\frac{N}{2}+1, \ldots ,\frac{N}{2}-1, \end{eqnarray} Eq.~(\ref{204}) can be cast into \begin{eqnarray} \label{206} H&=&\sum_{-\pi\leq\kappa<\pi}\left[(J\cos\kappa - g_+h) c_{\kappa}^\dagger c_{\kappa} +g_-hc_{\kappa}^\dagger c_{\kappa\pm\pi}\right] \nonumber \\ &+& \frac{g_+h}{2}N. \end{eqnarray} Next, we perform the Bogolyubov transformation, \begin{eqnarray} \label{207} &&c_{\kappa}= u_{\kappa}\alpha_{\kappa} - v_{\kappa}\alpha_{\kappa+\pi}, \\ \nonumber &&c_{\kappa+\pi}= v_{\kappa}\alpha_{\kappa} + u_{\kappa}\alpha_{\kappa+\pi} \quad (-{\pi}/{2} \leq \kappa < {\pi}/{2}), \\ &&u_{\kappa}=\frac{1}{\sqrt 2}\sqrt{1+\frac{|J\cos\kappa|}{\sqrt{J^2\cos^2\kappa+g_{-}^2h^2}}},\nonumber\\ &&v_{\kappa}=\frac{{\rm{sgn}}(g^{}_{-}h J\cos\kappa)}{\sqrt 2}\sqrt{1-\frac{|J\cos\kappa|}{\sqrt{J^2\cos^2\kappa+g_{-}^2h^2}}},\nonumber \end{eqnarray} leading to \begin{eqnarray} \label{208} &&H= \sum_{-\pi\leq\kappa<\pi}\Lambda_\kappa \left(\alpha_\kappa^\dagger \alpha_\kappa -\frac{1}{2}\right), \\ &&\Lambda_\kappa = -g_+h +{\rm{sgn}}(J\cos\kappa)\sqrt{J^2\cos^2\kappa+g_-^2h^2}.\nonumber \end{eqnarray} Hence, we have arrived at the free-fermion representation \eqref{208} of the initial spin model (\ref{201}). Within this representation many calculations for the thermodynamically large system can be performed rigorously analytically or with very high accuracy numerically. From Eq.~(2.8) it is immediately evident that nonzero magnetic field develops a gap in the excitation spectrum splitting it into two branches. In the limiting case of large $g$-factors (or field $h$) the system becomes close to the two-level model with only two possible eigenenergies on each site $-g_1h$ and $-g_2h$. The position of the Fermi level is important for the understanding of the ground state and thermodynamics of the model given in the next section. Although the isotropic $XY$ interactions may occur in some spin-1/2 chain compounds (see, e.g., Ref.~\cite{Kenzelmann2002}), they can be viewed as a limiting case of more common $XXZ$ interactions. Consider the spin-1/2 $XXZ$ chain in a $z$-directed magnetic field. The Hamiltonian of such model contains in addition to the one given in Eqs.~(\ref{201}) or (\ref{202}) the interaction of the $z$ components of neighboring spins with the strength $J\Delta$, where $\Delta$ is the anisotropy parameter. As a result, in terms of the Jordan-Wigner fermions the spin Hamiltonian becomes \begin{eqnarray} H&=&\sum_{l=1}^N \left[ \frac{J}{2}\left(c_l^\dagger c_{l+1}+c_{l+1}^\dagger c_l\right) +J\Delta c_l^\dagger c_l c_{l+1}^\dagger c_{l+1} \right.\nonumber\\ &-&\left. \left(h_l +J\Delta\right)c_l^\dagger c_l+\frac{h_l}{2}+\frac{J\Delta}{4} \right]. \end{eqnarray} One way to proceed is to apply a mean-field like approximation for the four-fermion term \cite{Bulaevskii1963,Zvyagin2020}: \begin{eqnarray} c_l^\dagger c_l c_{l+1}^\dagger c_{l+1} &\rightarrow& \left(\frac{1}{2}{+}m\right)\left(c_l^\dagger c_l {+} c_{l+1}^\dagger c_{l+1}\right) {-} \left(\frac{1}{2}{+}m\right)^2 \nonumber\\ &&-t \left(c_l^\dagger c_{l+1} + c_{l+1}^\dagger c_{l}\right)+t^2 \nonumber\\ &&-s c_l^\dagger c_{l+1}^\dagger - s^* c_l c_{l+1} +\vert s\vert^2, \end{eqnarray} where the parameters $m\equiv \langle c_l^\dagger c_l\rangle -1/2$, $t\equiv \langle c_l^\dagger c_{l+1}\rangle$, and $s\equiv \langle c_l c_{l+1}\rangle$ have to be determined self-consistently. It should be noted that the Jordan-Wigner fermionization approach was successfully used for examining the static and dynamic properties away from the free-fermion point \cite{Caux2003,Dmitriev2002,Hagemans2005,Nunner2004,Bruognolo2016}. \section{Zero-temperature properties} \label{sec03} \setcounter{equation}{0} Let us first present the ground-state ($T=0$) properties of the system. Although some particular results have been already obtained in Refs.~\cite{Kontorovich1968,perk1975,Lima2006}, we provide here the ground-state analysis for consistency. Particularly, we focus on calculating the ground-state energy $e_0=\langle H \rangle/N$, the transverse magnetization $m=-\partial e_0/\partial h$, the sublattice average $z$-component of spin, $\langle s_1^z \rangle=-2 \, \partial e_0/\partial (g_1h)$, $\langle s_2^z \rangle=-2 \, \partial e_0/\partial (g_2h)$, and the static $zz$ susceptibility $\chi_{zz}=\partial m/\partial h$. For the model at hand, one has to differ the magnetization and the average of the $z$-component of the spin operator, i.e., the magnetic moment and the angular moment at site. It is obvious that \begin{eqnarray} \label{301} m=\frac 12\left(g_1\langle s_1^z \rangle+g_2\langle s_2^z \rangle\right). \end{eqnarray} In what follows we distinguish two cases: $g_1g_2>0$ and $g_1g_2<0$. \underline{The case $g_1g_2>0$.} There are two values of the Fermi momenta $\kappa_F$ defined as the solutions of the equation $\Lambda_{\kappa}=0$: \begin{eqnarray} \label{302} && \kappa_F=\pm\kappa_0 , \;\; {\rm if} \;\; 0<Jg_+h<|Jg_+|h_s, \\ && \kappa_F=\pm(\pi - \kappa_0), \;\; {\rm if} \;\; -|Jg_+|h_s<Jg_+h<0, \nonumber\\ && \kappa_0=\arccos\left|{h}/{h_s}\right| \quad (0<\kappa_0<{\pi}/{2}), \nonumber \end{eqnarray} where the saturation field $h_s$ is given by $h_s=\vert J\vert/\sqrt{g_1g_2}>0$. It is worth to note that the saturation field exists if the fully polarized state $\vert \uparrow\ldots\uparrow\rangle$, which is obviously the eigenstate of the Hamiltonian (2.1), becomes the ground state as the field $h$ exceeds a certain finite value. This is the case for $g_1g_2>0$ but not for $g_1g_2<0$. Here we may consider two separate ranges of the magnetic field $h$. The first one, when $|h|> h_s$, corresponds to the saturated phase with all spins aligned in the field direction. There is no solution for $\kappa_F$ and, thus, the ground state energy as well as the averages of spins have simple expressions: \begin{eqnarray} \label{303} && e_0=-\frac 12|g_+h|,\quad m={\rm{sgn}}(h)\frac{g_+}{2}, \\ &&\langle s_1^z \rangle=\langle s_2^z \rangle=\frac{{\rm{sgn}}(h)}{2},\quad \chi_{zz}=0. \nonumber \end{eqnarray} More interesting is the second range, $-h_s<h<h_s$, when \begin{eqnarray} \label{304} &&e_0={-}|g_+^{}h|\left(\frac{1}{2}{-}\frac{\kappa_0}{\pi}\right) {-}\frac{1}{\pi}\sqrt{J^2+g_-^2h^2}{\rm{E}}(\kappa_0,\varkappa), \\ &&m=g_+^{}{\rm{sgn}}(h)\left(\frac{1}{2}-\frac{\kappa_0}{\pi}\right) +\frac{g_-^2 h}{\pi\sqrt{J^2+g_-^2h^2}}{\rm{F}}(\kappa_0,\varkappa), \nonumber\\ &&\langle s_1^z\rangle={\rm{sgn}}(h)\left(\frac{1}{2}-\frac{\kappa_0}{\pi}\right)+\frac{g_-^{}h}{\pi\sqrt{J^2+g_-^2h^2}}{\rm{F}}(\kappa_0,\varkappa), \nonumber\\ &&\langle s_2^z\rangle={\rm{sgn}}(h)\left(\frac{1}{2}-\frac{\kappa_0}{\pi}\right)-\frac{g_-^{}h}{\pi\sqrt{J^2+g_-^2h^2}}{\rm{F}}(\kappa_0,\varkappa), \nonumber\\ &&\chi_{zz}=\frac{g_+^{} \varkappa^2}{\pi\sqrt{h_s^2{-}h^2}}{+}\frac{g_-^2}{\pi\sqrt{J^2{+}g_-^2h^2}} \left({\rm{F}}(\kappa_0,\varkappa){-}{\rm{E}}(\kappa_0,\varkappa)\right). \nonumber \end{eqnarray} Here $\varkappa=\vert J\vert/\sqrt{J^2+g_-^2h^2}$ and we have also introduced the elliptic integrals of the first and second kind given by the following standard expressions \cite{Jahnke}: \begin{eqnarray} \label{305} &&{\rm{F}} (\kappa_0,\varkappa ) =\int_0^{\kappa_0}\frac{{\rm{d}}\theta}{\sqrt{1-\varkappa^2\sin^2\theta}}, \\ &&{\rm{K}} (\varkappa )={\rm{F}} \left(\frac{\pi}{2},\varkappa \right), \nonumber\\ &&{\rm{E}} (\kappa_0,\varkappa ) =\int_0^{\kappa_0}{\rm{d}}\theta \sqrt{1-\varkappa^2\sin^2\theta}, \nonumber\\ &&{\rm{E}} (\varkappa )={\rm{E}} \left(\frac{\pi}{2},\varkappa \right). \nonumber \end{eqnarray} As can be seen from the reported formulas, the susceptibility diverges at $h=\pm h_s$ showing the square-root singularity \begin{eqnarray} \label{306} \chi_{zz}\approx \frac{g_{+}^2-g_{-}^2}{\pi g_+}\frac{1}{\sqrt{h_s^2-h^2}}, \,\,\, h\to\vert h_s\vert. \end{eqnarray} If $g_1\ne g_2$ an additional weak divergence of $\chi_{zz}$ occurs at $h=0$: \begin{eqnarray} \label{307} \chi_{zz}\approx \frac{g_+}{\pi h_s} +\frac{g_-^2}{\pi} \left(\ln\frac{2h_s}{h} - 1\right), \,\,\, \vert h\vert\to 0. \end{eqnarray} It was noticed for the first time apparently in Ref.~\cite{Kontorovich1968}. \underline{The case $g_1g_2<0$.} In this case the equation for the Fermi momenta $\Lambda_{\kappa}=0$ does not have real solutions, which means that the Fermi level lays in the forbidden band between two branches of the spectrum. Since the odd and even spins are directed oppositely in a field, there is also no saturation field, i.e., the magnetization never attains its saturation value corresponding to $\langle s_1^z\rangle=-\langle s_2^z\rangle=\pm 1/2$. The ground-state energy is given by the following formula: \begin{eqnarray} \label{308} e_0=-\frac{1}{\pi}\sqrt{J^2+g_-^2h^2}{\rm{E}}(\varkappa). \end{eqnarray} After straightforward differentiation we get \begin{eqnarray} \label{309} &&m=\frac{g_-^2 h}{\pi\sqrt{J^2+g_-^2h^2}} {\rm{K}}(\varkappa), \\ &&\langle s_1^z\rangle=-\langle s_2^z\rangle=\frac{g_-h}{\pi\sqrt{J^2+g_-^2h^2}}{\rm{K}}(\varkappa), \nonumber\\ &&\chi_{zz}=\frac{g_-^2}{\pi\sqrt{J^2+g_-^2h^2}}\left({\rm{K}}(\varkappa)-{\rm{E}}(\varkappa)\right) \nonumber \end{eqnarray} for the magnetization, the sublattice average $z$-component of spin, and the susceptibility, respectively. These formulas can be simplified in the strong-field and weak-field limits. We obtain \begin{eqnarray} \label{310} &&m\approx\frac{g_-^2h}{2\sqrt{J^2+g_-^2h^2}}, \\ &&\chi_{zz}\approx\frac{g_-^2 J^2}{4\left(J^2+g_-^2h^2\right)^{\frac{3}{2}}}, \nonumber \end{eqnarray} as $\vert h\vert\to\infty$ and \begin{eqnarray} \label{311} &&m\approx \frac{g_-^2h}{\pi\sqrt{J^2+g_-^2h^2}} \ln\frac{4\sqrt{J^2+g_-^2h^2}}{\vert g_-h\vert}, \\ &&\chi_{zz}\approx \frac{g_-^2}{\pi\sqrt{J^2+g_-^2h^2}} \left(\ln\frac{4\sqrt{J^2+g_-^2h^2}}{\vert g_-h\vert}-1\right), \nonumber \end{eqnarray} as $\vert h\vert\to 0$. While Eq.~(\ref{310}) demonstrates explicitly that the saturation is never achieved for any finite $h$, Eq.~(\ref{311}) demonstrates a non-analyticity of the ground-state energy which manifests itself as a logarithmic peculiarity of the magnetization and the susceptibility in vanishing field. In Fig.~1 we show the ground-state magnetization and susceptibility. In all numerical investigations, without loss of generality, we assume first that $g_2=g_1=1$ and then $g_2$ starts to decrease. These plots illustrate the reported above analytical results including the asymptotic behavior of the susceptibility. It is worthwhile to stress that the logarithmic singularity of the susceptibility $\chi_{zz}$ can be detected not only in the case $g_1g_2<0$, when it is quite natural to expect it, but also in the opposite case $g_1g_2>0$, see Eq.~(3.7). It is the consequence of another peculiar property shown in Fig.~2 where the total magnetization and spin moment is confronted with the average spin moments of each sublattices. We can see that even for positive $g_2$ (see Fig.~2 for $g_2=0.1$) the average spin moment at small fields started to evolve in the opposite to the field direction feeling the competition between the applied magnetic field and quantum interaction with stronger magnetized neighboring spins. Let us denote by $h_0$ ($h_0>0$) the value of the field at which $\langle s_2^z\rangle=0$ if $|g_2|<|g_1|$ (or $\langle s_1^z\rangle=0$ if $|g_1|<|g_2|$); $h_0$ exists in the case $g_1g_2>0$ only. After using approximate formulas for the elliptic integrals one can show that $h_0\approx 2h_s \, e^{-2\alpha}$, where $\alpha=\sqrt{g_1g_2}/\vert g_1-g_2\vert$. If $g_2$ (or $g_1$) approaches zero we can again use approximate formulas for the elliptic integrals to conclude that $h_0\approx h_s/\sqrt{2}$. Both limiting cases can be combined into the following approximate expression \begin{eqnarray} \label{312} h_0\approx\frac{2e^{-2\alpha}}{1+(2\sqrt{2}-1)e^{-3\alpha}}h_s, \end{eqnarray} which yields the correct value of $h_0$ for the whole region $g_1g_2>0$ with the accuracy of less than 1.5\%. \begin{figure} \begin{center} \includegraphics[clip=on,width=\myfigsize]{xig01a} \includegraphics[clip=on,width=\myfigsize]{xig01b} \caption {(Color online) Ground-state magnetization (upper panel) and susceptibility (lower panel) vs field $h$. $|J|=1$, $g_1=1$, $g_2=1$ (solid), $g_2=0.5$ (long-dashed), $g_2=0$ (short-dashed), $g_2=-0.5$ (dashed-dotted), $g_2=-1$ (dotted).} \label{x01} \end{center} \end{figure} \begin{figure} \begin{center} \includegraphics[width=\myfigsize]{xig02} \caption {(Color online) Ground-state values of $\langle s_1^z\rangle$ (dotted), $\langle s_2^z\rangle$ (dashed), $(\langle s_1^z\rangle+\langle s_2^z\rangle)/2$ (dot-dashed), and $m$ (solid) vs field $h$. $|J|=1$, $g_1=1$, $g_2=0.1$.} \label{x02} \end{center} \end{figure} \section{Finite-temperature properties} \label{sec04} \setcounter{equation}{0} Finite-temperature quantities can be easily calculated from the free energy per site \begin{eqnarray} \label{401} f(T,h) = -\frac{T}{2\pi}\int_{-\pi}^{\pi}{\mbox{d}}\kappa\ln\left(2\cosh\frac{\Lambda_\kappa}{2T}\right) \end{eqnarray} with $\Lambda_\kappa$ given in Eq.~(\ref{208}). For example, for the specific heat one finds \begin{eqnarray} \label{402} c(T,h) =\frac{1}{2\pi}\int_{-\pi}^{\pi}{\mbox{d}}\kappa \left(\frac{\Lambda_\kappa}{2T}\right)^2\cosh^{-2}\frac{\Lambda_\kappa}{2T}. \end{eqnarray} Furthermore, for the finite-temperature magnetization and susceptibility one finds \begin{eqnarray} \label{403} m(T,h)= \frac{1}{4\pi}\int_{-\pi}^{\pi}{\mbox{d}}\kappa\frac{\partial \Lambda_\kappa}{\partial h} \tanh\frac{\Lambda_\kappa}{2T} \end{eqnarray} and \begin{eqnarray} \label{404} &&\chi_{zz}(T,h)= \\ &&\frac{1}{4\pi}\int_{-\pi}^{\pi}{\mbox{d}}\kappa \left[\frac{\partial^2\Lambda_\kappa}{\partial h^2}\tanh\frac{\Lambda_\kappa}{2T} +\frac{1}{2 T}\left(\frac{\partial\Lambda_\kappa}{\partial h}\right)^2\cosh^{-2}\frac{\Lambda_\kappa}{2T}\right], \nonumber \end{eqnarray} respectively. Here, the derivatives $\partial\Lambda_\kappa/\partial h$ and $\partial^2\Lambda_\kappa/\partial h^2$ are given by the following formulas: \begin{eqnarray} \label{405} &&\frac{\partial\Lambda_\kappa}{\partial h}=-g_+ +\frac{{\rm{sgn}}(J\cos\kappa) g_-^2 h}{\sqrt{J^2\cos^2\kappa+g_-^2h^2}}, \\ &&\frac{\partial^2\Lambda_\kappa}{\partial h^2}= \frac{{\rm{sgn}}(J\cos\kappa)g_-^2J^2\cos^2\kappa}{\left(J^2\cos^2\kappa+g_-^2h^2\right)^{3/2}}. \nonumber \end{eqnarray} In Fig.~\ref{x03} we demonstrate the temperature behavior of the specific heat \eqref{402} for several regimes: 1) gapless zero-field and finite-field regimes ($0<|h| <h_s$) (solid black and dashed brown), 2) two cases when $|h|=h_s$ or $g_2=0$ (dashed-dotted blue), and 3) two gapped regimes when $|h|>h_s$, $g_1g_2>0$ or when $g_1g_2<0$ at $h\ne0$ (dotted green). The gapless regime features the universal linear-temperature dependence of the specific heat: \begin{eqnarray} \label{406} c(T)\simeq \frac{\pi {\sf c}}{3 v_F}T, \;\;\; T\to 0. \end{eqnarray} Here, in our case the central charge ${\sf c}=1$ and the Fermi velocity for the case of zero field coincides with the those for the $XX$-chain, $v_F=|J|$, whereas for the case of the gapless finite-field regime ($0<|h|<h_s$, $g_1g_2>0$) it is $v_F=J^2\sqrt{1-h^2/h_s^2}/(h_s |g_+|)$. When the magnetic field reaches the saturation value $|h|=h_s$ ($g_1g_2>0$) the Fermi level touches the bottom points of the upper part of the spectrum (van Hove singularity). The low-temperature behavior of the specific heat in this case is given by the square-root temperature dependence, \begin{eqnarray} \label{407} c(T)\simeq\frac {3\left(\sqrt 2-1\right)\zeta\left(\frac 32\right) \sqrt{|g_+h|}}{8 \sqrt{\pi} |J|}\sqrt{T}, \end{eqnarray} where $\zeta\left(x\right)$ is the standard zeta-function. The same expression is valid for the case $g_2=0$ for arbitrary nonzero values of the magnetic field. Finally, two gapped regimes are possible: i) $|h|>h_s$, $g_1g_2>0$ and ii) $g_1g_2<0$ at any $h\neq 0$. The specific heat has universal exponential low-temperature behavior, given by \begin{eqnarray} \label{408} c(T)\simeq\frac{\Delta^2 }{\sqrt{2\pi r}}\frac{e^{-\frac{\Delta}{T}}}{T^{\frac{3}{2}}}, \end{eqnarray} where for the $|h|>h_s$ regime $r=|J|\varkappa/2$, $\Delta=|g_+h|-\sqrt{J^2+g_-^2h^2}$, whereas for the $g_1 g_2<0$ regime $r=J^2/(2|g_-h|)$, $\Delta=|g_2 h|$ ($\Delta=|g_1 h|$) if $|g_2|<|g_1|$ ($|g_2|>|g_1|$). \begin{figure} \begin{center} \includegraphics[width=\myfigsize]{xig03} \caption {(Color online) Temperature dependence of the specific heat for $|J|=1$ at $h=0$ (solid black); $h=0.5, g_1=1, g_2=0.5$ (dashed brown); $h=0.5, g_1=1, g_2=0$ (dashed-dotted blue); and $h=0.5, g_1=1, g_2=-0.5$ (dotted green). The inset shows the same plots in $\log-\log$ scale. The linear, square-root and exponential behavior of the specific heat are clearly visible here. Thin red lines represent the asymptotic forms from Eqs.~(\ref{406}), (\ref{407}), and (\ref{408}).} \label{x03} \end{center} \end{figure} Let us also consider the low-temperature behavior of the magnetic susceptibility at zero field. We have the universal formula with logarithmic singularity given by \begin{eqnarray} \label{chi_h=0} \chi_{zz}(T)\simeq\frac{1}{\pi|J|}\left[g_+^2-g_-^2\left(\ln\frac{\pi T}{4|J|}-\mathcal{C}\right)\right], \end{eqnarray} where $\mathcal{C}\simeq0.577\,215\,6$ is the Euler-Mascheroni constant. As it is seen from this expression, the logarithmic divergence at $T\rightarrow0$ is the consequence of the non-uniformity of the $g$-factors and it disappears when $g_-=0$. This is illustrated in Fig.~\ref{x04}. \begin{figure} \begin{center} \includegraphics[width=\myfigsize]{xig04} \caption {(Color online) Low-temperature behavior of the zero-field susceptibility for $|J|=1$, $g_1=1$ and $g_2=1$ (solid black), $g_2=0.5$ (dashed brown), $g_2=0$ (dashed-dotted blue), and $g_2=-0.5$ (dotted green). The inset shows the same plots in $\log-\log$ scale. Thin red lines represent the asymptotic form from Eq.~(\ref{chi_h=0}).} \label{x04} \end{center} \end{figure} \section{Dynamic properties} \label{sec05} \setcounter{equation}{0} In this section, we study dynamic quantities of the model. Dynamic properties of quantum spin-chain compounds are observable in the neutron scattering \cite{zaliznyak2013} and electron spin resonance (ESR) \cite{Ajiro2003} experiments. We start with the dynamic structure factor related to the inelastic neutron scattering cross section \cite{zaliznyak2013,Jensen}: \begin{eqnarray} \label{501} &&S_{\alpha\alpha}(\kappa,\omega) =\\ &&\frac{1}{N} \sum_{j=1}^N\sum_{n=1}^{N}\exp\left({\rm{i}}\kappa n\right) \int\limits_{-\infty}^{\infty}{\rm{d}}t\exp\left({\rm{i}}\omega t\right) g_jg_{j+n}\langle s_j^\alpha (t) s_{j+n}^\alpha \rangle_c, \nonumber \end{eqnarray} where $\langle s_j^\alpha (t) s_{j+n}^\alpha \rangle_c =\langle s_j^\alpha (t) s_{j+n}^\alpha \rangle - \langle s_j^\alpha \rangle\langle s_{j+n}^\alpha \rangle$ and $s_j^\alpha (t) = \exp(iHt)s_j^\alpha \exp(-iHt)$. The inclusion of the $g$-factors in Eq.~(\ref{501}) here implies that we have the dynamic structure factors of the magnetic moments. In general, $g$-factors may also depend on the probing field direction $\alpha$. But if we imply that the ratio between $g_1$ and $g_2$ is preserved for any direction $\alpha$, Eq.~(\ref{501}) will acquire a scaling factor. In the case of site-independent $g$-factors Eq.~(\ref{501}) coincides with the definition of Refs.~\cite{Derzhko1997,Derzhko2000,Derzhko2002}. For the chain with site-dependent $g$-factors with period two the dynamic structure factor has the following general structure: \begin{eqnarray} \label{502} S_{\alpha\alpha}(\kappa,\omega) &=&g_{+}^2S_{\alpha\alpha}^{0}(\kappa,\omega) + g_{-}^2S_{\alpha\alpha}^{0}(\kappa+\pi,\omega) \\ &-&g_-g_+\left(\overline{S}_{\alpha\alpha}^{0}(\kappa,\omega)+\overline{S}_{\alpha\alpha}^{0}(\kappa+\pi,\omega)\right), \nonumber \end{eqnarray} where the uniform spin structure factor $S_{\alpha\alpha}^{0}(\kappa,\omega)$ and the staggered spin structure factor $\overline{S}_{\alpha\alpha}^{0}(\kappa,\omega)$ are defined in the standard way: \begin{eqnarray} \label{503} &&S_{\alpha\alpha}^{0}(\kappa,\omega) =\\ &&\frac{1}{N} \sum_{j=1}^N\sum_{n=1}^{N}\exp\left({\rm{i}}\kappa n\right) \int\limits_{-\infty}^{\infty}{\rm{d}}t\exp\left({\rm{i}}\omega t\right) \langle s_j^\alpha (t) s_{j+n}^\alpha \rangle_c, \nonumber\\ &&\overline{S}_{\alpha\alpha}^{0}(\kappa,\omega) =\nonumber\\ &&\frac{1}{N} \sum_{j=1}^N\sum_{n=1}^{N}\exp\left({\rm{i}}\kappa n\right) \int\limits_{-\infty}^{\infty}{\rm{d}}t\exp\left({\rm{i}}\omega t\right) (-1)^j \langle s_j^\alpha (t) s_{j+n}^\alpha \rangle_c. \nonumber \end{eqnarray} Furthermore, we consider $S_{zz}(\kappa,\omega)$ and $S_{xx}(\kappa,\omega)$ structure factors separately. In the former case one faces a problem of two-fermion excitations only and all calculations can be performed analytically. The latter case corresponds to many-fermion excitations problem and requires, in general, the calculation of Pfaffians. We perform these calculations numerically \cite{Derzhko1997,Derzhko2000,Derzhko2002,Derzhko2008} carefully controlling the accuracy of computations. As in previous studies on the dynamics of spin-1/2 $XY$ chains, both structure factors exhibit some similarities. In what follows, we discuss the changes in these quantities caused by regular alternation of $g$-factors. The dynamic structure factors allow us to calculate the energy absorption intensities $I_{\alpha}(\omega,h)$, $\alpha=z,x$ observed in the ESR experiments. Following the procedure given in Appendix A of Ref.~\cite{Brockmann2012}, we can get for the linearly polarized electromagnetic wave: \begin{eqnarray} \label{504} I_\alpha(\omega,h)&\propto&\omega\chi''_{\alpha\alpha}(0,\omega), \\ \chi''_{\alpha\alpha}(0,\omega)&=&\frac{1-\exp(-\beta\omega)}{2}S_{\alpha\alpha}(0,\omega), \nonumber \end{eqnarray} where $\chi''_{\alpha\alpha}(0,\omega)$ is the imaginary part of the $\alpha\alpha$ dynamic susceptibility and $S_{\alpha\alpha}(0,\omega)$ is the corresponding dynamic structure factor at $\kappa=0$ defined in Eq.~(\ref{501}). In the ESR experiment two configurations are distinguished \cite{Ajiro2003}: i) the Voigt configuration, when the magnetic polarization of the electromagnetic wave is collinear with the constant field, and ii) the Faraday configuration, when the magnetic polarization of the electromagnetic wave is perpendicular to the constant field. In our model, the $z$ [$x$] polarized electromagnetic wave corresponds to the Voigt [Faraday] configuration, i.e., the absorption intensity is $I_z(\omega,h)$ [$I_x(\omega,h)$]. Again, as discussed in what follows, the regularly alternating $g$-factors change dramatically the ESR absorption intensity. \subsection{$zz$ dynamics} One can work out the closed-form expression for the dynamic structure factor $S_{zz}(\kappa,\omega)$. It is given by the following expression: \begin{eqnarray} \label{505} &&S_{zz}(\kappa,\omega){=} \int\limits_{-\pi}^\pi{\rm{d}}\kappa_1 B_{+}(\kappa;\kappa_1) C(\kappa;\kappa_1) \delta\left(\omega{-}D(\kappa;\kappa_1)\right) \nonumber\\ &&\quad{+} \int\limits_{-\pi}^\pi{\rm{d}}\kappa_1 B_{-}(\kappa;\kappa_1) C(\kappa{+}\pi;\kappa_1) \delta\left(\omega{-}D(\kappa{+}\pi;\kappa_1)\right), \nonumber\\ &&B_{\pm}(\kappa;\kappa_1)=\left[g_\pm\left(u_{\kappa_1}u_{\kappa_1+\kappa} \pm v_{\kappa_1}v_{\kappa_1+\kappa}\right) \right. \nonumber\\ &&\left. \quad \mp g_\mp\left(u_{\kappa_1}v_{\kappa_1+\kappa} \pm v_{\kappa_1}u_{\kappa_1+\kappa}\right) \right]^2, \nonumber\\ &&C(\kappa;\kappa_1)=n_{\kappa_1}\left(1-n_{\kappa_1+\kappa}\right), \nonumber\\ &&D(\kappa;\kappa_1)=\Lambda_{\kappa_1+\kappa}-\Lambda_{\kappa_1}, \end{eqnarray} where $n_{\kappa}=1/\left(e^{\Lambda_{\kappa}/T}+1\right)$ is the Fermi-Dirac function for the spinless fermions (\ref{208}). Hence, $S_{zz}(\kappa,\omega)$ is governed exclusively by two-fermion excitation continua. \begin{figure}[htp] \centering \includegraphics[clip=on,width=\myfigsize]{xig05a} \includegraphics[clip=on,width=\myfigsize]{xig05b} \includegraphics[clip=on,width=\myfigsize]{xig05c} \includegraphics[clip=on,width=\myfigsize]{xig05d} \caption{(Color online) Towards the dynamic structure factor $S_{zz}(\kappa,\omega)$. $|J|=1$, $g_1=1$, $g_2=0.5$, $h=0.5$. (a) Number of roots of two equations (\ref{506}). (b) $S_{zz}(\kappa,\omega)$ at $T=\infty$. (c) The same as in panel (a) but taking into accounting the Fermi-Dirac functions at $T=0$. (d) $S_{zz}(\kappa,\omega)$ at $T=0$. Green and red lines are the boundaries (\ref{a01}) and (\ref{a02}) correspondingly.} \label{x05} \end{figure} Let us discuss this two-fermion quantity in more detail. For fixed $\kappa$ and $\omega$, one has to solve the equations \begin{eqnarray} \label{506} &&\omega-D(\kappa;\kappa_r)=0, \;\; \omega-D(\kappa+\pi;\kappa'_r)=0, \end{eqnarray} i.e., to find all roots $\kappa_r$, $\kappa'_r$. Then Eq.~(\ref{505}) can be written down as follows: \begin{eqnarray} \label{507} S_{zz}(\kappa,\omega)&{=}& \sum_{\kappa_r} \frac{B_{+}(\kappa;\kappa_r) C(\kappa;\kappa_r)}{A(\kappa;\kappa_r)} \nonumber\\ &&{+} \sum_{\kappa'_r} \frac{B_{-}(\kappa;\kappa'_r) C(\kappa{+}\pi;\kappa'_r)}{A(\kappa{+}\pi;\kappa'_r)}, \end{eqnarray} where \begin{eqnarray} \label{508} &&A(\kappa;\kappa_1) = \left\vert \frac{\partial D(\kappa;\kappa_1)}{\partial \kappa_1} \right\vert \\ &&{=}J^2 \left|\frac{|\cos(\kappa_1{+}\kappa)| \sin(\kappa_1{+}\kappa)}{\sqrt{J^2\cos^2(\kappa_1{+}\kappa){+}g_-^2h^2}} {-} \frac{|\cos\kappa_1| \sin\kappa_1}{\sqrt{J^2\cos^2\kappa_1{+}g_-^2h^2}}\right|. \nonumber \end{eqnarray} In Fig.~\ref{x05}(a) we show (for a representative set of parameters) the regions in the $\kappa$--$\omega$ plane where equations (\ref{506}) have four roots (black), two roots (gray) or no roots (white). In other words, we plot $S_{zz}(\kappa,\omega)$ (\ref{507}) assuming $A(\kappa;\kappa_1)=A(\kappa+\pi;\kappa_1)=1$ as well as $B_\pm(\kappa;\kappa_1)=1$ and $C(\kappa;\kappa_1)=C(\kappa+\pi;\kappa_1)=1$. Clearly, the dynamic structure factor $S_{zz}(\kappa,\omega)$ is identically zero within the white regions in the $\kappa$--$\omega$ plane [equations (\ref{506}) have no roots]. Furthermore, any two-fermion quantity have some structure coming from the factors $1/A(\kappa;\kappa_1)$ and $1/A(\kappa+\pi;\kappa_1)$. It is nicely seen in the infinite-temperature limit when $C(\kappa;\kappa_1)=C(\kappa+\pi;\kappa_1)=1/4$ shown in Fig.~\ref{x05}(b). Next, deviating from the infinite-temperature limit we have to examine the effect of the Fermi-Dirac functions in Eq.~(\ref{507}) which may suppress the dynamic structure factor $S_{zz}(\kappa,\omega)$ even in the gray or black regions, especially at $T=0$. In Fig.~\ref{x05}(c) we show the effect of the ground state Fermi-Dirac distributions for the same set of parameters [we plot $S_{zz}(\kappa,\omega)$ (\ref{507}) assuming $A(\kappa;\kappa_1)=A(\kappa+\pi;\kappa_1)=1$ and $B_\pm(\kappa;\kappa_1)=1$]. In addition to the two- and four-roots regions, the regions with one and three roots, surviving after the thermodynamic averaging, come into play [compare Figs.~\ref{x05}(c) and \ref{x05}(a)]. Moreover, some allowed previously regions become white at $T=0$ signalizing the action of the Fermi-Dirac functions in the ground state. The final gray-scale plot of the $zz$ dynamic structure factor (\ref{507}) at $T=0$ is presented in Fig.~\ref{x05}(d). The frequency profiles for the chosen set of parameters are also plotted in Fig.~\ref{x06} complementing the gray-scale plot in Figs.~\ref{x05}(b,d). It is clearly seen that the $zz$ dynamic structure factor at $T\to\infty$ shows the van Hove divergence at the edges of the two-fermion continua which is typical for the $XX$ chains (see Refs.~\cite{Derzhko2000,Derzhko2002,Derzhko2008} for a review). $S_{zz}(\kappa,\omega)$ in the ground state [Fig.~\ref{x05}(d)] demonstrates even richer behavior due to the step-like form of the Fermi-Dirac functions [see Fig.~\ref{x05}(c,d) and Fig.~\ref{x06}(a)]. The analytical formulas for the boundaries of the two-fermion continua are given in Appendix. \begin{figure} \centering \includegraphics[clip=on,width=42.5mm]{xig06a} \includegraphics[clip=on,width=42.5mm]{xig06b} \caption{(Color online) $S_{zz}(\kappa,\omega)$ vs $\omega$ at $\kappa=0$, $\kappa=\pi/4$, $\kappa=\pi/2$, $\kappa=3\pi/4$, and $\kappa=\pi$. $|J|=1$, $g_1=1$, $g_2=0.5$, $h=0.5$, $T=0$ (left), cf. Fig.~\ref{x05}(d), and $T\to\infty$ (right), cf. Fig.~\ref{x05}(b). Green and red lines are the boundaries (\ref{a01}) and (\ref{a02}) correspondingly.} \label{x06} \end{figure} We can understand the reported findings taking into account that the dynamic structure factor $S_{zz}(\kappa,\omega)$ is governed by two-fermion continua. The general effect of alternating $g$-factors can be understood from Figs.~\ref{x07}--\ref{x09}, where some results for $S_{zz}(\kappa,\omega)$ for different fields $h$ and values of $g_2$ at $T=0$ are collected. The decreasing of $g_2$ from 1 to $-1$ at fixed value of magnetic field $h$ and $g_1=1$ leads to redistribution of the intensity of the $zz$ dynamic structure factor from the boundary to the center of the Brillouin zone. For $g_2 \in (0,1)$, there are two regions with $S_{zz}(\kappa,\omega) \ne 0$ (top and bottom) which are disconnected, see Figs.~\ref{x07}(b), \ref{x08}(b) and \ref{x09}(b). The distances between these top and bottom regions increase with decreasing $g_2$ and with increasing $h$. For $g_2 \in [-1,0]$, the increasing of the magnetic field $h$ leads to redistribution of the intensity of the $zz$ dynamic structure factor to higher frequencies. Let us consider the effect of changes $g$-factors and $h$ in more detail. At zero field, the $zz$ structure factor is extremely simple [see Eqs.~(\ref{502}) and (\ref{503})] and can be presented as a sum of two contributions for the uniform model shifted by $\pi$ along the wave-vector axis [i.e., Eq.~(\ref{502}) in the case of zero staggered spin structure factor $\overline{S}^{0}_{zz}(\kappa,\omega)$]. It is definitely also the case of a small field (see Fig.~\ref{x07} for $h=0.1$). It is clearly seen that at small $h$, the deviation of $g_2$ from $g_1=1$ induces a tiny strip of new two-fermion continuum at lower frequencies. The intensity of this low-energy two-fermion continuum wanes with decreasing $g_2$. Surprisingly, $S_{zz}(\kappa,\omega)$ for $g_2\leq0$ does not show any trace of the low-energy continuum anymore [see Figs.~\ref{x07}(c,d)]: The $zz$ structure factor shows one two-fermion continuum only. In contrast to $h=0$, at small fields, two opposite cases $g_2=1$ and $g_2=-1$ are not identical [compare Fig.~\ref{x07}(a) and Fig.~\ref{x07}(d)]. At higher fields, the magnetic structure factor cannot be approximated by the sum of uniform spin structure factors ${S}^{0}_{zz}(\kappa,\omega)$ anymore. Even for a moderate alternation of $g$-factors [$g_1=1$, $g_2=0.5$ in Fig.~\ref{x08}(b)] we observe the appearance of another two-fermion continuum at lower frequencies. It can be treated as a splitting of the initial continuum inherent in the uniform model [see Fig.~\ref{x08}(a)] in two parts, which is a signal of the two-band structure of the fermion excitation spectrum (\ref{208}). It should be noted that the two-fermion continuum at lower frequencies induced by small deviation of $g_2$ (from $g_1=1$) is not a tiny strip anymore as it was at small fields ($h=0.1$). At higher fields as well as at small ones, the $zz$ structure factor for $g_2\leq0$ shows just one two-fermion continuum only [Figs.~\ref{x08}(c,d)]. This picture keeps the tendency with increasing field as it is shown in Fig.~\ref{x09}. In two top panels we present results at magnetic fields close to $h_s$ whereas for $g_1g_2\leq 0$ we put $h=1$ [Figs.~\ref{x09}(c,d)], because at $g_1g_2\leq 0$ the saturation field does not exist. The fact, that in Fig.~\ref{x09}(b) both the low-energy and hight-energy two-fermion continua are tiny strips, is caused by that the field is very close to $h_s$. \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig07a} \includegraphics[clip=on,width=\myfigsize]{xig07b} \includegraphics[clip=on,width=\myfigsize]{xig07c} \includegraphics[clip=on,width=\myfigsize]{xig07d} \caption{(Color online) The density plot of the dynamic structure factor $S_{zz}(\kappa,\omega)$ at $T=0$: $|J|=1$, $g_1=1$, $g_2=1$ (a), $g_2=0.5$ (b), $g_2=0$ (c), $g_2=-1$ (d), $h=0.1$.} \label{x07} \end{figure} \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig08a} \includegraphics[clip=on,width=\myfigsize]{xig08b} \includegraphics[clip=on,width=\myfigsize]{xig08c} \includegraphics[clip=on,width=\myfigsize]{xig08d} \caption{(Color online) The density plot of the dynamic structure factor $S_{zz}(\kappa,\omega)$ at $T=0$: $|J|=1$, $g_1=1$, $g_2=1$ (a), $g_2=0.5$ (b), $g_2=0$ (c), $g_2=-1$ (d), $h=0.5$.} \label{x08} \end{figure} \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig09a} \includegraphics[clip=on,width=\myfigsize]{xig09b} \includegraphics[clip=on,width=\myfigsize]{xig09c} \includegraphics[clip=on,width=\myfigsize]{xig09d} \caption{(Color online) The density plot of the dynamic structure factor $S_{zz}(\kappa,\omega)$ at $T=0$: $|J|=1$, $g_1=1$, $g_2=1$, $h=0.9$ (a), $g_2=0.5$, $h=1.4$ (b), $g_2=0$, $h=1$ (c), $g_2=-1$, $h=1$ (d).} \label{x09} \end{figure} \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig10a} \includegraphics[clip=on,width=\myfigsize]{xig10b} \caption{(Color online) The density plot of the dynamic structure factor $S_{zz}(\kappa,\omega)$ at $T\to\infty$: $|J|=1$, $g_1=1$, $h=0.5$, $g_2=0$ (a), $g_2=-1$ (b).} \label{x10} \end{figure} We also examine the temperature effect on the $zz$ structure factor for non-positive $g_2\le 0$. The results for $T\to\infty$ in Fig.~\ref{x10} show an additional two-fermion continuum for low frequencies. In case of zero temperature this continuum was hidden owing to the Fermi-Dirac functions, compare Fig.~\ref{x10} to Fig.~\ref{x08}. In the case $\kappa=0$, Eq.~(\ref{505}) can be transformed to the following form: \begin{eqnarray} \label{509} &&S_{zz}(0,\omega){=} \delta(\omega)\int\limits_{-\pi}^{\pi}{\rm d}\kappa_1(g_{+}^{} {-} 2g_{-}^{}u_{\kappa_1}v_{\kappa_1})^2 n_{\kappa_1}(1{-}n_{\kappa_1}) \nonumber\\ &&+\frac{g_{-}^2\sqrt{\omega^2 {-} 4g_-^2h^2}}{\omega\sqrt{4J^2 {+} 4g_-^2h^2 {-} \omega^2}} \sum_{\kappa_r}n_{\kappa_r}\left(1 {-} n_{\kappa_r+\pi}\right), \end{eqnarray} where $\kappa_r$ are solutions of the equation $\omega=\Lambda_{\kappa_r+\pi}-\Lambda_{\kappa_r}$. The latter equation has solutions only in the restricted region \begin{eqnarray} \label{510} 2\vert g_-h\vert\le\omega <2\sqrt{J^2+g_-^2h^2}. \end{eqnarray} We can use Eqs.~(\ref{509}) and (\ref{504}) to get explicit expressions for the absorption intensity $I_z(\omega,h)$: \begin{eqnarray} \label{511} &&I_{z}(\omega,h) \propto \frac{g_{-}^2\sqrt{\omega^2-4g_-^2h^2}}{\sqrt{4J^2+4g_-^2h^2-\omega^2}} \\ &&\times \frac{1-\exp(-\beta\omega)}{(1+\exp[\beta\left(g^{}_+h-\frac{\omega}{2}\right)]) (1+\exp[-\beta\left(g^{}_+h+\frac{\omega}{2}\right)])}. \nonumber \end{eqnarray} In the ground state we arrive at the following formula: \begin{eqnarray} \label{512} &&I_{z}(\omega,h) \propto \frac{g_{-}^2\sqrt{\omega^2-4g_-^2h^2}}{\sqrt{4J^2+4g_-^2h^2-\omega^2}}, \end{eqnarray} where in case $g_1g_2>0$ the Fermi-Dirac functions shrink further the condition of allowed $\omega$ [see Eq.~(\ref{510})] to the following one: $2\vert g_+h\vert<\omega< 2\sqrt{J^2+g_-^2h^2}$. \begin{figure} \begin{center} \includegraphics[clip=on,width=0.49\columnwidth]{xig11a} \includegraphics[clip=on,width=0.49\columnwidth]{xig11b} \caption {(Color online) Field profiles of the absorption intensity $I_z(\omega,h)$ at different frequencies $\omega$ for $|J|=1$, $g_1=1$, $g_2=0.5$ (a), $g_2=-0.5$ (b), and temperatures $T=1$ (solid black curves) and $T=0$ (dashed red curves). The dashed-dot-dot violet (dashed green) curve indicates the intensity at $h=0$ and $T=0$ ($T=1$). The solid and short-dashed blue curves show the boundaries given in Eq.~(\ref{510}) while the dashed-dot green curve in panel (a), given by $h=\omega/(2|g_{+}|)$, denotes the upper boundary of $I_z(\omega,h)$ at $T=0$ (see the discussion in the text).} \label{x11} \end{center} \end{figure} It is evident from Eq.~(\ref{511}) that there is no energy absorption in case of the uniform $g$-factors ($g_1=g_2=1$), since the total magnetization commutes with the Hamiltonian. The alternation of $g$-factors destroys this property and leads immediately to nonzero absorption intensity $I_z(\omega,h)$. From Eqs.~(\ref{512}) and (\ref{511}) one can deduce the shape of the absorption line. The field profiles of the absorption intensity for alternating $g$-factors are shown in Fig.~\ref{x11}. The absorption intensity curve $I_z(\omega,h)$ for any frequency ends continuously at $h=\omega/(2|g_{-}|)$ for both $T=0$, $g_1g_2<0$ and $T>0$ cases. It is clearly seen in Figs.~\ref{x11}(a,b); short-dashed blue line. If the frequency exceeds $2|J|$, we observe also a van Hove singularity at $h=\sqrt{\omega^2-4J^2}/(2|g_{-}|)$ [see Figs.~\ref{x11}(a,b); solid blue line]. In the ground state for $g_1g_2>0$ this singularity disappears at $\omega=2|J|/\sqrt{1-(g_{-}/g_{+})^2}$. If $\omega<2|J|/\sqrt{1-(g_{-}/g_{+})^2}$ for zero temperature and $g_1g_2>0$, the absorption intensity curve $I_z(\omega,h)$ ends abruptly at $h=\omega/(2|g_{+}|)$ [see Fig.~\ref{x11}(a); dashed-dot green line], and at $\omega>2|J|/\sqrt{1-(g_{-}/g_{+})^2}$ this ground-state absorption intensity vanishes, $I_z(\omega,h)=0$. \subsection{$xx$ dynamics} We pass to another dynamic structure factor, namely, the $xx$ structure factor $S_{xx}(\kappa,\omega)$. We perform the computation of the $xx$ time correlation functions numerically using the previously elaborated method \cite{Derzhko1997,Derzhko2000,Derzhko2008}. In what follows, we consider the finite chain of $N=400$ spins with open boundary conditions. To avoid the boundary effect, we have to adapt Eq.~(\ref{501}). Thus, we choose a ``central'' spin at the site $j=61,81$ (depending on the adopted parameters) and then calculate the time correlation functions $\langle s^x_j(t)s^x_{j+n}\rangle$ as well as $\langle s^x_{j+1}(t)s^x_{j+n+1}\rangle$ for $n\geq 0$. Finally, we present the Fourier transform in Eq.~(\ref{501}) in the following symmetrized form: \begin{eqnarray} \label{513} &&S_{xx}(\kappa,\omega) = \frac{1}{2}\text{Re}\int_0^{\infty}{\rm d}t e^{-\epsilon t}e^{i\omega t} \\ &&\times \left\{ g_1^2\left[\langle s_j^x(t)s_j^x\rangle +2\sum_{n=1}^{\frac{N}{2}}\cos(2n\kappa)\langle s^x_j(t)s^x_{j+2n}\rangle \right] \right. \nonumber\\ &&+ 2g_1g_2\sum_{n=1}^{\frac{N}{2}}\cos((2n-1)\kappa)\langle s^x_j(t)s^x_{j+2n-1}\rangle + \nonumber\\ &&g_2^2\left[\langle s_{j+1}^x(t)s^x_{j+1}\rangle {+}2\sum_{n=1}^{\frac{N}{2}}\cos(2n\kappa)\langle s^x_{j+1}(t)s^x_{j+1+2n}\rangle \right] \nonumber\\ &&\left. {+} 2g_1g_2\sum_{n=1}^{\frac{N}{2}}\cos((2n{-}1)\kappa)\langle s^x_{j+1}(t)s^x_{j+1+2n-1}\rangle \right\}.\nonumber \end{eqnarray} In numerical calculations we restrict the sum over $n$ up to $10 \ldots 50$ depending on the correlation length. The results of the numerical calculation for $S_{xx}(\kappa,\omega)$ at sufficiently low temperature $T=0.1$ are shown in Figs.~\ref{x12}--\ref{x15}. In contrast to the $zz$ structure factor, $S_{xx}(\kappa,\omega)$ is not governed exclusively by the continuum of two-fermion excitations. However, the deeper inspection of Figs.~\ref{x12}--\ref{x15} reveals some resemblance between the $zz$ and $xx$ structure factors. Although there is no singular parts visible in $S_{xx}(\kappa,\omega)$ as well as abrupt boundaries for the regions with nonzero values, the dominating contribution in the case of positive $g_2$ is circumscribed by the boundaries of the two-fermion continua outlined in Appendix. The same feature was demonstrated earlier for the uniform and dimerized $XX$ chains \cite{Derzhko2000,Derzhko2002}. We can deduce from relation (\ref{502}) and Fig.~\ref{x12} that the staggered spin structure factor (\ref{503}) is minor at small fields. Thus, one can observe how the intensity of the structure factor $S_{xx}(\kappa,\omega)$ is redistributed between two basic continua of the uniform chain [see Fig.~\ref{x12}(a)] shifted by $\pi$ with respect to each other when $g_2$ decreases from 1 up to negative values. One can still recognize the similar feature even at intermediate field $h=0.5$ in case of $g_2>0$ in Fig.~\ref{x13}(b) where the combination of two continua of $S^0_{xx}(\kappa,\omega)$ and $S^0_{xx}(\kappa+\pi,\omega)$ creates an intricate intensity picture. Interestingly, the structure factor $S_{xx}(\kappa,\omega)$ for non-positive $g_2\leq 0$ is concentrated mainly along the lines \begin{eqnarray} \label{514} \lambda^{\pm}_{\kappa}=\sqrt{J^2\sin^2\kappa+g_-^2h^2}\pm g_+h. \end{eqnarray} Although the exact $xx$ correlation functions and the exact $xx$ structure factor are not known for $g_1g_2<0$, one can adapt the procedure of Refs.~\cite{cruz1981,Derzhko2002} for the case of the uniform and dimerized chains above the saturation field. We need to make the crucial assumption that the action of the Jordan-Wigner phase factors on the ground state is equivalent to its action on the ideal antiferromagnetic state. Then, the problem is reduced to calculation of the pair correlation functions for spinless fermions with the final result \begin{eqnarray} \label{515} &&\!\!\!\!\!S_{xx}(\kappa,\omega){\approx} \\ &&\frac{\pi}{4}\left\{\! \left(g_+^2 {+} g_-^2 {+} 4g^{}_+g^{}_-{\rm sgn}(h)u_{\kappa{+}\pi/2}|v_{\kappa{+}\pi/2}|\right)\!\delta(\omega{-}\lambda_{\kappa}^+) \right. \nonumber\\ &&\left. {+}\left(g_+^2 {+} g_-^2 {-} 4g^{}_+g^{}_-{\rm sgn}(h)u_{\kappa+\pi/2}|v_{\kappa+\pi/2}|\right)\!\delta(\omega{-}\lambda_{\kappa}^-) \!\right\}. \nonumber \end{eqnarray} Equation~(\ref{515}) although approximate, agrees with numerics shown in Figs.~\ref{x13}, \ref{x14} for negative $g_2$ (dashed and dashed-dot lines). If $g_2 \in (0,1]$ for magnetic fields close to $h_s$, the many-fermion continua shrink [see Fig.~\ref{x14}(a,b)] and above the saturation fields they reduce to the one-fermion excitation spectrum shifted by $\pi$ along the $\kappa$ axis with the reversed sign [i.e., $-\Lambda_{\kappa+\pi}$, dashed line in Fig.~\ref{x14}(a,b)] and if $g_2 \in (0,1)$, also by the one-fermion excitation spectrum multiplied by $-1$ [i.e., $-\Lambda_{\kappa}$, dashed-dot line in Fig.~\ref{x14}(b)], \begin{eqnarray} \label{516} S_{xx}(\kappa,\omega)&{=}&\frac{\pi}{2}\left[(g_{+}u_\kappa {-} g_{-}v_\kappa)^2\delta(\omega{-}\Lambda_\kappa) \right.\\ && \left. {+} (g_{+}v_\kappa {+} g_{-}u_\kappa)^2\delta(\omega{-}\Lambda_{\kappa{+}\pi}) \right],\: {\rm if}\: h<-h_s, \nonumber\\ S_{xx}(\kappa,\omega)&{=}&\frac{\pi}{2}\left[(g_{+}v_\kappa {-} g_{-}u_\kappa)^2\delta(\omega{+}\Lambda_{\kappa}) \right.\nonumber\\ && \left. {+} (g_{+}u_\kappa {+} g_{-}v_\kappa)^2\delta(\omega{+}\Lambda_{\kappa{+}\pi}) \right],\: {\rm if}\: h>h_s. \nonumber \end{eqnarray} In case of $g_2\leq 0$, in Fig.~\ref{x14}(c,d) we observe for higher field even more pronounced mode along the lines given in Eq.~(\ref{514}). \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig12a} \includegraphics[clip=on,width=\myfigsize]{xig12b} \includegraphics[clip=on,width=\myfigsize]{xig12c} \includegraphics[clip=on,width=\myfigsize]{xig12d} \caption{(Color online) The density plot of the dynamic structure factor $S_{xx}(\kappa,\omega)$. $J=-1$, $g_1=1$, $g_2=1$ (a), $g_2=0.5$ (b), $g_2=0$ (c), $g_2=-1$ (d), $h=0.1$ at low temperature $T=0.1$.} \label{x12} \end{figure} \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig13a} \includegraphics[clip=on,width=\myfigsize]{xig13b} \includegraphics[clip=on,width=\myfigsize]{xig13c} \includegraphics[clip=on,width=\myfigsize]{xig13d} \caption{(Color online) The density plot of the dynamic structure factor $S_{xx}(\kappa,\omega)$. $J=-1$, $g_1=1$, $g_2=1$ (a), $g_2=0.5$ (b), $g_2=0$ (c), $g_2=-1$ (d), $h=0.5$ at low temperature $T=0.1$. Dashed and dashed-dot curves follow Eq.~(\ref{514}).} \label{x13} \end{figure} \begin{figure} \centering \includegraphics[clip=on,width=\myfigsize]{xig14a} \includegraphics[clip=on,width=\myfigsize]{xig14b} \includegraphics[clip=on,width=\myfigsize]{xig14c} \includegraphics[clip=on,width=\myfigsize]{xig14d} \caption{(Color online) The density plot of the dynamic structure factor $S_{xx}(\kappa,\omega)$. $J=-1$, $g_1=1$, $g_2=1$, $h=0.9$ (a), $g_2=0.5$, $h=1.4$ (b), $g_2=0$, $h=1$ (c), $g_2=-1$, $h=1$ (d) at low temperature $T=0.1$. Dashed and dashed-dot curves in panels (a) and (b) correspond to $-\Lambda_{\kappa+\pi}$ and $-\Lambda_\kappa$. Dashed and dashed-dot curves in panels (c), (d) follow Eq.~(\ref{514}).} \label{x14} \end{figure} In Fig.~\ref{x15} we show the frequency profiles of the structure factor for several values of $\kappa=0,\pi/4,\pi/2,3\pi/4,\pi$. It is clearly seen there that the non-uniform $g$-factor leads to many-peak structure in the frequency dependences of $S_{xx}(\kappa,\omega)$ at the low temperature $T=0.1$, see Fig.~\ref{x15}(a). In contrast, the infinite temperature smears out the fine structure of $S_{xx}(\kappa,\omega)$ transforming the frequency profiles into $\kappa$-independent Gaussian ridges, see Fig.~\ref{x15}(b). Such a form can be obtained using the exact results for the time correlation functions of dimerized chain \cite{Perk1980}. Those correlation functions vanish if the sites are different that leads to a $\kappa$-independent structure factor $S_{xx}(\kappa,\omega)$. Utilizing the result of Ref.~\cite{Perk1980}, we get the following explicit formula for $S_{xx}(\kappa,\omega)$ at $T\to\infty$: \begin{eqnarray} \label{517} &&S_{xx}(\kappa,\omega) = \frac{1}{8}\int\limits_{-\infty}^{\infty}{\rm{d}}t e^{i\omega t} \text{Re}\left\{g_1^2Z_o(t)+g_2^2Z_e(t)\right\}, \\ &&Z_e(t) {=} \frac{\theta_3(z,q)}{\theta_3(z_0,q)} \frac{\theta_2(z^\prime,q)}{\theta_2(z^\prime_0,q)} {\exp}\!{\left[ i g_{+}^{} ht{-}{\left(\!1{-}\frac{{\rm{E}}(\widetilde{\varkappa})}{{\rm{K}}(\widetilde{\varkappa})}\right)}J_{+}^2t^2\right]}, \nonumber\\ &&Z_o(t)=\exp\left(i2g_{+}ht\right)Z^{*}_e(t), \nonumber\\ &&J_{\pm}=\frac{1}{2}\left(\sqrt{J^2+g_{-}^2h^2} \pm |g_{-}h| \right), \nonumber\\ &&\widetilde{\varkappa}=\frac{J_-}{J_+}=\frac{J^2}{\left(\sqrt{J^2+g_{-}^2h^2} + |g_{-}h| \right)^2}, \nonumber\\ &&q=\exp\left(-\frac{\pi{\rm{K}}(\sqrt{1-\widetilde{\varkappa}^2})}{{\rm{K}}(\widetilde{\varkappa})}\right),\nonumber \end{eqnarray} where $\theta_2(z^\prime,q)$, $\theta_3(z,q)$ are the Jacobi theta-functions (see \cite{Perk1980} and references therein) with \begin{eqnarray} \label{518} &&z=\frac{\pi(J_+t+iv_0)}{2{\rm{K}}(\widetilde{\varkappa})},\; z^\prime=\frac{\pi(J_+t-iv_0)}{2{\rm{K}}(\widetilde{\varkappa})} \nonumber\\ &&z_0=\frac{i\pi v_0}{2{\rm{K}}(\widetilde{\varkappa})},\; z_0^\prime=-\frac{i\pi v_0}{2{\rm{K}}(\widetilde{\varkappa})}, \end{eqnarray} and the parameter $v_0$ is defined by the following relation: \begin{eqnarray} \label{519} {\rm dc}(i v_0,\widetilde{\varkappa})=\frac{J}{2J_+}, \end{eqnarray} where ${\rm dc}(i v_0,\widetilde{\varkappa})={\rm dn}(v_0, 1-\widetilde{\varkappa}^2)$ is the elliptic delta amplitude function for imaginary argument. In case of strong magnetic field $h$ and non-uniform $g$-factors $g^{}_{-}\neq 0$ we have $\tilde\varkappa\ll 1$. Expanding the correlation functions for small $\tilde\varkappa$, we get the $xx$ structure factor in the explicit Gaussian form: \begin{eqnarray} \label{520} S_{xx}(\kappa,\omega)&\approx& \frac{\sqrt{2\pi}}{4|J|} \left[A_{-}\left(e^{-\frac{(\omega+\omega_{-})^2}{2J_{-}^2}} + e^{-\frac{(\omega-\omega_{-})^2}{2J_{-}^2}}\right) \right. \nonumber\\ &&\left. +A_{+}\left(e^{-\frac{(\omega+\omega_{+})^2}{2J_{-}^2}} + e^{-\frac{(\omega-\omega_{+})^2}{2J_{-}^2}}\right) \right], \nonumber\\ \omega_{\pm}&=&J_{+}\pm g_{+}h, \nonumber\\ A_{\pm}&=&(g_{+}^2+g_{-}^2)\frac{J_{+}}{|J|} \pm g_{+}g_{-}\sqrt{\frac{4J_{+}^2}{J^2}-1}. \end{eqnarray} From Eq.~(\ref{520}) it is clear that the intensity of the $xx$ structure factor in the infinite-temperature limit is concentrated near two Gaussian peaks at $\omega=\omega_{\pm}$. In Fig.~\ref{x16} we present the absorption intensity $I_x(\omega,h)$ as a function of the magnetic field. In contrast to the $I_{z}(\omega, h)$ case, here the field profiles do not exhibit any singularities. A prominent feature of the absorption profiles $I_x(\omega,h)$ is a two-peak structure for the case of different nonzero $g$-factors. The cases $g_2=0.5$ and $g_2=-0.5$ demonstrate additional satellite peak [Figs.~\ref{x16}(b,d)]. For the uniform chain ($g_1=g_2$) we can see one peak which moves with increasing of frequency to a higher value of magnetic field [Fig.~\ref{x16}(a)]. Qualitatively the same picture is seen for $g_2=0$ in Fig.~\ref{x16}(c), where the peak is less steeper in comparison to the case in Fig.~\ref{x16}(a). \begin{figure} \centering \includegraphics[clip=on,width=42.5mm]{xig15a} \includegraphics[clip=on,width=42.5mm]{xig15b} \caption{(Color online) $S_{xx}(\kappa,\omega)$ vs $\omega$ at $\kappa=0$, $\kappa=\pi/4$, $\kappa=\pi/2$, $\kappa=3\pi/4$, and $\kappa=\pi$. $J=-1$, $g_1=1$, $g_2=0.5$, $h=0.5$, $T=0.1$ (left panel), cf. Fig.~\ref{x13}, and $T\to\infty$ (right panel).} \label{x15} \end{figure} \begin{figure} \begin{center} \includegraphics[clip=on,width=42.5mm]{xig16a} \includegraphics[clip=on,width=42.5mm]{xig16b} \includegraphics[clip=on,width=42.5mm]{xig16c} \includegraphics[clip=on,width=42.5mm]{xig16d} \caption {Field profiles of the absorption intensity $I_{x}(\omega,h)$ at different frequencies $\omega$ for $J=-1$, $g_1=1$, $g_2=1$ (a), $g_2=0.5$ (b), $g_2=0$ (c), and $g_2=-0.5$ (d) at $T=1$.} \label{x16} \end{center} \end{figure} \section{Summary} \label{sec06} \setcounter{equation}{0} To summarize, we have studied the effect of the alternation of $g$-factors on the static and dynamic properties of the spin-1/2 $XX$ chain in a transverse field. The crucial point is that the conservation of the total magnetization is lost in this case. This evokes non-trivial changes in the thermodynamic and dynamic behavior of the model. While the logarithmic peculiarities of the magnetization and the susceptibility at $T=0$ were obtained earlier \cite{Kontorovich1968}, we found peculiarities in the low-temperature thermodynamics. In particular, we have shown that the specific heat can change its behavior from the linear dependence in the spin-liquid phase to the $\sqrt{T}$ dependence at the saturation field, and finally transformed to the exponential law (\ref{408}). The susceptibility at zero magnetic field displays the logarithmic divergence with temperature as it follows in Eq.~(\ref{chi_h=0}). We have performed the detailed study of the dynamic properties. We calculated the dynamic structure factors $S_{zz}(\kappa,\omega)$ and $S_{xx}(\kappa,\omega)$ and inspected how they change in the external magnetic field for different period-2 alternations of $g$-factors. In the case when both $g$-factors are of the same sign, the correspondence between the boundaries of the $zz$ and $xx$ structure factors is still present like it was observed previously \cite{Derzhko2000, Derzhko2002}. On the contrary, if $g_1 g_2 \leq 0$, a large enough magnetic field leads to the highly intense modes in the $xx$ structure factor. In addition, we calculated the absorption intensity $I_{\alpha}(\omega,h)$ for the different configuration of ESR experiments. In the Voigt configuration ($\alpha=z$), the model with uniform $g$-factors does not have any response. In the case when $g_2$ differs from $g_1$, we obtain the nonzero contribution to the absorption intensity. For sufficiently large frequencies $\omega>2|J|$ the van Hove singularity arises at $h=\sqrt{\omega^2-4J^2}/(2|g_{-}|)$. In the Faraday configuration ($\alpha=x$), the situation is a bit different. The absorption spectra can be observed in the uniform case. It shows a broad maximum at some resonance field. The alternation of $g$-factor leads to the doubling of this resonance line. Although in our study we focus on the exactly solvable $XX$ chain, from Ref.~\cite{Mueller1981} we know that such analysis of dynamics is useful for understanding a more realistic case of the Heisenberg chains. \section*{Acknowledgments} The present study was supported by the ICTP (OEA, network-68 and NT-04): V.~O. acknowledges the kind hospitality of the ICMP during his visits in 2015--2019; T.~V. and O.~B. acknowledge the kind hospitality of the Yerevan University in 2016, 2017, and 2018. The work of T.~K. and O.~D. was partially supported by Project FF-30F (No.~0116U001539) from the Ministry of Education and Science of Ukraine. V.~O. acknowledges the partial support from the ANSEF project condmatth-5212, as well as the support from the HORIZON 2020 RISE "CoExAN" project (GA644076). \section*{Appendix: Boundaries of the two-fermion excitation continua} \renewcommand{\theequation}{A\arabic{equation}} \setcounter{equation}{0} Let us present the expressions for the lines in the $(\kappa,\omega)$ plane, which restrict the regions for different number of solutions of Eqs.~(\ref{506}) as it is shown in Fig.~\ref{x05}(a); green lines. We have \begin{eqnarray} \label{a01} &&\omega_{1,2}(\kappa) = \sqrt{2\left(J^2+2g_-^2h^2\pm J^2\cos\kappa\right)}, \\ &&\omega_{3,4}(\kappa) = \left\vert\sin\kappa\right\vert \left(\sqrt{J^2+g_-^2h^2} \pm \left\vert{g_-h}\right\vert\right), \nonumber\\ &&\omega_{5,6}(\kappa) = \sqrt{J^2\sin^2\kappa+{g_-^2h^2}}\pm\left\vert{g_-h}\right\vert. \nonumber \end{eqnarray} Let us also present the expressions in the case $|h|<h_s$, $g_1 g_2>0$ for the characteristic lines, which bounded nonzero values of the Fermi-Dirac functions at $T=0$ [see also Fig.~\ref{x05}(c); red lines]. We have \begin{eqnarray} \label{a02} \omega_{7,8}(\kappa) &=& \left\vert {g_+ h} {+} \sqrt{J^2\cos^2\left(\kappa_0\pm\kappa\right){+}{g_-^2h^2}} \right\vert, \\ \omega_{9,10}(\kappa) &=& \left\vert {g_+ h} {-} \sqrt{J^2\cos^2\left(\kappa_0\pm\kappa\right){+}{g_-^2h^2}} \right\vert. \nonumber \end{eqnarray} Here $\kappa_0$ is defined in Eq.~\eqref{302}.
\section{Introduction} \label{sec-introduction} Recognizing text in the wild has attracted great interest in computer vision \citep{ye2015text,zhu2016scene,yang2017learning,shi2018aster,yang2019symmetry}. Recently, methods based on convolutional neural networks (CNNs) \citep{wang2012end,Jaderberg2015Deep,jaderberg2016reading} have significantly improved the accuracy of scene text recognition. Recurrent neural networks (RNNs) \citep{he2016reading,shi2016robust,shi2017end} and attention mechanism \citep{lee2016recursive,cheng2017focusing,cheng2017arbitrarily,yang2017learning} are also beneficial for recognition. Nevertheless, recognizing text in natural images is still challenging and largely remains unsolved \citep{shi2018aster}. As shown in Figure \ref{fig:1-complex-background}, text is found in various scenes, exhibiting complex backgrounds. The complex backgrounds cause difficulties for recognition. For instance, the complicated images often lead to attention drift \citep{cheng2017focusing} for attention networks. Thus, if the complex background style is normalized to a clean one, the recognition difficulty will significantly decreases. \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth]{pic-complex-background.png} \caption{Examples of scene text with complex backgrounds, making recognition very challenging.} \label{fig:1-complex-background} \end{figure} With the development of GANs \citep{Johnson2016hp,Cheng2019jc,Jing2019gf} in recent years, it is possible to migrate the scene background from a complex style to a clean style in scene text images. However, vanilla GANs are not sufficiently robust to generate sequence-like characters in natural images \citep{Fang2019vc}. As shown in Figure \ref{fig:cycleGAN} (a), directly applying the off-the-shelf CycleGAN fails to retain some strokes of the characters. In addition, as reported by Liu et al.\ \citep{liu2018synthetically}, applying a similar idea of image recovery to normalize the backgrounds for sequence-like objects fails to generate clean images. As illustrated in Figure \ref{fig:cycleGAN} (b), some characters on the generated images are corrupted, which leads to misclassification. One possible reason for this may be the discriminator is designed to focus on non-sequential object with a global coarse supervision \citep{zhang2019sequence}. Therefore, the generation of sequence-like characters requires more fine-grained supervision. One potential solution is to employ the pixel-wise supervision \citep{Isola2017kl}, which requires paired training samples aligning at pixel level. However, it is impossible to collect paired training samples in the wild. Furthermore, annotating scene text images with pixel-wise labels can be intractably expensive. To address the lack of paired data, it is possible to synthesize a large number of paired training samples, because synthetic data is cheaper to obtain. This may be why most state-of-the-art scene text recognition methods \citep{cheng2017arbitrarily,shi2018aster,cluo2019moran} only use synthetic samples \citep{jaderberg2014synthetic,gupta2016synthetic} for training, as tens of millions of training data are immediately available. However, experiments of Li et al.\ \citep{li2018show} suggest that there exists much room for improvement in synthesis engines. Typically a recognizer trained using real data significantly outperforms the ones trained using synthetic data due to the domain gap between artificial and real data. Thus, to enable broader application, our goal here is to improve GANs to meet the requirement of text image generation and address the unpaired data issue. \begin{figure}[t] \centering \includegraphics[width=.48\textwidth]{pic-cycleGAN.png} \caption{Text content extraction of (a) CycleGAN, (b) Liu et al.\ \citep{liu2018synthetically} and (c) our method. Our method uses character-level adversarial training and thus better preserves the strokes of every character and removes complex backgrounds.} \label{fig:cycleGAN} \end{figure} We propose an adversarial learning framework with an interactive joint training scheme, which achieves success in separating text content from background noises by using only source training images and the corresponding text labels. The framework consists of an attention-based recognizer and a generative adversarial architecture. We take advantage of the attention mechanism in the attention-based recognizer to extract the features of each character for further adversarial training. In contrast to global coarse supervisions, character-level adversarial training provides guidance for the generator in a fine-grained manner, which is critical to the success of our approach. Our proposed framework is a meta framework. Thus, recent mainstream recognizers \citep{cheng2017arbitrarily,shi2018aster,cluo2019moran,li2018show} equipped with attention-based decoders \citep{bahdanau2014neural} can be integrated into our framework. As illustrated in Figure~\ref{fig:overall-interactive}, the attention-based recognizer predicts a mask for each character, which is shared with the discriminator. Thus, the discriminator is able to focus on every character and guide the generator to filter out various background styles while retaining the character content. Benefiting from the advantage of the attention mechanism, the interactive joint training scheme requires only the images and corresponding text labels, without requirement of character bounding box annotation. Simultaneously, the target style training samples can be simply synthesized online during the training. As shown in Figure~\ref{fig:2-training-data}, for each target style sample, we randomly choose one character and simply render the character onto a clean background. Each sample contains a black character on a white background or a white character on a black background. The target style samples are character-level, whereas the input style samples are word-level. The unpaired training samples suggest our training process is flexible. \begin{figure}[t] \centering \includegraphics[width=.48\textwidth]{pic-overall-interactive.png} \caption{Interactive joint training of our framework. The attention-based recognizer shares the position and prediction of every character with the discriminator, whereas the discriminator learns from the confusion of the recognizer, and guides the generator so that it can generate clear text content and clean background style to ease reading.} \label{fig:overall-interactive} \end{figure} Moreover, we take a further step of the interactive joint training scheme. In addition to the sharing of attention masks, we proposed a feedback mechanism, which bridge the gap between the recognizer and the discriminator. The discriminator guides the generator according to the confusion of the recognizer. Thus, the erroneous character patterns on the generated images are corrected. For instance, the patterns of the characters ``C'' and ``G'' are similar, which can easily cause failed prediction of the recognizer. After the training using our feedback mechanism, the generated patterns are more discriminative, and incorrect predictions on ambiguous characters can be largely avoided. To summarize, our main contributions are as follows. \begin{itemize} \item[$ 1) $] We propose a framework that separates text content from complex background styles to reduce recognition difficulty. The framework consists of an attention-based recognizer and a generative adversarial architecture. We devise an interactive joint training of them, which is critical to the success of our approach. \item[$ 2) $] The shared attention mask enables character-level adversarial training. Thus, the unpaired target style samples can be simply synthesized online. The training of our framework requires only the images and corresponding text labels. Additional annotations such as bounding boxes or pixel-wise labels are unnecessary. \item[$ 3) $] We further propose a feedback mechanism to improve the robustness of the generator. The discriminator learns from the confusion of the recognizer and guides the generator so that it can generate clear character patterns that facilitate reading. \item[$ 4) $] Our experiments demonstrate that mainstream recognizers can benefit from our method and achieve new state-of-the-art performance by extracting text content from complex background styles. This suggests that our framework is a meta-framework, which is flexible for integration with recognizers. \end{itemize} \begin{figure}[t] \centering \includegraphics[width=.48\textwidth]{pic-training-data.png} \caption{Training samples and generations. Left: Widely used training datasets released by Jaderberg et al. \citep{jaderberg2014synthetic} and Gupta et al. \citep{gupta2016synthetic}. Middle: Unpaired target style samples, which are character-level and synthesized online. Right: Output of the generator.} \label{fig:2-training-data} \end{figure} \section{Related Work} \label{section:Related work} In this section, we review the previous methods that are most relevant to ours with respect to two categories: scene text recognition and generative adversarial networks. \textbf{Scene text recognition.} Overviews of the notable work in the field of scene text detection and recognition have been provided by Ye et al.\ \citep{ye2015text} and Zhu et al.\ \citep{zhu2016scene}. The methods based on neural networks outperform the methods with hand crafted features, such as HOG descriptors \citep{dalal2005histograms}, connected components \citep{neumann2012real}, strokelet generation \citep{yao2014strokelets}, and label embedding \citep{rodriguez2015label}, because the trainable neural network is able to adapt to various scene styles. For instance, Bissacco et al. \citep{bissacco2013photoocr} applied a network with five hidden layers for character classification, and Jaderberg et al. \citep{Jaderberg2015Deep} proposed a CNN for unconstrained recognition. The CNN-based methods significantly improve the performance of recognition. Moreover, the recognition models yield better robustness when they are integrated with RNNs \citep{he2016reading,shi2016robust,shi2017end} and attention mechanisms \citep{lee2016recursive,cheng2017focusing,cheng2017arbitrarily,yang2017learning}. For example, Shi et al.\ \citep{shi2017end} proposed an end-to-end trainable network using both CNNs and RNNs, namely CRNN. Lee et al.\ \citep{lee2016recursive} proposed a recursive recurrent network using attention modeling for scene text recognition. Cheng et al.\ \citep{cheng2017focusing} used a focusing attention network to correct attention alignment shifts caused by the complexity or low-quality of images. These methods have made great progress in regular scene text recognition. With respect to irregular text, the irregular shapes introduce more background noise into the images, which increases recognition difficulty. To tackle this problem, Yang et al.\ \citep{yang2017learning} and Li et al.\ \citep{li2018show} used the two-dimensional (2D) attention mechanism for irregular text recognition. Liao et al.\ \citep{liao2019scene} recognized irregular scene text from a 2D perspective with a semantic segmentation network. Additionally, Liu et al.\ \citep{liu2016star}, Shi et al.\ \citep{shi2016robust,shi2018aster}, and Luo et al.\ \citep{cluo2019moran} proposed rectification networks to transform irregular text images into regular ones, which alleviates the interference of the background noise, and the rectified images become readable by a one-dimensional (1D) recognition network. Yang et al.\ \citep{yang2019symmetry} used character-level annotations for supervision for a more accurate description for rectification. Despite the many praiseworthy efforts that have been made, irregular scene text on complex backgrounds is still difficult to recognize in many cases. \textbf{Generative adversarial networks.} With the widespread application of GANs \citep{goodfellow2014generative,mao2017least,odena2017conditional,Zhu2017hr}, font generation methods \citep{azadi2018multi,Yang2019Controllable} using adversarial learning have been successful on document images. These methods focus on the style of a single character and achieve incredible visual effects. However, our goal is to perform style normalization on noisy background, rather than the font, size or layout. A further challenge is to keep multiple characters for recognition. That means style normalization of the complex backgrounds of scene text images requires accurate separation between the text content and background noise. Traditional binarization/segmentation methods \citep{casey1996survey} typically work well on document images, but fail to handle the substantial variation in text appearance and the noise in natural images \citep{shi2018aster}. Style normalization of background in scene text images remains an open problem. Recently, several attempts on scene text generation have taken a crucial step forward. Liu et al.\ \citep{liu2018synthetically} guided the feature maps of an original image towards those of a clean image. The feature-level guidance reduces the recognition difficulty, whereas the image-level guidance does not result in a significant improvement in text recognition performance. Fang et al.\ \citep{Fang2019vc} designed a two-stage architecture to generate repeated characters in images. An additional 10k synthetic images boost the performance, but more synthetic images do not improve accuracy linearly. Wu et al.\ \citep{Wu2019bt} edited text in natural images using a set of corresponding synthetic training samples to preserve the style of both background and text. These methods provided sufficient visualized examples. However, the poor recognition performance on complex scene text remains a challenging problem. We are interested in taking a further step to enable recognition performance to benefit from generation. Our method integrates the advantages of the attention mechanism and the GAN, and jointly optimizes them to achieve better performance. The text content is separated from various background styles, which are normalized for easier reading. \section{Methodology} \label{section:Methodology} We design a framework to separate text content from noisy background styles, through an interactive joint training of an attention-based recognizer and a generative adversarial architecture. The shared attention masks from the attention-based recognizer enable character-level adversarial training. Then, the discriminator guides the generator to achieve background style normalization. In addition, a feedback mechanism bridges the gap between the discriminator and recognizer. The discriminator guides the generator according to the confusion of the recognizer. Thus, the generator can generate clear character patterns that facilitate reading. In this section, we first introduce the attention decoder in mainstream recognizers. Then, we present a detailed description of the interactive joint training scheme. \subsection{Attention Decoder} \begin{figure}[t] \centering \includegraphics[width=8cm,height=3.5cm]{pic-attention.png} \caption{Attention decoder, which recurrently attends to informative regions and outputs predictions.} \label{fig:attention} \end{figure} \begin{figure*}[t] \centering \includegraphics[width=0.96\textwidth]{pic-overall.png} \caption{Interactive joint training. The recognizer shares attention masks with the discriminator, whereas the discriminator learns from the predictions of the recognizer and updates the generator using ground truth. The shared attention masks work on feature maps, which we present in the generated images for better visualization.} \label{fig:3-overview} \end{figure*} To date the attention decoder \citep{bahdanau2014neural} has become widely used in recent recognizers \citep{shi2018aster,cluo2019moran,li2018show,yang2019symmetry}. As shown in Figure \ref{fig:attention}, the decoder sequentially outputs predictions $(y_{1},y_{2} ...,y_{N})$ and stops processing when it predicts an end-of-sequence token $``EOS"$ \citep{sutskever2014sequence}. At time step $t$, output $y_t$ is given by \begin{equation} y_{t} = softmax(\bm{W}_{out}\bm{s}_{t}+b_{out}), \end{equation} where $\bm{s}_t$ is the hidden state at the $t$-th step. Then, we update $\bm{s}_t$ by \begin{equation} \bm{s}_t = GRU(\bm{s}_{t-1}, (y_{t-1}, \bm{g}_{t})), \end{equation} where $\bm{g}_{t}$ represents the glimpse vectors \begin{equation} \bm{g}_{t} = \sum_{i=1}^n(\alpha_{t,i} \bm{h}_{i}), \bm{\alpha}_{t} \in \mathbb{R}^n, \label{equ-share} \end{equation} where $\bm{h}_{i}$ denotes the sequential feature vectors. Vector $\bm{\alpha}_{t}$ is the vector of attention mask, expressed as follows: \begin{equation} \alpha_{t,i} = \frac{\exp(e_{t,i})}{\sum_{j=1}^n(\exp(e_{t,j}))}, \end{equation} \begin{equation} e_{t,i} = \bm{w}^\mathrm{T}Tanh(\bm{W}_{s}\bm{s}_{t-1}+\bm{W}_{h}\bm{h}_{i}+b). \end{equation} Here, $\bm{W}_{out}$, $b_{out}$, $\bm{w}^\mathrm{T}$, $\bm{W}_{s}$, $\bm{W}_{h}$ and $b$ are trainable parameters. Note that $y_{t-1}$ is the $(t-1)$-th character in the ground truth in the training phase, whereas it is the previously predicted output in the testing phase. The training set is denoted as $\bm{D} = \left \{I_{i}, Y_{i} \right \}, i=1...N $. The optimization is to minimize the negative log-likelihood of the conditional probability of $\bm{D}$ as follows: \begin{equation} \mathcal{L}_{reg} = -\sum_{i=1}^N{ \sum_{t=1}^{| Y_{i} |}{\log p(Y_{i,t} \left| \right. I_{i}; \theta)} }, \end{equation} where $Y_{i,t}$ is the ground truth of the $t$-th character in $I_{i}$ and $\theta$ denotes the parameters of the recognizer. \subsection{Interactive Joint Training for Separating Text from Backgrounds} As vanilla discriminator is designed for non-sequential object with a global coarse supervision, directly employing a discriminator fails to provide effective guidance for the generator. In contrast to apply a global discriminator, we supervise the generator in a fine-grained manner, namely, character-level adversarial learning, by taking advantage of the attention mechanism. Training the framework at character level also reduces the complexity of the preparation of target style data. Every target style sample containing one character can be easily synthesized online. \textbf{Sharing of attention masks.} Given an image $I$ as input, the goal of our generator $G$ is to generate a clean image $I'$ without a complex background. The discriminator $D$ encodes the image $I'$ as \begin{equation} \bm{E} = Encode(I'). \end{equation} With similar settings of the backbone in recognizer (e.g., kernel size, stride size and padding size in the convolutional and pooling layers), the encoder in the discriminator is designed to output an embedding vector $\bm{E}_i$ with the same size as that of $\bm{h}_i$ in Equation \eqref{equ-share}, which enables the recognizer to share attention mask $\bm{\alpha}_{t}$ with the discriminator. After that, character-level features of the generation are extracted by \begin{equation} \bm{F}_{gen, t} = \sum_{i=1}^n(\alpha_{t,i} \bm{E}_{i}), \bm{\alpha}_{t} \in \mathbb{R}^n. \end{equation} The extracted character features are used for further adversarial training. \textbf{Unpaired target style samples.} Benefiting from our character-level adversarial learning, target style samples can be simply synthesized online. As illustrated in Figures \ref{fig:2-training-data} and \ref{fig:3-overview}, every target style sample contains only a black character on a white background or a white character on a black background. The characters are randomly chosen. Following the previous methods for data synthesis \citep{jaderberg2014synthetic,gupta2016synthetic}, we collect fonts\footnote{\url{https://fonts.google.com}} to synthesize the target style samples. The renderer is a simple and publicly available engine\footnote{\url{https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html}} that can efficiently synthesize samples online. Owing to the diversity of the fonts, the font sensitivity of the discriminator is thereby decreased, which enables the discriminator to focus on the background styles. Because there is only one character in a target style image, we apply global average-pooling to the embedding features for every target style sample $I_{t}$ as follows: \begin{equation} \bm{F}_{tgt} = averagePooling\big(Encode(I_t)\big). \end{equation} The features of the $t$-th character in the generated image $\bm{F}_{gen, t}$ and the target style sample $\bm{F}_{tgt}$ are prepared for the following adversarial training. \textbf{Adversarial training on style.} We use a style classifier in the discriminator to classify the style of characters in the generated images as fake and the characters in the target style samples as real. We use the 0$-$1 binary coding \citep{mao2017least} for style adversarial training, which is formulated as \begin{equation} \small \begin{split} & \min \limits_{D} \mathcal{L}_{s} = \mathbb{E}_{I_t} [\big(1-Style(\bm{F}_{tgt})\big)^2] + \mathbb{E}_{I', t} \big[Style(\bm{F}_{gen, t})^2\big], \\ & \min \limits_{G} \mathcal{L}_{s} = \mathbb{E}_{I', t} \big[\big(1-Style(\bm{F}_{gen, t})\big)^2\big], \end{split} \end{equation} where $Style(\cdot)$ denotes the style classifier. The advantages of character-level adversarial training are threefold: 1) Because the background is complicated in a scene text image, the background noise varies substantially in different character regions. Considering the text string as a whole and supervising the training in a global manner may cause the failure of the generator, as discussed previously in Section \ref{sec-introduction} and Figure \ref{fig:cycleGAN}. Thus, we encourage the discriminator to inspect the generation in a more fine-grained manner, namely, character-level supervision, which contributes to the effective learning. 2) Training at character level brings a benefit for the preparation of target style data. For the synthesis of a text string, it is necessary to consider the text shape, the space between neighboring characters and the rotation of every character \citep{jaderberg2014synthetic,gupta2016synthetic}. In contrast, we can simply synthesize only one character on a clean background for every target style sample. Therefore, our target style samples can be simply synthesized online during the training. 3) The training is free of the need for paired data. Because the attention mechanism decomposes a text string into several characters and benefits the further training, only input scene text images and corresponding text labels are required. Hence, our framework is potentially flexible enough to make full use of available data to gain robustness. \textbf{Feedback mechanism.} As our goal is to improve recognition performance, we are not only interested in the styles of the backgrounds, but also the quality of the generated content. Therefore, we use a content classifier in the discriminator to supervise content generation. In contrast to the previous work auxiliary classifier GAN \citep{odena2017conditional}, which used ground truth to supervise the content classifier, our content classifier learns from the predictions of the recognizer. This bridges the gap between the recognizer and discriminator. The discriminator thus can guide the generator according to the confusion of the recognizer. After the training with this feedback mechanism, the generated patterns are more discriminative, which facilitates recognition. The details of the feedback mechanism are present as follows. The generator $G$ and discriminator $D$ are updated by alternately optimizing \begin{equation} \begin{split} \min \limits_{D} & \mathcal{L}_{c, D}= \mathbb{E}_{(I, P), (I_t, GT)} [-\log Content(GT | \bm{F}_{tgt} ) \\ & -\frac{1}{|P|} \sum_{t=1}^{|P|} \log Content(P_t | \bm{F}_{gen, t})], \label{eq:d-content} \end{split} \end{equation} \begin{equation} \begin{split} \min \limits_{G} \mathcal{L}_{c, G}= \mathbb{E}_{I, GT} [-\frac{1}{|GT|}\sum_{t=1}^{|GT|}\log Content(GT_t | \bm{F}_{gen, t} )], \end{split} \end{equation} where $GT$ denotes the ground truth of the input image $I$ and target style sample $I_t$. In addition, $Content(\cdot)$ is the content classifier. Note that the discriminator learns from the predictions $P$ on $I$ of the recognizer, whereas it uses $GT$ of $I$ to update the generator. This is an adversarial process that is similar to that of GAN training \citep{goodfellow2014generative,mao2017least,odena2017conditional,Zhu2017hr}. They use different labels for the discriminator and generator, but backpropagate the gradient using the same parameters as those of the discriminator. Alternately optimizing the discriminator and generator achieves adversarial learning. There are some substitution errors in the predictions $P$ that are different from the $GT$. Therefore, the second term of the right side in Equation \eqref{eq:d-content} can be formulated as content adversarial training as \begin{equation} \begin{split} -\frac{1}{|P|} & \sum_{t=1}^{|P|}\log Content(P_t|\bm{F}_{gen, t}) = \\ -\frac{1}{|P|} [ & \sum_{i=1}^{|P_{real}|}\log Content(P_{real, i}|\bm{F}_{gen, i}) \\ + & \sum_{j=1}^{|P_{fake}|}\log Content(P_{fake, j}|\bm{F}_{gen, j}) ], \end{split} \end{equation} where $P_{real}$ and $P_{fake}$ present the correct and incorrect predictions of the recognizer, respectively. Note that $P_{real} \cup P_{fake} = P$. Since the discriminator with the content classifier learns from the predictions of the recognizer, it guides the generator to correct erroneous character patterns in the generated images. For instance, similar patterns such as ``C'' and ``G'', or ``O'' and ``Q", may cause failed prediction of the recognizer. If a ``G" is transformed to look more like a ``C" and the recognizer predicts it to be a ``C", the discriminator will learn that the pattern is a ``C" and guide the generator to generate a clearer ``G". We show more examples and further discuss this issue in Section \ref{section:Experiments}. \def\mbox{\boldmath$ \emptyset$}{\mbox{\boldmath$ \emptyset$}} \begin{algorithm}[b] \SetAlgoLined Discriminator: $D$; Generator: $G$\; Batch size: $B$\; Balance factor: $\beta$ (initialized as 1.0)\; \While{not at the end of training}{ Sample $B$ training images as $I$, $I' = G(I)$\; Randomly synthesize $B$ target style samples as $I_t$\; Obtain the predictions $P$ on $I'$\; Use $I'$ and $GT$ to update the recognizer: $\min \mathcal{L}_{reg}$, and obtain attention masks for the $D$\; $I_{chosen} = \mbox{\boldmath$ \emptyset$}$\; $P_{chosen} = \mbox{\boldmath$ \emptyset$}$\; $GT_{chosen} = \mbox{\boldmath$ \emptyset$}$\; \For{i in $1:B$}{ \If{$length(P_i) = length(GT_i)$} { \If{edit distance of $(P_i, GT_i)\le 1$}{ $I_{chosen} \leftarrow I_{chosen} \cup \{I'_i\}$\; $P_{chosen} \leftarrow P_{chosen} \cup \{P_i\}$\; $GT_{chosen} \leftarrow GT_{chosen} \cup \{GT_i\}$\; } } } \If{$I_{chosen} \ne \mbox{\boldmath$ \emptyset$}$}{ Generate a random number $k \in [0, 1)$\; \If{$k \le \beta$}{ Use $I_{chosen}, P_{chosen}$ \\ to update the $D$: $\max \limits_{D} \mathcal{L}_{s}$, $\min \limits_{D} \mathcal{L}_{c, D}$\; } Use $I_{chosen}, GT_{chosen}$ \\ to update the $G$: $\min \limits_{G} \mathcal{L}_{s}$, $\min \limits_{G} \mathcal{L}_{c, G}$\; $\beta \leftarrow \frac{\mathcal{L}_{s}+\mathcal{L}_{c, D}}{\mathcal{L}_{s}+\mathcal{L}_{c, G}}$\; } } \caption{Interactive joint training} \label{alg:interactive-training} \end{algorithm} \textbf{Interactive joint training.} The pseudocode of the interactive joint training scheme is presented in Algorithm \ref{alg:interactive-training}. During the training of our framework, we found that the discriminator often learns faster than the generator. A similar problem has also been reported by others \citep{BerthelotSM17,heusel2017gans}. The Wasserstein GAN \citep{ArjovskyCB17} uses more update steps for the generator than the discriminator. We simply adjust the number of steps according to a balance factor $\beta \in (0, 1)$. If the discriminator learns faster than the generator, then the value of $\beta$ decreases, potentially resulting in a pause during the update steps for the discriminator. In practice, this trick contributes to the training stability of the generator. We first sample a set of input samples, and randomly synthesize unpaired samples of target style. Then, the recognizer makes predictions on the generated images and shares its attention masks with the discriminator. To avoid the effects of incorrect alignment between character features and labels \citep{bai2018edit}, we filter out some predictions using the metrics of edit distance and string length. The corresponding images are also filtered out. Only substitution errors exist in the remaining predictions. Finally, the discriminator and generator are alternately optimized to achieve adversarial learning. After the adversarial training, the generator can separate text content from complex background styles. The generated patterns are clearer and easier to read. As illustrated in Figure \ref{fig:4-generated}, the generator works well on both regular text and slanted/curved text. Because the irregular shapes of the text introduce more surrounding background noise, the recognition difficulty can be significantly reduced by using our method. \begin{figure}[t] \centering \subfigure[]{ \begin{minipage}[c]{0.25\textwidth} \centering \includegraphics[width=3.5cm, height=7cm]{pic-generated-regular.png} \end{minipage}% }% \subfigure[]{ \begin{minipage}[c]{0.25\textwidth} \centering \includegraphics[width=3.5cm, height=7cm]{pic-generated-irregular.png} \end{minipage}% }% \caption{Generated images for (a) regular and (b) irregular text. Input images are on the left and the corresponding generated images are on the right. The text content is separated by the generator from the noisy background styles. In the generated images, the font style tends to be an average style.} \label{fig:4-generated} \end{figure} \section{Experiments} \label{section:Experiments} In this section, we provide the training details and report the results of extensive experiments on various benchmarks, including both regular and irregular text datasets, demonstrating the effectiveness and generality of our method. As paired text images in the wild are not available and there exists great diversity in the number of characters and image structure between the input images and our target style images, popular GAN metrics such as the inception score \citep{Salimans2016wg} and Fr\'echet inception distance \citep{heusel2017gans} cannot be directly applied in our evaluation. Instead, we use the word accuracy of recognition, which is a more straightforward metric, and is of interest for our target task, to measure the performance of all the methods. Recall that our goal here is to improve recognition accuracy. \subsection{Datasets} \textbf{SynthData}, which contains 6-million data released by Jaderberg et al. \citep{jaderberg2014synthetic} and 6-million data released by Gupta et al. \citep{gupta2016synthetic}, is a widely used training dataset. Following the most recent work for fair comparison, we select it as the training dataset. Only word-level labels are used, but other extra annotation is unnecessary in our framework. The model is trained using only synthetic text images, without any fine-tuning for each specific dataset. IIIT5K-Words \citep{mishra2012scene} (\textbf{IIIT5K}) contains 3,000 cropped word images for testing. Every image has a 50-word lexicon and a 1,000-word lexicon. The lexicon consists of the ground truth and some randomly picked words. Street View Text \citep{wang2011end} (\textbf{SVT}) was collected from the Google Street View, and consists of 647 word images. Each image is associated with a 50-word lexicon. Many images are severely corrupted by noise and blur or have very low resolutions. ICDAR 2003 \citep{lucas2003icdar} (\textbf{IC03}) contains 251 scene images that are labeled with text bounding boxes. For fair comparison, we discarded images that contain non-alphanumeric characters or those have fewer than three characters, following Wang et al. \citep{wang2011end}. The filtered dataset contains 867 cropped images. Lexicons comprise of a 50-word lexicon defined by Wang et al. \citep{wang2011end} and a “full lexicon”. The latter lexicon combines all lexicon words. ICDAR 2013 \citep{karatzas2013icdar} (\textbf{IC13}) inherits most of its samples from IC03. It contains 1,015 cropped text images. No lexicon is associated with this dataset. SVT-Perspective \citep{quy2013recognizing} (\textbf{SVT-P}) contains 645 cropped images for testing. Images were selected from side-view angle snapshots in Google Street View. Therefore, most images are perspective distorted. Each image is associated with a 50-word lexicon and a full lexicon. CUTE80 \citep{risnumawan2014robust} (\textbf{CUTE}) contains 80 high-resolution images taken of natural scenes. It was specifically collected for evaluating the performance of curved text recognition. It contains 288 cropped natural images for testing. No lexicon is associated with this dataset. ICDAR 2015 \citep{karatzas2015icdar} (\textbf{IC15}) contains 2077 images by cropping the words using the ground truth word bounding boxes. Cheng et al. \citep{cheng2017focusing} filtered out some extremely distorted images and used a small evaluation set (referred as \textbf{IC15-S}) containing only 1811 test images. \begin{table*}[t] \renewcommand\arraystretch{1.2} \centering \caption{Word accuracy on the testing datasets using different inputs. The recognizer is trained on the source and generated images, respectively.} \label{table:ablation-study} \setlength{\tabcolsep}{4mm}{ \begin{tabular}{c c c c c c c c } \toprule \multirow{2}{*}{Input Image} & \multicolumn{4}{c}{Regular Text} & \multicolumn{3}{c}{Irregular Text} \\ \cmidrule(lr){2-5} \cmidrule(lr){6-8} & IIIT5K & SVT & IC03 & IC13 & SVT-P & CUTE & IC15 \\ \midrule Source $I$ & 92.2 & 85.9 & 94.0 & 90.7 & 75.7 & 74.3 & 72.0 \\ Generation $I'$ & \textbf{92.5} & \textbf{86.6} & \textbf{95.0} & \textbf{91.4} & \textbf{79.2} & \textbf{80.9} & \textbf{73.0} \\ \bottomrule \end{tabular} } \end{table*} \subsection{Implementation Details} As our proposed method is a meta-framework for recent attention-based recognition methods \citep{shi2018aster,cluo2019moran,li2018show,yang2019symmetry}, recent recognizers can be readily integrated with our framework. Thus the recognizer implementation follows their specific design. Here we present details of the discriminator, generator, and training. \textbf{Generator. }The generator is a feature pyramid network (FPN)-like \citep{lin2017feature} architecture that consists of eight residual units. Each residual unit comprises a $1 \times 1$ convolution followed by two $3 \times 3$ convolutions. Feature maps are downsampled by $2 \times 2$ stride convolutions in the first three residual units. The numbers of output channels of the first four residual units are 64, 128, 256, and 256, respectively. The last four units are symmetrical with the first four, but we upsample the feature map by simple resizing. We apply element-wise addition to the output of the third and fifth units. At the top of the generator, there are two convolution layers that have 16 filters and one filter, respectively. \textbf{Discriminator. }The encoder in the discriminator consist of seven convolutional layers that have 16, 64, 128, 128, 192 and 256 filters. Their kernel sizes are all $3 \times 3$, except for the size of the last one, which is $2 \times 2$. The first, second, fourth and sixth convolutional layers are each followed by an average-pooling layer. Using settings similar to those of the backbone in the recognizer (e.g., kernel size, stride size and padding size in the convolutional and pooling layers), the output size of the encoder can be controlled to meet the requirements of the attention mask sharing of the recognizer. Both the style and content classifiers in the discriminator are one-layer fully connected networks. \textbf{Training. }We use Adam \citep{kingma2015adam} to optimize the GAN. The learning rate is set to 0.002. It is decreased by a factor of 0.1 at epochs 2 and 4. In the interactive joint training, we utilize the attention mechanism in the recognizer. Therefore, an optimized attention decoder is necessary to enable the interaction. To accelerate the training process, we pre-trained the recognizer for three epochs. \textbf{Implementation. }We implement our method using the PyTorch framework \citep{pytorch}. The target style samples are resized to $32 \times 32$. Input images are resized to $64 \times 256$ for the generator and $32 \times 100$ for the recognizer. The outputs of the generator are also resized to $32 \times 100$. When the batch size is set to 64, the training speed is approximately 1.7 iterations/sec. Our method takes an average of 1.1 ms to generate an image using an NVIDIA GTX-1080Ti GPU. \subsection{Ablation Study} \textbf{Experiment setup.} To investigate the effectiveness of separating text content from noisy background styles, we conduct an ablation analysis by using a simple recognizer. The backbone of the recognizer is a 45-layer residual network \citep{he2016deep}, which is a popular architecture \citep{shi2018aster}. On the top of the backbone, there is an attention-based decoder. In the decoder, the number of GRU hidden units is $256$. The decoder outputs 37 classes, including 26 letters, 10 digits, and a symbol that represented $``\rm EoS"$. The training data is SynthData. We evaluate the recognizer on seven benchmarks, including regular and irregular text. \textbf{Input of the recognizer.} We study the contribution of our method by replacing the generated image with the corresponding input image. The results are listed in Table~\ref{table:ablation-study}. The recognizer trained using SynthData serves as a baseline. Compared to the baseline, the clean images generated by our method boost recognition performance. We observe that the improvement is more substantial on irregular text. One notable improvement is an accuracy increase of 6.6\% on CUTE. One possible reason for this is that the irregular text shapes introduce more background noise than the regular ones. Because our method removes the surrounding noise and extracts the text content for recognition, the recognizer can thus focus on characters and avoid noisy interference. With respect to regular text, the baseline is much higher and there is less room for improvement, but our method also shows advantages in recognition performance. The gain of performance on several kinds of scene text, including low quality images in SVT and real scene images in IC03/IC13, suggests the generality our method. To summarize, the generated clean images of our proposed method greatly decrease recognition difficulty. \textbf{Style supervision.} We study the necessity of style supervision by disabling the style classifier in the discriminator. Without style adversarial training, the background style normalization is only weakly supervised by the content label. As shown in the Figure \ref{fig:weak}, the generated images suffer from severe image degradation, which leads to poor robustness of the recognizer. The quantitative recognition results of not using/using the style supervision are presented in the second and third row of Table \ref{table:ablation-study2}. The significant gaps indicate that without the style supervision, the quality of the generated images is insufficient for recognition training. Thus, the style adversarial training is necessary and is used in the basic design of our method. \begin{figure}[t] \centering \includegraphics[width=7cm,height=1cm]{pic-weak.png} \caption{Visualization of background normalization weakly supervised by content label.} \label{fig:weak} \end{figure} \begin{table*}[t] \renewcommand\arraystretch{1.2} \centering \caption{Word accuracy on generated images using variants of content supervision for the discriminator. Losses $\mathcal{L}_{s}$ and $\mathcal{L}_{c}$ denote style loss and content loss, respectively.} \label{table:ablation-study2} \setlength{\tabcolsep}{3.5mm}{ \begin{tabular}{ c c c c c c c } \toprule \multirow{2}{*}{Content Supervision} & \multicolumn{2}{c}{Adversarial Loss} & \multirow{2}{*}{Feedback Mechanism} & \multicolumn{3}{c}{Testing Set} \\ \cmidrule(lr){2-3}\cmidrule(lr){5-7} & $\mathcal{L}_{s}$ & $\mathcal{L}_{c}$ & & SVT-P & CUTE & IC15 \\ \midrule None & \checkmark & $\times$ & $\times$ & Failed & Failed & Failed \\ Ground Truth & $\times$ & \checkmark & $\times$ & 71.9 & 74.7 & 65.5 \\ Ground Truth & \checkmark & \checkmark & $\times$ & 75.0 & 78.4 & 72.5 \\ Prediction of Recognizer & \checkmark & \checkmark & \checkmark & \textbf{79.2} & \textbf{80.9} & \textbf{73.0} \\ \bottomrule \end{tabular} } \end{table*} \textbf{Feedback mechanism.} We also study the effectiveness of the content classifier in the discriminator and the proposed feedback mechanism. In this experiment, we first disable the content classifier. Therefore, there is no content supervision. Only a style adversarial loss supervises the generator. The result is shown in the first row in Table \ref{table:ablation-study2}. The accuracy on the generated images decreases to nearly zero. We observe that the generator fails to retain the character patterns for recognition. As the content classifier is designed for assessing the discriminability and diversity of samples \citep{odena2017conditional}, it is important to guide the generator so that it can determine informative character patterns and retain them for recognition. When the content supervision is not available, the generator is easily trapped into failure modes, namely mode collapse \citep{Salimans2016wg}. Therefore, the content supervision in the discriminator is necessary. Then we enable the content classifier and replace the supervision in $\mathcal{L}_{c}$ with the ground truth. This setting is similar to that of the auxiliary classifier GANs \citep{odena2017conditional}, which use content supervision for discriminability and diversity in the style adversarial training. After this process, the generated text images contain text content for recognition. Finally, we replace the content supervision with the predictions of the recognizer. The discriminator thus learns from the confusion of the recognizer, and guides the generator so that it can refine the character patterns to be easier to read. Therefore, the adversarial training is more relevant to the recognition performance. As shown in Table \ref{table:ablation-study2}, the feedback mechanism further improves the robustness of the generator and benefits the recognition performance. \begin{table*}[t] \renewcommand\arraystretch{1.2} \centering \caption{Word accuracy on testing datasets using different transformation methods.} \label{table:style-transfer-study} \setlength{\tabcolsep}{3.3mm}{ \begin{tabular}{c c c c c c c c c} \toprule \multirow{2}{*}{Transformation} & \multirow{2}{*}{Method} & \multicolumn{4}{c}{Regular Text} & \multicolumn{3}{c}{Irregular Text} \\ \cmidrule(lr){3-6} \cmidrule(lr){7-9} & & IIIT5K & SVT & IC03 & IC13 & SVT-P & CUTE & IC15 \\ \midrule \multirow{3}{*}{Style Normalization} & OTSU \citep{otsu1979threshold} & 70.3 & 65.4 & 76.0 & 76.0 & 46.5 & 50.3 & 49.3 \\ & CycleGAN \citep{Zhu2017hr} & 43.6 & 21.3 & 37.0 & 35.9 & 14.6 & 18.8 & 18.0 \\ & Ours & {92.5} & 86.6 & 95.0 & 91.4 & 79.2 & 80.9 & 73.0 \\ \midrule \multirow{2}{*}{+ Rectification} & Ours + ASTER \citep{shi2018aster} & 94.0 & 90.0 & 95.6 & 93.3 & 81.6 & 85.1 & 78.1 \\ & Ours + ESIR \citep{zhan2019esir} & \textbf{94.1} & \textbf{90.6} & \textbf{96.0} & \textbf{94.2} & \textbf{82.2} & \textbf{87.8} & \textbf{78.5} \\ \bottomrule \end{tabular} } \end{table*} One interesting observation is that on the SVT-P testing set, the accuracy on the source image (75.7\% in Table \ref{table:ablation-study}) is higher than that on the generated image with content supervision of the ground truth (75.0\% in Table \ref{table:ablation-study2}). We observe the source samples and find that most images are severely corrupted by noise and blur. Some of them have low resolutions. The characters in the generated samples are also difficult to distinguish. After training with the feedback mechanism, the generator is able to generate clear patterns that facilitate reading, which boosts the recognition accuracy from 75.0\% to 79.2\%. As illustrated in Figure \ref{fig:ablation-study}, the predictions of ``C" and ``N" are corrected to ``G" and ``M", respectively. The clear characters in the generated images are easier to read. \begin{figure}[t] \centering \includegraphics[width=8.5cm,height=4.5cm]{pic-ablation-study.png} \caption{Predictions of challenging samples in the SVT-P testing set. Recognition errors are marked as red characters. Confusing and distinct patterns are marked by red and green bounding boxes, respectively.} \label{fig:ablation-study} \end{figure} \subsection{Comparisons with Generation Methods} Recently, a large body of literature \citep{shi2018aster,cluo2019moran,li2018show,yang2019symmetry} has explored the use of stronger recognizers to tackle the complications in scene text recognition. However, there is little consideration of the quality of the source images. The background noise in the source image has not been addressed intensively before. To the best of our knowledge, our method may be the first image generation network that removes background noise and retains text content to benefit recognition performance. Although few literature proposed to address this issue stated above, we find several popular generation methods and perform comparisons under fair experimental conditions. A pre-trained recognizer used in the ablation study is adopted in the comparisons. The recognizer is then be fine-tuned on different kinds of generations. \begin{figure}[t] \centering \includegraphics[width=7cm,height=5.5cm]{pic-binary.png} \caption{Comparison between the OTSU \citep{otsu1979threshold} and our method.} \label{fig:binary} \end{figure} \begin{table*}[t] \renewcommand\arraystretch{1.12} \centering \caption{Word accuracy on regular benchmarks. ``50", ``1k" and ``0" are lexicon sizes. ``Full" indicates the combined lexicon of all images in the benchmarks. ``Add." means the method uses extra annotations, such as character-level bounding boxes and pixel-level annotations. ``Com." is the proposed ensemble method that outputs prediction of either source or generated image with higher confidence score.} \label{table:Results on general benchmarks} \setlength{\tabcolsep}{3.5mm}{ \begin{tabular}{r c c c c c c c c c c} \toprule \multirow{2}{*}{Method} & \multirow{2}{*}{Add.} & \multicolumn{3}{c}{IIIT5K} & \multicolumn{2}{c}{SVT} &\multicolumn{3}{c}{IC03} & IC13 \\ \cmidrule(lr){3-5}\cmidrule(lr){6-7}\cmidrule(lr){8-10}\cmidrule(lr){11-11} & & 50 & 1k & 0 & 50 & 0 & 50 & Full & 0 & 0\\ \midrule \citet{yao2014strokelets} & & 80.2 & 69.3 & - & 75.9 & - & 88.5 & 80.3 & - & - \\ \citet{jaderberg2014deep} & & - & - & - & 86.1 & - & 96.2 & 91.5 & - & -\\ \citet{su2014accurate} & & - & - & - & 83.0 & - & 92.0 & 82.0 & - & - \\ \citet{rodriguez2015label} & & 76.1 & 57.4 & - & 70.0 & - & - & - & - & - \\ \citet{gordo2015supervised} & & 93.3 & 86.6 & - & 91.8 & - & - & - & - & - \\ \citet{Jaderberg2015Deep} & & 95.5 & 89.6 & - & 93.2 & 71.7 & 97.8 & 97.0 & 89.6 & 81.8 \\ \citet{jaderberg2016reading} & & 97.1 & 92.7 & - & 95.4 & 80.7 & 98.7 & 98.6 & 93.1 & 90.8 \\ \citet{shi2016robust} & & 96.2 & 93.8 & 81.9 & 95.5 & 81.9 & 98.3 & 96.2 & 90.1 & 88.6 \\ \citet{lee2016recursive} & & 96.8 & 94.4 & 78.4 & 96.3 & 80.7 & 97.9 & 97.0 & 88.7 & 90.0\\ \citet{liu2016star} & & 97.7 & 94.5 & 83.3 & 95.5 & 83.6 & 96.9 & 95.3 & 89.9 & 89.1 \\ \citet{shi2017end} & & 97.8 & 95.0 & 81.2 & 97.5 & 82.7 & 98.7 & 98.0 & 91.9 & 89.6 \\ \citet{yang2017learning} & \checkmark & 97.8 & 96.1 & - & 95.2 & - & 97.7 & - & - & -\\ \citet{cheng2017focusing} & & 98.9 & 96.8 & 83.7 & 95.7 & 82.2 & 98.5 & 96.7 & 91.5 & 89.4 \\ \citet{liu2018char} & \checkmark & - & - & 83.6 & - & 84.4 & - & - & 91.5 & 90.8 \\ \citet{liu2018synthetically} & & 97.3 & 96.1 & 89.4 & 96.8 & 87.1 & 98.1 & 97.5 & 94.7 & 94.0 \\ \citet{liu2018squeezedtext} & \checkmark & 97.0 & 94.1 & 87.0 & 95.2 & - & 98.8 & 97.9 & 93.1 & 92.9 \\ \citet{cheng2017arbitrarily} & & 99.6 & 98.1 & 87.0 & 96.0 & 82.8 & 98.5 & 97.1 & 91.5 & - \\ \citet{bai2018edit} & & 99.5 & 97.9 & 88.3 & 96.6 & 87.5 & 98.7 & 97.9 & 94.6 & 94.4\\ \citet{shi2018aster} & & 99.6 & \textbf{98.8} & 93.4 & 97.4$^{\rm \color{red}{1}}$ & 89.5$^{\rm \color{red}{1}}$ & 98.8 & 98.0 & 94.5 & 91.8 \\ \citet{cluo2019moran} & & 97.9 & 96.2 & 91.2 & 96.6 & 88.3 & 98.7 & 97.8 & 95.0 & 92.4 \\ \citet{liao2019scene} & \checkmark & \textbf{99.8} & \textbf{98.8} & 91.9 & 98.8 & 86.4 & - & - & - & 91.5 \\ \citet{li2018show} & & - & - & 91.5 & - & 84.5 & - & - & - & 91.0 \\ \citet{zhan2019esir} & & 99.6 & \textbf{98.8} & 93.3 & 97.4 & 90.2 & - & - & - & 91.3 \\ \citet{yang2019symmetry} & \checkmark & 99.5 & \textbf{98.8} & 94.4 & 97.2 & 88.9 & 99.0 & 98.3 & 95.0 & 93.9 \\ \midrule ASTER & & 99.1 & 97.9 & 93.5 & 98.0 & 88.6 & 98.8 & 98.0 & 94.7 & 92.0 \\ + Ours & & 99.1 & 98.0 & 94.0 & 98.3 & 90.0 & 98.8 & 98.1 & 95.6 & 93.3 \\ + Com. & & 99.6 & 98.7 & 95.4 & 98.9 & 92.7 & \textbf{99.1} & \textbf{98.8} & \textbf{96.3} & 94.8 \\ \midrule ESIR & & 99.2 & 98.0 & 93.8 & 98.0 & 88.7 & 98.8 & 98.2 & 95.0 & 93.5 \\ + Ours & & 99.5 & 98.6 & 94.1 & 98.0 & 90.6 & 98.8 & 98.5 & 96.0 & 94.2 \\ + Com. & & 99.6 & \textbf{98.8} & \textbf{95.6} & \textbf{99.4} & \textbf{92.9} & \textbf{99.1} & \textbf{98.8} & 96.2 & \textbf{96.0} \\ \bottomrule \end{tabular} } \begin{tablenotes} \item \footnotesize $^{\rm \color{red}{1}}$The result was corrected by the authors on \url{https://github.com/bgshih/aster}. \end{tablenotes} \end{table*} First we use a popular binarization method, namely OTSU method \citep{otsu1979threshold}, to separate the text content from the background noise by binarizing the source images. As shown in Figure \ref{fig:binary}, we visualize the binarized images and find that single threshold value is not sufficiently robust to separate the foreground and background in scene text images, because the background noise usually follows multimodal distribution. Therefore, the recognition accuracy on the generation of OTSU method falls behind ours in Table~\ref{table:style-transfer-study}. \begin{figure}[t] \centering \includegraphics[width=0.425\textwidth]{pic-cycle.png} \caption{Comparison between CycleGAN \citep{Zhu2017hr} and our method.} \label{fig:cycle} \end{figure} \begin{table*}[t] \renewcommand\arraystretch{1.15} \centering \caption{Word accuracy on irregular benchmarks. ``50" and ``0" are lexicon sizes. ``Full" indicates the combined lexicon of all images in the benchmarks. ``Add." means the method uses extra annotations, such as character-level bounding boxes and pixel-level annotations. ``Com." is the proposed ensemble method that outputs prediction of either source or generated image with higher confidence score.} \label{table:Results on Irregular} \setlength{\tabcolsep}{4.5mm} { \begin{tabular}{ r c c c c c c c } \toprule \multirow{2}{*}{Method} & \multirow{2}{*}{Add.} & \multicolumn{3}{c}{SVT-P} & CUTE & IC15-S & IC15 \\ \cmidrule(lr){3-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7}\cmidrule(lr){8-8} & & 50 & Full & 0 & 0 & 0 & 0\\ \midrule \citet{shi2016robust} & & 91.2 & 77.4 & 71.8 & 59.2 & - & - \\ \citet{liu2016star} & & 94.3 & 83.6 & 73.5 & - & - & - \\ \citet{shi2017end} & & 92.6 & 72.6 & 66.8 & 54.9 & - & - \\ \citet{yang2017learning} & \checkmark & 93.0 & 80.2 & 75.8 & 69.3 & -& - \\ \citet{cheng2017focusing} & & 92.6 & 81.6 & 71.5 & 63.9 & 70.6 & - \\ \citet{liu2018char} & \checkmark & - & - & - & - & - & 60.0 \\ \citet{liu2018synthetically} & & - & - & 73.9 & 62.5 & - & - \\ \citet{cheng2017arbitrarily} & & 94.0 & 83.7 & 73.0 & 76.8 & - & 68.2 \\ \citet{bai2018edit} & & - & - & - & - & 73.9 & - \\ \citet{shi2018aster} & & - & - & 78.5 & 79.5 & 76.1 & - \\ \citet{cluo2019moran} & & 94.3 & 86.7 & 76.1 & 77.4 & - & 68.8 \\ \citet{liao2019scene} & \checkmark & - & - & - & 79.9 & - & - \\ \citet{li2018show} & & - & - & 76.4 & 83.3 & - & 69.2 \\ \citet{zhan2019esir} & & - & - & 79.6 & 83.3 & - & 76.9 \\ \citet{yang2019symmetry} & \checkmark & - & - & 80.8 & 87.5 & - & 78.7 \\ \midrule ASTER & & 94.3 & 87.3 & 77.7 & 79.9 & 75.8 & 74.0\\ + Ours & & 95.0$^{\color{red}{\uparrow0.7}}$ & 90.1$^{\color{red}{\uparrow2.8}}$ & 81.6$^{\color{red}{\uparrow3.9}}$ & 85.1$^{\color{red}{\uparrow5.2}}$ & 80.1$^{\color{red}{\uparrow4.3}}$ & 78.1$^{\color{red}{\uparrow4.1}}$ \\ + Com. & & 95.5 & \textbf{92.2} & \textbf{85.4} & 89.6 & 83.7 & 81.1 \\ \midrule ESIR & & 94.3 & 87.3 & 79.8 & 83.7 & 79.3 & 77.1\\ + Ours & & 95.0$^{\color{red}{\uparrow0.7}}$ & 89.3$^{\color{red}{\uparrow2.0}}$ & 82.2$^{\color{red}{\uparrow2.4}}$ & 87.8$^{\color{red}{\uparrow4.1}}$ & 81.1$^{\color{red}{\uparrow1.8}}$ & 78.5$^{\color{red}{\uparrow1.4}}$ \\ + Com. & & \textbf{95.8} & 91.5 & 85.1 & \textbf{91.3} & \textbf{83.9} & \textbf{81.4} \\ \bottomrule \end{tabular} } \end{table*} Then, we compare our method with generation methods. Considering the high demand for data (pixel-level paired samples) of pixel-to-pixel GANs \citep{Isola2017kl}, we treat this kind of method as a potential solution when there is no restriction of data. Here, we study the CycleGAN\footnote{The official implementation is available on \url{https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix}} \citep{Zhu2017hr}. Before the training, we synthesize word-level clean images as target style samples. The results shown in Table \ref{table:style-transfer-study} and Figure \ref{fig:cycle} suggest that modeling a text string with multiple characters as a whole leads to poor retention of character details. The last two rows in Figure \ref{fig:cycle} are failed generations, which indicate that the generator fails to model the relationships of the characters. In Table \ref{table:style-transfer-study}, the recognition accuracy on this kind of generation drops substantially. Compared with previous methods, our method not only normalizes noisy backgrounds to a clean style, but also generates clear character patterns that tend to be an average style. The end-to-end training with the feedback mechanism benefits the recognition performance. We also show the effectiveness of the image rectification by integrating our method with advanced rectification modules \citep{shi2018aster,zhan2019esir}. It can be seen that image rectifiers are still significant for improving recognition performance. Thus, different from irregular text shape, noisy background style is another challenge. \subsection{Integration with State-of-the-art Recognizers} As our method is a meta-framework, it can be integrated with recent recognizers \citep{cheng2017arbitrarily,shi2018aster,cluo2019moran,li2018show,yang2019symmetry} equipped with attention-based decoders \citep{bahdanau2014neural}. We conduct experiments using representative methods, namely ASTER \citep{shi2018aster} and ESIR \citep{zhan2019esir}, to investigate the effectiveness of our framework. The reimplementation results are comparable with those in the paper. With respect to the dataset providing a lexicon, we choose the lexicon word under the metric of edit distance. The results of comparison with previous methods are shown in Tables \ref{table:Results on general benchmarks} and \ref{table:Results on Irregular}. All the results of the previous methods are collected from their original papers. If a method uses extra annotations, such as character-level bounding boxes and pixel-level annotations, we indicate this with ``Add.". For fair comparison, we perform a comparison with the method of Li et al. \citep{li2018show} by including the results of their model trained using synthetic data. \begin{figure}[b] \centering \includegraphics[width=6.5cm,height=5cm]{pic-comparison.png} \caption{Predictions corrected by our method.} \label{fig:7-comparison} \end{figure} Using the strong baseline of ASTER, we first evaluate the contribution of our method on regular text as shown in Table \ref{table:Results on general benchmarks}. Although the baseline accuracy on these benchmarks is high, thus no much room for improvement, our method still achieves a notable improvement in lexicon-free prediction. For instance, it leads to accuracy increases of 1.4\% on SVT and 1.3\% on IC13. Some predictions corrected using our generations are shown in Figure \ref{fig:7-comparison}. Then, we reveal the superiority of our method by applying it to irregular text recognition. As shown in Table \ref{table:Results on Irregular}, our method significantly boosts the performance of ASTER by generating clean images. The ASTER integrated with our approach outperforms the baseline by a wide margin on SVT (3.9\%), CUTE (5.2\%) and IC15 (4.3\%). This suggests that our generator removes the background noise introduced by irregular shapes and further reduces difficulty of rectification and recognition. It is noteworthy that the ASTER with our method outperforms ESIR \citep{zhan2019esir} that uses more rectification iterations (ASTER only rectifies the image once), which demonstrates the significant contribution of our method. The performance is even comparable with the state-of-the-art method \citep{yang2019symmetry}, which uses character-level geometric descriptors for supervision. Our method achieves a better trade-off between recognition performance and data requirement. After that, our method is integrated with a different method ESIR to show the generalization. Based on the more advanced recognizer, our method can achieve further gains. For instance, the improvement is still notable on CUTE (4.1\%). As a result, the performance of the ESIR is also significantly boost by our method. \begin{figure}[t] \centering \includegraphics[width=8cm,height=2.5cm]{pic-failure.png} \caption{Failure cases. Top: source images. Bottom: generated images.} \label{fig:failure} \end{figure} \begin{table*}[t] \renewcommand\arraystretch{1.15} \centering \caption{Word accuracy on testing datasets when we use a little more real training data.} \label{table:real-data} \setlength{\tabcolsep}{3.5mm}{ \begin{tabular}{c c c c c c c c c c} \toprule \multirow{2}{*}{Method} & \multirow{2}{*}{Training data} & \multicolumn{4}{c}{Regular Text} & \multicolumn{4}{c}{Irregular Text} \\ \cmidrule(lr){3-6} \cmidrule(lr){7-10} & & IIIT5K & SVT & IC03 & IC13 & SVT-P & CUTE & IC15-S & IC15 \\ \midrule \multirow{2}{*}{ASTER} & Millions of Synthetic Data & 93.5 & 88.6 & 94.7 & 92.0 & 77.7 & 79.9 & 75.8 & 74.0 \\ & + 50k Real Data & 94.5 & 90.4 & 95.0 & 92.9 & 79.4 & 88.9 & 84.1 & 81.3 \\ \midrule \multirow{2}{*}{+ Ours} & Millions of Synthetic Data & 95.4 & 92.7 & \textbf{96.3} & 94.8 & 85.4 & 89.6 & 83.7 & 81.1 \\ & + 50k Real Data & \textbf{96.5} & \textbf{94.4} & \textbf{96.3} & \textbf{95.6} & \textbf{86.2} & \textbf{92.4} & \textbf{87.2} & \textbf{84.7} \\ \bottomrule \end{tabular} } \end{table*} \textbf{Upper bound of GAN.} We are further interested in the upper bound of our method. As our method is designed based on adversarial training, the limitations of the GAN cause some failure cases. As illustrated in Figure \ref{fig:failure}, the well-trained generator fails to generate character patterns on difficult samples, particularly when the source image is of low quality and the curvature of the text shape is too high. One possible reason is the mode-dropping phenomenon studied by Bau et al.\ \citep{bau2019seeing}. Another reason is the lingering gap observed by \citep{Zhu2017hr} between the training supervision of paired and unpaired samples. To break this ceiling, one possible solution is to improve the synthesis engine and integrate various paired lifelike samples for training. This may lead to substantially more powerful generators, but heavily dependent on the development of synthesis engines. \begin{table*}[t] \centering \caption{Comparisons of generation in RGB space and in gray.} \label{table:RGB} \setlength{\tabcolsep}{5mm}{ \begin{tabular}{c c c c c c c c c} \toprule \multirow{2}{*}{Space} & \multicolumn{4}{c}{Regular Text} & \multicolumn{4}{c}{Irregular Text} \\ \cmidrule(lr){2-5} \cmidrule(lr){6-9} & IIIT5K & SVT & IC03 & IC13 & SVT-P & CUTE & IC15-S & IC15 \\ \midrule Gray & \textbf{95.4} & \textbf{92.7} & \textbf{96.3} & 94.8 & \textbf{85.4} & \textbf{89.6} & \textbf{83.7} & \textbf{81.1} \\ RGB & 95.2 & 92.3 & \textbf{96.3} & \textbf{95.6} & 85.3 & 88.9 & \textbf{83.7} & \textbf{81.1} \\ \bottomrule \end{tabular} } \end{table*} Inspired by recent work \citep{shi2018aster,Liao2019Mask}, it is possible to integrate several outputs of the system and choose the most possible one to achieve performance gain. Therefore, we proposed a simple yet effective method to address the issue stated above. The source image and the corresponding generated image are concatenated as a batch for network inference. Then, we choose the prediction with the higher confidence. As shown in the last row in Tables \ref{table:Results on general benchmarks} and \ref{table:Results on Irregular} (noted as ``+Com."), this ensemble mechanism greatly boosts the system performance, which indicates that the source and generated images are complementary to each other. \subsection{More Accessible Data} In the experiments of comparing the proposed method with previous recognition methods, we have used only synthetic data for fair comparison. Here, we use the ASTER \citep{shi2018aster} to explore whether there is room for improvement in synthesis engines. Following Li et al.\ \citep{li2018show}, we collect publicly available real data for training. In contrast to synthetic data, real data is more costly to collect and annotate. Thus, there are only approximately 50k public real samples for training, whereas there are millions of synthetic data. As shown in Table \ref{table:real-data}, after we add the small real training set to the large synthetic one, the generality of both the baseline ASTER and our method is further boosted. This suggests that synthetic data is not sufficiently real and the model is still data-hungry. In summary, our approach is able to make full use of real samples in the wild to further gain robustness, because of the training of our method requires only input images and the corresponding text labels. Note that our method trained using only synthetic data even outperforms the baseline trained using real data on most benchmarks, particularly on SVT-P ($\uparrow$6.0\%). Therefore, noisy background style normalization is a promising way to improve recognition performance. \subsection{Discussion} \textbf{Generation in RGB space or in gray.} The background noise and text content may be relative easier to be separated in RGB colorful images. To this end, we conduct an experiment to evaluate the influence of RGB color space. The target style samples are synthesized in random color to guide the generation in RGB space. As shown in Table \ref{table:RGB}, we find that the generation in RGB space cannot outperform the generation in gray. Therefore, the key issue of background normalization is not the color space, but the lack of pixel-level supervision. Without fine-grained guidance at pixel level, the generation is only guided by the attention mechanism of the recognizer to focus informative regions. Other noisy regions on the generated image are unreasonably neglected. \textbf{Alignment issue on long text.} To tackle the lack of paired training samples, we exploit the attention mechanism to extract every character for adversarial training. However, there exists misalignment problems of the attention mechanism \citep{cheng2017focusing,bai2018edit}, especially on long text. \citep{Cong2019Comparative} conducted a comprehensive study on the attention mechanism and found that the attention-based recognizers have poor performance on text sentence recognition. Thus, our method still have scope for performance gains on text sentence recognition. This is a common issue of most attention mechanisms, which merits further study. \section{Conclusion} \label{section:Conclusion} We have presented a novel framework for scene text recognition from a brand new perspective of separating text content from noisy background styles. The proposed method can greatly reduce recognition difficulty and thus boost the performance dramatically. Benefiting from the interactive joint training of an attention-based recognizer and a generative adversarial architecture, we extract character-level features for further adversarial training. Thus the discriminator focuses on informative regions and provides effective guidance for the generator. Moreover, the discriminator learns from the confusion of the recognizer and further effectively guides the generator. Thus, the generated patterns are clearer and easier to read. This feedback mechanism contributes to the generality of the generator. Our framework is end-to-end trainable, requiring only the text images and corresponding labels. Because of the elegant design, our method can be flexibly integrated with recent mainstream recognizers to achieve new state-of-the-art performance. The proposed method is a successful attempt to solve the scene text recognition problem from the brand new perspective of image generation and style normalization, which has not been addressed intensively before. In the future, we plan to extend the proposed method to deal with end-to-end scene text recognition. How to extend our method to multiple general object recognition is also a topic of interest. \begin{acknowledgements} This research was in part supported in part by NSFC (Grant No. 61771199, 61936003), GD-NSF (No. 2017\-A\-0\-3\-0\-3\-1\-2\-00\-6), the National Key Research and Development Program of China (No. 2016YFB1001405), Guangdong Intellectual Property Office Project (2018-10-1), and Guangzhou Science, Technology and Innovation Project (201704020134). \end{acknowledgements} \small \bibliographystyle{spbasic}
\section{Introduction} Deep convolutional neural networks (CNNs) have achieved great success in many computer vision tasks in recent years, including image classification \cite{alexnet,vgg,inception,resnet,inceptionv2,resnext}, object detection \cite{rcnn,fast,faster,mask}, and semantic segmentation \cite{fcn, deeplab,pspnet}. A CNN has millions of parameters, making training demand a lot of data. Otherwise, the serious over-fitting problem \cite{alexnet} could arise. Data augmentation is a very important technique to generate more useful data from existing ones for training practical and general CNNs. \begin{table}[t] \centering \resizebox{\linewidth}{!}{ \begin{tabular}{ l @{\hspace{0.1in}} l @{\hspace{0.1in}} l @{\hspace{0.1in}} l } \thickhline \specialrule{0em}{0pt}{3pt} Task & Model & Baseline(\%) & Ours(\%) \\ \hline \multirow{3}*{\tabincell{l}{Cls. \\ ImageNet}} & ResNet50 & 76.5 & 77.9 \textbf{(+1.4)} \\ & ResNet101 & 78.0 & 79.1 \textbf{(+1.1)} \\ & ResNet152 & 78.3 & 79.7 \textbf{(+1.4)} \\ \hline \multirow{3}*{\tabincell{l}{Cls. \\ CIFAR10}} & ResNet18 & 95.28 & 96.54 \textbf{(+1.26)} \\ & WideRes28-10 & 96.13 & 97.24 \textbf{(+1.11)} \\ & Shake26-32 & 96.32 & 97.20 \textbf{(+0.88)} \\ \hline \multirow{2}*{\tabincell{l}{Det. \\ COCO}} & FasterRCNN-50-FPN & 37.4 & 39.2 \textbf{(+1.8)} \\ & FasterRCNN-X101-FPN & 41.2 & 42.6 \textbf{(+1.4)} \\ \hline \tabincell{l}{Seg. \\ Cityscapes} & PSPNet50 & 77.3 & 78.1 \textbf{(+0.8)} \\ \thickhline \end{tabular} } \vspace{0.1in} \caption{This table summarizes our results on different models and tasks. For the image classification task, we report the top-1 accuracy. For the object detection task, we report models' mAP. For the semantic segmentation task, we report models' mIoU.} \label{tab:t} \end{table} Existing data augmentation methods can be roughly divided into three categories: spatial transformation \cite{alexnet}, color distortion \cite{inception}, and information dropping \cite{cutout,randomerase,hideandseek}. Spatial transformation involves a set of basic data augmentation solutions, such as random scale, crop, flip and random rotation, which are widely used in model training. Color distortion, which contains changing brightness, hue, etc. is also used in several models \cite{inception}. These two methods aim at transforming the training data to better simulate real-world data, through changing some channels of information. Information deletion is widely employed recently for its effectiveness and/or efficiency. It includes random erasing \cite{randomerase}, cutout \cite{cutout}, and hide-and-seek (HaS) \cite{hideandseek}. It is common knowledge that by deleting a level of information in the image, CNNs can learn originally less sensitive or important information and increase the perception field, resulting in a notable increase of robustness of the model. \vspace{-0.1in} \paragraph{Motivation} Avoiding excessive deletion and reservation of continuous regions is the core requirement for information dropping methods. We found intriguingly a successful information dropping method should achieve reasonable balance between deletion and reserving of regional information on the images. The reason is twofold intuitively. On the one hand, excessively deleting one or a few regions may lead to complete object removal and context information be removed as well. Thus remaining information is not enough to be classified and the image is more like noisy data. On the other hand, excessive preserving regions could make some objects untouched. They are trivial images that may lead to a reduction of the network’s robustness. Thus designing a simple method that reduces the chance of causing these two problems becomes essential. \newcommand{0.6in}{0.6in} \begin{figure} \centering \begin{tabular}{c@{\hspace{0.03in}} c@{\hspace{0.03in}} c@{\hspace{0.03in}} c@{\hspace{0.03in}} c} \multicolumn{2}{c}{Cutout} & \multicolumn{2}{c}{HaS} & Ours \\ \includegraphics[width=0.6in]{figure/fails/1.jpg} & \includegraphics[width=0.6in]{figure/fails/2.jpg} & \includegraphics[width=0.6in]{figure/fails/3.jpg} & \includegraphics[width=0.6in]{figure/fails/4.jpg} & \includegraphics[width=0.6in]{figure/fails/5.jpg} \\ \ding{56} & \ding{56} & \ding{56} & \ding{56} & \ding{52} \\ \end{tabular} \caption{Unsuccessful examples by previous strategies.} \label{fig:fail} \end{figure} Existing information dropping algorithms have different chances of achieving a reasonable balance between deletion and reservation of continuous regions. Both cutout \cite{cutout} and random erasing \cite{randomerase} delete {\it only one continuous} region of the image. The resulting imbalance of these two conditions is obvious because the deleted region is one area. It has a good chance to cover the whole object or none of it depending on size and location. The approach of HaS \cite{hideandseek} is to divide the picture evenly into small squares and delete them randomly. It is more effective and still stands a considerable chance for continuously deleting or reserving regions. Some unsuccessful examples of existing methods are shown in Fig. \ref{fig:fail}. Statical and more specific quantitative analysis is provided in Sec. \ref{sec:fail}. Contrary to previous methods, we surprisingly observe the very easy strategy that can balance these two conditions statistically better is by using structured dropping regions, such as deleting uniformly distributed square regions. Our proposed information removal method, named GridMask, is thus to expand structured dropping. Its structure is really simple as shown in Fig. \ref{fig:examples}, making it easy, fast, and flexible to implement and incorporated in {\it all} existing CNN models. Our GridMask neither removes a continuous big region like Cutout, nor randomly selects squares like hide-and-seek. The deleted region is only a set of spatially uniformly distributed squares. In this structure, via controlling the density and size of the deleted regions, we have statistically higher chance to achieve a good balance between the two conditions, as shown in Fig.\ref{fig:balance}. As a result, we improve many state-of-the-art CNN baseline models by a good margin using our very simple GridMask at an extremely low computation budget. To demonstrate the effectiveness of GridMask, extensive experiments are designed and conducted as shown in Table. \ref{tab:t}. In the image classification task using dataset ImageNet, GridMask can improve the accuracy of ResNet50 from 76.5\% to 77.9\%, much more effective than Cutout and HaS, which accomplish 77.1\% and 77.2\%. Our result is also better than that of AutoAugment (77.6\%), which is a combination of several existing policies through reinforcement learning. Note that our method is just one simple policy, which can also be incorporated into AutoAugment. Further, on the COCO2017 dataset for the object detection task, GridMask increases mAP of Faster-RCNN-50-FPN from 37.4\% to 39.2\%. On the semantic segmentation task using the challenging dataset Cityscapes, our method improves mIoU of PSPNet50 from 77.3\% to 78.1\%. They all demonstrate the surprisingly high effectiveness and generality on a large variety of tasks and training data. Our code is available at https://github.com/akuxcw/GridMask. \newcommand{0.345in}{0.345in} \begin{figure}[t] \centering \begin{tabular}{@{\hspace{0.0in}}c@{\hspace{0.05in}} c@{\hspace{0.1in}} c@{\hspace{0.05in}} c@{\hspace{0.1in}} c@{\hspace{0.05in}} c@{\hspace{0.1in}} c@{\hspace{0.05in}} c} \multicolumn{2}{c}{RErase} & \multicolumn{2}{c}{Cutout} & \multicolumn{2}{c}{HaS} & \multicolumn{2}{c}{Ours} \\ \includegraphics[width=0.345in]{figure/examples/1.jpg} &\includegraphics[width=0.345in]{figure/examples/2.jpg} &\includegraphics[width=0.345in]{figure/examples/3.jpg} &\includegraphics[width=0.345in]{figure/examples/4.jpg} &\includegraphics[width=0.345in]{figure/examples/5.jpg} &\includegraphics[width=0.345in]{figure/examples/6.jpg} &\includegraphics[width=0.345in]{figure/examples/7.jpg} &\includegraphics[width=0.345in]{figure/examples/8.jpg} \\ \includegraphics[width=0.345in]{figure/examples/9.jpg} &\includegraphics[width=0.345in]{figure/examples/10.jpg} &\includegraphics[width=0.345in]{figure/examples/11.jpg} &\includegraphics[width=0.345in]{figure/examples/12.jpg} &\includegraphics[width=0.345in]{figure/examples/13.jpg} &\includegraphics[width=0.345in]{figure/examples/14.jpg} &\includegraphics[width=0.345in]{figure/examples/15.jpg} &\includegraphics[width=0.345in]{figure/examples/16.jpg} \\ \includegraphics[width=0.345in]{figure/examples/17.jpg} &\includegraphics[width=0.345in]{figure/examples/18.jpg} &\includegraphics[width=0.345in]{figure/examples/19.jpg} &\includegraphics[width=0.345in]{figure/examples/20.jpg} &\includegraphics[width=0.345in]{figure/examples/21.jpg} &\includegraphics[width=0.345in]{figure/examples/22.jpg} &\includegraphics[width=0.345in]{figure/examples/23.jpg} &\includegraphics[width=0.345in]{figure/examples/24.jpg} \\ \includegraphics[width=0.345in]{figure/examples/25.jpg} &\includegraphics[width=0.345in]{figure/examples/26.jpg} &\includegraphics[width=0.345in]{figure/examples/27.jpg} &\includegraphics[width=0.345in]{figure/examples/28.jpg} &\includegraphics[width=0.345in]{figure/examples/29.jpg} &\includegraphics[width=0.345in]{figure/examples/30.jpg} &\includegraphics[width=0.345in]{figure/examples/31.jpg} &\includegraphics[width=0.345in]{figure/examples/32.jpg} \\ \end{tabular} \caption{More examples of different information dropping methods (best view in large size).} \label{fig:examples} \end{figure} \section{Releated Work} Regularization is an important skill for training neural networks. In recent years, various regularization techniques have been proposed. Dropout \cite{dropout} is effective and is mainly used in fully connected layers. Dropconnect \cite{dropconnect} is very similar to dropout, except that it does not drop the output value, but instead the input value of some nodes. In addition, adaptive dropout \cite{adadropout}, stochastic pooling \cite{stpool}, droppath \cite{droppath}, shakeshake regulation \cite{shakeshake} and dropblock \cite{dropblock} were also proposed. These methods add noise to a few parameters in the training process according to different rules, so as to avoid over-fitting training data and improve models' generalization ability. Besides, Mixup \cite{mixup} and CutMix \cite{cutmix} use multi-image information during the training process. By modifying the input images, labels, and loss functions, these methods can fuse information of multiple images and achieve good results. \begin{figure} \centering \includegraphics[width=\linewidth]{figure/grid} \caption{This image shows examples of GridMask. First, we produce a mask according to the given parameters ($r$, $d$, $\delta_x$, $\delta_y$). Then we multiply it with the input image. The result is shown in the last row. In the mask, gray value is 1, representing the reserved regions; black value is 0, for regions to be deleted.} \label{fig:grid} \end{figure} Data augmentation is also an effective regularization. Compared with other methods, data augmentation has many advantages. For example, it only needs to operate on the input data, instead of changing the network structure. And data augmentation is easy to apply to many tasks, while other loss- or label-based methods may need extra design. The basic policy of data augmentation contains random flip, random crop, etc., which are commonly used on CNNs. Except for the basic strategies, the inception-preprocess \cite{inception} is more advanced with random disturbance of color of the input image. Recently, AutoAugment \cite{autoaugment} improved the inception-preprocess using reinforcement learning to search existing policies for the optimal combination. Besides, some recently proposed methods based on information dropping have also achieved good results of random erasing \cite{randomerase}, hide-and-seek \cite{hideandseek}, cutout \cite{cutout}, etc. These methods delete information on input images through certain policies. They usually work well on small datasets, while the effect on large datasets is limited. Our method also belongs to information dropping augmentation. Compared with previous methods, ours can achieve consistently better results on various datasets, outperforming all previous unsupervised strategies, including the optimal combination proposed by AutoAugment. Our method can serve as a new baseline policy for data augmentation. \section{GridMask} GridMask is a simple, general, and efficient strategy. Given an input image, our algorithm randomly removes some pixels of it. Unlike other methods, the region that our algorithm removes is neither a continuous region \cite{cutout} nor random pixels in dropout. Instead, our algorithm removes a region with disconnected pixel sets, as shown in Fig. \ref{fig:grid}. We express our setting as \begin{equation}\tilde{\textbf{x}} = \textbf{x} \times M \end{equation where $\textbf{x} \in R^{H \times W \times C}$ represents the input image, $M \in \{0,1\}^{H \times W}$ is the binary mask that stores pixels to be removed, and $\tilde{\textbf{x}} \in R^{H \times W \times C}$ is the result produced by our algorithm. For the binary mask $M$, if $M_{i,j}=1$ we keep pixel $(i,j)$ in the input image; otherwise we remove it. Our algorithm is applied after the image normalization operation. \begin{figure} \centering \includegraphics[width=0.4\linewidth]{./figure/unit.pdf} \caption{The dotted square shows one unit of the mask.} \label{fig:unit} \end{figure} The shape of $M$ looks like a grid, as shown in Fig. \ref{fig:grid}. We use four numbers $(r, d, \delta_x, \delta_y)$ to represent a unique $M$. Every mask is formed by tiling the units as shown in Fig. \ref{fig:unit}. $r$ is the ratio of the shorter gray edge in a unit. $d$ is the length of one unit. $\delta_x$ and $\delta_y$ are the distances between the first intact unit and boundary of the image. Next, we talk about the choices of these four parameters. \paragraph{Choice of $r$} $r$ determines the keep ratio of an input image. We define the keep ratio $k$ of a given mask $M$ as \begin{equation}k = \frac{sum(M)}{H \times W}, \label{eq:k}\end{equation} which means the proportion of the region between reserved and input images. The keep ratio is a very important parameter to control the algorithm. With a large keep ratio, CNN may still suffer from over-fitting. If it is too small, we could lose excessive information causing under-fitting. There is a close relation between $r$ and $k$. Ignoring incomplete units in a mask, we get \begin{equation}k = 1 - (1-r)^2 = 2r - r^2.\end{equation} The keep ratio is fixed following common practice. We perform extensive experimnents to verify the choice of $r$ in Section \ref{sec:abl}. \paragraph{Choice of $d$} The length of one unit $d$ does not affect the keep ratio. But it decides the size of one dropped square. When $r$ is fixed, the relation between the side length $l$ of one dropped square and $d$ is \begin{equation}l = r \times d. \end{equation} The larger $d$ is, the larger $l$ becomes. The keep ratio is constant during training. Yet we still add randomness to enlarge the variety of images -- $d$ is suitable to achieve this goal \cite{hideandseek}. We randomly select $d$ from a range as \begin{equation}d = random(d_{min}, d_{max}).\end{equation} It is easy to conclude that a smaller $d$ can avoid most failure cases. But some recent works \cite{cutout, dropblock} show that dropping a very small region is useless for convolutional operation, in accordance with our experimental results given later in Section \ref{sec:abl}. \paragraph{Choice of $\delta_x$ and $\delta_y$} $\delta_x$ and $\delta_y$ can shift the mask given $r$ and $d$, making the mask cover all possible situations. So we randomly choose $\delta_x$ and $\delta_y$ as \begin{equation}\delta_x(\delta_y) = random(0, d-1).\end{equation} \paragraph{Statistics of Unsuccessful Cases} \label{sec:fail} Here we statistically show the probability of unsuccessful data augmentation being produced. Basically, a good balance between deletion and reservation of information is the key. We preliminary manifest that our method has lower chance to yield failure cases than Cutout and HaS. We simulate the condition in real datasets and calculate the probability of failure cases for different methods when varying lengths of removal squares. All images are resized to $224 \times 224$ and the object in an image is with size within $[40, 160]$. The keep ratio is set to a typical value of 0.75 \cite{cutout} for all methods. We assume all methods randomly choose the length of removal squares within $[x, 2x]$, where $x$ is the value of the $x$-axis. Random erasing is very similar to Cutout, so we only test cutout. And we expand Cutout to multi-region Cutout for a better performance, which means randomly dropping squares until reaching the keep ratio. If 99 percent of an object is removed or reserved, we call it a failure case. We simulate 100,000 images and the probability of failure case for every method is summarized in Fig. \ref{fig:balance}. Compared with other algorithms, our method always has the best performance. With the increasing length, the superiority of our method becoming increasingly obvious. This observation allows us to choose generally larger square sizes to effectively augment data. \begin{figure} \centering \includegraphics[width=\linewidth]{figure/balance.pdf} \caption{Statistics of failure cases with increasing of the size of dropping squares (lower probability is better). The $x$-axis shows the range of the size of one removal unit. Our method has a much lower failure probability statistically with a slower increasing trend.} \label{fig:balance} \end{figure} \vspace{-0.1in} \paragraph{The Scheme to Use GridMask} We use two ways to apply GridMask in practice to network training. One is to set a constant probability $p$, where we have a chance of $p$ to apply GridMask to every input image. The other way is to increase the probability of GridMask linearly with the training epochs until an upper bound $P$ is achieved. We empirically verify that the second way is better for most experiments. \section{Experiments} We conduct extensive experiments on several major computer vision tasks including image classification, semantic segmentation, and object detection. Our augmentation method improves the baseline on all these important tasks by a large margin. \newcommand{0.157\linewidth}{0.157\linewidth} \begin{figure*}[t] \centering \begin{tabular}{@{\hspace{0.0in}} c@{\hspace{0.01in}} c@{\hspace{0.05in}} c@{\hspace{0.05in}} c@{\hspace{0.05in}} c@{\hspace{0.05in}} c@{\hspace{0.05in}} c} & Handkerchief & Tusker & Cellphone & Pencil case & Cardigan & Fountain pen\\ \rotatebox{90}{\ \ \ \ \quad Input} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000054.JPEG} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000067.JPEG} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000089.JPEG} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00016397.JPEG} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015970.JPEG} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015966.JPEG} \\ \rotatebox{90}{\ \ \quad Baseline} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000054_baseline.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000067_baseline.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000089_baseline.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00016397_baseline.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015970_baseline.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015966_baseline.jpg} \\ \rotatebox{90}{\ \ AutoAugment} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000054_auto.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000067_auto.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000089_auto.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00016397_auto.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015970_auto.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015966_auto.jpg} \\ \rotatebox{90}{\ \ \quad GridMask} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000054_grid.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000067_grid.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00000089_grid.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00016397_grid.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015970_grid.jpg} & \includegraphics[width=0.157\linewidth,height=0.157\linewidth]{figure/ILSVRC2012_val_00015966_grid.jpg} \\ \end{tabular} \vspace{0.1in} \caption{Class activation mapping (CAM) \cite{cam} for ResNet50 model trained on ImageNet, with baseline augment, AutoAugment or our GridMask. The models trained with AutoAugment and our strategy both incline to focus on large important regions.} \label{fig:cam_res} \end{figure*} \subsection{Image Classification} \subsubsection{ImageNet} \label{sec:imagenet} ImageNet-1K is the most challenging dataset for image classification. To demonstrate the strong capability of our proposed augmentation, we conduct experiments on it. We experiment with a wide range of differently sized models, from ResNet50 to ResNet152. We train them with our augmentation on ImageNet from scratch for 300 epochs. The learning rate is set to 0.1, decayed by 10-fold at epochs 100, 200, 265. We train all our models on 8 GPUs, using batchsize 256 (32 per GPU). For the baseline augmentation, we follow the common practice. We first randomly crop a patch from the original image and then resize the patch to the target size (224 $\times$ 224). Finally, the patch is horizontally flipped with a probability of 0.5. For our method, we only use GridMask along with the baseline augmentation. We choose $r=0.6$, and we linearly increase the probability of GridMask from 0 to 0.8 with the increasing of training epochs until the 240th epoch, and then keep it until 300 epochs. The mask is also rotated before use. It is worth noting that we do not use any augmentation on color, while the strategy still consistently achieve better results, as summarized in Table \ref{tab:imagenet1}. In terms of the accuracy, our method improves many different models, from ResNet50 to ResNet152. Our method increases ResNet50, ResNet101, and ResNet152 from 76.5\%, 78.0\%, and 78.3\% to 77.9\%, 79.1\%, and 79.7\%, respectively, with 1.4\%, 1.1\%, and 1.4\% increase. It also proves that the strategy is nicely suitable for models of various scales without careful hand tuning. \begin{table}[t] \centering \begin{tabular} { p{2.1in} p{0.7in}<{\centering} } \thickhline \specialrule{0em}{0pt}{2pt} Model & Accuracy(\%) \\ \hline ResNet50 \cite{dropblock} & 76.5 \\ ResNet50 + Cutout \cite{cutmix} & 77.1 \\ ResNet50 + HaS \cite{hideandseek} & 77.2 \\ ResNet50 + AutoAugment \cite{autoaugment} & 77.6 \\ ResNet50 + GridMask (Our Impl.) & \textbf{77.9} \\ \hline ResNet101 \cite{mixup} & 78.0 \\ ResNet101 + GridMask (Our Impl.) & \textbf{79.1} \\ \hline ResNet152 \cite{resnet} & 78.3 \\ ResNet152 + GridMask (Our Impl.) & \textbf{79.7} \\ \thickhline \end{tabular} \vspace{0.1in} \caption{This table summarizes the result of ImageNet. We can see our model improves the baseline of various models.} \label{tab:imagenet1} \end{table} \paragraph{Comparison with Cutout} Cutout \cite{cutout} also does not distort color and only drops information. Its performance on ImageNet improves ResNet50 by 0.6\% (from 76.5\% to 77.1\%). Our method drops information in a more effective structure, improving ResNet50 by 1.4\% on ImageNet. \paragraph{Comparison with HaS} HaS \cite{hideandseek} is the previous SOTA information dropping method, which is better than Cutout. It uses smaller removal squares (between sizes 16 and 56). When the squares get larger, the result becomes worse in the experiments reported in the original paper. Our setting, contrarily, produces better results even when removal squares are large. It is because we handle the aforementioned failure cases better. \paragraph{Comparison with AutoAugment} AutoAugment \cite{autoaugment} is a SOTA data augmentation method. It uses reinforcement learning to search using tens of thousands of GPU hours to find a combination of existing augmentation policies. It thus performs reasonably better than previous strategies and improve the accuracy of ResNet50 by 1.1\%. Our method, by simply dropping part of the information of the input image in a regular way, even exceeds the effect of AutoAugment. Our method is extremely easy, only uses one data augmentation policy, and still performs more satisfyingly than this type of exhaustive combination of various data augmentation policies. The effectiveness and generality are well demonstrated. \paragraph{Benefit to CNN} To analyze what the model trained with our GridMask learns, we compute class activation mapping (CAM) \cite{cam} for ResNet50 model trained with our policy on ImageNet. We also show the CAM for models trained with baseline augmentation and AutoAugment for comparison. We intriguingly observe common properties between our method and AutoAugment. Compared to the baseline method, both AutoAugment and ours tend to focus on larger spatially distributed regions. It indicates successful augmentation makes the system put attention to large and salient representations. It can quickly improve the generalization ability of models. This figure also demonstrates that the method with our strategy attends to most structurally comprehensive regions. The third image is an example, where the two cellphones are both important. The baseline method just focuses on the right phone, and AutoAugment pays attention to the left one. Contrarily, our method notices both cellphones and helps recognition with this set of more accurate information. \begin{table}[t] \centering \begin{tabular} { p{2.3in} @{\hspace{0.0in}} p{0.8in}<{\centering} } \thickhline \specialrule{0em}{0pt}{2pt} Model & Accuracy (\%) \\ \hline ResNet18 \cite{resnet} & 95.28 \\ ~ + Randomerasing \cite{randomerase} & 95.32 \\ ~ + Cutout \cite{cutout} & 96.25 \\ ~ + HaS \cite{hideandseek} & 96.10 \\ ~ + AutoAugment \cite{autoaugment} & 96.07 \\ ~ + GridMask (Ours) & 96.54 \\ \hline ~ + AutoAugment \& Cutout \cite{autoaugment} & 96.51 \\ ~ + AutoAugment \& GridMask (Ours) & \textbf{96.64} \\ \hline \hline WideResNet-28-10 \cite{wideresnet} & 96.13 \\ ~ + Radnomerasing \cite{randomerase}* & 96.92 \\ ~ + Cutout \cite{cutout} & 97.04 \\ ~ + HaS \cite{hideandseek} & 96.94 \\ ~ + AutoAugment \cite{autoaugment} & 97.01 \\ ~ + GridMask (Ours) & 97.24 \\ \hline ~ + AutoAugment \& Cutout \cite{autoaugment} & 97.39 \\ ~ + AutoAugment \& GridMask (Ours) & \textbf{97.48} \\ \hline \hline ShakeShake-26-32 \cite{shakeshake} & 96.42 \\ ~ + Randomerasing \cite{randomerase} & 96.46 \\ ~ + Cutout \cite{cutout} & 96.96 \\ ~ + Has \cite{hideandseek} & 96.89 \\ ~ + Autoaugment \cite{autoaugment} & 96.96 \\ ~ + GridMask (Ours) & 97.20 \\ \hline ~ + AutoAugment \& Cutout \cite{autoaugment} & 97.36 \\ ~ + AutoAugment \& GridMask (Ours) & \textbf{97.42} \\ \thickhline \end{tabular} \vspace{0.1in} \caption{Results on CIFAR10 are summarized in this table. We achieve the best accuracy on different models. * means results reported in the original paper.} \label{tab:cifar10} \end{table} \subsubsection{CIFAR10} The CIFAR10 dataset has 50,000 training images and 10,000 testing images. CIFAR10 has 10 classes, each has 5,000 training images and 1,000 testing images. We summarize the result on CIFAR10 in Table \ref{tab:cifar10}. We use open-source PyTorch implementations for ResNet-18, WideResNet-28-10, and Shake-Shake. We use the same hyperparameters as reported in the paper \cite{cutout,shakeshake}, except using larger training epochs for ResNet-18 and WideResNet-28-10. We use the same hyperparameters to train all methods. For the baseline augmentation, we first pad the input to 40$\times$40 and randomly crop a patch of size 32$\times$32. Depending on models, the patch is chosen to be horizontally flipped or not. Other augmentation methods are added after the baseline augmentation. We use $r=0.4$, and the same scheduling method as described in Section \ref{sec:imagenet}. One thing to note is that, in \cite{autoaugment}, authors train their policies together with Cutout. For the sake of fairness, we add Cutout and AutoAugment separately in our experiments. Some results are our reimplementation with the same training strategy as ours -- we achieve similar results reported in the original papers. We train every network for three times and report the mean accuracy. The table indicates that our GridMask improves many baseline models by a large margin. With GridMask, we improve the accuracy of ResNet18 from 95.28\% to 96.54\% (+1.26\%), which surpasses previous information dropping methods significantly. Also, our result is better than AutoAugment. For other models, our method can improve the accuracy of WideResNet28-10 and ShakeShake-26-32 from 96.13\% and 96.43\% to 97.24\% (+1.11\%), and 97.20\% (+0.88\%), which is still better than other augmentation methods. Combined with AutoAugment, we achieve SOTA result on these models. \subsubsection{Ablation Study} \label{sec:abl} In this section, we train models with GridMask under different parameters and show variations of GridMask. \paragraph{Hyperparameter $r$} We experiment with setting $r$ as 0.4, 0.5, 0.6, 0.7, and 0.8 on ImageNet with ResNet50. The result is summarized in Fig. \ref{fig:ratio}. According to the result, we choose the most effective $r = 0.6$ as the choice of $r$ for different models on the Imagenet dataset. We also experiment with $r$ being 0.2, 0.3, 0.4, 0.5, and 0.6 on CIAFR10 with ResNet18. The result is shown in Fig. \ref{fig:ratio2}, and we choose $r = 0.4$ as the choice of $r$ on CIFAR10. Through experiments, it is important to note that the $r$ selected on more complex datasets (such as ImageNet) becomes larger. Put differently, we should keep more information on complex datasets to avoid under-fitting, and delete more on simple datasets to reduce over-fitting. This finding is in obedience to our common sense. \begin{figure}[t] \subfigure[ImageNet]{ \begin{minipage}[t]{\linewidth} \centering \includegraphics[width=0.6\linewidth]{figure/ratio.pdf} \label{fig:ratio} \end{minipage} } \subfigure[CIFAR10]{ \begin{minipage}[t]{\linewidth} \centering \includegraphics[width=0.6\linewidth]{figure/ratio2.pdf} \label{fig:ratio2} \end{minipage} } \centering \caption{The accuracies of different $r$ on ImageNet and CIFAR10.} \end{figure} \begin{table}[t] \centering \begin{tabular}{ p{1.2in} p{1.3in}<{\centering} } \thickhline \specialrule{0em}{0pt}{2pt} Range of $d$ & Accuracy (\%) \\ \hline $[40, 60]$ & 77.26 \\ $[96, 120]$ & 77.58 \\ $[150, 170]$ & 77.61 \\ $[200, 224]$ & 77.57 \\ \textbf{[96, 224]} & \textbf{77.89} \\ \thickhline \end{tabular} \vspace{0.05in} \caption{Results on different ranges of $d$. } \label{tab:d} \end{table} \paragraph{Hyperparameter $d$} We experiment with setting different ranges of $d$ on ImageNet, and the results are summarized in Table \ref{tab:d}. When the range of $d$ is concentrated in some small intervals, the accuracy is low. Also when $d$ is too small, the result is even worse. We set $d$ in the optimal range of $[96,224]$. These experiments verify our previous analysis that different $d$ can bring varying effect to networks, and the diversity of $d$ can increase robustness of the network. \paragraph{Variations of GridMask} The first variation is reversed GridMask, which means we keep what we drop in GridMask, and drop what we keep in GridMask. According to our analysis, the reversed GridMask should yield similar performance on different challenging datasets because a good balance of the two conditions in GridMask should be similarly good for reserved GridMask. We try different $r$ for reversed GridMask. The result is listed in Table \ref{tab:rev}. The reversed GridMask runs better than other augmentation methods. \begin{table}[ht] \centering \begin{tabular}{c l c} \thickhline \specialrule{0em}{0pt}{2pt} Dataset & Model & Accuracy(\%) \\ \hline \multirow{4}*{ImageNet} & ResNet50 & 76.51 \\ & ~ + RevGridMask ($r=0.1$) & 77.42 \\ & ~ + RevGridMask ($r=0.2$) & 77.74 \\ & ~ + RevGridMask ($r=0.3$) & 77.55 \\ \hline \multirow{4}*{CIFAR10} & ResNet18 & 95.28 \\ & ~ + RevGridMask ($r=0.2$) & 96.18 \\ & ~ + RevGridMask ($r=0.3$) & 96.46 \\ & ~ + RevGridMask ($r=0.4$) & 96.33 \\ \thickhline \end{tabular} \vspace{0.1in} \caption{Results of reversed GridMask. We still get good results, proving the robustness of our algorithm and superiority of structured information dropping methods.} \label{tab:rev} \end{table} Another variation of GridMask is random GridMask. In the GridMask, we can regard the mask as composed of many units, and we drop a block in every unit. This forms our structured information dropping. A natural variation is to break the structure and randomly drop a block in every unit with a certain probability of $p_u$. The result is summarized in Table \ref{tab:random}. Using random dropping decreases the final accuracy. The structured information dropping is more effective. \begin{table}[t] \centering \begin{tabular} {p{0.8in} p{0.4in}<{\centering} p{0.4in}<{\centering} c } \thickhline \specialrule{0em}{0pt}{1pt} Model & $r$ & $p_u$ & Accuracy (\%) \\ \hline \multirow{9}*{ResNet18} & \multirow{3}*{0.3} & 0.5 & 96.43 \\ & & 0.7 & 96.35 \\ & & 0.9 & 96.40 \\ \cline{2-4} & \multirow{3}*{0.4} & 0.5 & 96.13 \\ & & 0.7 & 96.37 \\ & & 0.9 & 96.42 \\ \cline{2-4} & \multirow{3}*{0.5} & 0.5 & 96.05 \\ & & 0.7 & 96.39 \\ & & 0.9 & 96.40 \\ \thickhline \end{tabular} \vspace{0.1in} \caption{Results of random GridMask. The statistics show randomly drop information does not help improve the results.} \label{tab:random} \end{table} \subsection{Object Detection on COCO Dataset} In this section, we use our GirdMask policy to train objection detectors on the COCO dataset, to show our method is a generic augmentation policy. We use Faster-RCNN as our baseline model with open-source PyTorch implementation \cite{massa2018mrcnn}. All models are initialized using an ImageNet pre-trained weight and are then finely tuned for some epochs on the COCO2017 dataset. The baseline augmentation including randomly deforming the brightness, contrast, saturation, and hue of the input image. And then the image is randomly scaled into a certain range. After that, a horizontal flip operation is randomly applied to the scaled image. Finally, the image is normalized to around zero. Our GridMask is used after the baseline augmentation. We use the same hyperparameters as described in \cite{massa2018mrcnn}, except for the training epochs. We first double the original training epochs for both baseline and our GridMask. Then, we increase the training time for both methods further -- but the baseline models face a serious over-fitting problem and tend to decrease after $2\times$ training epochs. But models trained with our GridMask yield better results. This demonstrates that our method can handle the over-fitting problem generally and essentially. The result of our method with different hyperparameters is shown in Table \ref{tab:det}. We choose $r = 0.5$ following previous experience. The experiments with different probability $p$ on Faster-RCNN-50-FPN are conducted. With a large range of $p$ from 0.3 to 0.9, we all achieve excellent results, which only fluctuate between 38.0\% and 38.3\%. This further demonstrates the stability of our method. When the probability $p$ is 0.7, we obtain the best result, which increases mAP by 0.9\%. When we further increase the training epochs, we get a higher result of 39.2\%, which promotes the baseline by 1.8\%. For Faster-RCNN-X101-32x8d-FPN, we increase the mAP from 41.2\% to 42.6\%, by 1.4\%. \begin{table}[t] \centering \resizebox{\linewidth}{!}{ \begin{tabular}{ l @{\hspace{0.1in}} c @{\hspace{0.1in}} c @{\hspace{0.1in}} c} \thickhline \specialrule{0em}{0pt}{2pt} Model & mAP (\%) & AP50 (\%) & AP75 (\%) \\ \hline Faster-RCNN-50-FPN ($2\times$) & 37.4 & 58.7 & 40.5 \\ ~ + GridMask ($p = 0.3$) & 38.2 & 60.0 & 41.4 \\ ~ + GridMask ($p = 0.5$) & 38.1 & 60.1 & 41.2 \\ ~ + GridMask ($p = 0.7$) & \textbf{38.3} & \textbf{60.4} & \textbf{41.7} \\ ~ + GridMask ($p = 0.9$) & 38.0 & 60.1 & 41.2 \\ \hline Faster-RCNN-50-FPN ($4\times$) & 35.7 & 56.0 & 38.3 \\ ~ + GridMask ($p = 0.7$) & \textbf{39.2} & \textbf{60.8} & \textbf{42.2} \\ \hline \hline Faster-RCNN-X101-FPN ($1\times$) & 41.2 & 63.3 & 44.8 \\ Faster-RCNN-X101-FPN ($2\times$) & 40.4 & 62.2 & 43.8 \\ ~ + GridMask ($p = 0.7$) & \textbf{42.6} & \textbf{65.0} & \textbf{46.5} \\ \thickhline \end{tabular} } \vspace{0.1in} \caption{Result of object detection on the COCO2017 dataset. Our method improves Faster-RCNN-50-FPN and Faster-RCNN-X101-32x8d-FPN significantly, by 1.8\% and 1.4\%.} \label{tab:det} \end{table} \subsection{Semantic Segmentation on Cityscapes} Semantic segmentation is a challenging task in computer vision, which densely predicts the semantic category for every pixel in an image. To demonstrate the universality of our GridMask, we also conduct experiments on challenging Cityscapes dataset. We use PSPNet \cite{pspnet} as our baseline model, which achieved SOTA results for semantic segmentation. We use the same hyperparameters as suggested in \cite{semseg2019}, except for the training epochs. We train for longer epochs following common practice. We do not increase the training epochs for the baseline model, because training longer will cause serious over-fitting problems and decrease the accuracy of the baseline model. All models are initialized by the same ImageNet pre-trained weights and then fine-tuned on the Cityscapes dataset. \begin{table}[ht] \centering \begin{tabular}{p{1.0in} p{0.7in} p{0.9in}<{\centering}} \thickhline \specialrule{0em}{0pt}{2pt} model & Method & mIoU (\%) \\ \hline \multirow{2}*{PSPNet50} & Baseline & 77.3 \\ & GridMask & \textbf{78.1} \\ \hline \multirow{2}*{PSPNet101} & Baseline & 78.6 \\ & GridMask & \textbf{79.0} \\ \thickhline \end{tabular} \vspace{0.1in} \caption{Result of semantic segmentation on the Cityscapes dataset. We train our models on fine set and report mIoU on the validation set.} \label{tab:cityscapes} \end{table} The baseline model already uses strong augmentation policies, including randomly scaling the image from 0.5 to 1.0, randomly rotating the image in $\pm 10$ degrees, with random Gaussian blur the image, with random horizontal flip of the image, and randomly cropping a patch form the image. The strong baseline augmentation greatly raises the difficulty of adding another augmentation policy. Surprisingly, we still achieve a better result after adding our GridMask along with the baseline augmentation. We summarize the result in Table \ref{tab:cityscapes}. \subsection{Expand Grid as Regularization} Data augmentation is only one of the regularization methods. Shape grid is not only useful in data augmentation but also work in other aspects. Inspired by \cite{cutmix}, we combine our Grid shape with Mixup. And we train ResNet50 with our method on ImageNet, we also obtain SOTA results compared with other regularization methods, as shown in Table \ref{tab:imagenet2}. \begin{table}[t] \centering \begin{tabular} {p{1.7in} p{1.1in}<{\centering}} \thickhline Method & Accuracy (\%) \\ \hline ResNet50 \cite{dropblock} & 76.5 \\ ~ + Dropout \cite{dropblock} & 76.8 \\ ~ + Label sommthing \cite{dropblock} & 77.2 \\ ~ + Mixup \cite{cutmix} & 77.4 \\ ~ + DropBlock \cite{dropblock} & 78.1 \\ ~ + CutMix \cite{cutmix} & 78.6 \\ ~ + Ours & \textbf{78.7} \\ \thickhline \end{tabular} \vspace{0.1in} \caption{Combining our GridMask with Mixup, we achieve the best result in all regularization methods.} \label{tab:imagenet2} \end{table} \section{Discussion and Conclusion} We have proposed a simple, general, and effective policy for data augmentation, which is based on information dropping. It deletes uniformly distributed areas and finally forms a grid shape. Using this shape to delete information is more effective than setting complete random location. It has achieved remarkable improvement in different tasks and models. On the ImageNet dataset, it increases the baseline by 1.4\%. In the task of COCO2017 object detection, we improve the baseline by 1.8\%, and in the task of Cityscapes semantic segmentation, we boost the baseline by 0.9\%. This effect is consistently stronger than other information deletion based data augmentation methods. Further, our method can serve as a new baseline policy in future data augmentation search algorithms. Our method is one successful way of using structured information dropping, and we believe there are more also with excellent structures. We hope the study on information dropping methods inspires more future work to understand the importance of designing effective structures, which may even help reinforcement learning to get improved. {\small \bibliographystyle{ieee_fullname}
\section{Introduction}\label{derivation} The problem we consider is \begin{equation}\label{eq:ls} Ay=b \end{equation} where $A=[a_{ij}] \in\mathbb R^{n\times n}$ and $b=[b_i] \in\mathbb R^{n}$ are given, and $y\in\mathbb R^{n}$ is the vector of the unknowns. The matrix $A$ is assumed to be nonsingular, so that the problem has a unique solution. We also assume that the problem needs to be solved in a distributed computational framework determined by a set of connected computational nodes which can communicate through a generic sequence of graphs. Let $A_i\in\mathbb R^{1\times n}$ and $b_i\in\mathbb R$ be the $i$-th row of $A$ and the $i$-th component of $b$ respectively. It is assumed that each computational node $ i $ knows the corresponding $ A_i $ and $ b_i $ and that each node needs to obtain the solution $ y^* $ through an iterative, distributed algorithm. The considered problem is important as linear systems appear naturally in a number of applications. One important example of application is to Ordinary Kriging \cite{kriging,krige,matheron}, an optimal linear prediction technique of the expected value of a spatial random field $\mathcal Z(s),\ s\in\mathbb{R}^n$. Ordinary Kriging can be applied when the random field under study is isotropic and intrinsically stationary, that is, the expected value $E(\mathcal Z(s))=m$ is constant and the variance $Var(\mathcal Z(s)-\mathcal Z(s+h))=2\gamma (h)$ depends only on $h$. In this case the model parameter estimation relies on the solution of a linear system like (\ref{eq:ls}) (see equations (3.2.13)-(3.2.15) in \cite{kriging} and the example in Section 5). When the semivariogram $\gamma (h)$ of the random field has a sill, it can be assumed that there is a range $\bar{h}$ over which the covariance $Cov(\mathcal Z(s),\mathcal Z(s+h))=0$, when $|h|>\bar{h}$. In this case the matrix $A$ of the Ordinary Kriging linear system becomes sparse, since its elements are the estimates of $\gamma(h)$ and each sampled node of the random field $\mathcal Z$ needs to memorize only the information brought by its neighbours at a distance lower than $\bar{h}$ to estimate the model parameters. When the mean $m$ of the random field is known the problem simplifies into what is called \emph{Simple Kriging}. In Section 5 we will use Simple Kriging as an example of application of our method. There is a vast literature devoted to solving systems of linear equations in the conventional centralized computational environment \cite{greenbaum, saad}, as well as a number of results that cover parallelization of classical iterative methods which are applicable to the case of fully connected distributed computational environment, \cite{fs1}. Our interest in this paper is the class of fixed point methods \cite{greenbaum, saad} and their extensions to the distributed framework, as de\-scribed above. In other words, we develop a class of novel, fully distributed, iterative fixed point methods to solve \eqref{eq:ls}, wherein each node can exchange messages only with the ones in its neighborhood in the communication graph, and each node obtains the estimate of the solution $y^*$ of problem \eqref{eq:ls}. It is well known that \eqref{eq:ls} can be transformed into an equivalent fixed point problem \begin{equation} y = My + d, \label{fp} \end{equation} and one can apply the Banach contraction principle and define the fixed point iterative method of the form $ y^{k+1} = M y^k + d$, for suitable choices of $M\in\mathbb R^{n\times n}$ and $d\in\mathbb R^{n}$ (see Section 2 for the details). \\ The sufficient and necessary condition for the convergence of such iterative sequence is $ \rho(M) < 1, $ where $ \rho(M) $ is the spectral radius of $ M. $ Furthermore, a sufficient condition for the convergence of $ \{y^k\} $ is given by $ \|M\| < 1 $ for an arbitrary matrix norm $ \|\cdot\|. $ Clearly, there is a number of suitable ways to define the iterative matrix $ M $ in such way that either $ \rho(M) < 1 $ or $ \|M\| < 1 $ for many matrix classes, like symmetric positive definite matrices, M-matrices, H-matrices, etc \cite{Berman}. Typical examples of this type of methods are the Jacobi and Gauss - Seidel method as well as their modifications like Jacobi Overrelaxation (JOR), Successive Overelaxation (SOR), Symmetric Successive Overelaxation (SSOR) method and so on \cite{greenbaum, saad}. The convergence of fixed point methods is linear and the convergence factor is determined by the spectral radius or the norm of $ M. $ The main idea of relaxation methods is to introduce a parameter that reduces the norm (or the spectral radius) of the corresponding iterative matrix and ensures faster convergence. There is a rich literature on parallelization of fixed point iterative meth\-ods, where the computational nodes communicate in an all-to-all fashion \cite{fs1}, \cite{fs2}, \cite{fm}, \cite{bertsekas}. In the case of very large dimension one needs to split the com\-pu\-ta\-tion\-al effort between different nodes to speed up the algorithm. In this type of computational environment, the total cost of solving the problem of interest is mainly dictated by the corresponding computational cost and the communication cost of exchanging messages between the parallelized nodes (processes) along iterations. Usually, major bottlenecks include waiting for the slowest node to complete an iteration, or latency incurred by the time to communicate a message. For this reason asynchronous methods, which allow for latency in communication and non\-uni\-form distribution of computational work, are also considered, \cite{fs2}. The methods of this type are convergent under different communication latency conditions \cite{fs2}. The framework we consider in this paper for solving systems of linear equations, in more detail, assumes a network of computational nodes which communicate through a generic directed graph, which can depend on time. Thus the results in \cite{fs1, fm, fs2, bertsekas} are not applicable. The same framework is also considered in \cite{dls1,dls2,dls3,dls4,nedic}, and a survey of the methods is presented in \cite{survey}. The focus of these methods is to ensure convergence of the local approximations to the global solution, in the presence of time-varying com\-munica\-tion graphs. In the context of these algorithms, convergence is defined in two possible ways. In \cite{dls1, dls4} each node holds a local approximation of a subset of the variables and convergence of these local variables to the corresponding part of the solution is required. In \cite{dls2,dls3,nedic} every node contains a vector of the same size as the unknown vector of the linear system, and the convergence of each local vector to the full solution in ensured. We are interested in the second scenario. The method presented in \cite{fs1} is applicable to a general problem of the type (\ref{eq:ls}) with loose restrictions on the matrix $ A $ and can be used to solve the linear least squares problem as well. In this paper, we propose a novel distributed method to solve \eqref{eq:ls}, which we refer to as DFIX (Distributed Fixed Point). DFIX assumes the same computational framework as \cite{dls2,nedic,dls3} but differs significantly from the above mentioned methods. Namely, DFIX is derived starting from an as\-so\-ci\-at\-ed (centralized) fixed point method, rather than basing the derivation directly on the initial linear system. We extend the convergence theory of centralized fixed point methods to the distributed case in the sense of sufficient conditions. That is, we demonstrate that the sufficient condition $ \|M\|_{\infty} < 1 $ continues to work in the distributed environment. The main convergence result is completely analogous to the centralized case - given an iterative matrix with the infinity norm smaller than 1, the iterative sequence is convergent for an arbitrary starting point. The theory presented here thus covers a large class of linear systems. We prove linear convergence of DFIX under directed strongly connected networks and explicitly quantify the corresponding con\-ver\-gence factor in terms of network and linear system parameters. As detailed below, numerical simulations demonstrate ad\-van\-tages of DFIX over some state of the art methods. With respect to the underlying graph, representing the connection among the computational agents, we consider both the case when the graph is fixed (i.e., the connectivity among the nodes is the same at any time during the execution of the algorithm) and the case when the network changes at every iteration. In the fixed graph case we prove that convergence holds if the network is strongly connected, while in the time-varying graph case we give suitable assumptions over the sequence of networks. We prove that the time-independent case is a particular case of the time-varying case, but for the sake of clarity we first present and analyse the algorithm assuming the network is fixed, and then we generalize the analysis to the time-varying case. Any system of linear equation \eqref{eq:ls} with symmetric matrix $A$ can be considered as the first order optimality condition of an unconstrained op\-ti\-miza\-tion problem with cost function $\frac{1}{2}x^tAx-b^tx.$ It is therefore of interest to compare the approach of solving \eqref{eq:ls} applying some distributed optimization method \cite{harnessing, diging, extra} to the minimization of the quadratic function $\frac{1}{2}x^tAx-b^tx$ with DFIX. We thus compare computational and communication costs of DFIX with the state of the art optimization method from \cite{harnessing} and show that the computational costs with DFIX are significantly lower, while the com\-mu\-ni\-ca\-tion costs are comparable or go in favor of DFIX, depending on the connectivity of the underlying graph. Thus the numerical efficiency of DFIX is also shown. A comparison with the method from \cite{nedic} is also presented in Section 5, demonstrating the clear advantage of DFIX. This paper is organized as follows. Section 2 contains the description of the computational framework together with a brief overview of fixed point iterative methods that will be used further on. The method DFIX is defined and analysed in Section 3 for the fixed graph case. In Section 4 we present the time-varying case. Numerical results that illustrate theoretical analysis as well as an application of DFIX to a kriging problem are presented in Section 5. Some conclusions are drawn in Section 6. \section{Preliminaries} Let us first briefly recall the theory of fixed point iterative methods for systems of linear equations. Given a generic \footnote{the relation between the method in \eqref{fpiter} and \eqref{eq:ls} is described further ahead} method of type (\ref{fp}) \begin{equation} x^{k+1} = M x^k + d, \label{fpiter} \end{equation} we know that the method is convergent if $ \rho(M) < 1, $ where we recall that $ \rho(M) $ is the spectral radius of $ M$, i.e., the largest eigenvalue of $M$ in modulus. This condition is both necessary and sufficient for convergence. Given any matrix norm $ \|\cdot\| $ one can also state the sufficient convergence condition as $ \|M\| < 1. $ There are many ways of transforming (\ref{eq:ls}) to the fixed point form (\ref{fp}), depending on the properties of $ A, $ with Jacobi and Gauss - Seidel methods, as well as their relaxation versions being the most studied methods. To fix the idea before defining the distributed method we recall here the Jacobi and Jacobi Overrelaxation, JOR, method, keeping in mind that we will consider a generic $ M $ in the next section. Assume that $ A $ is a nonsigular matrix with nonzero diagonal entries. Using the splitting $ A = D - P, $ with $ D $ being the diagonal matrix, $ D = \diag(a_{11},\ldots,a_{nn}), $ the Jacobi iterative method is defined by (\ref{fpiter}) with $$ M = D^{-1}P:=M_{J}. $$ In other words, given $ d=D^{-1}b $ and denoting by $x^k = (x^k_1,\dots,x^k_n)$ the estimate of solution to \eqref{eq:ls} at iteration $k$, the new iteration is defined by $$ x_{i}^{k+1} = -\frac{1}{a_{ii} }\sum_{j=1,j\neq i}^n a_{ij} x_{j}^k + d_i, \; i=1,\ldots,n. $$ The method is linearly convergent for many classes of matrices, for example strictly diagonally dominant matrices, symmetric positive definite matrices etc \cite{greenbaum, saad}, and the rate of convergence is determined by $ \rho(M_{J}). $ To speed up convergence and extend the class of matrices for which the method is convergent, one can introduce the relaxation parameter $ \omega \in \mathbb{R}$ and define $$ M = \omega D^{-1}P + (1-\omega) I. $$ In other words, the JOR iteration is given by \begin{equation} \label{JOR} x_{i}^{k+1} = (1-\omega) x_{i}^k - \frac{w}{a_{ii} }(\sum_{j=1,j\neq i}^n a_{ij} x_{j}^k + b_i), \; i=1,\ldots,n. \end{equation} If $ A $ is a symmetric positive definite matrix, the JOR method converges for $$ \omega \in (0, \frac{2}{\rho(M_J)}), $$ see \cite{greenbaum, saad}. Assuming that each node can communicate directly with every other node, the method can be applied in parallel and asynchronous manner and the convergence follows from the results of \cite{fs2,bertsekas}. Let us now define precisely the computational environment we consider. Assume that the network of nodes is a directed network $ {\cal G} = ({\cal V},{\cal E}), $ where $ {\cal V} $ is the set of nodes and $ {\cal E} $ is the set of all edges, i.e., all pairs $(i,j) $ of nodes where node $i$ can send information to node $j$ through a communication link. \begin{definition} The graph $\mathcal G=(\mathcal V,\mathcal E)$ is \emph{strongly connected} if for every couple of nodes $i,j$ there exists an oriented path from $i$ to $j$ in $\mathcal G$. That is, if there exist ${s_1,\dots, s_l}$ such that $(i,s_1), (s_1, s_2), \dots, (s_l,j)\in\mathcal E.$ \end{definition} \noindent {\bf Assumption A1.} The network $ {\cal G} = ({\cal V},{\cal E}) $ is directed, strongly connected, with self-loops at every node. \begin{remark} The case of undirected network $\mathcal G$ can be seen as the particular case of directed graph where $\mathcal G$ is symmetric. That is, $(i,j)\in\mathcal E$ if and only if $(j,i)\in\mathcal E.$ In this case, the hypothesis that $\mathcal G$ is strongly connected is equivalent to $\mathcal G$ connected. \end{remark} Let us denote by $ O_i $ the in-neighborhood of node $i$, that is, the set of nodes that can send information to node $i$ directly. Since the graph has self loops at each node, then $i\in O_i$ for every $i$. We associate with $ {\cal G} $ an $n \times n$ matrix $ W$, such that the elements of $ W $ are all nonnegative and each row sums up to one. More precisely, we assume the following. \noindent{\bf Assumption A2.} The matrix $ W \in \mathbb{R}^{n \times n} $ is row stochastic with elements $ w_{ij} $ such that $$ w_{ij} > 0 \mbox{ if } j\in O_i, \; w_{ij} = 0 \mbox{ if } j \notin O_i$$ Let us denote by $w_{min}$ a constant such that all nonzero elements of $ W $ satisfy $ w_{ij} \geq w_{\min}>0. $ Under the previously stated assumptions we know that such constant exists. Moreover, we have $w_{\min} \in (0,1)$. Therefore, for all elements of $ W $ we have \begin{equation} \label{wmin} w_{ij} \neq 0 \Rightarrow w_{ij} \geq w_{\min}. \end{equation} The diameter of a network is defined as the largest distance between two nodes in the graph. Let us denote with $\delta$ the diameter of $\mathcal G.$ \section{DFIX method} We consider now a generic fixed point method for solving \eqref{eq:ls} by the fixed point iterative method (\ref{fpiter}), with $\ M=[m_{ij}] \in\mathbb R^{n\times n},\ d=[d_i] \in\mathbb R^{n}$ defined in such a way that node $i$ contains the $i$-th row $M_i\in\mathbb R^{1\times n}$ and $d_i\in\mathbb R.$ Moreover, we assume that the fixed point $y^*$ of \eqref{fp} is a solution of \eqref{eq:ls}. The algorithm is designed in such way that each node has its own estimate of the solution $ y^*. $ Thus at iteration $ k $ each node $ i $ has its own estimate $ x_i^k \in \mathbb{R}^n $ with components $ x_{ij}^k, \; j=1,\ldots,n. $ The DFIX method is presented in the algorithm below.\\ \noindent{\bf Algorithm DFIX} \begin{itemize} \item[Step 0] Initialization: Set $k = 0$. Each node chooses $ x_i^0 \in \mathbb{R}^n. $ \item[Step 1] Each node $i$ computes \begin{equation}\label{eq:step1}\begin{aligned} &\hx{ii}{k+1}=\sum_{j=1}^n m_{ij}\x{ij}{k}+d_i,\\ & \hx{ij}{k+1} =\hx{ij}{k},\ i \neq j. \\ \end{aligned} \end{equation} \item[Step 2] Each node $i$ updates its solution estimate \begin{equation}\label{eq:step2}\x{i}{k+1}=\sum_{j=1}^nw_{ij}\hx{j}{k+1}\end{equation} and sets $ k = k+1. $ \end{itemize} Notice that at Step 1 each node $ i $ updates only the $i$-th component of its solution estimate and leaves all other components unchanged, while in Step 2 all nodes perfom a consensus step \cite{consensus, graphs, touri} using the set of vector estimates $ \hx{j}{k+1}. $ Defining the global variable at iteration $k$ as \begin{equation*} X^k=\left( x_1^k; \ldots; x_n^k \right)\in\mathbb R^{n^2}, \end{equation*} Algorithm DFIX can be stated in a condensed form using $ X^k $ and the following notation \begin{equation*} \widehat M_i= \left(\begin{array}{ccccc} 1& & & & \\ &\ddots & & &\\ m_{i1} &\dots &m_{ii} &\dots & m_{in}\\ & & &\ddots &\\ & & & &1\\ \end{array}\right)\in\mathbb R^{n\times n}, \phantom{spa} \widehat d_i=\left(\begin{matrix} 0 \\ \vdots\\ d_i\\ \vdots\\ 0 \\ \end{matrix}\right)\in\mathbb R^{n}. \end{equation*} More precisely, matrix $\widehat M_i$ has the $i$-th row equal to $M$, the rest of diagonal elements are equal to 1 and the remaining elements are equal to 0. Vector $\widehat d_i$ has only one nonzero element in the $i$-th row which is equal to $d_i$. Now, Step 1 can be rewritten as \begin{equation*} \hx{i}{k+1}=\widehat{M}_i\x{i}{k}+\hat{d}_i, \end{equation*} and we can rewrite the Steps 1-2 in matrix form as \begin{equation}\label{eq:globalit} X^{k+1}=(W\otimes I)(\mathcal MX^k+\hat d) \end{equation} where $\mathcal M=\diag\left(\widehat M_1,\dots,\widehat M_n\right)\in\mathbb R^{n^2\times n^2},$ $\widehat d=\left(\hat d_1;\dots;\hat d_n\right)\in\mathbb R^{n^2}$ and $\otimes $ denotes the Kronecker product of matrices. We remark here that equation \eqref{eq:globalit} is only theoretical, in the sense that since each agent has access only to partial information, the global vector $X^k$, the matrix $\mathcal M$ and the vector $\widehat d$ are not computed at any node. We derived equation \eqref{eq:globalit} to get a compact representation of Algorithm 1 and to use it in the convergence analysis. The following theorem shows that for every $i \in \{1,\ldots,n\} $ the local sequence $\{\x{i}{k}\}$ converges to the fixed point $y^*$ of \eqref{fp}. Denote \begin{equation*} X^*=\left(y^*; \ldots; y^*\right) \in\mathbb R^{n^2}. \end{equation*} \begin{theorem} Let Assumptions A1 and A2 hold, $\|M\|_\infty=\mu < 1 $ and let $\{X^k\}$ be a sequence generated by \eqref{eq:globalit}. There exists a constant $\tau <1$ such that for every $k$ the global error $E^{k}=X^k-X^*$ satisfies \begin{equation} \|E^{k+1}\|_{\infty}\leq\tau \|E^{k-\delta+1}\|_{\infty}, \end{equation} where $\delta$ denotes the diameter of the underlying computational graph $ {\cal G}.$ \end{theorem} \begin{proof} Since $W$ is assumed to be row stochastic there holds $(W\otimes I)X^*=X^*$. Moreover, using the fact that $\hat d=(I \otimes I-\mathcal M)X^*$, we obtain the following recursion \begin{equation}\label{novo1} E^{k+1}=(W\otimes I) \mathcal M E^k. \end{equation} Notice that $\|(W\otimes I) \mathcal M\|_{\infty} \leq 1$, so we have \begin{equation}\label{novo2}\|E^{k+1}\|_{\infty}\leq \|E^k\|_{\infty}. \end{equation} Now, denoting by $e_i^k$ the $i$-th block of $E^k$ (the local error corresponding to node $i$) and by $e_{ij}^k$ its $j$-th component, from \eqref{novo1} we obtain the following \begin{equation}\label{eq:errorcomp} \e{ij}{k+1}=w_{ij}M_j\e{j}{k}+\sum_{s\neq j}w_{is}\e{sj}{k}. \end{equation} We prove the thesis by proving that if the distance between $j$ and $i$ in the graph is equal to $l$, then for every $k$ \begin{equation}\label{eq:distl} |\e{ij}{k+1}|\leq\tau'\|E^{k-l+1}\|_{\infty},\ \text{for a constant}\ \tau'<1. \end{equation} We proceed by induction over the distance $l$. If $l=1$, that is, if there is an edge from $j$ to $i$, then $w_{ij}\geq w_{min}>0$. By \eqref{eq:errorcomp} we get \begin{equation*}\label{eq:diagerrderiv} \begin{aligned} |\e{ij}{k+1}|&\leq w_{ij}|M_j\e{j}{k}|+\sum_{s\neq j}w_{is}|\e{sj}{k}| \leq w_{ij}\mu\|E^{k}\|_{\infty}+\|E^{k}\|_{\infty}\sum_{s\neq j}w_{is}\leq\\ &\leq\big(1-w_{ij}(1-\mu)\big)\|E^{k}\|_{\infty}\leq\big(1-w_{\text{min}}(1-\mu)\big)\|E^{k}\|_{\infty}, \end{aligned} \end{equation*} and defining $\tau' =\big(1-w_{\text{min}}(1-\mu)\big)<1,$ we get \begin{equation}\label{eq:tau1} |\e{ij}{k+1}|\leq\tau'\|E^{k}\|_{\infty}. \end{equation} Assume now that \eqref{eq:distl} holds for distance equal to $l-1$, and let us prove it for $l$. Let $(j, s_{l-1}, s_{l-2}, \dots, s_1, i)$ be a path of length $l$ from $j$ to $i$. In particular we have that $w_{is_{1}}>0$ and thus \begin{equation}\label{eq:s1} |\e{ij}{k+1}|\leq w_{is_1}|\e{s_1j}{k}|+\sum_{s\neq s_1}w_{is}|\e{sj}{k}|. \end{equation} For each of the terms $|\e{sj}{k}|$ in the sum, by \eqref{novo2}, we have \begin{equation}\label{eq:1} |\e{sj}{k}|\leq\|E^k\|_{\infty}\leq\|E^{k-l+1}\|_{\infty}. \end{equation} Let us now consider the term $|\e{s_1j}{k}|$. Since $(j, s_{l-1}, s_{l-2}, \dots, s_1, i)$ is a path of length $l$ from $j$ to $i$ and the distance between $j$ and $i$ is equal to $l$, we have that the distance between $j$ and $s_1$ is equal to $l-1$ and therefore, by inductive hypothesis \begin{equation}\label{eq:2} |\e{s_1j}{k}|\leq\tau'\|E^{k-(l-1)}\|_{\infty} = \tau'\|E^{k-l+1}\|_{\infty},\ \text{for}\ \tau'<1. \end{equation} Replacing \eqref{eq:1} and \eqref{eq:2} in \eqref{eq:s1}, we get \begin{equation} \begin{aligned} |\e{ij}{k+1}|&\leq w_{is_1}\tau'\|E^{k-l+1}\|_{\infty}+\sum_{s\neq s_1}w_{is}\|E^{k-l+1}\|_{\infty}=\\ & = \left(1-w_{s_1j}(1-\tau')\right)\|E^{k-l+1}\|_{\infty}\leq\\ &\leq \left(1-w_{min}(1-\tau')\right)\|E^{k-l+1}\|_{\infty} \end{aligned} \end{equation} and defining $\tau:=\left(1-w_{min}(1-\tau')\right)<1$ we get \eqref{eq:distl}. Now the thesis follows directly from the fact that the distance between any two nodes is smaller or equal than the diameter $\delta$ of the graph. \end{proof} \section{Time-varying Network} The method discussed in the previous sections is valid only if the graph representing the communication among the agents is the same at each iteration. If some failure of the communication link between two agents occurs during the execution of the algorithm, the underlying network changes, and Theorem 1 does not apply anymore. To deal with these possible changes we consider the case where the network is given, possibly different, at each iteration. We extend DFIX to this framework and we give assumptions on the sequence of graphs that yield a convergence result analogous to Theorem 1. In particular we show that, in order to achieve convergence, strong connectivity is not necessary at any time. Assume that a sequence of directed graphs $\{\mathcal G_k\}_k$ is given, such that $\mathcal G_k$ represents the network of nodes at iteration $k$. That is, at iteration $k$, each node can communicate with its neighbours in $\mathcal G_k$. The DFIX algorithm described by equations \eqref{eq:step1} and \eqref{eq:step2} can be applied in this case if we replace \eqref{eq:step2} with \begin{equation}\label{eq:step2_time} \x{i}{k+1}=\sum_{j=1}^nw_{ij}^k\hx{j}{k+1} \end{equation} where $W^k$ is the consensus matrix associated with the graph $\mathcal G_k$, that is, $W^k$ satisfies Assumption A2 with $\mathcal G = \mathcal G_k$. With this modification, the equation describing the global iteration becomes \begin{equation}\label{eq:globalit_time} X^{k+1}=(W^k\otimes I)(\mathcal MX^k+\hat d). \end{equation} We will prove a convergence result for a class of sequences of graphs. We first present and analyze the assumptions on such sequence. \begin{definition} Given $\mathcal G_1, \mathcal G_2$ graphs with $\mathcal G_i=(\mathcal V, \mathcal E_i)$, the \emph{composition} of $\mathcal G_1$ and $\mathcal G_2$ is defined as $\mathcal G_2\circ \mathcal G_1 = (\mathcal V, \mathcal E)$ where \begin{equation} \mathcal E := \{(j,i)\in \mathcal V^2\ |\ \exists\ s\in\mathcal V\ \text{such that}\ (j,s)\in \mathcal E_1, (s,i)\in \mathcal E_2\}. \end{equation} \end{definition} That is, there is an edge from $j$ to $i$ in $\mathcal G_2\circ \mathcal G_1$ if we can find a path from $j$ to $i$ such that the first edge of the path is in $\mathcal G_1$ and the second edge is in $\mathcal G_2$. This definition can be extended to finite sequences of graphs of arbitrary length. \begin{remark}\label{edgescomposition} Let us consider a generic set of graphs $\mathcal G_1,\dots,\mathcal G_{m}$. It is easy to see that if for every index $j$ the graph $\mathcal G_j$ has self-loops at every node then the set of edges of the composition $\mathcal G_1\circ\dots\circ\mathcal G_{m}$ contains the set of edges of $\mathcal G_j$ for every $j$. In particular, if there exists an index $\hat\jmath\in\{1,\dots,m\}$ such that $\mathcal G_{\hat\jmath}$ is fully connected, then $\mathcal G_1\circ\dots\circ\mathcal G_{m}$ is also fully connected. \end{remark} \begin{definition}Given an infinite sequence of networks $\{\mathcal G_k\}_k$ and a positive integer $\bar m$, we say that the sequence is \emph{jointly fully} (respectively, \emph{strongly}) \emph{connected for sequences of length $\bar m$} if for every index $k$, the composition $\mathcal G_k\circ \mathcal G_{k+1}\circ\dots\circ\mathcal G_{k+\bar m-1}$ is fully (respectively, strongly) connected. \end{definition} \begin{definition}Given an infinite sequence of networks $\{\mathcal G_k\}_k$ and two integers $\tau_0$, $l$, we say that the sequence is \emph{repeteadly jointly strongly connected with constants $\tau_0$, $l$}, if for every index $k$, the composition $\mathcal G_{\tau_0+kl}\circ \mathcal G_{\tau_0+kl+1}\circ\dots\circ\mathcal G_{\tau_0+(k+1)l}$ is strongly connected. \end{definition} \begin{definition} Given two vertices $i, \ j$ we say that there is a \emph{joint path} of length $l$ from $i$ to $j$ in $\mathcal G_k,\dots, \mathcal G_{k+\bar m -1}$ if there exist $s_1,\dots, s_{l-1}$ such that $(i,s_1)\in \mathcal E_{k+\bar m -1}, \ (s_1,s_2)\in \mathcal E_{k+\bar m-2}, \dots, (s_{l-1},j)\in \mathcal E_{k+\bar m-l}$, and we say that $i, j$ have \emph{joint distance} $l$ in $\mathcal G_k,\dots, \mathcal G_{k+\bar m -1}$ if the shortest joint path from $i$ to $j$ is of length $l$. \end{definition} \noindent Our analysis is based on the following assumption.\\ \noindent {\bf Assumption A3.} $\{\mathcal G_k\}$ is a sequence of directed graphs, with self-loops at every node, jointly fully connected for sequences of length $\bar m$, for some positive integer $\bar m$.\\ \noindent The algorithm presented in \cite{dls2} works for time-varying network in a similar framework. Formally, the hypothesis on $\{\mathcal G_k\}$ in \cite{dls2} is the following.\\ \noindent {\bf Assumption A3'.} $\{\mathcal G_k\}$ is a sequence of directed graphs, with self-loops at every node, jointly strongly connected for sequences of length $\bar p$, for some positive integer $\bar p$.\\ \noindent We show now that Assumptions A3 and A3' are equivalent, in the sense specified by Proposition 1. In the following, given an integer $m$, we denote with $\mathcal G^m$ the composition of $m$ copies of $\mathcal G$. \begin{lemma} If $\mathcal G$ is a directed strongly connected graph with self-loops at every node and diameter $\delta$, then $\mathcal G^\delta$ is fully connected. \begin{proof} By definition of composition we have that $(i,j)$ is an edge in $\mathcal G^{\delta}$ if and only if \begin{equation}\label{compositioncondition} \exists s_1,\dots, s_{\delta-1}\in\mathcal V\ \text{such that}\ (i,s_1), (s_1, s_2), \dots, (s_{\delta-1},j) \in \mathcal G. \end{equation} We want to prove that for every $i,j\in\mathcal V$ a sequence of nodes $s_h$ as in \eqref{compositioncondition} exists.\\ Since $\mathcal G$ is fully connected with diameter $\delta$, there exists a path in $\mathcal G$ from $i$ to $j$ of length $l\leq\delta$. That is, there exist a set of nodes $v_1, \dots, v_{l-1}$ such that $(i,v_1), (v_1, v_2), \dots, (v_{l-1},j)$ are edges in $\mathcal G$ and therefore a sequence satisfying \eqref{compositioncondition} is given by \begin{equation*} s_h = \begin{cases} v_h & h = 1:l-1 \\ j & h = l:\delta. \end{cases} \end{equation*} \end{proof} \end{lemma} \begin{prop} Let $\{\mathcal G_k\}$ be a sequence of graphs where, for each $k$, $\mathcal G_k = (\mathcal V, \mathcal E_k)$ is a directed graph with self-loops at every node. The following are equivalent: \begin{enumerate} \item[(1)] there exist $\tau_0, l\in\mathbb N$ such that $\{\mathcal G_k\}$ is repeatedly jointly strongly connected with constants $\tau_0, l$ \item[(2)] there exists $\bar p\in\mathbb N$ such that $\{\mathcal G_k\}$ is strongly connected for sequences of length $\bar p$ \item[(3)] there exists $\bar m\in\mathbb N$ such that $\{\mathcal G_k\}$ is fully connected for sequences of length $\bar m$ \end{enumerate} \end{prop} \begin{proof} It is easy to see that $(2)\Rightarrow(1)$ with $\tau_0 = 0$ and $l=\bar p$ and since full connectivity clearly implies strong connectivity, we have that $(3)\Rightarrow(2)$ with $\bar p = \bar m.$\\ We now prove that $(1)\Rightarrow(2)$ with $\bar p = 2l.$ That is, we prove that if (1) holds, then for every index $s$ the composition $\mathcal G_s\circ\dots\circ\mathcal G_{s+2l-1}$ is strongly connected. Given an index $s$, we denote with $\bar r$ the remainder of the division of $(s-\tau_0)$ by $l$, we define $\bar h:=l^{-1}(s-\tau_0+l-\bar r)$. By definition of $\bar r$ and $\bar h$ and applying (1) with $k = \bar h$ we have that the graph \begin{equation*}\begin{aligned} H:&= \mathcal G_{s+l-\bar r}\circ\dots\circ\mathcal G_{s+2l-\bar r-1}=\\ &= \mathcal G_{\tau_0+\bar h l}\circ\dots\circ\mathcal G_{\tau_0+(\bar h+1) l-1} \end{aligned} \end{equation*} is strongly connected and thus \begin{equation*}\begin{aligned} &\mathcal G_s\circ\dots\circ\mathcal G_{s+2l-2} = \mathcal G_s\circ\dots\circ\mathcal G_{s+l-\bar r-1}\circ H\circ \mathcal G_{s+2l-\bar r}\circ\dots\circ\mathcal G_{s+2l-1} \end{aligned}\end{equation*} is strongly connected. Since $2l-\bar r\in{l+1,\dots,2l}$ we have the thesis.\\ Finally, we prove that $(2)\Rightarrow(3)$. Since the size of $\mathcal V$ is finite, there exists a finite number of graphs with vertices $\mathcal V$. In particular, there exists a finite integer $L$ equal to the number of strongly connected graphs with vertices $\mathcal V.$ We denote with $H_1, \dots H_L$ such graphs, with $\delta_j$ the diameter of $H^j$ and with $\bar\delta:= \max{\delta_j}.$ Given any index $k$, we consider $(\bar\delta-1)L+1$ sequences of length $\bar p$ as follows: \begin{equation*}\begin{aligned} &S_1 = \mathcal G_{k}\circ\mathcal G_{k+1}\dots\circ\mathcal G_{k+\bar p-1}\\ &S_2 = \mathcal G_{k+\bar p}\circ\mathcal G_{k+\bar p+1}\dots\circ\mathcal G_{k+2\bar p-1}\\ &\vdots\\ &S_{(\bar\delta-1)L+1} = \mathcal G_{k+(\bar \delta-1)L\bar p}\circ\mathcal G_{k+(\bar \delta-1)L\bar p+1}\dots\circ\mathcal G_{k+(\bar \delta-1)L\bar p+\bar p-1}. \end{aligned} \end{equation*} Statement (2) implies that, for every $j\in\{1,\dots,(\bar\delta-1)L+1\},\ S_j\in\{H_1, \dots H_L\}$ and thus there exists an index $\hat\imath\in\{1,\dots,L\}$ such that at least $\bar\delta$ elements of $\{S_1,\dots, S_{(\bar\delta-1)L+1}\}$ are equal to $H_{\hat\imath}$. Using the fact that, by Lemma 1, $H_{\hat\imath}^{\delta_{\hat\imath}}$ is fully connected and Remark \ref{edgescomposition}, we have \begin{equation*}\begin{aligned} \mathcal G_{k}\circ\mathcal G_{k+1}\circ\dots\circ\mathcal G_{k+(\bar \delta-1)L\bar p+\bar p-1} = S_1\circ\dots\circ S_{(\bar\delta-1)L+1} \end{aligned} \end{equation*} fully connected, and thus (3) holds with $\bar m = (\bar \delta-1)L\bar p+\bar p$.\\ \end{proof} To conclude the considerations on the sequence of networks we remark that, since we are assuming that the linear system \eqref{eq:ls} has unique solution and that each node contains exactly one row of the coefficient matrix, the $D$-connectivity hypothesis introduced in \cite{nedic} is equivalent to Assumption A3' and thus, by Proposition 1, to Assumption A3. \begin{theorem} Assume that a sequence of networks $\{\mathcal G_k\}_k$ is given, satisfying Assumption A3, and that for every index $k$ the corresponding consensus matrix $W^k$ satisfies Assumption A2. Let $\{X^k\}$ be a sequence generated by \eqref{eq:globalit_time} with $\|M\|_\infty=\mu < 1 $. There exists a constant $\sigma <1$ such that for every $k\in\mathbb N$ the global error $E^{k}=X^k-X^*$ satisfies \begin{equation} \|E^{k+1}\|_{\infty}\leq\sigma \|E^{k-\bar m+1}\|_{\infty}, \end{equation} where $\bar m$ is the constant given by Assumption A3. \begin{proof} We follow the proof of Theorem 1. For every index $k$, the matrix $W^k$ is row stochastic and $\|(W^k\otimes I) \mathcal M\|_{\infty} \leq 1$, so we get \begin{equation}\label{novo1_time} E^{k+1}=(W^k\otimes I) \mathcal M E^k. \end{equation} and \begin{equation}\label{novo2_time}\|E^{k+1}\|_{\infty}\leq \|E^k\|_{\infty}. \end{equation} For every node $i$, $j$ and for every iteration index $k$, we have \begin{equation} \e{ij}{k+1}=w_{ij}^kM_j\e{j}{k}+\sum_{s\neq j}w_{is}^k\e{sj}{k}. \end{equation} We now prove that if the joint distance between $j$ and $i$ in $\mathcal G_{k-\bar m+1}$, $\mathcal G_{k-\bar m+2}$, $\dots, \mathcal G_k$ is equal to $l$, then for every $k$ \begin{equation}\label{eq:distltime} |\e{ij}{k+1}|\leq\sigma'\|E^{k-l+1}\|_{\infty},\ \text{for}\ \sigma'<1. \end{equation} We proceed by induction over the joint distance $l$. If $l=1$, that is, if $w_{ij}^k>0$, proceeding as in the derivation of \eqref{eq:diagerrderiv} we get \begin{equation*} \begin{aligned} |\e{ij}{k+1}|&\leq\big(1-w_{ij}^k(1-\mu)\big)\|E^{k}\|_{\infty}\leq\big(1-w_{\text{min}}(1-\mu)\big)\|E^{k}\|_{\infty}=:\sigma\|E^{k}\|_{\infty}. \end{aligned} \end{equation*} We assume now that \eqref{eq:distltime} holds for distance equal to $l-1$ and we prove it for $l$. Let $(j, s_{l-1}, s_{l-2}, \dots, s_1, i)$ be a joint path of length $l$ from $j$ to $i$ in $\mathcal G_{k-\bar m+1}, \mathcal G_{k-\bar m+2},\dots, \mathcal G_k$ In particular we have that $w_{is_{1}}^k>0$ and thus \begin{equation}\label{eq:s1time} |\e{ij}{k+1}|\leq w_{is_1}|\e{s_1j}{k}|+\sum_{s\neq s_1}w_{is}|\e{sj}{k}|. \end{equation} Using the fact that $(j, s_{l-1}, s_{l-2}, \dots, s_1)$ is a joint path of length $l-1$ from $j$ to $s_1$ in $\mathcal G_{k-\bar m+1}, \mathcal G_{k-\bar m+2},\dots, \mathcal G_{k-1}$, applying the inductive hypothesis and proceeding as in the proof of the previous theorem, we get \begin{equation} \begin{aligned} |\e{ij}{k+1}|\leq \left(1-w_{min}(1-\sigma')\right)\|E^{k-l+1}\|_{\infty} \end{aligned} \end{equation} with $\sigma'$ given by \eqref{eq:distltime} for distance $l-1$, and defining $\sigma:=\left(1-w_{min}(1-\sigma')\right)<1$ we get \eqref{eq:distltime} for distance equal to $l$.\\ Since the sequence $\{\mathcal G_k\}$ is fully connected for sequences of length $\bar m$ we have that for every couple of nodes $i, j$ the joint distance between $j$ and $i$ in $\mathcal G_{k-\bar m+1}, \mathcal G_{k-\bar m+2},\dots, \mathcal G_k$ is smaller or equal than $\bar m$ and we get the thesis. \end{proof} \end{theorem} Lemma 1 shows that if we consider the time-independent case as the particular instance of the time-varying case where each of the graphs $\mathcal G_k$ is equal to $\mathcal G$ with diameter $\delta$, then Assumption 3 holds with $\bar m = \delta$ and the two theorems give the same inequality for the error vectors. \section{Numerical results} In this section we present initial testing results for the DFIX method. The DFIX is compared with the state-of-the-art distributed optimization algorithm from \cite{harnessing} and the method for solving systems of linear equations presented in \cite{nedic}. The test set consists of two types of problems: Simple Kriging problems and linear systems with strictly diagonally dominant co\-ef\-fi\-cient matrix. In Section 5.1 we study how the computational and com\-mu\-ni\-ca\-tion cost of DFIX is influenced by the connectivity of the underlying network and we compare DFIX with the methods from \cite{harnessing} and \cite{nedic} on a simple kriging problem. In Section 5.2 we repeat the comparison considering a randomly generated linear system. In Section 5.3 we consider the case of time-varying network. The results demonstrate that DFIX, analogously to the classical results, outperforms the corresponding optimization method for solving the un\-con\-strained quadratic problem both in terms of computational and com\-mu\-ni\-ca\-tion costs. With respect to the method from\cite{nedic} the comparison is again favorable for DFIX, in the case of the iterative matrix with suitable properties. Clearly, the method from \cite{nedic} is designed for a wider class of problems, but its efficiency is significantly lower than DFIX efficiency in the case of unique solution and a suitable iterative matrix.\\ For the sake of completeness we describe here both methods we compare with. We already remarked in the introduction that finding a solution of \eqref{eq:ls} is equivalent to solve the unconstrained optimization problem with quadratic objective function given by $\frac{1}{2}x^tAx - b^tx$. When applied to this optimization problem, the method from \cite{harnessing}, abbreviated as "Harnessing", can be stated as follows. Within one Harnessing iteration, each node computes its own solution estimate $ x_i^{k+1} $ and an ad\-di\-tion\-al vector $ s_i^{k+1}, $ which is an estimation for the average gradient, according to the following rule \begin{eqnarray} x_i^{k+1} & = & \sum_{j =1}^n w_{ij} x_i^k - \eta s_i^k \label{h1}\\ s_i^{k+1} & = & \sum_{j =1}^n w_{ij} s_i^k + A_i (x_i^{k+1} - x_i^k) \label{h2} \end{eqnarray} with $ \eta $ in (\ref{h1}) being the hand tuned step size parameter and $A_i$ denoting the $i$-th row of the matrix. The second method \cite{nedic} we consider, abbreviated as "Projection", deals with the linear system \eqref{eq:ls} directly and is specified as follows. Before the iterative procedure starts, each agent $i$ defines the local initial vector $x^0_i$ as any solution of the equation $A_ix = b_i$ then, at every iteration, each node performs the following update: \begin{equation*} x^{k+1}_i = x^k_i-\frac{1}{|\mathcal{O}_i|}P_i\left(|\mathcal{O}_i|x^k_i-\sum_{j\in\mathcal{O}_i}x^k_j\right) \end{equation*} where $\mathcal{O}_i$ denotes the neighborhood of node $i$ in the network and $P_i$ is the projection matrix on the subspace $\ker(A_i) = \{x\in\mathbb R^{n}\ |\ A_ix = 0 \}$. The DFIX method we consider here is defined using Jacobi Overrelaxation, as specified in Section 2, as underlying fixed point method. The iteration $k$ of the resulting method at each node is given by \begin{equation}\label{eq:JORstep1} \begin{aligned} &\hx{ii}{k+1}=(1-\alpha)\x{ii}{k}-\frac{\alpha}{a_{ii}}\left(\sum_{j\neq i}a_{ij}\x{ij}{k}-b_i\right), \; \hx{ij}{k+1}=\x{ij}{k}\ \ \ \text{for}\ j\neq i, \\ \end{aligned}\end{equation} and \begin{equation}\label{eq:JORstep2} \x{i}{k+1}=\sum_{j=1}^nw_{ij}\hx{j}{k+1}. \end{equation} In the rest of the section we refer to the method defined by equations \eqref{eq:JORstep1}, \eqref{eq:JORstep2} as DFIX - JOR. \subsection{ Simple Kriging problem} The first problem we consider is Simple Kriging \cite{kriging}. Let us consider a physical process modeled as a spatial random field and assume that a network of sensors is given in the region of interest, taking measurements of the field. The goal is to estimate the field in any given point of the region. Assuming that the field is Gaussian and stationary, and that the expected value and covariance function are known at any point, this kind of problem can be solved by Simple Kriging method. Denote with $\mathcal Z(s)$ the value of the random field at the point $s$, and with $\mu(s)$ its expected value, which is assumed to be known. Moreover, by the stationarity assumption, we have that the covariance between the value of $\mathcal Z$ at two points is given by $$\Cov(\mathcal Z(s_1), \mathcal Z(s_2))=\mathcal K(\|s_1-s_2\|_2)$$ for some nonnegative function $\mathcal K$. Given $\{s_1,\dots,s_n\}\subset\mathbb R^2$ the positions in space of the $n$ sensors of the network, let $\{\mathcal Z(s_1),\dots,\mathcal Z(s_n)\}$ be the sampled values at those points and define the covariance matrix $A =[a_{ij}] \in\mathbb R^{n\times n}$ as \begin{equation*}\label{eq:krigingK} a_{ij}=\mathcal K(\|s_i-s_j\|_2). \end{equation*} Now, given a point $\bar s$ where we want to estimate the field, we define the vector $b\in\mathbb R^{n}$ as \begin{equation*}\label{eq:krigingRHS} b_{i}=\mathcal K(\|s_i-\bar s\|_2). \end{equation*} The predicted value of $\mathcal Z(\bar s)$ is then given by \begin{equation*} \hat p(s):=\mu(\bar s)+\sum_{i=1}^n x_i(\mathcal Z(s_i)-\mu(s_i)) \end{equation*} where $(x_1,\dots,x_n)$ is the approximate solution of the linear system \begin{equation}\label{eq:System} Ax=b. \end{equation} Clearly, the matrix $ W $ plays an important role in the DFIX - JOR method. So let us first illustrate the influence of connectivity within the network in terms of communication traffic and computational cost for the above described kriging problem, with covariance function given by \begin{equation}\label{eq:covariance} \mathcal K(t):=\exp(-5t^2). \end{equation} We assume a set $\{s_1,\dots,s_{100}\}\subset[-30,30]^2$ of agents is given and for any $m\in\{2, 4, \dots, 48,50\}$ we take the $m$-regular graph with vertices $\{s_1,\dots,s_{100}\}$. That is, given the value of $m$, we define the network so that each node has degree $m$. The matrix W is defined using the Metropolis weights \cite{metropolis} which in the $m$-regular case are given by \begin{equation}\label{eq:metropolisregular} w_{ij} = \begin{cases} (m+1)^{-1} & \text{if}\ j=i\ \text{or}\ j\in\mathcal{O}_i\\ 0 & \text{otherwise} \end{cases} \end{equation} For every value of the degree $m$ we apply DFIX-JOR method to solve $ Ax = b. $ At Figure 1 and 2 we plot the number of iterations performed by the method and the total communication cost, respectively, until the stopping criterion \begin{equation}\label{termcond} \max_{i = 1,\ldots,n} \|Ax_i^{k} - b\| \leq 10^{-4} \end{equation} is satisfied, for graphs of increasing degree. In other words we are asking that each node solves the system with the residual tolerance of $ 10^{-4}. $ The communication cost is computed as follows. At each iteration, Step 1 does not require any communication between the agents, while in Step 2 node $i$ shares $\x{i}{k}$ with all the agents in its neighbourhood. The per-iteration traffic is thus given by $nm = 2|\mathcal E|$, where $\mathcal E$ is the set of edges of the underlying network and $m$ is the degree. \\ From Figures 1 and 2 we can see that, as the degree of the network increases, the number of iterations required to satisfy \eqref{termcond} decreases, while the total communication traffic first decreases then increases again. This behaviour can be explained as follows\footnote{Note that here we implicitly assume that there is a dedicated communication link between any pair of agents, i.e., the broadcast nature of communication is not considered. While broadcast transmissions can be considered in future studies, current comparisons are appropriate and fair and reflect practical scenarios where dedicated peer-to-peer channels are ensured, e.g., through frequency division multiple access or similar schemes.}. As the connectivity of the graph improves, the local information is distributed through the network more efficiently, and a smaller number of iterations is necessary. On the other hand, if the degree is larger, the consensus step \eqref{eq:step2} of the algorithm requires each node to share its local vector with a larger number of neighbours, yielding a higher communication traffic at each iteration. The fact that the overall communication traffic (Figure 2) is nonmonotone suggests that for large values of the degree, the decrease in the number of iterations in not enough to balance the higher per-iteration traffic. \begin{figure}[h] \centering \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{DEFIX_iterations-crop} \caption{Number of iterations}{} \end{minipage}% \hfill \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{DEFIX_communication-crop} \caption{Communication cost}{} \end{minipage} \end{figure} Let us now compare the DFIX - JOR with Harnessing \cite{harnessing} and Projection method \cite{nedic}. We consider a $10\times10$ grid of nodes located at $\{s_1,\dots,s_{100}\}\subset[-3,3]^2$ and, given a communication radius $R>0$ we define the network so that nodes $i$ and $j$ are neighbours if and only if their distance is smaller than $R$. The linear system that we consider is derived by the kriging problem described at the beginning of this section. That is, we consider again $Ax=b$ with \begin{equation} a_{ij} = \mathcal K(\|s_i-s_j\|_2),\phantom{sp} b_i = \mathcal K(\|s_i-\bar s\|_2) \label{kriging2} \end{equation} where $\mathcal K$ is given by \eqref{eq:covariance} and $\bar s$ is a fixed random point in $[-3,3]^2$. Proceeding as in the previous test, we compute the communication traffic and com\-pu\-ta\-tion\-al cost required by the three methods to achieve the tolerance specified at \eqref{termcond}, for different values of the communication radius $R$. For each method, the overall computational cost is given by the number of iterations performed times the per-iteration cost, calculated as the number of scalar operations in one iteration. Similarly, the communication traffic is given by the number of iterations times the total number of vectors shared by the nodes during one iteration, times the length $n$ of the vector. The matrix $W$ is defined as in \cite{metropolis}. That is, we define the off-diagonal elements as \begin{equation*} w_{ij} = \begin{cases} \frac{1}{1+\max\{m_i, m_j\}} & \text{if}\ j\in\mathcal O_i\\ 0 & \text{otherwise} \end{cases} \end{equation*} where $m_i$ denotes the degree of node $i$, and the diagonal elements as $$w_{ii} = 1-\sum_{j\neq i} w_{ij}$$ so that the resulting matrix $W$ is stochastic. The stopping criterion is the same as in the previous test, i.e., each node solves the problem with the tolerance of $ 10 ^{-4}. $ The initial point at each node is the same for the three methods and is defined as follows: $$x^0_{ii} = \frac{b_i}{a_{ii}}, \phantom{sp} x^0_{ij} = 0\ \text{for every}\ j\neq i. $$ Moreover, the relaxation parameter $\alpha$ in \eqref{eq:JORstep1} is chosen as $\frac{2}{\|D^{-1}A\|_\infty}$ where $D=\diag(a_{11},\ldots, a_{nn}), $ while for Harnessing method we take in \eqref{h1} $\eta = \frac{1}{3L}$ where $L =\max_{i=1:n} 2\|A_i\|_2^2$.\\ In Figures 3 and 4 we plot the obtained results. As we can see, in this framework, DFIX method is more efficient than the two methods we compare with, both in terms of computational cost and in terms of communication traffic. $\ $\\ \begin{figure}[h] \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{grid_kriging_DefixHarnessingProj-crop} \caption{Simple kriging problem (\ref{kriging2}), computational cost}{} \end{minipage} \hfill \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{grid_kriging_DefixHarnessingProj_communication-crop} \caption{Simple kriging problem (\ref{kriging2}), communication traffic}{} \end{minipage} \end{figure} \subsection{Strictly diagonally dominant systems} Let us now consider a linear system $Ax=b$ of order $n = 100$, where $ A $ and $ b $ are generated as follows. For every index $i$ we take $b_i$ randomly generated with uniform distribution in $(0,1)$, and $A$ is a symmetric diagonally dominant random matrix obtained as follows: take $\hat{a}_{ij}\in(0,1)$ with uniform distribution and then set $\tilde{A}=\frac{1}{2}(\hat{A}+\hat{A}^T)$ and finally $A = \hat{A}+(n-1)I$, where we denote with $I$ the identity matrix of order $n$. As the underlying network we consider an $m$-regular graph with $n$ nodes. For every fixed value of the degree $m$ we generate, as just described, 10 random linear systems, solve all of them using the three methods and compute the average number of iterations necessary to arrive at termination. For each method, the total amount of computation and communication are then obtained multiplying the average number of iterations and the per-iteration computational cost and communication traffic, respectively. The matrix $W$ is defined as in \eqref{eq:metropolisregular}, the step sizes $\alpha$ and $\eta$, the initial guess at each node and the termination condition are as in the previous test. In Figures 5 and 6 we plot the results for $m$ in in $\{2, 4, \dots, 48, 50\}$. Similarly to the previous test, we have that DFIX outperforms both Harnessing an Projection method in terms of computation and communication. From Figure 6 we can notice that the communication required by the two methods for distributed linear systems, DFIX and Projection, is similar and that the difference with the communication required by Harnessing method increases as the degree of the graph increases. Regarding the computational cost (Figure 5), we have that while DFIX is cheaper than the other two methods, Projection method seems to be more influenced by the connectivity of the network and it is more efficient than Harnessing only for large vaues of the degree.\\ \begin{figure}[h] \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{dreg_random_DefixHarnessingProj-crop} \caption{$m$-regular graph, computational cost}{} \end{minipage} \hfill \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{dreg_random_DefixHarnessingProj_communication-crop} \caption{$m$-regular graph, communication traffic}{} \end{minipage} \end{figure} \subsection{Time-varying Network} We now compare the performance of the three methods in the time-varying case described in Section 4. The sequence $\{\mathcal G_k\}$ is generated as follows. We first fix a strongly connected graph $\mathcal G = (\mathcal V, \mathcal E)$ and a scalar $\gamma\in(0,1]$. Then, at every iteration $k$ we randomly generate $\mathcal E_k$ by uniformly sampling $\gamma |E|$ edges from $\mathcal E$ and we set $\mathcal G_k = (\mathcal V, \mathcal E_k)$. This construction can be interpreted as having a fixed underlying graph $\mathcal G$ that represents the available communication links among the nodes, and employing at each iteration only a fraction $\gamma$ of the links. In particular, $\gamma = 1$ corresponds to the case when $\mathcal G_k = \mathcal G$ for every $k$. As remarked in Section 4, this is equivalent to the time-independent case. The test we present here is carried on comparing the communication and computational cost required by the three methods to solve a given linear system using the same sequence of networks $\{\mathcal G_k\}$. In practice we generated the linear system as in Section 5.2 and we chose $\mathcal G$ as the undirected $m$-regular graph with $n=100$ vertices and degree $m=8$. We repeated the same test for $\gamma$ in $\{0.1, 0.2, \dots, 1\}$. For every $k$ the consensus matrix $W^k$ associated with $\mathcal G_k$ is defined as in \eqref{eq:metropolisregular}, the terminantion condition and all the prameters of the methods are chosen as in the previous sections. In Figures \ref{fig:time_comp}, \ref{fig:time_compDH} and \ref{fig:time_comm} we plot the results (Note that Figure 8 repeats the results of Figure 7, focusing only on the comparison Harnessing versus DFIX-JOR). The computational cost and the communication traffic are calculated as described in Section 4.2. \begin{figure}[h] \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{dreg8_computation-crop.pdf} \caption{computational cost}{} \label{fig:time_comp} \end{minipage} \hfill \begin{minipage}{.45\textwidth} \centering \includegraphics[width=\linewidth]{dreg8_compDH-crop.pdf} \caption{computational cost}{} \label{fig:time_compDH} \end{minipage}\\ \centering \begin{minipage}{.45\textwidth} \includegraphics[width=\linewidth]{dreg8_communication-crop.pdf} \caption{communication traffic}{} \label{fig:time_comm} \end{minipage} \end{figure} We can see that, in the considered framework, DFIX outperforms Har\-ness\-ing method both in terms of computation and communication. Com\-pa\-ring with Projection, we have that, for every value of the parameter $\gamma$, the computational cost of DFIX is significantly lower, but it requires a smaller amount of communication only for large values of $\gamma$ (that is, when each graph $\mathcal G_k$ is equal or close to $\mathcal G$). Moreover we can see that for all the methods there is an optimal value of $\gamma<1$, that minimizes the communication traffic, suggesting that using the whole graph $\mathcal G$ at every iteration (that is, setting $\gamma=1$) is unefficient. A similar phenomena happens for Harnessing and DFIX also for the computational cost (Figure 8), while we can see in Figure 7 that Projection method is most efficient when all the available communication links are used at each iterations. For $\gamma<1$ the networks $\mathcal G_k$ are in general not connected, but the joint connectivity of the overall sequence is enough to ensure the convergence of the methods. \section{Conclusions} We proposed a class of novel, iterative, distributed methods for the solution of linear systems of equations, derived upon classical fixed point methods. We proved global convergence in the case when the communication network is strongly connected and we showed that the convergence rate depends on the diameter of the network and on the norm of the underlying iterative matrix. In particular we have that if the graph is strongly connected, the obtained result is analogous to the classical, centralized, case. We extended the presented method to the time-varying case and we proved an analogous convergence result, assuming the networks satisfy suitable joint con\-nec\-tivity assumptions, comparable with those required by different methods in literature. Our algorithm was compared with the relevant methods presented in \cite{harnessing} and \cite{nedic}. The numerical results showed good performance of DFIX compared with the mentioned methods. In particular, in the vast majority of the considered tests, DFIX outperformed the two methods in terms of both computational cost and communication traffic. \section*{Acknowledgements} This work is supported by the BIGMATH project which has received funding by the European Union’s Horizon 2020 research and innovation programme under the Marie Sk\l{}odowska-Curie Grant Agreement no. 812912. The work of Jakoveti\'c, Kreji\'c and Krklec Jerinki\'c is partially supported by Serbian Ministry of Education, Science and Technological Development, grant no. 174030.
\section{Introduction} The Burchnall-Chaundy theory (\cite{BC1,BC2,BC3}) concerns the classification of all pairs $(P,Q)$ of commuting ordinary differential operators $P$ and $Q$ of order $m$ and $n$, respectively. Burchnall and Chaundy carried out their work before the relationship between integrable systems and Riemann surfaces or complex curves, i.e.~the spectral theory for integrable systems, was discovered in the course of the investigation of the integrable system defined by the Korteweg-de~Vries equation. The main purpose of the present article is to rephrase the Burchnall-Chaundy theory in terms of the theory of spectral data for integrable systems. For this the Krichever construction and the theory of Baker-Akhiezer functions will play important roles. Because the spectral curve can have singularities, we will use the description of these concepts for analytic singular curves in \cite{KLSS}. Our construction can also serve as an explanation of the relation of these two concepts to differential operators. We will consider algebras $A$ that are generated by pairs $(P,Q)$ of commuting differential operators of order $m$, $n$. In Section~\ref{Se:direct} we will associate to any such algebra a holomorphic matrix-valued function $M: \mathbb{C} \to \mathbb{C}^{m\times m},\,\lambda\mapsto M(\lambda)$, and thereby spectral data which are composed of a generally singular complex curve $X'$ describing the eigenvalues of $(M(\lambda))_{\lambda\in\mathbb{C}}$ and a second datum describing the corresponding eigenvector bundle. In contrast to parts of Burchnall's and Chaundy's original theory, we will here restrict ourselves to the case where the orders $m$ and $n$ of the generating differential operators are relatively prime. This restriction corresponds to the algebra $A$ being of rank $1$, which means by definition that the eigenspaces of $M(\lambda)$ are generically $1$-dimensional. In this situation the eigenvectors of $M(\lambda)$ comprise a holomorphic line bundle $\Lambda'$ on $X'$. Whenever $X'$ has no singularities and is therefore a Riemann surface, the well-known 1--1 correspondence between line bundles and divisors on Riemann surfaces is often used to define spectral data as the pair $(X',D)$ of the eigenvalue curve $X'$ and the divisor $D$ corresponding to the eigenline bundle \,$\Lambda'$\,. In order to define spectral data in a similar manner also for complex curves $X'$ with singularities, the concept of a divisor needs to be generalised. The proper generalisation to use in this context is the concept of \emph{generalised divisors} introduced by Hartshorne \cite{Ha86}, at first for Gorenstein curves. In this sense, a generalised divisor on $X'$ is a subsheaf of the sheaf of meromorphic functions on $X'$ which is locally finitely generated over the sheaf of holomorphic functions on $X'$. The usefulness of this concept for our purposes is expressed by the fact that one again has a 1--1 correspondence between line bundles and generalised divisors on complex curves $X'$. By virtue of this fact, we will define the spectral data corresponding to a rank 1 commutative algebra $A$ (essentially) as the pair $(X',\Sss')$ comprising the eigenvalue curve $X'$ and the generalised divisor $\Sss'$ on $X'$ that corresponds to the eigenline bundle $\Lambda'$ on $X'$. It is also one of the purposes of this paper to explore the extent of the usefulness of generalised divisors in Hartshorne's sense, also for non-Gorenstein curves, and to convince the reader of their manifest value. We do not consider the case of commutative algebras of rank higher than $1$ (which are generated by differential operators whose degrees are not relatively prime), because in this case the eigenvector bundle of $M(\lambda)$ is a vector bundle of rank higher than $1$. Such vector bundles do not correspond to generalised divisors, because the sheaf of their sections is not contained in the sheaf of meromorphic functions on $X'$. For this reason the construction and investigation of spectral data in this case would require a very different theory. In Section~\ref{Se:inverse} we will solve the inverse problem for the spectral data thus defined for rank 1 algebras $A$ of commuting differential operators. This means that we will prove that $A$ is essentially uniquely determined by its spectral data (in fact, the domain of definition of the differential operators is extended to a certain maximum), and we will also see how to reconstruct $A$ from its spectral data (see Theorems~\ref{T:inverseproblem} and \ref{T:inverseproblemsolution}). This constitutes the rephrasing of Burchnall's and Chaundy's main classification result in terms of the present, modern concepts. We will additionally show that two rank 1 algebras of commuting differential operators are isomorphic to each other as algebras if and only if the corresponding spectral curves $X'$ are biholomorphic (see Theorem~\ref{P:isomorphic-algebras}). In other words, the family of all rank 1 algebras of commutative differential operators that are isomorphic to a given one $A$ can be generated by taking the spectral data $(X',\mathcal{S}')$\, corresponding to \,$A$\, and then varying the spectral divisor \,$\mathcal{S}'$\, throughout its connected component in the space of generalised divisors on \,$X'$\,. To the best of our knowledge, this statement is new in the sense that it has no counterpart in Burchnall's and Chaundy's classical work. We know from the discussion in \cite[Section~4]{KLSS} that the pairs \,$(X',\mathcal{S}')$\, occur in families where the complex curves $X'$ are partial normalisations, i.e.~branched one-fold coverings, of one another, and the generalised divisors \,$\mathcal{S}'$\, are direct images under the corresponding covering maps. These spectral data obtained by partial normalisation correspond to commutative algebras which contain $A$ as subalgebra. Such families always contain one member \,$(X'',\mathcal{S}'')$\, of minimal \,$\delta$-invariant, i.e.~minimal singularity. $X''$ was called the $\mathcal{S}'$-halfway normalisation of $X'$ in \cite{KLSS}. This minimal member corresponds to the maximal commutative rank 1 algebra which contains $A$, i.e.~to the centraliser of $A$ in the algebra of all ordinary differential operators. This construction also permits to find pairs \,$(X''',\mathcal{S}''')$\, which are below \,$(X',\mathcal{S}')$\, by a branched one-fold covering and so that \,$X'''$\, has arbitrarily large \,$\delta$-invariant. Such pairs correspond to rank 1 subalgebras of the given commutative rank 1 algebra $A$. We now begin our work by deriving a certain standard form for pairs of commuting differential operators in Section~\ref{Se:algebra}, which will facilitate the construction of the spectral data. \section{The algebra of differential operators} \label{Se:algebra} Let us first introduce the algebra of ordinary differential operators. We consider three different algebras of differential operators: \begin{enumerate} \item[Case 1:] The domain is an open interval $I=(a,b)$ and the algebra is $\Ass(I):=\C^{\infty}(I,\R)[D]$ where $D=\frac{d}{dt}$ with parameter $t\in I$. \item[Case 2:] The domain $I$ is a real $1$-dimensional non-compact submanifold of $\C$ which is simply connected and the algebra is $\Ass(I):=C^{\infty}(I,\C)[D]$ where $D=\frac{d}{dz}$ with parameter $z\in I$. \item[Case 3:] The domain is an open, connected subset $I$ of $\C$ and the algebra is $\Ass(I):=\Oss_I[D]$ where $D=\frac{d}{dz}$ with parameter $z\in I$. \end{enumerate} Along with the domain \,$I$\, we fix a point \,$t_0 \in I$\, in any of these cases. We write these polynomials as \[P=\alpha_mD^m+\ldots+\alpha_0.\] We denote the operator of multiplication with a function $f$ also by $f$. The algebra results as a subalgebra of the linear endomorphisms of the coefficient functions defined on $I$. Due to the Leibniz rule the commutator of the differential operator $D$ and the operator of multiplication with a coefficient function $f$ acting on functions on $I$ is given by the multiplication with $f'$, the derivative of $f$. Therefore, we set $Df-fD=f'$. \begin{Lemma} \label{lem:ordinary differentials} For any coefficient function $f$ on $I$ and any $n\in{\mathbb N}$ the composition of the operator $D^n$ with $f$ acting on the functions on $I$ satisfies the identity $$D^nf=\sum\limits_{0 \leq i\leq n}\binom{n}{i}f^{(i)}D^{(n-i)}.$$ \end{Lemma} \begin{proof} Let $\ad(D)$ denote the operator $A\mapsto[D,A]$ acting on the linear operators on the space of smooth functions. Then the Leibniz rule may be written as $\ad(D)f=f'$. Hence we have the identity $Df=fD+\ad(D)f=(\ad^0(D)f)D^1+(\ad^1(D)f)D^0$. This implies $$D^nf=\sum\limits_{0 \leq i\leq n}\binom{n}{i} \left(\ad ^{i}(D)f\right)D^{(n-i)}= \sum\limits_{0 \leq i\leq n}\binom{n}{i}f^{(i)}D^{(n-i)}.$$ \end{proof} If $P$ and $Q$ are two elements of $\Ass(I)$, then due to this formula the product $PQ$ is again an element of $\Ass(I)$. Since this product was derived from the action of the ordinary differential operators on the smooth functions, it endows $\Ass(I)$ with the structure of an associative algebra (a subalgebra of the operators on the smooth functions on $I$). The order of an element $P$ of $\Ass(I)$ is the highest number $m$ whose coefficient $\alpha_m$ does not vanish identically on $I$. Let us first use two transformations in order to bring a commutative subalgebra into standard form. The first transformation changes the domain $I$ of the corresponding coefficient functions of $\Ass(I)$. If $\xi$ is a smooth resp.~holomorphic, invertible function on $I$, the second transformation $P\mapsto\xi^{-1}P\xi$ is an inner automorphism of $\Ass(I)$. Now these two transformations may be used in order to bring a commuting pair of differential operators into standard form: \begin{Proposition}\label{prop:standard form} Let $P\in \Ass(I)$ be a differential operator of order $m$. Then $P$ can be transformed into an element $\widetilde{P}\in \Ass(\tilde{I})$ with highest coefficient equal to $1$ and vanishing second highest coefficient. Thereby all operators $Q\in \Ass(I)$ which commute with $P$ are transformed into $\widetilde{Q}\in \Ass(\tilde{I})$ which commute with $\widetilde{P}$ and have constant highest and second highest coefficient. \end{Proposition} \begin{proof} We first consider case 1. If $\xi(t)$ is a diffeomorphism of an open interval $I$ onto another open interval $\tilde{I}$, the vector field $\frac{d}{dt}$ is transformed under this diffeomorphism onto the vector field $1/\xi'(t) \frac{d}{d\xi}$. This transformation therefore induces an isomorphism of the algebras $\Ass(I)$ and $\Ass(\tilde{I})$. We now construct such a deformation so that the highest coefficients of $\widetilde{P}$ and ultimately $\widetilde{Q}$ are equal to $1$. The highest coefficient $\alpha_m$ of $P$ cannot vanish identically. So there exists a subinterval of $I$ on which $\alpha_m$ has no roots. Then there exists an invertible function $\chi$ such that $\alpha_m=\chi^m$. Hence, $\frac{d\xi}{dt}=\chi^{-1}$ and $\xi = \int \chi^{-1}dt$ is strictly monotonous and therefore a diffeomorphism of some subinterval of $I$ with some interval $\tilde{I}$ with the desired properties. Then $P\in\Ass(\tilde{I})$ has highest coefficient one. We define $\eta:=\frac{\alpha_{m-1}}{m}$. Then the inner automorphism corresponding to the function $\zeta=\exp\left(-\int\eta \,dt\right)$ transforms $P$ into a differential operator of the desired form. If an operator $Q\in\Ass(I)$ of order $n$ commutes with $P$, then the above transformation maps $Q$ to an operator $\widetilde Q\in\Ass(\tilde I)$. Since this transformation is an algebra homomorphism, $\widetilde{Q}$ commutes with $\widetilde{P}$. Lemma \ref{lem:ordinary differentials} yields that the coefficient of $D^{m+n-1}$ in $\widetilde Q\widetilde P-\widetilde P\widetilde Q$ is equal to \begin{align}\label{eq:highest coefficient} n\widetilde \beta_n\widetilde \alpha_m'-m\widetilde \alpha_m\widetilde \beta_n'=0, \end{align} where $\widetilde{\alpha}_m$ and $\widetilde{\beta}_n$ are the highest coefficients of $\widetilde P$ and $\widetilde Q$, respectively. Therefore, $\widetilde\beta_n$ is constant if $\widetilde\alpha_m$ is constant. The coefficient of $D^{m+n-2}$ in $\widetilde Q\widetilde P-\widetilde P\widetilde Q$ is due to Lemma \ref{lem:ordinary differentials} proportional to $$n\widetilde\alpha_{m-1}'-m\widetilde\beta_{n-1}'.$$ Therefore, $\widetilde\beta_{n-1}$ is constant if $\widetilde\alpha_{m-1}$ is constant. In case 2, the proof is essentially the same as in case 1 with all (sub)intervals replaced by (sub)manifolds of $\C$. We now choose $\xi=\int \eta^{-1} dz$ which is complex-valued. Due to the inverse function theorem, $\xi$ defines a diffeomorphism on a possibly smaller submanifold of $I$ onto another submanifold $\tilde{I}$. In case 3, there are no big changes from the proof of case 1 either. The (sub)intervals are replaced by open subsets of $\C$, the smooth maps are replaced by holomorphic maps and the diffeomorphisms by biholomorphic maps. Again the inverse function theorem gives that $\xi$ is a biholomorphic function on a possibly smaller open subset of $I$. \end{proof} We remark that if $m$ is equal to one, an inductive application of Proposition \ref{prop:standard form} shows that the coefficients of $Q$ are constant and $Q$ is a polynomial with respect to $P$. In the sequel, we shall only consider elements of a commutative subalgebra of $\Ass(I)$. \begin{Definition} A commutative subalgebra of $\mathcal{A}(I)$ is called of rank $1$ if it contains two differential operators of coprime orders. We denote the set of such subalgebras by $\mathcal{R}$ in the following. \end{Definition} In the sequel, we consider only commutative subalgebras of rank $1$. \begin{Lemma} \label{L:d0} A commutative subalgebra $A$ of $\Ass(I)$ is of rank 1 if and only if there exists $d_0\in \mathbb{N}$ so that $A$ contains elements of every degree $d \geq d_0$. \end{Lemma} \begin{proof} For $A \in \Rss$, $A$ contains a pair $(P,Q)$ of differential operators of coprime orders $n,m$. By B\'{e}zout's identity, there exist integers $a,b$ with $1=an+bm$. If $n=1$ or $m=1$, then $A$ contains operators of every positive order, so we now suppose $n,m \geq 2$. Then $ab<0$, and we suppose without loss of generality that $a>0$ and $b<0$. For $d \geq nm$ there exists an integer $l$ so that $dan-d \leq lmn \leq dan$, and then $d = (da-lm)n + (db+ln)m$ with $da-lm \geq 0$ and $db+ln=\tfrac{d-dan+lnm}{m} \geq 0$. Then $P^{da-lm}\cdot Q^{db+ln} \in A$ is of order $d$. The converse follows because for every $d_0 \in \N$ there exist two coprime numbers \,$n,m \geq d_0$. \end{proof} The observation that the highest coefficients of all elements of $A\in\mathcal{R}$ are constant allows to define the degrees of the elements intrinsically. \begin{Lemma} \label{L:deg} For $A\in\mathcal{R}$ and $P\in A\setminus\{0\}$ the degree $\deg(P)$ is equal to $\dim(A/PA)$ with $PA=\{PQ\mid Q\in A\}$ \end{Lemma} \begin{proof} By Lemma~\ref{L:d0} for $A\in\mathcal{R}$ the complement of the set $$N=\{\deg(P)\mid P\in A\}$$ in $\mathbb{N}_0$ is finite. Since the highest coefficients of the elements of $A$ are constant, for $P\in A\setminus\{0\}$ the map $A\to A$ with $Q\mapsto PQ$ is injective. Therefore $\{\deg(PQ)\mid Q\in A\}$ is equal to $N+\deg(P)=\{d+\deg(P)\mid d\in N\}$. Furthermore, $\dim(A/PA)=\#(N\setminus(N+\deg(P))$. The set $N+\deg(P)$ is a subset of $N$, since $PA$ is a subspace of $A$. Therefore $N\setminus(N+\deg(P))$ is equal to $(\mathbb{N}_0\setminus(N+\deg(P)))\setminus(\mathbb{N}_0\setminus N)$ and the cardinality of both sets are equal to $\#(\mathbb{N}_0\setminus(N+\deg(P)))-\#(\mathbb{N}_0\setminus N)$. This difference equals $\deg(P)$, since $\mathbb{N}_0\setminus(N+\deg(P))$ is the disjoint union $\{0,\ldots,\deg(P)-1\}\dot{\cup}((\mathbb{N}_0\setminus N)+\deg(P))$. \end{proof} We will always assume that differential operators are in standard form as in Proposition~\ref{prop:standard form}, which means that highest and second highest coefficients are constant. In constructing this standard form, we possibly made the domain \,$I$\, smaller. Our solution of the inverse problem (Theorem~\ref{T:inverseproblemsolution}(1)) will show that such commutative algebras are already uniquely determined by their restriction to arbitrarily small, open subsets of \,$I$\,. \section{The direct problem} \label{Se:direct} The following Theorem, together with some kind of converse, has already been shown in \cite{BC1}. We give a proof here with methods which better match the point of view we want to take in this work. \begin{Theorem}\label{th:commuting operators} For two commuting ordinary differential operators $P$ and $Q$ of orders $m$ respectively $n$, there exists a polynomial $f(\lambda,\mu)$ with constant coefficients with the following properties: \begin{enumerate} \item[(i)] If we associate to $\lambda$ the degree $m$ and to $\mu$ the degree $n$, then the common degree of $f(\lambda,\mu)$ is equal to $mn$. Moreover, the highest coefficient is equal to $\mu^m+c\lambda^n$ with some non-zero constant $c$. \item[(ii)] The differential operator $f(P,Q)$ is identically equal to zero. \end{enumerate} \end{Theorem} \begin{proof} In this proof we index the coefficients of \,$P$\, and \,$Q$\, differently from Section~\ref{Se:algebra} to simplify the characterisation of the degree of the coefficients of \,$f$\,. Specifically we write \,$P=D^m+\alpha_{1}D^{m-1}+\ldots+\alpha_m$\, and \,$Q=\beta_0D^n + \beta_1D^{n-1}+\ldots+\beta_n$\,. For $\lambda\in\C$, we collect the derivatives $\psi,\psi',\ldots,\psi^{(m-1)}$ of the solutions of the differential equation $(\lambda-P)\psi=0$ to a column-vector-valued function $\widehat\psi=(\widehat\psi_0,\dotsc,\widehat\psi_{m-1})^T$. Consequently, the differential equation $(\lambda-P)\psi=0$ is equivalent to the first order differential equation $\left(D-U(\,\cdot\,,\lambda)\right)\widehat\psi=0$ with the $m\times m$-matrix-valued function \begin{equation} \label{eq:def-U} U(t,\lambda)=\begin{pmatrix} 0 & 1 & 0 & \ldots & 0\\ 0 & 0 & 1 & \ldots & 0\\ \vdots & \vdots & \vdots & \ldots & \vdots\\ \lambda-\alpha_m(t) & -\alpha_{m-1}(t) & -\alpha_{m-2}(t) & \ldots & -\alpha_{1}(t) \end{pmatrix}. \end{equation} With the help of the equation $P\psi = \lambda\psi$ we may express all derivatives of $\psi$ of order higher than $m-1$ in terms of the components of $\widehat\psi$: That equation is equivalent to \[ \psi^{(m)} = \lambda\psi- \sum_{l=0}^{m-1}\alpha_{m-l} \psi^{(l)} = \lambda\hat\psi_0-\sum_{l=0}^{m-1}\alpha_{m-l} \hat\psi_{l} \] Differentiating this formula yields \begin{align*} \psi^{(m+1)} &= \lambda\psi'- \sum_{l=0}^{m-1}\alpha_{m-l} \psi^{(l+1)}-\sum_{l=0}^{m-1}\alpha'_{m-l} \psi^{(l)} \\ &=\lambda\hat\psi_1\!-\!(\alpha_{m}'\!+\!\alpha_{1}\lambda\!-\!\alpha_{1}\alpha_m)\widehat\psi_0\!+\!\sum_{l=1}^{m-1}(\alpha_{1}\alpha_{m-l}\!-\!\alpha_{m-l+1}\!-\!\alpha'_{m-l}) \hat\psi_l. \end{align*} The higher derivatives of $\psi$ can be obtained by inductively repeating this procedure. Note that the sum of the indices on the right hand side in each term plus the order of the derivative in this term always equals the order of the derivative on the left hand side. In particular, there exists a unique $m\times m$-matrix $V(t,\lambda)$ whose coefficients are polynomials in $\lambda$ and differential polynomials of the coefficients $\alpha_i$ of $P$ and $\beta_j$ of $Q$ such that $V(\,\cdot\,,\lambda)\widehat\psi=Q\widehat\psi$ for all $\psi$ in the kernel of $\lambda-P$. For any complex number $\lambda\in{\mathbb C}$ we consider the solutions of the differential equation $(P-\lambda)\psi=0$. Due to the theory of ordinary differential equations, there exist exactly $m$ linear independent solutions $\psi_1,\ldots,\psi_m$ of this ordinary differential equation on $I$. Two solutions coincide if and only if the corresponding values of $\psi,\psi',\ldots,\psi^{(m-1)}$ at any element of the domain coincide. In particular, a base $\psi_1,\ldots,\psi_m$ of all solutions is uniquely determined by the condition that the derivatives up to order $m-1$ of $\psi_i$ vanish at the marked point $t_0$ with the exception of the $(i-1)$-th derivative, which is equal to one at $t_0$. Since $Q$ commutes with $P$, the span of $\psi_1,\dots,\psi_m$ is invariant with respect to $Q$. Hence $Q$ acts as right multiplication with an $m\times m$-matrix $M(\lambda)$ on the row vector $(\psi_1,\dots,\psi_m)$. The vectors $\widehat\psi$ corresponding to the basis $\psi_1,\ldots,\psi_m$ build the fundamental solution $g(t,\lambda)$, i.e. an $m\times m$-matrix-valued function depending on $(t,\lambda)\in I\times{\mathbb C}$: $$(D-U(\,\cdot\,,\lambda))g(\,\cdot\,,\lambda)=0\text{ and } g(t_0,\lambda)=\unity,$$ where $g(t,\lambda)$ is invertible for all $(t,\lambda)\in I\times{\mathbb C}$. We conclude \begin{equation} \label{eq:M-and-V} V(t,\lambda)g(t,\lambda)=g(t,\lambda)M(\lambda) \, \Leftrightarrow \, M(\lambda)=g^{-1}(t,\lambda)V(t,\lambda)g(t,\lambda) \end{equation} where $M(\lambda)$ does not depend on $t$, but it does depend on the choice of the marked point \,$t_0$\,. Since $g(t,\lambda)$ is a solution of the differential equation $(D-U(\,\cdot\,,\lambda))g(\,\cdot\,,\lambda)=0$ one has \begin{multline*} 0=Dg^{-1}(\,\cdot\,,\lambda)V(\,\cdot\,,\lambda)g(\,\cdot\,,\lambda)= -g^{-1}(\,\cdot\,,\lambda)U(\,\cdot\,,\lambda)g(\,\cdot\,,\lambda)+\\ +g^{-1}(\,\cdot\,,\lambda)\frac{\partial V(\,\cdot\,,\lambda)}{\partial t}g(\,\cdot\,,\lambda)+ g^{-1}(\,\cdot\,,\lambda)V(\,\cdot\,,\lambda)U(\,\cdot\,,\lambda)g(\,\cdot\,,\lambda)=\\ g^{-1}(\,\cdot\,,\lambda)\left[D-U(\,\cdot\,,\lambda),V(\,\cdot\,,\lambda)\right]g(\,\cdot\,,\lambda). \end{multline*} Therefore, the commutativity of the operators $P$ and $Q$ implies $$\left[D-U(\,\cdot\,,\lambda),V(\,\cdot\,,\lambda)\right]=0.$$ Since the characteristic polynomial of $V(t,\lambda)$ is invariant under conjugation of $V(t,\lambda)$ with $g(t,\lambda)$, this yields $$f(\lambda,\mu):=\det\left(\mu\unity-V(t,\lambda)\right)= \det\left(\mu\unity-M(\lambda)\right). $$ So $f(\lambda,\mu)$ does not depend on $t$. Due to our construction, $U(t,\lambda)$, $V(t,\lambda)$ and $M(\lambda)=V(t_0,\lambda)$ are polynomials with respect to $\lambda$. Let us determine the highest coefficients of these polynomials. In order to regard $P$ as homogeneous of degree $m$ and $Q$ as homogeneous of degree $n$, we assign the weight $i$ to $\alpha_i$ for $i=0,\dots,m$, the weight $j$ to $\beta_j$ for $j=0,\dots,n$ and to every derivative the weight $1$. This assignment is in accordance with the weight \,$m$\, for $\lambda$ and the weight \,$n$\, for $\mu$ as stated in the theorem. The $k$-th row of $V(\,\cdot\,,\lambda)$ describes the action of $Q$ on $\psi^{(k)}$. So the entry $V_{kl}$ of the matrix $V(\,\cdot\,,\lambda)$ has the weight $n+k-l$ since $V_{kl}\widehat\psi_l$ contains at most $n+k$ derivatives. The entries $V_{kl}$ are therefore homogeneous polynomials of degree $n+k-l$ with respect to $\lambda$ and derivatives of $\alpha_i$ and $\beta_j$, where $\deg(\alpha_i^{(r)})=i+r$, $\deg(\beta_j^{(s)})=j+s$ and $\deg(\lambda)=m$. So $\det(V(t,\lambda))$ has the degree $mn$. Moreover the $(k,l)$-th entry of $\mu\unity-V(t,\lambda)$ has the weight $n+k-l$, so the characteristic polynomial of $V(t,\lambda)$ is homogeneous of weight $mn$. In particular the highest coefficients of \,$f(\lambda,\mu)$\, depend only on the coefficients of \,$P$\, and \,$Q$\, of weight zero, which are the highest coefficients. Therefore the highest coefficients of \,$f(\lambda,\mu)$\, for general \,$P$\, and \,$Q$\, are already obtained by considering the ``free case'' $P=D^m$ and $Q=\beta_0\,D^n$ with a constant \,$\beta_0 \neq 0$\,. In this case, the matrices are \begin{align}\label{eq:UV} U\ind{free}(t,\lambda)&=\begin{pmatrix} 0 & 1 & 0 & \ldots & 0\\ 0 & 0 & 1 & \ldots & 0\\ \vdots & \vdots & \vdots & \ldots & \vdots\\ \lambda & 0 & 0 & \ldots & 0 \end{pmatrix},&V\ind{free}(t,\lambda)&=M\ind{free}(\lambda)=\beta_0\cdot U\ind{free}^n(t,\lambda)\;. \end{align} Hence $\det(U\ind{free}(t,\lambda))=(-1)^{m-1}\lambda$ and the highest coefficient of $f(\lambda,\mu)$ is equal to $\mu^m-\beta_0^m\,\lambda^n$. Now we claim that the differential operator $f(P,Q)$ vanishes identically. Due to the commutativity of $P$ and $Q$, this differential operator does not depend on the order in which the operators are inserted into the polynomial $f(P,Q)$. If $\psi$ is any common solution of the equations $(P-\lambda)\psi=0$ and $(Q-\mu)\psi=0$ with $f(\lambda,\mu)=0$, then $P$ acts on $\psi$ as the multiplication with $\lambda$ and $Q$ acts on $\psi$ as the multiplication with $\mu$. Consequently, the action of $f(P,Q)$ on $\psi$ is the same as the action of $f(\lambda,\mu)$ on $\psi$ and hence vanishes. For any roots $(\lambda_1,\mu_1),\ldots,(\lambda_r,\mu_r)$ in $\C^2$ of $f$ with pairwise different $\lambda_1,\ldots,\lambda_r$, any choice of non-trivial common solutions $\psi_1,\ldots,\psi_r$ of $(P-\lambda_k)\psi_k=0$ and $(Q-\mu_k)\psi_k=0$ for $k=1,\dots,r$ are linear independent. In fact, suppose that these solutions obey a linear relation $$a_1\psi_1+\ldots+a_r\psi_r=0.$$ Then the action of $P,P^2,\ldots,P^{r-1}$ on the relation adds $r-1$ other linear relations $$a_1\lambda_1^s\psi_1+\ldots+a_r\lambda_r^s\psi_r=0\text{ for }s=1,\ldots,r-1.$$ Altogether, we have $r$ linear relations on the functions $a_1\psi_1,\ldots,a_r\psi_r$. Since $\lambda_1,\ldots,\lambda_r$ are pairwise different, the determinant of coefficients of these relations is a non-vanishing Vandermonde determinant. This implies that all these functions $a_k\psi_k$ vanish identically. A solution $\psi$ of $(P-\lambda)\psi=0$ vanishes identically on $\tilde{I}$ if the first $m$ derivatives of $\psi$ vanish at $t_0\in \tilde{I}$. Hence, the complements of the sets of roots of $\psi_k$ are open and dense and there exists $t_0\in \tilde{I}$ with non-vanishing values $\psi_k(t_0)$. Therefore $a_1,\ldots,a_r$ vanish, and thus the $\psi_k$ are indeed linear independent. We conclude that the differential operator $f(P,Q)$ has infinitely many solutions $f(P,Q)\psi=0$. Since the order of $f(P,Q)$ is bounded by $nm$, this implies that this differential operator vanishes identically. \end{proof} A partial converse has been shown by Burchnall and Chaundy in \cite{BC1} which includes pairs of differential operators $P,Q$ of co-prime orders, but not the general case. In the sequel, we shall associate a singular curve to a commutative algebra of differential operators. From now on, we want to investigate pairs of commuting operators $P$ and $Q$ whose orders $m$ and $n$ are co-prime. We use the results and notation of \cite{KLSS}. In the proof of Theorem \ref{th:commuting operators}, we constructed a holomorphic matrix-valued function $M: \C \to \C^{m\times m}$. In \cite[Section 4]{KLSS} we have described how this matrix can be associated with a pair $(X',\Sss')$ where $X'$ is a complex curve and $\Sss'$ a generalized divisor. In Theorem \ref{th:commuting operators} a pair of commuting differential operators is given. For such a pair, we define the singular curve $X'$ as the one-point compactification of \begin{equation} \label{eq:eigenvaluecurve} \bigr\{ \, (\lambda,\mu) \in \C\times \C \ |\ \det\bigr(\mu\cdot \unity-M(\lambda)\bigr)=0 \, \bigr\} \; . \end{equation} \,$X'$\, does not depend on the choice of the marked point \,$t_0$\, because of Equation~\eqref{eq:M-and-V}. We claim that $X'$ is a singular curve and the point at infinity $\infty$ a smooth point. Since $P$ and $Q$ are in standard form with highest coefficient equal to $1$, $M(\lambda)$ has the following form: \begin{equation} \label{eq:asymp-M} M(\lambda)=\begin{pmatrix} 0 & 1 & 0 & \ldots & 0\\ 0 & 0 & 1 & \ldots & 0\\ \vdots & \vdots & \vdots & \ldots & \vdots\\ \lambda & 0 & 0 & \ldots & 0 \end{pmatrix}^n+O(\lambda^{n-1}), \text{ as }\lambda\to\infty. \end{equation} Therefore, there exists a local parameter $z$ defined for large $|\lambda|$ such that $\lambda=(z/2\pi\ci)^{-m}$, $\mu=(z/2\pi\ci)^{-n}+O(z^{1-n})$ as $z\to 0$. If \,$m$\, and \,$n$\, are relatively prime, then \,$z$\, is uniquely characterised by these conditions. The single root of $z$, which is added at infinity to \eqref{eq:eigenvaluecurve}, is a smooth point $\infty$ of $X'$. The eigenvalue $\lambda$ corresponds to a meromorphic function on $X'$ with a single pole of order $m$ at $\infty$ and $\mu$ to a meromorphic function with a single pole of order $n$ at $\infty$. In order to define the generalized divisor $\Sss'$ we normalize the eigenfunction of $M(\lambda)$ by $\ell(\psi)=1$ with $\ell: \C^m \to \C,\ (\psi_{1},\dots,\psi_{m})\mapsto \psi_{1}$. \begin{Lemma} \label{L:normalize-bounded} There exist only finitely many $(\lambda,\mu) \in X'\setminus \{\infty\}$ for which the kernel of $\ell$ contains non-trivial eigenvectors of $M(\lambda)$ with eigenvalue $\mu$. \end{Lemma} \begin{proof} We consider $V(t,\lambda)$ as defined in the proof of Theorem \ref{th:commuting operators} and $V\ind{free}(t,\lambda)$ as defined in equation \eqref{eq:UV} which corresponds to the free case $P=D^m$ and $Q=D^n$. The normalized free eigenvector $\varphi$ obeys \begin{equation}\label{eq:free_V} V\ind{free}(t,\lambda)\varphi=\lambda^{n/m}\varphi \mbox{ with } \varphi=\left(1,\lambda^{1/m},\dots, \lambda^{(m-1)/m} \right)^T. \end{equation} Due to the weights of $V_{kl}$, as introduced in the proof of Theorem \ref{th:commuting operators}, $V_{kl}$ is a polynomial of degree $n+k-l$. Therefore, all contributions to $V_{kl}$ which do not contribute to $V_{\mathrm{free},kl}$ include at least one of the coefficients $\alpha_i$ for $i\leq m-2$ or $\beta_j$ for $j\leq n-1$, or a derivative of such a coefficient. This implies \[ |(V_{kl}-V_{\mathrm{free},kl})|=\mathrm{O}\left(\lambda^{-1/m}\right)\lambda^{(n+k-l)/m}. \] Let $T$ be the diagonal matrix $\mathrm{diag}\left(1,\lambda^{-1/m},\dots, \lambda^{-(m-1)/m}\right)$. Therefore, \[ |(T(V-V\ind{free})T^{-1})_{kl}|=|(V-V\ind{free})_{kl} \lambda^{(l-k)/m}|=|\lambda|^{n/m}O( \lambda^{-1/m}), \] Due to equation \eqref{eq:UV} \[ \lambda^{-n/m}\cdot TV\ind{free}T^{-1}= \begin{pmatrix} 0 & 1 & 0 & \ldots & 0\\ 0 & 0 & 1 & \ldots & 0\\ \vdots & \vdots & \vdots & \ldots & \vdots\\ 1 & 0 & 0 & \ldots & 0 \end{pmatrix}^n \] and hence \[ |\lambda|^{-n/m}\cdot\|TVT^{-1}- TV\ind{free}T^{-1}\| \leq O(\lambda^{-1/m}). \] Since $TV\ind{free}T^{-1}$ has $m$ pairwise different eigenvalues, it is diagonalisable. Now we show that the distance $\|T\psi-T\phi\|$ of the eigenfunctions is also of order $O(\lambda^{-1/m})$. Due to the implicit function theorem applied to $(TVT^{-1}-\mu\unity)T\varphi$, the normalized eigenfunction $T\varphi$ and the eigenvalue $\mu$ depend nearby $TV\ind{free}T^{-1}$ continuously differentiably on the entries of $TVT^{-1}$. Since $\ell \circ T=\ell$ and $\varphi\not\in\ker(\ell)$, for sufficiently large $\lambda$ also $\psi\not\in \ker (\ell)$. This shows that the set of \,$(\lambda,\mu) \in X' \setminus \{\infty\}$\, so that \,$\ker(\ell)$\, contains a non-trivial eigenvector of \,$M(\lambda)$\, for the eigenvalue \,$\mu$\, is a subvariety of \,$X'\setminus\{\infty\}$\, of codimension at least \,$1$\,, and hence finite. \end{proof} By evaluating \,$\psi$\, at the marked point \,$t=t_0$\,, we obtain the global meromorphic function \,$\chi := \psi(\,\cdot\,,t_0) = (\chi_1,\ldots,\chi_m)^T: X'\setminus\{\infty\} \to \C^m$. \,$\chi$\, is characterised uniquely by $$ M \chi = \mu \chi \quad \text{and} \quad \ell(\chi) = 1, $$ where we regard also $M$ and $\mu$ as functions on $X'\setminus\{\infty\}$. Locally, $\chi$ can be obtained from any holomorphic eigenfunction $\tilde{\chi}$ by taking $\chi=\tilde\chi/\tilde\chi_1$. In the sequel we use generalised divisors on the spectral curve \,$X'$\,. For this purpose we again apply the notations introduced in \cite{KLSS}. We define the generalised divisor $\Sss'$ corresponding to \,$\chi$\, on $X'\setminus \{\infty\}$ as the subsheaf of the sheaf of meromorphic functions on $X'\setminus \{\infty\}$ which is generated over $\Oss_{X'\setminus \{\infty\}}$ by $\chi_1,\dotsc,\chi_m$. Because of Lemma~\ref{L:normalize-bounded}, $\Sss'$ is equal to $\Oss_{X'}$ on a punctured neighborhood of $\infty$. We therefore extend $\Sss'$ to $\infty$ by defining $\Sss'_{\infty}=\Oss_{X',\infty}$. In Section~\ref{Se:inverse} we will describe the dependence of \,$\mathcal{S}'$\, on the marked point \,$t_0$\, by means of the Krichever construction. Note that the eigenspace of $M(\lambda)$ with eigenvalue $\mu$ is one-dimensional at all points of $X'$ where the map $X'\to \mathbb{P}^1,\, (\lambda,\mu)\mapsto \lambda$ is not ramified. If the eigenspaces of $M$ define a line bundle on $X'$, then $\Sss'$ describes the dual eigenline bundle in the sense of the correspondence between divisors and line bundles, see \cite[\S 29]{Fo}. The above considerations can be summarized in the assignment of a pair $(X',\Sss')$ to the pair $(P,Q)$ of commuting differential operators of co-prime orders. In \cite[Definition 4.2]{KLSS} we have introduced the \emph{\,$\Sss'$-halfway normalisation} $X(\Sss')$ for the pair $(X',\Sss')$: For a generalised divisor $\Sss'$ on a singular curve $X'$, the \,$\Sss'$-halfway normalisation of \,$X'$\, is the unique one-sheeted covering $\pi_{X(\Sss')}: X(\Sss') \to X'$ such that \[ (\pi_{X(\Sss')})_\ast \Oss_{X(\Sss')} = \{ f \in \Bar{\Oss}_{X'} \,|\, f\cdot g \in \Sss' \text{ for all $g\in \Sss'$} \} \; . \] On $X(\Sss')$, there exists a unique generalized divisor $\Sss(\Sss')$ whose direct image with respect to $\pi_{X(\Sss')}$ equals $\Sss'$. For any $q\in X'$, we choose local generators $\phi_1,\dots,\phi_m$ of $\Sss'_q$. Then for any $q'\in \pi_{X(\Sss')}^{-1}[\{q\}]$, $\Sss(\Sss')_{q'}$ is the $X(\Sss')$-submodule of $\Mss_{q'}$ generated by $\phi_1\circ\pi_{X(\Sss)}, \dots, \phi_m\circ \pi_{X(\Sss)}$, see \cite{KLSS}. Until now, we have assigned the quadruple $(X',\Sss',\infty,z)$ to commuting differential operators $P$ and $Q$ of coprime orders $m$ and $n$. Here, $P$ and $Q$ correspond to meromorphic functions $\lambda$ and $\mu$ on $X'$ with poles of orders $m$ and $n$ only at $\infty$. The meromorphic functions on $X'$ having only poles at $\infty$ are equal to the algebra $\C[\lambda,\mu]/(f)$ with $f$ defined in Theorem \ref{th:commuting operators}. In the sequel, we will assign such quadruples $(X',\Sss',\infty,z)$ to commutative algebras. This assignment has the property that the commutative algebra is isomorphic to the algebra of meromorphic functions on $X'$ which have poles only at $\infty$. The quadruple $(X',\Sss',\infty,z)$ constructed above is assigned to the commutative algebra generated by the two differential operators $P$ and $Q$. Our main result gives an essentially $1-1$ correspondence between the commutative algebras in the following class and quadruples $(X',\Sss',\infty,z)$ of a compact singular curve $X'$ with smooth marked point $\infty$ and coordinate \,$z$\, near \,$\infty$\, and a generalized divisor $\Sss'$ on $X'$ whose degree is equal to the arithmetic genus of $X'$. In this section, we investigate the map from the algebra to the triple and in the following section the inverse of this map. We will see that the following definition describes the maximal commutative subalgebras of $\mathcal{A}(I)$ which are of rank $1$. \begin{Definition}[centraliser] For each subalgebra $A$ of $\mathcal{A}(I)$ the algebra \begin{equation*} C(A):=\{P\in \mathcal{A}(I)\ \mid \ \forall\, Q\in A \,: \, [P,Q]=0\} \end{equation*} is called the \emph{centraliser} of $A$. \end{Definition} \begin{Lemma}\label{lem:CA} For each $A\in\mathcal{R}$, we have $C(A)\in\mathcal{R}$, and $A$ has finite codimension in $C(A)$. \end{Lemma} \begin{proof} Because we consider only differential algebras where the highest order coefficients of the member operators are constant, Lemma~\ref{L:d0} implies $\dim(B/A)\leq d_0 <\infty$ for any \,$B\in\mathcal{R}$\, with \,$B \supset A$\,. Therefore it suffices to prove that $C(A)$ is commutative because $C(A)$ contains $A$. Let $A\in\mathcal{R}$ and $P,Q\in A$ be two differential operators of coprime orders $m$ and $n$. For $\lambda \in \C$, let $V_\lambda$ be the $m$-dimensional space of solutions of $P\psi=\lambda\psi$. As in the proof of Theorem \ref{th:commuting operators}, let $M(\lambda)$ denote the endomorphism $V_\lambda\to V_\lambda$ induced by $Q$. Due to Theorem \ref{th:commuting operators}, $f(\lambda,\mu)$ has weighted degree $mn$ with highest term $\mu^m+c\lambda^n$ with $c\neq 0$. For coprime $m$ and $n$, the $m$-th roots of $\lambda^n$ are all pairwise different. Hence, for large $\lambda$ the $m$ solutions of $f(\lambda,\mu)=0$ are also pairwise different and $M(\lambda)$ has $m$ pairwise different eigenvalues. Because the discriminant is holomorphic, the same holds for $\lambda$ in an open and dense subset of $\C$. Now, let $R,S \in C(A)$. Since they commute with $P$ and $Q$, they define endomorphisms $B(\lambda)$ and $C(\lambda)$ of $V_\lambda$ commuting with $M(\lambda)$. The commutator $[R,S]\in C(A)$ induces the endomorphism $[B(\lambda), C(\lambda)]$ of $V_\lambda$. If $M(\lambda)$ has pairwise different eigenvalues, it is diagonal with respect to an appropriate basis. Since $B(\lambda)$ and $C(\lambda)$ commute with $M(\lambda)$, this basis also diagonalises $B(\lambda)$ and $C(\lambda)$. Therefore, $B(\lambda)$ and $C(\lambda)$ commute. This implies that the vector spaces $V_\lambda$ belong to the kernel of $[R,S]$ if $M(\lambda)$ has pairwise different eigenvalues. By definition, $V_\lambda\cap V_{\lambda'}=\{0\}$ for $\lambda\neq \lambda'$. As in the proof of Theorem \ref{th:commuting operators}, $[R,S]$ has an infinite dimensional kernel. Since $[R,S]$ has finite order, its kernel can only be infinite dimensional if $[R,S]=0$. \end{proof} \begin{Definition} \emph{Spectral data} are a quadruple \,$(X',\mathcal{S}',\infty,z)$\,, where \,$X'$\, is a compact singular curve, \,$\mathcal{S}'$\, is a generalised divisor on \,$X'$\, whose degree is equal to the arithmetic genus of \,$X'$\,, \,$\infty$\, is a smooth point of \,$X'$\, and \,$z$\, is a local coordinate of \,$X'$\, near \,$\infty$\,. \end{Definition} We show in the following theorem that $C(A)$ has spectral data \linebreak $(X(\Sss'), \Sss(\Sss'), \infty,z)$. This will lay the foundation to construct the spectral data assigned to general algebras $A\in\Rss$. In the sequel, \,$\mathcal{M}$\, denotes the sheaf of meromorphic functions on \,$X(\mathcal{S}')$\,. We omit the subscript \,${}_{X(\mathcal{S}')}$\, because \,$(\pi_{X(\mathcal{S}')})_*$\, is an isomorphism of sheaves from \,$\mathcal{M}_{X(\mathcal{S}')}$\, onto \,$\mathcal{M}_{X'}$\,. \begin{Theorem}\label{th:direct center} Let $A\in\mathcal{R}$ and $P,Q\in C(A)$ two differential operators of coprime orders and $(X',\Sss',\infty,z)$ be the spectral data corresponding to the subalgebra of $C(A)$ generated by $P$ and $Q$. Then the triple $(X(\Sss'),\Sss(\Sss'),\infty)$ and the value \,$\mathrm{d}z(\infty)$\, are independent of the choice of $P$ and $Q$, $C(A)$ is isomorphic to the algebra \begin{align}\label{eq:B} B&:=\{f\in H^0(X(\Sss'),\mathcal{M})\,\mid\,\forall\, p\in X(\Sss')\setminus\{\infty\}:\,f_p\in\mathcal{O}_{X(\Sss'),p}\} \end{align} and $(\pi_{X(\Sss')})_\ast\Sss(\Sss')=\Sss'$. \end{Theorem} We will see in Section~\ref{Se:inverse} that the solution of the inverse problem for given spectral data \,$(X',\mathcal{S}',\infty,z)$\, depends on \,$z$\, only in terms of the value of \,$\mathrm{d}z(\infty)$\,. \begin{proof} Let $P,Q\in A$ be the differential operators of coprime orders $m$ and $n$ with the corresponding matrix $M(\lambda)$. The subalgebra \,$\langle P,Q\rangle$\, of \,$\mathcal{A}(I)$\, generated by \,$P$\, and \,$Q$\, is commutative, hence \,$\mathcal{R} \ni \langle P,Q \rangle \subset A$\, and therefore \,$A \subset C(A) \subset C(\langle P,Q\rangle)$\,. By Lemma~\ref{lem:CA}, \,$C(\langle P,Q \rangle)$\, is commutative and therefore contained in \,$C(A)$\,. This implies that \,$C(\langle P,Q \rangle)=C(A)$\,. We now show that $C(A)$ is isomorphic to the algebra $B$ in \eqref{eq:B}. Let $R\in C(A)$. Since $[R,P]=0$, there exists for each $\lambda\in\C$ a matrix $N(\lambda)\in\C^{m\times m}$ which describes the action of $R$ on the kernel of $P-\lambda\cdot\unity$. Since $[R,Q]=0$, we have $[M(\lambda),N(\lambda)]=0$ for all $\lambda\in\C$. Therefore, for each $(\lambda,\mu)\in X', N(\lambda)$ acts on the kernel of $M(\lambda)-\mu\cdot\unity$. For those $(\lambda,\mu)$ with one-dimensional $\ker(M(\lambda)-\mu\cdot\unity), N(\lambda)$ acts as multiplication with a complex number $\nu$. Such $(\lambda,\mu)$ build an open and dense subset of $X'$. Since the entries of $N(\lambda)$ are meromorphic, $\nu$ extends to a meromorphic function on $X'$. For all $\lambda\in\C$, all entries of $N(\lambda)$ are bounded and therefore also the eigenvalue $\nu$ of the $N(\lambda)$. This implies $\nu\in B$. Conversely, in \cite{KLSS}, it has been proven that $(\hat\lambda\circ\pi_{X(\Sss')})_\ast\mathcal{O}_{X(\Sss')}$ is isomorphic to the sheaf of holomorphic $n\times n$ matrices on $\mathbb P^1$ which commute with $M(\lambda)$. Here, $\hat\lambda$ is the map $\hat\lambda:X'\to\C$ such that $(\lambda,\mu)\mapsto\lambda$. This algebra isomorphism extends to an isomorphism of $B$ with matrices $N(\lambda)$ whose entries are polynomials with respect to $\lambda$ and commute with $M(\lambda)$. These are the matrices which describe the action of the elements of $C(A)$ on the kernel of $P-\lambda\cdot\unity$. This correspondence is $1$-to-$1$. Let $P',Q'\in C(A)$ be another pair of differential operators of coprime orders. Since \,$\langle P,Q \rangle \cap \langle P',Q' \rangle$\, contains all \,$R \in C(A)$\, of sufficiently large order by Lemma~\ref{L:d0}, there exists a third pair \,$P'',Q'' \in A$\, such that \,$\langle P'',Q'' \rangle \subset \langle P,Q \rangle \cap \langle P',Q' \rangle$\,. Without loss of generality, we may therefore suppose \,$P',Q' \in \langle P,Q \rangle$\,, meaning that \,$P'$\, and \,$Q'$\, can be regarded as polynomials in \,$P$\, and \,$Q$\,. The spectral data of $P',Q'$ is a quadruple $(X'',\Sss'',\infty',z')$ together with two meromorphic eigenfunctions $\lambda',\mu'$ on \,$X''$\,. \,$\lambda'$\, and \,$\mu'$\, can be regarded as polynomials in \,$\lambda$\, and \,$\mu$\,, and in this way we obtain a holomorphic map \,$X' \setminus \{\infty\} \to X'' \setminus \{\infty'\}$\,. Because \,$\infty$\, and \,$\infty'$\, are smooth points of \,$X'$\, and \,$X''$\,, respectively, this map extends to a holomorphic map \,$X' \to X''$\,, which is biholomorphic on an open and dense subset of \,$X'$\, by Lemma~\ref{L:normalize-bounded}. Therefore this map is a one-fold covering. The pullback of a common eigenfunction of \,$P'$\, and \,$Q'$\, is a common eigenfunction of \,$P$\, and \,$Q$\,, or equivalently, the direct image of \,$\mathcal{S}'$\, is \,$\mathcal{S}''$\,. By definition of \,$X(\mathcal{S}')$\,, it follows that \,$(X(\mathcal{S}''),\mathcal{S}(\mathcal{S}''),\infty)$\, is isomorphic to \,$(X(\mathcal{S}'),\mathcal{S}(\mathcal{S}'),\infty')$\,. Because \,$P$\, and \,$P'$\, have highest coefficient \,$1$\,, it follows from the definition of \,$z$\, that the corresponding biholomorphic map maps \,$\mathrm{d}z(\infty)$\, onto \,$\mathrm{d}z'(\infty')$\,. \end{proof} \begin{Theorem}\label{th:direct general} For $A\in\mathcal{R}$ and $P,Q\in A$ of coprime orders, let $(X',\Sss',\infty,z)$ be the corresponding spectral data. Then up to isomorphy, there exists a unique one sheeted covering $\pi'':X''\to X'$ and a generalized divisor $\Sss''$ on $X''$ with the following properties: \begin{enumerate}[(i)] \item $\pi_*''\Sss''=\Sss'$. \item The following diagram commutes $$ \begin{matrix} \langle P,Q\rangle&\hookrightarrow&A&\hookrightarrow&C(A)\\ g_1\downarrow\cong&&g_2\downarrow\cong&&g_3\downarrow\cong\\ \frac{\C[\lambda,\mu]}{(f)}&\hookrightarrow&C&\hookrightarrow&B \;. \end{matrix} $$ Here, the polynomial $f$ and the isomorphism $g_1$ are defined in Theorem~\ref{th:commuting operators}, and $B$ and $g_3$ are defined in Theorem~\ref{th:direct center}. We also set \begin{align}\label{eq:C} C&:=\{f\in H^0(X'',\mathcal{M})\mid\forall p\in X''\setminus(\pi'')^{-1}[\{\infty\}]:\,f_p\in\mathcal{O}_{X'',p}\}, \end{align} and $g_2$ is defined by the above diagram. \end{enumerate} $(X'',\Sss'',\infty,z)$ does not depend on the choice of $P, Q \in A$. \end{Theorem} \begin{proof} In Theorems~\ref{th:commuting operators} and~\ref{th:direct center}, we have shown that $g_1$ and $g_3$ are isomorphisms, respectively. The sheaf $\Oss'_{X'}$ is contained in $\pi(\Sss')_{\ast}\Oss_{X(\Sss')}$. Note that $A$ is a subalgebra of $C(A)$. Hence the image of $A$ under $g_3$ is contained in $B$. We identify the meromorphic functions on $X(\Sss')$ with the meromorphic functions on $X'$, in this way $B$ becomes a subalgebra of $H^0(X'\setminus \{\infty\},\pi(\Sss')_{\ast}\Oss_{X(\Sss')})$. The image of $A$ in $B$ generates on $X'\setminus \{\infty\}$ a subsheaf $\Ass$ of subrings of $\pi(\Sss')_{\ast}\Oss_{X(\Sss')}$. It contains $\Oss_{X'}$ since $A$ contains $P$ and $Q$. The stalks of the latter subsheaf have finite codimension in the stalks of $\pi(\Sss')_{\ast}\Oss_{X(\Sss')}$, and the codimension is $0$ away from the singularities of $X'$. Therefore we may extend $\Ass$ to $X'$ by $\Ass=\Oss_{X'}$ near the smooth point $\infty$. By definition of $X(\Sss')$, $\pi(\Sss')_{\ast}\Oss_{X(\Sss')}$ acts on $\Sss'$. Due to \cite[Lemma 4.1]{KLSS}, there exists a unique one-sheeted covering $\pi'':X''\to X'$ such that $\pi''_\ast (\Oss_{X''})=\Ass$. The sequence of one-sheeted coverings $X(\Sss')\to X''\to X'$ induces the embeddings in the lower row of the diagram. The embeddings of the upper row are obvious. It remains to show that there exists an isomorphism $g_2$ as in the diagram. Because $g_3$ is an isomorphism, there exists a subalgebra of $C(A)$ which is mapped isomorphically onto $C$ by $g_3$. It suffices to show that this subalgebra equals $A$. On the one hand, since the sheaf of subrings $\pi''_\ast (\Oss_{X''})$ of $\pi(\Sss')_{\ast}\Oss_{X(\Sss')}$ is generated by the image of $A$ under $g_3$ in $B$, this algebra is contained in $A$. On the other hand, the image of every element of $A$ with respect to $g_3$ in $B$ belongs to the subalgebra which generates $\pi''_\ast (\Oss_{X''})$ and therefore to the image of $C$ in $B$. So this subalgebra contains $A$. The only choice that was made in this construction was that of \,$P$\, and \,$Q$\,. The independence of \,$(X'',\mathcal{S}'')$\, from the choice of \,$P$\, and \,$Q$\, follows by the same argument as in the proof of Theorem~\ref{th:direct center}. \end{proof} \begin{Lemma} The generalized divisors $\Sss'$, $\Sss(\Sss')$ and $\Sss''$ have degree equal to the arithmetic genus of $X'$, $X(\Sss')$, $X''$ respectively, and they are non-special. \end{Lemma} \begin{proof} We first show the claim for $X'$ and $\Sss'$. At $\infty$, the function $\psi_k$ has a pole of order $k-1$ because of \eqref{eq:free_V} and the asymptotics shown in the proof of Lemma~\ref{L:normalize-bounded}. Therefore every linear combination of the $\psi_k$ that is holomorphic at $\infty$ is a multiple of $\psi_1$. This shows that $\dim H^0(X',\Sss')=1$. Let $U' := \{(\lambda,\mu) \in X'\setminus \{\infty\}\bigr|\;|\lambda|>R\}$, where we choose $R>0$ large enough so that $\Sss'$ is equal to $\Oss_{X'}$ on $U'$. Then $\mathfrak{U} := (X'\setminus \{\infty\},U' \cup \{\infty\})$ is a Leray covering of $(X',\Sss')$ by \cite[Proposition~4.5]{KLSS}. We use this covering to show that $H^1(X',\Sss')=0$. Let $f\in H^1(\mathfrak{U},\Sss')$. By \cite[Proposition~4.5]{KLSS}, we have $f=f_1\psi_1 + \dotsc + f_m\psi_m$ with holomorphic functions $f_1,\dotsc,f_m$ on $U := \{\lambda \in \C\bigr|\;|\lambda|>R\}$. We can write $f_k=g_k-\lambda^{-1}\,h_k$, where $g_k$ is an entire function, and $h_k$ is a holomorphic function on $U \cup \{\infty\}$. $h := h_1\,\lambda^{-1}\,\psi_1 + \dotsc + h_m\,\lambda^{-1}\,\psi_m$ is holomorphic on $U'\cup\{\infty\}$, because the pole order of $\psi_k$ at $\infty$ is at most $m-1$, so $\lambda^{-1}\,\psi_k$ is holomorphic at $\infty$. With $g := g_1\,\psi_1 + \dotsc + g_m\,\psi_m$, we have $f=g-h$, and therefore $f$ is a boundary with respect to $(\mathfrak{U},\Sss')$. This shows that $H^1(X',\Sss')=H^1(\mathfrak{U},\Sss')=0$. By Riemann-Roch's Theorem \cite[Theorem~5.2]{KLSS}, it follows that $\deg(\Sss')$ equals the arithmetic genus of $X'$, and that $\Sss'$ is non-special. We now consider $\Sss''$ on $X''$. On one hand, we have $H^0(X'',\Sss'')= H^0(X',\Sss')$ because of $\pi''_* \Sss''=\Sss'$. On the other hand, because of $\Sss' \supset \pi''_*\Oss_{X''}$, we have \begin{align*} \deg(\Sss') & = \dim H^0(X',\Sss'/\Oss_{X'}) \\ & = \dim H^0(X',\Sss'/\pi''_*\Oss_{X''}) + \dim H^0(X',\pi''_*\Oss_{X''}/\Oss_{X'}) \\ & = \deg(\Sss'') + (g(X')-g(X'')) \; . \end{align*} Because $\deg(\Sss')$ equals the arithmetic genus $g(X')$ by the previous part of the proof, $\deg(\Sss'')=g(X'')$ follows. Therefore also $\Sss''$ is non-special. This argument likewise applies to $(X(\Sss'),\Sss(\Sss'))$. \end{proof} \begin{Proposition} Suppose that we are in case~1, i.e.~\,$\mathcal{A}=C^\infty(I,\R)[D]$\, with an open interval \,$I \subset \R$\,. Then the spectral data \,$(X'',\mathcal{S}'',\infty,z)$\, of \,$A \in \mathcal{R}$\, satisfy the following reality conditions: \begin{enumerate} \item There exists an anti-holomorphic involution \,$\rho$\, on \,$X''$\, so that \,$\infty$\, is a smooth point of the real singular curve given by the fixed point set of \,$\rho$\,, and \,$\rho^* \overline{z}=-z$\,. For any \,$P,Q \in A$\, of co-prime order, \,$\rho$\, acts on the eigenvalues \,$(\lambda,\mu)$\, as \,$(\lambda,\mu) \mapsto (\bar{\lambda},\bar{\mu})$\,. \item We have \,$\rho_* \overline{\mathcal{S}''} = \mathcal{S}''$\,, where the generalised divisor \,$\rho_* \overline{\mathcal{S}''}$\, is characterised by $$ H^0(U,\rho_* \overline{\mathcal{S}''}) = \{ \overline{f} \circ \rho \mid f \in H^0(\rho(U),\mathcal{S}'') \} $$ for any open subset \,$U \subset X''$\,. \end{enumerate} \end{Proposition} \begin{proof} We consider differential operators \,$P,Q\in A$\, of co-prime order \,$m$\, and \,$n$\,, respectively. Because we are in case 1, \,$P$\, and \,$Q$\, have real coefficients. Therefore the matrices \,$U$\, and \,$V$\, from the proof of Theorem~\ref{th:commuting operators} are real for \,$\lambda \in \R$\, and thus also \,$M(\lambda)$\, is real for \,$\lambda \in \R$\,. This shows that \,$M(\bar{\lambda}) = \overline{M(\lambda)}$\, for all \,$\lambda \in \C$\,. Therefore the polynomial \,$f$\, has real coefficients, and hence \,$\rho: (\lambda,\mu) \mapsto (\bar{\lambda},\bar{\mu})$\, is an anti-holomorphic involution on the singular curve \,$X' \setminus \{\infty\}$\,. We extend \,$\rho$\, to \,$X'$\, by setting \,$\rho(\infty)=\infty$\,. It was shown in Theorem~\ref{th:commuting operators} that the highest coefficient of the polynomial \,$f$\, is of the form \,$\mu^m+c\lambda^n$\, with a non-zero constant \,$c$\,, which is real in the present setting. Therefore \,$\infty$\, is a smooth point of the fixed point set of \,$\rho$\,, and \,$\rho^* \overline{z}=-z$\,. Because \,$X'' \to X'$\, is a one-sheeted covering, we obtain an anti-holomorphic map \,$\rho$\, on \,$X''$\, with the desired properties. As the linear form \,$\ell$\, is real, the normalised section \,$\psi$\, also satisfies \,$\overline{\psi} \circ \rho = \psi$\,, and therefore \,$\rho_* \overline{\mathcal{S}''} = \mathcal{S}''$\, holds. \end{proof} \section{The inverse problem} \label{Se:inverse} We now solve the corresponding inverse problem. We let spectral data \,$(X',\mathcal{S}',\infty,z)$\, be given. This means that \,$X'$\, is a singular curve with a marked smooth point \,$\infty$\, and a local parameter \,$z$\, defined on an open neighbourhood \,$U_1$\, of \,$\infty$\,, and \,$\mathcal{S}'$\, is a generalised divisor on \,$X'$\, of degree equal to the arithmetic genus of \,$X'$\,. We will use the Krichever construction as in \cite[Section~7]{KLSS}. In particular we define the one-parameter group of invertible sheaves \,$\mathcal{L}_{1/z}(t)$\, with \,$t\in \C$\,: Let \,$U_0 := X' \setminus \{\infty\}$\,, then \,$(U_0,U_1)$\, is a covering of \,$X'$\, and the cocycle \,$z^*\,\exp(-2\pi\ci t/z)$\, defines \,$\mathcal{L}_{1/z}(t)$\, with respect to this covering. On an open subset \,$O \subset \C$\,, the same cocycles with variable \,$t \in O$\, also define a sheaf \,$\mathcal{L}_{1/z}$\, on \,$X' \times O$\,. The Krichever construction depends on the choice of the local parameter \,$z$\, only via the Mittag-Leffler distribution induced by \,$\tfrac{1}{z}$\,. For any two different local parameters \,$z_1,z_2$\, on \,$X'$\, around \,$\infty$\, there exists a constant \,$c = \tfrac{\mathrm{d}z_2}{\mathrm{d}z_1}(\infty)\neq 0$\, so that \,$\tfrac{1}{z_1}-\tfrac{c}{z_2}$\, is holomorphic. This shows that our construction in fact depends on the choice of the local coordinate \,$z$\, only in terms of the Taylor coefficient \,$\mathrm{d}z(\infty)$\,. As in \cite[Equation~(31)]{KLSS} we define \begin{equation} \label{eq:T-definition} T := \{ t \in \C \mid H^0(X',\mathcal{S}'_{-\infty} \otimes \mathcal{L}_{1/z}(t)) \neq 0 \} \; , \end{equation} where \,$\mathcal{S}'_{-\infty}$\, is the generalised divisor obtained by multiplying \,$\mathcal{S}'$\, with the invertible sheaf defined by the classical divisor \,$-\infty$\,. In \cite[Theorem~8.6]{KLSS} it was shown that \,$T$\, is a subvariety of \,$\C$\,. For our specific situation we improve that result by the following lemma. \begin{Lemma} \label{L:Tdiscrete} \,$T$\, is discrete. \end{Lemma} \begin{proof} We assume on the contrary that \,$T$\, is not discrete. Because \,$T$\, is a subvariety of \,$\C$\, by \cite[Theorem~8.6]{KLSS}, this means that it contains an open subset \,$O_1 \subset \C$\,. Let \,$k>0$\, be the minimal dimension of \,$H^0(X',\mathcal{S}'_{-\infty} \otimes \mathcal{L}_{1/z}(t))$\, for \,$t \in O_1$\,. The sheaf \,$\mathcal{S}'_{-\infty}$\, on \,$X'$\, induces a sheaf on \,$X' \times O_1$\,, which we also denote by \,$\mathcal{S}'_{-\infty}$\,. Then the sheaf \,$\mathcal{S}'_{-\infty}\otimes \mathcal{L}_{1/z}$\, on \,$X' \times O_1$\, is flat with respect to the projection \,$X' \times O_1 \to O_1$\, by \cite[Lemma~8.5]{KLSS}. Because of \cite[Chapter~III Theorem~4.7~(a)]{GPR}, the map \,$t \mapsto \dim(H^0(X',\mathcal{S}'_{-\infty}\otimes \mathcal{L}_{1/z}(t)))$\, is upper semi-continuous, and therefore the subset \,$O_2 \subset O_1$\, on which this dimension is equal to \,$k$\, is open. Due to \cite[Chapter~III Theorem~4.7~(d)]{GPR} the spaces $H^0(X',\mathcal{S}'_{-\infty} \otimes \mathcal{L}_{1/z}(t))$ are the fibres of a vector bundle over $t \in O_2$. In particular there exists a non-trivial section of $\mathcal{S}'_{-\infty}\otimes \mathcal{L}_{1/z}$ on $X'\times O_2$. By definition of \,$\mathcal{L}_{1/z}$\,, this section corresponds to a section \,$\psi$\, of \,$\mathcal{S}'_{-\infty}$\, on \,$U_0 \times O_2$\, such that the function \begin{equation} \label{eq:L:discrete:phi} \phi(x,t)=\psi(x,t)z\exp(-2\pi\ci\, t/z) \end{equation} is holomorphic on $U_1\times O_2$ and vanishes on \,$\{\infty\} \times O_2$\,. Let $\phi(x,t)=\sum_{n\ge 1}z^n\phi_n(t)$ be the Taylor expansion of $\phi$ with respect to the local coordinate $z$ at $\infty$. We let $N \geq 1$ be the smallest index such that $\phi_{N}$ does not vanish identically on \,$\{\infty\} \times O_2$\,. Then \,$O := \{ t\in O_2 \mid \phi_{N}(\infty,t)\neq 0\}$\, is an open subset of \,$O_2$\,. Due to Equation~\eqref{eq:L:discrete:phi}, the $m$-th derivative $x \mapsto \frac{\partial^m}{\partial t^m}\psi(x,t)$ has for every $m\in\mathbb{N}$ and \,$t\in O$\, an $(m-N)$-th order pole at $x=\infty$. Furthermore, on $U_0$ these $m$-th derivatives are section of $\mathcal{S}'$. This implies that for all $m\in\mathbb{N}$ and \,$t\in O$\, the sheaf $\mathcal{S}'_{(m-N)\infty}\otimes \mathcal{L}_{1/z}(t)$ has a non-trivial section which does not belong to $\mathcal{S}'_{(m-N-1)\infty}\otimes \mathcal{L}_{1/z}(t)$. For sufficiently large $m$ the degree of $\mathcal{S}'_{(m-N)\infty}$ is greater than $2g-2$, and due to S\'{e}rre Duality~\cite[Corollary~6.6(c)]{KLSS} $H^1(X',\mathcal{S}'_{(m-N)\infty})$ is trivial. Now Riemann-Roch implies $\dim H^0(X',\mathcal{S}'_{(m-N)\infty})=m-N+1$. Because the derivatives $\frac{\partial^l}{\partial t^l}\psi(\infty,t)$ belong to this space for $l=0,\ldots,m$, we have $m-N+1\ge m+1$. This implies $N\le 0$, which contradicts \,$N\geq 1$\,. \end{proof} For every \,$t_0\in \C\setminus T$\,, \,$\mathcal{S}' \otimes \mathcal{L}_{1/z}(t_0)$\, is equivalent to a generalised divisor \,$\mathcal{S}''$\, with \,$\mathcal{O}_{X'} \subset \mathcal{S}''$\, and support contained in \,$X' \setminus \{\infty\}$\, by \cite[Lemma~8.4]{KLSS}. Because \,$\mathcal{S}'' \otimes \mathcal{L}_{1/z}(t)$\, is equivalent to \,$\mathcal{S}' \otimes \mathcal{L}_{1/z}(t_0+t)$\,, we then have $$ \{ t \in \C \mid H^0(X',\mathcal{S}''_{-\infty} \otimes \mathcal{L}_{1/z}(t)) \neq 0 \} \;=\; t_0 + T \; . $$ By \cite[Theorem~8.8]{KLSS}, \,$\mathcal{S}'$\, therefore induces a Baker-Akhiezer function \,$\psi: (X' \setminus \{\infty\}) \times (\C\setminus T) \to \C$\, such that the holomorphic extension of the function \,$\psi(x,t) \cdot \exp(-2\pi\ci t/z)$\, takes the value \,$1$\, at \,$x=\infty$\,. \begin{Theorem} \label{T:inverseproblem} For given spectral data \,$(X',\mathcal{S}',\infty,z)$\,, there exists an monomorphism of algebras \begin{gather*} \Phi: \{f\in H^0(X',\mathcal{M})\,\mid\,\forall\, p\in X'\setminus\{\infty\}:\,f_p\in\mathcal{O}_{X',p}\} \;\longrightarrow\; \mathcal{A}(\C \setminus T) \\ f \;\longmapsto\; \Phi(f) \qquad \text{so that} \quad \Phi(f)\psi = f \cdot \psi \;, \end{gather*} where \,$\psi$\, is the Baker-Akhiezer function corresponding to \,$\mathcal{S}'$\,. The two highest coefficients of \,$\Phi(f)$\, are constant. The image \,$A$\, of \,$\Phi$\, in \,$\mathcal{A}(\C \setminus T)$\, belongs to \,$\mathcal{R}$\,. \end{Theorem} \begin{proof} We conclude that for all $t_0\in{\mathbb C}\setminus T$ the sheaf $\mathcal{S}'\otimes \mathcal{L}_{1/z}(t_0)$ has a one-dimensional space of global sections on $X'$, and all non-trivial sections do not vanish at $\infty$. Therefore, this sheaf is isomorphic to generalised divisor \,$\mathcal{S}$\, which contains the sheaf of holomorphic functions $\Sh{O}_{X'}$. The support of the sheaf $\mathcal{S}/\Sh{O}_{X'}$ is contained in $X\setminus\{\infty\}$. Due to \cite[Theorem~8.8]{KLSS} there exists a unique {\em Baker-Akhiezer function} on $X\times\{t\in{\mathbb C}|\;t+t_0\not\in T\}$ corresponding to the one-dimensional family of sheaves $$\mathcal{S}\otimes \mathcal{L}_{1/z}(t)\simeq \mathcal{S}'\otimes \mathcal{L}_{1/z}(t+t_0)\text{ with } t\in{\mathbb C}.$$ The differential operator $D^l$ acts on $\exp\left(2\pi\ci t/z\right)$ as the multiplication with $\left(2\pi\ci/z\right)^l$. Therefore the uniqueness of the Baker-Akhiezer function implies that for all meromorphic functions $f$ on $X'$ which are holomorphic on $X'\setminus\{\infty\}$, there exists a unique holomorphic differential operator $P=\Phi(f)$ on ${\mathbb C}\setminus T$, such that for all $y\in X'\setminus\{\infty\}$, the value $\psi(y,\cdot)$ of the Baker-Akhiezer function solves the holomorphic differential equation $f(y)\psi(y,\cdot)=P\psi(y,\cdot).$ More precisely, the order of $P$ is equal to the degree of $f$. If $f=\sum_{i\geq -m}a_{i}z^{i}$ denotes the Laurent series of the function $f$ in some neighbourhood of $\infty$ with respect to the local parameter $z$, then the highest coefficient of $P$ is equal to $a_{-m}\,(2\pi\ci)^m$. Moreover, since the values of $\exp(-2\pi\ci t/z)\psi(x,t)$ at $\infty$ are equal to $1$, we have in a neighbourhood of $\infty$ the following equation of Laurent series with respect to $z$: $$\exp(-2\pi\ci t/z) \left(f(x)\psi(x,\cdot)-(2\pi\ci)^mD^m\psi(x,\cdot)\right)= a_{m-1}z^{1-m}+O(z^{2-m}).$$ Therefore the coefficient of $D^{m-1}$ in $P$ is equal to $a_{1-m}(2\pi\ci)^{m-1}$. If $\lambda$ and $\mu$ are two meromorphic functions on $X$, which are holomorphic on $X'\setminus\{\infty\}$, then the values of the Baker-Akhiezer function at any element $x\in X'\setminus\{\infty\}$ yields a common solution of $(P-\lambda(x))\psi(x,\cdot)=0$ and $(Q-\mu(x))\psi(x,\cdot)=0$, where $P$ and $Q$ denotes the differential operators corresponding to $\lambda$ and $\mu$. Since the commutator of $P$ and $Q$ on $I$ is a differential operator of finite order, the same arguments as in the proof of Theorem~\ref{th:commuting operators} show that the commutator is equal to zero. By construction of \,$\Phi$\,, the degree of \,$\Phi(f)$\, is equal to the degree of \,$f$\,, i.e.~the pole order of \,$f$\, at \,$\infty$\,. For \,$d>2g'-2$\, we have \,$H^1(X',\mathcal{O}_{d\cdot \infty})=0$\, by \cite[Corollary~6.6(c)]{KLSS}, and therefore by Riemann-Roch \,$H^0(X',\mathcal{O}_{d\cdot x1}) = d-g'+1$\,. It follows that for every \,$d > 2g'-1$\, there exists a meromorphic function \,$f$\, on \,$X'$\, with pole order \,$d$\, at \,$\infty$\,, and therefore \,$A$\, contains the element \,$\Phi(f)$\, of degree \,$d$\,. Lemma~\ref{L:d0} thus shows \,$A \in \mathcal{R}$\,. \end{proof} \begin{Proposition} Let spectral data \,$(X',\mathcal{S}',\infty,z)$\, be given, such that \,$X'$\, is endowed with an anti-holomorphic involution \,$\rho$\, so that \,$\infty$\, is a smooth point of the fixed point set of \,$\rho$\, and \,$\rho^* \overline{z}=-z$\, and \,$\rho_* \overline{\mathcal{S}'}=\mathcal{S}'$\,. Then the restriction of the elements \,$\Phi(f)$\, with \,$\rho^* \overline{f}=f$\, to any connected component \,$I$\, of \,$i\R \setminus T$\, defines a subalgebra of \,$\mathcal{A}(I)$\, (case~1) which belongs to \,$\mathcal{R}$\,. \end{Proposition} \begin{proof} \,$\rho^*\bar{\psi}$\, is another function which satisfies the properties of the Baker-Akhiezer function \,$\psi$\, including the normalisation condition. Due to the uniqueness of the Baker-Akhiezer function we therefore have \,$\rho^*\bar{\psi}=\psi$\,. Therefore the differential operators \,$\Phi(f)$\, where \,$\rho^*\bar{f}=f$\, have real coefficients on any connected component \,$I$\, of \,$i\R \setminus T$\,. For every \,$f\in H^0(X',\mathcal{M})$\, which is holomorphic on \,$X' \setminus \{\infty\}$\,, the degree of \,$\Phi(f+\rho^*\bar{f})$\, is the same as the degree of \,$\Phi(f)$\,. Therefore the subalgebra of \,$\mathcal{A}(I)$\, (case~1) belongs to \,$\mathcal{R}$\,. \end{proof} The following theorem shows that the constructions of the direct problem in Section~\ref{Se:direct} and the inverse problem in Section~\ref{Se:inverse} are essentially inverse to each other. \begin{Theorem} \label{T:inverseproblemsolution} \begin{enumerate} \item Let \,$I$\, be a domain as in one of the three cases, \,$t_0\in I$\, and \,$A \in \mathcal{R}$\,, \,$(X'',\mathcal{S}'',\infty,z)$\, be the corresponding spectral data constructed in Theorem~\ref{th:direct general}, and \,$A(X'',\mathcal{S}'',\infty,z) \in \mathcal{R}$\, be the algebra corresponding to these spectral data by Theorem~\ref{T:inverseproblem}. Then \,$0\not\in T$\,,\,$I \subset \C \setminus (t_0+T)$, and the differential algebra \,$A(X'',\mathcal{S}'',\infty,z)$\, is isomorphic to \,$A$\, via the translation \,$t\mapsto t+t_0$\, and the restriction to \,$I$\,. \item Let \,$(X',\mathcal{S}',\infty,z)$\, be spectral data as considered in Section~\ref{Se:inverse} and \,$t_0 \in I := \C\setminus T$\,. Let \,$A$\, be the algebra corresponding to \,$(X',\mathcal{S}',\infty,z)$\, as in Theorem~\ref{T:inverseproblem}. Then the spectral data corresponding to \,$(A,I,t_0)$\, by means of Theorem~\ref{th:direct general} are isomorphic to \,$(X',\mathcal{S}' \otimes \mathcal{L}_{1/z}(t_0),\infty,z)$\,. \end{enumerate} \end{Theorem} \begin{proof} We first consider the case where \,$A=\langle P,Q \rangle$\, is the algebra generated by the two commuting differential operators \,$P$\, and \,$Q$\, of co-prime order \,$m$ and \,$n$\,, respectively. We again consider the local parameter $z$ defined for large $|\lambda|$ such that $\lambda=(z/2\pi\ci)^{-m}$, $\mu=(z/2\pi\ci)^{-n}+O(z^{1-n})$ as $z\to 0$. Due to Equation~\eqref{eq:asymp-M}, the eigenfunction \,$\widehat{\psi}$\, of \,$M(\lambda)$\, has the asymptotic behaviour $$ \widehat{\psi} = \Delta \cdot (1,\dotsc,1)^T \cdot (1+O(z)) $$ with $$ \Delta := \mathrm{diag}\bigr( 1, 2\pi\ci/z, (2\pi\ci/z)^2, \dotsc, (2\pi\ci/z)^{m-1} \bigr)\; . $$ Then by Equation~\eqref{eq:def-U} it follows $$ \Delta \cdot U(\,\cdot\,,\lambda) \cdot \Delta^{-1} = 2\pi\ci/z \cdot \left( \begin{smallmatrix} 0 & 1 & 0 & \ldots & 0\\ 0 & 0 & 1 & \ldots & 0\\ \vdots & \vdots & \vdots & \ddots & \vdots\\ 1 & 0 & 0 & \ldots & 0 \end{smallmatrix} \right) - \left( \begin{smallmatrix} 0 & 0 & \ldots & 0 \\ 0 & 0 & \ldots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \ldots & \alpha_m \end{smallmatrix} \right) + O(z) \; . $$ Because \,$\widehat{\psi}$\, solves the differential equation \,$(D-U)\widehat{\psi}=0$\, and \,$\alpha_m$\, is constant, the asymptotic equation $$ \Delta^{-1} \widehat{\psi} = (1,\dotsc,1,e^{-t\alpha_m})^T \cdot e^{2\pi\ci t/z} \cdot \bigr(1+O(z)\bigr) $$ follows. In particular \,$e^{-2\pi\ci t/z}\,\psi = e^{-2\pi\ci t/z}\,\widehat{\psi}_0$\, is holomorphic near \,$\infty$\, and equal to \,$1$\, there. By the definition of \,$\mathcal{S}'$\,, for all \,$t\in I$\, $$ \psi(\,\cdot\,,t) = g(t,\lambda)\cdot \chi $$ is a section of \,$\mathcal{S}'$\, on \,$X' \setminus \{\infty\}$\,. By uniqueness of the Baker-Akhiezer function it follows that \,$\psi$\, is equal to the Baker-Akhiezer function of \,$(X',\mathcal{S}',\infty,z)$\,. This proves (1) for \,$A = \langle P,Q \rangle$\,. For general \,$A \in \mathcal{R}$\,, we apply Theorem~\ref{th:direct general} and choose differential operators \,$P,Q \in A$\, of co-prime order. In this situation, for all \,$t\in \C$\, we have \,$H^0(X',\mathcal{S}'_{-\infty} \otimes \mathcal{L}_{1/z}(t)) \simeq H^0(X'',\mathcal{S}''_{-\infty} \otimes \mathcal{L}_{1/z}(t))$\,, because \,$\pi''_* (\mathcal{S}''_{-\infty}\otimes \mathcal{L}_{1/z}(t)) = \mathcal{S}'_{-\infty}\otimes \mathcal{L}_{1/z}(t)$\,. Moreover, that theorem shows that the Baker-Akhiezer function of \,$(X'',\mathcal{S}'',\infty,z)$\, is equal to the composition of \,$\pi'' \times \mathrm{id}_{\C\setminus T}$\, with the Baker-Akhiezer function of \,$(X',\mathcal{S}',\infty,z)$\,. This implies (1) for general \,$A$\,. In the situation of (2), choose two differential operators \,$P,Q \in A$\, of co-prime order. Let \,$(X'',\mathcal{S}'',\infty,z)$\, be the spectral data of \,$\langle P,Q \rangle$\, defined after Lemma~\ref{L:normalize-bounded}. Then there exists a one-sheeted covering \,$\pi': X' \to X''$\,. The arguments from the proof of (1) show that the Baker-Akhiezer function of \,$(X',\mathcal{S}',\infty,z)$\, is equal to the composition of \,$\pi' \times \mathrm{id}_{\C\setminus T}$\, with the Baker-Akhiezer function of \,$(X'',\mathcal{S}'',\infty,z)$\,. Because of Theorem~\ref{th:direct general}, this proves (2). \end{proof} Theorem~\ref{th:direct general} shows that any \,$A\in \mathcal{R}$\, is isomorphic to the algebra \,$\mathcal{M}(X',\infty)$\, of meromorphic functions on the spectral curve \,$X'$\, of \,$A$\, with pole at most at \,$\infty$\,. In particular, if two spectral curves \,$(X',\infty)$\, and \,$(X'',\infty)$\, with marked points are biholomorphic, then the corresponding algebras are also isomorphic. Let us now prove the converse. \begin{Proposition} \label{P:isomorphic-algebras} Let \,$(X',\infty)$\, and \,$(X'',\infty)$\, be two singular curves with a smooth point and isomorphic algebras \,$\mathcal{M}(X',\infty)$\, and \,$\mathcal{M}(X'',\infty)$\,. Then \,$(X',\infty)$\, is biholomorphic to \,$(X'',\infty)$\,. \end{Proposition} \begin{proof} Due to Lemma~\ref{L:deg} the degrees of two elements of two algebras $\mathcal{M}(X',\infty)$ and $\mathcal{M}(X'',\infty)$, respectively, coincide if they are mapped onto each other by an isomorphism $\mathcal{M}(X',\infty)\simeq\mathcal{M}(X'',\infty)$. First we choose two elements $\lambda$ and $\mu$ of $\mathcal{M}(X',\infty)\simeq\mathcal{M}(X'',\infty)$ of co-prime order. Due to Theorem~\ref{th:commuting operators} there exists a polynomial $f$ with $f(\lambda,\mu)=0$. This equation defines a singular curve $X$ with smooth marked point $\infty$. Due to Theorem~\ref{th:direct general} both singular curves $X'$ and $X''$ are one-sheeted coverings $\pi':X'\to X$ and $\pi'':X''\to X$ of this curve. Let us now show that for all $x\in X\setminus\{\infty\}$ the algebras $\mathcal{M}(X',\infty)\simeq\mathcal{M}(X'',\infty)$ generate the subrings $(\pi'_\ast(\mathcal{O}_{X'})_x$ and $(\pi''_\ast(\mathcal{O}_{X''})_x$, respectively. By symmetry it suffices to give the argument for $\mathcal{M}(X',\infty)$. As in~\cite{KLSS} we denote the direct image of the sheaf of holomorphic functions on the normalisation of $X$ by $\bar{\mathcal{O}}_X$. For \,$x\in X\setminus \{\infty\}$\, let $r_x$ be the radical $r_x=\{f\in\bar{\mathcal{O}}_{X,x}\mid f(x)=0\}$. Due to~\cite[Proposition~2.1]{KLSS} $(\pi'_\ast(\mathcal{O}_{X'}))_x\supset\mathcal{O}_{X,x}$ contains $r_x^n$ for some $n\in\mathbb{N}$. Since the multiplication is surjective from $r_x^n\times r_x^n$ onto $r_x^{2n}$, any choice of elements $f_1,\ldots,f_m$ of $(\pi'_\ast(\mathcal{O}_{X'}))_x\cap r_x$ which span $(\pi'_\ast(\mathcal{O}_{X'}))_x\cap r_x/r_x^{2n}$ define a surjective homomorphism $\C\{f_1,\ldots,f_m\}\to(\pi'_\ast(\mathcal{O}_{X'}))_x$. Let $\mathcal{S}'$ be the unique generalized divisor with support $\{\infty\}$ and degree $\deg(\mathcal{S}')=2g'-1+\dim((\pi'_\ast(\mathcal{O}_{X'}))_x/r_x^{2n})$. Let $\mathcal{S}$ be the unique subsheaf of $\mathcal{S}'$ which coincides on $X\setminus\{x\}$ with $\mathcal{S}'$ and with stalk $\mathcal{S}_x=r_x^{2n}$. It has the degree $\deg(\mathcal{S})=2g'-1$. By Serre duality, we have \,$H^1(X,\mathcal{S}')=H^1(X,\mathcal{S})=0$\,, and therefore the Riemann-Roch Theorem implies \begin{equation* \dim(H^0(X',\mathcal{S}'))-\dim(H^0(X',\mathcal{S})) = \deg(\mathcal{S}')-\deg(\mathcal{S}) \; . \end{equation*} Hence the natural projection of the subspace $H^0(X',\mathcal{S}')\subset\mathcal{M}(X',\infty)$ onto $(\pi'_\ast(\mathcal{O}_{X'}))_x/r_x^{2n}$ is surjective. Moreover, there exists $f_1,\ldots,f_m\in\mathcal{M}(X',\infty)$, which vanish at $x$ and induce a surjective homomorphism $\C\{f_1,\ldots,f_m\}\to(\pi'_\ast(\mathcal{O}_{X'}))_x$. this proves the claim. In particular, two points of the normalisation of $X$ belong to the same point of $X'$ if and only if all functions of $\mathcal{M}(X',\infty)$ take at both points the same values. Consequently the sheaves $\pi'_\ast(\mathcal{O}_{X'})$ and $\pi''_\ast(\mathcal{O}_{X''})$ are isomorphic. This implies first that $X'$ and $X''$ are homeomorphic and second the sheaves $\mathcal{O}_{X'}$ and $\mathcal{O}_{X''}$ are isomorphic. Now \cite[Proposition~2.3]{KLSS} proves that $(X',\infty)$ and $(X'',\infty)$ are biholomorphic. \end{proof} In the case where the spectral curve has geometric genus zero, the commuting differential operators \,$P$\, and \,$Q$\, which generate the corresponding rank 1 algebra can be computed explicitly. We conclude this paper with an example of this computation. Let us consider \,$A \in \mathcal{R}$\,, generated by two commuting differential operators \,$P$\, and \,$Q$\, of co-prime degree \,$m$\, and \,$n$\,, respectively. We let \,$(X',\mathcal{S}',\infty,z)$\, be the spectral data corresponding to \,$A$\, and suppose that the spectral curve \,$X'$\, has geometric genus zero. The simplest possible case occurs when \,$m=2$\,, \,$n=3$\,, which we will investigate in the sequel. Because \,$X'$\, has geometric genus zero, there exists a global coordinate of the normalisation \,$X$\, of \,$X'$\,, i.e.~a global meromorphic function \,$z$\, on \,$X$\, which is zero at \,$\infty$\, and nowhere else, so that the functions \,$\lambda$\, and \,$\mu$\, are given as \,$\lambda=p(z^{-1})$\, and \,$\mu=q(z^{-1})$\, in terms of polynomials \,$p$\, of degree \,$m=2$\, and \,$q$\, of degree \,$n=3$\,. By choosing the generating operators \,$P$\, and \,$Q$\, and the coordinate \,$z$\, suitably, one can achieve \begin{equation} \label{eq:example-pg} \lambda=z^{-2} \quad\text{and}\quad \mu= z^{-3}+b_1\,z^{-1} \end{equation} with some \,$b_1\in \C$\,. Indeed, \,$z$\, can be chosen such that \,$p(z^{-1})=z^{-2}+a_0$\, with some \,$a_0\in \C$\,. After subtracting the constant \,$a_0$\, from \,$P$\, and normalising \,$Q$\,, we obtain \,$p(z^{-1})=z^{-2}$\, and $q(z^{-1})=z^{-3}+b_2z^{-2}+b_1z^{-1}+b_0$. By now subtracting \,$b_2 P + b_0$\, from \,$Q$\,, we obtain \eqref{eq:example-pg}. These \,$\lambda$\,, \,$\mu$\, satisfy the relation \,$f(\lambda,\mu)=0$\, with the polynomial \,$f(\lambda,\mu)$\, given by $$ f(\lambda,\mu)=\mu^2-\lambda(\lambda+b_1)^2 = \mu^2-\lambda^3 - 2b_1\lambda^2-b_1^2\lambda \; . $$ The complex curve defined by the equation \,$f(\lambda,\mu)=0$\,, compactified by adding a smooth point at \,$\infty$\,, is hyperelliptic, and has exactly one singularity. This is a double point at \,$\lambda=-b_1$\, if \,$b_1\neq 0$\,, and a cusp at \,$\lambda=0$\, if \,$b_1=0$\,. Thus \,$X'$\, is either equal to this curve (and then has arithmetic genus \,$1$\,), or to its normalisation (and then has arithmetic genus \,$0$\,). If \,$X'$\, has arithmetic genus zero, then \,$X'$\, is biholomorphic to the Riemann sphere and the corresponding Baker-Akhiezer function is holomorphic outside \,$\infty$\,. The corresponding ordinary differential operators have constant coefficients and are therefore equal to \begin{align*} P&=D^2 & Q&=D^3+b_1D\;. \end{align*} If \,$X'$\, has arithmetic genus \,$1$\,, we at first consider the case \,$b_1\neq 0$\,. We will see that the case \,$b_1=0$\, can be treated via the same calculations by taking the limit. Here \,$X'$\, is a one-fold cover below the Riemann sphere, obtained by identifying the two points \,$z^{-1}=\pm c$\, with \,$c:=\sqrt{-b_1}$\, as a double point \,$z_0$\,. In this case the corresponding Baker-Akhiezer function is holomorphic except for a single order pole at \,$z=z_0$\, and an essential singularity at \,$\infty$\,, hence it is of the form $$\psi(z,t)=\exp(2\pi\ci tz^{-1})\frac{z^{-1}+d(t)}{z^{-1}-z_0^{-1}} =\exp(2\pi\ci tz^{-1})\frac{z_0+d(t)z_0z}{z_0-z},$$ with a suitable function $d$ depending on $t$. Because \,$\psi(z,t)$\, has to take the same values at $z^{-1}=\pm c$, we have $$\exp(2\pi\ci ct)\frac{c+d(t)}{c-z_0^{-1}}= \exp(-2\pi\ci ct)\frac{-c+d(t)}{-c-z_0^{-1}},$$ whence it follows that $d(t)$ is given by \begin{equation*}\begin{split} d(t) &=-c\frac{z_0^{-1}\cos(2\pi ct)+c\ci\sin(2\pi ct)} {c\cos(2\pi ct)+z_0^{-1}\ci\sin(2\pi ct)} \; . \end{split}\end{equation*} Therefore the {\em Baker-Akhiezer function} is equal to $$\psi(z,t)=\frac{\exp(2\pi\ci tz^{-1})}{z^{-1}-z_0^{-1}} \left(z^{-1}-c\frac{z_0^{-1}\cos(2\pi ct)+c\ci\sin(2\pi ct)} {c\cos(2\pi ct)+z_0^{-1}\ci\sin(2\pi ct)}\right).$$ An explicit calculation shows that the Baker-Akhiezer function solves the differential equation $$\frac{\partial^2}{\partial t^2} \psi(z,t)= -4\pi^2\left(z^{-2}+\frac{2c^2(z_0^{-2}-c^2)} {(c\cos(2\pi ct)+z_0^{-1}\ci\sin(2\pi ct))^2} \right)\psi(z,t).$$ This shows that the operator $P$ corresponding to the function $\lambda=z^{-2}$ is given by $$P=-1/(4\pi^2)D^2-\frac{2c^2(z_0^{-2}-c^2)} {(c\cos(2\pi ct)+z_0^{-1}\ci\sin(2\pi ct))^2}.$$ We leave it to the reader to calculate the corresponding operator $Q$. Finally we consider the limit $c\rightarrow 0$. In this case the Baker-Akhiezer function is equal to $$\psi(z,t)=\frac{\exp(2\pi\ci tz^{-1})}{z^{-1}-z_0^{-1}} \left(z^{-1}-\frac{z_0^{-1}} {1+2\pi\ci z_0^{-1}t}\right),$$ and $P$ is equal to $$P=-1/(4\pi^2)D^2-\frac{2z_0^{-2}} {(1+2\pi\ci z_0^{-1}t)^2}.$$
\section{Introduction} Two-photon emission (TPE) refers to the simultaneous emission of two photons during a quantum radiative transition\cite{Gauthier1992,He1994,Ning2004,Lissandrin2004,Hayat2007,Hayat2008,Hayat2009,Nevet2010-PRL,Nevet2010-NL,Lin2010,Ota2011,Poddubny2012,Rivera2017,Melzer2018}. Recent researches suggest TPE as a promising approach to generate entangled photon pairs in semiconductors, as it emits two photons with intrinsic energy conservation and time coincidence\cite{Hayat2011}. Compared to spontaneous parametric down conversion, a prevailing method to generate entangled photons, TPE does not have the restriction on phase-matching, and can potentially achieve a 3-order higher occurrence probability\cite{Kwiat1995,Hayat2008}. TPE can also occur within a wide temperature range, unlike semiconductor quantum dots that require low temperatures to efficiently generate entangled photons\cite{Huber2018,Chen2018,Liu2019}. In addition, while one-photon emission (OPE) during interband transition can only emit photons with energy above the material bandgap, TPE spectrum can be extremely broad starting from the near-zero frequency, which indicates that TPE has the potential to provide emission and gain with an ultra-broad bandwidth not restricted by the material bandgap. However, as a second-order quantum transition, the TPE rate is typically 5-10 orders of magnitude lower than the OPE rate, mainly due to the mismatch between the characteristic emitter size and the light-emitting wavelength\cite{Hayat2008,Hayat2009, Rivera2016,Rivera2017}. Consequently, the TPE rate needs to be dramatically increased, to meet the requirements for practical device applications. Spontaneous emission rate can be increased by applying a specified dielectric environment, widely known as the Purcell effect\cite{Purcell1946}. The enhancement originates from an increased field confinement and density of states (DOS)\cite{Iwase2010}. The enhancement factor, i.e. Purcell factor can be given by $F = {\varGamma}/{\varGamma}^{0}$, where ${\varGamma}$ and ${\varGamma}^{0}$ are the modified and vacuum emission rate, respectively. Surface plasmon polaritons (SPPs), with broadband field confinement and high DOS \cite{Iwase2010}, have been applied to improve the emission rate of various light sources, such as light-emitting diodes and quantum dots\cite{Gontijo1999,Okamoto2004,Tanaka2010,Sauvan2013,Khurgin2014,Hoang2015,Caligiuri2018,Chen2018}. Since TPE and OPE have different spectral spans, Purcell effect can also be employed to selectively obtain an increased TPE rate\cite{Nevet2010-NL,Rivera2017}. Previous researchers have demonstrated enhancements of the TPE rate in semiconductors by coupling emitters to a plasmonic bowtie nanoantenna array\cite{Nevet2010-NL}. However, the experimentally estimated TPE intensity is enhanced by a 3 orders of magnitude, yet still much lower than the OPE rate. This is likely due to that the optical field is only enhanced in the vicinity of the antenna tips and at the resonance frequency of nanoantennas. In addition, the spontaneous emission enhancement near semiconductor emitters is limited by the relatively low quality- ($Q$-) factor of the antenna resonance. More recently, Rivera \textit{et al.} theoretically proposed alternative approaches to enhance the TPE rate, with a calculated rate even surpassing the OPE rate, by placing an atomic emitter near a single-layer graphene that supports plasmons, or a polar dielectric film that supports surface phonon polaritons \cite{Rivera2016,Rivera2017}. However, a spatial separation between emitters and the field maximum still pose a limit to the overall TPE rate. An integrated light-emitting scheme that is straightforward for the experimental implementation is yet identified. We note that, strictly speaking, the term "two-photon emission" shall be replaced by "two-polariton emission" when considering emission into polariton modes. However, for simplicity, here we use these two terms interchangeably. \section{Principle} Here, we propose a new scheme to achieve ultrafast TPE, by employing a degenerately-doped semiconductor thin film that simultaneously serves as the light-emitting medium and supports SPP modes. Doped semiconductors are known to support SPP modes in the mid- and far-infrared\cite{Wagner2014,Yang2017}. In this work, we design the modal frequency of SPP modes to be around half of the OPE frequency of the semiconductor, thus allowing selective enhancement of the TPE rate in the direct bandgap semiconductor. A remarkable Purcell factor up to $1.2\times10^{6}$ is obtained in the prototype degenerately-doped InSb film. \begin{figure}[!b] \begin{center} \includegraphics[width=7.5cm]{FIG-01-eps-converted-to \end{center} \caption{\label{Fig. 1} (a) Schematics of OPE (left) and TPE (right) in a semiconductor with a degenerate doping level. Dashed line marks the Fermi level $E_{\rm F}$. Yellow arrows represent the thermalization of photoexcited carriers. (b) Schematic diagram of the prototype device. (c) Dispersion of the local and non-local permittivity of InSb with $N_{\rm e} = 8\times10^{18}$ cm$^{-3}$. (d) Local and nonlocal dispersion of LR-SPP and SR-SPP modes in the InSb film. The black dashed line marks the direct bandgap energy of InSb.} \end{figure} We theoretically demonstrate that the TPE can be enhanced by 10 orders of magnitude: accelerated from tens of millisecond to picoseconds, even faster than the OPE rate near the surface of the InSb layer. In addition, the TPE spectral peak can be flexibly tuned by varying the doping density of the InSb film. Fig.\ref{Fig. 1}(a) and \ref{Fig. 1}(b) show the schematics of OPE and TPE in the n-doped semiconductor, where the OPE frequency is designed to be about twice the SPP modal frequency of the same semiconductor thin film. The OPE and TPE rate, tailored by the Purcell effect, can be formulated as\cite{Nevet2010-NL,Rivera2017}, \begin{equation} R_{\rm OPE}(\omega_{0}) = F(\omega_{0})R_{\rm OPE}^{0}(\omega_{0})% \label{Eq1} \end{equation} \begin{equation} R_{\rm TPE}(\omega_{1}, \omega_{2}) = F(\omega_{1})F(\omega_{2})R_{\rm TPE}^{0}(\omega_{1}, \omega_{2}) \label{Eq2} \end{equation} where $R_{\rm OPE}^{0}(\omega_{0})$ and $R_{\rm TPE}^{0}(\omega_{1}, \omega_{2})$ represent the OPE and TPE rate in vacuum, respectively\cite{SI}. Our proposed structure comprises of a 100-nm-thick InSb film sandwiched by two AlSb layers, as shown in Fig.\ref{Fig. 1}(c). The bottom AlSb can serve as a buffer layer between GaAs and InSb for an optimal electron mobility of InSb\cite{Kang2018}. It can also serve as a wide-bandgap barrier to prevent carrier injection to the GaAs substrate. AlSb layers can be considered semi-infinite in the calculation due to the high confinement of SPP modes. The layered structure can support SPP modes, and the dispersion relation of these modes can be described as\cite{Wendler1986}, \begin{equation} {1+\frac{({\varepsilon_1}{\alpha_2} - {\varepsilon _2}{\alpha _1})({\varepsilon _2}{\alpha_3} - {\varepsilon _3}{\alpha _2}){e^{-2{\alpha_2}a}}}{({\varepsilon_1}{\alpha_2} + {\varepsilon_2}{\alpha_1})({\varepsilon_2}{\alpha_3} + {\varepsilon _3}{\alpha_2})} = 0} \label{Eq3} \end{equation} where $\alpha_{\rm i} = (q^{2}-\epsilon_{\rm i}\omega^{2}/c^{2})^{1/2}$, $q$ is the SPP wavevector, $\epsilon_{1} = \epsilon_{3} = \epsilon_{\rm AlSb} = 11.08$, $\epsilon_{2} = \epsilon_{\rm InSb}$ and $a$ is the thickness of InSb layer. When electrons interact with a high-momentum optical field, the permittivity changes with $\omega$ and $\alpha_{2}$. The permittivity of InSb should therefore be given by a nonlocal Drude model\cite{De2018,SI}, \begin{equation} {\varepsilon_{\rm nonlocal}}(\omega, q) = {\varepsilon_{\rm \infty}} - \frac{{{\omega _{\rm p}}^2}}{{{\omega ^2} + i\omega \gamma - (\frac{3}{5} - i\frac{4}{{15}}\frac{\gamma }{\omega })v_F^2{\alpha _2}^2}} \label{Eq4} \end{equation} where $\epsilon_{\rm \infty}$ is the high-frequency permittivity, $\omega_{\rm p}$ is the plasma frequency, $\gamma$ is the Drude scattering rate, and $v_{\rm F}$ is the Fermi velocity. The energy dispersion of electrons in the conduction band of InSb can be approximately given as $E = (\hbar k)^{2}/2m_{\rm c}$, and $m_{\rm c}$ is the effective electron mass. For a given carrier density $N_{\rm e}$, we obtain $\omega_{\rm p} = \sqrt{N_{\rm e}e^{2}/\epsilon_{0}m_{\rm c}}$, $\gamma = e/(m_{\rm c}\mu_{\rm e})$, $v_{\rm F} = \hbar (3\pi N_{e})^{1/3}/m_{\rm c}$, where $e$ is the electron charge, $\mu_{\rm e}$ is the electron mobility. Here we assume $\mu_{e}$ to be 6000 cm$^{2}$ V$^{-1}$ s$^{-1}$\cite{Litwin1981}. Fig. \ref{Fig. 1}(c) plots the local permittivity as well as the nonlocal permittivity with $q = 1.2 \times 10^{6}$ cm$^{-1}$. Compared to the local permittivity, the zero-crossing angular frequency $\omega_{\rm ENZ}$ of the nonlocal permittivity is blue-shifted. \begin{figure}[!t] \begin{center} \includegraphics[width=7.5cm]{FIG-02-eps-converted-to \end{center} \caption{\label{Fig. 2} (a-b) Distributed Purcell factor $F^{\rm dis}$ as a function of the wavevector and the emitted photon energy at $z$ = 50 nm (a) and 10 nm (b), respectively. (c) Purcell factor $F$ as a function of the emitted photon energy at $z$ = 10 nm and 50 nm. The inset is the zoom-in view of $F$ at $z$ = 50 nm. The black dashed line marks the direct bandgap energy of InSb.} \end{figure} To show the influence of the nonlocal effect, we calculate and compare the SPP dispersions with the local and nonlocal permittivity assumption, respectively, as shown in Fig. \ref{Fig. 1}(d). For lossy materials, there is no solutions for Eq. (\ref{Eq3}) when picking real $q$ and real $\omega$ concurrently. Using complex $q$ or $\omega$ , Eq. (\ref{Eq3}) can find two possible solutions often referred as the long-range (LR)-SPP mode and the short-range (SR)-SPP mode\cite{Wendler1986}. The choice of a real $q$ and consequently a complex $\omega_{q}$ allows the introduction of discrete modes during the mode quantization in our calculation\cite{Archambault2009}, where $\omega_{q}$ represents the complex modal frequency. The local dispersion has a flat asymptote slightly below $\omega_{\rm ENZ}$ and extends to infinite $q$. As the DOS is approximately proportional to $dq/d{\rm Re} (\hbar\omega_{q})$\cite{Archambault2009}, the local permittivity assumption may lead to a diverging Purcell factor near $\omega_{\rm ENZ}$. In contrast, the nonlocal dispersion has a gentle slope near $\omega_{\rm ENZ}$ with a Q-factor about 56, where $Q = {\frac{{\rm Re}(\omega_{ q})}{2{\rm Im}(\omega_{q})}}$. Consequently, a diverging Purcell factor is prevented in our calculation. Calculating from the dispersion relation (see SI\cite{SI}), the Purcell factor $F$ is given as a funtion of $\omega$ and $z$, \begin{equation} {F(\omega ,z) = \int_0^\infty {F^{\rm dis}}(q,\omega ,z){\rm{ }}dq} \label{Eq5} \end{equation} where $F^{\rm dis}$ is the distributed Purcell factor. $F^{\rm dis}$ at $z$ = 10 nm and 50 nm are calculated and shown in Figs. \ref{Fig. 2}(a-c). The spectral broadening of $F^{\rm dis}$ is caused by the finite $Q$-factor of the SPP modes \cite{Iwase2010}. When the emitter is moved from the central to the edge plane of the InSb film, the extremum value of the field confinement near the emitters appears at a higher $q$, leading to a spectral shift of $F$ at different $z$ as illustrated in Fig. \ref{Fig. 2}(d). The maximum Purcell factor can reach $1.2\times10^{6}$ at $z$ = 10 nm, and drops to $7\times10^{4}$ in the center ($z$ = 50 nm). \begin{figure}[!b] \begin{center} \includegraphics[width=7.5cm]{FIG-03-eps-converted-to \end{center} \caption{\label{Fig. 3} (a-b) TPE (a) and OPE (b) rate normalized to $N_{\rm ph}$ in the InSb thin film as a function of the emitted photon frequency and the spatial location. Unit: eV$^{-1}$ $\rm s^{-1}$ (c) Comparison of the TPE and OPE lifetimes as a function of the spatial location in the InSb film. The grey shadowed region marks the spatial location where the TPE lifetime is shorter than the OPE lifetime.} \end{figure} \noindent \section{Result} Combining Eqs. (\ref{Eq1}), (\ref{Eq2}) and (\ref{Eq5}), we can calculate the OPE and TPE rate in the InSb film. In the initial calculation, we choose $N_{\rm e} = 8\times10^{18}$ cm$^{-3}$ for InSb, which corresponds to $\omega_{\rm p} = 7\times10^{14}$ rad s$^{-1}$, $m_{\rm c} = 0.05$ $m_{\rm e}$. The intrinsic carrier density in InSb can be neglected in a degenerate doping level. For photoluminescence, we assume a photoexcited carrier density $N_{\rm ph}$ much lower than the doping density, thus avoiding nonlinearity. The TPE and OPE rate in the InSb film are plotted in Fig. \ref{Fig. 3}(a) and \ref{Fig. 3}(b), respectively. While the TPE spectrum starts from the near-zero photon energy, the OPE process only emits photons with energy above the material bandgap. Most importantly, due to the selective Purcell enhancement at frequencies below the material bandgap, TPE can be significantly accelerated in the InSb film. At locations close to the InSb surface, the TPE rate can even surpass the OPE rate. We further retrieve the TPE and OPE lifetime in the InSb film. TPE can dominate in the range close to the InSb/AlSb interface, as shown in Fig. \ref{Fig. 3}c. Compared with a undoped, bulk InSb material, the TPE lifetime in the InSb film can be accelerated from 31 ms to 2.3 ps, with a corresponding TPE/OPE ratio increasing from $4.3\times10^{-7}$ to 10.7. Moreover, while the spectrum of OPE in a semiconductor, without quantum confinement, is generally fixed by the material bandgap, the spectrum of TPE in a semiconductor can be engineered in a broad range. We further investigate the dependence of the TPE spectrum on the carrier density in the InSb film. As shown in Fig. \ref{Fig. 4}, with an increasing $N_{\rm e}$ from $4\times10^{18}$ cm$^{-3}$ to $1\times10^{19}$ cm$^{-3}$, the spectral maximum of TPE can blue-shift by 45\%, as a result of the modification of the SPP dispersion in the InSb film. The tuning of $N_{\rm e}$ can be done by the chemical doping or by applying a static electric field. Alternatively, the SPP dispersion can be actively tuned by including additional tunable materials, such as phase-changing vanadium dioxide in the vicinity of the InSb layer\cite{Folland2018}. \begin{figure}[!t] \begin{center} \includegraphics[width=7.5cm]{FIG-04-eps-converted-to \end{center} \caption{\label{Fig. 4} Normalized TPE spectrum near the InSb/AlSb interface as a function of $N_{\rm e}$.} \end{figure} \section{Conclusion} In conclusion, we theoretically show that ultrafast and tunable TPE can be realized in a subwavelength InSb film, by spatially and spectrally matching TPE with highly-confined SPP modes. Similar concept can be extended to other semiconductors\cite{Charnukha2019}, 2D materials\cite{Rana2011,Kaminer2016}, and superconductors supporting Josephson plasmons\cite{Rajasekaran2016}. The efficiency of TPE can be further boosted by stimulation\cite{Hayat2011}. Ultrafast and efficient TPE holds the potential to enable single and entangled sources emitting at a GHz rate. The polariton emission can be used for realizing plasmonic gain and increasing plasmon coherence, two crucial elements in plasmonic circuits\cite{Basov2017,Heeres2013} and plasmonic lasers\cite{Oulton2009, Fedyanin2012}. The generated polaritons can be coupled into radiative modes by applying near-field momentum compensation through nanotips and nanoantennas\cite{Nevet2010-NL, Charnukha2019}. In addition, the carrier can potentially be injected by electrical means, with possibilities for further on-chip integration. \section{The Acknowledgements} This work is supported by the National Natural Science Foundation of China (Grant No. 61975251). \bibliographystyle{unsrt}
\section{Introduction} We consider the four-dimensional Einstein-Klein-Gordon-AdS system with mass $\mu$ related to the negative cosmological constant $\Lambda$ through $\mu^2=\frac{2}{3} \Lambda$. For this, and only this, value of mass the system is conformally well-behaved at null and spatial infinity and consequently the initial-boundary value problem is well-posed for a variety of different boundary conditions at infinity \cite{f2,hw}. Here, we focus on the one-parameter family of Robin boundary conditions. It has been known that along this family there is a critical parameter value at which the system undergoes a bifurcation: the (zero energy) anti-de Sitter (AdS) spacetime becomes linearly unstable above that critical value \cite{iw} and there emerges a pair of (negative energy) globally regular static solutions (henceforth called AdS Robin solitons) \cite{hh}. The main goal of this paper is to establish the existence of AdS Robin solitons rigorously and analyze the structure of the bifurcation in more detail. In preparation of future analysis of the role of solitons in dynamics, we also determine their spectrum of linearized perturbations. \section{Setup} The Einstein-Klein-Gordon-AdS system is given by \begin{subequations} \begin{align}\label{ekg} & G_{\alpha\beta}+ \Lambda g_{\alpha \beta} = 8 \pi G \left(\partial_{\alpha} \phi \,\partial_{\beta} \phi - \frac{1}{2} \left(g^{\mu\nu} \partial_{\mu}\phi \, \partial_{\nu}\phi +\mu^2 \phi^2\right)\, g_{\alpha\beta}\right)\;,\\ & \Box_g \phi - \mu^2 \phi=0, \end{align} \end{subequations} where $\Box_g=g^{\alpha\beta} \nabla_{\alpha}\nabla_{\beta}$ is the wave operator associated with the metric $g_{\alpha\beta}$, $\mu$ is the mass of the scalar field, and $\Lambda$ is a negative constant. We assume spherical symmetry and write the metric in the form \begin{equation}\label{g} g= \frac{\ell^2}{\cos^2{\!x}}\left( -A e^{-2 \delta} dt^2 + A^{-1} dx^2 + \sin^2{\!x} \, d\omega^2\right)\,, \end{equation} where $(t,x,\omega)\in (-\infty,\infty) \times [0,\pi/2) \times \mathbb{S}^2$, $d\omega^2$ is the round metric on $\mathbb{S}^2$ and $\ell^2=-3/\Lambda$. The metric functions $A,\delta$ and the scalar field $\phi$ depend on $(t,x)$. We choose units such that $\ell=1$ and $4\pi G=1$ and introduce new variables \begin{equation} f= \frac{\phi}{\cos{x}}\quad\mbox{and} \quad B = \frac{A-1}{\cos^2{\!x}}\,. \end{equation} Then the system (1) reduces to \begin{subequations} \begin{align} (\Box_{\hat{g}}-1) f =& \frac{2+\mu^2}{\cos^2 x} f-\left( 1-3\cos^2 x\right) B f-\mu^2\sin^2 x \; f^3\;, \\ \cos x \; \partial_x B =& -\frac{B}{\sin x} - \sin x \; (1+B \cos^2 x)\;\Phi-\mu^2 \sin x \; f^2\;, \\ \partial_x \delta =& -\sin x\cos x \; \Phi\;,\\ \partial_t B=& -2 A \sin{x} \;(\cos x \,\partial_x f -f \sin x)\; \partial_t f\;, \end{align} \end{subequations} where $\Phi = (\cos x \,\partial_x f -f \sin x)^2+A^{-2} e^{2\delta} \cos^2 x \; (\partial_t f)^2$ and $$ \Box_{\hat{g}}=-e^{\delta} \partial_t\left(A^{-1} e^{\delta} \partial_t\right)+\frac{e^{\delta}}{\sin^2{\!x}}\,\partial_x\left(A e^{-\delta} \sin^2{\!x} \, \partial_x\right) $$ is the polar wave operator associated with the conformal metric $\hat g_{\alpha\beta}=\cos^2{\!x}\, g_{\alpha\beta}$. On the right side of equation (4a) the derivatives of metric functions were eliminated using equations (4b) and (4c). In the following we set $\mu^2=-2$. For this value of mass the wave equation (4a) is regular at $x=\pi/2$ because the first term on the right side (which is the only singular term) vanishes\footnote{This cancellation is due to the fact that for $\mu^2=-2$ the left sides of equations (1b) and (4a) are asymptotically conformal, that is $(\Box_g+2)\phi \approx (\cos{x})^{-3} (\Box_{\hat g}-1) f$ near $x=\pi/2$. However, the constraint equation (4b) has a singularity at $x=\pi/2$ so it does not appear possible to extend the solutions `beyond infinity' (cf. \cite{f3} where an extension of solutions across the conformal boundary at \emph{timelike} infinity was analyzed for the system (1) with $\mu^2=\frac{2}{3} \Lambda>0$).}. Thanks to this fact, the initial-boundary value problem for the system (4) is well posed for a variety of boundary conditions at the conformal boundary (both reflective and dissipative) \cite{f2,hw}\footnote{This should be contrasted with the widely studied massless case for which only the Dirichlet boundary condition is compatible with the basic requirement of finite total mass \cite{br}.}. In this paper we focus our attention on the one-parameter family of Robin boundary conditions \begin{equation}\label{robin} \partial_x f-b\, f\vert_{x=\frac{\pi}{2}}=0, \end{equation} where $b$ is a constant (hereafter referred to as the Robin parameter). For $b=0$ the Robin condition reduces to the Neumann condition $\partial_x f\vert_{x=\pi/2}=0$. Assuming \eqref{robin} and expanding the fields in power series in $z=\pi/2-x$ we obtain the following asymptotic behavior near $z=0$ \begin{align} f(t,x) &=\alpha - b \alpha z + \mathcal{O}(z^2)\;,\\ B(t,x) &= \alpha^2 - (3 b \alpha^2 +M) z + \mathcal{O}(z^2)\;,\\ \delta(t,x) &=\delta_{\infty}+\frac{1}{2}\alpha^2 z^2 + \mathcal{O}(z^3)\;, \end{align} where $\alpha(t)$ and $\delta_{\infty}(t)$ are free functions\footnote{We use the normalization $\delta(t,0)=0$, hence $t$ is the proper time at the center.} and $M$ is a constant. To see the physical meaning of $M$, let us define the renormalized mass function \begin{equation}\label{m} m=-B \tan{x} + \frac{\sin^3{x}}{\cos{x}}\, f^2\,. \end{equation} The first term on the right side is the Misner-Sharp mass function defined by $m_{MS}=r (1+r^2-g^{\mu\nu} \partial_{\mu} r \partial_{\nu} r)$, where $r=\tan{x}$ is the areal radial coordinate. This function diverges as $x\rightarrow \pi/2$ and the purpose of the second term (called the counterterm) is to cancel this divergence. The leading order behavior of the counterterm is determined by the asymptotics (6) and (7) but otherwise can be chosen freely. Using equation (4b) we get \begin{equation}\label{mprim} \partial_x m=\rho \sin^2{x}\;, \end{equation} where \begin{equation}\label{rho} \rho=A^{-1} e^{2\delta} (\partial_t f)^2 +(\partial_x f)^2 + f^2 +B (\cos{x}\; \partial_x f -f \sin{x})^2\;, \end{equation} hence \begin{equation}\label{m-vol} m(t,\pi/2)=\int_{0}^{\pi/2} \rho \sin^2{x}\,dx. \end{equation} This quantity can be interpreted as the bulk energy. From the asymptotic expansions (6) and (7) it follows that \begin{equation}\label{masym} M=m(t,\pi/2)-b \alpha^2(t), \end{equation} where the second term on the right side can be viewed as the energy stored on the boundary. Although both the bulk and boundary energies are time dependent, their sum $M$ is conserved. In what follows, we will refer to $M$ as the total energy (mass). The exchange of energy between the bulk and the boundary is a characteristic feature of systems subject to the Robin boundary conditions. Note that some of the bulk energy is ``lost" to the boundary if $b<0$ and ``gained" from the boundary if $b>0$. We remark that the expression \eqref{masym} can be obtained in a systematic way within the diffeomorphism covariant Hamiltonian framework of Wald and Zoupas \cite{wz} (see section 2.2 in \cite{hhol}). Nonetheless, we believe that our hands-on approach, based solely on the analysis of the system (4), is helpful in getting insight into not so widely known physics of the Robin boundary conditions. \section{AdS Robin solitons} For time-independent solutions the system (4) with $\mu^2=-2$ takes the form \begin{subequations} \begin{align} \label{eq:1} &(1+B\cos^2{\!x}) f''+\cot{x} \left(2+(1-4\sin^2{\!x}) B + 2 \sin^2{\!x}\, f^2\right) f'-f \nonumber\\ &\qquad\qquad\qquad\,\,\, +\left(1-3\cos^2{\!x}\right) B f-2\sin^2{\!x} \; f^3=0\;, \\ \label{eq:2} & \cot{x} \; B' +\frac{B}{\sin^2{\!x}} + (1+B \cos^2{\!x})\;(\cos x \,f'-\sin{x} \,f)^2 -2 f^2=0\;,\\ \label{eq:3} & \delta' + \sin{x} \cos{x}\,(\cos x \,f'-\sin{x} \,f)^2=0\,, \end{align} \end{subequations} where the derivatives of metric functions were eliminated from equation (\ref{eq:1}) using equations (\ref{eq:2}) and (\ref{eq:3}). It is routine to prove that this system has local solutions near $x=0$ which behave as follows \begin{equation}\label{static0} f(x) \sim c +\frac{1}{6} c x^2,\quad B(x) \sim \frac{2}{3} c^2 x^2,\quad \delta(x)\sim -\frac{1}{9} c^2 x^4\,, \end{equation} where $c$ is a free parameter. \begin{lemma*} For any $c$ the local solution \eqref{static0} extends smoothly up to $x=\pi/2$ and fulfills the boundary conditions (6)-(8). \end{lemma*} \begin{proof} To prove this lemma it is convenient to use the radial coordinate $r=\tan{x}$ and return to the original field variables \begin{equation}\label{} \phi(r)= f(x) \cos{x},\qquad A(r)=1+ B(x) \cos^2{x}. \end{equation} Then, equations \eqref{eq:1} and \eqref{eq:2} become \begin{subequations} \begin{align} \label{eqphi} & (1+r^2) A \phi''+\left(r(1+r^2)A\phi'^2+(1+r^2)A'+\frac{2+4 r^2}{r} A\right)\phi'+2\phi=0, \\ \label{eqA} & (1+r^2)A'-\frac{1+3 r^2}{r} (1-A) -2 r \phi^2 + r(1+r^2) A \phi'^2 = 0. \end{align} \end{subequations} The local solutions \eqref{static0} translate to \begin{equation}\label{ics} \phi(r)\sim c-\frac{1}{3} c r^2,\quad A(r)\sim 1+\frac{2}{3} c^2 r^2. \end{equation} We first observe that the function $B=(A-1)(1+r^2)$ is monotone increasing. To see this, suppose that $B(r)$ has a maximum at some point $r_0>0$. Differentiating equation \eqref{eqA}, substituting $B'(r_0)=0$, and eliminating $\phi''(r_0)$ and $B(r_0)$ using equations \eqref{eqphi} and \eqref{eqA}, respectively, we get after simplifications \begin{equation}\label{b2prim} B''(r_0) = 2 \phi'^2+4 r^2 \phi^2 \phi'^2+4 (r \phi'+\phi)^2\vert_{r=r_0}\,, \end{equation} which is manifestly positive, contradicting that the point $r_0$ exists. Since $B(r)$ is positive for small $r>0$, this implies that $A(r)\geq 1$ for all $r$. \vskip 0.1cm \noindent Next, we define a function \begin{equation}\label{H} H=\frac{1}{2} (1+r^2) A \phi'^2 + \phi^2. \end{equation} Using the system (17) we obtain \begin{equation}\label{dH} H'=-\frac{(1+r^2) A (3+r^2 \phi'^2)+2 r^2 \phi^2 + 3 r^2+1}{2r}\,, \end{equation} which is manifestly negative, hence $H(r)$ is a monotonically decreasing Lyapunov function. Since $A\geq 1$, it follows that $r^2 \phi'^2$ and $\phi^2$ remain bounded for all $r$. \vskip 0.1cm To determine the asymptotic behavior of solutions for $r\rightarrow \infty$ it is convenient to use the logarithmic radial variable $\tau=\log{r}$. In terms of $\tau$ the system (17) is asymptotically autonomous for $\tau\rightarrow \infty$ and the limiting autonomous system is \begin{subequations} \begin{align}\label{eqphi_lim} & A \ddot \phi + (3+2\phi^2) \dot\phi +2 \phi=0,\\ \label{eqA_lim} &\dot A-3(1-A)-2\phi^2+A\dot\phi^2=0, \end{align} \end{subequations} where dot denotes the derivative with respect to $\tau$ (by an abuse of notation, we use the same symbols for the original and limiting systems). From the general theory of asymptotically autonomous dynamical system \cite{aa, th} and the existence of the Lyapunov function $H$, it follows that the asymptotic behavior of solutions of the system (17) for $\tau\rightarrow \infty$ is governed by the above limiting system. Elementary analysis gives the attracting fixed point $\phi=0,\dot\phi=0,A=1$ with the leading order behavior \begin{equation}\label{focus} \phi(\tau) = c_1 e^{-\tau} + c_2 e^{-2\tau}+\mathcal{O}(e^{-3\tau}),\qquad A(\tau)-1 = c_1^2 e^{-2\tau} + c_3 e^{-3\tau}+\mathcal{O}(e^{-4\tau}), \end{equation} where $c_k$ are free parameters, which are related to the free parameters $\alpha, b$, and $M$ in the expansions (6) and (7) by \begin{equation}\label{ck} c_1=\alpha,\quad c_2=-b \alpha,\quad c_3=-3b \alpha^2 -M. \end{equation} This completes the proof. \end{proof} The above Lemma ensures that for each $c$ the solution starting with the initial conditions \eqref{static0} automatically satisfies the Robin condition $f'(\pi/2)=b f(\pi/2)$ for some parameter $b$ (which depends on $c$). We will refer to these globally regular static solutions as the AdS Robin solitons (or just solitons for short) and denote them by $(f_s,B_s,\delta_s)$. The profiles of solitons can be easily determined numerically by integrating the system (14) with the boundary conditions \eqref{static0}. We note in passing that an analogous reasoning leads to a two-parameter family of hairy black holes (where the second parameter is the horizon radius). As far as we know, the AdS Robin solitons and hairy black holes were first studied in the literature in the context of so called ``designer gravity" \cite{hh, hm}, however, to the best of our knowledge, their existence remained unproven. \section{Bifurcation analysis} It is illuminating to look at the solitons from the viewpoint of the local bifurcation theory. To this end, consider the perturbation expansion of solitons for small $c$ \begin{equation}\label{pert} b=b_*+c^2 b_2+\mathcal{O}(c^4), \quad f=c f_1 + c^3 f_3+\mathcal{O}(c^5),\quad B=c^2 B_2+ c^4 B_4+\mathcal{O}(c^6)\,. \end{equation} Inserting this expansion into the system (14) and requiring regularity at $x=0$, at the lowest order we get \begin{equation}\label{order1} b_*=\frac{2}{\pi},\quad f_1=\frac{x}{\sin{x}}, \quad B_2=\frac{x}{\sin{x}}\,\left(-\cos{x}+\frac{x}{\sin{x}}\right)\,. \end{equation} At the third order equation (\ref{eq:1}) becomes \begin{align} \label{eq:4} f_3''&+2\cot x\;f_3'-f_3=-B_2\cos^2 x\;f_1''-\cot x \;((1-4\sin^2 x)B_2\nonumber \\ &+2\sin^2 xf_1^2)f_1'-(1-3\cos^2 x)B_2f_1+2\sin^2 x f_1^3\;. \end{align} Substituting $f_1$ and $B_2$, given in \eqref{order1}, into the right hand side and imposing $f_3(0)=0$, we find \begin{align}\label{f3a} f_3(x) = \frac{1}{12\sin x} & \left( \left( 5-24 \zeta\left(3 \right) \right) x + 3x\cos{(2x)}\;-\frac{2x^3}{\sin^2 x}-3\sin{(2x)}\;\right. \nonumber \\ & \left. + 16 x^3 C_1(x) - 48 x^2 S_2(x) - 72x C_3(x) + 48 S_4(x) \right), \end{align} where $\zeta$ is the Riemann zeta function and we defined the functions \begin{equation} S_n(x) = \sum_{k=1}^{\infty} \frac{\sin(2kx)}{k^n} , \qquad C_n(x) = \sum_{k=1}^{\infty} \frac{\cos(2kx)}{k^n} \;. \end{equation} From \eqref{f3a} we read off \begin{align} & f_3\left(\frac{\pi}{2}\right) = \frac{\pi}{48}\left(4-\pi^2(8\ln 2+1)+60\zeta(3)\right)\approx 0.754316\;,\label{f3pi2}\\ & f'_3\left(\frac{\pi}{2}\right) = \frac{2}{3}+\frac{\pi^2}{8}\left(8\ln 2 -1\right)- \frac{7}{2}\zeta\left(3\right) \approx 2.06686\;.\label{df3pi2} \end{align} At the fourth order equation (14b) becomes \begin{align} \cot x\; B_4'&+\frac{1}{\sin^2 x}B_4 = -B_2 \cos^2 x\;(\cos x\;f_1'-\sin x f_1)^2\nonumber \\ &-2(\cos x\;f_1'-\sin x f_1)(\cos x\;f_3'-\sin x f_3)+4f_1f_3\;. \end{align} Substituting \eqref{order1} and \eqref{f3a} into the right hand side and requiring regularity at $x=0$, we find \begin{align}\label{b4a} B_4(x) &= \frac{1}{6}x \left(\cot x-\frac{x}{\sin^2 x} \right) \left(24\zeta(3)-5 \right) +4x \left( 2\cot x-\frac{3x}{\sin^2 x} \right)C_3(x)\nonumber \\ &+4x^2 \left(\cot x-\frac{2x}{\sin^2 x} \right)S_2(x) -\left( 6\cot x-\frac{8x}{\sin^2 x} \right)S_4(x)+\frac{3}{4} \cos^2{x} \nonumber \\ & +\left(\frac{3}{4}+\frac{1}{3} x^2\right)x^2 \cot x + \frac{8x^4}{3\sin^2 x} C_1(x) +x^2 \left(\frac{1}{4\sin^2 x}-\frac{3}{4}-\frac{1}{3} x^4\right) \nonumber \\ &+\frac{2x^2}{\sin^2 x} - x \cot x \left(1-x^2+\frac{1}{4}\cos (2x)+\frac{x^2}{2\sin^2{x}}\right)\,, \end{align} from which we read off \begin{equation}\label{b4p} B'_4\left(\frac{\pi}{2}\right) = \frac{\pi}{48}\left(54+\pi^2(32\ln 2-11)\right)\approx 10.7566\;. \end{equation} Using \eqref{f3pi2} and \eqref{df3pi2} and imposing the Robin condition in the expansion \eqref{pert}, we get \begin{equation}\label{b2} b_2=\frac{2}{\pi} \,\left(f_3'-\frac{2}{\pi} f_3\right)\big\vert_{\pi/2}=\frac{\pi}{6} (16 \ln{2} -1)+ \frac{1}{\pi}(1-12\zeta(3)) \approx 1.01009\,. \end{equation} The fact that $b_2$ is positive means that at $b_*$ we have a supercritical pitchfork bifurcation where the AdS solution bifurcates into a pair of solitons ($\pm f_s, B_s, \delta_s$). As usual, this kind of bifurcation is associated with exchange of linear stability and, indeed, in the next section we will show that for $b>b_*$ the AdS space becomes linearly unstable whereas the solitons are linearly stable. Using (7) and the expansion \eqref{pert}, we get the approximation for the mass \begin{equation*} M_s= B'(\pi/2)-3 b \alpha^2 \simeq \frac{3\pi}{2} c^2+B_4'(\pi/2) c^4 - 3 \left(\frac{2}{\pi}+b_2 c^2\right) \left(\frac{\pi}{2} c+ f_3(\pi/2) c^3\right)^2, \end{equation*} which upon substitution of \eqref{f3pi2} and \eqref{b4p} yields \begin{equation}\label{mass-soliton} M_s \simeq -\frac{\pi^2 b_2}{8} \, c^4=-\frac{\pi^2}{8 b_2}\, (b-b_*)^2\,. \end{equation} It is instructive to rederive this result along the lines of designer gravity \cite{hh}. Letting $\alpha=f(\pi/2)$ and $\beta=f'(\pi/2)$, we get from \eqref{pert} (in this paragraph `$=$' means equality up to order $\mathcal{O}(c^4)$) \begin{equation}\label{alpha-beta} \alpha= f_1(\pi/2)\, c + f_3(\pi/2)\,c^3,\quad \beta= f'_1(\pi/2)\,c+ f'_3(\pi/2)\,c^3\,, \end{equation} which can be viewed as the parametric equation of the curve in the $(\alpha,\beta)$ plane. Eliminating $c$ we get the function \begin{equation}\label{beta} \beta_s(\alpha)=\frac{2}{\pi} \alpha +\frac{4 b_2}{\pi^2} \alpha^3, \end{equation} where the subscript `s' indicates that the function is associated with solitons. Following the approach used in designer gravity we introduce the effective potential \begin{equation}\label{potential} \mathcal{V}(\alpha)=2\int_0^{\alpha} \beta_s(\alpha') d\alpha' - b \alpha^2=-(b-b_*) \alpha^2 +\frac{2b_2}{\pi^2} \alpha^4\,. \end{equation} By construction, critical points of the effective potential correspond to solitons. The key observation, made by Hertog and Horowitz in \cite{hh}, is that the value of the effective potential at the critical point is equal to the soliton mass. In our case, $\mathcal{V}'(\alpha)=0$ for $\alpha_s^2=\frac{\pi^2}{4 b_2} (b-b_*)$ (and, of course, for $\alpha=0$ corresponding to the AdS space). Substituting this into \eqref{potential} we get $M_s=\mathcal{V}(\alpha_s)$ which reproduces the formula \eqref{mass-soliton}. Note that $\mathcal{V}''(\alpha_s)>0$. Further from the bifurcation point, the soliton function $\beta_s(\alpha)$ and the corresponding effective potential $\mathcal{V}(\alpha)$ can be determined numerically\footnote{For large values of $c$, there develops a boundary layer near $x=\pi/2$ with exponentially shrinking width. Using the method of matched asymptotics one can show that both $\alpha$ and $b$ grow as $e^{c^2}$ for $c\rightarrow \infty$ which makes the numerics (in compactified variable $x$) cumbersome.}. We find that for each $b>b_*$ the effective potential has the shape of a Mexican hat (see Fig.~2) with exactly three critical points: the local maximum at zero and two global minima at $\pm \alpha_s$. This implies that the soliton solution is unique (modulo reflection symmetry) and suggests that it is stable. % \begin{figure}[h!] \centering \includegraphics[width=0.6\textwidth]{plot1.pdf} \caption{\label{fig1} {\small Effective potentials for sample values of $b$.}} \end{figure} \vskip 0.2cm \noindent \emph{Remark.} It is natural to expect that for any given $b>b_*$ the soliton is the ground state, i.e. for any regular initial data satisfying the Robin condition \eqref{robin} there holds the inequality $M\geq M_s$ which saturates if and only if the data correspond to the soliton \cite{hh}. Our numerical constructions of initial data corroborate this conjecture but we have not been able to prove it (see \cite{hhol} for partial results in this direction). \section{Linear stability analysis} Linearizing the system (4) around the AdS solution ($f=B=\delta=0$) and separating time $f(t,x)=e^{i\omega t} v(x)$ we get the eigenvalue problem\footnote{The eigenvalue problem \eqref{eigen} is a particularly simple case of the master eigenvalue problem for linear perturbations of AdS space that was solved by Ishibashi and Wald in full generality using the properties of hypergeometric functions \cite{iw}. For the reader's convenience we reproduce their results in our special case using more elementary tools.} \begin{equation}\label{eigen} L v = \omega^2 v, \quad \mbox{where} \,\,\,L=-\frac{1}{\sin^2{\!x}}\,\partial_x\left(\sin^2{\!x}\, \partial_x\right)+1. \end{equation} The operator $L$ (which is just the polar conformal Laplacian on the 3-sphere) is symmetric on the Hilbert space $L^2\left([0,\pi/2], \sin^2{\!x}\, dx\right)$ and the Robin boundary condition \begin{equation}\label{rc} v'-b v\vert_{x=\frac{\pi}{2}}=0 \end{equation} provides a one-parameter family of its self-adjoint extensions. For $\omega^2>0$ the regular solution of \eqref{eigen} is \begin{equation}\label{v} v(x)=\frac{\sin(\omega x)}{\sin{x}}. \end{equation} Imposing the Robin condition \eqref{rc} we obtain the quantization condition for the eigenfrequencies \begin{equation}\label{robin-omega} \omega=b \tan\left(\omega\pi/2\right). \end{equation} \begin{figure}[h] \includegraphics[height=0.38\textwidth]{plot2a.pdf} \hspace{4ex} \includegraphics[height=0.38\textwidth]{plot2b.pdf} \captionsetup{width=\textwidth} \label{fig5} \caption{{\small Graphical solutions of the quantization conditions \eqref{robin-omega} and \eqref{robin-lambda}.}} \end{figure} From the graphical analysis shown in Fig.~2a we see that for each non-negative integer $n$ there is exactly one eigenfrequency $\omega_n$ such that \begin{align*} 2n+1 &< \omega_n<2n+2 \quad \mbox{if} \quad b<0,\\ 2n &<\omega_n<2n+1 \quad \mbox{if} \quad 0<b<\frac{2}{\pi}\;. \end{align*} For large $n$ the quantization condition \eqref{robin-omega} gives the asymptotically resonant spectrum \begin{equation}\label{eigen-asym} \omega_n=2n+1-\frac{b}{\pi n} +\mathcal{O}\left(\frac{1}{n^2}\right)\,. \end{equation} The lowest eigenvalue $\omega_0^2$ vanishes at $b=b_*=2/\pi$; the corresponding eigenfunction is the linearized static solution $f_1$ given in \eqref{order1}. An elementary perturbative calculation gives near $b_*$ \begin{equation} \omega_0^2 \approx \frac{6}{\pi} (b_*-b). \end{equation} For general $b>b_*$ there is an exponentially growing mode $e^{\lambda_0 t} v_0(x)$, where the exponent $\lambda_0=\sqrt{-\omega_0^2}$ is given by the unique positive root of the equation (see Fig.~2b) \begin{equation}\label{robin-lambda} \lambda=b \tanh\left(\lambda\pi/2\right) \end{equation} and the corresponding eigenfunction is $v_0(x)=\sinh(\lambda_0 x)/\sin{x}$. \vskip 0.2cm Next, we look at the linear stability of solitons. Linearizing the system (4) around the soliton and separating time, we get the eigenvalue problem \begin{equation}\label{eigen-sol} L_s v = \tilde \omega^2 v, \end{equation} where \begin{equation}\label{Ls} L_s=-\frac{A_s e^{-\delta_s}}{\sin^2{\!x}}\,\partial_x\left(A_s e^{-\delta_s} \sin^2{\!x}\, \partial_x\right)+ A_s e^{-2\delta_s} U \end{equation} and \begin{multline} U = 1+(3\cos^2{\!x}-1) B_s + 4 \sin^2{\!x}\, (2-\sin^2{\!x}) f_s^2 \\ + \sin{x} \cos{x} \,(8 \sin^2{\!x}-4) f_s f_s' - \cos^2{\!x} \,(2+4 \sin^2{\!x}) f_s'^2 \\ + 8 \sin^3{\!x} \cos^3{\!x} f_s^3 f_s'- 4 \sin^4{\!x} \cos^2{\!x} f_s^4 - 4 \sin^2{\!x} \cos^4{\!x} f_s^2 f_s'^2\,. \end{multline} For $b$ slightly above $b_*$ (i.e. for small $c$), we have \begin{equation}\label{P} L_s=L+c^2 P +\mathcal{O}(c^4), \end{equation} where the operator $P$ can be calculated using the expansions \eqref{pert}. To calculate the perturbations of eigenvalues we assume the following ansatz \begin{equation}\label{pert-ansatz} v_n=c v_n^* + c^3 u_n + \mathcal{O}(c^5),\quad \tilde\omega_n^2={\omega_n^*}^2+\gamma_n c^2+\mathcal{O}(c^4),\quad b=b_*+b_2 c^2+\mathcal{O}(c^4), \end{equation} where ${\omega_n^*}^2$ and $v_n^*$ are the eigenvalues and normalized eigenfunctions of the operator $L$ at the bifurcation point and $b_2$ is given in \eqref{b2}. Substituting this ansatz into the Robin boundary condition we get at the first and third order in $c$ \begin{equation}\label{robin-pert} {v_n^*}'(\pi/2)=b_* v_n^*(\pi/2),\qquad u_n'(\pi/2)=b_* u_n(\pi/2) + b_2 v_n^*(\pi/2)\,. \end{equation} Substituting the ansatz \eqref{pert-ansatz} into \eqref{eigen-sol}, we get at the third order in $c$ \begin{equation}\label{c3} L u_n + P v_n^*={\omega_n^*}^2 u_n+\gamma_n v_n^*\,. \end{equation} Projecting this equation on $v_n^*$ and noting, via \eqref{robin-pert}, that \begin{equation}\label{parts} (v_n^*, L u_n)=({v_n^*}' u_n-v_n^* u_n')\vert_{x=\frac{\pi}{2}}+(u_n,L v_n^*)=-b_2 {v_n^*}^2(\pi/2)+{\omega_n^*}^2 (u_n,v_n^*), \end{equation} we obtain the leading order approximation for the eigenvalues \begin{equation}\label{born} \tilde \omega_n^2(c)\approx {\omega_n^*}^2 + \gamma_n c^2, \qquad \gamma_n=(v_n^*,Pv_n^*)-b_2 {v_n^*}^2(\pi/2). \end{equation} % In particular, for the lowest eigenvalue we obtain \begin{equation}\label{omega0} \tilde\omega_0^2 \approx \gamma_0 c^2, \end{equation} where \begin{equation}\label{gamma0} \gamma_0=32 \log{2} -2 +\frac{1}{\pi^2} \left(12-144 \zeta(3)\right)\approx 3.8582. \end{equation} The positivity of $\gamma_0$ confirms the expectation that the solitons are linearly stable near the bifurcation point. Solving the eigenvalue problem numerically, we find that the eigenvalues $\tilde \omega_n^2$ grow monotonically with $c$. The numerical values of the first few eigenfrequencies (as measured by the central observer) for a small parameter $c=0.1$ (corresponding to $b\approx0.6467$) are displayed in Table~1. \begin{table}[h] \centering \begin{tabular}{|c|cccccc|} \toprule $n$ & 0 & 1 & 2 & 3 & 4 & 5\\ \midrule $\tilde \omega_n$ & 0.19735 & 2.87065 & 4.93028 & 6.95714 & 8.97363 & 10.98549 \\ $\tilde \omega_n^{pert}$ & 0.19642 & 2.87062 & 4.93025 & 6.95711 & 8.97360 & 10.98546 \\ \bottomrule \end{tabular} \vskip 1ex \caption{\small{The first six eigenfrequencies of linear perturbations around the soliton for the parameter $c=0.1$. In the second row the approximate eigenfrequencies given by \eqref{born} are shown for comparison.}} \label{tab:Eigenfrequencies} \end{table} \noindent From the leading order WKB approximation \cite{bo} it follows that for large $n$ \begin{equation}\label{large_n} \tilde \omega_n = \frac{2n+1}{a} + \mathcal{O}\left(\frac{1}{n}\right),\qquad a=\frac{2}{\pi}\int_0^{\pi/2} A_s^{-1} e^{\delta_s} dx, \end{equation} which compares well with numerical results even if $n$ is not very large. \section{Discussion} The Einstein-Klein-Gordon-AdS system with mass $\mu^2=\frac{2}{3} \Lambda<0$ is well-behaved at the conformal boundary which makes it a good toy model for studying the role of boundary conditions in dynamics of asymptotically AdS spacetimes~\cite{f5}. In this paper we focused on the Robin boundary conditions and proved existence of a one-parameter family of solitons for $b>b_*$. We also demonstrated that the linearized perturbations around these solitons have no growing modes. A natural question is: are the AdS Robin solitons nonlinearly stable? Numerical simulations, to be reported in \cite{mm}, indicate a positive answer and provide evidence for existence of plethora of time-periodic and quasiperiodic solutions, not only in the perturbative regime (which is expected in view of the non-resonant spectrum) but also, somewhat surprisingly, for large perturbations. Of course, the analogous question of nonlinear stability arises for the AdS spacetime for $b<b_*$. However here, in contrast to the Dirichlet case \cite{br}, the numerical simulations are as yet not conclusive and we leave this question to future investigations. \subsection*{Acknowledgements.} We thank Piotr Chru\'sciel, Oleg Evnin, Helmut Friedrich and Arthur Wasserman for helpful remarks. This work was supported in part by the Polish National Science Centre grant no.\ 2017/26/A/ST2/00530. PB and MM acknowledge the support of the Alexander von Humboldt Foundation.
\section{Introduction} The revival of neural networks in the paradigm of deep learning \cite{LeCunBH15:DeepLearning} has stimulated intense interest in understanding the networking of deep neural networks, e.g., \cite{Tishby17:IB-deepLearning,ZhangBHRV16:rethinkingGeneralization}. Among various efforts, an information-theoretic approach, information bottleneck (IB) \cite{Tishby99} stands out as a fundamental tool to theorize the learning of deep neural networks \cite{Tishby17:IB-deepLearning,michael2018on,DBLP:conf/icml/DaiZGW18}. Under the IB principle, the core of learning a neural network classifier is to find a representation $T$ of the input example $X$, that contains as little information as possible about $X$ and as much information as possible about the label $Y$. The conflict between these two requirements can be formulated as a constrained optimization problem in which one requirement is implemented as the objective function and another requirement as the constraint~\cite{Tishby03:IBratedistortion,Tishby99,Tishby10:IB-LearningGeneralization}. In this paper, we call this problem {\it IB learning}. A key observation that has inspired this work is that the optimization formulation of IB learning resembles greatly the rate-distortion function in rate-distortion theory, i.e., the theory for quantizing signals~\cite{Shannon59:rateDistortion}. A careful investigation along this direction indeed reveals that, conceptually, there is an unconventional quantization problem that is closely related to IB learning. To that end, we formulate this problem, which we refer to as {\it IB quantization}. We prove that the objective of IB quantization, namely, designing quantizers that achieve the rate-distortion limit, is equivalent to the objective of IB learning. This result establishes an equivalence between the two problems. In rate-distortion theory, it is well known that scalar quantizers, which quantize signals one at a time, are in general inferior to vector quantizers, which quantize multiple signals at once. The discovered equivalence between IB learning and IB quantization then suggests that IB learning may benefit from a ``vector quantization'' approach, in which the representations of multiple inputs are learned jointly. Exploiting variational techniques and the recently proposed mutual information neural estimation (MINE) method \cite{belghazi2018mine}, we show that such a vector quantization approach to IB learning naturally results in a novel framework for learning neural network classifiers. We call this framework {\it Aggregated Learning (AgrLearn)}. Briefly, in AgrLearn, $n$ random training objects are aggregated into a single amalgamated object and passed to the model; the model predicts the soft labels for all $n$ examples jointly. The training of an AgrLearn model is carried out by solving a min-max optimization problem, derived a variational relaxation of the IB learning problem and a MINE approximation of mutual information. We conducted extensive experiments, applying AgrLearn to the current art of deep learning architectures for image and text classification. Our experimental results suggest that AgrLearn brings significant gain in classification accuracy. In practice, AgrLearn can be easily integrated into existing neural network architectures \footnote{Our implementation of AgrLearn is available at https://github.com/SITE5039/AgrLearn}. The proofs of theoretical results are provided in Appendices section. \section{Information Bottleneck Learning} The overall context of this work is a classification setting, where we let $\mathcal{X}$ denote the space of objects to be classified and $\mathcal{Y}$ denote the space of class labels. Assume that the objects and labels are distributed according to an unknown distribution $p_{XY}$ on $\mathcal{X}\times \mathcal{Y}$, where instead we are given a set $\mathcal{D} := \{(X_1, Y_1), \dots, (X_N,Y_N)\}$ of i.i.d samples from $p_{XY}$. The objective of learning here is to find a classifier from ${\cal D}$ that classifies $X$ into its label $Y$. Central to this classification problem is arguably the following representation learning problem: Find a representation of $X$ that only contains the information about $X$ relevant to its class label $Y$. Such a problem can be naturally formulated using the information bottleneck principle~\cite{Tishby99} and will be referred to as the {\em Information Bottleneck (IB) learning} problem. In IB learning, one is interested in learning a representation $T$ of $X$ in some space $\mathcal{T}$ such that the mutual information $I(X; T)$ between $X$ and $T$ is as small as possible whereas the mutual information $I(Y; T)$ between $T$ and the class label $Y$ is as large as possible. Such a representation is sensible since it aims at squeezing away all information in $X$ that is irrelevant to the classification task while keeping the relevant information intact. Intuitively, minimizing $I(X; T)$ forces the model not to over-fit to the irrelevant features of $X$, whereas maximizing $I(Y; T)$ extracts all features useful for the classification task. The two optimization objectives are in conflict with each other. A natural formulation to the IB learning problem is to consider one objective as the optimization objective and the other as a constraint. This gives rise to the following constrained optimization problem, subject to the Markov chain $Y$---$X$---$T$, find \begin{equation} \widehat{p}_{T|X} = \arg \min _{p_{T|X}:I(X;T)\leq A} -I(Y;T), \label{eq:IB2} \end{equation} for a nonnegative value $A$, or equivalently, \begin{equation} \widehat{p}_{T|X} = \arg \min _{p_{T|X}:I(Y;T)\geq A'} I(X;T), \label{eq:IB1} \end{equation} for a nonnegative value $A'$. The Markov chain assumption ensures that any information in feature $T$ about label $Y$ is obtained from $X$ only. For later use, we denote the minimum mutual information in \eqref{eq:IB1} as $R_{\rm IBL}(A')$, i.e., \begin{equation} R_{\rm IBL}(A') = \min _{p_{T|X}:I(Y;T)\geq A'} I(X;T). \label{eq:RIB} \end{equation} We note that solving this IB learning problem, i.e., obtaining the optimal $\widehat{p}_{T|X}$ and its corresponding bottleneck representation $T$ does not automatically solve the classification problem. It is still required to build a classifier that predicts the class label $Y$ based on the representation $T$ of $X$. Nonetheless later in this paper, we will show that solving a variational approximation of the IB learning problem may, in fact, provide a direct solution to the classification problem of interest. \section{Information Bottleneck Quantization} We now formulate the {\em Information Bottleneck (IB) quantization problem}. Our objective in this section is to show that the IB quantization and IB learning problems are equivalent. Let $(X_1,Y_1),(X_2,Y_2),\dots,(X_n,Y_n)$ be drawn i.i.d from $p_{XY}$. The sequences $(X_1,X_2,\cdots, X_n)$ and $(Y_1,Y_2,\cdots, Y_n)$ are denoted by $X^n$ and $Y^n$, respectively. An $(n,2^{nR})$ {\it IB-quantization code} is a pair $(f_n,g_n)$ in which $f_n$ maps each sequence $X^n$ to an integer in $\lbrace 1, 2, \cdots, 2^{nR} \rbrace$ and $g_n$ maps an integer in $\lbrace 1, 2, \cdots, 2^{nR} \rbrace$ to a sequence $T^n:=(T_1,T_2,\cdots,T_n) \in {\mathcal T}^n$. Using the standard nomenclature in quantization, the quantity $R$ is referred to as the {\it rate} of the code and $n$ as the {\it length} of the code. Using this code, $f_n$ encodes the sequence $X^n$ as the integer $f_n(X^n)$ and $g_n$ reconstructs $X^n$ as a representation $T^n := g_n(f_n(X^n))$. Unlike standard quantization problems, the IB quantization problem uses a distortion measure that may depend on the code. To that end, for any $x \in \mathcal{X}$, $t \in \mathcal{T}$ and any two conditional distributions $q_{Y|X}$ and $q_{Y|T}$, define \begin{equation} d_{\rm IB}(x,t;q_{Y|X},q_{Y|T}) := \text{KL}(q_{Y|X}(.|x)\Vert q_{Y|T}(.|t)), \end{equation} where $\text{KL}(.\Vert .)$ is the Kullback--Leibler (KL) divergence. Note that the code $(f_n,g_n)$, together with $p_{XY}$, induce a joint distribution over the Markov chain $Y^n$---$X^n$---$T^n $. Under this joint distribution the conditional distributions $p_{Y_i |X_i}$ and $p_{Y_i |T_i}$ are well defined for each $i=1,2,...,n$. Hence, given the code $(f_n, g_n)$ and for any two sequences $x^n\in \mathcal{X}^n$ and $t^n\in \mathcal{T}^n$, their {\it IB distortion} is defined as: \begin{equation} \overline{d}_{\rm IB}(x^n,t^n) := \frac{1}{n}\sum_{i=1}^n d_{\rm IB}(x_i,t_i;p_{Y_i|X_i},p_{Y_i|T_i}), \end{equation} We note that the quantity $\overline{d}_{\rm IB}(x^n,t^n)$ measures a ``loss of information about $Y$'' when the code $(f_n, g_n)$ is used to represent $x^n$ as $t^n$. Specifically, consider the source coding problem of compressing $Y^n$ based on observing $X^n=x^n$. If the conditional distribution $p_{Y_i|X_i}(\cdot|x_i)$ for each $i$ is mistaken as $p_{Y_i|T_i}(\cdot|t_i)$ in the design of the source code, the average additional coding overhead per $Y$-symbol is precisely $\overline{d}_{\rm IB}(x^n,t^n)$. Using this distortion measure, the {\it IB quantization problem} is to find a code $(f_n,g_n)$ having the smallest rate $R$ subject to the constraint $\mathbb{E}\overline{d}_{\rm IB}(X^n,T^n)\leq D$, where $\mathbb{E}$ denotes expectation. For given $p_{XY}$ and $\mathcal{T}$, a rate distortion pair $(R,D)$ is called {\em achievable} if $\mathbb{E}\overline{d}_{\rm IB}(X^n,T^n)\leq D$ for some sequence of $(f_n,g_n)$ codes. As usual, the {\it rate-distortion} function for the IB quantization problem, which we denote by $R_{\rm IBQ}(D)$, is defined as the smallest rate $R$ such that $(R,D)$ is achievable. \begin{thm} \label{th:rate-distortion} Given $p_{XY}$ and $\mathcal{T}$, the rate-distortion function for the IB quantization problem can be written as \begin{equation} R_{\rm IBQ}(D) = \min_{p_{T|X}: \mathbb{E}d_{\rm IB}(X,T)\leq D} I(X;T) \label{eq:rd} \end{equation} where the expectation is defined as \[ \mathbb{E} d_{\rm IB}(X,T) :=\sum_{x,t} d_{\rm IB}(x,t; p_{Y|X}, p_{Y|T}) p_{XT}(x,t). \] \end{thm} This theorem provides a limit on the achievable rates of the IB quantization problem. We note that this result was first shown in \cite{Tishby03:IBratedistortion}. However in \cite{Tishby03:IBratedistortion}, the result relies on the assumption that $|\mathcal{T}| \geq |\mathcal{X}|+2$, whereas in this theorem the condition is removed. The form of the rate-distortion function $R_{\rm IBQ}$ for the IB quantization problem given in Theorem \ref{th:rate-distortion} resembles greatly the optimal objective of IB learning $R_{\rm IBL}$ in \eqref{eq:RIB}. More precisely, we have \begin{thm} $R_{\rm IBL}(A')= R_{\rm IBQ}(I(X;Y)-A')$ \end{thm} \noindent {\em Proof:} We have \begin{eqnarray*} \mathbb{E} d_{\rm IB}(X,T) & :=&\sum_{x,t} d_{\rm IB}(x,t; p_{Y|X}, p_{Y|T}) p_{XT}(x,t) \\ & =& I(X;Y) - I(Y;T) \end{eqnarray*} where the second equality is by the definition of $d_{\rm IB}$ and the Markov chain $Y$---$X$---$T$ assumption. Hence, we may rewrite (\ref{eq:rd}) in Theorem \ref{th:rate-distortion} as \begin{eqnarray*} R_{\rm IBQ}(D) & = & \min_{p_{T|X}: I(X;Y) - I(Y;T)\leq D} I(X;T) \\ & = & \min_{p_{T|X}: I(Y;T) \geq I(X;Y) - D} I(X;T) \\ & = & R_{\rm IBL}(I(X;Y) - D) \end{eqnarray*} The theorem follows by substituting $A':=I(X;Y) - D$. \hfill $\Box$ This theorem relates the IB learning and IB quantization problems, where we note that $I(X; Y)$ is a constant that only depends on $p_{XY}$. By this theorem, solving the IB learning problem where the information about $Y$ contained in $T$ needs to be no less than $A'$ is equivalent to solving the IB quantization problem so that the distortion is no more than $I(X; Y) - A'$. \section{Variational Approach to IB Learning} Having established the equivalence between IB learning and IB quantization, we now turn to solve the IB learning problem. The objective of this section is to develop a variational approach to this problem which not only provides a bottleneck representation $T$ for $X$ but also leads to a classifier for the classification problem at hand. We note that the results presented in this section also underlies the ``variational information bottleneck'' approach of \cite{DVIB:AlemiFD016}. We first establish the following result. \begin{thm} \label{th:varitionalbound} Under any distribution $p_{YXT}$ that satisfies the Markov chain $Y$---$X$---$T$, we have \begin{equation} I(Y; T) \ge \mathbb{E}_{(x,y)\sim p_{XY}, \atop{t\sim p_{T|X}(\cdot|x)} } \log q_{Y|T}(y|t) +H(Y) \end{equation} for any conditional distribution $q_{Y|T}$ of a random variable on ${\cal Y}$ conditioned on $T$. In addition, the above inequality holds with equality if and only if $q_{Y|T}$ is equal to $p_{Y|T}$. \end{thm} As a consequence of this theorem, the mutual information $I(Y;T)$ can be written as \begin{eqnarray*} I(Y; T) = \max_{q_{Y|T}}& \mathbb{E}_{(x,y)\sim p_{XY}, \atop{t\sim p_{T|X}(\cdot|x)} } \log q_{Y|T}(y|t) +H(Y). \end{eqnarray*} Substituting this in the IB learning problem as formulated in (\ref{eq:IB2}), we have \begin{align*} \widehat{p}_{T|X} &= \arg\min _{p_{T|X}:I(X;T)\leq A} -I(Y;T) \\ &= \arg \min _{p_{T|X}:\atop{I(X;T)\leq A} } \left\{ - \max_{q_{Y|T}} \mathbb{E}_{ \kern -.5em (x,y)\sim p_{XY},\atop{t\sim p_{T|X}(\cdot|x)} } \log q_{Y|T}(y|t) \right\} \\ &= \arg\min _{p_{T|X}:\atop{I(X;T)\leq A} } \min_{q_{Y|T}} \left\{ -\mathbb{E}_{\kern-.5em (x,y)\sim p_{XY}, \atop{t\sim p_{T|X}(\cdot|x)} } \log q_{Y|T}(y|t) \right\} \end{align*} Now suppose we have a neural network representing the mapping $p_{T|X}$ and that we represent $q_{Y|T}$ using another network. Then we may construct an overall network by concatenating the two networks. Specifically, each object $x$ will be first passed to the network $p_{T|X}$, and the output $T$ of the network is passed to the network $q_{Y|T}$. If the true class label $y$ is modeled as being generated from this concatenated network, it is easy to see that the cross-entropy loss $\ell_{\rm CE}$ of the network is the expectation above, i.e., \begin{align} \ell_{\rm CE} = -\mathbb{E}_{(x,y)\sim p_{XY}, t\sim p_{T|X}(\cdot|x)} \log q_{Y|T}(y|t). \label{eqq:lce} \end{align} In other words, the IB learning problem can be formulated as solving the following optimization problem: \begin{equation} \min_{p_{T|X}, q_{Y|T}} \ell_{\rm CE}\left(p_{T|X}, q_{Y|T}\right) ~{\rm subject~ to~} I(X;T)\leq A \end{equation} Hence, introducing a Lagrange multiplier, subsequently we will focus on the following unconstrained problem \begin{equation} \label{eq:variationForm} \min_{p_{T|X}, q_{Y|T}} \ell_{\rm CE}\left(p_{T|X}, q_{Y|T}\right) + \alpha I(X;T) \end{equation} for nonnegative $\alpha$. An apparent advantage of this approach to IB learning is that when the optimization problem (\ref{eq:variationForm}) is solved, not only is the bottleneck representation $T$ found, but also the entire classification network is obtained. It is worth noting that the variational formulation (\ref{eq:variationForm}) of IB learning can be viewed as a generalization of learning with standard neural networks under the cross-entropy loss. Specifically, learning with standard neural networks is a reduction of (\ref{eq:variationForm}) in which the standard neural network contains no term $ \alpha I(X;T)$, or equivalently has $\alpha=0$. The generalization of learning with standard neural networks to the formulation of IB learning in (\ref{eq:variationForm}) is arguably beneficial in two respects: \begin{enumerate} \item The $\alpha I(X; T)$ regularization term in (\ref{eq:variationForm}) serves to control the model complexity so as to reduce the generalization gap. \item Generalizing the deterministic map from $X$ to $T$ in standard neural networks to a stochastic one in (\ref{eq:variationForm}) minimizes the cross-entropy loss $\ell_{\rm CE}$ over a larger space; this potentially allows further decrease of $\ell_{\rm CE}$, thereby achieving better classification accuracy. We note that the ``Deep Variational Information Bottleneck'' (DVIB) approach of \cite{DVIB:AlemiFD016}, not necessarily motivated by the same reason, uses the same variational bound of $I(Y; T)$ and arrives at the same formulation as (\ref{eq:variationForm}). \end{enumerate} In the remainder of this paper, we present a new strategy, termed ``Aggregated Learning'', to implement the IB learning formulation (\ref{eq:variationForm}). \section{Aggregated Learning (AgrLearn)} We now introduce the Aggregated Learning (AgrLearn) framework for learning with neural networks. We will stay with the IB learning formulation of (\ref{eq:variationForm}) while keeping in mind that it results from a variational approximation of the formulation in (\ref{eq:IB2}). Recall from Theorem \ref{th:rate-distortion} that the IB learning problem is equivalent to the IB quantization problem. In the classical rate-distortion theory \cite{Shannon59:rateDistortion}, it is well known that in order to achieve the rate-distortion limit of quantization, in general, one must consider the use of {\em vector quantizers}. In the context of IB quantization, a {\em vector quantizer} is an IB-quantization code $(f_n, g_n)$ with $n>1$ whereas a scalar quantizer is an IB-quantization code $(f_n, g_n)$ with $n=1$. From rate-distortion theory, better quantizers result from using quantization codes with larger length $n$. In particular, in order to achieve the rate-distortion function, it is in general required that the length $n$ of the rate-distortion code be made asymptotically large. Note that a scalar IB-quantization code $(f_1, g_1)$ maps $X$ to $T$ by \[ T=g_1(f_1(X)):=(g_1\circ f_1)(X). \] Under the equivalence between IB quantization and IB learning, the mapping $g_1\circ f_1$ induced by the scalar quantizer $(f_1, g_1)$ essentially defines a conditional distribution $p_{T|X}$ in IB learning, which simply reduces to the deterministic function $g_1\circ f_1$. On the other hand, in learning with a standard neural network, the deterministic mapping, say $h$, from the input space ${\cal X}$ to the bottleneck space ${\cal T}$ (which could refer to the space of feature representation at any intermediate layer of the network), can be regarded as implementing a scalar IB-quantization code $(f_1, g_1)$ with \[ g_1\circ f_1=h. \] The superiority of vector quantizers to scalar quantizers then motivates us to develop a vector-quantization approach to IB learning, which we call Aggregated Learning or AgrLearn in short. -- Like a vector quantizer, which quantizes $n$ signals simultaneously, AgrLearn classifies $n$ input objects jointly at the same time, the details of which are given below. The framework of AgrLearn consists of two networks, which we refer to as the ``main network'' and the ``regularizing network'' respectively. \subsection{The Main Network} The main network takes as its input the concatenation of $n$ objects $(X_1, X_2, \ldots, X_n):=X^n$. Such a concatenated input will be referred to as an ``$n$-fold aggregated input''. The main network consists of two parts, as seen in Figure \ref{fig:Agrlearn}. The first part, or the ``pre-bottleneck'' part, implements a deterministic mapping $h:{\cal X}^n \rightarrow {\cal T}^n$ that maps an aggregated input $X^n$ to an ``aggregated bottleneck'' $T^n$ via \begin{equation} T^n:= (T_1, T_2, \ldots, T_n):= h(X^n). \end{equation} The second part, or the ``post-bottleneck'' part, implements a stochastic mapping $q_{Y^n|T^n}$ from ${\cal T}^n$ to ${\cal Y}^n$ that factorizes according to \begin{equation} \label{eq:postbot} q_{Y^n|T^n}(y^n|t^n) : = \prod_{i=1}^n q_{Y_i|T^n}(y_i|t^n)\\ \end{equation} Overall the main network expresses a stochastic mapping from ${\cal X}^n$ to ${\cal Y}^n$, which can be expressed as \begin{equation} \label{eq:agrLearnNet_main} q_{Y^n|X^n}(y^n|x^n): = \prod_{i=1}^n q_{Y_i|T^n}(y_i|h(x^n))\\ \end{equation} On the main network as specified by (\ref{eq:agrLearnNet_main}), define \begin{equation} \label{eq:agrLearn_CEloss} \ell_{\rm CE}^{(n)} : = -\mathbb{E}_{x^ny^n\sim p_{XY}^{\otimes n}} \log q_{Y^n|X^n}(y^n|x^n) \end{equation} where $p_{XY}^{\otimes n}$ is the distribution on $\left({\cal X}\times {\cal Y}\right)^n$ induced by drawing $n$ samples i.i.d. from $p_{XY}$. Clearly $\ell_{\rm CE}^{(n)}$ is nothing more than the cross-entropy loss of the network's predictive distribution $q_{Y^n|X^n}$ for the aggregated input $X^n$ with respect to their labels $Y^n$. As we will be minimizing this cross-entropy loss function, we next discuss its properties. Following Theorem \ref{th:varitionalbound}, \begin{equation} \ell^{(n)}_{\rm CE} \ge nH(Y) -I(Y^n; T^n). \end{equation} and if the post-bottleneck network component $q_{Y^n|T^n}$ has sufficient capacity, then \[ \min_{q_{Y^n|T^n}} \ell_{\rm CE}^{(n)} = n H(Y) - I (Y^n; T^n) \] That is if the post-bottleneck component has sufficient capacity, then minimizing $\ell_{\rm CE}^{(n)}$ over the entire main network also maximizes $I(Y^n; T^n)$. \subsection{The Regularizing Network} The regularizing network is essentially a mutual information neural estimator (MINE) network \cite{belghazi2018mine}, which serves to estimate $I(X; T)$ and penalizes it during the training of the main network. For a careful development of MINE, the reader is referred to \cite{belghazi2018mine}. Here we only give a brief description. \noindent {\bf MINE in a Nutshell} Suppose that ${\cal U}$ and ${\cal V}$ are two spaces and that there is a joint distribution $p_{UV}$ on ${\cal U} \times {\cal V}$ defining a pair $(U, V)$ of random variables. Suppose that we can perform i.i.d. sampling of $p_{UV}$ and we wish to estimate the mutual information $I(U; V)$ from the samples. In the framework of MINE, a family $\Gamma$ of functions is constructed as a neural network, where each $\gamma\in \Gamma$ is a function mapping ${\cal U}\times {\cal V}$ to the set ${\mathbb R}$ of real numbers. Then due to dual representation of KL divergence~\cite{donsker1983asymptotic}, the mutual information $I(U; V)$ can be estimated as \begin{align} \begin{split} \label{eq:MINE_theory} \widehat{I}(U;V) :=& \max_{\gamma \in \Gamma} \lbrace {\mathbb E}_{(u, v)\sim p_{UV}} \gamma(u, v) \\ & - \log {\mathbb E}_{(u, v)\sim p_U\otimes p_V} \exp \left( \gamma(u, v) \right) \rbrace \end{split} \end{align} We will denote the term that gets maximized in (\ref{eq:MINE_theory}) by $J(U, V; \gamma)$, namely, \begin{align} \begin{split} J(U, V; \gamma): =& {\mathbb E}_{(u, v)\sim p_{UV}} \gamma(u, v)\\ & - \log {\mathbb E}_{(u, v)\sim p_U\otimes p_V} \exp \left( \gamma(u, v) \right) \end{split} \end{align} and re-express $\widehat{I}(U; V)$ as \[ \widehat{I}(U; V) = \max_{\gamma\in \Gamma} J(U, V; \gamma) \] As usual, practical computation of $J(U, V; \gamma)$ exploits Monte-Carlo approximation based on samples drawn from $p_{UV}$. A natural way to apply MINE to the estimation of $I(X; T)$ in AgrLearn is taking ${\cal U}:={\cal X}^n$, ${\cal V}:={\cal T}^n$, $U=X^n$, $V=T^n$. This allows us to estimate $I(X^n; T^n)$ by \begin{equation} \widehat{I}(X^n; T^n) = \max_{\gamma \in \Gamma} J(X^n, T^n; \gamma) \end{equation} where $T^n$ is computed by the pre-bottleneck component of the main network with $X^n$ as its input. We may then take $\widehat{I}(X^n; T^n)$ as an approximation of $n I(X; T)$. The network implementing the computation of $J(X^n, T^n; \gamma)$ is referred to as the regularizing network. \begin{algorithm} \caption{ Training in $n$-fold AgrLearn} \label{algo:trainAgrLearn} \begin{algorithmic}[0] \State Initialize $h, q_{Y^n|T^n}$, and $\gamma$\; \While{not stop training} \State Draw $m\times n$ examples to form a batch of $m$ $n$-fold aggregated examples $\left\{x^n_{(1)}, x^n_{(2)}, \ldots, x^n_{(m)}\right\}$\; \For {$k=1$ \textbf{\rm to } $K$} \For { $i=1$ \textbf{\rm to} $m$} \State $t^n_{(i)}:=h(x^n_{(i)})$ \EndFor \State Select a random permutation $\tau$ on $\{1, 2, \ldots, m\}$\; \State Forward compute $J:=\frac{1}{m}\sum\limits_{i=1}^m \gamma(x^n_{(i)}, t^n_{(i)}) - \phantom{mmmmmmmmmmm} \log \frac{1}{m}\sum\limits_{i=1}^m \exp \left( \gamma(x^n_{(i)}, t^n_{(\tau(i))}) \right)$\; \State $\gamma \gets \gamma + \lambda_{\rm in} \cdot \frac{\partial J}{\partial \gamma}$\; \EndFor \State Select a random permutation $\tau$ on $\{1, 2, \ldots, m\}$\; \State Forward compute $J:=\frac{1}{m}\sum\limits_{i=1}^m \gamma(x^n_{(i)}, t^n_{(i)}) - \phantom{mmmmmmmmmmm} \log \frac{1}{m}\sum\limits_{i=1}^m \exp \left( \gamma(x^n_{(i)}, t^n_{(\tau(i))}) \right)$\; \State Forward compute $\ell:= \frac{1}{m}\sum\limits_{i=1}^m \log q_{Y^n|T^n}(y^n_{(i)}|t^n_{(i)})$\; \State Compute $\Omega:= \ell + \alpha \cdot J$, \; $h \gets h - \lambda_{\rm out}\cdot \frac{\partial \Omega}{\partial h}$, and\; \State $q_{Y^n|T^n} \gets q_{Y^n|T^n} - \lambda_{\rm out}\cdot \frac{\partial \Omega}{\partial q_{Y^n|T^n}}$\; \EndWhile \end{algorithmic} \end{algorithm} \begin{figure}[t] \scalebox{0.65}{ \begin{tikzpicture}[-latex ,auto ,node distance =2 cm and 2 cm ,on grid , semithick , state/.style ={ circle ,top color =white , bottom color = cyan!60 , draw, cyan , text=blue , minimum width =0.1cm}, box/.style ={rectangle ,top color =white , bottom color = cyan!60 , draw, cyan , text=blue , minimum width =1.7cm , minimum height = 0.5cm, rounded corners}, highbox/.style ={rectangle ,top color =white , bottom color = cyan!60 , draw, cyan , text=blue , minimum width =1.7cm , minimum height = 1.6cm, rounded corners}, neuron/.style ={rectangle ,top color =white , bottom color = red!20 , draw, red , text=red , minimum width =2.6cm , minimum height = 3.6cm, rounded corners}, triangle/.style = {top color =white , bottom color = cyan!60 , draw, cyan , text=blue, regular polygon, regular polygon sides=3, minimum size=0.5cm, draw }, node rotated/.style = {rotate=270}, border rotated/.style = {shape border rotate=270}] \node[](realcenter){}; \node[](center)[above=0.2cm of realcenter]{}; \node[highbox](cnn)[above=0.5cm of center]{$h$}; \node[state](sold)[left=2.5cm of cnn]{}; \path (sold) edge [] node[]{$X^n$} (cnn); \node[](lcenter0)[left=0.5cm of sold]{}; \node[](lcenter1)[above=1.5cm of lcenter0]{}; \node[](lcenter2)[above=0.75cm of lcenter0]{}; \node[](lcentern)[below=1.5cm of lcenter0]{}; \node[](lcenter11)[left=2.25cm of lcenter1]{$X_1$}; \node[](lcenter21)[left=2.25cm of lcenter2]{$X_2$}; \node[][left=2.25cm of lcenter0]{$\vdots$}; \node[](lcentern1)[left=2.25cm of lcentern]{$X_n$}; \draw [->] (lcenter11) to [out=0,in=180] (sold); \draw [->] (lcenter21) to [out=0,in=180] (sold); \draw [->] (lcentern1) to [out=0,in=180] (sold); \node[highbox](snew)[right=3.5cm of cnn]{$q_{Y^n|T^n}$}; \node[](rcenter0)[right=2.5cm of snew]{}; \node[](rcenter1)[above=1.5cm of rcenter0]{}; \node[](rcenter2)[above=0.75cm of rcenter0]{}; \node[](rcentern)[below=1.5cm of rcenter0]{}; \node[](rcenter11)[right=0.5cm of rcenter1]{$q_{Y_1|X^n}$}; \node[](rcenter21)[right=0.5cm of rcenter2]{$q_{Y_2|X^n}$}; \node[](rcentern1)[right=0.5cm of rcentern]{$q_{Y_n|X^n}$}; \node[]()[right=0.5cm of rcenter0]{$\vdots$}; \path (cnn) edge [] node[]{$T^n$} (snew); \draw [->] (snew) to [out=10,in=180] (rcenter11); \draw [->] (snew) to [out=0,in=180] (rcenter21); \draw [->] (snew) to [out=-10,in=180] (rcentern1); \end{tikzpicture}} \caption{The main network in AgrLearn. The small circle denotes concatenation.} \label{fig:Agrlearn} \end{figure} \subsection{Training and Prediction} With this development, we may define an overall objective function $\Omega (h, q_{Y^n|T^n}, \gamma)$ as \begin{equation} \Omega (h, q_{Y^n|T^n}, \gamma):= \ell_{\rm CE}^{(n)} + \alpha J(X^n, T^n; \gamma) \label{eq:loss} \end{equation} where we note that the term $\alpha J(X^n, T^n; \gamma)$ also depends on $h$ implicitly. The above development then suggests that solving the IB learning problem in the form of (\ref{eq:variationForm}) can be approximated by solving the following min-max problem: \begin{equation} \label{eq:minMax} \min_{h, q_{Y^n|T^n}} \max_{\gamma} \Omega (h, q_{Y^n|T^n}, \gamma) \end{equation} In the training of AgrLearn, mini-batched SGD can be used to solve the above min-max problem. The training algorithm is given in Algorithm \ref{algo:trainAgrLearn}. In the prediction phase, ``Replicated Classification" protocol is used\footnote{Two additional protocols were also investigated. {\it Contextual Classification}: For each object $X$, $n-1$ random examples are drawn from the training set $\mathcal{D_\mathcal{X}}$ and concatenated with $X$ to form the input; the predictive distribution for $X$ generated by the model is then retrieved. This process is repeated $k$ times, and the average of the $k$ predictive distribution is taken as the label predictive distribution for $X$. {\it Batched Classification}: Let $\mathcal{D^{\text{test}}_\mathcal{X}}$ denote the set of all objects to be classified. In Batched Classification, $\mathcal{D^{\text{test}}_\mathcal{X}}$ are classified jointly through drawing $k$ random batches of $n$ objects from $\mathcal{D^{\text{test}}_\mathcal{X}}$. The objects in the $i^{th}$ batch $B_i$ are concatenated to form the input and passed to the model. The final label predictive distribution for each object $X$ in $\mathcal{D^{\text{test}}_\mathcal{X}}$ is taken as the average of the predictive distributions of $X$ output by the model for all batches $B_i$'s containing $X$. Since we observe that all three protocols result in comparable performances, all results reported in the paper are obtained using the Replicated Classification protocol.}. Each object $X$ is replicated $n$ times and concatenated to form the input. The average of $n$ predictive distributions generated by the model is taken as the label predictive distribution for $X$. \section{Experimental Studies} We evaluate AgrLearn with deep network architectures such as ResNet for classification tasks in both image and natural language domains. Standard benchmarking datasets are used. We use mini-batched backprop for 400 epochs\footnote{Here an epoch refers to going over $N$ aggregated training examples, where $N = |\mathcal{D}_\mathcal{X}|$.} with exactly the same hyper-parameter settings without dropout. Specifically, weight decay is $10^{-4}$, and each mini-batch contains 64 aggregated training examples. The learning rate for the main network is set to 0.1 initially and decays by a factor of $10$ after $100$, $150$, and $250$ epochs. Each reported performance value (error rate or accuracy) is the median of the performance values obtained in the final 10 epochs by averaging that value over running the same setting 7 times. \subsection{Image Recognition} Experiments are conducted on the \textbf{CIFAR-10}, \textbf{CIFAR-100} datasets with two widely used deep network architectures, namely ResNet~\cite{he2016identity} and WideResNet~\cite{zagoruyko2016wide}. The \textbf{CIFAR-10} dataset has 50,000 training images, 10,000 test images, and 10 image classes, and the \textbf{CIFAR-100} dataset is similar to CIFAR-10 but with 100 classes. We apply AgrLearn to the 18-layer and 34-layer Pre-activation ResNet (\textit{ResNet-18} and \textit{ResNet-34})~\cite{he2016identity} as implemented in~\cite{liu17}, and the 22-layer WideResNet (\textit{WideResNet-22-10})~\cite{zagoruyko2016wide} as implemented in~\cite{Zagoruyko/code}. The resulting AgrLearn model differs from original ResNet and WideResNet in its $n$ parallel soft-max layers in post-bottleneck part(as opposed to the single soft-max layer in ResNet and WideResNet) and the number of filters in the last layer of pre-bottleneck part, which is expanded by factor $n$. This expanding by factor $n$ is required because the input dimension in AgrLearn increases significantly, and the model is required to extract joint features across individual objects in the amalgamated example. Note that fold number $1$ (fold-1) denotes the standard neural network in which just one object passes to the network and fold number greater than $1$ denotes an AgrLearn framework wherein multiple objects are aggregated and passed to the network. The quantity $\alpha$ is the coefficient of the second term in (\ref{eq:loss}), in which $\alpha=0$ corresponds to that only the cross-entropy loss is considered , and $\alpha>0$ corresponds to that the regularization network is added to the main network. \subsubsection{Predictive Performance} The prediction error rates of AgrLearn for different number of folds are shown in Tables \ref{tab:res18}, \ref{tab:wideres}, and \ref{tab:res34}. It can be seen that AgrLearn significantly boosts the performance of ResNet-18, ResNet-34 and WideResNet-22-10. For example, with respect to ResNet-18, the relative error reductions achieved by fold-2, where $\alpha=0$ are $3.74$\%, and $2.83$\% on CIFAR-10, and CIFAR-100, and where $\alpha>0$ the reductions are $3.86$\%, and $3.21$\% on CIFAR-10, and CIFAR-100 respectively. Similarly significant improvement upon ResNet-34 and WideResNet is also observed. For example, with respect to WideResNet-22-10, the relative error reductions achieved by fold-2, where $\alpha=0$, are $2.56$\%, and $3.93$\% on CIFAR-10, and CIFAR-100, and where $\alpha>0$, the reductions are $1.18$\%, and $3.89$\% on CIFAR-10, and CIFAR-100 respectively. The relative error reductions with respect to ResNet-34, achieved by fold-2, where $\alpha=0$ are $5.26$\%, and $5.16$\% on CIFAR-10, and CIFAR-100, and where $\alpha>0$, the reductions are $5.3$\%, and $6.59$\% on CIFAR-10, and CIFAR-100 respectively. \begin{table}[htb] \caption{\label{tab:res18} Test error rates (\%) of ResNet-18 and its AgrLearn counterparts on CIFAR-10, and CIFAR-100} \centering \begin{tabular}{c|cc|cc} \hline \multirow{2}{*}{\bf{Dataset}} &\multicolumn{2}{c|}{\bf fold-1} &\multicolumn{2}{c}{\bf fold-2} \\ &$\alpha = 0$ &$\alpha = 0.7$ &$\alpha = 0$ &$\alpha = 0.3$ \\ \hline CIFAR-10 & 5.08 & 4.92 & 4.89 & 4.73 \\ CIFAR-100 & 23.7 & 23.7 & 23.03 & 22.94 \\ \hline \end{tabular} \end{table} \begin{table}[htb] \caption{\label{tab:wideres} Test error rates (\%) of WideResNet-22-10 and its AgrLearn counterparts on CIFAR-10, and CIFAR-100} \centering \begin{tabular}{c|cc|cc} \hline \multirow{2}{*}{\bf{Dataset}} &\multicolumn{2}{c|}{\bf fold-1} &\multicolumn{2}{c}{\bf fold-2} \\ &$\alpha = 0$ &$\alpha = 0.7$ &$\alpha = 0$ &$\alpha = 0.3$ \\ \hline CIFAR-10 & 4.3 & 4.23 & 4.19 & 4.18 \\ CIFAR-100 & 21.13 & 21.1 & 20.3 & 20.28 \\ \hline \end{tabular} \end{table} \begin{table}[htb] \caption{\label{tab:res34} Test error rates (\%) of ResNet-34 and its AgrLearn counterparts on CIFAR-10, and CIFAR-100} \centering \begin{tabular}{c|cc|cc} \hline \multirow{2}{*}{\bf{Dataset}} &\multicolumn{2}{c|}{\bf fold-1} &\multicolumn{2}{c}{\bf fold-2} \\ &$\alpha = 0$ &$\alpha = 0.7$ &$\alpha = 0$ &$\alpha = 0.3$ \\ \hline CIFAR-10 & 4.94 & 4.91 & 4.68 & 4.65 \\ CIFAR-100 & 23.86 & 23.82 & 22.63 & 22.25 \\ \hline \end{tabular} \end{table} \subsubsection{Model Behavior During Training} The typical behavior of ResNet-18 for fold-1 and fold-4 (in terms of test error rate) across training epochs is shown in Figure \ref{fig3}. It is seen that in the ``stable phase" of training, the test error of fold-4 (black curve) continues to decrease whereas the test performance of fold-1 (red curve) fails to further improve. This can be explained by the training loss curve of fold-1 (blue curve), which drops to zero quickly in this phase and provides no training signal for further tuning the network parameters. In contrast, the training curve of fold-4 (purple curve) maintains a relatively high level, allowing the model to keep tuning itself. The relatively higher training loss of fold-4 is due to the much larger space of the amalgamated examples. Even in the stable phase, one expects that the model is still seeing new combinations of images. In other words, we argue that aggregating several examples into a single input can be seen as an implicit form of regularization, preventing the model from over-fitting by limited the number of individual examples. \begin{figure}[htb] \centering \includegraphics[width=0.9\columnwidth]{figure3} \caption{Training loss and test error on CIFAR-10.} \label{fig3} \end{figure} \begin{table}[htb] \caption{\label{tab:dobla0} Test error rates (\%) of ResNet-18 (for fold-2, $\alpha = 0.3$) and its more complex variants} \centering \begin{tabular}{c|c|c} \hline & CIFAR-10 & CIFAR-100 \\ \hline ResNet-18 & 4.73 & 22.94 \\ ResNet-18+double layer & 4.3 & 21.78 \\ ResNet-34 & 4.65 & 22.25 \\ ResNet-34+double layer & 4.45 & 21.68 \\ \hline \end{tabular} \end{table} \subsubsection{Sensitivity to Model Complexity} With fold-$n$ AgrLearn, the output label space becomes $\mathcal{Y}^n$. This significantly larger label space seems to suggest that AgrLearn favors a more complex model. In this study, we start with ResNet-18 for fold-2 and investigate the behavior of the model when it becomes more complex. The options we investigate include increasing the model width (by doubling the number of filters per layer) and increasing the model depth (from 18 layers to 34 layers). The performances of these models are given in Table \ref{tab:dobla0}. Table \ref{tab:dobla0} shows that increasing the model width with respect to ResNet-18, and ResNet-34, improves the performance of AgrLearn on both CIFAR-10 and CIFAR-100. For example, doubling the number of filters in ResNet-18 reduces the error rate for fold-2 where $\alpha$ is equal to $0.3$ from $4.73$\% to $4.3$\% on CIFAR-10, and from $22.94$\% to $21.78$\% on CIFAR-100, respectively. It also shows that increasing the model width with respect to ResNet-34 by factor 2, reduces the error rate from $4.65$\% to $4.45$\% on CIFAR-10, and from $22.25$\% to $21.68$\% on CIFAR-100. We hypothesize that with AgrLearn, the width of a model plays a critical role. This is because the input dimension in AgrLearn increases significantly and the model is required to extract joint features across individual objects in the amalgamated example. Moreover, increasing the model depth improves performance. For example, the relative error reductions from ResNet-18 to ResNet-34, where $\alpha$ is equal to $0.3$ are $1.7$\%, and $3$\% on CIFAR-10, and CIFAR-100 respectively. \subsubsection{Behavior with Respect to Fold Number} We also conduct experiments investigating the performance of ResNet-18 with varying fold number $n$. Table \ref{tab:foldno} suggests that the performance of ResNet-18 is significantly boosted by increasing the number of folds $n$. For example, the relative error reductions achieved by fold-4, where $\alpha$ is equal to $0$ are $4.72$\%, and $5.11$\% on CIFAR-10, and CIFAR-100, while the relative error reductions achieved by fold-2, are $3.74$\%, and $2.83$\% on CIFAR-10, and CIFAR-100. This shows that increasing the number of folds improves the performance of AgrLearn on both CIFAR-10 and CIFAR-100. Moreover, the relative error reductions achieved by fold-4, where $\alpha>0$ are $4.7$\%, and $5.8$\% on CIFAR-10, and CIFAR-100 respectively. \begin{table}[htb] \caption{\label{tab:foldno} Test error rates (\%) of ResNet-18 for varying fold numbers} \resizebox{.98\columnwidth}{!}{ \begin{tabular}{c|cc|cc|cc} \hline \multirow{2}{*}{\bf{Dataset}} &\multicolumn{2}{c|}{\bf fold-1} &\multicolumn{2}{c|}{\bf fold-2} &\multicolumn{2}{c}{\bf fold-4} \\ &\bf{$\alpha = 0$} &\bf{$\alpha = 0.7$} &\bf{$\alpha = 0$} &\bf{$\alpha = 0.3$} &\bf{$\alpha = 0$} &\bf{$\alpha = 4$} \\ \hline CIFAR-10 & 5.08 & 4.92 & 4.89 & 4.73 & 4.84 & 4.69 \\ CIFAR-100 & 23.7 & 23.7 & 23.03 & 22.94 & 22.49 & 22.32 \\ \hline \end{tabular} } \end{table} \subsection{Text Classification} We test AgrLearn with two widely adopted NLP deep-learning architectures, CNN and LSTM~\cite{Hochreiter:1997:LSM:1246443.1246450}, using two benchmark sentence-classification datasets, Movie Review~\cite{pang2005seeing} and Subjectivity~\cite{DBLP:conf/acl/PangL04}. Movie Review and Subjectivity contain respectively 10,662 and 10,000 sentences, with binary labels. We use 10\% of random examples in each dataset for testing and the rest for training, as explained in~\cite{DBLP:conf/emnlp/Kim14}. For CNN, we adopt CNN-sentence~\cite{DBLP:conf/emnlp/Kim14} and implement it exactly as~\cite{kim/code}. For LSTM, we just simply replace the convolution and pooling components in CNN-sentence with standard LSTM units as implemented in~\cite{Abadi:2016:TSL:3026877.3026899}. The final feature map of CNN and the final state of LSTM are passed to a logistic regression classifier for label prediction. Each sentence enters the models via a learnable, randomly initialized word-embedding dictionary. For CNN, all sentences are zero-padded to the same length. \begin{table}[htb] \caption{\label{tab:accuracy:cnn} Accuracy (\%) obtained by CNN, LSTM and their respective AgrLearn models} \centering \begin{tabular}{c|cc|cc} \hline \multirow{2}{*}{\bf{Dataset}} &\multicolumn{2}{c|}{\bf CNN} &\multicolumn{2}{c}{\bf LSTM} \\ & fold-1 &fold-2 & fold-1 & fold-2 \\ \hline Movie Review &76.1 & 79.3 & 76.2 & 77.8\\ Subjectivity &90.01 & 93.5 & 90.2 & 92.1 \\ \hline \end{tabular} \end{table} The fold-2 AgrLearn model corresponding to the CNN and LSTM models are constructed, where $\alpha$ is equal to $0$. In CNN with fold-2, the aggregation of two sentences in each input simply involves concatenating the two zero-padded sentences. In LSTM with fold-2, when two sentences are concatenated in tandem, an EOS word is inserted after the first sentence. We train and test the CNN, LSTM and their respective AgrLearn models on the two datasets, and report their performance in Table~\ref{tab:accuracy:cnn}. Clearly, the AgrLearn models improve upon their corresponding CNN or LSTM counterparts. In particular, the relative performance gain brought by AgrLearn on the CNN model appears more significant, amounting to $4.2$\% on Movie Review and $3.8$\% on Subjectivity. \section{Conclusion} Aggregated Learning, or AgrLearn, is a simple and effective neural network modeling framework, justified information theoretically. It builds on an equivalence between IB learning and IB quantization and exploits the power of vector quantization, which is well known in information theory. We have demonstrated its effectiveness through the significant performance gain it brings to the current art of deep network models. We believe that the proposal and successful application of AgrLearn in this paper signals the beginning of a promising and rich theme of research. Many interesting questions deserve further investigation. For example, how can we characterize the interaction between model complexity, fold number and sample size in AgrLearn? Additionally, the aggregation of inputs provides additional freedom in the architectural design of the network; how can such freedom be better exploited? \section{Acknowledgments} This work is supported partly by the National Natural Science Foundation of China (No. 61772059, 61421003), by the Beijing Advanced Innovation Center for Big Data and Brain Computing (BDBC). \section{Appendices} Here we give a brief review of typical sequences~\cite{orlitsky2001coding}, which will be useful in proving Theorem 1. We remark that the notion of typicality here is stronger than the widely used (weak) typicality in \cite{cover2006wiley}, and refer the interested reader to~\cite{el2011network} for a comprehensive treatment of the subject. Throughout this note, the symbol $\mathbb{E}$ will denote expectation. At some places, we might use subscripts to explicitly indicate the random variables with respect to which the expectation is performed. \begin{enumerate} \item \underline{Empirical distribution:} Given a sequence $x^n \in \mathcal{X}^{n}$, it induces an empirical distribution on $\mathcal{X}$ defined as \begin{equation} \pi(x|x^n) := \frac{1}{n}|\{i:x_i = x\}| \text{ for all } x \in \mathcal{X} \end{equation} \item \underline{Typical set:} For $X\sim p_{X}(x)$ and $\epsilon \in (0,1)$, the set of $\epsilon$-typical sequences is defined as \begin{align} \begin{split} \mathcal{S}_{\epsilon}^{n}(X) :=& \{ x^{n} \vert |\pi(x|x^n) - p_X(x)| \leq \epsilon p_X(x)\\ &\text{ for all } x\in \mathcal{X} \} \end{split} \end{align} \item \underline{Typical average lemma:} For any $x^n \in \mathcal{S}_{\epsilon}^{n}(X)$ and any non-negative function $g$ on $\mathcal{X}$, we have \begin{equation} (1-\epsilon) \mathbb{E}[g(X)] \leq \frac{1}{n} \sum_{i}g(x_i) \leq (1+\epsilon) \mathbb{E}[g(X)] \end{equation} Note that by choosing $g$ to be the $\log$ function, one recovers the notion of typicality in \cite{cover2006wiley}. The typicality here is strictly stronger than the one in \cite{cover2006wiley}, however, similar to weak typicality, most i.i.d. sequences are still typical under this definition. Namely, for any i.i.d sequence $X^n$ of RVs with $X_i \sim p_{X}(x_i)$, by the LLN, the empirical distribution $\pi(x|X^n)$ converges (in probability) to $p_{X}(x)$, for all $x\in \mathcal{X}$, and so such sequence, with high probability, belongs to the typical set. \item \underline{Joint typicality:} Items~1 and 2 extend to a joint source $(X,Y) \sim p_{XY}(x,y)$ in the obvious way, i.e., by treating $X$ and $Y$ as one source $(X,Y)$. Given a sequence $(x^n, y^{n}) \in \mathcal{X}^{n}\times \mathcal{Y}^{n}$, it induces an empirical distribution on $\mathcal{X} \times \mathcal{Y}$ defined as \begin{align} \begin{split} \pi(x,y|x^n,y^n) :=& \frac{1}{n}|\{i:x_i = x, y_i = y\}| \\ & \text{ for all } (x,y) \in \mathcal{X} \times \mathcal{Y} \end{split} \end{align} For $X\sim p_{X}(x)$ and $\epsilon \in (0,1)$, the set of $\epsilon$-typical sequences is defined as \begin{align} \begin{split} \mathcal{S}_{\epsilon}^{n}(X,Y) :=& \{ (x^{n},y^n) \vert |\pi(x,y|x^n,y^n) - p_{XY}(x,y)|\\ & \leq \epsilon p_{XY}(x,y) \text{ for all } (x,y)\in \mathcal{X} \times \mathcal{Y} \} \end{split} \end{align} \item \underline{Joint typicality lemma:} Let $(X,Y) \sim p_{XY}(x,y)$ and $p_{Y}(y)$ be the marginal distribution $\sum_{x}p_{XY}(x,y)$. Then, for $\epsilon' < \epsilon$, there exists $\delta(\epsilon) \rightarrow 0$ as $\epsilon \rightarrow 0$ such that \begin{equation} p \{(x^n,Y^n) \in \mathcal{S}_{\epsilon}^{n}(X,Y) \} \geq 2^{-n(I(X;Y)+\delta(\epsilon))} \label{eq:jt-lemma} \end{equation} for $x^n\in \mathcal{S}_{\epsilon'}^n$, $Y^n\sim \prod_{i = 1}^n p_{Y}(y_i)$, and sufficiently large $n$. \end{enumerate} \subsection{Proof of Theorem 1} We should make a few remarks before presenting a proof. The proof follows standard techniques from information theory for proving results of this nature. It is worth noting that the conventional proof of achievability \cite{cover2006wiley} of the rate-distortion theorem does not directly apply here since the distortion measure $d_{\rm IB}$ depends on the distribution $p_{T|X}$. This was addressed in~\cite{gilad2003information} by extending the definition of distortion jointly typical sequences in~\cite{cover2006wiley} to multi-distortion jointly typical sequences. Our approach exploits the notion of typicality presented in the previous section and closely follows the proof of achievability in~\cite{el2011network} of the rate-distortion theorem. \begin{equation} \label{eq:rate-info} R'(D) := \min_{p_{T|X}(t|x): \mathbb{E}[d(X,T)] \leq D} I(X;T) \end{equation} We need to show $R_{\rm IBQ}(D) = R'(D)$. \subsubsection{Proof of the converse:} We first show $R_{\rm IBQ}(D) \geq R'(D)$ by showing that for any sequence of $(n,2^{nR})$ codes satisfying $\mathbb{E}\overline{d}_{\rm IB}(X^n,T^n)\leq D$, it must be the case that $R \geq R'(D)$. We have \begin{align} \begin{split} nR &\overset{\text{(i)}}{\geq} H(f_{n}(X^{n})) \overset{\text{(ii)}}{\geq} I(X^{n};f_{n}(X^n)) \overset{\text{(iii)}}{\geq} I(X^{n},T^{n}) \\ &= \sum_{i}H(X_i) - H(T_i | X^{n}, T^{i-1}) \\ & \geq \sum_{i}H(X_i) - H(T_i|X_i) = \sum_{i} I(X_i; T_{i}) \\ &\overset{\text{(iv)}}{\geq} \sum_{i} R'(\mathbb{E}[d(X_{i},T_i)]) \overset{\text{(v)}}{\geq} n R'(\frac{1}{n}\sum_{i}\mathbb{E}[d(X_{i},T_i)]) \\ &\overset{\text{(vi)}}{=} n R'(\mathbb{E}[d(X^{n},T^n)]) \overset{\text{(vii)}}{\geq} n R'(D) \end{split} \end{align} where (i) follows from the fact that $f_{n}$ takes its values from $\{1,\dots, 2^{n}\}$, (ii) from the non-negativity of conditional entropy, (iii) from the data processing inequality since $T^n = g_n(f_n(X^n))$, (iv) from (\ref{eq:rate-info}) by noting that $R'(\mathbb{E}[d(X_{i},T_i)]) = \min_{p_{T_i|X_i}} I(X_i;T_i)$, (vi) by definition of $\overline{d}_{\rm IB}$ and (vii) from $\mathbb{E}\overline{d}_{\rm IB}(X^n,T^n)\leq D$ since $R'(D)$ is a decreasing function in $D$. To prove (v), it is sufficient to show that $R'$ is a convex function in $D$, which is shown in the following lemma. \begin{lem} \cite{ahlswede1975source}. The function $R'(D)$ defined in (\ref{eq:rate-info}) is a convex function. \label{lem1} \end{lem} Proof. Let $(D_1,R_1)$ and $(D_2,R_2)$ be two points on $R'(D)$ attained, respectively, by $T_1$ and $T_2$ via the minimizers $p_{T_1|X}$ and $p_{T_2|X}$ of (\ref{eq:rate-info}). Define \begin{align} \begin{split} T = \left\{ \begin{array}{ll} T_1, & Z = 1 \\ T_2, & Z = 2 \end{array} \right. \end{split} \end{align} where $Z\in \{1,2\}$ is a RV independent of $(T_1,T_2,X,Y)$ with $p_{Z}(1) = \lambda$. Then, \begin{align} \begin{split} p_{XTZ}(x,t,z) = \left\{ \begin{array}{ll} \lambda \cdot p_{XT_{1}}(x,t), & Z = 1 \\ (1-\lambda) \cdot p_{XT_{2}}(x,t), & Z = 2 \end{array} \right. \end{split} \end{align} and so \begin{align} \begin{split} I(X;T,Z) &= \sum_{x,t,z} p_{XTZ}(x,t,z)\log\frac{p_{XTZ}(x,t,z)}{p_{X}(x)p_{TZ}(t,z)} \\ & = \sum_{x,t} \lambda \cdot p_{XT_1}(x,t)\log \frac{\lambda \cdot p_{XT_1}(x,t)}{\lambda \cdot p_{X}(x)p_{T_1}(t)} \\ &+ \sum_{x,t} (1-\lambda)\cdot p_{XT_2}(x,t)\\ &\times \log \frac{(1-\lambda)\cdot p_{XT_2}(x,t)}{(1-\lambda)\cdot p_{X}(x)p_{T_2}(t)} \\ & = \lambda \cdot I(X;T_1) + (1-\lambda) \cdot I(X;T_2) \end{split} \end{align} Moreover, we have \begin{align} \begin{split} \mathbb{E}[d(X,(T,Z))] & = \sum_{x,t,z}p_{X T Z}(x,t,z)\\ & \times \sum_{y}p_{Y|X}(y|x)\log \frac{p_{Y|X}(y|X)}{p_{Y|TZ}(y|t,z)} \\ & = H(Y|TZ) - H(Y|X) \\ & = \lambda \cdot H(Y|T_1) + (1-\lambda)\cdot H(Y|T_2) \\ & - \lambda\cdot H(Y|X) - (1-\lambda)\cdot H(Y|X) \\ & = \lambda\cdot \mathbb{E}[d(X,T_1)] + (1-\lambda)\cdot \mathbb{E}[d(X,T_2)] \end{split} \end{align} Since $(T,Z)$---$X$---$Y$ is a markov chain resulting in cost and constraint that are linear functions of the original costs and constraints, the claim follows from the definition of $R'$ in (\ref{eq:rate-info}). \subsubsection{Proof of Achievability in Theorem 1:} We need to show that for $R = R'(D)$ there exists a sequence $(2^{nR},n)$ of codes satisfying $\mathbb{E}\overline{d}_{\rm IB}(X^n,T^n)\leq D$ . \underline{Random codebook:} Let $R = R'(D)$ and fix $p_{T|X}$ to be an optimal distribution to the minimization (\ref{eq:rate-info}) at $D/(1+\epsilon)$, i.e., we pick a conditional distribution that attains $R'(D/(1+\epsilon))$. \footnote{A comment on existence. There is a feasible distribution $p_{T|X}$ satisfying the distortion constraint for any $D$. For $D = 0$, choose $p_{T|X}(t|x) = p_{X}(t)$ and for $D\geq D_{\max}:=I(X;Y)$ choose $p_{T|X}$ as the degenerate distribution that assigns all the weight on one element of $T$. For $D \in [0,D_{\max}]$, use a latent variable $Z$ as in the proof of the Lemma \ref{lem1} with $\lambda = D/D_{\max}$.} Let $p_{T}(t) = \sum_{x\in \mathcal{X}} p_{X}(x) p_{T|X}(t|x)$. Generate $2^{nR}$ i.i.d. sequences $t^{n}(m) \sim \prod_{i=1}^{n} p_{T}(t_i)$, $m\in \{1,\dots, 2^{nR}\}$. These sequences form the codebook which is revealed to the encoder and decoder. \underline{Encoder:} The encoder uses joint typicality encoding. Given a sequence $x^{n}$, find an index $m$ s.t. $(x^{n},t^{n}(m)) \in \mathcal{S}_{\epsilon}^{n}(X,T)$ and send $m$. If there is more than one index then choose $m$ to be the smallest index, and if there is no index then choose $m = 1$. (In other words, the encoder sets $f_n(x^n)$ to be the index $m$, where $m$ is as described above.) \underline{Decoder:} Upon receiving index $m$, set $t^n = t^n(m)$. (In other words, the decoder sets $g_n(m)$ to be the row of the codebook indexed by $m$.) \underline{Expected distortion} Let $\epsilon' < \epsilon$ and $M$ be the index chosen by the encoder. We first bound the distortion averaged over codebooks. Towards this end, define the event \begin{equation} \mathcal{E} := \{ (X^n,T^n(m)) \notin \mathcal{S}_{\epsilon}^{n}(X,T) \} \end{equation} then by the union bound and the choice of the encoder, we have \begin{equation} p(\mathcal{E}) \leq p(\mathcal{E}_1) + p(\mathcal{E}_2) \end{equation} where \begin{align} \begin{split} \mathcal{E}_{1} &:= \{ X^{n} \notin \mathcal{S}^n_{\epsilon'}(X) \}, \\ \mathcal{E}_{2} &:= \{ X^{n} \in \mathcal{S}^n_{\epsilon'}, (X^n,T^n(m)) \notin \mathcal{S}_{\epsilon}^n(X,T)\\ & \forall m \in \{1,\dots, 2^{nR}\} \} \end{split} \end{align} We have $\lim_{n\rightarrow \infty} p(\mathcal{E}_{1}) = 0$ by the LLN and \begin{align} \begin{split} p(\mathcal{E}_{2}) &= \sum_{x^{n}\in \mathcal{S}_{\epsilon'}^{n}} p_{X^n}(x^n) \\ &\times p\big\{(x^n,T^n(m) ) \notin \mathcal{S}_{\epsilon}^{n} \forall m \mid X^{n} = x^{n}) \big\} \\ &\stackrel{\text{(i)}}{=} \sum_{x^{n}\in \mathcal{S}_{\epsilon'}^{n}} p_{X^n}(x^n) \prod_{m=1}^{2^{nR}} p\big\{(x^n,T^{n}(m)) \notin \mathcal{S}_{\epsilon}^{n} \big\} \\ &\stackrel{\text{(ii)}}{=} \sum_{x^{n}\in \mathcal{S}_{\epsilon'}^{n}} p_{X^n}(x^n) \big(p\big\{(x^n,T^{n}(1)) \notin \mathcal{S}_{\epsilon}^{n} \big\} \big)^{2^{nR}} \\ &\stackrel{\text{(iii)}}{\leq} \sum_{x^{n}\in \mathcal{S}-{\epsilon'}^{n}} p_{X^n}(x^n) \big(1- 2^{-nI(X;T)+\delta(\epsilon))} \big)^{2^{nR}} \\ &\stackrel{\text{}}{\leq} \big(1- 2^{-nI(X;T)+\delta(\epsilon))} \big)^{2^{nR}} \\ &\stackrel{\text{(iv)}}{\leq} \exp\big(-2^{n(R-I(X;T) - \delta(\epsilon))}\big) \end{split} \end{align} where (i) and (ii) are by the i.i.d assumption on the codewords, (iii) is by the joint typicality lemma, (iv) is by the fact $(1-\alpha)^{k} \leq \exp(-k\alpha)$ for $\alpha \in [0,1]$ and $k\geq 0$. Hence, we have $\lim_{n\rightarrow \infty} p(\mathcal{E}_2) = 0$ for $R > I(X;T)+\delta(\epsilon)$. Now, the distortion averaged over $X^{n}$ and over the random choice of the codebook is given as \begin{align} \begin{split} &\mathbb{E}_{X^{n},T^{n},M} [d(X^{n},T^{n}(M))]\\ &= p(\mathcal{E}) \cdot \mathbb{E}_{X^{n},T^{n},M} [d(X^{n},T^{n}(M)) | \mathcal{E}]\\ &+ p(\mathcal{E}^{c}) \cdot \mathbb{E}_{X^{n},T^{n},M} [d(X^{n},T^{n}(M)) | \mathcal{E}^c] \\ &\leq p(\mathcal{E}) \cdot d_{\max} + p(\mathcal{E}^{c}) \cdot \mathbb{E}_{X^{n},T^{n},M} [d(X^{n},T^{n}(M)) | \mathcal{E}^c] \\ &= p(\mathcal{E}) \cdot d_{\max} + p(\mathcal{E}^{c}) \cdot \mathbb{E}_{X^{n},T^{n}} [d(X^{n},T^{n}(1)) | \mathcal{E}^c] \\ &\leq p(\mathcal{E}) \cdot d_{\max} + p(\mathcal{E}^{c})\cdot (1+\epsilon)\cdot \mathbb{E}_{X,T} [d(X,T)] \end{split} \end{align} where $d_{\max} = \max_{(x,t)\in\mathcal{X} \times \mathcal{T}}d(x,t)$. By the choice of $p_{T|X}(t|x)$, we have $\mathbb{E}[d(X,T)]\leq D/(1+\epsilon)$, and so \begin{equation} \lim_{n\rightarrow \infty} \mathbb{E}_{X^{n},T^{n},M}[d(X^{n},T^n(M))] \leq D \end{equation} for $R> I(X,T) + \delta(\epsilon)$, where $\delta(\epsilon) \rightarrow 0$ as $n\rightarrow \infty$. Since the expected distortion, averaged over codebooks, satisfies the distortion constraint $D$, there must exist a sequence of codes that satisfies the constraint. This shows the achievability of the rate-distortion pair $(R(D/(1+\epsilon)+\delta(\epsilon), D)$. By the continuity of $R(D)$ in $D$ the achievable rate $R(D/(1+\epsilon)) + \delta(\epsilon)$ converges to $R(D)$ as $\epsilon \rightarrow 0$. \subsection{Proof of Theorem 3} \begin{equation} \setlength{\jot}{10pt} \begin{aligned}[b] I(Y;T) & = \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log\frac{p_{Y|T}(y|t)}{p_Y(y)} \\ & = \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log \frac{p_{Y|T}(y|t)}{q_{Y|T}(y|t)} \cdot \frac{q_{Y|T}(y|t)}{p_Y(y)}\\ & = \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log q_{Y|T}(y|t) \\ &+ \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t)\log \frac{p_{Y|T}(y|t)}{q_{Y|T}(y|t)} \\ & - \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log p_Y(y)\\ & = \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log q_{Y|T}(y|t) \\ &+ \mathbb{E}_{t\sim p_T(t)} \text{KL}\left(p_{Y|T}(\cdot|t)\Vert q_{Y|T}(\cdot|t)\right) +H(Y)\\ & \ge \sum_{(t,y)\in \mathcal{T}\times \mathcal{Y}} p_{YT}(y, t) \log q_{Y|T}(y|t) +H(Y)\\ & = \mathbb{E}_{(x,y)\sim p_{XY}(x,y), \atop{ t\sim p_{T|X}(.|x)}} \log q_{Y|T}(y|t) +H(Y) \label{eq:var} \end{aligned} \end{equation} Note that the inequality above is due to the non-negativity of KL-divergence, in which equality is achieved precisely when $q_{Y|T}(y|t)$ is identically equal to $p_{Y|T}(y|t)$. \bibliographystyle{aaai}
\section*{Acknowledgements} The equipment for the reported study was granted by the M. V. Lomonosov Moscow State University Programme of Development.
\section{Introduction and Main Results} \smallskip We construct real-valued solutions $U(t, x)$ of the cubic Klein-Gordon equation \begin{equation}\label{eq_wave} \partial_t^2 U - \Delta U + m^2 U = \Gamma(x) \: U^3 \qquad \text{on } \R \times \R^3 \end{equation} where $\Gamma \in L^\infty_\mathrm{rad}(\R^3) \cap C^1_\mathrm{loc}(\R^3)$ and $m > 0$ is a (mass) parameter. Here we restrict ourselves to the case of three space dimensions which is the most relevant one for applications in physics and which allows to use the tools established in~\cite{own_cubic}. Throughout, the notations $\partial_{1, 2, 3}, \nabla, \Delta, D^2$ refer to differential operators acting on the space variables. The solutions we aim to construct are polychromatic, that is, they take the form \begin{align}\label{eq_poly} &U(t, x) = u_0(x) + \sum_{k=1}^\infty 2 \,\cos(\omega k t) u_k(x) = \sum_{k \in \Z} \mathrm{e}^{\i \omega k t} u_k(x) \\ \nonumber &\text{where} \: \: u_k \in X_1= \left\{ u \in C_\mathrm{rad}(\R^3, \R) \big| \: \norm{(1 + |\cdot|^2)^\frac{1}{2} u}_\infty < \infty \right\} \subseteq L^4_\mathrm{rad}(\R^3), \: \: u_{-k} = u_k \\ \nonumber &\text{and (for simplicity)} \: \: \omega > m. \end{align} Such solutions are periodic in time and localized as well as radially symmetric in space. They are sometimes referred to as breather solutions, c.f. the ``Sine-Gordon breather'' in~\cite{Ablowitz}, equation (28). The construction of breather solutions is of particular interest since, as indicated in a study~\cite{Weinstein} on perturbations of the Sine-Gordon breather, Birnir, McKean and Weinstein conjecture that ``for the general nonlinear wave equation [author's note: in 1+1 dimensions], breathing [...] takes place only for isolated nonlinearities'', see ~\cite[p.1044]{Weinstein}. This conjecture is supported by recent existence results for breathers for the 1+1 dimensional wave equation with specific, carefully designed potentials which we comment on below. Our results, however, indicate that the situation might be entirely different for weakly localized breathers for the Klein-Gordon equation in 1+3 dimensions, in the sense that such breather solutions are abundant even in ``simple'' settings. \smallskip We will find breather solutions of~\eqref{eq_wave} with $u_k \not\equiv 0$ for at least two distinct integers $k \in \N_0$ by rewriting it into an infinite system of stationary equations for the functions $u_k$. Indeed, inserting~\eqref{eq_poly}, a short and formal calculation leads to \begin{subequations}\label{eq_stationary_0} \begin{align} - \Delta u_0 + m^2 \, u_0 &= \Gamma(x) \: \left( \b{u} \star \b{u} \star \b{u} \right)_0, \label{eq_stationary_1} \\ - \Delta u_{k} - (\omega^2 k^2 - m^2) u_{k} &= \Gamma(x) \: \left( \b{u} \star \b{u} \star \b{u} \right)_{k} \label{eq_stationary_2} \qquad \text{for } k \in \Z \setminus \{ 0 \}. \end{align} \end{subequations} In fact, \eqref{eq_stationary_2} includes \eqref{eq_stationary_1}, but we intend to separate the ``Schrödinger'' equation characterized by $0 \not\in \sigma(- \Delta + m^2)$ from the infinite number of ``Helmholtz'' equations characterized by $0 \in \sigma(- \Delta - (\omega^2 k^2 - m^2))$, $k \neq 0$. Our construction of breathers for~\eqref{eq_wave} relies on new methods for such Helmholtz equations introduced in~\cite{own_cubic} which exploit the so-called far field properties of their solutions and lead to a rich bifurcation structure. These methods will be sketched only briefly in the main body of this paper; more details will be given in Section~\ref{sect_helmholtz} at the end (which can be read independently). \smallskip The solutions we obtain bifurcate from any given stationary (radial) solution $w_0 \in X_1$, $w_0 \not \equiv 0$ of the Klein-Gordon equation~\eqref{eq_wave}. That is, $w_0$ solves the stationary nonlinear Schrödinger equation \begin{align}\label{eq_w0} - \Delta w_0 + m^2 \, w_0 = \Gamma (x) \: w_0^3 \quad \text{on }\R^3; \end{align} regarding existence of such $w_0$, cf. Remark~\ref{rmk}~(b). Let us remark briefly that all (distributional) solutions of~\eqref{eq_w0} in $X_1 \subseteq L^4_\text{rad}(\R^3)$ are twice differentiable by elliptic regularity. In order to make bifurcation theory work, we impose the following nondegeneracy assumption: \begin{align}\label{eq_nondegenerate,S} q_0 \in X_1, \: \: - \Delta q_0 + q_0 = 3 \Gamma(x) \: w_0^2 \: q_0 \text{ on } \R^3 \qquad \text{implies } \qquad q_0 \equiv 0. \end{align} We comment on this assumption in Remark~\ref{rmk}~(c) below. In particular,~\eqref{eq_nondegenerate,S} and our main result presented next hold if $\Gamma$ is constant and $w_0$ is a (positive) ground state of~\eqref{eq_w0}. We now present our main result. \begin{thm}\label{thm_poly} Let $\Gamma \in L^\infty_\mathrm{rad}(\R^3) \cap C^1_\mathrm{loc}(\R^3)$, $\omega > m > 0$ and assume there is some stationary solution $U^0(t,x) = w_0(x)$, $w_0 \not \equiv 0$ of the cubic Klein-Gordon equation~\eqref{eq_wave}, i.e. $w_0 \in X_1$ solving~\eqref{eq_w0}. Assume further that $w_0$ is nondegenerate in the sense of~\eqref{eq_nondegenerate,S}. Then for every $s \in \N$ there exist an open interval $J_s \subseteq \R$ with $0 \in J_s$ and a family $(U^{\alpha})_{\alpha \in J_s} \subseteq C^2(\R, X_1)$ with the following properties: \begin{itemize} \item[(i)] All $U^\alpha$ are time-periodic, twice continuously differentiable classical solutions of~\eqref{eq_wave} of the polychromatic form~\eqref{eq_poly}, \begin{align*} U^\alpha(t, x) = u_0^\alpha(x) + \sum_{k=1}^\infty 2 \,\cos(\omega k t) u_{k}^\alpha(x). \end{align*} \item[(ii)] The map $\alpha \mapsto (u_k^\alpha)_{k \in \N_0}$ is smooth in the topology of $\ell^1(\N_0, X_1)$ with \begin{align*} \frac{\mathrm{d}}{\mathrm{d}\alpha}\bigg|_{\alpha = 0} u_k^\alpha \not\equiv 0 \quad \text{if and only if} \quad k = s \end{align*} (``excitation of the s-th mode''). In particular, for sufficiently small $\alpha \neq 0$, these solutions are non-stationary. Moreover, for different values of $s$, the families of solutions mutually differ close to $U^0$. \item[(iii)] If we assume additionally $\Gamma(x) \neq 0$ for almost all $x \in \R^3$, then every nonstationary polychromatic solution $U^\alpha$ possesses infinitely many nonvanishing modes $u_k^\alpha$. \end{itemize} \end{thm} \begin{rmk}\label{rmk} \begin{itemize} \item[(a)] We require continuity of $\Gamma$ since we use the functional analytic framework of~\cite{own_cubic}. The existence and continuity of $\nabla \Gamma$ will be exploited in proving that $U^\alpha$ is twice differentiable. This assumption as well as $\Gamma \neq 0$ almost everywhere in (iii) might be relaxed; however, this study does not aim at the most general setting for the coefficients but rather focuses on the introduction of the setup for the existence result. \item[(b)] The existence of stationary solutions of the Klein-Gordon equation~\eqref{eq_wave} resp. of solutions to~\eqref{eq_w0} can be guaranteed under additional assumptions on $\Gamma$. We refer to \cite{Lions}, Theorem~I.2 and Remarks~I.5,~I.6 by Lions for positive (ground state) solutions and to Theorems~2.1 of~\cite{Willem1},~\cite{Willem2} by Bartsch and Willem for bound states. \item[(c)] In some special cases, nondegeneracy properties like~\eqref{eq_nondegenerate,S} have been verified, e.g. by Bates and Shi~\cite{bates} in Theorem~5.4~(6), or by Wei~\cite{wei} in Lemma~4.1, both assuming that $w_0$ is a ground state solution of~\eqref{eq_w0} in the autonomous case with constant positive $\Gamma$. It should be pointed out that, although the quoted results discuss nondegeneracy in a setting on the Hilbert space $H^1(\R^3)$, the statements can be adapted to the topology of $X_1$, as we will demonstrate in Lemma~\ref{lem_nondegeneracy}. \item[(d)] The assumption $\omega > m$ on the frequency ensures that the stationary system~\eqref{eq_stationary_0} contains only one equation of Schrödinger type. This avoids further nondegeneracy assumptions on higher modes, which would not be covered by the previously mentioned results in the literature. \item[(e)] The above result provides, locally, a multitude of families of breathers bifurcating from every given stationary solution characterized by different values of $s$, $\omega$ and possibly certain asymptotic parameters, see Remark~\ref{rmk_previouschapter} below. \\ It would be natural, further, to ask for the global bifurcation picture given some trivial family $\mathcal{T} = \{ (w_0, \lambda) \, | \, \lambda \in \R \}$. (Here $\lambda \in \R$ denotes a bifurcation parameter which in our case is not visible in the differential equation and thus will be properly introduced later.) Typically, global bifurcation theorems state that a maximal bifurcating continuum of solutions $(U, \lambda)$ emanating from $\mathcal{T}$ at $(w_0, \lambda_0)$ is unbounded unless it returns to $\mathcal{T}$ at some point $(w_0, \lambda_0')$, $\lambda_0' \neq \lambda_0$. In the former (desirable) case, however, a satisfactory characterization of global bifurcation structures should provide a criterion whether or not unboundedness results from another stationary solution $w_1 \neq w_0$ with $\{ (w_1, \lambda) \, | \, \lambda \in \R \}$ belonging to the maximal continuum. Since it is not obvious at all whether and how such a criterion might be derived within our framework, we focus on the local result, which already adds new aspects to the state of knowledge about the existence of breather solutions summarized next. \end{itemize} \end{rmk} \subsection{An Overview of Literature} \subsubsection*{Polychromatic Solutions} The results in Theorem~\ref{thm_poly} can and should be compared with recent findings on breather (that is to say, time-periodic and spatially localized) solutions of the wave equation with periodic potentials $V(x), q(x) = c \cdot V(x) \geq 0$, \begin{align}\label{eq_wave1D} V(x) \partial_t^2 U - \partial_x^2 U + q(x) U = \Gamma(x) U^3 \qquad \text{on } \R \times \R. \end{align} Such breather solutions have been constructed by Schneider et al., see Theorem~1.1~in~\cite{Schneider}, and Hirsch and Reichel, see Theorem~1.3~in~\cite{Hirsch}, respectively. In brief, the main differences to the results in this article are that the authors of~\cite{Schneider},~\cite{Hirsch} consider a setting in one space dimension and obtain strongly spatially localized solutions, which requires a comparably huge technical effort. We give some details: Both existence results are established using a polychromatic ansatz, which reduces the time-dependent equation to an infinite set of stationary problems with periodic coefficients, see \cite{Schneider},~p.~823, resp. \cite{Hirsch},~equation~(1.2). The authors of~\cite{Schneider} apply spatial dynamics and center manifold reduction; their ansatz is based on a very explicit choice of the coefficients $q, V, \Gamma$. The approach in~\cite{Hirsch} incorporates more general potentials and nonlinearities and is based on variational techniques. It provides ground state solutions, which are possibly ``large'' - in contrast to our local bifurcation methods, which only yield solutions close to a given stationary one as described in Theorem~\ref{thm_poly}, i.e. with a typically ``small'' time-dependent contribution. \\ Periodicity of the potentials in~\eqref{eq_wave1D} is explicitly required since it leads to the occurrence of spectral gaps when analyzing the associated differential operators of the stationary equations. In contrast to the Helmholtz methods introduced here, the authors both of~\cite{Schneider} and of~\cite{Hirsch} strive to construct the potentials in such way that $0$ lies in the aforementioned spectral gaps, and moreover that the distance between $0$ and the spectra has a positive lower bound. This is realized by assuming a certain ``roughness'' of the potentials, referring to the step potential defined in Theorem~1.1~of~\cite{Schneider} and to the assumptions (P1)-(P3) in~\cite{Hirsch} which allow potentials with periodic spikes modeled by Dirac delta distributions, periodic step potentials or some specific, non-explicit potentials in $H^r_\text{rad}(\R)$ with $1 \leq r < \frac{3}{2}$ (see~\cite{Hirsch}, Lemma~2.8). \smallskip Let us summarize that the methods for constructing breather solutions of~\eqref{eq_wave1D} outlined above can handle periodic potentials but require irregularity, are very restrictive concerning the form of the potentials and involve a huge technical effort in analyzing spectral properties based on Floquet-Bloch theory. The Helmholtz ansatz presented in this article provides a technically elegant and short approach suitable for constant potentials; in the context of breather solutions, it is new in the sense that it provides breathers with slow decay, it provides breathers on the full space $\R^3$, and it provides breathers for simple (constant) potentials. \subsubsection*{The Klein-Gordon Equation as a Cauchy Problem} Possibly due to its relevance in physics, there is a number of classical results in the literature concerning the nonlinear Klein-Gordon equation. The fundamental difference to the results in this article is that the vast majority of these concerns the Cauchy problem of the Klein-Gordon equation, i.e. \begin{equation}\label{eq_NKG} \begin{split} &\partial_t^2 U - \Delta U + m^2 \, U = \pm U^3 \quad \text{on } [0, \infty) \times \R^3 \\ &U(0, x) = f(x), \: \partial_t U(0, x) = g(x) \quad \text{ on } \R^3 \end{split} \end{equation} for suitable initial data $f, g: \R^3 \to \R$. Usually, the dependence of the nonlinearity on $U$ is much more general (allowing also derivatives of $U$) and the space dimension is not restricted to $N=3$. On the other hand, most results in the literature only concern the autonomous case, which is why we set in this discussion $\Gamma \equiv \pm 1$. An overview of the state of knowledge towards the end of the 1970s can be found e.g. in~\cite{StraussNKG} by Strauss, who discusses among other topics global existence (Theorem~1.1), regularity and uniqueness (Theorem~1.2), blow-up (Theorem~1.4) and scattering (Theorem~4.1). In the first-mentioned result, which is originally due to Jörgens, global existence of distributional solutions with locally as well as globally finite energy \begin{align*} E_B[U(t,\,\cdot\,)] = \frac{1}{2} \int_B |\partial_t U(t,x)|^2 + |\nabla U(t,x)|^2 + m^2 |U(t,x)|^2 \: \mathrm{d}x + \frac{1}{4} \int_B |U(t, x)|^4 \: \mathrm{d}x, \:\: B \subseteq \R^3 \end{align*} is proved provided $\Gamma \equiv -1$. Following a classical strategy for evolution problems, local existence is shown by means of a fixed point iteration, and global existence can be obtained by an iteration argument based on energy conservation. For $\Gamma \equiv +1$, Theorem~1.4 due to Keller and Levine demonstrates the existence of blow-up solutions. \\ During the following decade, Klainerman~\cite{Klainerman1, Klainerman2} and Shatah~\cite{Shatah1, Shatah2} independently developed new techniques leading to significant improvements in the study of uniqueness questions and of the asymptotic behavior of solutions as $t \to \infty$. These results work in settings with high regularity and admit more general nonlinearities with growth assumptions for small arguments, which includes the cubic one as a special case. In particular, Klainerman and Shatah prove the convergence to solutions of the free Klein-Gordon equation and show uniform decay rates of solutions as $t \to \infty$. In the case of a cubic nonlinearity, these results only apply if the space dimension is at least $2$. This is why, more recently, the question of corresponding uniqueness and convergence properties for cubic nonlinearities in $N = 1$ space dimensions has attracted attention; we wish to mention at least some of the related papers. For explicit choices of the cubic nonlinearity, there are results by Moriyama and by Delort, see Theorem~1.1~of~\cite{Moriyama} resp. Th\'{e}or\`{e}mes~1.2,~1.3~in~\cite{Delort}. Only the latter result allows a nonlinearity of the form $\pm U^3$ not containing derivatives (see~\cite{Delort}, Remarque~1.4); however, the initial data are assumed to have compact support. Global existence, uniqueness, decay rates and scattering exclusively for the nonlinearity $\pm U^3$ can be found in Corollary~1.2~of~\cite{Hayashi} by Hayashi and Naumkin. The relation to our results is not straightforward since the bifurcation methods automatically provide solutions $U^\alpha$ which exist globally in time irrespective of the sign (or even of a possible $x$-dependence) of $\Gamma$ and which do not decay as $t \to \infty$, and there is no special emphasis on the role of the initial values $U^\alpha(0, x), \nabla U^\alpha(0, x)$ along the bifurcating branches. Our methods instead focus on several global properties of the solutions $U^\alpha(t, x)$ such as periodicity in time and localization as well as decay rates in space, i.e. the defining properties of breathers. \subsection{Research Perspectives} Apart from bifurcation methods, nonlinear Helmholtz equations and systems can also be discussed in a ``dual'' variational framework as introduced by Ev\'{e}quoz and Weth~\cite{EvequozWeth}. This might offer another way to analyze the system~\eqref{eq_stationary_0} leading to ``large'' breathers in the sense that they are not close to a given stationary solution as the ones constructed in Theorem~\ref{thm_poly}. Furthermore, such an ansatz might be a promising step towards extensions to non-constant, e.g. periodic potentials. \section{The Proof of Theorem~\ref{thm_poly}} \subsection{The Functional-Analytic Setting} We look for polychromatic solutions as in~\eqref{eq_poly} with coefficients $\b{u} = (u_k)_{k \in \Z} \in \mathcal{X}_1$ where \begin{align*} \mathcal{X}_1 := \ell^1_\text{sym}(\Z, X_1) := \left\{ (u_k)_{k \in \Z} \: \bigg| \: u_k = u_{-k} \in X_1, \norm{(u_k)_{k \in \Z}}_{\mathcal{X}_1} := \sum_{k \in \Z} \norm{u_k}_{X_1} < \infty \right\}. \end{align*} The Banach space $X_1$ has been defined in~\eqref{eq_poly}; it prescribes a decay rate which is the natural one for solutions of Helmholtz equations as in~\eqref{eq_stationary_2}, see also Section~\ref{sect_helmholtz}. Throughout, we denote by $\b{w} = (\delta_{k, 0} w_0)_{k \in \Z} = ( ..., 0, w_0, 0, ...) $ the stationary solution with $w_0 \in X_1 \cap C^2_\mathrm{loc}(\R^3)$ fixed according to equation~\eqref{eq_w0}. We will find polychromatic solutions of~\eqref{eq_wave} by solving the countably infinite Schrödinger-Helmholtz system~\eqref{eq_stationary_1},~\eqref{eq_stationary_2}, which is equivalent to~\eqref{eq_wave},~\eqref{eq_poly} on a formal level; for details including convergence of the polychromatic sum in~\eqref{eq_poly}, see Proposition~\ref{prop_mapping}. \medskip Our strategy is then as follows: \begin{itemize} \item[$\triangleright$] Intending to apply bifurcation techniques, we have to analyze the linearized version of the infinite-dimensional system~\eqref{eq_stationary_1},~\eqref{eq_stationary_2}, which resembles the one of the two-component system discussed by the author in~\cite{own_cubic}. We therefore summarize, for the reader's convenience, a collection of results concerning the linearized setting in Proposition~\ref{prop_chapter2}. \item[$\triangleright$] We then present a suitable setup for bifurcation theory; in particular, we introduce a bifurcation parameter which is not visible in the differential equation but appears in the so-called far field of the functions $u_k$, more specifically a phase parameter in the leading-order contribution as $|x| \to \infty$. \item[$\triangleright$] The aforementioned fact that solutions of~\eqref{eq_stationary_1},~\eqref{eq_stationary_2} obtained in this setting provide polychromatic, classical solutions of the Klein-Gordon equation~\eqref{eq_wave} will be proved as a part of Proposition~\ref{prop_mapping} below. Indeed, regarding differentiability, we will see that the choice of suitable asymptotic conditions will ensure uniform convergence and hence smoothness properties of the infinite sums defining the polychromatic states. \item[$\triangleright$] Finally, in Proposition~\ref{prop_kernel}, we essentially verify the assumptions of the Crandall-Rabinowitz Bifurcation Theorem. \end{itemize} After that, we are able to give a very short proof of Theorem~\ref{thm_poly}. The auxiliary results will be proved in Section~\ref{ch_wave-proofs}. The final Section~\ref{sect_helmholtz} provides some more details on the theory of linear Helmholtz equations in $X_1$. \medskip Throughout, we denote the convolution in $\R^3$ by the symbol $\ast$ and use $\star$ in the convolution algebra $\ell^1$. Extending the notation defined above, for $q \geq 0$, we let \begin{align*} &X_q := \left\{ u \in C_\text{rad}(\R^3, \R) \, | \, \norm{u}_{X_q} < \infty \right\} && \text{with } \norm{u}_{X_q} := \sup_{x \in \R^3} (1 + |x|^2)^{q/2} |u(x)|, \\ & \mathcal{X}_q := \ell^1_\text{sym}(\Z, X_q) && \text{with } \norm{\b{u}}_{\mathcal{X}_q} := \norm{(u_k)_k}_{\mathcal{X}_q} := \sum_{k \in \Z} \norm{u_k}_{X_q}. \end{align*} \begin{prop}\label{prop_convolution-x1} The convolution of sequences $\b{u}^{(1)}, \b{u}^{(2)}, \b{u}^{(3)} \in \mathcal{X}_1$ is well-defined in a pointwise sense and satisfies $\b{u}^{(1)} \star \b{u}^{(2)} \star \b{u}^{(3)} \in \mathcal{X}_3$. Moreover, we have the estimate \begin{align*} \norm{\b{u}^{(1)} \star \b{u}^{(2)} \star \b{u}^{(3)}}_{\mathcal{X}_3} \leq \norm{\b{u}^{(1)}}_{\mathcal{X}_1} \norm{\b{u}^{(2)}}_{\mathcal{X}_1} \norm{\b{u}^{(3)}}_{\mathcal{X}_1}. \end{align*} \end{prop} We rewrite the system~\eqref{eq_stationary_1},~\eqref{eq_stationary_2} using $\b{u} = \b{w} + \b{v}$ with $\b{w} = ( ..., 0, w_0, 0, ...) $; then, \begin{align}\label{eq_stationary-v} - \Delta v_k - (\omega^2 k^2 - m^2) \, v_k = \Gamma (x) \cdot \left[ \left((\b{w} + \b{v}) \star (\b{w} + \b{v}) \star (\b{w} + \b{v})\right)_k - \delta_{k, 0} w_0^3 \right] \quad \text{on }\R^3. \end{align} We will find solutions of this system of differential equations by solving instead a system of coupled convolution equations which, for $k \not\in \{ 0, \pm s \}$, have the form $v_k = \mathcal{R}_{\mu_k}^{\tau_k} [f_k]$. Here $f_k$ represents the right-hand side of~\eqref{eq_stationary-v}, $\mu_k := \omega^2 k^2 - m^2$, and the coefficients $\tau_k \in (0, \pi)$ will have to be chosen properly according to a nondegeneracy condition. The convolution operators $$\mathcal{R}_{\mu}^{\tau} = \frac{\sin(|\,\cdot\,| \sqrt{\mu} + \tau)}{4\pi \sin(\tau) |\,\cdot\,|} \: \ast \: : X_3 \to X_1 \qquad (\mu > 0, \: \: 0 < \tau < \pi)$$ can be viewed as resolvent-type operators for the Helmholtz equation $(- \Delta - \mu) v = f$ on $\R^3$ involving an asymptotic condition on the far field of the solution $v$, namely $$ |x| \: v(x) \sim \sin(|x| \sqrt{\mu} + \tau) + O\left(\frac{1}{|x|}\right) \quad \text{as} \quad |x| \to \infty. $$ Such conditions are required since the homogeneous Helmholtz equation $(- \Delta - \mu) v = 0$ has smooth nontrivial solutions in $X_1$ (known as Herglotz waves), which are all multiples of $$ \tilde{\Psi}_\mu (x) := \frac{\sin(|x| \sqrt{\mu})}{4 \pi |x|} \quad (x \neq 0). $$ We refer to Section~\ref{sect_helmholtz}, more precisely Lemma~\ref{lem_linH}, for details; the case $\tau = 0$ requires a larger technical effort and is presented in Lemma~\ref{lem_linH-0}. This involves linear functionals $\alpha^{(\mu)}, \beta^{(\mu)} \in X_1'$ which, essentially, yield the coefficients of the sine resp. cosine terms in the asymptotic expansion above. Relying on these tools and notations, we summarize the relevant facts on the linearized versions of the Helmholtz equations~\eqref{eq_stationary_2} in the following Proposition. \begin{prop}\label{prop_chapter2} Let $w_0 \in X_1$ be a solution of equation~\eqref{eq_w0} with $\Gamma \in L^\infty_\mathrm{rad}(\R^3) \cap C_\mathrm{loc}(\R^3)$ and $\omega > m > 0$; define $\mu_k := \omega^2 k^2 - m^2$. For every $k \in \Z \setminus \{ 0 \}$, there exists (up to a multiplicative constant) a unique nontrivial and radially symmetric solution $q_k \in X_1$ of \begin{subequations}\label{eq_qk} \begin{align}\label{eq_qk-1} - \Delta q_k - \mu_k \, q_k = 3 \, \Gamma(x) w_0^2(x) \: q_k \qquad \text{on }\R^3. \end{align} It is twice continuously differentiable and satisfies, for some $c_k \neq 0$ and $\sigma_k \in [0, \pi)$, \begin{align}\label{eq_qk-2} q_k(x) = c_k \cdot \frac{\sin(|x| \, \sqrt{\mu_k} + \sigma_k)}{|x|} + O\left(\frac{1}{|x|^2}\right) \quad \text{as } |x| \to \infty. \end{align} \end{subequations} The equations~\eqref{eq_qk-1},~\eqref{eq_qk-2} are equivalent to the convolution identities \begin{align*} \begin{cases} q_k = 3 \: \mathcal{R}_{\mu_k}^{\sigma_{k}} [\Gamma w_0^2 \, q_{k}] = 3 \: \left( \mathcal{R}_{\mu_k} [\Gamma w_0^2 \, q_{k}] + \cot(\sigma_k) \tilde{\mathcal{R}}_{\mu_k} [\Gamma w_0^2 \, q_{k}] \right) & \text{if } \sigma_k \in (0, \pi), \\ q_k = 3 \: \mathcal{R}_{\mu_k}^{\pi/2} [\Gamma w_0^2 \, q_{k}] + \left( \alpha^{(\mu_k)}(q_{k}) + \beta^{(\mu_k)}(q_{k}) \right) \cdot \tilde{\Psi}_{\mu_k} & \text{if } \sigma_k = 0. \end{cases} \end{align*} For all $k \in \Z$, $\cos(\sigma_k) \, \beta^{(\mu_k)}(q_{k}) = \sin(\sigma_k) \, \alpha^{(\mu_k)}(q_{k})$. \end{prop} The existence statement and the asymptotic properties in~\eqref{eq_qk} can be proved using the Prüfer transformation, see~\cite{own_cubic}, Proposition~6; the statements in the second part are consequences of Lemmas~\ref{lem_linH}~and~\ref{lem_linH-0} in the final Section~\ref{sect_helmholtz}. For these results to apply we have assumed initially that $\Gamma$ is continuous and bounded, whence $3 \, \Gamma w_0^2 \in X_2$. We now present the general assumptions valid throughout the following construction and the proof of Theorem~\ref{thm_poly}. We let $\sigma_k$ for $k \in \Z \setminus \{ 0 \}$ as in Proposition~\ref{prop_chapter2} above and fix $s \in \N$, recalling that we aim to ``excite the $s$-th mode'' in the sense of Theorem~\ref{thm_poly}~(ii). With this, let us introduce \begin{equation}\label{eq_assumptions} \tau_{\pm s} := \sigma_{\pm s}, \qquad \tau_k := \begin{cases} \frac{\pi}{4} & \text{if } \sigma_k \neq \frac{\pi}{4}, \\ \frac{3\pi}{4} & \text{if } \sigma_k = \frac{\pi}{4} \end{cases} \quad \text{ for } k \in \Z \setminus \{ 0, \pm s \}, \end{equation} see also Remark~\ref{rmk_previouschapter}~(b). Thus in particular $\tau_k \neq \sigma_k$ for $k \in \Z \setminus \{ 0, \pm s \}$, and we conclude from the uniqueness statement in Proposition~\ref{prop_chapter2} the nondegeneracy property \begin{subequations}\label{eq_nondegenerate} \begin{equation}\label{eq_nondegenerate,1} k \in \Z \setminus \{0, \pm s \}, \quad q \in X_1, \quad q = 3 \: \mathcal{R}_{\mu_k}^{\tau_k} [\Gamma w_0^2 \, q] \qquad \Rightarrow \qquad q \equiv 0; \end{equation} for the $0$-th mode, using the resolvent $\mathcal{P}_{\mu_0} = (- \Delta + \mu_0)^{-1}: X_3 \to X_1$ (see Lemma~\ref{lem_linS}), the corresponding property is assumed in~\eqref{eq_nondegenerate,S}: \begin{equation}\label{eq_nondegenerate,2} q \in X_1, \quad q = 3 \: \mathcal{P}_{\mu_0} [\Gamma w_0^2 \, q] \qquad \Rightarrow \qquad q \equiv 0. \end{equation} \end{subequations} We now introduce a map the zeros of which provide solutions of the system~\eqref{eq_stationary-v}. Throughout, we use the shorthand notation $\b{u} = \b{v} + \b{w}$ for $\b{v} \in \mathcal{X}_1$ and the stationary solution $\b{w} = (..., 0, w_0, 0, ...)$. As above, we have to distinguish the cases $\tau_s \in (0, \pi)$ and $\tau_s = 0$. (In the following, please recall that we consider some fixed $s \neq 0$.) For $0 < \tau_{\pm s} < \pi$, we introduce $F: \: \mathcal{X}_1 \times \R \to \mathcal{X}_1$ via \begin{subequations}\label{eq_FG} \begin{equation}\label{eq_F} F(\b{v}, \lambda)_{k} := v_k - \begin{cases} \mathcal{P}_{\mu_0} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_0 - \Gamma \: w_0^3 \right] & k = 0, \\ \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] \\ \qquad + (\cot(\tau_{\pm s}) - \lambda) \tilde{\Psi}_{\mu_s} \ast \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] & k = \pm s, \\ \mathcal{R}_{\mu_k}^{\tau_{k}} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{k} \right] & \text{else}. \end{cases} \end{equation} Similarly, if $\sigma_s = 0$, we define $G: \: \mathcal{X}_1 \times \R \to \mathcal{X}_1$ by \begin{equation}\label{eq_G} G(\b{v}, \lambda)_{k} := v_k - \begin{cases} \mathcal{P}_{\mu_0} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_0 - \Gamma \: w_0^3 \right] & k = 0, \\ \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] \\ \qquad + (1 - \lambda) \left( \alpha^{(\mu_s)}(v_{\pm s}) + \beta^{(\mu_s)}(v_{\pm s}) \right) \tilde{\Psi}_{\mu_s} & k = \pm s, \\ \mathcal{R}_{\mu_k}^{\tau_{k}} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{k} \right] & \text{else}. \end{cases} \end{equation} \end{subequations} The following result collects some basic properties of the maps $F$ and $G$ and the polychromatic states related to their zeros. \begin{prop}\label{prop_mapping} Let $s \in \N$ and $(\tau_k)_{k \in \Z}$ be chosen as in~\eqref{eq_assumptions}. The maps $F, G: \mathcal{X}_1 \times \R \to \mathcal{X}_1$ are well-defined and smooth with $F(\b{0}, \lambda) = G(\b{0}, \lambda) = \b{0}$ for all $\lambda \in \R$. Further, if $F(\b{v}, \lambda) = \b{0}$ resp. $G(\b{v}, \lambda) = \b{0}$ for some $ \b{v} \in \mathcal{X}_1, \lambda \in \R$, then $\b{v}$ solves the stationary system~\eqref{eq_stationary-v} and \begin{align*} U(t, x) := w_0(x) + v_0(x) + \sum_{k=1}^\infty 2 \,\cos(\omega k t) v_k(x) \qquad (t \in \R, x \in \R^3) \end{align*} defines a twice continuously differentiable, classical solution $U \in C^2(\R, X_1)$ of the Klein-Gordon equation~\eqref{eq_wave}. \end{prop} Again, the proof can be found in Section~\ref{ch_wave-proofs}. We will even show that $U \in C^\infty(\R, X_1)$. For the derivatives of $F$ resp. $G$ with respect to the Banach space component $\b{v} \in \mathcal{X}_1$, we will verify the following explicit formulas: Letting $\b{q} \in \mathcal{X}_1$ and abbreviating $\b{u} := \b{v} + \b{w}$, \begin{subequations}\label{eq_DFG} \begin{align}\label{eq_DF} (DF(\b{v}, \lambda)[\b{q}])_k = q_k - \begin{cases} 3 \: \mathcal{P}_{\mu_0} [\Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_0] & k = 0, \\ 3 \: \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_{\pm s} \right] & \\ \: + 3 \: (\cot(\tau_s) - \lambda) \tilde{\Psi}_{\mu_s} \ast \left[ \Gamma \left(\b{q} \star \b{u} \star \b{u} \right)_{\pm s} \right] & k = \pm s, \\ 3 \: \mathcal{R}_{\mu_k}^{\tau_k} \left[ \Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_k \right] & \text{else}; \end{cases} \end{align} \begin{align}\label{eq_DG} (DG(\b{v}, \lambda)[\b{q}])_k = q_k - \begin{cases} 3 \: \mathcal{P}_{\mu_0} [\Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_0] & k = 0, \\ 3 \: \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_{\pm s} \right] & \\ \: + (1 - \lambda) \! \left( \alpha^{(\mu_s)}(q_{\pm s}) + \beta^{(\mu_s)}(q_{\pm s}) \right) \! \tilde{\Psi}_{\mu_s} & k = \pm s, \\ 3 \: \mathcal{R}_{\mu_k}^{\tau_k} \left[ \Gamma \left(\b{q} \star \b{u} \star \b{u}\right)_k \right] & \text{else}. \end{cases} \end{align} \end{subequations} \begin{rmk}\label{rmk_previouschapter} \begin{itemize} \item[(a)] As earlier announced, we now see that the bifurcation parameter $\lambda$ appears only in the asymptotic expansions of the $s$-th components $v_{\pm s}$ of the solutions and not in the differential equation~\eqref{eq_wave}. This is different from~\cite{own_cubic} where the bifurcation parameter takes the role of a coupling parameter of the Helmholtz system. \item[(b)] The choice of the parameters $\tau_k$ in equation~\eqref{eq_assumptions} is far from unique. Indeed, one could instead consider any configuration satisfying \begin{align*} \tau_k = \tau_{-k} \neq \sigma_k \: \text{ for all } k \in \Z \setminus \{ \pm s \}, \qquad \{ \tau_k \, | \, k \in \Z \setminus \{ \pm s \} \} \subseteq (\delta, \pi - \delta) \end{align*} for some $\delta \in \left(0, \frac{\pi}{2} \right)$. The former condition is required for the nondegeneracy statement~\eqref{eq_nondegenerate,1}, and the latter will be used to obtain uniform decay estimates in the proof of Proposition~\ref{prop_mapping}, see Lemma~\ref{lem_uniformdecay}. \\ However, as in~\cite{own_cubic}, the question whether another choice of $\tau_k$ leads to different bifurcating families is still open. Hence we discuss only the explicit choice in~\eqref{eq_assumptions}. \end{itemize} \end{rmk} In the so-established framework, we intend to apply the Crandall-Rabinowitz Bifurcation Theorem. The next result shows that its assumptions are satisfied. \begin{prop}[Simplicity and transversality]\label{prop_kernel} Let $s \in \N$ and $(\tau_k)_{k \in \Z}$ be chosen as in~\eqref{eq_assumptions}. The linear operator $DF(\b{0}, 0): \mathcal{X}_1 \to \mathcal{X}_1$ is 1-1-Fredholm with a kernel of the form \begin{align*} \ker DF(\b{0}, 0) = \mathrm{span } \, \{ \b{q} \} \qquad \text{where } q_k \neq 0 \text{ if and only if } k = \pm s. \end{align*} Moreover, the transversality condition is satisfied, that is, \begin{align*} \partial_\lambda DF(\b{0}, 0)[\b{q}] \not\in \mathrm{ran} \, DF(\b{0}, 0). \end{align*} A corresponding statement holds true for $DG(\b{0}, 0): \mathcal{X}_1 \to \mathcal{X}_1$. \end{prop} \subsection{The Proof of Theorem~\ref{thm_poly}} Let us fix some $s \in \N$, and choose $(\tau_k)_{k \in \Z}$ as in~\eqref{eq_assumptions}. We introduce the trivial family $\mathcal{T} := \{ (\b{0}, \lambda) \in \mathcal{X}_1 \times \R \: | \: \lambda \in \R \}$. \begin{steps} \step{Proof of (i).} By Proposition~\ref{prop_mapping}, the maps $F$ resp. $G$ are smooth and vanish on the trivial family $\mathcal{T}$. In view of Proposition~\ref{prop_kernel}, the Crandall-Rabinowitz Theorem shows that $(\b{0}, 0) \in \mathcal{T}$ is a bifurcation point for $F(\b{v}, \lambda) = 0$ resp. $G(\b{v}, \lambda) = 0$ and provides an open interval $J_s \subseteq \R$ containing $0$ and a smooth curve \begin{align*} J_s \to \mathcal{X}_1 \times \R, \qquad \alpha \mapsto (\b{v}^\alpha, \lambda^\alpha) = \left( (v_k^\alpha)_{k \in \Z}, \lambda^\alpha \right) \end{align*} of zeros of $F$ resp. $G$ (we do not denote its dependence on $s$) with $\b{v}^0 = \b{0}, \lambda^0 = 0$ as well as $\frac{\mathrm{d}}{\mathrm{d}\alpha} \big|_{\alpha = 0} \b{v}^\alpha = \b{q}$ where $\b{q}$ is a nontrivial element of the kernel of $DF(\b{0}, 0)$ resp. $DG(\b{0}, 0)$. We let $\b{u}^\alpha := \b{v}^\alpha + \b{w}$ and define polychromatic states $U^\alpha$ as in (i). Then $U^\alpha$ is a classical solution of the cubic Klein-Gordon equation~\eqref{eq_wave} due to Proposition~\ref{prop_mapping} since $F(\b{v}^\alpha, \lambda^\alpha) = 0$ resp. $G(\b{v}^\alpha, \lambda^\alpha) = 0$. By their very definition, the solutions $U^\alpha$ are time-periodic with period $2 \pi / \omega$ (maybe less). This proves (i). \step{Proof of (ii).} Since $F$ resp. $G$ are smooth, so is the map $J_s \to \mathcal{X}_1 \times \R, \: \alpha \mapsto (\b{v}^\alpha, \lambda^\alpha)$. By Proposition~\ref{prop_kernel}, $q_k \neq 0$ if and only if $k = \pm s$, which implies that only the $\pm s$-th components of \begin{align*} \frac{\mathrm{d}}{\mathrm{d}\alpha} \bigg|_{\alpha = 0} \b{u}^\alpha = \frac{\mathrm{d}}{\mathrm{d}\alpha} \bigg|_{\alpha = 0} \b{v}^\alpha = \b{q} \end{align*} do not vanish. For sufficiently small nonzero values of $\alpha$, the solutions $U^\alpha$ are thus nonstationary. In particular, the direction of bifurcation changes when changing the value of $s$, and the associated bifurcating curves are, at least locally, mutually different. \step{Proof of (iii).} We show finally that, under the additional assumption that $\Gamma(x) \neq 0$ for almost all $x \in \R^3$, every non-stationary solution \begin{align*} U^\alpha(t, x) = w_0(x) + v_0^\alpha(x) + \sum_{k=1}^\infty 2 \cos(\omega k t) \: v_k^\alpha(x) \end{align*} in fact possesses infinitely many nontrivial coefficients $v_k^\alpha$. Indeed, assuming the contrary, we can choose a maximal $r > 0$ (since $U^\alpha$ is non-stationary) with $v_r^\alpha \not\equiv 0$ or equivalently $u_r^\alpha = v_r^\alpha + w_r = v_r^\alpha \not\equiv 0$. But then, \begin{align*} v_{3r}^\alpha = \sum_{l+m+n = 3r} \mathcal{R}_{\mu_{3r}}^{\tau_{3r}} [\Gamma \: u_l^\alpha \, u_m^\alpha \, u_n^\alpha] = \mathcal{R}_{\mu_{3r}}^{\tau_{3r}} [\Gamma \: (v_r^\alpha)^3] \not\equiv 0 \end{align*} since the convolution identity implies $- \Delta v_{3r}^\alpha - \mu_{3r} v_{3r}^\alpha = \Gamma \: (v_r^\alpha)^3$, and $\Gamma \: (v_r^\alpha)^3 \not\equiv 0$ since $\Gamma(x) \neq 0$ almost everywhere by assumption. This contradicts the maximality of $r$. \hfill $\square$ \end{steps} \subsection{The Proof of Remark~\ref{rmk} (c)} Finally, as announced in Remark~\ref{rmk}~(c), we verify the nondegeneracy assumption~\eqref{eq_nondegenerate,2} resp.~\eqref{eq_nondegenerate,S} for constant positive $\Gamma$. \begin{lem}[Nondegeneracy, \`{a} la Bates and Shi~\cite{bates}]\label{lem_nondegeneracy} Let $\Gamma \equiv \Gamma_0$ for some $\Gamma_0 > 0$, and assume that $w_0 \in C^2_\mathrm{rad}(\R^3)$ is a radially symmetric solution of~\eqref{eq_w0} the profile of which satisfies $w_0(r) > 0$, $w_0'(r) < 0$ for all $r>0$, and both $w_0(r)$ and $w_0'(r)$ decay exponentially as $r \to \infty$. Then the nondegeneracy property~\eqref{eq_nondegenerate,S} holds, i.e. for any radial, twice differentiable $q_0 \in X_1$ \begin{align*} - \Delta q_0 + q_0 = 3 \Gamma_0 \: w_0^2 \: q_0 \text{ on } \R^3 \qquad \text{implies } \qquad q_0 \equiv 0. \end{align*} \end{lem} This can be proved closely following the line of argumentation by Bates and Shi~\cite{bates}, Theorem~5.4~(6). The main difference is that they state the nondegeneracy result as a spectral property of the operator $- \Delta + m^2 + 3 \Gamma_0 w_0^2: \: H^2(\R^3) \to L^2(\R^3)$ whereas we cannot use the Hilbert space setting but discuss solutions in $X_1$. However, the technique of Bates and Shi (and also of Wei's proof in~\cite{wei}) is based on an expansion at a fixed radius $r > 0$ in terms of the eigenfunctions of the Laplace-Beltrami operator on $L^2(\mathbb{S}^2)$. This provides coefficients depending on $r$, and the conclusions are obtained from the analysis of these profiles on an ODE level using results due to Kwong and Zhang~\cite{kwong}. These ideas apply in the topology of $X_1$ in the very same way; for details, cf.~\cite{myDiss}, (proof of) Lemma~4.11. \section{Proofs of the Auxiliary Results}~\label{ch_wave-proofs} \vspace*{-0.5cm} \begin{proofof}{Proposition~\ref{prop_convolution-x1}} Let $\b{u}^{(j)} = (u^{(j)}_k)_{k \in \Z} \in \mathcal{X}_1$ for $j= 1, 2, 3$. We find the following chain of inequalities \begin{align*} &\norm{\b{u}^{(1)} \star \b{u}^{(2)} \star \b{u}^{(3)}}_{\mathcal{X}_3} = \sum_{k \in \Z} \norm{(\b{u}^{(1)} \star \b{u}^{(2)} \star \b{u}^{(3)})_k}_{X_3} \\ &\quad \leq \sum_{k \in \Z} \sum_{\substack{l, m, n \in \Z \\ l + m + n = k}} \norm{ u_l^{(1)} \, u_m^{(2)} \, u_n^{(3)} }_{X_3} \\ &\quad \leq \sum_{k \in \Z} \sum_{\substack{l, m, n \in \Z \\ l + m + n = k}} \norm{u_l^{(1)}}_{X_1} \, \norm{u_m^{(2)}}_{X_1} \, \norm{u_n^{(3)}}_{X_1} \\ &\quad= \norm{\left( \norm{u_l^{(1)}}_{X_1} \right)_{l \in \Z} \star \left( \norm{u_m^{(2)}}_{X_1} \right)_{m \in \Z} \star \left( \norm{u_n^{(3)}}_{X_1} \right)_{n \in \Z}}_{\ell^1(\Z)} \\ &\quad\leq \norm{\left( \norm{u_l^{(1)}}_{X_1} \right)_{l \in \Z}}_{\ell^1(\Z)} \norm{\left( \norm{u_m^{(2)}}_{X_1} \right)_{m \in \Z}}_{\ell^1(\Z)} \norm{\left( \norm{u_n^{(3)}}_{X_1} \right)_{n \in \Z}}_{\ell^1(\Z)} \\ &\quad = \norm{\b{u}^{(1)}}_{\mathcal{X}_1} \norm{\b{u}^{(2)}}_{\mathcal{X}_1} \norm{\b{u}^{(3)}}_{\mathcal{X}_1}, \end{align*} where finally Young's inequality for convolutions in $\ell^1(\Z)$ has been applied. Since the latter term is finite, we infer $\b{u}^{(1)} \star \b{u}^{(2)} \star \b{u}^{(3)} \in \mathcal{X}_3$. \end{proofof} \begin{proofof}{Proposition~\ref{prop_mapping}} \begin{steps} \step{Decay estimates} The proof of Proposition~\ref{prop_mapping} requires convergence properties in order to handle the infinite series in the definition of $U(t,x)$, which we first provide in the following two lemmas. \begin{lem}\label{lem_scaling} The convolution operators $\mathcal{R}_\mu^\tau: X_3 \to X_1$ satisfy for $\tau \in (0, \pi)$ and $\mu > 0$ \begin{equation*} \qquad \forall \: f \in X_3 \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \begin{split} &\norm{\mathcal{R}_\mu^\tau [f]}_{X_1} \leq \frac{C}{\sin(\tau)} \: \left( 1+\frac{1}{\sqrt{\mu}} \right) \: \cdot \norm{f}_{X_3}, \\ &\norm{\mathcal{R}_\mu^\tau [f]}_{L^4(\R^3)} \leq \frac{C}{\sqrt[4]{\mu} \: \sin(\tau)} \cdot \norm{f}_{L^\frac{4}{3}(\R^3)}. \end{split} \end{equation*} \end{lem} The fact that a power of $\mu$ appears in the denominator is crucial since it will finally provide the convergence and regularity of the polychromatic sums where $\mu = \mu_k = \omega^2 k^2 - m^2$ for $k \in \Z$. \\ The proof of Lemma~\ref{lem_scaling} relies, via rescaling, on the respective estimates for $\mu = 1$. These can be found in~\cite{own_cubic}, pp.~1038--1039 for the $X_3$-$X_1$ estimate and in~\cite{EvequozWeth},~Theorem~2.1 for the $L^{4/3}$-$L^4$ estimate. \begin{lem}\label{lem_uniformdecay} Let $\Gamma \in L^\infty_\mathrm{rad}(\R^3) \cap C^1_\mathrm{loc}(\R^3)$ and assume $\b{u} = (u_k)_{k\in\Z} \in \mathcal{X}_1$ is a sequence of $C^2_\mathrm{loc}$ functions which satisfy the following system of convolution equations: \begin{align*} u_k = \mathcal{R}_{\mu_k}^{\tau_k} [\Gamma \: (\b{u} \star \b{u} \star \b{u})_k] \qquad \qquad \qquad \text{for all } k \in \Z \text{ with } |k| > s \end{align*} where $\mu_k = \omega^2 k^2 - m^2$ and $\tau_k \in (\delta, \pi - \delta)$ for some $\omega > m, \delta \in \left(0, \frac{\pi}{2} \right)$. Then there holds: \begin{itemize} \item[(i)] For every $\alpha \geq 0$, there exists a constant $C_\alpha \geq 0$ with \begin{align*} \norm{u_k}_{L^4(\R^3)} + \norm{\Gamma \: (\b{u} \star \b{u} \star \b{u})_k}_{L^4(\R^3)} \leq C_\alpha \cdot (k^2 + 1)^{-\frac{\alpha}{2}} \qquad (k \in \Z). \end{align*} \item[(ii)] For every ball $B = B_R(0) \subseteq \R^3$ and $\alpha \geq 0$ there exists a constant $D_\alpha(B) \geq 0$ with \begin{align*} |u_k(x)| + |\nabla u_k(x)| + |D^2 u_k(x)| \leq D_\alpha(B) \cdot (k^2 + 1)^{-\frac{\alpha}{2}} \qquad (k \in \Z, x \in B). \end{align*} \item[(iii)] For every $\alpha \geq 0$, there exists a constant $E_\alpha \geq 0$ with \begin{align*} \norm{u_k}_{X_1} \leq E_\alpha \cdot (k^2 + 1)^{-\frac{\alpha}{2}} \qquad (k \in \Z). \end{align*} \end{itemize} \end{lem} The proof of Lemma~\ref{lem_uniformdecay} can also be found in detail in the author's PhD thesis~\cite{myDiss}, Lemma~4.13. We present here the most important step and summarize the remainder briefly, since it is mainly based on the application of (standard) elliptic regularity estimates. As $u_k \in X_1 \cap C^2_\text{loc}(\R^3)$ for all $k \in \Z$ by assumption, it is straightforward to find constants as in the lemma for a finite number of elements $u_{-s}, ..., u_s$. Hence it is sufficient to study those $k \in \Z$ with $|k| > s$; for these, we have $\mu_k = k^2 \omega^2 - m^2 \geq c_s (k^2 +1)$ for some positive $c_s > 0$ depending on the parameters $\omega$ and $m$. The decay estimates of arbitrary order in $k$ we aim to prove essentially go back to the $L^{4/3}$-$L^4$ scaling property stated in Lemma~\ref{lem_scaling} above. Indeed, due to $\delta < \tau_k < \pi - \delta$, it provides $C_1 = C_1(\norm{\Gamma}_\infty, \delta, \omega, m, s) \geq 0$ with \begin{align}\label{eq_proof-scale-k} \norm{u_k}_{L^4(\R^3)} \leq \frac{C_1}{(k^2 + 1)^\frac{1}{4}} \: \norm{(\b{u} \star \b{u} \star \b{u})_k}_{L^\frac{4}{3}(\R^3)} \qquad \text{for all } k \in \Z. \end{align} With that, assuming $\sum_{k \in \Z} (k^2 + 1)^\frac{\alpha}{2} \norm{u_k}_{L^4(\R^3)} < \infty$ for some $\alpha \geq 0$ (which is trivially satisfied for $\alpha = 0$ since $\b{u} \in \mathcal{X}_1$), one can iterate as follows \begin{align*} &\sum_{k \in \Z} (k^2 + 1)^\frac{\alpha + 1/2}{2} \: \norm{u_k}_{L^4(\R^3)} \overset{\eqref{eq_proof-scale-k}}{\leq} C_1 \: \sum_{k \in \Z} (k^2 + 1)^\frac{\alpha}{2} \: \norm{(\b{u} \star \b{u} \star \b{u})_k}_{L^\frac{4}{3}(\R^3)} \\ & \quad \leq C_1 \: \sum_{k \in \Z} \sum_{l+m+n = k} ((l+m+n)^2 + 1)^\frac{\alpha}{2} \norm{u_l}_{L^4(\R^3)} \, \norm{u_m}_{L^4(\R^3)} \, \norm{u_n}_{L^4(\R^3)} \\ & \quad \leq 2^\alpha \: C_1 \: \sum_{k \in \Z} \sum_{l+m+n = k} \left[ (l^2 + 1)^\frac{\alpha}{2} \norm{u_l}_{L^4(\R^3)} \, (m^2 + 1)^\frac{\alpha}{2} \norm{u_m}_{L^4(\R^3)} \, (n^2 + 1)^\frac{\alpha}{2} \norm{u_n}_{L^4(\R^3)} \right] \\ & \quad = 2^\alpha \: C_1 \: \left( \sum_{k \in \Z} (k^2 + 1)^\frac{\alpha}{2} \norm{u_k}_{L^4(\R^3)} \right)^3 \\ & \quad < \infty. \end{align*} This shows the first part of the estimate in (i), and the second part follows by combining the former with the interpolation estimate \begin{align*} \norm{u_l u_m u_n}_{L^4(\R^3)} &\leq \norm{u_l}_{L^{12}(\R^3)}\norm{u_m}_{L^{12}(\R^3)}\norm{u_n}_{L^{12}(\R^3)} \\ &\leq \left[ \norm{u_l}_{L^{4}(\R^3)}\norm{u_m}_{L^{4}(\R^3)}\norm{u_n}_{L^{4}(\R^3)} \right]^\frac{1}{3} \: \Big[ \norm{u_l}_{\infty}\norm{u_m}_{\infty}\norm{u_n}_{\infty} \Big]^\frac{2}{3} \\ &\leq \left[ \norm{u_l}_{L^{4}(\R^3)}\norm{u_m}_{L^{4}(\R^3)}\norm{u_n}_{L^{4}(\R^3)} \right]^\frac{1}{3} \: \norm{\b{u}}^2_{\mathcal{X}_1}. \end{align*} The local estimate in (ii) can be derived from the global $L^4$ bounds in (i) using elliptic regularity, which first provides estimates in $W^{2,4}_\text{loc}(\R^3)$ and then is suitable Hölder spaces. The estimate (iii) in the $X_1$ norm essentially uses the explicit representations (given $f \in X_3$) \begin{align*} &\mathcal{R}_\mu^\tau [f](x) = \int_{\R^3} \frac{\sin(|x-y|\sqrt{\mu_k} + \tau_k)}{4 \pi |x-y| \sin(\tau_k)} \cdot f(y) \: \mathrm{d}y \\ & = \frac{\sin(|x| \sqrt{\mu_k} + \tau_k)}{|x| \sin(\tau_k)} \int_0^{|x|} \frac{\sin(r \sqrt{\mu_k}) }{r \sqrt{\mu_k}} f(r) \: r^2 \: \mathrm{d}r + \frac{\sin(|x| \sqrt{\mu_k})}{|x| \sin(\tau_k)} \int_{|x|}^\infty \frac{\sin(r \sqrt{\mu_k} + \tau_k) }{r \sqrt{\mu_k}} f(r) \: r^2 \: \mathrm{d}r. \end{align*} Starting here, Hölder's inequality and (i) yield (iii); again, for details, cf.~\cite{myDiss}. \step{Mapping properties of $F$ resp. $G$.} For $\lambda \in \R$ and $\b{v} \in \mathcal{X}_1$, we set $\b{u} := \b{w} + \b{v}$ and recall the defining equations~\eqref{eq_F}~and~\eqref{eq_G}: \begin{align*} &F(\b{v}, \lambda)_{k} := v_k - \begin{cases} \mathcal{P}_{\mu_0} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_0 - \Gamma \: w_0^3 \right] & k = 0, \\ \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] \\ \qquad + (\cot(\tau_{\pm s}) - \lambda) \tilde{\Psi}_{\mu_s} \ast \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] & k = \pm s, \\ \mathcal{R}_{\mu_k}^{\tau_{k}} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{k} \right] & \text{else}; \end{cases} \\ &G(\b{v}, \lambda)_{k} := v_k - \begin{cases} \mathcal{P}_{\mu_0} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_0 - \Gamma \: w_0^3 \right] & k = 0, \\ \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] \\ \qquad + (1 - \lambda) \left( \alpha^{(\mu_s)}(v_{\pm s}) + \beta^{(\mu_s)}(v_{\pm s}) \right) \tilde{\Psi}_{\mu_s} & k = \pm s, \\ \mathcal{R}_{\mu_k}^{\tau_{k}} \left[ \Gamma \: \left(\b{u} \star \b{u} \star \b{u}\right)_{k} \right] & \text{else}. \end{cases} \end{align*} Our main concern will be convergence of the infinite sums related to the space $\mathcal{X}_1 = \ell^1_\mathrm{sym}(\Z, X_1)$. Noticing that $F$ and $G$ only differ in the $\pm s$-th component, and that the scalar parameter $\lambda$ only appears as a multiplicative factor, we solely discuss smoothness of the map $F(\,\cdot\, , \lambda): \mathcal{X}_1 \to \mathcal{X}_1$ with $\lambda \in \R$ fixed. The main tool is the following uniform norm estimate for the operators appearing in the components of $F$. Recalling that $\tau_k \in \{ \frac{\pi}{4}, \frac{3\pi}{4} \}$ for $k \neq 0, \pm s$ by~\eqref{eq_assumptions}, Lemma~\ref{lem_scaling} above (for $k \neq 0, \pm s$) as well as the continuity properties stated in Lemmas~\ref{lem_convol} and~\ref{lem_linS} (for $k = \pm s$ and $k = 0$, respectively) provide a constant $C_0 = C_0(\lambda, \tau_s, \omega, m) > 0$ with \begin{equation}\label{eq_proof-C0} \begin{split} &\norm{\mathcal{R}_{\mu_k}^{\tau_{k}}}_{\mathcal{L}(X_3, X_1)} \leq C_0 \quad (k \in \Z \setminus \{ \pm s \}), \\ &\norm{\mathcal{R}_{\mu_s}^{\pi/2}}_{\mathcal{L}(X_3, X_1)} \leq \frac{C_0}{2}, \:\: \norm{(\cot(\tau_{\pm s}) - \lambda) \: \tilde{\Psi}_{\mu_s} \ast}_{\mathcal{L}(X_3, X_1)} \leq \frac{C_0}{2}, \\ &\norm{\mathcal{P}_{\mu_0}}_{\mathcal{L}(X_3, X_1)} \leq C_0. \end{split} \end{equation} We now let $\b{v} \in \mathcal{X}_1$ and define $\b{u} = \b{v} + \b{w}$. Since $\Gamma$ is assumed to be continuous and bounded, Proposition~\ref{prop_convolution-x1} implies that $\Gamma \: \left(\b{u}\star\b{u}\star\b{u}\right) \in \mathcal{X}_3$. Thus every component $F(\b{v}, \lambda)_k$ is a well-defined element of $X_1$, and we estimate \begin{align*} \norm{F(\b{v}, \lambda)}_{\mathcal{X}_1} &= \sum_{k \in \Z} \norm{F(\b{v}, \lambda)_k}_{X_1} \\ & \overset{\eqref{eq_proof-C0}}{\leq} \norm{\b{v}}_{\mathcal{X}_1} + C_0 \norm{\Gamma w_0^3}_{X_3} + C_0 \sum_{k \in \Z} \norm{\Gamma \left(\b{u} \star \b{u} \star \b{u}\right)_k}_{X_3} \\ & \!\!\! \overset{\text{Prop.}~\ref{prop_convolution-x1}}{\leq} \norm{\b{v}}_{\mathcal{X}_1} + C_0 \norm{\Gamma}_\infty \norm{w_0}_{X_1}^3 + C_0 \norm{\Gamma}_\infty \norm{\b{u}}_{\mathcal{X}_1}^3. \end{align*} This is finite, hence $F(\b{v}, \lambda) \in \mathcal{X}_1$ as asserted. Since $F(\,\cdot\, , \lambda)$ is a combination of continuous linear operators and polynomials in the convolution algebra, essentially the same estimates can be used to show differentiability (to arbitrary order); one thus obtains in particular~\eqref{eq_DF}. \step{Solution properties of $u_k(x)$.} First of all, recalling that $\b{w} = (..., 0, w_0, 0, ...)$ and hence $(\b{w} \star \b{w} \star \b{w})_k = \delta_{k, 0} \, w_0^3$ for $k \in \Z$, one can immediately see that $F(\b{0},\lambda) = G(\b{0},\lambda) = \b{0}$ for all $\lambda \in \R$. Let us now assume that $F(\b{v}, \lambda) = 0$ resp. $G(\b{v}, \lambda) = 0$ for some $\b{v} \in \mathcal{X}_1$ and $\lambda \in \R$. Again, we define $\b{u} := \b{v} + \b{w}$, and summarize \begin{align*} u_0 - w_0 &= v_0 = \mathcal{P}_{\mu_0} \left[ \Gamma \left(\b{u} \star \b{u} \star \b{u}\right)_0 - \Gamma \: w_0^3 \right], \\ u_{\pm s} &= v_{\pm s} = \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right] + \begin{cases} (\cot(\tau_s) - \lambda) \tilde{\Psi}_{\mu_s} \ast \left[ \Gamma \left(\b{u} \star \b{u} \star \b{u}\right)_{\pm s} \right], \\ (1 - \lambda) \left( \alpha^{(\mu_s)}(v_{\pm s}) + \beta^{(\mu_s)}(v_{\pm s}) \right) \tilde{\Psi}_{\mu_s}, \end{cases} \\ u_k &= v_k = \mathcal{R}_{\mu_k}^{\tau_k} \left[ \Gamma \left(\b{u} \star \b{u} \star \b{u}\right)_k \right] \qquad (k \in \Z \setminus \{ 0, \pm s \}). \end{align*} By choice of $\tau_k$ in equation~\eqref{eq_assumptions}, we observe in particular that the requirements of Lemma~\ref{lem_uniformdecay} are satisfied with any $\delta < \frac{\pi}{4}$, which we will rely on throughout the subsequent steps. But first, according to Lemmas~\ref{lem_convol}~and~\ref{lem_linS}, $v_k, u_k \in X_1 \cap C^2_\mathrm{loc}(\R^3)$ satisfy the differential equations \begin{align*} - \Delta v_k - \mu_k v_k = \Gamma (x) \: \big[ (\b{u}\star\b{u}\star\b{u})_k - \delta_{k,0} w_0^3 \big] \quad \text{on } \R^3 \end{align*} or equivalently, in view of $\b{w} = (..., 0, w_0, 0, ...)$, of~\eqref{eq_w0} and of $\mu_k = \omega^2 k^2 - m^2$, \begin{align}\label{eq_stationary-proof} - \Delta u_k - (\omega^2 k^2 - m^2) u_k = \Gamma (x) \: (\b{u}\star\b{u}\star\b{u})_k \quad \text{on } \R^3. \end{align} We now define formally for $t \in \R, x \in \R^3$ \begin{align}\label{eq_poly-proof} U(t, x) := w_0(x) + v_0(x) + \sum_{k=1}^\infty 2 \cos(\omega kt) \: v_k(x) = \sum_{k \in \Z} \mathrm{e}^{\i \omega k t} \: u_k(x). \end{align} Since by assumption $\b{u} = \b{v} + \b{w} \in \ell^1(\Z, X_1)$, the Weierstrass M-test asserts that the sum in~\eqref{eq_poly-proof} converges in $X_1$ uniformly with respect to $t \in \R$, and hence the map $t \mapsto U(t, \,\cdot \,)$ is continuous as a map from $\R$ to $X_1$. We next show stronger regularity properties of $U(t,x)$. \step{Differentiability of $U(t, x)$.} We prove that the map $t \mapsto U(t, \,\cdot \,)$, when interpreted as a map from $\R$ to $X_1$, possesses two continuous time derivatives given by \begin{align*} \partial_t U(t, \,\cdot \,) = \sum_{k \in \Z} \i \omega k \: \mathrm{e}^{\i \omega k t} \: u_k, \qquad \partial_t^2 U(t, \,\cdot \,) = \sum_{k \in \Z} -\omega^2 k^2 \: \mathrm{e}^{\i \omega k t} \: u_k. \end{align*} Indeed, term-by-term differentiation is justified since the sums above as well as in~\eqref{eq_poly-proof} converge in $X_1$ uniformly with respect to time. This is a consequence of the Weierstraß M-test and the decay estimate in Lemma~\ref{lem_uniformdecay}~(iii). Hence, as asserted, the map $t \mapsto U(t, \,\cdot \,)$ is twice continuously differentiable as a map from $\R$ to $X_1$ - the same strategy yields in fact $C^\infty$ regularity in time. Similarly, the local regularity estimate in Lemma~\ref{lem_uniformdecay}~(ii) implies $U \in C^2(\R \times B)$ for every given ball $B = B_R(0) \subseteq \R^3$ again via term-by-term differentiation. Since the radius of the ball $B$ is arbitrary, we conclude for $t \in \R$ and all $x \in \R^3$ \begin{align*} \left[ \partial_t^2 - \Delta + m^2 \right] U(t, x) &= \sum_{k \in \Z} \mathrm{e}^{\i \omega k t} \: \left[ -\omega^2 k^2 - \Delta + m^2 \right] u_k(x) \\ &\!\!\overset{\eqref{eq_stationary-proof}}{=} \sum_{k \in \Z} \mathrm{e}^{\i \omega k t} \: \Gamma(x) \: \sum_{l+m+n = k} u_l(x) \, u_m(x) \, u_n(x) \\ &= \Gamma(x) \: \left( \sum_{l \in \Z} \mathrm{e}^{\i \omega l t} \: u_l(x) \right) \left( \sum_{m \in \Z} \mathrm{e}^{\i \omega m t} \: u_m(x) \right) \left( \sum_{n \in \Z} \mathrm{e}^{\i \omega n t} \: u_n(x) \right) \\ &= \Gamma(x) \: U(t,x)^3 \end{align*} where the re-ordering of the summation is justified by absolute convergence of the sums. Thus $U$ is shown to be a classical solution of the Klein-Gordon equation~\eqref{eq_wave}. \end{steps} \end{proofof} \begin{proofof}{Proposition~\ref{prop_kernel}} We prove the statement for the map $F$ and then comment on the aspects that differ in case of $G$. Using formula~\eqref{eq_DF}, we find for $k \in \Z$ and $\b{q} \in \mathcal{X}_1$, recalling that $w_k = 0$ for $k \in \Z \setminus \{ 0 \}$ and that $\mathcal{R}_{\mu_s}^{\tau_s} = \mathcal{R}_{\mu_s}^{\pi/2} + \cot(\tau_s) \, \tilde{\Psi}_{\mu_s} \ast$, \begin{align*} &DF(\b{0}, 0)[\b{q}]_k = q_k - 3 \: \mathcal{R}_{\mu_k}^{\tau_k} [\Gamma \: (\b{q} \star \b{w} \star \b{w})_k] = q_k - 3 \: \mathcal{R}_{\mu_k}^{\tau_k} \left[ \Gamma \: w_0^2 \cdot q_k \right], \\ &DF(\b{0}, 0)[\b{q}]_0 = q_0 - 3 \: \mathcal{P}_{\mu_0} [\Gamma \: (\b{q} \star \b{w} \star \b{w})_0] = q_0 - 3 \: \mathcal{P}_{\mu_0} \left[ \Gamma \: w_0^2 \cdot q_0 \right]. \end{align*} For $\b{q} \in \ker DF(\b{0}, 0)$, and in view of the choice of $\tau_k$ in~\eqref{eq_assumptions}, the nondegeneracy properties~\eqref{eq_nondegenerate} imply $q_k \equiv 0$ for $k \in \Z, k \neq \pm s$. Since $\tau_{\pm s} = \sigma_{s}$ in~\eqref{eq_assumptions}, Proposition~\ref{prop_chapter2} guarantees the existence of a nontrivial solution $q_s \in X_1$ of \begin{align}\label{eq_qs-case1} q_s = 3 \: \mathcal{R}_{\mu_s}^{\tau_s} \left[ \Gamma \: w_0^2 \cdot q_s \right] \end{align} which is unique up to a multiplicative factor. Hence $\ker DF(\b{0}, 0)$ has the asserted form. (We recall here that we consider the subspace of symmetric sequences, whence $q_{-s} = q_s$.) Further, by Lemmas~\ref{lem_convol}~and~\ref{lem_linS} in the final Section~\ref{sect_helmholtz}, the operators \begin{align*} X_1 \to X_1, \qquad \begin{cases} q_k \mapsto q_k - 3 \: \mathcal{R}_{\mu_k}^{\tau_k} \left[ \Gamma \: w_0^2 \cdot q_k \right] & (k \neq 0) \\ q_0 \mapsto q_0 - 3 \: \mathcal{P}_{\mu_0} \left[ \Gamma \: w_0^2 \cdot q_0 \right] \end{cases} \end{align*} are linear compact perturbations of the identity and so $\ker DF(\b{0}, 0)$ is 1-1-Fredholm. In order to verify transversality, we compute for $k \in \Z$ and $\b{q} \in \ker DF(\b{0}, 0) \setminus \{ \b{0} \}$ \begin{align*} \partial_\lambda DF(\b{0}, 0)[\b{q}]_k = \begin{cases} 3 \: \tilde{\Psi}_{\mu_s} \ast [ \Gamma \: w_0^2 \, q_s ], & k = \pm s, \\ 0, & \text{else}. \end{cases} \end{align*} Assuming for contradiction that $\partial_\lambda DF(\b{0}, 0)[\b{q}] = DF(\b{0}, 0)[\b{p}]$ for some $\b{p} \in \mathcal{X}_1$, we infer in particular that the component $p_s$ satisfies the convolution identity \begin{align}\label{eq_aux-transversal} p_s - 3 \: \mathcal{R}_{\mu_s}^{\tau_s} \left[ \Gamma \: w_0^2 \cdot p_s \right] = 3 \: \tilde{\Psi}_{\mu_s} \ast [ \Gamma \: w_0^2 \cdot q_s ] \end{align} and hence, following Lemmas~\ref{lem_convol},~\ref{lem_linH} \begin{align*} - \Delta p_s - \mu_s p_s = 3 \: \Gamma(x) \: w_0^2(x) \, p_s \quad \text{on } \R^3, \end{align*} which is also nontrivially solved by $q_s$ as a consequence of~\eqref{eq_qs-case1}. Due to the uniqueness statement in Proposition~\ref{prop_chapter2}, this implies that $p_s = c \cdot q_s$ for some $c \in \R$. But then, applying~\eqref{eq_qs-case1} to~\eqref{eq_aux-transversal}, we obtain $ \tilde{\Psi}_{\mu_s} \ast [ \Gamma \: w_0^2 \cdot q_s ] = 0$. Hence by the asymptotic expansion in Lemma~\ref{lem_convol} \begin{align*} \widehat{\Gamma w_0^2 q_s} (\sqrt{\mu_s}) = 0 \end{align*} and therefore, due to $q_s = 3 \: \mathcal{R}^{\tau_s}_{\mu_s} [ \Gamma \: w_0^2 \, q_s ]$ and Lemma~\ref{lem_linH}, \begin{align*} q_s(x) = O\left(\frac{1}{|x|^2}\right) \text{ as } |x| \to \infty. \end{align*} This contradicts Proposition~\ref{prop_chapter2} stating that the leading-order term as $|x| \to \infty$ of a nontrivial solution $q_s$ of $- \Delta q_s - \mu_s q_s = 3 \: \Gamma(x) \: w_0^2(x) \, q_s$ cannot vanish. In the case $\tau_s = 0$, we see as above that $\b{q} \in \ker DG(\b{0}, 0)$ if and only if $q_k = 0$ for $k \neq \pm s$, and that $q_{s} = q_{-s}$ can be chosen to be the (nontrivial) solution of \begin{align}\label{eq_qs-case2} q_s = 3 \: \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: w_0^2 \cdot q_s \right] + \alpha^{(\mu_s)}(q_s) \: \tilde{\Psi}_{\mu_s} \quad \text{with } \quad \beta^{(\mu_s)}(q_s) = 0. \end{align} Similarly, $\ker DG(\b{0}, 0)$ is 1-1-Fredholm. We again assume for contradiction that there is $\b{p} \in \mathcal{X}_1$ with $\partial_\lambda DG(\b{0}, 0)[\b{q}] = DG(\b{0}, 0)[\b{p}]$, which implies in particular \begin{equation}\label{eq_aux-transversal-2} p_s - 3 \: \mathcal{R}_{\mu_s}^{\pi/2} \left[ \Gamma \: w_0^2 \cdot p_s \right] - \left( \alpha^{(\mu_s)}(p_s) + \beta^{(\mu_s)}(p_s) \right) \tilde{\Psi}_{\mu_s} = \alpha^{(\mu_s)}(q_s) \tilde{\Psi}_{\mu_s} \end{equation} with $\beta^{(\mu_s)}(q_s) = 0$. Thus, according to Lemma~\ref{lem_convol}, $p_s$ solves the differential equation \begin{align*} - \Delta p_s - \mu_s p_s = 3 \: \Gamma(x) \: w_0^2(x) \, p_s \quad \text{on } \R^3, \end{align*} which is also solved by $q_s$, see equation~\eqref{eq_qs-case2}. As before, the uniqueness property in Proposition~\ref{prop_chapter2} implies $p_s = c \cdot q_s$ for some $c \in \R$, and inserting this into the identity~\eqref{eq_aux-transversal-2}, comparison with~\eqref{eq_qs-case2} yields $\alpha^{(\mu_s)}(q_s) = 0$. Since also $\beta^{(\mu_s)}(q_s) = 0$, we infer from the definition of the functionals $\alpha^{(\mu_s)}, \beta^{(\mu_s)}$ preceding Lemma~\ref{lem_linH-0} that, again, $q_s(x) = O(1/|x|^2)$, contradicting Proposition~\ref{prop_chapter2}. \end{proofof} \section{Appendix: Stationary Linear Helmholtz and Schrödinger Equations}\label{sect_helmholtz} Given $\mu > 0$, we study aspects of the solution theory of the linear equations \begin{align}\label{eq_linSH} - \Delta u \pm \mu u = f \qquad \text{on } \R^3. \end{align} In the case of a ``$+$'', equation~\eqref{eq_linSH} is said to be a Schrödinger equation. Given any right-hand side $f \in L^2(\R^3)$, a unique solution $u \in H^2(\R^3)$ can be obtained by applying the resolvent $(- \Delta + \mu)^{-1}$, which can be calculated explicitly by applying the Fourier transform \begin{align*} u = (- \Delta + \mu)^{-1} f = \int_{\R^3} \frac{\hat{f}(\xi)}{|\xi|^2 + \mu} \: \mathrm{e}^{\mathrm{i} \skp{\,\cdot\,}{\xi}} \: \frac{\mathrm{d}\xi}{(2\pi)^{3/2}}. \end{align*} In the case of a Helmholtz equation, i.e. of a ``$-$'' sign in~\eqref{eq_linSH}, this is not possible since $\mu > 0$ belongs to the essential spectrum of $- \Delta$ on $\R^3$. A well-established strategy to find solutions in spaces other than $L^2(\R^3)$ is known as Limiting Absorption Principle(s). The idea is to replace $\mu$ by $\mu + \i \varepsilon$, apply an $L^2$-resolvent, and pass to the limit $\varepsilon \to 0$ in a suitable topology, i.e. formally \begin{align*} u = `` \lim_{\varepsilon \searrow 0}" \: (- \Delta - (\mu + \i \varepsilon))^{-1} f = `` \lim_{\varepsilon \searrow 0}" \: \int_{\R^3} \frac{\hat{f}(\xi)}{|\xi|^2 - (\mu + \i \varepsilon)} \: \mathrm{e}^{\mathrm{i} \skp{\,\cdot\,}{\xi}} \: \frac{\mathrm{d}\xi}{(2\pi)^{3/2}}. \end{align*} Using tools from harmonic analysis, such a construction of solutions of linear inhomogeneous Helmholtz equations has been successfully done by Agmon~\cite{agmon-scattering} in weighted $L^2$ spaces, and by Kenig, Ruiz and Sogge~\cite{Kenig} as well as Guti\'{e}rrez~\cite{Gutierrez} in certain pairs of $L^p$ spaces. The resolvent-type operator is, then, for sufficiently nice $f$, given by a convolution \begin{align*} u = \frac{\mathrm{e}^{\i | \, \cdot \, | \sqrt{\mu}}}{4 \pi |\, \cdot \, |} \ast f. \end{align*} Such studies are completed by characterizations of the so-called Herglotz waves, i.e. the solutions of the homogeneous equation $- \Delta u - \mu u = 0$ on the respective spaces, see e.g.~\cite{agmon}. \medskip We study the case of (real-valued, radial) functions $f \in X_3, u \in X_1$ with the Banach spaces \begin{align*} X_q &:= \left\{ v \in C_\mathrm{rad}(\R^3) \big| \: \norm{v}_{X_q} := \norm{(1 + |\cdot|^2)^\frac{q}{2} v}_\infty < \infty \right\}, \qquad q \in \{ 1, 3 \}. \end{align*} These have been successfully applied in solving systems of cubic Helmholtz equations in~\cite{own_cubic}. Let us again point out that the decay rate prescribed in $X_1$ is the natural one for solutions of Helmholtz equations on the full space $\R^3$. Such solutions of the Helmholtz equation \begin{align}\label{eq_linH} - \Delta u - \mu u = f \qquad \text{on } \R^3 \end{align} can be obtained using convolution operators with kernels $\Psi_\mu, \tilde{\Psi}_\mu$ given by \begin{align*} \Psi_\mu(x) = \frac{\cos(|x|\sqrt{\mu})}{4 \pi |x|}, \qquad \tilde{\Psi}_\mu(x) = \frac{\sin(|x|\sqrt{\mu})}{4 \pi |x|} \qquad (x \in \R^3 \setminus \{ 0 \}). \end{align*} Here $\Psi_\mu, \tilde{\Psi}_\mu$ are radial solutions of the homogeneous Helmholtz equation on $\R^3 \setminus \{ 0 \}$. We notice that $\tilde{\Psi}_\mu$ extends to a smooth solution of $- \Delta u - \mu u = 0$ in $X_1$ and it is, up to constant multiples, the only one. Moreover, the following holds: \begin{lem}[\cite{own_cubic}, Proposition~4]\label{lem_convol} The convolution operators $f \mapsto \Psi_\mu \ast f$, $f \mapsto \tilde{\Psi}_\mu \ast f$ are well-defined, linear and compact as operators from $X_3$ to $X_1$. Moreover, given $f \in X_3$, the functions $w := \Psi_\mu \ast f$ and $\tilde{w} := \tilde{\Psi}_\mu \ast f$ belong to $X_1 \cap C^2_{\mathrm{loc}}(\R^3)$ and satisfy \begin{align*} &- \Delta w - \mu w = f \quad \text{on } \R^3, \qquad w(x) = 4\pi \: \sqrt{\frac{\pi}{2}} \: \hat{f}(\sqrt{\mu}) \: \: \Psi_\mu(x) + O\left( \frac{1}{|x|^2} \right); \\ &- \Delta \tilde{w} - \mu \tilde{w} = 0 \quad \text{on } \R^3, \qquad \tilde{w}(x) = 4\pi \: \sqrt{\frac{\pi}{2}} \: \hat{f}(\sqrt{\mu}) \: \: \tilde{\Psi}_\mu(x). \end{align*} \end{lem} Here $\hat{f}(\sqrt{\mu})$ refers to the profile of the Fourier transform on $\R^3$. Working in a radial setting with strongly decaying inhomogeneities $f \in X_3$, the properties in the previous Lemma (and in the following ones) can be verified immediately by explicit calculations and need not be derived from suitable Limiting Absorption Principles; for details, we refer to the earlier article~\cite{own_cubic}. The study of conditions guaranteeing uniqueness of solutions of~\eqref{eq_linH} in $X_1$ involves the characterization of Herglotz waves in $X_1$, which are all multiples of $\tilde{\Psi}_\mu$. As in~\cite{own_cubic}, inspired by the analysis of the so-called far field of solutions of Helmholtz equations in scattering theory, we impose asymptotic conditions governing the leading-order contribution of $u(x)$ as $|x| \to \infty$. For $\tau \in (0, \pi)$, we introduce \begin{align*} \mathcal{R}_{\mu}^{\tau} [f] = \Psi_\mu \ast f + \cot(\tau) \: \tilde{\Psi}_\mu \ast f = \frac{\sin(|\,\cdot\,| \sqrt{\mu} + \tau)}{4\pi \sin(\tau) \: |\,\cdot\,|} \ast f. \end{align*} Then, using the above Lemma~\ref{lem_convol}, one obtains: \begin{lem}[\cite{own_cubic}, Corollary~5]\label{lem_linH} Let $\tau \in (0, \pi)$ and $\mu > 0$. Then the operator $\mathcal{R}_{\mu}^{\tau}: X_3 \to X_1$ is well-defined, linear and compact. Moreover, given $f \in X_3$, we have $u = \mathcal{R}_{\mu}^{\tau} [f]$ if and only if $u \in C^2_{\mathrm{loc}}$ with \begin{align*} - \Delta u - \mu u = f \quad \text{on } \R^3, \qquad u(x) = c \cdot \frac{\sin(|x| \sqrt{\mu} + \tau)}{|x|} + O\left( \frac{1}{|x|^2} \right) \quad \text{as } |x| \to \infty \end{align*} for some $c \in \R$, and in this case $c = \frac{1}{\sin(\tau)} \: \sqrt{\frac{\pi}{2}} \: \hat{f}(\sqrt{\mu})$. \end{lem} Handling the case of far field conditions with $\tau = 0$ is somewhat more delicate since the existence of the solution $\tilde{\Psi}_\mu$ (which satisfies exactly this condition) excludes an analogous uniqueness statement. For proving Theorem~\ref{thm_poly}, the following setting is suitable. First, by the Hahn-Banach Theorem, we define continuous linear functionals $\alpha^{(\mu)}, \beta^{(\mu)} \in X'_1$ with the property that, for $u \in X_1$ with \begin{align*} u(x) = \alpha_u \cdot \tilde{\Psi}_\mu(x) + \beta_u \cdot \Psi_\mu(x) + O\left( \frac{1}{|x|^2} \right) \quad \text{as } |x| \to \infty, \end{align*} we have $\alpha^{(\mu)}(u) = \alpha_u$ and $\beta^{(\mu)}(u) = \beta_u$, cf. \cite{own_cubic}, equation~(13) and the following explanations. Then, the following analogue of Lemma~\ref{lem_linH} holds. \begin{lem}\label{lem_linH-0} Given $f \in X_3$, we have $u = \mathcal{R}_{\mu}^{\pi/2} [f] + (\alpha^{(\mu)}(u) + \beta^{(\mu)}(u)) \cdot \tilde{\Psi}_\mu$ if and only if $u \in C^2_{\mathrm{loc}}$ with \begin{align*} - \Delta u - \mu u = f \quad \text{on } \R^3, \qquad u(x) = c \cdot \frac{\sin(|x| \sqrt{\mu})}{|x|} + O\left( \frac{1}{|x|^2} \right) \quad \text{as } |x| \to \infty \end{align*} for some $c \in \R$. In this case, $\beta^{(\mu)}(u) = 0$. \end{lem} These results will allow to handle the nonlinear Helmholtz equations in~\eqref{eq_stationary_2}; for the proofs, we refer to the corresponding parts of~\cite{own_cubic}. Nonlinear Schrödinger equations such as \begin{align}\label{eq_linS} - \Delta u + \mu u = f \qquad \text{on } \R^3 \end{align} for some $\mu > 0$ can also be discussed in a similar setting, which is certainly neither optimal nor most elegant but perfectly suitable for our purpose as another analogue of Lemma~\ref{lem_convol}. \begin{lem}\label{lem_linS} Let $\mu > 0$. Then the operator \begin{align*} \mathcal{P}_{\mu}: X_3 \to X_1, \quad f \mapsto \frac{\mathrm{e}^{-|\,\cdot\,| \sqrt{\mu}}}{4 \pi | \, \cdot \, |} \ast f \end{align*} is well-defined, linear and compact. Moreover, given $f \in X_3$, we have $u := \mathcal{P}_\mu [f] \in X_3 \cap C^2_\mathrm{loc}(\R^3)$, and $u$ is a solution in $X_1$ of \begin{align*} - \Delta u + \mu u = f \quad \qquad \text{on } \R^3. \end{align*} \end{lem} For details on the proof, which is similar to that of Lemma~\ref{lem_convol} but with less difficulties due to the strongly localized kernel, cf.~\cite{myDiss},~Lemma~4.10. Let us remark that, in the Schrödinger case, we do not obtain a family of possible ``resolvent-type'' operators as $\mathcal{R}_1^\tau = \mathcal{R}_1 + \cot(\tau) \tilde{\mathcal{R}}_1$, $0 < \tau < \pi$, in the Helmholtz case. This is due to the fact that the homogeneous Schrödinger equation $- \Delta u + \mu u = 0$ has no smooth and localized nontrivial solution in $X_1$. In particular, a major consequence in our study of Klein-Gordon breathers is that we have to impose nondegeneracy of $w_0$ as an assumption rather than, as in the Helmholtz case, generate it by choosing an appropriate resolvent $\mathcal{R}_1^\tau$, as will be done in~\eqref{eq_assumptions},~\eqref{eq_nondegenerate,1} below. \section*{Acknowledgements} Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 258734477 – SFB 1173. The construction of breather solutions of a similar wave-type equation is a major result of the author's dissertation thesis and can be found partly verbatim in~\cite[Chapter 4]{myDiss}. Special thanks goes in particular to my PhD advisor Dr. Rainer Mandel who encouraged me to work on this topic and provided advice whenever asked. \bibliographystyle{abbrv}
\section{Conclusion} \label{s:concl} QuAMax{} is the first design, implementation and experimental evaluation of a quantum\hyp{}computing solver for the computationally challenging ML MIMO decoding problem. Our performance results establish a baseline for a future fully-integrated systems in the context of the centralized RAN architecture. We show that once engineering efforts optimize the integration between quantum and conventional computation, quantum computation should be considered a competitive technology for the future design of high\hyp{}capacity wireless networks. \paragraph{Future Work.} There are several improvements over the design we have evaluated here. First, we anticipate that further optimization of $|J_{F}|$, $T_a$, and $s_p$ as well as new QA techniques such as \emph{reverse annealing} \cite{ReverseVenturelli} may close the gap to \emph{Opt} performance. Second, there are changes in QA architecture expected in annealers due this year \cite{2019arXiv190107636D} featuring qubits with $2\times$ the degree of Chimera, $2\times$ the number of qubits and with longer range couplings. Based on similar gains in recent results on different problem domains \cite{hamerly2019}, we anticipate this will permit ML problems of size, \emph{e.g.} $175\times175$ for QPSK and dramatically increase the parallelization opportunity of the chip due to the reduced embedding overhead where each chain now only requires $N/12+1$ qubits. Going forward, we will benefit from QA technology improvements from the international community manufacturing quantum annealers with advanced capabilities. According to the development roadmap for these next\hyp{}generation quantum optimizers, it is expected that in \emph{ca.} a decade a system such as QuAMax{} could be based on chips with tens of thousands of highly-connected qubits, with annealing schedules capable of more advanced quantum effects (\emph{e.g.} non\hyp{}stoquasticity~\cite{novikov2018exploring}) and engineering advances will have order-of-magnitude improvements on the aforementioned overhead operation times. While quantum annealers are ahead in terms of number of qubits, gate-model systems offer additional controls that may conceivably increase performance in the future. We will investigate MIMO ML decoding on gate-model QPUs in future work, which currently cannot support algorithms that decode more than 4$\times$4 BPSK. \section*{Acknowledgements} We thank our shepherd John Heidemann and the anonymous reviewers for their insightful feedback. We thank the NASA Quantum AI Laboratory (QuAIL) and D-Wave Systems for useful discussions. The research is supported by National Science Foundation (NSF) Awards \#1824357 and \#1824470 and by the USRA Cycle 3 Research Opportunity Program that allowed machine time on the DW2Q hosted at NASA Ames Research Center. Kyle Jamieson and Minsung Kim are partially supported by the Princeton University School of Engineering and Applied Science Innovation Fund. This work does not raise any ethical issues. \subsection{QA Problem Formulation} \label{s:qa_prob} The first step in leveraging QA for any problem is to define the problem of interest as an objective function to be minimized, consisting of a quadratic polynomial of binary variables. We now introduce two equivalent forms of this objective functions, as is customary in the QA application literature. \paragraph{1. Ising spin glass form.} In this form the solution variables are traditionally referred to as \emph{spins} $s_i \in \left\{ +1, -1\right\}$. \begin{eqnarray} \hat{s}_1, \ldots, \hat{s}_N = \arg\min_{\left\{ s_1, \ldots, s_N \right\}} \left(\sum^{N}_{i<j} g_{ij} s_i s_j + \sum^{N}_{i} f_i s_i\right) \label{eqn:ising} \end{eqnarray} where $N$ is the number of spin variables, and $g_{ij}$ and $f_{i}$ are the Ising \emph{model parameters} that characterize the problem. The $f_{i}$ characterize the preference for each spin to be $+1$ or $-1$: positive indicates a preference for $-1$ while negative indicates a preference for $+1$, with the magnitude corresponding to the magnitude of the preference for either state. The $g_{ij}$ capture preferred correlations between spins: positive causes the QA to prefer $s_i \neq s_j$, while negative causes the QA to prefer $s_i = s_j$ in its optimization outcome. Analogously to $f_i$, the magnitude of $g_{ij}$ corresponds to the magnitude of its preference. \paragraph{2. QUBO form.} The \emph{Quadratic Unconstrained Binary Optimization} (\emph{QUBO}) has solution variables $q_i$ that are classical binary bits (zero\hyp{} or one\hyp{}valued): \begin{align} \hat{q}_1,\ldots,\hat{q}_N= \arg\min_{\left\{ q_1, \ldots, q_N \right\}} \sum^{N}_{i\leq j} Q_{ij}q_i q_j, \label{eqn:qubo} \end{align} where $N$ is the qubit count and $\mathbf{Q} \in \mathbb{R}^{N \times N}$ is upper triangular. The off\hyp{}diagonal matrix elements $Q_{ij}$ ($i\neq j$) correspond to $g_{ij}$ in Eq.~\ref{eqn:ising}, and the diagonal elements correspond to $f_i$. \vspace*{1.00ex minus 0.25ex}\noindent{}The two forms are equivalent, their solutions related by: \begin{equation} q_i \leftrightarrow \frac{1}{2}(s_i+1), \label{eqn:qubo2ising} \end{equation} leading to $g_{ij} \leftrightarrow \frac{1}{4}Q_{ij}$ and $f_i \leftrightarrow \frac{1}{2}Q_{ii} + \frac{1}{4} \sum^{i-1}_{k=1} Q_{ki} + \frac{1}{4} \sum^{N}_{k=i+1} Q_{ik}$. \subsection{ML-to-QA Problem Reduction} \label{s:reducing} We now explain our process for transforming the ML detection problem into the QUBO and Ising forms. Since QuAMax{} also assumes OFDM where the wireless channel is subdivided into multiple flat\hyp{}fading orthogonal subcarriers~\cite{nee2000ofdm}, this ML\hyp{}to\hyp{}QA reduction is required at each subcarrier. \subsubsection{ML-to-QUBO problem reduction.} \label{s:mltoqubo} Let's first consider the transformation of the ML problem into QUBO form---the key idea is to find a \emph{variable\hyp{}to\hyp{}symbol transform function} $\mathbf{T(\cdot)}$ that represents the ``candidate'' vector $\mathbf{v}$ in the ML search process (Eq.~\ref{eqn:ml} on p.~\pageref{def:AWGN}) instead with a number of QUBO solution variables. Specifically, we represent each of the $N_t$ senders' candidate symbols ${v_i} \in \mathcal{O}$ ($1 \leq i \leq N_t$), with $\log_2({|\mathcal{O}|})$ QUBO solution variables, naturally requiring $N=N_t\cdot\log_2({|\mathcal{O}|})$ QUBO variables for $N_t$ transmitters, and form these QUBO variables into a vector $\mathbf{q_i}$ for each sender $i$: $\mathbf{q_i} = \left[ q_{(i-1)\cdot\log_2(|\mathcal{O}|)+1}, \ldots,\right.$ $\left. q_{i\cdot\log_2(|\mathcal{O}|)} \right]$. For example, $\mathbf{T}$ recasts a $2 \times 2$ QPSK ($|\mathcal{O}|=4$) problem into a QUBO problem with four solution variables, split into two vectors $\mathbf{q_1}=[q_1\; q_2]$ and $\mathbf{q_2}=[q_3\; q_4]$. In general, the transform recasts the ML problem of Eq.~\ref{eqn:ml} into the form \begin{equation} \label{eqn:encoding} \mathbf{\hat{q}_1},\dots,\mathbf{\hat{q}_{\mathit{N_t}}} = \arg\min_{\mathbf{q_1},\dots,\mathbf{q_{\mathit{N_t}}}} \left\lVert\mathbf{y} - \mathbf{He}\right\rVert^2, \end{equation} where $\mathbf{e}=[\mathbf{T(q_1)},\dots,$ $\mathbf{T(q_{\mathit{N_t}})}]^\intercal$. Then, the resulting $N_t$ vectors $\mathbf{\hat{q}_1}, \ldots, \mathbf{\hat{q}_{N_t}}$ correspond to the $N$ QUBO solution variables, ${\hat{q}_1},\dots,$ ${\hat{q}_{N}}$. Continuing our $2\times 2$ QPSK example, $\mathbf{e}$ $=[\mathbf{T(q_1)}, \mathbf{T(q_2)}]^\intercal = [\mathbf{T}([q_1,q_2]),$ $\mathbf{T} ([q_3,q_4])]^\intercal$. Then, Eq.~\ref{eqn:encoding} results in two ML\hyp{}decoded vectors $\mathbf{\hat{q}_{1}}$, $\mathbf{\hat{q}_{2}}$ (noting that $\mathbf{T(\hat{q}_{1})}$, $\mathbf{T(\hat{q}_{2})}$ corresponds to the ML solution $\mathbf{\hat{v}}=[\hat{v_1},\hat{v_2}]^\intercal$ in Eq.~\ref{eqn:ml}, the nearest symbol vector around received $\mathbf{y}$). The decoded vectors $\mathbf{\hat{q}_{1}}$,$\mathbf{\hat{q}_{2}}$ correspond to the four decoded QUBO variables $\hat{q}_{1},\hat{q}_{2},\hat{q}_{3},\hat{q}_{4}$ in Eq.~\ref{eqn:qubo}. If the transmitter's bit\hyp{}to\hyp{}symbol mapping and QuAMax's{} variable\hyp{}to\hyp{}symbol transform are equivalent, then the decoded $\hat{q}_{1},\hat{q}_{2},$ $\hat{q}_{3},\hat{q}_{4}$ are the directly de-mapped bits, $\hat{\mathbf{b}}$ from the ML solution in Eq.~\ref{eqn:ml}. When transform $\mathbf{T}$ is linear the expansion of the norm in Eq.~\ref{eqn:encoding} yields a quadratic polynomial objective function, since $q_i^2=q_i$ for any 0 or 1\hyp{}valued $q_i$. Then the ML problem (Eq.~\ref{eqn:ml}) transforms directly into QUBO form (Eqs.~\ref{eqn:qubo} and~\ref{eqn:encoding}). Our task, then, is to find variable\hyp{}to\hyp{}symbol linear transform functions $\mathbf{T}$ for each of BPSK, QPSK, and 16\hyp{}QAM. \parahead{Binary modulation.} \label{s:reducing:binary} If the two mobile transmitters send two signals simultaneously, each with one of two possible information symbols, their transmissions can be described with a two\hyp{}vector of symbols $\mathbf{\bar{v}} = [\bar{v}_1, \bar{v}_2]^\intercal $ $\in \left[ \left\{ \pm 1 \right\}\right.$, $\left.\left\{ \pm 1 \right\} \right]^\intercal$. This type of data transmission is called \emph{binary} modulation, of which one popular kind is \emph{binary phase shift keying} (BPSK). The ML problem applied to the BPSK case where symbols $v_i$ are represented by $v_i =$ $\mathbf{T(q_i)} = 2q_i-1$ thus results in a QUBO form (a detailed derivation can be found in Appendix~\ref{s:qubo_forms}). \begin{figure*} \begin{subfigure}[b]{0.2\linewidth} \begin{picture}(90,100)(0,15) \thicklines \put(10,58){\line(1,0){80}} \put(50,20){\line(0,1){80}} \multiput(20,30)(20,0){4}{\circle*{5}} \multiput(20,50)(20,0){4}{\circle*{5}} \multiput(20,70)(20,0){4}{\circle*{5}} \multiput(20,90)(20,0){4}{\circle*{5}} \put(5,80){\small 0011}\put(28,80){\small 0111}\put(52,80){\small 1011}\put(75,80){\small 1111} \put(5,60){\small 0010}\put(28,60){\small 0110}\put(52,60){\small 1010}\put(75,60){\small 1110} \put(5,40){\small 0001}\put(28,40){\small 0101}\put(52,40){\small 1001}\put(75,40){\small 1101} \put(5,20){\small 0000}\put(28,20){\small 0100}\put(52,20){\small 1000}\put(75,20){\small 1100} \end{picture} \caption{QuAMax{} transform} \label{f:qubit:qubit} \end{subfigure} \hfill \begin{subfigure}[b]{0.2\linewidth} \begin{picture}(90,100)(0,15) \thicklines \put(10,58){\line(1,0){80}} \put(50,20){\line(0,1){80}} \multiput(20,30)(20,0){4}{\circle*{5}} \multiput(20,50)(20,0){4}{\circle*{5}} \multiput(20,70)(20,0){4}{\circle*{5}} \multiput(20,90)(20,0){4}{\circle*{5}} \put(5,80){\small 0011}\put(28,80){\small 0100}\put(52,80){\small 1011}\put(75,80){\small 1100} \put(5,60){\small 0010}\put(28,60){\small 0101}\put(52,60){\small 1010}\put(75,60){\small 1101} \put(5,40){\small 0001}\put(28,40){\small 0110}\put(52,40){\small 1001}\put(75,40){\small 1110} \put(5,20){\small 0000}\put(28,20){\small 0111}\put(52,20){\small 1000}\put(75,20){\small 1111} \end{picture} \caption{Intermediate code} \label{f:qubit:binary} \end{subfigure} \hfill \begin{subfigure}[b]{0.30\linewidth} \raisebox{2.5ex}{\mbox{\includegraphics[width=\linewidth]{figures/binary2gray_hat.png}}} \caption{Differential bit encoding} \label{f:qubit:gray-to-binary} \end{subfigure} \hfill \begin{subfigure}[b]{0.2\linewidth} \begin{picture}(90,100)(0,15) \thicklines \put(10,58){\line(1,0){80}} \put(50,20){\line(0,1){80}} \multiput(20,30)(20,0){4}{\circle*{5}} \multiput(20,50)(20,0){4}{\circle*{5}} \multiput(20,70)(20,0){4}{\circle*{5}} \multiput(20,90)(20,0){4}{\circle*{5}} \put(5,20){\small 0000}\put(28,20){\small 0100}\put(52,20){\small 1100}\put(75,20){\small 1000} \put(5,40){\small 0001}\put(28,40){\small 0101}\put(52,40){\small 1101}\put(75,40){\small 1001} \put(5,60){\small 0011}\put(28,60){\small 0111}\put(52,60){\small 1111}\put(75,60){\small 1011} \put(5,80){\small 0010}\put(28,80){\small 0110}\put(52,80){\small 1110}\put(75,80){\small 1010} \end{picture} \caption{Gray code} \label{f:qubit:gray} \end{subfigure} \caption{\normalfont QuAMax's{} bitwise post\hyp{}translation for 16\hyp{}QAM (64\hyp{}QAM and higher\hyp{}order modulations follow an analogous translation).} \label{f:qubit-bit-coding} \end{figure*} We next consider higher\hyp{}order modulations, which send one of $M$ possible information symbols with each channel use (where $M>2$), resulting in higher communication rates. \parahead{QPSK modulation.} \label{s:reducing:higher} In the case of \emph{quadrature phase shift keying} (QPSK), each sender transmits one of four possible symbols $\bar{v}_i $ $\in \left\{ \pm 1 \pm 1j \right\}$. Since it can be viewed as a two\hyp{}dimensional BPSK $v_i= v_i^{I} + j v_i^{Q}$, we represent each possibly\hyp{}transmitted QPSK information symbol with the linear combination of one QUBO variable, plus the other QUBO variable times the imaginary unit. Transforming $q_{2i-1}$ and $q_{2i}$ to $v_i^{I}$ and $v_i^{Q}$ respectively leads to the transform $v_i = \mathbf{T(q_i)} = (2q_{2i-1}-1) + j (2q_{2i}-1)$. \parahead{Higher-order modulation.} 16 \emph{quadrature amplitude modulation} (16\hyp{}QAM) and higher\hyp{}order modulations increase spectral efficiency, but utilize multiple amplitudes (levels) so require a $\mathbf{T}$ that inputs more than one (binary) solution variable per I or Q dimension. First consider a transform $\mathbf{T}$ for the simplest multi\hyp{}level 1\hyp{}D constellation: \mbox{\begin{picture}(80,15) \thicklines \put(0,0){\line(1,0){80}} \multiput(10,0)(20,0){4}{\circle*{5}} \put(5,5){00} \put(25,5){01} \put(45,5){10} \put(65,5){11} \end{picture}}. $\mathbf{T} = 4q_{1}+2q_{2}-3$ maps these bits to the values $-3,-1,+1,+3$. Now to generalize this to 2\hyp{}D, let the first two arguments of $\mathbf{T}$, $q_{4i-3}, q_{4i-2}$, represent the I part and the next two, $q_{4i-1}, q_{4i}$ represent the Q part. We call this transform, shown in Fig.~\ref{f:qubit:qubit}, the 16\hyp{}QAM \emph{QuAMax} \emph{transform}. It has the desirable property that it maps solution variables to symbols linearly, \emph{viz.} $v_i = \mathbf{T(q_i)} = (4q_{4i-3}+2q_{4i-2}-3) + j(4q_{4i-1}+2q_{4i}-3)$, thus results in a QUBO form. However, transmitters in practical wireless communication systems use a different bit\hyp{}to\hyp{}symbol mapping, the \emph{Gray code} shown in Fig.~\ref{f:qubit:gray}, which minimizes bit errors. This means that the QuAMax{} receiver's bit to symbol mapping differs from the sender's. Thus one further step remains so that we may map the decoded QUBO variables into the correct Gray\hyp{}coded transmitted bits. A na\"{\i}ve approach is simply for QuAMax{} to use the Gray\hyp{}coded bit\hyp{}to\hyp{}symbol mapping as its transform $\mathbf{T}$. The Gray\hyp{}coded mapping results in a one\hyp{}dimensional \emph{4-PAM} constellation \mbox{\begin{picture}(80,15) \thicklines \put(0,0){\line(1,0){80}} \multiput(10,0)(20,0){4}{\circle*{5}} \put(5,5){00} \put(25,5){01} \put(45,5){11} \put(65,5){10} \end{picture}} assuming bits $00$, $01$, $11$, and $10$ are transformed to $-3$, $-1$, $+1$, and $+3$ without loss of generality. The transform $v_i^I = 2(2q_{4i-3}-1) + 2(q_{4i-3}-q_{4i-2})^2 -1$ would map between a 4-PAM symbol $v_{i}^I$ and two QUBO variables $q_{4i-3},q_{4i-2}$, but the resulting expansion of the ML norm would yield cubic and quartic terms $q_rq_kq_l(q_p)$ for $r \neq k \neq l (\neq p)$, requiring quadratization with additional variables to represent the problem in QUBO form \cite{ishikawa2009higher, boros2014quadratization}. \vspace*{1.00ex minus 0.25ex}\noindent{}Instead, we retain Gray coding at the transmitter and the QuAMax{} transform at the receiver. To correct the disparity, we develop a \emph{bitwise post\hyp{}translation} that operates on QuAMax{}\hyp{}transformed solution output bits at the receiver, translating them back into Gray\hyp{}coded bits (\emph{i.e.}, moving from Fig.~\ref{f:qubit:qubit} to Fig.~\ref{f:qubit:gray}). Starting with the QuAMax{} transform shown in Figure~\ref{f:qubit:qubit}, if the second bit $\hat{q}_{4i-2}$ of the QUBO solution bits $\hat{q}_{4i-3}$, $\hat{q}_{4i-2}$, $\hat{q}_{4i-1}$, $\hat{q}_{4i}$ is {\tt 1}, then the translation flips the third bit $\hat{q}_{4i-1}$ and the fourth bit $\hat{q}_{4i}$ ({\it e.g.} {\tt 1100} to {\tt 1111}), otherwise it does nothing. This can be generalized to $2^{2n}$\hyp{}QAM ($n\geq2$) as an operation that flips even numbered columns in the constellation upside down. We term the result $b'$ an \emph{intermediate code}, shown in Figure~\ref{f:qubit:binary}. Next, we apply the differential bit encoding transformation of Figure~\ref{f:qubit:gray-to-binary} to the intermediate code ${b}'$ to obtain the Gray\hyp{}coded bits ${\hat{b}}$ in Figure~\ref{f:qubit:gray} ({\it e.g.} translating {\tt 1111} to {\tt 1000}). \paragraph{QuAMax{} decoding example.} To clarify processing across all stages, here we present a complete QuAMax{} decoding example\label{def:decoding_example}. Suppose a client maps a bit string $b_{1},b_{2},b_3,b_4$ onto $\bar{v}_{1}$, one of the Gray\hyp{}coded 16\hyp{}QAM symbols in Figure~\ref{f:qubit:gray}, and sends $\mathbf{\bar{v}} = [\bar{v}_{1}]$ to an AP through wireless channel $\mathbf{H}$. The AP receives $\mathbf{y}= \mathbf{H}\mathbf{\bar{v}} + \mathbf{n}$, the transmitted signal perturbed by AWGN. The steps of QuAMax's{} decoding are: \begin{enumerate} \item Form the ML QUBO equation using $\mathbf{H}$, $\mathbf{y}$, and $\mathbf{v} = [v_{1}] =[\mathbf{T({q_1})}]$, where $\mathbf{T(q_1)} = (4q_{1}+2q_{2}-3) + j(4q_{3}+2q_{4}-3)$, a linear transform based on the QuAMax{} transform in Figure~\ref{f:qubit:qubit}. \item Solve the QUBO form of the ML detection problem on the QA machine, resulting an ML\hyp{}decoded vector $\mathbf{\hat{q}_1}$, comprised of QUBO variables $\hat{q}_{1},\hat{q}_2,\hat{q}_3,\hat{q}_4$. \item Apply the above bitwise translation from the decoded QUBO solution output $\hat{q}_{1},\hat{q}_2,\hat{q}_3,\hat{q}_4$ to Gray\hyp{}coded received bits $ \hat{b}_{1},\hat{b}_2,\hat{b}_3,\hat{b}_4$ (from Figure~\ref{f:qubit:qubit} to Figure~\ref{f:qubit:gray}). \end{enumerate} If $\hat{b}_{1},\hat{b}_2,\hat{b}_3,\hat{b}_4 = b_{1},b_2,b_3,b_4$, decoding is done successfully, noting that in the case of a symbol error, we preserve the aforementioned advantage of Gray coding. \subsubsection{ML-to-Ising problem reduction.} \label{s:mltoising} The Ising spin glass form of the ML problem can be obtained by simply transforming the resulting QUBO form (\S\ref{s:mltoqubo}) into the Ising form by Eq.~\ref{eqn:qubo2ising}. Due to the fact that DW2Q implements an Ising model, QuAMax{} works by using the following generalized Ising model parameters: \parahead{BPSK modulation.} Given a channel matrix $\mathbf{H}$ and vector of received signals $\mathbf{y}$, we obtain the following Ising model parameters: \begin{align} f_i(\mathbf{H}, \mathbf{y}) &= -2 \left(\mathbf{H}^{I}_{(:,i)}\cdot \mathbf{y}^{I}\right) -2 \left(\mathbf{H}^{Q}_{(:,i)}\cdot \mathbf{y}^{Q}\right), \notag\\ g_{ij}(\mathbf{H})&= 2\left(\mathbf{H}^{I}_{(:,i)}\cdot \mathbf{H}^{I}_{(:,j)}\right) + 2 \left( \mathbf{H}^{Q}_{(:,i)}\cdot \mathbf{H}^{Q}_{(:,j)}\right), \label{eqn:ising_coefficient} \end{align} where $\mathbf{H}_{(:,i)}$ denotes the $i^{th}$ column of channel matrix $\mathbf{H}$. \parahead{QPSK modulation.} In the case of QPSK, the following is the resulting Ising parameter $f_{i}$ for QPSK: \begin{align} f_i(\mathbf{H}, \mathbf{y}) = \begin{cases} \text{if } i = 2n,\\ -2\left(\mathbf{H}^{I}_{(:,i/2)}\cdot \mathbf{y}^{Q}\right) +2 \left(\mathbf{H}^{Q}_{(:,i/2)}\cdot \mathbf{y}^{I}\right),\\%& \text{if } i = 2n \text{otherwise, }\\ -2\left(\mathbf{H}^{I}_{(:,\lceil i/2\rceil )}\cdot \mathbf{y}^{I}\right) -2 \left(\mathbf{H}^{Q}_{(:,\lceil i/2\rceil)}\cdot \mathbf{y}^{Q}\right). \end{cases} \label{eqn:qpsk_ising_f} \end{align} Since the real and imaginary terms of each symbol are independent, the coupler strength between $s_{2n-1}$ and $s_{2n}$ (or $q_{2n-1}$ and $q_{2n}$) is 0. For other $s_i$ and $s_j$, the Ising coupler strength for QPSK is: \begin{align} g_{ij}(\mathbf{H}) = \begin{cases} \text{if } i+j = 2n,\notag\\ 2\left(\mathbf{H}^{I}_{(:,\lceil i/2 \rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/2\rceil)}\right) +2 \left(\mathbf{H}^{Q}_{(:,\lceil i/2 \rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/2 \rceil)}\right), \notag\\ \text{otherwise,} \notag\\ \pm2\left(\mathbf{H}^{I}_{(:,\lceil i/2\rceil )}\cdot \mathbf{H}^{Q}_{(:,\lceil j/2 \rceil)}\right) \mp2 \left(\mathbf{H}^{I}_{(:,\lceil j/2\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/2 \rceil)}\right), \end{cases} \\ \label{eqn:QPSK_ising_coefficient} \end{align} where $i < j$ and the sign of the latter case of Eq.~\ref{eqn:QPSK_ising_coefficient} is determined by whether $i = 2n$ (when $i = 2n$, then `$+$' and `$-$'). \parahead{16\hyp{}QAM modulation.} Ising parameters follow the same structure as BPSK and QPSK and can be found in Appendix~\ref{s:16qm_model_parameter}. In summary, the process to obtain the Ising spin glass form can be simplified with these generalized Ising model parameters; a QuAMax{} system simply inserts the given channel $\mathbf{H}$ and received signal $\mathbf{y}$ at the receiver into these generalized forms accordingly, not requiring any computationally expensive operations ({\it i.e.} directly considering the expansion of the norm in Eq.~\ref{eqn:encoding}). Thus, computational time and resources required for ML-to-QA problem conversion are insignificant and can be neglected. \section{Design} \label{s:design} Starting from the abstract QA problem form (\S\ref{s:qa_prob}), QuAMax's{} design reduces ML detection to form (\S\ref{s:reducing}), then compiles it on actual hardware, a process called \emph{embedding} (\S\ref{s:mapping}). \input{design-reduce} \begin{table}[htbp] \centering \caption{\normalfont Logical (physical) number of qubits required for various configurations of the elementary adiabatic quantum ML decoder. For each configuration, {\bf bold font} indicates non-feasibility on the current (2,031 physical qubit) D-Wave machine with Chimera connectivity.} \begin{small} \begin{tabularx {\linewidth}{*{5}{X}} \toprule {\bf Config.} & {\bf BPSK} & {\bf QPSK} & {\bf 16-QAM} & {\bf 64-QAM}\\ \midrule $\mathbf{10\times 10}$& \cellcolor{LightGreen}$10$ $(40)$ & \cellcolor{LightGreen}$20$ $(120)$ & \cellcolor{LightGreen}$40$ $(440)$ & \cellcolor{LightGreen}$60$ $(1K)$ \\ $\mathbf{20\times 20}$& \cellcolor{LightGreen}$20$ $(120)$ & \cellcolor{LightGreen}$40$ $(440)$ & \cellcolor{LightGreen}$80$ $(2K)$ & \cellcolor{LightRed}$\bf{120}$ $\bf{(4K)}$ \\ $\mathbf{40\times 40}$& \cellcolor{LightGreen}$40$ $(440)$ & \cellcolor{LightGreen}$80$ $(2K)$ & \cellcolor{LightRed}$\bf{160}$ $\bf{(7K)}$ & \cellcolor{LightRed}$\bf{240}$ $\bf{(15K)}$ \\ $\mathbf{60\times 60}$& \cellcolor{LightGreen}$60$ $(1K)$ & \cellcolor{LightRed}$\bf{120}$ $\bf{(4K)}$ & \cellcolor{LightRed}$\bf{240}$ $\bf{(15K)}$ & \cellcolor{LightRed}$\bf{360}$ $\bf{(33K)}$ \\ \bottomrule \end{tabularx} \end{small} \label{tab:qubits} \end{table} \subsection{Embedding into QA hardware} \label{s:hardware}\label{s:mapping} \label{s:embedding} Once the ML detection problem is in quadratic form, we still have to compile the corresponding Ising model onto actual QA hardware. The D-Wave machine works by implementing an Ising model objective function energetically hardcoded into the chip, so the problem (Eq.~\ref{eqn:ising} on p.~\pageref{eqn:ising}) can support a certain coefficient $g_{ij}$ to be non-zero only if variables $s_i$ and $s_j$ are associated to physical variables (\emph{qubits} or \emph{physical qubits}) located on the chip in such a way that the qubits are energetically coupled. In the case of the DW2Q machine we use the coupling matrix is a \emph{Chimera graph}, shown in Figure~\ref{f:hw:dwave}, with each node corresponding to a qubit. Once Ising coefficients are passed to the annealer, the hardware assigns them to the edges of the Chimera graph, which are divided (along with their connected nodes) into \emph{unit cells}. Note however that, while the Ising problem generated from Eq.~{\ref{eqn:ml}} is almost \emph{fully connected} (\emph{i.e.}, $g_{ij}\neq 0$ for most $(i,j)$ pairs), the Chimera graph itself has far from full connectivity, and so a process of \emph{embedding} the Ising problem into the Chimera graph is required. One standard method of embedding is to ``clone'' variables in such a way that a binary variable becomes associated not to a single qubit but to a connected linear chain of qubits instead:\ a \emph{logical qubit}, as shown in Figure~\ref{f:hw:trimap}.\footnote{The optimal assignment problem, in the general case, is equivalent to the NP-Hard ``minor embedding'' problem of graph theory \cite{Choi2011}, however for fully\hyp{}connected graphs very efficient embeddings are known \cite{klymko2014adiabatic, PhysRevX.5.031040, boothby2016fast}.} We show an embedding of a fully-connected graph of 12~nodes. Each unit cell on the diagonal holds four logical qubits (a chain of two qubits), while the other unit cells are employed in order to inter\hyp{}connect the diagonal cells. Specifically, suppose unit cell $[1,1]$ includes logical qubits 1--4 and unit cell $[2,2]$ includes logical qubits 5--8. The left side of unit cell $[2,1]$ has a vertical clone of qubits 5--8 and the right side has a horizontal clone of logical qubits 1--4. Then, logical qubits 1--4 and 5--8 are all connected by means of the single unit cell $[2,1]$. The unit cell hosting the next four logical qubits 9--12 is placed at coordinates $[3,3]$. Two unit cells below, $[3,1]$ and $[3,2]$, are used for connections between 9--12 and 1--4, and 9--12 and 5--8 respectively. Given a number $N$ of spin variables (\emph{i.e.}, logical qubits) in Ising form, this embedding represents each with a chain of $\left\lceil N/4 \right\rceil+1$ qubits, for a total of $N\left(\left\lceil N/4 \right\rceil+1\right)$ qubits. Recall that $N=N_t\cdot\log_2({|\mathcal{O}|})$. \begin{figure} \centering \begin{subfigure}[b]{0.55\linewidth} \centering \begin{picture}(240,120) \put(20,0){\includegraphics[width=120\unitlength]{figures/DWH2_new.png}} \put(5,40){\includegraphics[width=80\unitlength,trim=320 120 160 400,clip]{figures/DWH2_new.png}} \end{picture} \caption{\normalfont DW2Q qubit connections:\ A $32\times 32$ BPSK problem is shown embedded in the chip's substrate.} \label{f:hw:dwave} \end{subfigure} \qquad \begin{subfigure}[b]{0.35\linewidth} \includegraphics[width=\linewidth]{figures/our_qubo.pdf} \caption{\normalfont Logical qubits and unit cells in the QuAMax{} decoder.} \label{f:hw:trimap} \end{subfigure} \caption{\normalfont A comparison between the quantum hardware graph of the used machine (which misses some nodes due to manufacturing defect), and the topology of our elementary quantum ML hardware graph before embedding into the hardware graph.} \label{f:hw} \end{figure} Table~\ref{tab:qubits} summarizes the size of the embedding in both logical and physical qubits, as a function of the MIMO detection problem's parameters---number of users and AP antennas, and modulation type. Color coding and bold font indicate whether or not the given parameters fit into the number of qubits available on current D-Wave machines. \paragraph{The embedded version of the Ising problem.} After embedding into Chimera graph we need to recast the Ising problem into an equivalent problem that has the same ground state, but also satisfies the Chimera graph constraints. We also need to introduce a constant penalty term ($J_F$) to quantify the relatively large coupling that constrains all physical qubits belonging to the same logical qubit to prefer the same state. Appendix~\ref{s:emb-ising} contains additional detail, but we discuss important experimental considerations for choosing $J_F$ in Section~\ref{s:eval:thermal}. \parahead{Unembedding with majority voting.} The bit string that the DW2Q returns is expressed in terms of the embedded Ising problem, and so must be \emph{unembedded} in order to have the values of the bits expressed in terms of our ML Ising problem. This is done by checking that all the qubits of a logical chain are either $+1$ or $-1$. Should not all spins be concordant, the value of the corresponding logical variable is obtained by \emph{majority voting} (in case of a vote tie, the value is randomized). Once the logical variables are determined, each configuration yields the corresponding energy of the Ising objective function by substituting it into the original Ising spin glass equation (Eq.~\ref{eqn:ising}). \section{Discussion} \label{s:Discussion} In this section, we discuss the current status of QA technology and practical considerations. \paragraph{Computational Power Consumption.} The computation in the DWQ2 is performed at zero energy consumption, as dictated by reversible computing, although energy is dissipated in the initialization and readout. The DW2Q draws 16~kW of power, primarily used by the cryogenic refrigeration unit~\cite{DWaveWP}. The computational power (per watt) for QPUs is expected to increase much more rapidly than for conventional computing platforms since the DW2Q power draw is not expected to change much as qubit and coupler counts grow in future generation systems while the computational power substantially increases. \paragraph{Operating Expenses.} Operating the DW2Q results in significant electricity cost, and the dilution refrigerator requires liquid nitrogen 1-2 times a month, for a total yearly cost of about USD~\$17,000. \paragraph{Processing Times.} The scenario envisioned by QuAMax{} assumes a centralized RAN architecture where a QPU, co\hyp{}located with centralized RAN computational resources in a data center, is connected to the APs via high\hyp{}speed fiber or millimeter\hyp{}wave links. In this setting, a latency between the APs and data center will not be significant. Nonetheless, QuAMax{} cannot be deployed today, since additional processing times in the current QPU include approximately 30-50~ms preprocessing time, 6-8~ms programming time, and 0.125 ms readout time per anneal. These overheads are well beyond the processing time available for wireless technologies (at most 3--10~ms). However, these overhead times are not of a fundamental nature and can be reduced by several orders of magnitude by efforts in system integration. By means of extrapolation of improvement trends it is expected that quantum engineering advances in superconducting qubit technology will enable QuAMax{} to be viable within a decade. Moreover, QuAMax's{} Ising form (in Section~\ref{s:mltoising}) can be adapted to be run in other emerging physics-based optimization devices based on photonic technologies \cite{hamerly2019} whose processing times overhead are in principle much faster. Hence, we leave an end\hyp{}to\hyp{}end evaluation in a fully centralized RAN architecture, with more advanced hardware, as future work. \section{Embedded Ising} \label{s:emb-ising} Embedding maps the Ising problem to an equivalent one that has the same ground state, but also satisfies Chimera graph constraints. The QuAMax{} compiled objective function is: \begin{eqnarray} -\sum_{i=1}^N\left[ \sum_{c=1}^{\lceil N/4 \rceil} s_{ic} s_{i(c+1)}\right]&&\label{eq:IsingEmbeddedObjFunJF}\\ +\sum_{i=1}^{N} \left(\frac{\bf{f_i}}{|J_F|\left(\lceil\frac{N}{4}\rceil +1\right)}\right) \left[\sum_{c=1}^{\lceil N/4\rceil+1 } s_{ic}\right]&&\label{eq:IsingEmbeddedObjFun1}\\ + \sum_{i,j=1}^{N} \frac{\bf{g_{ij}}}{|J_F|} \sum_{(c_i,c_j)\in\delta_{ij}} s_{ic_i}s_{jc_j}&&\label{eq:IsingEmbeddedObjFun2} \end{eqnarray} where the original logical variables $s_i$ are now associated to a chain $i$ of $c=1\dots (\lceil N/4 \rceil+1)$ qubits, indexed with new spins $s_{ic}$. $|J_F|$ penalizes the condition that $s_{ic}\neq s_{ic^\prime}$, {\it i.e.}, enforces that all qubits in the chain assume the same value ($\pm 1$). This enforcement is more likely to happen for large values of $|J_F|$, however the maximum negative energy value is set to $-1$ by hardware design. In (\ref{eq:IsingEmbeddedObjFun1}) and (\ref{eq:IsingEmbeddedObjFun2}), $|J_F|$ effectively renormalizes all terms in the objective function by the factor $|J_F|^{-1}$. The linear term value $\bf{f_i}$ is additionally divided by the number of qubits in a chain ($\lceil N/4 \rceil+1$). The term in (\ref{eq:IsingEmbeddedObjFun2}) shows that the duplication of variables ensures the existence of a pair of qubits in the chains such that a physical coupler in the Chimera graph exists ($\delta_{ij}$ is the set of pairs of qubits that are connected by a physical bond once the chains $i$ and $j$ are specified). \subsection{Performance Under Annealer Noise} \label{s:eval:thermal} This section presents results from the DW2Q annealer for wireless channel noise\hyp{}free scenarios, in order to characterize the machine's performance itself as a function of time spent computing. Sections~\ref{s:eval:chnoise} and~\ref{s:eval:tracech} experiment with Gaussian noise and trace\hyp{}based wireless channels, respectively. In this section, we run several instances with unit fixed channel gain and average transmitted power. Each instance has a random\hyp{}phase channel, randomly chosen transmitted bit string, and is repeated for each of three different modulations (BPSK, QPSK, 16-QAM) and varying numbers of users and AP antennas. Each instance is reduced to Ising as described in Section~\ref{s:reducing}, for a total of 780 different problems per QA parameter setting. Unless otherwise specified, this and subsequent sections use the fixed parameter settings defined in \S\ref{s:eval:thermal:param}. We obtain significant statistics by postprocessing up to 50,000 anneals per QA run (except 10,000 anneals for anneal pause analysis in Figure~\ref{f:anneal_pause}). \begin{figure} \centering \includegraphics[width=0.90\linewidth]{figures/newJF.png} \caption{\normalfont Time-to-Solution comparison of different strengths of ferromagnetic coupling within logical qubits, $|J_{F}|$. {\it Upper:}~BPSK, {\it lower:} QPSK, {\it left:} standard range, {\it right:} improved range; results obtained for $T_a=1$~$\mu$s. Lines report median of 10 instances; shading reports 10th. and 90th. percentiles.} \label{f:JFERROopt} \end{figure} \begin{figure} \centering \includegraphics[width=0.96\linewidth]{figures/newat.png} \caption{\normalfont TTS analysis of different anneal times for different numbers of users, for QPSK. Scatter points correlate median results obtained for different $|J_F|$, while lines highlight the best $|J_F|$ measured from Fig.~\ref{f:JFERROopt} and reporting the median across 10 random instances.} \label{f:anneal_time} \end{figure} \subsubsection{Choosing Annealer Parameters} \label{s:eval:thermal:param} In order to isolate the effect of different parameter settings on individual problems, we employ microbenchmarks on TTS. This section explains our choice of parameter settings for our main performance results in \S\ref{s:eval:thermal:ttb}, \S\ref{s:eval:chnoise}, and \S\ref{s:eval:tracech}. Note that while we plot results here only for BPSK and QPSK to save space, our results show that the methods, arguments and observations generalize to higher modulations, unless otherwise indicated. For the purpose of setting the parameters, we restrict the dataset to the ML problems that solve within a median TTS(0.99) of 10~ms for which we have low uncertainty on the measured success probability. We use the determined parameters for all instances regardless of their TTS for the performance analysis. \parahead{Ferromagnetic couplings:} We examine median $\text{TTS}(0.99)$ versus $|J_F|$ over 10 random instances of different sizes both with and without extended dynamic range. In Fig.~{\ref{f:JFERROopt}}, we observe that while there is a performance optimum that depends on the problem size for standard dynamic range, extended dynamic range shows less sensitivity to $|J_F|$, obtaining roughly the optimal $|J_F|$ performance of standard dynamic range. {\bf Anneal time:} As we vary $T_a$, we observe greater sensitivity when we use non\hyp{}optimal $J_F$, as the scatter points next to each data point in Fig.~\ref{f:anneal_time} (\emph{left}) show. On the other hand, Fig.~\ref{f:anneal_time} (\emph{right}) shows that an extended dynamic range setting achieves best results at $T_a=1$~$\mu$s regardless of problem size, showing less sensitivity to different $|J_F|$. {\bf Anneal Pause Time and Location:} When we apply improved dynamic range at $T_a=1$~$\mu$s, we observe a slight independence (Fig.~\ref{f:anneal_pause}) of $s_p$ and $J_f$ on $T_p$, and as $T_p$ increases, so does TTS. While the dynamic range setting has shown less sensitivity to $|J_F|$, anneal pause with extended dynamic range shows more sensitivity. Note that TTS of 18\hyp{}user QPSK at $T_p=1~\mu$s is slightly improved, compared to the best results in Figs.~\ref{f:JFERROopt}~and~\ref{f:anneal_time}. \begin{figure} \centering \includegraphics[width=0.96\linewidth]{figures/new_pausing_4.png} \caption{\normalfont TTS analysis of anneal pause time and position for 18\hyp{}user QPSK. Colored dotted lines join results obtained for different $|J_F|$, while the thicker black line highlights the best $|J_F|$ measured from Fig~\ref{f:JFERROopt}. Lines report the median across 10 random instances. The red circle indicates the best $s_p$ for chosen $|J_f|$.} \label{f:anneal_pause} \end{figure} \paragraph{Annealer Parameter Optimization.} Based on the previous sensitivity analysis, we select a default QA parameter setting. First, we choose {\bf improved dynamic range} since it is relatively robust to choice of $|J_F|$, nearly equaling the best performance of the standard dynamic range. Second, we choose $\mathbf{ T_p=1~}$ $\bm{\mu}$\textbf{s}, since it shows better results and greater pause times dominate the anneal time. \subsubsection{Choosing whether to pause} \label{s:eval:whetherpause} With the above default QA parameters, we now use TTB to explore whether or not we should use the QA pause functionality, as TTB encompasses both algorithms' BER performance as well as wall clock running time (\emph{cf.} TTS). We first define a \emph{fixed parameter setting} by selecting the best estimated choices for the non\hyp{}pausing algorithm and for the pausing algorithm, meaning the parameters which optimize medians across a sample of instances belonging to the same problem class ({\it e.g.} 18$\times$18 QPSK). This approach is to be compared against an \emph{oracle} that optimizes \{$J_F$, $T_a$\} or \{$J_F$, $s_p$\} instance by instance. In the figures, we denote the two parameter setting methods as \textbf{\textit{Fix}} (fixed) and \textbf{\textit{Opt}} (optimal), respectively. \begin{figure} \centering \includegraphics[width=0.96\linewidth]{figures/anneal_to_time_final.png} \caption{\normalfont BER of different optimization settings as a function of the number of anneals ({\it upper}) and time ({\it lower}) for $18\times18$ QPSK (median across 20 instances). Error bars indicate 15th. and 85th. percentiles.} \label{f:anneal_to_time} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{figures/FIG_TTB1_4.png} \caption{\normalfont Time-to-BER (TTB) comparison across different user numbers and modulations. {\it Upper}: ideal scheme using \emph{Opt}. {\it Lower}: QuAMax's{} performance optimizing with \emph{Fix}. Solid lines and dashed lines report median and mean TTB across 20 instances, respectively. Shading reports 10th. and 90th. percentiles of average BER at a certain time and each $\times$ symbol reports each instance's TTB (x\hyp{}value) for a certain target BER.} \label{f:ttb} \end{figure} Our motivation for considering \emph{Opt} is that it provides a bound to what can be achieved by the methods that seek to optimize machine parameter settings instance by instance~\cite{ReverseVenturelli, venturelli2015quantum}, currently under investigation. With our traces we compute BER as a function of $N_a$ using Eq.~\ref{eqn:BER}; the median result across 20 random instances is shown in Figure~\ref{f:anneal_to_time} ({\it upper}). Figure~\ref{f:anneal_to_time} ({\it lower}) shows the corresponding BER as a function of time ({\it i.e.,} TTB). Note that the pausing algorithm has a better performance than the non\hyp{}pausing algorithm (regardless of \emph{Opt} and \emph{Fix} strategy) despite the fact that each anneal in the former ($T_a +T_p$) takes twice as much time than the latter (when $T_a=1~\mu s$). Based on this empirical finding, we will present the results in the following section only for the protocol that includes a pause. \subsubsection{QuAMax{}: End\hyp{}to\hyp{}End performance} \label{s:eval:thermal:ttb} \begin{figure} \centering \includegraphics[width=\linewidth]{figures/per_user_final.png} \caption{\normalfont TTB with target BER $10^{-6}$ for different modulations and user numbers across 20 instances. Colored boxes report QuAMax{} (5th., 95th.\ as whiskers, upper\fshyp{}lower quartiles as boxes, median as the thick horizontal mark, and thin horizontal marks for outliers.)} \label{f:ttbperuser} \end{figure} \begin{figure} \centering \includegraphics[width=\linewidth]{figures/fer_final_3.png} \caption{\normalfont Time-to-FER for different users, modulations, and frame sizes; \emph{left}: median Opt (idealized), \emph{right}: mean \emph{Fix} (QuAMax{}). } \label{f:fer_baseline} \end{figure} We now evaluate the TTB and TTF (Time\hyp{}to\hyp{}FER) of QuAMax{}, comparing: \begin{enumerate} \item {\bf QuAMax{}:} Fixed\hyp{}parameter, average\hyp{}case performance. \item {\bf Oracle:} Median\hyp{}case \emph{Opt} performance (\S\ref{s:eval:whetherpause}: outlier data points have minimal influence on the median order statistic), optimizing QA parameters.\footnote{Outlier mitigation methods for QA may address such outliers in future work~\cite{qubo-preproc}.} \end{enumerate} Figure~\ref{f:ttb} shows the TTB with varying user numbers and modulations at the edge of QuAMax's{} performance capabilities. Solid and dashed lines report median and average BER, respectively. We note that mean TTB dominates median TTB due to a small number of long\hyp{}running outliers. QuAMax{} accordingly sets a time deadline (measured median TTB for the target BER) for decoding and after that discards bits, relying on forward error correction to drive BER down. Next considering the relationship between TTB and problem size, Fig.~\ref{f:ttbperuser} explores TTB for target BER $10^{-6}$, for each instance that reaches a BER of $10^{-6}$ within 10~ms as well as average performance. ML problems of these sizes are well beyond the capability of conventional decoders (\emph{cf.} Table~\ref{t:visited_nodes}), and we observe that \emph{Opt} achieves superior BER within 1--100~$\mu s$ and that QuAMax{} achieves an acceptable BER for use below error control coding. Note that instances with TTB below the minimum required time ({\it i.e.,} $T_a$ + $T_p$) caused by parallelization require (an amortized) 2~$\mu s$. Next, we consider frame error rate performance, measuring mean and median FER QuAMax{} achieves. Results in Fig.~\ref{f:fer_baseline} show that tens of microseconds suffice to achieve a low enough (below $10^{-3}$) FER to support high throughput communication for 60\hyp{}user BPSK, 18\hyp{}user QPSK, or four\hyp{}user 16\hyp{}QAM suffices to serve four users with the idealized median performance of \emph{Opt}. QuAMax{} (mean \emph{Fix}) achieves a similar performance with slightly smaller numbers of users. Furthermore, our results show low sensitivity to frame size, considering maximal\hyp{}sized internet data frames (1,500~bytes) all the way down to TCP ACK\hyp{}sized data frames (50~bytes). \section{Evaluation} \label{s:experiments} \label{s:eval} We evaluate QuAMax{} on the DW2Q Quantum Annealer machine shown in Figure \ref{f:dwave}. We consider the same number of antennas at the clients and AP ({\it i.e.}, $N_t = N_r$). Section~\ref{s:eval:understanding} introduces QA results, while Section~\ref{s:eval:methodology} explains our experimental methodology. After that in Section~\ref{s:eval:thermal} we present results under only the presence of the annealer's internal thermal noise (ICE). Sections~\ref{s:eval:chnoise} and \ref{s:eval:tracech} add wireless AWGN channel noise and trace\hyp{}based real\hyp{}world wireless channels, respectively, quantifying their interactions with ICE on end\hyp{}to\hyp{}end performance. Over $8 \times 10^{10}$ anneals are used in our performance evaluation. \subsection{Understanding Empirical QA Results} \label{s:eval:understanding} We begin with a close look at two runs of the QA machine, to clarify the relationships between Ising energy, Ising energy\hyp{}ranked solution order, and BER. Figure~\ref{f:count_ising_eg} shows six QA problem instances (all of which require 36 logical qubits), corresponding to two different wireless channel uses for each of varying modulation and number of users. The solutions are sorted (ranked) by their \emph{relative Ising energy difference} $\Delta E$ from the minimum Ising energy (blue numbers atop selected solutions), where red bars show each solution's frequency of occurrence (in the rare case of two or more tied distinct solutions, we split those solutions into multiple solution ranks). The number of bit errors associated with each solution appears as a green curve. For statistical significance, this data summarizes 50,000 anneals, more than QuAMax's{} practical operation. As modulation order increases and number of users decreases (from left to right in Figure~\ref{f:count_ising_eg}), the probability of finding the ground state tends to be lower, while the search space size remains constant, leading eventually to higher BER and FER.\footnote{See section \ref{s:eval:methodology_ber}. Frame error rate FER is computed as $1-(1-BER)^{\text{frame size}}$.} The relative Ising energy gap also trends smaller,\footnote{The energy distribution of the Ising objective function (Eq.~\ref{eqn:ising}) corresponds to the distribution of ML decoder Euclidean distances (Eq.~\ref{eqn:ml}).} and is likely to be inversely correlated with the impact of ICE on the problem instance \cite{PhysRevA.93.012317,2018arXiv180603744A}. \phantomsection \subsection{Experimental methodology} \label{s:eval:methodology} In this section, we introduce performance metrics and figures of merit that give insight into the operation of the QA machine as it solves the ML MIMO decoding problem. We note that in our performance evaluation we exclude from consideration programming time and post\hyp{}programming time of the Ising coefficients on the chip, and readout latency of the qubit states after a single anneal. Currently, these times dominate the pure computation time ({\it i.e.} total anneal time) by several orders of magnitude (milliseconds), due to engineering limitations of the technology. However, these overheads do not scale with problem size and are not fundamental performance factors of the fully integrated QuAMax{} system, and so this is in accordance with experimental QA literature convention. We discuss these overheads in Section~\ref{s:Discussion}. \subsubsection{Metric: Time-to-Solution (TTS)} \label{s:eval:methodology_tts} Suppose we find the ground state (corresponding to the minimum energy solution within the search space of $2^N$ bit strings, where $N$ is the variable count) with probability $\mathcal{P}_0$. In the absence (but not presence) of channel noise, this ground state corresponds to a correct decoding. Each anneal is an independent, identically\hyp{}distributed random process, meaning that the expected \emph{time to solution}, or $TTS(\mathcal{P})$, is the anneal time of each anneal $T_{a}$ multiplied by the expected number of samples to be able to find the ML solution with probability $\mathcal{P}$: $TTS({\mathcal{P}}) = T_a\cdot \log(1-\mathcal{P})/\log(1-\mathcal{P}_0)$. TTS is commonly used in the QA literature, setting $\mathcal{P}=0.99$ \cite{ronnow2014defining}. \subsubsection{Our Metrics: BER and Time-to-BER (TTB)} \label{s:ber} \label{s:eval:methodology_ber} TTS reflects the expected time to find the ground state, but does not characterize the expected time our system takes to achieve a certain \emph{Bit Error Rate} (\emph{BER}, averaged across users), the figure of merit at the physical layer. This quantity differs from TTS, because TTS only considers the ground state, and as illustrated in the example shown in Figure~\ref{f:count_ising_eg}, solutions with energy greater than the ground state may also have (rarely) no or relatively few bit errors, while wireless channel noise may induce bit errors in the ground state solution itself. Hence we introduce a metric to characterize the time required to obtain a certain BER $p$, \emph{Time-to-BER}: \emph{TTB(p)}. This is preferred in our setting, since a low but non\hyp{}zero bit error rate is acceptable (error control coding operates above MIMO detection). \paragraph{TTB for a single channel use.} Since one QA run includes multiple ($N_a$) anneals, we return the annealing solution with minimum energy among all anneals in that run. We show an example of this process for one \emph{instance} (\emph{i.e.}, channel use, comprised of certain transmitted bits and a certain wireless channel) in Fig.~\ref{f:count_ising_eg}. The annealer finds different solutions, with different Ising energies, ranking them in order of their energy. Considering this order statistic, and the fact that QuAMax{} considers only the best solution found by all the anneals in a run, the \emph{expected} BER of instance $I$ after $N_a$ anneals can be expressed as \begin{small} \begin{align} \mathbb{E}(BER(N_a)) = \sum^{L}_{k=1} \left[\left(\sum^{L}_{r=k}p_I(r)\right)^{N_{a}} - \;\left(\sum^{L}_{r=k+1}p_I(r)\right)^{N_{a}}\right]\cdot F_I(k)/N, \label{eqn:BER} \end{align} \end{small} where $N$ is qubit count, $L$ ($\leq N_a$) is the number of distinct solutions, $r$ ($1 \leq r \leq L$) is the rank index of each solution, $p(r)$ is the probability of obtaining the $r^{\mathrm{th}}$ solution, and $F_I(k)$ is the number of bit errors of the $k^{\mathrm{th}}$ solution against ground truth.\footnote{Note that the metric has omniscient knowledge of ground truth transmitted bits, while the machine does not.} To calculate TTB($p$), we replace the left hand side of Eq.~\ref{eqn:BER} with $p$, solve for $N_a$, and compute TTB($p$) $=N_aT_a/P_f$. \paragraph{Generalizing to multiple channel uses.} The preceding predicts TTB for a fixed instance. In the following study we compute TTB and BER across multiple instances (random transmitted bits and randomly\hyp{}selected wireless channel), reporting statistics on the resulting sampled distributions. \input{eval-annealer} \subsection{Performance under AWGN Noise} \label{s:eval:chnoise} \begin{figure} \centering \includegraphics[width=0.99\linewidth]{figures/snr_analysis_final.png} \caption{\normalfont Detailed view (\emph{cf.} Fig.~\ref{f:count_ising_eg}) of an example wireless channel at six different SNRs (18\hyp{}user QPSK).} \label{f:SNR_anlaysis} \end{figure} We next evaluate the impact of AWGN from the wireless channel, testing six SNRs ranging from 10~dB to 40~dB. In order to isolate the effect of noise, the results in this subsection fix the channel and transmitted bit\hyp{}string and consider ten AWGN noise instances. Looking at the data in depth to begin with, the effect of AWGN channel noise, which is itself additive to ICE, is shown in Fig.~\ref{f:SNR_anlaysis} for six illustrative examples. As SNR increases, the probability of finding the ground state and the relative energy gap tend to increase. At 10~dB SNR the energy gap between the lowest and second lowest energy solutions narrows to just three percent, leaving minimal room for error. In terms of overall performance, Fig.~\ref{f:diffsnr}~(\emph{left}) shows TTB at 20~dB SNR, varying number of users and modulation. At a fixed SNR, we observe a graceful degradation in TTB as the number of users increases, across all modulations. Fig.~\ref{f:diffsnr}~(\emph{right}) shows TTB at a certain user number, varying SNR and modulation. At a fixed user number, as SNR increases, performance improves, noting that the idealized median performance of \emph{Opt} shows little sensitivity to SNR, achieving $10^{-6}$ BER within $100~\mu$s in all cases. \begin{figure} \centering \includegraphics[width=1.0\linewidth]{figures/snr_final_2.png} \caption{\normalfont TTB comparison across different user numbers, modulations, and SNRs. {\it Left}: varying the number of users at SNR 20~dB. {\it Right}:~varying SNR at a certain number of users. Thick lines report QuAMax's{} performance (mean \emph{Fix}), and same style but thin (purple) lines report the idealized performance (median \emph{Opt}).} \label{f:diffsnr} \end{figure} \begin{figure} \centering \includegraphics[width=1.0\linewidth]{figures/comparison_bigstation_3.png} \caption{\normalfont QuAMax's{} performance comparison against the zero-forcing decoder across different user numbers, modulations, and SNRs. Each $\times$ symbol (\emph{left\hyp{}to\hyp{}right:} 36, 48, 60 users for BPSK and 12, 14, 16 users for QPSK) reports the zero-forcing decoder's BER and corresponding processing time.} \label{f:comparison} \end{figure} Fig.~\ref{f:comparison} compares QuAMax's{} performance versus zero-forcing decoder at bad SNR scenarios, showing the necessity of ML-based MIMO decoders for large MIMO system. Linear decoders such as zero-forcing and MMSE suffer from the effect of the poor channel condition (when $N_t\approx N_r$), requiring $N_r > N_t$ ({\it i.e.,} more antennas) for appropriate BER performance. In Figure~\ref{f:comparison}, QuAMax{} reaches the zero-forcing's BER (or even better BER) approximately 10-1000 times faster than zero-forcing in both BPSK and QPSK modulation. Here, computation times for zero-forcing are inferred from processing time using a single core in BigStation \cite{BigStation}, one of the current large MIMO designs based on zero-forcing. While this processing time can be reduced proportionally with more cores, BER ({\it i.e.,} quality of solutions) remains unchanged. The Sphere Decoder achieves comparable BER, but processing time cannot fall below a few hundreds of $\mu$s with the given numbers of users and SNRs.\footnote{Extreme levels of parallelization or GPU implementation might be able to resolve the issue. However, practical constraints will eventually limit the increase in performance on classical platforms \cite{king2019quantum}. Contrarily, overheads in QuAMax{} are apart from pure computation, which can be resolved by engineering design.} \subsection{Trace-Driven Channel Performance} \label{s:eval:tracech} We evaluate system performance with real wideband MIMO channel traces at 2.4~GHz, between 96 base station antennas and eight static users \cite{Argos}. This dataset comprises the largest MIMO trace size currently available. For each channel use, we randomly pick eight base station antennas to evaluate the $8 \times 8$ MIMO channel use at SNR {\it ca.} 25--35~dB: Fig.~\ref{f:actual_trace} shows the resulting TTB and TTF. We achieve $10^{-6}$ BER and $10^{-4}$ FER within $10~\mu$s for QPSK. For BPSK, considering multiple problem instances operating in parallel, we achieve the same BER and FER within (an amortized) $2~\mu$s period. This implies that tens of microseconds suffice to achieve a low BER and FER even without parallelization of identical problems, which creates an opportunity for QuAMax{} to parallelize different problems (\emph{e.g.}, different subcarriers' ML decoding). \begin{figure} \centering \includegraphics[width=0.95\linewidth]{figures/real_trace_final.png} \caption{\normalfont Experimentally measured channel trace~\cite{Argos} results: upper plots report TTB (\emph{Opt}, \emph{Fix}); lower plots report TTF of median \emph{Opt} and mean \emph{Fix} (QuAMax). Thin and thick lines report median and mean, respectively. TTB's error bars indicate 15th.\ and 85th.\ percentiles.} \label{f:actual_trace} \end{figure} \section{Implementation} \label{s:impl} \phantomsection \label{s:impl:flow} \begin{figure*} \centering \includegraphics[width=0.97\linewidth]{figures/sqz_rank_13.png} \caption{\normalfont Empirical QA results from six different decoding problems, illustrating relationships between Ising energy, solution rank, BER.} \label{f:count_ising_eg} \end{figure*} This section describes our implementation on the D-Wave 2000Q quantum annealer (DW2Q), explaining the API between the annealer's control plane and its quantum substrate, machine parameters, and their tuning to the problem at hand. Each \emph{anneal cycle} on the DW2Q yields a configuration of spins ({\it i.e.,} one decoded bit string). The user programs the annealer to run a batch of $N_{a}$ annealing cycles (one \emph{QA} \emph{run}) with the same parameters to accumulate statistics, which means that we have a set of $N_{a}$ configurations from a DW2Q job submission. The lowest energy configuration among $N_{a}$ anneals is the best answer found. \paragraph{Parallelization.} Multiple instances (identical or not) can be run physically alongside each other, reducing run time by the \emph{parallelization factor}\label{def:parallelization_factor}\footnote{While asymptotically the parallelization factor is just the ratio of used physical qubits after embedding to the number of qubits in the chip $N_{tot}$, in finite\hyp{}size chips, chip geometry comes into play.} $P_f \simeq N_{tot}/\left(N\left(\left\lceil N/4 \right\rceil+1\right)\right)$---a small 16\hyp{}qubit problem employing just 80 physical qubits ({\it e.g.} 16\hyp{}user BPSK, 8\hyp{}user QPSK, and 4\hyp{}user 16\hyp{}QAM) could in fact be run more than 20 times in parallel on the DW2Q. \paragraph{Precision Issues.} As analog devices, the desired embedded Ising coefficients (Eqs. \ref{eq:IsingEmbeddedObjFunJF}-\ref{eq:IsingEmbeddedObjFun2} in Appendix~\ref{s:emb-ising}) do not perfectly match their real energy values once hardcoded in the real machine, and hence give rise to \emph{intrinsic control errors} (ICE), \label{def:ice} an uncontrollable shift in the actual programmed values of the objective function. ICE is appropriately modeled as a noise fluctuating at a time scale of the order of the anneal time, {\it i.e.}, on each anneal, Ising coefficients are perturbed: $\bf{f_i} \longrightarrow \bf{f_i}+\langle\delta\bf{f_i}\rangle$, $\bf{g_{ij}} \longrightarrow\bf{g_{ij}}+\langle\delta\bf{g_{ij}}\rangle$. where the noise is Gaussian with mean and variance measured $\langle\delta\bf{f_i}\rangle$ $\simeq0.008\pm0.02$ and $\langle\delta\bf{g_{ij}}\rangle$ $\simeq-0.015\pm0.025$ in the most delicate phase of the annealing run~\cite{ICE}. The impact of ICE on performance depends on the problem at hand~\cite{PhysRevA.93.012317,PhysRevA.65.012322}, but it is clear that precision issues will arise if the largest energy scale squeezes the value of the coefficients (in Eqs.~\ref{eq:IsingEmbeddedObjFun1}--\ref{eq:IsingEmbeddedObjFun2} in Appendix~\ref{s:emb-ising}) to a level where ICE is likely to erase significant information of the problem's ground state configuration. \parahead{Annealer Parameter Setting.} \label{s:parameter_opt} \label{s:impl:param} As discussed in Section \ref{s:embedding}, the $|J_F|$ that enforces a chain of qubits to return a series of values which are all in agreement (either all $+1$ or $-1$), and the annealing time $T_a$ are both key performance parameters that determine the net time to find a solution, and hence overall QA performance. We also introduce 1, 10, and 100~$\mu$s \emph{pause time} $T_p$ in the middle of annealing ($T_a=1$~$\mu$s) with various \emph{pause positions} $s_p$, to see the effect of pausing \cite{DWPauseMarshall} on our problems. Setting $|J_F|$ too large would wash out the problem information due to ICE, however $|J_F|$ on average should increase with the number of logical chains in fully\hyp{}connected problems in the absence of ICE~\cite{PhysRevX.5.031040}. Due to the lack of a first\hyp{}principles predictive theory on the correct value for a given instance, we present in Section~\ref{s:eval:thermal} an empirical investigation of the best embedding parameters, employing the microbenchmarking methodologies generally accepted~\cite{Rieffel2015,o15compiling,PhysRevX.5.031040}. Below we perform a sensitivity analysis on $J_F$, $T_a$, $T_p$, and $s_p$ (\S\ref{s:eval:thermal:param}) over the ranges $J_F \in \{1.0\hyp{}10.0 \ (0.5)\} $ , $T_a \in \{1, 10, 100\;\mu s\}$, $T_p \in \{1, 10, 100\;\mu s\}$, and $s_p \in \{0.15\hyp{}0.55 \ (0.02)\}$. \parahead{Improved coupling dynamic range.} The \emph{dynamic range} of coupler strengths is defined as the ratio between the maximum and minimum values that can be set ($g_{ij}$ in Eq.~\ref{eqn:ising}). To strengthen interactions between embedded qubits, the DW2Q is able to double the magnitude of valid negative coupler values, effectively increasing the precision of embedded problems and reducing ICE. However, this \emph{improved range} option, when enabled, breaks the symmetry of the Ising objective function (substituting the opposite signs for connected coefficients and their couplings, into the same problem), and hence precludes averaging over these symmetrical instances as the DW2Q does without the improved range option, to mitigate leakage errors~\cite{boixo2014evidence}. It is thus unclear whether the use of this feature is beneficial in the end without experimentation, and so we benchmark in Section~\ref{s:eval} both with and without improved range. \section{Introduction} \label{s:intro} A central design challenge for future generations of wireless networks is to meet users' ever\hyp{}increasing demand for capacity and throughput. Recent advances in the design of wireless networks to this end, including the 5G efforts underway in industry and academia, call in particular for the use of Large and Massive \emph{multiple input multiple output} (MIMO) antenna arrays to support many users near a wireless access point (AP) or base station sharing the wireless medium at the same time.\footnote{We use the terms "access point" and "base station" interchangeably in this paper.} Much effort has been and is currently being dedicated to large and massive MIMO, and these techniques are coming to fruition, yielding significant gains in network throughput. An apropos example is Massive MIMO:\ in LTE cellular and 802.11ac local\hyp{}area networks, up to eight antennas are supported at the AP \emph{spatially multiplexing} \cite{telatar-capacity99} parallel information streams concurrently to multiple receive antennas. The technique is also known as multi\hyp{}user MIMO (MU-MIMO) and can be used both in the uplink and the downlink of multi\hyp{}user MIMO networks:\ in the uplink case, several users concurrently transmit to a multi\hyp{}antenna AP, while over the downlink, the AP multiplexes different information streams to a number of mobile users. From a design standpoint, one of the most promising and cost effective architectures to implement 5G technologies is the centralized radio access network (C-RAN) architecture \cite{namba2012bbu, rost2014opportunistic}. C-RAN pushes most of the physical\hyp{}layer processing that currently takes place at the AP to a centralized data center, where it is aggregated with other APs' processing on the same hardware. The C-RAN concept has undergone several iterations since its inception, with more recent work treating the unique demands of small cells \cite{fluidnet-ton16}, centralizing most of the computation and supporting hundreds or thousands of the APs from a centralized data center. To fully realize Massive MIMO's potential throughput gains, however, the system must effectively and efficiently demultiplex mutually\hyp{}interfering information streams as they arrive. Current large MIMO designs such as Argos \cite{argos-mobicom12}, BigStation \cite{BigStation}, and SAM \cite{SAM} use linear processing methods such as zero\hyp{}forcing and minimum mean squared error (MMSE) filters. These methods have the advantage of very low computational complexity, but suffer when the MIMO channel is poorly\hyp{}conditioned \cite{Geosphere}, as is often the case when the number of user antennas approaches the number of antennas at the AP \cite{Geosphere, BigStation}. Sphere Decoder\hyp{}based {\it maximum likelihood} (ML) MIMO decoders/detectors \cite{Geosphere, ETH_HARD} can significantly improve throughput over such linear filters, but suffer from increased computational complexity:\ compute requirements increase exponentially with the number of antennas \cite{SDComp1}, soon becoming prohibitive (Section~\ref{s:ml}). The problem of limited computational capacity stems from the requirement that a receiver's physical layer finish decoding a frame before the sender requires feedback about its decoding success or failure. For Wi-Fi networks, \emph{e.g.}, this quantity is on the order of tens of $\mu$s, the spacing in time between the data frame and its acknowledgement. More sophisticated physical layers, such as 4G LTE, require the receiver to give feedback in the context of incremental redundancy schemes, for the same reason; the processing time available is 3~ms for 4G LTE and 10~ms for WCDMA \cite{BigStation, dahlman20134g}. As a result, most current systems adopt linear filters, accepting a drop in performance. \parahead{New approach:\ Quantum computation in the data center}. This paper explores the leveraging of quantum computation (QC) to speed up the computation required for the ML MIMO decoder. We place our ideas in the context of the QC currently already realized in experimental hardware, and in the context of the dominant C\hyp{}RAN architecture. Here we imagine a future quantum computer, co\hyp{}located with C\hyp{}RAN computational resources in a data center, connected to the APs via high\hyp{}speed, low\hyp{}latency fiber or millimeter\hyp{}wave links. Optimization is one of the key applications the quantum community has identified as viable in the short\hyp{}term (\emph{i.e.}\ before quantum processors become scalable devices capable of error correction and universality). While their potential in optimization is largely unproven, it is believed that it may be possible for \emph{Noisy Intermediate\hyp{}Scale Quantum} (NISQ) devices to achieve polynomial or exponential speedups over the best known classical algorithms \cite{preskill2018quantum}. It is, however, important to leverage understanding from current prototypes in order to inform the design of real\hyp{}world systems, since performance cannot be predicted or simulated efficiently, especially in the presence of device\hyp{}specific noise. This is the approach we therefore advocate here. Two main approaches have been identified for quantum optimization in NISQs:\ \emph{Quantum Annealing} (QA) and \emph{Quantum Approximate Optimization Algorithms} (QAOA). The former approach is a form of analog computation that has been developed theoretically in the early nineties \cite{finnila1994quantum}, but realized experimentally in a programmable device only in 2011 by D-Wave Systems. We focus on QA here, discussing QAOA briefly in Section~\ref{s:related}. \vspace*{1.00ex minus 0.25ex}\noindent{}This paper presents \emph{QuAMax{}}, the first system to apply QA to the computationally challenging ML MIMO wireless decoding problem in the context of a centralized RAN architecture where a QA is co-located in a data center serving one or more wireless APs. The contributions of our paper can be summarized as follows: Firstly, we present the first reduction of the ML MIMO decoding problem to a form that a QA solver can process. Secondly, we introduce a new, communications\hyp{}specific evaluation metric, \emph{Time-to-$\text{BER}$ ($\text{TTB}$)}, which evaluates the performance of the QA as it aims to achieve a target bit error rate (BER) on the decoded data. Finally, we evaluate QuAMax{} with various scenarios and parameter settings and test their impact on computational performance. To achieve a BER of $10^{-6}$ and a frame error rate of $10^{-4}$, ML MIMO detection on the D-Wave 2000Q quantum annealer requires 10--20~$\mu$s of computation time for 48\hyp{}user, 48\hyp{}AP antenna binary modulation or 30--40~$\mu$s for $14\times 14$ QPSK at 20~dB SNR, and with the real\hyp{}world trace of $8\times8$ MIMO channel, the largest spatial multiplexing MIMO size publicly available for experiments~\cite{Argos}, QuAMax{} requires 2~$\mu$s for BPSK and 2--10~$\mu$s for QPSK. \parahead{Paper roadmap.} The next section is a background primer on ML detection and QA. Section~\ref{s:design} details our programming of the ML problem on the QA hardware. Section~\ref{s:impl} describes QuAMax{} implementation in further detail, followed by our evaluation in Section~\ref{s:experiments}. We conclude with a review of related work (Section~\ref{s:related}), discussion of current status of technology and practical considerations (Section~\ref{s:Discussion}), and final considerations (Section~\ref{s:concl}). \section{16\hyp{}QAM Ising Model Parameters} \label{s:16qm_model_parameter} Following are the Ising parameters $f_{i}$ for 16\hyp{}QAM: \begin{small} \begin{align} f_{i}(\mathbf{H}, \mathbf{y}) = \begin{cases} \text{case } i = 4n-3:\\ -4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{I}\right) -4 \left(\mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{Q}\right),\\ \text{case } i = 4n-2:\\ -2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil )}\cdot \mathbf{y}^{I}\right) -2 \left(\mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{Q}\right),\\ \text{case } i = 4n-1:\\ -4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{Q}\right) +4 \left(\mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{I}\right),\\ \text{case } i = 4n:\\ -2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil )}\cdot \mathbf{y}^{Q}\right) +2 \left(\mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\cdot \mathbf{y}^{I}\right). \end{cases} \label{eqn:16qam_ising_f} \end{align} \end{small} Since real and imaginary terms of each symbol are independent, the coupler strength between $s_{4n-3}$, $s_{4n-2}$ and $s_{4n-1}$, $s_{4n}$ is 0. For other $s_i$ and $s_j$, the Ising coupler strength $g_{ij}$ for 16\hyp{}QAM is: \begin{small} \begin{align} g_{ij}(\mathbf{H}) = \begin{cases} \text{case } i = 4n-3:\\ \begin{cases} \text{case } j = 4n'-3:\\ 8\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+8\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-2:\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-1:\\ -8\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)+8\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n':\\ -4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right), \end{cases}\\ \text{case } i = 4n-2:\\ \begin{cases} \text{case } j = 4n'-3:\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-2:\\ 2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+2\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-1:\\ -4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n':\\ -2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)+2\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right), \end{cases}\\ % \text{case } i = 4n-1:\\ \begin{cases} \text{case } j = 4n'-3:\\ 8\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)-8\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-2:\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)-4\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-1:\\ 8\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+8\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n':\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right), \end{cases}\\ \text{case } i = 4n:\\ \begin{cases} \text{case } j = 4n'-3:\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)-4\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-2:\\ 2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\right)-4\left(\mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n'-1:\\ 4\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+4\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right),\\ \text{case } j = 4n':\\ 2\left(\mathbf{H}^{I}_{(:,\lceil i/4\rceil)}\cdot \mathbf{H}^{I}_{(:,\lceil j/4\rceil)}\right)+2\left(\mathbf{H}^{Q}_{(:,\lceil j/4\rceil)}\cdot \mathbf{H}^{Q}_{(:,\lceil i/4\rceil)}\right). \end{cases}\\ \end{cases} \end{align} \end{small} \subsection{Primer:\ Quantum Annealing} \label{s:opt}\label{s:opt:prior}\label{s:qa} Quantum Annealers \cite{AQC, QA} are specialized, analog computers that solve NP\hyp{}complete and NP\hyp{}hard optimization problems on current hardware, with future potential for substantial speedups over conventional computing \cite{Mc}. Many NP\hyp{}hard problems can be formulated in the Ising model \cite{10.3389/fphy.2014.00005} (\emph{cf.} \S\ref{s:reducing}), which many QA machines use as input \cite{DW_part,DW_map}. NP\hyp{}complete and NP\hyp{}hard problems other than ML MIMO detection in the field of (wireless) networking that potentially benefit from QA include MIMO downlink precoding \cite{mazrouei2012vector}, channel coding \cite{jose2015analysis, wu2003block}, network routing \cite{chen2002efficient}, security \cite{forouzan2007cryptography}, and scheduling \cite{liu2001opportunistic, georgiadis2006resource}. \begin{figure} \centering \includegraphics[trim={1cm 2.2cm 1cm 2cm},clip,width=0.90\linewidth]{figures/dwave.jpg} \caption{\normalfont A D-Wave 2000Q (DW2Q) machine at NASA Ames Research Center, which hosts a \emph{Whistler} processor manufactured with 2,048 qubits and 5,019 qubit-coupling parameters. The chip is hosted in a high\hyp{}vacuum, magnetically shielded enclosure at a temperature of about 13~milliKelvin.} \label{f:dwave} \end{figure} \paragraph{Quantum Annealing hardware.} Compared to simulated annealing, the classical algorithm from which QA inherits its name, QA aims to exploit quantum effects such as \emph{tunneling}, \emph{many-body delocalization} and \emph{quantum relaxation} to circumvent computational bottlenecks that would otherwise trap Monte Carlo methods in local minima of the solution landscape. While exploiting QA is technologically challenging, with the appearance of the D-Wave quantum annealer (Fig.~\ref{f:dwave}), the research community is now able to run experiments, and critically, to study under what conditions a noisy\hyp{}intermediate\hyp{}scale\hyp{}quantum (NISQ) machine~\cite{preskill2018quantum} can use quantum resources to deliver a speedup~\cite{job2018test}. For instance, recently Boixo \emph{et al.} \cite{boixo-45467} and Denchev \emph{et al.} \cite{denchev-44814} have found evidence that tunneling under ideal conditions can be exploited on an earlier model of the D-Wave 2000Q (DW2Q) machine, delivering many orders of magnitude speedup against CPU-based simulated annealing, which is considered to be one of the best classical competitions to \emph{Quantum Processing Units} (QPUs). QPUs also outperform GPU implementations by several orders of magnitude in random problems whose structure is related to real world optimization problems~\cite{king2019quantum}. The DW2Q is an analog optimizer, meaning that it computes continuously rather than in discrete clock cycles, and that it represents numerical quantities as analog instead of digital quantities. The hardware initializes each of its $N$ constituent \emph{quantum bits}, or \emph{qubits}, to begin in a \emph{superposition state} $1/\sqrt{2} \left( \ket{0} + \ket{1} \right)$ that has no classical counterpart. In concrete terms, these qubits are metallic circuits in a chip that are maintained in a superconducting state by low temperature and subjected to the influence of tailored magnetic fluxes. The collection of $N$ qubits at this point in time encodes all the possible $2^N$ outputs in a single state. This initial setting is achieved by exposing all the qubits in the chip to a signal $A(t)$ whose magnitude at this point in time is maximal. Then the system implements an \emph{objective function} which is represented by another signal $B(t)$ and is ramped up from zero, while $A(t)$ is decreased progressively at the same time. The synchronized sequence of signals $A$ and $B$ and their time dependence is the \emph{annealing schedule}. The schedule is essentially the QA algorithm, and has to be optimized so that at the end of the run ($B(t)=\max$ and $A(t)=0$), each qubit in the chip assumes either a value of $\ket{0}$ or $\ket{1}$, corresponding to classical bit values, 0 or 1, respectively. This final state of these qubits collectively represents a candidate solution of the problem, ideally the \emph{ground state} of the system (\emph{i.e.}, the minimum of the optimization objective function) \cite{johnson-nature11, quant-ph/0001106}. \vspace*{1.00ex minus 0.25ex}\noindent{} In practice, at the end of the run, the ground state will be found with a probability that depends on the degree to which the schedule is optimal for the problem at hand, as well as on the effect of uncontrollable QA noise and environmental interference on the annealer. While the quantum community is investigating physics principles to guide schedule parameters, most clearly\hyp{}understood theoretical principles do not apply to current, imperfect experimental systems~\cite{job2018test}. Hence the empirical approach, which we take in this paper, represents current state\hyp{}of\hyp{}the\hyp{}art~\cite{ronnow2014defining}. Three degrees of freedom are specifically investigated in this work. \vspace*{1.00ex minus 0.25ex}\noindent{} \begin{itemize} \item First, there are many ways of mapping a problem to an equivalent Ising formulation that runs on the machine (we investigate one such mapping in Section~\ref{s:design}). \item Second, the user may accelerate or delay $A(t)$/$B(t)$ evolution, thus determining \emph{annealing time} (1--300~$\mu$s), the duration of the machine's computation. \item Finally, the user may introduce stops (\emph{anneal pause}) in the annealing process, which have been shown to improve performance in certain settings \cite{DWPauseMarshall}. \end{itemize} \section{Background} \label{s:primer} In this section, we present primer material on the MIMO ML Detection problem (\S\ref{s:ml}), and Quantum Annealing (\S\ref{s:qa}). \begin{table}[t!] \centering \begin{small} \caption{\normalfont Sphere Decoder visited node count \cite{Geosphere}, complexity over 10,000 instances, and practicality on a Skylake Core i7 architecture.} \label{t:visited_nodes} \begin{tabularx} {\linewidth}{*{2}{X}cr}\toprule {\bf BPSK}& {\bf QPSK} & {\bf 16-QAM} &{\bf Complexity (Visited Nodes)}\\ \cmidrule(r){1-4} $\mathbf{12\times 12}$&$\mathbf{7\times 7}$ & $\mathbf{4\times 4}$& \cellcolor{LightGreen} $\approx$ 40 (feasible)\\ $\mathbf{21\times 21}$&$\mathbf{11\times 11}$ & $\mathbf{6\times 6}$& \cellcolor{LightOrange} $\approx$ 270 (borderline) \\ $\mathbf{30\times 30}$&$\mathbf{15\times 15}$ & $\mathbf{8\times 8}$& \cellcolor{LightRed} $\approx$ 1,900 (unfeasible)\\ \bottomrule \end{tabularx} \end{small} \end{table} \phantomsection \subsection{Primer:\ Maximum Likelihood Detection} \label{s:ml} Suppose there are $N_t$ mobile users, each of which has one antenna, each sending data bits to a multi\hyp{}antenna ($N_r\geq N_t$) MIMO AP based on OFDM, the dominant physical layer technique in broadband wireless communication systems~\cite{nee2000ofdm}. Considering all users' data bits together in a vector whose elements each comprise a single user's data bits, the users first map those data bits into a complex\hyp{}valued \emph{symbol} $\mathbf{\bar{v}}$ that is transmitted over a radio channel: $\mathbf{\bar{v}} = [\bar{v}_1, \bar{v}_2, \dots, \bar{v}_{N_t}]^\intercal$ $\in{\mathbb{C}^{N_t}}$. Each user sends from a \emph{constellation} $\mathcal{O}$ of size $|\mathcal{O}|$ = $2^Q$ ($Q$ bits per symbol). The MIMO decoding problem, whose optimal solution is called the ML solution, consisting of a search over the sets of transmitted symbols, looking for the set that minimizes the error with respect to what has been received at the AP: \begin{equation} \label{eqn:ml} \hat{\mathbf{v}} = \arg\min_{\mathbf{v} \in \mathcal{O}^{N_t}} \left\lVert\mathbf{y} - \mathbf{Hv}\right\rVert^2. \end{equation} The ML decoder then ``de-maps'' the decoded symbols $\hat{\mathbf{v}}$ to decoded bits \label{def:decodedbit} $\hat{\mathbf{b}}$. In Eq.~\ref{eqn:ml}, $\mathbf{H}$ $\in{\mathbb{C}^{N_r\times N_t}} = \mathbf{H}^{I} + j\mathbf{H}^{Q}$ is the wireless channel\footnote{The channel changes every channel \emph{coherence time}, and is practically estimated and tracked via preambles and\fshyp{}or pilot tones. Typical coherence time at 2~GHz and a walking speed is {\itshape ca.} 30~ms \cite{tse-viswanath}.} on each OFDM subcarrier and $\mathbf{y}$ $\in{ \mathbb{C}^{N_r}}$ ($= \mathbf{H}\mathbf{\bar{v}}+\mathbf{n}$) is the received set of symbols, perturbed by $\mathbf{n}$ $\in{\mathbb{C}^{N_r}}$, additive white Gaussian noise (AWGN)\label{def:AWGN}. This solution minimizes detection errors, thus maximizing throughput ({\it i.e.}, throughput\hyp{}optimal decoding). The \emph{Sphere Decoder} \cite{Agrell02,Damen03} is a ML detector that reduces complexity with respect to brute\hyp{}force search by constraining its search to only possible sets $\mathbf{v}$ that lie within a hypersphere of radius $\sqrt{C}$ centered around $\mathbf{y}$ ({\it i.e.,} Eq.~\ref{eqn:ml} with constraint $\Vert {\textbf{y}} -\textbf{Hv} \Vert^{2}\leq C$). It transforms Eq.~\ref{eqn:ml} into a tree search \cite{SD} by QR decomposition $\textbf{H}=\textbf{QR}$, where $\textbf{Q}$ is orthonormal and $\textbf{R}$ upper\hyp{}triangular, resulting in $\hat{\textbf{v}}=\text{arg} \min_{\textbf{v}\in \mathcal{O}^{N_{t}}} \Vert \bar{\textbf{y}} -\textbf{Rv} \Vert^{2}$, with $\bar{\textbf{y}}=\textbf{Q}^{*}\textbf{y}$. The resulting tree has a height of $N_{t}$, branching factor of $|\mathcal{O}|$, and $1+\sum^{N_t}_{i=1} |\mathcal{O}|^i$ nodes. ML detection becomes the problem of finding the single leaf among $|\mathcal{O}|^{N_t}$ with minimum metric; the corresponding tree path is the ML solution. Thus, the $\min$ in Eq.~\ref{eqn:ml} is a search in an exponentially\hyp{}large space of transmitted symbols $\left\{ \mathbf{v} \right\}$, despite Sphere Decoder reductions in the search space size \cite{SD}. \parahead{} Table~\ref{t:visited_nodes} shows the average number of tree nodes visited to perform ML Sphere decoding, with clients transmitting modulation symbols on 50 subcarriers over a 20~MHz, 13~dB SNR (Signal to Noise Ratio) Rayleigh channel. The table is parameterized on the number of clients and AP antennas, and the modulation, highlighting the exponential increase in computation. For 8 clients with 16\hyp{}QAM symbols, 15 clients with QPSK symbols, or 30 clients sending binary (BPSK) symbols, the Sphere Decoder visits close to 2,000 tree nodes, saturating, for example, Intel's Skylake core i7 architecture, whose arithmetic subsystem achieves an order of magnitude less computational throughput \cite{flexcore-nsdi17}. Since traditional silicon's clock speed is plateauing~\cite{elec:courtland}, the problem is especially acute. \input{primer-qa} \section{QUBO Forms} \label{s:qubo_forms} We demonstrate how to transform $2\times 2$ BPSK MIMO Maximum Likelihood (ML) detection into the QUBO form. ML detection solves Eq.~\ref{eqn:ml}, where \begin{small} \begin{align} \mathbf{H}= \begin{bmatrix} h_{11} & h_{12} \\ h_{21} & h_{22} \\ \end{bmatrix} = \begin{bmatrix} h_{I,11} & h_{I,12} \\ h_{I,21} & h_{I,22} \\ \end{bmatrix} + j \begin{bmatrix} h_{Q,11} & h_{Q,12} \\ h_{Q,21} & h_{Q,22} \\ \end{bmatrix}, \notag\\ y= \begin{bmatrix} y_{1} \\ y_{2} \\ \end{bmatrix} = \begin{bmatrix} y_{I,1} \\ y_{I,2} \\ \end{bmatrix} + j \begin{bmatrix} y_{Q,1} \\ y_{Q,2} \\ \end{bmatrix}\,\textrm{and}\, \mathbf{v}= \begin{bmatrix} v_{1} \\ v_{2} \\ \end{bmatrix}.\notag \end{align} \end{small} The norm expansion in Eq.~\ref{eqn:ml} can be expressed as \begin{small} \begin{align} \lVert \mathbf{y - Hv} \rVert^2= \left\lVert \begin{bmatrix} y_{1} \\ y_{2} \\ \end{bmatrix} - \begin{bmatrix} h_{11} & h_{12} \\ h_{21} & h_{22} \\ \end{bmatrix}\begin{bmatrix} v_1 \\ v_2 \\ \end{bmatrix} \right\rVert^2 = \begin{Vmatrix} y_1 - h_{11}v_1 - h_{12}v_2 \\ y_2 - h_{21}v_1 - h_{22}v_2 \\ \end{Vmatrix}^2\notag \\ =\begin{Vmatrix} (y_{I,1} -h_{I,11}v_1 - h_{I,12}v_2) + j(y_{Q,1} -h_{Q,11}v_1 - h_{Q,12}v_2) \\ (y_{I,2} - h_{I,21}v_1 - h_{I,22}v_2) + j(y_{Q,2} - h_{Q,21}v_1 - h_{Q,22}v_2) \end{Vmatrix}^2 \notag\\ = \{(y_{I,1} - h_{I,11}v_1 - h_{I,12}v_2)\}^2 + \{(y_{Q,1} - h_{Q,11}v_1 - h_{Q,12}v_2)\}^2 \notag\\ + \{(y_{I,2} - h_{I,21}v_1 - h_{I,22}v_2)\}^2 + \{(y_{Q,2} - h_{Q,21}v_1 - h_{Q,22}v_2)\}^2.\notag \end{align} \end{small} In the case of BPSK, symbol $v_i \in \{-1,1\}$ is represented by a QUBO variable $q_i$. One possible transform is $2q_i-1$ where $q_i=0$ corresponds to $v_i=-1$ and $q_i=1$ to $v_i=1$. This leads to $\mathbf{v} = [v_{1}, v_{2}]^\intercal$ $=[\mathbf{T({q_1})}, \mathbf{T({q_2})}]^\intercal$, where $\mathbf{T(q_1)} = 2q_{1}-1$ and $\mathbf{T(q_2)} = 2q_{2}-1$. Using these relationships, we can express the above norm as \begin{small} \begin{align} \lVert \mathbf{y - Hv} \rVert^2= \left\lVert \begin{bmatrix} y_{1} \\ y_{2} \\ \end{bmatrix} - \begin{bmatrix} h_{11} & h_{12} \\ h_{21} & h_{22} \\ \end{bmatrix}\begin{bmatrix} \mathbf{T(q_1)} \\ \mathbf{T(q_2)} \\ \end{bmatrix} \right\rVert^2 \notag\\ =\{(y_{I,1} - h_{I,11}(2q_1-1) - h_{I,12}(2q_2-1))\}^2 \notag\\+ \{(y_{Q,1} - h_{Q,11}(2q_1-1) - h_{Q,12}(2q_2-1))\}^2 \notag\\+ \{( y_{I,2} - h_{I,21}(2q_1-1) - h_{I,22}(2q_2-1))\}^2 \notag\\+ \{(y_{Q,2} - h_{Q,21}(2q_1-1) - h_{Q,22}(2q_2-1))\}^2.\notag \end{align} \end{small} Then we obtain the objective function of ML problem with QUBO variables. Using $q_i^2=q_i$, minimization of this objective function becomes the QUBO form (Eq.~\ref{eqn:qubo}): \begin{small} \begin{align} \hat{q_1}, \hat{q_2} = \arg\min_{q_1,q_2} Q_{11}q_1 + Q_{22}q_2 + Q_{12}q_1q_2, \,\textrm{where}\,\notag\\ Q_{11} = -4h_{I,11}y_{I,1} -4h_{I,21}y_{I,2} -4h_{Q,11}y_{Q,1} -4h_{Q,21}y_{Q,2} \notag\\-4h_{I,11}h_{I,12} -4h_{I,21}h_{I,22} -4h_{Q,11}h_{Q,12}- 4h_{Q,21}h_{Q,22},\notag\\ Q_{22} = -4h_{I,12}y_{I,1} -4h_{I,22}y_{I,2} -4h_{Q,12}y_{Q,1} -4h_{Q,22}y_{Q,2} \notag\\-4h_{I,12}h_{I,12} -4h_{I,22}h_{I,22} -4h_{Q,12}h_{Q,12}- 4h_{Q,22}h_{Q,22},\notag\\ Q_{12} = 8h_{I,11}h_{I,12} + 8h_{I,21}h_{I,22} + 8h_{Q,11}h_{Q,12} + 8h_{Q,21}h_{Q,22}.\notag \end{align} \end{small} \section{Related Work} \label{s:related} \paragraph{Applications of QA.} Despite the immaturity of software toolchains, existing quantum annealing machines have been already programmed successfully to solve problems in Planning and Scheduling \cite{Rieffel2015}, Databases \cite{Trummer:2016:MQO:2947618.2947621}, Fault Diagnostics \cite{Perdomo-Ortiz2015}, Machine Learning \cite{perdomo2017opportunities}, Finance \cite{Rosenberg:2015:SOT:2830556.2830563}, Data Analysis \cite{mott2017solving}, Chemistry~\cite{hernandez2017enhancing}, and Space Sciences\fshyp{}Aeronautics \cite{biswas2017nasa}. A Similar problem to ML detection, CDMA multiuser demodulation, was solved using quantum fluctuations controlled by the transverse field (similar as QA) in \cite{otsubo2014code}. Of particular relevance is work on optimization of fully\hyp{}connected graphs, such as the ones used to map the ML problem \cite{PhysRevX.5.031040}; the results of which showed that QA performance could match the most highly optimized simulated annealing code run on the latest Intel processors. For further details on the logical to physical qubit embedding process, see Venturelli \emph{et al.} \cite{PhysRevX.5.031040}. Efficient embeddings which do not force the chip coverage to be a triangle are also known~\cite{boothby2016fast}. \paragraph{QAOA.} Quantum Approximate Optimization Algorithms, invented in 2014 \cite{farhi2014quantum}, and recently generalized for constrained combinatorial optimization \cite{Hadfield:2017:QAO:3149526.3149530}, require digital gate\hyp{}model QC, which became available at reasonable scale only in 2017 (prototypes from IBM, Rigetti Computing, and Google are available). While QA and QAOA require different hardware (the former is analog, the latter digital) they have in common that: {\bf (1)}~For problems that don't have hard constraints, the programming step consists in defining a classical combinatorial problem which is cast into QUBO \cite{boros2007local, QUBO} or \emph{Ising} form, hence they both may leverage our formulation \S\ref{s:reducing}. {\bf (2)}~QAOA can be seen in some parameter range as a ``digitized'' version of QA, and it has been formally demonstrated that it can simulate the results and performance of QA and outperform it, in principle \cite{yang2017optimizing}. The first commonality is particularly important since it opens the door to application of our techniques on future hardware capable of running QAOA. \paragraph{Conventional ML Detectors.} Faster silicon based ML detector strategies typically approximate and parallelize the ML computation \cite{Wenk10, cui-tvt13}. In these general directions, much progress has been made to the point that Sphere Decoders have been realized in ASIC hardware~\cite{ETH_HARD, winter12} but fall short for the reasons noted in Table~\ref{t:visited_nodes} when the setting demands more antennas at the AP (serving more users), or when the modulation chosen increases \cite{flexcore-nsdi17, BigStation}.
\section{Introduction and Prelimenaries} Consider the binary hypothesis testing problem \cite{Lehmann} where an observation $\xv=(x_1,\dotsc,x_n)$ is generated from two possible distributions $P^n_1$ and $P^n_2$ defined on the probability simplex $\Pc(\Xc^n)$. We assume that $P^n_1$ and $P^n_2$ are product distributions, i.e., $P_1^n(\xv)=\prod_{i=1}^n P_1(x_i)$, and similarly for $P_2^n$. For simplicity, we assume that both $P_1(x)>0$ and $P_2(x)>0$ for each $x\in\Xc$. Let $\phi: \mathcal{X}^n \rightarrow \{1,2\}$ be a hypothesis test that decides which distribution generated the observation $\xv$. We consider deterministic tests $\phi$ that decide in favor of $P_1^n$ if $\xv\in \Ac_1$, where $\Ac_1\subset \Xc^n$ is the decision region for the first hypothesis. We define $\Ac_2=\Xc^n \setminus \Ac_1$ to be the decision region for the second hypothesis. The test performance is measured by the two possible pairwise error probabilities. The type-\RNum{1} and type-\RNum{2} error probabilities are defined as \begin{equation}\label{eq:e1} \epsilon_1 (\phi)= \sum_{\bx \in \Ac_2} P_1^n(\bx),~~~~ \epsilon_2 (\phi)= \sum_{\bx \in \Ac_1} P_2^n(\bx). \end{equation} A hypothesis test is said to be optimal whenever it achieves the optimal error probability tradeoff given by \begin{equation}\label{eq:trade} \alpha_\beta = \min_{\phi: \epsilon_2 (\phi) \leq \beta} \epsilon_1 (\phi) . \end{equation} The likelihood ratio test defined as \begin{equation} \phi_\gamma(\boldsymbol{x})= \mathbbm{1} \bigg \{ \frac{P_2^n(\bx)}{P_1^n(\bx)} \geq e^{n\gamma} \bigg\}+1. \end{equation} was shown in \cite{Neyman} to attain the optimal tradeoff \eqref{eq:trade} for every $\gamma$. The type of a sequence $\bx= (x_1,\ldots,x_n)$ is $\Th(a)=\frac{N(a|\bx)}{n}$, where $N(a|\bx)$ is the number of occurrences of the symbol $a\in\Xc$ in the string. The likelihood ratio test can also be expressed as a function of the type of the observation $\Th$ as \cite{Cover} \begin{align}\label{eq:LRTtype} \phi_{\gamma}(\Th)= \mathbbm{1} \big\{ D(\Th\|P_1)-D(\Th\|P_2) \geq \gamma \big\}+1. \end{align} where $D(P\|Q)= \sum_{\mathcal{X}} P(x) \log \frac{P(x)}{Q(x)}$ is the relative entropy between distributions $P$ and $Q$. In this paper, we are interested in the asymptotic exponential decay of the pairwise error probabilities. Therefore, it is sufficient to consider deterministic tests The optimal error exponent tradeoff $(E_1,E_2)$ is defined as \begin{align}\label{eq:tradefix} E_2(E_1) \triangleq \sup \big\{E_2\in \mathbb{R}_{+}: \exists \phi , \exists n_0 \in \mathbb{Z}_+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ \epsilon_1(\phi) \leq e^{-nE_1} \quad \text{and} \quad \epsilon_2(\phi) \leq e^{-nE_2}\big\}. \end{align} By using the Sanov's Theorem \cite{Cover,Dembo}, the optimal error exponent tradeoff $(E_1,E_2)$, attained by the likelihood ratio test, can be shown to be \cite{Blahut,Hoeffding} \begin{align} E_1(\phi_{\gamma})=\min_{Q \in \mathcal{Q}_1(\gamma)} D(Q\|P_1)\label{eq:min1},\\ E_2(\phi_{\gamma})=\min_{Q \in \mathcal{Q}_2(\gamma)} D(Q\|P_2)\label{eq:min2}, \end{align} where \begin{align} \mathcal{Q}_1(\gamma)&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| P_1)-D(Q\|P_2) \geq \gamma \big\},\\ \mathcal{Q}_2(\gamma)&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| P_1)-D(Q\|P_2) \leq \gamma \big\}. \end{align} The minimizing distribution in \eqref{eq:min1}, \eqref{eq:min2} is the tilted distribution \begin{equation}\label{eq:tilted} Q_{\lambda}(x)= \frac{ P_{1}^{1-\lambda}(x) P_{2}^{\lambda}(x) } {\sum_{a \in \mathcal{X} } P_{1}^{1-\lambda}(a) P_{2}^{\lambda}(a) }, ~~~0\leq\lambda \leq 1 \end{equation} whenever $\gamma$ satisfies $-D(P_1\|P_2) \leq \gamma \leq D(P_2\|P_1)$. In this case, $\lambda$ is the solution of \begin{equation}\label{eq:KKTgamma} D(Q_{\lambda}\| P_1)-D(Q_{\lambda} \| P_2) = \gamma. \end{equation} Instead, if $\gamma<-D(P_1\|P_2)$, the optimal distribution in \eqref{eq:min1} is $Q_\lambda(x)= P_1(x)$ and $E_1(\phi_{\gamma})=0$, and if $\gamma>D(P_2\|P_1)$, the optimal distribution in \eqref{eq:min2} is $Q_\lambda(x)= P_2(x)$ and $E_2(\phi_{\gamma})=0$. Equivalently, the dual expressions of \eqref{eq:min1} and \eqref{eq:min2} can be derived by substituting the minimizing distribution \eqref{eq:tilted} into the Lagrangian yielding \cite{Blahut,Dembo} \begin{align} E_1(\phi_{\gamma})&=\max_{\lambda \geq 0 } \lambda \gamma - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{1-\lambda}(x) P_2^{\lambda}(x) \Big ), \\ E_2(\phi_{\gamma})&=\max_{\lambda \geq 0 } -\lambda \gamma - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{\lambda}(x) P_2^{1-\lambda}(x) \Big ). \end{align} The Stein regime is defined as the highest error exponent under one hypothesis when the error probability under the other hypothesis is at most some fixed $ \epsilon \in (0,\frac{1}{2})$ \cite{Cover} \begin{align}\label{eq:steindef} E_2^{(\epsilon)} \triangleq \sup \big \{E_2\in \mathbb{R}_{+}: \exists \phi , \exists n_0 \in \mathbb{Z}_+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ \epsilon_1 (\phi)\leq \epsilon \quad \text{and} \quad \epsilon_2(\phi) \leq e^{-nE_2} \big \}. \end{align} The optimal $E_2^{(\epsilon)}$, given by \cite{Cover} \begin{equation}\label{eq:stein2} E_2^{(\epsilon)} = D(P_1\|P_2), \end{equation} can be achieved by setting the threshold in \eqref{eq:LRTtype} to be ${\gamma} = -D(P_1\|P_2)+\frac{C_2}{\sqrt{n}}$, where $C_2$ is a constant that depends on distributions $P_1, P_2$ and $\epsilon$. In this work, we revisit the above results in the case where the distributions used by the likelihood ratio test are not known precisely, and instead, fixed distributions $\hat P_1$ and $\hat P_2$ are used for testing. In particular, we find the error exponent tradeoff for fixed $\hat P_1$ and $\hat P_2$ and we study the worst-case tradeoff when the true distributions generating the observation are within a certain distance of the test distributions. The literature in robust hypothesis testing is vast (see e.g., \cite{Huber,Kassam,poor2013introduction} and references therein). Robust hypothesis testing consists of designing tests that are robust to the inaccuracy of the distributions generating the observation. Instead, we study the error exponent tradeoff performance of the likelihood ratio test for fixed test distributions. \section{Mismatched Likelihood Ratio Testing} \label{sec:fixedHT} Let $\hat{P}_1(x)$ and $\hat{P}_2(x)$ be the test distributions used in the likelihood ratio test with threshold $\hat{\gamma}$ given by \begin{align}\label{eq:LRTtypeMM} \hat{\phi}_{\hat{\gamma}}(\Th)= \mathbbm{1} \big\{ D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \geq \hat{\gamma} \big\}+1. \end{align} For simplicity, we assume that both $\hat P_1(x)>0$ and $\hat P_2(x)>0$ for each $x\in\Xc$. We are interested in the achievable error exponent of the mismatched likelihood ratio test, i.e., \begin{align} \hat{E}_2(\hat{E}_1) \triangleq \sup& \big\{\hat{E}_2\in \mathbb{R}_{+}: \exists \hat{\gamma} , \exists n_0 \in \mathbb{Z} _+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ &\epsilon_1(\hat{\phi}_{\hat{\gamma}}) \leq e^{-n\hat{E}_1} ~ \text{and} ~ \epsilon_2(\hat{\phi}_{\hat{\gamma}}) \leq e^{-n\hat{E}_2}\big\}. \label{eq:opttestmism} \end{align} \begin{theorem}\label{thm:mismatchLRT} For fixed $\hat{P}_1, \hat{P}_2 \in \mathcal{P}(X)$ the optimal error exponent tradeoff in \eqref{eq:opttestmism} is given by \begin{align} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})&=\min_{Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma})} D(Q\|P_1) \label{eq:LRTmis1}\\ \hat{E}_2(\hat{\phi}_{\hat{\gamma}})&=\min_{Q \in \mathcal{\hat{Q}}_2(\hat{\gamma})} D(Q\|P_2)\label{eq:LRTmis2} \end{align} where \begin{align} \mathcal{\hat{Q}}_1(\hat{\gamma})&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| \hat{P}_1)-D(Q\|\hat{P}_2) \geq \hat{\gamma} \big \}, \label{eq:qhat1}\\ \mathcal{\hat{Q}}_2(\hat{\gamma})&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| \hat{P}_1)-D(Q\|\hat{P}_2) \leq \hat{\gamma} \big \}. \label{eq:qhat2} \end{align} The minimizing distributions in \eqref{eq:LRTmis1} and \eqref{eq:LRTmis2} are \begin{equation}\label{eq:tiltedMM1} \hat{Q}_{\lambda_1}(x)= \frac{ P_1(x) \hat{P}_{1}^{-\lambda_1}(x) \hat{P}_{2}^{\lambda_1}(x) } {\sum_{a \in \mathcal{X} } P_1 (a) \hat{P}_{1}^{-\lambda_1}(a) \hat{P}_{2}^{\lambda_1}(a) },~~\lambda_1\geq0, \end{equation} \begin{equation}\label{eq:tiltedMM2} \hat{Q}_{\lambda_2}(x)= \frac{ P_2(x) \hat{P}_{2}^{-\lambda_2}(x) \hat{P}_{1}^{\lambda_2}(x) } {\sum_{a \in \mathcal{X} } P_2 (a) \hat{P}_{2}^{-\lambda_2}(a) \hat{P}_{1}^{\lambda_2}(a) },~~\lambda_2\geq0 \end{equation} respectively, where $ \lambda_1$ is chosen so that \begin{equation}\label{eq:KKTgamma1} D(\hat{Q}_{\lambda_1}\|\hat{P}_1)-D(\hat{Q}_{\lambda_1} \| \hat{P}_2) = \hat{\gamma}, \end{equation} whenever $D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}$, and otherwise, $\hat{Q}_{\lambda_1}(x)=P_1(x)$ and $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Similarly, $ \lambda_2 \geq 0$ is chosen so that \begin{equation}\label{eq:KKTgamma2} D(\hat{Q}_{\lambda_2}\|\hat{P}_1)-D(\hat{Q}_{\lambda_2} \| \hat{P}_2) = \hat{\gamma}, \end{equation} whenever $ D(P_2 \|\hat{P}_1) -D(P_2 \|\hat{P}_2) \geq\hat{\gamma},$ and otherwise, $\hat{Q}_{\lambda_2}(x)=P_2(x)$ and $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})=0$. Furthermore, the dual expressions for the type-\RNum{1} and type-\RNum{2} error exponents are \begin{align}\label{eq:dual} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})&=\max_{\lambda \geq 0 } \lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1(x) \hat{P}_1^{-\lambda}(x) P_2^{\lambda}(x) \Big ), \\ \hat{E}_2(\hat{\phi}_{\hat{\gamma}})&=\max_{\lambda \geq 0 } -\lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{\lambda}(x) P_2(x) \hat{P}_2^{-\lambda}(x) \Big ). \end{align} \end{theorem} \begin{remark} For mismatched likelihood ratio testing, the optimizing distributions $\hat{Q}_{\lambda_1}, \hat{Q}_{\lambda_2}$ can be different, since the decision regions only depend on the mismatched distributions. However, if $\hat{P}_1, \hat{P}_2$ are tilted with respect to $P_1$ and $P_2$, then both $\hat{Q}_{\lambda_1}, \hat{Q}_{\lambda_2}$ are also tilted respect to $P_1$ and $P_2$. This implies the result in \cite{Unnikrishnan}, where for any set of mismatched distributions $\hat{P}_1, \hat{P}_2$ that are tilted with respect to generating distributions, the mismatched likelihood ratio test achieves the optimal error exponent tradeoff in \eqref{eq:tradefix}. \end{remark} \begin{theorem}\label{thm:stein} In the Stein regime, the mismatched likelihood ratio test achieves \begin{equation}\label{eq:steinMM2} \hat{E}_2^{(\epsilon)}=\min_{Q \in \mathcal{\hat{Q}}_2(\hat{\gamma})} D(Q\|P_2), \end{equation} with threshold \begin{equation}\label{eq:steinthresh2} \hat{\gamma}=D(P_1\|\hat{P}_1) -D(P_1\|\hat{P}_2) +\frac{\hat{C}_2}{\sqrt{n}}, \end{equation} and $\hat{C}_2$ is a constant that depends on distributions $P_1,\hat{P}_1,\hat{P}_2$, and $\epsilon$. \end{theorem} \begin{remark} Note that since $P_1$ satisfies the constraint in \eqref{eq:steinMM2} then $\hat{E}_2^{(\epsilon)} \leq {E}_2^{(\epsilon)}$. In fact, if $\hat{P}_1, \hat{P}_2$ are tilted respect to $P_1, P_2$ then this inequality is met with equality. Moreover, it is easy to find a set of data and test distributions where $\hat{E}_2^{(\epsilon)} < {E}_2^{(\epsilon)}$. \end{remark} \section{Mismatched Likelihood Ratio \\Testing with Uncertainty} In this section, we analyze the worst-case error exponents tradeoff when the actual distributions $P_1, P_2$ are close to the mismatched test distributions $\hat{P}_1$ and $\hat{P}_2$. More specifically, \begin{equation}\label{eq:ball2} P_1 \in \mathcal{B}(\hat P_1,R_1),~~ P_2 \in \mathcal{B}(\hat P_2, R_2) \end{equation} where the $D$-ball \begin{equation}\label{eq:ball} \mathcal{B}( Q,R)= \big\{P\in\Pc(\Xc): D(Q\|P) \leq R \big\} \end{equation} is a ball centered at distribution $Q$ containing all distributions whose relative entropy is smaller or equal than radius $R$. This model was used in robust hypothesis testing in \cite{Levy}. Figure \ref{fig:mismatch} depicts the mismatched probability distributions and the mismatched likelihood ratio test as a hyperplane dividing the probability space into the two decision regions. \begin{figure}[!h] \centering \begin{tikzpicture}[scale=0.85] \draw (5,1.2) -- (0,-5) -- (10,-5) --(5,1.2) ; \draw [line width=0.3mm, dashed] (4,-0.05) -- (5.,-5) ; \node at (7.1,-4.5) {\small $D(Q\|\hat{P}_1)-D(Q\|\hat{P}_2) = \hat{\gamma}$}; \node[draw,circle,inner sep=1pt,fill] at (3,-3.5) {}; \node at (3.3,-3.5) {\small $ \hat{P}_1$}; \node[draw,circle,inner sep=1pt,fill] at (6.5,-2.6) {}; \node at (6.7,-2.8) {\small $\hat{P}_2$}; \draw (2.7,-3.5) ellipse (1cm and 0.7cm); \draw (6.5,-2.5) ellipse (1 cm and 0.7 cm); \node at (1,-4.6) {$\mathcal{P}({\mathcal{X}})$}; \draw [->,>=stealth] (6.5,-2.6) -- (6.8,-1.85); \draw [->,>=stealth] (3,-3.5) -- (3.2,-4.1); \node at (2.9,-3.9) {\small $R_1$}; \node at (6.9,-2.25) {\small $R_2$}; \node[draw,circle,inner sep=1pt,fill] at (3,-3) {}; \node[draw,circle,inner sep=1pt,fill] at (6,-2.2) {}; \draw [line width=0.25mm, gray]plot [smooth, tension=1] coordinates{(3,-3) (4,-2.75) (4.55,-2.7)} ; \draw [line width=0.25mm, gray]plot [smooth, tension=1] coordinates{ (6,-2.2) (5.5,-2.1) (4.47,-2.4)} ; \node[draw,circle,inner sep=1pt,fill] at (4.55,-2.7) {}; \node[draw,circle,inner sep=1pt,fill] at (4.47,-2.4) {}; \node at (4.9,-2.8) {\tiny $\hat{Q}_{\lambda_1}$}; \node at (4.15,-2.2) {\tiny $\hat{Q}_{\lambda_2}$}; \node at (3.8,-2.52) {\small $\hat E_1$}; \node at (5.2,-1.9) {\small $\hat E_2$}; \node at (2.75,-3.1) {\small $P_1$}; \node at (6,-2.5) {\small $P_2$}; \node at (3.6,-1.4) {\small $\Ac_1$}; \node at (5.3,-0.7) {\small $\Ac_2$}; \node at (2.8,-4.5) {\small $\mathcal{B}(\hat P_1,R_1)$}; \node at (7,-3.5) {\small $\mathcal{B}(\hat P_2,R_2)$}; \end{tikzpicture} \caption{Mismatched likelihood ratio test over distributions in $D$-balls. } \label{fig:mismatch} \end{figure} We study the worst-case error-exponent performance of mismatched likelihood ratio testing when the distributions generating the observation fulfill \eqref{eq:ball2}. In particular, we are interested in the least favorable distributions $P_1^L, P_2^L$ in $\mathcal{B}(\hat P_1,R_1), \mathcal{B}(\hat P_2,R_2)$, i.e., the distributions achieving the lowest error exponents $\hat{E}^L_1(R_1), \hat{E}^L_2(R_2)$. \begin{theorem}\label{thm:worstmismatch} For every $ R_{1}, R_2 \geq 0$ let the least favorable exponents $\hat{E}^L_1(R_1), \hat{E}^L_2(R_2)$ defined as \begin{align} \hat{E}^L_1(R_1)&=\min_{P_1 \in \mathcal{B}(\hat P_1,R_1) } \ \ \min_{Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma})} D(Q\|P_1),\label{eq:MMlower1}\\ \hat{E}^L_2(R_2)&=\min_{P_2 \in \mathcal{B}(\hat P_2,R_2)} \ \ \min_{ Q \in \mathcal{\hat{Q}}_2 (\hat{\gamma}) } D(Q\|P_2), \label{eq:MMlower2} \end{align} where $\mathcal{\hat{Q}}_1 (\hat{\gamma}), \mathcal{\hat{Q}}_2 (\hat{\gamma}) $ are defined in \eqref{eq:qhat1}, \eqref{eq:qhat2}. Then, for any distribution pair $P_1 \in\mathcal{B}(\hat P_1,R_1), P_2 \in \mathcal{B}(\hat P_2,R_2)$, the corresponding error exponent pair $(\hat{E}_1, \hat{E}_2)$ satisfies \begin{equation}\label{eq:LU1} \hat{E}^L_1(R_1) \leq \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) \text{,} \quad \hat{E}^L_2(R_2) \leq \hat{E}_2(\hat{\phi}_{\hat{\gamma}}). \end{equation} Furthermore, the optimization problem in \eqref{eq:MMlower1} is convex with optimizing distributions \begin{align}\label{eq:lowerworstKKT1} {Q}^L_{\lambda_1}(x)&= \frac{ P^L_1(x) \hat{P}_{1}^{-\lambda_1}(x) \hat{P}_{2}^{\lambda_1}(x) } {\sum_{a \in \mathcal{X} } P^L_1(a) \hat{P}_{1}^{-\lambda_1}(a) \hat{P}_{2}^{\lambda_1}(a) },\\ P^L_1(x)&=\beta_1 Q^L_{\lambda_1}(x) + (1-\beta_1) \hat{P}_1(x), \label{eq:lowerworstKKT11} \end{align} where $\lambda_1 \geq 0, 0\leq \beta_1 \leq 1 $ are chosen such that \begin{align}\label{eq:condballMM} D(Q^L_{\lambda_1}\|\hat{P}_1)-D(Q^L_{\lambda_1} \| \hat{P}_2) &=\hat{ \gamma},\\ D(\hat{P}_1\| P^L_1) &= R_{1},\label{eq:condballMM2} \end{align} when \begin{equation}\label{eq:gammaworsL} \max_{P_1 \in\mathcal{B}(\hat P_1,R_1) } D(P_1\| \hat{P}_1) - D(P_1\|\hat{P}_2) \leq \hat{\gamma}. \end{equation} Otherwise, we can find a least favorable distribution $ P^{L}_1 \in \mathcal{B}(\hat P_1,R_1)$ such that $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ for this distribution is $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Similarly, the optimization \eqref{eq:MMlower2} is convex with optimizing distributions \begin{align}\label{eq:lowerworstKKT2} Q^L_{\lambda_2}(x)&= \frac{ P^L_2(x) \hat{P}_{2}^{-\lambda_2}(x) \hat{P}_{1}^{\lambda_2}(x) } {\sum_{a \in \mathcal{X} } P^L_2(a) \hat{P}_{2}^{-\lambda_2}(a) \hat{P}_{1}^{\lambda_2}(a) },\\ P^L_2(x)&=\beta_2 Q^L_{\lambda_2}(x) + (1-\beta_2) \hat{P}_2(x), \end{align} where $ \lambda_2 \geq 0, 0\leq \beta_2 \leq 1 $ are chosen such that \begin{align} D(Q^L_{\lambda_2}\|\hat{P}_2)-DQ^L_{\lambda_2} \| \hat{P}_1) &=\hat{ \gamma},\\ D(\hat{P}_2\| P^L_2) &= R_{2}, \end{align} whenever, \begin{equation}\label{eq:gammaworstU} \min_{P_2 \in\mathcal{B}(\hat P_2,R_2)} D(P_2\| \hat{P}_1) - D(P_2\|\hat{P}_2) \geq \hat{\gamma}. \end{equation} Otherwise, we can find a distribution $ P^{L}_2 \in \mathcal{B}(\hat P_2,R_2)$ such that $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$ for this distribution is $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})=0$. \end{theorem} The worst-case achievable error exponents of mismatched likelihood ratio testing for data distributions in a $D$-ball are essentially the minimum relative entropy between two sets of probability distributions. Specifically, the minimum relative entropy $\Bc(\hat P_1,R_1)$ and $\hat \Qc_2(\hat \gamma)$ gives $\hat{E}_1^L(R_1)$, and similarly for $\hat{E}_2^L(R_2)$. \section{Mismatched Likelihood Ratio \\Testing Sensitivity} In this section, we study how the worst-case error exponents $(\hat{E}^L_1, \hat{E}^L_2)$ behave when the $D$-ball radii $R_1,R_2$ are small. In particular, we derive a Taylor series expansion of the worst-case error exponent. This approximation can also be interpreted as the worst-case sensitivity of the test, i.e., how does the test perform when actual distributions are very close to the mismatched distributions. \begin{theorem}\label{thm:lowerworst} For every $ R_i \geq 0$, $\hat{P}_i \in \mathcal{P}(\mathcal{X})$ for $i=1,2$, and \begin{equation}\label{eq:threshcodsen} -D(\hat{P}_1\|\hat{P}_2) \leq \hat{\gamma} \leq D(\hat{P}_2\|\hat{P}_1), \end{equation} we have \begin{equation}\label{eq:worstapprox} \hat{E}^L_i (R_i) = E_i(\hat{\phi}_{\hat{\gamma}}) - S_i(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \sqrt{R_i}+ o(\sqrt{R_i}), \end{equation} where \begin{equation}\label{eq:sensitivity} S_i^2(\hat{P}_1,\hat{P}_2,\hat{\gamma}) =2 \text{Var}_{\hat{P}_i} \Bigg(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_i(X)} \Bigg) \end{equation} and $\hat{Q}_{\lambda}(X)$ is the minimizing distribution in \eqref{eq:tilted} for test $\hat{\phi}_{\hat{\gamma}}$. \end{theorem} \begin{lemma}\label{lem:varderivative} For every $\hat{P}_1,\hat P_2 \in \mathcal{P}(\mathcal{X})$, and $\hat{\gamma}$ satisfying \eqref{eq:threshcodsen} \begin{align} \frac{\partial }{\partial \hat{\gamma}}S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \geq 0, ~~ \frac{\partial }{\partial \hat{\gamma}}S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \leq 0. \end{align} \end{lemma} This lemma shows that $S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma})$ is a non-decreasing function of $\hat{\gamma}$, i.e., as $\hat{\gamma}$ increases from $-D(\hat{P}_1\|\hat{P}_2) $ to $D(\hat{P}_2\|\hat{P}_1)$, the worst-case exponent $\hat E_1^L(R_1)$ becomes more sensitive to mismatch with likelihood ratio testing. Conversely, $S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma})$ is a non-increasing function of $\hat{\gamma}$, i.e., as $\hat{\gamma}$ increases from $-D(\hat{P}_1\|\hat{P}_2) $ to $D(\hat{P}_2\|\hat{P}_1)$, the worst-case exponent $\hat E_2^L(R_2)$ becomes less sensitive (more robust) to mismatch with likelihood ratio testing. Moreover, when $\lambda=\frac{1}{2}$, we have \begin{equation} \hat{Q}_{\frac{1}{2}}(x)=\frac{\sqrt{\hat{P}_1(x) \hat{P}_2(x) }}{ \sum_{a \in \mathcal{X} } \sqrt{\hat{P}_1(a) \hat{P}_2(a) } }, \end{equation} and then $S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma})=S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma})$. In addition, $\hat{Q}_{\frac{1}{2}}$ minimizes ${E}_1(\hat \phi_{\hat \gamma}) + {E}_2(\hat \phi_{\hat \gamma})$ yielding \cite{Veeravalli} \begin{align} {E}_1(\hat \phi_{\hat \gamma}) + {E}_2(\hat \phi_{\hat \gamma})&= \min_{Q \in \mathcal{P}(\mathcal{X})} D(Q\|\hat{P}_1) + D(Q\|\hat{P}_2)\\& = 2 B(\hat{P}_1,\hat{P}_2) \end{align} where $ B(\hat{P}_1,\hat{P}_2)$ is the Bhattacharyya distance between the mismatched distributions $\hat{P}_1$ and $\hat{P}_2$. This suggests that having equal sensitivity (or robustness) for both hypotheses minimizes the sum of the exponents. \begin{example} When $\gamma=0$ the likelihood ratio test becomes the maximum-likelihood test, which is known to achieve the lowest average probability of error in the Bayes setting for equal priors. For fixed priors $\pi_1,\pi_2$, the error probability in the Bayes setting is $\bar\epsilon= \pi_1\epsilon_1 +\pi_2\epsilon_2$, resulting in the following error exponent \cite{Cover} \begin{equation} \bar E= \lim_{n\rightarrow \infty} \frac{1}{n} \log \bar \epsilon = \min \{E_1,E_2\}. \end{equation} Consider $\hat{P}_1 =\text{Bern}(0.1)$ , $\hat{P}_2 =\text{Bern}(0.8)$. Also, assume $R_1=R_2=R$. Figure \ref{fig:worstRsen} shows the worst-case error exponent in the Bayes setting given by $\min \{\hat E_1^L,\hat E_2^L\}$ by solving \eqref{eq:MMlower1} and \eqref{eq:MMlower2} as well as $\min \{\tilde E_1^L,\tilde E_2^L\}$ using the approximation in \eqref{eq:worstapprox}. We can see that the approximation is good for small $R$. Moreover, it can be seen that error exponents are very sensitive to mismatch for small $R$, i.e., the slope of the worst-case exponent goes to infinity as $R$ approaches to zero. \begin{figure}[!h] \centering \includegraphics[width=.5\textwidth]{figs/Bayes_approx.pdf} \caption{Worst-case achievable Bayes error exponent.} \label{fig:worstRsen} \end{figure} \end{example} \section*{Appendix} \subsection{Proof of Theorem \ref{thm:mismatchLRT}} We show the result for $ \hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ and similar steps are valid for $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$. The type-\RNum{1} probability of error can be written as \begin{align} \hat{\epsilon}_1(\hat{\phi}_{\hat{\gamma}}) = \sum_{\substack{\bx\in\Xc^n\\D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \geq \hat{\gamma}}} P_{1}^n(\xv). \label{eq:tailmismatch} \end{align} Applying Sanov's Theorem to \eqref{eq:tailmismatch} to get \eqref{eq:LRTmis1} is immediate. The optimization problem in \eqref{eq:LRTmis1} consists of the minimization of a convex function over linear constraints. Therefore, the KKT conditions are also sufficient \cite{Boyd}. Writing the Lagrangian, we have \begin{align}\label{eq:lagrangeMM} L(Q,\lambda,\nu)= &D(Q\|P_1) + \lambda \big ( D(Q\|\hat{P}_2)-D(Q\|\hat{P}_1) +\hat{\gamma} \big ) \nonumber \\ &+\nu \Big ( \sum_{x\in \mathcal{X}} Q(x)-1 \Big). \end{align} Differentiating with respect to $Q(x)$ and setting to zero we have \begin{equation}\label{eq:lagrangeder} 1+\log \frac{Q(x)}{P_1(x)} +\lambda \log \frac{\hat{P}_1(x)}{\hat{P}_2(x)} + \nu=0. \end{equation} Solving equations \eqref{eq:lagrangeder} for every $x\in\Xc$ we obtain \eqref{eq:tiltedMM1}. Moreover, from the complementary slackness condition if \cite{Boyd} \begin{equation}\label{eq:threshcondition} D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}, \end{equation} then \eqref{eq:KKTgamma1} should hold. Otherwise, if \eqref{eq:threshcondition} does not hold then $\lambda$ in \eqref{eq:lagrangeder} should be zero and hence $\hat{Q}_{\lambda_1}=P_1$, $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Finally, substituting the minimizing distribution $\hat{Q}_{\lambda_1}$ \eqref{eq:tiltedMM1} into \eqref{eq:lagrangeMM} we get the dual expression \begin{equation}\label{eq:lagrange} g(\lambda)= \lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1 \hat{P}_1^{-\lambda}(x) P_2^{\lambda}(x) \Big ). \end{equation} Since the optimization problem in \eqref{eq:LRTmis1} is convex, then the duality gap is zero \cite{Boyd}, and this proves the \eqref{eq:dual}. \subsection{Proof of Theorem \ref{thm:stein}} First, notice that $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$ is a non-increasing function of $\hat{\gamma}$ since for every $\hat{\gamma}_1 \leq \hat{\gamma}_2 $ we have \begin{equation} \mathcal{\hat{Q}}_2({\hat{\gamma}_1}) \subset \mathcal{\hat{Q}}_2({\hat{\gamma}_2}), \end{equation} hence \begin{equation} \hat{E}_2(\hat{\phi}_{\hat{\gamma}_2}) \leq \hat{E}_2(\hat{\phi}_{\hat{\gamma}_1}). \end{equation} Therefore, in the Stein's regime we are looking for the smallest threshold such that $\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) \leq \epsilon$. Let \begin{equation}\label{eq:steinthresh} \hat{\gamma}= D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2) - \sqrt {\frac{ V(P_1, \hat{P}_1,\hat{P}_2) } {n} } \Phi^{-1}(\epsilon), \end{equation} where \begin{align} &V(P_1, \hat{P}_1,\hat{P}_2)= \text{Var}_{P_1}\bigg( \log \frac{\hat{P}_1}{\hat{P}_2} \bigg ) \nonumber\\ & = \sum_{x\in \mathcal{X}} P_1(x) \bigg ( \log \frac{\hat{P}_1}{\hat{P}_2} \bigg )^2 - \big ( D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) \big)^2, \end{align} and $\Phi^{-1}(\epsilon)$ is the inverse cumulative distribution function of a zero-mean unit-variance Guassian random variable. For such $\hat{\gamma}$, the type-\RNum{1} error probability of the mismatched likelihood ratio test is \begin{align} \hat{\epsilon}_1(\hat{\phi}_{\hat{\gamma}})=&\Pp_1 \Bigg [\frac{1}{n} \sum_{i=1}^{n} \log \frac{\hat{P}_1(X_i)}{\hat{P}_2(X_i)} \leq D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) \nonumber\\ &+ \sqrt {\frac{ V(P_1, \hat{P}_1,\hat{P}_2) } {n} } \Phi^{-1}(\epsilon) \Bigg ]. \end{align} Observe that $D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) = \mathbb{E}_{P_1} \Big [ \log \frac{\hat{P}_1(X)}{\hat{P}_2(X)} \Big ]$. Let $ \hat{S}_n=\frac{1}{n}\sum_{i=1}^n \hat\imath(x_i)$, where $\hat\imath(x_i)=\log \frac{\hat{P}_1(x_i)}{\hat{P}_2(x_i)}$. Letting $Z$ be a zero-mean unit-variance Guassian random variable, then, by the central limit theorem we have \begin{align} &\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) &\notag\\ &= \limsup_{n\rightarrow \infty} \Pp_1\Bigg [ \frac{ \sqrt{n} \big ( \hat{S}_n- \mathbb{E}_{P_1} [\hat\imath(X)] \big )}{\sqrt {V(P_1, \hat{P}_1,\hat{P}_2) } } \leq \Phi^{-1}(\epsilon) \Bigg]\\ &=\Pp\big [Z \leq \Phi^{-1}(\epsilon) \big]\\ &= \epsilon. \end{align} Therefore, asymptotically, the type-\RNum{1} error probability of mismatched likelihood ratio test with $\hat{\gamma}$ in \eqref{eq:steinthresh} is equal to $\epsilon$. Next, we need to show that for any threshold $\hat{\gamma}$ and $\varepsilon>0$ such that \begin{equation}\label{eq:limsupthresh} \limsup_{n \rightarrow \infty} \hat{\gamma} +\varepsilon\leq D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2), \end{equation} the type-\RNum{1} probability of error tends to $1$ as the number of observation approaches infinity, which implies that $D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2)$ is the lowest possible threshold that meets the constraint $\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) \leq \epsilon$. The corresponding $\hat E_2(\hat\phi_{\hat\gamma})$ is this highest type-\RNum{2} exponent that meets the constraint. In order to show this, define the following sets \begin{align} \mathcal{E}_{\delta} = \Big \{ \bx\in\Xc^n:\, &\| \Th(x) -P_1(x)\|_\infty < \delta \Big \},\\ \Dc = \big\{ \bx\in\Xc^n:\, & \big|D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2)\\ -&D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \big | < \varepsilon \big\}, \nonumber\\ \bar \Dc = \big\{ \bx\in\Xc: \,&D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \nonumber\\ -& D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \geq - \varepsilon \big\}. \end{align} where $\|.\|_{\infty}$ is the norm infinity. From the continouity of $D(.\|\hat{P})$ we have that for any $\varepsilon >0$ such that \begin{equation}\label{eq:epsilondelta} \big |D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) - D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \big | < \varepsilon. \end{equation} there exists $\delta>0$ such that for all $\Th$ satisfying \begin{equation} \| \Th(x) -P_1(x)\|_\infty < \delta \end{equation} \eqref{eq:epsilondelta} holds. Therefore, when \eqref{eq:limsupthresh} holds \begin{align} \liminf_{n\rightarrow \infty} \epsilon_1 (\hat{\phi}_{\hat{\gamma}} ) \geq& \liminf_{n\rightarrow \infty} \sum_{x\in\bar \Dc} P_1^n(\xv)\\ \geq &\liminf_{n\rightarrow \infty} \sum_{x\in \Dc} P_1^n(\xv). \end{align} Now from the continuity argument, there exists a $\delta$ such that \begin{equation} \sum_{x\in\Dc} P_1^n(\xv) \geq \sum_{x\in\Ec_{\delta}} P_1^n(\xv). \end{equation} Set $\delta_n=\sqrt{\frac{\log n}{n}}$. Thus, for sufficiently large $n$, $\delta_n \leq \delta$, Therefore, we have \begin{align} \liminf_{n\rightarrow \infty} \epsilon_1 (\hat{\phi}_{\hat{\gamma}} ) &\geq \liminf_{n \rightarrow \infty} \sum_{\xv\in\Ec_{\delta_n}} P_1^n(\xv)\\ &\geq \lim_{n \rightarrow \infty} 1- \frac{2|\mathcal{X}|}{n}\\ &=1. \end{align} where the last step is by Hoeffding's inequality \cite{Hoeffdingineq} and union bound. Therefore, for any $\hat{\gamma} < D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2)$ type-\RNum{1} error goes to unity which concludes the theorem. \subsection{Proof of Theorem \ref{thm:worstmismatch}} We show the result under the first hypothesis and similar steps are valid under the second hypothesis. For every $P_1$ the achievable type-\RNum{1} is error exponent $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ does not depend on $P_2$ therefore, \eqref{eq:MMlower1} is a lower bound to $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$. Moreover, since the relative entropy is jointly convex, then \eqref{eq:MMlower1} is a convex optimization problem and the KKT conditions are also sufficient. Writing the Lagrangian we have \begin{align}\label{eq:lagrange} L(Q,P_1,\lambda_1,\lambda_1', \nu_1, \nu_1')= D(Q\|P_1) + \lambda_1 \big( D(Q\|\hat{P}_2) \nonumber \\ -D(Q\|\hat{P}_1) +\hat{\gamma} \big) + \lambda_1' \big ( D(\hat{P}_1\|P_1) -R_1\big ) \nonumber \\ + \nu_1 \Big ( \sum_{x\in \mathcal{X}} Q(x)-1\Big )+ \nu_1' \Big ( \sum_{x\in \mathcal{X}} P_1(x)-1\Big ). \end{align} Differentiating with respect to $Q(x)$ and $P_1(x)$ and setting the derivatives to zero we have \begin{align} 1+\log \frac{Q(x)}{P_1(x)} +\lambda_1 \log \frac{\hat{P}_1(x)}{\hat{P}_2(x)} + \nu_1&=0,\label{eq:lagrange1}\\ -\frac{Q(x)}{P_1(x)}-\lambda_1' \frac{\hat{P}_1(x)}{P_1(x)}+\nu_1'&=0, \label{eq:lagrange2} \end{align} respectively. Solving equations \eqref{eq:lagrange1}, \eqref{eq:lagrange2} for every $x\in\Xc$ and letting $\beta_1=\frac{1}{1+\lambda_1'}$ we obtain \eqref{eq:lowerworstKKT1} and \eqref{eq:lowerworstKKT11}. Moreover, from the complementary slackness condition \cite{Boyd} if for all $P_1$ in $\mathcal{B}(\hat{P}_1,R_1)$ the condition $D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}$ stated in Theorem \ref{thm:mismatchLRT} holds, then \eqref{eq:condballMM} and \eqref{eq:condballMM2} should hold. Otherwise, if there exists a $P^{L}_1$ in $\mathcal{B}(\hat P_1,R_1) $ such that $D(P_1^L\|\hat{P}_1)- D(P_1^L\|\hat{P}_2) \leq \hat{\gamma}$, then for this distribution $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Therefore, if conditon \eqref{eq:gammaworsL} holds for all $P_1$ in the $D$-ball $\hat{E}^L_1(R_1) >0$, otherewise $\hat{E}^L_1(R_1) =0$. \subsection{Proof of Theorem \ref{thm:lowerworst}} We show the result under the first hypothesis, and similar steps are valid for the second hypothesis. Consider the first minimization in \eqref{eq:MMlower1} over $Q$, i.e., \begin{equation}\label{eq:LRTmis1perturb} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})= \min_{ Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma}) } D(Q\|P_1). \end{equation} First, note that by assumption, $\hat P_1(x)>0$ for each $x\in\Xc$. Therefore, for any finite $R_1$, we have $P_1(x)>0$ for every $P_1 \in \mathcal{B}(\hat P_1,R_1)$. Hence, for $P_1 \in \mathcal{B}(\hat P_1,R_1)$, the relative entropy $D(Q\|P_1)$ is continuous in both $Q, P_1$. Moreover, the constraints in \eqref{eq:LRTmis1perturb} are continuous with respect to $Q$ and also trivially with respect to $P_1$, since the constraints do not depend on $P_1$. Hence, the optimization in \eqref{eq:LRTmis1perturb} is minimizing a continuous function over a compact set with continuous constraints. Hence, by the maximum theorem \cite{Walker}, $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ is a continuous function of $P_1$ for all $P_1 \in \mathcal{B}(\hat P_1,R_1)$ with finite radius $R_1$. Therefore, by the envelope theorem\cite{Segal} we have \begin{equation} \frac{ \partial \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial P_1(x)}= -\frac{\hat{Q}_{\lambda}(x)}{P_1(x)}. \end{equation} Define the vectors \begin{align} \nabla \hat{E}_1 &= \bigg( -\frac{\hat{Q}_{\lambda}(x_1)}{\hat{P}_1(x_1)},\dotsc, -\frac{\hat{Q}_{\lambda}(x_{|\Xc|})}{\hat{P}_1(x_{|\Xc|})}\bigg)^T\\ \thetav_{P_1} &= \big(P_1(x_1)-\hat{P}_1(x_1),\dotsc,P_1(x_{|\Xc|})-\hat{P}_1(x_{|\Xc|})\big)^T. \end{align} Assuming the $\hat{E}^L_i(R_i)$ to be continuous we can apply the Taylor expansion to $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ around $P_1=\hat{P}_1$ and we obtain \begin{align}\label{eq:linearapprox} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})=E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1 + o(\| \thetav_{P_1} \|_{\infty}). \end{align} By substituting the expansion \eqref{eq:linearapprox} for the first minimization in \eqref{eq:MMlower1} we obtain \begin{equation}\label{eq:approxworst} \hat{E}^{L}_1(R_1) = \min_{P_1 \in \mathcal{B}(\hat P_1,R_1) } E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla\hat{E}_1 + o(\|\thetav_{P_1} \|_{\infty}). \end{equation} Now, we further approximate the outer minimization constraint in \eqref{eq:MMlower1}. By approximating $D(\hat{P}_1 \| P_1 )$ we get \cite{Zheng} \begin{equation}\label{eq:KLapprox} D(\hat{P}_1 \| P_1 ) = \frac{1}{2} \thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} + o (\| \thetav_{P_1} \|^2_{\infty}), \end{equation} where \begin{equation} \Jm(\hat{P}_1)=\diag\bigg( \frac{1}{\hat{P}_1(x_1)},\dotsc,\frac{1}{\hat{P}_1(x_{|\Xc|})}\bigg) \end{equation} is the Fisher information matrix. Therefore, \eqref{eq:approxworst} can be approximated as \begin{align}\label{eq:worstapproxopt} \hat{E}^{L}_1(R_1) &\approx \tilde{E}^L_1 (R_1) \nonumber \\ &\triangleq \min_{\substack{ \frac{1}{2} \thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} \leq R_{1} \\ \onev^T\thetav_{P_1}=0}} E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1. \end{align} The optimization problem in \eqref{eq:worstapproxopt} is convex and hence the KKT conditions are sufficient. The corresponding Lagrangian is given by \begin{align} L(\thetav_{P_1}, \lambda,\nu) &= E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1 \nonumber \\ &+ \lambda \Big (\frac{1}{2}\thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} - R_{1} \Big) +\nu ( \onev^T\thetav_{P_1} ). \end{align} Differentiating with respect to $\thetav_{P_1}$ and setting to zero, we have \begin{equation}\label{eq:KKTsen} \nabla \hat{E}_1 + \lambda \Jm(\hat{P}_1)\thetav_{P_1} +\nu \onev=0. \end{equation} Therefore, \begin{equation}\label{eq:deltaPsolution} \thetav_{P_1} =-\frac{1}{\lambda} \Jm^{-1}(\hat{P}_1) \big (\nabla \hat{E}_1 +\nu \onev \big ). \end{equation} Note that if $\lambda=0$ then from \eqref{eq:KKTsen} $ \nabla \hat{E}_1= -\nu \onev$ which cannot be true for thresholds satisfying \eqref{eq:threshcodsen} since $\hat{Q}_{\lambda} \neq \hat{P}_1$. Therefore, from the complementary slackness condition \cite{Boyd} the inequality constraint \eqref{eq:worstapproxopt} should be satisfied with equality. By solving $\frac{1}{2}\thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} = R_{1}$ and $\bold{1}^T\thetav_{P_1} =0 $ and substituting $\lambda, \nu$ in \eqref{eq:deltaPsolution}, we obtain \begin{equation}\label{eq:deltaP} \thetav_{P_1} =-\frac{ \psiv}{\sqrt{\psiv^T \Jm(\hat{P}_1)\psiv} }\sqrt{2R_1}, \end{equation} where \begin{equation} \psiv= \Jm^{-1}(\hat{P}_1)\Bigg (\nabla \hat{E}_1 -{\onev^T\Jm^{-1}(\hat{P}_1) \nabla \hat{E}_1 } \onev\Bigg ). \end{equation} Substituding \eqref{eq:deltaP} into \eqref{eq:approxworst} yields \eqref{eq:worstapprox}. \subsection{Proof of Lemma \ref{lem:varderivative}} We show the result under the first hypothesis and similar steps are valid under the second hypothesis. To prove the Theorem we need the following lemma. \begin{lemma}\label{lem:convex} Consider the following optimization problem \begin{equation} E(\gamma)= \min_{ \mathbb{E}_Q [X] \geq \gamma } D(Q\|P). \end{equation} Then $E(\gamma)$ is convex in $\gamma$. \end{lemma} \begin{proof} Let \begin{equation} Q^{*}_{1} = \argmin_{ \mathbb{E}_Q [X] \geq \gamma_1} D(Q\|P) ~~ Q^{*}_{2} = \argmin_{ \mathbb{E}_Q [X] \geq \gamma_2} D(Q\|P). \end{equation} From the convexity of the relative entropy, for any $\alpha \in (0,1)$, \begin{align} D&\big(\alpha Q^*_1 +(1-\alpha) Q^*_2 \| P \big) \leq \alpha D( Q^*_1 \| P) +(1-\alpha) D( Q^*_2 \| P)\\ &= \alpha \min_{ \mathbb{E}_Q [X] \geq \gamma_1 } D(Q\|P) +(1-\alpha) \min_{ \mathbb{E}_Q [X] \geq \gamma_2 } D(Q\|P). \end{align} Furthermore, since $Q^*_1, Q^*_2$ satisfy their correspending optimization constraints, then $\mathbb{E}_{Q^*_1}[X] \geq \gamma_1$, $\mathbb{E}_{Q^*_2}[X] \geq \gamma_2$ , hence \begin{equation} \mathbb{E}_{\alpha Q^*_1 +(1-\alpha) Q^*_2}[X] \geq \alpha \gamma_1+ (1-\alpha) \gamma_2. \end{equation} Therefore, $\alpha Q^*_1 +(1-\alpha) Q^*_2$ satisfies the optimization constraint when $\gamma= \alpha \gamma_1 + (1-\alpha) \gamma_2$, then \begin{align} &\min_{ \mathbb{E}_{Q} [X] \leq \alpha \gamma_1+(1-\alpha) \gamma_2} D(Q\|P) \leq D(\alpha Q^*_1 +(1-\alpha) Q^*_2 \| P)\\ &\leq \alpha \min_{ \mathbb{E}_Q [X] \geq \gamma_1 } D(Q\|P) +(1-\alpha) \min_{ \mathbb{E}_Q [X] \geq \gamma_2 } D(Q\|P). \end{align} Hence $E(\gamma)$ is convex in $\gamma$. \end{proof} From above lemma we can show that $\lambda$ is a non-decreasing function of $\hat{\gamma}$. From the envelope theorem \cite{Segal} \begin{equation} \frac{\partial \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial \hat{\gamma}} = \lambda^*, \end{equation} where $\lambda^*$ is the optimizing $\lambda$ in \eqref{eq:tilted} for the test $\hat{\phi}_{\hat{\gamma}}$. Therefore \begin{equation} \frac{\partial \lambda^* }{\partial \hat{\gamma}}= \frac{\partial ^2 \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial \hat{\gamma}^2} \geq 0, \end{equation} where the inequality is from convexity of $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ respect to $\hat{\gamma}$. Therefore, we only need to consider the behavior of variance as $\lambda$ changes. Taking the derivative of variance respect to $\lambda$, we have \begin{align} \frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big)&=\sum_{x\in \mathcal{X}} \frac{2{\hat{Q}_{\lambda}}(x)}{\hat{P_1}(x)} \frac{\partial \hat{Q}_{\lambda}(x) }{\partial \lambda}\\ &= \sum_{x\in \mathcal{X}} \frac{2{\hat{Q}_{\lambda}}(x)}{\hat{P_1}(x)} \Bigg( \hat{Q}_{\lambda}(x) \log \frac{\hat{P}_2(x)}{\hat{P}_1(x)}-\nonumber \\ &~~~\hat{Q}_{\lambda}(x) \sum_{x' \in \mathcal{X}} \hat{Q}_{\lambda}(x')\log \frac{\hat{P}_2(x')}{\hat{P}_1(x')} \Bigg ) \\ &=2 \mathbb{E}_{\hat{Q}_{\lambda}} \bigg[ \frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]\nonumber \\ &~~~- 2 \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)}\bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]. \end{align} Substituting $\hat{Q}_{\lambda}(X)$ as a function of $\lambda$ we get \begin{align} &\frac{\sum_{a\in \mathcal{X}} \hat{P}_1^{1-\lambda}(a) \hat{P}_2^{\lambda}(a) }{2} \frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \bigg(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \bigg)\nonumber \\ &=\mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_{2}(X)}{\hat{P}_1(X)} \bigg )^{\lambda} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ] \nonumber \\ &~~~~~- \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ) ^{\lambda} \bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]. \label{eq:varlogsum} \end{align} Let $r(X)= \Big (\frac{\hat{P}_2(X)}{\hat{P}_1(X)}\Big )^{\lambda}$, then \begin{align} \mathbb{E}_{\hat{Q}_{\lambda}} &\bigg [ \bigg (\frac{\hat{P}_{2}(X)}{\hat{P}_1(X)} \bigg )^{\lambda} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]\nonumber \\ & ~~~~~~~~~~~~~~~~-\mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ) ^{\lambda} \bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ] \nonumber \\ &=\frac{1}{\lambda} \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) \log r(X) ]- \frac{1}{\lambda} \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \mathbb{E}_{\hat{Q}_{\lambda}} [ \log r(X) ]. \label{eq:varlogsum} \end{align} Note that $\hat{Q}_{\lambda}(x),r(x)$ are positive for all $x\in \Xc$. Therefore, using the log-sum inequality \cite{Cover} for the first term and Jensen inequality \cite{Cover} for the second term in \eqref{eq:varlogsum}, we obtain \begin{align} &\frac{\lambda \sum_{a\in \mathcal{X}} \hat{P}_1^{1-\lambda}(a) \hat{P}_2^{\lambda}(a) }{2}\frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big) \nonumber\\ &\geq \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]- \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \mathbb{E}_{\hat{Q}_{\lambda}} [ \log r(X) ] \\ &\geq \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]- \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]\\ &=0. \end{align} Also, the above inequalities are met with equality when both log-sum and Jensen's inequalities are met with equality, which happens when $\lambda=0$. Therefore, for $ \lambda>0$, $\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big)$ is an increasing function of $\lambda$ for $ \lambda>0$ and consequently \begin{equation} \frac{\partial }{\partial \hat{\gamma}}S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \geq 0. \end{equation} \bibliographystyle{ieeebib} \bibliographystyle{ieeetr} \section{Introduction and Prelimenaries} Consider the binary hypothesis testing problem \cite{Lehmann} where an observation $\xv=(x_1,\dotsc,x_n)$ is generated from two possible distributions $P^n_1$ and $P^n_2$ defined on the probability simplex $\Pc(\Xc^n)$. We assume that $P^n_1$ and $P^n_2$ are product distributions, i.e., $P_1^n(\xv)=\prod_{i=1}^n P_1(x_i)$, and similarly for $P_2^n$. For simplicity, we assume that both $P_1(x)>0$ and $P_2(x)>0$ for each $x\in\Xc$. Let $\phi: \mathcal{X}^n \rightarrow \{1,2\}$ be a hypothesis test that decides which distribution generated the observation $\xv$. We consider deterministic tests $\phi$ that decide in favor of $P_1^n$ if $\xv\in \Ac_1$, where $\Ac_1\subset \Xc^n$ is the decision region for the first hypothesis. We define $\Ac_2=\Xc^n \setminus \Ac_1$ to be the decision region for the second hypothesis. The test performance is measured by the two possible pairwise error probabilities. The type-\RNum{1} and type-\RNum{2} error probabilities are defined as \begin{equation}\label{eq:e1} \epsilon_1 (\phi)= \sum_{\bx \in \Ac_2} P_1^n(\bx),~~~~ \epsilon_2 (\phi)= \sum_{\bx \in \Ac_1} P_2^n(\bx). \end{equation} A hypothesis test is said to be optimal whenever it achieves the optimal error probability tradeoff given by \begin{equation}\label{eq:trade} \alpha_\beta = \min_{\phi: \epsilon_2 (\phi) \leq \beta} \epsilon_1 (\phi) . \end{equation} The likelihood ratio test defined as \begin{equation} \phi_\gamma(\boldsymbol{x})= \mathbbm{1} \bigg \{ \frac{P_2^n(\bx)}{P_1^n(\bx)} \geq e^{n\gamma} \bigg\}+1. \end{equation} was shown in \cite{Neyman} to attain the optimal tradeoff \eqref{eq:trade} for every $\gamma$. The type of a sequence $\bx= (x_1,\ldots,x_n)$ is $\Th(a)=\frac{N(a|\bx)}{n}$, where $N(a|\bx)$ is the number of occurrences of the symbol $a\in\Xc$ in the string. The likelihood ratio test can also be expressed as a function of the type of the observation $\Th$ as \cite{Cover} \begin{align}\label{eq:LRTtype} \phi_{\gamma}(\Th)= \mathbbm{1} \big\{ D(\Th\|P_1)-D(\Th\|P_2) \geq \gamma \big\}+1. \end{align} where $D(P\|Q)= \sum_{\mathcal{X}} P(x) \log \frac{P(x)}{Q(x)}$ is the relative entropy between distributions $P$ and $Q$. In this paper, we are interested in the asymptotic exponential decay of the pairwise error probabilities. Therefore, it is sufficient to consider deterministic tests The optimal error exponent tradeoff $(E_1,E_2)$ is defined as \begin{align}\label{eq:tradefix} E_2(E_1) \triangleq \sup \big\{E_2\in \mathbb{R}_{+}: \exists \phi , \exists n_0 \in \mathbb{Z}_+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ \epsilon_1(\phi) \leq e^{-nE_1} \quad \text{and} \quad \epsilon_2(\phi) \leq e^{-nE_2}\big\}. \end{align} By using the Sanov's Theorem \cite{Cover,Dembo}, the optimal error exponent tradeoff $(E_1,E_2)$, attained by the likelihood ratio test, can be shown to be \cite{Blahut,Hoeffding} \begin{align} E_1(\phi_{\gamma})=\min_{Q \in \mathcal{Q}_1(\gamma)} D(Q\|P_1)\label{eq:min1},\\ E_2(\phi_{\gamma})=\min_{Q \in \mathcal{Q}_2(\gamma)} D(Q\|P_2)\label{eq:min2}, \end{align} where \begin{align} \mathcal{Q}_1(\gamma)&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| P_1)-D(Q\|P_2) \geq \gamma \big\},\\ \mathcal{Q}_2(\gamma)&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| P_1)-D(Q\|P_2) \leq \gamma \big\}. \end{align} The minimizing distribution in \eqref{eq:min1}, \eqref{eq:min2} is the tilted distribution \begin{equation}\label{eq:tilted} Q_{\lambda}(x)= \frac{ P_{1}^{1-\lambda}(x) P_{2}^{\lambda}(x) } {\sum_{a \in \mathcal{X} } P_{1}^{1-\lambda}(a) P_{2}^{\lambda}(a) }, ~~~0\leq\lambda \leq 1 \end{equation} whenever $\gamma$ satisfies $-D(P_1\|P_2) \leq \gamma \leq D(P_2\|P_1)$. In this case, $\lambda$ is the solution of \begin{equation}\label{eq:KKTgamma} D(Q_{\lambda}\| P_1)-D(Q_{\lambda} \| P_2) = \gamma. \end{equation} Instead, if $\gamma<-D(P_1\|P_2)$, the optimal distribution in \eqref{eq:min1} is $Q_\lambda(x)= P_1(x)$ and $E_1(\phi_{\gamma})=0$, and if $\gamma>D(P_2\|P_1)$, the optimal distribution in \eqref{eq:min2} is $Q_\lambda(x)= P_2(x)$ and $E_2(\phi_{\gamma})=0$. Equivalently, the dual expressions of \eqref{eq:min1} and \eqref{eq:min2} can be derived by substituting the minimizing distribution \eqref{eq:tilted} into the Lagrangian yielding \cite{Blahut,Dembo} \begin{align} E_1(\phi_{\gamma})&=\max_{\lambda \geq 0 } \lambda \gamma - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{1-\lambda}(x) P_2^{\lambda}(x) \Big ), \\ E_2(\phi_{\gamma})&=\max_{\lambda \geq 0 } -\lambda \gamma - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{\lambda}(x) P_2^{1-\lambda}(x) \Big ). \end{align} The Stein regime is defined as the highest error exponent under one hypothesis when the error probability under the other hypothesis is at most some fixed $ \epsilon \in (0,\frac{1}{2})$ \cite{Cover} \begin{align}\label{eq:steindef} E_2^{(\epsilon)} \triangleq \sup \big \{E_2\in \mathbb{R}_{+}: \exists \phi , \exists n_0 \in \mathbb{Z}_+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ \epsilon_1 (\phi)\leq \epsilon \quad \text{and} \quad \epsilon_2(\phi) \leq e^{-nE_2} \big \}. \end{align} The optimal $E_2^{(\epsilon)}$, given by \cite{Cover} \begin{equation}\label{eq:stein2} E_2^{(\epsilon)} = D(P_1\|P_2), \end{equation} can be achieved by setting the threshold in \eqref{eq:LRTtype} to be ${\gamma} = -D(P_1\|P_2)+\frac{C_2}{\sqrt{n}}$, where $C_2$ is a constant that depends on distributions $P_1, P_2$ and $\epsilon$. In this work, we revisit the above results in the case where the distributions used by the likelihood ratio test are not known precisely, and instead, fixed distributions $\hat P_1$ and $\hat P_2$ are used for testing. In particular, we find the error exponent tradeoff for fixed $\hat P_1$ and $\hat P_2$ and we study the worst-case tradeoff when the true distributions generating the observation are within a certain distance of the test distributions. The literature in robust hypothesis testing is vast (see e.g., \cite{Huber,Kassam,poor2013introduction} and references therein). Robust hypothesis testing consists of designing tests that are robust to the inaccuracy of the distributions generating the observation. Instead, we study the error exponent tradeoff performance of the likelihood ratio test for fixed test distributions. \section{Mismatched Likelihood Ratio Testing} \label{sec:fixedHT} Let $\hat{P}_1(x)$ and $\hat{P}_2(x)$ be the test distributions used in the likelihood ratio test with threshold $\hat{\gamma}$ given by \begin{align}\label{eq:LRTtypeMM} \hat{\phi}_{\hat{\gamma}}(\Th)= \mathbbm{1} \big\{ D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \geq \hat{\gamma} \big\}+1. \end{align} For simplicity, we assume that both $\hat P_1(x)>0$ and $\hat P_2(x)>0$ for each $x\in\Xc$. We are interested in the achievable error exponent of the mismatched likelihood ratio test, i.e., \begin{align} \hat{E}_2(\hat{E}_1) \triangleq \sup& \big\{\hat{E}_2\in \mathbb{R}_{+}: \exists \hat{\gamma} , \exists n_0 \in \mathbb{Z} _+ \ \text{s.t.} \ \forall n>n_0 \nonumber \\ &\epsilon_1(\hat{\phi}_{\hat{\gamma}}) \leq e^{-n\hat{E}_1} ~ \text{and} ~ \epsilon_2(\hat{\phi}_{\hat{\gamma}}) \leq e^{-n\hat{E}_2}\big\}. \label{eq:opttestmism} \end{align} \begin{theorem}\label{thm:mismatchLRT} For fixed $\hat{P}_1, \hat{P}_2 \in \mathcal{P}(X)$ the optimal error exponent tradeoff in \eqref{eq:opttestmism} is given by \begin{align} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})&=\min_{Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma})} D(Q\|P_1) \label{eq:LRTmis1}\\ \hat{E}_2(\hat{\phi}_{\hat{\gamma}})&=\min_{Q \in \mathcal{\hat{Q}}_2(\hat{\gamma})} D(Q\|P_2)\label{eq:LRTmis2} \end{align} where \begin{align} \mathcal{\hat{Q}}_1(\hat{\gamma})&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| \hat{P}_1)-D(Q\|\hat{P}_2) \geq \hat{\gamma} \big \}, \label{eq:qhat1}\\ \mathcal{\hat{Q}}_2(\hat{\gamma})&= \big\{Q\in \mathcal{P}(\mathcal{X}): D(Q\| \hat{P}_1)-D(Q\|\hat{P}_2) \leq \hat{\gamma} \big \}. \label{eq:qhat2} \end{align} The minimizing distributions in \eqref{eq:LRTmis1} and \eqref{eq:LRTmis2} are \begin{equation}\label{eq:tiltedMM1} \hat{Q}_{\lambda_1}(x)= \frac{ P_1(x) \hat{P}_{1}^{-\lambda_1}(x) \hat{P}_{2}^{\lambda_1}(x) } {\sum_{a \in \mathcal{X} } P_1 (a) \hat{P}_{1}^{-\lambda_1}(a) \hat{P}_{2}^{\lambda_1}(a) },~~\lambda_1\geq0, \end{equation} \begin{equation}\label{eq:tiltedMM2} \hat{Q}_{\lambda_2}(x)= \frac{ P_2(x) \hat{P}_{2}^{-\lambda_2}(x) \hat{P}_{1}^{\lambda_2}(x) } {\sum_{a \in \mathcal{X} } P_2 (a) \hat{P}_{2}^{-\lambda_2}(a) \hat{P}_{1}^{\lambda_2}(a) },~~\lambda_2\geq0 \end{equation} respectively, where $ \lambda_1$ is chosen so that \begin{equation}\label{eq:KKTgamma1} D(\hat{Q}_{\lambda_1}\|\hat{P}_1)-D(\hat{Q}_{\lambda_1} \| \hat{P}_2) = \hat{\gamma}, \end{equation} whenever $D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}$, and otherwise, $\hat{Q}_{\lambda_1}(x)=P_1(x)$ and $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Similarly, $ \lambda_2 \geq 0$ is chosen so that \begin{equation}\label{eq:KKTgamma2} D(\hat{Q}_{\lambda_2}\|\hat{P}_1)-D(\hat{Q}_{\lambda_2} \| \hat{P}_2) = \hat{\gamma}, \end{equation} whenever $ D(P_2 \|\hat{P}_1) -D(P_2 \|\hat{P}_2) \geq\hat{\gamma},$ and otherwise, $\hat{Q}_{\lambda_2}(x)=P_2(x)$ and $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})=0$. Furthermore, the dual expressions for the type-\RNum{1} and type-\RNum{2} error exponents are \begin{align}\label{eq:dual} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})&=\max_{\lambda \geq 0 } \lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1(x) \hat{P}_1^{-\lambda}(x) P_2^{\lambda}(x) \Big ), \\ \hat{E}_2(\hat{\phi}_{\hat{\gamma}})&=\max_{\lambda \geq 0 } -\lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1^{\lambda}(x) P_2(x) \hat{P}_2^{-\lambda}(x) \Big ). \end{align} \end{theorem} \begin{remark} For mismatched likelihood ratio testing, the optimizing distributions $\hat{Q}_{\lambda_1}, \hat{Q}_{\lambda_2}$ can be different, since the decision regions only depend on the mismatched distributions. However, if $\hat{P}_1, \hat{P}_2$ are tilted with respect to $P_1$ and $P_2$, then both $\hat{Q}_{\lambda_1}, \hat{Q}_{\lambda_2}$ are also tilted respect to $P_1$ and $P_2$. This implies the result in \cite{Unnikrishnan}, where for any set of mismatched distributions $\hat{P}_1, \hat{P}_2$ that are tilted with respect to generating distributions, the mismatched likelihood ratio test achieves the optimal error exponent tradeoff in \eqref{eq:tradefix}. \end{remark} \begin{theorem}\label{thm:stein} In the Stein regime, the mismatched likelihood ratio test achieves \begin{equation}\label{eq:steinMM2} \hat{E}_2^{(\epsilon)}=\min_{Q \in \mathcal{\hat{Q}}_2(\hat{\gamma})} D(Q\|P_2), \end{equation} with threshold \begin{equation}\label{eq:steinthresh2} \hat{\gamma}=D(P_1\|\hat{P}_1) -D(P_1\|\hat{P}_2) +\frac{\hat{C}_2}{\sqrt{n}}, \end{equation} and $\hat{C}_2$ is a constant that depends on distributions $P_1,\hat{P}_1,\hat{P}_2$, and $\epsilon$. \end{theorem} \begin{remark} Note that since $P_1$ satisfies the constraint in \eqref{eq:steinMM2} then $\hat{E}_2^{(\epsilon)} \leq {E}_2^{(\epsilon)}$. In fact, if $\hat{P}_1, \hat{P}_2$ are tilted respect to $P_1, P_2$ then this inequality is met with equality. Moreover, it is easy to find a set of data and test distributions where $\hat{E}_2^{(\epsilon)} < {E}_2^{(\epsilon)}$. \end{remark} \section{Mismatched Likelihood Ratio \\Testing with Uncertainty} In this section, we analyze the worst-case error exponents tradeoff when the actual distributions $P_1, P_2$ are close to the mismatched test distributions $\hat{P}_1$ and $\hat{P}_2$. More specifically, \begin{equation}\label{eq:ball2} P_1 \in \mathcal{B}(\hat P_1,R_1),~~ P_2 \in \mathcal{B}(\hat P_2, R_2) \end{equation} where the $D$-ball \begin{equation}\label{eq:ball} \mathcal{B}( Q,R)= \big\{P\in\Pc(\Xc): D(Q\|P) \leq R \big\} \end{equation} is a ball centered at distribution $Q$ containing all distributions whose relative entropy is smaller or equal than radius $R$. This model was used in robust hypothesis testing in \cite{Levy}. Figure \ref{fig:mismatch} depicts the mismatched probability distributions and the mismatched likelihood ratio test as a hyperplane dividing the probability space into the two decision regions. \begin{figure}[!h] \centering \begin{tikzpicture}[scale=0.85] \draw (5,1.2) -- (0,-5) -- (10,-5) --(5,1.2) ; \draw [line width=0.3mm, dashed] (4,-0.05) -- (5.,-5) ; \node at (7.1,-4.5) {\small $D(Q\|\hat{P}_1)-D(Q\|\hat{P}_2) = \hat{\gamma}$}; \node[draw,circle,inner sep=1pt,fill] at (3,-3.5) {}; \node at (3.3,-3.5) {\small $ \hat{P}_1$}; \node[draw,circle,inner sep=1pt,fill] at (6.5,-2.6) {}; \node at (6.7,-2.8) {\small $\hat{P}_2$}; \draw (2.7,-3.5) ellipse (1cm and 0.7cm); \draw (6.5,-2.5) ellipse (1 cm and 0.7 cm); \node at (1,-4.6) {$\mathcal{P}({\mathcal{X}})$}; \draw [->,>=stealth] (6.5,-2.6) -- (6.8,-1.85); \draw [->,>=stealth] (3,-3.5) -- (3.2,-4.1); \node at (2.9,-3.9) {\small $R_1$}; \node at (6.9,-2.25) {\small $R_2$}; \node[draw,circle,inner sep=1pt,fill] at (3,-3) {}; \node[draw,circle,inner sep=1pt,fill] at (6,-2.2) {}; \draw [line width=0.25mm, gray]plot [smooth, tension=1] coordinates{(3,-3) (4,-2.75) (4.55,-2.7)} ; \draw [line width=0.25mm, gray]plot [smooth, tension=1] coordinates{ (6,-2.2) (5.5,-2.1) (4.47,-2.4)} ; \node[draw,circle,inner sep=1pt,fill] at (4.55,-2.7) {}; \node[draw,circle,inner sep=1pt,fill] at (4.47,-2.4) {}; \node at (4.9,-2.8) {\tiny $\hat{Q}_{\lambda_1}$}; \node at (4.15,-2.2) {\tiny $\hat{Q}_{\lambda_2}$}; \node at (3.8,-2.52) {\small $\hat E_1$}; \node at (5.2,-1.9) {\small $\hat E_2$}; \node at (2.75,-3.1) {\small $P_1$}; \node at (6,-2.5) {\small $P_2$}; \node at (3.6,-1.4) {\small $\Ac_1$}; \node at (5.3,-0.7) {\small $\Ac_2$}; \node at (2.8,-4.5) {\small $\mathcal{B}(\hat P_1,R_1)$}; \node at (7,-3.5) {\small $\mathcal{B}(\hat P_2,R_2)$}; \end{tikzpicture} \caption{Mismatched likelihood ratio test over distributions in $D$-balls. } \label{fig:mismatch} \end{figure} We study the worst-case error-exponent performance of mismatched likelihood ratio testing when the distributions generating the observation fulfill \eqref{eq:ball2}. In particular, we are interested in the least favorable distributions $P_1^L, P_2^L$ in $\mathcal{B}(\hat P_1,R_1), \mathcal{B}(\hat P_2,R_2)$, i.e., the distributions achieving the lowest error exponents $\hat{E}^L_1(R_1), \hat{E}^L_2(R_2)$. \begin{theorem}\label{thm:worstmismatch} For every $ R_{1}, R_2 \geq 0$ let the least favorable exponents $\hat{E}^L_1(R_1), \hat{E}^L_2(R_2)$ defined as \begin{align} \hat{E}^L_1(R_1)&=\min_{P_1 \in \mathcal{B}(\hat P_1,R_1) } \ \ \min_{Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma})} D(Q\|P_1),\label{eq:MMlower1}\\ \hat{E}^L_2(R_2)&=\min_{P_2 \in \mathcal{B}(\hat P_2,R_2)} \ \ \min_{ Q \in \mathcal{\hat{Q}}_2 (\hat{\gamma}) } D(Q\|P_2), \label{eq:MMlower2} \end{align} where $\mathcal{\hat{Q}}_1 (\hat{\gamma}), \mathcal{\hat{Q}}_2 (\hat{\gamma}) $ are defined in \eqref{eq:qhat1}, \eqref{eq:qhat2}. Then, for any distribution pair $P_1 \in\mathcal{B}(\hat P_1,R_1), P_2 \in \mathcal{B}(\hat P_2,R_2)$, the corresponding error exponent pair $(\hat{E}_1, \hat{E}_2)$ satisfies \begin{equation}\label{eq:LU1} \hat{E}^L_1(R_1) \leq \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) \text{,} \quad \hat{E}^L_2(R_2) \leq \hat{E}_2(\hat{\phi}_{\hat{\gamma}}). \end{equation} Furthermore, the optimization problem in \eqref{eq:MMlower1} is convex with optimizing distributions \begin{align}\label{eq:lowerworstKKT1} {Q}^L_{\lambda_1}(x)&= \frac{ P^L_1(x) \hat{P}_{1}^{-\lambda_1}(x) \hat{P}_{2}^{\lambda_1}(x) } {\sum_{a \in \mathcal{X} } P^L_1(a) \hat{P}_{1}^{-\lambda_1}(a) \hat{P}_{2}^{\lambda_1}(a) },\\ P^L_1(x)&=\beta_1 Q^L_{\lambda_1}(x) + (1-\beta_1) \hat{P}_1(x), \label{eq:lowerworstKKT11} \end{align} where $\lambda_1 \geq 0, 0\leq \beta_1 \leq 1 $ are chosen such that \begin{align}\label{eq:condballMM} D(Q^L_{\lambda_1}\|\hat{P}_1)-D(Q^L_{\lambda_1} \| \hat{P}_2) &=\hat{ \gamma},\\ D(\hat{P}_1\| P^L_1) &= R_{1},\label{eq:condballMM2} \end{align} when \begin{equation}\label{eq:gammaworsL} \max_{P_1 \in\mathcal{B}(\hat P_1,R_1) } D(P_1\| \hat{P}_1) - D(P_1\|\hat{P}_2) \leq \hat{\gamma}. \end{equation} Otherwise, we can find a least favorable distribution $ P^{L}_1 \in \mathcal{B}(\hat P_1,R_1)$ such that $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ for this distribution is $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Similarly, the optimization \eqref{eq:MMlower2} is convex with optimizing distributions \begin{align}\label{eq:lowerworstKKT2} Q^L_{\lambda_2}(x)&= \frac{ P^L_2(x) \hat{P}_{2}^{-\lambda_2}(x) \hat{P}_{1}^{\lambda_2}(x) } {\sum_{a \in \mathcal{X} } P^L_2(a) \hat{P}_{2}^{-\lambda_2}(a) \hat{P}_{1}^{\lambda_2}(a) },\\ P^L_2(x)&=\beta_2 Q^L_{\lambda_2}(x) + (1-\beta_2) \hat{P}_2(x), \end{align} where $ \lambda_2 \geq 0, 0\leq \beta_2 \leq 1 $ are chosen such that \begin{align} D(Q^L_{\lambda_2}\|\hat{P}_2)-DQ^L_{\lambda_2} \| \hat{P}_1) &=\hat{ \gamma},\\ D(\hat{P}_2\| P^L_2) &= R_{2}, \end{align} whenever, \begin{equation}\label{eq:gammaworstU} \min_{P_2 \in\mathcal{B}(\hat P_2,R_2)} D(P_2\| \hat{P}_1) - D(P_2\|\hat{P}_2) \geq \hat{\gamma}. \end{equation} Otherwise, we can find a distribution $ P^{L}_2 \in \mathcal{B}(\hat P_2,R_2)$ such that $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$ for this distribution is $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})=0$. \end{theorem} The worst-case achievable error exponents of mismatched likelihood ratio testing for data distributions in a $D$-ball are essentially the minimum relative entropy between two sets of probability distributions. Specifically, the minimum relative entropy $\Bc(\hat P_1,R_1)$ and $\hat \Qc_2(\hat \gamma)$ gives $\hat{E}_1^L(R_1)$, and similarly for $\hat{E}_2^L(R_2)$. \section{Mismatched Likelihood Ratio \\Testing Sensitivity} In this section, we study how the worst-case error exponents $(\hat{E}^L_1, \hat{E}^L_2)$ behave when the $D$-ball radii $R_1,R_2$ are small. In particular, we derive a Taylor series expansion of the worst-case error exponent. This approximation can also be interpreted as the worst-case sensitivity of the test, i.e., how does the test perform when actual distributions are very close to the mismatched distributions. \begin{theorem}\label{thm:lowerworst} For every $ R_i \geq 0$, $\hat{P}_i \in \mathcal{P}(\mathcal{X})$ for $i=1,2$, and \begin{equation}\label{eq:threshcodsen} -D(\hat{P}_1\|\hat{P}_2) \leq \hat{\gamma} \leq D(\hat{P}_2\|\hat{P}_1), \end{equation} we have \begin{equation}\label{eq:worstapprox} \hat{E}^L_i (R_i) = E_i(\hat{\phi}_{\hat{\gamma}}) - S_i(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \sqrt{R_i}+ o(\sqrt{R_i}), \end{equation} where \begin{equation}\label{eq:sensitivity} S_i^2(\hat{P}_1,\hat{P}_2,\hat{\gamma}) =2 \text{Var}_{\hat{P}_i} \Bigg(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_i(X)} \Bigg) \end{equation} and $\hat{Q}_{\lambda}(X)$ is the minimizing distribution in \eqref{eq:tilted} for test $\hat{\phi}_{\hat{\gamma}}$. \end{theorem} \begin{lemma}\label{lem:varderivative} For every $\hat{P}_1,\hat P_2 \in \mathcal{P}(\mathcal{X})$, and $\hat{\gamma}$ satisfying \eqref{eq:threshcodsen} \begin{align} \frac{\partial }{\partial \hat{\gamma}}S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \geq 0, ~~ \frac{\partial }{\partial \hat{\gamma}}S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \leq 0. \end{align} \end{lemma} This lemma shows that $S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma})$ is a non-decreasing function of $\hat{\gamma}$, i.e., as $\hat{\gamma}$ increases from $-D(\hat{P}_1\|\hat{P}_2) $ to $D(\hat{P}_2\|\hat{P}_1)$, the worst-case exponent $\hat E_1^L(R_1)$ becomes more sensitive to mismatch with likelihood ratio testing. Conversely, $S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma})$ is a non-increasing function of $\hat{\gamma}$, i.e., as $\hat{\gamma}$ increases from $-D(\hat{P}_1\|\hat{P}_2) $ to $D(\hat{P}_2\|\hat{P}_1)$, the worst-case exponent $\hat E_2^L(R_2)$ becomes less sensitive (more robust) to mismatch with likelihood ratio testing. Moreover, when $\lambda=\frac{1}{2}$, we have \begin{equation} \hat{Q}_{\frac{1}{2}}(x)=\frac{\sqrt{\hat{P}_1(x) \hat{P}_2(x) }}{ \sum_{a \in \mathcal{X} } \sqrt{\hat{P}_1(a) \hat{P}_2(a) } }, \end{equation} and then $S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma})=S_2(\hat{P}_1,\hat{P}_2,\hat{\gamma})$. In addition, $\hat{Q}_{\frac{1}{2}}$ minimizes ${E}_1(\hat \phi_{\hat \gamma}) + {E}_2(\hat \phi_{\hat \gamma})$ yielding \cite{Veeravalli} \begin{align} {E}_1(\hat \phi_{\hat \gamma}) + {E}_2(\hat \phi_{\hat \gamma})&= \min_{Q \in \mathcal{P}(\mathcal{X})} D(Q\|\hat{P}_1) + D(Q\|\hat{P}_2)\\& = 2 B(\hat{P}_1,\hat{P}_2) \end{align} where $ B(\hat{P}_1,\hat{P}_2)$ is the Bhattacharyya distance between the mismatched distributions $\hat{P}_1$ and $\hat{P}_2$. This suggests that having equal sensitivity (or robustness) for both hypotheses minimizes the sum of the exponents. \begin{example} When $\gamma=0$ the likelihood ratio test becomes the maximum-likelihood test, which is known to achieve the lowest average probability of error in the Bayes setting for equal priors. For fixed priors $\pi_1,\pi_2$, the error probability in the Bayes setting is $\bar\epsilon= \pi_1\epsilon_1 +\pi_2\epsilon_2$, resulting in the following error exponent \cite{Cover} \begin{equation} \bar E= \lim_{n\rightarrow \infty} \frac{1}{n} \log \bar \epsilon = \min \{E_1,E_2\}. \end{equation} Consider $\hat{P}_1 =\text{Bern}(0.1)$ , $\hat{P}_2 =\text{Bern}(0.8)$. Also, assume $R_1=R_2=R$. Figure \ref{fig:worstRsen} shows the worst-case error exponent in the Bayes setting given by $\min \{\hat E_1^L,\hat E_2^L\}$ by solving \eqref{eq:MMlower1} and \eqref{eq:MMlower2} as well as $\min \{\tilde E_1^L,\tilde E_2^L\}$ using the approximation in \eqref{eq:worstapprox}. We can see that the approximation is good for small $R$. Moreover, it can be seen that error exponents are very sensitive to mismatch for small $R$, i.e., the slope of the worst-case exponent goes to infinity as $R$ approaches to zero. \begin{figure}[!h] \centering \includegraphics[width=.5\textwidth]{figs/Bayes_approx.pdf} \caption{Worst-case achievable Bayes error exponent.} \label{fig:worstRsen} \end{figure} \end{example} \section*{Appendix} \subsection{Proof of Theorem \ref{thm:mismatchLRT}} We show the result for $ \hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ and similar steps are valid for $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$. The type-\RNum{1} probability of error can be written as \begin{align} \hat{\epsilon}_1(\hat{\phi}_{\hat{\gamma}}) = \sum_{\substack{\bx\in\Xc^n\\D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \geq \hat{\gamma}}} P_{1}^n(\xv). \label{eq:tailmismatch} \end{align} Applying Sanov's Theorem to \eqref{eq:tailmismatch} to get \eqref{eq:LRTmis1} is immediate. The optimization problem in \eqref{eq:LRTmis1} consists of the minimization of a convex function over linear constraints. Therefore, the KKT conditions are also sufficient \cite{Boyd}. Writing the Lagrangian, we have \begin{align}\label{eq:lagrangeMM} L(Q,\lambda,\nu)= &D(Q\|P_1) + \lambda \big ( D(Q\|\hat{P}_2)-D(Q\|\hat{P}_1) +\hat{\gamma} \big ) \nonumber \\ &+\nu \Big ( \sum_{x\in \mathcal{X}} Q(x)-1 \Big). \end{align} Differentiating with respect to $Q(x)$ and setting to zero we have \begin{equation}\label{eq:lagrangeder} 1+\log \frac{Q(x)}{P_1(x)} +\lambda \log \frac{\hat{P}_1(x)}{\hat{P}_2(x)} + \nu=0. \end{equation} Solving equations \eqref{eq:lagrangeder} for every $x\in\Xc$ we obtain \eqref{eq:tiltedMM1}. Moreover, from the complementary slackness condition if \cite{Boyd} \begin{equation}\label{eq:threshcondition} D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}, \end{equation} then \eqref{eq:KKTgamma1} should hold. Otherwise, if \eqref{eq:threshcondition} does not hold then $\lambda$ in \eqref{eq:lagrangeder} should be zero and hence $\hat{Q}_{\lambda_1}=P_1$, $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Finally, substituting the minimizing distribution $\hat{Q}_{\lambda_1}$ \eqref{eq:tiltedMM1} into \eqref{eq:lagrangeMM} we get the dual expression \begin{equation}\label{eq:lagrange} g(\lambda)= \lambda \hat{\gamma} - \log \Big ( \sum_{x\in \mathcal{X}} P_1 \hat{P}_1^{-\lambda}(x) P_2^{\lambda}(x) \Big ). \end{equation} Since the optimization problem in \eqref{eq:LRTmis1} is convex, then the duality gap is zero \cite{Boyd}, and this proves the \eqref{eq:dual}. \subsection{Proof of Theorem \ref{thm:stein}} First, notice that $\hat{E}_2(\hat{\phi}_{\hat{\gamma}})$ is a non-increasing function of $\hat{\gamma}$ since for every $\hat{\gamma}_1 \leq \hat{\gamma}_2 $ we have \begin{equation} \mathcal{\hat{Q}}_2({\hat{\gamma}_1}) \subset \mathcal{\hat{Q}}_2({\hat{\gamma}_2}), \end{equation} hence \begin{equation} \hat{E}_2(\hat{\phi}_{\hat{\gamma}_2}) \leq \hat{E}_2(\hat{\phi}_{\hat{\gamma}_1}). \end{equation} Therefore, in the Stein's regime we are looking for the smallest threshold such that $\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) \leq \epsilon$. Let \begin{equation}\label{eq:steinthresh} \hat{\gamma}= D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2) - \sqrt {\frac{ V(P_1, \hat{P}_1,\hat{P}_2) } {n} } \Phi^{-1}(\epsilon), \end{equation} where \begin{align} &V(P_1, \hat{P}_1,\hat{P}_2)= \text{Var}_{P_1}\bigg( \log \frac{\hat{P}_1}{\hat{P}_2} \bigg ) \nonumber\\ & = \sum_{x\in \mathcal{X}} P_1(x) \bigg ( \log \frac{\hat{P}_1}{\hat{P}_2} \bigg )^2 - \big ( D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) \big)^2, \end{align} and $\Phi^{-1}(\epsilon)$ is the inverse cumulative distribution function of a zero-mean unit-variance Guassian random variable. For such $\hat{\gamma}$, the type-\RNum{1} error probability of the mismatched likelihood ratio test is \begin{align} \hat{\epsilon}_1(\hat{\phi}_{\hat{\gamma}})=&\Pp_1 \Bigg [\frac{1}{n} \sum_{i=1}^{n} \log \frac{\hat{P}_1(X_i)}{\hat{P}_2(X_i)} \leq D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) \nonumber\\ &+ \sqrt {\frac{ V(P_1, \hat{P}_1,\hat{P}_2) } {n} } \Phi^{-1}(\epsilon) \Bigg ]. \end{align} Observe that $D(P_1\|\hat{P}_2) - D(P_1\|\hat{P}_1) = \mathbb{E}_{P_1} \Big [ \log \frac{\hat{P}_1(X)}{\hat{P}_2(X)} \Big ]$. Let $ \hat{S}_n=\frac{1}{n}\sum_{i=1}^n \hat\imath(x_i)$, where $\hat\imath(x_i)=\log \frac{\hat{P}_1(x_i)}{\hat{P}_2(x_i)}$. Letting $Z$ be a zero-mean unit-variance Guassian random variable, then, by the central limit theorem we have \begin{align} &\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) &\notag\\ &= \limsup_{n\rightarrow \infty} \Pp_1\Bigg [ \frac{ \sqrt{n} \big ( \hat{S}_n- \mathbb{E}_{P_1} [\hat\imath(X)] \big )}{\sqrt {V(P_1, \hat{P}_1,\hat{P}_2) } } \leq \Phi^{-1}(\epsilon) \Bigg]\\ &=\Pp\big [Z \leq \Phi^{-1}(\epsilon) \big]\\ &= \epsilon. \end{align} Therefore, asymptotically, the type-\RNum{1} error probability of mismatched likelihood ratio test with $\hat{\gamma}$ in \eqref{eq:steinthresh} is equal to $\epsilon$. Next, we need to show that for any threshold $\hat{\gamma}$ and $\varepsilon>0$ such that \begin{equation}\label{eq:limsupthresh} \limsup_{n \rightarrow \infty} \hat{\gamma} +\varepsilon\leq D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2), \end{equation} the type-\RNum{1} probability of error tends to $1$ as the number of observation approaches infinity, which implies that $D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2)$ is the lowest possible threshold that meets the constraint $\limsup_{n\rightarrow \infty} \hat{\epsilon}_1 (\hat{\phi}_{\hat{\gamma}}) \leq \epsilon$. The corresponding $\hat E_2(\hat\phi_{\hat\gamma})$ is this highest type-\RNum{2} exponent that meets the constraint. In order to show this, define the following sets \begin{align} \mathcal{E}_{\delta} = \Big \{ \bx\in\Xc^n:\, &\| \Th(x) -P_1(x)\|_\infty < \delta \Big \},\\ \Dc = \big\{ \bx\in\Xc^n:\, & \big|D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2)\\ -&D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \big | < \varepsilon \big\}, \nonumber\\ \bar \Dc = \big\{ \bx\in\Xc: \,&D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) \nonumber\\ -& D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \geq - \varepsilon \big\}. \end{align} where $\|.\|_{\infty}$ is the norm infinity. From the continouity of $D(.\|\hat{P})$ we have that for any $\varepsilon >0$ such that \begin{equation}\label{eq:epsilondelta} \big |D(\Th\|\hat{P}_1)-D(\Th\|\hat{P}_2) - D(P_1\|\hat{P}_1)+D(P_1\|\hat{P}_2) \big | < \varepsilon. \end{equation} there exists $\delta>0$ such that for all $\Th$ satisfying \begin{equation} \| \Th(x) -P_1(x)\|_\infty < \delta \end{equation} \eqref{eq:epsilondelta} holds. Therefore, when \eqref{eq:limsupthresh} holds \begin{align} \liminf_{n\rightarrow \infty} \epsilon_1 (\hat{\phi}_{\hat{\gamma}} ) \geq& \liminf_{n\rightarrow \infty} \sum_{x\in\bar \Dc} P_1^n(\xv)\\ \geq &\liminf_{n\rightarrow \infty} \sum_{x\in \Dc} P_1^n(\xv). \end{align} Now from the continuity argument, there exists a $\delta$ such that \begin{equation} \sum_{x\in\Dc} P_1^n(\xv) \geq \sum_{x\in\Ec_{\delta}} P_1^n(\xv). \end{equation} Set $\delta_n=\sqrt{\frac{\log n}{n}}$. Thus, for sufficiently large $n$, $\delta_n \leq \delta$, Therefore, we have \begin{align} \liminf_{n\rightarrow \infty} \epsilon_1 (\hat{\phi}_{\hat{\gamma}} ) &\geq \liminf_{n \rightarrow \infty} \sum_{\xv\in\Ec_{\delta_n}} P_1^n(\xv)\\ &\geq \lim_{n \rightarrow \infty} 1- \frac{2|\mathcal{X}|}{n}\\ &=1. \end{align} where the last step is by Hoeffding's inequality \cite{Hoeffdingineq} and union bound. Therefore, for any $\hat{\gamma} < D(P_1\|\hat{P}_1) - D(P_1\|\hat{P}_2)$ type-\RNum{1} error goes to unity which concludes the theorem. \subsection{Proof of Theorem \ref{thm:worstmismatch}} We show the result under the first hypothesis and similar steps are valid under the second hypothesis. For every $P_1$ the achievable type-\RNum{1} is error exponent $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ does not depend on $P_2$ therefore, \eqref{eq:MMlower1} is a lower bound to $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$. Moreover, since the relative entropy is jointly convex, then \eqref{eq:MMlower1} is a convex optimization problem and the KKT conditions are also sufficient. Writing the Lagrangian we have \begin{align}\label{eq:lagrange} L(Q,P_1,\lambda_1,\lambda_1', \nu_1, \nu_1')= D(Q\|P_1) + \lambda_1 \big( D(Q\|\hat{P}_2) \nonumber \\ -D(Q\|\hat{P}_1) +\hat{\gamma} \big) + \lambda_1' \big ( D(\hat{P}_1\|P_1) -R_1\big ) \nonumber \\ + \nu_1 \Big ( \sum_{x\in \mathcal{X}} Q(x)-1\Big )+ \nu_1' \Big ( \sum_{x\in \mathcal{X}} P_1(x)-1\Big ). \end{align} Differentiating with respect to $Q(x)$ and $P_1(x)$ and setting the derivatives to zero we have \begin{align} 1+\log \frac{Q(x)}{P_1(x)} +\lambda_1 \log \frac{\hat{P}_1(x)}{\hat{P}_2(x)} + \nu_1&=0,\label{eq:lagrange1}\\ -\frac{Q(x)}{P_1(x)}-\lambda_1' \frac{\hat{P}_1(x)}{P_1(x)}+\nu_1'&=0, \label{eq:lagrange2} \end{align} respectively. Solving equations \eqref{eq:lagrange1}, \eqref{eq:lagrange2} for every $x\in\Xc$ and letting $\beta_1=\frac{1}{1+\lambda_1'}$ we obtain \eqref{eq:lowerworstKKT1} and \eqref{eq:lowerworstKKT11}. Moreover, from the complementary slackness condition \cite{Boyd} if for all $P_1$ in $\mathcal{B}(\hat{P}_1,R_1)$ the condition $D(P_1\|\hat{P}_1)- D(P_1\|\hat{P}_2) \leq \hat{\gamma}$ stated in Theorem \ref{thm:mismatchLRT} holds, then \eqref{eq:condballMM} and \eqref{eq:condballMM2} should hold. Otherwise, if there exists a $P^{L}_1$ in $\mathcal{B}(\hat P_1,R_1) $ such that $D(P_1^L\|\hat{P}_1)- D(P_1^L\|\hat{P}_2) \leq \hat{\gamma}$, then for this distribution $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})=0$. Therefore, if conditon \eqref{eq:gammaworsL} holds for all $P_1$ in the $D$-ball $\hat{E}^L_1(R_1) >0$, otherewise $\hat{E}^L_1(R_1) =0$. \subsection{Proof of Theorem \ref{thm:lowerworst}} We show the result under the first hypothesis, and similar steps are valid for the second hypothesis. Consider the first minimization in \eqref{eq:MMlower1} over $Q$, i.e., \begin{equation}\label{eq:LRTmis1perturb} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})= \min_{ Q \in \mathcal{\hat{Q}}_1 (\hat{\gamma}) } D(Q\|P_1). \end{equation} First, note that by assumption, $\hat P_1(x)>0$ for each $x\in\Xc$. Therefore, for any finite $R_1$, we have $P_1(x)>0$ for every $P_1 \in \mathcal{B}(\hat P_1,R_1)$. Hence, for $P_1 \in \mathcal{B}(\hat P_1,R_1)$, the relative entropy $D(Q\|P_1)$ is continuous in both $Q, P_1$. Moreover, the constraints in \eqref{eq:LRTmis1perturb} are continuous with respect to $Q$ and also trivially with respect to $P_1$, since the constraints do not depend on $P_1$. Hence, the optimization in \eqref{eq:LRTmis1perturb} is minimizing a continuous function over a compact set with continuous constraints. Hence, by the maximum theorem \cite{Walker}, $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ is a continuous function of $P_1$ for all $P_1 \in \mathcal{B}(\hat P_1,R_1)$ with finite radius $R_1$. Therefore, by the envelope theorem\cite{Segal} we have \begin{equation} \frac{ \partial \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial P_1(x)}= -\frac{\hat{Q}_{\lambda}(x)}{P_1(x)}. \end{equation} Define the vectors \begin{align} \nabla \hat{E}_1 &= \bigg( -\frac{\hat{Q}_{\lambda}(x_1)}{\hat{P}_1(x_1)},\dotsc, -\frac{\hat{Q}_{\lambda}(x_{|\Xc|})}{\hat{P}_1(x_{|\Xc|})}\bigg)^T\\ \thetav_{P_1} &= \big(P_1(x_1)-\hat{P}_1(x_1),\dotsc,P_1(x_{|\Xc|})-\hat{P}_1(x_{|\Xc|})\big)^T. \end{align} Assuming the $\hat{E}^L_i(R_i)$ to be continuous we can apply the Taylor expansion to $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ around $P_1=\hat{P}_1$ and we obtain \begin{align}\label{eq:linearapprox} \hat{E}_1(\hat{\phi}_{\hat{\gamma}})=E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1 + o(\| \thetav_{P_1} \|_{\infty}). \end{align} By substituting the expansion \eqref{eq:linearapprox} for the first minimization in \eqref{eq:MMlower1} we obtain \begin{equation}\label{eq:approxworst} \hat{E}^{L}_1(R_1) = \min_{P_1 \in \mathcal{B}(\hat P_1,R_1) } E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla\hat{E}_1 + o(\|\thetav_{P_1} \|_{\infty}). \end{equation} Now, we further approximate the outer minimization constraint in \eqref{eq:MMlower1}. By approximating $D(\hat{P}_1 \| P_1 )$ we get \cite{Zheng} \begin{equation}\label{eq:KLapprox} D(\hat{P}_1 \| P_1 ) = \frac{1}{2} \thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} + o (\| \thetav_{P_1} \|^2_{\infty}), \end{equation} where \begin{equation} \Jm(\hat{P}_1)=\diag\bigg( \frac{1}{\hat{P}_1(x_1)},\dotsc,\frac{1}{\hat{P}_1(x_{|\Xc|})}\bigg) \end{equation} is the Fisher information matrix. Therefore, \eqref{eq:approxworst} can be approximated as \begin{align}\label{eq:worstapproxopt} \hat{E}^{L}_1(R_1) &\approx \tilde{E}^L_1 (R_1) \nonumber \\ &\triangleq \min_{\substack{ \frac{1}{2} \thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} \leq R_{1} \\ \onev^T\thetav_{P_1}=0}} E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1. \end{align} The optimization problem in \eqref{eq:worstapproxopt} is convex and hence the KKT conditions are sufficient. The corresponding Lagrangian is given by \begin{align} L(\thetav_{P_1}, \lambda,\nu) &= E_1(\hat{\phi}_{\hat{\gamma}}) + \thetav_{P_1}^{T} \nabla \hat{E}_1 \nonumber \\ &+ \lambda \Big (\frac{1}{2}\thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} - R_{1} \Big) +\nu ( \onev^T\thetav_{P_1} ). \end{align} Differentiating with respect to $\thetav_{P_1}$ and setting to zero, we have \begin{equation}\label{eq:KKTsen} \nabla \hat{E}_1 + \lambda \Jm(\hat{P}_1)\thetav_{P_1} +\nu \onev=0. \end{equation} Therefore, \begin{equation}\label{eq:deltaPsolution} \thetav_{P_1} =-\frac{1}{\lambda} \Jm^{-1}(\hat{P}_1) \big (\nabla \hat{E}_1 +\nu \onev \big ). \end{equation} Note that if $\lambda=0$ then from \eqref{eq:KKTsen} $ \nabla \hat{E}_1= -\nu \onev$ which cannot be true for thresholds satisfying \eqref{eq:threshcodsen} since $\hat{Q}_{\lambda} \neq \hat{P}_1$. Therefore, from the complementary slackness condition \cite{Boyd} the inequality constraint \eqref{eq:worstapproxopt} should be satisfied with equality. By solving $\frac{1}{2}\thetav_{P_1}^T \Jm(\hat{P}_1) \thetav_{P_1} = R_{1}$ and $\bold{1}^T\thetav_{P_1} =0 $ and substituting $\lambda, \nu$ in \eqref{eq:deltaPsolution}, we obtain \begin{equation}\label{eq:deltaP} \thetav_{P_1} =-\frac{ \psiv}{\sqrt{\psiv^T \Jm(\hat{P}_1)\psiv} }\sqrt{2R_1}, \end{equation} where \begin{equation} \psiv= \Jm^{-1}(\hat{P}_1)\Bigg (\nabla \hat{E}_1 -{\onev^T\Jm^{-1}(\hat{P}_1) \nabla \hat{E}_1 } \onev\Bigg ). \end{equation} Substituding \eqref{eq:deltaP} into \eqref{eq:approxworst} yields \eqref{eq:worstapprox}. \subsection{Proof of Lemma \ref{lem:varderivative}} We show the result under the first hypothesis and similar steps are valid under the second hypothesis. To prove the Theorem we need the following lemma. \begin{lemma}\label{lem:convex} Consider the following optimization problem \begin{equation} E(\gamma)= \min_{ \mathbb{E}_Q [X] \geq \gamma } D(Q\|P). \end{equation} Then $E(\gamma)$ is convex in $\gamma$. \end{lemma} \begin{proof} Let \begin{equation} Q^{*}_{1} = \argmin_{ \mathbb{E}_Q [X] \geq \gamma_1} D(Q\|P) ~~ Q^{*}_{2} = \argmin_{ \mathbb{E}_Q [X] \geq \gamma_2} D(Q\|P). \end{equation} From the convexity of the relative entropy, for any $\alpha \in (0,1)$, \begin{align} D&\big(\alpha Q^*_1 +(1-\alpha) Q^*_2 \| P \big) \leq \alpha D( Q^*_1 \| P) +(1-\alpha) D( Q^*_2 \| P)\\ &= \alpha \min_{ \mathbb{E}_Q [X] \geq \gamma_1 } D(Q\|P) +(1-\alpha) \min_{ \mathbb{E}_Q [X] \geq \gamma_2 } D(Q\|P). \end{align} Furthermore, since $Q^*_1, Q^*_2$ satisfy their correspending optimization constraints, then $\mathbb{E}_{Q^*_1}[X] \geq \gamma_1$, $\mathbb{E}_{Q^*_2}[X] \geq \gamma_2$ , hence \begin{equation} \mathbb{E}_{\alpha Q^*_1 +(1-\alpha) Q^*_2}[X] \geq \alpha \gamma_1+ (1-\alpha) \gamma_2. \end{equation} Therefore, $\alpha Q^*_1 +(1-\alpha) Q^*_2$ satisfies the optimization constraint when $\gamma= \alpha \gamma_1 + (1-\alpha) \gamma_2$, then \begin{align} &\min_{ \mathbb{E}_{Q} [X] \leq \alpha \gamma_1+(1-\alpha) \gamma_2} D(Q\|P) \leq D(\alpha Q^*_1 +(1-\alpha) Q^*_2 \| P)\\ &\leq \alpha \min_{ \mathbb{E}_Q [X] \geq \gamma_1 } D(Q\|P) +(1-\alpha) \min_{ \mathbb{E}_Q [X] \geq \gamma_2 } D(Q\|P). \end{align} Hence $E(\gamma)$ is convex in $\gamma$. \end{proof} From above lemma we can show that $\lambda$ is a non-decreasing function of $\hat{\gamma}$. From the envelope theorem \cite{Segal} \begin{equation} \frac{\partial \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial \hat{\gamma}} = \lambda^*, \end{equation} where $\lambda^*$ is the optimizing $\lambda$ in \eqref{eq:tilted} for the test $\hat{\phi}_{\hat{\gamma}}$. Therefore \begin{equation} \frac{\partial \lambda^* }{\partial \hat{\gamma}}= \frac{\partial ^2 \hat{E}_1(\hat{\phi}_{\hat{\gamma}}) }{\partial \hat{\gamma}^2} \geq 0, \end{equation} where the inequality is from convexity of $\hat{E}_1(\hat{\phi}_{\hat{\gamma}})$ respect to $\hat{\gamma}$. Therefore, we only need to consider the behavior of variance as $\lambda$ changes. Taking the derivative of variance respect to $\lambda$, we have \begin{align} \frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big)&=\sum_{x\in \mathcal{X}} \frac{2{\hat{Q}_{\lambda}}(x)}{\hat{P_1}(x)} \frac{\partial \hat{Q}_{\lambda}(x) }{\partial \lambda}\\ &= \sum_{x\in \mathcal{X}} \frac{2{\hat{Q}_{\lambda}}(x)}{\hat{P_1}(x)} \Bigg( \hat{Q}_{\lambda}(x) \log \frac{\hat{P}_2(x)}{\hat{P}_1(x)}-\nonumber \\ &~~~\hat{Q}_{\lambda}(x) \sum_{x' \in \mathcal{X}} \hat{Q}_{\lambda}(x')\log \frac{\hat{P}_2(x')}{\hat{P}_1(x')} \Bigg ) \\ &=2 \mathbb{E}_{\hat{Q}_{\lambda}} \bigg[ \frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]\nonumber \\ &~~~- 2 \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)}\bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]. \end{align} Substituting $\hat{Q}_{\lambda}(X)$ as a function of $\lambda$ we get \begin{align} &\frac{\sum_{a\in \mathcal{X}} \hat{P}_1^{1-\lambda}(a) \hat{P}_2^{\lambda}(a) }{2} \frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \bigg(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \bigg)\nonumber \\ &=\mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_{2}(X)}{\hat{P}_1(X)} \bigg )^{\lambda} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ] \nonumber \\ &~~~~~- \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ) ^{\lambda} \bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]. \label{eq:varlogsum} \end{align} Let $r(X)= \Big (\frac{\hat{P}_2(X)}{\hat{P}_1(X)}\Big )^{\lambda}$, then \begin{align} \mathbb{E}_{\hat{Q}_{\lambda}} &\bigg [ \bigg (\frac{\hat{P}_{2}(X)}{\hat{P}_1(X)} \bigg )^{\lambda} \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ]\nonumber \\ & ~~~~~~~~~~~~~~~~-\mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \bigg (\frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ) ^{\lambda} \bigg ] \mathbb{E}_{\hat{Q}_{\lambda}} \bigg [ \log \frac{\hat{P}_2(X)}{\hat{P}_1(X)} \bigg ] \nonumber \\ &=\frac{1}{\lambda} \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) \log r(X) ]- \frac{1}{\lambda} \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \mathbb{E}_{\hat{Q}_{\lambda}} [ \log r(X) ]. \label{eq:varlogsum} \end{align} Note that $\hat{Q}_{\lambda}(x),r(x)$ are positive for all $x\in \Xc$. Therefore, using the log-sum inequality \cite{Cover} for the first term and Jensen inequality \cite{Cover} for the second term in \eqref{eq:varlogsum}, we obtain \begin{align} &\frac{\lambda \sum_{a\in \mathcal{X}} \hat{P}_1^{1-\lambda}(a) \hat{P}_2^{\lambda}(a) }{2}\frac{\partial }{\partial \lambda}\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big) \nonumber\\ &\geq \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]- \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \mathbb{E}_{\hat{Q}_{\lambda}} [ \log r(X) ] \\ &\geq \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]- \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ] \log \mathbb{E}_{\hat{Q}_{\lambda}} [ r(X) ]\\ &=0. \end{align} Also, the above inequalities are met with equality when both log-sum and Jensen's inequalities are met with equality, which happens when $\lambda=0$. Therefore, for $ \lambda>0$, $\text{Var}_{\hat{P}_1} \Big(\frac{\hat{Q}_{\lambda}(X)}{\hat{P}_1(X)} \Big)$ is an increasing function of $\lambda$ for $ \lambda>0$ and consequently \begin{equation} \frac{\partial }{\partial \hat{\gamma}}S_1(\hat{P}_1,\hat{P}_2,\hat{\gamma}) \geq 0. \end{equation} \bibliographystyle{ieeebib} \bibliographystyle{ieeetr}
\section*{\refname}% \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% \list{\@biblabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@biblabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \itemsep=0pt \parsep=0pt \leftmargin=\parindent \itemindent=-\parindent \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \makeatother \def\equationautorefname~#1\null{% Eq.~(#1)\null } \def\equationautorefname~#1\null{ Eq.~(#1)\null } \renewcommand*{Fig.}{Fig.} \captionsetup{figurename=Fig.,tablename=Table} \setlength{\parskip}{0em} \begin{document} \maketitle\thispagestyle{empty}\normalsize\vspace*{-2em}\small \begin{center} \begin{minipage}{0.8\textwidth} \noindent\small This paper develops a dynamic factor model that uses euro area (EA) country-specific information on output and inflation to estimate an area-wide measure of the output gap. Our model assumes that output and inflation can be decomposed into country-specific stochastic trends and a common cyclical component. Comovement in the trends is introduced by imposing a factor structure on the shocks to the latent states. We moreover introduce flexible stochastic volatility specifications to control for heteroscedasticity in the measurement errors and innovations to the latent states. Carefully specified shrinkage priors allow for pushing the model towards a homoscedastic specification, if supported by the data. Our measure of the output gap closely tracks other commonly adopted measures, with small differences in magnitudes and timing. To assess whether the model-based output gap helps in forecasting inflation, we perform an out-of-sample forecasting exercise. The findings indicate that our approach yields superior inflation forecasts, both in terms of point and density predictions.\\\\ \textit{JEL}: E32, C11, C32, C53\\ \MakeUppercase{\textit{keywords}}: European business cycles, dynamic factor model, factor stochastic volatility, inflation forecasting\\ \end{minipage} \end{center} \bigskip\normalsize \renewcommand{\thepage}{\arabic{page}} \setcounter{page}{1} \newpage \section{Introduction}\label{sec:intro} Effective policy making in central banks such as the European Central Bank (ECB) requires accurate measures of latent quantities such as the output gap to forecast key quantities of interest like inflation across euro area (EA) member states. Since using aggregate EA data potentially masks important country-specific dynamics, exploiting country-level information could help in obtaining more reliable estimates of the output gap that is consequently used in Phillips curve-type models to forecast inflation. In this paper, we exploit cross-sectional information on output and inflation dynamics to construct a multi-country model for the EA. The proposed framework aims to combine the literature on output gap modeling \citep[see, among many others,][]{kuttner1994estimating, orphanides2002unreliability, basistha2007new, planas2008bayesian} that focuses on estimating the output gap based on data for a single country/regional aggregate, the literature on dynamic factor models \citep{otrok1998bayesian, kim1999state, koseotrokwhiteman, breitungeickmeierEL, jarocinski2018inflation} and the literature on inflation forecasting \citep{stock1999forecasting,stock2007has}. Our model assumes that country-specific business cycles are driven by a common latent factor, effectively exploiting cross-sectional information in the data. Moreover, we assume that output and inflation feature a non-stationary country-specific component. To control for potential comovement in these trend terms, we assume that the corresponding shocks to the states feature a factor structure. The resulting factor model features stochastic volatility (SV) in the spirit of \cite{aguilar2000bayesian} and thus provides a parsimonious way of controlling for heteroscedasticity. Since successful forecasting models typically allow for SV \citep{clark2011realtime,clarkravazzolo2015JAE,HUBER2016818,HuberFeldkircher2019JBES}, we also allow for time-variation in the error variances across the remaining state innovations and the measurement errors. One methodological key innovation is the introduction of global-local shrinkage priors on the error variances of the state equations describing the law of motion of the logarithmic volatility components, effectively shrinking the system towards a homoscedastic specification, if applicable. This increased flexibility, however, is costly in terms of additional parameters to estimate. We thus follow the recent literature on state space modeling \citep{fruhwirth2010stochastic, belmonte2014hierarchical, kastner2014ancillarity, feldkircher2017sophisticated, bitto2016achieving} and exploit a non-centered parameterization of the model \citep[see][]{fruhwirth2010stochastic} to test whether SV is supported by the data. The non-centered parameterization allows treating the square root of the process innovation variances as standard regression coefficients, implying that conventional shrinkage priors can be used. Here we follow \cite{griffin2010inference} and use a variant of the Normal-Gamma (NG) shrinkage prior that introduces a global shrinkage component that applies to all process variances simultaneously, forcing them towards zero. Local shrinkage parameters are then used to drag sufficient posterior mass away from zero even in the presence of strong global shrinkage, allowing for non-zero process variances if required. When applied to data for ten EA countries over the time period from 1997:Q1 to 2018:Q4, we find that our output gap measure closely tracks other measures reported in previous studies \citep{planas2008bayesian, jarocinski2018inflation} as well as gaps obtained by utilizing standard tools commonly used in policy institutions. We moreover perform historical decompositions to gauge the importance of area-wide as opposed to country-specific shocks for describing inflation movements. These measures reveal that inflation is strongly driven by common business cycle dynamics, underlining the importance of controlling for a common business cycle. We then turn to assessing whether there exists a Phillips curve across EA countries by simulating a negative one standard deviation business cycle shock. This exercise points towards a robust relationship between the common gap component and inflation, with magnitudes differing across countries. The main part of the empirical application applies our modeling approach to forecast inflation, paying particular attention on whether the inclusion of a common output gap improves predictive capabilities. Since inflation across countries is driven by a term measuring trend inflation and the output gap, our framework can be interpreted as a New Keynesian Phillips curve, akin to \cite{stella2013state}. Compared to a set of simpler alternatives that range from univariate benchmark models to models that use alternative ways to calculate the output gap, the proposed model yields more precise point and density forecasts for inflation. The remainder of the paper is structured as follows. Section 2 describes the econometric framework. After providing an overview of the model, we discuss the Bayesian prior choice and briefly summarize the main steps involved in estimating the model. Section 3 presents the empirical application, starting with a summary of the dataset and inspects various key features of our model. The section moreover studies the dynamic impact of business cycle shocks to the country-specific output and inflation series. In a forecasting exercise, Section 4 compares the out-of-sample predictive performance of our model with other specifications. The final section summarizes and concludes the paper. \section{Econometric framework}\label{sec: econometrics} \subsection{A dynamic factor model for the euro area} In this section we describe the framework to estimate the euro area output gap using disaggregate country-level information. Let $y_{it}$ and $\pi_{it}$ denote output and inflation for country $i=1,\dots,N$ in period $t=1,\dots,T$, respectively. For notational simplicity, we define $k \in \{y, \pi \}$. Country-specific output and inflation are driven by unobserved common non-stationary trend components $\tau_{kit}$ that aim to capture low-frequency movements, while a common cyclical component $g_t$ tracks mid- to high-frequency fluctuations in inflation and output. These unobserved (latent) quantities are related to the observed quantities through a set of measurement equations: \begin{align} y_{it} &= \tau_{yit}+\alpha_{i}g_{t}+\epsilon_{yit}, \label{eq: obs_output}\\ {\pi}_{it} &= \tau_{\pi it}+\beta_{i}g_{t}+\epsilon_{\pi it},\label{eq: obs_pi}\\ \epsilon_{kit} & \sim\mathcal{N}(0,\text{e}^{h_{kit}}).\label{eq: measurement-err} \end{align} These equations imply that the trend components can loosely be interpreted as country-specific trend inflation and potential output for the $i$th country, respectively. Moreover, the stationary component of output and inflation depends on the common cycle $g_t$ through a set of idiosyncratic factor loadings $\alpha_i$ and $\beta_i$ and measurement errors that feature time-varying variances $e^{h_{kit}}$. It is worth stressing that \autoref{eq: obs_pi} represents a country-specific Phillips curve that establishes a relationship between inflation and the area-wide output gap $g_t$. One key goal of this paper is to assess whether there exists a Phillips curve across EA countries by inspecting $\beta_i$ and functions thereof. The country-specific components in \autoref{eq: obs_output} and \autoref{eq: obs_pi} are stacked in $\bm{\tau}_{yt} = (\tau_{y1t},\hdots,\tau_{yNt})'$ and $\bm{\tau}_{\pi t} = (\tau_{\pi 1t},\hdots,\tau_{\pi Nt})'$ and evolve according to a VAR(2) process given by the state equation \begin{equation} \underbrace{\begin{bmatrix} \bm{\tau}_{yt}\\ \bm{\tau}_{\pi t} \\ g_t \end{bmatrix}}_{\bm{f}_t} = \underbrace{\begin{bmatrix} \bm{I}_N & \hdots & \bm{0} \\ \vdots & \bm{I}_N & \vdots \\ \bm{0} & \hdots & \phi_1 \\ \end{bmatrix} }_{\bm{\Phi}_1} \underbrace{ \begin{bmatrix} \bm{\tau}_{yt-1}\\ \bm{\tau}_{\pi t-1} \\ g_{t-1} \end{bmatrix} }_{\bm{f}_{t-1}} + \underbrace{\begin{bmatrix} 0 & \hdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \hdots & \phi_2 \\ \end{bmatrix} }_{\bm{\Phi}_2} \underbrace{\begin{bmatrix} \bm{\tau}_{yt-2}\\ \bm{\tau}_{\pi t-2} \\ g_{t-2} \end{bmatrix}}_{\bm{f}_{t-2}} + \underbrace{\begin{bmatrix} \bm{\eta}_{yt} \\ \bm{\eta}_{\pi t} \\ \eta_{gt}\end{bmatrix}}_{\bm{\eta}_t}. \label{eq: stateeq} \end{equation} By defining $\bm{\Phi}=( \bm{\Phi}_1, \bm{\Phi}_2)$ and $\bm{F}_t = (\bm{f}'_{t-1}, \bm{f}'_{t-2})'$, \autoref{eq: stateeq} can be written more compactly as \begin{equation*} \bm{f}_t = \bm{\Phi} \bm{F}_t + \bm{\eta}_t, \quad \bm{\eta}_t \sim \mathcal{N}(\bm{0},\bm{\Sigma}_t). \end{equation*} Here, $\bm{\eta}_t$ denotes the stacked error terms that follows a multivariate Gaussian distribution with zero mean and time-varying variance covariance matrix $\bm{\Sigma}_t$ that is specified below. For the unrestricted AR(2) parameters $\phi_1$ and $\phi_2$ we follow \citet{planas2008bayesian} and reparameterize the state equation coefficients of $g_t$ using polar coordinates imposing complex roots, \begin{equation*} g_t = 2Q\cos (2 \pi / \gamma) g_{t-1}-Q^2 g_{t-2}+\eta_{gt}. \end{equation*} Hereby, $Q$ determines the amplitude and $\gamma$ the frequency of the cycle. The parameterization has the convenient property that available information on the duration and intensity of business cycles can be introduced with relative ease. Incorporating such information using normally distributed priors is complicated, since autoregressive coefficients are more difficult to interpret in terms of the intensity and frequency of the time series. Moreover, allegedly weakly informative Gaussian priors could introduce information on functions of the parameters, potentially placing too much prior weight on dynamics that do not fit observed behavior of output at business cycle frequencies \citep[for a more detailed discussion, see][]{planas2008bayesian}. Turning to the state equation errors, we assume the elements of $\bm{\eta}_t$ in \autoref{eq: stateeq} to be blockwise orthogonal and achieve this by employing a flexible factor stochastic volatility structure \citep[see, e.g.,][]{aguilar2000bayesian}, \begin{align} \bm{\eta}_{yt} &= \bm{\Lambda}_y \bm{z}_{yt} + \bm{\varepsilon}_{y t}, \quad \bm{z}_{yt} \sim \mathcal{N}(\bm{0},\bm{\Upsilon}_{yt}), \quad \bm{\varepsilon}_{y t} \sim \mathcal{N}(\bm{0},\bm{\Omega}_{yt}),\label{eq:etayt}\\ \bm{\eta}_{\pi t} &= \bm{\Lambda}_\pi \bm{z}_{\pi t} + \bm{\varepsilon}_{\pi t}, \quad \bm{z}_{\pi t} \sim \mathcal{N}(\bm{0},\bm{\Upsilon}_{\pi t}), \quad \bm{\varepsilon}_{\pi t} \sim \mathcal{N}(\bm{0},\bm{\Omega}_{\pi t}),\label{eq:etapit}\\ \eta_{gt} &\sim \mathcal{N}(0,\text{e}^{\omega_{gt}}). \end{align} Here, $\bm{z}_{kt}$ denotes a $q$-dimensional vector of normally distributed latent factors (for $k \in \{y, \pi \}$) with diagonal $q\times q$-dimensional variance-covariance matrix $\bm{\Upsilon}_{kt} = \text{diag}(\text{e}^{\upsilon_{k1t}},\hdots,\text{e}^{\upsilon_{kqt}})$, and $\bm{\Lambda}_k$ is an $N\times q$ matrix of factor loadings. The idiosyncratic error term $\bm{\varepsilon}_{k t}$ is also Gaussian, with zero mean and diagonal $N\times N$ variance-covariance matrix $\bm{\Omega}_{k t} = \text{diag}(\text{e}^{\omega_{k1t}},\hdots,\text{e}^{\omega_{kNt}})$. It is noteworthy that any common movements in the innovations determining potential output and trend inflation is purely driven by the latent factors. The presence of $\bm \varepsilon_{kt}$ implies that our model is flexible to allow for country-specific deviations. The factor model on the shocks to the states is a parsimonious way of modeling a time-varying variance-covariance matrix since $q \ll N$. To see this, consider \begin{align} \bm{\Upsilon}_t = \begin{bmatrix} \bm{\Upsilon}_{y t} & \bm{0} & \bm{0}\\ \bm{0} & \bm{\Upsilon}_{\pi t} & \bm{0}\\ \bm{0} & \bm{0} & 0 \end{bmatrix}, \quad \bm{\Omega}_t = \begin{bmatrix} \bm{\Omega}_{y t} & \bm{0} & \bm{0}\\ \bm{0} & \bm{\Omega}_{\pi t} & \bm{0}\\ \bm{0} & \bm{0} & \text{e}^{\omega_{gt}} \end{bmatrix}, \quad \bm{\Lambda} = \begin{bmatrix} \bm{\Lambda}_{y} & \bm{0} & \bm{0}\\ \bm{0} & \bm{\Lambda}_{\pi} & \bm{0}\\ \bm{0} & \bm{0} & 0 \end{bmatrix}.\label{eq:decomposition} \end{align} Using \autoref{eq:decomposition}, the $M \times M$ time-varying variance covariance matrix (with $M=2N+1$) of $\bm{\eta}_t$ in \autoref{eq: stateeq} is given by \begin{equation*} \bm{\Sigma}_t = \bm{\Lambda} \bm{\Upsilon}_t \bm{\Lambda}' + \bm{\Omega}_t. \end{equation*} Consequently, $\bm{\Sigma}_t$ is block-diagonal, allowing for non-zero covariances of the trend components for output and inflation across countries, respectively, while we impose orthogonality on the trend and cycle components $\bm{\tau}_{yt}$, $\bm{\tau}_{\pi t}$ and $g_t$ across variable types \citep[similar to the assumption introduced by][in the context of single-country output gap estimation]{stock1999forecasting,stock2007has}. For convenience, we define $\bm{z}_t = (\bm{z}_{yt}',\bm{z}_{\pi t}',0)$. The law of motion imposed on the variances in \autoref{eq: measurement-err} and \autoref{eq: stateeq} remains to be specified. Here we assume that the logarithmic volatilities in $\bm{\Upsilon}_t$, $\bm{\Omega}_t$, and $h_{kit}$ follow independent AR(1) processes. Specifically, the log-volatility in the measurement equations is given by \begin{equation} h_{kit} = \mu_{hki}+\varrho_{hki} (h_{kit-1}-\mu_{hki})+\nu_{kit}, \quad \nu_{kit}\sim \mathcal{N}(0,\vartheta_{hki}).\label{eq: state_hk} \end{equation} Using $l=1,\hdots,2q$ and $j=1,\hdots,M$ to indicate the corresponding diagonal element in $\bm{\Upsilon}_t$ and $\bm{\Omega}_t$, the log of the variances in the state equation evolve according to: \begin{align} \upsilon_{lt} &= \mu_{\upsilon l} + \varrho_{\upsilon l} (\upsilon_{lt-1}-\mu_{\upsilon l})+\nu_{lt}, &&\nu_{lt} \sim \mathcal{N}(0,\vartheta_{\upsilon l}),\\ \omega_{jt} &= \mu_{\omega j}+\varrho_{\omega j} (\omega_{jt-1}-\mu_{\omega j})+\nu_{jt}, &&\nu_{jt} \sim \mathcal{N}(0,\vartheta_{\omega j}).\label{eq: state_omega} \end{align} To simplify notation in the following, we let $\bullet$ denote a placeholder for the various possible combinations of indices. The autoregressive parameters are given by $\varrho_\bullet$, while the means of the log-volatility processes are denoted by $\mu_\bullet$. Finally, the state innovation variances are given by $\vartheta_\bullet$. It is worth noting that if a given $\vartheta_\bullet$ equals zero, the corresponding variance in the measurement or state equation is constant. Selecting whether equations exhibit time variation in the error variances can thus be carried out efficiently using the techniques stipulated in \cite{fruhwirth2010stochastic}. \subsection{Bayesian inference} \label{sec:Bayesinf} The model outlined above is quite flexible but also heavily parameterized. This calls for regularization via Bayesian shrinkage priors. We start by outlining a general strategy to shrink our proposed factor model towards a simpler specification when it comes to deciding which components should feature conditional heteroscedasticity. The prior setup on the remaining free coefficients of the model completes this subsection. In the following we describe how to flexibly select which equations should feature time variation in the variances by shrinking innovation variances in the stochastic volatility specifications to zero. Shrinkage to homoscedasticity in the observation equation is achieved in a similar manner. We start by substituting \autoref{eq:etayt} and \autoref{eq:etapit} in \autoref{eq: stateeq} and then proceed by squaring and taking logs of the $r$th equation ($r = 1,\hdots, M$) to obtain the non-centered parameterization of the state space model \citep{fruhwirth2010stochastic, kastner2014ancillarity}, \begin{align} \tilde{\varepsilon}_{rt}& = \mu_{\omega r} + \sqrt{\vartheta_{\omega r}} \tilde{\omega}_{rt} + v_{rt},\quad v_{rt} \sim \ln \chi(1)\\\label{eq: non-centeredSV} \tilde{\omega}_{rt} &= {\varrho}_{\omega r} \tilde{\omega}_{rt-1} + w_{rt},\quad w_{rt} \sim \mathcal{N}(0,1),\\ \tilde{\omega}_{rt} &= \frac{\omega_{rt}-\mu_{\omega r}}{\sqrt{\vartheta_{\omega r}}}, \end{align} with $\tilde{\varepsilon}_{rt}=\ln(\bm{f}_{rt}-\bm{\Phi}_{r \bullet} \bm{F}_t - [\bm{\Lambda}\bm{z}_{t}]_{r\bullet})^2$, $\bm{\Phi}_{r \bullet}$ selecting the $r$th row of the matrix $\bm{\Phi}$, and $[\bm{\Lambda}\bm{z}_{t}]_{r\bullet}$ indicating the $r$th row of $\bm{\Lambda}\bm{z}_{t}$. \Cref{eq: non-centeredSV} implies that the process variance $\vartheta_{\omega r}$ as well as the unconditional mean $\mu_{\omega r}$ is moved from the stochastic volatility state equation into \autoref{eq: stateeq}. Conditional on the full history of the normalized log-volatilities and employing a mixture approximation to render \autoref{eq: non-centeredSV} conditionally Gaussian \citep{kim1998stochastic}, the process variances and parameters can be obtained by estimating an otherwise standard Bayesian linear regression model. This implies that standard shrinkage priors can be specified on $\sqrt{\theta_{\omega r}}$. We adopt a flexible global-local shrinkage prior proposed in \cite{griffin2010inference} that was recently adopted for state space models in \cite{bitto2016achieving}. Here, \begin{align*} \vartheta_{\omega r} \sim \mathcal{G}\left(\frac{1}{2}, \frac{1}{2 B_{\omega r}}\right) \quad \Leftrightarrow \quad \sqrt{\vartheta_{\omega r}} \sim \mathcal{N}(0, B_{\omega r}), \end{align*} with a local shrinkage hyperparameter \begin{equation*} B_{\omega r} \sim \mathcal{G}(\kappa_\omega, \kappa_\omega \xi_\omega /2), \quad \xi_\omega \sim \mathcal{G}(c_0, c_1). \end{equation*} $\xi_\omega$ is the global shrinkage parameter that pushes $\sqrt{\bm{\vartheta}_{\omega}} = (\sqrt{\vartheta_{\omega1}}, \hdots, \sqrt{\vartheta_{\omega M}})'$ towards the prior mean. The hyperparameters $\kappa_\omega$ and $c_0, c_1$ are specified by the researcher. Intuitively, the global shrinkage parameter exerts shrinkage towards the zero vector, while $B_{\omega r}$ serves to pull elements of $\sqrt{\bm{\vartheta}_\omega}$ away from zero when $\xi_\omega$ is large (i.e. heavy global shrinkage is introduced) if supported by likelihood information. We choose an analogous setup for the innovations driving the variances of the latent factors in $\bm{z}_t$, \begin{equation*} \sqrt{\vartheta_{\upsilon l}} \sim \mathcal{N}(0, B_{\upsilon l}), \quad B_{\upsilon l} \sim \mathcal{G}(\kappa_\upsilon, \kappa_\upsilon \xi_\upsilon/2), \quad \xi_\upsilon \sim \mathcal{G}(d_0, d_1). \end{equation*} The same prior choice is also employed for the process innovation variances in the log volatility equations for the measurement errors, \begin{equation*} \sqrt{\vartheta_{hki}} \sim \mathcal{N}(0, B_{hki}), \quad B_{hki} \sim \mathcal{G}(\kappa_h, \kappa_h \xi_h/2), \quad \xi_h \sim \mathcal{G}(e_0, e_1). \end{equation*} Notice that the common parameter $\xi_h$ pools information on error variances in the log-volatilities across all output and inflation equations, effectively introducing global shrinkage across variable types. \citet{bitto2016achieving} refer to this prior as a double Gamma prior. Consistent with the literature, we set $\kappa_\omega=\kappa_\upsilon=\kappa_h=0.1$ and $c_0=c_1=d_0=d_1=e_0=e_1=0.01$. This choice introduces heavy shrinkage on all process variances while maintaining heavy tails in the underlying marginal prior, and completes the specifcation to stochastically select the innovation variances that potentially result in heteroscedastic errors in both the observation and state equations. Priors on the factor loadings in \autoref{eq: obs_output}, \autoref{eq: obs_pi} and \autoref{eq:decomposition}, the free autoregressive coefficient in \autoref{eq: stateeq}, and the stochastic volatility parameters remain to be specified. Following \cite{planas2008bayesian}, we specify a Beta distributed prior on the amplitude $Q$ of the business cycle, \begin{equation} Q \sim \mathcal{B}(a_Q, b_Q),\label{priorQ} \end{equation} with $a_Q = 5.82$ and $b_Q = 2.45$ denoting hyperparameters chosen specifically for euro area business cycles. For the frequency $\gamma$ we also adopt a Beta prior with \begin{equation} \frac{\gamma-\gamma_L}{\gamma_H-\gamma_L} \sim \mathcal{B}(a_\gamma, b_\gamma).\label{priortau} \end{equation} This prior restricts the support of $\gamma$ by specifying a minimum wave length $\gamma_L$, which is set equal to two, and a maximum length $\gamma_H$ set equal to $T$. The parameters $a_\gamma = 2.96$ and $b_\gamma = 10.7$ are fixed hyperparameters again set specifically according to prior research on business cycles in the euro area. These choices are weakly informative and imply a periodicity of around eight years and a contraction factor of $0.8$ \citep{gerlach1999output,planas2008bayesian,jarocinski2018inflation}. For the remaining parameters of Eqs. (\ref{eq: state_hk}) to (\ref{eq: state_omega}) we follow \cite{kastner2014ancillarity} and use a weakly informative Gaussian prior on the unconditional means, $\mu_{\bullet} \sim \mathcal{N}(0, 10^2)$ as well as a Beta prior on the persistence parameter $\varrho_{\bullet} \sim \mathcal{B}(25, 5)$. On the factor loadings $\alpha_{ki}$ and $\beta_{ki}$ that reflect the sensitivity of country-specific output and inflation measures to the cycle components, we use a sequence of independent Gaussian priors with $\alpha_{ki} \sim \mathcal{N}(0,1)$ and $\beta_{ki} \sim \mathcal{N}(0,1)$. For the factor loadings in $\bm{\Lambda}_k$ governing the covariance structure for the trend components across countries, with $\lambda_{k\bullet}$ indicating the elements, we use tight independent Gaussian priors $\lambda_{k\bullet} \sim \mathcal{N}(0,0.1)$. Finally, we specify the priors on the initial state $\bm{f}_0$ and the log-volatilities to be fairly uninformative with each element being normally distributed with zero mean and variance $10^2$. Notice that some parts of the parameter space of the model specified above are not econometrically identified. In the measurement equation, to identify the scale and sign of the output gap, we normalize the loading for the first country using the restriction $\alpha_1 = 1$. Moreover, we restrict the factor loadings matrices $\bm{\Lambda}_k$ following \citet{aguilar2000bayesian} by setting the respective upper $q\times q$ blocks equal to lower triangular matrices with ones on the main diagonals. These priors are then combined with the likelihood to obtain the posterior distribution. Since the joint posterior is intractable, we employ a Markov chain Monte Carlo (MCMC) algorithm detailed in \cref{sec:MCMC algorithm}. This algorithm samples all coefficients and latent quantities from their full conditional posterior distributions to obtain, after a potentially large number of iterations, valid draws from the joint posterior density. The algorithm is repeated $50,000$ times with the first $25,000$ draws discarded as burn-in. Convergence and mixing of most model parameters appear to be satisfactory. However, we find a substantial degree of autocorrelation for the factor loadings in selected countries. To assess the sensitivity of our findings, we thus re-estimated the model a moderate number of times based on different initial values. The corresponding findings appear to be remarkably robust. \section{In-sample features of the model}\label{sec: empirics} \subsection{Data overview}\label{sec: data_overview} For the empirical application, we use quarterly data for economic output, measured in terms of real gross domestic product (RGDP, seasonally adjusted), and the harmonized index of consumer prices (HICP, in year-on-year growth rates), respectively. To obtain a measure of the output gap in percent, we transform the output variable by applying the transformation $400\log(RGDP)$. We choose $q=1$ latent factors for both the potential output for all countries and trend inflation measures to capture the covariances between the country-specific quantities. In terms of time and country coverage, our sample runs from 1997:Q2 to 2018:Q4. Thus, it includes the period surrounding the introduction of the euro, the global financial crisis (GFC) in 2008/2009, and the more recent crisis of the euro area peripheral countries. To achieve consistent data coverage, we include Austria (AT), Belgium (BE), Finland (FI), France (FR), Germany (DE), Greece (GR), Italy (IT), Netherlands (NL), Portugal (PT) and Spain (ES), resulting in $N = 10$. \subsection{Euro area output gap estimates}\label{sec: output_gap} In this subsection we present some key in-sample results of our proposed model. We start by comparing the estimated output gap with other competing measures, which are depicted in \autoref{fig:competitors}. The black line in \autoref{fig:competitors} shows the posterior median of the euro are output gap using the model specification sketched above (DFM-SV). To assess whether using cross-sectional information on prices and output leads to significantly different conclusions, we include a model similar to the one proposed but exclusively relying on aggregate data for the EA (labeled UCP-SV). This model is closely related to the multivariate unobserved components model proposed in \cite{stella2013state}. Furthermore, to inspect whether our state evolution specification yields different dynamics in the gap component, we also include two model specifications that replace $g_t$ with a plug-in estimate $\hat{g}_t$. As estimators for $g_t$, we use the approach proposed in \cite{hamilton2017you} (labeled Hamilton) and the well-known Hodrick-Prescott filter (HP, \citealt{hodrick1997postwar}) as a means to dissecting economic output series into a trend and a cyclical component. These gap terms are computed based on aggregated data and then included in the model described in \cref{sec: econometrics}. \begin{figure} \begin{center} \includegraphics[width=0.8\textwidth]{competitors.pdf} \end{center} \caption{Competing approaches to measuring the euro area output gap.}\vspace*{0.25em} \footnotesize\textit{Notes}: Dynamic factor model with stochastic volatility (DFM-SV) is the approach set forth in this paper exploiting cross-sectional information; unobserved components model with stochastic volatility (UCP-SV) refers to a standard specification based on aggregate euro area data. Hamilton denotes the approach set forth in \citet{hamilton2017you}, while the remaining specification is the Hodrick-Prescott filter \citep[HP,][]{hodrick1997postwar}. Lines indicate the respective estimated posterior median. \label{fig:competitors} \end{figure} \Cref{fig:competitors} indicates that the output gap obtained from our multi-country framework closely tracks the output gap measure obtained by estimating a bivariate unobserved components model based on aggregate data, especially in the beginning of the sample. During the GFC, we observe a slight decoupling in terms of gap estimates between DFM-SV and the UCP-SV. Comparing both output gap measures with estimates arising from a model based on the approach proposed in \cite{hamilton2017you} and a standard HP filter yields several interesting insights. First, the Hamilton gap indicates that in the end of the 1990s, output in the EA has been consistently below potential output until the early 2000s. This pronounced negative gap is not visible for any of the remaining three approaches. Second, the Hamilton and the HP measure indicate a strong positive deviation of output from trend output in the run-up to the GFC with a slightly delayed but sharp drop in the final quarter of 2008. By contrast, our proposed measure already drops in the first half of 2008 while a turning point in the business cycle is visible from mid 2009 onwards. At a first glance, it seems that this earlier drop in the output gap and the more timely rebound in real activity can be traced back to the fact that cross-sectional information is efficiently exploited. However, it is noteworthy that the measure based on the UCP-SV model also tends to react faster compared to Hamilton and HP. Since this model, as opposed to DFM-SV, is not exploiting cross-sectional information explicitly, we conjecture that the more timely reaction might come from modeling real activity and prices jointly. Third, and finally, notice that both measures based on unobserved components models exhibit a significantly smaller volatility and appear to be smoother. This effect is mainly due to our prior setup that softly introduces smoothness as well as additional information on the length and intensity of the cycle. We close this subsection by reporting prior and posterior summary statistics of the amplitude $Q$ and frequency $\gamma$, depicted in Table \ref{tab:ar2par}. The table shows means and standard deviations associated with the prior and posterior of $Q$ and $\gamma$, respectively. This comparison allows us to assess how much information on the shape of the output gap is contained in the likelihood and, in addition, enables a comparison to the results reported in \cite{planas2008bayesian}. Considering the posterior mean and standard deviation of $\gamma$ suggests that the average length of the cycle is about 6.5 years. For data spanning from the 1980s to the early 2000s, \cite{planas2008bayesian} report significantly longer cycles. Since our sample period covers the GFC as well as the EA periphery crisis, this finding is not surprising since both shocks lead to abrupt downward movements in the business cycle. Comparing the prior and posterior dispersion indicates that the information contained in the prior is not reducing estimation uncertainty significantly. Next, we discuss the intensity of business cycle movements by considering the amplitude $Q$. Compared to previous studies, our estimate appears to be slightly lower. Since \cite{planas2008bayesian} rely on aggregate data, the lower value of $Q$ can be explained by the fact that our aggregate gap measure strikes a balance between capturing the higher business cycle variance of EA peripheral countries such as Greece and Spain while capturing information on more stable business cycles found in, e.g., Germany and Austria. Note that the prior and posterior mean are close to each other but the prior and posterior standard deviations differ strongly. This highlights that the introduction of prior information helps in reducing posterior uncertainty. \begin{table*} \caption{Prior and posterior moments of the AR(2)-process parameters.}\label{tab:ar2par}\vspace*{-1.8em} \begin{center} \begin{threeparttable} \small \begin{tabular*}{0.5\textwidth}{c @{\extracolsep{\fill}} lrrrr} \toprule & \multicolumn{2}{c}{Prior} & \multicolumn{2}{c}{Posterior}\\ \cmidrule(l{0pt}r{3pt}){2-3}\cmidrule(l{3pt}r{0pt}){4-5} & Mean & SD & Mean & SD \\ \midrule Frequency $\gamma$ & 20.40 & 9.15 & 26.07 & 9.63 \\ Amplitude $Q$ & 0.70 & 0.15 & 0.68 & 0.07 \\ \bottomrule \end{tabular*} \begin{tablenotes}[para,flushleft] \scriptsize{\textit{Notes}: SD -- Standard deviation. Summary statistics refer to the prior moments in Eqs. (\ref{priorQ}) to (\ref{priortau}). Posterior indicates the measures obtained from the posterior draws.} \end{tablenotes} \end{threeparttable} \end{center} \end{table*} \subsection{The role of stochastic volatility in modeling the output gap}\label{sec: SVrole} In the next step, we ask whether the volatility of the shocks driving the area-wide output gap is time-varying. To this end, the left panel in \autoref{fig:gapsv} displays the posterior median of the stochastic volatility component of the euro area output gap of our proposed multi-country model DFM-SV along with the lower 16th and upper 84th percentile of the credible interval (grey shaded area). Considering the posterior quantiles in \autoref{fig:gapsv} provides some limited evidence in favor of heteroscedasticity. We observe slight increases during the burst of the dot-com bubble as well as during the period of the GFC. One way of assessing the likelihood that heteroscedasticity in the business cycle shocks is present is to consider the posterior distribution of the square root of $\vartheta_{\omega M}$ up to a random sign switch. In case of homoscedasticity, the corresponding marginal posterior would be unimodal and centered on zero. Consideration of the right panel of \autoref{fig:gapsv} corroborates the discussion above, namely that evidence for heteroscedasticity is, at best, limited. While the marginal posterior is clearly not unimodal, most posterior mass is located around zero. \begin{figure} \begin{subfigure}{.62\textwidth} \begin{center} \includegraphics[width=\textwidth]{sv_sig.pdf} \end{center} \end{subfigure} \begin{subfigure}{.37\textwidth} \begin{center} \includegraphics[width=\textwidth]{sv_var.pdf} \end{center} \end{subfigure} \caption{Stochastic volatility of the euro area output gap.}\vspace*{0.25em} \footnotesize \textit{Notes}: The left panel depicts the posterior variance of the output gap component over time. The solid line indicates the estimated posterior median, with grey shaded areas covering the area between the $16$th and $84$th percentile. The right panel shows a kernel density estimate of the posterior distribution of the signed square root of the innovation variance to the stochastic volatility process of the output gap. The dotted line marks zero. \label{fig:gapsv} \end{figure} To assess how the presence of stochastic volatility in the unobserved components impacts the estimate of the output gap, \Cref{fig:svvsnosv} shows the posterior median of the output gap under our baseline specification (in solid black) alongside the 16th and 84th percentiles (dark shaded area) for the DFM and the UCP model. The dashed black line represents the posterior median of the output gap obtained by estimating the model without stochastic volatility for all latent components, with the light gray area denoting the 16th and 84th percentiles. One key finding of this figure is that for the DFM, switching off SV yields a similar measure of the output gap that is quite close to the one obtained under the DFM with SV. The main differences concern the magnitude and variability of the gap measure. Put differently, comparing the posterior median across the two specifications points towards more pronounced movements in $g_t$ obtained from the model without stochastic volatility. This finding is closely related to the critique raised by \cite{sims2001comment} and \cite{stock2001evolving} in response to the work of \cite{cogley2001evolving}, who estimate a time-varying parameter model without stochastic volatility. Ignoring stochastic volatility, within the framework of a time-varying parameter model, is expected to exaggerate movements in the regression coefficients and potentially creating transient variations in filtered estimates. \begin{figure} \includegraphics[width=\textwidth]{sv-nosv.pdf} \caption{Dynamic factor and unobserved component models with and without stochastic volatility.}\vspace*{0.25em} \footnotesize \textit{Notes}: Dynamic factor model (DFM) is the approach set forth in this paper exploiting information across euro area countries. Unobserved components model (UCP) refers to a standard specification based on aggregate euro area data. Solid and dashed lines indicate the estimated posterior median, with grey shaded areas covering the area between the $16$th and $84$th percentile. \label{fig:svvsnosv} \end{figure} \subsection{Dissecting euro area business cycle movements}\label{sec: dissecting} In the following, we provide information on the quantitative contributions of shocks to trend, cyclical and idiosyncratic components to the observed series of inflation over time. Here we use an approach similar to a standard historical time series decomposition. Notice that the non-stationary nature of the trend components in \autoref{eq: stateeq} implies that shocks to these quantities are persistent and do not peter out. In fact, instead of becoming less important over time, the relative importance of shocks to the trend components increases by construction. As a consequence, we focus on the contributions of the shocks at each point in time. Combining Eqs. (\ref{eq: obs_pi}), (\ref{eq: stateeq}) and (\ref{eq:etapit}), we can decompose inflation across countries in terms of their shocks and lagged states: \begin{equation*} {\pi}_{it} =\tau_{\pi it-1}+ \beta_i \phi_1 g_{t-1} + \beta_i \phi_ 2 g_{t-2}+ [\bm{\Lambda}_\pi\bm{z}_{\pi t}]_{i\bullet} + [\bm{\varepsilon}_{\pi t}]_i + \beta_i \eta_{gt} + \epsilon_{\pi it}\label{eq:shockdecompDp}. \end{equation*} The decomposition yields three individual shocks of interest, with $[\bm{\Lambda}_\pi \bm{z}_{\pi t}]_{i\bullet}$ and $\beta_i \eta_{gt}$ reflecting joint area-wide dynamics, while $[\bm{\varepsilon}_{\pi t}]_i$ and $\epsilon_{\pi it}$ capture idiosyncratic shocks. In particular, $[\bm{\Lambda}_\pi \bm{z}_{\pi t}]_{i\bullet}$ arises from the factor stochastic volatility structure and indicates common euro area trend component shocks (subsequently labeled \textit{Euro area trend shocks}). The contribution of the gap component is given by $\beta_i \eta_{gt}$ (indicated as \textit{Gap shocks} in the following). The quantity $[\bm{\varepsilon}_{\pi t}]_i$ is a country-specific shock to the trend component, while $\epsilon_{\pi it}$ is the idiosyncratic measurement error (labeled \textit{Country shocks} and considered jointly in what follows). To ease visualization, \autoref{fig:shocksDp} shows the posterior median of period-specific shocks exclusively based on $\tilde{\pi}_{it} = \pi_{it} - \tau_{\pi it-1} - \beta_i \phi_1 g_{t-1} - \beta_i \phi_2 g_{t-2}$. \begin{figure}[ht!] \begin{center} \includegraphics[width=\textwidth]{shocks_Dp.pdf} \end{center} \vspace*{-1em}\caption{Decomposing shocks shaping inflation across countries.}\vspace*{0.25em} \footnotesize \textit{Notes}: Shocks refer to the posterior median of the estimated shocks of the fitted model. \textit{Country shocks} are shocks specific to all countries and thus include the idiosyncratic component of the factor stochastic volatility specification and the measurement errors. The remaining quantities arise from joint euro area dynamics; \textit{Euro area trend shocks} refer to shocks identified based on common euro area factors underlying country-specific potential output, while \textit{Gap shocks} for country $i$ arise solely from the gap component. The dotted line marks zero. \label{fig:shocksDp} \end{figure} Figure \ref{fig:shocksDp} reveals a set of interesting results for the shock decomposition of inflation across countries. First, the most striking observation is that \textit{Euro area trend shocks} do not play a role in driving observed inflation series. This finding results from an almost diagonal variance-covariance structure between country-specific trends of inflation, with most covariances rather close to zero. In terms of the modeling setup, this implies that one may safely impose orthogonality on the errors for the trend inflation state equations. Second, we find substantial evidence for the existence of a Phillips curve relationship across the EA countries given by \textit{Gap shocks}. Notice that the sensitivity of country-specific inflation series to area-wide output gap shocks is governed by the factor loadings $\beta_i$. Here, we find that the slope of the Phillips curve exhibits heterogeneity, with the Netherlands and Finland providing examples of less sensitive countries. By contrast, the area-wide output gap shocks appear to be particularly important for the dynamic evolution of inflation in Belgium, Spain and Greece. This result implies that almost all comovements in inflation across countries arises from the joint gap component rather than shocks to country-specific trend inflation. Finally, we assess the importance of country-level shocks. Recall that these shocks depict both shocks to idiosyncratic trends, but also the measurement errors. It is worth mentioning that measurement errors play only a minor role in shaping the observed inflation series over the cross-section, and the contributions labeled \textit{Country shocks} mainly feature shocks to the trend components. The highest importance of such country-level shocks is apparent for the cases of Greece, Italy and Portugal in the five year period after 2010, while inflation in the Netherlands appears to be shaped to a large extent by idiosyncratic shocks throughout the observed period. \subsection{Responses of output and inflation to business cycle shocks} \label{sec: shocks} This subsection aims at studying the dynamic effect of business cycle shocks to inflation across the euro area. Such a common shock is of interest for policy makers in order to assess the sensitivity of their respective countries to common adverse movements in an area-wide business cycle. In our framework, a business cycle shock is defined as an unexpected decrease in $\eta_{gt}$ by one standard deviation. This yields dynamic reactions of $g_{t+h}~(h=1,\dots,H)$ that are then transformed into dynamic reactions of $y_{it+h}$ and $\pi_{it+h}$ by using the factor loadings $\alpha_i$ and $\beta_i$. These impulse response functions (IRFs) thus provide not only information on the specific time profile of the output gap reactions but also on the sensitivity of a given country and variable to such changes. Figure \ref{fig:irf_gap} depicts the posterior distribution of the IRF of the common output gap to a (negative) one standard deviation business cycle shock. The black line in the figure represents the median responses over time along with lower 16th and upper 84th percentiles of the posterior distribution. The figure presents a negative and immediate impact on the common gap component, with a peak decline in the output gap of around 1.5 percentage points. This peak is reached after around three quarters and rapidly dies out afterwards. After around 2.5 years, the effect on the output gap is zero. \begin{figure}[t] \begin{center} \includegraphics[width=0.8\textwidth]{irf_gap.pdf} \end{center} \vspace*{-1em}\caption{Impulse response function of a negative one standard deviation shock to the output gap.}\vspace*{0.25em} \footnotesize \textit{Notes}: The solid black line depicts the median response alongside the $16$th and $84$th percentiles shaded in grey. The dotted line marks zero. \label{fig:irf_gap} \end{figure} It is worth noting that \autoref{fig:irf_gap} only measures the dynamic impact to the latent gap component. However, policy makers might be particularly interested in how changes in the common cycle impact inflation across countries. Since the dynamics of $\pi_{it}$ are proportional to movements in $g_t$, we report peak effects that are reached after around three quarters (see \autoref{fig:irf_gap}). \begin{figure}[t] \begin{center} \includegraphics[width=0.8\textwidth]{irfs_inflation.pdf} \end{center} \vspace*{-1em}\caption{Peak responses of a euro area business cycle shock for inflation across countries.}\vspace*{0.25em} \footnotesize \textit{Notes}: Boxplots refer to the posterior draws at the peak response. Boxes cover the area between the $16$th and $84$th percentile, with the solid black line depicting the posterior median. The dotted line marks zero. \label{fig:irf_countries} \end{figure} Inspection of the maximum responses of inflation in \autoref{fig:irf_countries} reveals that a common business cycle shock translates into a drop in inflation across all countries under scrutiny. This drop in inflation ranges from about $-0.8$ to approximately $-0.2$ percentage points. These findings are highly significant and provide strong evidence that a Phillips curve relationship exists in the EA. This corroborates recent evidence reported in \citet{onoranteECBWP}, who find a relationship between inflation and real activity based on aggregate EA data. However, notice that there exist considerable differences in peak inflation reactions across countries, which could explain findings in \cite{barigozzi2014euro} and \cite{peersman2004transmission}, who report asymmetric responses of macroeconomic quantities to common monetary policy shocks in the euro area, given that the link between demand-sided policies and inflation differ across EA member states. \section{Forecasting evidence} Up to this point we have focused on in-sample results to illustrate the key features of our proposed modeling approach. However, a successful model that could be useful for policy analysis should also be able to predict well. To investigate the predictive capabilities, this section builds on the literature on inflation forecasting \citep[see][among others]{stock1999forecasting,stock2007has,jarocinski2018inflation,koop2018forecasting} and uses our model to forecast aggregate inflation for the EA and across individual member states up to four quarters ahead. \subsection{Design of the forecasting exercise and competing models} To evaluate forecast performance for both the EA and individual countries, we split the sample into an initial estimation period that ranges from 1997:Q2 to 2008:Q3 ($47$ observations) and use the remaining $40$ observations as a hold-out period. The forecasting design adopted is recursive, implying that after obtaining a set of predictive densities, we increase the length of the initial observation period by one quarter until we reach the end of the hold-out period. Differences in predictive accuracy are gauged by relying on root mean squared errors (RMSEs) and log predictive scores \citep[LPSs, see][]{geweke2010comparing}. RMSEs are obtained by considering the differences between the posterior median of the predictive distribution and the realized values of $\pi_{it}$ for each model and across the hold-out period. Analogously, LPSs are computed by evaluating the realized values under the predictive density of a given model, summed over the hold-out. We benchmark the proposed DFM-SV model against a range of competing models that differ in several respects. First, we distinguish between models that exploit cross-sectional information (labeled \textit{Multi-country}) versus specifications that utilize only country-specific information (labeled \textit{Single-country}). In the case of aggregate euro area inflation forecasts, we use the abbreviation \textit{EA-level} to indicate that predictions are based on observations of output and inflation that are aggregated from country-level data prior to estimation to yield a measure of EA-level inflation and output. Here, aggregate refers to taking the arithmetic mean over the respective country-specific series. Second, we consider a range of alternative measures of the output gap to assess differences between treating the output gap as a latent quantity as opposed to using an observed measure. Third, we gauge the accuracy gains from stochastic volatility by also including homoscedastic variants of all competing models.\footnote{Here, homoscedasticity implies that we assume constant error variances in the state and observation equations.} The model set we consider is comprised of the following benchmarks: \begin{enumerate}[label=(\roman*),align=left] \item Unobserved components model (UCP): This specification refers to a modeling approach in the spirit of \citet{stella2013state}. For \textit{Single-country}, this implies that we introduce country-specific gap components and estimate individual country-specifications with orthogonal error terms. This yields a model setup per country that estimates three unobserved components. By comparing the out-of-sample predictive performance of the UCP specifications with forecasts produced by DFM, the inclusion of these specifications serves to assess the merits of considering multi-country information as a means to improving both country-specific and aggregate predictions. In the case of \textit{EA-level}, we aggregate country-level series a priori and estimate the model using three latent factors. \item Hamilton (\textit{Ham}): These specifications rely on a plugin-estimate $\hat{g}_t$ as the measure of the output gap in the framework proposed in this paper. For \textit{Ham}, we follow recent work by \cite{hamilton2017you} as a means to estimating the gaps. We calculate forecasts for \textit{Single-country} (extracting gaps for each country individually) and \textit{Multi-country} (aggregating a priori and using EA-level information). \item Hodrick-Prescott (HP): Similar to the strategy employed for for \textit{Ham}, these specifications use the well-known HP filter (\citealt{hodrick1997postwar}) to produce euro area output gap estimates. For the forecast comparison, again both multi-country and single-country specifications for HP are implemented. \item AR(1): A standard homoscedastic autoregressive process of order one used to forecast aggregate euro area inflation, and country-specific inflation series independently. \end{enumerate} In what follows, all models are benchmarked against the AR(1) model. Here, we consider relative RMSEs and differences in LPSs of all specifications versus the AR(1) model. RMSEs below 100 thus reflect that the respective model outperforms the benchmark in terms of point predictions, while LPSs exceeding zero indicate superior performance for density forecasts vis-\'{a}-vis the AR(1) specification. \subsection{Aggregate euro area inflation forecasts} In this subsection we assess whether our model yields competitive forecasts for aggregate data. Out-of-sample performance for aggregate euro area inflation is evaluated for the one-quarter up to the four-quarter ahead horizon. Table \ref{tab:inflation-ea} reports relative RMSEs and differences in LPSs, benchmarked to the AR(1) model. \begin{table*}[ht!] \caption{Forecast evaluation for euro area inflation.}\label{tab:inflation-ea}\vspace*{-1.8em} \begin{center} \begin{threeparttable} \scriptsize \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lrrrrrrrrrrrrrr} \toprule & \multicolumn{6}{c}{Multi-country} & \multicolumn{6}{c}{EA-level}\\ \cmidrule(l{0pt}r{3pt}){2-7}\cmidrule(l{3pt}r{0pt}){8-13} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV}\\ \cmidrule(l{0pt}r{3pt}){2-4}\cmidrule(l{3pt}r{3pt}){5-7}\cmidrule(l{3pt}r{3pt}){8-10}\cmidrule(l{3pt}r{0pt}){11-13} & DFM & Ham & HP & DFM & Ham & HP & UCP & Ham & HP & UCP & Ham & HP \\ \midrule \textbf{LPS} & & & & & & & & & & & & \\ \textit{1-Qt} & $42.9$ & $40.4$ & $38.6$ & $\bm{43.0}$ & $38.7$ & $40.5$ & $-41.1$ & $-38.1$ & $-33.9$ & $-26.1$ & $-29.8$ & $-32.5$ \\ \textit{2-Qt} & $74.0$ & $72.2$ & $70.0$ & $77.9$ & $76.1$ & $\bm{79.4}$ & $-60.5$ & $-57.2$ & $-53.3$ & $-41.2$ & $-60.7$ & $-69.7$ \\ \textit{3-Qt} & $77.9$ & $74.5$ & $71.8$ & $\bm{85.0}$ & $75.6$ & $81.8$ & $-62.0$ & $-66.8$ & $-60.5$ & $-37.3$ & $-61.2$ & $-97.1$ \\ \textit{4-Qt} & $72.0$ & $67.9$ & $67.0$ & $\bm{76.4}$ & $62.5$ & $73.7$ & $-60.3$ & $-67.8$ & $-59.6$ & $-38.7$ & $-58.9$ & $-89.6$ \\ \midrule \textbf{RMSE} & & & & & & & & & & & & \\ \textit{1-Qt} & $97.3$ & $102.6$ & $100.4$ & $\bm{97.0}$ & $120.5$ & $115.7$ & $100.4$ & $99.5$ & $101.0$ & $97.6$ & $115.2$ & $113.7$ \\ \textit{2-Qt} & $97.7$ & $102.7$ & $102.2$ & $\bm{96.2}$ & $104.9$ & $105.7$ & $100.3$ & $99.8$ & $101.8$ & $96.4$ & $105.8$ & $107.2$ \\ \textit{3-Qt} & $97.2$ & $102.1$ & $103.3$ & $95.0$ & $\bm{84.7}$ & $99.3$ & $100.1$ & $99.6$ & $101.9$ & $94.5$ & $100.9$ & $104.1$ \\ \textit{4-Qt} & $94.5$ & $102.1$ & $101.8$ & $\bm{92.5}$ & $170.6$ & $99.4$ & $100.7$ & $98.8$ & $101.7$ & $92.7$ & $96.9$ & $101.5$ \\ \bottomrule \end{tabular*} \begin{tablenotes}[para,flushleft] \scriptsize{\textit{Notes}: Multi-country indicates that cross-sectional information from individual countries is used. Single-country refers to independent individual models for all countries. SV indicates the specification allowing for heteroscedastic errors, while non-SV assumes homoscedasticity. DFM -- dynamic factor model; Ham -- Hamilton's approach \citep{hamilton2017you}; HP -- Hodrick Prescott filter. LPS -- log predictive score; RMSE -- root mean squared error. \textit{1-Qt} to \textit{4-Qt} refer to the forecast horizon by quarter between one-quarter to one-year. LPS and RMSE are presented relative to independent homoscedastic univariate AR(1) processes. For LPS, the maximum value is indicated in bold, for RMSEs (in percent), the minimum is in bold, indicating the best performing specification.} \end{tablenotes} \end{threeparttable} \end{center} \end{table*} Overall, our proposed multi-country framework DFM-SV appears to produce highly competitive out-of-sample predictions, outperforming most competing models. This finding holds true for both point and density predictive performance. Accuracy improvements in terms of LPS tend to be substantial, irrespective of whether $g_t$ is estimated alongside the remaining model parameters and states or whether we rely on other measures of the output gap. Considering relative RMSEs reveals that while our DFM-SV specification improves upon the benchmark model, these improvements appear to be muted and range from three percent (in the case of the one-step-ahead horizon) to 7.5 percent (for the four-quarter-ahead forecast). Only in two cases our proposed DFM-SV is slightly outperformed by multi-country versions where the latent gap component is replaced by estimates obtained using the Hamilton (for point forecasts) and the HP (for LPS) approach and with SV turned on. In both cases, however, DFM-SV displays the second best performance. Comparing the out-of-sample performance of models that utilize cross-sectional information to the ones that rely solely on aggregate EA data points towards accuracy gains of the multi-country models. Models that utilize only aggregate data generally appear to be inferior to the AR(1) model in terms of density forecasts while being slightly superior to the univariate benchmark in some cases. Specifically, the UCP model slightly improves upon the AR(1) in terms of RMSEs. These results confirm and corroborate findings in \cite{marcellino2003macroeconomic}, who report that the inclusion of country-specific information improves out-of-sample predictions even if interest centers on predicting aggregate quantities of interest. To sum up, Table \ref{tab:inflation-ea} suggests that, when interest centers on forecasting euro area inflation, our proposed model framework yields strong density and point forecasts. These accuracy improvements are especially pronounced when compared to models that rely exclusively on aggregate information, highlighting the necessity to take a cross-sectional stance when forecasting inflation. \subsection{Forecasts for individual countries} The previous subsection provided an overall gauge on how our model performs in predicting inflation. Next, we take a cross-sectional perspective and assess whether there exist interesting cross-country differences in forecast performance. For the sake of brevity, we focus on one-quarter-ahead forecasts in Table \ref{tab:lps-Dp-1step} and one-year-ahead predictions in Table \ref{tab:lps-Dp-4step}. These tables include marginal LPS obtained by integrating out the remaining elements of the joint predictive density. Starting with the one-step-ahead marginal LPS, Table \ref{tab:lps-Dp-1step} suggests that the homoscedastic variant of our proposed DFM outperforms all competing specification by large margins for most countries considered, both in terms of point and density forecasts. Only for the Netherlands, Austria and Finland, we observe that single-country models yield more precise density prediction whereas point forecasts for the Netherlands are most precise when single-country models are adopted. We conjecture that this stems from the fact that these countries tend to share a common business cycle and thus using all available cross-section information \textit{and} a single factor potentially translates into a misspecified model. \begin{table*}[ht!] \caption{Forecast evaluation for inflation at the one-quarter ahead forecast horizon.}\label{tab:lps-Dp-1step}\vspace*{-1.8em} \begin{center} \begin{threeparttable} \scriptsize \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lrrrrrrrrrrrrr} \toprule & \multicolumn{6}{c}{Multi-country} & \multicolumn{6}{c}{Single-country}\\ \cmidrule(l{0pt}r{3pt}){2-7}\cmidrule(l{3pt}r{0pt}){8-13} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV}\\ \cmidrule(l{0pt}r{3pt}){2-4}\cmidrule(l{3pt}r{3pt}){5-7}\cmidrule(l{3pt}r{3pt}){8-10}\cmidrule(l{3pt}r{0pt}){11-13} & DFM & Ham & HP & DFM & Ham & HP & UCP & Ham & HP & UCP & Ham & HP \\ \midrule \textbf{LPS} & & & & & & & & & & & & \\ \textit{DE} & $\bm{5.7}$ & $1.9$ & $-0.4$ & $1.1$ & $-0.4$ & $-0.4$ & $0.5$ & $4.9$ & $1.5$ & $2.2$ & $-4.7$ & $-2.2$ \\ \textit{FR} & $\bm{10.6}$ & $0.3$ & $0.4$ & $6.1$ & $3.5$ & $0.5$ & $1.8$ & $2.5$ & $2.1$ & $6.7$ & $3.3$ & $6.8$ \\ \textit{IT} & $\bm{3.4}$ & $-3.1$ & $-1.9$ & $0.9$ & $1.3$ & $-2.0$ & $-2.3$ & $-6.8$ & $-2.7$ & $-7.8$ & $-8.1$ & $-6.4$ \\ \textit{ES} & $\bm{2.6}$ & $-10.2$ & $-10.4$ & $0.3$ & $-4.2$ & $-7.6$ & $-8.6$ & $-1.4$ & $-2.6$ & $-6.0$ & $-7.2$ & $-9.7$ \\ \textit{NL} & $0.7$ & $-6.5$ & $-5.5$ & $-1.2$ & $0.1$ & $-0.8$ & $-4.3$ & $-0.3$ & $\bm{1.7}$ & $-4.7$ & $-12.3$ & $-12.6$ \\ \textit{BE} & $\bm{10.4}$ & $1.5$ & $2.5$ & $6.9$ & $4.0$ & $0.9$ & $-0.8$ & $-1.1$ & $-0.4$ & $4.7$ & $4.6$ & $4.5$ \\ \textit{AT} & $6.5$ & $-0.5$ & $-6.0$ & $3.2$ & $-2.5$ & $-5.0$ & $1.4$ & $-0.6$ & $1.6$ & $\bm{7.6}$ & $0.7$ & $0.9$ \\ \textit{FI} & $5.0$ & $3.2$ & $3.9$ & $4.6$ & $3.8$ & $3.7$ & $3.7$ & $4.6$ & $\bm{5.1}$ & $2.3$ & $-0.3$ & $0.6$ \\ \textit{PT} & $\bm{3.4}$ & $-4.0$ & $-3.8$ & $0.8$ & $-2.5$ & $-3.0$ & $2.2$ & $-0.5$ & $0.4$ & $0.5$ & $-5.8$ & $-2.9$ \\ \textit{GR} & $\bm{3.9}$ & $-7.0$ & $-7.5$ & $-2.8$ & $-8.8$ & $-8.7$ & $0.6$ & $-3.5$ & $-4.9$ & $-2.3$ & $-9.4$ & $-11.1$ \\ \midrule \textbf{RMSE} & & & & & & & & & & & & \\ \textit{DE} & $\bm{91.3}$ & $101.1$ & $104.9$ & $100.6$ & $113.9$ & $127.5$ & $104.3$ & $95.2$ & $98.7$ & $100.3$ & $115.2$ & $111.3$ \\ \textit{FR} & $\bm{81.7}$ & $102.5$ & $106.3$ & $95.9$ & $105.2$ & $131.1$ & $99.0$ & $97.2$ & $100.8$ & $99.3$ & $118.3$ & $113.3$ \\ \textit{IT} & $\bm{88.9}$ & $102.0$ & $113.1$ & $97.4$ & $101.2$ & $110.0$ & $97.2$ & $100.4$ & $100.8$ & $103.3$ & $107.9$ & $106.7$ \\ \textit{ES} & $\bm{86.8}$ & $107.0$ & $110.9$ & $95.5$ & $104.5$ & $122.3$ & $108.6$ & $100.0$ & $100.8$ & $107.7$ & $119.9$ & $125.8$ \\ \textit{NL} & $100.1$ & $105.4$ & $103.2$ & $100.0$ & $99.6$ & $112.0$ & $103.8$ & $101.9$ & $\bm{99.4}$ & $101.4$ & $115.1$ & $112.5$ \\ \textit{BE} & $\bm{78.0}$ & $100.0$ & $112.1$ & $90.6$ & $101.9$ & $131.2$ & $99.2$ & $100.5$ & $99.2$ & $98.0$ & $105.0$ & $105.7$ \\ \textit{AT} & $\bm{84.2}$ & $101.7$ & $103.4$ & $92.7$ & $102.2$ & $115.4$ & $97.2$ & $98.2$ & $101.4$ & $87.5$ & $108.8$ & $110.1$ \\ \textit{FI} & $\bm{94.3}$ & $99.5$ & $100.7$ & $100.3$ & $101.8$ & $111.9$ & $99.0$ & $96.6$ & $98.5$ & $100.0$ & $129.1$ & $108.9$ \\ \textit{PT} & $\bm{89.2}$ & $103.0$ & $100.9$ & $95.7$ & $104.0$ & $108.1$ & $98.8$ & $101.1$ & $102.0$ & $97.2$ & $130.7$ & $116.9$ \\ \textit{GR} & $\bm{86.0}$ & $102.5$ & $104.7$ & $95.8$ & $109.7$ & $123.8$ & $97.4$ & $104.7$ & $109.3$ & $98.4$ & $110.0$ & $111.4$ \\ \bottomrule \end{tabular*} \begin{tablenotes}[para,flushleft] \scriptsize{\textit{Notes}: Multi-country indicates that cross-sectional information from individual countries is used. Single-country refers to independent individual models for all countries. SV indicates the specification allowing for heteroscedastic errors, while non-SV assumes homoscedasticity. DFM -- dynamic factor model; Ham -- Hamilton's approach \citep{hamilton2017you}; HP -- Hodrick Prescott filter. LPS -- log predictive score; RMSE -- root mean squared error. LPS and RMSE are presented relative to independent homoscedastic univariate AR(1) processes. For LPS, the maximum value is indicated in bold, for RMSEs (in percent), the minimum is in bold, indicating the best performing specification.} \end{tablenotes} \end{threeparttable} \end{center} \end{table*} Considering accuracy gains from controlling for heteroscedasticy shows that for most countries, explicitly allowing for SV translates into weaker point and density forecasts relative to the homoscedastic counterparts. This result is in contrast to the findings based on using the full predictive distribution of inflation reported in Table \ref{tab:inflation-ea} and the literature on inflation forecasting \citep{stock2007has,stella2013state,jarocinski2018inflation}. The reasons for this slightly inferior performance of SV specifications in terms of marginal LPS are at least threefold. First, the hold-out period covers the beginning of the global financial crisis, implying that error variances are already tilted upwards. Second, our DFM-SV specification constitutes a parsimonious means of modeling a large dimensional time-varying variance-covariance matrix. Thus, if interest centers on capturing the potentially time-varying nature of covariances (which is relevant if the full predictive density is evaluated), predictive gains in terms of density forecasts tend to increase with the dimension of the model \citep{KASTNER201998}. Third, and contrasting accuracy differences between models that treat the gap component as observed as opposed to latent, we generally find that multi-country models profit from explicitly controlling for estimation uncertainty surrounding $g_t$. This premium in predictive accuracy stems from the fact that integrating out $g_t$ from the predictive density translates into a heavy-tailed marginal predictive distribution that is capable of handling outlying values well. This lowers the necessity to explicitly control for stochastic volatility, especially for data at quarterly frequency. \begin{table*}[ht!] \caption{Forecast evaluation for inflation at the one-year-ahead forecast horizon.}\label{tab:lps-Dp-4step}\vspace*{-1.8em} \begin{center} \begin{threeparttable} \scriptsize \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} lrrrrrrrrrrrrr} \toprule & \multicolumn{6}{c}{Multi-country} & \multicolumn{6}{c}{Single-country}\\ \cmidrule(l{0pt}r{3pt}){2-7}\cmidrule(l{3pt}r{0pt}){8-13} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV} & \multicolumn{3}{c}{non-SV} & \multicolumn{3}{c}{SV}\\ \cmidrule(l{0pt}r{3pt}){2-4}\cmidrule(l{3pt}r{3pt}){5-7}\cmidrule(l{3pt}r{3pt}){8-10}\cmidrule(l{3pt}r{0pt}){11-13} & DFM & Ham & HP & DFM & Ham & HP & UCP & Ham & HP & UCP & Ham & HP \\ \midrule \textbf{LPS} & & & & & & & & & & & & \\ \textit{DE} & $3.6$ & $-0.7$ & $-1.0$ & $1.7$ & $-1.4$ & $-2.0$ & $-2.6$ & $\bm{5.6}$ & $0.5$ & $0.3$ & $0.1$ & $-0.6$ \\ \textit{FR} & $\bm{3.5}$ & $-7.2$ & $-9.2$ & $0.2$ & $-4.6$ & $-9.4$ & $-4.6$ & $-4.5$ & $-0.9$ & $-3.1$ & $-2.5$ & $-3.3$ \\ \textit{IT} & $-6.1$ & $-7.7$ & $-9.9$ & $\bm{-1.9}$ & $-5.8$ & $-10.2$ & $-14.7$ & $-23.5$ & $-14.8$ & $-22.1$ & $-24.3$ & $-24.8$ \\ \textit{ES} & $\bm{1.2}$ & $-16.7$ & $-19.3$ & $0.8$ & $-9.5$ & $-16.0$ & $-33.7$ & $-2.7$ & $-4.0$ & $-11.8$ & $-12.6$ & $-20.7$ \\ \textit{NL} & $-1.4$ & $-7.6$ & $-9.4$ & $\bm{1.0}$ & $-1.1$ & $-0.7$ & $-7.4$ & $-1.8$ & $-0.7$ & $0.3$ & $-18.4$ & $-14.8$ \\ \textit{BE} & $\bm{9.1}$ & $-6.2$ & $-7.4$ & $4.4$ & $1.3$ & $-6.9$ & $-3.5$ & $-7.0$ & $-4.9$ & $2.2$ & $4.8$ & $-1.7$ \\ \textit{AT} & $1.7$ & $-8.5$ & $-10.5$ & $-0.7$ & $-8.9$ & $-6.6$ & $-5.0$ & $-5.1$ & $-3.5$ & $\bm{5.1}$ & $2.2$ & $-5.4$ \\ \textit{FI} & $-6.0$ & $-6.4$ & $-5.6$ & $-3.8$ & $-3.4$ & $-3.2$ & $1.0$ & $-0.8$ & $1.2$ & $-6.1$ & $\bm{5.9}$ & $-2.7$ \\ \textit{PT} & $\bm{1.9}$ & $-7.7$ & $-10.3$ & $-3.1$ & $-10.4$ & $-7.7$ & $-0.6$ & $-5.3$ & $-2.5$ & $-3.0$ & $-1.4$ & $-8.3$ \\ \textit{GR} & $\bm{9.3}$ & $-13.4$ & $-16.3$ & $-2.1$ & $-12.8$ & $-19.7$ & $-3.5$ & $-6.0$ & $-14.2$ & $-0.8$ & $-14.0$ & $-21.3$ \\ \midrule \textbf{RMSE} & & & & & & & & & & & & \\ \textit{DE} & $92.0$ & $102.0$ & $106.1$ & $96.4$ & $104.8$ & $102.8$ & $114.4$ & $\bm{89.4}$ & $99.1$ & $98.0$ & $95.5$ & $97.7$ \\ \textit{FR} & $\bm{85.9}$ & $107.2$ & $110.7$ & $94.3$ & $107.8$ & $111.6$ & $103.9$ & $100.1$ & $102.0$ & $99.5$ & $105.3$ & $102.4$ \\ \textit{IT} & $\bm{93.1}$ & $103.2$ & $113.2$ & $94.8$ & $101.8$ & $98.4$ & $95.2$ & $101.7$ & $101.0$ & $101.5$ & $98.5$ & $100.3$ \\ \textit{ES} & $\bm{88.1}$ & $110.5$ & $116.6$ & $94.8$ & $108.7$ & $110.5$ & $141.7$ & $97.7$ & $99.8$ & $96.7$ & $103.2$ & $103.6$ \\ \textit{NL} & $99.6$ & $107.3$ & $124.3$ & $96.1$ & $\bm{93.6}$ & $95.6$ & $116.8$ & $102.7$ & $99.8$ & $93.6$ & $98.7$ & $98.9$ \\ \textit{BE} & $\bm{72.5}$ & $104.8$ & $115.2$ & $81.4$ & $99.1$ & $105.9$ & $95.5$ & $96.7$ & $96.4$ & $95.0$ & $93.2$ & $95.0$ \\ \textit{AT} & $\bm{82.6}$ & $98.9$ & $101.2$ & $87.9$ & $101.0$ & $96.4$ & $97.7$ & $97.0$ & $104.1$ & $83.9$ & $91.5$ & $100.2$ \\ \textit{FI} & $97.5$ & $97.4$ & $102.9$ & $97.1$ & $98.6$ & $98.4$ & $95.8$ & $95.2$ & $93.8$ & $102.1$ & $\bm{81.2}$ & $95.5$ \\ \textit{PT} & $\bm{84.0}$ & $101.6$ & $102.4$ & $88.7$ & $106.3$ & $101.2$ & $101.0$ & $105.5$ & $103.9$ & $95.7$ & $103.1$ & $103.7$ \\ \textit{GR} & $\bm{78.5}$ & $107.3$ & $109.0$ & $91.0$ & $109.8$ & $116.0$ & $103.5$ & $108.6$ & $123.4$ & $99.0$ & $110.5$ & $120.0$ \\ \bottomrule \end{tabular*} \begin{tablenotes}[para,flushleft] \scriptsize{\textit{Notes}: Multi-country indicates that cross-sectional information from individual countries is used. Single-country refers to independent individual models for all countries. SV indicates the specification allowing for heteroscedastic errors, while non-SV assumes homoscedasticity. DFM -- dynamic factor model; Ham -- Hamilton's approach \citep{hamilton2017you}; HP -- Hodrick Prescott filter. LPS -- log predictive score; RMSE -- root mean squared error. LPS and RMSE are presented relative to independent homoscedastic univariate AR(1) processes. For LPS, the maximum value is indicated in bold, for RMSEs (in percent), the minimum is in bold, indicating the best performing specification.} \end{tablenotes} \end{threeparttable} \end{center} \end{table*} Turning attention to the one-year-ahead forecast horizon, Table \ref{tab:lps-Dp-4step} shows similar results to those reported for the one-quarter-ahead horizon. For this longer forecast horizon, the homoscedastic DFM setup appears to be particularly successful in terms of producing accurate point predictions, which is not surprising given the fact that for higher-order forecasts, the log-volatilities approach their stationary distribution. The predictive performance in terms of point forecasts of the DFM model is comparable to its heteroscedastic counterpart. Unlike the remaining alternative models, both DFM and DFM-SV also manage to notably outperform the AR(1) benchmark for the one-year-ahead horizon. In terms of density forecasts, however, the predictive dominance of DFM appears less distinctive. An overall comparison between multi-country and single-country models for the one-year-ahead horizon again reveals no clear pattern. However, this is particularly due to the strong performance of our proposed multi-country frameworks DFM and DFM-SV. Without these two specifications, Table \ref{tab:lps-Dp-4step} shows that single-country models appear to be preferable compared to the multi-country setups. However, for one-year-ahead predictions, the table again highlights the importance for including cross-sectional information to produce accurate point forecasts for inflation in Portugal and Greece. \section{Concluding remarks} In this paper, we develop a multivariate Bayesian dynamic factor model with stochastic volatility for analyzing euro area business cycles. The multi-country framework decomposes country-specific output and inflation series into idiosyncratic non-stationary trends and a joint stationary cyclical component. This enables us to exploit cross-sectional information and obtain an EA-wide measure of the output gap used for structural analysis and inflation forecasting. A key model feature is to allow for heteroscedastic error terms and comovements in the trends using a flexible factor stochastic volatility structure. The setup is completed by considering time variation also in the variances of the measurement equations. The proposed Bayesian model alleviates concerns of overparameterization via global-local shrinkage priors that push the model towards a homoscedastic specification, but allows for time-varying variances if necessary. In an empirical section, we study both in-sample features and out-of-sample predictive performance of the proposed model. We compare the obtained measure of the output gap to a set of competing approaches for estimation and discuss the role of time variation in error variances. The analysis is complemented by an empirical assessment regarding the slope of the Philips curve across EA member states. In a forecasting exercise, the paper provides evidence that accounting for a common euro area output gap component produces competitive forecasts for inflation both on the aggregate EA, but also the country level. \small{\fontfamily{ptm}\selectfont\setstretch{0.85} \addcontentsline{toc}{section}{References} \bibliographystyle{custom}
\section{Introduction} The motivation of this paper is the Lorentzian property of Schubert polynomials recently studied by Huh, Matherne, M\'esz\'aros and St.\,Dizier \cite{Huh}. For the beautiful theory developed around Lorentzian polynomials as well as its powerful applications, see the work of Br\"and\'en and Huh \cite{Bra}. Given a polynomial $f=f(x_1,\ldots, x_n)$, the normalization of $f$, denoted $\N(f)$, is the polynomial obtained from $f$ by acting a linear operator $\N$ defined by \[\N(x^\mu)=\frac{x^\mu}{\mu_1!\cdots \mu_n!},\ \ \ \ \ \text{for a monomial $x^\mu=x_1^{\mu_1}\cdots x_n^{\mu_n}$}.\] Let $S_n$ denote the symmetric group of permutations of $[n]=\{1,2,\ldots,n\}$. For $w\in S_n$, let $\S_w(x)=\S_w(x_1,\ldots,x_n)$ denote the Schubert polynomial indexed by $w$. Schubert polynomials, introduced by Lascoux and Sch\"utzenberger \cite{Las}, represent the cohomology classes of Schubert cycles in flag varieties. Using the Lorentzian property of volume polynomials of irreducible complex projective varieties, Huh, Matherne, M\'esz\'aros and St.\,Dizier \cite[Theorem 6]{Huh} showed that the normalization of \[x_1^{n-1}\cdots x_n^{n-1} \S_w(x^{-1})=x_1^{n-1}\cdots x_n^{n-1} \S_w(x_1^{-1},\ldots,x_n^{-1})\] is Lorentzian, see \cite{Bra,Huh} for the precise definition of Lorentzian polynomials. The Lorentzian property of $\N(x_1^{n-1}\cdots x_n^{n-1} \S_w(x^{-1}))$ implies that for any $\mu\in \mathbb{Z}_{\geq 0}^n$, if $x^\mu\S_w(x^{-1})$ is a polynomial, then $\N(x^\mu\S_w(x^{-1}))$ is Lorentzian. This can be seen as follows. It was observed in \cite[Lemma 7]{Huh} that for any $\nu\in \mathbb{Z}_{\geq 0}^n$ and a polynomial $f=f(x_1,\ldots, x_n)$, $\N(f)$ is Lorentzian if and only if $\N(x^\nu f)$ is Lorentzian. If $\max\{\mu_1,\ldots, \mu_n\}\leq n-1$, then let $\nu_i=n-1-\mu_i\in\mathbb{Z}_{\geq 0}$, so that \[x_1^{n-1}\cdots x_n^{n-1} \S_w(x^{-1})=x^\nu\cdot x^\mu\S_w(x^{-1}),\] and hence $\N(x^\mu\S_w(x^{-1}))$ is Lorentzian. If $\max\{\mu_1,\ldots, \mu_n\}\geq n$, let $m$ be any given integer larger than $\max\{\mu_1,\ldots, \mu_n\}$. Define $w'\in S_m$ to be the permutation obtained from $w$ by appending fixed points at the positions $n+1,\ldots,m$. Let $\mu'\in \mathbb{Z}_{\geq 0}^m$ be obtained from $\mu$ by appending $m-n$ zero parts. The argument above now applies to $\N(x^{\mu'}\S_{w'}(x^{-1}))$, and thus $\N(x^{\mu}\S_w(x^{-1}))=\N(x^{\mu'}\S_{w'}(x^{-1}))$ is Lorentzian. As a consequence, the normalization of the Schur polynomial $s_\lambda(x)=s_\lambda(x_1,\ldots, x_k)$ is Lorentzian \cite[Theorem 3]{Huh}. This is because, as explained in the proof of \cite[Theorem 3]{Huh}, one can find a Grassmannian permutation $w\in S_n$ and a positive integer $\ell$, where $n>k$ and $n>\ell$, such that $s_\lambda(x)=x_1^\ell\cdots x_k^\ell \S_w(x^{-1})$. The Lorentzian property of $\N(s_\lambda(x))$ can be used to verify Okounkov's log-concavity conjecture \cite[Conjecture 1]{Okounkov} for the Littlewood-Richardson coefficients in the special case of the Kostka numbers, see \cite[Theorem 2]{Huh}. Huh, Matherne, M\'esz\'aros and St.\,Dizier \cite[Conjecture 15]{Huh} conjectured that for each $w\in S_n$, the normalized Schubert polynomial $\N(\S_w(x))$ is Lorentzian. Motivated by this conjecture, we attempt to investigate the following problem: \begin{align*} \text{{\it When $x^\mu \S_w(x^{-1})$ is still a Schubert polynomial?}} \end{align*} We call $x^\mu \S_w(x^{-1})$ the complement of $\S_w(x)$ with respect to $\mu$. If $x^\mu \S_w(x^{-1})$ is equal to a Schubert polynomial $\S_{w'}(x)$, then $\S_{w}(x)=x^\mu \S_{w'}(x^{-1})$, and from the Lorentzian property of $\N(x^\mu \S_{w'}(x^{-1}))$, it follows that $\N(\S_{w}(x))$ is Lorentzian. On the other hand, the investigation of this problem has its own interest, and will be helpful for the understanding of the structure of Schubert polynomials. A general characterization of $\mu$ and $w$ such that $x^\mu \S_w(x^{-1})$ is a Schubert polynomial seems to be a challenging problem. In this paper, we pay attention to the typical case when $\mu=\delta_n=(n-1,\ldots,1,0)$ is the staircase partition. Our main result is as follows. \begin{theo}\label{main1} Let $w\in S_n$ be a permutation. Then $x^{\delta_n} \S_w(x^{-1})$ is a Schubert polynomial if and only if $w$ avoids the patterns $132$ and $312$. \end{theo} The sufficiency of Theorem \ref{main1} can be easily deduced since the Schubert polynomial for a 132-avoiding permutation is a monomial. However, the proof of the necessity of Theorem \ref{main1} turns out to be quite technical, and forms the main body of this paper. \noindent {\it Remark 1.} It is well known that the set $\{\S_w(x)\colon w\in S_n\}$ forms a $\mathbb{Z}$-basis of \[V_n=\mathrm{span}_\mathbb{Z}\{x^\alpha\colon 0\leq \alpha_i\leq n-i\},\] see for example \cite{Ber,Mac}. Notice that $x^\alpha\longmapsto x^{\delta_n-\alpha}$ induces an involutive automorphism on $V_n$. Hence the set $\{x^{\delta_n} \S_w(x^{-1})\colon w\in S_n\}$ is a basis of $V_n$. \noindent {\it Remark 2.} The complements $x^{\delta_n} \S_w(x^{-1})$ are related to the padded Schubert polynomials defined by Gaetz and Gao \cite{Gae,Gae-2}. The padded Schubert polynomial $\widetilde{\S}_w(x; y)$ is obtained from $\S_w(x)$ by replacing each monomial $x^\alpha$ in $\S_w(x)$ by $x^\alpha y^{\delta_n-\alpha}.$ Setting $x_i=1$ in $\widetilde{\S}_w(x; y)$, we see that $\widetilde{\S}_w(x; y)|_{x_i=1}=y^{\delta_n} \S_w(y^{-1})$. Thus Theorem \ref{main1} is equivalent to saying that $\widetilde{\S}_w(x; y)|_{x_i=1}$ is a Schubert polynomial if and only if $w$ avoids the patterns $132$ and $312$. Though we have not been able to give a general characterization when $x^{\mu}\S_w(x^{-1})$ is a Schubert polynomial, the following conjectures are supported by numerical evidence. \begin{conj} Let $\mu\in \mathbb{Z}_{\geq 0}^n$ and $w\in S_n$. If $x^{\mu}\S_w(x^{-1})$ is a Schubert polynomial, then $\mu$ is a partition, that is, the parts of $\mu$ are weakly decreasing. \end{conj} For $n\leq 7$, we have verified that for each $w\in S_n$, if $\mu$ is not a partition, then there does not exist a permutation $w'\in S_n$ such that $x^{\mu}\S_w(x^{-1})=\S_{w'}(x)$. In fact, we computed the quotient $\S_{w'}(x)/\S_w(x^{-1})$ for all $w, w'\in S_7$, and it turns out that if $\S_{w'}(x)/\S_w(x^{-1})$ is a monomial $x^\mu$, then the exponent $\mu$ is always a partition. \begin{conj}\label{1432} If $w\in S_n$ contains a 1432 pattern, then $x^{\mu}\S_w(x^{-1})$ is not a Schubert polynomial for any $\mu\in \mathbb{Z}_{\geq 0}^n$. \end{conj} When $n\leq 4$, for each permutation $w\in S_n$ except for $w=1432$, it is easy to find $\mu$ and $w'$ such that $x^{\mu}\S_w(x^{-1})=\S_{w'}(x)$. For the case $w=1432$, we show that $x^{\mu}\S_w(x^{-1})$ is not a Schubert polynomial for any $\mu$ (see Theorem \ref{P1432}). We have verified Conjecture \ref{1432} for $n\leq 7$. That is, if $w$ is a permutation in $S_7$ containing a pattern $1432$, then, for any composition $\mu$, there does not exist $w'\in S_7$ such that $x^{\mu}\S_w(x^{-1})=\S_{w'}(x)$. This is done by checking that the quotients $\S_{w'}(x)/\S_w(x^{-1})$ are always not monomials. We would like to mention that Fink, M\'esz\'aros and St.\,Dizier \cite{Fin} showed that if $\sigma$ is a pattern of $w$, then $\S_w(x)$ can be expressed as a monomial times $\S_\sigma(x)$ (in reindexed variables) plus a polynomial with nonnegative coefficients. This means that if $w$ contains a 1432 pattern, then $\S_w(x)$ contains $\S_{1432}(x)$ as a ``positive part''. Hence it is reasonable to pose Conjecture \ref{1432} for permutations containing a 1432 pattern. This paper is organized as follows. In Section \ref{RCC}, we present a proof of Theorem \ref{main1}. The arguments rely on the RC-graph model of Schubert polynomials as well as properties of permutations avoiding 132 and 312. In Section \ref{cj1432}, we confirm Conjecture \ref{1432} for the case $w=1432$. \section{Proof of Theorem \ref{main1}}\label{RCC} As mentioned in Introduction, the main difficulty is to prove that if $x^{\delta_n} \S_w(x^{-1})$ is a Schubert polynomial, then $w$ must avoid $132$ and $312$. To do this, we first need a description of the largest and the smallest monomials of $\S_w(x)$ in the reverse lexicographic order, which comes from the RC-graph interpretation of Schubert polynomials. \subsection{Schubert polynomials and RC-graphs}\label{RC} Let us begin with the definition of Schubert polynomials. Write $s_i\in S_n$ for the adjacent transposition interchanging $i$ and $i+1$. For a permutation $w=w_1w_2\cdots w_n\in S_n$, $ws_i$ is the permutation obtained from $w$ by interchanging $w_i$ and $w_{i+1}$. For a polynomial $f(x)\in \mathbb{Z}[x_1,\ldots,x_n]$, the divided difference operator $\partial_i$ acting on $f(x)$ is defined by \[\partial_i f(x)=\frac{f(x) -s_if(x)}{x_i-x_{i+1}},\] where $s_if(x)$ is obtained from $f(x)$ by exchanging $x_i$ and $x_{i+1}$. For $w_0=n \cdots 21$, set \[\S_{w_0}(x)=x_1^{n-1}x_2^{n-2}\cdots x_{n-1}.\] For $w\neq w_0$, choose a position $i$ such that $w_i<w_{i+1}$ and define \[ \S_{w}(x)=\partial_i \S_{ws_i}(x). \] The above definition is independent of the choice of $i$ since the operators $\partial_i$ satisfy the Coxeter relations: $\partial_i \partial_j=\partial_j \partial_i$ for $|i-j|>1$, and $\partial_i \partial_{i+1} \partial_i= \partial_{i+1}\partial_i \partial_{i+1}$. Billey, Jockusch and Stanley \cite{Bil} developed a combinatorial construction of Schubert polynomials in terms of reduced-word compatible sequences. Note that $w$ can be expressed as a product $s_{a_1}s_{a_2}\cdots s_{a_p}$ of adjacent transpositions. If $p$ is minimal, then denote $\ell(w)=p$, which is called the length of $w$, and in this case $a=(a_1,\ldots, a_p)$ is called a reduced word of $w$. A sequence $\alpha=(\alpha_1,\ldots, \alpha_p)$ of positive integers is said to be a compatible sequence of $a$ if (i) $\alpha_1\leq \alpha_2\leq \cdots\leq \alpha_p$, (ii) $\alpha_i< \alpha_{i+1}$ if $a_i<a_{i+1}$, and (iii) $1\leq \alpha_i\leq a_i$. Let $\mathrm{Red}(w)$ denote the set of reduced words of $w$, and $\mathrm{C}(a)$ denote the set of compatible sequences of a reduced word $a$ of $w$. Billey, Jockusch and Stanley \cite{Bil} showed that for $w\in S_n$, \begin{equation}\label{BJS} \S_w(x)=\sum_{a\in \mathrm{Red}(w)}\sum_{\alpha\in \mathrm{C}(a)}x_{\alpha_1}x_{\alpha_2}\cdots x_{\alpha_p}. \end{equation} The RC-graph corresponding to a compatible pair $(a,\alpha)$ can be defined as follows. Let $\Delta_n$ denote the array of left-justified boxes with $n+1-i$ boxes in row $i$ for $1\leq i\leq n$. The RC-graph corresponding to $(a,\alpha)$ is the subset of $\Delta_n$ consisting of boxes in row $\alpha_i$ and column $a_i-\alpha_i+1$, where $1\leq i\leq p$. For example, let $a=(4,2,3,2,4)$ be a reduced word of $w=15342$, and $\alpha=(1,1,2,2,4)$ be a compatible sequence of $a$. Then the corresponding RC-graph is illustrated in Figure \ref{rc-graph}, where we use a cross to signify a box belonging to the RC-graph. \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(50,50) \put(0,-5){\line(1,0){10}}\put(0,5){\line(1,0){20}}\put(0,15){\line(1,0){30}} \put(0,25){\line(1,0){40}}\put(0,35){\line(1,0){50}}\put(0,45){\line(1,0){50}} \put(50,45){\line(0,-1){10}}\put(40,45){\line(0,-1){20}}\put(30,45){\line(0,-1){30}} \put(20,45){\line(0,-1){40}}\put(10,45){\line(0,-1){50}}\put(0,45){\line(0,-1){50}} \put(2,8){$+$}\put(2,28){$+$}\put(12,28){$+$}\put(12,38){$+$}\put(32,38){$+$} \end{picture} \end{center}\vspace{-.2cm} \caption{An RC-graph of $w=15342$.} \label{rc-graph} \end{figure} For an RC-graph $D$ of $w$, let \[x^D=\prod_{i\in [n]} x_i^{|\text{\{boxes in the $i$-th row of $D$\}}|}.\] In this notation, formula \eqref{BJS} can be rewritten as \begin{equation*} \S_w(x)= \sum_{D} x^D, \end{equation*} where the sum runs over all the RC-graphs of $w$. For the purpose of this paper, we pay attention to two specific RC-graphs: the bottom RC-graph and the top RC-graph. Let $d(w)=(d_1,d_2,\ldots, d_n)$ denote the inversion code of $w$, that is, for $1\leq i\leq n$, \[d_i=|\{j\colon j>i,\ w_j<w_i\}|.\] Clearly, $0\leq d_i\leq n-i$. The bottom RC-graph of $w$ is the RC-graph consisting of the first $d_i$ boxes in row $i$. For example, Figure \ref{BT}(a) is the bottom RC-graph of $w=25143$. \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(150,50) \put(0,0){\line(1,0){10}}\put(0,10){\line(1,0){20}}\put(0,20){\line(1,0){30}} \put(0,30){\line(1,0){40}}\put(0,40){\line(1,0){50}}\put(0,50){\line(1,0){50}} \put(50,50){\line(0,-1){10}}\put(40,50){\line(0,-1){20}}\put(30,50){\line(0,-1){30}} \put(20,50){\line(0,-1){40}}\put(10,50){\line(0,-1){50}}\put(0,50){\line(0,-1){50}} \put(2,13){$+$}\put(2,33){$+$}\put(12,33){$+$}\put(22,33){$+$} \put(2,43){$+$} \put(100,0){\line(1,0){10}}\put(100,10){\line(1,0){20}}\put(100,20){\line(1,0){30}} \put(100,30){\line(1,0){40}}\put(100,40){\line(1,0){50}}\put(100,50){\line(1,0){50}} \put(150,50){\line(0,-1){10}}\put(140,50){\line(0,-1){20}}\put(130,50){\line(0,-1){30}} \put(120,50){\line(0,-1){40}}\put(110,50){\line(0,-1){50}}\put(100,50){\line(0,-1){50}} \put(102,33){$+$}\put(122,33){$+$}\put(122,43){$+$} \put(102,43){$+$}\put(132,43){$+$} \put(15,-10){(a)}\put(115,-10){(b)} \end{picture} \end{center} \caption{The bottom and top RC-graphs of $w=25143$.} \label{BT} \end{figure} Bergeron and Billey \cite{Ber} showed that any RC-graph of $w$ can be generated from the bottom RC-graph of $w$ by applying a sequence of ladder moves. Let $D$ be an RC-graph of $w$, and let $(i,j)$ denote a box of $D$ in row $i$ and $j$. The ladder move $L_{i,j}$ is a local change of the crosses as illustrated in Figure \ref{ladder}. Formally, the resulting diagram after applying the ladder move $L_{i,j}$ is \[L_{i,j}(D)=D\backslash\{(i,j)\}\cup\{(h,j+1)\}.\] \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(100,60) \put(0,-5){\line(1,0){20}}\put(0,5){\line(1,0){20}}\put(0,15){\line(1,0){20}} \put(0,30){\line(1,0){20}}\put(0,40){\line(1,0){20}}\put(0,50){\line(1,0){20}} \put(0,-5){\line(0,1){55}}\put(10,-5){\line(0,1){55}}\put(20,-5){\line(0,1){55}} \put(2,-2){$+$}\put(2,8){$+$}\put(12,8){$+$}\put(2,33){$+$} \put(12,33){$+$}\put(4,19){$\vdots$}\put(14,19){$\vdots$} \put(80,-5){\line(1,0){20}}\put(80,5){\line(1,0){20}}\put(80,15){\line(1,0){20}} \put(80,30){\line(1,0){20}}\put(80,40){\line(1,0){20}}\put(80,50){\line(1,0){20}} \put(80,-5){\line(0,1){55}}\put(90,-5){\line(0,1){55}}\put(100,-5){\line(0,1){55}} \put(92,43){$+$}\put(82,8){$+$}\put(92,8){$+$}\put(82,33){$+$} \put(92,33){$+$}\put(84,19){$\vdots$}\put(94,19){$\vdots$} \put(35,28){$\underrightarrow{\quad L_{i,j}\quad }$} \put(-8,-2){{\small $i$}}\put(3,54){{\small $j$}} \put(72,-2){{\small $i$}}\put(83,54){{\small $j$}} \put(-8,43){{\small $h$}}\put(72,43){{\small $h$}} \end{picture} \end{center} \caption{A ladder move.} \label{ladder} \end{figure} It can be verified that $L_{i,j}(D)$ is still an RC-graph of $w$. Since the ladder move operation moves a cross upwards, the bottom RC-graph of $w$ corresponds to the leading monomial of $\S_w(x)$ in the reverse lexicographic order. \begin{prop}[\mdseries{Bergeron-Billey \cite{Ber}}]\label{large} Let $w\in S_n$, and $d(w)=(d_1,\ldots,d_n)$ be the inversion code of $w$. Then the monomial $x^{d(w)}=x_1^{d_1}\cdots x_n^{d_n}$ is the leading term of $\S_w(x)$ in the reverse lexicographic order. \end{prop} It was shown in \cite{Ber} that the transpose of an RC-graph of $w$ is an RC-graph of the inverse $w^{-1}$ of $w$. The top RC-graph of $w$ is defined as the transpose of the bottom RC-graph of $w^{-1}$. For example, the inverse of $w=25143$ is $w^{-1}=31542$, and so the top RC-graph of $w$ is as depicted in Figure \ref{BT}(b). Dual to the ladder moves, Bergeron and Billey \cite{Ber} defined chute moves on RC-graphs, and showed that any RC-graph of $w$ can be generated from the top RC-graph of $w$ by applying a sequence of chute moves. The chute move operation moves a cross downwards, and thus the top RC-graph of $w$ corresponds to the smallest monomial of $\S_w(x)$ in the reverse lexicographic order. For a vector $v=(v_1,v_2,\ldots,v_n)$ with $0\leq v_i\leq n-i$, let \begin{equation}\label{trans} v^t=(v_1', v_2',\ldots, v_n') \end{equation} denote the transpose of $v$, namely, for $1\leq i\leq n$, \[v_i'=|\{1\leq j\leq n\colon v_j\geq i\}|.\] \begin{prop}[\mdseries{Bergeron-Billey \cite{Ber}}]\label{small} For $w\in S_n$, let $d^{\,t}(w^{-1})=(d_1',\ldots, d_n')$ denote the transpose of the inversion code of $w^{-1}$. Then the monomial $x^{d^{\,t}(w^{-1})}=x_1^{d_1'}\cdots x_n^{d_n'}$ is the smallest term of $\S_w(x)$ in the reverse lexicographic order. \end{prop} \subsection{ Permutations avoiding 132 and 312 } In this subsection, we prove a relationship concerning permutations avoiding the patterns $132$ and $312$, see Proposition \ref{lemma-a}. This proposition will be used in the proof of Lemma \ref{LL-4}, which is crucial to prove the necessity of Theorem \ref{main1}. Given a permutation $w=w_1w_2\cdots w_n\in S_n$, we say that $w$ is 132-avoiding if there do not exist $i<j<k$ such that $w_i<w_k<w_j$, and $w$ is 312-avoiding if there do not exist $i<j<k$ such that $w_j<w_k<w_i$. For $1\leq i\leq n$, define \begin{align}\label{lr} l_i(w)=|\{j\colon j<i,w_j<w_{i}\}| \ \ \ \text{and}\ \ \ r_i(w)=|\{j\colon j<i,w_j>w_{i}\}|. \end{align} Clearly, $l_i(w)+r_i(w)=i-1$. Let \begin{align} L(w)=(l_1(w),\ldots,l_n(w)) \ \ \ \text{and}\ \ \ R(w)=(r_1(w),\ldots,r_n(w)). \end{align} We say that a vector $v=(v_1,\ldots,v_n)$ is a rearrangement of a vector $v'=(v'_1,\ldots,v'_n)$ if there exists a permutation $\pi\in S_n$ such that $v=(v'_{\pi_1},\ldots,v'_{\pi_n})$. \begin{prop}\label{lemma-a} Let $w\in S_n$ be a permutation avoiding 312, and $u\in S_n$ be a permutation avoiding 132. If $L(w)$ is a rearrangement of $L(u)$ and $R(w)$ is a rearrangement of $R(u)$, then we have $w=u$. \end{prop} To prove Proposition \ref{lemma-a}, we need the matrix representation of $w$. Consider an $n\times n$ box grid, where the rows (respectively, the columns) are numbered $1,2,\ldots,n$ from top to bottom (respectively, from left to right). A box in row $i$ and column $j$ is denoted $(i,j)$. The matrix representation of $w$ is obtained by putting a dot in the box $(i,w_i)$ for $1\leq i\leq n$. Figure \ref{Rothe} is the matrix representation of $w=426315$. \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(60,65) \put(0,0){\line(1,0){60}}\put(0,10){\line(1,0){60}}\put(0,20){\line(1,0){60}} \put(0,30){\line(1,0){60}}\put(0,40){\line(1,0){60}}\put(0,50){\line(1,0){60}} \put(0,60){\line(1,0){60}} \put(0,0){\line(0,1){60}}\put(10,0){\line(0,1){60}} \put(20,0){\line(0,1){60}} \put(30,0){\line(0,1){60}}\put(40,0){\line(0,1){60}} \put(50,0){\line(0,1){60}} \put(60,0){\line(0,1){60}} \put(55,35){\circle*{3}}\put(45,5){\circle*{3}} \put(25,25){\circle*{3}}\put(5,15){\circle*{3}} \put(35,55){\circle*{3}} \put(15,45){\circle*{3}} \end{picture} \end{center} \vspace{-.5cm} \caption{ The matrix representation of $w=426315$.} \label{Rothe} \end{figure} Obviously, for $1\leq i\leq n$, the value $l_i(w)$ (respectively, $r_i(w)$) is equal to the number of dots lying in the region to the strictly upper left (respectively, strictly upper right) of the box $(i, w_i)$. For $w=426315$, it can be seen from Figure \ref{Rothe} that $L(w)=(0,0,2,1,0,4)$ and $R(w)=(0,1,0,2,4,1).$ \vspace{10pt} \noindent {\it Proof of Proposition \ref{lemma-a}.} We first prove that either $w_n=u_n=n$ or $w_n=u_n=1$. Since $w$ is 312-avoiding, we see that for $1\leq j,\, k\leq n-1$, if $w_j<w_n$ and $w_k>w_n$, then there must hold $j<k$. This implies that the matrix representation of $w$ is as illustrated in Figure \ref{pf-2}, where the region $L$ contains all the $l_n(w)$ dots that are on the upper left of $(n, w_n)$, and the region $R$ contains all the $r_n(w)=n-1-l_n(w)$ dots that are on the upper right of $(n, w_n)$. We have the following observation: \begin{itemize} \item[(O1).] For $1\leq j \leq l_n(w)$, we have $l_j(w)< l_n(w)$, and for $l_n(w)< j\leq n$, we have $l_j(w)\geq l_n(w)$. Therefore, there are exactly \[r_n(w)+1=n-l_n(w)\] indices $j$ such that $l_j(w)\geq l_n(w)$. \end{itemize} \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(40,50) \put(0,0){\line(1,0){50}} \put(0,10){\line(1,0){50}} \put(0,30){\line(1,0){50}}\put(0,50){\line(1,0){50}} \put(0,0){\line(0,1){50}} \put(20,0){\line(0,1){50}} \put(30,0){\line(0,1){50}} \put(50,0){\line(0,1){50}} \put(-15,50){\line(1,0){13}}\put(-15,30){\line(1,0){13}} \put(52,30){\line(1,0){13}} \put(52,10){\line(1,0){13}} \put(-8,50){\vector(0,-1){4}}\put(-8,30){\vector(0,1){4}} \put(-15,39){\tiny{$l_n(w)$}} \put(58,30){\vector(0,-1){4}}\put(58,10){\vector(0,1){4}} \put(52,19){\tiny{$r_n(w)$}} \put(25,5){\circle*{3}} \put(7,37){$L$}\put(37,17){$R$} \put(-8,3.5){\small{$n$}}\put(20.5,53){\small{$w_n$}} \end{picture} \end{center} \vspace{-.5cm} \caption{ The matrix representation of $w$.} \label{pf-2} \end{figure} Since $l_n(w)+r_n(w)=n-1$, we have the following two cases. Case 1. $l_n(w)\geq \frac{n-1}{2}$. Since $L(w)$ is a rearrangement of $L(u)$, there exists some $1\leq i\leq n$ such that $l_i(u)=l_n(w)$, that is, in the matrix representation of $u$, there are $l_n(w)$ dots lying in the region to the upper left of the box $(i, u_i)$. Since $u$ is 132-avoiding, we see that for $1\leq j, k<i$, if $u_j<u_i$ and $u_k>u_i$, then $j>k$. So the matrix representation of $u$ is as illustrated in Figure \ref{pf-1}, where the box marked with a dot is $(i,u_i)$, the region $L'$ contains $l_i(u)=l_n(w)$ dots, and the region $A$ contains $r_i(u)$ dots. \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(50,50) \put(0,0){\line(1,0){50}} \put(0,20){\line(1,0){50}} \put(0,30){\line(1,0){50}}\put(0,40){\line(1,0){50}}\put(0,50){\line(1,0){50}} \put(0,0){\line(0,1){50}} \put(20,0){\line(0,1){50}} \put(30,0){\line(0,1){50}} \put(50,0){\line(0,1){50}} \put(25,25){\circle*{3}}\put(-5,22){\small{$i$}} \put(21.5,53){\small{$u_i$}} \put(7,32){$L'$}\put(37,42){$A$} \put(7,7){$B$}\put(37,7){$C$} \end{picture} \end{center} \vspace{-.5cm} \caption{ The matrix representation of $u$ in Case 1.} \label{pf-1} \end{figure} We next show that there are no dots in the regions $A, B, C$ of $u$ in Figure \ref{pf-1}. To proceed, we list the following straightforward observations. \begin{itemize} \item[(O2).] Since there are $l_n(w)\geq \frac{n-1}{2}$ dots in $L'$, there are at most $\frac{n-1}{2}$ dots in $A$. So, if $(j, u_j)$ is a box in $A$, then $l_j(u)<l_n(w)$. \item[(O3).] Since $u$ is 132-avoiding, every dot (if any) in $B$ lies to the left of every dot in $L'$. Again, since there are $l_n(w)\geq \frac{n-1}{2}$ dots in $L'$, there are at most $\frac{n-1}{2}$ dots in $B$. So if $(j, u_j)$ is a box in $B$, then $l_j(u)<l_n(w)$. \item[(O4).] If $(j, u_j)$ is a box in $C$, then $l_j(u)\geq l_n(w)$. \end{itemize} By (O2), (O3) and (O4), we see that the set of indices $j$ such that $l_j(u)\geq l_n(w)$ is \[\{i\} \cup \{k\colon \text{$(k, u_k)$ is a box in $C$}\}.\] Keep in mind that $L(w)$ is a rearrangement of $L(u)$. By (O1), we have \begin{equation*} |\{i\} \cup \{k\colon \text{$(k, u_k)$ is a box in $C$}\}|=1+r_n(w), \end{equation*} and so \begin{equation}\label{XX-1} |\{\text{dots in $C$}\}|=r_n(w). \end{equation} Notice that the total number of dots in $A$, $B$ and $C$ is equal to $n-1-l_n(w)=r_n(w)$. This together with \eqref{XX-1} forces that there are no dots in $A$ and $B$. It remains to show that there are no dots in $C$. Suppose otherwise there is at least one dot in $C$. Note that the dot in $(i, u_i)$ appears to the upper left of each dot in $C$. Since $u$ is 132-avoiding, the dots in $C$ must be listed from upper left to bottom right increasingly. This, along with the fact that there are no dots in $A$ and $B$, implies that $u_n=n$. So we have $l_n(u)=n-1$. Since $L(w)$ is a rearrangement of $L(u)$, there exists some index, say $k$, such that $l_k(w)=n-1$. By the definition of $l_k(w)$, we must have $k=n$ and $w_n=n$. Recalling that $l_i(u)=l_n(w)$, we have $l_i(u)=l_n(w)=n-1$, and thus $i=n$. However, from the assumption that there is at least one dot in $C$, it follows that $i<n$, leading to a contradiction. Hence the region $C$ does not contain any dots. Because there are no dots in $B$ and $C$, we have $i=n$. By \eqref{XX-1}, we see that $r_n(w)=0$, and so we have $w_n=n$. Moreover, since $l_n(u)=l_n(w)=n-1-r_n(w)=n-1$, we are given $u_n=n$. Therefore, we have $w_n=u_n=n$. Case 2. $r_n(w)>\frac{n-1}{2}$. In this case, from Figure \ref{pf-2}, we see that $r_n(w)$ is the unique maximum value in $R(w)$. Since $R(u)$ is a rearrangement of $R(w)$, there is a unique $i$ such that $r_i(u)=r_n(w)$. The matrix representation of $u$ is illustrated in Figure \ref{pf-3}, where the square marked with a dot is $(i, u_i)$ and the region $R'$ contains $r_i(u)=r_n(w)$ dots. \begin{figure}[h] \setlength{\unitlength}{0.5mm} \begin{center} \begin{picture}(50,50) \put(0,0){\line(1,0){50}} \put(0,20){\line(1,0){50}} \put(0,30){\line(1,0){50}}\put(0,40){\line(1,0){50}}\put(0,50){\line(1,0){50}} \put(0,0){\line(0,1){50}} \put(20,0){\line(0,1){50}} \put(30,0){\line(0,1){50}} \put(50,0){\line(0,1){50}} \put(25,25){\circle*{3}}\put(-5,22){$i$}\put(21,53){$u_i$} \put(7,32){$D$}\put(37,42){$R'$} \put(7,7){$E$}\put(37,7){$F$} \end{picture} \end{center} \vspace{-.5cm} \caption{ The matrix representation of $u$ in Case 2.} \label{pf-3} \end{figure} Since $r_i(u)=r_n(w)>\frac{n-1}{2}$ is the unique maximum value in $R(u)$, we see that there are no dots in the regions $D$ and $E$. We next show that the region $F$ does not contain any dots either. By the fact that $l_n(w)+r_n(w)=n-1$, as well as the fact that $D$ and $E$ do not contain dots, it follows that there are $l_n(w)$ dots in $F$: \begin{equation}\label{buch} |\{\text{dots in $F$}\}|=l_n(w). \end{equation} We aim to verify $l_n(w)=0$. Suppose otherwise that $l_n(w)>0$. By (O1), there are exactly $r_n(w)+1$ indices $j$ such that $l_j(w)\geq l_n(w)$. Since $L(u)$ is a rearrangement of $L(w)$, there are exactly $r_n(w)+1$ indices $j$ in $u$ such that $l_j(u)\geq l_n(w)$. Since there are no dots in $D$, we have $l_i(u)=0$. Along with the fact that there are no dots in $E$, we see that if $j$ is an index such that $l_j(u)\geq l_n(w)>0$, then the box $(j, u_j)$ lies in either $F$ or $R'$. Since $r_n(w)+l_n(w)=n-1$, by the assumption $r_n(w)>\frac{n-1}{2}$, we see that $|\{\text{dots in $R'$}\}|=r_n(w)>l_n(w)$, and so, for each $1\leq k\leq l_n(w)$, the box $(k, u_k)$ is in $R'$. Clearly, for $1\leq k\leq l_n(w)$, we have $l_k(u)< l_n(w)$. Hence the maximal possible number of indices $j$ such that $l_j(u)\geq l_n(w)$ is \[|\{\text{dots in $F$}\}|+|\{\text{dots in $R'$}\}|-l_n(w),\] which, together with \eqref{buch}, becomes \[|\{\text{dots in $R'$}\}|=r_i(u)=r_n(w),\] contrary to the fact that there are exactly $r_n(w)+1$ indices $j$ such that $l_j(u)\geq l_n(w)$. This verifies $l_n(w)=0$, and hence there are no dots in $F$. Since $l_n(w)=0$, we obtain that $w_n=1$. As there are no dots in $E$ and $F$, we have $i=n$, and so $r_n(u)=r_n(w)=n-1$, leading to $u_n=1$. Hence we have $w_n=u_n=1$. Now we have proved that either $w_n=u_n=n$ or $w_n=u_n=1$. This allows us to finish the proof of the proposition by induction on $n$. To be more specific, if $w_n=u_n=n$, let $w'\in S_{n-1}$ (respectively, $u'\in S_{n-1}$) be the permutation obtaining from $w$ (respectively, $u$) by ignoring $w_n$ (respectively, $u_n$), while if $w_n=u_n=1$, let $w'\in S_{n-1}$ (respectively, $u'\in S_{n-1}$) be the permutation obtaining from $w$ (respectively, $u$) by ignoring $w_n$ (respectively, $u_n$) and then decreasing each of the remaining elements by $1$. It is easily seen that $w'$ and $u'$ satisfy the assumptions in the proposition. So, by induction, we have $w'=u'$, which yields $w=u$. This completes the proof. \qed \subsection{Proof of Theorem \ref{main1}} To present a proof of Theorem \ref{main1}, we still need several lemmas. Recall that $d(w)$ denotes the inversion code of a permutation $w$. View \[d\colon w\longmapsto d(w)\] as a bijection from $S_n$ to the set $\{(v_1,\ldots,v_n)\colon 0\leq v_i\leq n-i\}$. With this notation, for any vector $v=(v_1,\ldots,v_n)$ with $0\leq i\leq n-i$, $d^{-1}(v)$ is the corresponding permutation in $S_n$. For $w\in S_n$, write $w^c=w^c_1w^c_2\cdots w^c_n$ for the complement of $w$, that is, $w^c_i=n+1-w_i$ for $1\le i\le n$. It is routine to check that \[d(w^c)=\delta_n- d(w),\] and so we have \begin{equation}\label{BU} w^c=d^{-1}(\delta_n-d(w)). \end{equation} \begin{lem}\label{LL-2} Let $w\in S_n$ be a permutation. Assume that $x^{\delta_n} \S_w(x^{-1})$ is equal to a Schubert polynomial $\S_{w^\ast}(x)$. Then \begin{equation}\label{PP-1} w^\ast=(d^{-1}(d^{\,t}(w^{-1})))^c, \end{equation} which is a permutation in $S_n$. \end{lem} \pf By Proposition \ref{small}, the smallest term of $\S_w(x)$ in the reverse lexicographic order is $x^{d^{\,t}(w^{-1})}$. Hence the leading term of $x^{\delta_n} \S_w(x^{-1})$ is $x^{\delta_n-d^{\,t}(w^{-1})}$. On the other hand, by Proposition \ref{large}, the leading term of $\S_{w^\ast}(x)$ is $x^{d(w^\ast)}$. Since $x^{\delta_n} \S_w(x^{-1})=\S_{w^\ast}(x)$, we have \begin{equation}\label{XY-1} d(w^\ast)=\delta_n-d^{\,t}(w^{-1}). \end{equation} Write $d(w^{-1})=(a_1,a_2,\ldots,a_n)$ and $d^{\,t}(w^{-1})=(b_1,b_2,\ldots,b_n)$. For $1\leq i\leq n$, since $0\leq a_i\leq n-i$, we have $0\leq b_i \leq n-i$. This, together with \eqref{XY-1}, implies that $w^\ast$ is a permutation in $S_n$. Moreover, by \eqref{BU} and \eqref{XY-1}, we are led to \[w^\ast=d^{-1}(\delta_n-d^{\,t}(w^{-1}))=(d^{-1}(d^{\,t}(w^{-1})))^c,\] as desired. \qed The second lemma is a well-known characterization of 132-avoiding permutations, see for example \cite[Chapter 1]{Sta}. \begin{lem}\label{LL-6} A permutation $w\in S_n$ is a 132-avoiding permutation if and only if its inversion code $d(w)$ is a partition. Moreover, the inverse $w^{-1}$ of $w$ is also a 132-avoiding permutation with $d(w^{-1})=d^{\,t}(w)$. \end{lem} Based on Proposition \ref{lemma-a} and Lemma \ref{LL-6}, we are ready to prove the final lemma. \begin{lem}\label{LL-4} Let $w$ be a permutation in $S_n$, and let $w^*$ be as defined in \eqref{PP-1}. Then $(w^\ast)^\ast=w$ if and only if $w$ avoids the patterns 132 and 312. \end{lem} \pf We first show that if $w$ avoids 132 and 312, then $(w^\ast)^\ast=w$. Since $w$ is 132-avoiding, by Lemma \ref{LL-6}, $w^{-1}$ is also 132-avoiding. By \eqref{XY-1} and Lemma \ref{LL-6}, we have \[d(w^\ast)=\delta_n-d^{\,t}(w^{-1})=\delta_n-d(w),\] yielding that $w^\ast=w^c$. As $w$ is 312-avoiding, $w^c$ is 132-avoiding, and hence $w^*$ is 132-avoiding. Thus we obtain that $(w^\ast)^\ast=(w^c)^c=w$. Let us proceed to prove the reverse direction. Notice that for any vector $v$ of nonnegative integers, its transpose $v^t$ as defined in \eqref{trans} is a partition. By definition, \[w=(w^\ast)^\ast=(d^{-1}(d^{\,t}((w^\ast)^{-1})))^c.\] So we have $w^c=d^{-1}(d^{\,t}((w^\ast)^{-1})),$ and thus \[d(w^c) =d^{\,t}((w^\ast)^{-1}).\] This implies that $d(w^c)$ is a partition, and so it follows from Lemma \ref{LL-6} that $w^c$ is 132-avoiding, or equivalently, $w$ is 312-avoiding. We still need to show that $w$ is 132-avoiding. Since $d^{\,t}(w^{-1})$ is a partition, by Lemma \ref{LL-6}, there exists a 132-avoiding permutation $u\in S_n$ such that \begin{equation}\label{PQ-2} d(u)=d^{\,t}(w^{-1}). \end{equation} So we have \begin{equation}\label{PQ-1} w^\ast=(d^{-1}(d^{\,t}(w^{-1})))^c=(d^{-1}(d(u)))^c=u^c. \end{equation} We now consider $(u^c)^\ast$. Since $d^{\,t}((u^c)^{-1})$ is a partition, there exists a 132-avoiding permutation $v\in S_n$ such that \begin{equation}\label{PQ-3} d(v)=d^{\,t}((u^c)^{-1}), \end{equation} and so \[(u^c)^\ast=(d^{-1}(d^{\,t}((u^c)^{-1})))^c=(d^{-1}(d(v)))^c=v^c,\] which along with \eqref{PQ-1} gives $(w^\ast)^\ast=v^c$. By the assumption $(w^\ast)^\ast=w$, we obtain that \begin{equation}\label{PQ-4} w=v^c. \end{equation} Using \eqref{PQ-2}, \eqref{PQ-3} and \eqref{PQ-4}, we can prove the following two claims. \noindent Claim 1: $R(w)$ is a rearrangement of $R(u)$. Recall that $R(w)=(r_1(w),\ldots,r_n(w))$, where $r_i(w)$ is equal to the number of dots lying to the upper right of the box $(i, w_i)$. Notice that in the inversion code $d(w)=(d_1,\ldots,d_n)$, the entry $d_i$ equals the number of dots lying to the lower left of the box $(i, w_i)$. Moreover, the matrix representation of $w^{-1}$ is the transpose of the matrix representation of $w$. Therefore, $R(w)$ is a rearrangement of $d(w^{-1})$. For the same reason, $R(u)$ is a rearrangement of $d(u^{-1})$. On the other hand, since $u$ is 132-avoiding, it follows from Lemma \ref{LL-6} that $d(u)=d^{\,t}(u^{-1})$. Combined with \eqref{PQ-2}, we have \[d^{\,t}(u^{-1})=d^{\,t}(w^{-1}).\] It is easy to check that for any two vectors $\alpha, \beta\in \mathbb{Z}_{\geq 0}^n$, if $\alpha^t=\beta^t$, then $\alpha$ is a rearrangement of $\beta$. So $d(w^{-1})$ is a rearrangement of $d(u^{-1})$. We have explained that $R(w)$ is a rearrangement of $d(w^{-1})$ and $R(u)$ is a rearrangement of $d(u^{-1})$. Hence $R(w)$ is a rearrangement of $R(u)$. This proves Claim 1. \noindent Claim 2: $L(w)$ is a rearrangement of $L(u)$. Since $v$ is 132-avoiding, by Lemma \ref{LL-6} we have $d(v)=d^{\,t}(v^{-1})$. Moreover, by \eqref{PQ-4} we see that $v^{-1}=(w^c)^{-1}$. Hence, \[d(v)=d^{\,t}(v^{-1})=d^{\,t}((w^c)^{-1}).\] In view of \eqref{PQ-3}, we get \[d^{\,t}((w^c)^{-1})=d^{\,t}((u^c)^{-1}).\] By the same arguments as in Claim 1, $R(w^c)$ is a rearrangement of $R(u^c)$. Noticing that $L(w)=R(w^c)$ and $L(u)=R(u^c)$, we conclude that $L(w)$ is a rearrangement of $L(u)$. This verifies Claim 2. Since $w$ is 312-avoiding and $u$ is 132-avoiding, combining Proposition \ref{lemma-a}, Claim 1 and Claim 2, we obtain that $w=u$, and so $w$ is 132-avoiding. This finishes the proof. \qed We are now in the position to provide a proof of Theorem \ref{main1}. \noindent {\it Proof of Theorem \ref{main1}.} We first prove the sufficiency. Assume that $w\in S_n$ avoids the patterns 132 and 312. Since $w$ is 132-avoiding, it follows from \cite[Chapter IV]{Mac} that $\S_w(x)=x^{d(w)}$. So we have \begin{equation}\label{Final-1} x^{\delta_n} \S_w(x^{-1})=x^{\delta_n-d(w)}. \end{equation} As $\delta_n-d(w)$ is the inversion code of $w^c$, we see that $x^{\delta_n-d(w)}=x^{d(w^c)}$. Since $w$ is 312-avoiding, $w^c$ is 132-avoiding, and so we have \begin{equation*} \S_{w^c}(x)=x^{d(w^c)}=x^{\delta_n-d(w)}. \end{equation*} This together with \eqref{Final-1} yields that $x^{\delta_n} \S_w(x^{-1})$ is the Schubert polynomial $\S_{w^c}(x)$. It remains to prove the necessity. Assume that $x^{\delta_n} \S_w(x^{-1})$ equals the Schubert polynomial $\S_{w^\ast}(x)$. Equivalently, we have $\S_w(x)=x^{\delta_n} \S_{w^\ast}(x^{-1})$, which along with Lemma \ref{LL-2} leads to $w=(w^\ast)^{\ast}$. Invoking Lemma \ref{LL-4}, we conclude that $w$ avoids 132 and $312$. This completes the proof. \qed \section{Proof of Conjecture \ref{1432} for $w=1432$}\label{cj1432} In the final section, we provide a proof of Conjecture \ref{1432} for $w=1432$. The proof utilizes the property that each RC-graph of a permutation $w$ can be generated from the bottom RC-graph of $w$ by applying a sequence of ladder moves, as introduced in Section \ref{RC}. \begin{theo}\label{P1432} For any composition $\mu\in \mathbb{Z}^n_{\ge0}$, $x^{\mu}\S_{1432}(x^{-1})$ is not a Schubert polynomial. \end{theo} \pf Since \[\S_{1432}(x)=x_1^2x_2+x_1^2x_3+x_1x_2^2+x_1x_2x_3+x_2^2x_3,\] we have \[\S_{1432}(x^{-1})=\frac{x_1^2+x_1x_2+x_1x_3+x_2^2+x_2x_3} {x_1^2x_2^2x_3}.\] For a composition $\mu=(\mu_1,\ldots,\mu_n)$, define \begin{equation*} f_{1432}(\mu):=x^{\mu}(x_1^2+x_1x_2+x_1x_3+x_2^2+x_2x_3). \end{equation*} To conclude the theorem, it suffices to show that $f_{1432}(\mu)$ is not a Schubert polynomial for any given $\mu \in \mathbb{Z}_{\geq 0}^n$. The proof is by contradiction. Suppose otherwise that $f_{1432}(\mu)$ is a Schubert polynomial, say, $f_{1432}(\mu)=\S_w(x)$ for some permutation $w$. Clearly, in the reverse lexicographic order, $x^{\mu}\,x_2x_3$ is the leading monomial of $\S_w(x)$, and $x^{\mu}\,x_1^2$ is the smallest monomial of $\S_w(x)$. Let $d(w)=(d_1,\ldots,d_n)$ be the inversion code of $w$. By Proposition \ref{large}, \[d_1=\mu_1,\ d_2=\mu_2+1,\ d_3=\mu_3+1,\ d_4=\mu_4,\ldots, d_n=\mu_n.\] In this notation, the leading monomial of $\S_w(x)$ is $x_1^{d_1}x_2^{d_2}\cdots x_n^{d_n}$ and the smallest monomial of $\S_w(x)$ is $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$. Moreover, \begin{equation}\label{FFF} f_{1432}(\mu)=x_1^{d_1}x_2^{d_2-1}x_3^{d_3-1}(x_1^2 +x_1x_2+x_1x_3+x_2^2+x_2x_3)x_4^{d_4}\cdots x_n^{d_n}. \end{equation} Denote by $D_{\mathrm{bot}}$ the bottom RC-graph of $w$. Keep in mind that $D_{\mathrm{bot}}$ contains the first $d_i$ boxes in row $i$. There are four cases. Case 1. $d_1\ge d_2$. In this case, we cannot move any cross from the second row up to the first row by applying ladder moves to $D_{\mathrm{bot}}$. This means that we cannot generate the smallest monomial $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$ of $\S_w(x)$ from $D_{\mathrm{bot}}$ by applying ladder moves, leading to a contradiction. Case 2. $d_1=d_2-1$. In this case, the second row of $D_{\mathrm{bot}}$ has exactly one more cross than the first row. If $d_3\leq d_2$, then it is readily checked that we cannot generate the monomial $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$ by applying ladder moves to $D_{\mathrm{bot}}$. Now assume that $d_3> d_2$. Let us generate an RC-graph $D$ of $w$ by applying ladder moves to $D_{\mathrm{bot}}$ as follows. First apply a ladder move to move the last cross in the second row to the first row. Then apply ladder moves twice to move the last cross in the third row to the second row, and then to the first row. Finally, apply a ladder move to move the last cross in the third row to the second row. This procedure is illustrated in Figure \ref{case3}. Let $D$ be the resulting RC-graph. By the above constructions, we see that \[x^D=x^{d(w)}\cdot\frac{x_1^2}{x_3^2}=x_1^{d_1+2}x_2^{d_2}x_3^{d_3-2}\cdots x_n^{d_n}\] is a monomial of $\S_w(x)$, which is smaller than $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$ in the reverse lexicographic order. This yields a contradiction. \begin{figure}[h] \setlength{\unitlength}{1.5mm} \begin{center} \begin{picture}(200,6 \ytableausetup{boxsize=.95em} \ytableausetup{aligntableaux=center} \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ & \scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle $+$ &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle $+$ &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle$+$&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle &\scriptstyle$+$&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle &\scriptstyle$+$&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle $+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle &\scriptstyle &\scriptstyle \end{ytableau} \end{picture} \end{center} \vspace{.2cm} \caption{ An illustration of Case 2 for $d_3>d_2$.} \label{case3} \end{figure} Case 3. $d_1=d_2-2$. We discuss according to the following three subcases. \begin{itemize} \item[(1)] $d_3=d_1\le d_2-2$. In this case, we cannot move any cross in the third row upwards by applying ladder moves to $D_{\mathrm{bot}}$. Hence we cannot generate the monomial $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$ from $D_{\mathrm{bot}}$, leading to a contradiction. \item[(2)] $d_3= d_2-1$. In this case, we can apply ladder moves to generate four new RC-graphs of $w$, as depicted in Figure \ref{case4}. Together with $D_{\mathrm{bot}}$, these five RC-graphs contribute \begin{align*} x_1^{d_1}x_2^{d_2-1}x_3^{d_3-1}\left(x_1^2+x_1x_2+x_1x_3 +\frac{x_1^2x_3}{x_2}+x_2x_3\right)x_4^{d_4}\cdots x_n^{d_n} \end{align*} to $\S_w(x)$. However, compared with \eqref{FFF}, we obtain that $\S_w(x)\neq f_{1432}(\mu)$, leading to a contradiction. \begin{figure}[h] \setlength{\unitlength}{1.2mm} \begin{center} \begin{picture}(110,17 \put(28,4){$\nearrow$} \put(28,-1){$\searrow$} \put(0,2){ \ytableausetup{boxsize=.95em} \ytableausetup{aligntableaux=center} \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle &\scriptstyle \end{ytableau} } \put(30,10){ \ytableausetup{boxsize=.95em} \ytableausetup{aligntableaux=center} \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ & \scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle &\scriptstyle \end{ytableau} $\rightarrow$ \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle &\scriptstyle &\scriptstyle \end{ytableau} } \put(30,-5){ \ytableausetup{boxsize=.95em} \ytableausetup{aligntableaux=center} \begin{ytableau} \scriptstyle$+$ & \scriptstyle & \scriptstyle$+$ &\scriptstyle &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle$+$ & \scriptstyle$+$ &\scriptstyle&\scriptstyle \\ \scriptstyle$+$ & \scriptstyle &\scriptstyle &\scriptstyle \end{ytableau} } \end{picture} \end{center} \vspace{.6cm} \caption{ An illustration of Case 3(2).} \label{case4} \end{figure} \item[(3)] $d_3\geq d_2$. In this case, we can apply ladder moves twice to move the last two crosses in the second row of $D_{\mathrm{bot}}$ up to the first row, and then apply ladder moves twice to move the last two crosses in the third row up to the second row. This will produce a monomial smaller than $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$, and so we obtain a contradiction. \end{itemize} Case 4. $d_1\le d_2-3$. In this case, it is easy to see that from $D_{\mathrm{bot}}$, we can apply ladder moves to move at least three crosses from the second row up to the first row. This will also produce a monomial smaller than $x_1^{d_1+2}x_2^{d_2-1}x_3^{d_3-1}\cdots x_n^{d_n}$, leading to a contradiction. By the above arguments, we see that the assumption that $f_{1432}(\mu)=\S_w(x)$ is false, and so the proof is complete. \qed \vspace{.2cm} \noindent{\bf Acknowledgments.} This work was supported by the National Science Foundation of China (Grant No. 11971250).
\section{Conclusion} \vspace*{-.5em} We described the \textsc{SatVis}{} tool for interactively visualizing proofs and proof attempts of the first-order theorem prover \textsc{Vampire}{}. Our work analyses proof search in \textsc{Vampire}{} and reconstructs first-order derivations corresponding to \textsc{Vampire}{} proofs/proof attempts. The interactive features of \textsc{SatVis}{} ease the task of understanding both successful and failing proof attempts in \textsc{Vampire}{} and hence can be used to further develop and use \textsc{Vampire}{} both by experts and non-experts in first-order theorem proving. \section{Analysis of Saturation Attempts of \textsc{Vampire}{}}\label{sec:analysis} \vspace*{-.5em} We now discuss how to efficiently analyze saturation attempts of \textsc{Vampire}{} in \textsc{SatVis}{}. \vspace*{-2em} \paragraph{Analyzing saturation attempts.} To understand saturation (attempts), we have to analyze the generating inferences performed during saturation (attempts). On the one hand, we are interested in the \emph{useful} clauses: that is, the derived and activated clauses that are part of the proof we expect \textsc{Vampire}{} to find. In particular, we check whether these clauses occur in $\mathit{Active}$. (i) If this is the case for a given useful clause (or a simplified variant of it), we are done with processing this useful clause and optionally check the derivation of that clause against the expected derivation. (ii) If not, we have to identify the reason why the clause was not added to $\mathit{Active}$, which can either be the case because (ii.a) the clause (or a simplified version of it) was never chosen from $\mathit{Passive}$ to be activated or (ii.b) the clause was not even added to $\mathit{Passive}$. In case (ii.a), we investigate why the clause was not activated. This involves checking which simplified version of the clause was added to $\mathit{Passive}$ and checking the value of clause selection in \textsc{Vampire}{} on that clause. In case (ii.b), it is needed to understand why the clause was not added to $\mathit{Passive}$, that is, why no generating inference between suitable premise clauses was performed. This could for instance be the case because one of the premises was not added to $\mathit{Active}$, in which case we recurse with the analysis on that premise, or because clause selection in \textsc{Vampire}{} prevented the inference. On the other hand, we are interested in the \emph{useless} clauses: that is, the clauses which were generated or even activated but are unrelated to the proof \textsc{Vampire}{} will find. These clauses often slow down the proof search by several magnitudes. It is therefore crucial to limit their generation or at least their activation. To identify the useless clauses that are activated, we need to analyze the set $\mathit{Active}$, whereas to identify the useless clauses, which are generated but never activated, we have to investigate the set $\mathit{Passive}$. \begin{figure}[tb] \centering \begin{BVerbatim}[fontsize=\scriptsize] ... [SA] passive: 160. v = a(l11(s(nl8)),$sum(i(main_end),1)) [superposition 70,118] [SA] active: 163. i(main_end) != -1 [term algebras distinctness 162] [SA] active: 92. ~'Sub'(X5,p(X4)) | 'Sub'(X5,X4) | zero = X4 [superposition 66,44] [SA] new: 164. 'Sub'(p(p(X0)),X0) | zero = X0 | zero = p(X0) [resolution 92,94] [SA] passive: 164. 'Sub'(p(p(X0)),X0) | zero = X0 | zero = p(X0) [resolution 92,94] [SA] active: 132. v = a(l11(s(s(zero))),2) [superposition 70,124] [SA] new: 165. v = a(l8(s(s(zero))),2) | i(l8(s(s(zero)))) = 2 [superposition 132,72] [SA] new: 166. v = a(l8(s(s(zero))),2) | i(l8(s(s(zero)))) = 2 [superposition 72,132] [SA] active: 90. s(X1) != X0 | p(X0) = X1 | zero = X0 [superposition 22,44] [SA] new: 167. X0 != X1 | p(X0) = p(X1) | zero = X1 | zero = X0 [superposition 90,44] [SA] new: 168. p(s(X0)) = X0 | zero = s(X0) [equality resolution 90] [SA] new: 169. p(s(X0)) = X0 [term algebras distinctness 168] ... \end{BVerbatim} \caption{Screenshot of a saturation attempt of \textsc{Vampire}{}. \label{fig:screenshot-vampire-saturation}}\vspace*{-1em} \end{figure} \paragraph{Saturation output.} We now discuss how \textsc{SatVis}{} reconstructs the clause sets $\mathit{Active}$ and $\mathit{Passive}$ from a \textsc{Vampire}{} saturation (attempt). \textsc{Vampire}{} is able to log a list of events, where each event is classified as either (i) new $C$ (ii) passive $C$ or (iii) active $C$, for a given clause $C$. The list of events produced by \textsc{Vampire}{} satisfies the following properties: (a) any clause is at most once newly created, added to $\mathit{Passive}$ and added to $\mathit{Active}$; (b) if a clause is added to $\mathit{Passive}$, it was newly created in the same iteration, and (c) if a clause is added to $\mathit{Active}$, it was newly created and added to $\mathit{Passive}$ at some point. Figure~\ref{fig:screenshot-vampire-saturation} shows a part of the output logged by \textsc{Vampire}{} while performing a saturation attempt ({\tt SA}). Starting from an empty derivation and two empty sets, the derivation graph and the sets $\mathit{Active}$ and $\mathit{Passive}$ corresponding to a given saturation attempt of \textsc{Vampire}{} are computed in \textsc{SatVis}{} by traversing the list of events produced by \textsc{Vampire}{} and iteratively changing the derivation and the sets $\mathit{Active}$ and $\mathit{Passive}$, as follows: \begin{enumerate}[label=(\roman*)] \item new $C$: add the new node $C$ to the derivation and construct the edges $(C_i,C)$, for any premise $C_i$ of the inference deriving $C$. The sets $\mathit{Active}$ or $\mathit{Passive}$ remain unchanged; \item passive $C$: add the node $C$ to $\mathit{Passive}$. The derivation and $\mathit{Active}$ remain unchanged; \item active $C$: remove the node $C$ from $\mathit{Passive}$ and add it to $\mathit{Active}$. The derivation remains unchanged. \end{enumerate} \vspace*{-1em} \paragraph{Interactive Visualization.} The large number of inferences during saturation in \textsc{Vampire}{} makes the direct analysis of saturation attempts of \textsc{Vampire}{} impossible within a reasonable amount of time. In order to overcome this problem, in \textsc{SatVis}{} we \emph{interactively} visualize the derivation graph of the \textsc{Vampire}{} saturation. The graph-based visualization of \textsc{SatVis}{} brings the following benefits: $\bullet$ Navigating through the graph visualization of a \textsc{Vampire}{} derivation is easier for users rather than working with the \textsc{Vampire}{} derivation encoded as a list of hyper-edges. In particular, both (i) navigating to the premises of a selected node/clause and (ii) searching for inferences having a selected node/clause as premise is performed fast in \textsc{SatVis}{}. $\bullet$ \textsc{SatVis}{} visualizes only the nodes/clauses that are part of a derivation of an activated clause, and in this way ignores uninteresting inferences. $\bullet$ \textsc{SatVis}{} merges the preprocessing inferences, such that each clause resulting from preprocessing has as direct premise the input formula it is derived from.\\[-.75em] Yet, a straightforward graph-based visualization of \textsc{Vampire}{} saturations in \textsc{SatVis}{} would bring the following practical limitations on using \textsc{SatVis}{}: (i) displaying additional meta-information on graph nodes, such as the inference rule used to derive a node, is computationally very expensive, due to the large number of inferences used during saturation; (ii) manual search for particular/already processed nodes in relatively large derivations would take too much time; (iii) subderivations are often interleaved with other subderivations due to an imperfect automatic layout of the graph.\\[-.75em] \textsc{SatVis}{} addresses the above challenges using its following interactive features: \begin{itemize} \item \textsc{SatVis}{} displays meta-information only for a selected node/clause; \item \textsc{SatVis}{} supports different ways to locate and select clauses, such as full-text search, search for direct children and premises of the currently selected clauses, and search for clauses whose derivation contains all currently selected nodes; \item \textsc{SatVis}{} supports transformations/fragmentations of derivations. In particular, it is possible to restrict and visualize the derivation containing only the clauses that form the derivation of a selected clause, or visualize only clauses whose derivation contains a selected clause. \item \textsc{SatVis}{} allows to (permanently) highlight one or more clauses in the derivation. \end{itemize} Figure~\ref{fig:visualize} illustrates some of the above feature of \textsc{SatVis}{}, using output from \textsc{Vampire}{} similar to Figure~\ref{fig:screenshot-vampire-saturation} as input to \textsc{SatVis}{}. \begin{figure}[tb] \centering \includegraphics[width=0.6\textwidth]{images/pruned-derivation.png} \includegraphics[width=0.21\textwidth]{images/menu.png} \caption{Screenshot of \textsc{SatVis}{} showing visualized derivation and interaction menu\label{fig:visualize}.}\vspace*{-1.5em} \label{} \end{figure} \section{Implementation of \textsc{SatVis}{} 1.0}\label{sec:implementation} \vspace*{-.5em} We implemented \textsc{SatVis}{} as a web application, allowing \textsc{SatVis}{} to be easily used on any platform. Written in Python3, \textsc{SatVis}{} contains about 2,200 lines of code. For the generation of graph layouts, we rely on {\tt pygraphviz}\footnote{\url{https://pygraphviz.github.io}}, whereas graph/derivation visualizations are created with {\tt vis.js}\footnote{\url{https://visjs.org/}}. We experimented with \textsc{SatVis}{} on the verification examples of~\cite{rapidArxiv}, using an Intel Core i5 3.1Ghz machine with 16 GB of RAM, allowing us to refine and successfully generate \textsc{Vampire}{} proofs for non-interference and information-flow examples of~\cite{rapidArxiv}. \vspace*{-1em} \paragraph{\textsc{SatVis}{} workflow.} \textsc{SatVis}{} takes as input a text file containing the output of a \textsc{Vampire}{} saturation attempt. An example of a partial input to \textsc{SatVis}{} is given in Figure~\ref{fig:screenshot-vampire-saturation}. \textsc{SatVis}{} then generates a DAG representing the derivation of the considered \textsc{Vampire}{} saturation output, as presented in Section~\ref{sec:analysis} and discussed later. Next, \textsc{SatVis}{} generates the graph layout of for the generated DAG, enriched with configured style information. Finally, \textsc{SatVis}{} renders and visualizes the \textsc{Vampire}{} derivation corresponding to its input, and allows interactive visualisations of its output, as discussed in Section~\ref{sec:analysis} and detailed below. \vspace*{-.5em} \paragraph{DAG generation of saturation outputs.} \textsc{SatVis}{} parses its input line by line using regex pattern matching in order to generate the nodes of the graph. Next, \textsc{SatVis}{} uses a post order traversal algorithm to sanitize nodes and remove redundant ones. The result is then passed to {\tt pygraphviz} to generate a graph layout. While {\tt pygraphviz} finds layouts for thousands of nodes within less than three seconds, we would like to improve the scalability of the tool further. It would be beneficial to preprocess and render nodes incrementally, while ensuring stable layouts for \textsc{SatVis}{} graph transformations. We leave this engineering task for future work. \vspace*{-.5em} \paragraph{Interactive visualization} The interactive features of \textsc{SatVis}{} support (i) various node searching mechanisms, (ii) graph transformations, and (iii) the display of meta-information about a specific node. We can efficiently search for nodes by (partial) clause, find parents or children of a node, and find common consequences of a number of nodes. Graph transformations in \textsc{SatVis}{} allow to only render a certain subset of nodes from the \textsc{SatVis}{} DAG, for example, displaying only transitive parents or children of a certain node. \vspace*{-.5em} \section{Introduction} Many applications of formal methods, such as program analysis and verification, require automated reasoning about system properties, such as program safety, security and reliability. Automated reasoners, such as SAT/SMT solvers~\cite{CVC4,Z3} and first-order theorem provers~\cite{kovacs2013first,ESchulz}, have therefore become a key backbone of rigorous system engineering. For example, proving properties over the computer memory relies on first-order reasoning with both quantifiers and integer arithmetic. \\[-.75em] Saturation-based theorem proving is the leading approach for automating reasoning in full first-order logic. In a nutshell, this approach negates a given goal and saturates its given set of input formulas (including the negated goal), by deriving logical consequences of the input using a logical inference system, such as binary resolution or superposition. Whenever a contradiction (false) is derived, the saturation process terminates reporting validity of the input goal. State-of-the-art theorem provers, such as \textsc{Vampire}{}~\cite{kovacs2013first} and E~\cite{ESchulz}, implement saturation-based proof search using the (ordered) superposition calculus~\cite{Sup01}. These provers rely on powerful indexing algorithms, selection functions and term orderings for making saturation-based theorem proving efficient and scalable to a large set of first-order formulas, as evidenced in the yearly CASC system competition of first-order provers~\cite{Sut07-CSR}. \\[-.75em Over the past years, saturation-based theorem proving has been extended to first-order logic with theories, such as arithmetic, theory of arrays and algebraic datatypes~\cite{kovacs2017coming}. Further, first-class boolean sorts and if-then-else and let-in constructs have also been introduced as extensions to the input syntax of first-order theorem provers~\cite{FOOL18}. Thanks to these recent developments, first-order theorem provers became better suited in applications of formal methods, being for example a competitive alternative to SMT-solvers \cite{CVC4,Z3} in software verification and program analysis. Recent editions of the SMT-COMP\footnote{\url{https://smt-comp.github.io/}} and CASC system competitions show, for example, that \textsc{Vampire}{} successfully competes against the leading SMT solvers Z3~\cite{Z3} and CVC4~\cite{CVC4} and vice-versa. \\[-.75em] By leveraging the best practices in first-order theorem proving in combination with SMT solving, in our recent work~\cite{rapidArxiv} we showed that correctness of a software program can be reduced to a validity problem in first-order logic. We use \textsc{Vampire}{} to prove the resulting encodings, outperforming SMT solvers. Our initial results demonstrate that first-order theorem proving is well-suited for applications of (relational) verification, such as safety and non-interference. Yet, our results also show that the performance of the prover crucially depends on the logical representation of its input problem and the deployed reasoning strategies during proof search. As such, users and developers of first-order provers, and automated reasoners in general, typically face the burden of analysing (failed) proof attempts produced by the prover, with the ultimate goal to refine the input and/or proof strategies making the prover succeed in proving its input. Understanding (some of) the reasons why the prover failed is however very hard and requires a considerable amount of work by highly qualified experts in theorem proving, hindering thus the use of theorem provers in many application domains. \\[-.75em] In this paper we address this challenge and {\it introduce the \textsc{SatVis}{} tool to ease the task of analysing failed proof attempts in saturation-based reasoning}. We designed \textsc{SatVis}{} to support interactive visualization of the saturation algorithm used in \textsc{Vampire}{}, with the goal to ease the manual analysis of \textsc{Vampire}{} proofs as well as failed proof attempts in \textsc{Vampire}{}. Inputs to \textsc{SatVis}{} are proof (attempts) produced by \textsc{Vampire}{}. Our tool consists of (i) an explicit visualization of the DAG-structure of the saturation proof (attempt) of \textsc{Vampire}{} and (ii) interactive transformations of the DAG for pruning and reformatting the proof (attempt). In its current setting, \textsc{SatVis}{} can be used only in the context of \textsc{Vampire}{}. Yet, by parsing/translating proofs (or proof attempts) of other provers into the \textsc{Vampire}{} proof format, \textsc{SatVis}{} can be used in conjunction with other provers as well. \\[-.75em] When feeding \textsc{Vampire}{} proofs to \textsc{SatVis}{}, \textsc{SatVis}{} supports both users and developers of \textsc{Vampire}{} to understand and refactor \textsc{Vampire}{} proofs, and to manually proof check soundness of \textsc{Vampire}{} proofs. When using \textsc{SatVis}{} on failed proof attempts of \textsc{Vampire}{}, \textsc{SatVis}{} supports users and developers of \textsc{Vampire}{} to analyse how \textsc{Vampire}{} explored its search space during proof search, that is, to understand which clauses were derived and why certain clauses have not been derived at various steps during saturation. By doing so, the \textsc{SatVis}{} proof visualisation framework gives valuable insights on how to revise the input problem encoding of \textsc{Vampire}{} and/or implement domain-specific optimizations in \textsc{Vampire}{}. We therefore believe that \textsc{SatVis}{} improves the state-of-the-art in the use and applications of theorem proving at least in the following scenarios: (i) helping \textsc{Vampire}{} developers to debug and further improve \textsc{Vampire}{}, (ii) helping \textsc{Vampire}{} users to tune \textsc{Vampire}{} to their applications, by not treating \textsc{Vampire}{} as a black-box but by understanding and using its appropriate proof search options; and (iii) helping unexperienced users in saturation-based theorem proving to learn using \textsc{Vampire}{} and first-order proving in general. \paragraph{\bf Contributions.} The contribution of this paper comes with the design of the \textsc{SatVis}{} tool for analysing proofs, as well as proof attempts of the \textsc{Vampire}{} theorem prover. \textsc{SatVis}{} is available at:\vspace*{-.5em} \[ \text{\url{https://github.com/gleiss/saturation-visualization}. }\vspace*{-.5em}\] We overview proof search steps in \textsc{Vampire}{} specific to \textsc{SatVis}{} (Section~\ref{sec:search}), discuss the challenges we faced for analysing proof attempts of \textsc{Vampire}{} (Section~\ref{sec:analysis}), and describe implementation-level details of \textsc{SatVis}{} 1.0 (Section~\ref{sec:implementation}). \vspace*{-.5em} \paragraph{Related work.} While standardizing the input format of automated reasoners is an active research topic, see e.g. the SMT-LIB~\cite{barrett2017smtlib} and TPTP~\cite{Sut07-CSR} standards, coming up with an input standard for representing and analysing proofs and proof attempts of automated reasoners has received so far very little attention. The TSTP library~\cite{Sut07-CSR} provides input/output standards for automated theorem proving systems. Yet, unlike \textsc{SatVis}{}, TSTP does not analyse proof attempts but only supports the examination of first-order proofs. We note that \textsc{Vampire}{} proofs (and proof attempts) contain first-order formulas with theories, which is not fully supported by TSTP. Using a graph-layout framework, for instance Graphviz~\cite{Gansner00anopen}, it is relatively straightforward to visualize the DAG derivation graph induced by a saturation attempt of a first-order prover. For example, the theorem prover E~\cite{ESchulz} is able to directly output its saturation attempt as an input file for Graphviz. The visualizations generated in this way are useful however only for analyzing small derivations with at most 100 inferences, but cannot practically be used to analyse and manipulate larger proof attempts. We note that it is quite common to have first-order proofs and proof attempts with more than 1,000 or even 10,000 inferences, especially in applications of theorem proving in software verification, see e.g.~\cite{rapidArxiv}. In our \textsc{SatVis}{} framework, the interactive features of our tool allow one to analyze such large(r) proof attempts. The framework~\cite{z3-axiom-profiler} eases the manual analysis of proof attempts in Z3~\cite{Z3} by visualizing quantifier instantiations, case splits and conflicts. While both \cite{z3-axiom-profiler} and \textsc{SatVis}{} are built for analyzing (failed) proof attempts, they target different architectures (SMT-solving resp. superposition-based proving) and therefore differ in their input format and in the information they visualize. The frameworks~\cite{BYRNES200923,DBLP:journals/corr/LibalRR14} visualize proofs derived in a natural deduction/sequent calculus. Unlike these approaches, \textsc{SatVis}{} targets clausal derivations generated by saturation-based provers using the superposition inference system. As a consequence, our tool can be used to focus only on the clauses that have been actively used during proof search, instead of having to visualize the entire set of clauses, including unused clauses during proof search. We finally note that proof checkers, such as DRAT-trim~\cite{DRAT}, support the soundness analysis of each inference step of a proof, and do not focus on failing proof attempts nor do they visualize proofs. \section{Proof Search in \textsc{Vampire}}\label{sec:search We first present the key ingredients for proof search in \textsc{Vampire}{}, relevant to analysing saturation attempts. \paragraph{Derivations and proofs.} An \emph{inference} $I$ is a tuple $(F_1,\dots,F_n,F)$, where $F_1,\dots,F_n,F$ are formulas. The formulas $F_1,\dots,F_n$ are called the \emph{premises} of $I$ and $F$ is called the \emph{conclusion} of $I$. In our setting, an \emph{inference system} is a set of inferences and we rely on the superposition inference systems~\cite{Sup01}. An axiom of an inference system is any inference with $n=0$. Given an inference system $\mathcal{I}$, a \emph{derivation} from axioms $A$ is an acyclic directed graph (DAG), where (i) each node is a formula and (ii) each node either is an axiom in $A$ and does not have any incoming edges, or is a formula $F \notin A$, such that the incoming edges of $F$ are exactly $(F_1,F),\dots,(F_n,F)$ and there exists an inference $(F_1,\dots,F_n,F) \in \mathcal{I}$. A refutation of axioms $A$ is a derivation which contains the empty clause $\bot$ as a node. A derivation of a formula $F$ is called a {\it proof} of $F$ if it is finite and all leaves in the derivation are axioms. \paragraph{Proof search in Vampire.} Given an input set of axioms $A$ and a conjecture $G$, \textsc{Vampire}{} searches for a refutation of $A \cup \{\neg G\}$, by using a preprocessing phase followed by a saturation phase. In the preprocessing phase, \textsc{Vampire}{} generates a derivation from $A \cup \{\neg G\}$ such that each sink-node of the DAG\footnote{a sink-node is a node such that no edge emerges out of it.} is a clause. Then, \textsc{Vampire}{} enters the saturation phase, where it extends the existing derivation by applying its saturation algorithm using the sink-nodes from the preprocessing phase as the input clauses to saturation. The saturation phase of \textsc{Vampire}{} terminates in either of the following three cases: (i) the empty clause $\bot$ is derived (hence, a proof of $G$ was found), (ii) no more clauses are derived and the empty clause $\bot$ was not derived (hence, the input is saturated and $G$ is satisfiable), or (iii) an a priory given time/memory limit on the \textsc{Vampire}{} run is reached (hence, it is unknown whether $G$ is satisfiable/valid).\\[-.75em] Saturation-based proving in \textsc{Vampire}{} is performed using the following high-level description of the saturation phase of \textsc{Vampire}{}. The saturation algorithm divides the set of clauses from the proof space of \textsc{Vampire}{} into a set of $\mathit{Active}$ and $\mathit{Passive}$ clauses, and iteratively refines these sets using its superposition inference system: the $\mathit{Active}$ set keeps the clauses between which all possible inferences have been performed, whereas the $\mathit{Passive}$ set stores the clauses which have not been added to $\mathit{Active}$ yet and are candidates for being used in future steps of the saturation algorithm. During saturation, \textsc{Vampire}{} distinguishes between so-called {\it simplifying} and {\it generating inferences}. Intuitively, simplifying inferences delete clauses from the search space and hence are crucial for keeping the search space small. A generating inference is a non-simplifying one, and hence adds new clauses to the search space. As such, at every iteration of the saturation algorithm, a new clause from $\mathit{Passive}$ is selected and added to $\mathit{Active}$, after which all generating inferences between the selected clause and the clauses in $\mathit{Active}$ are applied. Conclusions of these inferences yield new clauses which are added to $\mathit{Passive}$ to be selected in future iterations of saturation. Additionally at any step of the saturation algorithm, simplifying inferences and deletion of clauses are allowed.
\section{INTRODUCTION} \label{intro} Star clusters are important building blocks of the galaxies and it is widely believed that majority of stars in our Galaxy are formed in the star clusters. Hence study of Galactic open clusters is important for understanding the history of star formation and nature of the parent star clusters. The parameters such as age, distance, reddening, and metallicity in addition to stellar models are key to understand star formation history while luminosity and mass functions are important quantities to know their dynamical evolution \citep{1986MNRAS.220..383S, 2003ARA&A..41...57L}. The observations of large number of open clusters having different ages, locations, and environments in the Galaxy have been used to probe the Galactic structure \citep{1998MNRAS.296.1045C, 2003AJ....125.1397C, 2005MNRAS.362.1259J, 2006A&A...445..545P, 2007MNRAS.378..768J, 2019MNRAS.tmp.1972P}. While the photometric and kinematic studies of young open clusters provide clues to the star formation processes \citep{2019ApJ...870...32K}, old open clusters furnish details about the past history of the Galaxy \citep{1994ApJS...90...31P, 2016A&A...593A.116J}. These information contribute to constrain the Galaxy formation models and chemodynamical properties of the Galactic disk \citep{2008AJ....136..118F, 2018MNRAS.481.5350S, 2019AJ....158...35S}. Since most of the open clusters are primarily affected by the field star contamination, the knowledge of membership of the stars in the cluster field is absolutely necessary to investigate the cluster properties. However, this is not the case for majority of the open clusters \citep[e.g.,][]{2002A&A...389..871D, 2008MNRAS.386.1625C, 2013A&A...558A..53K, 2016A&A...593A.116J}. Therefore, a long-term observational program is being carried out at ARIES, Nainital to better characterize some poorly studied clusters, particularly young and intermediate age open clusters [log(t/yr)<9], and determine their basic astrophysical parameters \citep{2012MNRAS.419.2379J, 2014MNRAS.437..804J}. Higher priority has been given to those open clusters for which no variability study has been carried out until now so that we can also characterize variable stars in these clusters. In this paper, we aim to determine physical parameters of one relatively young open cluster NGC\,1960 located in the Galactic anti-center direction, using the ground based optical observations supported by the archival data. Some basic parameters of the cluster are summarized in Table~\ref{webda}. This cluster has been investigated in the past in optical as well as in near-IR wavebands. The photoelectric and photographic studies of this cluster were done by \citet{1953ApJ...117..313J}, \citet{1985AZh....62..854B}, and \citet{1987A&AS...71..413M}. The proper motion study of this cluster was carried out by \citet{2000A&A...357..471S}. The photometric study of this cluster has been performed by \citet{2000A&A...357..471S, 2002A&A...383..153N, 2005A&A...438.1163K, 2006AJ....132.1669S, 2009MNRAS.399.2146W}. The near-IR photometric study of bright stars of this cluster was carried out by \citet{2008Ap&SS.313..363H}. \citet{2008AJ....135.1934S} studied the mass function and effect of photometric binaries in the cluster. Using Lithium depletion boundary technique, \citet{2013MNRAS.434.2438J} determined the age of this cluster. In spite of all these studies, many stars in the field of NGC\,1960 still lack membership confirmation that lends larger uncertainties in the estimation of cluster parameters. Recently, with the availability of the Gaia catalog \citep{2018A&A...616A...1G} having unprecedented astrometric precision, the membership determination based on kinematic method becomes a reliable tool to identify the cluster members \citep[e.g.,][]{2018A&A...618A..93C}. \input{table01.tex} Stars in the open clusters show different kinds of variability at various stages of their evolution with varying brightness and time scales. The photometric variability are believed to be originated through several physical mechanism like stellar pulsation, rotation of star with an inhomogeneous distribution of cool spots, variable hot spots, obscuration by circumstellar disk, eclipsing of star, and eruption \citep[e.g.,][]{1994AJ....108.1906H, 2012MNRAS.419.2379J}. The search for variables in the open clusters is extremely important as it presents an opportunity to explore the stellar interiors. It also provides opportunity to verify stellar evolution theory and offer constraints for understanding the structure and the evolution of the Galaxy \citep{2002A&A...389..871D, 2006A&A...445..545P}. The study of variable stars in large number of open clusters have been carried out in the past; some of the recent work can be found in \citet{2012A&A...548A..97Z, 2013MNRAS.429.1466B, 2015A&A...581A..66V, 2018NewA...64...34D, 2019AJ....158...68L, 2019MNRAS.487.3505M} where large number of $\delta$-Scuti stars, $\gamma$ Doradus variables, slow pulsating B stars and other kind of variable stars are reported. However, cluster NGC\,1960 has not been studied for variability aspect so far. As we have initiated a long-term project for the survey of variable stars in some young and intermediate age open clusters in the Galaxy in addition to accomplish their photometric study, an extensive time-series CCD observations have been carried out in the direction of the cluster NGC\,1960. Since we observed the cluster for many intra-night as well as inter-night monitoring spanning over more than three years, we probe the cluster for both short-period as well as long-period variable stars. A detailed analysis of our photometric, kinematic and variability studies of the cluster NGC\,1960 is presented here. This paper is organized as follows: The observational and reduction techniques are presented in Sect. ~\ref{obs}. The data used in the present study is described in Sect.~\ref{data}. The kinematic study of stars in the cluster is described in Sect.~\ref{identi}. The basic parameters such as age, distance and reddening are derived in Sect.~\ref{para}. The dynamical study of the cluster is presented in Sect.~\ref{dynamical}. A detailed study of the variable stars is given in Sect.~\ref{vs} followed by their characterizations in Sect.~\ref{charac}. We discuss and summarize our results in Sect.~\ref{summary} \section{Observations and data reduction} \label{obs} The observations have been carried out with the 104-cm Sampurnanand Telescope (ST) at Manora Peak, Nainital. The ST is equipped with a 2k$\times$2k CCD camera having a field of view of $\sim 13^{\prime}\times13^{\prime}$ and the pixel scale of 0.758 arcsec pixel$^{-1}$ in $2\times2$ pixel binning mode. The gain of the CCD is 5.3 e$^{-}$/ADU and read out noise is 10.0 e$^{-}$. Further details of telescope and detector can be found in \citet{Joshi2005}. The bias and flat-field frames were taken on each observing night. To carry out the variability study, we monitored NGC\,1960 in $V$ band on 43 nights during the period of 2009-2013 spread over four observing seasons where we have accumulated a total of 235 frames. The exposure times range from 10 to 200 seconds depending upon the position of the target field in the sky at the time of observation, photometric sky condition, and telescope time availability. The mean PSF FWHM vary from 1.56 to 3.9 arcsec over the entire monitoring period. An observing log is given in Table~\ref{log}. The basic steps of image processing, which include bias subtraction, flat field correction, and cosmic hits removal, were performed using the standard tasks within the IRAF software. Photometry of the frames were performed using the standard {\tt DAOPHOT II} profile fitting software \citep{1992ASPC...25..297S}. To search for variable stars in the target field, absolute photometry was performed which is a meaningful tool to determine stellar parameters for the cluster members like their spectral type and stellar position in the H-R diagram. To do absolute photometry, we converted instrumental magnitudes of the stars on each night to the standard magnitudes by using the secondary standards obtained on the night of 2010, November 30 as explained in the following section. \input{table02.tex} \section{Data sources}\label{data} \subsection{Nainital data}\label{ntl} To carry out detailed photometric study of the cluster NGC\,1960, we obtained Johnson-Cousins $UBVRI$ photometry of stars on 2010, November 30 using ST at Nainital. We acquired two frames each in $U$, $B$, $V$, $R$ and $I$ filters with exposure times of 300, 300, 200, 100, and 60-sec, respectively. Frames were taken when NGC\,1960 was close to zenith. We also observed two Landolt's standard fields: SA95 and PG0231+051 \citep{1992AJ....104..340L} at different airmasses on the same night. Science frames were combined together in each filter to obtain high signal-to-noise ratio (SNR) in respective filters which allowed us to obtain deeper photometries. The details of the photometric calibration along with estimation of extinction and colour coefficients are given in \citet{2012MNRAS.419.2379J, 2014MNRAS.437..804J} so we do not repeat it here. The photometric analysis of our data yields a total of 1970 stars within $\sim 13^\prime\times13^\prime$ central field of the cluster NGC\,1960. We obtained photometric data for 431, 985, 1384, 1908 and 1482 stars in the $U$, $B$, $V$, $R$ and $I$ bands, respectively. The average internal photometric errors per magnitude bin in all the five filters on the night of standardization are listed in Table~\ref{photerr}. This shows that photometric errors are relatively small ($<0.1$\,mag) for stars brighter than $V \approx 20$ mag though larger photometric errors are seen in the $U$ and $I$ bands. \subsection{Archival data}\label{archive} Along with our $UBVRI$ photometric catalogue, we also used many other catalogues where photometric and kinematic data were available for the cluster. To do a comprehensive study of NGC\,1960, we combined all these data along with our own data to prepare a final catalogue. \subsubsection{Optical data}\label{phot} Due to the limited field of view, we could observe only central $\sim 13^\prime \times 13^\prime$ region ($\sim 6^\prime.5$ radius of circular region) of NGC\,1960 while this cluster is reported to have a larger radius of about $10^\prime$ \citep{1987A&A...188...35L, 2000A&A...357..471S}, $14^\prime$ \citep{2006AJ....132.1669S} (SHA06 now onward) and $15^\prime.4$ \citep{2002A&A...383..153N}. To complement our data, particularly in the outer region of the cluster, we combined our photometric data with the SHA06 who provided $UBVRI$ photometric catalogue in the wide field of view ($\sim 50^\prime \times 50^\prime$) observed through the 105-cm Kiso Schmidt telescope, although present photometry is deeper in comparison of SHA06. Since we have taken large number of stars from SHA06, we consider their estimated cluster radius of $14^\prime$ and combined catalogue is confined to this radius only. As NGC\,1960 is a relatively nearby and younger cluster hence some of the most bright stars in the cluster field got saturated in our CCD observations as well as in SHA06. Furthermore, some stars fell into the bad CCD pixels which were rejected during the image analysis. Therefore, we acquired magnitudes of 12 such bright stars from the previous catalogues of \citet{1987A&AS...71..413M, 2000A&A...355L..27H, 2013MNRAS.434.2438J}. In this way we made a combined catalogue of 3962 stars for which photometric data has been compiled. \input{table03.tex} \subsubsection{2MASS near-IR data}\label{2mass} We used archival near-IR photometric data from the Two Micron All-Sky Survey [$2MASS$] \citep{2006AJ....131.1163S} which provides photometry in the $J$ (1.25 $\mu$m), $H$ (1.65 $\mu$m), and $K_s$ (2.17 $\mu$m) filters. The data has limiting magnitude of 15.8, 15.1, and 14.3 mag in $J$, $H$, and $K_{s}$ bands, respectively, having a signal-to-noise ratio greater than 10. Our optical data was cross-correlated with the 2MASS photometric catalogue and found 3142 common stars within $1^{\prime\prime}$ matching radius for which we could extract $J$, $H$, and $K_s$ magnitudes. To ensure the photometric accuracy, we used only those stars having $J$, $H$, and $K_s$ magnitudes that have quality flag ph-qual=$AAA$, which represents a SNR$\ge$10 and photometric uncertainty <0.10 mag. The $K_s$ magnitudes were converted into $K$ magnitudes using equations given in the \citet{2001AJ....121.2851C}. \subsubsection{Gaia proper motion data}\label{Gaia} We took data from the Gaia archive DR2 for the proper motion studies \citep{2018A&A...616A...1G}. The Gaia mission, which launched in 2013 to measure positions, trigonometric parallaxes, proper motions, and photometry of million of stars, provides mean parallax error up to 0.04 mas for sources having $G \leq 15$ mag and around 0.7 mas for sources having $G = 20$ mag. The DR2 provides proper motions of more than 1.3 billions sources with uncertainties up to 0.06 mas yr$^{-1}$ for the sources having $G \leq 15$ mag, 0.2 mas yr$^{-1}$ for G = 17 mag, and 1.2 mas yr$^{-1}$ for sources up to $G = 20$ mag. In the present analysis, we found 3871 common stars between our catalogue and Gaia DR2 catalogue within $1^{\prime\prime}$ matching radius for which we could extract the proper motions and parallax data. \input{table04.tex} \subsection{Final catalogue}\label{cat} The final photometric catalogue contains 3962 stars which comprises our $UBVRI$ data combined with the wide field photometry given by \citet{2006AJ....132.1669S} and 2MASS near-IR data \citep{2006AJ....131.1163S}. Here, we note that all the magnitudes are neither available for all the stars nor in all the passbands. To convert the pixel coordinates (X,Y) into celestial coordinates ($\alpha_{2000}$, $\delta_{2000}$), a linear astrometric solution was derived by matching common bright stars between our $V$ band frame and the Gaia DR2 catalogue. We achieved a radial RMS scatter in the residuals of $\sim$ $0^{\prime\prime}.6$, which is equivalent to $\sim$ 0.8 pixel. A sample of final catalogue is given in Table~\ref{catalog}. The entire catalogue is available online that contains star ID, celestial coordinates, photometric magnitudes in $U$, $B$, $V$, $R$, $I$ bands; 2MASS $J$, $H$, and $K$ magnitudes; the Gaia parallax ($\overline\omega$) and proper motions ($\mu_{x}$, $\mu_{y}$). Each value is given with its associated error for all the stars. The final catalogue contains stars down to $B=21.9$ and $V=21.4$ mag though photometric errors become large ($\geq 0.1)$ mag) for stars fainter than 20 mag. \section{Membership determination}\label{identi} The basic parameters for the cluster NGC\,1960 have been derived by several authors \citep[e.g.,][]{2000A&A...357..471S, 2002A&A...383..153N, 2006AJ....132.1669S, 2009MNRAS.399.2146W}. However, most of these authors used all the stars present in the observed field of the cluster region to determine their cluster parameters. Since not all the stars present in the region are associated with the cluster hence their parameter estimations render larger uncertainties. Therefore, in the present study, we first identified cluster members through Gaia DR2 astrometric and kinematic measurements. \begin{figure} \centerline{\includegraphics[width=7.5cm,height=6.5cm]{fig01.ps}} \caption{Vector-point diagram of the proper motions of stars constructed using Gaia DR2 proper motions in the field of the cluster NGC\,1960.} \label{vpd} \end{figure} \subsection{Membership probabilities}\label{prob} In previous years many methods were used for the membership determination of stars in the star clusters based on the photometric and kinematic data \citep{2013MNRAS.430.3350Y,2014A&A...564A..79D, 2014MNRAS.437..804J, 2017MNRAS.470.3937S, 2018A&A...615A.166T}. However, availability of the astrometric data from the Gaia survey with the unprecedented accuracy has made the kinematic method of membership determination most reliable. In the present study we use proper motions from the Gaia DR2 to obtain the membership probabilities of 3962 stars found within the cluster radius. We found 3866 stars that have proper motions available in the present catalogue. Proper motions for these stars in the RA-DEC plane are plotted as Vector-point diagram (VPD) in Figure~\ref{vpd}. It is evident in the VPD that the cluster stars are well separated from the field stars. The center of the circular region confining the probable cluster members was determined by maximum density method in the proper motion plane which is found to lie at $(\mu_x, \mu_y) \equiv (\mu_\alpha cos\theta, \mu_\delta) \approx (-0.13, -3.37)$ mas~yr$^{-1}$. The radius of the circle was derived by plotting the stellar density as a function of radial distance in the proper motion plane as illustrated in Figure~\ref{rdp_pm}. We fit the stellar density profile with a function similar to the one used to characterize the radial profiles of star clusters in the galaxies. In Figure~\ref{rdp_pm}, we draw horizontal dashed line to show stellar field density. In the radial density distribution, we put a cut-off where stellar density falls close to the field density which is found to be $\sim$ 0.7 mas yr$^{-1}$ and shown by vertical dashed line in the figure. In this way, the radius of the circle is determined as 0.7 mas yr$^{-1}$ and shown by a blue circle in Figure~\ref{vpd}. We thus obtained a total 462 stars within the circular region which could be the potential cluster members. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig02.ps}} \caption{The radial distribution of stellar number density in the proper-motion plane. Here, dashed horizontal line indicates the field density and vertical dotted line represents the cut-off radius used to find the cluster members.} \label{rdp_pm} \end{figure} To determine the membership probabilities of stars in the field of the cluster, we used a statistical method described in \citet{1998A&AS..133..387B} and \citet{2019MNRAS.487.3505M}. In this method membership probability of the i$^{th}$ star is defined as $$P_{\mu}(i) = \frac{n_{c}~.~\phi_c^{\nu}(i)}{n_{c}~.~\phi_c^{\nu}(i) + n_f~.~\phi_f^{\nu}(i)}$$ where $n_{c}$ and $n_{f}$ are the normalized number of stars for cluster and field regions i.e. $n_c + n_f = 1$. The $\phi_c^{\nu}$ and $\phi_f^{\nu}$ are the frequency distribution functions for the cluster and field stars. The $\phi_c^{\nu}$ for the i$^{th}$ star is defined as:\\ ~~~~~~~~~~~$\phi_c^{\nu}(i) =\frac{1}{2\pi\sqrt{{(\sigma_{xc}^2 + \epsilon_{xi}^2 )} {(\sigma_{yc}^2 + \epsilon_{yi}^2 )}}}$ ~~~~~~~~~~~~~~~~~~~~$ exp\{{-\frac{1}{2}[\frac{(\mu_{xi} - \mu_{xc})^2}{\sigma_{xc}^2 + \epsilon_{xi}^2 } + \frac{(\mu_{yi} - \mu_{yc})^2}{\sigma_{yc}^2 + \epsilon_{yi}^2}] }\}$ \\ \noindent where $\mu_{xi}$ and $\mu_{yi}$ are the proper motions in right ascension and declination, respectively while $\epsilon_{xi}$ and $\epsilon_{yi}$ are the corresponding errors in the proper motions of $i^{th}$ star. Here, proper motion of the cluster center are $\mu_{xc}$ and $\mu_{yc}$ with dispersion $\sigma_{xc}$ and $\sigma_{yc}$. Further we define\\ $\phi_f^{\nu}(i) =\frac{1}{2\pi\sqrt{(1-\gamma^2)}\sqrt{{(\sigma_{xf}^2 + \epsilon_{xi}^2 )} {(\sigma_{yf}^2 + \epsilon_{yi}^2 )}}} exp\{{-\frac{1}{2(1-\gamma^2)}}$ $[\frac{(\mu_{xi} - \mu_{xf})^2}{\sigma_{xf}^2 + \epsilon_{xi}^2} -\frac{2\gamma(\mu_{xi} - \mu_{xf})(\mu_{yi} - \mu_{yf})} {\sqrt{(\sigma_{xf}^2 + \epsilon_{xi}^2 ) (\sigma_{yf}^2 + \epsilon_{yi}^2 )}} + \frac{(\mu_{yi} - \mu_{yf})^2}{\sigma_{yf}^2 + \epsilon_{yi}^2}]\}$\\ \noindent where $\mu_{xf}$ and $\mu_{yf}$ are the field proper motion with dispersion $\sigma_{xf}$ and $\sigma_{yf}$. The correlation coefficient $\gamma$ is defined as\\ $\gamma = \frac{(\mu_{xi} - \mu_{xf})(\mu_{yi} - \mu_{yf})}{\sigma_{xf}\sigma_{yf}}$\\ \noindent From the VPD of the cluster, we considered 462 stars within the circle as probable cluster members and remaining 3500 stars as probable field members. We thus determined $n_{c}$ = 0.12 and $n_{f}$ = 0.88. We obtained the mean proper motions within the circular region as $\mu_{xc}$=-0.09 mas yr$^{-1}$ and $\mu_{yc}$=-3.36 mas yr$^{-1}$ with corresponding dispersion $\sigma_{xc}$ = 0.28 mas yr$^{-1}$ and $\sigma_{yc}$ = 0.26 mas yr$^{-1}$. The mean proper motions of the probable field stars were found as $\mu_{xf}$=0.94 mas yr$^{-1}$ and $\mu_{yf}$=-2.55 mas yr$^{-1}$ with corresponding dispersion $\sigma_{xf}$ = 2.86 mas yr$^{-1}$ and $\sigma_{yf}$ = 3.58 mas yr$^{-1}$. Using the above formulae, we estimated membership probabilities of all the stars lying within the cluster region except 91 stars which have no proper motion information available in the Gaia DR2 data. \input{table05.tex} \subsection{Parallax criteria on membership selection} An additional check on our selection of cluster members is done through parallax measurements ($\overline\omega$) provided by the Gaia DR2 catalogue. In Figure~\ref{parallax}, we illustrate histogram of the parallax measurements of these 462 probable members. Here, we used only those stars for which error in parallax was smaller than 0.2 mas. The mean value of the parallax is derived by fitting a Gaussian profile on the histogram shown by a continuous line in the figure. The peak and standard deviation $\sigma$ of the parallax distribution are found to be 0.83 mas and 0.05 mas, respectively as estimated from the best fit Gaussian profile. Recently, \citet{2018A&A...616A...2L} reported a general offset in Gaia parallaxes by -0.029 mas though there is also some evidence that the offset increases for the distances larger than 1 kpc \citep{2018ApJ...862...61S, 2018MNRAS.478.3825L}. This has been further confirmed by many other surveys although with slightly different values \citep[e.g.,][]{2019MNRAS.487.3568S, 2019ApJ...878..136Z}. Applying this offset to our estimate of mean parallax, we found a mean parallax of 0.86$\pm$0.05 mas which corresponds a distance of $\sim$ 1.17$\pm$0.06 kpc [$(m-M)_0 = 10.33\pm0.11$ mag] for the cluster. Our estimate from Gaia DR2 thus suggests a slightly smaller distance for NGC\,1960 than the distance of 1.32$\pm$0.12 kpc obtained by \citet{2000A&A...357..471S}, 1.31 kpc obtained by \citet{2005A&A...438.1163K} and 1.33 kpc obtained by \citet{2006AJ....132.1669S, 2009MNRAS.399.2146W}. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig03.ps}} \caption{The parallax distribution of 462 stars shown in encircled region in Figure~\ref{vpd}. The bin size is taken as 0.04 mas. The thick line represents the best fit Gaussian profile. The two vertical dotted lines exhibit $3\sigma$ cut-off limits around the peak value.} \label{parallax} \end{figure} To further isolate cluster members from the contamination of field stars, we used mean cluster parallax as a second check. We eliminated all those stars which deviate from the mean parallax by more than 3$\sigma$. We thus found 263 stars out of 462 stars which lie within this region. Interestingly, we found membership probabilities of all these stars above 60\% except three stars for which membership probability lies in between 48 to 52\%. As in some previous studies \citep[e.g.,][]{2017AcA....67..203R} it was suggested that even if membership probability based on proper motions is slightly smaller but star has higher geometric probability (position with respect to cluster center) and photometric probability (location in the colour-magnitude diagram), the star could still be a cluster member. We therefore further examined these 3 stars on the basis of their spatial positions, locations in the $(B-V)/V$ and $(V-I)/V$ colour-magnitude diagrams and $(U-B)/(B-V)$ colour-colour diagram. Two of these three stars are found to be good candidates for the cluster members. Therefore, we considered 262 stars as the cluster members which are used in the subsequent analysis. \subsection{Mean proper motions of the cluster} To estimate the mean proper motions, we draw an histogram of proper motions of 262 cluster members in the x- and y- directions in Figure~\ref{pm_hist}. We fit a Gaussian profile in the distributions and mean value of the proper motion is estimated corresponding to the peak in the distribution. The mean proper motions in right ascension ($\bar{\mu_{x}}$) and declination ($\bar{\mu_{y}}$), respectively are found to be $$ \bar{\mu_{x}}=-0.143\pm0.008~mas/yr,~~~~ \bar{\mu_{y}}=-3.395\pm0.008~mas/yr $$ The mean proper motion of the cluster is determined as $(\bar\mu_{x}^2+\bar\mu_{y}^2)^{1/2}$ which is found to be 3.398$\pm$0.011 mas yr$^{-1}$. From the radial-velocity measurement of 114 stars computed from the Tycho-2 catalogue, \citet{2003ARep...47....6L} estimated a proper motions of $\bar{\mu_{x}}=0.99\pm0.17$~mas/yr and $\bar{\mu_{y}}=-3.96\pm0.15$~mas/yr for the cluster. \citet{2005A&A...438.1163K} have also determined the mean proper motions for this cluster as $0.50$~mas/yr and $-4.94$~mas/yr in $RA$ and $DEC$ directions, respectively. It is thus found that previous reported values in the literature were slightly overestimated. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=10.0cm]{fig04.ps}} \caption{Proper motion histograms with a bin size of 0.05 mas yr$^{-1}$ for the 262 cluster members. The Gaussian fit shown by thick continuous lines are drawn to determine mean proper motions of the cluster NGC\,1960.} \label{pm_hist} \end{figure} The sample of cluster members in NGC\,1960 is given in Table~\ref{mpm} which provides star ID, magnitude, colour, parallax, mean proper motions and membership probabilities for these stars and full catalogue is available online. \section{Basic parameters of NGC\,1960}\label{para} \subsection{Extinction measurement}\label{ext} \subsubsection{Reddening in optical bands}\label{red_opt} The reddening, $E(B-V)$, in the field of cluster NGC\,1960 can be estimated using the $(U-B)$ vs $(B-V)$ two-colour diagram (TCD). In our list of 262 cluster members, we found only 185 stars for which simultaneous $U$, $B$ and $V$ magnitudes are available. In Figure~\ref{bv_ub}, we illustrate $(U-B)/(B-V)$ diagram for these stars. Here, we also draw \citet{1982ND...26..14S} zero-age-main-sequence in the figure by a solid line. Lacking any prior estimate of the metallicity in the literature, we conservatively adopted a solar metallicity for the cluster. To determine the reddening, we primarily focus on those stars which have spectral type earlier than $A0$ as later type stars may be more affected by the metallicity and background contamination \citep{2003MNRAS.345..269H}. We found a reddening vector of $E(U-B)/E(B-V)=0.84\pm0.02$ in the direction of this cluster which is slightly larger than the standard reddening law of $E(U-B)/E(B-V)=0.72$ given by \citet{1953ApJ...117..313J}. From the visual best fit in the $(U-B)$ vs $(B-V)$ diagram, we estimated a reddening $E(B-V)=0.24\pm0.02$ mag. The photometric study of NGC\,1960 by \citet{2006AJ....132.1669S} suggested a non-uniform reddening across the cluster region which is apparent in the distribution of stars in the $(U-B)/(B-V)$ diagram. Our reddening estimate is consistent with the 0.22 mag obtained by \citet{2006AJ....132.1669S} and $0.25\pm0.02$ given by \citet{2000A&A...357..471S} but larger than $0.20\pm0.02$ mag determined by \citet{2008MNRAS.386..261M}. Assuming a standard reddening law, the colour-excess $E(V-I)$ was estimated as $0.30\pm0.02$ mag using the relation $E(V-I)=1.25~\times E(B-V)$ \citep{1989ApJ...345..245C}. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig05.ps}} \caption{The $(U-B, B-V)$ colour-colour diagram for the cluster members for which simultaneous $UBV$ magnitudes are available. Here, open circles represent the stars having photometric errors larger than 0.05 mag in $U$, 0.015 mag in $B$ and 0.01 mag in $V$ bands. The dashed arrow represents the slope ($0.84\pm0.02$) and direction of the reddening vector. The solid line represents the Zero-Age Main Sequence taken from \citet{1982ND...26..14S}.} \label{bv_ub} \end{figure} \subsubsection{Reddening in near-IR bands}\label{red_nir} Since NGC\,1960 is a young open cluster and possibly still embedded in the parent molecular cloud, it would be more appropriate if we determine reddening in only near-IR bands. We therefore draw the $(J-H)/(J-K)$ colour-colour diagram which is shown in Figure~\ref{infra_tcd}. We also overplot Marigo isochrones of solar metallicity \citep{2017ApJ...835...77M} by shifting the line in the direction of reddening vector. A best fit was achieved by shifting $E(J-H)$ = 0.07 mag with the ratio $\frac{E(J-H)}{E(J-K)}$ = 0.65 for the cluster. The reddening vector derived in the present study is slightly higher than the usual interstellar extinction ratio of 0.55 given by \citet{1989ApJ...345..245C}. $E(B-V)$ can be estimated from the near-IR reddening using the following relation: $$E(J-H) = 0.309 \times E(B-V)$$ The reddening $E(B-V)$ was determined as 0.23 mag for the cluster NGC\,1960. It is thus found that the reddening $E(B-V)$ derived from the near-IR photometry is in excellent agreement with the value derived from the optical photometry. Although there is some evidence of non-uniform extinction present in this cluster from the optical TCD but a consistent reddening measurement between the optical and near-IR bands suggests that non-uniform or differential extinction is not significant within the cluster. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig06.ps}} \caption{The $(J-H)/(J-K)$ diagram for cluster members. Here, open circles represent the stars which have photometric error larger than 0.05 mag in $J$, 0.15 mag in $H$ and 0.15 mag in $K$ bands. The solid line represents the best fit solar metallicity isochrones.} \label{infra_tcd} \end{figure} \subsection{Colour-magnitude diagrams and age determination}\label{cmd} Colour-magnitude diagrams (CMDs) are the most effective tool to determine distance and age of the cluster provided we know the reddening in the direction of the cluster. As we have already determined precise distance of the cluster from the parallax measurements of the cluster members and reddening $E(B-V)$ and $E(V-I)$ from the TCDs, we now turn to the determination of age of the cluster through comparison of observed CMDs to the theoretical isochrones. In Figure~\ref{col_mag}, we draw simultaneous $(B-V)/V$ and $(V-I)/V$ CMDs. Here, we do not consider those stars that have large photometric errors of $eB>0.10$ mag and $eV>0.05$ mag. The main sequence of the cluster is clearly evident in both CMDs which also implies that the membership selection based on the kinematic measurements is quite robust. We overplot Marigo's theoretical isochrones for solar metallicity \citep{2017ApJ...835...77M} on the CMDs by varying age simultaneously in both CMDs while keeping reddening $E(B-V)=0.24$ mag and $E(V-I)=0.30$ mag fixed as determined in Section~\ref{red_opt}. The distance modulus is also kept fixed to $(m-M)_0=10.33$ mag as obtained through Gaia DR2 parallaxes of the member stars. From the best visual isochrone fit to our CMDs with varying age to the blue edge of the stellar population of the main-sequence stars, we obtained $log(Age/yr)=7.44\pm0.02$ for the cluster NGC\,1960. The CMDs show a well populated but broad main sequence that may be due to the presence of binary stars within the cluster or variable reddening which we have also noticed through the scattering in $(B-V)/(U-B)$ diagram in Section~\ref{red_opt}. Therefore, to illustrate the binary effect, we also draw the same isochrones through red sequence by shifting 0.75 mag in $V$ magnitude and 0.042 in $(B-V)$ and $(V-I)$ colours in comparison of their blue sequences. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=5.5cm]{fig07b.ps}} \centerline{\includegraphics[width=8.5cm,height=5.5cm]{fig07a.ps}} \caption{The lower and upper panels show $(B-V)/V$ and $(V-I)/V$ CMDs for cluster members, respectively. The open circles represent stars containing photometric errors $eV>0.02$ mag. The solid lines represent blue and red sequences of the best fit solar metallicity isochrones for $\log$(Age)=7.44$\pm$0.02. Here, distance modulus is taken as $(m-M)_0=10.33\pm0.11$ obtained through the Gaia DR2 parallaxes and reddening $E(B-V)=0.24\pm0.02$ from the $(U-B)/(B-V)$ diagram. The two dashed black lines around the blue sequence represent the error of 0.02 mag in the reddening $E(B-V)$.} \label{col_mag} \end{figure} Based upon photometric observations, the age of the cluster NGC\,1960 has been earlier estimated as 25.1 Myr by SHA06, \citet{2009MNRAS.399.2146W} and $26.3^{+3.2}_{-5.2}$ Myr by \citet{2013MNRAS.434..806B} which are consistent with the present estimate of $27.5^{+1.3}_{-1.2}$ Myr. However, \citet{2000A&A...357..471S} determined a relatively smaller age ($16.3^{+10}_{-5}$ Myr) for this cluster albeit with very large uncertainty. Though isochrone fitting is often used to estimate the age of the cluster in the absence of more valuable but lesser available spectroscopic observations but it should be kept in mind that determining precise age through isochrone fitting in clusters, when no evolved stars are found, is relatively difficult as it lends a larger uncertainty \citep[e.g.,][]{2001MNRAS.327...23S}. Using the spectroscopic data, \citet{2013MNRAS.434.2438J} determined age of this cluster as log(t/yr)=7.34$\pm$0.08 ($\sim 22\pm4$) for the cluster through the luminosity of the stars that have not yet consumed their lithium. Their age estimation is though slightly smaller in comparison of the other estimates which is not surprising considering lithium depletion boundary (LDB) is quite sensitive to the choice of evolutionary models \citep{2013MNRAS.434.2438J}. For example, \citet{2015ApJ...813..108D} reported an age of 112$\pm$5 for the Pleiades cluster using the LDB method which is well below the commonly found age of $\sim$ 125 Myr for this young cluster. Similarly, in a recent study by \citet{2018ApJ...856...40M} on the Haydes cluster applying the same approach, they provided a range of ages between 440 to 940 Myrs for the Haydes employing four different evolutionary models. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=11.5cm]{fig08.ps}} \vspace{-0.6cm} \caption{The ($\lambda$-V)/(B-V) two-colour diagrams for the cluster members where $\lambda$ is $R$, $I$, $J$, $H$, and $K$ bands from the bottom to top panels. The open circles represent stars having photometric errors $eV>0.02$ mag. The thick continuous lines represent best fit slopes in each plot.} \label{tcd_5col} \end{figure} \subsection{Extinction law}\label{elaw} Generally, normal reddening law is applicable when dust and intermediate stellar gases are absent in the line of sight of the cluster \citep{1978APJ...223..168S}. However, reddening law is expected to be different in the presence of dust and gas. The $(V-\lambda)/(B-V)$ TCDs have been widely used to see the influence of the extinction generated by the diffuse interstellar material from that of the intra-cluster medium \citep{1990A&A...227..213C}. We investigated the nature of reddening law towards the cluster direction using $(V-\lambda)/(B-V)$ TCDs, where $\lambda$ is $R$, $I$, $J$, $H$, and $K$ bands. We illustrate the $(V-\lambda)/(B-V)$ diagrams for the cluster members in Figure~\ref{tcd_5col}. A best linear fit in the TCD for the cluster members gives the slope ($m_{cluster}$) in the corresponding TCD. The resultant values of the $m_{cluster}$ are listed in Table~\ref{tcd} along with their normal values. Our slopes are quite comparable with those obtained for the diffuse interstellar material which suggests a normal reddening law in the direction of the cluster region. \input{table06.tex} A total-to-selective extinction $R_{cluster}$ is determined using the relation given by \citet{1981A&AS...45..451N} as $$ R_{cluster}=\frac{m_{cluster}}{m_{normal}} \times R_{normal}. $$ $R_{normal}$ is known to be correlated with the average size of the dust grains causing the extinction. The typical value for $R_{normal}$ is 3.1 for the diffuse interstellar material in our Galaxy \citep{1989ApJ...345..245C}. Using $R_{normal} = 3.1$, we determined $R_{cluster}$ in these five colours and given in Table~\ref{tcd}. The global mean value of $R_{cluster}$ is estimated to be 3.10$\pm$0.06 for the cluster NGC\,1960 which is in excellent agreement with the normal extinction law in the direction of the cluster. This suggests that there is no discernible anomalous reddening in the cluster region. The basic parameters of the cluster NGC\,1960 derived in the present study are summarized in Table~\ref{parameters}. \input{table07.tex} \section{Dynamical study of the cluster}\label{dynamical} In order to understand the dynamical behaviour of the cluster NGC\,1960, the luminosity function, mass function and mass segregation process are examined in the following sub-sections. \subsection{Luminosity function} \label{vlf} The luminosity function (LF) is defined as the total number of cluster members in different magnitude bins. However, estimation of LF using a complete sample of cluster stars is not straight forward, as many biases and uncertainties are involved in its determination \citep[e.g.,][]{2012ARA&A..50...65L, 2014prpl.conf...53O}. For example, the data incompleteness increases with the fainter magnitudes. However, it is better than 90\% up to 19 mag in SHA06 and it is further improved in the present catalogue as we added more photometric data to the central region of the cluster. Hence we assumed that the photometry presented here are not affected by the data incompleteness for the stars brighter than 19 mag which we considered to determine the LF. We found 229 cluster members between the magnitude limit 9 to 19 mag in the $V$-band. The LF was estimated in a bin width of 1 mag. We estimated the mass of each star photometrically by comparing its colour and magnitude from the theoretical isochrones of solar metallicity \citep{2017ApJ...835...77M} for the estimated log(t/yr) = 7.44, extinction $E(B-V)$ = 0.24 mag, and $(m-M)_0 = 10.33$ mag. The mass for each cluster member was determined from its nearest neighbour on the selected isochrones. In Table~\ref{LF}, we provide mass range, mean mass and cluster members in different brightness range for the cluster. \input{table08.tex} \subsection{The present-day mass function} \label{lmf} The initial mass function (IMF), i.e. the frequency distribution of stellar masses at the time of birth, is a fundamental parameter in the study of star formation and evolution in the cluster. It represents the distribution of stellar masses per unit volume in a star formation event and knowledge of IMF is very effective to determine the subsequent evolution of the cluster. The direct measurement of IMF is not possible due to dynamical evolution of stellar systems though we can estimate the present-day mass function (MF) of the cluster. Since the age of the cluster NGC\,1960 is relatively young ($\sim$ 27 Myr), the present-day MF can be considered as IMF \citep{2008MNRAS.386.1380K}. The MF is defined as the relative numbers of stars per unit mass and can be shown by a power law $N(\log M) \propto M^{\Gamma}$. The slope, $\Gamma$, of the MF can therefore be determined as $$ \Gamma = \frac{d\log N(\log\it{m})}{d\log\it{m}} $$ where $N\log(m)$ is the number of stars per unit logarithmic mass. In last two columns of Table~\ref{LF}, we provide MF and corresponding error for different magnitude bins. The MF in the cluster fitted for the main-sequence stars with masses $0.72 \le M/M_{\odot} \le 7.32$ is shown in Figure~\ref{mf}. The error bars are determined assuming Poisson statistics which shows considerably large value due to lower number of stellar counts in each bin. The MF slope is found to be -1.26$\pm$0.19 with a Pearson correlation coefficient of 0.96. The quoted uncertainty in the MF slope come from the linear regression solution in the fit. In the present estimation of MF, the effect of field star contamination is considered to be negligible due to fact that only cluster members are used in the study. Our estimated MF slope is in excellent agreement with the Salpeter MF slope of -1.35 \citep{1955ApJ...121..161S}. However, \citet{2008AJ....135.1934S} reported a stepper MF slope ($\Gamma$=$-1.80{\pm}0.14$) in this cluster for the narrower mass range of $1.01 < M/M_{\odot} < 6.82$ relying on the approach based on the statistical subtraction of stars to find the probable cluster members. \begin{figure} \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig09.ps}} \caption{MF derived for the cluster NGC\,1960. The error bars represent $1/\sqrt N$ errors. The continuous line is the best fit to the mass range $0.72 \le \frac{M}{M_{\odot}} \le 7.32$. The estimated MF slope is given at the top of the plot.} \label{mf} \end{figure} To further probe the mass segregation in the cluster, we investigated the radial variation in the mass function slope. We determined MF values for two separate regions containing central region up to $5^\prime$ from the cluster center and outer region in between $5^\prime$ to $14^\prime$ which contains 138 and 97 stars, respectively. In Figure~\ref{radial_MFslope}, we illustrate MF variation in these two regions separately. The estimated slopes of the MFs in the inner and outer regions are given at the right corner of each plot in Figure~\ref{radial_MFslope}. The mass function slopes differ from each other by more than 1$\sigma$, where $\sigma$ is the error associated with the slope. As can be seen from the figure, the MF slope in the inner region is clearly flatter than the outer region while overall MF slope is in remarkable agreement with the Salpeter value. This again suggests that the mass segregation process is taking place in the cluster. \begin{figure} \centering \centerline{\includegraphics[width=8.5cm,height=11.0cm]{fig10.ps}} \caption{Same as Figure~\ref{mf} but for the regions between 0-5 arcmin (inner region) and 5-14 arcmin (outer region) from the cluster center.} \label{radial_MFslope} \end{figure} \subsection{Dynamical evolution}\label{dyna_evol} The dynamical evolution of a star cluster is primarily characterised by the mass segregation, tidal radius, crossing time, and relaxation time which are briefly discussed below. \subsubsection{Mass segregation}\label{segre} The dynamical evolution gradually drives the system towards equipartition resulting the low mass stars attaining higher velocities hence occupying larger orbits around the cluster center \citep{1986AJ.....92.1364M}. This process, commonly known as mass segregation, results in accumulating more massive stars to the core and low-mass stars to the peripheral region of the cluster. Finally, low-mass cluster members, which acquire large enough velocity from the equipartition of energy, are escaped away from the cluster's tidal field resulting change in the morphology of the spatial mass distribution in the cluster \citep{1988MNRAS.234..831S}. To study the mass segregation in the cluster NGC\,1960, we draw the variation of cumulative number in Figure~\ref{mass_segg} for the cluster members along the radial distance in three different mass bins of $M/M_\odot\le1.1$ (92 stars), $1.1<M/M_\odot\le1.5$ (64 stars), and $M/M_\odot>1.5$ (81 stars). The mass ranges are selected in order to get enough statistical sample in each bin. From the radial variations of stars in these three mass bins, it is quite evident that the massive stars are dominant in the core of the cluster while low mass stars are distributed in the outer region. This result agrees with the theoretical expectations of mass segregation effect within the cluster. We also performed Kolmogorov-Smirnov (K-S) test of these distributions to examine whether they are statistically different or not and conclude with 95$\%$ confidence level that mass segregation effect in the cluster NGC\,1960 is present. \begin{figure} \centering \centerline{\includegraphics[width=8.5cm,height=6.5cm]{fig11.ps}} \caption{The variation of cumulative distribution of cluster members in radial bins relative to the cluster center. The distribution is estimated for three different mass ranges as given at the top of the plot along with total number of cluster members in each mass bin.} \label{mass_segg} \end{figure} \subsubsection{Tidal radius}\label{Rt} The study of tidal interactions in the open clusters plays an important role in understanding the initial structure and dynamic evolution of the clusters \citep{2010MNRAS.402.1841C, 2015MNRAS.449.1811D}. The tidal radius is described as the radial distance from the cluster center where gravitational acceleration caused by the cluster is almost equal to the tidal acceleration caused due to the Galaxy \citep{1957ApJ...125..451V}. It is believed that the stars are generally gravitationally bound to the cluster within the tidal radius due to effective potential of the cluster. \citet{2000ApJ...545..301K} provided following relation to determine tidal radius $$ R_{t} = \left(\frac{M_{C}}{2 M_{G}}\right)^{1/3}\times R_{G} $$ Where $R_t$ is the tidal radius, $M_C$ is the total cluster mass and $M_{G}$ is the mass of the Galaxy within the Galactocentric radius $R_G$. Given the uncertainties in the actual masses and extent of the clusters, tidal radii are often poorly determined. Using the cluster Galactic positions and distance, we obtained the Galactocentric distance of the cluster NGC\,1960 as $R_G = 9.25$ kpc. Here, $R_\odot$, the distance between the Sun and the Galactic Centre, is considered as 8.0$\pm$0.3 kpc \citep{2012PASJ...64..136H, 2018PASP..130b4101C}. It is difficult to estimate an accurate value of $M_C$ without identifying all the low-mass members. Nonetheless, we can still make a relatively good estimate from our data because we identify cluster members down to $V=20.65$ mag having mass as low as 0.49 $M_\odot$. Using the 262 main-sequence stars within $0.49 \leq M/M_\odot \leq 7.32$ obtained in the present analysis, $M_C$ is estimated to be $\sim 416.7~M_\odot$ which yields a mean stellar mass of $\sim 1.6~M_\odot$. Employing the relation given by \citet{1987ARA&A..25..377G}, $M_{G}$ was estimated to be $\sim$ 1.57$\times$10$^{11}~M_\odot$. Using the above given relation, we obtained the tidal radius as 10.1 pc. Any star beyond this radius would be gravitationally unbound to the cluster NGC\,1960. \citet{2008A&A...477..165P} reported a slightly larger value of tidal radius as $R_{t} = 10.6\pm1.6$ pc for the cluster. This is well understood since they used a larger Galactocentric distance for the Sun which consequently has increased their assessment of tidal radius. \subsubsection{Cluster half-radius and Crossing time}\label{Rh} The cluster half-radius, R$_{h}$, is defined as the radius within which half of the total cluster mass lies. Sometimes it is also called half-mass radius. To determine R$_{h}$, we estimated cumulative mass of the stars by increasing radial distance from the cluster center. We select the radial distance where we found half of the total cluster mass. This results a R$_{h}$ of 6.5 arcmin for the cluster which corresponds to a linear radius of 2.26 pc. As we earlier obtained a cluster radius of 4.90 pc for NGC\,1960, the cluster half-radius is found to be slightly smaller but comparable in comparison of the half of the cluster linear radius. The crossing time ($t_{cr}$) defined as a time in which a star with a typical velocity travels through the cluster under the assumption of virial equilibrium: $$ t_{cr} = \sqrt{\frac{2R_h^3}{GM_C}} $$ \citep[e.g.,][]{1987degc.book.....S, 2005A&A...429..173L} where $R_h$ is the half-mass radius, $M_c$ is the total cluster mass and $G$ is the gravitational constant. We determined $t_{cr}$=3.50 Myr for the cluster NGC\,1960. For a cluster having an age of $\sim$ 27.5 Myr, this corresponds to $\approx$ 8 crossings since the formation of the cluster. It is generally believed that after several crossing times, the cluster obtains a virial equilibrium \citep[e.g.,][]{2012MNRAS.421.3338A} and becomes dynamically relaxed. \subsubsection{Relaxation time}\label{drt} The dynamical relaxation time, $T_E$, is the time in which individual cluster members exchange energies and their velocity distribution approaches Maxwellian equilibrium. The $T_E$ corresponds to the time over which the cumulative effect of stellar encounters becomes comparable to the star's velocity itself \citep{2019arXiv191104562D} and can be expressed as $$ T_E = \frac{0.89 \times (N R_h^3/\bar{m})^{1/2}} {\ln(0.4N)} $$ where $N$ is the total number of cluster members, $R_h$ is the half-radius (in parsecs), $\bar{m}$ is the mean stellar mass (in solar units) and $T_E$ is the relaxation time in Myr \citep[cf.,][]{1971ApJ...164..399S}. Considering the mean stellar mass of 1.6 M$_\odot$ and cluster half radius of 2.26 pc, we obtained dynamical relaxation time $T_E$ = 19.2\,Myr for the cluster NGC\,1960 which is very close to the present cluster age of about 27\,Myr. The star clusters generally become dynamically relaxed after few relaxation times \citet{2008AJ....135.1934S}. However, a half-mass radius comparable to the half of the cluster radius besides relaxation time comparable to present cluster age suggest that NGC\,1960 is not completely dynamically relaxed as yet and mass segregation is still an ongoing process in the cluster. A summary of the parameters obtained in the present study from the dynamical study of the cluster NGC\,1960 is given in Table~\ref{dyna}. \input{table09.tex} \section{Identification of Variable stars} \label{vs} As stated in Section~\ref{data}, we accumulated 235 frames in the $V$ band on 43 nights for the central $13^\prime \times 13^\prime$ field of the cluster NGC\,1960. We used this time-series photometric data to search for the variable stars in the cluster. Though we identified 3962 stars within $14^\prime$ radius of the cluster, we found only 1386 stars in the central $13^\prime \times 13^\prime$ target field of the ST. It should be noted here that due to varying sky conditions during various observing runs, and different exposure times in different frames, not all the stars could be identified in all the frames. As we have carried out absolute photometry on the night of 30 November 2010, we converted instrumental magnitudes of the stars into the corresponding absolute magnitudes on each night by applying the necessary photometric corrections as following. $$ V = a \times v + b$$ where $V$ and $v$ are the photometric magnitude on the night of standardization and instrument magnitude of the same star on the target frame. In each frame, we considered more than 100 stars. The coefficients $a$ and $b$ in each frame were calculated by a least square linear fit using the non-saturated stars brighter than 15 mag. Here, the color term was not used as it was found to be insignificant. We then searched for the stellar variability in 1386 stars by looking for the magnitude variations over entire monitoring period. It was noticed that due to changes in observing conditions during our observations, there was a large variation in the data quality of the photometric light curves. Before analysing variable stars, we therefore carefully eliminated possible outliers from the photometric data. In few cases, some points were removed on the basis of extreme excursions from the mean value. We considered only those stars which fall within 10 pixels from the edge of the target image and present in more than 50 images. \subsection{Periodic variables} \label{pv} In order to search for periodic variables, the time-series $V$ band magnitudes of all the 1386 stars were subjected to the periodicity analysis. We used Lomb-Scargle algorithm \citep{1976Ap&SS..39..447L, 1982ApJ...263..835S} within the software PERIOD04 \citep{2005CoAst.146...53L}, especially dedicated to the statistical analysis of large astronomical time series data containing gaps and to extract the individual frequencies from the multi-periodic content of the time-magnitude variation. This method computes the Fourier power spectrum by fitting sine and cosine terms over a large number of frequencies in the given frequency range. Only stars that lied within $V<19.5$ were considered for the variability search since photometric magnitudes have relatively large errors towards the fainter end. It is noticed that many spurious variables were also detected with periods in harmonics of 1 sidereal day i.e. at period of 1 sidereal day/n where n=2,3,4,.... We also did not consider those periodic variation where amplitude variation was smaller than the mean uncertainty in the data points. Phase for each potential variable star was calculated using the following equation: $$Phase = \left(\frac{JD - JD_0}{P}\right) - INT\left(\frac{JD - JD_0}{P}\right)$$ Where $JD$ is the time of observation, $JD_0$ is an arbitrary epoch of observation. All the periodic variables were checked by reviewing the phase folded light curves created with their periods. The light curves of only those variables were identified that showed a good periodic brightness variation over the entire phase. \begin{figure*} \vspace{-0.5cm} \centering \centerline{\includegraphics[width=18.0cm,height=24.0cm]{fig12.ps}} \caption{The phased light curves of 72 periodic variables found in the field of NGC\,1960. The star ID is given at the top of each individual light curve. Phase is plotted twice and in such a way that the minimum brightness falls near to zero phase.} \label{periodic} \end{figure*} \input{table10.tex} \begin{figure*} \centering \centerline{\includegraphics[width=15.0cm,height=11.0cm]{fig13.ps}} \caption{The time-magnitude variation of four irregular variables found in this study.} \label{irregular} \end{figure*} \input{table11.tex} After our final analysis of light curves, we selected a total of 72 stars in our target field as periodic variables having a wide range in brightness from $V$=9.1 mag to 19.4 mag. They have period ranging from 41 minute to 10.74 day. A binned phase folded light curve was constructed by producing an average of the magnitude and error from the multiple data points within 0.02 phase bins. In Figure~\ref{periodic}, we draw phase folded light curves to illustrate the periodic nature of these 72 variables. In some of the variables, occasional points are scattered away from the periodic cycle which could be due to poor observing conditions. It is evident from the figure that most of these variables show low-amplitude periodicity of the level of few tens of milli-mag. The main characteristics of the variable stars are listed in Table~\ref{table_periodic} which gives identification number, their celestial coordinates, period and type of variability. We give their intensity averaged mean magnitude and amplitude of brightness variation in $V$ band. The variables are arranged in order of increasing period. Since $B$ magnitude of all the stars could not estimated in the present photometry, $(B-V)$ colour of some of the variables could not be ascertained. \begin{figure*} \hbox{ \hspace{-0.3 cm} \includegraphics[width=11.8 cm, height=13.5 cm]{fig14a.ps} \hspace{-0.5 cm} \includegraphics[width=7.0 cm, height=12.0 cm]{fig14b.ps} } \caption{The finding chart for the 76 variable stars identified in the field of NGC\,1960. The central region of the cluster marked by rectangular area is shown in the right side of the figure. The positions of the identified variables are marked by circles along with their respective IDs as given in Tables~\ref{table_periodic} and \ref{table_irregular}.} \label{fchart} \end{figure*} \begin{figure} \includegraphics[width=8.5cm,height=6.5cm]{fig15.ps} \vspace{-0.4cm} \caption{The positions of 20 periodic variables which belong to the cluster NGC\,1960 are shown in the Temperature-Luminosity plane (H-R diagram). The continuous line represents theoretical main-sequence for the $\log$(Age)=7.44$\pm$0.02.The continuous and dashed lines represent regions of instability strips containing the $\delta$-Scuti and $\gamma$-Doradus stars, respectively while the region surrounded by dotted points are locations of slowly pulsating B type stars. All the variable star are marked with their respective IDs.} \label{hrdia_vari} \end{figure} \subsection{Irregular variables} \label{iv} Some stars found in the cluster field seem to show irregular brightness variation in our observations. On careful inspection, we found variability in four such stars for which we could not determine the period. Either they are long-period variables or their periodic nature could not be ascertained unambiguously due to our intermittent observations. Such variables are assigned as irregular variables. Among them, only two stars are classified as the cluster members. In Figure~\ref{irregular}, we show time-magnitude diagrams of these four stars. Their positions, $V$ magnitude, $(B-V)$ and $(V-I)$ colours along with amplitude in $V$ band are listed in Table~\ref{table_irregular}. These stars show a variation of brightness between 0.3 mag to 1.3 mag during a short span and could be eruptive variables which lasts from tens of seconds to tens of minutes, and then returns to its normal level of brightness on timescales of tens of minutes or hours \citep[e.g.,][]{2015ApJ...814...35C}. On the other hand, some of the variations could be due to multi-periodicity pulsation in the star. We need further observations of these kind of variables over some period of time to understand about their physical nature. In Figure~\ref{fchart}, we provide a finding chart of a $\sim 13^\prime \times 13^\prime$ $V$ band CCD frame obtained in our observations, wherein the locations of 76 variable stars identified in the present study are marked by the circles. This manifest that most of the variables are found to be located in the central region of the cluster. \section{Characterization of variable stars} \label{charac} Barring one, all the variable stars identified in the present study are newly discovered variables. Therefore, we first determine their physical parameters before characterize their nature. \subsection{Physical parameters of cluster variables} \label{parameter} To check whether variable stars identified in the present study are associated with the cluster, we cross-checked them in the list of cluster members given in Table~\ref{mpm}. Out of the 76 variables identified in the present study, only 22 of them belong to the cluster and remaining 54 belong to field stars population lying in the direction of cluster region. Among 22 variables found in the cluster, 20 are periodic variables. As NGC\,1960 is a populous cluster field in the Galactic plane, it is not surprising that many variables detected by us are actually field stars. As all the 20 variables fall in the main-sequence of the cluster, we determined their physical parameters using the well known relations. The intrinsic magnitude and color of the cluster variables are determined using the distance modulus $(m-M)_0$ = 10.33 mag and extinction $E(B-V)$ = 0.24 mag as estimated in Sect.~\ref{para}. The effective temperature $T_{eff}$ of the star was determined from $(B-V)_0$ using the relation given by \citet{2010AJ....140.1158T}. For two stars, $(B-V)_0$ was not available so we transformed $(V-I)_0$ to $(B-V)_0$ using the standard colour equation. We estimated bolometric magnitude, $M_{bol}$, of each star using the relation $M_{bol}= M_V + BC$ where $BC$ is the bolometric correction that was estimated using the $T_{eff}$ . The luminosity of the variable stars were estimated using the relation $log\,(L/L_\odot) = -0.4\,(M_{bol} - M_{bol_\odot})$ where $M_{bol_\odot}$ is the bolometric magnitude of the Sun which was taken as 4.73 mag \citep{2010AJ....140.1158T}. The parameters, luminosity [$log\,(L/L_\odot$)], bolometric magnitude ($M_{bol}$), effective temperature ($T_{eff}$) and bolometric correction ($BC$), estimated for the 20 periodic variables assigned as cluster members are listed in Table~\ref{MS_parameters}. Stellar masses of these periodic variables have been determined by placing each object on the colour-magnitude diagram and comparing their positions with the mass tracks of Marigo's theoretical isochrones for solar metallicity \citep{2017ApJ...835...77M}. In Table~\ref{MS_parameters}, we give derived masses of these stars where most massive variable star in the cluster is found to have a mass of $\sim 7 M_\odot$. \subsection{H-R diagram and classification of the cluster variables} \label{hrdia} The CMD is very useful in separating different class of variable stars. In Figure~\ref{hrdia_vari}, we show the position of these 20 periodic variables belonging to the cluster in the temperature-luminosity H-R diagram. Here, we also draw theoretical isochrones of \citet{2017ApJ...835...77M} as discussed in Sect.~\ref{cmd}. If we examine the locations of these 20 variable stars in the H-R diagram of the cluster, we found that all of them nicely fall along the main-sequence except two or three stars which seems to be reddened cluster members. In Figure~\ref{hrdia_vari}, we also show the positions of various instability strips in the H-R diagram. The theoretical instability strips for $\delta$-Scuti, $\gamma$-Doradus stars and slowly pulsating B stars (SPBs) are shown by continuous, dashed, and dotted lines, respectively taken from \citet{2011MNRAS.413.2403B}, and references therein. In order to understand nature of these 20 periodic stars, we assessed the classifications of variable stars by comparing their phase-folded light curves to the exemplar light curves for different class of variable stars. We examined the nature of their variability based on the primary observational properties such as shape of their light curves, periodicity, broad magnitude ranges, spectral classes, amplitudes of the variability and locations in the H-R diagram to the extent possible. When we inspect positions of 20 cluster variables within various instability strips in the H-R diagram as drawn in Figure~\ref{hrdia_vari} as well their distinguish characteristics, we classify (i) 2 $\delta$-Scuti stars, (ii) 3 $\gamma$-Doradus stars, (iii) 2 SPB stars, (iv) 5 rotational variables, (v) 2 non-pulsating stars, and rest 6 stars as miscellaneous class of variables which do not fall in any particular category. In the following subsections, we individually describe the nature of each variability class. \subsubsection{$\delta$-Scuti variables} \label{delta-scuti} $\delta$-Scuti stars are $p$-mode pulsating variables with period smaller than 0.3 day. They belong to spectral type between $A2$ to $F2$ and locate within the $\delta$-Scuti instability strips. We found two stars, V27 and V35 in the cluster whose characteristics are similar to $\delta$-Scuti variables. The variable V35 is located in the middle of the blue and red edges of $\delta$-Scuti instability strip. However, V27 is close to the cool border of $\delta$-Scuti instability strip which also overlaps with the $\gamma$-Doradus instability strip. However, it has very low period of about 0.208 d which makes it an ideal candidate for the $\delta$-Scuti pulsator. However, one cannot rule it out V27 as a possible $\delta$~Scuti-$\gamma$-Doradus hybrid variable as many such hybrid candidates are already known in the open clusters \citep[e.g.,][]{2008ApJ...675.1254H, 2012MNRAS.419.2379J} and they offer vital constraints on the stellar structure due to their simultaneous existence of two different pulsations modes. \subsubsection{$\gamma$-Doradus variables} \label{gamma-dor} $\gamma$-Doradus are multi-periodic variable star pulsating in the $g$-modes. These are typically young, early $F$ or late $A$ type main-sequence stars with periods in the range of about 0.3 to 3 day and brightness fluctuations $\sim$ 0.1 mag \citep{2011MNRAS.415.3531B}. They fall in a fairly small region in the $\gamma$-Doradus instability strips which is typically below the $\delta$-Scuti instability strip though some portion of the instability strips of these two classes overlaps. On the basis of physical characteristics of 20 cluster variables and their position in the H-R diagram, we found three stars V60, V62 and V63 which belong to the class of $\gamma$-Doradus variables. Though these three stars lie very close to the blue edge of the $\delta$-Scuti instability strip, but their high period in excess of 0.56 day suggest that they could be $\gamma$-Doradus star. \subsubsection{Slowly pulsating B type stars} \label{spb} SPB stars are pulsating stars having periods 0.5 day up to a few days. Their instability strip in the H-R diagram is shown by the dotted line in Figure~\ref{hrdia_vari}. These are two bright stars, V53 and V58, having brightness more than 10.8 mag and temperature larger than 10000 K falling within the region of SPB instability strips and we classified them as SPB stars. The brightest star in our catalogue of variables is $V53$ which is a well known bright star BD +34 1113 in the SIMBAD and reported to be an eruptive variable in the GCVS catalogue. In our study, the bolometric magnitude of this star comes out to be about -3.73 mag with an effective temperature of $\sim$ 20,000 K which confirms its designated spectral type by of $B2Ve$ by \citet{2012MNRAS.420.2884S} who found very high-level of IR-excess in this star. $V53$ is reported to be a variable in the Hipparcos data with a period of 16.86 day in the AAVSO catalogue. Though star got saturated in most of our frames but on the basis of 43 data points where magnitude of this star could be determined, we found a periodicity of 0.597 day having an amplitude of 0.06 mag. Its small period, high temperature and location in the SPB instability strips suggests that this star is indeed a SPB star. \subsubsection{Rotational variables} \label{rot} Stellar rotation and magnetic activity are normally associated with a main-sequence star of $G$ or later spectral type. These stars are characterized by small amplitude, typically less than 0.1 mag and red in colour $(B-V)_0 > 0.5$ mag. To identify the rotational variables in the present study, we first identify those cluster members which have late-type spectral class. Among 20 cluster members which show periodicity in the present study, 5 stars are found to have $(B-V)_0$ redder than 0.5 mag and show less than 0.10 mag brightness variations in $V$ band. We characterize them as rotational variables. It is very much possible that periodic variation of these 5 stars are due to cool photospheric spots whose brightness is modulated by the stellar rotation. The number of cool spots in these stars is related to their surface magnetic field. It is reported that the level of magnetic activity is larger in young clusters \citep{2010A&A...513A..29M}. As NGC\,1960 is a young cluster having an age of about 27 Myr, it is not surprising that many stars in the cluster are found to be rotational variables. \input{table12.tex} \subsubsection{Non-pulsating variables} \label{npul} We found two bright $B$ type stars V40 and V41 between the cool edge of the SPB and the hot edge of the $\delta$-Scuti instability strips and found to have similar properties like period ($\sim$ 0.3 day), amplitude ($\sim$ 0.02 mag) and mass ($\sim$ 2.6 M$_\odot$). We classify these stars as non-pulsating variables as suggested by \citet{2011MNRAS.413.2403B}. The origin of this grouping as non-pulsating variable is not clear, but may be related to the rotation. On the basis of such stars found between the $\beta$-Cep and SPB instability strips in the Kepler data, \citet{2011MNRAS.413.2403B} suggested some of them may be binary stars. In young open clusters NGC\,3766 and Stock\,8, \citet{2013A&A...554A.108M} and \citet{2019AJ....158...68L} have also found a large population of new variables between SPB and $\delta$-Scuti stars, the region where no pulsation mechanisms were expected on the basis of theoretical evolutionary models. \subsubsection{Miscellaneous variables} \label{misc} There are some periodic stars which could not be classified in any particular class of variables on the basis of their estimated parameters and phased light curves. We found six such variables in the cluster namely V39, V42, V46, V49, V52 and V71 which are classified as Miscellaneous variables in the present study and marked as $Misc$ in Table~\ref{MS_parameters}. While first five stars are relatively faint, the variable V71 is quite a bright star lying in the region between the instability strips of the $\delta$-Scuti and SPB stars. \subsection{Eclipsing binaries} \label{eb} On the basis of phased light curves of 72 periodic variables, we identified only star having ID V47 as eclipsing binary system (EBs). This star with a rotation period of 0.4717 day clearly shows two eclipses with different depth. Classical approach of frequency analysis does not succeed to extract true period of EBs, so we estimated period of V47 from the eclipse minima and by the visual inspection of the phase diagram for the multiple periods. According to the variability type listed in the Moscow General Catalog of Variable Stars (GCVS), we classified V47 as W UMa eclipsing binary star. The star is found to belong field population according to its membership probability ($p$ = 0.01) given in Table~\ref{catalog}. As it is not possible to do a detailed analysis of V47 in the present analysis, a follow-up paper is in preparation that includes modelling of its photometric light curves and spectroscopic analysis in order to determine its physical parameters and examination of stellar spots. It should be noted that many EBs might have been escaped from our detection due to short time base and low duty cycle, particularly when most of the photometric variations we detected are extremely low amplitudes. \section{Discussion and Conclusions}\label{summary} The cluster parameter based on the photometric analysis may be subject to selection bias as many genuine cluster members are left out from the sample. Though lack of the identification of true members may not have much effect on the determinations of parameters like reddening, age, distance modulus and metallicity but imparts significant impact on the dynamical study of the cluster like mass segregation, relaxation time, and half cluster radius. It is however extremely difficult to extract all the genuine members of a cluster on the basis of photometric observations due to their identification issue. On the other hand, cluster membership assignments based on the kinematic studies have always been considered more reliable than those obtained through the photometric analysis. In the present study, we performed an extensive photometric and kinematic investigation of a relatively young open cluster NGC\,1960. We made a multi-band photometric catalogue of 3962 stars in the cluster by supplementing our $UBVRI$ data with the SHA06 photometric data along with the archival photometric, near-IR and kinematic data. We determined membership probabilities of the stars based on their kinematic data provided by the most accurate proper motions catalogue produced till date through the Gaia DR2 survey. As membership probabilities cannot be sole criteria to identify the true cluster members, we further used stellar parallaxes to isolate cluster members. The precision of the Gaia DR2 proper motions coupled with the strength to distinguish cluster members through its parallax measurements allowed us to isolated cluster members quite remarkably. We found a total of 262 stars which belong to the cluster NGC\,1960. This number is relatively low in comparison of the total number of stars found in the target field. However, it is not surprising as the cluster lies very close to the Galactic mid-plane ($b \approx 1$ deg) due to which Galactic field star population is very dominant in the target field. We obtained a mean cluster parallax of 0.86$\pm$0.05 mas, excluding the stars showing large errors ($e\overline\omega>0.2$) in their parallax measurements. This corresponds to a mean distance of $\sim$ 1.17$\pm$0.06 kpc and distance modulus of $(m-M)_0 = 10.33\pm0.11$ mag. The mean proper motion of the cluster was determined to be -0.143$\pm$0.008~mas/yr and -3.395$\pm$0.008~mas/yr in the direction of RA and DEC, respectively. On the basis of $(U-B)/(B-V)$ colour-colour diagram, the reddening $E(B-V)$ was estimated as 0.24$\pm$0.02 mag in the optical bands which was found to be 0.23 mag in the near-IR data, in agreement with the optical reddening. Since NGC\,1960 shows some signature of differential extinction across the cluster region in its $(U-B)/(B-V)$ diagram, it indicates that the cluster may still be embedded within the parent molecular cloud. We estimated an average total-to-selective extinction ratio as 3.10$\pm$0.08 that is in excellent agreement to the normal value. However, colour-excess ratio $E(U-B)/E(B-V)$ is found to be slightly higher than the normal one. Our measurement of reddening gives a visual extinction of $A_V = 0.74\pm0.08$ mag in the direction of the cluster. Exploiting prior knowledge of reddening through colour-colour diagram, and distance through the parallaxes of cluster members, we determined the age of the cluster through the colour-magnitude diagrams. We obtained an age of $27.5^{+1.3}_{-1.2}$ Myr for the cluster NGC\,1960 by visually fitting a recently available solar metallicity isochrones of \citet{2017ApJ...835...77M}. Since our observations are complete up to 19 mag, we constructed the luminosity function up to this brightness limit only which then converted into the mass function. The mass function slope (MF slope) in the cluster was determined for the stars in the mass range $0.72 \le M/M_{\odot} \le 7.32$ and MF slope was found to be $\Gamma = -1.26\pm0.19$ which is nearly equal to the Salpeter value of $\Gamma = -1.35$ in the solar neighbourhood. This is well expected considering the cluster NGC\,1960 is relatively young and dynamical evolution has not changed the primordial MF in a significant way. Our result of MF slope consistent with Salpeter value further validates the universal IMF in the Milky way, even though star clusters have a wide range of properties across the Galaxy \citep[e.g.,][]{2019arXiv191107267C}. We also constructed mass function slopes for the inner and outer regions, and observed that the slope is flatter in the inner region than in the outer region, suggesting an ongoing mass segregation process in the cluster. The relaxation time of the cluster was found to be smaller than its age which implies that the cluster is not yet dynamically relaxed. Using the 262 members stars for which $V$ magnitudes are available down to 20.7 mag, we derived a total cluster mass of $\approx$ 417 M$_\odot$ with a mean stellar mass of $\approx$ 1.6 M$_\odot$. Although our selection criteria retrieves most of the cluster members, we still emphasize that the estimated cluster mass could be a lower-limit to the actual total mass of the cluster and mean mass of 1.6 M$_{\odot}$ be considered as upper limit of the stellar mass for the same reason. The photometric and kinematic studies of NGC\,1960 have been done extensively in the past, however, no variability study was performed on this cluster so far. As search for variable stars is one of the primary goal of our ongoing survey, we carried out a long-term observations of the cluster NGC\,1960 in the $V$ band. We monitored the central $13^{\prime}\times13^{\prime}$ region of NGC\,1960 on 43 nights over a period of more than three years. As we found out 1386 stars in the target field, the search for the variability among these stars has been performed. Through the present survey, we have first provided time-series $V$ band photometric analysis of 76 variable stars, all of them newly detected except one. The variables range in $V$-band magnitudes from 9.1 mag to 19.4 mag. Among 76 stars detected in the present study, 72 stars are found to be periodic variables with a period range of 41 minutes to 10.74 days. Majority of these stars are short-period variables having period smaller than 1 day. We could not detect any variable with period longer than 10.74 days because of the large gaps between the observing cycles. Most of the short period variables have relatively small amplitudes and we could retrieve amplitude of light variability down to the 0.02 mag level. Out of 72 periodic variables, 20 are identified as cluster members therefore we could obtain their masses, effective temperatures, and bolometric luminosities. Two of the cluster members show irregular variability similar to stellar flares but data is insufficient to visualize any conclusive characteristics. Rest of the 54 variables are identified as field stars population lying in the direction of the cluster. The light curves analysis of 20 cluster variables along with the estimated characteristic parameters suggested that 2 of them may belong to $\delta$-Scuti stars, 3 could be $\gamma-$Doradus type stars, 5 as rotational variables, 2 as SPB stars, and 2 non-pulsating B stars. We could not classify 6 stars in any specific category and characterized them as miscellaneous variables. We also found one star V47 as W UMa eclipsing binary star belonging to the field stars population. We compared our catalog of variable stars with the variables listed in the AAVSO International Variable Star Catalogue \citep{2017yCat....102027W} and found only one common variable which is identified as BD+34 1113 in the SIMBAD. On the basis of Gaia DR2 kinematic data, this star belong to the cluster NGC\,1960 and we classified it as a slowly pulsating B type star in the present study. \section*{Acknowledgments} We are thankful to various observers of 104-cm ST for their contributions in accumulating photometric data of this cluster during 2009-2013. We are also grateful to Saurabh Sharma for providing photometric catalogue that has been used in the present study. We used data from the Two Micron All Sky Survey, which is a joint project of the University of Massachusetts; the Infrared Processing and Analysis Center/California Institute of Technology, funded by the NASA. This work has made use of data from the European Space Agency (ESA) mission Gaia (https://www.cosmos.esa.int/Gaia), processed by the Gaia Data Processing and Analysis Consortium (DPAC, https://www.cosmos.esa.int/web/GAIA/dpac/consortium). \bibliographystyle{mnras}
\section{Introduction} Deep neural networks are widely adopted in many fields of study, \textit{e.g.}, computer vision and natural language processing, and achieve state-of-the-art results. However, as their inner workings are not transparent, the correctness and objectivity of the predicting results cannot be guaranteed and thus limit their development in industry. In recent years, some researchers have begun to explore interpretable deep leaning methods. \cite{zhang2017mdnet} focuses on network interpretability in medical image diagnosis. \cite{montavon2017explaining} decomposes output into contributions of its input features to interpret the image classification network. There is also a clear need to develop an interpretable neural network in driving monitoring as the predicting results will directly affect the safety of drivers, passengers, and pedestrians. In this paper, we present a highly interpretable neural network to detect hands in images, which is a basic task in driving monitoring. Hand detection in natural scenes plays an important role in virtual reality, human-computer interaction, driving monitoring~\cite{7, 36}. It is a critical and primary task for higher-level tasks such as hand tracking, gesture recognition, human activity understanding. Particularly, accurately detecting hand is a vital part in monitoring driving behavior~\cite{36, 37}. Detecting hands in images is a challenging task. The illumination conditions, occlusion, and color/shape similarity will bring great difficulties to hand detection. Moreover, hands are highly deformable objects, which hard to detect due to their variability and flexibility. Hands are not always shown in an upright position in images, so the rotation angle needs to be considered to locate the hand in images more accurately. The problem of hand detection has been studied for years. Traditional methods extract features such as skin-related features~\cite{3}, hand shape and background, Histograms of Oriented Gradients (HOG)~\cite{2} to build feature vector for each sample. Then these vectors are used to train classifiers such as SVM~\cite{12}. Although the hand-crafted features have clear meanings and are easy to understand, they are too limited to meet the requirements for the accuracy of hand detection in the real world. With the increasing influence of Convolutional Neural Networks (CNNs) in the field of computer vision, many CNN-based object detection methods have emerged, Region-Based Convolutional Networks(R-CNNs)~\cite{4}, Single Shot MultiBox Detector (SSD)~\cite{6}, for example. Inspired by these advances, many CNN-based methods have been proposed to deal with hand detection. Features are extracted automatically by designed CNNs from the original images~\cite{8,23} or the region proposals~\cite{7} and then used to locate the hands in original images. In order to extract as many effective features as possible to detect hand more accurately, the network structure is always very complicated and therefore has a heavy computational burden. This limits its value in practical applications such as monitoring driving behavior and sign language recognition. The deep CNNs are used as black-boxes in the existing methods. Different from hand-crafted features, it is difficult to know the meaning of features extracted by CNNs. As a result, the stability and robustness of these methods cannot be guaranteed. \begin{figure}[!t] \centering \includegraphics[width=3.2in]{liu1.pdf} \caption{Different connection modes of multi-scale features. (a) Serial mode. (b) Cascade mode.} \label{connection_mode} \end{figure} In view of the issues mentioned above, we propose an interpretable framework, Pixel-wise Hand Detection Network (PHDN), to detect hands more efficiently. The proposed method achieves better performance with faster computational speed. An explainable module named Highlight Feature Fusion (HFF) block is developed to get more discriminative features. With HFF block, PHDN performs effectively and stably in different image contexts. To the best of our knowledge, this is the first time to give reasonable explanations of learned features in the hand detection procedure. Popular deep convolutional neural networks VGG16~\cite{13} or ResNet50~\cite{10} is adopted as a backbone network in PHDN. The HFF block makes full use of multi-scale features by weighting the lower-level features with the higher-level features. In this way, the discriminative features, namely the effective ones for locating the hand, are highlighted in the detection procedure. Each HFF block fuses features from two layers. It first weights the lower-level features by the last higher-level feature maps and then fuses the features by convolution operations. Several HFF blocks are connected in cascade mode (see Fig.~\ref{connection_mode}(b)) to iteratively fuse multi-scale features, which greatly reduces computational overhead and saves time compared to the serial connection (see Fig.~\ref{connection_mode}(a)). As PHDN makes hand region predictions with multi-scale features, it is more robust to hands of different sizes. In other words, our model is scale-invariance. As for the rotated hand detection, adding additional rotation and derotation layers \cite{9} makes the network more complicated and thus increases the computational burden and time overhead. We propose the rotation map and the distance map to store the rotation angle and the geometry information of the hand region respectively, which handles the rotation hands without increasing complexity of the network and learns more interpretable representations of angles by recording angles of pixels directly. In the training process, we add supervision to each HFF block. Deep supervision to the hidden layers makes the learned features more discriminative and robust, and thus the performance of the detector is better. The auxiliary losses accelerate the convergence of training in a simple and direct way compared with \cite{60}, which accelerates training by constraining the input weight of each neuron with zero mean and unit norm. Existing detection methods make predictions for grid cells~\cite{25} or default boxes~\cite{6}, which need to seek appropriate anchor scales. Alternatively, we predict hand regions at pixel resolution to avoid the adverse effects of improper anchor scales settings, for which we name our model as Pixel-wise Hand Detection Network. Detecting hands at pixel level also explains what pixels are the basis for its decision, which improves transparency of the model. The hand regions predicted by PHDN are filtered by the Non-Maximum Suppression (NMS) to yield the final detection results. To evaluate our model, experiments are conducted on two authentic and publicly accessible hand detection datasets, the VIVA hand detection dataset~\cite{11} and the Oxford hand detection dataset~\cite{12}. Compared with the state-of-the-art methods, our model achieves competitive Average Precision (AP) and Average Recall (AR) on VIVA dataset with 4.23 times faster detecting speed, and obtains 5.5\% AP improvement on Oxford dataset. Furthermore, we test the PHDN with the hand tracking task on VIVA hand tracking dataset~\cite{42}, which is a higher application scenario of hand detection. We try three tracking-by-detection methods: SORT tracker~\cite{39}, deep SORT tracker~\cite{40} and IOU tracker~\cite{41}, where the PHDN acts as a detector. Experimental results show that using any of the aforementioned tracking algorithms based on our detector can achieve better results than existing methods. It indicates that PHDN is robust and practicable as the detector performance plays a crucial role in tracking-by-detection multiple object tracking methods. Part of the work has been introduced in \cite{57}. The extensions made in this article compared to \cite{57} are as follows: (1) We analyze the interpretability of our model by visualizing the features extracted by HFF block to interpret our model. It shows the mechanism of internal layers and demonstrates how our method outperforms the others. (2) We integrate our detector with the popular trackers to track hands in videos and achieve state-of-the-art results on the authoritative VIVA hand tracking challenge dataset \cite{42}. (3) We give a more detailed description of our model including related work in hand detection and multiple hand tracking in vehicles, network architecture, feature fusion processing, loss functions and the settings and results of conducted experiments. The main contributions of this paper are in four folds: \begin{itemize} \item We give insight to the interpretability of the hand detection network for the first time. Reasonable explanations for the feature activated in hand detection procedure and the discriminative features learned by HFF block are first given. The proposed Pixel-wise Hand Detection Network predicts hand regions at pixel resolution rather than grid cells or default boxes. It gets rid of the adverse effects of inappropriate anchor scales and can detect different sizes of hands by fusing multi-scale features with the cascaded HFF blocks. \item The rotation map is designed to predict hand rotation angles precisely. It learns and represents the angles in an interpretable way with less computational cost. \item Auxiliary losses are added to provide supervision to hidden layers of the network, leading to faster convergence of the training and higher precision. \item Experiments on VIVA and Oxford hand detection datasets show that PHDN achieves competitive performance compared with the state-of-the-art methods. Evaluated on the VIVA hand tracking dataset, tracking-by-detection trackers such as SORT tracker, deep SORT tracker and IOU tracker with the PHDN detector outperform the existing hand tracking methods. \end{itemize} The remainder of this paper is organized as follows. In Section~\ref{related_work}, we review the related work in the field. Section~\ref{proposed_framework} gives a detailed description of the proposed method. Section~\ref{experiment} introduces the datasets and experimental setup, reports and analyzes the results. Finally, concluding remarks are presented in Section~\ref{conclusion}. \begin{figure}[!t] \centering \includegraphics[width=3.8in]{liu2.pdf} \caption{Novel and transparent representation of the rotation angle. We use the rotation map to store the rotation angle instead of adding rotation and derotation layers \cite{9} to networks.} \label{rotation_map} \end{figure} \section{Related Work} \label{related_work} \subsection{Hand Detection} Current hand detection methods can be divided into two categories. One is based on the hand-crafted structured features, such as color, shape and so on. The other is based on features extracted by CNNs. The methods based on hand-crafted features have strong interpretability, but the detection performance is poor due to the limitations of features. On the contrary, CNNs-based methods tend to have good performance but poor interpretability. \subsubsection{Human-interpretable Features Based Methods} Hand detection methods that use human crafted features usually propose hand regions using features like skin color, hand shape, Histograms of Oriented Gradients (HOG) \cite{44}. These features have specific meanings and are easy to understand. Then the features are used to train a classifier, such as Support Vector Machine (SVM)~\cite{12}, to generate the final detection results. \cite{32} uses the skin and hand shape features to detect hands from images. Skin areas are extracted first using a skin detector and the hands are separated out using hand contour comparison. However, it may be confusing when distinguishing between face and fist since their contours are similar. \cite{12} generates hand region proposals using a hand shape detector, a context-based detector and a skin-based detector. Then a SVM classifier, with the score vectors built by the three detectors as input, is trained to classify the hand and non-hand regions. To enhance the robustness of hand detection in cluttered background, \cite{33} proposes three new features based on HOG, Local Binary Patterns (LBP) and Local Trinary Patterns (LTP) descriptors to train classifiers, but it does not perform well if the image is low resolution and it cannot handle well with occlusion. \cite{2} trains a SVM classifier with the HOG features, and extends it with a Dynamic Bayesian Network for better performance. Due to the limitation of hand-crafted features, these methods are not robust to the change of illumination, background and hand shape. Moreover, the non-end-to-end optimization process is time-consuming and the performance is often suboptimal. \subsubsection{Non-transparent CNNs Based Methods} Inspired by the progress of Convolutional Neural Networks (CNNs), many hand detection methods proposed recently are based on CNNs. \cite{7} presents a lightweight hand proposal generation approach, of which a CNN-based method is used to disambiguate hands in complex egocentric interactions. Context information, such as hand shapes and locations, can be seen as prior knowledge, and they can be used to train a hand detector~\cite{24}. However, it is no doubt that additional context cues over-complicates the image preprocessing step. Inspired by these, \cite{8} first generates hand region proposals with the Fully Convolutional Network (FCN)~\cite{15} and then fuses multi-scale features extracted from FCN into a large feature map to make final predictions, as a result of which the convolution operations are time-consuming in the later steps. Similarly, \cite{23} concatenates the multi-scale feature maps from the last three pooling layers into a large feature map. Although different receptive fields are taken into consideration, simple concatenation of feature maps results in high computational cost. In contrast to human-crafted features, the features extracted by CNNs are not interpretable and thus the rationality and validity of the model are difficult to verify. In order to provide interpretability to CNN-based hand detection models, we detect hands at pixel level. For any pixel in the image, we predict whether it belongs to a hand and the bounding box of the hand. In this way, we can know the basis for the model to make predictions. Under the fact that the high-level feature maps reflect the global features while the low-level feature maps contain more local information, the feature maps from different scales are weighted before merged so that the features from multiple scales can complement each other in the subsequent process. In view of the heavy computational burden caused by the fusion of multi-scale information, our model fuses multi-scale features iteratively rather than simultaneously. Another issue of hand detection is to handle the rotation. Hands are rarely shown in upright positions in images. To accurately detect hands and estimate their poses, \cite{9} designs a rotation network to predict the rotation angle of region proposals and a derotation layer to obtain axis-aligned rotating feature maps (see Fig.~\ref{rotation_map}). However, the method is of great complexity as it includes two components for rotation, a shared network for learning features and a detection network for the classification task. It is also hard to find out what the rotation and derotation layers really learn. To handle rotated hand samples more effectively, we develop the rotation map to replace the complex rotation and derotation layers, as shown in Fig.~\ref{rotation_map}. It is also more interpretable as each pixel value represents the rotation angle directly. The results on the Oxford hand detection dataset show that the rotation map brings a significant increase (about 0.30) in AP compared to using only the distance maps. \subsection{Multiple Hand Tracking in Vehicles} Tracking hands in the vehicle cabin is important for monitoring driving behavior and research in intelligent vehicles. Although hand tracking has been studied since the last century, there are few studies on tracking multiple hands simultaneously in naturalistic driving conditions. To the best of our knowledge, only \cite{37} has given the research results on multiple hand tracking so far. \cite{37} proposes a tracking-by-detection method, where each video frame is processed by the detector first and then integrates with a tracker to provide individual tracks online. The ACF detector~\cite{52} is used to generate hand detection results and the data association is performed using a bipartite matching algorithm. It reports the tracking results on the VIVA hand tracking dataset. To investigate the performance of our model in hand tracking, we apply PHDN to SORT tracker~\cite{39}, deep SORT tracker~\cite{40}, IOU tracker~\cite{41}. SORT tracker and deep SORT tracker are online tracking methods, where only the current and previous frames are visible to the tracker. SORT tracker performs Kalman filtering in image space and uses the Hungarian method to associate detections across frames in a video sequence. Deep SORT tracker is developed for the many identity switches in SORT tracker. It adopts a novel association metric with more motion and appearance information compared to the IOU distance used in SORT tracker. The reported results show the deep SORT tracker has fewer identity switches than the SORT tracker. IOU tracker is an offline tracking method that can generate trajectories with all observations in the video. It associates the detection with the highest IOU to the last detection in previous frames to extend a trajectory. It can run at 100K fps as its complexity is very low. The tracking performance depends largely on the detector. Therefore, we conduct experiments on the VIVA hand tracking dataset with our detector and we use three trackers to evaluate our model in the practical tracking task. \begin{figure}[!t] \centering \includegraphics[width=0.87\textwidth]{liu3.pdf}% \caption{PHDN architecture with VGG16 as the backbone. The left is feature extracting stem, and the right is feature fusion branch and the output layers. Highlight Feature Fusion (HFF) block is marked with red dotted rectangle.} \label{net_arch} \end{figure} \section{Interpretable Pixel-wise Hand Detection Network} \label{proposed_framework} The PHDN architecture is illustrated in Fig.~\ref{net_arch}. To show our model more clearly, only the VGG16 backbone is presented in the figure for its simpler structure compared with ResNet50. The feature maps from four different scales extracted by the VGG16 extractor or ResNet extractor are fused iteratively in the cascaded HFF blocks. The final feature maps, containing multi-scale information, are upsampled and convoluted to get the score map, the rotation map and the distance map. With the three kinds of maps, we can restore the hand bounding boxes and filter them by the NMS to generate the final hand regions. In the following, we describe the pipeline in detail and construct the loss function for the training. \subsection{Feature Extraction} We try two popular deep convolutional networks, \textit{i.e.}, VGG16 and ResNet50, to extract features from the images. The pre-trained model on the ImageNet dataset~\cite{20} is used in our study. Feature maps from four layers are selected for the feature fusion module. For VGG16, we adopt the feature maps from \textit{pooling-2} to \textit{pooling-5}. Similarly, the outputs of \textit{conv2\_1}, \textit{conv3\_1}, \textit{conv4\_1} and \textit{conv5\_1} are extracted in ResNet50. The feature maps extracted from VGG16 or ResNet50 are $(\frac{1}{4})^2, (\frac{1}{8})^2, (\frac{1}{16})^2, (\frac{1}{32})^2$ the size of input images, and represent information of different sizes of receptive fields. \begin{algorithm}[H] \caption{Feature Fusion Procedure} \begin{algorithmic}[1] \label{alg:HFF} \REQUIRE~~\\ Feature maps extracted by VGG16 or Resnet50, $f_s, s \in \{0,1,2,3\}$;\\ Channels of fused feature maps, $c_s, s \in \{0,1,2,3\}$; \ENSURE~~\\ Fused feature maps, $f'_s, s \in \{0,1,2,3\}$; \STATE $f'_3 = f_3$ \FOR{$s$ from $2$ to $0$} \STATE $u_{s+1}=Upsampling(f'_{s+1})$; \STATE $masked=f_s * (1-Convolution(u_{s+1}, 1\times1))$; \label{code:mask} \STATE $Concate = Concatenate(masked, u_{s+1})$; \STATE $Conv1 = Convolution(Concate, 1\times1, c_s)$; \STATE $Conv2 = Convolution(Concate, 3\times3, c_s)$; \STATE $f'_s=Conv2$ \ENDFOR \RETURN $f'_s, s \in \{0,1,2,3\}$; \end{algorithmic} \end{algorithm} \subsection{Visually Interpretable and Robust Feature Fusion} \label{s_fusion} The size of hands varies greatly in different images or even the same image. The larger hand detection needs more global information. It is known that the higher the level of feature maps, the more global the information is presented. Hence multi-scale feature maps should be merged to detect different sizes of hands. We propose to fuse the feature maps from multiple layers in an iterative way to reduce the computational cost, which can be achieved by cascaded feature fusion blocks as shown in Fig.~\ref{connection_mode}(b) To reduce the interference of useless features and learn more discriminative features, we develop the Highlight Feature Fusion (HFF) block to fuse the features from different scales. Fig.~\ref{net_arch} displays three cascaded HFF blocks, which are marked with red dotted rectangles. The cascaded HFF blocks operate the fusion as Algorithm \ref{alg:HFF}. We generate a mask with the higher-level feature maps to filter the common features in the current level feature maps, which formulated as Line~\ref{code:mask} above and $*$ denotes element-wise multiplication. Masking $f_{s}$ with the complementary feature maps of $u_{s+1}$ can highlight the fine-grained distinctive information contained in $f_{s}$ that $u_{s+1}$ may not have. $Conv1$ is the result of conducting a $1\times1$ convolution on the concatenated feature maps. It is designed to reduce the output channels and thus lessen the computational burden. Then a $3\times3$ convolution is operated to further fuse the features of multiple scales. To investigate the effect of the mask, we remove the mask operation and concatenate $f_{s}$ and $u_{s+1}$ directly as a Base Feature Fusion (BFF) block in our experiments. We visualize features extracted by HFF block and BFF block to interpret the robustness and effectiveness of HFF block in Section \ref{interpret}. \begin{figure}[!t] \centering \includegraphics[width=0.96\textwidth]{liu4.pdf}% \caption{Restore hand bounding boxes from the rotation map and distance map.} \label{restore_rectangle} \end{figure} \subsection{Pixel-wise hand detection} For each pixel in the image, we generate the confidence that it belongs to a hand region and the corresponding hand bounding box. In this way, the model can interpret what features the prediction is based on. The following paragraphs elaborate on this process. After the last HFF block, the feature maps go through a $3\times3$ convolution and then be upsampled to the same size as the input image. Finally, $1\times1$, $1\times1$ and $3\times3$ convolutions are employed to generate the score map, rotation map and distance map respectively. The three kinds of map are the same size as the original images, and their pixels correspond one by one. Similar to the confidence map used in Fully Convolutional Networks (FCN)~\cite{15}, each pixel value in the score map, a scalar between $0$ and $1$, represents the confidence that the corresponding pixel in the input image belongs to a hand region. The rotation map is developed for the rotated hand detection issue. It records the rotation angle of the hand bounding box and the range of the angle is $(-\pi/2, \pi/2)$. Inspired by the work of \cite{34}, we use the distance map to store the geometry information of the hand box. The distance map has four channels, recording distances to the boundaries of the corresponding hand bounding box, denoted as $d_t,\ d_r,\ d_b,\ d_l$ in Fig.~\ref{restore_rectangle}. Hand boxes are generated with the rotation map and distance map for pixels whose scores are higher than a given threshold in the score map. An example is given in Fig.~\ref{restore_rectangle} to illustrate the restoring process for pixel $p$. Based on the distance map we can obtain the distances $d_t,\ d_r,\ d_b,\ d_l$ from $p$ to the four boundaries (top, right, bottom, left) of the rectangle $R_p$. In order to calculate the coordinates of $ p_{0},\ p_{1},\ p_{2},\ p_{3}$ in image coordinate system (drawn in black in Fig.~\ref{restore_rectangle}), an auxiliary coordinate system (drawn in red in Fig.~\ref{restore_rectangle}) is introduced with $p_{3}$ as the origin. The directions of X-axis and Y-axis are the same as the image coordinate system. We rotate $R_p$ to the horizontal around $p_{3}$. The corresponding position of $p$ in the rotated rectangle $R'_p$ is denoted as $p'$. Let $(x', y'),\ (x_{i}', y_{i}'),\ i\in\{0, 1, 2\}$ be the coordinates of $p,\ p_i,\ i\in\{0, 1, 2\} $ in the auxiliary coordinate system. For the clockwise rotation of rectangle $R_p$, we have \begin{equation} \label{r_pi} \begin{split} M\left(\theta \right) \left( \begin{array}{c} x' \\ y' \end{array} \right) &= \left( \begin{array}{c} d_l \\ -d_b \end{array} \right),\\ M\left(\theta \right) \left( \begin{array}{c} x_{0}' \\ y_{0}' \end{array} \right) &= \left( \begin{array}{c} 0 \\ -(d_t+d_b) \end{array} \right), \\ M\left(\theta \right) \left( \begin{array}{c} x_{1}' \\ y_{1}' \end{array} \right) &= \left( \begin{array}{c} d_l+d_r \\ -(d_t+d_b) \end{array} \right), \\ M\left(\theta \right) \left( \begin{array}{c} x_{2}' \\ y_{2}' \end{array} \right) &= \left( \begin{array}{c} d_l+d_r \\ 0 \end{array} \right), \end{split} \end{equation} where $M\left(\theta \right)$ is the rotation matrix in two-dimensional space, which can be formulated as \begin{equation} \label{r_matrix} M\left(\theta \right)= \left( \begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{array} \right). \end{equation} $\theta$ is the rotation angle with counter-clockwise as the positive direction, and it can be restored from the rotation map in our experiments. Finally, the coordinates $(x_{i}, y_{i}), i\in\{0, 1, 2, 3\}$ of $ p_{i}$ in the image coordinate system are calculated by \begin{equation} \label{cal_ords} \begin{split} \left( \begin{array}{c} x_{3}\\ y_{3} \end{array} \right) &= \left( \begin{array}{c} x\\ y \end{array} \right) - \left( \begin{array}{c} x'\\ y' \end{array} \right), \\ \left( \begin{array}{c} x_{i}\\ y_{i} \end{array} \right) &= \left( \begin{array}{c} x_{i}'\\ y_{i}' \end{array} \right) + \left( \begin{array}{c} x_{3}\\ y_{3} \end{array} \right),\ i \in \{0, 1, 2\}. \end{split} \end{equation} $(x, y)$ are the coordinates of $p$ in the image coordinate system. According to Eq.~ \eqref{r_pi}$\sim$\eqref{cal_ords}, the hand bounding box $R_p=\{(x_{i},y_{i})|i\in\{0,1,2,3\}\}$ corresponding pixel $p$ can be restored with the rotation map and distance map. Many redundant detection bounding boxes are produced by the network. To generate pure detection results, we use the NMS to filter the boxes with low scores and high overlapping rates. \subsection{Auxiliary Supervision} The detection loss function usually includes the confidence loss and the location loss. Specific to our method, the confidence loss is calculated with the score map, and the location loss consists the rotation loss and the geometry loss, related to the rotation map and distance map respectively. To learn a more discriminative mask in the HFF, deep supervision is added to the intermediate HFF blocks with auxiliary losses ($L_s,\ s=1,2,3$ in Fig.~\ref{net_arch}) besides the $L_0$ for the output. The overall objective loss function is formulated as \begin{equation} \label{loss} L = \sum\limits_{s \in S}w_{s}L_s, \end{equation} where $S=\{0,1,2,3\}$ represents the scale index of the HFF blocks as shown in Fig.~\ref{net_arch} and the parameter $w_{s}$ adjusts the weight of the corresponding scale. For scale $s$, the loss $L_s$ is a weighted sum of the losses for the score map $L^{[s]}_{sco}$, rotation map $L^{[s]}_{rot}$ and distance map $L^{[s]}_{dis}$: \begin{equation} \label{scale_loss} L_s = \alpha L^{[s]}_{sco}+ \beta L^{[s]}_{rot} + L^{[s]}_{dis}. \end{equation} The factors $\alpha$ and $\beta$ control the weights of the three loss terms. We describe these three parts of the loss in detail below. \subsubsection{Loss Function of Score Map} Regarding the score map as a segmentation of the input image, we use the Dice Similarity Coefficient~\cite{17} (DSC) to construct the loss for score map. DSC measures the similarity between two contour regions. Let $P,\ G$ be the point sets of two contour regions respectively, then the DSC is defined as \begin{equation} DSC(P, G) = \dfrac{2 |P\bigcap G|}{|P|+|G|}. \end{equation} $|P|$ (\textit{}. $|G|$) represents the number of elements in set $P$ ($G$). As the ground truth of the score map is a binary mask, the dice coefficient can be written as \begin{equation} DSC(P, G) = \dfrac {2 \sum \nolimits_{i=1}^N{p_ig_i}}{\sum \nolimits_{i=1}^N{p_i^2}+\sum \nolimits_i^N{g_i^2}}, \end{equation} where the sums run over all $N$ pixels of the score map. $p_i$ is the the pixel in the score map $P$ generated by the detection network, and $g_i$ is the pixel in the ground truth map $G$. Based on the dice similarity coefficient, the dice loss is proposed and proved to perform well in segmentation tasks~\cite{16,17,18}. Motivated by this strategy, the loss for the score map is formulated as \begin{equation} \label{s_loss} L_{sco} = 1 - \dfrac {2 \sum \nolimits_{i=1}^N{p_ig_i}+\varepsilon_0}{\sum \nolimits_{i=1}^N{p_i^2}+\sum \nolimits_{i=1}^N{g_i^2}+\varepsilon_0}, \end{equation} where $\varepsilon_0$ is the smooth. \subsubsection{Loss Function of Rotation Map} The rotation map stores the predicted rotation angles for corresponding pixels in the input image. The cosine function is adopted to evaluate the distance between the predicted angle $\tilde{\theta}_i$ and the ground truth $\theta_i$. Consequently, we can calculate the loss of rotation map by \begin{equation}\label{r_loss} \centering L_{rot}= 1- \frac{1}{N}\sum_{i=1}^N\cos\left(\tilde{\theta}_i-\theta_i \right). \end{equation} \subsubsection{Loss Function of Distance Map} As for the regression of the object bounding box, the $l_2$ loss~\cite{55} performs the four distances $d_t,\ d_r,\ d_b,\ d_l$ as independent variables, which may mislead the training when only one or two bounds of the predicted box are close to the ground truth. To avoid this, \cite{54} proposes the IoU loss which treats the four distances as a whole. Besides, the IoU loss can handle bounding boxes with various scales as it uses the IoU to norm the four distances to $[0, 1]$. In other words, the IoU loss is scale-invariant, which is important to detect hands of different sizes. The IoU loss for the distance map is calculated as \begin{equation}\label{d_loss} \centering \begin{split} L_{dis}&=-\frac{1}{N}\sum_{i=1}^N \ln\dfrac{I^{[i]}+\varepsilon_1}{U^{[i]}+\varepsilon_1},\\ I^{[i]} &= I_h^{[i]} * I_w^{[i]},\\ I_h^{[i]} &= min(d_t, \tilde{d_t})+min(d_b, \tilde{d_b}), \\ I_w^{[i]} &= min(d_l, \tilde{d_l})+min(d_r, \tilde{d_r}),\\ U^{[i]} &= X^{[i]} + \tilde{X}^{[i]} - I^{[i]},\\ X^{[i]} &= (d_t + d_b) * (d_l+d_r),\\ \tilde{X}^{[i]} &= (\tilde{d}_t + \tilde{d}_b) * (\tilde{d}_l+\tilde{d}_r), \end{split} \end{equation} where $N$ is the number of pixels in the distance map and $\varepsilon_1$ is the smooth term. $I^{[i]}$ and $U^{[i]}$ denote the intersection and union of the predicted box $\{\tilde{d}_t,\tilde{d}_r, \tilde{d}_b,\tilde{d}_l\}$ and the ground truth $\{d_t,d_r,d_b,d_l\}$ respectively. \section{Experiments}\label{experiment} We evaluate our detector on three benchmark datasets: the VIVA hand detection dataset~\cite{11}, the Oxford hand detection dataset~\cite{12} and the VIVA hand tracking dataset~\cite{42}. \subsection{Experimental Settings} All experiments are conducted on an Intel(R) Core(TM) i7-6700K @ 4.00GHz CPU with a single GeForce GTX 1080 GPU. We try two backbone networks: VGG16~\cite{13} and ResNet50~\cite{10} for feature extraction and use the pre-trained models on ImageNet~\cite{20}. We employ the network with the Base Feature Fusion (BFF) block as our base model and conduct ablation experiments to evaluate the performance of the Highlight Feature Fusion (HFF) block and the auxiliary losses. Training is implemented with a stochastic gradient algorithm using the ADAM scheme. We take the exponential decay learning rate, the initial value of which is $0.0001$ and decays every $10,000$ iterations with rate $0.94$. The weight parameters $w_{s}, s\in\{1,2,3,4\}$ are all set to $1$ for default. The hyper-parameters $\alpha$, $\beta$ are set to $0.01$ and $20$, respectively. Besides, the score map threshold is set to $0.8$. In other words, all the pixels that obtain scores higher than $0.8$ are considered in the bounding box restoration. Then the bounding boxes are filtered by the NMS with a threshold $0.2$. In order to reduce the over-fitting risk and improve the generalization performance of the model, a variety of data enhancement strategies are employed. We randomly mirror and crop the images, as well as distort the hue, saturation and brightness for color jittering. Due to the limitation of the GPU capacity, the batch size is set as $12$ and all the images are resized to $512\times 512$ before fed into the network in training. When predicting on the test dataset, the original size of the input image is preserved as the network is a fully convolutional network that allows arbitrary sizes of input images. \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Results on VIVA Hand Detection Dataset} \label{VIVAResults} \resizebox{\textwidth}{!}{ \begin{tabular}{l lll l} \hline Methods & \tabincell{c}{Level-1\\(AP/AR)/\%} & \tabincell{c}{Level-2\\(AP/AR)/\%} & Speed/fps & Environment\\ \hline MS-RFCN~\cite{8} & \textbf{95.1/94.5} & 86.0/\textbf{83.4} & 4.65 & \multirow{2}{*}{6 [email protected], 32GB RAM, Titan X GPU}\\ MS-RFCN~\cite{22} & 94.2/91.1 & \textbf{86.9}/77.3 & 4.65 & \\ Multi-scale fast RCNN~\cite{23} & 92.8/82.8 & 84.7/66.5 & 3.33 & 6 [email protected], 64GB RAM, Titan X GPU\\ FRCNN~\cite{24} & 90.7/55.9 & 86.5/53.3&-&-\\ YOLO~\cite{25} & 76.4/46.0 & 69.5/39.1 & 35.00 & 6 [email protected], 16GB RAM, Titan X GPU\\ ACF\_Depth4~\cite{11} & 70.1/53.8 & 60.1/40.4&-&-\\ \hline Ours (VGG16+BFF) & 88.9/82.8 & 72.6/56.7 & 13.88 &\multirow{6}{*}{4 [email protected], 32GB RAM, GeForce GTX 1080}\\ Ours (VGG16+BFF+Auxiliary Losses) & 92.9/88.3 & 80.9/62.7 & 13.16 &\\ Ours (VGG16+HFF+Auxiliary Losses) & 92.3/89.1 & 83.6/68.8 & 13.10 &\\ Ours (ResNet50+BFF) & 93.7/89.9 & 83.6/73.6 & 20.40 &\\ Ours (ResNet50+BFF+Auxiliary Losses) & 94.0/90.1 & 85.7/74.0 & 20.00 &\\ Ours (ResNet50+HFF+Auxiliary Losses) & \textbf{94.8}/\textbf{91.1} & \textbf{86.3}/\textbf{75.8} & 19.68 &\\ \hline \end{tabular}} \end{table} \begin{figure*}[!t] \centering \includegraphics[width=\textwidth]{liu5.pdf}% \caption{Precision-Recall curves and ROC curves (logarithmic scale for x-axis) on VIVA dataset.} \label{VIVA_curve} \end{figure*} \subsection{Evaluations on VIVA Hand Detection Dataset} VIVA Hand Detection Dataset is published by the Vision for Intelligent Vehicles and Applications Challenge~\cite{11} for hand detection subtask. The dataset includes $5,500$ training and $5,500$ testing images. The images are collected from $54$ videos captured in naturalistic driving scenarios. There are $7$ possible viewpoints in the videos. Annotations for the images are publicly accessible. The bounding boxes of hand regions in an image are given by $(x, y, w, h)$ in the \textit{.txt} format annotation file. $x, y$ are the upper-left coordinates of the box and $w$, $h$ are the width and height of the box, respectively. As the given annotations are axis-aligned, the rotation angles are set to $0$ in training and the predictions are axis-aligned bounding boxes in our experiments on this dataset. We evaluate the algorithms on two levels according to the size of the hand instances using the evaluate kit provided by the Vision for Intelligent Vehicles and Applications Challenge. \textit{Level-1} focuses on the hand instances with a minimum height of $70$ pixels, only over the shoulder (back) camera view, while \textit{Level-2} evaluates hand samples with a minimum height of $25$ pixels in all camera views. Evaluation metrics include the Average Precision (AP) and Average Recall (AR). AP is the area under the Precision-Recall curve and AR is calculated over $9$ evenly sampled points in log space between $10^{-2}$ and $10^{0}$ false positives per image. As performed in PASCAL VOC~\cite{27}, the hit/miss threshold of the overlap between a pair of predicted and ground truth bounding boxes is set to $0.5$. As presented in Table.~\ref{VIVAResults}, we compare our methods with MS-RFCN~\cite{8,22}, Multi-scale fast RCNN~\cite{23}, FRCNN~\cite{24}, YOLO~\cite{25} and ACF\_Depth4~\cite{11}. The Precision-Recall curves and ROC curves of these methods and our model (ResNet50+HFF+Auxiliary Losses) are shown in Fig.~\ref{VIVA_curve}. Our model achieves $92.3\%/89.1\%$ (AP/AR) at \textit{Level-1} while $83.6\%/68.8\%$ (AP/AR) at \textit{Level-2} using VGG16 as the backbone network. The ResNet50 based PHDN network obtains more accurate performance, \textit{i.e.}, $94.8\%/91.1\%$ (AP/AR) at \textit{Level-1} and $86.3\%/75.8\%$ (AP/AR) at \textit{Level-2}. Apart from the accuracy, the detection speed is also an important metric. As we can see in Table.~\ref{VIVAResults}, YOLO~\cite{25} performs hand detection in real-time, but its accuracy is unsatisfactory. On the contrary, MS-RFCN~\cite{8} performs against other detectors in accuracy but the detecting speed is very slow, \textit{i.e.}, $4.65$ fps. With our PHDN based on VGG16 and ResNet50, the detection speeds are up to $13.10$ and $19.68$ fps, respectively. The model (ResNet50+HFF+Auxiliary Losses) obtains competitive accuracy while a $4.23$ times faster running speed compared to \cite{8}. Therefore, it is of great significance that our model achieves a good trade-off between accuracy and speed. \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Results on Oxford Hand Detection Dataset} \label{OxfordResults} \centering \resizebox{.5\columnwidth}{!}{ \begin{tabular}{ll} \hline Methods & AP/\%\\ \hline MS-RFCN~\cite{8} & \textbf{75.1}\\ Multiple proposals~\cite{12} & 48.2\\ Multi-scale fast CNN~\cite{23} & 58.4\\ \hline Ours (VGG16+BFF) & 68.7\\ Ours (VGG16+BFF+Auxiliary Losses) & 77.8\\ Ours (VGG16+HFF+Auxiliary Losses) & 78.0\\ Ours (ResNet50+BFF) & 78.2\\ Ours (ResNet50+BFF+Auxiliary Losses) & 78.6\\ Ours (ResNet50+HFF+Auxiliary Losses) & \textbf{80.6}\\ \hline \end{tabular} } \end{table} \begin{figure}[!t] \centering \includegraphics[width=\textwidth]{liu6.pdf}% \caption{Precision-Recall curve and ROC curve on oxford dataset.} \label{oxford_curve} \end{figure} \subsection{Evaluations on Oxford Hand Detection Dataset} Oxford Hand Detection Dataset consists of three parts: the training set, the validation set and the testing set, with $1,844$, $406$ and $436$ images separately. Unlike the VIVA dataset, the images in Oxford dataset are collected from various different scenes. Moreover, the ground truth is given by the four vertexes $(x_i, y_i), i \in \{1,2,3,4\}$ of the box in the format of \textit{.mat} and not necessarily to be axis-aligned but oriented with respect to the wrist. The rotation angle will be calculated furthermore in our experiments. According to the official evaluation tool\footnote{\url{http://www.robots.ox.ac.uk/~vgg/data/hands/index.html}} on the Oxford dataset, we report the performance on all the ``bigger'' hand instances, those with more than $1,500$ pixels. As shown in Table.~\ref{OxfordResults}, similar to the results on VIVA dataset, ResNet50 performs better than VGG16 as a backbone network. Specifically, ResNet50 based PHDN achieves an improvement of $5.5\%$ in AP score compared with the state-of-the-art MS-RFCN~\cite{8}. VGG16 based PHDN still outperforms MS-RFCN~\cite{8} by $2.9\%$ in AP score. The Precision-Recall curve and ROC curve are presented in Fig.~\ref{oxford_curve}. In addition, it is worth mentioning that the detecting speed on the Oxford dataset is up to $62.5$ fps using ResNet50 while $52.6$ fps using VGG16. \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{Results on VIVA Hand Tracking Dataset} \label{VIVATrackingResults} \centering \resizebox{\textwidth}{!}{ \begin{tabular}{l|l| llllll ll} \hline \multicolumn{2}{c|}{Methods} & MOTA/\% & MOTP/\% & Recall/\% & Precision/\% & MT/\% & ML/\% & IDS & FRAG\\ \hline \multirow{4}{*}{Online}&TDC(CNN)~\cite{37} & 25.1 & 64.6 & - & - &39.1 & 18.8 & 34 & 415\\ & TDC(HOG)~\cite{37} & 24.6 & 64.5 & - & - & 35.9 & 17.2 & 39&426\\ \cline{2-10} & Ours+SORT & 83.4 & \textbf{78.4} & \textbf{90.4} & 92.8 & \textbf{87.5} & 3.13 & 2 & \textbf{88}\\ & Ours+Deep SORT& \textbf{85.2}& 77.6 & 90.1 & \textbf{94.9} & 84.4 & \textbf{1.56} & \textbf{1} &106\\ \hline \multirow{2}{*}{Offline}&TBD~\cite{56} & 6.75 & 65.96 & - & - &50 & 12.5 & 29 & 320\\ \cline{2-10} & Ours+IOU & \textbf{83.6} & \textbf{77.1} & \textbf{90.0} & \textbf{93.3} & \textbf{84.4} & \textbf{3.13} & \textbf{5} & \textbf{159}\\ \hline \end{tabular} } \end{table} \subsection{Evaluations on VIVA Hand Tracking Dataset} VIVA hand tracking dataset is built by the Vision for Intelligent Vehicles and Applications Challenge for hand tracking sub contest. There are 27 training and 29 test sequences captured under naturalistic driving conditions in this dataset and 2D bounding box annotations of hands are provided with \textit{\{frame, id, bb\_left, bb\_top, bb\_width, bb\_height\}}. Evaluation metrics~\cite{37} follow standard multiple object tracking and are listed as follows. \begin{itemize} \item \textbf{MOTA (The Multiple Object Tracking Accuracy):} A comprehensive metric combining the false negatives, false positives and mismatch rate. \item \textbf{MOTP (The Multiple Object Tracking Precision):} Overlap between the estimated positions and the ground truth averaged by all the matches. \item \textbf{Recall:} Ratio of correctly matched detections to ground truth detections. \item \textbf{Precision:} Ratio of correctly matched detections to total result detections. \item \textbf{MT (Most Tracking):} Percentage of ground truth trajectories which are covered by the tracker output for more than 80\% of their length. \item \textbf{ML (Most Lost):} Percentage of ground truth trajectories which are covered by the tracker output for less than 20\% of their length. \item \textbf{IDS (ID Switches):} Number of times that a tracked trajectory changes its matched ground truth identity. \item \textbf{FRAG (Fragments):} Number of times that a ground truth trajectory is interrupted in the tracking result. \end{itemize} For MOTA, MOTP, Recall, Precision and MT, greater values mean better performance, whereas the ML, IDS and FRAG are the smaller the better. To evaluate our detector, we employ the SORT tracker~\cite{39}, deep SORT tracker~\cite{40} and IOU tracker~\cite{41} to associate our detection results to extend a trajectory on the VIVA hand tracking dataset. The results are reported in Table.~\ref{VIVATrackingResults}. The model (ResNet50+HFF+Auxiliary Losses) is used to generate detection results. Note that, we present the Recall and Precision of our method as they are metrics concerned with the detection performance in multiple object tracking. Our model (ResNet50+HFF+Auxiliary Losses) performs much better than the existing methods on this dataset. It indicates that our detector is practicable and well-performed in hand tracking task. \begin{figure}[!t] \centering \includegraphics[width=\textwidth]{liu7.pdf} \caption{The change of AP with $\alpha$ and $\beta$ on the Oxford dataset. \label{ap} \end{figure} \subsection{Ablation Study} Ablation experiments are conducted to study the effect of different aspects of our model on the detection performance. We choose the ResNet50 as a default backbone network and Oxford hand detection dataset to do further analysis of our model. \begin{figure}[!t] \centering \includegraphics[width=4.5in]{activation.pdf} \caption{Visual explanations for predictions. The heatmap in the blue-yellow-red color scale is added to the original image to show the activated regions.} \label{activation_vis} \end{figure} \subsubsection{Interpretable and Robust HFF Block} \label{interpret} Some visual explanations for the effectiveness and robustness of HFF block are given in Fig.~\ref{activation_vis}. The activation feature map is converted into a blue-yellow-red color scale and then added to the original input image to see which pixels are activated in the detection procedure. We can see that the HFF block is good at locating discriminative pixels comparing with the BFF block. The HFF block keeps off confusing parts like faces and feet. It can also activate the hand pixels accurately even in clutter background as shown in the second example in Fig.~\ref{activation_vis}(b). HFF block uses the mask to filter the redundant features of the corresponding layer while the BFF does not. From Table.~\ref{VIVAResults} and \ref{OxfordResults}, we can see that the HFF block outperforms the BFF block whether using the VGG16 or ResNet50 as the backbone. Specifically, with VGG16 as the backbone and evaluated at \textit{Level-2}, HFF block achieves an improvement of $2.7\%$ in AP and $ 6.1\%$ in AR on VIVA hand detection dataset. With ResNet50, there are $0.6\%$ in AP and $1.8\%$ in AR respectively. The AR score is improved greatly, which indicates that the model with the HFF block produces less false negatives than the BFF block and makes better use of the distinctive features of different scales. The HFF block also show better performance on the Oxford dataset: It gains an improvement of $0.2\%$ in AP score with VGG16 and $2.0\%$ with ResNet50 comparing to the BFF block. \subsubsection{Influence of the Score Map and Rotation Map} We adjust the value of $\alpha$ in Eq.~\eqref{loss} to find appropriate weights of score map in training. The results are reported in Fig.~\ref{ap}(a). As $\alpha$ increases from $0.01$ to $1$, the AP increases first and then decreases. It reaches the maximum $0.7966$ when $\alpha$ takes $0.10$ in our experiments. As we can see, if weight the classification loss highly, the AP score will decline ($0.7966$ vs. $ 0.7738 $). In other words, over consideration of score map brings declines in AP score , which is consistent with the fact that the detection is not a simple classification task, but also involves bounding box regression. The rotation map is designed to predict the rotation angle of the box and further locate the hand more accurately. To investigate the role it plays in the detection, we control the weights of rotation map in the training process by changing $\beta$ in Eq.~\eqref{loss}. We first set $\beta$ to $0$, \textit{i.e.}, ignore the rotation map in training, to obtain detection results. Then we try four different values ($1$, $5$, $10$ and $20$) for $\beta$ to train models and evaluate all the detection results on the Oxford test set. The AP score and corresponding $\beta$ are plotted in Fig.~\ref{ap}(b) When considering the rotation angle in the optimization procedure, \textit{i.e.}, $\beta>0$, the AP score is stable and larger than $0.78$ for all the values of $\beta$ tried in our experiments. Otherwise, there is a significant drop in the AP score ($0.8061$ vs. $0.4991$) on Oxford dataset when $\beta$ is set as $0$. Therefore, the rotation map plays a very important role in optimizing the final model and can improve the locating accuracy greatly. \begin{figure}[!t] \centering \includegraphics[width=0.6\textwidth]{liu8.pdf} \caption{Training time and AP score vs. different numbers of scales on the Oxford dataset.} \label{time} \end{figure} \subsubsection{Effectiveness of Auxiliary Supervision} In order to investigate the effectiveness of the auxiliary losses, we train models considering different numbers of scales. The variation of training time and AP score with the number of supervision scales is shown in Fig.~\ref{time}. The number of scales $1, 2, 3, 4$ correspond to $ S=\{0\}, S=\{0,1\}, S=\{0,1,2\}, S=\{0,1,2,3\}$ in Eq.~\eqref{loss} respectively. From Fig.~\ref{time}, we can see that the time it takes for the model to convergence decreases as the number of scales used in loss function increases. The convergence of the network is accelerated significantly (more than $10$ hours) by adding auxiliary losses into the total loss. At the same time, the AP score is stable regardless of the number of scales. It can be concluded that the auxiliary losses accelerate the training process without sacrificing the AP score. This is attributed to the multiple supervision to the intermediate layers of the network. \begin{figure}[!t] \centering \includegraphics[width=\textwidth]{liu9.pdf \caption{Detection results visualization. Annotations of VIVA hand detection dataset and VIVA hand tracking dataset are horizontal bounding boxes. Images in Oxford hand detection dataset are labeled with wrist-oriented boxes.} \label{visualize} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=\textwidth]{liu10.pdf \caption{Detection results comparisons. (a) and (b) compare the performance between our PHDN based on ResNet50 model (cyan bounding boxes) and Multi-scale fast RCNN~\cite{23} (red bounding boxes). (c) and (d) show the ground truth and our tracking results on the VIVA hand tracking dataset.} \label{comparison} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=0.75\textwidth]{false.pdf \caption{Incorrectly detection examples using PHDN model with ResNet50 as backbone.} \label{false} \end{figure} \subsubsection{Visualization Results} We show several qualitative detection examples in Fig.~\ref{visualize}. As these results show, our model can handle different scales of hands and shapes in various illumination conditions, even the blurred samples. Fig.~\ref{comparison} compares our detection results with Multi-scale fast RCNN and shows the tracking results and the corresponding ground truth on the VIVA hand tracking dataset. We can see that our model achieves fewer false positives and produces more accurate hand locations compared with the visualization results given in~\cite{23}. Besides, the model trained with rotated hand labels on the Oxford dataset is capable to predict hand rotation angle precisely. Further, applied into the hand tracking task, our model generates satisfactory trajectories as we can see in Fig.~\ref{comparison}. Fig.~\ref{false} shows some false detected samples. The false detections can be divided into three types: (1) When the color or shape of the hand is very close to the background, it may mislead the model to make false predictions or result in missed detection. (2) The faces and feet with confusing colors and shapes are incorrectly detected as hand regions by the model. (3) Heavy occlusions cause missed detection, \textit{e.g.}, the hand obscured by the toy is not recognized in Fig.~\ref{false}(b). Our model does not perform well in these situations possibly because the context information, such as surroundings and similar hand color or shape objects, is not thoroughly mined and integrated effectively. We will investigate the effect of context information in future work and try to address these issues. \section{Conclusion}\label{conclusion} Existing hand detection neural networks are "black box" models and people cannot understand how they make automated predictions. This hinders their application in areas such as driving monitoring. In this paper, we present the interpretable Pixel-wise Hand Detection Network (PHDN). To the best of our knowledge, this is the first study towards interpretable hand detection. The pixel-wise prediction shows the basis of detection and provides the model interpretability. Features from multiple layers are fused iteratively with cascaded Highlight Feature Fusion (HFF) blocks. This allows our model to learn better representations while reducing computation overhead. The proposed HFF block outperforms the Base Feature Fusion (BFF) block and improves the detection performance significantly. To gain insight into the reasonability of the HFF block, we visualize regions activated by the HFF block and BFF block respectively. The visualization results demonstrate that the HFF block highlights the distinctive features of different scales and learns more discriminative ones to achieve better performance. Complex and non-transparent rotation and derotation layers are replaced by the rotation map to handle the rotated hand samples. The rotation map is interpretable because it directly records the rotation angles of pixels as features. It makes the model more transparent. In addition, deep supervision is added with auxiliary losses to accelerate the training procedure. Compared with the state-of-the-art methods, our algorithm shows competitive accuracy and runs a $4.23$ times faster speed on the VIVA hand detection dataset and achieves an improvement of $5.5\%$ in average precision at a speed of $62.5$ fps on Oxford hand detection dataset. Our detector is practical, for which it can track hands better in naturalistic driving conditions compared with other methods on VIVA hand tracking dataset. For future work, we will enhance the transparency and robustness of our model and apply our detector to real-world scenarios such as driving monitoring and virtual reality. \section*{References}
\section{Introduction} The inverse scattering theory aims to reconstruct the unknown objects from the wave measurements. This plays an important role in many areas such as radar, nondestructive testing, medical imaging, geophysical prospection and remote sensing. We refer to the standard monograph \cite{CK} for a research statement on the significant progress both in the mathematical theories and the numerical approaches. A practical difficulty is that the measurements are not easy or even impossible to be taken all around the unknown objects. Actually, the measurements are often available at a few sensors (i.e., a sparse array). At a fixed sensor, it is easy to vary frequency to obtain more data. This is still a small set of data, which indeed brings many difficulties for the solvability of the inverse problems. The first result is given in 2005 by Sylvester and Kelly \cite{SylvesterKelly}, where they considered the linear inverse acoustic source problems and showed that a convex polygon containing the unknown source with normals in the observation directions can be uniquely determined by the multi-frequency sparse far field patterns. This implies, even for such a small data set, that one can make a meaningful statement about the size and location of the source. A factorization method using sparse multi-frequency far field measurements is recently introduced in \cite{GriesmaierSchmiedecke-source} to produce a union of convex polygons that approximate the locations and the geometry of well-separated source components. We also refer to \cite{AlaHuLiuSun}, where a direct sampling method using sparse multi-frequency far field measurements is designed to reconstruct the location and shape. Surprisingly, even the concave part of the source support can be well reconstructed with enough observation directions. However, the corresponding theoretical basis is still not established. The direct sampling method is also generalized for inverse acoustic, elastic and electromagnetic source scattering problems with phased or phaseless multi-frequency sparse far field data \cite{JiLiu-elastic,JiLiu-electromagnetic, JiLiuZhang-source}. It is also shown in \cite{AlaHuLiuSun} that the smallest annular centered at the sensor that containing the source support in ${\mathbb R}^3$ can be uniquely determined by the multi-frequency scattered fields taken at the sensor. Difficulties arise for the inverse obstacle/medium scattering problems because these problems are nonlinear. Sylvester and Kelly \cite{SylvesterKelly} considered Born approximation to the inverse medium problem and obtain similar results with the inverse source problem. The MUSIC (MUltiple-SIgnal-Classification) algorithm \cite{GriesmaierSchmiedecke} is studied for locating small inhomogeneities. Based on the weak scattering approximation and the Kirchhoff approximation, a direct sampling method is proposed for location and shape reconstruction of the underlying objects \cite{JiLiu-sparse} by using multi-frequency sparse back-scattering far field measurements. In practical radar and remote sensing, faraway objects radiate fields that, within measurement precision, are nearly those radiated by point like objects. The objects may be a sum of point sources or point like scatterers. This paper aims to identify their locations and strengths based on multi-frequency sparse near or far fields. Our main focus in this paper is the uniqueness theories and numerical algorithms for determining the point like objects. In the recent manuscript \cite{JiLiu-sparse}, the point like obstacles have been considered with multi-frequency sparse backscattering far field patterns. This paper clarifies the smallest number of sensors to be used. Furthermore, we show the uniqueness of the scattering strengths and introduce the corresponding formula. Based on the uniqueness analyses, some novel direct methods are designed to locate the points and to reconstruct the scattering strengths. We refer to \cite{ZGLL} for locating point sources using direct sampling methods with the single frequency far field patterns at all the observation directions. The remaining part of the work is organized as follows. In the next section, we introduce the inverse scattering of point sources and the inverse scattering of plane waves by point like scatterers. We then proceed in the Section \ref{uniqueness} for the uniqueness results with sparse data. Section \ref{NumMethods} is devoted to some numerical methods for reconstructing the numbers, locations and strengths of the point objects. The numerical methods are then verified in Section \ref{NumExamples} by extensive examples. \section{Scattering by point objects} We begin with the formulations of the acoustic scattering problem. Let $k=\omega/c>0$ be the wave number of a time harmonic wave, where $\omega>0$ and $c>0$ denote the frequency and sound speed, respectively. In the whole paper, we consider multiple frequencies in a bounded band, i.e., \begin{eqnarray}\label{kassumption} k\in (k_{-}, k^{+}), \end{eqnarray} with two positive wave numbers $k_{-}$ and $k^{+}$. Recall the fundamental solution $\Phi_k(x,y), x,y\in {\mathbb R}^n, x\neq y,$ of the Helmholtz equation, which is given by \begin{eqnarray}\label{Phi} \Phi_k(x,y):=\left\{ \begin{array}{ll} \displaystyle\frac{ik}{4\pi}h^{(1)}_0(k|x-y|)=\frac{e^{ik|x-y|}}{4\pi|x-y|}, & n=3, \\ \displaystyle\frac{i}{4}H^{(1)}_0(k|x-y|), & n=2. \end{array} \right. \end{eqnarray} Here, $h^{(1)}_0$ and $H^{(1)}_0$ are, respectively, spherical Hankel function and Hankel function of the first kind and order zero. {\bf Point sources.} We consider an array of $M$ point sources located at $z_1, z_2,\cdots, z_M\in{\mathbb R}^{n}$ in the homogeneous space ${\mathbb R}^{n},n=2,3$, denote by $\tau_m\in{\mathbb C}\backslash\{0\}$ the scattering strength of the $m$-th point source. The scattered field $u^s$ is a solution of the following equation \begin{eqnarray*} \Delta u^s +k^2 u^s = \sum_{m=1}^{M}\tau_m\delta_{z_m} \quad \mbox{in}\,\, {\mathbb R}^n, \end{eqnarray*} $\delta_{z_m}$ denoting the Dirac measure on ${\mathbb R}^n$ giving unit mass to the point $z_m,\,m=1,2,\cdots,M$. Precisely, the scattered field $u^s$ is given by \begin{eqnarray}\label{us-source} u^s(x,k)=\sum_{m=1}^{M}\tau_m\Phi_k(x,z_m), \quad x\in{\mathbb R}^n\backslash\{z_1, z_2,\cdots, z_M\}. \end{eqnarray} From the asymptotic behavior of $\Phi_k(x,y)$ we conclude that \begin{eqnarray}\label{sourceasyrep} u^s(x,k) =\frac{e^{i\frac{\pi}{4}}}{\sqrt{8k\pi}}\left(e^{-i\frac{\pi}{4}}\sqrt{\frac{k}{2\pi}}\right)^{n-2} \frac{e^{ikr}}{r^{\frac{n-1}{2}}}\left\{\sum_{m=1}^{M}\tau_j e^{-ik\hat{x}\cdot z_j} +\mathcal{O}\left(\frac{1}{r}\right)\right\}\quad\mbox{as }\,r:=|x|\rightarrow\infty, \end{eqnarray} Therefore, the far field pattern is given by \begin{eqnarray}\label{uinf-source} u^{\infty}(\hat{x},k)=\sum_{m=1}^{M}\tau_m e^{-ik\hat{x}\cdot z_m}, \end{eqnarray} where $\hat{x}\in {\mathbb S}^{n-1}:=\{x\in{\mathbb R}^n:|x|=1\}$ denotes the observation direction. {\bf Point like scatterers.} The second case of our interest is the scattering of plane waves by $M$ point like scatterers located at $z_1, z_2,\cdots, z_M\in{\mathbb R}^{n}$ in the homogeneous space ${\mathbb R}^{n},n=2,3$. The incident plane wave $u^{i}$ is of the form \begin{eqnarray}\label{incidenwave} u^{i}(x,\theta,k) = e^{ikx\cdot \theta},\quad x\in{\mathbb R}^n, \end{eqnarray} where $\theta\in{\mathbb S}^{n-1}$ denotes the direction of the incident wave. By neglecting all the multiple scattering between the scatterers, the scattered field $u^{s}$ is given by \cite{Foldy} \begin{eqnarray}\label{uszm} u^{s}(x,\theta,k)= \sum_{m=1}^{M}\tau_m u^{i}(z_m,\theta,k)\Phi_k(x,z_m), \end{eqnarray} which solves the equation $\Delta u^s(x,\theta,k) +k^2 u^s(x,\theta,k) = \sum_{m=1}^{M}\tau_m u^{i}(z_m,\theta,k)\delta_{z_m}$ in ${\mathbb R}^n$. Here, $\tau_m\in{\mathbb C}\backslash\{0\}$ is the scattering strength of the $m$-th target, $m=1,2,\cdots, M.$ Similarly, the far field pattern is given by \begin{eqnarray}\label{uinf-scatterer} u^{\infty}(\hat{x},\theta, k)=\sum_{m=1}^{M}\tau_m e^{-ik(\hat{x}-\theta)\cdot z_m}, \quad \hat{x},\theta\in {\mathbb S}^{n-1}. \end{eqnarray} Of particular interest is the backscattering case, i.e., $\hat{x}=-\theta$. The inverse problem is to identify the numbers, locations and scattering strengths of the unknown point object from the multi-frequency scattered fields or far fields at a few sensors. We denote by \begin{eqnarray*} \Gamma:=\{x_1, x_2, \cdots, x_L\} \subset {\mathbb R}^n\backslash\{z_1, z_2, \cdots, z_M\} \end{eqnarray*} and \begin{eqnarray}\label{thetaL} \Theta_{L}:=\{ \hat{x}_1, \hat{x}_2, \cdots, \hat{x}_L \}\in {\mathbb S}^{n-1}, \end{eqnarray} respectively, the collection of the sensors for the scattered fields and the far fields. \section{Uniqueness} \label{uniqueness} In this section, we investigate under what conditions a target is uniquely determined by a knowledge of its scattered fields or far field patterns. We note that by analyticity both the scattered field and its far field pattern is completely determined for all positive frequencies by only knowing them in some bounded band, as given in \eqref{kassumption}. We begin with the simplest case with a single point source, i.e., $M=1$. In this case, the scattered field and its far field are given, respectively, by \begin{eqnarray}\label{1Musuinf} u^s(x,k)=\tau_1\Phi_k(x,z_1) \quad\mbox{and}\quad u^\infty(\hat{x}, k)=\tau_1 e^{-ik\hat{x}\cdot z_1}. \end{eqnarray} \begin{theorem}\label{1k1M} For a fixed frequency $k>0$, let $M=1$, then we have the following results. \begin{itemize} \item For any single sensor $\hat{x}\in{\mathbb S}^{n-1},\,n=2,3$ or $x\in{\mathbb R}^3\backslash\{z_1\}$, we have \begin{eqnarray}\label{11} \tau_1=u^\infty(\hat{x}, k)e^{ik\hat{x}\cdot z_1}, \qquad |x-z_1|=\frac{|\tau_1|}{4\pi|u^s(x,k)|}. \end{eqnarray} \item If we know the location $z_1$ in advance, then the strength $\tau_1$ is uniquely determined by the scattered field $u^s(x,k)$ at a single sensor $ x\in{\mathbb R}^n\backslash\{z_1\}$ or the far field pattern $u^{\infty}(\hat{x}, k)$ at a single observation direction $\hat{x}\in{\mathbb S}^{n-1},\,n=2,3$. \item If we know the scattering strength $\tau_1$ in advance, under the condition that $|k\hat{x}\cdot z_1|<\pi$, then the value $\hat{x}\cdot z_1$ is uniquely determined by the far field pattern $u^{\infty}(\hat{x}, k)$ at a single observation direction $\hat{x}\in{\mathbb S}^{n-1},\,n=2,3$. Furthermore, the location $z_1\in{\mathbb R}^n$ can be uniquely determined by $n$ linearly independent observation directions. \item If we know the modulus $|\tau_1|$ in advance, then the distance $|x-z_1|$ is uniquely determined by the phaseless scattered field $|u^s(x,k)|$ at a fixed sensor $x\in{\mathbb R}^3$. Furthermore, the location $z_1\in {\mathbb R}^3$ can be uniquely determined by four sensors $x\in\{x_1, x_2, x_3, x_4\}\subset{\mathbb R}^3\backslash\{z_1\}$, which are not coplanar. \end{itemize} \end{theorem} \begin{proof} The first three results are obvious from the representation \eqref{1Musuinf} of the scattered field and its far field pattern. If the modulus $|\tau_1|$ is given in advance, this implies that the location \begin{eqnarray*} z_1\in \partial B_{r_j}(x_j), \end{eqnarray*} where $\partial B_{r_j}(x_j)$ is a sphere centered at the sensor $x_j$ with radius $r_j:=\frac{|\tau_1|}{4\pi|u^s(x_j,k)|}$, $j=1,2,3,4$. We give a constructive proof for the determination of the location $z_1$. With the first two sensors $x_1$ and $x_2$, we obtain that $z_1$ is located on the circle $\partial B_{r_1}(x_1) \cap \partial B_{r_2}(x_2)$, which is the intersection of two spheres $\partial B_{r_1}(x_1)$ and $\partial B_{r_2}(x_2)$. Since the four sensors $x_1, x_2, x_3$ and $x_4$ are not coplanar, we have that $x_1, x_2$ and $x_3$ are not collinear. This implies that the circle $\partial B_{r_1}(x_1) \cap \partial B_{r_2}(x_2)$ and the sphere $\partial B_{r_3}(x_3)$ intersect at two points $\{A, B\}$. If $A=B$, then $A$ is exactly the position $z_1$ we are looking for. Otherwise, $|x_4-A|\neq |x_4-B|$ because $x_4$ is not in the plane passing through $x_1, x_2$ and $x_3$. Thus $z_1=A$ if $r_4=|x_4-A|$, or else $z_1=B$. \end{proof} Note that the second equality in \eqref{11} does not hold in ${\mathbb R}^2$, and therefore, the fourth result in Theorem \ref{1k1M} is not clear in two dimensions. Actually, we claim that the modulus $|H^{(1)}_0(t)|$ is monotonous with respect to the variable $t$. Numerical experiments indicate that this is indeed the case but a rigorous proof is not known. If this is correct, we can show that the distance $|x-z|$ in ${\mathbb R}^2$ can be uniquely determined by the modulus $|u^s(x, k)|$ of the scattered field, and therefore the location $z$ can be uniquely determined by the phaseless scattered fields $|u^s(x, k)|$ at three sensors that are not collinear. This procedure is based on the phase retrieval technique proposed in the recent works \cite{JiLiu-elastic,JiLiu-electromagnetic,JiLiuZhang-source}. To remove the assumption on $|\tau_1|$, we can determine both the location $z_1$ and the strength $\tau_1$ by measurements with frequency in a bounded band as given in \eqref{kassumption}. \begin{theorem}\label{mk1M} For all $k\in (k_{-}, k_{+})$ and let $M=1$. Then we have the following uniqueness results. \begin{itemize} \item In ${\mathbb R}^3$, assume that $u^s(x,k_{-})\neq u^s(x, k_{+})$ at four sensors $x\in\{x_1, x_2, x_3, x_4\}\subset{\mathbb R}^3\backslash\{z_1\}$, which are not coplanar. Then both the location $z_1$ and the strength $\tau_1$ can be uniquely determined by the multi-frequency scattered fields $u^s(x,k), \,x\in\{x_1, x_2, x_3, x_4\},\,k\in (k_{-}, k_{+})$. \item In ${\mathbb R}^n$, assume that $u^\infty(\hat{x},k_{-})\neq u^\infty(\hat{x}, k_{+})$ at $n$ linearly independent observation directions $\hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}, \,n=2,3$. Then both the location $z_1$ and the strength $\tau_1$ can be uniquely determined by the multi-frequency far field patterns $u^\infty(\hat{x},k), k\in (k_{-}, k_{+})$ at $n$ linearly independent observation directions $\hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}, \,n=2,3$. \end{itemize} \end{theorem} \begin{proof} By the representation \eqref{1Musuinf} for the scattered field, we have \begin{eqnarray*} \frac{u^s(x,k)}{u^s(x,k_{-})} = e^{i(k-k_{-})|x-z_1|}, \quad x\in \{x_1, x_2, x_3, x_4\}, \, k\in (k_{-}, k_{+}). \end{eqnarray*} Taking integral on both sides with respect to the frequency $k$ over the frequency band $(k_{-}, k_{+})$, we have \begin{eqnarray*} \int_{k_{-}}^{k_{+}}\frac{u^s(x,k)}{u^s(x,k_{-})}dk &=& \int_{k_{-}}^{k_{+}}e^{i(k-k_{-})|x-z_1|}dk\cr &=& \frac{1}{i|x-z_1|}\left[e^{i(k_{+}-k_{-})|x-z_1|}-1\right]\cr &=& \frac{-i}{|x-z_1|}\left[\frac{u^s(x,k_{+})}{u^s(x,k_{-})}-1\right], \quad x\in \{x_1, x_2, x_3, x_4\}. \end{eqnarray*} This implies that \begin{eqnarray}\label{x-z1} |x-z_1| = -i\frac{\frac{u^s(x,k_{+})}{u^s(x,k_{-})}-1}{\int_{k_{-}}^{k_{+}}\frac{u^s(x,k)}{u^s(x,k_{-})}dk}, \quad x\in \{x_1, x_2, x_3, x_4\}. \end{eqnarray} Note that our assumption on the scattered fields ensures that both the numerator and the denominator of the right hand side are nonzeros. Thus $\tau_1$ can be uniquely recovered with the help of the representation \eqref{1Musuinf}. Since the distances $|x-z_1|$, $x\in \{x_1, x_2, x_3, x_4\}$, are uniquely determined, one can recover the location $z_1$ by a constructive way as the arguments in the previous Theorem \ref{1k1M}. Now we turn to the far field measurements. Similarly, by the representation \eqref{1Musuinf} for the far field pattern, we have \begin{eqnarray*} \frac{u^\infty(\hat{x},k)}{u^\infty(\hat{x},k_1)} = e^{-i(k-k_1)\hat{x}\cdot z_1}, \quad \hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}, \, k\in (k_{-}, k_{+}). \end{eqnarray*} Multiplying this identity by $-i\hat{x}\cdot z_1$, integrating over the frequency band $(k_{-}, k_{+})$, we obtain \begin{eqnarray*} -i\hat{x}\cdot z_1\int_{k_{-}}^{k_{+}}\frac{u^\infty(\hat{x},k)}{u^\infty(\hat{x},k_{-})}dk &=& -i\hat{x}\cdot z_1\int_{k_{-}}^{k_{+}}e^{-i(k-k_{-})\hat{x}\cdot z_1}dk\cr &=& e^{-i(k_{+}-k_{-})\hat{x}\cdot z_1}-1\cr &=& \frac{u^\infty(\hat{x},k_{+})}{u^\infty(\hat{x},k_{-})}-1, \quad\hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}. \end{eqnarray*} This implies that \begin{eqnarray}\label{hxdotz1} \hat{x}\cdot z_1 = i\frac{\frac{u^\infty(\hat{x},k_{+})}{u^\infty(\hat{x},k_{-})}-1}{\int_{k_{-}}^{k_{+}}\frac{u^\infty(\hat{x},k)}{u^\infty(\hat{x},k_{-})}dk}, \quad \hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}. \end{eqnarray} The scattering strength $\tau_1$ is then uniquely determined by combining the representation \eqref{1Musuinf}. The identify \eqref{hxdotz1} also implies that $z_1$ is uniquely determined by noting the fact that the observation directions $\hat{x}_1, \hat{x}_2$ and $\hat{x}_n$ are linearly independent. \end{proof} Difficulties arise if there are more than one point source, i.e., $M>1$. This is due to the severe nonlinearity between the measurements and the locations of the point sources. Note that \begin{eqnarray}\label{hyperplane} \Pi_{l,m}:\quad \hat{x}_l\cdot(z-z_m)=0 \end{eqnarray} is the hyperplane passing through the location $z_m, \, m=1, 2, \cdots, M,$ with normal $\hat{x}_l\in\Theta_{L},\, l=1, 2, \cdots, L$. For any point $z\in{\mathbb R}^n$, denote by $f(z)$ the number of the hyperplanes $\Pi_{l,m},\,l=1, 2, \cdots, L,\,m=1, 2, \cdots, M,$ passing through $z$. \begin{lemma}\label{lemma1} We consider $M$ points $z_1, z_2,\cdots, z_M$ in ${\mathbb R}^n$. Define \begin{eqnarray}\label{L} L:=\left\{ \begin{array}{ll} M+1, & \hbox{in ${\mathbb R}^2$\rm ;} \\ 2M+1, & \hbox{in ${\mathbb R}^3$.} \end{array} \right. \end{eqnarray} Recall the sparse observation directions set $\Theta_{L}:=\{\hat{x}_1, \hat{x}_2, \cdots, \hat{x}_L\}$ and the hyperplanes $\Pi_{l,m}$ as in \eqref{hyperplane} for $l=1, 2, \cdots, L$ and $m=1, 2, \cdots, M$. \begin{itemize} \item In ${\mathbb R}^2$, if any two directions in $\Theta_{L}$ are not collinear, then $f(z_m)=M+1$\, $m=1, 2, \cdots, M$ and $f(z)\leq M$ if $z\in{\mathbb R}^2\backslash\{z_1, z_2,\cdots, z_M\}$. \item In ${\mathbb R}^3$, if any three directions in $\Theta_{L}$ are not coplanar, then $f(z_m)=2M+1$\, $m=1, 2, \cdots, M$ and $f(z)\leq 2M$ if $z\in{\mathbb R}^3\backslash\{z_1, z_2,\cdots, z_M\}$. \end{itemize} \end{lemma} \begin{proof} In ${\mathbb R}^2$, since any two directions in $\Theta_{L}$ are not collinear, we obtain $L=M+1$ hyperplanes $\Pi_{l,m},\, l=1,2,\cdots, N$ passing through $z_m, \,m=1,2,\cdots,M$. Thus $f(z_m)=M+1$\, $m=1, 2, \cdots, M$. For any $z\in{\mathbb R}^2\backslash\{z_1, z_2,\cdots, z_M\}$, the value $f(z)$ increase only if there is a hyperplane passing through $z$ and some $z_m, m=1, 2, \cdots, M$ simultaneously. There are only $M$ given points $z_m, m=1, 2, \cdots, M$. Therefore, for any $z\in{\mathbb R}^2\backslash\{z_1, z_2,\cdots, z_M\}$, there are at most $M$ hyperplanes passing through $z$. This implies $f(z)\leq M$ if $z\in{\mathbb R}^2\backslash\{z_1, z_2,\cdots, z_M\}$. In ${\mathbb R}^3$, since any three directions in $\Theta_{L}$ are not coplanar, we obtain $L=2M+1$ hyperplanes $\Pi_{l,m},\, l=1,2,\cdots, L$ passing through $z_m, \,m=1,2,\cdots,M$. Thus $f(z_m)=L$,\, $m=1, 2, \cdots, M$. It is clear that $f(z)\leq L$ for all $z\in{\mathbb R}^3$. Assume that there exists a point $z^\ast\in{\mathbb R}^3\backslash\{z_1, z_2,\cdots, z_M\}$ such that $f(z^\ast)=L$. Then for each observation direction $\hat{x}_l$, there exists some $z_m\in \{z_1, z_2,\cdots, z_M\}$ such that $\hat{x}_l\cdot (z^\ast-z_m)=0,\, l=1,2,\cdots, 2M+1$. By the pigeonhole principle, there exists one point $z_m\in \{z_1, z_2,\cdots, z_M\}$ such that for three different observation directions $\hat{x}_{l_1}, \,\hat{x}_{l_2}$ and $\hat{x}_{l_3}$ such that $\hat{x}\cdot (z^\ast-z_m)=0$ for $\hat{x}\in \{\hat{x}_{l_1}, \,\hat{x}_{l_2},\,\hat{x}_{l_3}\}$. Therefore the observation directions $\hat{x}_{l_1}, \,\hat{x}_{l_2}$ and $\hat{x}_{l_3}$ are coplanar. This leads to a contradiction to our assumption on the observation directions. This completes the proof. \end{proof} With the results given in Lemma \ref{lemma1}, we can determine the locations and scattering strengths of the point sources by the multi-frequency far field patterns at finitely many observation directions. \begin{theorem}\label{Uniqueness-nknM} We consider $M$ isolated point sources with locations $z_m\in{\mathbb R}^n$ and scattering strengths $\tau_m\in{\mathbb C}\backslash\{0\},\, m=1,2,\cdots, M$. Recall $L$ defined by \eqref{L} and the observation direction set $\Theta_L:=\{\hat{x}_1, \hat{x}_2, \cdots, \hat{x}_L\}\subset {\mathbb S}^{n-1}$. Consider the same assumptions on the observation directions as in the previous Lemma \ref{lemma1}. Then we have the following uniqueness results. \begin{itemize} \item The locations $z_m$ and scattering strengths $\tau_m,\, m=1,2,\cdots, M$ can be uniquely determined by the far field patterns $u^{\infty}(\pm\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k\in (k_{-}, k_{+})$. \item If we further assume that $\tau_m\in {\mathbb R}$, then locations $z_m$ and scattering strengths $\tau_m,\, m=1,2,\cdots, M$ can be uniquely determined by the far field patterns $u^{\infty}(\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k\in (k_{-}, k_{+})$. \end{itemize} \end{theorem} \begin{proof} Note that the far field pattern $u^{\infty}(\hat{x}, k) = \sum_{m=1}^{M}\tau_m e^{-ik\hat{x}\cdot z_m}$ depends analytically on $k$, thus we have the far field patterns for all frequencies in $(0, \infty)$. Integrating with respect to $k$, we deduce that \begin{eqnarray*} \int_{0}^{\infty} \Big(u^{\infty}(\hat{x}, k) + u^{\infty}(-\hat{x}, k)\Big)dk &=& \int_{0}^{\infty} \sum_{m=1}^{M}\tau_m\Big(e^{-ik\hat{x}\cdot z_m} + e^{ik\hat{x}\cdot z_m}\Big)dk \cr &=& \sum_{m=1}^{M}\tau_m\int_{-\infty}^{\infty}e^{-ik\hat{x}\cdot z_m} dk \cr &=& 2\pi\sum_{m=1}^{M}\tau_m \delta(\hat{x}\cdot z_m), \quad \hat{x}\in \Theta_L, \end{eqnarray*} where $\delta$ is the Dirac delta function. This implies for each $\hat{x}\in \Theta_L$, the values $\hat{x}\cdot z_m,\,m=1,2,\cdots, M$ are given uniquely by the far field patterns $u^{\infty}(\pm\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k>0$. From this, we can then define the hyperplanes $\Pi_{l,m}: \,\hat{x}_l\cdot (z-z_m)=0,\, l=1,2,\cdots, L,\, m=1,2,\cdots,M$. Using Lemma \ref{lemma1}, we deduce that the locations $z_m,\,m=1,2,\cdots, M$ can be uniquely recovered by the far field patterns $u^{\infty}(\pm\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k>0$. For any $z_{m^\ast}\in \{z_1, z_2, \cdots, z_M\}$, by the assumption on the observation directions, we can always choose some $\hat{x}_l\in\Theta_L$ such that $\hat{x}_l\cdot (z_{m^\ast}-z_m)\neq 0$ for all $z_m\neq z_{m^\ast}, \,m=1,2,\cdots, M$. Then by the representation of the far field pattern, we have \begin{eqnarray*} u^{\infty}(\hat{x}_l, k)e^{ik\hat{x}_l\cdot z_{m^\ast}} = \tau_{m^\ast} +\sum_{m=1, m\neq {m^\ast}}^{M} \tau_m e^{-ik\hat{x}_l\cdot(z_m-z_{m^\ast})}. \end{eqnarray*} For any $K>0$, \begin{eqnarray*} &&\int_{0}^{K}\Big(u^\infty(\hat{x}_l, k)e^{ik\hat{x}_l\cdot z_{m^\ast}} +u^{\infty}(-\hat{x}_l, k)e^{-ik\hat{x}_l\cdot z_{m^\ast}}\Big)dk\cr &=&2K\tau_{m^\ast}+\sum_{m=1, m\neq {m^\ast}}^{M} \tau_m \int_{-K}^{K}e^{-ik\hat{x}_l\cdot (z_m-z_{m^\ast})}dk. \end{eqnarray*} Letting $K\rightarrow\infty$, we obtain that the second term on the right hand side of the above equality tends to $2\pi \sum_{m=1, m\neq {m^\ast}}^{M} \tau_m \delta(\hat{x}_l\cdot(z_m-z_{m^\ast}))$ and therefore vanishes since $\hat{x}_l\cdot (z_{m^\ast}-z_m)\neq 0$ for all $z_m\neq z_{m^\ast}, \,m=1,2,\cdots, M$. This implies \begin{eqnarray*} \tau_m = \lim_{K\rightarrow\infty} \frac{1}{2K}\int_{0}^{K}\Big(u^{\infty}(\hat{x}_l, k)e^{ik\hat{x}_l\cdot z_m} +u^{\infty}(-\hat{x}_l, k)e^{-ik\hat{x}_l\cdot z_m}\Big)dk. \end{eqnarray*} In other words, the scattering strengths $\tau_m, \,m=1,2,\cdots, M$ are also uniquely determined by the far field patterns $u^{\infty}(\pm\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k>0$. This completes the proof for the first statement. If we have the a priori information that $\tau_m\in{\mathbb R}$, then we need less data as given in the second statement. In this case, we define \begin{eqnarray*} u^{\infty}(\hat{x}, k) := \overline{u^{\infty}(\hat{x}, -k)}, \quad k<0, \end{eqnarray*} where by $\overline{\cdot}$ we denote the complex conjugate. Then the proof follows by similar arguments. \end{proof} Inspired by the arguments in \cite{GriesmaierSchmiedecke}, uniqueness can also be established by finitely many properly chosen frequencies. For a fixed observation direction $\hat{x}\in\Theta_L$, assume that the far field patterns $u^{\infty}(\hat{x}, k_j)$ in \eqref{uinf-source} are given for $J$ equidistant wavenumbers \begin{eqnarray}\label{kj} k_j = j k_{min},\quad j=1,2,\cdots, J, \end{eqnarray} where \begin{eqnarray}\label{kmin} 0<k_{min}\leq\frac{\pi}{2R} \quad\mbox{and}\quad J>2M. \end{eqnarray} Here, $R>0$ denotes the radius of the smallest ball centered at the origin that contains the locations of the point sources. The upper bound on $k_{min}$ in \eqref{kmin} implies that $|k_{min}\hat{x}\cdot z_m|<\pi$ for all $m=1,2,\cdots, M$. This further implies that the value $\hat{x}\cdot z_m$ is uniquely determined by $e^{-ik_{min}\hat{x}\cdot z_m}$. In the following we develop a rigorous characterization of the projections $\hat{x}\cdot z_1, \,\hat{x}\cdot z_2, \cdots, \hat{x}\cdot z_M$ of the locations $z_1, z_2, \cdots, z_M$ of the point sources from the far field patterns $u^{\infty}(\hat{x}, k_j), j=1,2,\cdots, J$. For a fixed observation direction $\hat{x}$ different locations $z_{m_1}\neq z_{m_2}$ may yield the same projections $\hat{x}\cdot z_{m_1}=\hat{x}\cdot z_{m_2}$, and the corresponding summands in \eqref{uinf-source} even cancel if $\tau_{m_1}=-\tau_{m_2}$. In this case, the point sources at $z_{m_1}$ and $z_{m_2}$ would not contribute to the far field data $u^{\infty}(\hat{x}, k_j), j=1,2,\cdots, J$, and consequently they can not be reconstructed from such far field data. We introduce the set and its cardinality \begin{eqnarray*} \mathcal {M}_{\hat{x}}:={\rm supp}\left(\sum_{m=1}^{M}\tau_m \delta(\hat{x}\cdot z_m)\right) \subset{\mathbb R}, \quad M^{\ast}:=|\mathcal {M}_{\hat{x}}|. \end{eqnarray*} Clearly, $M^\ast\leq M$. Accordingly, we rewrite the far field pattern as \begin{eqnarray} u^{\infty}(\hat{x}, k_j)= \sum_{m=1}^{M^\ast}\tau_m^{\ast}\xi^{j}_{m},\quad j=1,2,\cdots, J, \end{eqnarray} where $\xi_m:=e^{-ik_{min}f_m}$ for any $f_m\in\mathcal {M}_{\hat{x}}$. The far field patterns $u^{\infty}(\hat{x}, k_j), j=1,2,\cdots, J$, define the Hankel matrix \begin{eqnarray*} U =\left( \begin{array}{cccc} u^{\infty}(\hat{x}, k_1) & u^{\infty}(\hat{x}, k_2) & \cdots & u^{\infty}(\hat{x}, k_{M+1}) \\ u^{\infty}(\hat{x}, k_2) & u^{\infty}(\hat{x}, k_3) & \cdots & u^{\infty}(\hat{x}, k_{M+2}) \\ \vdots & \vdots & \ddots & \vdots \\ u^{\infty}(\hat{x}, k_{J-M}) & u^{\infty}(\hat{x}, k_{J-M+1}) & \cdots & u^{\infty}(\hat{x}, k_{J}) \\ \end{array} \right)\in{\mathbb C}^{(J-M)\times(M+1)}. \end{eqnarray*} \begin{lemma}\label{Uproperty} The Hankel matrix $U$ has a factorization of the form \begin{eqnarray}\label{Ufac} U=V_{J-M}DV^{\top}_{M+1}, \end{eqnarray} where $V_\mathbbm{i}=(v_1, v_2, \cdots, v_{M^{\ast}})\in{\mathbb C}^{\mathbbm{i}\times M^\ast}, \mathbbm{i}\geq2$, denotes a Vandermonde matrix with $v_m=(1, \xi_m, \xi^2_m,\cdots,\xi^{\mathbbm{i}-1}_m)^{\top}$ for $m=1, 2, \cdots, M^\ast$, and the matrix $D=diag(\tau^\ast_m \xi_m)\in{\mathbb C}^{M^\ast\times M^\ast}$. Furthermore, \begin{eqnarray}\label{rank} {\rm rank} (U) = {\rm rank} (V_{J-M}) = {\rm rank} (V_{M+1}) = M^\ast \end{eqnarray} and \begin{eqnarray}\label{RangeIdentity} \mathcal {R} (U) = \mathcal {R} (V_{J-M}). \end{eqnarray} \end{lemma} \begin{proof} The factorization \eqref{Ufac} follows by a straightforward calculation. Since $\xi_1, \xi_2, \cdots, \xi_{M^\ast}$ are mutually distinct by construction, the rank of the Vandermonde matrix $V_\mathbbm{i}\in{\mathbb C}^{\mathbbm{i}\times M^\ast}$ satisfies \begin{eqnarray*} {\rm rank} (V_\mathbbm{i}) = \min \{\mathbbm{i}, M^\ast\}. \end{eqnarray*} Therefore, we deduce from the assumption $J > 2M \geq 2M^\ast$ that \begin{eqnarray*} {\rm rank} (V_{J-M}) = {\rm rank} (V_{M+1}) = M^\ast. \end{eqnarray*} Clearly, $D\in {\mathbb C}^{M^\ast\times M^\ast}$ is invertible, and thus the factorization \eqref{Ufac} implies \begin{eqnarray*} {\rm rank} (U) = M^\ast. \end{eqnarray*} Finally, we show the range identity \eqref{RangeIdentity}. It is clear that $\mathcal {R} (U) \subset \mathcal {R} (V_{J-M})$ from the factorization \eqref{Ufac}. Conversely, assume that \begin{eqnarray*} \phi = V_{J-M}\psi \end{eqnarray*} for some $\psi\in {\mathbb C}^{M^\ast\times 1}$. Using the invertibility of $D$ again, we denote by \begin{eqnarray*} \psi^\ast:= D^{-1}\psi. \end{eqnarray*} Note that ${\rm rank} (V_{M+1}) = M^\ast$, we can always find some $\eta\in {\mathbb C}^{(M+1)\times 1}$ such that \begin{eqnarray*} \psi^\ast = V^{\top}_{M+1}\eta. \end{eqnarray*} Combining the previous identities, we deduce that $ U\eta = V_{J-M}DV^{\top}_{M+1} \eta= V_{J-M}D \psi^\ast = V_{J-M}\psi = \phi$, i.e., $\phi\in \mathcal {R} (U)$. This finishes the proof. \end{proof} \begin{theorem}\label{uni-hyperplanes} For a single observation direction $\hat{x}\in {\mathbb S}^{n-1}$, the hyperplanes $\Pi_m:\quad \hat{x}\cdot(z-z_m)=0, m=1, 2, \cdots, M$, are uniquely determined by the far field patterns $u^{\infty}(\hat{x}, k_j), j=1,2,\cdots, J$. \end{theorem} \begin{proof} Let $B_R$ be the ball centered at the origin with radius $R$. For a point $z\in B_R\subset {\mathbb R}^n$, define $\xi:= e^{-ik_{min}\hat{x}\cdot z}$ and let $\phi_z:=(1, \xi, \xi^2,\cdots,\xi^{J-M-1})^{\top}\in {\mathbb C}^{(J-M)\times 1}$. We claim that $\phi_z\in \mathcal {R} (U)$ if and only if $\xi\in \{\xi_1, \xi_2, \cdots, \xi_{M^\ast}\}$. Let first $\xi\in \{\xi_1, \xi_2, \cdots, \xi_{M^\ast}\}$. Then clearly $\phi_z\in \mathcal {R} (V_{J-M})$ by the construction of the matrix $V_{J-M}$. The range identity \eqref{RangeIdentity} in Lemma \ref{Uproperty} implies that $\phi_z\in \mathcal {R} (U)$. Let now $\xi\notin \{\xi_1, \xi_2, \cdots, \xi_{M^\ast}\}$. The assumption $J>2M$ implies that $J-M>M+1>M^\ast + 1$. Then the novel Vandermonde matrix $(V_{J-M}, \phi_z)\in{\mathbb C}^{(J-M)\times(M^\ast+1)}$ has rank $M^{\ast}+1$. This implies that $\phi_z\notin \mathcal {R} (V_{J-M})$ and consequently $\phi_z\notin \mathcal {R} (U)$ by using the range identity \eqref{RangeIdentity} again. If $\phi_z\in \mathcal {R} (U)$, then $\xi= \xi_m$ for some $1\leq m\leq M$, i.e., $e^{-ik_{min}\hat{x}\cdot z} = e^{-ik_{min}\hat{x}\cdot z_m}$. By the assumption \eqref{kmin} of the smallest wavenumber $k_{min}$, we deduce that $\hat{x}\cdot z = \hat{x}\cdot z_m$. That is, the hyperplane $\Pi_m:\quad \hat{x}\cdot(z-z_m)=0$ is uniquely determined. \end{proof} Combining Theorem \ref{uni-hyperplanes} and Lemma \ref{lemma1}, we immediately have the following uniqueness results on the determination of the locations by the far field patterns with finitely many observation directions and finitely many frequencies. \begin{theorem} Let $k_j$ be the wave number given by \eqref{kj} satisfying \eqref{kmin}. Let $L$ be given as in \eqref{L}, we consider $L$ observation directions $\hat{x}_l, l=1,2,\cdots, L$ satisfying the same condition as in Lemma \ref{lemma1}. Then the locations $z_1, z_2,\cdots, z_M$ can be uniquely determined by the far field patterns $u^{\infty}(\hat{x}_l, k_j)$, $l=1,2,\cdots, L, \,j=1,2,\cdots, J$. \end{theorem} \begin{theorem} Let $k_j$ be the wave number given by \eqref{kj} satisfying \eqref{kmin}. Let $\hat{x}\in {\mathbb S}^{n-1}$ be such that $\hat{x}\cdot(z_{m_1}-z_{m_2})\neq 0$ if $m_1\neq m_2$. Given the locations $z_1, z_2,\cdots, z_M$, the corresponding scattering strengths $\tau_1, \tau_2,\cdots, \tau_M$ can be uniquely determined by the multi-frequency far field patterns $u^{\infty}(\hat{x}, k_j)$, $j=1,2,\cdots, J$ at the fixed observation direction $\hat{x}$. \end{theorem} \begin{proof} Recall that the far field patterns are given by \begin{eqnarray}\label{uinfkj} u^{\infty}(\hat{x}, k_j)= \sum_{m=1}^{M}\tau_m\eta^{j}_{m},\quad j=1,2,\cdots, J, \end{eqnarray} where $\eta_m:=e^{-ik_{min}\hat{x}\cdot z_m}$. We rewrite the equations \eqref{uinfkj} in the matrix form \begin{eqnarray}\label{tauequ} \mathbb{V}\mathbb{T}=\mathbb{U}, \end{eqnarray} where $\mathbb{T}=(\tau_1, \tau_2, \cdots, \tau_M)^{\top}$, $\mathbb{V}= (\mathbbm{v}_1, \mathbbm{v}_2, \cdots, \mathbbm{v}_M)\in {\mathbb C}^{J\times M}$ denotes a Vandermonde matrix with $\mathbbm{v}_m=(\eta_m, \eta_m^2, \cdots, \eta_m^{J})^{\top}$, $m=1,2,\cdots, M$ and $\mathbb{U}=(u^{\infty}(\hat{x}, k_1), u^{\infty}(\hat{x}, k_2), \cdots, u^{\infty}(\hat{x}, k_J))^{\top}$. Since $\eta_1, \eta_2, \cdots, \eta_M$ are distinct by the assumption on $\hat{x}$, we have that \begin{eqnarray*} {\rm rank}(\mathbb{V})= {\rm min}\{J, M\}=M. \end{eqnarray*} Therefore, the equation \eqref{tauequ} is uniquely solvable. In other words, the scattering strengths $\tau_1, \tau_2,\cdots, \tau_M$ can be uniquely determined by the far field patterns $u^{\infty}(\hat{x}, k_j)$, $j=1,2,\cdots, J$. The proof is complete. \end{proof} \quad\\ Finally, we turn to the scattering of plane waves by point like scatterers. Recall that the scattered field and the corresponding far field pattern are given by \begin{eqnarray*} u^{s}(x,\theta,k)= \sum_{m=1}^{M}\tau_m u^{i}(z_m,\theta,k)\Phi_k(x,z_m), \quad x\in{\mathbb R}^n\backslash\{z_1, z_2, \cdots, z_M\} \end{eqnarray*} and \begin{eqnarray*} u^{\infty}(\hat{x}, \theta, k)= \sum_{m=1}^{M} \tau_m e^{-ikz_m\cdot(\hat{x}-\theta)},\quad \hat{x},\theta\in {\mathbb S}^{n-1}, \end{eqnarray*} respectively. We collect the uniqueness results in the following theorem. We omit the proof since it is similar to the case of inverse source scattering problems. \begin{theorem} We consider the scattering of plane waves by point like scatterers. Then we have the following uniqueness results. \begin{description} \item[M=1] \begin{itemize} \item Let $k>0$ be fixed. For any single sensor $\hat{x}\in{\mathbb S}^{n-1}$ or $x\in{\mathbb R}^3\backslash\{z_1\}$, we have \begin{eqnarray}\label{11-obstacle} \tau_1=u^\infty(\hat{x}, \theta, k) e^{ikz_1\cdot(\hat{x}-\theta)}, \qquad |x-z_1|=\frac{|\tau_1|}{4\pi|u^s(x,\theta, k)|}. \end{eqnarray} \item Let $k>0$ be fixed. If we know the location $z_1$ in advance, then the strength $\tau_1$ is uniquely determined by the scattered field $u^s(x,\theta, k)$ at a single sensor $ x\in{\mathbb R}^n\backslash\{z_1\}$ or the far field pattern $u^\infty(\hat{x},\theta, k)$ at a single observation direction $\hat{x}\in{\mathbb S}^{n-1}$. \item Let $k>0$ be fixed. If we know the modulus $|\tau_1|$ in advance, then the location $z_1\in {\mathbb R}^3$ is uniquely determined by the phaseless scattered field $|u^s(x,\theta, k)|$ at four sensors $x\in\{x_1, x_2, x_3, x_4\}\subset{\mathbb R}^3\backslash\{z_1\}$, which are not coplanar. \item In ${\mathbb R}^3$, both the location $z_1$ and the strength $\tau_1$ can be uniquely determined by the multi-frequency scattered fields $u^s(x,\theta, k), k\in (k_{-}, k_{+})$ at four sensors $x\in\{x_1, x_2, x_3, x_4\}\subset{\mathbb R}^3\backslash\{z_1\}$, which are not coplanar. \item In ${\mathbb R}^n$, both the location $z_1$ and the strength $\tau_1$ can be uniquely determined by the multi-frequency far field patterns $u^\infty(\hat{x},\theta,k), k\in (k_{-}, k_{+})$ at $n$ pairs of linearly independent directions $\phi_j:=\hat{x}_j-\theta_j, \,j=1,2,\cdots, n$. \end{itemize} \item[M>1] Recall $L$ and $\Theta_L$ defined by \eqref{L} and \eqref{thetaL}, respectively. Then we have the following results. \begin{itemize} \item The locations $z_m$ and scattering strengths $\tau_m,\, m=1,2,\cdots, M$ can be uniquely determined by the far field patterns $u^{\infty}(\hat{x}, -\hat{x}, k)$ and $u^{\infty}(-\hat{x}, \hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k\in (k_{-}, k_{+})$. \item If we further assume that $\tau_m\in {\mathbb R}$, then locations $z_m$ and scattering strengths $\tau_m,\, m=1,2,\cdots, M$ can be uniquely determined by the far field patterns $u^{\infty}(\hat{x}, -\hat{x}, k)$ for all $\hat{x}\in\Theta_L$ and $k\in (k_{-}, k_{+})$. \item We consider the following wave numbers \begin{eqnarray}\label{kj} k_j = j k_{min},\quad j=1,2,\cdots, J, \end{eqnarray} where \begin{eqnarray}\label{kmin} 0<k_{min}\leq\frac{\pi}{4R} \quad\mbox{and}\quad J>2M. \end{eqnarray} Here, $R>0$ denotes the radius of the smallest ball centered at the origin that contains the locations of the point like scatterers. Then the locations $z_m$, $m=1,2,\cdots, M$ can be uniquely determined by the backscattering far field patterns $u^{\infty}(\hat{x}, -\hat{x}, k_j), j=1,2,\cdots, J$ at finitely many observation directions $\hat{x}\in\Theta_L$. Furthermore, taking $\hat{x}\in{\mathbb S}^{n-1}$ such that $\hat{x}\cdot z_{m_1}\neq \hat{x}\cdot z_{m_2}$ if $m_1\neq m_2$, then the scattering strengths $\tau_m, m=1,2,\cdots, M$ can be uniquely determined by the far field patterns far field patterns $u^{\infty}(\hat{x}, -\hat{x}, k_j), j=1,2,\cdots, J$ at the fixed observation directions $\hat{x}\in{\mathbb S}^{n-1}$. \end{itemize} \end{description} \end{theorem} \section{Numerical methods} \label{NumMethods} This section aims to introduce some novel numerical methods for identifying the locations and scattering strengths of the point object. Some of the numerical methods are originated from the constructive uniqueness proof in the previous section. \subsection{Numerical methods for Point sources} We begin with the scattering by point sources. If $M=1$, given $|\tau_1|$, we introduce the following indicator to locate the position of $z_1$. \begin{eqnarray}\label{Iz1} I_{1}(z):=\frac{1}{\sum_{j=1}^{4}\Big|\frac{|x_j-z|}{|\tau_1|}-\frac{1}{4\pi|u^s(x_j, k)|}\Big|} \end{eqnarray} where $x_j,\,j=1,2,3,4$ are four points in ${\mathbb R}^3$ such that they are not coplanar. By the representation of the scattered field given in \eqref{us-source}, we know that $I_{1}(z)\rightarrow \infty$ if $z\rightarrow z_1$. Thus $I_{1}(z)$ blows up at $z=z_1$. The proof of Theorem \ref{1k1M} gives a constructive way to look for the the position of $z_1$. Based on this, we introduce a simple geometrical method to reconstruct a point in ${\mathbb R}^3$ from four distances to the given points. The procedure is actually an extension of the geometrical method to reconstruct a point from three distances to the given points in ${\mathbb R}^2$, which is the key idea of phase retrieval \cite{JiLiu-elastic,JiLiu-electromagnetic,JiLiuZhang-source}. However, the procedure for reconstruct a point in ${\mathbb R}^3$ is much more technical. Let $x_j, j=1,2,3,4$ be four given points in ${\mathbb R}^3$ such that they are not coplanar, denote by $r_j:=|x_j-z|$. The following scheme provides a constructive way for determining the unknown point $z$. \begin{figure}[htbp] \centering \subfigure[\textbf{Step one.}]{ \includegraphics[height=1.3in,width=1.6in]{stepone.pdf}}\qquad\qquad \subfigure[\textbf{Step two.}]{ \includegraphics[height=1.6in,width=1.6in]{steptwo.pdf}}\qquad\qquad \subfigure[\textbf{Step three.}]{ \includegraphics[height=1.3in,width=1.6in]{stepthree.pdf}} \caption{\bf Scheme for determining a point in ${\mathbb R}^3$.} \label{scheme} \end{figure} {\bf One point determination scheme: locating a point in ${\mathbb R}^3$ by four distances to the given points:} \begin{description}{\em \item $(1)$ {\bf\rm Determine the perpendicular foot $O_{1,2}$ from two given points $x_j,\,j=1,2$ and two distances $r_j,\,j=1,2$.} \\ As shown in Figure \ref{scheme}(a), by the Heron's formula, the area of the triangle $\Delta zx_1x_2$ is \begin{eqnarray*} S_{\Delta zx_1x_2}=\sqrt{p(p-r_1)(p-r_2)(p-|x_1-x_2|)} \end{eqnarray*} with $p:=\frac{r_1+r_2+|x_1-x_2|}{2}$. Note that $S_{\Delta zx_1x_2}=\frac{1}{2}|x_1-x_2||z-O_{1,2}|$, we deduce that \begin{eqnarray*} h_1:=|z-O_{1,2}|=\frac{2S_{\Delta zx_1x_2}}{|x_1-x_2|}. \end{eqnarray*} Then by the Pythagorean theorem, we have \begin{eqnarray*} |x_1-O_{1,2}| = \sqrt{r^2_1-h^2_1} = \sqrt{r^2_1-\frac{4S^2_{\Delta zx_1x_2}}{|x_1-x_2|^2}}. \end{eqnarray*} Denote by $t_1:=\frac{|x_1-O_{1,2}|}{|x_1-x_2|}$, we have \begin{eqnarray*} O_{1,2}=\left\{ \begin{array}{ll} x_1+t_1(x_2-x_1), & \hbox{if $r_1^2+|x_1-x_2|^2\geq r_2^2$;} \\ x_1-t_1(x_2-x_1), & \hbox{else.} \end{array} \right. \end{eqnarray*} \item $(2)$ {\bf\rm Determination of $h_2$ and the projection $x_3^{\prime}$.} \\ As shown in Figure \ref{scheme}(b), noting that $x_3x_3^{\prime}$ is parallel to $x_1x_2$, we have \begin{eqnarray*} x_3^{\prime}=x_3+t(x_1-x_2) \end{eqnarray*} with $t$ is chosen such that $(x_3^{\prime}-O_{1,2})\cdot (x_1-x_2)=0$. By the Pythagorean theorem again, we have \begin{eqnarray*} h_2:=|z-x_3^{\prime}|=\sqrt{r_3^2-|x_3-x_3^{\prime}|^2}. \end{eqnarray*} \item $(3)$ {\bf\rm Determination of $O$.} \\ As shown in Figure \ref{scheme}(c), following the step one to reconstruct the point $O$. \item $(4)$ {\bf\rm Determine the point $z$.} \\ Define \begin{eqnarray*} l:=\frac{(x_1-x_2)\times(x_3^{\prime}-O_{1,2})}{|(x_1-x_2)\times(x_3^{\prime}-O_{1,2})|}. \end{eqnarray*} Then \begin{eqnarray}\label{z} z=O\pm t_2 l \end{eqnarray} with $t_2:=\sqrt{h_1^2-|O-O_{1,2}|^2}$. Choosing $z$ from \eqref{z} by letting $|z-x_4|=r_4$.} \end{description} Actually, even without knowing $|\tau_1|$, we can determine the distance between the sensor $x$ and the unknown location $z_1$ by the formula \eqref{x-z1}, i.e., \begin{eqnarray}\label{Numx-z1} |x-z_1| = -i\frac{\frac{u^s(x,k_{+})}{u^s(x,k_{-})}-1}{\int_{k_{-}}^{k_{+}}\frac{u^s(x,k)}{u^s(x,k_{-})}dk}, \quad x\in \{x_1, x_2, x_3, x_4\}. \end{eqnarray} The price to pay is more data with respect to the frequency $k$. Then, one may derive a formula to locate $z_1$ with the help of a geometrical argument. After determining the location $z_1$, the scattering strength $\tau_1$ can be computed directly by the representation \eqref{us-source} of the scattered field $u^s(x, k)$ at any sensor $x$. If the far field pattern is considered, we may determine $\hat{x}\cdot z_1$ by the formula \eqref{hxdotz1}, i.e., \begin{eqnarray}\label{Numhxdotz1} \hat{x}\cdot z_1 = i\frac{\frac{u^\infty(\hat{x},k_{+})}{u^\infty(\hat{x},k_{-})}-1}{\int_{k_{-}}^{k_{+}}\frac{u^\infty(\hat{x},k)}{u^\infty(\hat{x},k_{-})}dk}, \quad \hat{x}\in \{\hat{x}_1, \cdots, \hat{x}_n\}. \end{eqnarray} Then the location $z_1$ can be determined by solving a system of linear equation with $n$ unknowns in ${\mathbb R}^n,\,n=2,3$. In particular, one may take $\hat{x}$ to be the unit vectors in Cartesian coordinates. After this, the scattering strength can be computed by the representation \eqref{uinf-source} of the far field pattern. We are more interested in the case with multiple point sources, i.e., $M>1$. Define \begin{eqnarray}\label{IzMx} I_{M}(z, \hat{x}):=\left|\int_{0}^{K} \left\{u^{\infty}(\hat{x},k) e^{ik\hat{x}\cdot z}+u^{\infty}(-\hat{x},k) e^{-ik\hat{x}\cdot z}\right\}dk\right|, \quad z\in{\mathbb R}^n, \hat{x}\in\Theta_L. \end{eqnarray} By the analysis in the proof of Theorem \ref{Uniqueness-nknM}, for large $K$, the indicator $I(z, \hat{x})$ blows up when the sampling point $z$ located on the hyperplanes $\hat{x}\cdot(z-z_m)=0,\,m=1,2,\cdots, M$. Then we expect the superposition of $I_M(z, \hat{x})$ with respect to $\hat{x}\in\Theta_L$ can be used to locate the locations $z_m, m=1,2,\cdots, M$. Based on this idea, we define \begin{eqnarray}\label{IzM} I_{M}(z):=\sum_{\hat{x}\in\Theta_L}I_M(z, \hat{x}). \end{eqnarray} Numerically, the value of $I_M(z)$ is expect to be large if $z=z_m,\,m=1,2,\cdots, M$ and small otherwise. After locating the locations $z_m,\,m=1,2,\cdots, M$, we may compute the scattering strength with the help of the following formula \begin{eqnarray}\label{Itau} \tau_m = \frac{1}{2K}\int_{0}^{K} \left\{u^{\infty}(\hat{x},k) e^{ik\hat{x}\cdot z_m}+u^{\infty}(-\hat{x},k) e^{-ik\hat{x}\cdot z_m}\right\}dk, \quad m=1,2,\cdots, M. \end{eqnarray} Here, $\hat{x}$ is chosen such that $\hat{x}\cdot z_{m_1}\neq \hat{x}\cdot z_{m_2}$ if $m_1\neq m_2$. As mentioned in the proof of Theorem \ref{Uniqueness-nknM}, the right hand side extends to $\tau_m$ as $K\rightarrow \infty$. Thus by taking $K$ large enough, we hope to determine the scattering strength $\tau_m, \,m=1,2,\cdots, M$. \subsection{Numerical methods for point like scatterers} Now we turn to the scattering of plane wave by point like scatterers. The indicator \eqref{Iz1} with $u^{s}(x,k)$ replaced by $u^s(x,\theta, k)$ also works for locating a single point like scatterers. As in the previous subsection, we are more interested in the case with multiple point like scatterers. We need some modifications due to the incident plane waves. Of practical interest is the backscattering inverse scattering problems, i.e., $\hat{x}=-\theta$. We assume we have the backscattering far field patterns $u^{\infty}(\hat{x},-\hat{x}, k)$ for $\hat{x}\in\Theta_L$ and $k\in (0, K)$. Define \begin{eqnarray}\label{IzMx-obstacle} \widetilde{I}_{M}(z, \hat{x}):=\left|\int_{0}^{K} \left\{u^{\infty}(\hat{x},-\hat{x},k) e^{2ik\hat{x}\cdot z}+u^{\infty}(-\hat{x},\hat{x},k) e^{-2ik\hat{x}\cdot z}\right\}dk\right|, \quad z\in{\mathbb R}^n, \hat{x}\in\Theta_L. \end{eqnarray} Similarly, for large $K$, the indicator $\widetilde{I}_M(z, \hat{x})$ blows up when the sampling point $z$ located on the hyperplanes $\hat{x}\cdot(z-z_m)=0,\,m=1,2,\cdots, M$. Then we further define \begin{eqnarray}\label{IzM-obstacle} \widetilde{I}_{M}(z):=\sum_{\hat{x}\in\Theta_L}\widetilde{I}_M(z, \hat{x}). \end{eqnarray} Again, the value of $\widetilde{I}_M(z)$ is expect to be large if $z=z_m,\,m=1,2,\cdots, M$ and small otherwise. After locating the locations $z_m,\,m=1,2,\cdots, M$, we may compute the scattering strength with the help of the following formula \begin{eqnarray}\label{Itau-obstacle} \tau_m = \frac{1}{2K}\int_{0}^{K} \left\{u^{\infty}(\hat{x},-\hat{x},k) e^{2ik\hat{x}\cdot z_m}+u^{\infty}(-\hat{x},\hat{x},k) e^{-2ik\hat{x}\cdot z_m}\right\}dk, \quad m=1,2,\cdots, M. \end{eqnarray} \section{Numerical examples and discussions} \label{NumExamples} \setcounter{equation}{0} This section is devoted to the some numerical examples to verify the effectiveness and robustness of the numerical methods proposed in the previous section. Note that both the theoretical results and numerical methods for the point obstacle case is quite similar to the point source case, therefore we only present the examples with point sources. \subsection{One point source} First, we consider the identification of one point source by the scattered fields at four sensors: \begin{eqnarray*} x_1=(2,0,0),\quad x_2=(0,2,0),\quad x_3=(0,0,2)\quad\mbox{and}\quad x_4=(-2,-2,-2). \end{eqnarray*} The following three pairs of point sources with different locations and scattering strengths are considered. \begin{itemize} \item $z_1=(1,1,1),\quad\tau_1=1+i;$ \item $z_2=(1,0,1),\quad\tau_2=1-i;$ \item $z_3=(0,1,1),\quad\tau_3=-1-i.$ \end{itemize} We first use \eqref{Numx-z1} and \eqref{us-source} to get the strength, and then use the indicator \eqref{Iz1} to capture the location of the point source. Table~\ref{indicator.one} gives the numerical results with different relative noise. In the numerical implementation, trapezoid integral formula is applied with $k_{\_}=1,k_+=100,dk=0.005$. Sampling space $0.05$ is used in the indicator \eqref{Iz1}. \begin{table} \begin{center} \begin{tabular}{llllll } \hline True point&$z_1=(1,1,1)$ & $z_2=(1,0,1)$ &$z_3=(0,1,1)$ \\ & $\tau_1=1+i$ & $\tau_2=1-i$ &$ \tau_3=-1-i$\\ \hline $0$ noise&$(1,1,1)$ & $(1,0,1)$ &$(0,1,1)$ \\ &$1.0024+ 0.9909i$ &$0.9931-1.0012i$ & $-0.9972-0.9947i$\\ \hline $2\%$ noise&$(1,1,1)$ & $(0.95,-0.05,0.95)$ &$(0.05,1.05,1.05)$ \\ & $0.9750+1.0094i$&$0.9735-1.0055i$ & $ -1.0280- 0.9947i$\\ \hline $5\%$ noise &$(1,1,1)\ $ & $(0.9,-0.15,0.9)$ & $(-0.1,0.95,0.9)$ \\ &$1.0252+0.8692i$&$0.9154-1.0180i$ &$-1.0787-0.8666i $\\ \hline $10\%$ noise &$(1,1.05,1)\ $& $(0.95,0.15,1)$ &$(-0.1,0.85,0.8)$\\ &$0.9313+1.1136i$&$0.8008- 0.9240i$ &$ -0.8865-1.2529i$\\ \hline \end{tabular} \caption{One point source reconstruction using the scattered fields.} \label{indicator.one} \end{center} \end{table} We also test {\bf One point determination scheme} for the same points. Table~\ref{geo.one} give the results with different noise.\\ \begin{table} \begin{center} \begin{tabular}{llllll } \hline True point&$z_1=(1,1,1)$ & $z_2=(1,0,1)$ &$z_3=(0,1,1)$ \\ \hline $0$ noise&$(1,1,1)$ & $(1,0,1)$ &$(0,1,1)$ \\ \hline $2\%$ noise&$(0.99,1.02,0.99)$ & $(1.04,0.01,1.05)$ &$(-0.01,1.00,1.01)$ \\ \hline $5\%$ noise &$(0.92,0.88,0.90)\ $ & $(1.11,0.14,1.03)$ & $(0.04,1.00,0.96)$ \\ \hline $10\%$ noise &$(0.87,1.03,1.12)\ $& $(1.25,-0.11,1.09)$ &$(-0.03,1.21,1.20)$\\ \hline \end{tabular} \caption{Locating the point source by the {\bf One point determination scheme}.} \label{geo.one} \end{center} \end{table} Next, the construction using the far field pattern is tested, three observation directions $\hat{x}_1=(1,0,0),\hat{x}_2=(0,1,0),\hat{x}_3=(0,0,1)$ are chosen. Equations \eqref{Numhxdotz1} and \eqref{uinf-source} are used to get the location and scattering strength respectively. The results are summarized in table~\ref{far.one} with different noise. \begin{table} \begin{center} \begin{tabular}{llllll } \hline True point&$z_1=(1,1,1)$ & $z_2=(1,0,1)$ &$z_3=(0,1,1)$ \\ & $\tau_1=1+i$ & $\tau_2=1-i$ &$ \tau_3=-1-i$\\ \hline $0$ noise&$(1,1,1)$ & $(1,0,1)$ &$(0,1,1)$ \\ &$0.9974+1.0026i$ &$1.0026-0.9974i$ & $-1.0000-1.0000i$\\ \hline $2\%$ noise&$(0.99,1.00,1.00)$ & $(1.01,0,0.99)$ &$(0,1,1)$ \\ & $1.0279+1.0006i$&$1.0251-0.9981i$ & $ -1.0032 -1.0032i$\\ \hline $5\%$ noise &$(1.02,0.99,0.98)\ $ & $(0.98,0,1.00)$ & $(0,1.00,0.96)$ \\ &$1.0093+1.0480i$&$0.9753-1.0121i$ &$-0.9793-0.9793i $\\ \hline $10\%$ noise &$(1.08,0.95,0.94)\ $& $(0.97,0,1.02)$ &$(0,0.98,1.04)$\\ &$0.8724+1.0142i$&$1.0434-1.1004i$ &$ -0.9350-0.9350i$\\ \hline \end{tabular} \caption{One point source reconstruction using the far fields.} \label{far.one} \end{center} \end{table} \subsection{Multiple point sources} In this part, more interesting case with multiple point sources are considered. For simplicity, we present the examples in two dimensional case. The three dimensional case are similar by using the same indicator. We first use $\eqref{IzMx}$ and $\eqref{IzM}$ to locate the positions of the point sources, then $\eqref{Itau}$ is used to get the strength. In the sequel, we take $k_{\_}=40,k_+=200, dk=1$ and $10\%$ relative noise in the numerical results. In the first example, we consider five points sources located at \begin{eqnarray*} z_1=(1,0),\quad z_2=(0,1),\quad z_3=(-1,0),\quad z_4=(0,-1),\quad z_5=(0,0). \end{eqnarray*} We use the $rand$ in MATLAB to set the true strengths. Figure \ref{crossone} shows the reconstructions with one pair of directions. Clearly, the parallel lines containing the unknown points with normal in the observation direction are clearly reconstructed. To locate the points, we take $8$ observation directions $\hat x_j=(\cos\alpha_j,\sin\alpha_j)$ where $\alpha_j=2\pi j/8, j=0,\cdots,7$. Figure \ref{cross} gives the reconstruction of the five points. Table~\ref{fivetau} gives the comparison of true strength and computed strength. In the final example, we use $35$ points to characterize the word "AMSS" (abbreviation for Academy of Mathematics and Systems Science). All the strengths are set to $1$. As shown in Figure~\ref{AMSS}, the $35$ points are well captured, even $10\%$ relative noise is considered. In particular, for this complicated example, $32$ equally distributed observation directions are used, where the direction number is smaller than the point number. \begin{figure}[htbp] \centering \subfigure[\textbf{$\hat x=\pm(0,1)$.}]{ \includegraphics[height=1.1in,width=1.3in]{crosstauranderr01x01.pdf}} \subfigure[\textbf{$\hat x=\pm(\frac{\sqrt{2}}{2},-\frac{\sqrt{2}}{2})$.}]{ \includegraphics[height=1.1in,width=1.3in]{crosstauranderr01x1m1.pdf}} \subfigure[\textbf{$\hat x=\pm(1,0)$.}]{ \includegraphics[height=1.1in,width=1.3in]{crosstauranderr01x10.pdf}} \subfigure[\textbf{$\hat x=\pm(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2})$.}]{ \includegraphics[height=1.1in,width=1.3in]{crosstauranderr01x11.pdf}} \caption{Reconstruction by one pair of directions with $10\%$ noise.} \label{crossone} \end{figure} \begin{figure}[htbp] \centering \includegraphics[height=1.6in,width=1.8in]{crosstauranderr018k.pdf} \caption{Locating the five point sources with 8 directions and $10\%$ noise.} \label{cross} \end{figure} \begin{table} \begin{center} \begin{tabular}{llllll } \hline &True strength&\qquad Computed strength \\ \hline $\tau_1$ & $0.119437 + 0.858134i$ &\qquad $ 0.117949 + 0.860545i $\\ \hline $\tau_2$ & $0.931100 + 0.056194i$ &\qquad $ 0.939913 + 0.061328i $\\ \hline $\tau_3$ & $0.994541 + 0.975031i$ &\qquad $ 1.001599 + 0.981825i $\\ \hline $\tau_4$ & $0.406819 + 0.595928i$ &\qquad $ 0.405445 + 0.607381i$\\ \hline $\tau_5$ & $0.117482 + 0.901291i$ &\qquad $ 0.131289 + 0.911853i$\\ \hline \end{tabular} \caption{Reconstruction of scattering strengths using the far fields with $10\%$ noise. We take $\hat{x}=(\cos(\pi/16),\sin(\pi/16))$ in this example.} \label{fivetau} \end{center} \end{table} \begin{figure}[htbp] \centering \includegraphics[height=1.6in,width=5.6in]{amsstau1err01.pdf} \caption{Reconstruction of "AMSS" with $32$ directions and $10\%$ noise.} \label{AMSS} \end{figure} \section{Conclusions and remarks} We consider the scattering by point objects using measurements at finitely many sensors. Both the uniqueness and numerical methods for identifying the point objects have been studied. The numerical examples further verify the effectiveness and robustness of the proposed numerical methods. Finally, we want to remark that our numerical algorithms are also works for small inclusions. This is due to the fact that the point objects can be regarded as an approximation of small inclusions. \section*{Acknowledgement} The research of X. Ji is supported by the NNSF of China under grants 91630313 and 11971468, and National Centre for Mathematics and Interdisciplinary Sciences, CAS. The research of X. Liu is supported by the NNSF of China under grant 11971701, and the Youth Innovation Promotion Association, CAS. \bibliographystyle{SIAM}
\section{Introduction} Recently, researchers have shown an enormous interest \cite{kaul2012real,wang2019minimizing2,ceran2019average,wang2018skip,wang2019minimizing,kaul2012status,gu2019timely,gu2019minimizing,wang2019age,kadota2018optimizing,kadota2018scheduling,kadota2019minimizing,yates2017status,jiang2018can,maatouk2019minimizing1} in a new performance metric, termed \textit{Age of Information} (AoI), due to its advantages in characterizing the timeliness of data transmission in status update systems. The timeliness of status update is of great importance, especially in real-time monitoring applications, in which the dynamics of the monitored processes need to be well grasped for further actions. The AoI is defined as the time elapsed since the generation time of the latest received status update at the destination \cite{kaul2012real}. According to the definition, the AoI is jointly determined by the transmission interval and the transmission delay. Early work on the analysis and optimization of AoI in various networks has mainly focused on the simple single-source system model \cite{ceran2019average,wang2019minimizing2,wang2018skip,wang2019minimizing,kaul2012real,kaul2012status,gu2019timely,gu2019minimizing,wang2019age}. Recent researches on AoI optimization pays more attention in the more practical multi-source systems \cite{yates2017status,kadota2018optimizing,kadota2018scheduling,kadota2019minimizing,jiang2018can,maatouk2019minimizing1}. For systems with multiple sources, the AoI of the whole system heavily depends on the transmission scheduling of all devices. In this line of research, the authors in \cite{kadota2018optimizing} considered a base station (BS) receiving status updates from multiple nodes with a \textit{generate-at-will} status arrival model. A BS serving status updates to multiple nodes with randomly generated status update was considered in \cite{kadota2019minimizing}. Both of them derived the lower bound of the weighted sum of the expected AoI of the considered network and compared the lower bound with that of various suboptimal policies including Whittle index policy, max-weight policy, etc. The authors in \cite{jiang2018can} also considered system with stochastic arrivals and derived the Whittle index policy in closed form. A decentralized policy was further proposed in \cite{jiang2018can}, which was shown to achieve near-optimal performance. Another branch of this research line is to optimize the AoI of the networks with random access protocols. Particularly, the AoI performance of slotted ALOHA and Carrier Sense Multiple Access (CSMA) were investigated in \cite{yates2017status,maatouk2019minimizing1}, respectively. All aforementioned studies on AoI have concentrated on the orthogonal multiple access (OMA) scheme. That is, only a status update packet can be delivered and received in one time slot. Very recently, the authors in \cite{maatouk2019minimizing} have for the first time investigated the potential of applying non-orthogonal multiple access (NOMA) in minimizing the average AoI of a two-node network. The results in \cite{maatouk2019minimizing} showed that OMA and NOMA can outperform each other in different setups. NOMA has been regarded as a promising technique to deal with large-scale Internet of thing (IoT) deployment \cite{ding2017application,saito2013non}. The idea of NOMA is to leverage the power domain to enable multiple clients to be served at the same time or frequency band. Compared to OMA, NOMA can reduce AoI by improving spectrum utilization efficiency. Specifically, more than one client can be served by the BS using NOMA, resulting in a possible AoI drop of more than one client. While in OMA, only the served client may have AoI drop and the AoI of other clients all increases. In this context, a natural question arises: how should a multi-user system adaptively switch between OMA and NOMA modes to minimize the AoI of the network? To the best of authors' knowledge, the answer to this question remains unknown in the literature. Note that the NOMA scheme makes it possible for the BS to serve more clients at the cost of a high error probability, which makes the optimal policy design problem for hybrid NOMA/OMA non-trivial. Motivated by the gap above, in this paper, we consider a wireless network with a BS that conducts timely transmission to two clients in a slotted manner. The BS is able to adaptively switch between NOMA and OMA for the downlink transmission. To achieve the optimal AoI performance, the BS needs to decide which scheme (i.e., NOMA or OMA) to use at the beginning of each time slot. For the OMA scheme, the BS should further decide which client to serve. For the NOMA scheme, the BS needs to further decide the power allocated to each client. We make the following contributions in this paper: To minimize the AoI of the network, we develop an optimal policy for the BS to decide whether to use NOMA or OMA for each downlink transmission based on the instantaneous AoI of both clients by formulating a Markov Decision Process (MDP) problem. We prove the existence of the optimal stationary and deterministic policy, and perform action elimination to reduce the action space for lower computation complexity. The optimal policy is shown to have a switching-type property with obvious decision switching boundaries. A suboptimal policy with lower computation complexity is also proposed, which can achieve near-optimal performance according to our simulation results. The approximate average AoI performance of the suboptimal policy is also derived by applying a two-dimensional Markov chain. The performance of different policies under different system settings is compared and analyzed in numerical results to provide useful insights for practical system designs. \section{System Model and Problem Formulation} We consider a wireless network with a BS that conducts timely transmission to two clients in a slotted manner. At the beginning of each time slot, the BS can generate a packet for each client, which is known as \textit{generate-at-will} in the literature. This model is practical as the BS generally has the ability to control when to download information from cloud or server. Adaptive NOMA/OMA transmission scheme is adopted by the BS. That is, the BS adaptively switches between NOMA and OMA for the downlink transmission. Thus, it is possible for two clients to receive their packets simultaneously within one time slot. At the end of each time slot, if client $i$ has received its packet successfully from the BS, it will send an acknowledgment (ACK) to the BS. The ACK link from both clients to the base station is considered to be error-free and delay-free. We adopt a recent metric, \textit{Age of Information} (AoI) \cite{kaul2012real}, to characterize the timeliness of the information received at each client. It is defined as the time elapsed since the generation time of the latest received information at the destination side. Mathematically, the AoI of client $i$, denoted by $\Delta_i(t)$, at time $t$ is $t-u_i(t)$, where $u_i(t)$ denotes the generation time of latest received status update at time $t$. According to the \textit{generate-at-will} status generation model at the BS, if client $i$ has received its information from the BS, its AoI will decrease to $1$, otherwise its AoI increases by $1$. Mathematically, we have \begin{equation} \Delta_i(t+1)= \left\{ \begin{array}{rcl} \Delta_i(t)+1 ,& &v_i(t)=0 ,\\ 1,& &v_i(t)=1, \\ \end{array} \right. \end{equation} where $v_i(t)$ denotes the indicator that is equal to $1$ when the client $i$ receives its information from the BS in time slot $t$ and $v_i(t)=0$ otherwise. The weighted sum of the expected AoI of the two clients is adopted to measure the network-wide information timeliness, which is given by \begin{equation} \bar{\boldmath \Delta}=\lim_{T \rightarrow \infty}\frac{1}{T}\mathbb{E}[\sum_{i=1}^{2}\sum_{t=1}^{T}w_i\Delta_i(t)], \end{equation} where $w_i$ is the weight coefficient of client $i$ with $\sum_{i=1}^2 w_i=1$, and the expectation is taken over all possible system dynamics. We consider that in the OMA mode, the BS allocates time slots to conduct transmission to each client individually. In this context, if the time slot is assigned for transmission to client $i$, $i\in\{1,2\}$, the observation at the client $i$ can be written as \begin{equation} y_i=h_i \sqrt{P}m_i+n_i, \end{equation} where $P$ is the constant transmission power of the BS; $m_i$ is the status update information from the BS to client $i$; $h_i$ is the channel coefficient between the BS and client $i$. Specifically, $h_i=\sqrt{d_i^{-\tau}}g_i$, where the normalized distance $d_i=c_i/c_0$, with $c_i$ and $c_0$ denoting the distance between client $i$ to the BS and the baseline distance, respectively. $\tau$ denotes the path loss exponent and $g_i \sim \mathcal{CN}(0,1)$ ($\mathcal{CN}$ denotes complex normal distribution). Without loss of generality, we consider $c_1<c_2$, i.e., ${|h_1|}^2>{|h_2|}^2$. $n_i$ is the complex additive Gaussian noise with variance $\sigma_i^2$. For simplify, we assume the variance of $n_i$ is identical for both clients, i.e., $\sigma_i^2=\sigma^2$, $\forall i$. After receiving the signal, the information can be decoded in an interference-free manner with a SNR $\gamma_i={|h_i|}^2\rho$, where $\rho=P/\sigma^2$ is the transmission SNR. Then, the rate for client $i$ can be expressed as $R_i^{OMA}=\log(1+\gamma_i)$. The outage probability at client $i$ using OMA is given by \begin{small} \begin{equation} \begin{split} P_i^{O}&=1-P\left(R_i^{OMA}\geq R_i\right)\\ &=1-\exp\left(-\frac{(2^{R_i}-1)d_i^{\tau}}{\rho}\right), \end{split} \end{equation} \end{small} where $R_i$ is the target rate of client $i$. For simplicity, we assume that the target rates of both clients are the same, i.e., $R_1 = R_2 = R$. Note that the framework developed in this paper can be readily extended to the case with distinct target rates. On the other hand, in NOMA, the signals to different clients is combined in the power domain by allocating different power levels to them at the BS. Thus, through successive interference cancellation (SIC), it is possible for two clients to successfully recover their corresponding information in the same time slot. As we consider fixed power transmission, the observation at client $i$ can be given by \begin{equation} y_i=h_i (\sqrt{\alpha_1 P}m_1+\sqrt{\alpha_2 P}m_2)+n_i, \end{equation} where $\alpha_i$ is the power allocation coefficient, and we readily have $\alpha_1+\alpha_2=1$ to achieve the best possible performance. It is assumed that the BS only has the knowledge of stochastic channel state information (CSI) of its channels to both clients, while the clients as receivers have perfect knowledge of CSI as in \cite{cui2016novel,yu2017performance}. In this way, we have $\alpha_1<\alpha_2$ according to the NOMA principle. Then, for client $2$ (i.e., the far user), it decodes its message from the BS directly by treating $m_1$ as interference and its received SINR is can be written as \begin{equation} \gamma_{22}=\alpha_2 {|h_2|}^2/(\alpha_1 {|h_2|}^2+1/\rho). \end{equation} Therefore, the outage probability of client $2$ using NOMA is given by \begin{equation} \label{outage2} \begin{split} P_2^{N}&=1-P(\log(1+\gamma_{22})\geq R)\\ &=1-\exp\left(-\frac{(2^{R}-1)d_2^\tau}{\rho (\alpha_2-\alpha_1(2^{R}-1))}\right), \end{split} \end{equation} where we enforce $\alpha_2-\alpha_1(2^{R}-1)>0$, i.e., $\alpha_2>\frac{2^R-1}{2^R}$. For client $1$ (i.e., the near user), it will conduct SIC. Specifically, client $1$ will first decode $m_2$ as what client $2$ has done by treating $m_1$ as interference. The received SINR of client $1$ when decoding $m_2$, $\gamma_{12}$ can thus be similarly expressed as \begin{equation} \gamma_{12}=\alpha_2 {|h_1|}^2/(\alpha_1 {|h_1|}^2+1/\rho). \end{equation} After $m_2$ is successfully decoded, client $1$ decodes $m_1$ without interference, and the SNR is \begin{equation} \gamma_{11}=\alpha_1 {|h_1|}^2\rho. \end{equation} The outage probability of client $1$ using NOMA can thus be calculated as \begin{small} \begin{equation} \label{outage1} \begin{split} &P_1^{N}=1-P(\log(1+\gamma_{22})\geq R\& \log(1+\gamma_{11})\geq R)\\ &=1-\exp\left(-\max\left\{\frac{(2^{R}-1)d_1^\tau}{\rho (\alpha_2-\alpha_1(2^{R}-1))},\frac{(2^{R}-1)d_1^{\tau}}{\rho\alpha_1}\right\}\right). \end{split} \end{equation} \end{small} Comparing the outage probability of each client using either NOMA or OMA scheme, we can find that NOMA offers more chance for the BS to transmit time-sensitive information to both clients at the cost of a higher outage probability. Thus, to maintain the timeliness of the information received at each client, at the beginning of each time slot, the BS needs to carefully decide whether to use NOMA or OMA scheme. In addition, the outage probability of NOMA is determined by the power allocation for each client. As such, when using NOMA, the BS should appropriately allocate power for the transmission to each client. The power allocated to each client is considered to be discrete in this paper, which is practical in real systems. Specifically, the power allocated to client $i$, denoted by $p_i$, can only take the value from the discrete set $\{0,p,2p,3p,..Np\}$ with $p=P/N$ and $p_1+p_2=P$, as $\alpha_1=1-\alpha_2$. That is, $\alpha_i$ can take the value from $\{0,\frac{1}{N},\frac{2}{N},\frac{3}{N},..,1\}$. As client $2$ is far from the BS (i.e., $c_1<c_2$), to effectively use NOMA, $\alpha_2$ should be larger than $\alpha_1$ when applying NOMA, i.e., $\alpha_2>0.5$. Combining it with the previous condition $\alpha_2>\frac{2^R-1}{2^R}$, we can deduce that $\alpha_2$ can only take value from $\{0,\max\{\frac{1}{2}+\frac{1}{N},\lceil\frac{(2^R-1)N}{2^R}\rceil\frac{1}{N}\},\max\{\frac{1}{2}+\frac{1}{N},\lceil\frac{(2^R-1)N}{2^R}\rceil\frac{1}{N}\}+\frac{1}{N},...,1\}$. Let $\alpha_2(t)$ denote the power allocation coefficient for client $2$ at time slot $t$. Specifically, $\alpha_2(t)=0$ and $\alpha_2(t)=1$ indicates the BS uses OMA scheme, conducting transmission to client $1$ and client $2$, respectively; otherwise, the BS uses NOMA scheme, serving both clients with the amount of power $\alpha_2(t)P $ allocated to client $2$ and $(1-\alpha_2(t))P$ to client $1$. Let $\pi$ denote the transmission policy at the BS, consisting of a sequence of actions at each time slot, denoting by $\{a_t\}$. $a_t\in \{0,\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\},...,N\}$ indicate the BS allocate $a_tp$ amount of power to client $2$. If $a_t=0$, the BS chooses OMA scheme and transmits information to client $1$; if $a_t=N$, the BS chooses OMA scheme and transmits information to client $2$; otherwise, the BS chooses NOMA scheme, with $a_tp$ amount of power allocated to client $2$ and $P-a_tp$ allocated to client $1$. Our design objective is to find the optimal policy for the BS that adaptively switches between NOMA and OMA schemes to minimize the weighted-sum of the expected AoI for both clients. The problem can be formally formulated as \begin{prob} \label{p1} \begin{equation} \min_{\pi} \bar{\boldmath \Delta}.\\ \end{equation} \end{prob} \section{Age-Optimal policy} \subsection{MDP Formulation} In this subsection, we solve Problem \ref{p1} by recasting it into a MDP problem, described by a tuple $\{\mathcal{S},\mathcal{A},\mathrm{P},r\}$, where \begin{itemize} \item State space $\mathcal{S}=\mathcal{N}^2$: The state at time slot $t$ is composed by the instantaneous AoI of both clients, $s_t\triangleq (\Delta_{1t},\Delta_{2t})$. \item Action space $\mathcal{A}=\{0,\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\},...,N\}$: the detailed description of action $a_t \in \mathcal{A}$ has been provided in the previous section. \item Transition probabilities $\mathrm{P}$: $P(s_{t+1}|s_t,a_t)$ is the probability of transit from state $s_t$ to $s_{t+1}$ when taking action $a_t$. According to the outage probability of both clients using either NOMA or OMA given in Section II, we have \begin{equation} \label{e3} \begin{aligned} &P((1,\Delta_2+1)|(\Delta_1,\Delta_2),a=0)=1-P_1^O,\\ &P((\Delta_1+1,\Delta_2+1)|(\Delta_1,\Delta_2),a=0)=P_1^O,\\ &P((\Delta_1+1,1)|(\Delta_1,\Delta_2),a=N)=1-P_2^O,\\ &P((\Delta_1+1,\Delta_2+1)|(\Delta_1,\Delta_2),a=N)=P_2^O,\\ \end{aligned} \end{equation} and for $i\neq 0,N$ \begin{equation} \begin{aligned} \label{e3*} &P((1,\Delta_2+1)|(\Delta_1,\Delta_2),a=i)=(1-P_1^N(a))P_2^N(a),\\ &P((\Delta_1+1,1)|(\Delta_1,\Delta_2),a=i)=(1-P_2^N(a))P_1^N(a),\\ &P((1,1)|(\Delta_1,\Delta_2),a=i)=(1-P_1^N(a))(1-P_2^N(a)),\\ &P((\Delta_1+1,\Delta_2+1)|(\Delta_1,\Delta_2),a=i)=P_1^N(a)P_2^N(a), \end{aligned} \end{equation}where $P_1^N(a)$ and $P_2^N(a)$ are the outage probability of client $1$ and client $2$, respectively, using NOMA with $\alpha_1=1-\frac{a}{N}$ and $\alpha_2=\frac{a}{N}$. The time superscript from the state $(\Delta_{1t},\Delta_{2t})$ and action $a_t$ is omitted for brevity. \item $r: \mathcal{S} \times \mathcal{A} \rightarrow \mathrm{R}$ is the one-stage reward function of state-action pairs, defined by $r(s_t,a)=w_1\Delta_{1t}+w_2\Delta_{2t}$. \end{itemize} Given any initial state $s$, the infinite-horizon average reward of any feasible policy $\pi \in \Pi$ can be expressed as \begin{equation} \label{e4} C(\pi,s)=\lim_{T \rightarrow \infty}\sup\frac{1}{T} \sum_{k=0}^{T}{\mathbb E}_{s}^\pi[r(s_k,a_k)]. \end{equation} The Problem \ref{p1} can be transformed to the following MDP problem \begin{prob} \label{p2} \begin{equation} \label{pro2} \min_{\pi} C(\pi,s). \end{equation} \end{prob} To proceed, we now investigate the existence of optimal stationary and deterministic policy of Problem \ref{p2} and achieve the following theorem. \begin{theorem} \label{TE} There exist a constant $J^{*}$, a bounded function $h(\Delta_1,\Delta_2):\mathcal{S} \rightarrow \mathcal{R}$ and a stationary and deterministic policy $\pi^{*}$, satisfies the average reward optimality equation, \begin{equation} \label{e10} J^{*}+h(\Delta_1,\Delta_2)=\min_{a\in \mathcal{A}} (w_1\Delta_1+w_2\Delta_2 \mathbb +{\mathbb{E}}[h(\hat{\Delta}_1,\hat{\Delta}_2)]), \end{equation} $\forall (\Delta_1,\Delta_2) \in \mathcal{S}$, where $\pi^{*}$ is the optimal policy, $J^{*}$ is the optimal average reward, and $(\hat{\Delta}_1,\hat{\Delta}_2)$ is the next state after $(\Delta_1,\Delta_2)$ taking action $a$. \end{theorem} \begin{proof} See Appendix \ref{A1}. \end{proof} \subsection{Action Elimination} In this subsection, we establish action elimination by analyzing the property of the formulated MDP problem, which can reduce action space for each state for lower computation complexity. According to \eqref{outage2} and \eqref{outage1}, and the fact $\alpha_1+\alpha_2=1$, the outage probability of client $2$ using NOMA $P_2^N$ is decreasing in $\alpha_2$, i.e., $P_2^N(a)$ is decreasing in action $a$, when $ \max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\}<a<N$. However, the outage probability of client $1$ using NOMA $P_1^N$ is decreasing when $\frac{2^R-1}{2^R}<\alpha_2<\frac{2^R}{2^R+1}$ and increasing when $\frac{2^R}{2^R+1}<\alpha_2<1$. That is, $P_1^N(a)$ is decreasing in $a$ when $a\in \{\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\},...,\lfloor\frac{2^RN}{2^R+1}\rfloor\}$ and increasing when $a\in\{\lceil\frac{2^RN}{2^R+1}\rceil,\lceil\frac{2^RN}{2^R+1}\rceil+1,..., N-1\}$. As the BS aims to minimize the weighted sum of the expected AoI of the network, action $a=\lfloor\frac{2^RN}{2^R+1}\rfloor$ has a better performance in reducing AoI of both clients, with lower outage probability comparing to $a\in \{\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\},\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\}+1,...,\lfloor\frac{2^RN}{2^R+1}\rfloor\}$. Thus, the action space can be reduced to $a\in\{0,\lfloor\frac{2^RN}{2^R+1}\rfloor,\lfloor\frac{2^RN}{2^R+1}\rfloor+1,..., N\}$. \subsection{Structural Results on Optimal Policy} In this subsection, we derive two structural results of the optimal policy which offers an effective way to reduce the offline computation complexity and online implementation hardware requirement. \begin{theorem} \label{T2} The optimal policy $\pi^*$ has a switching-type policy. That is, denoting $c$ and $d$ as any action from action space $\{0,\lfloor\frac{2^RN}{2^R+1}\rfloor,\lfloor\frac{2^RN}{2^R+1}\rfloor+1,..., N\}$, \begin{itemize} \item If $\pi^*((\Delta_1,\Delta_2))=c$, then $\pi^*((\Delta_1,\Delta_2+z))=d$, where $z$ is any positive integer and $d\geq c$, \item If $\pi^*((\Delta_1,\Delta_2))=a$, then $\pi^*((\Delta_1+z,\Delta_2))=d$, where $z$ is any positive integer and $d\leq c$. \end{itemize} \end{theorem} \begin{proof} See Appendix \ref{A2}. \end{proof} Given the structure of the optimal policy, only the decision switching boundary is needed for implementation, rather than storing each state-action pair in the optimal policy, which significantly reduces the memory for the hardware. In addition, based on the structure, a special algorithm can be developed accordingly as in \cite{wang2018skip} to reduce the complexity of calculating the optimal policy. \subsection{Suboptimal Policy} In this subsection, we propose a suboptimal policy, with lower computation complexity comparing with that of optimal MDP policy. Inspired by the Max-weight policy in \cite{kadota2018scheduling}, the proposed suboptimal policy makes use of the transition probability in the MDP and minimizes the expectation of the reward of the next stage. According to \eqref{e3}, given current state $s=(\Delta_1,\Delta_2)$, the expected reward of next stage $\hat{s}$ can be expressed as \begin{small} \begin{equation} \mathbb{E}[r(\hat{s},a)]=\left\{ \begin{array}{rcl} 1+w_1P_1^O\Delta_1+w_2\Delta_2,& &\text{if } a=1;\\ 1+w_1\Delta_1+w_2P_2^O\Delta_2,& &\text{if } a=N\\ 1+w_1P_1^N(a)\Delta_1+w_2P_2^N(a)\Delta_2,& &\text{otherwise.} \\ \end{array} \right. \end{equation} \end{small}Then, the action of state $s$ in suboptimal policy $\bar{\pi}$ can be given by \begin{equation} \bar{\pi}(s)=\arg \min_a \mathbb{E}[r(\hat{s},a)]. \end{equation} The suboptimal policy is simple and easy to implement. Moreover, as we show via the numerical results in Section IV, the suboptimal policy can achieve near-optimal performance. By applying the suboptimal policy, the considered MDP problem is transferred into a Markov chain. We then can approximately calculate the weighted sum of the expected AoI of the network by finite state approximation as following, \begin{equation} P_{s,\hat{s}}^{\bar{\pi}}=\left\{ \begin{array}{rcl} P_{s,\hat{s}}^{\bar{\pi}}, & &\text{if } \hat{s}\in \mathcal{S}_m; \\ P_{s,\hat{s}}^{\bar{\pi}}+\sum_{s'\in \mathcal{S}-\mathcal{S}_m}P_{s,s'}^{\bar{\pi}}& & \text{otherwise, } \\ \end{array} \right. \end{equation} where $\mathcal{S}_m$ is the set of states with $\Delta_1\leq m$ and $\Delta_2\leq m$ and $P_{s,\hat{s}}^{\bar{\pi}}$ is the probability of transiting from state $s$ to $\hat{s}$ by taking action $\bar{\pi}(s)$. Accordingly, the transition matrix of the corresponding Markov chain $\mathbf{P}^{\bar{\pi}}$ can be constructed. Denoting $\pmb{\theta}$ as the steady state distribution of the Markov chain, by solving $\pmb{\theta}=\mathbf{P}^{\bar{\pi}}\pmb{\theta}$, the approximated weighted sum of the expected AoI of the network can be expressed by \begin{equation} \bar{\boldmath \Delta}'(\bar{\pi})=\sum_{s=(\Delta_1,\Delta_2)\in \mathcal{S}_m}\theta_s(w_1\Delta_1+w_2\Delta_2), \end{equation} where $\theta_s$ is the element in $\pmb{\theta}$, denoting steady state probability of state $s$. This also serves as the lower bound of the weighted sum of the expected AoI of policy $\bar{\pi}$, i.e., $\bar{\boldmath \Delta}(\bar{\pi}) > \bar{\boldmath \Delta}'(\bar{\pi})$. \section{Numerical Results} This section provides numerical results to verify the analytical results provided in the preceding sections. We set path loss exponent $\tau=2$ and target data rate $R=1$ in all simulations. The SNR in this section refers to as the transmission SNR $\rho$. We apply Relative Value Iteration (RVI) on truncated finite states ($\Delta_i \leq 100$, $\forall i$) to approximate the countable infinite state space according to \cite{sennott2009stochastic}. The optimal policy and suboptimal policy is illustrated in Fig.\ref{fig1}, where SNR$=18$dB, $d_1=2$, $d_2=4$ and $w_1=w_2=0.5$. The switching-type policy is verified. Besides, we can find that the proposed suboptimal policy is close to the optimal policy. \begin{figure}[!t] \centering \begin{subfigure}[b]{0.22\textwidth} \centering \includegraphics[width=\textwidth]{optimalpolicy} \caption{MDP optimal policy} \label{fig10} \end{subfigure} \hfill \begin{subfigure}[b]{0.22\textwidth} \centering \includegraphics[width=\textwidth]{maxweightpolicy} \caption{Suboptimal policy} \label{fig11} \end{subfigure} \caption{Age-optimal policy and suboptimal policy. Each point represents a state $s=(\Delta_1,\Delta_2)$. The colored area indicates action for each state, i.e., $a=0$ for states in the blue area; $a=7$ for states in the orange area; $a=8$ for states in the purple area; $a=9$ for states in the green area and $a=10$ for states in the red area, where $N=10$ and $\mathcal{A}=\{0,6,7,8,9,10\}$.} \label{fig1} \end{figure} \begin{figure}[!t] \centerline{\includegraphics[width=0.39\textwidth]{newfinalresult2}} \caption{The performance comparison of different policies versus SNR, when $w_1=w_2=0.5$.} \label{fig2} \end{figure} Fig. \ref{fig2} illustrates the performance of the weighted sum of the expected AoI of the two clients under optimal policy using adaptive NOMA/OMA scheme (optimal adaptive NOMA/OMA scheme), the policy that always using NOMA for transmission (optimal NOMA policy with $a\in\{\max\{\lceil{\frac{N}{2}\rceil}+1,\lceil\frac{(2^R-1)N}{2^R}\rceil\},...,N-1\}$), the proposed suboptimal policy and the optimal OMA policy that the BS adaptively selects one client to conduct transmission (optimal OMA scheme with $a\in \{0,N\}$) in two cases: 1) $d_1=2$ and $d_2=4$; 2) $d_1=3$ and $d_2=6$. The setting of the rest system parameters is the same as that in Fig \ref{fig1}. We can find that the proposed suboptimal policy achieves near-optimal performance, and its weighted sum of the expected AoI almost coincides with that of the optimal adaptive NOMA/OMA policy especially when the outage probability of two clients are small as shown in Fig. \ref{fig2}. Specifically, the performance of suboptimal policy is closer to that of the optimal adaptive NOMA/OMA policy when $d_1=2$ and $d_2=4$, comparing to the case when $d_1=3$ and $d_2=6$; the gap between the weighted sum of the expected AoI of the suboptimal policy and that of the optimal adaptive NOMA/OMA policy narrows as the SNR increases. Moreover, we can see that when SNR is small, e.g., SNR$< 15$dB, the performance of optimal adaptive NOMA/OMA scheme and that of optimal OMA scheme are almost the same in Fig. \ref{fig2}. This is due to the low SNR, which leads to a larger outage probability for both OMA and NOMA. The situation for NOMA is even worse. As such, both optimal adaptive NOMA/OMA policy and the suboptimal policy will prefer not to choose NOMA scheme but use OMA scheme. Thus, these two policies have similar performance. As SNR increases, the weighted sum of the expected AoI of optimal OMA policy will approach $1.5$, when $w_1=w_2=0.5$. This is the optimal performance under the OMA scheme, where the outage probability of each client is 0, and thus $1$ and $2$ take turns to form the age evolution of each client. Furthermore, we can find that the performance of optimal adaptive NOMA/OMA policy and that of suboptimal policy and NOMA policy are relatively close when SNR is large, e.g., SNR$\geq20$dB in Fig. \ref{fig2}. This is because both optimal adaptive NOMA/OMA policy and suboptimal policy are more likely to choose NOMA for transmission. When SNR is large enough, the optimal performance of both the optimal adaptive NOMA/OMA policy and the suboptimal policy approaches $1$ as the instantaneous AoI of each client will be always $1$, thanks to no outage for both clients in NOMA. The BS thus always chooses NOMA scheme to conduct transmissions to both clients. In addition, NOMA is better than optimal OMA when SNR$>16$dB for $d_1=2$ and $d_2=4$ and SNR$>19$dB for $d_1=3$ and $d_2=6$. This shows the advantage of NOMA in timely status update when SNR is large. \section{Conclusions} In this paper, we considered a wireless network with a base station (BS) conducting timely transmission to two clients in a slotted manner via hybrid non-orthogonal multiple access (NOMA)/orthogonal multiple access (OMA). The BS can adaptively switch between NOMA and OMA for the downlink transmission to minimize the AoI of the network. We develop an optimal policy for the BS to decide whether to use NOMA or OMA for downlink transmission based on the instantaneous AoI of both clients in order to minimize the weighted sum of the expected AoI of the network. This is achieved by formulating a Markov Decision Process (MDP) problem. We proved the existence of optimal stationary and deterministic policy. Action elimination was conducted to reduce the computation complexity. The optimal policy is shown to have a switching-type property with obvious decision boundaries. A suboptimal policy with lower computation complexity was also proposed, which is shown to achieve near-optimal performance according to simulation results. The approximate average AoI performance of the suboptimal policy was also derived. The performance of different policies under different system settings was compared and analyzed in numerical results to provide useful insights for practical system designs. \begin{appendices} \section{Proof of Theorem \ref{TE} \label{A1} We prove this theorem by verifying the Assumptions 3.1, 3.2 and 3.3 in \cite{guo2006average} hold. As the action space for each state is finite, assumption 3.2 holds, and we only need to verify the following two conditions. \begin{itemize} \item[\text{1)}] There exist positive constants $\beta < 1$, $M$ and $m$, and a measurable function $\omega(s) \geq1$ on $S$, $s=(\Delta_1,\Delta_2)$ such that the reward function of MDP problem $r(s,a)=w_1\Delta_1+w_2\Delta_2$, $|r(s,a)|\leq M\omega(s)$ for all state-action pairs $(s,a)$ and \begin{small} \begin{equation} \sum_{\hat{s}\in S} \omega(\hat{s})P(\hat{s}|s,a)\leq\beta\omega(s)+m,\ {\rm \ for \ all}\ (s,a). \end{equation} \end{small} \item [\text{2)}] There exist two value functions $v_1,v_2 \in B_{\omega}(S)$, and some state $s_0\in S$, such that \begin{small} \begin{equation} v_1(s)\leq h_{\alpha}(s)\leq v_2(s), \ {\rm for \ all} \ s\in S,\ {\rm and} \ \alpha \in(0,1), \vspace{-.5em} \end{equation} \end{small}where {\small$h_{\alpha}(s)=V_{\alpha}(s)-V_{\alpha}(s_0)$} and {\small$B_{\omega}(S):=\{u:\Vert u\Vert_{\omega} <\infty \}$} denotes Banach space, {\small$\Vert u\Vert_{\omega}:=\sup_{s\in S}\omega(s)^{-1}|u(s)|$} denotes the weighted supremum norm. \end{itemize} For condition 1, we show that when $\omega(s)=w_1\Delta_1+w_2\Delta_2$ and $m >1 $, there exist {\small$\max_a\{\frac{w_1\Delta_1 P_1^O+w_2\Delta_2+1-m}{w_1\Delta_1+w_2\Delta_2},\frac{w_1\Delta_1+w_2P_2^O\Delta_2+1-m}{w_1\Delta_1+w_2\Delta_2},$ $\;\frac{w_1P_1^N(a)\Delta_1+w_2P_2^N(a)\Delta_2+1-m}{w_1\Delta_1+w_2\Delta_2}\}\leq \beta<1$} to meet condition 1. To prove condition 2 in our problem, we show that when $\omega(s)=w_1\Delta_1+w_2\Delta_2$, there exists $\frac{w_1\Delta_1+w_2\Delta_2+1}{w_1\Delta_1+w_2\Delta_2}\leq \kappa<\infty$ that $\sum_{\hat{s}\in S} \omega(\hat{s})P(\hat{s}|s,a)\leq\kappa\omega(s) $ for all $(s,a)$, and for $d \in {\small \Pi^{MD}}$, ${\small \sum_{\hat{s}\in S} \omega(\hat{s})P_d(\hat{s}|s,a)\leq \omega(s)+1\leq (1+1)\omega(s)}$, so that $\alpha^N\sum_{\hat{s}\in S} \omega(\hat{s})P_d^N(\hat{s}|s,a)\leq \alpha^N (\omega(s)+N)<\alpha^N(1+N)\omega(s)$. Hence, for each $\alpha$, $0\leq \alpha <1$, there exists a $\eta$, $0\leq \eta<1$ and an integer $N$ such that \begin{equation} \alpha^N\sum_{\hat{s}\in S} \omega(\hat{s})P_{\pi}^N(\hat{s}|s,a)\leq \eta \omega(s) \end{equation} for $\pi=(d_1,...,d_N)$, where $d_k\in D^{MD}$, $1\leq k\leq N$. Then, according to Proposition 6.10.1 \cite{puterman2014markov}, for each $\pi\in \Pi^{MD}$ and $s\in S$ \begin{small} \begin{equation} |V_{\alpha}(s)|\leq \frac{1}{1-\eta}[1+\alpha\kappa+...+(\alpha\kappa)^{(N-1)}]w(s). \vspace{-.5em} \end{equation} \end{small} We thus can further prove the condition 2. This completes the proof. \section{Proof of Theorem \ref{T2} \label{A2} The switching-type policy is actually the same as the monotone nondecreasing policy in $\Delta_2$ when $\Delta_1$ is fixed, and the monotone nonincreasing policy in $\Delta_1$ when $\Delta_2$ is fixed. To prove the monotonicity of the optimal policy of the MDP problem in $\Delta_2$, we verify that the following four conditions given in \cite[Theorem~8.11.3]{puterman2014markov} hold. \begin{itemize} \item [a)] $r(s,a)$ is nondecreasing in $s$ for all $a\in A$; \item [b)] $q(k|s,a)=\sum_{j=k}^{\infty}p(j|s,a)$ is nondecreasing in $s$ for all $k\in S$ and $a\in A$; \item [c)] $r(s,a)$ is a subadditive function on $S\times A$ and \item [d)] $q(k|s,a)$ is a subadditive function on $S\times A$ for all $k\in S$. \end{itemize} To verify these conditions, we first order the state by $\Delta_2$, i.e., $s^+\geq s^-$ if $\Delta_2^+\geq \Delta_2^-$ where $s^+=(\cdot,\Delta_2^+)$ and $s^-=(\cdot,\Delta_2^-)$. The one-step reward function of the MDP is \begin{equation} \label{req1} r(s,a)=w_1\Delta_1+w_2\Delta_2. \end{equation} It is obvious that the condition a) is satisfied. According to the transition probabilities in \eqref{e3} and \eqref{e3*}, if the current state $s=(\Delta_1,\Delta_2)$, the next possible states are $s_1=(\cdot,\Delta_2+1)$ (including $(1,\Delta_2+1)$ and $(\Delta_1+1,1)$) and $s_2=(\cdot,1)$ (including $(1,1)$ and $(\Delta_1+1,1)$). Based on \eqref{e3} and \eqref{e3*}, we have \begin{equation} \label{req2} q(k|s,a=0)=\left\{ \begin{array}{rcl} 0,& &\text{if } k > s_1 \\ 1,& &\text{otherwise.} \\ \end{array} \right. \end{equation} \begin{equation} \label{req4} q(k|s,a=i, 0<i<N)=\left\{ \begin{array}{rcl} 0,& &\text{if } k > s_1\\ P_2^N(i),& &\text{if } s_1\geq k>s_2 \\ 1,& & \text{if } k\leq s_2 \end{array} \right. \end{equation} \begin{equation} \label{req3} q(k|s,a=N)=\left\{ \begin{array}{rcl} 0,& &\text{if } k > s_1\\ P_2^O,& &\text{if } s_1\geq k>s_2 \\ 1,& & \text{if } k\leq s_2 \end{array} \right. \end{equation} Thus, condition b) is immediate. To verify the remaining two conditions, we give the definition of subadditive in the following \begin{definition} \label{d0} (Subadditive\cite{puterman2014markov}) A multivariable function $Q(\delta,a): \mathcal{N} \times \mathcal{A} \rightarrow R$ is subadditive in $(\delta,a)$ , if for all $\delta^{+}\geq\delta^{-}$ and $a^{+}\geq a^{-}$, \begin{equation} \label{e8} \begin{aligned} Q(\delta^{+},a^{+})+ Q(\delta^{-},a^{-}) \leq Q(\delta^{+},a^{-})+ Q(\delta^{-},a^{+}) \end{aligned} \end{equation}holds. \end{definition} According to \eqref{req1}, condition c) follows. For the last condition, we verify whether \begin{equation} q(k|s^+,a^+)+q(k|s^-,a^-)\leq q(k|s^+,a^-)+q(k|s^-,a^+), \end{equation} with $s^+=(\Delta_1,\Delta_2^+)$ and $s^-=(\Delta_1,\Delta_2^-)$ where $\Delta_2^+\geq \Delta_2^-$ and $a^+\geq a^-$. As there are three actions, we consider three cases: (1) $a^+=i$, $a^-=0$, (2) $a^+=N$, $a^-=0$ and (3) $a^+=N$, $a^-=i$ and (4) $a^+=i$, $a^-=j$ for $ 0\leq j\leq i \leq N$, $\forall i,j$. According to \eqref{req2}-\eqref{req3}, we can verify that condition d) holds. As all these four conditions hold, the optimal policy is monotone nondecreasing in $\Delta_2$, when $\Delta_1$ is fixed. The proof of monotonicity of the optimal policy of the MDP problem in $\Delta_1$ is similar, thus omitted for brevity. This completes the proof. \end{appendices}
\section{Introduction} Free-space optics (FSO) plays an important role in backhaul networks in 5G wireless communications due to the availability of large chunks of bandwidth in the optical spectrum. However, the problem of pointing, acquisition and tracking is significant in the context of FSO because of the narrow beam widths associated with the optical signal. Acquisition is the process in which the two terminals acquire the initial location of each other before the actual data communication begins. However, after the acquisition is achieved, the system still needs to maintain the alignment between the transmitter and receiver assemblies due to physical factors, such as random effects associated with atmospheric turbulence, the mechanical jitter introduced in the transmitter/receiver assemblies, or building sways due to wind vibrations. This misalignment leads to the loss of received signal energy at the receiver that may increase the outage probability at the receiver. If the beam center can be tracked efficiently on the array, a feed control loop, based on the more agile gimbal-less MEMS retroreflective system \cite{Deng}, can adjust the transmitter/detector assemblies in order to point the field-of-view in the required direction efficiently. The interest in pointing and tracking subsystems in FSO has picked up recently due to the deployment of Facebook Connectivity and Google Loon projects \cite{Kaymak} in order to provide internet access to regions of the world that lack a traditional communications infrastructure. For instance, it is planned that the optical signal from the transmitter will be relayed over to the people in a remote/inaccessible location via a network of balloons/drones. The tracking problem becomes more significant due to the movement of balloons or drones owing to wind motion or inaccurate hovering. Additionally, the demand on accurate tracking becomes more stringent with orbital-angular-momentum beams \cite{Li}. In this paper, we consider the optical beam position tracking\footnote{Typically, the word ``tracking'' is associated with the ``filtering'' phenomenon where small variations in the parameter are tracked continuously, and all the past data is fused to arrive at the current estimate. In this paper, we only use the current or present set of data to estimate the beam position at each instant of time. } problem for a free-space optical communication system that employs multiple photon-counting detectors (array of detectors) instead of one large (monolithic) detector at the receiver. In this study, the purpose of the detector array is twofold: it is used for symbol detection as well as for tracking the beam. Thus, the proposed system is more efficient in terms of bandwidth and hardware complexity since no pilot symbols and extra hardware (mirrors/quadrant photodetectors etc.) are needed in order to track the beam. Hence, in light of this argument, the beam position on the array has two roles to serve; i) it provides error signal to the feedback loop in order to adjust the transceiver alignment assemblies, ii) and the beam position on the array is also part of the channel state information needed for optimal detection of data symbols\footnote{Such data symbols may correspond to Pulse position modulation symbols in an \emph{intensity modulated direct detection} (IM/DD) setting.}. Since the beam position is unknown, and a possibly random parameter, we have to estimate it in real-time. In this regard, a number of beam position estimators are proposed, and their performance is analyzed. We will see (through the Cram\'er-Rao Lower Bound) that the mean-square performance improves as the number of detectors in the array is increased while keeping the array area fixed. Additionally, the probability of error performance of our system also improves if we increase the number of detectors in the array. However, the improvement in performance comes with the increased overhead of complexity (computational complexity of estimators and the circuit/storage complexity), as the number of elements in the array is increased. All these ideas will be discussed in the remaining sections of this paper. \begin{figure} \begin{center} \includegraphics[scale=1.5]{gauss_beam_on_detector_paper7} \end{center} \vspace{-0.2cm} \caption{\small A drone projecting the Gaussian beam on a $4 \times 4$ detector array on a ground-based optical receiver.} \end{figure} \section{State-of-the-Art and Contributions of this Paper} There is no dearth of literature on research in pointing, acquisition and tracking (PAT) systems in FSO that treats the tracking problem purely from a hardware point-of-view. In this respect, \cite{Kaymak} provides a detailed overview of the current state-of-the-art hardware solutions for tracking the optical beam. Thus, we will cover the literature review from the theoretical/ signal processing perspective since such a perspective is more relevant to our study in this paper. The authors in \cite{Gagliardi} and \cite{Marola} have discussed the performance of a proposed feedback (beam) tracking loop that acts on the error signal provided by a quadrant photodetector in the receiver assembly. The work in \cite{Marola} actually builds on the study present in \cite{Gagliardi} by carrying out the stability analysis of their proposed cooperative feedback loop. The authors in \cite{Slocumb} present the performance analysis of centroid and maximum likelihood estimators of beam position for a ``continuous''\footnote{A continuous array is obtained if the number of cells in the detector array goes to infinity while keeping the array area finite. In other words, we have perfect information about the location of each photodetection in the array. Thus, the continuous arrays lead to the best mean-square error performance.} array. Regarding the literature that covers communications with detector arrays in free-space optics, the authors in \cite{Bashir1} propose beam position estimation algorithms and examine their mean-square error performance with simulations. The work in \cite{Bashir2} extends the work in \cite{Bashir1} by introducing Bayesian filtering algorithms, such as Kalman and particle filters, for tracking the time-varying beam position. The authors in \cite{Bashir3} inspect the relationship between the probability of error and the estimation of beam position on the detector array, and by an argument based on Chernoff Bounds, they show that precise estimation of beam center on the array is necessary in order to minimize the probability of error. Additionally, the author in \cite{Bashir4} presents a mathematical argument to show that the probability of error decreases monotonically as the number of cells in the array is increased. Furthermore, the authors in \cite{Bashir6} analyze the acquisition performance of an FSO system that employs an array of detectors at the receiver. Finally, the authors in \cite{Bashir5} consider time synchronization schemes based on an array of detectors. Furthermore, we also briefly discuss the literature on pointing and tracking in FSO systems that examine the tracking problem from the perspective of a single detector. In this regard, \cite{Farid} develops the pointing error statistics for a circularly shaped detector and a Gaussian beam, and the outage capacity is optimized as a function of beam radius. The authors in \cite{Mai} investigate a slightly different optimization problem concerning pointing: The maximization of link availability as a function of beam radius (for fixed signal power). Additionally, they also explore the minimization of transmitted power by tuning to the optimal beam radius under the constraint of a fixed link availability. In addition to these papers, the interested reader may be directed to \cite{Ansari, Zedini, Quwaiee, Issaid} for a detailed study on the performance of FSO systems when the optical channel suffers degradation due to pointing errors for a single detector receiver. This paper proposes a number of beam tracking algorithms for FSO communications with an array of detectors and a Gaussian beam. As discussed in the introduction, we plan to analyze the joint problem of beam tracking and data detection with an array of detectors in order to skimp on the required bandwidth and energy for our system \cite{Ferraro:15}. Hence, in our decision-directed scheme, the data symbols aid the beam tracking on the array, and, in return, the efficient beam tracking process helps with accurate detection of symbols. In this regard, we build on the study done in \cite{Bashir1} by providing a more theoretical framework for the tracking problem. Hence, in addition to proposing a number of additional estimators, we analyze the mean-square tracking error in terms of Cram\'er-Rao Lower Bound, which gives us some deeper insights into the tracking performance of the system. Furthermore, we explore a few interesting asymptotic scenarios which simplify the expressions, and help us get a better understanding of the problem. The algorithms proposed in this paper use photon counts in the detectors generated during an observation interval as a sufficient statistic for tracking the beam position. Photon-counting detectors provide a better probability of error performance as compared to analog detectors for low signal-to-noise ratio scenario \cite{Bashir6}. Additionally, the effect of the beam tracking algorithms on the probability of error is also analyzed. We reason---by using an analytical argument for the asymptotic case scenario (infinite number of detectors and poor SNR)---that the probability of error is minimized when beam position on the array is estimated accurately enough. Even though, the authors in \cite{Bashir3} have presented an argument on the minimization of probability of error (as a function of beam position) using Chernoff Bounds, the arguments presented in this study are more robust. The major assumption regarding tracking with detector arrays is that the array area is large enough so that the beam footprint is smaller than the footprint of the array. This is a valid assumption for channels which are not marred by scintillation effects due to turbulence (e.g., an optical link in the stratosphere), or for channels where the length of the link is of the order of a few hundred kilometers \cite{Bashir6}. Additionally, in this paper, the focus is on non-Bayesian estimation techniques for beam tracking. This is due to the fact that unless we are certain about the parameters of the prior random motion model of the beam on the array, we are likely going to incur a significant loss in performance if there is mismatch in our assumptions and the real world parameters\footnote{This is especially true if the parameters themselves---such as the covariance matrices of the random motion model---are time-varying.} \cite{Shmaliy}. This paper is organized as follows. In Section~\ref{system_model}, we discuss the system model, and Section~\ref{CRLB} contains the derivation of the Cram\'er-Rao Lower Bound for the beam position tracking error. The high complexity trackers, such as nonlinear least squares estimator and maximum likelihood estimators are described in Section~\ref{HCT}, and the maximum detector count estimator and different versions of the centroid estimator are discussed in Section~\ref{LCT}. Section~\ref{PE} considers the probability of error analysis for different beam position trackers, and Section~\ref{sims} elaborates on simulation principles and parameters. This is followed by a brief complexity analysis and the conclusions which are summarized in Section~\ref{Complexity} and Section~\ref{Conc}, respectively. \section{System Model for Beam Position Tracking} \label{system_model} The received optical signal on the receiver aperture gives rise to photoelectrons or photodetections in each detector of the array due to the \emph{photoelectric effect}. The emission of these photoelectrons during the signal pulse interval helps us detect transmitted symbols. The photon count $Z_m$ in the $m$th detector or cell of the array---during some observation interval $T_s$---is modeled as a discrete random variable. Its probability mass function is characterized by the following expression: \begin{align} P(\{ Z_m = z_m \}) = \frac{ \exp \left( {-\iint_{A_m} \left[ \lambda_s(x,y) + \lambda_n \right] \, dx\, dy} \right) (\iint_{A_m} \left[ \lambda_s(x,y) + \lambda_n \right] \, dx\, dy)^{z_m} } {z_m!} \label{photon_model} , \; m = 1, \dotsc, M, \end{align} where $\lambda_s(x, y)$ is the scaled beam intensity\footnote{The actual signal intensity, $\lambda_{s_i}$, and the actual noise intensity, $\lambda_{n_i}$, are multiplied by the constant $ \frac{\eta T_s}{hc/\lambda}$ in order to obtain the intensity $\lambda_s$ and $\lambda_n$ for the photon generation model in \eqref{photon_model}. The constant $h$ is known as the \emph{Planck's constant}, and its value is $6.62607004 \times 10^{-34}\, {m}^2 kg / s$. The constant $c$ is the speed of light in vacuum which is about $3\times 10^{8} \, m/s$, $\lambda$ is the wavelength of light in meters, $\eta$ stands for the photoconversion efficiency, and $T_p$ represents signal pulse duration.} profile on the detector array, $\lambda_n$ is the scaled noise intensity profile, $A_m$ is the region of the $m$th detector on the detector array, $Z_1, Z_2, \dots, Z_M$ are independent Poisson random variables and $M$ is the total number of detectors in the array. \begin{figure} \begin{center} \includegraphics[scale=0.5]{gaussian_beam_paper7} \end{center} \caption{\small Profile of the incident beam on the detector array.} \end{figure} As may have been discerned by the reader, the coordinate $(x,y)$ stands for any point inside the region of the detector array. Moreover, $\lambda_n$ is a constant factor that accounts for the background radiation and the thermal effects of the detector array \cite{Snyder}. For Gaussian beams, the received (scaled) signal and noise intensity at the detector array is given by the expression \begin{align} \lambda_s(x,y,d)& \triangleq \frac{I_0}{\rho^2(d)} \exp\left( \frac{-(x-x_0)^2 -(y-y_0)^2}{2 \rho^2(d)} \right), \label{intensity} \end{align} where $I_0/\rho^2(d)$ is the peak intensity in W/$\text{m}^2$/s, $\rho(d) = \rho_0 \sqrt{1 + \left(\frac{\lambda d}{\pi \rho_0^2} \right)^2}$ meters, and $(x_0, y_0)$ is the center of the Gaussian beam on the detector array. The factor $\rho_0$ is the \emph{beam waist} measure in meters, and $\rho(d)$ is known at the \emph{beam radius} or the \emph{spot size} at a distance $d$ meters from the transmitter. Finally, the constant $\lambda_n$ denotes the uniformly distributed background radiation intensity and noise effect at the receiver. In the latter sections, the dependence of $\lambda(x,y,d)$ and $\rho(d)$ on distance $d$ is removed since we assume that $d$ is fixed, and therefore, $\lambda(x,y) \triangleq \lambda(x,y,d)$ and $\rho \triangleq \rho(d)$. Furthermore, it is a general assumption in the following sections that the center of the array has the coordinates $(0,0)$, and that the array extends from $-a$ to $a$ in each dimension for $a\in \mathbb{R}^{+}$. Additionally, the area of $A_m$ is denoted by $A$ since all detectors are assumed to have an equal area. \section{Cram\'er-Rao Lower Bound for Beam Position Tracking Error} \label{CRLB} In this section, we derive the \emph{Cram\'er-Rao Lower Bound} (CRLB) for the beam position tracking error. In this regard, the likelihood function is given by \begin{align} p(\mathbf{Z}|x_0, y_0) = \prod_{m=1}^M {e^{-\Lambda_m}} \frac{\Lambda_m^{z_m}}{z_m!}, \end{align} where \begin{align} \Lambda_m \triangleq \iint_{A_m} \left( \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2\rho^2}} + \lambda_n\right)\,dx \,dy, \label{intensity1} \end{align} and the random vector $\mathbf{Z} \triangleq \begin{bmatrix} Z_1 & Z_2 & \dotsb & Z_M \end{bmatrix}^T$. Let us define the total incident power on the array $\Lambda_s \triangleq \sum_{m=1}^M \Lambda_m$. Then, \begin{align} \ln p(\mathbf{Z}|x_0, y_0) = \sum_{m=1}^M z_m \ln \Lambda_m - \Lambda_m - \ln z_m! = \sum_{m=1}^M z_m \ln \Lambda_m -\ln z_m! - \Lambda_s. \end{align} Thus, \begin{align} &\frac{\partial \ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0} = \sum_{m=1}^M \frac{Z_m}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \frac{(x-x_0)}{\rho^2}\, dx \,dy - \underbrace{\iint_{\mathcal{A}} \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \frac{(x-x_0)}{\rho^2}\, dx \,dy}_{0}\nonumber \\ &= \sum_{m=1}^M \frac{Z_m}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \end{align} and \begin{align} &\frac{\partial^2 \ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0^2} = \sum_{m=1}^M -\frac{Z_m}{\Lambda_m^2} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \nonumber \\ & -\sum_{m=1}^M \frac{Z_m}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy + \sum_{m=1}^M \frac{Z_m}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^6} (x-x_0)^2 e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy. \end{align} Now, the expectation is taken with respect to $Z_m$: \begin{align} &-\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0^2 } \right] = \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \nonumber \\ & +\sum_{m=1}^M \iint_{A_m} \frac{I_0}{\rho^4} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy - \sum_{m=1}^M \iint_{A_m} \frac{I_0}{\rho^6} (x-x_0)^2 e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \nonumber \\ &= \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \nonumber \\ & + \iint_{\mathcal{A}} \frac{I_0}{\rho^4} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy - \iint_{\mathcal{A}} \frac{I_0}{\rho^6} (x-x_0)^2 e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \nonumber \\ &= \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 + \frac{2\pi I_0}{\rho^2} - \frac{2 \pi I_0}{\rho^2} \nonumber \\ &= \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2. \end{align} Similarly, it can be shown that \begin{align} -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial y_0^2 } \right]& = \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2. \end{align} Furthermore, \begin{align} &\frac{\partial^2 \ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0 \partial y_0} = \sum_{m=1}^M -\frac{Z_m}{\Lambda_m^2} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\times \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \nonumber \\ &+ \sum_{m=1}^M\frac{Z_m}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^6} (x-x_0) (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \end{align} \begin{align} &-\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0 \partial y_0 } \right] \nonumber \\ &= \sum_{m=1}^M \frac{1}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \nonumber \\ &-\underbrace{\iint_{\mathcal{A}} \frac{I_0}{\rho^6} (x-x_0) (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy}_{0} \nonumber \\ &= \sum_{m=1}^M \frac{1}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\nonumber \\ &= -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial y_0 \partial x_0 } \right]. \end{align} Moreover, the \emph{Fisher Information Matrix} is \begin{align} I(x_0, y_0) = \begin{bmatrix} -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0^2 } \right] & -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial x_0 \partial y_0 } \right] \\[8pt] -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial y_0 \partial x_0 } \right] & -\mathbbm{E}\left[ \frac{\partial^2\ln p(\mathbf{Z}|x_0, y_0)}{\partial y_0^2 } \right] \end{bmatrix}, \end{align} and $\text{Var}\left[ \hat{x}_0\right] \geq \left[I^{-1}(x_0, y_0)\right]_{1,1}$, and $\text{Var}\left[ \hat{y}_0\right] \geq \left[I^{-1}(x_0, y_0)\right]_{2,2}$. Finally, \begin{align} &\text{Var}[\hat{x}_0] \geq {\sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2}\nonumber \\ &\div \left[\sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \times \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \right. \nonumber \\ &- \left. \left(\sum_{m=1}^M \frac{1}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\right)^2 \right], \label{crlbx} \end{align} and \begin{align} &\text{Var}[\hat{y}_0] \geq {\sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2}\nonumber \\ &\div \left[\sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \times \sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2 \right. \nonumber \\ &- \left. \left(\sum_{m=1}^M \frac{1}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\right)^2 \right]. \label{crlby} \end{align} \subsection{Asymptotic Case ($M \to \infty$)} In the following analysis, let us analyze the lower bound on the variance of $\hat{x}_0$ only. The same analysis will hold in the case of lower bound on the variance of $\hat{y}_0$ due to the symmetric nature of the Gaussian beam. \subsubsection{High Signal-To-Noise Ratio} For high SNR, $\lambda_n A << \iint_{A_m} \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy$. Then, $\Lambda_m \approx \iint_{A_m} \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy$. When $M \to \infty$, $ \Lambda_m \approx \frac{I_0}{\rho^2} e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} \Delta_M$, where $(x_m, y_m)$ is the center of the $m$th small cell, and $\Delta_M$ is the infinitesimal area. Then, the numerator of \eqref{crlbx} simplifies as \begin{align} &\sum_{m=1}^M \frac{1}{\Lambda_m} \left( \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\right)^2 \approx \sum_{m=1}^M \frac{\left(\frac{I_0}{\rho^4} (y_m-y_0) e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} \Delta_M \right)^2} {\frac{I_0}{\rho^2} e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2} } \Delta_M} \nonumber \\ &= \sum_{m=1}^M \frac{I_0}{\rho^6}(y_m-y_0)^2 e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} \Delta_M \approx \frac{I_0 2\pi }{\rho^4} \iint_{\mathcal{A}} \frac{1}{2\pi \rho^2} (y-y_0)^2 e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy\nonumber \\ &= \frac{I_0 2 \pi}{\rho^4} \rho^2 = \frac{I_0 2 \pi}{\rho^2}. \end{align} The positive term in the denominator can be simplified in a similar fashion. The square root of the term with minus sign can be simplified as \begin{align} &\sum_{m=1}^M \frac{1}{\Lambda_m} \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy\nonumber \\ &=\approx \sum_{m=1}^M \frac{\frac{I_0}{\rho^4} (y_m-y_0) e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2} } \Delta_M }{\frac{I_0}{\rho^2} e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2} } \Delta_M } \times \frac{I_0}{\rho^4} (x_m-x_0) e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2} } \Delta_M \nonumber \\ &\approx \frac{I_0 2 \pi}{\rho^4} \iint_{A_m} \frac{1}{2\pi\rho^2} (y-y_0)(x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy = 0. \end{align} Therefore, \begin{align} \text{Var}[\hat{x}_0] \geq \frac{\frac{I_0 2 \pi}{\rho^2}} {\frac{I_0 2\pi}{\rho^2} \times \frac{I_0 2\pi}{\rho^2}} = \frac{\rho^2}{I_0 2 \pi}. \end{align} We note that the CRLB is minimized by minimizing $\rho$ (a more focused beam) for fixed signal power. Additionally, as expected, the CRLB improves with higher $I_0$ (higher signal power). \subsubsection{Low Siganl-To-Noise Ratio} In this case, let us assume that $\lambda_n A >> \iint_{A_m} \frac{I_0}{\rho^2} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy$. Then, $\Lambda_m \approx \lambda_n A$. In this case, the square root of the term with the minus sign in the denominator is \begin{align} \frac{1}{\lambda_n A} \sum_{m=1}^M \iint_{A_m} \frac{I_0}{\rho^4} (y-y_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \times \iint_{A_m} \frac{I_0}{\rho^4} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy, \end{align} which is zero due to the symmetric nature of the Gaussian beam. Therefore, by further simplification, \begin{align} \text{Var}[\hat{x}_0] \geq \frac{\lambda_n \rho^8}{I_0^2} \times \frac{\Delta_M}{\sum_{m=1}^M \left( \iint_{A_m} (x-x_0) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \,dy \right)^2} \end{align} which goes to \[ \frac{\frac{\lambda_n \rho^8}{I_0^2}}{\iint_{\mathcal{A}}(x-x_0)^2 e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{\rho^2}} \, dx \,dy } = \frac{2 \rho^4}{\pi \left(\frac{I_0^2}{\lambda_n}\right) } \] as $M \to \infty$. In this case, as expected, the CRLB is inversely proportional to $\frac{I_0^2}{\lambda_n}$. \subsection{Analysis of CRLB Curves}\label{CRLB_analysis} Fig.~\ref{fig4a} displays the CRLB curves plotted as a function of noise power. The results indicate a ``diminishing rate of return'' trend as $M$ increases indefinitely. Fig.~\ref{fig4b} depicts the CRLB curves as a function of $\rho$. We can see that there is an optimum value of $\rho$ (lets call it $\rho_M^*$ for the $M$-cell array) at which the CRLB is minimized. Additionally, $\rho^*_{N} < \rho^*_M$ for $N > M$. Intuitively, these observations are straightforward to explain. For fixed SNR, if the beam footprint is small, but at least covers one cell completely, then such a small beam footprint will minimize the mean-square error. This is true since all the power is focused into a small region on the array where the number of noise photons (on average) is relatively small, and this fact will help the tracker to estimate the beam position more accurately as opposed to a more ``spread out'' beam. However, if the beam radius is much smaller than the dimensions of the cell, then the beam will only give rise to photons in the cell in which it is located, and the neighboring cells will not register any signal photons. Since we round off the locations of the photons---that occur inside a given cell---to the center of the cell, any movement of the ``super thin'' beam inside the given cell cannot be tracked. Therefore, the CRLB rises if $\rho$ diminishes beyond a certain (optimum) value. \begin{figure} \centering \hspace{-1cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_CRLB_lambda} \caption{CRLB as a function of noise power} \label{fig4a} \end{subfigure} \vspace{-3cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_CRLB_p} \caption{CRLB as a function of $\rho$} \label{fig4b} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig4a} depicts the CRLB of beam position estimators as a function of noise power for different detector arrays. The signal power is 1 $\mu$W, the noise power is varied between 0.2 and 3.0 $\mu$W, and $\rho$ is fixed at 0.2 meters. Fig.~\ref{fig4b} shows the CRLB plots as a function of beam radius $\rho$. The noise power was fixed at 1.8 $\mu$W in this case. For both the figures, $(x_0, y_0) = (0.15, 0.15)$ and $|\mathcal{A}| = 4$ square meters.} \label{fig4} \end{figure} \section{High Complexity Trackers} \label{HCT} In this section, we take a look at two high complexity beam position trackers, namely the \emph{nonlinear least squares} (NLS) estimator and the \emph{maximum likelihood estimator} (MLE). As we will see later, these estimators will provide a better mean-square error performance than the low complexity estimators. However, the better performance of these estimators comes with a higher computational complexity, mainly for the following two reasons: \begin{enumerate} \item Both NLS and MLE are computed as a point in the parameter space where a numerical optimization algorithm converges while maximizing/minimizing a certain objective function (e.g., likelihood function in the case of MLE). An example of such numerical algorithms is the evolutionary algorithms (genetic algorithm, differential evolution algorithm). \item These estimators require estimation of additional beam parameters. In this case, we need to estimate the values of $I_0$, $\rho$ and $\lambda_n$ at the receiver. \end{enumerate} The next section discusses the estimation of $I_0$ and $\lambda_n$ that is based on the low complexity method of moments estimator. Unfortunately, estimation of $\rho$ is not so straightforward. For channels that are not marred significantly by turbulence or scattering, $\rho$ can be approximated from the expression $\rho(d) = \rho_0 \sqrt{1 + \left(\frac{\lambda d}{\pi \rho_0^2} \right)^2}$ if the link distance $d$ is known. Otherwise, we will have to estimate it as an unknown parameter alongside the beam center position on the array. In order to simplify the expressions for the upcoming NLS and MLE estimators, we will replace the Gaussian integrals with the distribution functions of a standard normal random variable. In this regard, we know that the density function of the photon count in the $m$th cell is \begin{align} P\left( \{Z_m = z_m \} \right) = \frac{e^{-\Lambda_m} \Lambda_m^{z_m}}{z_m!}, \; m=1, \dotsc, M, \end{align} where $z_m \in \mathbb{Z}^+ \cup \{0\}$ and $\Lambda_m$ is defined in \eqref{intensity1}. After a few easy manipulations, $\Lambda_m$ can be simplified as \begin{align} \Lambda_m(x_0, y_0) = I_0 2 \pi \left[ \Phi\left( \frac{y_{m_2} - y_0 }{\rho} \right) - \Phi\left( \frac{y_{m_1} -y_0}{\rho} \right) \right] \left[ \Phi\left( \frac{x_{m_2}-x_0}{\rho} \right) - \Phi\left( \frac{x_{m_1}-x_0}{\rho} \right) \right] + \lambda_n A, \end{align} where $\Phi(x)$ is the distribution function of a standard normal random variable, and \newline $(x_{m_2}, y_{m_2}), (x_{m_1}, y_{m_2}), (x_{m_2}, y_{m_1}), (x_{m_1}, y_{m_1})$ are the coordinates of the square region $A_m$ such that $x_{m_2} > x_{m_1}$ and $y_{m_2} > y_{m_1}$. In the analysis that follows, let us call the center of the $m$th detector $(x_m, y_m)$. \subsection{Method of Moments Estimator of $I_0$ and $\lambda_n$} In order to use the naive \emph{method of moments} estimator that can estimate $I_0$ and $\lambda_n$, we send $N$ pulses of signal in $N$ slots of time (``signal+noise'' slots). Moreover, there is another set of $N$ slots in which we do not transmit anything (``noise only'' slots). The width of the pulse and empty slot is the same: $T_p$. Then, by the \emph{strong law of large numbers}, the sample average converges to the true average \emph{almost surely}, and the method of moments estimate of $\lambda_n$ is defined to be \begin{align} \label{1} \hat{\lambda}_n \triangleq \frac{1}{|\mathcal{A}| N } \sum_{i=1}^{N} \sum_{m=1}^M z_{m,i}^{(n)}, \end{align} where $N$ is the total number of observation intervals used for the estimation of $\lambda_n$. The quantity $\mathcal{A}$ represents the detector array region, and $|\mathcal{A}| \triangleq \bigcup_{m=1}^M A_m$ represents the total area of the detector array. The random variable $z_{m,i}^{(n)}$ is the noise photon count in the $m$th cell during the $i$th observation interval where these observation intervals correspond to the ``noise only'' slots. By the same argument, the method of moments estimate of the signal intensity $I_0$ is \begin{align} \hat{I}_0 \triangleq \frac{1} { \Lambda_0 N } \sum_{i=1}^{N} \sum_{m=1}^M\left( z_{m,i}^{(s)} + z_{m,i}^{(n)} \right) - \frac{\hat{\lambda}_n |\mathcal{A}|}{\Lambda_0}. \label{intensity2} \end{align} where $\Lambda_0 \triangleq \iint_{\mathcal{A}} \frac{1}{\rho^2} \exp\left(- \frac{(x-x_0)^2+(y-y_0)^2}{2\rho^2} \right)\, dx\, dy$. The number $z_{m,i}^{(s)}$ corresponds to the signal photons generated in the $m$th detector during the $i$th slot. It is important to know that the count $\sum_{m=1}^M \left( z_{m,i}^{(s)} + z_{m_n}^{(i)} \right)$ in \eqref{intensity2} results assuming that the entire footprint of the beam is captured on the array when the beam center is pointing at the initial estimate of the receiver position. We note that in \eqref{intensity2}, $\Lambda_0$ is a constant with respect to $\rho$. Hence, the estimation of $I_0$ can be carried out independently of the value of $\rho$ at the receiver. It is important to note that we have assumed that $I_0$ and $\lambda_n$ remain constant during the duration $NT_p.$ This assumption roughly states that the coherence time of the signal fade is many orders of magnitude larger than $T_p$. This is a fair assumption for high speed data communications in free-space optics where $T_p$ is typically on the order of a fraction of a microsecond. It can be easily shown that $\hat{I}_0^{(N)}$ and $\hat{\lambda}_n^{(N)}$ are unbiased estimators, and $\hat{I}_0^{(N)} \longrightarrow I_0$ and $\hat{\lambda}_n^{(N)} \longrightarrow \lambda_n$ almost surely as $N \longrightarrow \infty$. \subsection{Nonlinear Least Squares Estimator of Beam Position} Assuming that $I_0$, $\rho$ and $\lambda_n$ have already been estimated, the NLS estimator of $(x_0, y_0)$ is proposed as follows. \begin{align} &(\hat{x}_0, \hat{y}_0 ) \nonumber \\ &\triangleq \argmin_{ x_0, y_0} \sum_{m=1}^{M} \left(z_m\! -\! I_0 2 \pi \left[ \Phi\left( \frac{y_{m_2} - y_0 }{\rho} \right) - \Phi\left( \frac{y_{m_1} -y_0}{\rho} \right) \right]\! \left[ \Phi\left( \frac{x_{m_2}-x_0}{\rho} \right) - \Phi\left( \frac{x_{m_1}-x_0}{\rho} \right) \right] \!- \! \lambda_n A \! \right)^2, \label{estimate} \end{align} \subsection{Maximum Likelihood Estimator of Beam Position} The maximum likelihood estimator of beam position on the array is given by \cite{Bashir1} \begin{align} &(\hat{x}_0, \hat{y}_0) \triangleq \argmax_{ x_0, y_0} \ln p\left(z_1, z_2,\dotsc, z_M| x_0, y_0 \right) \nonumber \\ & = \argmax_{ x_0, y_0} \sum_{m=1}^M z_m \ln \left( I_0 2 \pi \left[ \Phi\left( \frac{y_{m_2} - y_0 }{\rho} \right) - \Phi\left( \frac{y_{m_1} -y_0}{\rho} \right) \right] \left[ \Phi\left( \frac{x_{m_2}-x_0}{\rho} \right) - \Phi\left( \frac{x_{m_1}-x_0}{\rho} \right) \right] + \lambda_n A \right)\nonumber\\ &-\left( I_0 2 \pi \left[ \Phi\left( \frac{a - y_0 }{\rho} \right) - \Phi\left( \frac{-a -y_0}{\rho} \right) \right] \left[ \Phi\left( \frac{a-x_0}{\rho} \right) - \Phi\left( \frac{-a-x_0}{\rho} \right) \right] + \lambda_n |\mathcal{A}| \right) \label{mle} \end{align} \section{Low Complexity Trackers} \label{LCT} In this section, we take a look at a number of low complexity beam position estimators. These estimators are just simple transformations of the photon count vector $\mathbf{Z}$. Thus, with the exception of the asymptotic unbiased centroid estimator, they do not require the values of beam parameters to compute the estimate. \subsection{ Maximum Detector Count (MDC) Estimator} The \emph{maximum detector count} (MDC) estimator chooses the center of the cell in which the maximum photon count occurs (during some observation interval) as the estimate of the beam position. Let $(x_m, y_m)$ be the center of the $m$th detector, and $\displaystyle n \triangleq \argmax_m Z_m$ for $m=1, \dotsc, M$. Then, the MDC estimator is defined as \begin{align} (\hat{x}_0, \hat{y}_0 ) = (x_{n}, y_{n}). \end{align} The conditional likelihood of $(\hat{x}_0, \hat{y}_0)$ is bounded as \begin{align} &p_{\hat{x}_0 \hat{y}_0}(x_m, y_m |x_0, y_0) > P\left( \{ \text{All events such that the photon count in the } m\text{th detector is the greatest} \} \right) \nonumber \\ &= P\left( \bigcup_{z_m=1}^\infty \{ Z_m = z_m \} \bigcap \left\{ \bigcap_{\substack {i=1 \\ i\neq m} }^M \{Z_i < z_m \} \right\} \right) = \sum_{z=1}^\infty P\left( \{ Z_m =z_m \} \bigcap \left\{ \bigcap_{\substack {i=1 \\ i\neq m} }^M \{Z_i < z_m \} \right\} \right), \nonumber \\ &= \sum_{z_m=1}^\infty P\left( \{ Z_m = z_m \} \right) \times P\left( \left\{ \bigcap_{\substack {i=1 \\ i\neq m} }^M \{Z_i < z_m \} \right\} \right)= \sum_{z_m=1}^\infty P\left( \{ Z_m = z_m \} \right) \times \prod_{\substack {i=1 \\ i\neq m} }^M P\left( \{ Z_i < z_m \} \right), \nonumber \\ &= \sum_{z=1}^\infty P\left( \{ Z_m = z_m \} \right) \times \prod_{\substack {i=1 \\ i\neq m} }^M F_{Z_i}(z_m-1)= \sum_{z_m=1}^\infty \frac{e^{-\Lambda_m} \Lambda_m^z}{z!} \times \prod_{\substack {i=1 \\ i\neq m} }^M \sum_{j=0}^{z_m-1} \frac{e^{-\Lambda_i} \Lambda_i^j}{j!} \nonumber \\ &= \underbrace{e^{-\Lambda_m} \sum_{z_m=1}^\infty \left( \frac{\Lambda_m^{z_m}}{z_m!} \times \prod_{\substack {i=1 \\ i\neq m} }^M Q(z_m, \Lambda_i) \right)}_{P_{1,m}}, \label{max_count} \end{align} where $Q(z, \Lambda_i)$ is the \emph{regularized Gamma function} and is defined as $ Q(x, y) \triangleq \frac{\Gamma(x,y)}{\Gamma(x)}, \label{rgamma} $ where $\Gamma(x, y)$ is the \emph{upper incomplete Gamma function}: $ \Gamma(x, y) \triangleq \int_{y}^{\infty} t^{x-1} e^{-t}\, dt, $ and $ \Gamma(x) \triangleq \int_{0}^{\infty} t^{x-1} e^{-t}\, dt$. In the analysis discussed above, we assume that the probability of the event that two or more detectors report an equal number of (maximum) photon count is small, and the lower bound is tight. However, in case such an event arises, we randomly choose the center of a cell among all cells that report the maximum photon count as our MDC estimator. The lower bound in \eqref{max_count} can be improved if we include the possibility of two or more detectors obtaining the same maximum. If we define, \begin{align} P_{2,m} &\triangleq \sum_{z_m=1}^\infty \sum_{\substack{m_1=1 \\ m_1\neq m}}^M \left( \frac{1}{2}\left( e^{-\Lambda_m} \frac{\Lambda_m^{z_m}}{z_m!} \times e^{-\Lambda_{m_1}} \frac{\Lambda_{m_1}^{z_m}}{z_m!} \right) \times \prod_{\substack {i=1 \\ i\neq m\\ i \neq m_1} }^M Q(z_m, \Lambda_i) \right),\\ P_{3,m}& \triangleq \sum_{z_m=1}^\infty \sum_{\substack{m_1=1 \\ m_1\neq m}}^M \sum_{\substack{m_2=1 \\ m_2 \neq m\\ m_2 \neq m_1}}^M \left( \frac{1}{3}\left( e^{-\Lambda_m} \frac{\Lambda_m^{z_m}}{z_m!} \times e^{-\Lambda_{m_1}} \frac{\Lambda_{m_1}^{z_m}}{z_m!} \times e^{-\Lambda_{m_2}} \frac{\Lambda_{m_2}^{z_m}}{z_m!} \right) \times \prod_{\substack {i=1 \\ i\neq m\\ i \neq m_1 \\ i \neq m_2} }^M Q(z_m, \Lambda_i) \right), \end{align} and for any integer $k$ such that $1<k\leq M$, \begin{align} P_{k,m}& \triangleq \sum_{z_m=1}^\infty \sum_{\substack{m_1=1 \\ m_1\neq m}}^M \sum_{\substack{m_2=1 \\ m_2 \neq m\\ m_2 \neq m_1}}^M \dotsm \sum_{\substack{m_{k-1}=1 \\ m_{k-1} \neq m\\ m_{k-1} \neq m_1 \\ \vdots \\ m_{k-1} \neq m_{k-2}}}^M \!\!\left(\! \frac{1}{k}\left( e^{-\Lambda_m} \frac{\Lambda_m^{z_m}}{z_m!} \times e^{-\Lambda_{m_1}} \frac{\Lambda_{m_1}^{z_m}}{z_m!} \times \dotsm \times e^{-\Lambda_{m_{k-1}}} \frac{\Lambda_{m_{k-1}}^{z_m}}{z_m!} \right) \! \times \!\!\!\! \prod_{\substack {i=1 \\ i\neq m\\ i \neq m_1\\ \vdots \\ i \neq m_{k-1} } }^M \! \!\! \!Q(z_m, \Lambda_i) \!\right). \label{MDC} \end{align} Therefore, \begin{align} p_{\hat{x}_0 \hat{y}_0}(x_m, y_m|x_0, y_0) = \sum_{n=1}^M P_{n,m}, \end{align} where, it should be noted that $P_{n,m}$ is a function of $(x_0, y_0)$ through $\Lambda_m$. The mean-square error is given by \begin{align} &\mathbbm{E}[(\hat{x}_0 - x_0)^2 + (\hat{y}_0-y_0)^2] = \sum_{m=1}^M \sum_{n=1}^M \left( (x_m-x_0)^2 + (y_m-y_0)^2 \right) P_{n,m}. \label{mse} \end{align} We can compute the bias functions $\mathbbm{E}[\hat{x}_0-x_0]$ and $\mathbbm{E}[\hat{y}_0 - y_0]$ in a similar fashion as \eqref{mse}. For instance, \begin{align} \mathbbm{E}[\hat{x}_0 - x_0] = \sum_{m=1}^M \sum_{n=1}^M \left( x_m-x_0 \right) P_{n,m}. \label{bias_mdc} \end{align} \subsection{Centroid Estimator} The centroid estimate of the beam position is given by \begin{align} \hat{x}_0 &\triangleq \frac{1}{Z_s}\sum_{m=1}^M x_m Z_m, \quad \hat{y}_0 &\triangleq \frac{1}{Z_s}\sum_{m=1}^M y_m Z_m. \end{align} where $Z_s \triangleq \sum_{m=1}^M Z_m$. The mean-square error of the centroid estimator is derived as follows. \begin{align} &\mathbbm{E}[(\hat{x}_0-x_0)^2 + (\hat{Y}_0-y_0)^2]= \mathbbm{E}[(\hat{x}_0-x_0)^2] + \mathbbm{E}[(\hat{y}_0 - y_0)^2] \nonumber \\ &= \sum_{z_s=0}^\infty \left( \mathbbm{E}[(\hat{x}_0-x_0)^2| Z_s = z_s] + \mathbbm{E}[(\hat{y}_0-y_0)^2| Z_s = z_s] \right) P(\{ Z_s = z_s \}) \label{mse_cent} \end{align} where \begin{align} P(\{ Z_s = z_s \}) = e^{-\Lambda_s} \frac{\Lambda_s^{z_s}}{z_s!} \end{align} and $\Lambda_s \triangleq \sum_{m=1}^M \Lambda_m$. Thus, \begin{align} & \mathbbm{E}[(\hat{x}_0 - x_0)^2 + (\hat{y}_0 - y_0)^2| Z_s = z_s] = \mathbbm{E}[\hat{x}_0^2 | Z_s = z_s] - 2x_0 \mathbbm{E}[\hat{x}_0 | Z_s = z_s] + x_0^2 \nonumber \\ &+ \mathbbm{E}[\hat{y}_0^2 | Z_s = z_s] - 2y_0 \mathbbm{E}[\hat{y}_0 | Z_s = z_s] + y_0^2\nonumber \\ & = \frac{1}{z_s^2} \sum_{m=1}^M \sum_{\substack{n=1 \\ n \neq m} }^M x_m x_n \mathbbm{E}[Z_m Z_n| Z_s = z_s] + \frac{1}{z_s^2}\sum_{m=1}^M \mathbbm{E}[Z_m^2| Z_s = z_s] - 2x_0 \frac{1}{z_s}\sum_{m=1}^M x_m \mathbbm{E}[Z_m | Z_s = z_s] + x_0^2 \nonumber \\ &+\frac{1}{z_s^2} \sum_{m=1}^M \sum_{\substack{n=1 \\ n \neq m} }^M y_m y_n \mathbbm{E}[Z_m Z_n| Z_s = z_s] + \frac{1}{z_s^2} \sum_{m=1}^M \mathbbm{E}[Z_m^2| Z_s = z_s] - 2y_0 \frac{1}{z_s}\sum_{m=1}^M y_m \mathbbm{E}[Z_m | Z_s = z_s] + y_0^2. \label{cent} \end{align} In order to compute the first and second order conditional expectations in \eqref{cent}, we note the fact that given $Z_s = z_s$, $Z_1, Z_2, \dotsc, Z_M$ are binomial random variables, and the conditional pmf of $Z_m$ is defined as \begin{align} P(\{ Z_m = z_m \} | \{ Z_s = z_s \}) = \binom{z_s}{z_m} p_m^{z_m} (1-p_m)^{z_s - z_m}, \quad m=1, \dotsc, M, \label{meanx} \end{align} where $\displaystyle p_m \triangleq \frac{\Lambda_m}{\Lambda_s}$. Moreover, conditioned on the fact that $Z_s = z_s,$ any pair of random variables $Z_m$ and $Z_n$ for $m \neq n$ are not independent. Therefore, it may not be the case that \begin{align} \mathbbm{E}[Z_m Z_n | Z_s = z_s] \neq \mathbbm{E}[Z_m | Z_s = z_s] \mathbbm{E}[Z_n | Z_s = z_s]. \end{align} However, it can be shown that \begin{align} P( \{Z_m = z_m, Z_n = z_n \}| \{Z_s = z_s\} )= \binom{z_s}{z_m} p_m^{z_m} \binom{z_s -z_m}{z_n} p_n^{z_n} p_r^{z_s - z_m -z_n}, \; z_m \neq z_n, z_m + z_n \leq z_s, \end{align} where $p_r$ corresponds to the probability that a photodetection occurs in the region $A_r \triangleq \mathcal{A} - A_m - A_n$, and is defined as $\displaystyle p_r \triangleq \left({\sum_{ \substack{ i = 1 \\ i \neq m \\ i \neq n}}^M \Lambda_i } \right) / {\Lambda_s}$. The joint expectation is given by \begin{align} \mathbbm{E}[Z_m Z_n | Z_s = z_s] = \sum_{z_m = 0}^{z_s} \sum_{z_n =0}^{z_s - z_m} z_m z_n \binom{z_s}{z_m} \binom{z_s -z_m}{z_n} p_m^{z_m} p_n^{z_n} p_r^{z_s - z_m -z_n}, \; z_m \neq z_n, z_m + z_n \leq z_s. \label{join_exp} \end{align} Moreover, when $Z_m = Z_n$, \begin{align} \mathbbm{E}[Z_m^2 | Z_s = z_s] = z_s p_m (1-p_m) + (z_s p_m)^2. \label{joint_exp1} \end{align} Additionally, from \eqref{meanx}, \begin{align} \mathbbm{E}[\hat{x}_0|Z_s = z_s] =\frac{1}{z_s}\sum_{m=1}^{M}z_s p_m x_m = \sum_{m=1}^M x_m p_m. \label{mean} \end{align} which is not a function of $z_s$. Therefore, \begin{align} \mathbbm{E}[\hat{x}_0] = \sum_{m=1}^M x_m p_m, \; \mathbbm{E}[\hat{y}_0] = \sum_{m=1}^M y_m p_m. \label{mean1} \end{align} Also, \eqref{join_exp}, \eqref{joint_exp1} and \eqref{mean} can be substituted into \eqref{cent} in order to evaluate the conditional mean-square error. Finally, the mean-square error of the centroid estimator is evaluated using \eqref{mse_cent}. \subsection{Asymptotically Unbiased Centroid (AUC) Estimator} \begin{theorem} If the values of $I_0$ and $\lambda_n$ are known, $\rho$ is much smaller than the dimensions of the array $(\rho << a)$, and $(x_0, y_0)$ is within the bounds of the array, then an unbiased centroid estimator of the beam position can be realized in the limit as $M \to \infty$. The asymptotically unbiased centroid estimator is defined as \begin{align} \hat{x}_0 \triangleq \mathcal{K} \frac{1}{Z_s}\sum_{m=1}^M x_m Z_m, \quad \hat{y}_0 \triangleq \mathcal{K} \frac{1}{Z_s}\sum_{m=1}^M y_m Z_m. \end{align} where $\mathcal{K} \triangleq \frac{\Lambda_s } {2 \pi I_0 }$. \end{theorem} \begin{proof} Consider the mean value of the centroid estimator in \eqref{mean1}. The expectation of $\hat{x}_0$ can be further expanded as \begin{align} \mathbbm{E}[\hat{x}_0] = \frac{1}{\Lambda_s} \sum_{m=1}^M x_m \iint_{A_m} \left( \frac{I_0}{\rho^2} \exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}\right) + \lambda_n \right) \, dx \, dy. \end{align} In the limit as $M \to \infty$, \begin{align} &\mathbbm{E}[\hat{x}_0] = \frac{1}{\Lambda_s} \iint_{\mathcal{A}} x\left( \frac{I_0}{\rho^2} \exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}\right) + \lambda_n \right) \, dx \, dy\\ &= \frac{2 \pi I_0}{\Lambda_s} \int_{-a}^a \int_{-a}^a x \frac{1}{2 \pi \rho^2} \exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}\right) \, dx \, dy + \frac{\lambda_n}{\Lambda_s} \cancelto{0}{ \int_{-a}^a \int_{-a}^a x \, dx \, dy}\\ & = \frac{2 \pi I_0}{\Lambda_s} x_0. \end{align} In a similar fashion, $\mathbbm{E}[\hat{Y}_0] = \frac{2 \pi I_0}{\Lambda_s} y_0$. Therefore, multiplying the (regular) centroid estimator by the factor $\mathcal{K} = \frac{\Lambda_s}{2 \pi I_0}$ results in an unbiased estimator as $M \to \infty$. \end{proof} \subsubsection{High Signal-To-Noise Ratio Case}Additionally, it can also be observed that for high signal-to-noise ratio, the factor \begin{align} \frac{2\pi I_0}{\Lambda_s}& = \frac{2\pi I_0}{\iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2} \exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}\right) + \lambda_n \right) \, dx \, dy} \approx \frac{2\pi I_0}{\iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2} \exp\left(-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}\right) \right) \, dx \, dy} = 1. \end{align} Hence, $\mathbbm{E}[\hat{x}_0] = x_0$, and the centroid estimate is asymptotically unbiased for high SNR. Let $Z_s' \triangleq \frac{Z_s}{\mathcal{K}}$. Then, $z_s' = 0, \frac{1}{\mathcal{K}}, \frac{2}{\mathcal{K}}, \dotsc$, and $P(\{ Z_s' = z_s'\}) = P(\{ Z_s = \mathcal{K} z_s' \})$. Furthermore, it is straightforward to show that \begin{align} P(\{ Z_m = z_m \} | \{ Z_s' = z_s' \}) = \binom{\mathcal{K}z_s'}{z_m} p_m^{z_m} (1-p_m)^{\mathcal{K}z_s' - z_m}, \quad m=1, \dotsc, M, \label{meanx1} \end{align} where $0 \leq z_m \leq \mathcal{K}z_s'$. The expressions for $\mathbbm{E}[Z_m^2 | Z_s' = z_s']$ and $\mathbbm{E}[Z_m Z_n | Z_s' = z_s']$ can be obtained similarly by replacing $z_s$ with $\mathcal{K}z_s'$ in \eqref{mean1} and \eqref{mean}, respectively. Finally, the conditional mean-square error, $\mathbbm{E}[(\hat{x}_0 - x_0)^2 + (\hat{y}_0 - y_0)^2| Z_s' = z_s']$, is computed by replacing $Z_s$ and $z_s$ with $Z_s'$ and $z_s'$, respectively, in \eqref{cent}. Finally, for the AUC estimator, \begin{align} \mathbbm{E}[\hat{x}_0] = \mathcal{K}\sum_{m=1}^M x_m p_m, \; \mathbbm{E}[\hat{y}_0] = \mathcal{K}\sum_{m=1}^M y_m p_m. \label{mean2} \end{align} \subsection{Adaptive Centroid Estimators (ACE)}\label{ace} An adaptive centroid estimator takes the average of nonlinearly weighted photon counts. Such an estimator is designed to weight the photon counts for those detectors more heavily where the signal beam is expected to reside, i.e, where the photon count is relatively larger. These estimators are robust in the sense that they do not require the knowledge of beam parameters for estimation purpose, and for small $M$, provide a mean-square error performance which is better than the AUC estimator. \subsubsection{Adaptive Centroid Estimator 1} The Aaptive Centroid Estimator 1 is a function of a positive real number $n$. It is defined as, \begin{align} \hat{x}_0 \triangleq \frac{1}{Z_{s}}\sum_{m=1}^M x_m Z_m^n, \quad \hat{y}_0 \triangleq \frac{1}{Z_{s}}\sum_{m=1}^M y_m Z_m^n, \end{align} where $n \geq 1 $ and $Z_s \triangleq \sum_{m=1}^M Z_m^n$. We note that when $n=1$, we obtain the centroid estimator, and when $n \to \infty$, the maximum detector count estimator is realized. \subsubsection{Adaptive Centroid Estimator 2} The Adaptive Centroid Estimator 2 is a function of $n$ and $N$ where $n \geq 1$, and $N \in \mathbb{Z}^+, N < M$. In this case, we use the $N$ largest order statistics of the observations $Z_1, Z_2, \dotsc, Z_M$ for the centroid estimator. The estimator is defined as \begin{align} \hat{x}_0 \triangleq \frac{1}{Z_{s}}\sum_{m=M-N+1}^M x_m \left(Z^{(m)} \right)^n, \quad \hat{y}_0 \triangleq \frac{1}{Z_{s}}\sum_{m=M-N+1}^M y_m \left(Z^{(m)}\right)^n, \end{align} where $Z^{(1)} \leq Z^{(2)} \leq \dotsm \leq Z^{(M)}$ are the order statistics of $Z_1, \dotsc, Z_M$. Furthermore, $Z_s \triangleq \sum_{m=M-N+1}^M \left(Z^{(m)} \right)^n$. \paragraph{Asymptotic Behavior} \label{asymptotics}As $M \to \infty$, $A \to 0$, which implies that \begin{align} &P(\{Z_m = 0\}) = \exp({-\Lambda_m}) \approx \exp\left(-\left[\frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} + \lambda_n\right] A \right) \\ \nonumber &= 1 - \left[\frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} + \lambda_n\right] A + o(A) \approx 1 - \left[\frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} + \lambda_n\right] A \quad \forall m \end{align} where $o(A)$ is a function such that $\displaystyle \lim_{A \to 0} \frac{o(A)}{A}=0$. In a similar fashion, it can be shown (for small $A$) that $ \displaystyle P(\{Z_m = 1 \}) \approx \left[\frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}} + \lambda_n\right] A$, and $P(\{ Z_m = \ell \}) \approx 0$ for any integer $\ell > 1$ for any $m$. This implies that ACE1 and ACE2 converge to the centroid estimator (or the AUC if they are scaled by $\mathcal{K}$) as $M \to \infty$. \begin{figure} \centering \hspace{-1cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_rmse1_ext} \caption{MSE} \label{fig1a} \end{subfigure} \vspace{-3cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_mag_bias1_ext} \caption{Bias magnitude ($x$ axis)} \label{fig1b} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig1a} depicts the root mean-square error for different estimators of beam position for $4\times4$ detector array. The signal power is 1 $\mu$W, and the noise power is varied between 0.2 and 1.8 $\mu$W. The beam was centered at $(0.4, 0.4)$, and we used $n=2$ (second order) and $N=3$ for the ACE estimators. Fig.~\ref{fig1b} shows the magnitude of the bias plots along $x$ axis of different estimators.} \label{fig1} \end{figure} \begin{figure} \centering \hspace{-1cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_rmse2_ext} \caption{MSE} \label{fig2a} \end{subfigure} \vspace{-3cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_mag_bias2_ext} \caption{Bias magnitude ($x$ axis)} \label{fig2b} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig2a} depicts the root mean-square error for different estimators of beam position for $6\times6$ detector array. The signal power is 1 $\mu$W, and the noise power is varied between 0.2 and 1.8 $\mu$W. The beam was centered at $(0.4, 0.4)$, and we used $n=2$ (second order) and $N=3$ for the ACE estimators. Fig.~\ref{fig2b} shows the magnitude of the bias plots along $x$ axis of different estimators.} \label{fig2} \end{figure} \begin{figure} \centering \hspace{-1cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_rmse3_ext} \caption{MSE} \label{fig3a} \end{subfigure} \vspace{-3cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_mag_bias3_ext} \caption{Bias magnitude ($x$ axis)} \label{fig3b} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig3a} depicts the root mean-square error for different estimators of beam position for $8\times8$ detector array. The signal power is 1 $\mu$W, and the noise power is varied between 0.2 and 1.8 $\mu$W. The beam was centered at $(0.4, 0.4)$, and we used $n=2$ (second order) and $N=3$ for the ACE estimators. Fig.~\ref{fig3b} shows the magnitude of the bias plots along $x$ axis of different estimators.} \label{fig3} \end{figure} \begin{figure} \centering \hspace{-1cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_paper8_M_perf} \caption{Effect of $M$ on MSE} \label{fig5a} \end{subfigure} \vspace{-3cm} \begin{subfigure}[t]{0.5\textwidth} \includegraphics[width=\textwidth]{plot_mse_p} \caption{Effect of $\rho$ on MSE} \label{fig5b} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig5a} depicts the effect of the number of detectors $M$ in the array on the MSE performance of different low complexity estimators. For this simulation, the signal power was fixed at 1 $\mu$W, noise power at 1.8 $\mu$W. Fig.~\ref{fig5b} shows the MSE curves for different values of beam radius $\rho$ for similar signal and noise parameters and $M=16$. For both figures, $(x_0, y_0)$ was sampled randomly on the detector array.} \label{fig5} \end{figure} \section{Probability of Error Performance}\label{PE} In this section, we analyze the effect of beam position estimation on the probability of error for a PPM scheme. To this end, let us assume that we have a maximum likelihood receiver that operates on a symbol-by-symbol basis on a train of $\mathcal{M}$-PPM symbols. It is shown in \cite{Bashir3} that the probability of a correct decision, given a symbol $j$ is transmitted, is \begin{align} P(c|j) = \left( P\left( \left\{ \sum_{m=1}^M \alpha_m Z_m^{(j)} - \sum_{m=1}^M \alpha_m Z_m^{(i)} > 0 \right\} \right) \right)^{\mathcal{M} - 1}, \label{mld} \end{align} for $i, j = 1, 2, \dotsc, \mathcal{M}$ and $i \neq j$. The slot $j$ of the PPM symbol corresponds to the ``signal+noise'' slot, whereas $i$ corresponds to the ``noise only'' slot. The factor $\alpha_m$ is defined to be \cite{Bashir3} \begin{align} \alpha_m = \ln(1 + \text{SNR}_m), \end{align} where $\text{SNR}_m \triangleq \frac{\iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy}{\lambda_n A}$ is the signal-to-noise ratio in the $m$th cell. Furthermore, $\mathbbm{E}[Z_m^{(j)}] = \Lambda_m$ and $\mathbbm{E}[Z_m^{(i)}] = \lambda_n A$. Let us define $Y_1 \triangleq \sum_{m=1}^M \alpha_m Z_m^{(j)}$ and $Y_0 \triangleq \sum_{m=1}^M Z_m^{(i)}$. By Gaussian approximation of a linear combination of Poisson random variables, both $Y_1$ and $Y_0$ are Gaussian random variables. Let $V\triangleq Y_1 - Y_0$. Then $V\sim \mathcal{N}\left(\mu_v, \sigma_v^2\right)$, where \begin{align} \mu_v &\triangleq \sum_{m=1}^M \alpha_m \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy, \label{signal} \\ \sigma^2_v& \triangleq \sum_{m=1}^M \alpha_m^2 \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy + 2 \sum_{m=1}^M \alpha_m^2 \lambda_n A.\label{noise} \end{align} Thus, \begin{align} P(c|j) \approx \left( P\left( \{V > 0 \} \right) \right)^{\mathcal{M}-1}, \label{mld1} \end{align} In order to maximize \eqref{mld1}, we need to maximize the factor $P(\{ V > 0\})$, which is given by \begin{align} P(\{V > 0 \}) = 1 - P(\{ V \leq 0\}) = 1 - \Phi\left( -\frac{\mu_v}{\sigma_v} \right). \label{mld3} \end{align} In order to maximize \eqref{mld3}, we need to maximize the factor $\frac{\mu_v}{\sigma_v}$ with respect to $(\hat{x}_0, \hat{y}_0)$. This factor is rewritten as \begin{align} \frac{\mu_v}{\sigma_v} = \frac{\sum_{m=1}^M \alpha_m \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy}{\sqrt{ \sum_{m=1}^M \alpha_m^2 \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy + 2 \sum_{m=1}^M \alpha_m^2 \lambda_n A}}. \end{align} When the SNR is low, $\lambda_n A >> \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}}\, dx \, dy$ for each $m$. In this case, \begin{align} \alpha_m = \ln\left( 1 + \frac{1}{\lambda_n A} \iint_{A_m}\frac{I_0}{\rho^2}e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 \rho^2}}\, dx \, dy\right) \approx \frac{1}{\lambda_n A} {\iint_{A_m} \frac{I_0}{\rho^2}e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 \rho^2}}\, dx \, dy} . \end{align} Additionally, we assume that $M$ is large, and let us denote the small area $A$ by $\Delta_M$. Then \begin{small} \begin{align} &\frac{\mu_v}{\sigma_v}\nonumber \\ & \approx \! \frac{\frac{1}{\lambda_n \Delta_M}\sum_{m=1}^M { \frac{I_0}{\rho^2}e^{-\frac{(x_m-\hat{x}_0)^2 + (y_m-\hat{y}_0)^2}{2 \rho^2}} \Delta_M} \times \frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}}\Delta_M}{\sqrt{ \sum_{m=1}^M \! \! \left(\frac{1}{\lambda_n \Delta_M} { \frac{I_0}{\rho^2}e^{-\frac{(x_m-\hat{x}_0)^2 + (y_m-\hat{y}_0)^2}{2 \rho^2}}\!\Delta_M} \!\right)^2\!\!\!\!\! \times\! \frac{I_0}{\rho^2}e^{-\frac{(x_m-x_0)^2 + (y_m-y_0)^2}{2 \rho^2}}\!\Delta_M \!+ \!2 \lambda_n \Delta_M \! \sum_{m=1}^M \!\! \left(\!\frac{1}{\lambda_n \Delta_M} { \frac{I_0}{\rho^2}e^{-\frac{(x_m-\hat{x}_0)^2 + (y_m-\hat{y}_0)^2}{2 \rho^2}}\!\Delta_M} \!\!\right)^2 }}. \end{align} \end{small} We assume that the search space for the maximization problem concerning $(\hat{x}_0, \hat{y}_0)$ is confined within $\mathcal{A}$, and that the assumption $2\pi \rho^2 << |\mathcal{A}|$ also holds. Then, the factor \begin{align} &2 \lambda_n \Delta_M \sum_{m=1}^M \left(\frac{1}{\lambda_n \Delta_M} { \frac{I_0}{\rho^2}e^{-\frac{(x_m-\hat{x}_0)^2 + (y_m-\hat{y}_0)^2}{2 \rho^2}}\Delta_M} \right)^2 \approx \frac{2}{\lambda_n} \iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2} \right)^2 e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{ \rho^2}}\, dx \, dy\nonumber \\ &= \frac{2 I_0^2}{\lambda_n \rho^4} 2 \pi \left(\frac{\rho}{\sqrt{2}}\right)^2 \iint_{\mathcal{A}} \frac{1}{2 \pi \left(\frac{\rho}{\sqrt{2}}\right)^2} e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 (\rho/\sqrt{2})^2}}\, dx \, dy = \frac{2 \pi I_0^2}{\lambda_n \rho^2}. \end{align} By further simplifications, it follows that \begin{align} \frac{\mu_v}{\sigma_v} \approx \frac{\frac{1}{\lambda_n} \iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2}\right)^2 e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 \rho^2}} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy } { \sqrt{ \frac{1}{\lambda_n^2} \iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2}\right)^3 e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{ \rho^2}} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy + \frac{2 \pi I_0^2}{\lambda_n \rho^2} } }.\label{obj_fn} \end{align} The function given in \eqref{obj_fn} has to be maximized with respect to $(\hat{x}_0, \hat{y}_0)$. We first optimize with respect to $\hat{x}_0$, and due to the symmetric nature of the Gaussian beam, the same analysis will hold for optimization with respect to $\hat{y}_0$ as well. Thus, taking the natural log of \eqref{obj_fn} and setting the derivative (with respect to $\hat{x}_0$) of that to zero, we have that, \begin{small} \begin{align} &\frac{\partial \ln\left( \mu_v / \sigma_v\right)}{\partial \hat{x}_0}\nonumber \\ &= \frac{\iint_{\mathcal{A}} e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 \rho^2}} \left(\frac{x-\hat{x}_0}{\rho^2} \right) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy}{\iint_{\mathcal{A}} e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{2 \rho^2}} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy} - \frac{\frac{1}{\lambda_n^2} \iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2}\right)^3 e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{ \rho^2}} \left( \frac{ x-\hat{x}_0}{\rho^2}\right) e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy}{\frac{1}{\lambda_n^2} \iint_{\mathcal{A}} \left( \frac{I_0}{\rho^2}\right)^3 e^{-\frac{(x-\hat{x}_0)^2 + (y-\hat{y}_0)^2}{ \rho^2}} e^{-\frac{(x-x_0)^2 + (y-y_0)^2}{2 \rho^2}} \, dx \, dy + \frac{2 \pi I_0^2}{\lambda_n \rho^2}} \label{opt1} \\ &= 0. \label{opt} \end{align} \end{small} It can be easily seen that $\hat{x}_0 = x_0$ causes both terms in \eqref{opt1} to go to zero, and therefore, this particular point is a solution. Hence, $\hat{x}_0 = x_0$ is a critical point (a local or global minimizer or maximizer). Similarly, $\hat{y}_0 = y_0$ is also a critical point. Additionally, it can be further shown that the Hessian matrix of $\ln(\mu_v/\sigma_v)$ is negative definite for all values of $(\hat{x}_0, \hat{y_0})$ and $(x_0, y_0)$ inside $\mathcal{A}$ when $I_0, \rho$ and $\lambda_n$ are positive. Hence, $\ln(\mu_v / \sigma_v)$ is concave with respect to $(\hat{x}_0, \hat{y}_0)$, and $(\hat{x}_0, \hat{y}_0) = (x_0, y_0)$ is a global maximizer of $\ln(\mu_v/\sigma_v)$ in $\mathcal{A}$. \begin{figure} \centering \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\textwidth]{plot_paper8_pe_1} \caption{ $M=16$} \label{fig6a} \end{subfigure} \hspace{0cm} \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\textwidth]{plot_paper8_pe_2} \caption{ $M=36$} \label{fig6b} \end{subfigure} \vspace{0cm} \begin{subfigure}[t]{0.45\textwidth} \includegraphics[width=\textwidth]{plot_paper8_pe_3} \caption{$M=64$} \label{fig6c} \end{subfigure} \vspace{2.8cm} \caption{Fig.~\ref{fig6a} depicts the probability of error when $M=16$, Fig.~\ref{fig6b} for $M=36$, and Fig.~\ref{fig6c} presents the probability of error when $M=64$ for different estimators. For this simulation, the signal power was fixed at 0.5 $\mu$W, and the noise power was varied from 0.8 $\mu$W to 1.8 $\mu$W. The beam radius $\rho$ was set at 0.2 meter. For all figures, $(x_0, y_0)$ was sampled randomly on the detector array. The value of $|\mathcal{A}|$ is 4 square meters.} \label{fig6} \end{figure} \section{Simulation Preliminaries and Results} \label{sims} For the mean-square error curves, we used \eqref{mse} and \eqref{mse_cent} to plot the mean-square error of maximum detector count estimator and centroid/AUC estimators\footnote{In case of AUC, we have to replace $Z_s$ with $Z_s'$ as mentioned in the section on AUC.}, respectively. Similarly, the equations \eqref{bias_mdc}, \eqref{mean1} and \eqref{mean2} are used to plot the bias functions of the MDC, centroid and AUC estimators, respectively. The quantity $P_{n,m}$ represents an infinite sum in \eqref{mse} and \eqref{bias_mdc}. Similarly, \eqref{mse_cent} also represents an infinite sum with respect to $z_s$. Let us consider the factor $P_{n,m}$ for $n=1, 2, \dotsc, M$ and $m$ fixed. Then, for the purpose of simulations, the infinite sum in the computation of $P_{n,m}$ is approximated by a finite sum. The upper limit in the sum is replaced by a large number $\eta_m$ such that the sum $S_m$ over the distribution \begin{align} S_m \triangleq \sum_{z_m=\eta_m}^\infty e^{-\Lambda_u} \frac{\Lambda_u^{z_m}}{z_m!} < \frac{\epsilon_0}{M!}, \end{align} where $\Lambda_u \triangleq \max(\Lambda_1, \Lambda_2, \dotsc, \Lambda_M)$, and $\eta_m >> \Lambda_u$. Therefore, we can replace the $\infty$ in the infinite sum of $P_{n,m}$ by $\eta_m$, and the error in approximation of $P_{n,m}$ is guaranteed to be less than $\epsilon_0$ for any $n$ and $m$. The $(M-1)!$ term appears because there are at least $(M-1)!$ terms over which the infinite sum is computed for any $P_{k,m}$, $k=1, \dotsc, M$ (please see \eqref{MDC}). The careful reader will discern that for a fixed $\epsilon$ and fixed $M$, both $\Lambda_u$ and $\eta_m$ are functions of $(x_0, y_0)$ if all other parameters of the beam are fixed. For the purpose of our simulations, we chose $\eta_m$ so that $\epsilon_0 \leq 10^{-5}$ for each $m$. By using the same arguments as before, the upper limit in the infinite sum is replaced by $\eta$. For the purpose of simulations, we chose $\eta$ so that the sum $S \triangleq \sum_{z_s=\eta}^\infty e^{-\Lambda_s} \frac{\Lambda_s^{z_s}}{z_s!} < \epsilon \leq 10^{-5}.$ For the rest of the estimators, it is not straightforward to come up with analytical expressions for the mean-square error and bias functions. Therefore, we resorted to Monte Carlo simulations in order to estimate the error and bias values. First, we analyzed the mean-square error and the absolute bias values of different proposed estimators for a low signal-to-noise ratio regime, which is typically the scenario of interest. Fig.~\ref{fig1}, Fig.~\ref{fig2} and Fig.~\ref{fig3} indicate that the MLE and NLS estimators perform better than the low complexity estimators in terms of both the criteria. We also note that the AUC estimator's bias diminishes with $M$. Fig.~\ref{fig5} shows the effect of the number of cells $M$ and the radius $\rho$ on the mean-square error performance of different estimators. The two estimators, NLS estimator and MLE, were not included in this analysis because their computational complexity becomes prohibitively expensive for the purpose of simulations\footnote{A small $\rho$ incurs a large sharp peak for the likelihood function inside the cell where the true beam center is located, and the same fact holds for the objective function of the NLS estimator. This increases the time it takes for the evolutionary algorithm to converge to the maximizer. Additionally, a large $M$ increases the number of terms in the NLS objective function and the likelihood function, thereby causing the complexity to grow.}. It is interesting to note that the value of $M$ does not have a significant effect on the performance of the centroid and AUC estimators. This is explained by the fact that for $x_0$, the centroid estimator is an averaging estimator: $\hat{x}_0 \triangleq \frac{1}{Z_s} \mathbf{Z}^T \mathbf{x}$, where $\mathbf{x} \triangleq \begin{bmatrix} x_1 & x_2 & \dots & x_M \end{bmatrix}^T$, $x_m$ being the center of the $m$th cell. Since each of the coordinates $x_m$ are weighted linearly, then it can be seen, at least intuitively, that $\hat{x}_0$ will not change significantly if $M$ is increased for a fixed SNR. The same argument applies for $\hat{y}_0$, and the approximate constancy of AUC may be explained in a similar fashion. In the case of the rest of the estimators, the location coordinates are weighted nonlinearly, and hence, the mean-square error performance varies with $M$. Interestingly, as we had predicted in Paragraph~\ref{asymptotics}, the performance of ACE1 and ACE2 converges to the centroid estimator's performance as $M \to \infty$. Finally, we note that since ACE2 only utilizes the readings of top four photon counts in these simulations, the performance of ACE1 and ACE2 is exactly the same when $M=4$. The results obtained of Fig.~\ref{fig5b} can be explained in the light of arguments used to justify the behavior of the CRLB in Fig.~\ref{fig4b}. The interested reader is referred to Section~\ref{CRLB_analysis} in this regard. Fig.~\ref{fig6} presents the probability of error performance obtained with different beam position estimators/detector arrays. The curves are lower bounded by an ideal system's performance that essentially has perfect knowledge of the beam position. As can be observed, the lower bound becomes smaller with the number of detectors$M$ in the array. \section{A Brief Commentary on Computational Complexity of Tracking Algorithms}\label{Complexity} Roughly, the complexity of low complexity estimators is on the order of $N^2$ real summations and $N^2$ real multiplies---barring the ACE2 and MDC---where $N = \sqrt{M}$ is the number of detectors along one side of the square shaped detector array. In case of MDC, we have to use a sorting technique in order to find the maximum out of an array of $N^2$ elements. For ACE2, we have approximately $L$ real sums and $L$ real multiplies in addition to the sorting algorithms complexity which sorts the highest $L$ numbers out of an array of $M$ numbers. We note again that $L=4$ for the purpose of simulations. Therefore, approximately, the complexity is a function of $N^2$ for low complexity trackers. The complexity of NLS and MLE is much higher: In addition to computing approximately $N^2$ real additions and $N^2$ real multiplies (see equations \eqref{estimate} and \eqref{mle}), the algorithms resort to a real number genetic algorithm in order to find the global maximum. The complexity of the real number genetic algorithm is discussed in \cite{Bashir1}. The complexity of the genetic algorithm is a function of number of chromosomes, $N_c$, and the number of generations\footnote{The number of generations can be regarded as the number of iterations required in order to converge to the true maximum/minimum of the objective function.}, $N_g$. The values of $N_c$ and $N_g$ should be chosen according to the nature of the objective function---a ``spikier'' function requires relatively large $N_g$ and $N_c$ for convergence to the true maximum. In our simulations, we set $N_c = 50$, and $N_g=400$. For each chromosome, the objective functions in given by \eqref{estimate} and \eqref{mle} are determined. Thus, the total complexity for the NLS or MLE tracking is approximately $N_c \times N_g \times N^2$ real multiplications and real additions \footnote{This does not include the complexity involved in comparing the fitness of the chromosomes during each iteration of the algorithm}. The interested reader is referred to the excellent text \cite{Rao} for more details on genetic algorithms. \section{Conclusion}\label{Conc} In this paper, we have analyzed the problem of tracking with a photon-counting detector array receiver and Gaussian beams in a free-space optical communications system. From purely a communication theory point-of-view, an array of detectors is more useful from a single detector from two perspectives: i) The array of detectors minimizes the tracking error, and ii) and the detector arrays provide a better probability of error performance \cite{Bashir4}. However, through a study of the Cram\`er-Rao Lower Bound of the tracking error, we discovered that improvement in performance becomes smaller if we increase the number of cell from $M =N^2$ to $M = (N+1)^2$ when $N$ is large (law of diminishing returns). Moreover, the same law of diminishing returns applies to the probability of error performance as well. Additionally, the computational complexity increases linearly with the number of detectors $M$ in the array, and the circuit and storage complexities grow with $M$ as well. Additionally, we also observed that the beam location on the array is not only required for tracking, but is also part of the channel state information required to decode pulse position modulation/on-off keying symbols. To this end, we proposed a number of non-Bayesian tracking algorithms and analyzed their mean-square error/probability of error performance. The two algorithms, namely the nonlinear least squares estimator and the maximum likelihood estimator, performed better than the different versions of the centroid algorithms. However, the two aforementioned algorithms incur a higher cost in terms of computational complexity. Additionally, since the computational overhead of maximum likelihood and nonlinear least squares estimators is comparable, the better performance of maximum likelihood estimator makes it a more viable tracking algorithm of the two. Therefore, depending on the trade-off between the performance and the price we are willing to pay for it, we can choose a certain number of detectors in our array, and a particular tracking algorithm, to track the beam position. Thus, if we are willing to invest in a more complex receiver in terms of an array of detectors and a high complexity algorithm like maximum likelihood, we can achieve better performance gains not only in terms of tracking, but also from the perspective of probability of error.
\section{Introduction} Let $(W,S)$ be a finite Coxeter system. For any subset $J$ of $S$, if the simple reflections in $J$ generate $W_{J}$, then $W_{J}$ is called \textit{a standard parabolic subgroup} of $W$. Denote by $X_{J}$ the set of distinguished left coset representatives $W_{J}$ in $W$ and let $w_{0}$ be the longest element of $W$. We use the same notations $P_{J}$ and $N_{J}$ as in \cite {br8} for the number of elements in $X_{J}$ of even and odd length, respectively and let $D_{J}=P_{J}-N_{J}$. In [\cite{br2}, Theorem 1], O. Eng proved the following theorem about -1 phenomenon. \vspace*{0.3cm} \begin{thm}\label{Eng} For any $J \subseteq S$, we have \begin{equation}\label{-1 phnmn} \sum_{w \in X_{J}} (-1)^{l(w)}= |\{ w \in X_{J}: w_{0}wW_{J}=wW_{J} \}|, \end{equation} where $l$ denotes the length function on $W$. \end{thm} In \cite {br8}, L. Tan showed the relation $D_{J}=\sum_{w \in X_{J}} (-1)^{l(w)}$. O. Eng proved this theorem by using case by case techniques. In \cite{br5}, V. Reiner gave a case-free geometric proof of Theorem \ref{Eng}. Then in \cite{br6}, V. Reiner, D. Stanton, D. White presented the first case-free algebraic proof of the theorem above. To give another proof of Theorem \ref{Eng} algebraically, we use a different method than that of V. Reiner, D. Stanton, D. White. Our approach depends more on the structure of the descent algebra of a finite Coxeter group introduced by L. Solomon in \cite{br7}. Our proof is new and avoids case by case considerations. Set $x_{J}=\sum_{w \in X_{J}}w$ for any subset $J$ of $S$. Then $\{ x_{J}~|~ J \subseteq S \}$ forms a basis for a subalgebra of the group algebra $\mathbb{Q}W$ called \textit{the descent algebra} of $W$. We denote by $\sum(W)$ the descent algebra corresponding to $W$. The ascent set of $w$ is defined by $$\mathcal{R}(w)=\{s \in S : l(ws)>l(w)\}.$$ For any subset $I$ of $S$, put $Y_{I}=\{w \in W : \mathcal{R}(w)=I\}$. We consider the element $y_{I}=\sum_{w \in Y_{I}}w$ in $\mathbb{Q}W$. Then $$x_{I}=\sum_{I \subseteq J}y_{J}$$ and by M\"obius inversion formula $$y_{I}=\sum_{I \subseteq J}(-1)^{|J-I|}x_{J}.$$ Thus the set $\{y_{I} : I \subseteq S\}$ is a basis of $\sum(W)$, see \cite {br7}. In \cite{br7}, L. Solomon also defined an algebra map from $\sum(W)$ to $\mathbb{Q}\textrm{Irr}W$ as follows: $$\Phi : \sum(W) \rightarrow \mathbb{Q}\textrm{Irr}(W), x_{J} \mapsto Ind_{W_{J}}^{W}1_{W_{J}},$$ where $\mathbb{Q}\textrm{Irr}W$, $1_{W_{J}}$ and $Ind_{W_{J}}^{W}1_{W_{J}}$ denote the algebra generated by irreducible characters of $W$, the trivial character of $W_{J}$ and the permutation character of $W_{J}$ in $W$, respectively. Taking into account the sign character of $W$, which is defined as $\varepsilon : W \rightarrow \mathbb{N},~\varepsilon(w)=(-1)^{l(w)}$ (see \cite{br3}), it is well-known from \cite{br7} that $y_{\emptyset}=w_{0} \in \sum(W)$ and \begin{equation}\label{epsilon} \Phi(w_{0})=\varepsilon. \end{equation} The sign character $\varepsilon$ of $W$ is actually irreducible and equals to the Steinberg character of $W$, which is given by the formula $St_{W}=\sum_{J \subseteq S}(-1)^{|J|}\Phi(x_{J})$ due to \cite{br11}. In [\cite{br1}, Main Theorem], D. Blessenohl, C. Hohlweg, M. Schocker showed the symmetry property for the descent algebra $\sum(W)$, that is, \begin{equation}\label{symmetry} \Phi(x)(y)=\Phi(y)(x) \end{equation} for all $x, y \in \sum(W)$. Let $I, J \subseteq S$. We write $I \sim_{W} J$ if $I$ and $J$ are $W$-conjugate, that is, there is a $w \in W$ such that $I=wJw^{-1}$ . \section{\textit{Proof of Theorem 1.1}} When we extend linearly the sign character $\varepsilon$ of $W$ to the group algebra $\mathbb{Q}W$ and use the equation (\ref{epsilon}), (\ref{symmetry}), then we conclude that \begin{align*} \sum_{w \in X_{J}} (-1)^{l(w)}&=\sum_{w \in X_{J}}\varepsilon(w)=\varepsilon(\sum_{w \in X_{J}}w) \\ &=\varepsilon(x_{J})=\Phi(w_{0})(x_{J})=\Phi(x_{J})(w_{0})\\ &=Ind_{W_{J}}^{W}1_{W_{J}}(w_{0})=|\{ w \in X_{J}: w_{0}wW_{J}=wW_{J} \}|. \end{align*} Therefore, we obtain the equation (\ref{-1 phnmn}) and so we complete a case-free algebraic proof of the Theorem \ref{Eng}. Consequently, we can write $D_{J}=\Phi(x_{J})(w_{0})$. \begin{cor} Let $I, J \subseteq S$. If $I \sim_{W} J$, then we have $D_{I}=D_{J}$. \end{cor} \begin{proof} The radical of $\sum(W)$ is $Ker\Phi=<x_{I}-x_{J} : I \sim_{W} J>$ from \cite{br7}. Since $\Phi$ is an algebra morphism, then we get $\Phi(x_{I})=\Phi(x_{J})$. By considering the proof of Theorem \ref{Eng} given above, one has \begin{equation*} D_{I}=\Phi(x_{I})(w_{0})=\Phi(x_{J})(w_{0})=D_{J}. \end{equation*} \end{proof} Another perspective for the proof of Corollary 2.1 is that when $I$ conjugate to $J$ under $W$, the corresponding sets of the distinguished coset representatives $X_{I}$ and $X_{J}$ are $W$-pointwise conjugate to each other due to \cite{br4}. Therefore, we have $D_{I}=D_{J}$. \begin{cor}\label{sum} For any finite Coxeter system $(W,S)$, we have $$\sum_{J \subseteq S}(-1)^{|J|}D_{J}=(-1)^{|T|},$$ where $T$ denotes the set of reflections of $W$, that is, $T=\bigcup_{w \in W}wSw^{-1}$. \end{cor} \begin{proof} To prove Corollary \ref{sum} observe that image of the longest element $w_{0}$ under the sign character $\varepsilon$ of $W$ is $\varepsilon(w_{0})=(-1)^{l(w_{0})}=(-1)^{|T|}$. Since $w_{0}=\sum_{J \subseteq S}(-1)^{|J|}x_{J}$, we have $$\varepsilon(w_{0})=\sum_{J \subseteq S}(-1)^{|J|}\varepsilon(x_{J})=\sum_{J \subseteq S}(-1)^{|J|}\Phi(x_{J})(w_{0})=\sum_{J \subseteq S}(-1)^{|J|}D_{J},$$ using the fact that $\Phi(x_{J})(w_{0})=D_{J}$. \end{proof} One can observe that Corollary \ref{sum} is actually a special case of Proposition 1.11 given in \cite{br3}. \begin{ex} We consider the Coxeter system $(W_{n},S_{n})$ of type $B_{n}$. In [\cite{br8}, Theorem B], L. Tan proved that $D_{J}=0$ for every proper parabolic subgroup of $W_{n}$. This statement is also seen from the fact that there is no $w \in X_{J}$ such that $ww_{0}w^{-1} \in W_{J}$ for every proper subset $J$ of $S_{n}$. Therefore, $$\sum_{J \subseteq S_{n}}(-1)^{|J|}D_{J}=(-1)^{n}.$$ \end{ex} The following result due to L. Tan \cite{br8} is easily derived from Lemma 2.1 given in \cite{br0} and Theorem \ref{Eng}. \begin{lem}[Tan \cite{br8}] Suppose $I \subseteq J \subseteq S$. Then $W_{J}=X_{I}^{J}W_{I}$ and $D_{SI}=D_{SJ}D_{JI}$, where $X_{I}^{J}=X_{I} \cap W_{J}$. \end{lem} It is well-known from Lemma 2.1 in \cite{br0} that for $I \subseteq J \subseteq S$, we have $x_{I}=x_{J}x_{I}^{J}$. Since $\Phi$ is an algebra morphism, then we get $$\Phi(x_{I})=\Phi(x_{J}) \Phi(x_{I}^{J}).$$ Taking Theorem \ref{Eng} into consideration we conclude that the relation $D_{SI}=D_{SJ}D_{JI}$ in the sense of \cite{br8}. \begin{cor} For any finite Coxeter group $W$, we have $$\sum_{w \in W}(-1)^{l(w)}=0.$$ \end{cor} \begin{proof} Since the image of $x_{\emptyset}$ under $\Phi$ gives the regular character of $W$ and the equation (\ref{symmetry}), then we conclude $$\sum_{w \in W}(-1)^{l(w)}=\varepsilon(\sum_{w \in W}w)=\varepsilon(x_{\emptyset})=\phi(w_{0})(x_{\emptyset})=\phi(x_{\emptyset})(w_{0})=0.$$. \end{proof} \vspace*{0.3cm}
\section{Introduction} \subsection{Overview} The study of large systems of interacting particles in the presence of noise has attracted a large amount of interest in recent years. This is largely due to the fact that they pose challenging mathematical questions and that they appear in several applications, ranging from the theory of random matrices~\cite{Ser15} and the construction of K\"ahler--Einstein metrics~\cite{BO2018} to the design of algorithms for global optimisation~\cite{RV2018,KPP2019}, biological models of chemotaxis~\cite{FJ17}, and models of opinion formation~\cite{GPW17}. We place ourselves in the setting of a system of weakly interacting diffusion processes as in~\cite{Oel84}. It is well-known that, under appropriate assumptions on the interaction and confining potentials, one can pass to the mean field limit as $N \to \infty$ to obtain the so-called McKean--Vlasov equation~\eqref{eps=1} for the limit of the $N$-particle empirical measure. More precisely, given chaotic initial data, the empirical measure associated to the system of particles converges weakly to the weak solution of the McKean--Vlasov equation. Formally, one can say that the law of the $N$-particle system decouples and converges to $N$ copies of the mean field McKean--Vlasov equation. This corresponds to a strong law of large numbers (LLN) for the the empirical measure. A natural question to ask then is whether one can obtain a second order characterisation of this convergence, i.e. a central limit theorem (CLT). Partial results in this direction do exist: Fernandez and M\'el\'eard~\cite{fernandez1997hilbertian} obtained a finite-time horizon version of the CLT. They showed that the fluctuations around the mean field limit are described in the large $N$-limit by a Gaussian random field which itself is the solution of a linear stochastic PDE. Additionally, Dawson~\cite{dawson1983critical} proved an equilibrium CLT for the empirical measure of a system of particles in a bistable confining potential and Curie--Weiss interaction. The interesting feature of Dawson's system is that exhibits a phase transition, i.e. for a certain value of the interaction strength the system transitions from having one invariant measure to having multiple. Dawson showed that below the phase transition point equilibrium fluctuations are described by Gaussian random field, similar to the result in~\cite{fernandez1997hilbertian}. However, at the critical temperature the fluctuations become non-Gaussian and are given by the invariant measure of nonlinear SDE. These are non-Gaussian fluctuations are persistent and are characterised by a longer time scale, exhibiting the well known phenomenon of critical slowing down (cf.~\cite{Shi87} for a less rigorous derivation of similar results). We are not aware of any results on the limiting behaviour of the fluctuations that have been obtained ahead of the phase transition. Fluctuations around the McKean--Vlasov mean field limit for a system of weakly interacting diffusions with an internal degree of freedom were also studied recently in~\cite{BBC19}. Under the assumption of scale separation between the macroscopic and microscopic dynamics, a large deviations principle (LDP) was established for the slow dynamics, valid in the combined limit of infinite scale separation ($\varepsilon \to 0$) and of the number of particles going to infinity ($N \to \infty$). This LDP was then used to deduce information about the fluctuations around the mean field limit and to also offer partial justification for the so-called Dean equation, a stochastic partial differential equation used in dynamical density functional theory which combines, formally, the mean field limit and central limit theorem results for the system of weakly interacting diffusions. Furthermore, the connection between the LDP framework and the Chapman--Enskog approach to the study of the hydrodynamic limit was discussed in detail. The crucial assumption made by the authors was that the microscopic dynamics has a unique stationary state, i.e. that no phase transitions occur. The prototype of the systems we consider is the following system of $N$ interacting SDEs on $\mathbb R$ \begin{align} \dx{X}_t^{i}= - \frac{1}{N} \sum_{j=1,j \neq 1}^N \sin\bra*{2 \pi \bra*{X_t^{i}- X_t^{j}}} \dx{t} + \sqrt{2\beta^{-1}}dB_t^{i} \label{R} \end{align} where the $B_t^i$ are independent $\mathbb R$-valued Wiener processes. The interesting feature about the above system is that the interaction potential is $1$-periodic. As a consequence of this, the behaviour of~\eqref{R} is influenced heavily by the corresponding quotiented process on $\mathbb T$ (the one dimensional unit torus). The quotiented system on the torus is in fact the noisy Kuramoto model for mean field plane rotators\footnote{Additionally, its reversible Gibbs measure corresponds to the classical Heisenberg $XY$ model for lattice systems with continuous spins and mean field interaction. This is immediately apparent when one considers the associated Hamiltonian which is given by: $$ H^N(x_1, \dots, x_N)= -(2N)^{-1} \sum_{i,j}\cos(2 \pi(x_i-x_j))=- (2N)^{-1} \sum_{i,j}S_i \cdot S_j \, , $$ where $S_i= (\cos(2\pi x_i), \sin(2 \pi x_i)), $cf.~\cite[Chapter 9]{FV2018} or~\cite{BGP10}. }~\cite{BGP10,CGPS19}. Indeed (cf. Proposition~\ref{XY}), one can show that the corresponding mean field limit on the torus exhibits a phase transition. A more complete picture of the local bifurcations and phase transitions for the McKean--Vlasov equation on the torus can be found in~\cite{CGPS19}\footnote{In later sections, as a technical requirement, we will consider the same system with an additional confining potential in order the break the translation symmetry of the noisy Kuramoto system which leads to degeneracy of minimisers ahead of the phase transition (cf. Proposition~\ref{XY}). }. In the spirit of Dawson, our main objective is to study fluctuations in the presence of phase transitions. However, instead of the phase transitions of the system on $\mathbb R$, we will be concerned with the phase transitions of the quotiented system on $\mathbb T$. Furthermore, we study the diffusive limit which can be thought of as the first step in understanding fluctuations of the $N$-particle system. Although we do discuss the implications of a full CLT (cf. Section~\ref{ftheorem}), we concern ourselves in this paper mainly with the combined diffusive-mean field limits. The problem that we study in this paper is closely related, and simpler, to the one studied in~\cite{BBC19}: scale separation arises naturally in our case due to the disparity between the period of the interaction potential which is the characteristic length scale of the microscopic dynamics, and the long, diffusive length/time scale. The ``hydrodynamics'' in our problem is described by the (homogenised) heat equation, with the effective covariance matrix given by the standard homogenisation formula: compare Equation~\eqref{kipnisvaradhan} below with formulas (3.14) and (3.15) in~\cite{BBC19}. However, in contrast to~\cite{BBC19} our main focus is on the effect of the presence of phase transitions at the microscopic scale on the effective/macroscopic dynamics. We are, in particular, interested on the effect of phase transitions on the (lack of) commutativity between the homogenisation and mean field limits. Before we discuss what we mean by the combined limit, we remind the reader of what we mean by the diffusive limit. For a fixed number of particles $N>0$ for the system in~\eqref{R}, a natural question to ask is how the law of the system behaves under the diffusive rescaling, i.e. if $\rho^{\varepsilon,N}= \mathrm{Law}\bra*{\varepsilon X_{t/\varepsilon^2}^1 ,\dots ,\varepsilon X_{t/\varepsilon^2}^N}$ then what is the limit as $\varepsilon \to 0$ of $\rho^{\varepsilon,N}$. The answer to this question can be obtained by using classical arguments from periodic homogenisation~\cite[Chapter 20]{pavliotis2008multiscale}\cite{BLP11}. It turns out that $\rho^{\varepsilon,N}$ converges to $\rho^{N,*}$, the solution of the heat equation with a positive definite effective covariance matrix $A^{\mathrm{eff},N}$(cf. Section~\ref{epsthenN} and Equation ~\eqref{effectiveeq}), which can be obtained by solving a Poisson equation for the generator of the process on $\mathbb T^N$ (cf. Equation~\eqref{Poisson}). Another way of reinterpreting this result is by saying that the system of particles~\eqref{R} converge in law to an $N$-dimensional Brownian motion with covariance $A^{\mathrm{eff},N}$. A natural next question to ask is how does the covariance matrix $A^{\mathrm{eff},N}$, and by extension the heat equation, behave in the limit as $N \to \infty$. One could also ask the question the other way around. As discussed previously, for a fixed $\varepsilon>0$, we can pass to the mean field limit as $N \to \infty$ in $\rho^{\varepsilon,N}$ to obtain $N$ copies of the solution of the nonlinear McKean--Vlasov equation, $\rho^{\varepsilon, \otimes N}$. The natural question to ask now is whether we can understand the behaviour of $\rho^{\varepsilon,\otimes N}$ as $\varepsilon \to 0$. This dichotomy is illustrated in Figure~\ref{fig:combined}. Starting from the rescaled law $\rho^{\varepsilon,N}$, we can take the limit $\varepsilon \to 0$ first followed by $N \to \infty$ if we move in the clockwise direction or the other way around in the anti-clockwise direction. Whether these two limits commute depends heavily on the ergodic properties of the quotiented process on $\mathbb T^N$ and its behaviour in the mean field limit. Our main result asserts that the two limits commute at high temperatures (small $\beta$) and thus the combined limit is well-defined in this regime. However, at low temperatures (large $\beta$) and in particular, in the presence of a phase transition (cf. Definition~\ref{pt}), we can construct initial data such that the two limits do not commute. The problem of non-commutativity between the mean field and homogenisation limits was also studied in~\cite{GP18}. In this paper, a system of weakly interacting diffusions in a two-scale, locally periodic confining potential subject to a quadratic, Curie-Weiss, interaction potential was considered. It was shown that, although the combined homogenization-mean field limit leads to coarse-grained McKean-Vlasov dynamics that have the same functional form, the effective diffusion (mobility) tensor and the coarse-grained (Fixman) potential are different, depending on the order with which we consider these two limits (for non-separable two-scale potentials). In particular, the phase diagrams for the effective dynamics can be different, depending on the order with which we take the limits. A more striking manifestation of the non-commutativity between the two limits can be observed at small but finite values of $\varepsilon$, the parameter measuring scale separation: it is easy to construct examples where the mean field PDE, for small, finite $\varepsilon$ can have arbitrarily many stationary states, the homogenised McKean--Vlasov equation (corresponding to the choice of sending first $\varepsilon \to 0$ and then $N \to \infty$) is characterised by a convex free energy functional and, thus, a unique steady state. \begin{figure} \begin{center} $$ \begin{tikzcd} \node (X1) at (0,0) {\rho^{\varepsilon,N}}; \node (X2) at (4,0) {\rho^{N,*}}; \draw[>=triangle 45, bend left, ->] (X1) to node [above]{\textcolor{blue}{\varepsilon \to 0}} (X2); \node (X3) at (0,-2) {\rho^{\varepsilon,\otimes N}}; \draw[>=triangle 45, bend right, ->] (X1) to node [left]{\textcolor{blue}{N \to \infty}} (X3); \node (X4) at (4,-2) {?}; \draw[>=triangle 45, bend left, ->] (X2) to node [right]{\textcolor{blue}{N \to \infty}} (X4); \draw[>=triangle 45, bend right, ->] (X3) to node [below]{\textcolor{blue}{\varepsilon \to 0}} (X4); \end{tikzcd} $$ \end{center} \caption{The combined diffusive-mean field limit and the (possible) non-commutativity of the two limits} \label{fig:combined} \end{figure} \subsection{Set up and preliminaries} We denote by $\mathbb T^d$ the $d$ dimensional unit torus (which we identify with $[0,1)^d$) and use the standard notation of $\ensuremath{{L}}^p(\mathbb T^d)$ and $ \ensuremath{{H}}^s(\mathbb T^d)$ for the Lebesgue and $\ensuremath{{L}}^2$-Sobolev spaces, respectively. We will use $\ensuremath{{H}}^s_0(\mathbb T^d)$ to denote the homogeneous $\ensuremath{{L}}^2$-Sobolev spaces. We denote by the $C^k(\mathbb T^d),C^\infty(\mathbb T^d)$ the space of $k$-times ($k \in \mathbb N$) continuously differentiable and smooth functions, respectively. We denote by $\mathcal{P}(\Omega)$ the space of all Borel probability measures on $\Omega$ having finite second moment, with $\Omega$ some Polish metric space. We will use $d_1$ and $d_2$ to denote the $1$ and $2$-Wasserstein distances, respectively, on $\mathcal{P}(\mathbb R^d)$ and $\mathcal{P}(\mathbb T^d)$. Similarly we will use $\mathfrak{D}_1$ and $\mathfrak{D}_2$ for the $1$ and $2$-Wasserstein distances, respectively, on $\mathcal{P}(\mathcal{P}(\mathbb R^d))$ and $\mathcal{P}(\mathcal{P}(\mathbb T^d))$. In the sequel, any limit of a sequence of measures $\set*{\rho_n}_{n \in \mathbb N} \subset \mathcal{P}(\Omega) $ unless otherwise specified should be understood as a limit in the weak-$*$ topology relative to $C_b(\Omega)$, i.e. tested against bounded, continuous functions. We will often use the same notation for a measure and its density if the density is well-defined. We consider a large number $N\in\mathbb N$ of indistinguishable interacting particles $\{X_t^i\}_{i=1}^N$ in $\mathbb R^d$, where both the interaction and confining potentials are periodic and highly oscillatory. In particular, we consider the system \begin{equation}\label{interacting SDEs} \begin{cases} \dx{X}_t^{\varepsilon,i}= -\varepsilon^{-1}\nabla V(\varepsilon^{-1} X_t^{\varepsilon,i}) - \frac{1}{N} \sum_{j \neq i}^N \varepsilon^{-1} \nabla W(\varepsilon^{-1}(X_t^{\varepsilon,i}-X_t^{\varepsilon,j})) \dx{t} + \sqrt{2 \beta^{-1}}d B_t^i\\ \mathrm{Law}\; \big((X_0^{\varepsilon,1},...,X_0^{\varepsilon,N})\big)=\rho^{\varepsilon,N}_0, \end{cases} \end{equation} where $W:\mathbb R^d\to \mathbb R$ and $V:\mathbb R^d\to \mathbb R$ are smooth $1$-periodic interaction and confining potentials, respectively, $\varepsilon\ll 1$ is the period size, $\beta>0$ is the inverse temperature, $\rho^{\varepsilon,N}_0\in\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$ is the initial distribution of the particles which might depend on the period size, and $\{B^i_t\}_{i=1}^N$ are independent Wiener processes. We are interested in understanding the joint limit when the period of oscillations goes to $0$ ($\varepsilon\to 0$) and the number of particles tends to infinity ($N\to\infty$). We consider the joint law of the particle positions which is given by $$ \rho^{\varepsilon,N}(t)=\,\mathrm{Law}\big((X^{\varepsilon,1}_t,...,X^{\varepsilon,N}_t)\big)\in\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big), $$ where $\mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ is as defined in~\eqref{symmetric measures}. The law evolves through the following linear forward Kolmogorov or Fokker--Planck equation \begin{equation}\label{eq:LinearKolmogorov} \begin{cases} \partial_t\rho^{\varepsilon,N}=\beta^{-1} \Delta\rho^{\varepsilon,N}+\nabla\cdot(\nabla H^N_\varepsilon \rho^{\varepsilon,N})&\mbox{on $(0,\infty)\times \big(\mathbb R^d\big)^N$}\\ \rho^{\varepsilon,N}(0)=\rho^{\varepsilon,N}_0(x) &\mbox{on $\big(\mathbb R^d\big)^N$} \end{cases} \end{equation} where $H^N_\varepsilon:(\mathbb R^d)^N\to \mathbb R$ is given by \begin{equation}\label{eq:H} H^N_\varepsilon(x_1,...,x_N)= \sum_{i=1}^N V(\varepsilon^{-1} x_i)+\frac{1}{2N}\sum_{i=1}^N\sum_{\substack{j=1\\j\ne i}}^N W(\varepsilon^{-1}(x_i-x_j)). \end{equation} The main objective of this paper is to study $$ \lim_{N\to \infty}\lim_{\varepsilon\to 0} \rho^{\varepsilon,N}\qquad\mbox{and}\qquad \lim_{\varepsilon\to 0} \lim_{N\to \infty} \rho^{\varepsilon,N}, $$ and understand under which regimes they coincide or differ. For the rest of this section we introduce the relevant notions that will play an important role in understanding these limits and present our main results. The result concerning the limit $N \to \infty$ followed by $\varepsilon\to 0$ can be found in Theorem~\ref{thm:variabledata}, while the result concerning the limit $\varepsilon \to 0$ followed by $N \to \infty$ can be found in Theorem~\ref{thm: N then eps}. We discuss the effect of the presence of a phase transition in Section.~\ref{S:explicit}. Finally, in Section~\ref{ftheorem} we discuss the implications of a CLT on the rate of convergence of the Gibbs measure before the phase transition. The proofs of the two main results, Theorems~\ref{thm:variabledata} and~\ref{thm: N then eps}, can be found in Sections~\ref{sec:1thm} and~\ref{sec:2thm}, respectively. The proofs of other useful results related to the phenomenon of phase transitions are relegated to Section~\ref{sec:phase}. Appendix~\ref{ap:coupling} contains some coupling arguments which are useful for the proof of Theorem~\ref{thm:variabledata}. \vspace{0.2cm} \subsection{The space $\mathcal{P}(\mathcal{P}(\mathbb R^d))$ as the limit of $\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$} The set up we consider is similar to that in~\cite{carrillo2019proof}. We remark that due to the indistinguishability assumption on the particles their joint law is invariant under relabelling of the particles. In probability this is known as exchangeability, while in analysis this is referred to as symmetry and we denote the set of symmetric probability measures by $\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$, i.e. \begin{align} \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N):= \set*{\rho^N \in \mathcal{P}((\mathbb R^d)^N): \rho^N(A)= \rho^N(\pi(A)), \forall \pi \in\Pi, A \textrm{ measurable}} \, , \label{symmetric measures} \end{align} where $A$ is any Borel set and $\Pi$ is the set of permutations of the particle positions. Central to our work will be the classical result attributed to de Finetti \cite{deFinetti} and Hewitt--Savage \cite{HewittSavage}, that characterises the limit $N\to\infty$ of $\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$. Adapted to the set up of this paper, their result can be reformulated as follows: \begin{definition}\label{def:1} Given a family $\{\rho^{N}\}_{N\in\mathbb N}$ such that $\rho^{N}\in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ we say that $$ \rho^N\to X\in\mathcal{P}(\mathcal{P}(\mathbb R^d)) \, , \quad\mbox{as $N \to \infty$} \, , $$ if for every $n\in \mathbb N$ we have $$ \rho^N_n\rightharpoonup^* X^n\in \mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^n\big) \, , \quad\mbox{as $N \to \infty$} \, , $$ where $X^n \in \mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^n\big)$ is defined by duality as follows $$ \skp*{X^n,\varphi}=\int_{\mathcal{P}(\mathcal{P}(\mathbb R^d))}\int \varphi \dx{\rho^{\otimes n}}\;\dx{X}(\rho) \, , $$ for all $\varphi \in C_b((\mathbb R^d)^n)$ and $$ \rho^N_n=\int_{(\mathbb R^d)^{N-n}} \rho^N\; \dx{x}_{N-n+1}...dx_{N}\in \mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^n\big) \, . $$ We will often suppress the $N \to \infty$ and just write $\rho^N \to X$. \end{definition} In particular, we can relate this definition with the usual chaoticity assumption. We will say that $\{\rho^N\}_{N\in \mathbb N}$ is chaotic with limit $\rho\in\mathcal{P}(\mathbb R^d)$ if $$ \rho^N\to \delta_{\rho}\in \mathcal{P}(\mathcal{P}(\mathbb R^d)) \, , $$ in the sense of Definition~\ref{def:1}. Additionally, the notion of convergence introduced in Definition~\ref{def:1} can also be interpreted in the following manner: \begin{definition}[Empirical measure]\label{def:empirical} Given some $\rho^{N}\in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ we define its empirical measure $\hat{\rho}^{N} \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$ as follows: \begin{align} \hat{\rho}^N := T_N \# \rho^N \, , \end{align} where $T^N: (\mathbb R^d)^N \to \mathcal{P}(\mathbb R^d)$ is the measurable mapping $(x_1, \dots ,x_N)\mapsto N^{-1}\sum_{i=1}^N\delta_{x_i}$. Furthermore, given a family $\{\rho^{N}\}_{N\in\mathbb N}$, we have that $\rho^N \to X \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$ if and only if $\hat{\rho}^N \rightharpoonup^* X$. \end{definition} We conclude this subsection with the following compactness result: \begin{lemma}[de Finneti--Hewitt--Savage] Given a sequence $\{\rho^N\}_{N\in\mathbb N},$ with $\rho^N\in\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$ for every $N$, assume that the sequence of the first marginals $\{\rho_1^N\}_{N\in\mathbb N}\in\mathcal{P}(\mathbb R^d)$ is tight. Then, up to a subsequence, not relabelled, there exists $X\in\mathcal{P}(\mathcal{P}(\mathbb R^d))$ such that $\rho^N\to X$ in the sense of Definition~\ref{def:1}. \end{lemma} For a proof and more details, see \cite{hauray2014kac,rougerie2015finetti,carrillo2019proof}. In the sequel, any limit of a sequence of symmetric measures $\set{\rho^N}_{N \in \mathbb N}$ with $\rho^N \in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ should be understood in the sense of Definition~\ref{def:1}. \begin{remark} The above notion of convergence, i.e. Definitions~\ref{def:1} and~\ref{def:empirical}, can be naturally extended to $\mathcal{P}_{\mathrm{sym}}((\mathbb T^d)^N)$. \end{remark} \subsection{Gradient flow formulation and the mean field limit} \label{gradientflow} In \cite{carrillo2019proof}, the mean field limit (the limit $N\to\infty$) of the interacting particle system \eqref{eq:LinearKolmogorov} is achieved by passing to the limit in the 2-Wasserstein gradient flow structure. The results of this article will build on this perspective which we briefly recall here: The evolution of the joint law $\rho^{\varepsilon,N}$ given by \eqref{eq:LinearKolmogorov} is the gradient flow (in the sense of~\cite[Definition 11.1.1]{ambrosio2008gradient}) of the energy $E^N: \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N) \to (-\infty,+\infty]$ \begin{equation}\label{Energyperparticle} E^N[\rho^N]:=\frac{1}{N}\left(\beta^{-1}\int_{(\mathbb R^d)^N}\rho^N\log\rho^N\;\dx{x}+\int_{(\mathbb R^d)^N}H^N_\varepsilon(x)\;\dx{\rho^N}(x) \right) \, , \end{equation} under the rescaled 2-Wasserstein distance $\frac{1}{\sqrt{N}}d_2$ on $\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$. Moreover, we have the following classical result of Messer and Spohn \cite{messer1982statistical}: \begin{lemma}\label{lem:gamma} The $N$-particle free energy $E^N$ $\Gamma$-converges to $E^\infty:\mathcal{P}(\mathcal{P}(\mathbb R^d))\to (-\infty,+\infty]$, where \begin{equation}\label{} E^\infty[X]=\int_{\mathcal{P}(\mathbb R^d)}E_{MF}[\rho]\;\dx{X}(\rho) \, , \end{equation} with $E_{MF}:\mathcal{P}(\mathbb R^d)\to (-\infty,+\infty]$ given by \begin{equation} E_{MF}[\rho]=\beta^{-1} \int_{\mathbb R^d} \rho\log(\rho)\;\dx{x}+\int_{\mathbb R^d} V(\varepsilon^{-1}x)\dx{\rho(x)}+\frac{1}{2}\iint_{\mathbb R^d \times \mathbb R^d}W(\varepsilon^{-1}(x-y))\dx{\rho}(y)\dx{\rho}(x). \end{equation} That is to say, for every $X \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$ there exists a sequence $\set*{\rho^N}_{N \in \mathbb N} $, $\rho^N \in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ with $\rho^N \to X$ such that \begin{align} \lim_{N \to \infty} E^N[\rho^N]= E^\infty[X] \, . \end{align} Additionally, for every $X \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$ and $\set*{\rho^N}_{N \in \mathbb N}$, $\rho^N \in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ with $\rho^N \to X$ it holds that \begin{align} E^\infty[X] \leq \liminf_{N \to \infty}E^N[\rho^N] \, . \end{align} \end{lemma} On the other hand we have a similar convergence for the metrics: $\frac{1}{\sqrt{N}}d_2$ the rescaled 2-Wasserstein distance on $\mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)$ converges to $\mathfrak{D}_2$ the 2-Wasserstein distance on $\mathcal{P}(\mathcal{P}(\mathbb R^d))$. Specifically, given two sequences $\{\mu^N\}_{N\in\mathbb N}$ and $\{\nu^N\}_{N\in\mathbb N}$ of symmetric probability measures such that $\mu^N\to X_1$ and $\nu^N\to X_2$, then $$ \frac{1}{N}d_2^2(\mu^N, \nu^N)\to \mathfrak{D}_2^2(X_1,X_2). $$ We can now state our result concerning the mean field limit, i.e. the limit $N \to \infty$: \begin{customthm}{A.}[Mean field limit]\label{thma} Fix some $t>0$, then, $$ \lim_{N\to\infty}\rho^{\varepsilon, N}(t)=X^\varepsilon(t) \in \mathcal{P}(\mathcal{P}(\mathbb R^d)), $$ Furthermore, we have that the curve $X^\varepsilon: [0,\infty) \to \mathcal{P}(\mathcal{P}(\mathbb R^d))$ is a gradient flow of $E^\infty$ under the 2-Wasserstein metric $\mathfrak{D}_2$. Moreover, \begin{align}\label{mfl} X^\varepsilon(t)=S_t^\varepsilon\# X^\varepsilon_0, \end{align} where $X^\varepsilon_0=\lim_{N\to\infty}\rho^{\varepsilon,N}_0$ and $S_t^\varepsilon:\mathcal{P}(\mathbb R^d)\to \mathcal{P}(\mathbb R^d)$ is the solution semigroup associated to the nonlinear McKean--Vlasov evolution equation \begin{equation}\label{nonlineareq} \partial_t \rho^\varepsilon=\beta^{-1} \Delta\rho^\varepsilon +\nabla\cdot(\rho^\varepsilon (\nabla W_\varepsilon\ast\rho^\varepsilon+\nabla V_\varepsilon)), \end{equation} with $W_\varepsilon(x)=W(\varepsilon^{-1}x)$ and $V_\varepsilon(x)=V(\varepsilon^{-1}x)$. \end{customthm} \vspace{0.2cm} \subsection{Scaling and the quotiented process}\label{sandq} We notice that the Fokker--Planck equation~\eqref{eq:LinearKolmogorov} behaves well under the parabolic scaling, i.e. given a solution $\rho^{\varepsilon,N}$ of~\eqref{eq:LinearKolmogorov} we have that \begin{align} \nu^{N}(s,y)= \varepsilon^{N d}\rho^{\varepsilon,N}(\varepsilon^{2}s,\varepsilon y) \, ,\label{unscaling} \end{align} is the solution to the Fokker--Planck equation at scale $\varepsilon=1$, i.e. \begin{align}\label{realeps=1} \partial_s \nu^N= \beta^{-1}\Delta \nu^N + \nabla \cdot \bra*{\nabla H^N_1 \nu^{N}} , (s,y) \in (0,\infty) \times (\mathbb R^d)^N. \end{align} The above equation naturally describes the evolution of the law of $N$-particle system~\eqref{interacting SDEs} at scale $\varepsilon=1$: \begin{equation}\label{unscaled interacting SDEs} \begin{cases} \dx{X}_t^{i}= -\nabla V( X_t^{i}) - \frac{1}{N} \sum_{j \neq i}^N \nabla W(X_t^{i}-X_t^{j}) \dx{t} + \sqrt{2 \beta^{-1}}d B_t^i\\ \mathrm{Law}\; \big(X_0^{1},...,X_0^{N}\big)=\varepsilon^{Nd}\rho^{\varepsilon,N}_0(\varepsilon x):=\nu^N_0. \end{cases} \end{equation} Since $W$ and $V$ are periodic, in order to that to understand the behaviour of $\rho^{\varepsilon,N}$ in the limit as $\varepsilon \to 0$, we must first understand the behaviour of the quotiented process $\set{\dot{X}_t^i}_{i=1}^N$ of~\eqref{unscaled interacting SDEs} which lives on $(\mathbb T^{d})^N$~\cite[Section 9.1]{KLO12}\cite[Section 3.3.2]{BLP11}. Before we introduce the quotiented process, we define the following notion which will play an important role in the rest of the paper: \begin{definition}\label{rearrangement} Given a measure $\rho \in \mathcal{P}(\mathbb R^d)$ we define its periodic rearrangement at scale $\varepsilon>0$ to be the measure $\tilde{\rho} \in \mathcal{P}(\mathbb T^d)$, such that for any measurable $A\subset \mathbb T^d$ it holds that \begin{align} \tilde{\rho}(A):= \varepsilon^d\sum_{k \in \mathbb Z^d}\rho(\varepsilon(A +k)) \, . \end{align} We will often just use the words periodic rearrangement when $\varepsilon=1$. \end{definition} Given the above notion, we have that quotient process $\set{\dot{X}_t^i}_{i=1}^N$ satisfies the following set of SDEs posed on the torus: \begin{equation}\label{periodic interacting SDEs} \begin{cases} \dx{\dot{X}}_t^{i}= -\nabla V( \dot{X}_t^{i}) - \frac{1}{N} \sum_{j \neq i}^N \nabla W(\dot{X}_t^{i}-\dot{X}_t^{j}) \dx{t} + \sqrt{2 \beta^{-1}}d \dot{B}_t^i\\ \mathrm{Law}\; \big(\dot{X}_0^{1},...,\dot{X}_0^{N}\big)=\tilde{\nu}^N_0 \, , \end{cases} \end{equation} where $\dot{B}^i_t$ are independent $\mathbb T^d$-valued Brownian motions and $\tilde{\nu}^N_0$ is the periodic rearrangement of $\nu^N_0$ in the sense of Definition~\ref{rearrangement}. One can check that the process $\set{\dot{X}_t^i}_{i=1}^N$ is a reversible ergodic diffusion process with its unique invariant or Gibbs measure $M_N \in \mathcal{P}_{\mathrm{sym}}((\mathbb T^d)^N)$ given by \begin{align} M_N(x)=\frac{e^{-H_1^N(x)}}{\int_{\bra*{\mathbb{T}^d}^N}e^{-H_1^N(y)}\;\dx{y}} \, . \end{align} As expected, the law $\tilde{\nu}^N(t)$ of the quotiented system~\eqref{periodic interacting SDEs} can be obtained by considering the periodic rearrangement of $\nu^N(t)$, the solution of~\eqref{realeps=1} and it evolves according to the following PDE: \begin{align}\label{periodicNeps=1} \partial_s \tilde{\nu}^N= \beta^{-1}\Delta \tilde{\nu}^N + \nabla \cdot \bra*{\nabla H^N_1 \tilde{\nu}^N} , \quad (s,y) \in (0,\infty) \times (\mathbb R^d)^N \, . \end{align} In analogy to the discussion in Section~\ref{gradientflow}, the above PDE is the gradient flow of the following $N$-particle periodic free energy: \begin{equation}\label{Energyperparticleperiodic} \tilde{E}^N[\tilde{\nu}^N]:=\frac{1}{N}\left(\beta^{-1}\int_{(\mathbb T^d)^N}\tilde{\nu}^N\log\tilde{\nu}^N\;\dx{x}+\int_{(\mathbb T^d)^N}H^N_1(x)\;\dx{\tilde{\nu}^N}(x) \right) \, , \end{equation} under the rescaled $2$-Wasserstein distance $\frac{1}{\sqrt{N}}d_2$ on $\mathcal{P}_{\mathrm{sym}}((\mathbb T^d)^N)$. Furthermore, the Gibbs measure $M_N$ of the process~\eqref{periodic interacting SDEs} is the unique minimiser of $\tilde{E}^N$. Similarly, we also notice that the nonlinear McKean--Vlasov equation \eqref{nonlineareq} behaves well under the parabolic scaling. Specifically, given $\rho^\varepsilon$ a solution to \eqref{nonlineareq}, then $$ \nu(s,y)=\varepsilon^d\rho^\varepsilon(\varepsilon^{2}s,\varepsilon y) $$ is a solution to the McKean--Vlasov equation at scale $\varepsilon=1$, \begin{equation}\label{eps=1} \partial_s \nu=\beta^{-1} \Delta\nu +\nabla\cdot(\nu (\nabla W\ast\nu+\nabla V))\qquad\mbox{on $(0,\infty)\times\mathbb R^d.$} \end{equation} It is well known that this describes the law of the corresponding mean field McKean SDE which is given by \begin{align} \begin{cases} \label{eq:mckeanSDEintro} \dx{Y}_t^\varepsilon &= -\nabla V(Y_t^\varepsilon)\dx{t} - \nabla (W \ast \nu (t))(Y_t^\varepsilon)\dx{t} + \sqrt{2 \beta^{-1}} dB_t \\ \mathrm{Law}(Y_0^\varepsilon)&= \nu_0^\varepsilon=\varepsilon^d\rho_0^\varepsilon(\varepsilon x) \in \mathcal{P}(\mathbb R^d) \, . \end{cases} \end{align} Again, we notice that all the coefficients in~\eqref{eps=1} are 1-periodic. Therefore, the nonlinearity $\nabla W\ast\nu$ only depends on the law of the quotiented process. We can thus understand the behaviour of the nonlinearity $\nabla W \ast \nu$ by considering the evolution of the periodic rearrangement $\tilde{\nu}(t)$ of $\nu(t)$, which solves the periodic nonlinear McKean--Vlasov equation: \begin{equation}\label{periodiceps=1} \partial_s \tilde{\nu}=\beta^{-1} \Delta\tilde{\nu} +\nabla\cdot(\tilde{\nu} (\nabla W\ast\tilde{\nu}+\nabla V)) \qquad\mbox{on $(0,\infty)\times\mathbb T^d.$} \end{equation} An important role is thus played by the limiting behaviour of solutions $\tilde{\nu}(t)$ of the above equation and its steady states. As in Section~\ref{gradientflow}, the equation~\eqref{periodiceps=1} is the gradient flow of the periodic mean field free energy \begin{equation}\label{periodicmeanfieldenergy} \tilde{E}_{MF}[\tilde{\nu}]=\beta^{-1}\int_{\mathbb T^d} \tilde{\nu}(x)\log(\tilde{\nu}(x))\;\dx{x}+\int_{\mathbb T^d} V(x)\;\dx{\tilde{\nu}}(x)+\frac{1}{2}\int_{\mathbb T^d}W\ast\tilde{\nu}(x)\;d{\tilde{\nu}(x)} \, , \end{equation} with respect to the the $2$-Wasserstein metric on $\mathbb T^d$ and the energies $\tilde{E}^N$ and $\tilde{E}^{MF}$ are related in the same way as the energies $E^N$ and $E_{MF}$, i.e. through the result of Messer and Spohn~\cite{messer1982statistical}: \begin{lemma}\label{lem:gammaperiodic} The $N$-particle periodic free energy $\tilde{E}^N$ $\Gamma$-converges (in the sense of Lemma~\ref{lem:gamma}) to $\tilde{E}^\infty:\mathcal{P}(\mathcal{P}(\mathbb T^d))\to (-\infty,+\infty]$, where \begin{equation}\label{} \tilde{E}^\infty[X]=\int_{\mathcal{P}(\mathbb T^d)}\tilde{E}_{MF}[\tilde{\nu}]\;\dx{X}(\tilde{\nu}) \, . \end{equation} As a consequence, if $\{M_N\}_{N\in\mathbb N}$ is the sequence of minimisers of $\tilde{E}^N$, then any accumulation point $X\in\mathcal{P}(\mathcal{P}(\mathbb T^d))$ of this sequence is a minimiser of $\tilde{E}^\infty$. \end{lemma} We can use the gradient flow structure to provide a useful characterisation of the steady states of the periodic McKean--Vlasov system~\eqref{periodiceps=1}. \begin{proposition}\label{tfae} Let $\tilde{\nu} \in \mathcal{P}(\mathbb T^d)$. Then, the following statements are equivalent: \begin{enumerate} \item $\tilde{\nu}$ is a steady state of~\eqref{periodiceps=1}. \item $\tilde{\nu}$ is a critical point of the mean field free energy, $\tilde{E}_{MF}$, i.e. the metric slope (cf.~\cite[Definition 1.2.4]{ambrosio2008gradient}) $\abs*{\partial \tilde{E}_{MF}}(\tilde{\nu})=0$. \item $\tilde{\nu}$ is a zero of the dissipation functional $D: \mathcal{P}(\mathbb T^d) \to (-\infty,+\infty]$, i.e. \begin{align} D(\tilde{\nu})= \intt{\abs*{\nabla\log\frac{\tilde{\nu}}{e^{-\beta\bra*{ W \ast \nu + V}}}}^2\tilde{\nu}}=0 \,. \end{align} \item $\tilde{\nu}$ satisfies the self-consistency equation \begin{align}\label{eq:critical point} \tilde{\nu} =\frac{e^{-\beta (V + W\ast\tilde{\nu})}}{Z}, \end{align} with the partition function given by \begin{align}\label{partitionfunction} Z=\int_{\mathbb T^d}e^{-\beta (V + W\ast\tilde{\nu}(y))}\dx{y}. \end{align} \end{enumerate} \end{proposition} A proof of this result can be found, for example, in~\cite[Proposition 2.4]{CGPS19} or in~\cite{Tam84}. It is evident from this characterisation that the behaviour of the system~\eqref{periodiceps=1} on the torus will affect the distinguished limits (either $N \to \infty$ or $\varepsilon \to 0$) of the system~\eqref{nonlineareq} on $\mathbb R^d$. In particular, if~\eqref{periodiceps=1} has multiple steady states then the distinguished limits will be influenced by steady states attained in the long-time dynamics. We refer to the phenomenon of nonuniqueness of steady states as a phase transition and discuss its effect on the limits in Section~\ref{S:explicit}. To conclude this subsection, for the reader's convenience, we include Figure~\ref{fig:notation} which provides a useful schematic of the notation that will be used for the rest of this paper. Starting with $\rho^{\varepsilon,N}$ the solution of~\eqref{eq:LinearKolmogorov}, one can obtain $\tilde{\nu}^N$, the solution of~\eqref{realeps=1}, by using the scaling in~\eqref{unscaling}. One can then pass to to the limit $N \to \infty $ in $\rho^{\varepsilon,N}$ and $\nu^N$, to obtain the McKean--Vlasov equation at scale $\varepsilon$~\eqref{nonlineareq} or scale $1$~\eqref{eps=1}, respectively. Alternatively one can consider the periodic rearrangement $\tilde{\nu}^N$ of $\nu^N$ which solves~\eqref{periodicNeps=1} and pass to the limit $N \to \infty$ to obtain a solution of the periodic McKean--Vlasov equation~\eqref{periodiceps=1}. The rest of the figure follows in a similar fashion. \begin{figure} \begin{center} $$ \begin{tikzcd} \node (X1) at (0,0) {\rho^{\varepsilon,N}}; \node (X2) at (4,0) {\nu^{N}}; \draw[>=triangle 45, bend left,->] (X1) to node [above]{\textcolor{blue}{\varepsilon^{N d} \rho^{\varepsilon,N}(\varepsilon^2 s,\varepsilon y)}} (X2); \draw[>=triangle 45, bend left, ->] (X2) to node [below]{\textcolor{blue}{\varepsilon^{-N d} \nu^{N}(\varepsilon^{-2}t,\varepsilon^{-1} x)}} (X1); \node (X3) at (0,-4) {\rho^{\varepsilon,\otimes N}}; \draw[>=triangle 45, right, ->] (X1) to node [left]{\textcolor{blue}{N \to \infty}} (X3); \node (X4) at (4,-4) {\nu^{\otimes N}}; \draw[>=triangle 45, left, ->] (X2) to node [right]{\textcolor{blue}{N \to \infty}} (X4); \draw[>=triangle 45, bend left, ->] (X3) to node [above]{\textcolor{blue}{\varepsilon^{d} \rho^{\varepsilon}(\varepsilon^2 s,\varepsilon y)}} (X4); \draw[>=triangle 45, bend left, ->] (X4) to node [below]{\textcolor{blue}{\varepsilon^{-d} \tilde{\nu}(\varepsilon^{-2} t,\varepsilon^{-1} x)}} (X3); \node (X5) at (7,0) {\tilde{\nu}^{ N}}; \draw[>=triangle 45, bend left, ->] (X2) to node [above]{\textrm{\textcolor{blue}{P.R.}}} (X5); \node (X6) at (7,-4) {\tilde{\nu}^{\otimes N}}; \draw[>=triangle 45, left, ->] (X5) to node [right]{\textcolor{blue}{N \to \infty}} (X6); \draw[>=triangle 45, bend right, ->] (X4) to node [below]{\textrm{\textcolor{blue}{P.R.}}} (X6); \end{tikzcd} $$ \end{center} \caption{A schematic of the notation. The P.R. denotes periodic rearrangement in the sense of Definition~\ref{rearrangement}.} \label{fig:notation} \end{figure} \subsection{The diffusive limit}\label{sec:diffusivelimit} We have already discussed the limit $N \to \infty$ in Section~\ref{gradientflow}. Here, we discuss the diffusive limit, i.e. $\varepsilon \to 0$. For a fixed number of particles $N$, we can use techniques from the theory of periodic homogenisation to pass to the limit $\varepsilon\to0$ in \eqref{eq:LinearKolmogorov}, see for instance \cite[Chapter 20]{pavliotis2008multiscale}\cite{KV86,DFGW89,BLP11}. In particular, we have the following result: \begin{customthm}{B}[The diffusive limit]\label{diffusivelimit} Consider $\rho^{\varepsilon,N}$ the solution to~\eqref{eq:LinearKolmogorov} with initial data $\rho_0^{\varepsilon,N} \in \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$. Then, for all $t>0$ the limit $$ \rho^{N,*}(t)=\lim_{\varepsilon\to 0}\rho^{\varepsilon,N}(t) $$ exists. Furthermore, the curve of measures $\rho^{N,*}:[0,\infty) \to \mathcal{P}_{\mathrm{sym}}((\mathbb R^d)^N)$ satisfies the heat equation \begin{equation}\label{effectiveeq} \partial_t\rho^{N,*}=\nabla\cdot(A^{\mathrm{eff},N} \nabla \rho^{N,*}) \, , \end{equation} with initial data $\rho^{N,*}(0)=\lim_{\varepsilon \to 0} \rho_0^{\varepsilon,N}$ and where the covariance matrix is given by the formula \begin{align} A^{\mathrm{eff},N}=\beta^{-1}\int_{(\mathbb{T}^d)^N} (I+\nabla \Psi^N(y))\;M_N(y)\;\dx{y} \, , \label{kipnisvaradhan} \end{align} with $$ M_N(x)=\frac{e^{-H_1^N(x)}}{\int_{\bra*{\mathbb{T}^d}^N}e^{-H_1^N(y)}\;\dx{y}} \, , $$ the Gibbs measure of the quotiented $N$-particle system~\eqref{periodic interacting SDEs} and $\Psi^N:\big(\mathbb T^d\big)^N\to \big(\mathbb R^d\big)^N$ the unique mean zero solution to the associated corrector problem $$ \nabla\cdot(M_N\nabla \Psi^N)=-\nabla M_N \label{Poisson} \, . $$ Here, $H^N_1$ is the Hamiltonian of the associated particle system and is as defined in~\eqref{eq:H}. \end{customthm} \subsection{The limit $N \to \infty$ followed by $\varepsilon \to 0$}\label{Nfirst} We have discussed the mean field limit $N \to \infty$ in Section~\ref{gradientflow}. Now, we are ready to state our first result that characterises the limit $\lim_{\varepsilon\to 0}\lim_{N\to \infty}\rho^{\varepsilon,N}$: \begin{theorem}\label{thm:variabledata} Consider the set of initial data given by $\{\rho_0^\varepsilon\}_{\varepsilon>0}\subset\mathcal{P}(\mathbb R^d)$, and consider the periodic rearrangement at scale $\varepsilon>0$ , i.e. $$ \tilde{\nu}_0^\varepsilon(A)=\varepsilon^d \sum_{k\in \mathbb Z^d} \rho_0^\varepsilon(\varepsilon(A+ k))\qquad\mbox{ for $\varepsilon>0$ }. $$ Assume that there exists $C>0$, $p>1$ and a steady state $\tilde{\nu}^*\in\mathcal{P}(\mathbb T^d)$ such that $\tilde{\nu}^\varepsilon(t)$, the solution to the $\varepsilon=1$ periodic nonlinear evolution \eqref{periodiceps=1} with initial data $\tilde{\nu}_0^\varepsilon(x)$, satisfies \begin{equation}\label{exponential convergence} \sup_{\varepsilon>0}d_2^2(\tilde{\nu}^\varepsilon (t),\tilde{\nu}^*) \le C t^{-p}\, . \tag{A1} \end{equation} Then, \begin{equation}\label{weak convergence} \lim_{\varepsilon\to 0}d_2^2(S_t^\varepsilon\rho^\varepsilon_0,S_t^* \rho^*_0)=0, \end{equation} where $S^\varepsilon_t$ is the solution semigroup associated to \eqref{nonlineareq}, $\rho^*_0\in\mathcal{P}(\mathbb R^d)$ is the weak-$*$ limit of $\rho_0^\varepsilon$, and $S_t^*$ is the solution semigroup of the heat equation \begin{equation}\label{limit eps to 0} \partial_t \rho=\nabla\cdot(A_*^{\mathrm{eff}}\nabla \rho), \end{equation} where the covariance matrix \begin{equation}\label{covariance matrix} A_*^{\mathrm{eff}} = \beta^{-1} \int_{\mathbb T^d} (I+ \nabla \Psi^*(y))\;\dx{\tilde{\nu}}^*(y), \end{equation} with $\Psi^*:\mathbb T^d\to \mathbb R^d$, $\Psi^*_i \in \ensuremath{{H}}^1(\mathbb T^d)$ for $i=1, \dots,d$, is the unique mean zero solution to the associated corrector problem \begin{equation}\label{limiting corrector} \nabla \cdot(\tilde{\nu}^* \nabla \Psi^*)=-\nabla \tilde{\nu}^*. \end{equation} Furthermore, assume that $X(t)^\varepsilon$ is as defined in~\eqref{mfl} and that $\lim_{N \to \infty}\rho_0^{\varepsilon,N}= X_0^\varepsilon=\delta_{\rho_0^\varepsilon}$. Then it holds that: \begin{align} \lim_{\varepsilon \to 0} \lim_{N \to \infty} \rho^{\varepsilon,N}= \lim_{\varepsilon \to 0} X(t)^\varepsilon= S_t^*\# X_0 \, , \end{align} where $X_0=\delta_{\rho_0^*}$. \end{theorem} In particular, we can apply this theorem to obtain the following result. \begin{corollary}\label{cor:beforephasetransition} Assume that the periodic mean field energy \eqref{periodicmeanfieldenergy} admits a unique minimiser (and hence critical point) $\tilde{\nu}^{\min}$ and that it is an exponential attractor for arbitrary initial data of the evolution of \eqref{periodiceps=1}, i.e. $d_2(\tilde{\nu}(t),\tilde{\nu}^{\min}) \leq d_2(\tilde{\nu}_0^\varepsilon,\tilde{\nu}_{\min})e^{-Ct}$ for some fixed constant $C>0$. Then, the conclusions of Theorem~\ref{thm:variabledata} are valid for arbitrary initial data. \end{corollary} \begin{proof} The proof of this follows from the fact that $d_2(\tilde{\nu}(t),\tilde{\nu}^{\min}) \leq d_2(\tilde{\nu}_0^\varepsilon,\tilde{\nu}^{\min})e^{-Ct}$ implies that assumption~\eqref{exponential convergence} holds. \end{proof} \begin{remark}[Non-chaotic initial data] Although Theorem~\ref{thm:variabledata} requires that the initial data be chaotic, we can deal with non-chaotic initial data by tweaking assumption~\eqref{exponential convergence} to read as follows: \begin{align} \sup_{\varepsilon>0} \sup\limits_{\rho \in \mathrm{supp} \; X_0^\varepsilon} d_2(\tilde{\nu}_\rho(t), \tilde{\nu}^*) \leq Ct^{-p} \, , \end{align} for $p>1$ and $C>0$ and $\tilde{\nu}_\rho(t)$ the solution of~\eqref{periodiceps=1} starting with initial data $\tilde{\nu_0}$ which is the periodic rearrangement of $\rho$. \end{remark} \begin{remark} We cannot expect convergence $S_t^\varepsilon \rho_0^\varepsilon$ to $S_t^*\rho_0^*$ in a strong sense. By performing a formal multiscale expansion, we expect that $$ S^\varepsilon_t\rho^\varepsilon_0(x)=S^*_t\rho^*_0(x) \tilde{\nu}^*(x/\varepsilon)+\varepsilon S^*_t(\nabla\rho^*_0)(x)\cdot\Phi(x/\varepsilon) + \mathcal{O}(\varepsilon^2). $$ In particular, whenever $\tilde{\nu}^*$ is not trivial, the leading term $S^*_t\rho^*_0(x) \tilde{\nu}^*(x/\varepsilon)\rightharpoonup S^*_t\rho^*_0 $ converges only weakly to its limit. \end{remark} \begin{remark}\label{rem:nondegenerate} The effective covariance matrix $A^{\mathrm{eff}}_*$ is strictly positive definite and we have the following bound on the ellipticity of the effective covariance matrix $$ \frac{\beta^{-1}}{Z_* Z^-_*}I\le A_*^{\mathrm{eff}}\le \beta^{-1} I, $$ where $$ Z_*=\int_{\mathbb T^d}e^{-\beta (V+W\ast\tilde{\nu}^*(y))}\;\dx{y}\qquad\mbox{and}\qquad Z^-_*=\int_{\mathbb T^d}e^{\beta (V+W\ast\tilde{\nu}^*(y))}\;\dx{y}, $$ see \cite[Theorem 13.12]{pavliotis2008multiscale}. \end{remark} \begin{remark} If we consider rapidly varying initial data, that is to say, if there exists $\rho_{in}\in\mathcal{P}(\mathbb R^d)$ such that $$ \rho_0^\varepsilon(x)=\varepsilon^{-d}\rho_{in}(\varepsilon^{-1}x). $$ Then, the hypothesis of Theorem~\ref{thm:variabledata} reduces to checking the speed of convergence to $\nu^*$ of the solution to \eqref{periodiceps=1} with the periodic rearrangement of $\rho_{in}$ as initial data, and $\rho^*_0=\delta_0$. Here we can easily see how the phase transition matters for the limiting behaviour. If the evolution \eqref{periodiceps=1} admits more that one steady state $\tilde{\nu}^{*}_1$ and $\tilde{\nu}^{*}_2$, then the diffusive limit will be different if we consider $\rho_{in}=\tilde{\nu}^{*}_1$ or $\rho_{in}=\tilde{\nu}^{*}_2$, see Corollary~\ref{cor:example2} for an explicit example. \end{remark} \vspace{0.2cm} \subsection{The limit $\varepsilon \to 0$ followed by $N \to \infty$}\label{epsthenN} Now that we have discussed the diffusive limit in Section~\ref{sec:diffusivelimit}, we characterise the limit $N\to\infty$ of $\rho^{N,*}(t)$: \begin{theorem}\label{thm: N then eps} Assume that the periodic mean field energy $\tilde{E}_{MF}$ \eqref{periodicmeanfieldenergy} admits a unique minimiser $\tilde{\nu}^{\min}$, then we have that $\rho^{N,*}$ the solution of~\eqref{effectiveeq} satisfies, for any fixed $t>0$, $$ \lim_{N\to\infty}\rho^{N,*}(t)=X(t)=S_t^{\min}\#X_0, $$ where $X_0 \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$ is the limit of $\rho^{N,*}(0)$ in the sense of Definition~\eqref{def:1}, and $S_t^{\min}:\mathcal{P}(\mathbb R^d)\to\mathcal{P}(\mathbb R^d)$ is the solution semigroup of the heat equation \begin{equation}\label{limit eps to 0 bis} \partial_t \rho=\nabla\cdot(A_{\min}^{\mathrm{eff}}\nabla \rho), \end{equation} where the covariance matrix \begin{equation}\label{covariance matrix bis} A_{\min}^{\mathrm{eff}} = \beta^{-1}\int_{\mathbb T^d} (I+ \nabla \Psi^{\min}(y))\;\dx{\tilde{\nu}^{\min}}(y) \, , \end{equation} with $\Psi^{\min}:\mathbb T^d\to \mathbb R^d$, $\Psi^{\min}_i \in \ensuremath{{H}}^1\bra{\mathbb T^d}$ for $i=1, \dots, d$, the unique mean zero solution to the associated corrector problem \begin{equation}\label{min corrector} \nabla \cdot(\tilde{\nu}^{\min} \nabla \Psi^{\min})=-\nabla \tilde{\nu}^{\min} \, . \end{equation} It follows then, that for any fixed $t>0$, the solution $\rho^{\varepsilon,N}(t)$ of~\eqref{eq:LinearKolmogorov} satisfies \begin{align} \lim_{N \to \infty} \lim_{\varepsilon \to 0} \rho^{\varepsilon,N}(t)= \lim_{N\to \infty}\rho^{N,*}(t)=S_t^{\min}\#X_0 \, . \end{align} \end{theorem} \begin{remark}\label{rmk:chaoticity} By $\Gamma$-convergence, the assumption that the periodic mean field energy $\tilde{E}_{MF}$ defined in~\eqref{periodicmeanfieldenergy} admits a unique minimiser implies chaoticity of the Gibbs measure, that is to say $M_N\to \delta_{\tilde{\nu}^{\min}}\in \mathcal{P}(\mathcal{P}(\mathbb T^d))$, see Lemma~\ref{lem:gammaperiodic}. We note that the assumption that $\tilde{E}_{MF}$ admits a unique minimiser can be replaced by the weaker chaoticity assumption on $M_N$, i.e. $M_N\to \delta_{\tilde{\nu}^{\min}_0}$ for some specific minimiser $\tilde{\nu}^{\min}_0$. \end{remark} \vspace{0.2cm} \subsection{The effect of phase transitions}\label{S:explicit} As mentioned in Section~\ref{sandq}, we expect the presence of phase transition to affect the commutativity of the limits , especially since the results of Theorems~\ref{thm:variabledata} and~\ref{thm: N then eps} depend on the steady states of~\eqref{periodiceps=1} and the minimisers of the periodic mean field energy $\tilde{E}_{MF}$. Before proceeding any further, we define what we mean by a phase transition: \begin{definition}[Phase transition]\label{pt} The periodic mean field system~\eqref{periodiceps=1} is said to undergo a phase transition at some $0<\beta_c<\infty$, if: \begin{enumerate} \item For all $\beta<\beta_c$, there exists a unique steady state of~\eqref{periodiceps=1}. \item For $\beta>\beta_c$, there exist at least two steady states of~\eqref{periodiceps=1}. \end{enumerate} The temperature $\beta_c$ is referred to as the point of phase transition or the critical temperature. \end{definition} The above definition would not make sense without the following result: \begin{proposition}[Uniqueness at high temperature]\label{uniqueness} For all $0<\beta<\infty$, the periodic mean field system~\eqref{periodiceps=1} has at least one steady state, which is a minimiser of the periodic mean field energy $\tilde{E}_{MF}$. Furthermore, for $\beta$ small enough, there exists a unique steady state $\tilde{\nu}^{\min}$ of~\eqref{periodiceps=1}, which corresponds to the unique minimiser of $\tilde{E}_{MF}$. \end{proposition} The proof of this result follows from standard fixed point and compactness arguments and can be found in~\cite[Theorem 2.3 and Proposition 2.8]{CGPS19} or~\cite[Theorem 3]{messer1982statistical}. \begin{remark} The reader may have noticed that in Definition~\ref{pt} we do not discuss what happens at $\beta=\beta_c$. This is due to the fact that this depends on the nature of the phase transition, i.e. whether it is continuous or discontinuous. A detailed discussion of these phenomena and the conditions under which they arise can be found in~\cite{CP10,CGPS19}. \end{remark} In the absence of a confining potential, i.e. for $V=0$, the existence and properties of phase transitions were studied in detail in~\cite{CP10,CGPS19}. It turns out that a key role in understanding this phenomenon is played by the notion of $H$-stability. We refer to an interaction potential $W$ as $H$-stable, denoted by $W \in \mathbf{H}_s$, if its Fourier coefficients are nonnegative, i.e. \begin{align} \hat{W}(k):= \intt{W(x) e^{i2 \pi k x}}\geq 0 \quad \forall k \in \mathbb Z^d, k \not \equiv 0 \, . \end{align} This notion of $H$-stability is closely related to a similar concept used in the statistical mechanics of lattice spin systems (cf.~\cite{Rue69}). Indeed, it provides us with a sharp criterion for the existence of a phase transition in the absence of the term $V$: \begin{proposition}[Existence of phase transitions,~\cite{CGPS19,CP10}]\label{expt} Assume $V=0$. Then the periodic mean field system~\eqref{periodiceps=1} undergoes a phase transition in the sense of Definition~\ref{pt} if and only if $W \notin \mathbf{H}_s$. \end{proposition} As discussed in the introduction, a prototypical example of a system that exhibits a phase transition is given by the potentials $V=0,\; W=-\cos(2 \pi x)$. The corresponding particle system is referred to the noisy Kuramoto model. The structure of phase transitions for this system is remarkably simple and is discussed in the following proposition: \begin{proposition}\label{XY} Consider the quotiented periodic mean field system~\eqref{periodiceps=1} with $d=1$, $W=-\cos(2 \pi x)$, and $V= 0$. Then for $\beta\leq 2$, $\tilde{\nu}_\infty \equiv 1$ is the unique minimiser and steady state of~\eqref{periodiceps=1}. For $\beta>2$, the steady states of~\eqref{periodiceps=1} are given by $\tilde{\nu}_\infty\equiv 1$ and the family of translates of the measure $\tilde{\nu}^{\min}_\beta$ which is given by the following expression: \begin{align} \tilde{\nu}^{\min}_\beta= Z^{-1}e^{a \cos(2 \pi x)}, \qquad Z= \intto{e^{a \cos (2 \pi x)}} \, , \end{align} with $a=a(\beta)$ the solution of the following nonlinear equation $a= \beta I_1(a)/I_0(a)$, where $I_1(a),\;I_0(a)$ are the modified Bessel functions of the first and zeroth kind respectively. Moreover for $\beta>2$, $\tilde{\nu}^{\min}_\beta$ (and its translates) are the only minimisers of the periodic mean field energy $\tilde{E}_{MF}$. Thus, $\beta_c=2$ is the critical temperature of~\eqref{periodiceps=1}. \end{proposition} A proof of the above result can be found in~\cite[Proposition 6.1]{CGPS19}. A depiction of the bifurcation diagram of the noisy Kuramoto system can be found in Figure~\ref{fig:kurbif}. \begin{figure}[ht] \centering \begin{minipage}[c]{0.45\textwidth} \centering \includegraphics[width=\linewidth]{kurbif.eps} \caption*{(a)} \end{minipage} \begin{minipage}[c]{0.45\textwidth} \centering \includegraphics[width=\linewidth]{1clust.eps} \caption*{(b)} \end{minipage} \caption{(a). The bifurcation diagram for the noisy Kuramoto system: the solid blue line denotes the stable branch of solutions while the dotted red line denotes the unstable branch of solutions (b). An example of a clustered steady state $\tilde{\nu}_\beta^{\min}$ representing phase synchronisation of the oscillators} \label{fig:kurbif} \end{figure} We can now start stating our results concerning the effect of the presence of a phase transition on the combined diffusive-mean field limit. In general, we have that for the large temperature regime the limits commute: \begin{corollary}\label{cor:2} Assume that $\rho_0^{\varepsilon,N}= \bra*{\rho_0^{\varepsilon}}^{\otimes N}$ for some $\rho_0^\varepsilon \in \mathcal{P}(\mathbb R^d)$ and that $$ \lim_{N\to\infty}\lim_{\varepsilon\to 0}\rho^{\varepsilon,N}_0= \lim_{\varepsilon\to 0} \lim_{N\to\infty} \rho^{\varepsilon,N}_0=X_0 = \delta_{\rho_0^*}\in\mathcal{P}(\mathcal{P}(\mathbb R^d)), $$ where $\rho_0^* \in \mathcal{P}(\mathbb R^d)$ is the weak-$*$ limit of $\rho_0^\varepsilon$. Then, there exists an explicit $\beta_0\in(0,\beta_c]$ depending on $\norm{V}_{C^2(\mathbb T^d)}$ and $\norm{W}_{C^2(\mathbb T^d)}$ such that for $\beta<\beta_0$ the limits commute: $$ \lim_{N\to\infty}\lim_{\varepsilon\to 0} \rho^{\varepsilon,N}(t)=\lim_{\varepsilon\to 0} \lim_{N\to\infty} \rho^{\varepsilon,N}(t)= S_t^{\min}\# X_0. $$ \end{corollary} Moreover, for rapidly varying initial data and $V=0$, we can show that the limits commute all the way up to the phase transition. We have the following result: \begin{corollary}\label{cor:1} Assume $V=0$ and $\beta<\beta_c$, the critical temperature. Assume further that \begin{align} \rho_0^{\varepsilon,N}= \varepsilon^{-d}\rho_0(\varepsilon^{-1}x_1) \otimes \dots \otimes \varepsilon^{-d}\rho_0(\varepsilon^{-1}x_N) \in \mathcal{P}_{\mathrm{sym}}\bra*{(\mathbb R^{d})^{\times N}} \end{align} for some fixed $\rho_0 \in \mathcal{P}(\mathbb R^d)$. Then the limits commute, i.e. $$ \lim_{N\to\infty}\lim_{\varepsilon\to 0} \rho^{\varepsilon,N}(t)=\lim_{\varepsilon\to 0} \lim_{N\to\infty} \rho^{\varepsilon,N}(t)= S_t^{\min}\# X_0. $$ where $X_0= \delta_{\delta_0} \in \mathcal{P}(\mathcal{P}(\mathbb R^d))$. If $W$ is $H$-stable, this result holds for all $0<\beta<\infty$ and arbitrary chaotic initial data. \end{corollary} The proof of Corollaries \ref{cor:2} and \ref{cor:1} can be found in Section~\ref{sec:phase}. \begin{remark} The results of the preceding corollaries apply to the noisy Kuramoto model. \end{remark} We are now ready to present our results above the critical temperature. As we are interested in illustrating our results in a clear way, we consider a simple system that undergoes a phase transition and show that the limits do not commute ahead of the phase transition. We do not consider the noisy Kuramoto model because, as demonstrated in Proposition~\ref{XY}, the minimisers of the $\tilde{E}_{MF}$ are not unique ahead of the phase transition; the entire family of translates of $\tilde{\nu}_{\beta}^{\min}$ are minimisers. Thus we cannot apply the results of Theorem~\ref{thm: N then eps} directly. Indeed, applying Lemma~\ref{lem:gammaperiodic}, one can show that the $N$-particle Gibbs measure $M_N$ converges, in the sense of Definitions~\ref{def:1} and~\ref{def:empirical}, to $X \in \mathcal{P}(\mathcal{P}(\mathbb T))$, where $X$ is supported uniformly on the set of translates of $\tilde{\nu}_{\beta}^{\min}$. The alternative is to work in a quotient space as in~\cite{Rey2018,malrieu2003convergence} or to add a small confinement to break the translation invariance of the problem. We choose to do the latter. However, we do expect our results to hold true even in the translation-invariant setting but we do not deal with what we feel is essentially a technical issue in this paper. In particular, we consider in 1 space dimension the dynamics generated by the potentials $V=- \eta \cos(2\pi x)$ and $W=-\cos(2\pi x)$ with $0<\eta<1$. In this case, we have the following characterisation of phase transitions: \begin{lemma}~\label{phase transition} Consider the quotiented periodic mean field system~\eqref{periodiceps=1} with $d=1$, $W=-\cos(2 \pi x)$, and $V= -\eta \cos(2 \pi x)$ for a fixed $\eta \in(0,1)$. Then there exists a value of the parameter $\beta=\beta_c$ such that: \begin{itemize} \item For $\beta<\beta_c$, there exists a unique steady state of the quotiented periodic system \eqref{periodiceps=1} given by \begin{align} \tilde{\nu}^{\min}(x)= Z_{\min}^{-1}e^{a^{\min} \cos(2 \pi x)} \label{min1}\, , \qquad Z_{\min}= \intto{e^{a^{\min} \cos(2 \pi x)}} \, , \end{align} for some $a^{\min}=a^{\min}(\beta), a^{\min}>0$, which is the unique minimiser of the periodic mean field energy $\tilde{E}_{MF}$ \eqref{periodicmeanfieldenergy}. \item For $\beta>\beta_c$, there exist at least 2 steady states of the quotiented periodic system \eqref{periodiceps=1} given by \begin{align} \tilde{\nu}^{\min}(x)&= Z_{\min}^{-1}e^{a^{\min} \cos(2 \pi x)}\, , && \qquad Z_{\min}= \intto{e^{a^{\min} \cos(2 \pi x)}} \, , \\ \tilde{\nu}^{*}(x)&= Z_*^{-1}e^{ a^{*} \cos(2 \pi x)} \, ,&& \qquad Z_*^{-1}= \intto{e^{a^{*} \cos(2 \pi x)}} \label{min2} \, , \end{align} where $a^{*} < 0< a^{\min}$ and both constants depend on $\beta$. Here $\tilde{\nu}^{\min}$ is the unique minimiser and $\tilde{\nu}^*$ is a non-minimising critical points of the periodic mean field energy $\tilde{E}_{MF}$ \eqref{periodicmeanfieldenergy}. Moreover, $a^*\ne - a^{\min}$. \end{itemize} \end{lemma} The proof of Lemma~\ref{phase transition} can be found in Section~\ref{sec:phase}. Now, we are ready to state our results in this specific case, i.e. above the phase transition we can choose specific initial data for which the limits do not commute. \begin{corollary}\label{cor:example2} Assume that $V=-\eta\cos(2\pi x)$, $W=\cos(2\pi x)$ for a fixed $\eta \in (0,1)$, and that we are above the phase transition $\beta>\beta_c$. As in Proposition~\ref{phase transition}, we denote by $\tilde{\nu}^{\min}$ and $\tilde{\nu}^*$ the minimiser and the nonminimising critical point of $\tilde{E}_{MF}$. We choose the following initial data: $$ \rho^{\varepsilon,N}_0(x)= \big(\varepsilon^{-1} \rho_0^*(\varepsilon^{-1}x_1)\big)\otimes ...\otimes \big(\varepsilon^{-1} \rho_0^*(\varepsilon^{-1}x_N)\big)\in \mathcal{P}_{\mathrm{sym}}\big((\mathbb R^d)^N\big)\, , $$ where $\rho_0^* \in \mathcal{P}(\mathbb R)$ satisfies \begin{align} \tilde{\nu}^*(A)=\sum_{k\in\mathbb Z^d} \rho_0^* (A+k) \,, \label{dataquotient} \end{align} for any measurable $A$, i.e. its periodic rearrangement is $\tilde{\nu}^*$. Then, for every $t>0$, $\rho^{\varepsilon,N}(t)$ the solution to \eqref{eq:LinearKolmogorov}, satisfies $$ \lim_{N\to\infty}\lim_{\varepsilon\to 0} \rho^{\varepsilon,N}(t)= \delta_{\rho^{\min}(t)}\in \mathcal{P}(\mathcal{P}(\mathbb R)), $$ where \begin{align} \rho^{\min}(t)= \sqrt{\beta} I_0(a^{\min})\frac{e^{-\frac{\beta I_0(a^{\min})^2 |x|^2}{2t}}}{ \sqrt{2\pi t}}\,. \label{lim1} \end{align} On the other hand, we have that $$ \lim_{\varepsilon\to0}\lim_{N\to\infty} \rho^{\varepsilon,N}= \delta_{\rho^{*}(t)}\in \mathcal{P}(\mathcal{P}(\mathbb R)) $$ where \begin{align} \rho^{*}(t)= \sqrt{\beta} I_0(-a^{*})\frac{e^{-\beta I_0(-a^{*})^2|x|^2}{2t}}{ \sqrt{2\pi t}}\,. \label{lim2} \end{align} Finally, by Lemma~\ref{phase transition} $a^*\ne -a^{\min}$, and therefore by the strict monotonicity of the modified zeroth Bessel function $I_0$ we obtain that $$ \rho^{\min}(t)\ne \rho^*(t)\qquad\mbox{for any $t>0$.} $$ \end{corollary} \begin{proof} We first note that \begin{align} \lim_{N \to \infty} \lim_{\varepsilon \to 0} \rho^{\varepsilon,N}_0 = \lim_{\varepsilon \to 0} \lim_{N \to \infty} \rho^{\varepsilon,N}_0 = \delta_{\delta_0}=: X_0 \in \mathcal{P}(\mathcal{P}(\mathbb R)) \, . \end{align} For the limit $\varepsilon \to 0$ followed by $N \to \infty$, we use that by Proposition~\ref{phase transition} $\tilde{\nu}^{\min}$ is the unique minimiser of $\tilde{E}_{MF}$, hence we can apply Theorem~\ref{thm: N then eps} to obtain that $$ \lim_{N\to\infty}\lim_{\varepsilon\to 0} \rho^{\varepsilon,N}(t)= \delta_{\rho^{\min}(t)} $$ with $\rho^{\min}$ satisfying $$ \begin{cases} \partial_t \rho^{\min}=\partial_x(A^{\mathrm{eff}}_{\min}\partial_x \rho^{\min})\\ \rho^{\min}(0)=\delta_0, \end{cases} $$ where $$ A^{\mathrm{eff}}_{\min}=\frac{\beta^{-1}}{Z\hat{Z}}=\frac{\beta^{-1}}{\int_{\mathbb T}e^{a^{\min}\cos(2\pi y)}\;dy\int_{\mathbb T}e^{-a^{\min}\cos(2\pi y)}\;dy}=\frac{\beta^{-1}}{I_0(a^{\min})^2}. $$ To obtain this formula, we have used that in 1-D we can solve the corrector problem~\eqref{min corrector} explicitly, see for instance \cite[Equation (13.6.13)]{pavliotis2008multiscale}. The explicit expression for $\rho^{\min}(t)$ now follows. Now we turn to the other limit. As discussed in Section~\ref{gradientflow}, passing to the limit $N \to \infty$, we obtain that for a fixed $t>0$ \begin{align} \lim_{N \to \infty} \rho^{\varepsilon,N}(t)= X^\varepsilon(t)= S_t^\varepsilon \# X_0^\varepsilon \, , \end{align} with $S_t^\varepsilon$ the solution semigroup of~\eqref{nonlineareq} and $X_0^\varepsilon= \delta_{\varepsilon^{-1}\rho_0^*(\varepsilon^{-1}x)}$. Using~\eqref{dataquotient}, we have that the initial data for the $\varepsilon=1$ periodic mean field equation~\eqref{periodiceps=1} is given by \begin{align} \tilde{\nu}^\varepsilon_0= \sum_{k\in\mathbb Z^d} \rho_0^* (x+k)= \tilde{\nu}^* \, . \end{align} We know from Proposition~\ref{phase transition} that $\tilde{\nu}^*$ is steady state of~\eqref{periodiceps=1}, thus the hypothesis \eqref{exponential convergence} is trivially satisfied. Therefore, we can pass to the limit as $\varepsilon \to 0$ using Theorem~\ref{thm:variabledata} and obtain for a fixed $t>0$ \begin{align} \lim_{\varepsilon \to 0} X^\varepsilon(t) = \delta_{\rho^*(t)} \, , \end{align} with $\rho^{*}$ satisfying $$ \begin{cases} \partial_t \rho^{*}=\partial_x(A^{\mathrm{eff}}_{*}\partial_x \rho^{*})\\ \rho^{*}(0)=\delta_0, \end{cases} $$ where $$ A^{\mathrm{eff}}_{*}=\frac{\beta^{-1}}{Z\hat{Z}}=\frac{\beta^{-1}}{\int_{\mathbb T}e^{a^{*}\cos(2\pi y)}\;dy\int_{\mathbb T}e^{-a^{*}\cos(2\pi y)}\;dy}=\frac{\beta^{-1}}{I_0(-a^{*})^2}, $$ thus proving~\eqref{lim2} and completing the proof of the result. \end{proof} \begin{figure}[ht] \centering \includegraphics[scale=0.5]{adiff.eps} \caption{The two solutions of Equation~\eqref{simplified}, i.e. $a^{\min}$ (the solid line) and $a^*$ (the dotted line) for $\eta=0.5$. The figure demonstrates how stark the difference between the two solutions and hence between the two effective solutions, $\rho^{\min}$ and $\rho^*$ of Corollary~\ref{cor:example2}, is.} \label{fig:adiff} \end{figure} \begin{remark} The result of Corollary~\ref{cor:example2} can be generalized to other rapidly varying initial data that is exponentially attracted to $\tilde{\nu}^{*}$. \end{remark} \begin{remark} A simple choice of initial data which satisfies~\eqref{dataquotient} is $\rho_0^*= \chi_{[0,1]}\tilde{\nu}^*$, with $\chi_A$ the indicator function of the set $A$. \end{remark} \vspace{0.2cm} \subsection{Application of the fluctuation theorem}\label{ftheorem} In this subsection will assume without proof that we have a characterisation of the fluctuations around the mean field limit, in the spirit of~\cite{dawson1983critical,fernandez1997hilbertian}, as the solution to a linear SPDE and use this together the energy minimisation property of the Gibbs measure to obtain a rate of convergence in relative entropy of the Gibbs measure to the minimiser of the periodic mean field energy \eqref{periodiceps=1}. We also characterise the asymptotic behaviour of the partition function. At the end of the subsection we present a provisional result in which we show that this rate of convergence does hold at high temperatures without using the central limit theorem (the characterisation of fluctuations) but instead conditional on a certain rate of convergence in a weaker topology (cf.~\eqref{propchaos}). We start by restating the classical result by Messer--Spohn~\cite{messer1982statistical} (cf. Lemma~\ref{lem:gammaperiodic}). We consider the unique minimiser of $\tilde{E}^N:\mathcal{P}_{\mathrm{sym}}((\mathbb T^d)^N)\to (-\infty,+\infty]$ $$ \tilde{E}^N[\tilde{\nu}^N]=\frac{1}{N}\left(\beta^{-1}\int_{(\mathbb T^d)^N}\tilde{\nu}^N(x)\log\tilde{\nu}^N(x)\;\dx{x}+\int_{(\mathbb T^d)^N}\frac{1}{2N}\sum_{i=1}^N\sum_{\substack{j=1\\j\ne i}}^N W(x_i-x_j)+\sum_{i=1}^N V(x_i)\;\dx{\tilde{\nu}^N}(x) \right) $$ which is given by the Gibbs measure $$ M_N(x)=\frac{e^{-\beta\left(\frac{1}{2N}\sum_{i=1}^N\sum_{j\ne i}^N W(x_i-x_j)+\sum_{i=1}^N V(x_i)\right)}}{Z_N}, $$ with the partition function $$ Z_N=\int_{(\mathbb{T}^d)^N}e^{-\beta\left(\frac{1}{2N}\sum_{i=1}^N\sum_{j\ne i}^N W(y_i-y_j)+\sum_{i=1}^N V(y_i)\right)}\;\dx{y}. $$ Then any accumulation point $X^\infty\in \mathcal{P}(\mathcal{P}(\mathbb T^d))$ of the sequence of minimisers $M_N$ is a minimiser of \begin{equation} \tilde{E}^\infty[X]=\int_{\mathcal{P}(\mathcal{P}(\mathbb T^d))}\tilde{E}_{MF}[\tilde{\nu}]\;\dx{X}(\tilde{\nu}) \end{equation} with $\tilde{E}_{MF}:\mathcal{P}(\mathbb T^d)\to (-\infty,+\infty]$ given by \begin{equation}\label{eq:MFenergy} \tilde{E}_{MF}[\tilde{\nu}]=\beta^{-1} \int_{\mathbb T^d} \tilde{\nu}\log(\tilde{\nu})\;\dx{x}+\frac{1}{2}\int_{\mathbb T^d}\int_{\mathbb T^d}W(x-y)\tilde{\nu} (x)\tilde{\nu}(y)\;\dx{x}\dx{y}+\int_{\mathbb T^d} V(x)\tilde{\nu}(x)\;\dx{x}, \end{equation} which implies that $$ \textrm{supp}\;X^\infty \subset \{\tilde{\nu}\in \mathcal{P}(\mathbb T^d)\;:\; \tilde{E}_{MF}[\tilde{\nu}]=\inf \tilde{E}_{MF} \} $$ In particular, if we are below the phase transition $\beta<\beta_c$, we have, by Definition~\ref{pt} and Proposition~\ref{tfae}, that $\tilde{E}_{MF}$ admits a unique minimiser, which we denote by $\tilde{\nu}^{\min}\in\mathcal{P}(\mathbb T^d)$ and thus $X^\infty=\delta_{\tilde{\nu}^{\min}}\in\mathcal{P}(\mathcal{P}(\mathbb T^d))$. In the subsequent calculations, we will use $(M_N)_n$ to refer to the $n$\textsuperscript{th} marginal of the $N$-particle Gibbs measure $M_N$. A natural next step is to consider the next order of convergence: \begin{align} \displaystyle N(\tilde{E}^N(M_N)-\displaystyle\tilde{E}_{MF}(\tilde{\nu}^{\min})) &= \beta^{-1}\int_{\mathbb T^{Nd}} M_N\log M_N \;\dx{x}-\beta^{-1}\int_{\mathbb T^d} (\tilde{\nu}^{\min})^{\otimes N}\log (\tilde{\nu}^{\min})^{\otimes N} \;\dx{x}\\ \displaystyle\qquad&+\frac{N-1}{2}\int_{\mathbb T^{2d}}W(x-y)(M_N)_2\;\dx{x}\dx{y}+N\int_{\mathbb T^d}V(x)(M_N)_1\;\dx{x}\\ \displaystyle\qquad& -\frac{N}{2}\int_{\mathbb T^{2d}}W(x-y)\tilde{\nu}^{\min}(x)\tilde{\nu}^{\min}(y)\;\dx{x}\dx{y}-N\int_{\mathbb T^d}V(x)\tilde{\nu}^{\min}\;\dx{x}. \label{eq:Nenergy} \end{align} The idea is to massage the previous expression to obtain something we can control with the fluctuations. To do this we first need to use the empirical measure $\hat{M}_N\in\mathcal{P}(\mathcal{P}(\mathbb T^d))$ associated to $M_N\in\mathcal{P}_{\mathrm{sym}}((\mathbb T^d)^N)$, as defined in Definition~\ref{def:empirical}. We can compare the second marginal $(M_N)_2$ of $M_N$ with the products of the empirical measure. We notice that for any test function $\varphi\in C^\infty (\mathbb T^{2d})$, we have \begin{equation}\label{eq:empirical} \left(1-\frac{1}{N}\right)\int_{\mathbb T^{2d}}\varphi(x,y)(M_N)_2\;\dx{x}\dx{y}+\frac{1}{N}\int_{\mathbb T^d}\varphi(x,x)(M_N)_1\;\dx{x}= \mathbb{E} \left\langle \varphi, \left(\frac{1}{N}\sum_{i=1}^N\delta_{x_i}\right)^{\otimes 2}\right\rangle, \end{equation} where the expectation is taken with respect to the law $\hat{M}_N$ (for more details on these type identities for higher order marginals see \cite{diaconis1980finite}). We know from Proposition~\ref{tfae} that the minimiser of the mean field energy must satisfy the following condition \begin{equation}\label{eq:firstorder} \beta^{-1}\log \tilde{\nu}^{\min}=-W\ast\tilde{\nu}^{\min}-V+C. \end{equation} Putting \eqref{eq:Nenergy}, \eqref{eq:empirical}, and \eqref{eq:firstorder} together, adding and subtracting $$ \beta^{-1}\int_{\mathbb T^d}M_N \log \tilde{\nu}^{\min}\;\dx{x} \, , $$ and completing the square, we obtain \begin{equation}\label{eq:boundfrombelow} N(\tilde{E}^N(M_N)-\tilde{E}_{MF}(\tilde{\nu}^{\min}))=\displaystyle \beta^{-1}\mathcal{H}(M_N|(\tilde{\nu}^{\min})^{\otimes N}) -\frac{1}{2}\mathbb{E}\left\langle W(x-y), (\mathcal{G}^N)^{\otimes 2}\right\rangle -\frac{W(0)}{2} \end{equation} where $\mathcal{H}(\cdot|\cdot)$ denotes the relative entropy or Kullback--Leibler divergence and $$ \mathcal{G}^N:= \sqrt{N}\left(\frac{1}{N} \sum_{i=1}^N\delta_{x_i}-\tilde{\nu}^{\min}\right) $$ is a Radon measure-valued random variable defined on the probability space $((\mathbb T^d)^N,M_N)$. We refer to $\mathcal{G}^N$ as the fluctuations around the mean field limit. Using the fact that \begin{equation}\label{eq:minimizing} \begin{array}{rl} \displaystyle N\tilde{E}_{MF}(\tilde{\nu}^{\min})&\displaystyle=N\tilde{E}^N((\tilde{\nu}^{\min})^{\otimes N} )-\frac{1}{2}\int_{\mathbb T^{2d}}W(x-y)\tilde{\nu}^{\min}(x)\tilde{\nu}^{\min}(y)\;\dx{x}\dx{y}\\ &\displaystyle\ge N \tilde{E}^N(M_N ) -\frac{1}{2}\int_{\mathbb T^{2d}}W(x-y)\tilde{\nu}^{\min}(x)\tilde{\nu}^{\min}(y)\;\dx{x}\dx{y} \end{array} \end{equation} we obtain the bound \begin{equation}\label{eq:boundfromabove} 0\le \mathcal{H}(M_N|(\tilde{\nu}^{\min})^{\otimes N})\le \frac{W(0)}{2}+ \frac{1}{2}\mathbb{E}\left\langle W(x-y), (\mathcal{G}^N)^{\otimes 2}\right\rangle+\frac{1}{2}\int_{\mathbb T^{2d}}W(x-y)\tilde{\nu}^{\min}(x)\tilde{\nu}^{\min}(y)\;\dx{x}\dx{y}. \end{equation} In a similar way, we can also obtain the bound \begin{equation}\label{eq:partitionfunction} \begin{array}{rl} \displaystyle-\frac{1}{2}\int_{\mathbb T^{2d}}W(x-y)\tilde{\nu}^{\min}(x)\tilde{\nu}^{\min}(y)\;\dx{x}\dx{y}&\displaystyle\ge N\log\left(\frac{Z_N}{Z_{\infty}}\right)=N\left(\tilde{E}^N[M_N]- \tilde{E}_{MF}[\tilde{\nu}^{\min}]\right)\\ &\displaystyle\ge-\frac{W(0)}{2} -\frac{1}{2}\mathbb{E}\left\langle W(x-y), (\mathcal{G}^N)^{\otimes 2}\right\rangle, \end{array} \end{equation} where we have used the positivity of the relative entropy. Therefore, to obtain useful information from \eqref{eq:boundfromabove} and \eqref{eq:partitionfunction}, we need to show that \begin{equation} \limsup_{N\to\infty}\mathbb{E}\left\langle W(x-y), (\mathcal{G}^N)^{\otimes 2}\right\rangle<\infty. \end{equation} To simplify the discussion and obtain sharp bounds all the way up to the phase transition, we consider the specific example of $d=1$, $V=0$ and $W=-\cos(2\pi x)$, which undergoes a phase transition at $\beta_c=2$ (cf. Proposition~\ref{XY}). We now make our main assumption that we have an equilibrium version of the central limit theorem before the phase transition., i.e. $\mathcal{G}^N$ converges in law to $\mathcal{G}^\infty$ whose law is the unique invariant measure of the following linear stochastic PDE \begin{equation}\label{eq:SPDE} \dot{\mathcal{G}}^\infty=\beta^{-1}\partial_{xx} \mathcal{G}^\infty+(2\pi)^2 \cos(2\pi x)*\mathcal{G}^\infty+\sqrt{2\beta^{-1}}\xi, \end{equation} where we have used that $\tilde{\nu}^{\min}=d\mathcal{L}$ and that $W=-\cos(2\pi x)$ has zero average to simplify the linearisation of the nonlinear PDE \eqref{nonlineareq} and $\xi$ is the space and time derivative of the cylindrical Wiener process. More specifically, if we consider $\{e_k\}_{k\in\mathbb Z}$ the standard orthonormal Fourier basis of $L^2(\mathbb T)$ given by $$ e_k(x)=\begin{cases} \sqrt{2}\sin(2\pi k x)&k>0\\ 1&k=0\\ \sqrt{2}\cos(2\pi k x)& k<0, \end{cases} $$ then we can express $$ \xi(x,t)=\sum_{k\in \mathbb Z} 2 \pi k e_k(x) \dot{B}_k(t) $$ where $\{\dot{B}_k\}_{k\in \mathbb Z}$ is a countable family of independent $\mathbb T$-valued Wiener processes. In particular, we can decompose \eqref{eq:SPDE} by projecting it onto each mode to obtain a family of uncoupled SDEs given by $$ \langle \dot{\mathcal{G}}^\infty,e_k\rangle=\begin{cases} -\beta^{-1}(2\pi)^2\langle\mathcal{G}^\infty,e_k\rangle+\frac{1}{2}(2\pi)^2 \langle\mathcal{G}^\infty,e_{k}\rangle+\sqrt{2\beta^{-1}}2\pi k \dot{B}_{k}&|k|=1\\ -\beta^{-1}(2\pi k)^2\langle\mathcal{G}^\infty,e_k\rangle+\sqrt{2\beta^{-1}}2\pi k\dot{B}_{k}&|k|\ne 1, \end{cases} $$ where we have used the trigonometric identity \begin{equation}\label{eq:trigidentity} \cos(2\pi x)*\mathcal{G}^\infty= \frac{1}{2}\left(e_1 \langle \mathcal{G}^\infty,e_1\rangle +e_{-1} \langle \mathcal{G}^\infty,e_{-1}\rangle\right). \end{equation} In particular, we can find the invariant measure explicitly for each mode \begin{equation}\label{eq:law} \mathrm{Law}(\langle\mathcal{G}^\infty,e_k\rangle)=\begin{cases} \mathcal{N}\left(0,\frac{2}{2-\beta}\right)&|k|=1\\ \mathcal{N}(0,1)&|k|\ne 1, \end{cases} \end{equation} where $\mathcal{N}$ is the normal distribution. From \eqref{eq:law} we can clearly identify the phase transition $\beta_c=2$ when the SPDE \eqref{eq:SPDE} does no longer support an invariant measure. Taking limits in \eqref{eq:boundfromabove} and using that $W(0)=-1$ we obtain that for this specific system we have the bound $$ \limsup_{N\to\infty}\mathcal{H}(M_N|(\tilde{\nu}^{\min})^{\otimes N})\le -\frac{W(0)}{2}+\mathbb{E}\frac{|\langle e_1, \mathcal{G}^\infty\rangle|^2+|\langle e_{-1}, \mathcal{G}^\infty\rangle|^2}{4}=\frac{\beta}{2(2-\beta)} , $$ where we have used the trigonometric identity \eqref{eq:trigidentity} and the law \eqref{eq:law} of the projections of $\mathcal{G}^\infty$. Decomposing the $M_N$ into its marginals, we can use the subadditivity of the relative entropy to conclude that $$ \mathcal{H}((M_N)_n,(\tilde{\nu}^{\min})^n)\le\left\lfloor \frac{n}{N}\right\rfloor \frac{\beta}{2(2-\beta)}, $$ where $\left\lfloor n/N\right\rfloor $ is the largest integer less than $n/N$. We note that this estimate holds all the way up to the phase transition for this system $\beta_c=2$. Similarly, using \eqref{eq:partitionfunction} we obtain that for every $\delta>0$, we have the estimate $$ 1\ge \frac{Z_N}{Z_{\min}}\ge e^{-\frac{1}{N}\left(\frac{\beta}{2(2-\beta)}+\delta\right)}\stackrel{N\to\infty}{\to} 1 $$ for $N$ large enough. To conclude this subsection, we rewrite these bounds into a general provisional theorem (cf. Remark~\ref{provisional}). \begin{theorem} Consider $\tilde{\nu}^{\min}$, the unique minimiser of the periodic mean field energy $\tilde{E}_{MF}$~\eqref{eq:MFenergy} and $Z_{\min}$, its associated partition function. Assume that there exists a constant $C_1>0$, such that $\norm{W}_{C^2(\mathbb T^d)}\le C_1$ and that for $N$ large enough we have the estimate \begin{equation}\label{propchaos} \mathfrak{D}_2^2(\hat{M}_N,\delta_{\nu^{\min}})\le \frac{C_1}{N} \,. \end{equation} Then, there exists $C>0$ such that the following estimates hold $$ \mathcal{H}\left((M_N)_n,(\tilde{\nu}^{\min})^{\otimes n}\right)\le C \left\lfloor \frac{n}{N}\right\rfloor $$ and $$ \frac{Z_N}{Z_{\min}}\ge e^{-\frac{C}{N}}. $$ \end{theorem} \begin{remark}\label{provisional} The bound \eqref{propchaos} has been shown in the case of convex potentials in \cite{malrieu2003convergence}. In the large temperature regime $\beta\gg 1$, the slightly weaker bound $$ \mathfrak{D}_1^2(\hat{M}_N,\delta_{\nu^{\min}})\le \frac{C_1}{N}, $$ with $\mathfrak{D}_1$ the 1-Wasserstein distance, can be found in \cite{durmus2018elementary} by employing the coupling technique outlined in Appendix~\ref{ap:coupling}; trying to upgrade this bound to \eqref{propchaos} is an interesting open question. Note that if the formal central limit theorem discussed at the start of the subsection (in the spirit of~\cite{fernandez1997hilbertian}) could be proved rigorously then~\eqref{propchaos} would hold. For the case $\beta=\beta_c$, we can not expect \eqref{propchaos} to hold (cf. \cite{dawson1983critical}). \end{remark} \begin{proof} By \eqref{eq:boundfromabove} and \eqref{partitionfunction}, we need to show that there exists a $C$ depending on $\beta$, $V$, and $W$ such that $$ \limsup_{N\to\infty} \mathbb{E}\langle W(x-y),(\mathcal{G}^N)^{\otimes 2}\rangle\le C. $$ By using the dual formulation of the Wasserstein distance and using the definition of $\mathcal{G}^N$, we obtain the following estimate: \begin{align} |\mathbb{E}\langle W(x-y),(\mathcal{G}^N)^{\otimes 2}\rangle| & \leq N\|D^2W\|_{\ensuremath{{L}}^\infty(\mathbb T^d)}\mathbb{E} \left(d^2_2\left(\frac{1}{N}\sum_{i=1}^N\delta_{x_i},\tilde{\nu}^{\min}\right)\right)\\&=N\|D^2W\|_{\ensuremath{{L}}^\infty(\mathbb T^d)}\mathfrak{D}_2^2(\hat{M}_N,\delta_{\tilde{\nu}^{\min}}), \end{align} where the expectation is taken with respect to the empirical measure $\hat{M}_N$ and $\mathfrak{D}_2$ is the 2-Wasserstein distance on the metric space $(\mathcal{P}(\mathbb T^d),d_2)$. The result now follows by applying hypothesis \eqref{propchaos}. \end{proof} \section{Proof of Theorem~\ref{thm:variabledata}}\label{sec:1thm} We start the proof of Theorem~\ref{thm:variabledata} with some basic elliptic estimates on a time-dependent corrector problem. \begin{lemma}\label{lem:exreg} Consider the following elliptic equations \begin{align} \nabla \cdot \bra*{\tilde{\mu}^\varepsilon \nabla \chi}= - \nabla \tilde{\mu}^\varepsilon \qquad \mbox{on $\mathbb T^d\times[0,\infty)$}, \label{eq:tdcorrector} \end{align} where \begin{align} \tilde{\mu}^\varepsilon(x,t)=Z^{-1} \exp\bra*{-\beta( W \ast \tilde{\nu}^\varepsilon +V)}\, , \qquad Z=\intt{\exp\bra*{-\beta( W \ast \tilde{\nu}^\varepsilon +V)}} \, , \end{align} where $\tilde{\nu}^\varepsilon(x,t)$ is a solution to the evolution \eqref{periodiceps=1} with initial data $\tilde{\nu}_0^\varepsilon$. Then, there exists a unique (up to an additive constant) smooth solution $\chi:\mathbb T^d \times[0,\infty) \to \mathbb R^d$, $\chi_i \in \ensuremath{{H}}^1(\mathbb T^d)$ to~\eqref{eq:tdcorrector}. Additionally, it satisfies the following estimates \begin{align} \norm{\chi_i}_{\ensuremath{{H}}^m (\mathbb T^d)} &\leq C_1 \label{eq:Hmbound} \\ \norm{\partial_t \chi_i(t)}_{\ensuremath{{H}}^m(\mathbb T^d)} &\leq \sum_{k=1}^m c_k \|\partial_t\tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}^k(t) \label{eq:Hmboundt} \end{align} for all $i = 1, \dots, d$ and $t>0$, where $C^{-3}(\mathbb T^d)$ is the dual of $C^3(\mathbb T^d)$, and the constants $C_1\;,c_k>0$ depend only on $m$, $d$, $\norm{V}_{C^m(\mathbb T^d)}$, and $\norm{W}_{C^m(\mathbb T^d)}$. \end{lemma} \begin{proof} \item \paragraph{\bf Existence and uniqueness} We consider the equation component-wise for any $i= 1 \dots ,d$: \begin{align} \nabla \cdot \bra*{\tilde{\mu}^\varepsilon \nabla \chi_i}= - \partial_{x_i} \tilde{\mu}^\varepsilon \, . \label{eq:tdcorrectori} \end{align} Note that $\tilde{\mu}^\varepsilon$ is smooth and is bounded above and below uniformly in time: \begin{align} e^{-2 \beta \bra*{\norm{W}_{\ensuremath{{L}}^\infty(\mathbb T^d)}+ \norm{V}_{\ensuremath{{L}}^\infty(\mathbb T^d)} }} \leq \mu^{\varepsilon}(x,t) \leq e^{2 \beta \bra*{\norm{W}_{\ensuremath{{L}}^\infty(\mathbb T^d)}+ \norm{V}_{\ensuremath{{L}}^\infty(\mathbb T^d)} }} \, . \label{eq:mubounds} \end{align} Thus, by standard elliptic theory, for each $t \geq 0$ and $i = 1, \dots, d$, there exists a unique smooth solution $\chi_i \in \ensuremath{{H}}^1_0(\mathbb T^d)$ to~\eqref{eq:tdcorrectori}. We can check that $\chi_i$ is continuously differentiable in time, as $\xi_i=\partial_t \chi_i$ satisfies \begin{align} \nabla \cdot \bra*{\tilde{\mu}^\varepsilon \nabla \xi_i} = - \partial_{x_i} \partial_t \tilde{\mu}^\varepsilon -\nabla \cdot \bra*{\partial_t\tilde{\mu}^\varepsilon \nabla \chi_i} \, . \label{eq:tdcorrectorit} \end{align} Similar arguments imply that there exists a unique smooth solution of the above equation $\xi_i \in \ensuremath{{H}}^1_0(\mathbb T^d)$. \item \paragraph{\bf Regularity} We note that is it is sufficient to prove the bounds~\eqref{eq:Hmbound} and~\eqref{eq:Hmboundt} in the weighted space $\ensuremath{{H}}^m(\tilde{\mu}^\varepsilon)$ since by~\eqref{eq:mubounds} these norms are equivalent to the flat space up to a time-independent multiplicative constant. We deal first with the regularity of~\eqref{eq:tdcorrectori}. Testing against $\chi_i$ we obtain, \begin{align} \intt{\abs{\nabla\chi_i}^2 \tilde{\mu}^\varepsilon}&= -\intt{\partial_{x_i} \chi_i \tilde{\mu}^\varepsilon} \\ & \leq \norm{\partial_{x_i} \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \leq \norm{\nabla \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \, . \end{align} It follows then that \begin{align} \norm{\chi_i}_{\ensuremath{{H}}^1_0(\tilde{\mu}^\varepsilon)} \leq 1 \,. \label{eq:H1bound} \end{align} Now let $\alpha \in \mathbb N^d$ be any multi-index of order $m-1$ for some $m \geq 1$. Testing~\eqref{eq:tdcorrectori} against $\partial_{2 \alpha} \chi_i$, we obtain for the left hand side \begin{align} \intt{(\partial_{2 \alpha} \chi_{i}) \nabla \cdot \bra*{ {\tilde{\mu}^\varepsilon \nabla \chi_{i}}}}&= (-1)^{m}\intt{\bra*{\nabla \partial_{\alpha} \chi_{i}} \cdot \partial_{\alpha} (\tilde{\mu}^\varepsilon \nabla \chi_{i})} \\ &= (-1)^{m}\intt{\bra*{\nabla \partial_{\alpha} \chi_{i}} \cdot \sum_{\gamma\le \alpha}C_{\alpha, \gamma} \bra*{\partial_\gamma \tilde{\mu}^\varepsilon} \bra*{\partial_{\alpha-\gamma} \nabla \chi_i}} \\ &= (-1)^{m}\intt{\abs*{\nabla \partial_\alpha \chi_i}^2 \tilde{\mu}^\varepsilon} \\&+(-1)^{m}\intt{\bra*{\nabla \partial_{\alpha} \chi_{i}} \cdot \sum_{\substack{\gamma\le \alpha\\ \gamma\ne 0}} C_{\alpha,k}\bra*{\partial_\gamma \tilde{\mu}^\varepsilon} \bra*{\partial_{\alpha-\gamma} \nabla \chi_i}}, \end{align} where the coefficients are given by $$ C_{\alpha,\gamma}=\prod_{l=1}^d{\alpha_l \choose \gamma_l}. $$ Similarly for the right hand side of \eqref{eq:tdcorrectori} we obtain \begin{align} -\intt{\bra*{\partial_{2 \alpha}\chi_i} \bra*{ \partial_{x_i} \tilde{\mu}^\varepsilon}} = (-1)^{m-1} \intt{(\partial_{x_i} \partial_{\alpha} \chi_i ) \partial_\alpha \tilde{\mu}^\varepsilon} \, . \end{align} Putting the previous two equations together and multiplying by $(-1)^{-m}$ we have \begin{align} \intt{\abs*{\nabla \partial_\alpha \chi_i}^2 \tilde{\mu}^\varepsilon} = - \intt{(\partial_{x_i} \partial_{\alpha} \chi_i) \partial_\alpha \tilde{\mu}^\varepsilon} -\intt{\bra*{\nabla \partial_{\alpha} \chi_{i}} \cdot \sum_{\substack{\gamma\le \alpha\\ \gamma\ne 0}} C_{\alpha,\gamma}\bra*{\partial_\gamma \tilde{\mu}^\varepsilon} \bra*{\partial_{\alpha-\gamma} \nabla \chi_i}} \, . \label{eq:Hmestimate} \end{align} Using the exponential form of $\mu^\varepsilon$, we note that for any multi-index $\alpha \in \mathbb N^d$ we have $\partial_\alpha \tilde{\mu}^\varepsilon= f^\alpha \tilde{\mu}^\varepsilon$, where $f^\alpha$ is a smooth function which is a linear combination of $\partial_\gamma W \ast \tilde{\nu}^\varepsilon +\partial_\gamma V$ for $\gamma \leq \alpha$. This implies that we can obtain the bound \begin{align} \norm{f^\alpha}_{\ensuremath{{L}}^\infty(\mathbb T^d)} \leq C_\alpha \end{align} where $C_\alpha$ depends only on $\norm{W}_{C^{m-1}(\mathbb T^d)} , \;\norm{V}_{C^{m-1}(\mathbb T^d)}$ . Applying H\"older's inequality and bounding in \eqref{eq:Hmestimate} we obtain \begin{align} \intt{\abs*{\nabla \partial_\alpha \chi_i}^2 \tilde{\mu}^\varepsilon} &\leq \norm{\partial_{x_i} \partial_{\alpha} \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \norm{f^\alpha}_{\ensuremath{{L}}^\infty(\mathbb T^d)} \\&+ \norm{\nabla \partial_{\alpha} \chi_{i}}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)}\sum_{\substack{\gamma\le \alpha\\ \gamma\ne 0}} C_{\alpha,\gamma} \norm{f^\gamma}_{\ensuremath{{L}}^\infty(\mathbb T^d)} \norm{\partial_{\alpha-\gamma} \nabla \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \end{align} Simplifying, we obtain, \begin{align} \norm{\nabla \partial_\alpha \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} &\leq \norm{f^\alpha}_{\ensuremath{{L}}^\infty(\mathbb T^d)} + \sum_{\substack{\gamma\le \alpha\\ \gamma\ne 0}} C_{\alpha,\gamma} \norm{f^\gamma}_{\ensuremath{{L}}^\infty(\mathbb T^d)} \norm{\partial_{\alpha-\gamma} \nabla \chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \\ & \leq C_\alpha + \sum_{\substack{\gamma\le \alpha\\ \gamma\ne 0}} C_{\alpha,\gamma} C_\gamma \norm{ \chi_i}_{\ensuremath{{H}}^{m-1}(\tilde{\mu}^\varepsilon)}. \end{align} We can sum over all such $\alpha$ and recursively apply this bound along with~\eqref{eq:H1bound} to obtain~\eqref{eq:Hmbound}. Note that the $\norm{\chi_i}_{\ensuremath{{L}}^2(\mathbb T^d)}$ norm can be controlled by the Poincar\'e inequality since $\chi_i$ is mean zero. Before we turn to the regularity of~\eqref{eq:tdcorrectorit}, we derive the following estimates \begin{align}\label{eq:aux111} |\partial_t \tilde{\mu}^\varepsilon| &= \beta (W\ast \partial_t\tilde{\nu}^\varepsilon) \tilde{\mu}^\varepsilon \leq \beta \norm{W}_{C^3(\mathbb T^d)}\|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)} \tilde{\mu}^\varepsilon \,, \end{align} where we denote by $C^{-3}(\mathbb T^d)$ the dual of $C^3(\mathbb T^d)$ and equip it with the norm $\norm{g}_{C^{-3}(\mathbb T^d)}=\sup\limits_{\norm{f}_{C^3(\mathbb T^d)}\leq 1 }\skp{f,g}$. Similarly, for $\alpha \in \mathbb N^d$ the following estimate holds \begin{align} |\partial_{\alpha} \partial_t \tilde{\mu}^\varepsilon| \leq \beta \norm{W}_{C^{3+|\alpha|}}\|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)} \tilde{\mu}^\varepsilon \end{align} Next, we test~\eqref{eq:tdcorrectorit} against $\xi_i$ to obtain \begin{align} \intt{\abs{\nabla \xi_i}^2 \dx{\tilde{\mu}^\varepsilon}} &= -\intt{\partial_{x_i} \xi_i \partial_t \tilde{\mu}^\varepsilon} -\intt{\nabla \xi_i \cdot \nabla \chi_i \partial_t \tilde{\mu}^\varepsilon} \\ & \leq \beta\norm{W}_{C^3(\mathbb T^d)} \norm{\nabla\xi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)}\|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}(t) \\&+ \beta\norm{W}_{C^3(\mathbb T^d)} \norm{\nabla\xi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \norm{\nabla\chi_i}_{\ensuremath{{L}}^2(\tilde{\mu}^\varepsilon)} \|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}(t) \, , \end{align} where we have simply used~\eqref{eq:aux111} and applied the Cauchy--Schwartz inequality. It follows that \begin{align} \norm{\xi_i}_{\ensuremath{{H}}^1(\tilde{\mu}^\varepsilon)} \leq C \|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}(t) \, , \end{align} where the constant $C$ is independent of $t$ and depends on $\norm{\chi_i}_{\ensuremath{{H}}^1(\tilde{\mu}^\varepsilon)}$, $V$, and $W$. We omit the details but an essentially similar argument to the one used for~\eqref{eq:tdcorrectori} will give us an estimate of the form \begin{align} \norm{\nabla \partial_\alpha \xi_i}_{L^2(\tilde{\mu}^\varepsilon)} \leq C' \|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}(t) +\sum_{l=1}^m C_l \norm{\xi_i}_{\ensuremath{{H}}^{m-l}(\tilde{\mu}^\varepsilon)}\|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}(t) \, , \end{align} where $\abs{\alpha}=m-1$, and the constants $C',\;C_l$ are independent of $t$ and depend on the norms of $\chi_i$, $W$, $V$, and their derivatives. Recursively applying these bounds one obtains~\eqref{eq:Hmboundt}. \end{proof} Next, we bound $\|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}$ by $d_2(\tilde{\nu}^\varepsilon,\tilde{\nu}^*)$. \begin{lemma}\label{lem:boundoftimederivative} Assume that $\tilde{\nu}^\varepsilon$ and $\tilde{\nu}^*$ are a solution and a steady state to \eqref{periodiceps=1} respectively, then $$ \|\partial_t \tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}\le C d_2(\tilde{\nu}^\varepsilon,\tilde{\nu}^*), $$ where the constant $C$ depends on dimension, $\beta$, $\norm{W}_{C^2(\mathbb T^d)}$, and $\norm{V}_{C^{2}(\mathbb T^d)}$. \end{lemma} \begin{proof} Using \eqref{periodiceps=1} and that $\tilde{\nu}^*$ is a steady state, we obtain that for any test function $\varphi$ $$ \int_{\mathbb T^d} \partial_t \tilde{\nu}^\varepsilon\varphi\;\dx{x}=\beta\int_{\mathbb T^d}\Delta\varphi \tilde{\nu}^\varepsilon-\nabla\varphi\cdot( \nabla W\ast\tilde{\nu}^\varepsilon+\nabla V)\tilde{\nu}^\varepsilon\;\dx{x} $$ and $$ 0=\int_{\mathbb T^d} \partial_t \tilde{\nu}^*\varphi\;\dx{x}=\beta\int_{\mathbb T^d}\Delta\varphi \tilde{\nu}^*-\nabla\varphi\cdot( \nabla W\ast\tilde{\nu}^*+\nabla V)\tilde{\nu}^*\;\dx{x}. $$ Therefore, $$ \int_{\mathbb T^d} \partial_t \tilde{\nu}^\varepsilon\varphi\;\dx{x}=\beta\int_{\mathbb T^d}\Delta\varphi (\tilde{\nu}^\varepsilon-\nu^*)-\nabla\varphi\cdot( \nabla W\ast\tilde{\nu}+\nabla V)(\tilde{\nu}^\varepsilon-\tilde{\nu}^*)+ \nabla\varphi\cdot \nabla W\ast(\tilde{\nu}^\varepsilon-\tilde{\nu}^*)\tilde{\nu}^*\;\dx{x} $$ Using the dual formulation of the 1-Wasserstein distance we can obtain the following bound $$ \left|\int_{\mathbb T^d} \partial_t \tilde{\nu}^\varepsilon\varphi\;\dx{x}\right|=\beta (\|\varphi\|_{C^3(\mathbb T^d)}+ \|\varphi\|_{C^2(\mathbb T^d)}(\norm{W}_{C^2(\mathbb T^d)}+\norm{V}_{C^2(\mathbb T^d)})+\|\varphi\|_{C^1}\norm{W}_{C^2(\mathbb T^d)})d_1(\tilde{\nu}^\varepsilon,\tilde{\nu}^*). $$ Finally, bounding the 1-Wasserstein distance by the 2-Wasserstein distance we obtain $$ d_1(\tilde{\nu}^\varepsilon,\tilde{\nu}^*)\le d_2(\tilde{\nu}^\varepsilon,\tilde{\nu}^*) \, . $$ Thus we have the desired estimate. \end{proof} We now study the behaviour of the underlying SDE associated to~\eqref{eps=1}. \begin{lemma}\label{mCLT} Consider the mean field SDE \begin{align} \begin{cases} \label{eq:mckeanSDE} \dx{Y}_t^\varepsilon &= -\nabla V(Y_t^\varepsilon)\dx{t} - \nabla (W \ast \nu (t))(Y_t^\varepsilon)\dx{t} + \sqrt{2 \beta^{-1}} dB_t \\ \mathrm{Law}(Y_0^\varepsilon)&= \nu_0^\varepsilon=\varepsilon^d\rho_0^\varepsilon(\varepsilon x) \in \mathcal{P}(\mathbb R^d) \, . \end{cases} \end{align} where $\nu(t)$ is a solution of~\eqref{eps=1} with initial data $\nu_0^\varepsilon$ and $B_t$ is a standard $d$-dimensional Wiener process Then for fixed $\varepsilon>0$, the random variables $\set{t^{-1/2} Y_t^\varepsilon}_{t > 0}$ converge in law (specifically in $d_2$) as $t \to \infty$ to a mean zero Gaussian random variable $Y$ with covariance matrix $2 A^{\mathrm{eff}}_* \in \mathbb R^{d \times d}$. \end{lemma} \begin{proof} Consider $\nu^\varepsilon(t)$ the solution to the mean field PDE \eqref{eps=1} with initial data given by $\nu^\varepsilon_0$. (we add the $\varepsilon$ superscript to $\nu(t)$ to emphasise the dependence of the initial data on $\varepsilon$). As $V$ and $W$ are smooth $1$-periodic functions, it follows that $(W\ast\nu(t))(x)$ is also $1$-periodic and is equal to $(W\ast \tilde{\nu}^\varepsilon(t))(x)$, where $\tilde{\nu}^\varepsilon$ is the periodic rearrangement of $\nu^\varepsilon(t)$. Thus the SDE in~\eqref{eq:mckeanSDE} can be rewritten as \begin{align} \begin{cases} \label{eq:mckeanSDEqr} \dx{Y}_t^\varepsilon &= -\nabla V(\dot{Y}_t^\varepsilon)\dx{t} - \nabla (W \ast \tilde{\nu}^\varepsilon (t))(\dot{Y}_t^\varepsilon)\dx{t} + \sqrt{2 \beta^{-1}} dB_t \\ \mathrm{Law}(Y_0^\varepsilon)&= \nu_0^\varepsilon=\varepsilon^d\rho_0^\varepsilon(\varepsilon x) \in \mathcal{P}(\mathbb R^d) \, , \end{cases} \end{align} where $\dot{Y}_t^\varepsilon$ is the quotient process, i.e. $(\dot{Y}_t^\varepsilon)_j=(Y_t^\varepsilon)_j\; (\mbox{mod} \; 1)$ for all $j= 1,\dots,d$. Furthermore, $\dot{Y}_t^\varepsilon$ satisfies the following SDE \begin{align} \begin{cases} \label{eq:mckeanSDEq} \dx{\dot{Y}}_t^\varepsilon &= -\nabla V(\dot{Y}_t^\varepsilon)\dx{t} - \nabla (W \ast \tilde{\nu}^\varepsilon (t))(\dot{Y}_t^\varepsilon)\dx{t} + \sqrt{2 \beta^{-1}} d\dot{B}_t \\ \mathrm{Law}(\dot{Y}_0^\varepsilon)&= \tilde{\nu}_0^\varepsilon \in \mathcal{P}(\mathbb T^d) \, , \end{cases} \end{align} where $\dot{B}_t$ is a $\mathbb T^d$-valued Wiener process. Now consider the unique solution $\chi(\cdot,t) \in \ensuremath{{H}}^1(\tilde{\mu}^\varepsilon)$ of the time-dependent corrector problem in~\eqref{eq:tdcorrector} given by Lemma~\ref{lem:exreg}. Applying Ito's lemma to $\chi(Y_t^\varepsilon,t)$ we obtain the following \begin{align} \chi(Y_t^\varepsilon,t)&= \chi(Y_0^\varepsilon,0) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} \\& + \int_0^t \bra*{- \bra*{\nabla V(\dot{Y}_s^\varepsilon) +\nabla (W \ast \tilde{\nu}^\varepsilon (s))(\dot{Y}_s^\varepsilon)} \cdot \nabla + \beta^{-1} \Delta } \chi(\dot{Y}_s^\varepsilon,s) \dx{s} \\ &+ \sqrt{2 \beta^{-1}} \int_0^t \nabla \chi(\dot{Y}_s^\varepsilon,s) dB_s \\&=\chi(Y_0^\varepsilon,0) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} + \int_0^t\beta^{-1} \bra*{\tilde{\mu}^\varepsilon}^{-1}\bra*{\nabla \cdot\bra*{\tilde{\mu}^\varepsilon \nabla \chi} } (\dot{Y}_s^\varepsilon,s)\dx{s} \\ &+ \sqrt{2 \beta^{-1}} \int_0^t \nabla \chi(\dot{Y}_s^\varepsilon,s) dB_s \, , \end{align} where we have used the fact that $f(Y_t^\varepsilon)=f(\dot{Y}_t^\varepsilon)$ for any $1$-periodic function $f$ and the equation for $\tilde{\mu}^\varepsilon$. Using the fact that $\chi$ satisfies~\eqref{eq:tdcorrector}, the above expression simplifies to \begin{align} \chi(Y_t^\varepsilon,t)&= \chi(Y_0^\varepsilon,0) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} - \int_0^t\beta^{-1} \bra*{\tilde{\mu}^\varepsilon}^{-1} \nabla \tilde{\mu}^\varepsilon(\dot{Y}_s^\varepsilon,s) \dx{s} \\ &+ \sqrt{2 \beta^{-1}} \int_0^t \nabla \chi(\dot{Y}_s^\varepsilon,s) dB_s \\ &= \chi(\dot{Y}_0^\varepsilon,0) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} +\int_0^t\nabla V(\dot{Y}_s^\varepsilon)+ \nabla (W \ast \tilde{\nu}^\varepsilon (s))(\dot{Y}_s^\varepsilon)\dx{s}\\ &+ \sqrt{2 \beta^{-1}} \int_0^t \nabla \chi(\dot{Y}_s^\varepsilon,s) dB_s \, . \end{align} Integrating~\eqref{eq:mckeanSDEq} from $0$ to $t$ and adding the above expression we obtain \begin{align} Y_t&= Y_0+ \chi(Y_0^\varepsilon,0) - \chi(Y_t^\varepsilon,t) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} \\ & + \sqrt{2 \beta^{-1}} \int_0^t \bra*{I+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s \, . \end{align} Multiplying by $t^{-1/2}$ we obtain \begin{align} t^{-1/2}Y_t^\varepsilon &= t^{-1/2} \bra*{\chi(Y_0^\varepsilon,0) - \chi(Y_t^\varepsilon,t) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} } + t^{-1/2}Y_0^\varepsilon \\ & +t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{I+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s \, . \end{align} To analyse the limit of $t^{-1/2}Y_t^\varepsilon$ we start by showing that the first three terms on the RHS of the above expression go to zero in $\ensuremath{{L}}^\infty(\mathbb{P})$ as $t \to \infty$. Picking $m>d/2$ and applying the results of Lemma~\ref{lem:exreg} along with Morrey's inequality we have \begin{align} &t^{-1/2} \bra*{\chi(Y_0^\varepsilon,0) - \chi(Y_t^\varepsilon,t) + \int_0^t \partial_s \chi(\dot{Y}_s^\varepsilon,s) \dx{s} } \\&\leq t^{-1/2} C_d \bra*{2\norm{\chi(\cdot,t)}_{\ensuremath{{H}}^m(\mathbb T^d)} + \int_0^t \norm{\partial_s \chi(\cdot,t)}_{\ensuremath{{H}}^m(\mathbb T^d)} \dx{s} }\\ & \leq t^{-1/2} C_d \bra*{2C_1 + \int_0^t \sum_{k=1}^m c_k \|\partial_t\tilde{\nu}^\varepsilon\|_{C^{-3}(\mathbb T^d)}^k(s) \dx{s} } \stackrel{t \to \infty}{\to} 0 \, , \label{e1} \end{align} where in the last step we have used Lemma~\ref{lem:boundoftimederivative} and applied assumption~\eqref{exponential convergence}. For the fourth term we simply use the fact that $Y_0$ has finite second moment to argue that it goes to zero in $\ensuremath{{L}}^2(\mathbb{P})$. Thus studying the behaviour of $t^{-1/2} Y_t$, in law, as $t \to \infty$ is equivalent to studying the asymptotic behaviour of the martingale term $Z_t$, where \begin{align} Z_t:= t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s \, . \end{align} We will proceed in steps: In \textit{Step 1}, we will argue that the $\chi$ in the above expression can be replaced by $\Psi^*$, where $\Psi^*$ solves~\eqref{limiting corrector}. In \textit{Step 2}, we will compute the limiting covariance matrix of $Z_t$ as $t \to \infty$ and show that it is precisely $2 A^{\mathrm{eff}}_*$. Finally, in \textit{Step 3}, we will argue that the limiting random variable is a mean zero Gaussian. \textit{Step 1.} First note that $\mu^\varepsilon(t) \to \tilde{\nu}^*$ in $L^\infty$ as $t \to \infty$. Indeed, we have that \begin{align} &\abs*{Z^{-1}(\tilde{\mu}^\varepsilon) \exp\bra*{-\beta( W \ast \tilde{\nu}^\varepsilon +V)} -Z^{-1}(\tilde{\nu}^*)\exp\bra*{-\beta( W \ast \tilde{\nu}^* +V)} } \\ & \leq Z^{-1}(\tilde{\mu}^\varepsilon) \abs*{ \exp\bra*{-\beta( W \ast \tilde{\nu}^\varepsilon +V)} -\exp\bra*{-\beta( W \ast \tilde{\nu}^* +V)} }\\ & + \abs*{Z^{-1}(\tilde{\mu}^\varepsilon)- Z^{-1}(\tilde{\nu}^*)} e^{\beta(\norm{W}_{\ensuremath{{L}}^\infty(\mathbb T^d)} + \norm{V}_{\ensuremath{{L}}^\infty(\mathbb T^d)})} \\ & \leq e^{2\beta(\norm{W}_{\ensuremath{{L}}^\infty(\mathbb T^d)} + \norm{V}_{\ensuremath{{L}}^\infty(\mathbb T^d)})} \beta\abs*{ W \ast \tilde{\nu}^\varepsilon- W \ast \tilde{\nu}^*} + e^{3\beta(\norm{W}_{\ensuremath{{L}}^\infty(\mathbb T^d)} + \norm{V}_{\ensuremath{{L}}^\infty(\mathbb T^d)})} \beta\abs*{ W \ast \tilde{\nu}^\varepsilon- W \ast \tilde{\nu}^*} \\ & \leq Cd_2(\tilde{\nu}^\varepsilon, \tilde{\nu}^*) \stackrel{t \to \infty}{\to}0 \, , \label{eq:munuconvergence} \end{align} where we have used~\eqref{exponential convergence}. We now argue that $\nabla \chi$ converges to $\nabla \Psi^*$ in $\ensuremath{{L}}^2(\mathbb T^d; \mathbb R^d)$. We perform the proof component-wise using the weak formulations of\eqref{eq:tdcorrector} and~\eqref{limiting corrector} \begin{align} &\intt{\nabla \chi_i \cdot \nabla \phi \tilde{\mu}^{\varepsilon}(t)} - \intt{\nabla \Psi^*_i \cdot \nabla \phi \tilde{\mu}^{\varepsilon}(t)} \\&= \intt{\partial_{x_i}(\tilde{\mu}^\varepsilon-\tilde{\nu^*} ) \phi } +\intt{\nabla \Psi^*_i \cdot \nabla \phi \tilde{\nu}^{*}(t)} - \intt{\nabla \Psi^*_i \cdot \nabla \phi \tilde{\mu}^{\varepsilon}(t)} \\ &=-\intt{(\tilde{\mu}^\varepsilon-\tilde{\nu^*} ) \partial_{x_i} \phi } +\intt{\nabla \Psi^*_i \cdot \nabla \phi \bra*{\tilde{\nu}^{*}(t) -\tilde{\mu}^{\varepsilon}(t) }} \\ & \leq \norm{\tilde{\mu}^\varepsilon-\tilde{\nu^*} }_{\ensuremath{{L}}^\infty(\mathbb T^d)}(1+ \norm{\nabla\Psi^*_i}_{\ensuremath{{L}}^2(\mathbb T^d)})\norm{\nabla\phi }_{\ensuremath{{L}}^2(\mathbb T^d)} \, . \end{align} Choosing $\phi=\chi_i- \Psi^*_i$ and using the uniform lower bound from~\eqref{eq:mubounds}, we obtain that \begin{align} \norm{\nabla(\chi_i- \Psi^*_i)}_{\ensuremath{{L}}^2(\mathbb T^d)} \leq C\norm{\tilde{\mu}^\varepsilon-\tilde{\nu^*} }_{\ensuremath{{L}}^\infty(\mathbb T^d)}(1+ \norm{\nabla\Psi^*_i}_{\ensuremath{{L}}^2(\mathbb T^d)}) \stackrel{t \to \infty}{\to}0 \, , \label{eq:chitopsi} \end{align} using~\eqref{eq:munuconvergence}. Thus we can now simply apply Ito's isometry as follows \begin{align} & \mathbb{E} \pra*{t^{-1} \abs*{\sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s - \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{Y}_s^\varepsilon,s)} dB_s}^2} \\ &=2 \beta^{-1}t^{-1}\mathbb{E} \pra*{ \abs*{ \int_0^t \bra*{\nabla(\chi- \Psi^*)}(\dot{Y}_s^\varepsilon,s) dB_s}^2} \\ &=2 \beta^{-1}t^{-1}\mathbb{E} \pra*{ \int_0^t \sum_{i=1}^d\abs*{\nabla(\chi_i- \Psi^*_i)}^2(\dot{Y}_s^\varepsilon,s) \dx{s}} \\ & \leq 2 \beta^{-1}t^{-1} \int_0^t \sum_{i=1}^d\norm*{\nabla(\chi_i- \Psi^*_i)}_{\ensuremath{{L}}^\infty(\mathbb T^d)}^2(s) \dx{s} \, . \end{align} Picking some $m >d/2$ and applying Morrey's inequality we obtain \begin{align} & \mathbb{E} \pra*{t^{-1} \abs*{\sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s - \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{Y}_s^\varepsilon,s)} dB_s}^2} \\ & \leq 2 \beta^{-1}t^{-1} C_d^2 \int_0^t \sum_{i=1}^d\norm*{\nabla(\chi_i- \Psi^*_i)}_{\ensuremath{{H}}^m_0(\mathbb T^d)}^2(s) \dx{s} \\ &\leq 2 \beta^{-1}t^{-1} C_d^2 C^2 \int_0^t \sum_{i=1}^d\norm*{\nabla(\chi_i- \Psi^*_i)}_{\ensuremath{{H}}^{m+1}_0(\mathbb T^d)}^{2 \alpha}(s) \norm*{\nabla(\chi_i- \Psi^*_i)}_{\ensuremath{{L}}^{2}(\mathbb T^d)}^{2-2 \alpha}(s) \dx{s} \, , \end{align} where we have applied the Gagliardo--Nirenberg--Sobolev inequality and $\alpha=m/(m+1)$. We bound the $\ensuremath{{H}}^{m+1}$-norm in the above expression by a uniform constant using Lemma~\ref{lem:exreg} and the fact that $\Psi^*$ is the solution of a uniformly elliptic PDE with smooth coefficients. Hence, using~\eqref{eq:chitopsi} we obtain \begin{align} \mathbb{E} \pra*{t^{-1} \abs*{\sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s - \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{Y}_s^\varepsilon,s)} dB_s}^2}\stackrel{t \to \infty}{\to} 0 \, . \label{e3} \end{align} \textit{Step 2.} In this step, we compute the limiting covariance as $t \to \infty$ of the following term \begin{align} G_t^\varepsilon:= t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{Y}_s^\varepsilon)} dB_s \, . \label{intermediate variable} \end{align} Applying Ito's isometry again we have \begin{align} \mathbb{E} \pra*{(G_t^\varepsilon)_i (G_t^\varepsilon)_j}& = 2 \beta^{-1} t^{-1} \int_0^t \mathbb{E}\pra*{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_k} \Psi^*_i)(\delta_{jk} + \partial_{x_k} \Psi^*_j)}(\dot{Y}_s^\varepsilon)} \dx{s} \\ &= 2 \beta^{-1} t^{-1} \int_0^t \intt{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_i} \Psi^*_k)(\delta_{jk} + \partial_{x_j} \Psi^*_k)}(x) \tilde{\nu}^\varepsilon(x,s)} \dx{s} \\ &= 2 \beta^{-1} t^{-1} \int_0^t \intt{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_i} \Psi^*_k)(\delta_{jk} + \partial_{x_j} \Psi^*_k)}(x) (\tilde{\nu}^\varepsilon-\tilde{\nu}^*)(x,s)} \dx{s} \\ &+2 \beta^{-1} t^{-1} \int_0^t \dx{s} \bra*{\intt{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_i} \Psi^*_k)(\delta_{jk} + \partial_{x_j} \Psi^*_k)}(x) \tilde{\nu}^*(x)}} \, . \label{limiting covariance} \end{align} We can bound the first term as follows \begin{align} &2 \beta^{-1} t^{-1} \int_0^t \intt{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_i} \Psi^*_k)(\delta_{jk} + \partial_{x_j} \Psi^*_k)}(x) (\tilde{\nu}^\varepsilon-\tilde{\nu}^*)(x,s)} \dx{s}\\ &\qquad\qquad \lesssim t^{-1} \int_0^t d_2(\tilde{\nu}^\varepsilon(s),\tilde{\nu}^*) \dx{s} \stackrel{t \to \infty}{\to} 0 \,, \label{e4} \end{align} where we have used~\eqref{exponential convergence} and the fact $\nabla \Psi^*$ is Lipschitz. Then from~\eqref{limiting covariance} it follows that \begin{align} \lim_{t \to \infty}\mathbb{E} \pra*{(G_t^\varepsilon)_i (G_t^\varepsilon)_j}&=2 \beta^{-1}\bra*{\intt{\bra*{\sum_{k=1}^d (\delta_{ik} + \partial_{x_i} \Psi^*_k)(\delta_{jk} + \partial_{x_j} \Psi^*_k)}(x) \tilde{\nu}^*(x)}} \\ &= 2 \beta^{-1}\bra*{\intt{ \bra*{\delta_{ij} + \partial_{x_i} \Psi^*_j + \partial_{x_j} \Psi^*_i + \sum_{k=1}^d\partial_{k} \Psi^*_i \partial_{k} \Psi^*_j } (x) \tilde{\nu}^*(x)}} \\ &=2 \beta^{-1}\bra*{\intt{ \bra*{\delta_{ij} + \partial_{x_i} \Psi^*_j + \partial_{x_j} \Psi^*_i + \nabla \Psi^*_i \cdot \nabla \Psi^*_j } (x) \tilde{\nu}^*(x)}} \\ &=2 \beta^{-1}\bra*{\intt{ \bra*{\delta_{ij} + \partial_{x_i} \Psi^*_j } (x) \tilde{\nu}^*(x)}}= 2 \bra*{A^{\mathrm{eff}}_*}_{ij} \, , \end{align} where in the penultimate step we have used the fact that $\Psi^*$ satisfies~\eqref{limiting corrector}. \textit{Step 3.} In the final step, we will show that the limit in law of $G_t^\varepsilon$ as $t \to \infty$ is a Gaussian random variable. The key step involves replacing $\dot{Y}_t^\varepsilon$ in the expression for $G_t^\varepsilon$ in~\eqref{intermediate variable} by $\dot{X}_t$, where $\dot{X}_t$ solves \begin{align}\label{eq:mckeanSDEs} \begin{cases} \dx{\dot{X}}_t &= -\nabla V(\dot{X}_t)\dx{t} - \nabla (W \ast \tilde{\nu}^* )(\dot{X}_t)\dx{t} + \sqrt{2 \beta^{-1}} d\dot{B}_t \\ \mathrm{Law}(\dot{X}_0)&= \tilde{\nu}^* \in \mathcal{P}(\mathbb T^d) \, . \end{cases} \end{align} Here $\dot{X}_t$ is a stationary, ergodic process with invariant measure $\tilde{\nu}^*$ and is precisely the process $\dot{Y}_t$ started from the invariant measure $\tilde{\nu}^*$. We assert now (cf. Lemma~\ref{coupling existence}) that~\eqref{exponential convergence} implies that there exists a coupling of $(\dot{X}_t,\dot{Y}_t)$ (indeed a reflection coupling) such that $\sup_{\varepsilon >0}\mathbb{E}\pra*{d_{\mathbb T^d}(\dot{X}_t,\dot{Y}_t)^2} \to 0$ as $t \to \infty$. Using this we obtain, \begin{align} \mathbb{E}\pra*{\bra*{G_t^\varepsilon-t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{X}_s)} dB_s}^2 } \leq 2 C\beta^{-1}t^{-1}\int_0^t \mathbb{E}\pra*{d_{\mathbb T^d}(\dot{X}_s,\dot{Y}_s)^2} \dx{s} \stackrel{t \to \infty}{\to} 0 \, , \label{e5} \end{align} where we simply use the Ito isometry and the fact that $\Psi^*$ has a Lipschitz regular gradient. Thus we are left to analyse the following term: \begin{align} t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{X}_s)} dB_s \end{align} where $\dot{X}_s$ is stationary ergodic process. Additionally, we know the limiting covariance of the above term, i.e. $2 A^{\mathrm{eff}}_*$. We now apply the Birkhoff ergodic theorem followed by the martingale central limit theorem (cf.~\cite[Theorem 2.1]{KLO12} or~\cite[Theorem 2.1]{Whi07}) to complete the proof. The fact that the convergence is also in $d_2$ follows from the fact that the covariance matrices also converge. \end{proof} The above result holds for a fixed $\varepsilon>0$, however we can improve it by using the fact that the convergence in~\eqref{exponential convergence} is uniform in $\varepsilon>0$. A consequence of the analysis in the previous result is the following corollary: \begin{corollary}\label{uniform eps} Consider the process: \begin{align} M_t^\varepsilon:=t^{-\frac{1}{2}} \bra*{\chi(Y_0^\varepsilon,0) - \chi(Y_t^\varepsilon,t) + \int_0^t \partial_s \chi(Y_s^\varepsilon,s) \dx{s} + \sqrt{2 \beta^{-1}} \int_0^t \bra*{I+ \nabla \chi(\dot{Y}_s^\varepsilon,s)} dB_s \, } \, , \end{align} where $\chi$ is the solution of the time-dependent corrector problem~\eqref{eq:tdcorrector} and $Y_t^\varepsilon$ solves~\eqref{eq:mckeanSDE}. Then \begin{align} \lim_{t \to \infty}\sup_{\varepsilon>0}\norm*{M_t^\varepsilon-t^{-1/2} \sqrt{2 \beta^{-1}} \int_0^t \bra*{{I}\,+ \nabla \Psi^*(\dot{X}_s)} dB_s}_{\ensuremath{{L}}^2(\mathbb{P})} \to 0 \, , \end{align} where $\dot{X}_t$ is the solves and is coupled to $\dot{Y}_t^\varepsilon$ as in the proof of Lemma~\ref{mCLT}. \end{corollary} \begin{proof} The proof of this result follows from the fact that the convergence in~\eqref{e1},~\eqref{eq:munuconvergence},~\eqref{e3},~\eqref{e4}, and~\eqref{e5}, are all controlled by~\eqref{exponential convergence} which is uniform in $\varepsilon>0$. \end{proof} We can finally put all the pieces together and complete the proof of Theorem~\ref{thm:variabledata} \begin{proof}[Proof of Theorem~\ref{thm:variabledata}] We would like to understand the behaviour of the trajectory $S_t^\varepsilon \rho_0^\varepsilon$ where $S_t^\varepsilon$ is the solution semigroup associated to~\eqref{nonlineareq}. However, we know that $S_t^\varepsilon \rho_0^\varepsilon= \mathrm{Law}(\varepsilon Y^\varepsilon_{t/\varepsilon^2})$, where $Y_t^\varepsilon$ is the solution~\eqref{eq:mckeanSDE} of with initial law $\varepsilon^d \rho^\varepsilon_0(\varepsilon x)$. Fix $t=1$ and set $\varepsilon^{-2}=s$. Thus we have that \begin{align} \varepsilon Y^\varepsilon_{1/\varepsilon^2}& = s^{-\frac{1}{2}} Y^{s^{-\frac{1}{2}}}_{s} \\ &= s^{-\frac{1}{2}} Y_0^{s^{-\frac{1}{2}}} \\ &+ s^{-\frac{1}{2}} \bra*{\chi(Y_0,0) - \chi(Y^{s^{-1/2}}_s,s) + \int_0^s \partial_u \chi(\dot{Y}^{u^{-1/2}}_u,u) \dx{u} + \sqrt{2 \beta^{-1}} \int_0^s \bra*{I+ \nabla \chi(\dot{Y}^{u^{-1/2}}_u,u)} dB_u \, }. \end{align} Applying Corollary~\ref{uniform eps}, we can pass to the limit $s \to \infty$ for the second term on the right hand side of the above expression. Since the convergence is in $\ensuremath{{L}}^2(\mathbb{P})$, we can replace the second term in the limit as $s \to \infty$ as follows \begin{align} \lim_{s \to \infty}\mathrm{Law}( s^{-\frac{1}{2}} Y^{s^{-\frac{1}{2}}}_{s} ) = \lim_{s \to \infty}\mathrm{Law} \bra*{s^{-\frac{1}{2}} Y_0^{s^{-\frac{1}{2}}} + s^{-1/2}\sqrt{2 \beta^{-1}} \int_0^s \bra*{I+ \nabla \Psi^*(\dot{X}_u)} dB_u } \, . \end{align} where $\dot{X}_u$ solves~\eqref{eq:mckeanSDEs}. The two random variables on the right hand side of the above expression are independent. Thus we can rewrite the above expression as \begin{align} \lim_{s \to \infty}\mathrm{Law}( s^{-\frac{1}{2}} Y^{s^{-\frac{1}{2}}}_{s} )= \lim_{s \to \infty}F_s * \rho_0^{s^{-1/2}} \, , \end{align} where $F_s$ is the law of $s^{-1/2}\sqrt{2 \beta^{-1}} \int_0^s \bra*{I+ \nabla \Psi^*(\dot{X}_u)} dB_u$. Since both laws converge in $d_2$, their convolution converges to the convolution of the individual limits in $d_2$ as $s \to \infty$. The limit of $F_s$ can be obtained by the martingale central limit theorem as in the proof of Lemma~\ref{mCLT} while the limit of $\rho_0^{s^{-1/2}}$ is $\rho_0^*$. Thus we have that \begin{align} \lim_{s \to \infty}d_2(\mathrm{Law}( s^{-\frac{1}{2}} Y^{s^{-\frac{1}{2}}}_{s} ) , \mathcal{N}(0,A_*^{\mathrm{eff}}) * \rho^* _0)=\lim_{s \to \infty}d_2(S_1^{s^{-\frac{1}{2}}} \rho_0^{s^{-\frac{1}{2}}} , \mathcal{N}(0,A_*^{\mathrm{eff}}) * \rho^* _0) =0 . \end{align} Rewriting the same in terms of the laws we have \begin{align} \lim_{\varepsilon \to 0}d_2(S_1^\varepsilon \rho_0^\varepsilon , \mathcal{N}(0,A_*^{\mathrm{eff}}) * \rho^* _0) =0. \end{align} The choice of time $t=1$ was arbitrary. The same arguments can be repeated for arbitrary $t \geq 0$ to complete the proof of~\eqref{weak convergence}. Assume now that the initial data of~\eqref{eq:LinearKolmogorov}, $\rho_0^{\varepsilon,N}$ is such that $\lim_{N \to \infty}\rho_0^{\varepsilon,N} =X_0^\varepsilon=\delta_{\rho_0^\varepsilon}$. We can then apply Theorem~\ref{thma} to first assert that, for a fixed $t>0$, \begin{align} \lim_{N \to \infty}\rho^{\varepsilon,N}(t)= X^\varepsilon(t)= S_t^\varepsilon \# X_0^\varepsilon \, . \end{align} Let $X_0=\delta_{\rho_0^*}$ and consider some $\Phi \in {\rm Lip}(\mathcal{P}(\mathbb R^d))$. Then we have \begin{align} \int_{\mathcal{P}(\mathbb R^d)} \Phi(\rho)\dx{\bra*{X(t)^\varepsilon - S_t^*\# X_0 }}(\rho) &= \int_{\mathcal{P}(\mathbb R^d)} \Phi(\rho)\dx{\bra*{S_t^\varepsilon\#X_0^\varepsilon - S_t^*\# X_0}}(\rho) \\ &=\Phi(S_t^\varepsilon \rho_0^\varepsilon)-\Phi(S_t^*\rho_0^*) \leq d_2(S_t^\varepsilon \rho_0^\varepsilon,S_t^* \rho_0^*) \stackrel{\varepsilon \to 0}{\to} 0 \, , \end{align} where in the last step we have simply applied~\eqref{weak convergence}, thus completing the proof of the theorem. \end{proof} \section{Proof of Theorem~\ref{thm: N then eps}}\label{sec:2thm} \textit{Strategy of proof.} We first need to pass to the limit in the covariance matrix \begin{equation}\label{eq:effAN} A^{\mathrm{eff},N}=\beta^{-1}\int_{\big(\mathbb T^d\big)^N} (I+\nabla \Psi^N) M_N\;\dx{x} \, . \end{equation} To do this, we first pass to the limit limit in the Poisson equation for $\Psi^N:\big(\mathbb T^d\big)^N\to\big(\mathbb R^d\big)^N$ \begin{equation}\label{eq:poisson1} \nabla\cdot(M_N \nabla \Psi^N)=-\nabla M_N, \end{equation} with \begin{equation}\label{eq:zeroavg} \int_{\big(\mathbb T^d\big)^N} \Psi^N M_N\;\dx{x}=0. \end{equation} Once we have obtained the limit of the covariance matrix, we then need to pass to the limit in the equation $$ \partial_t \rho^{N,*}=\nabla\cdot(A^{\mathrm{eff},N}\nabla\rho^{N,*}). $$ We do this by testing against cylindrical test functions, that is to say functions that depend on a finite number of variables, which is enough to determine the limit in $\mathcal{P}(\mathcal{P}(\mathbb R^d))$. \vspace{0.2cm} \textit{Step 1.} We start by showing a few a priori estimates. First, we show that for every $1\le i\le Nd$ and $k\in\{1,...,N\}$ such that $i$ does not belong to the particle $k$ (i.e. $i\notin[(k-1)d+1,kd]$) the solution of the corrector problem \eqref{eq:poisson1} satisfies \begin{equation}\label{aprioriPsi} \int_{\big(\mathbb T^d\big)^N}|\nabla\Psi_i^N|^2 M_N\;\dx{x}\le 1 \qquad\mbox{and}\qquad \int_{\big(\mathbb T^d\big)^N}|\nabla_{x_k}\Psi_i^N|^2 M_N\;\dx{x}\le \frac{1}{N-1}, \end{equation} where $$ |\nabla\Psi_i^N|^2:=\sum_{j=1}^{Nd} |\partial_j \Psi_i^N|^2\qquad \mbox{and}\qquad \nabla_{x_{k}}\Psi_i^N:=\sum_{j=(k-1)d+1}^{kd}\partial_j\Psi_i^N e_{j}. $$ Testing the $i$-th equation of \eqref{eq:poisson1} against $\Psi_i^N$, applying the Cauchy-Schwarz inequality, and using the fact that $M_N$ has mass one, we obtain $$ \int_{\big(\mathbb T^d\big)^N} M_N |\partial_i \Psi_i^N|^2\;\dx{x} \le \int_{\big(\mathbb T^d\big)^N}|\nabla\Psi_i^N|^2M_N\;\dx{x}= \int_{\big(\mathbb T^d\big)^N} M_N \partial_i \Psi_i^N\;\dx{x} \le \left(\int_{\big(\mathbb T^d\big)^N} M_N |\partial_i \Psi_i^N|^2\;\dx{x}\right)^{1/2}, $$ which implies the first inequality in \eqref{aprioriPsi}. The second inequality follows due to the exchangeability of the particles. In fact, for any $k_1,\; k_2\in\{1,...,N\}$ and $i\notin [(k_1-1)d+1, k_1d]\cup [(k_2-1)d+1, k_2d]$ we have that up to exchanging the $k_1$ and $k_2$ particles (i.e. changing variables) $$ \nabla_{x_{k_1}}\Psi_i^N=\nabla_{x_{k_2}}\Psi_i^N. $$ Combining this with the first inequality of \eqref{aprioriPsi} we obtain the second inequality of \eqref{aprioriPsi}. Next, we show that there exists $C(\beta,\norm{W}_{C^1},\norm{V}_{C^1})$ such that \begin{equation}\label{aprioriM_N} \|(M_N)_1\|_{C^1(\mathbb T^d)}\le C\qquad\mbox{and}\qquad C^{-1} \le M_N/M_{N-1}\le C, \end{equation} where $M_{N-1}$ is the Gibbs measure associated to the quotiented $(N-1)$-particle system trivially extended to $\big(\mathbb T^d\big)^N$ and $(M_N)_1$ is the first marginal of $M_N$. We start by rewriting \begin{equation}\label{eq:1} \begin{array}{rl} \displaystyle M_N&\displaystyle =\frac{e^{-\beta\bra*{\frac{1}{2N}\sum_{i=1}^N\sum_{j\ne i} W(x_i-x_j)+\sum_{i=1}^NV(x_i))}}}{Z_N}\\ &\displaystyle =e^{-\beta\bra*{\frac{1}{N}\sum_{j=1}^NW(x_1-x_j)-\frac{1}{2N(N-1)}\sum_{i,j}^NW(x_i-x_j)+V(x_1))}} M_{N-1}\frac{Z_{N-1}}{Z_{N}}. \end{array} \end{equation} Differentiating the previous expression with respect to $x_1$ we obtain \begin{equation}\label{eq:2} \begin{array}{rl} \displaystyle \nabla_{x_1} M_N =&\displaystyle -\beta\left(\left(\frac{1}{N}-\frac{1}{N(N-1)}\right)\sum_{j=1}^N\nabla W(x_1-x_j)+\nabla V(x_1)\right)\\ &\displaystyle\qquad\qquad e^{-\beta\bra*{\frac{1}{N}\sum_{j=1}^NW(x_1-x_j)-\frac{1}{2N(N-1)}\sum_{i,j}^NW(x_i-x_j)+V(x_1))}} M_{N-1}\frac{Z_{N-1}}{Z_{N}}. \end{array} \end{equation} By \eqref{eq:1} and \eqref{eq:2} and the fact that $V$ and $W$ are sufficiently regular, the desired estimates follows if we can show that $Z_{N-1}/Z_{N}$ is bounded above and below. This follows from the following estimate $$ \begin{array}{rl} \displaystyle Z_N &\displaystyle = \int_{\big(\mathbb T^d\big)^N}e^{-\beta\bra*{\frac{1}{2N}\sum_{i=1}^N\sum_{j\ne i} W(y_i-y_j)+ \sum_{i=1}^N V(y_i))}}\;\dx{y} \\ &\displaystyle \ge e^{-\beta\bra*{\bra*{\frac{N}{2(N-1)}+1}\norm{W}_{\infty} +\norm{V}_\infty}}\int_{\big(\mathbb T^d\big)^N}e^{-\beta\bra*{\frac{1}{2(N-1)}\sum_{i=2}^N\sum_{j\ne i} W(y_i-y_j)+ \sum_{i=2}^N V(y_i)}}\;\dx{y}\\ &\displaystyle \ge C^{-1}Z_{N-1} \end{array} $$ and its analogue for the reverse bound. \vspace{0.2cm} \textit{Step 2.} Next we show that we can in a suitable sense decompose $M_N$ by the product $(M_N)_1 M_{N-1}$. To be precise, we show that for every $x_1\in \mathbb T^d$ \begin{equation}\label{eq:decomposition} \lim_{N\to \infty} \int_{\big(\mathbb T^d\big)^{N-1}} \left(\frac{M_N}{M_{N-1}}-(M_N)_1\right)^2M_{N-1}\;\dx{x}_2...\dx{x_N} = 0. \end{equation} We notice that $$ (M_N)_1=\int_{\big(\mathbb T^d\big)^{N-1}}M_N\;\dx{x}_2...\dx{x_N}=\int_{\big(\mathbb T^d\big)^{N-1}}\frac{M_N}{M_{N-1}}M_{N-1}\;\dx{x}_2...\dx{x_N}, $$ and we rewrite \begin{equation} \begin{array}{rl} &\displaystyle \int_{\big(\mathbb T^d\big)^{N-1}} \left(\frac{M_N}{M_{N-1}}-(M_N)_1\right)^2M_{N-1}\\&\displaystyle=\left|\frac{Z_{N-1}}{Z_{N}}\right|^2\int_{\big(\mathbb T^d\big)^{N-1}} \left(u^N-\int_{\big(\mathbb T^d\big)^{N-1}} u^NM_{N-1}\right)^2M_{N-1}\\ &\displaystyle = \left|\frac{Z_{N-1}}{Z_{N}}\right|^2\left(\int_{\big(\mathbb T^d\big)^{N-1}} (u^N)^2M_{N-1}-\left(\int_{\big(\mathbb T^d\big)^{N-1}} u^NM_{N-1}\right)^2\right), \end{array} \end{equation} where the function $u^N:\mathbb T^d\times\big(\mathbb T^d\big)^{N-1}\to \mathbb R$ is given by $$ u^N=\frac{Z_N}{Z_{N-1}}\frac{M_N}{M_{N-1}}=e^{-\beta\bra*{\frac{1}{N}\sum_{j=2}^NW(x_1-x_j)-\frac{1}{2N(N-1)}\sum_{i,j=2}^NW(x_i-x_j)+V(x_1))}}. $$ Therefore, by \eqref{aprioriM_N}, we can show \eqref{eq:decomposition} by showing that \begin{equation}\label{eq:intermsofuN} \lim_{N\to\infty}\int_{\big(\mathbb T^d\big)^{N-1}} (u^N)^2M_{N-1}\;\dx{x}_2...\dx{x_N}-\left(\int_{\big(\mathbb T^d\big)^{N-1}} u^NM_{N-1}\;\dx{x}_2...\dx{x_N}\right)^2=0. \end{equation} This will follow from the chaoticity assumption on $M_N$ and a version of the Arzela--Ascoli theorem for the limit of symmetric functions, where we employ an idea that was proposed by Lions \cite{lions2007mean} in the context of mean field games (cf.~\cite{cardialaguetnotes,Gol13}). We show that the sequence of functions $\{u^N\}_{N\in\mathbb N}$ induces a compact sequence $\{U^N\}_{N\in\mathbb N}\subset C(\mathbb T^d\times \mathcal{P}(\mathbb T^d))$ and that \eqref{eq:intermsofuN} can be written in terms of the limit of $U^N$. We start by noticing that $u_N$ is continuous and symmetric in the variables $x_2$ through $x_N$ such that there exists $C(\beta,W,V)$ such that \begin{equation} \norm{u^N}_{\ensuremath{{L}}^{\infty}((\mathbb T^d)^N)}\le C,\qquad|\nabla_{x_1} u^N|\le C \qquad\mbox{and}\qquad |\nabla_{x_j} u^N|\le \frac{C}{N} \quad x_j \neq x_1 \, . \end{equation} Using the symmetry of $u^N$ and the previous bound, we can estimate \begin{equation} \begin{array}{rl} \displaystyle |u^N(x_1,x_2,...,x_N)-u^N(y_1,...,y_N)|&\displaystyle =|u^N(x_1,x_{\sigma(2)},...,x_{\sigma(N)})-u^N(y_1,...,y_N)|\\ & \displaystyle\le C d_{\mathbb T^d}(x_1,y_1)+\frac{C}{N}\sum_{i=2}^N d_{\mathbb T^d}(x_{\sigma(i)},y_i), \end{array} \end{equation} with $\sigma$ an arbitrary permutation of the indices $\{2,3,...,N\}$. Taking the infimum over $\sigma$, we obtain that \begin{equation}\label{eq:moduN} |u^N(x_1,x_2,...,x_N)-u^N(y_1,...,y_N)|\le C\left(|x_1-y_1|+ d_1\left(\frac{1}{N-1}\sum_{i=2}^N\delta_{x_i},\frac{1}{N-1}\sum_{i=2}^N\delta_{y_i}\right)\right), \end{equation} where $d_1$ denotes the 1-Wasserstein distance on $\mathcal{P}(\mathbb T^d)$. For any $(x_1,\mu)\in \mathbb T^d\times\mathcal{P}(\mathbb T^d)$, we define \begin{equation}\label{eq:defUN} U^N(x_1,\mu):=\inf_{(z_2,..., z_N)\in \big(\mathbb T^d\big)^{N-1}} 2C d_1\left(\mu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)+ u^N(x_1,z_2,...,z_N) \in C^0(\mathbb T^d \times \mathcal{P}(\mathbb T^d)). \end{equation} It follows directly form \eqref{eq:moduN} that \begin{equation}\label{eq:UN=uN} U^N\left(x_1,\frac{1}{N-1}\sum_{i=2}^N\delta_{x_i}\right)= u^N(x_1,x_2,...,x_N). \end{equation} Using \eqref{eq:UN=uN} we can rewrite \eqref{eq:intermsofuN} as \begin{equation}\label{eq:intermsofUN} \lim_{N\to\infty}\int_{\mathcal{P}(\mathbb T^d)} (U^N)^2(x_1,\rho)\;d\hat{M}_{N-1}(\rho)-\left(\int_{\mathcal{P}(\mathbb T^d)} U^N(x_1,\rho)\;d\hat{M}_{N-1}(\rho)\right)^2=0, \end{equation} \noindent where $\hat{M}_{N-1}\in \mathcal{P}(\mathcal{P}(\mathbb T^d))$ is the empirical measure associated with $M_{N-1}$ as defined in Definition~\ref{def:empirical}. Next, we show that $U^N$ is Lipschitz with respect to the 1-Wasserstein distance, i.e. \begin{equation}\label{eq:LipUN} |U^N(x_1,\mu)-U^N(y_1,\nu)|\le 2C(d_{\mathbb T^d}(x_1,y_1)+d_1(\mu,\nu)). \end{equation} By the definition of $U^N(y_1,\nu)$, for every $\delta>0$ there exists $(z_2,...,z_N)$ such that $$ U^N(y_1,\nu)+\delta \ge 2C d_1\left(\nu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)+ u^N(y_1,z_2,...,z_N). $$ By the definition of $U^N(x_1,\mu)$, the Lipschitz property of $u^N$ \eqref{eq:moduN}, and the triangle inequality for $d_1$, we have $$ \begin{array}{rl} \displaystyle U^N(x_1,\mu) &\displaystyle\le 2C d_1\left(\mu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)+ u^N(x_1,z_2,...,z_N)\\ &\displaystyle \le Cd_{\mathbb T^d}(x_1,y_1)+ 2C d_1\left(\mu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)+ u^N(y_1,z_2,...,z_N)\\ &\displaystyle \le Cd_{\mathbb T^d}(x_1,y_1)+ 2C \left(d_1\left(\mu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)-d_1\left(\nu, \frac{1}{N-1}\sum_{i=2}^N \delta_{z_i}\right)\right)+ U^N(y_1,\nu)+\delta\\ &\displaystyle \le Cd_{\mathbb T^d}(x_1,y_1)+ 2Cd_1(\mu,\nu)+ U^N(y_1,\nu)+\delta. \end{array} $$ Using the fact that $\delta>0$, $(x_1,\mu)$ and $(y_1,\nu)$ are arbitrary, \eqref{eq:LipUN} follows. Due to the compactness of $\mathbb T^d$, the space $\mathbb T^d\times \mathcal{P}(\mathbb T^d)$ equipped with the metric $d_{\mathbb T^d}+d_1$ is also compact. Therefore, by the Arzela--Ascoli theorem and the uniform Lipschitz bound in~\eqref{eq:LipUN}, we have that, up to subsequence, there exists $U\in C^0(\mathbb T^d\times \mathcal{P}(\mathbb T^d))$ such that \begin{equation} \lim_{N\to\infty}\|U^N-U\|_{C^0(\mathbb T^d\times \mathcal{P}(\mathbb T^d))}=0. \end{equation} Finally, we use the assumption that $\hat{M}_{N-1}\to \delta_{\tilde{\nu}^{\min}}\in\mathcal{P}(\mathcal{P}(\mathbb T^d))$ (see Remark~\ref{rmk:chaoticity}), to obtain that, up to subsequence, $$ \begin{array}{l} \displaystyle \lim_{N\to\infty}\int_{\mathcal{P}(\mathbb T^d)} (U^N)^2(x_1,\rho)\;d\hat{M}_{N-1}(\rho)-\left(\int_{\mathcal{P}(\mathbb T^d)} U^N(x_1,\rho)\;d\hat{M}_{N-1}(\rho)\right)^2\\ \qquad\qquad\displaystyle=\int_{\mathcal{P}(\mathbb T^d)} U^2(x_1,\rho)\;d\delta_{\tilde{\nu}^{\min}}(\rho)-\left(\int_{\mathcal{P}(\mathbb T^d)} U(x_1,\rho)\;d\delta_{\tilde{\nu}^{\min}}(\rho)\right)^2 \\ \qquad\qquad\displaystyle= U^2(x_1,\tilde{\nu}^{\min})-U^2(x_1,\tilde{\nu}^{\min})\\ \qquad\qquad\displaystyle=0. \end{array} $$ As the limit is independent of the subsequence we have chosen, we obtain \eqref{eq:intermsofUN}, which implies \eqref{eq:decomposition}. \vspace{0.2cm} \textit{Step 3.} Now we are ready to pass to the limit in the Poisson equation \eqref{eq:poisson1}. As the dimension where the problem is posed grows, we consider test functions that depend on a finite number of variables. We take some $\varphi\in [C^1(\mathbb T^d)]^d$ and consider its trivial extension to $\big(\mathbb T^d\big)^N$ to test the first $d$ equations in \eqref{eq:poisson1}: \begin{equation}\label{eq:test1} \int_{\big(\mathbb T^d\big)^N}M_N(x) \nabla \Psi^N(x): \nabla_{x_1}\varphi \;\dx{x}=\int_{\big(\mathbb T^d\big)^N} M_N(x)\nabla_{x_1}\cdot \varphi(x_1)\;\dx{x}, \end{equation} where $\nabla \Psi^N(x): \nabla_{x_1}\varphi$ denotes the inner product between matrices and we notice that $\nabla_{x_1} \varphi$ has non-trivial entries only for $1\le i,$ $j\le d$. Integrating the variables $x_2$ to $x_N$ in the right hand side of \eqref{eq:test1} we obtain \begin{equation}\label{eq:test2} \int_{\big(\mathbb T^d\big)^N} M_N(x)\nabla_{x_1}\cdot \varphi(x_1)\;\dx{x}=\int_{\mathbb T^d} (M_N)_1(x_1)\nabla_{x_1}\cdot \varphi(x_1)\;\dx{x}_1, \end{equation} where $(M_N)_1$ is the first marginal of $M_N$. For the left hand side of \eqref{eq:test1}, we notice that by \textit{Step 1.} \eqref{aprioriPsi} and \textit{Step 2.} \eqref{eq:decomposition} we can exchange $M_N$ in the integrand by the product $M_{N-1}(M_N)_1$ \begin{equation}\label{eq:test3} \begin{array}{l} \displaystyle \left|\int_{\big(\mathbb T^d\big)^N}(M_N-M_1 M_{N-1}) \nabla_{x_1} \Psi^N: \nabla_{x_1}\varphi\;\dx{x}\right|\\ \qquad\displaystyle\le \|\varphi\|_{C^1}\sum_{i=1}^d \int_{\big(\mathbb T^d\big)^N}\left(\frac{M_N}{M_{N-1}}-M_1 \right) |\nabla_{x_1} \Psi_i^N|M_{N-1}\;\dx{x} \\ \qquad\displaystyle\le \|\varphi\|_{C^1}\sum_{i=1}^d \|\nabla_{x_1} \Psi_i^N|\|_{L^2(M_{N-1})} \int_{\mathbb T^d}\left(\int_{\big(\mathbb T^d\big)^{N-1}} \left(\frac{M_N}{M_{N-1}}-(M_N)_1\right)^2M_{N-1}\;\dx{x}_2...\dx{x_N}\right)\;\dx{x}_1,\\ \qquad\displaystyle=o(1)\stackrel{N\to\infty}{\to}0, \end{array} \end{equation} where in the last equality we have used \eqref{eq:decomposition} and that $$ \sup_{x_1 \in \mathbb T^d}\left|\int_{\big(\mathbb T^d\big)^{N-1}} \left(\frac{M_N}{M_{N-1}}-(M_N)_1\right)^2M_{N-1}\;\dx{x}_2...\dx{x_N}\right|<C \, , $$ independently of $N$ to be able to apply Lebesgue dominated convergence to pass to the limit in the outer integral. Hence, putting together \eqref{eq:test1}, \eqref{eq:test2} and \eqref{eq:test3} we obtain \begin{equation}\label{eq:poisson2} \int_{\mathbb T^d}(M_N)_1 \nabla_{x_1} \left(\int_{\big(\mathbb T^d\big)^{N-1}}\Psi^N M_{N-1}\;\dx{x}_2...\dx{x_N}\right): \nabla_{x_1} \varphi\;\dx{x}_1=-\int_{\mathbb T^d} (M_N)_1\nabla_{x_1}\cdot \varphi\;\dx{x}_1+o(1). \end{equation} To pass to the limit in \eqref{eq:poisson2}, we use of the a priori estimates which we proved in \textit{Step 1.}, \eqref{aprioriPsi} and \eqref{aprioriM_N}, which say that there exists $C>0$ such that for every $N\in \mathbb N$ and $i\le d$ we have $$ \norm*{\int_{\big(\mathbb T^d\big)^{N-1}}\Psi^N_i M_{N-1}\;\dx{x}_2...\dx{x_N}}_{H^1(\mathbb T^d)}\le C\qquad\mbox{and}\qquad \|(M_N)_1\|_{C^1(\mathbb T^d)}\le C. $$ Note that we have used the Poincar\'e inequality on $\mathbb T^d$ to extend the gradient bound from~\eqref{aprioriPsi} to an $\ensuremath{{H}}^1(\mathbb T^d)$ bound uniform in $N$. Moreover, by the chaoticity assumption $M_N\to \delta_{\tilde{\nu}^{\min}}$ (see Remark~\ref{rmk:chaoticity}) we can conclude that as $N\to\infty$ we have $(M_N)_1\to \tilde{\nu}^{\min}$ in $C^0(\mathbb T^d)$. Then, passing to the limit in \eqref{eq:poisson2} we can see that any weak-$H^1$ accumulation point $\Psi^{\min}\in [H^1(\mathbb T^d)]^d$ of the function $$ \left(\int_{\big(\mathbb T^d\big)^{N-1}}\Psi^N_1M_{N-1}\;\dx{x}_2...\dx{x_N},...,\int_{\big(\mathbb T^d\big)^{N-1}}\Psi^N_dM_{N-1}\;\dx{x}_2...\dx{x_N}\right) \, , $$ satisfies the equation $$ \int_{\mathbb T^d} \tilde{\nu}^{\min} \nabla_{x_1}\Psi^{\min} : \nabla_{x_1}\varphi\;\dx{x}_1=-\int_{\mathbb T^d} \tilde{\nu}^{\min}\nabla_{x_1}\cdot \varphi\;\dx{x}_1 $$ with the condition $$ \int_{\mathbb T^d} \Psi^{\min} \tilde{\nu}^{\min}\;\dx{x}_1=0, $$ which follows from passing to the limit in \eqref{eq:zeroavg} in the same fashion as above. This uniquely determines the limit $\Psi^{\min}$. Therefore, up to exchanging the coordinates, we can pass to the limit in the diagonal of \eqref{eq:effAN}. That is to say for every set of indices $i$, $j$ satisfying $(k-1)d\le i,\;j\le kd$, we have \begin{equation}\label{eq:limAeff1} A^{\mathrm{eff},N}_{i,j}\to \int_{\mathbb T^d} \beta^{-1} \bra*{\delta_{i,j} + \partial_{\tilde{j}} \Psi_{\tilde{i}}^{\min}}\;\dx{\tilde{\nu}^{\min}}, \end{equation} where $\tilde{i}$ and $\tilde{j}$ are respectively $i$ and $j$ modulo d. We also notice that using the a priori estimate \eqref{aprioriPsi}, we have that for every pair of indices $i$ and $j$ satisfying $(k_1-1)d\le i\le k_1d$ and $(k_2-1)d\le j\le k_2d$ with $k_1\ne k_2$ \begin{equation}\label{eq:limAeff2} |A^{\mathrm{eff},N}_{i,j}|\le \frac{1}{N-1} \stackrel{N \to \infty}{\to}0 \,. \end{equation} \vspace{0.2cm} \textit{Step 4.} Finally, we show that we can pass to the limit in the equation \begin{equation}\label{eq:rhoN} \partial_t \rho^{N,*}=\nabla\cdot (A^{\mathrm{eff},N} \nabla\rho^{N,*}) \qquad\mbox{on $(0,\infty)\times \big(\mathbb R^d\big)^N$} \,. \end{equation} We consider a test function $\varphi\in C^2\big((\mathbb R^d)^{n}\big)$ and extend it trivially to $C^2\big((\mathbb R^d)^{N}\big)$. Testing \eqref{eq:rhoN} against $\varphi$ we obtain that for every $t>0$ \begin{equation} \int_{(\mathbb R^d)^{N}}\varphi \rho^{N}(t)\;\dx{x}-\int_{(\mathbb R^d)^{N}}\varphi \rho^{N}(0)\;\dx{x}=\int_0^t\int_{(\mathbb R^d)^{N}} \nabla\cdot (A^{\mathrm{eff},N} \nabla\varphi)\rho^{N,*}(s)\;\dx{x}\dx{s}. \end{equation} Next, we use that $\varphi$ only depends on the first $nd$ variables to obtain \begin{equation}\label{eq:testn} \int_{(\mathbb R^d)^{n}}\varphi \rho_n^{N}(t)\;\dx{z}-\int_{(\mathbb R^d)^{n}}\varphi \rho_n^{N}(0)\;\dx{z}=\int_0^t\int_{(\mathbb R^d)^{n}} \nabla\cdot ([A^{\mathrm{eff},N}]_{1\le i,j\le nd} \nabla\varphi)\rho_n^N(s)\;\dx{z}\dx{s}, \end{equation} where $\rho_n^N\in\mathcal{P}((\mathbb R^d)^n)$ is the $n$-th marginal of $\rho^{N,*}$ and $[A^{\mathrm{eff},N}]_{1\le i,j\le nd}\in \mathbb R^{nd\times nd}$ is the first $nd\times nd$ coordinates of $A^{\mathrm{eff},N}$. Therefore, $\rho_n^N$ is a weak solution of \begin{equation} \partial_t \rho^{N,*}_n=\nabla\cdot ([A^{\mathrm{eff},N}]_{1\le i,j\le nd}\nabla\rho_n^N) \qquad\mbox{on $(0,\infty)\times \big(\mathbb R^d\big)^n$.} \end{equation} By \textit{Step 3.}, we note that $$ [A^{\mathrm{eff},N}]_{1\le i,j\le nd}\to [A^{\infty,\mathrm{eff}}_{\min}]_{1\le i,j\le nd} $$ where $A^{\infty,\mathrm{eff}}_{\min}\in \mathbb R^{\infty\times\infty}$ denotes the matrix which if considered in $d\times d$ blocks is diagonal, which has the constant matrix \begin{equation} A^{\mathrm{eff}}_{\min}=\beta^{-1}\int_{\mathbb T^d} ( I + \nabla \Psi^{\min})\;\dx{\tilde{\nu}^{\min}}\in \mathbb R^{d\times d}, \end{equation} which is non-degenerate elliptic by Remark~\ref{rem:nondegenerate}. Therefore, for $N$ large enough $[A^{\mathrm{eff},N}]_{1\le i,j\le nd}$ is uniformly elliptic and we can use standard parabolic techniques to obtain compactness of the curve $\rho^{N,*}_n$ in $C([0,T];\mathcal{P}((\mathbb R^d)^n))$. By \textit{Step 3.}, we can use \eqref{eq:limAeff1} and \eqref{eq:limAeff2} to pass to the limit \eqref{eq:testn} and obtain \begin{equation}\label{eq:inftyn} \int_{(\mathbb R^d)^{n}}\varphi \rho_n^{\infty}(t)\;\dx{z}-\int_{(\mathbb R^d)^{n}}\varphi \rho_n^{\infty}(0)\;\dx{z}=\int_0^t\int_{(\mathbb R^d)^{n}} \nabla\cdot ([A^{\infty,\mathrm{eff}}_{\min}]_{1\le i,j\le nd} \nabla\varphi)\rho_n^\infty(s)\;\dx{z}\dx{s}. \end{equation} Equation \eqref{eq:inftyn} completely characterises $\lim_{N\to\infty}\rho^{N,*}_n$. In particular, we notice that $$ \rho_n^\infty=(S_t^{\min}\#X_0)^{\otimes n}, $$ where $S_t^{\min}:\mathcal{P}(\mathbb R^d)\to\mathcal{P}(\mathbb R^d)$ is the solution semigroup associated to $$ \partial_t\rho=\nabla\cdot(A^{\mathrm{eff}}_{\min}\nabla\rho)\qquad\mbox{on $(0,\infty)\times \mathbb R^d$.} $$ As the marginals characterise $\lim_{N\to\infty}\rho^{N,*}(t)=X(t)\in\mathcal{P}(\mathcal{P}(\mathbb R^d))$ (cf. \cite[Lemma 3]{carrillo2019proof}), we obtain the desired result $$ X(t)=S_t^{\min}\#X_0. $$ Combining this with Theorem~\ref{diffusivelimit}, we have that, for a fixed $t>0$, the solution $\rho^{\varepsilon,N}(t)$ of~\eqref{eq:LinearKolmogorov} satisfies \begin{align} \lim_{N \to \infty}\lim_{\varepsilon \to 0} \rho^{\varepsilon,N}(t)= \lim_{N \to \infty}\rho^{N,*}(t) = X(t)= S_t^{\min}\#X_0 \, . \end{align} \section{Proofs of Section~\ref{S:explicit}}\label{sec:phase} In this section we include the proofs of Corollary~\ref{cor:2}, Corollary~\ref{cor:1} and Lemma~\ref{phase transition}. \begin{proof}[Proof of Corollary~\ref{cor:2}] The proof follows by combining Corollary~\ref{cor:beforephasetransition} and Lemma~\ref{Uniformexponentialconvergence}. Indeed, we can first apply Theorem~\ref{thm:variabledata} which gives us: \begin{align} \lim_{N \to \infty}\lim_{\varepsilon \to 0} \rho^{\varepsilon,N} = S_t^* \# X_0 \, . \end{align} However, from Lemma~\ref{Uniformexponentialconvergence}, we know that~\eqref{periodiceps=1} can have only one steady state. But Propositions~\ref{tfae} and~\ref{uniqueness} tell us that steady states must be minimisers and minimisers always exist. Thus, for $\beta \in (0,\beta_0]$, we have that $\tilde{\nu}^*=\tilde{\nu}^{\min}$, the unique minimiser. It follows that: \begin{align} \lim_{N \to \infty}\lim_{\varepsilon \to 0} \rho^{\varepsilon,N} = S_t^* \# X_0=S_t^{\min}\# X_0 \, . \end{align} The limit the other way around follows by applying Theorem~\ref{thm: N then eps} and using the fact that $\tilde{E}_{MF}$ has a unique minimiser. \end{proof} \begin{proof}[Proof of Corollary~\ref{cor:1}] Since $\lim_{\varepsilon \to 0} \varepsilon^{-d}\rho_0(\varepsilon^{-1}x)= \delta_0 \in \mathcal{P}(\mathbb R^d)$, one can check that \begin{align} \lim_{N \to \infty} \lim_{\varepsilon \to 0} \rho_0^{\varepsilon,N}= \lim_{\varepsilon \to 0}\lim_{N \to \infty} \rho_0^{\varepsilon,N}=\delta_{\delta_0}=X_0 \, . \end{align} The proof of the limit $\varepsilon \to 0$ followed by $N \to \infty$ follows by simply applying Theorem~\ref{thm: N then eps} and using the fact that for $\beta<\beta_c$, $\tilde{E}_{MF}$ has a unique minimiser $\tilde{\nu}^{\min}$(cf. Definition~\ref{pt} and Proposition~\ref{tfae}). For the other limit, since the initial data $\rho_0^{\varepsilon,N}$ is rapidly varying, the corresponding initial data for~\eqref{eps=1} is precisely $\rho_0^{\otimes N}$ and is independent of $\varepsilon>0$. Thus we need to show that~\eqref{exponential convergence} holds for some fixed initial data $\tilde{\nu}_0 \in \mathcal{P}(\mathbb T^d)$ independent of $\varepsilon>0$. Here $\tilde{\nu}_0$ is the periodic rearrangement of $\rho_0$. We will prove this by using the fact that if $\beta<\beta_c$, then~\eqref{periodiceps=1} has a unique steady state, namely $\tilde{\nu}_\infty \equiv 1 $. This follows simply from our definition of a phase transition and by plugging $\tilde{\nu}_\infty$ into the right hand side of~\eqref{periodiceps=1}. We divide the proof into two steps. In~\textit{Step 1}, we show that solutions of~\eqref{periodiceps=1} enjoy certain compactness properties and converge to $\tilde{\nu}_\infty$ along some time-divergent subsequences. In~\textit{Step 2}, we will show that if $\tilde{\nu}_0$ is close to $\tilde{\nu}_\infty$ in an appropriate topology, then this convergence happens exponentially fast and along the whole trajectory, if $\beta<\beta_c$. Combining these together will then establish~\eqref{exponential convergence}. \textit{Step 1.} By parabolic regularity theory, for any positive time $t>0$ the solution $\tilde{\nu}(t)$ of~\eqref{periodiceps=1} is smooth for any positive time. Thus we can assume without loss of generality that $\tilde{\nu}_0 \in C^\infty(\mathbb T^d)$. Furthermore, as discussed in Section~\ref{gradientflow},~\eqref{periodiceps=1} is a gradient flow of $\tilde{E}_{MF}$ with respect to the 2-Wasserstein metric $d_2$ on $\mathcal{P}(\mathbb T^d)$. It follows from~\cite[Theorem 11.1.3]{ambrosio2008gradient}, that we have the following energy-dissipation identity along solutions of~\eqref{periodiceps=1}: \begin{align} \frac{\dx{}}{\dx{t}} \tilde{E}_{MF}[\tilde{\nu}(t)]=-D(\tilde{\nu}(t))=- \intt{\abs*{\nabla \log\frac{\tilde{\nu(t)}}{e^{-\beta W \ast \tilde{\nu}(t)}}}^2 \tilde{\nu}} \, . \end{align} Integrating from $0$ to $\infty$ and using the fact that the periodic mean field free energy $\tilde{E}_{MF}$ is bounded below, we obtain: \begin{align} \int_0^\infty \intt{\abs*{\nabla \log\frac{\tilde{\nu(t)}}{e^{-\beta W \ast \tilde{\nu}(t)}}}^2 \tilde{\nu(t)}} \, \dx{t} \leq C \, , \end{align} for some constant $C>0$. Thus, there must exist a sequence of times $t_n \to \infty$ such that \begin{align} \lim_{n \to \infty} \intt{\abs*{\nabla \log\frac{\tilde{\nu(t_n)}}{e^{-\beta W \ast \tilde{\nu}(t_n)}}}^2 \tilde{\nu(t_n)}} =0 \, . \end{align} Since $\abs{\nabla W \ast \tilde{\nu}(t)} \leq \norm{\nabla W}_{\ensuremath{{L}}^\infty(\mathbb T^d)}$, the above limit implies the following bound along the sequence $t_n$: \begin{align} \intt{\abs*{\nabla \sqrt{\tilde{\nu}(t_n)}}^2} = \intt{\abs*{\nabla \log \tilde{\nu}(t)}^2 \tilde{\nu}(t_n)} \leq C \, . \end{align} Using the fact that $\tilde{\nu}(t) \in \mathcal{P}(\mathbb T^d)$, we have that $\norm*{\sqrt{\tilde{\nu}(t_n)}}_{\ensuremath{{H}}^1(\mathbb T^d)} \leq C$. Thus, there exists a subsequence of times $t_{n_k}$ and a function $f \in \ensuremath{{H}}^1(\mathbb T^d)$ such that \begin{align} \sqrt{\tilde{\nu}(t_{n_k})} \stackrel{k \to \infty}{\to} f \quad \textrm{strongly in }\ensuremath{{L}}^2(\mathbb T^d), \textrm{ weakly in } \ensuremath{{H}}^1(\mathbb T^d) \, . \end{align} Furthermore, we have that \begin{align} \norm*{\tilde{\nu}(t_{n_k})- f^2}_{\ensuremath{{L}}^1(\mathbb T^d)} &= \norm*{\bra*{\sqrt{\tilde{\nu}(t_{n_k})} + f }\bra*{\sqrt{\tilde{\nu}(t_{n_k})} - f}}_{\ensuremath{{L}}^1(\mathbb T^d)}\\ & \leq \norm*{\sqrt{\tilde{\nu}(t_{n_k})} + f }_{\ensuremath{{L}}^2(\mathbb T^d)} \norm*{\sqrt{\tilde{\nu}(t_{n_k})} - f }_{\ensuremath{{L}}^2(\mathbb T^d)} \\&\leq \norm*{ f }_{\ensuremath{{L}}^2(\mathbb T^d)} \norm*{\sqrt{\tilde{\nu}(t_{n_k})} - f }_{\ensuremath{{L}}^2(\mathbb T^d)} \stackrel{k \to \infty}{\to}0 \, . \end{align} Thus, $\intt{f^2}=1, f^2 \geq 0$, and thus $f^2 \in \mathcal{P}(\mathbb T^d)$. One can also check that the dissipation is lower semicontinuous with respect to $\ensuremath{{L}}^1$ convergence. Thus \begin{align} \intt{\abs*{\nabla \log\frac{\tilde{f^2}}{e^{-\beta W \ast f^2}}}^2 f^2} \leq \liminf_{k \to \infty} \intt{\abs*{\nabla \log\frac{\tilde{\nu(t_{n_k})}}{e^{-\beta W \ast \tilde{\nu}(t_{n_k})}}}^2 \tilde{\nu(t_{n_k})}}=0 \,. \end{align} It follows then that $D(f^2)=0$ and from Proposition~\ref{tfae}, that $f^2 \in \mathcal{P}(\mathbb T^d)$ is a steady state of~\eqref{periodiceps=1}. Since $\tilde{\nu}_\infty$ is the only stationary solution for $\beta<\beta_c$, it must hold that $f^2 = \tilde{\nu}_\infty$ and that \begin{align} \lim_{k \to \infty}\norm*{\tilde{\nu}_{t_{n_k}}-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1(\mathbb T^d)}=0 \, . \end{align} \textit{Step 2.}We now use~\cite[Theorem 2.11]{CP10} which tells us that if $\beta<\beta_*:=-(\min_{k} \hat{W}(k))^{-1}$ and $\norm{\tilde{\nu}_0-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}}< \varepsilon_0$, then \begin{align} \norm{\tilde{\nu}(t)-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}} \leq \norm{\tilde{\nu}_0-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}}e^{-Ct} \, , \end{align} for some $C>0$, $\varepsilon_0>0$, and all $t \geq 0$. Since we know from the previous step that $\lim_{k \to \infty}\norm{\tilde{\nu}(t_{n_k})-\tilde{\nu}_\infty} = 0$, there must exist some time $T>0$ such that $\norm{\tilde{\nu}(T)-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}}< \varepsilon_0$. We also know from~\cite[Proposition 5.3]{CGPS19} that $\beta_c\leq \beta_*$. Thus for all $\beta<\beta_c$, we have that \begin{align} \norm{\tilde{\nu}(t)-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}} \leq C_T e^{-C(t-T)} \, , \end{align} where $C_T:= \max_{s \in [0,T]}\norm{\tilde{\nu}(s)-\tilde{\nu}_\infty}_{\ensuremath{{L}}^1\bra{\mathbb T^d}} \leq 2$. Thus, we have shown that~\eqref{exponential convergence} holds, completing the proof of the first part of the result. We remind the reader that $W \in \mathbf{H}_s$ means that $\hat{W}(k)\geq 0$ for all $k \in \mathbb Z^d$. For the second half of the result, we use the fact $W \in \mathbf{H}_s$ implies, by Proposition~\ref{expt}, that $\beta_c= +\infty$ and thus the result of the corollary necessarily holds for all $\beta<+\infty$ and rapidly varying initial data. We now sketch how to extend the result to all chaotic initial data. We note that by applying Duhamel's formula for the solution of~\eqref{periodiceps=1} one can show that there exists a time, say $t'=1>0$, such that for all initial data $\mathcal{H}(\tilde{\nu}(1)|\tilde{\nu}_\infty)<C$ for some fixed constant $C \geq 0$. Additionally, we can apply~\cite[Proposition 3.1]{CGPS19}, to assert that for $W \in \mathbf{H}_s$ and all $\beta<\infty$ , we have that \begin{align} \mathcal{H}(\tilde{\nu}(t)|\tilde{\nu}_\infty) \leq \mathcal{H}(\tilde{\nu}(1)|\tilde{\nu}_\infty) e^{-C_1(t-1)} \, , \end{align} for all $t \geq 1$. Since the relative entropy controls the $2$-Wasserstein distance, we can apply Corollary~\ref{cor:beforephasetransition} to complete the proof of the result. \end{proof} \begin{proof}[Proof of Lemma~\ref{phase transition}] We know from Proposition~\ref{tfae} that steady states of the quotiented periodic system~\eqref{periodiceps=1} are equivalent to solutions of the self-consistency equation~\eqref{eq:critical point}, which we rewrite as \begin{align} \tilde{\nu} =\frac{e^{-\beta (V + W\ast\tilde{\nu})}}{Z}, \quad Z= \intto{e^{-\beta (V + W\ast\tilde{\nu})}} \, . \label{cp2} \end{align} We also know from Proposition~\ref{uniqueness} that for $\beta$ sufficiently small the map in the above expression has a unique fixed point. Thus~\eqref{periodiceps=1} has a unique steady state for $\beta$ sufficiently small. Since minimisers of $\tilde{E}_{MF}$ exist and are always steady states (cf. Propositions~\ref{uniqueness} and~\ref{tfae}), it must also be the unique minimiser of $\tilde{E}_{MF}$. We argue further that any minimiser of $\tilde{E}_{MF}$ must be symmetric about $x=1/2$ and decreasing from $0$ to $1/2$. This follows directly from the Baernstein--Taylor inequality for spherical rearrangements of functions~\cite{BT76}. To investigate the problem ahead of the phase transition, we consider ~\eqref{cp2}. Plugging our choice of $V$ and $W$ and testing against $\cos(2 \pi x)$ we can simplify this to \begin{align} \tilde{\nu}_1 =Z^{-1} \intt{\cos(2 \pi x) \exp\bra*{\beta\bra*{\cos(2 \pi x)(\eta + \tilde{\nu}_1 ) + \sin(2 \pi x) \tilde{\nu}_{-1}}}} \, , \end{align} where $\tilde{\nu}_1= \skp{\tilde{\nu}, \cos(2 \pi x)}$ and $\tilde{\nu}_{-1}= \skp{\tilde{\nu}, \sin(2 \pi x)}$. Let us consider the problem when $\tilde{\nu}_{-1}=0$, as this corresponds to the setting when $\tilde{\nu}$ is symmetric about $x=1/2$. Simplifying further we obtain: \begin{align} \tilde{\nu}_1 =Z^{-1} \intt{\cos(2 \pi x) \exp\bra*{\beta\bra*{\cos(2 \pi x)(\eta + \tilde{\nu}_1 ) }}} \, . \end{align} Using the fact the modified Bessel functions of the first kind can be expressed as $I_n(y)=\intto{\cos(2 \pi n x)e^{y \cos(2 \pi x)}}$, we obtain: \begin{align} \tilde{\nu}_1=r_0\bra*{\beta(\eta+ \tilde{\nu}_1)} \end{align} where $r_0(x):=I_1(x)/I_0(x)$, and $I_1$,$I_0$ are first and zeroth modified Bessel functions of the first kind. Setting $\beta(\eta + \tilde{\nu}_1)=a$ we simplify the above expression to \begin{align} a= \beta(\eta + r_0(a)) \, . \label{simplified} \end{align} The function $r_0(a)$ has the following properties~\cite[Proposition 6.1]{CGPS19}: \begin{align} r_0(0)&=0 \\ \lim_{a \to \infty} r_0(a)&= 1 \quad \lim_{a \to -\infty} r_0(a)=-1 \label{r0-}\\ r_0''(a)&<0 , \quad a>0 \label{r''} \end{align} Note that only solutions of~\eqref{simplified} with $a\geq0$ can be minimisers of the free energy, as for $a < 0$ the solutions are increasing from $0$ to $1/2$. We argue now that~\eqref{simplified} has exactly one solution for $a>0$, for all $\beta>0$. Consider the function $F: \mathbb R \to \mathbb R$ defined as follows \begin{align} F(a):= \beta(\eta + r_0(a)) -a \, . \end{align} We know that $F(0)= \beta \eta >0$. Furthermore for $a$ large enough and positive we have that $F(a)<0$, using~\eqref{r0-}. Thus, by the intermediate value theorem, for every fixed $\beta>0$, we can find at least one $a^{\min}>0$ such that $F(a^{\min})=0$. Now if $F(a^{\min})=0$ for some $a^{\min}>0$, we must have that $\beta r_0'(a^{\min})<1$. If not, we would have that \begin{align} F(a^{\min})&= \beta \eta + \int_0^{a^{\min}}(\beta r_0'(a)-1) \dx{a} \\ & \geq \beta \eta + a^{\min}(\beta r_0'(a^{\min})-1) >0 \, , \end{align} which is a contradiction. In the last inequality we have used~\eqref{r''}. This implies that \begin{align} F'(a^{\min})=\beta r_0'(a^{\min})-1 <0 \, . \end{align} Also \begin{align} F''(a)=\beta r_0''(a) <0 \, . \end{align} Thus once $F'(a)<0$ it remains negative for all $a>0$. It follows that $F(a^{\min})=0$ for only one $a^{\min}>0$. Since this is the only symmetric decreasing solution of~\eqref{eq:critical point} it corresponds to the unique minimiser of $\tilde{E}_{MF}$ through the expression in~\eqref{min1}. It is also must be the unique steady state obtained using the contraction argument earlier in the proof. We will now show that for $\beta$ large enough we can find another solution of~\eqref{simplified} for $a<0$. Let $\eta=1-\delta$ for some $\delta \in (0,1)$. From~\eqref{r0-} we know that there exists some $a'<0 $ such that for all $a \leq a'$, $r_0(a)< -1+ \delta/2$. We then have that \begin{align} F(a')&= \beta -\beta \delta + \beta r_0(a') -a' \\ & <-\beta \frac{\delta}{2} -a' \, . \end{align} Furthermore , since $r_0(a)$ is an odd function and $\eta>0$, if $a^{\min}$ is a solution of~\eqref{simplified}, then $-a^{\min}$ cannot be a solution. It follows that $a^* \neq -a^{\min}$. \end{proof} \paragraph{\bf Acknowledgements:} MGD was partially supported by EPSRC grant number EP/P031587/1. RSG is funded by an Imperial College President's PhD Scholarship, partially through EPSRC Award Ref. 1676118. Part of this work was carried out at the {\emph ``Junior Trimester Programme in Kinetic Theory''} held at the Hausdorff Research Institute for Mathematics, Bonn. RSG is grateful to the institute for its hospitality. GAP was partially supported by the EPSRC through grant numbers EP/P031587/1, EP/L024926/1, and EP/L020564/1. This research was funded in part by JPMorgan Chase \& Co. Any views or opinions expressed herein are solely those of the authors listed, and may differ from the views and opinions expressed by JPMorgan Chase \& Co. or its affiliates. This material is not a product of the Research Department of J.P. Morgan Securities LLC. This material does not constitute a solicitation or offer in any jurisdiction. The authors would like to thank Martin Hairer and Felix Otto for useful discussions during the course of this work. \begin{appendix} \section{Coupling arguments}\label{ap:coupling} In this section we will use coupling techniques introduced by Eberle and co-authors~\cite{Ebe11,Ebe16,EGZ19,DEGZ18} to show some necessary results for our proofs. Following the previous strategy we construct a new metric which is equivalent to the Wasserstein metric. We define the constant \begin{align} \kappa := \inf_{x\in\mathbb T} V''(x)+ \inf_{x\in\mathbb T}W''(x)\le 0 \, , \end{align} which gives a lower bound of the semi-convexity of the function of $V$ and $V+W\ast \tilde{\nu}^*$ on $\mathbb T$. Next, we define the following functions on $[0,1/2]$: \begin{align}\label{eq:deff} \psi(r)&:= \exp \bra*{ \frac{\beta\kappa r^2}{8} } , && \Phi(r):= \int_0^r \psi(s) \dx{s} \, , \\ g(r)&:=1- \frac{c}{2}\int_0^r \Phi(s) \bra*{\psi(s)}^{-1} \dx{s}, && c:=\bra*{\int_0^{1/2} \Phi(s) \bra*{\psi(s)}^{-1} \dx{s}}^{-1}\ge \frac{\beta|\kappa|}{4\left(e^{\frac{\beta|\kappa|}{32}}-1\right)}\,. \end{align} We note that $g(r) \in [1/2,1]$ for all $r \in [0,1/2]$ and $\lim_{\beta\to0^+} c=1/8$. Additionally, both $\psi$ and $g$ are decreasing functions of $r$. Thus the function $f:[0,1/2] \to [0,1/2]$ defined as \begin{align} f(r)&:= \int_0^r g(s)\psi(s) \dx{s} \, , \end{align} is increasing and subadditive. Furthermore, we have the bounds \begin{align} \frac{\psi(1/2)}{2}r \leq f(r) \leq \Phi(r) \leq r \, .\label{dbounds} \end{align} Thus $d_f(x,y) := f(d_\mathbb T(x,y))$ defines a metric on $\mathbb T$ which is equivalent to $d_{\mathbb T}$. The main point of this construction is to obtain the following inequality \begin{align} f''(r) - \beta r \kappa \frac{f'(r)}{4 } \leq -\frac{c}{2} f(r)\qquad\mbox{for all $r \in [0,1/2]$.} \label{contraction inequality} \end{align} This easily follows from the following computation: \begin{align} f''(r)- \beta r \kappa \frac{f'(r)}{4} &= \beta r\frac{\kappa}{4} f'(r) -\frac{c}{2}\Phi(r) - \beta r \kappa \frac{f'(r)}{4}=-\frac{c}{2}\Phi(r) \leq -\frac{c}{2} f(r) \, . \end{align} Moreover, we define the Lipschitz functions $\varphi_r^\delta,\varphi_s^\delta: \mathbb R \to \mathbb R$ for some $\delta>0$, such that \begin{align}\label{eq:defphirdelta} (\varphi_r^\delta)^2(x) + (\varphi_s^\delta)^2(x)=1 \qquad \varphi_r^\delta(x) = \begin{cases} 0 & \gamma(\abs{x}) \leq \delta/2 \\ 1 & \gamma(\abs{x}) > \delta \end{cases} \end{align} where the function $\gamma:\mathbb R_+ \to [0,1/2]$ maps Euclidean distances to distances on the torus \begin{align} \gamma(\abs{x}) := \begin{cases} (\abs{x}\mod 1) & (\abs{x} \mod 1) \leq 1/2 \\ 1- (\abs{x} \mod 1) & \textrm{otherwise} \end{cases} \, . \end{align} The introduction of the function $\gamma$ to account for the periodic setting is the main difference with the results in the literature \cite{Ebe11,Ebe16,EGZ19,DEGZ18}. We have the following result: \begin{lemma}\label{coupling existence} Assume that~\eqref{exponential convergence} holds and consider the two SDEs in~\eqref{eq:mckeanSDEq} and~\eqref{eq:mckeanSDEs}. Then there exists a coupling of $(\dot{X}_t,\dot{Y}_t)$ and a metric $d_f$ on $\mathbb T^d$ which is equivalent to $d_{\mathbb T^d}$ such that \begin{align} \sup_{\varepsilon>0}\mathbb{E} \pra*{ d_{f}(\dot{X}_t,\dot{Y}_t)^2} \to 0 \end{align} as $t \to \infty$. \end{lemma} \begin{proof} For convenience we write the proofs in 1 space dimension. The generalization to higher dimensions follows along similar lines. We start the proof by using the metric $d_f$ defined previously. We now proceed to construct the coupling between the two processes by considering the corresponding processes on $\mathbb R$, i.e. $Y_t$ and $X_t$. We assume that $\mathrm{Law}(X_0)=\nu^* \in \mathcal{P}(\mathbb R)$ such that the periodic rearrangement of $\nu^*$ is precisely $\tilde{\nu}^*$. Let $B_t^1$ and $B_t^2$ be two independent standard Wiener processes which are also independent of the initial conditions. We then couple the processes in a similar manner to~\cite{EGZ19} as follows \begin{align} &\begin{cases} \dx{Y}_t &= - V'(Y_t)\dx{t} - W' \ast \tilde{\nu}^\varepsilon (t)(Y_t)\dx{t} + \sqrt{2 \beta^{-1}} \bra*{\varphi_r^\delta(E_t)dB^1_t +\varphi_s^\delta(E_t)dB_t^2} \\ \mathrm{Law}(Y_0)&= \nu_0^\varepsilon \in \mathcal{P}(\mathbb R) \, , \end{cases} \label{sde1}\\ &\begin{cases} \dx{X}_t &= -V'(X_t)\dx{t} - W' \ast \tilde{\nu}^* (X_t)\dx{t} + \sqrt{2 \beta^{-1}} \bra*{-\varphi_r^\delta(E_t)dB^1_t +\varphi_s^\delta(E_t)dB_t^2} \\ \mathrm{Law}(X_0)&= \nu^* \in \mathcal{P}(\mathbb R) \, . \end{cases} \label{sde2} \end{align} where $E_t:= Y_t-X_t$ and $X_0,Y_0$ are independent. This above coupling corresponds to a combination of reflection and synchronous coupling. Note that we have suppressed the dependence on $\delta$ for the sake of notational convenience. However, in the limit as $\delta \to 0_+$ the processes $X_t$ and $Y_t$ converge $\mathbb{P}$-a.s. to corresponding limits with only reflection coupling. We also define the following function \begin{align} e_t:= \begin{cases} \frac{E_t}{\abs{E_t}} & \abs{E_t}>0 \\ 0 & \textrm{otherwise} \end{cases} \, . \end{align} Subtracting ~\eqref{sde2} from~\eqref{sde1} and using the same arguments as in~\cite{EGZ19} we obtain \begin{align} \dx{\abs{E_t}}&=-\bra*{ V'(Y_t) + W' \ast \tilde{\nu}^\varepsilon (t)(Y_t) -V'(X_t) - W' \ast \tilde{\nu}^* (X_t)} (e_t) \dx{t} \\&+ 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \, . \end{align} Note now that the function $\mathbb R_+ \ni x \to \gamma(x)$ is a function whose derivatives are of locally bounded variation. Thus it can be expressed as the difference of two convex functions~\cite[Theorem (I)]{Har59}. We can thus apply the Meyer--Tanaka formula~\cite[Theorem 6.22]{KS91} to it, to obtain \begin{align} \gamma(\abs{E_t}) &= \gamma(\abs{E_0})-\int_0^t\gamma_\ell'(\abs{E_s})\bra*{ V'(Y_s) - W' \ast \tilde{\nu}^\varepsilon (s)(Y_s) -V'(X_s) - W' \ast \tilde{\nu}^* (X_s)} (e_s) \dx{s} \\&+\int_0^t\gamma_\ell'(\abs{E_s}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_s) e_s dB_s^1+\int_{\mathbb R_+} \Lambda_t(a) \dx{\gamma''_-}(a) \, , \end{align} where $\gamma'_\ell$ is the left derivative of $\gamma$, $\Lambda_t$ is the local time of the process $\abs{E_t}$, and $\gamma''_-$ is the negative part $\gamma''$ the distributional derivative of $\gamma$. We can throw away the positive part as $\varphi^\delta_r(0)=0$. The reader should note that $\gamma(\abs{E_t})=d_\mathbb T(\dot{X}_t,\dot{Y}_t)$, i.e. it is distance on the torus between the quotiented processes. Since the local time is an adapted non-decreasing continuous process it follows that $A_t:=\int_{\mathbb R_+} \Lambda_t(a) \dx{\gamma''_-}(a)$ is an adapted nonincreasing continuous process. Since $\gamma_t:=\gamma(\abs{E_t})$ is a continuous semimartingale we can apply Ito's formula to $f(\gamma_t)$ to obtain \begin{align} \dx{f}(\gamma_t) &= -f'(\gamma_t)\gamma_\ell'(\abs{E_t})\bra*{ V'(Y_t) + W' \ast \tilde{\nu}^\varepsilon (t)(Y_t) -V'(X_t) - W' \ast \tilde{\nu}^* (X_t)} (e_t) \dx{t} \\ &+ f'(\gamma_t) dA_t +\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \\ &+ 4 f''(\gamma_t) \beta^{-1} (\varphi_r^\delta(E_t))^2 (\gamma_\ell'(\abs{E_t}))^2 \dx{t} \end{align} Next, we note that since $f'(x)\geq 0$ and $A_t$ is nonincreasing we have the bound \begin{align} \dx{f}(\gamma_t) &\leq -f'(\gamma_t)\gamma_\ell'(\abs{E_t})\bra*{ V'(Y_t) + W' \ast \tilde{\nu}^* (Y_t) -V'(X_t) - W' \ast \tilde{\nu}^* (X_t)} (e_t) \dx{t} \\ &+ f'(\gamma_t)\gamma_\ell'(\abs{E_t})\bra*{ -W' \ast \tilde{\nu}^\varepsilon(t) (Y_t)+W' \ast \tilde{\nu}^* (Y_t)}(e_t)\\ & +\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \\ &+ 4 f''(\gamma_t)\beta^{-1} (\varphi_r^\delta(E_t))^2 \dx{t} \, \\ &\leq -f'(\gamma_t)\gamma_\ell'(\abs{E_t})\bra*{ V'(Y_t) + W' \ast \tilde{\nu}^* (Y_t) -V'(X_t) - W' \ast \tilde{\nu}^* (X_t)} (e_t) \dx{t} \label{ineq 2} \\ &+\norm{f'}_{\ensuremath{{L}}^\infty(\mathbb T)}\|\gamma_l'\|_{\ensuremath{{L}}^\infty(\mathbb T)}\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_2(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*) \dx{t}+\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \\ &+ 4 f''(\gamma_t)\beta^{-1} (\varphi_r^\delta(E_t))^2 \dx{t}, \end{align} where in the second inequality we have used the dual formulation of the $1$-Wasserstein distance. Consider now the $1$-periodic function $F:= V + W \ast \tilde{\nu}^*$, using the definition of $\gamma$ and $\kappa$ we have the inequality \begin{align} \gamma_\ell'(\abs{E_t})\bra*{ F'(Y_t) -F'(X_t)} (e_t) &\geq \kappa d_{\mathbb T}(\dot{X}_t,\dot{Y}_t)= \kappa \gamma_t \, . \end{align} \noindent Applying this estimate to~\eqref{ineq 2} and using the fact that $f'>0$ we obtain \begin{align} \dx{f}(\gamma_t) \leq& -\kappa f'(\gamma_t)\gamma_t \dx{t}+ 4 f''(\gamma_t)\beta^{-1} (\varphi_r^\delta(E_t))^2 \dx{t} \\&+\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_1(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*) \dx{t}+\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \, . \\ =&-\kappa f'(\gamma_t)\gamma_t (\varphi_r^\delta(E_t))^2 \dx{t}+ 4 f''(\gamma_t)\beta^{-1} (\varphi_r^\delta(E_t))^2 \dx{t} + \kappa f'(\gamma_t)\gamma_t ((\varphi_r^\delta(E_t))^2-1) \dx{t}\\ & +\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_1(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*)\dx{t} +\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \, . \end{align} Applying the differential inequality for $f$~\eqref{contraction inequality}, $f' \leq1$, and the definition of $\varphi_r^\delta$ \eqref{eq:defphirdelta} we obtain \begin{align} \dx{f}(\gamma_t) & \leq- 2c\beta^{-1}f(\gamma_t)(\varphi_r^\delta(E_t))^2 \dx{t}+ \frac{\abs{\kappa}}{2}\delta \dx{t}+\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_1(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*)\dx{t} \\&+\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \\ & \leq - 2c\beta^{-1}f(\gamma_t) \dx{t}+ 2c\beta^{-1}f(\delta) \dx{t}+ \frac{\abs{\kappa}}{2}\delta\dx{t} +\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_1(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*)\dx{t} \\&+\gamma_\ell'(\abs{E_t}) 2 \sqrt{2 \beta^{-1}} \varphi_r^\delta(E_t) e_t dB_t^1 \, . \end{align} Taking the expectation of the above expression and passing to the limit as $\delta \to 0^+$, we obtain \begin{align} \frac{\dx{}}{\dx{t}} \mathbb{E}\pra*{f(\gamma_t)} \leq - 2c\beta^{-1}\mathbb{E}\pra*{f(\gamma_t)} + \norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} d_1(\tilde{\nu}^\varepsilon(t),\tilde{\nu}^*) \, . \end{align} It follows by Gronwall's Lemma that \begin{align}\label{eq:ineqaux1} \mathbb{E}\pra*{f(\gamma_t)} \leq e^{-2 c \beta^{-1}t } \mathbb{E}\pra*{f(\gamma_0)} +\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} e^{-2 c \beta^{-1}t } \int_0^t e^{2 c \beta^{-1}s } d_1(\tilde{\nu}(t),\tilde{\nu}^{\min}) \dx{s} \, . \end{align} Applying~\eqref{exponential convergence}, we have that $\mathbb{E}\pra*{d_{\mathbb T}(\dot{X}_t,\dot{Y}_t)}=\mathbb{E}\pra*{f(\gamma_t)} \to 0$ as $t \to \infty$, $\dot{X}_t$ and $\dot{Y}_t$ are the quotiented processes obtained in the limit as $\delta \to 0_+$. This completes the proof. \end{proof} \begin{lemma}\label{Uniformexponentialconvergence} Given $V$ and $W$, there exists an explicit $\beta_0$ depending $V$ and $W$ such that for $$ \beta\le \beta_0 $$ there exists a unique minimiser and critical point, $\tilde{\nu}^{\min} \in \mathcal{P}(\mathbb T^d)$, of the periodic mean field energy \eqref{periodicmeanfieldenergy} and $C_2$ depending on $\beta$, $W$ and $V$ such that $$ d_2^2(\tilde{\nu}(t),\tilde{\nu}^{\min})\le e^{-C_2 t}, $$ where $\nu(t)$ is the solution to the periodic McKean--Vlasov equation \eqref{periodiceps=1} with arbitrary initial data $\tilde{\nu}_0 \in \mathcal{P}(\mathbb T^d)$. \end{lemma} \begin{proof} As done previously, we state the proof in $1$ dimension for the sake of simplicity. Clearly for $\beta$ small enough, by Proposition~\ref{uniqueness}, the periodic mean field energy has a unique minimiser, $\tilde{\nu}^{\min}$. Similar to the proof of \eqref{coupling existence}, we consider the processes on $\mathbb R$ \begin{align} &\begin{cases} \dx{Y}_t &= - V'(Y_t)\dx{t} - W' \ast \tilde{\nu} (t)(Y_t)\dx{t} + \sqrt{2 \beta^{-1}} \bra*{\varphi_r^\delta(E_t)dB^1_t +\varphi_s^\delta(E_t)dB_t^2} \\ \mathrm{Law}(Y_0)&= \nu_0 \in \mathcal{P}(\mathbb R) \, , \end{cases} \label{sde11}\\ &\begin{cases} \dx{X}_t &= -V'(X_t)\dx{t} - W' \ast \tilde{\nu}^{\min} (X_t)\dx{t} + \sqrt{2 \beta^{-1}} \bra*{-\varphi_r^\delta(E_t)dB^1_t +\varphi_s^\delta(E_t)dB_t^2} \\ \mathrm{Law}(X_0)&= \nu^{\min} \in \mathcal{P}(\mathbb R) \, . \end{cases} \label{sde21} \end{align} such that $\tilde{\nu}_0,\tilde{\nu}^{\min}$ are the periodic rearrangements of $\nu_0,\nu^{\min}$, respectively. We obtain the inequality \eqref{eq:ineqaux1} \begin{equation} \mathbb{E}\pra*{f(\gamma_t)} \leq e^{-2 c \beta^{-1}t } \mathbb{E}\pra*{f(\gamma_0)} +\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)} e^{-2 c \beta^{-1}t } \int_0^t e^{2 c \beta^{-1}s } d_1(\tilde{\nu}(s),\tilde{\nu}^{\min}) \dx{s}, \end{equation} where $\gamma_t=d_\mathbb{T}(\dot{X}_t,\dot{Y}_t)$. Using the fact that $\mathrm{Law} (\dot{Y}_t)=\tilde{\nu}(t)$ and $\mathrm{Law}(\dot{X}_t)=\tilde{\nu}^{\min}$ and applying the bounds from~\eqref{dbounds}, we obtain $$ \frac{e^{\frac{\beta k}{32}}}{2}d_1(\tilde{\nu}(t),\tilde{\nu}^{\min}) \le d_f(\tilde{\nu}(t),\tilde{\nu}^{\min})\le \mathbb{E}\pra*{f(\gamma_t)}. $$ Combining this with the previous identity and applying the integral version of Gronwall's lemma we obtain $$ d_1(\tilde{\nu}(t),\tilde{\nu}^{\min})\le e^{-2 c \beta^{-1}t } + t e^{-t\left(\beta^{-1}c- e^{-\frac{\beta k}{32}\norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)}}\right)} $$ Using the lower bound for $c$ \eqref{eq:deff}, we have the following: if $$ \frac{|\kappa|}{4e^{\frac{\beta|\kappa|}{32}}\left(e^{\frac{\beta|\kappa|}{32}}-1\right)}\ge \norm{W''}_{\ensuremath{{L}}^\infty(\mathbb T)}, $$ then there exists $C_2>0$ such that $$ d_1(\tilde{\nu}(t),\tilde{\nu}^{\min})\le e^{-C_2t}. $$ By making $\beta$ smaller than some $\beta_0$, this can be achieved. \end{proof} \end{appendix} \bibliographystyle{abbrv}
\section*{Introduction} Let $(X,c_X)$ be a real algebraic curve, that is a smooth complex complex curve equipped with an anti-holomorphic involution $c_X$, called the real structure. We denote by $\mathbb{R} X$ the real locus of $X$, that is the set $\textrm{Fix}(c_X)$ of fixed points of $c_X$. For example the projective line $(\mathbb{C}\mathbb{P}^1,\textit{conj})$ is a real algebraic curve whose real locus equals $\mathbb{R} \mathbb{P}^1$. The central objects of this paper are real branched coverings from $X$ to $\mathbb{C}\mathbb{P}^1$, that is, the branched coverings $u:X\rightarrow \mathbb{C}\mathbb{P}^1$ such that $u\circ c_{X}=\textit{conj}\circ u$. Let us denote by $\mathcal{M}^{\mathbb{R}}_d(X)$ the set of degree $d$ real branched coverings from $X$ to $\mathbb{C}\mathbb{P}^1$. The first purpose of the paper is to show that $\mathcal{M}^{\mathbb{R}}_d(X)$ has a natural probability measure $\mu_d$ induced by a compatible volume form $\omega$ of $X$ (that is $c_{X}^*\omega=-\omega$), which we fix once for all. Later in the introduction we will sketch the construction of the measure $\mu_d$, which we will give in details in Section \ref{sectproba}. By Riemann-Hurwitz formula, the number of critical points, counted with multiplicity, of a degree $d$ branched covering $u:X\rightarrow \mathbb{C}\mathbb{P}^1$ equals $2d+2g-2$, where $g$ is the genus of $X$. The probability measure $\mu_d$ allows us to ask the following question. \begin{center} What is the probability that all the critical points of a real branched covering $u\in\mathcal{M}^{\mathbb{R}}_d(X)$ are real? \end{center} In \cite{anc}, it is proved that the expected number of real critical points is equivalent to $c\sqrt{d}$ as the degree $d$ of the random branched covering goes to infinity. The constant $c$ is explicit, given by $c=\sqrt{\frac{\pi}{2}}\textrm{Vol}(\mathbb{R} X)$, where $\textrm{Vol}(\mathbb{R} X)$ is the length of the real locus of $X$ with respect to the Riemannian metric induced by $\omega$. The main theorem of the paper is the following exponential rarefaction result for real branched coverings having "many" real critical points. \begin{thm}\label{rarefaction} Let $X$ be a real algebraic curve. Let $\ell(d)$ be a sequence of positive real numbers such that $\ell(d)\geq B \log d$, for some $B>0$. Then there exist positive constants $c_1$ and $c_2$ such that the following holds $$\mu_d\big\{u\in \mathcal{M}_d^{\mathbb{R}}(X), \#(\textrm{Crit}(u)\cap \mathbb{R} X)\geq \ell(d)\sqrt{d}\big\}\leq c_1e^{-c_2\ell(d)^2}.$$ \end{thm} For example, for any fixed $\alpha>0$, we can consider the sequence $\ell(d)=\sqrt{d}^{\alpha}$. Theorem \ref{rarefaction} says that the space of real branched coverings having more than $\sqrt{d}^{1+\alpha}$ real critical points has exponential small measure. In particular, maximal real branched converings (i.e. branched coverings such that all the critical points are real) are exponentially rare. \paragraph{The probability measure on $\mathcal{M}_d^{\mathbb{R}}(X)$.} The construction of the probability measure on $\mathcal{M}_d^{\mathbb{R}}(X)$ uses the fact that there is a natural map from $\mathcal{M}_d^{\mathbb{R}}(X)$ to the space of degree $d$ real holomorphic line bundle $\textrm{Pic}^d_{\mathbb{R}}(X)$, see Proposition \ref{natmor}. This map sends a degree $d$ morphism $u$ to the degree $d$ line bundle $u^*\mathcal{O}(1)$. The fiber of this map over $L \in\textrm{Pic}^d_{\mathbb{R}}(X)$ is the open dense subset of $\mathbb{P}(\mathbb{R} H^0(X,L)^2)$ given by (the class of) pairs of global sections without common zeros. In order to construct a probability measure on $\mathcal{M}^{\mathbb{R}}_d(X)$, we produce a family of probability measures $\{\mu_{L}\}_{L\in\textrm{Pic}_{\mathbb{R}}^d(X)}$ on each space $\mathbb{P}(\mathbb{R} H^0(X,L)^2)$. The probability measure $\mu_{L}$ on $\mathbb{P}(\mathbb{R} H^0(X,L)^2)$ is the measure induced by the Fubini-Study metric associated with a real Hermitian product on $\mathbb{R} H^0(X,L)^2$. This Hermitian product is the natural $\mathcal{L}^2$-product induced by $\omega$, see Section \ref{background}. This family of measures, together with the Haar probability measure on the base $\textrm{Pic}^d_{\mathbb{R}}(X)$, gives rise to the probability measure $\mu_d$ on $\mathcal{M}_d^{\mathbb{R}}(X)$. \paragraph{An example: the projective line.} Let us consider the case $X=\mathbb{C}\mathbb{P}^1$ equipped with the conjugaison $\textit{conj}([x_0:x_1])=[\bar{x}_0:\bar{x}_1]$. Given two degree $d$ real polynomials $P,Q\in \mathbb{R}_d^{hom}[X_0,X_1]$ without common zeros, we produce a degree $d$ real branched covering $u_{PQ}:\mathbb{C}\mathbb{P}^1\rightarrow\mathbb{C}\mathbb{P}^1$ by sending $[x_0:x_1]$ to $[P(x_0,x_1):Q(x_0,x_1)]$. We also remark that the pair $(\lambda P,\lambda Q)$ defines the same branched covering. Conversely, one can prove that any degree $d$ real branched covering $u:\mathbb{C}\mathbb{P}^1\rightarrow \mathbb{C}\mathbb{P}^1$ is of the form $u=u_{PQ}$ for some (class of) pair of polynomials $(P,Q)$ without common zeros. This means that $\mathcal{M}^{\mathbb{R}}_d(\mathbb{C}\mathbb{P}^1)=\mathbb{P}(\mathbb{R}_d^{hom}[X_0,X_1]^2\setminus \Lambda_d)$, where $\Lambda_d$ is the set of polynomials with at least one common zero. Consider the affine chart $\{x_1\neq 0\}$, the corresponding coordinate $x=\frac{x_0}{x_1}$ and the polynomials $p(X)=P(X_0,1)$ and $q(X)=Q(X_0,1)$. Then, one can see that a point $x\in \{x_1\neq 0\}$ is a critical point of $u_{PQ}$ if and only $p'(x)q(x)-q'(x)p(x)=0$ (see Proposition \ref{wronskiancritical}). In the the previous paragraph, we constructed a probability measure on this space by fixing a compatible volume form on source space, in this case $\mathbb{C}\mathbb{P}^1$. Indeed, a compatible volume form induces a $\mathcal{L}^2$-scalar product on $\mathbb{R}_d^{hom}[X_0,X_1]$ which will induce a Fubini-Study volume form on $\mathbb{P}(\mathbb{R}_d^{hom}[X_0,X_1]^2)$ and then a probability on $\mathcal{M}^{\mathbb{R}}_d(\mathbb{C}\mathbb{P}^1)$. If we equip $\mathbb{C}\mathbb{P}^1$ with the Fubini-Study form, then the induced scalar product on $\mathbb{R}_d^{hom}[X_0,X_1]$ is the one which makes $\{\sqrt{\binom{d}{k}}X_0^kX_1^{d-k}\}_{0\leq k\leq d}$ an orthonormal basis. This scalar product was considered by Kostlan in \cite{ko} (see also \cite{ss}). It is the only scalar product invariant under the action of the orthogonal group $O(2)$ (which acts on the variables $X_0$ and $X_1$) and such that the standard monomials are orthogonal to each other. \paragraph{About the proof.} There are two main steps in the proof of our main theorem. First, we reduce our problem into the problem of the computation of the \emph{Gaussian} measure of a cone $\mathcal{C}_{\ell(d)}$ which lies inside the space of pairs of global sections of a real holomorphic line bundle over $X$. This cone is defined by using the Wronskian of a pair of global sections, which plays a key role. Then, we use peak sections theory to estimate some Markov moments related to this Wronskian. These moments, together with Poincar\'e-Lelong formula, allow us to estimate the measure of the cone $\mathcal{C}_{\ell(d)}$. Let sketch the proof in more details. We fix a degree $1$ real holomorphic line bundle $F$ over $X$, so that, for any $L\in\textrm{Pic}^d_{\mathbb{R}}(X)$ there exists an unique $E\in\textrm{Pic}^0_{\mathbb{R}}(X)$ such that $L=F^d\otimes E$. Recall that any class of pairs of real global sections without common zeros $[\alpha:\beta]\in \mathbb{P}(\mathbb{R} H^0(X,F^d\otimes E)^2)$ defines a real branched covering $u_{\alpha\beta}$ by sending a point $x\in X$ to $[\alpha(x):\beta(x)]\in\mathbb{C}\mathbb{P}^1$. Theorem \ref{rarefaction} will follow from the estimate \begin{equation}\label{about1} \mu_{F^d\otimes E}\big\{[\alpha:\beta]\in \mathbb{P}(\mathbb{R} H^0(X,F^d\otimes E)^2), \#(\textrm{Crit}(u_{\alpha\beta})\cap \mathbb{R} X)\geq \ell(d)\sqrt{d}\big\}\leq c_1e^{-c_2\ell(d)^2} \end{equation} where $\mu_{F^d\otimes E}$ is the probability measure induced by the Fubini-Study metric on $\mathbb{P}(\mathbb{R} H^0(X,F^d\otimes E)^2)$. Indeed, if we integrate the inequality \eqref{about1} along $\textrm{Pic}^0_{\mathbb{R}}(X)$ we exactly obtain Theorem \ref{rarefaction}. To prove the estimate \eqref{about1}, we will use the following two facts. First, a point $x$ is a critical point of $u_{\alpha\beta}$ if and only if it is a zero of the Wronskian $W_{\alpha\beta}\doteqdot\alpha\otimes\nabla\beta-\beta\otimes\nabla\alpha$. Second, the pushforward (with respect to the projectivization) of the Gaussian measure on $\mathbb{R} H^0(X,F^d\otimes E)^2$ is exactly the probability measure $\mu_{F^d\otimes E}$. These two facts imply that the estimate \eqref{about1} is equivalent to the fact that the Gaussian measure of the cone \begin{equation}\label{about2} \mathcal{C}_{\ell(d)}\doteqdot\big\{(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2, \#(\textrm{real zeros of}\hspace{1mm}W_{\alpha\beta})\geq \ell(d)\sqrt{d}\big\} \end{equation} is bounded from above by $c_1e^{-c_2\ell(d)^2}$. \\ In order to estimate the Gaussian measure of $\mathcal{C}_{\ell(d)}$, inspired by \cite{gwexp}, we bound from above the moments of the random variable $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2\mapsto \log \norm{W_{\alpha\beta}(x)}$, where $x$ is a point in $X$ such that $\textrm{dist}(x,\mathbb{R} X)$ is bigger that $\frac{\log d}{\sqrt{d}}$, see Proposition \ref{moments}. This condition on the distance is natural, it is strictly related to peak section's theory (see \cite{tian,gw1}) and it is the reason why we need the hypothesis on the growth of the sequence $\ell(d)$ in Theorem \ref{rarefaction}. The estimate of these moments uses two ingredients: the theory of peak sections and the comparison between the norms of two differents evaluation maps (and more generally jet maps). Once these moments are estimates, Markov inequality and Poincar\'e-Lelong formula gives us the exponential rarefaction of the Gaussian measure of the cone (\ref{about2}). \paragraph*{Organization of the paper.} The paper is organized as follows. In Section \ref{background} we introduce the main objects and notations of this paper. In Sections \ref{secspaceofbranched} and \ref{sectproba} we study the geometry of the manifold $\mathcal{M}^{\mathbb{R}}_d(X)$ and we construct the probability measure $\mu_d$ on it.\\ The purpose of Section \ref{secmoment} is to prove Proposition \ref{moments}, that is, to estimate of the moments of the random variable $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2\mapsto \log \norm{(\alpha\otimes\nabla\beta-\beta\otimes\nabla\alpha)(x)}$, for $F$ and $E$ are respectively a degree $1$ and $0$ real holomorphic line bundles. In order to do this, in Section \ref{secgauss} we introduce Gaussian measures on $\mathbb{R} H^0(X,F^d\otimes E)^2$ and in Section \ref{secpeak} we study jet maps at points $x\in X$ which are far from the real locus. Finally, in Section \ref{secproof}, we deduce Theorem \ref{rarefaction} from the estimates established in Section \ref{secmoment}. \section[Random coverings]{Random real branched coverings}\label{ramframwork} \subsection{Background}\label{background} Let $(X,c_X)$ be a real algebraic curve, that is a complex, projective, smooth curve equipped with an anti-holomorphic involution $c_X$, called the real structure. We assume that the real locus $\mathbb{R} X\doteqdot\textrm{Fix}(c_X)$ is non empty. For example $(\mathbb{C}\mathbb{P}^1,\textit{conj})$, where $\textit{conj}([x_0:x_1])=[\bar{x}_0:\bar{x}_1]$, is a real algebraic curve whose real locus is $\mathbb{R}\mathbb{P}^1$. A real holomorphic line bundle $p:L\rightarrow X$ is a line bundle equipped with an anti-holomorphic involution $c_{L}$ such that $p\circ c_X=c_{L}\circ p$ and $c_{L}$ is complex-antilinear in the fibers. We denote by $\mathbb{R} H^0(X;L)$ the real vector space of real holomorphic global sections of $L$, i.e. sections $s\in H^0(X;L)$ such that $s \circ c_X=c_{L}\circ s$. Let $\textrm{Pic}_{\mathbb{R}}^d(X)$ be the set of degree $d$ real line bundles. It is a principal space under the action of the compact topological abelian group $\textrm{Pic}_{\mathbb{R}}^0(X)$ and so it inherits a normalized Haar measure that we denote by $\textrm{dH}$ (see, for example, \cite{realalgebraiccurves}). Finally, recall that a real Hermitian metric $h$ on $L$ is a Hermitian metric on $L$ such that $c_{L}^*h=\bar{h}$. \begin{prop}\label{metr} Let $(X,c_X)$ be a real algebraic curve and let $\omega$ be a compatible volume form of mass $1$, that is $c_{X}^*\omega=-\omega$ and $\int_X\omega=1$. Let $L\in \textrm{Pic}^d_{\mathbb{R}}(X)$ be a degree $d$ real holomorphic line bundle over $X$, then there exists an unique real Hermitian metric $h$ (up to multiplication by a positive real constant) such that $c_1(L,h)=d\cdot\omega$. \end{prop} \begin{proof} For the existence and unicity of such metric, see \cite[Proposition 1.4]{anc3}. The fact that the metric $h$ is real follows from the following argument. Let us consider the Hermitian metric $\overline{c^*_{L}h}$ on $L$. Claim: its curvature equals $-d\cdot c_X^*\omega$. Indeed, for any $x\in X$ we consider a real meromorphic section $s$ of $L$ such that $x$ and $c_{X}(x)$ are neither zero nor pole of $s$ (such section exists by Riemann-Roch Theorem). Then, the curvature of $(L,\overline{c^*_{L}h})$ around $x$ is $\partial\bar{\partial}\log (\overline{c^*_{L}h})_x(s(x),s(x))=\partial\bar{\partial}\log h_{c_X(x)}(c_{L}(s(x)),c_{L}(s(x)))=\partial\bar{\partial}\log h_{c_X(x)}(s(c_X(x)),s(c_X(x)))=\partial\bar{\partial} c^*_X\log h (s,s)=-c^*_X\partial\bar{\partial}\log h (s,s),$ where the last equality is due to the anti-holomorphicity of $c_X$. Then, the claim follows from the fact that $\partial\bar{\partial}\log h (s,s)=d\cdot\omega$. \\ Now, consider the real Hermitian metric $(h\cdot\overline{c^*_{L}h})^{1/2}$. Its curvature equals $$\frac{1}{2}\big(\partial\bar{\partial}\log h(s,s)+\partial\bar{\partial}\log (\overline{c^*_{L}h})(s,s)\big)=\frac{1}{2}(d\cdot\omega-d\cdot c_X^*\omega)=d\cdot\omega,$$ where the last equality follows from the fact that $\omega$ is compatible with the real structure. By unicity of the metric with curvature $d\cdot\omega$, this implies that $(h\cdot\overline{c^*_{L}h})^{1/2}$ is a multiple of $h$. We actually have the equality $(h\cdot\overline{c^*_{L}h})^{1/2}=h$, because for a real point $x\in\mathbb{R} X$ and a real vector $v\in \mathbb{R} L_x$ we get $(h_x(v,v)\cdot(\overline{c^*_{L}h})_x(v,v))^{1/2}=(h_x(v,v)\cdot h_x(v,v))^{1/2}=h_x(v,v)$. \end{proof} \begin{defn}\label{scalarprod} Let $\omega$ be a compatible volume form of mass $1$, let $L\in \textrm{Pic}^d_{\mathbb{R}}(X)$ be a degree $d$ line bundle over $X$ and $h$ be the real Hermitian metric given by the previous proposition. We define the $\mathcal{L}^2$-scalar product on $\mathbb{R} H^0(X;L)$ by $$\langle\alpha,\beta\rangle_{\mathcal{L}^2}=\int_{x\in X}h_x(\alpha(x),\beta(x))\omega$$ for any pair of real holomorphic sections $\alpha,\beta\in\mathbb{R} H^0(X;L).$ \end{defn} \subsection{The space of real branched coverings}\label{secspaceofbranched} In this section we introduce and study the space of real branched coverings from a real algebraic curve $(X,c_X)$ to $(\mathbb{C}\mathbb{P}^1,\textit{conj})$. \begin{defn} We denote by $\mathcal{M}^{\mathbb{R}}_d(X)$ the space of all degree $d$ real branched coverings $u:X\rightarrow \mathbb{C}\mathbb{P}^1$, that are the branched coverings such that $u\circ c_{X}=\textit{conj}\circ u$. \end{defn} A natural way to define a degree $d$ real branched covering is the following one. Consider a degree $d$ real holomorphic line bundle $L\in \textrm{Pic}^d_{\mathbb{R}}(X)$ and two real holomorphic sections $\alpha,\beta\in \mathbb{R} H^0(X,L)$ without common zeros. Then, we can define the degree $d$ real branched covering $u_{\alpha\beta}$ defined by $$u_{\alpha\beta}:x\in X\mapsto [\alpha(x):\beta(x)]\in\mathbb{C}\mathbb{P}^1.$$ \begin{prop}\label{realproj} Two pairs $(\alpha,\beta), (\alpha',\beta')$ of real holomorphic sections of $L$ define the same real branched covering if and only if $(\alpha',\beta')=(\lambda\alpha,\lambda\beta)$ for some $\lambda\in\mathbb{R}^*$. \end{prop} \begin{proof} The proof follows the lines of \cite[Proposition 1.1]{anc3}. \end{proof} \begin{prop}\label{natmor} There exists a natural map from $\mathcal{M}^{\mathbb{R}}_d(X)$ to the space $\textrm{Pic}_{\mathbb{R}}^d({X})$ of degree $d$ real line bundles over $X$. This natural map is given by $u\in\mathcal{M}^{\mathbb{R}}_d(X)\mapsto u^*\mathcal{O}(1)\in\textrm{Pic}_{\mathbb{R}}^d({X})$. The fiber over $L\in\textrm{Pic}_{\mathbb{R}}^d({X})$ is the open subset of $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$ given by (the class of) pair of sections $(\alpha,\beta)$ without common zeros. \end{prop} \begin{proof} Given a degree $d$ real branched covering $u:X\rightarrow\mathbb{C}\mathbb{P}^1$, we get a degree $d$ real line bundle $u^*\mathcal{O}(1)$ over $X$ and the class of two real holomorphic global holomorphic sections without common zeros $[u^*x_0:u^*x_1]\in \mathbb{P}(\mathbb{R} H^0(X;u^*\mathcal{O}(1))^2)$. On the other hand, given a degree $d$ real line bundle $L\rightarrow X$ and two real holomorphic global sections without common zeros $(\alpha,\beta)\in \mathbb{R} H^0(X;L)^2$, then the map $u_{\alpha\beta}:X\rightarrow\mathbb{C}\mathbb{P}^1$ defined by $x\mapsto [\alpha(x):\beta(x)]$ is a degree $d$ real branched covering. Moreover, by Proposition \ref{realproj}, two pairs $(\alpha,\beta)$ and $(\alpha',\beta')$ of real holomorphic sections of $L$ define the same real branched covering if and only if $(\alpha',\beta')=(\lambda\alpha,\lambda\beta)$ for some $\lambda\in\mathbb{R}^*$, hence the result. \end{proof} \subsection{Probability on $\mathcal{M}^{\mathbb{R}}_d(X)$}\label{sectproba} Let $X$ be a real algebraic curve equipped with a compatible volume form $\omega$ of total mass $1$. In this section, we construct a natural probability measure on the space $\mathcal{M}^{\mathbb{R}}_d(X)$ of degree $d$ real branched coverings from $X$ to $\mathbb{C}\mathbb{P}^1$.\\ Let $L\in\textrm{Pic}^d_{\mathbb{R}}(X)$ be a degree $d$ real line bundle equipped with the real Hermitian metric $h$ given by Proposition \ref{metr}. We recall that in Definition \ref{scalarprod} we defined the $\mathcal{L}^2$-scalar product on the space $\mathbb{R} H^0(X;L)$ induced by the Hermitian metric $h$. This $\mathcal{L}^2$-scalar product induces a scalar product on the Cartesian product $\mathbb{R} H^0(X;L)^2$ and then a Fubini-Study metric on $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$. We recall that the Fubini-Study metric is constructed as follows. First, we restrict the scalar product to the unit sphere of $\mathbb{R} H^0(X;L)^2$. The obtained metric is invariant under the action of $\mathbb{Z}/2\mathbb{Z}$ and the Fubini-Study metric is then the quotient metric on $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$. \begin{defn}\label{measurefiber} Let $L$ be a real holomorphic line bundle over $X$. We denote by $\mu_{L}$ the probability measure on $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$ induced by the normalized Fubini-Study volume form. Here, the Fubini-Study metric on $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$ is the one induced by the Hermitian metric on $L$ given by Proposition \ref{metr}. \end{defn} \begin{prop}\label{fs} The probability measure $\mu_{L}$ over $\mathbb{P}(\mathbb{R} H^0(X;L)^2)$ does not depend on the choice of the multiplicative constant in front of the metric $h$ given by Proposition \ref{metr}. \end{prop} \begin{proof} The proof follows the line of \cite[Proposition 1.7]{anc3} \end{proof} \begin{oss} For a real holomorphic line bundle $L$, we denote by $\Lambda_L$ the space of pair of sections $(s_0,s_1)\in \mathbb{R} H^0(X;L)^2$ with at least a common zeros. By \cite[Proposition 2.11]{anc}, the set $\Lambda_L$ has zero measure (it is an hypersurface), at least if the degree of $L$ is large enough. This implies that $\mu_L$ induces a probability measure on $\mathbb{P}( \mathbb{R} H^0(X;L)^2\setminus \Lambda_L)$, still denoted by $\mu_L$. \end{oss} \begin{defn}\label{rhfs} We define the probability measure $\mu_d$ on $\mathcal{M}^{\mathbb{R}}_d(X)$ by the following equality: $$\int_{\mathcal{M}^{\mathbb{R}}_d(X)}f\textrm{d}\mu_d=\int_{L\in\textrm{Pic}_{\mathbb{R}}^d(X)}\left(\int_{\mathcal{M}^{\mathbb{R}}_d(X,L)}f\textrm{d}\mu_{L}\right)\textrm{dH}(L)$$ for any $f\in \mathcal{M}^{\mathbb{R}}_d(X)$ measurable function. Here: \begin{itemize} \item $\mathcal{M}^{\mathbb{R}}_d(X,L)$ is the fiber of the natural morphism $\mathcal{M}^{\mathbb{R}}_d(X)\rightarrow \textrm{Pic}^d_{\mathbb{R}}(X)$ defined in Proposition \ref{natmor}. \item $\mu_{L}$ denotes (by a slight abuse of notation) the restriction to $\mathcal{M}^{\mathbb{R}}_d(X,L)$ of the probability measure on $\mathbb{P}(\mathbb{R} H^0(X,L)^2)$ defined in Definition \ref{measurefiber}. \item $\textrm{dH}$ denotes the normalized Haar measure on $\textrm{Pic}^d_{\mathbb{R}}(X)$. \end{itemize} \end{defn} \begin{oss} The probability measure $\mu_d$ of Definition \ref{rhfs} is the real analogue of the one constructed in the complex setting in \cite{anc3} for the study of random branched coverings from a fixed Riemann surface to $\mathbb{C} \mathbb{P}^1$. Also, in the complex setting, a similar construction has been considered by Zelditch in \cite{zeldlarge} in order to study large deviations of empirical measures of zeros on a Riemann surface. \end{oss} \begin{example} Let us consider the case $(X,c_X)=(\mathbb{C}\mathbb{P}^1,\textit{conj})$, where $\mathbb{C}\mathbb{P}^1$ is equipped with the Fubini-Study form $\omega_{FS}$. For the projective line $\mathbb{C}\mathbb{P}^1$, the unique degree $d$ real line bundle is the line bundle $\mathcal{O}(d)$, which is naturally equipped with a real Hermitian metric $h_{d}$ whose curvature equals $d\cdot\omega$. The space of real holomorphic global sections $\mathbb{R} H^0(\mathbb{C}\mathbb{P}^1;\mathcal{O}(d))$ is isomorphic to the space of degree $d$ homogeneous polynomials $\mathbb{R}^{\textrm{hom}}_d[X_0,X_1]$ and the $\mathcal{L}^2$-scalar product coincides with the Kostlan scalar product (i.e. the scalar product which makes $\{\sqrt{\binom{d}{k}}X_0^kX_1^{d-k}\}_{0\leq k \leq d}$ an orthonormal basis, see \cite{ko,ss}). Then, a random real branched covering $u:\mathbb{C}\mathbb{P}^1\rightarrow\mathbb{C} \mathbb{P}^{1}$ is given by the class of a pairs of independent Kostlan polynomials. \end{example} \section{Gaussian measures and estimates of higher moments}\label{secmoment} In this section, we introduce some Gaussian measures on the spaces $\mathbb{R} H^0(X;L)^2$ and $H^0(X;L)^2$, as in \cite{gw1,gwexp,sz,anc}. We follow the notations of Section \ref{ramframwork}. In particular, $(X,c_X)$ is a real algebraic curve whose real locus $\mathbb{R} X$ is not empty. \subsection{Gaussian measures}\label{secgauss} In this section, given any degree $d$ real line $L\in\textrm{Pic}_{\mathbb{R}}^d(X)$, we equip the cartesian product $\mathbb{R} H^0(X;L)^2$ of the space of real holomorphic section with a Gaussian measure $\gamma_{L}$. In order to do this, we fix a compatible volume form $\omega$ of total volume $1$ (i.e. $c_X^*\omega=-\omega$ and $\int_X\omega=1$). Given $L\in\textrm{Pic}_{\mathbb{R}}^d(X)$, we equip $L$ by the real Hermitian metric $h$ with curvature $d\cdot\omega$ (the metric $h$ is unique up to a multiplicative constant, see Proposition \ref{metr}).\\ In Definition \ref{scalarprod}, we defined a $\mathcal{L}^2$-Hermitian product on the space $\mathbb{R} H^0(X;L)$ of real holomorphic global holomorphic sections of $L$ denoted by $\langle\cdot,\cdot \rangle_{\mathcal{L}^2}$ and defined by $$\langle\alpha,\beta\rangle_{\mathcal{L}^2}=\int_{x\in X}h_x(\alpha(x),\beta(x))\omega$$ for all $\alpha,\beta$ in $\mathbb{R} H^0(X;L)$. \begin{defn} The $\mathcal{L}^2$-scalar product on $\mathbb{R} H^0(X;L)^2$ induces a Gaussian measure $\gamma_{L}$ on $\mathbb{R} H^0(X;L)^2$ defined by $$\gamma_{L}(A)=\frac{1}{\pi^{N_d}}\int_{(\alpha,\beta)\in A}e^{-\norm{\alpha}_{\mathcal{L}^2}^2-\norm{\beta}_{\mathcal{L}^2}^2}\textrm{d}\alpha \textrm{d}\beta$$ for any open subset $A\subset \mathbb{R} H^0(X;L)^2$. Here $\textrm{d}\alpha\textrm{d}\beta$ is the Lebesgue measure on $(\mathbb{R} H^0(X;L)^2;\langle\cdot,\cdot\rangle_{\mathcal{L}^2})$ and $N_d$ denotes the dimension of $\mathbb{R} H^0(X;L)$, which equals the complex dimension of $H^0(X;L)$. \end{defn} \begin{oss} If $d>2g-2$, where $g$ is the genus of $X$, then $H^1(X;L)=0$ and then, by Riemann-Roch theorem, we have $N_d=d+1-g$. \end{oss} \begin{prop}\cite[Proposition 1.12]{anc3}\label{vs} Let $f$ be a function on an Euclidian space $(V,\langle\cdot,\cdot\rangle)$ which is constant over the lines, i.e. $f(v)=f(\lambda v)$ for all $v\in V$ and all $\lambda\in\mathbb{R}^*$. Denote by $d\gamma$ the Gaussian measure on $V$ induced by $\langle\cdot,\cdot\rangle$ and by $d\mu$ the normalized Fubini-Study measure on the projectivized $\mathbb{P}(V)$. Then, for all cones $A\subset V$, we have $$\int_{A}f\textrm{d}\gamma=\int_{\mathbb{P}(A)}[f]{d}\mu$$ where $\mathbb{P}(A)$ is the projectivized of $A$ and $[f]$ is the function on $\mathbb{P}(V)$ induced by $f$. \end{prop} We will be also interested in the \emph{complex} Gaussian measure on the space $H^0(X,L)^{2}$. Indeed, the Hermitian metric $h$ on $L$ defines a $\mathcal{L}^2$-Hermitian product on $H^0(X,L)$ by the formula $$\langle\alpha,\beta\rangle_{\mathcal{L}^2}=\int_{x\in\Sigma}h_x(\alpha(x),\beta(x))\omega$$ for all $\alpha,\beta$ in $H^0(\Sigma;L)$. \begin{defn}\label{complexgaussian} The complex Gaussian measure $\gamma^{\mathbb{C}}_{L}$ on $H^0(\Sigma;L)^2$ is defined by $$\gamma^{\mathbb{C}}_{L}(A)=\frac{1}{\pi^{2N_d}}\int_{(\alpha,\beta)\in A}e^{-\norm{\alpha}_{\mathcal{L}^2}^2-\norm{\beta}_{\mathcal{L}^2}^2}\textrm{d}\alpha \textrm{d}\beta$$ for any open subset $A\subset H^0(\Sigma;L)^2$. Here $\textrm{d}\alpha\textrm{d}\beta$ is the Lebesgue measure on $(H^0(\Sigma;L)^2;\langle\cdot,\cdot\rangle_{\mathcal{L}^2})$ and $N_d$ denotes the complex dimension of $H^0(\Sigma;L)$. \end{defn} \subsection{Jet maps and peak sections}\label{secpeak} Let $F$ and $E$ be respectively degree $1$ and $0$ real holomorphic line bundles over $X$. We equip $F$ and $E$ by the real Hermitian metrics given by Proposition \ref{metr} which we denote by $h_{F}$ and $h_{E}$. In particular the real Hermitian metric $h_d\doteqdot h_{F}^d\otimes h_{E}$ on $F^d\otimes E$ is such that its curvature equals $d\cdot\omega$. Finally, recall that the space $H^0(X,F^d\otimes E)$ is endowed with the $\mathcal{L}^2$-Hermitian product $$\langle\alpha,\beta\rangle_{\mathcal{L}^2}=\int_{x\in X}h_d(\alpha(x),\beta(x))\omega$$ defined by for any $\alpha,\beta$ in $H^0(X;F^d\otimes E).$ \begin{defn}\label{defn eval} For any $x\in X$, let $H_x$ be the kernel of the map ${s\in H^0(X,F^d\otimes E)\mapsto s(x)\in (F^d\otimes E)_x}$. Similarly, we denote by $H_{2x}$ the kernel of the map $s\in H_{x}\mapsto\nabla s(x)\in (F^d\otimes E)_x\otimes T^*_{X,x}.$ We define the following jet maps: $$ev_x:s\in H^0(X,F^d\otimes E)/H_x\mapsto s(x)\in(F^d\otimes E)_x,$$ $$ev_{2x}:s\in H_x/H_{2x}\mapsto \nabla s(x)\in (F^d\otimes E)_x\otimes T^*_{X,x}.$$ \end{defn} The previous definition has the following real analogue: \begin{defn}\label{defn real eval} For any point $x\in X$, we define the real vector spaces $\mathbb{R} H^0_x=H^0_x\cap \mathbb{R} H^0(X, F^d\otimes E)$ and $\mathbb{R} H^0_{2x}=H^0_{2x}\cap \mathbb{R} H^0(X, F^d\otimes E)$ and the real jet maps by $$ev^{\mathbb{R}}_{x}:s\in \mathbb{R} H^0(X,F^d\otimes E)/\mathbb{R} H^0_x\mapsto s(x)\in(F^d\otimes E)_x,$$ $$ev^{\mathbb{R}}_{2x}:s\in \mathbb{R} H_x/\mathbb{R} H_{2x}\mapsto \nabla s(x)\in (F^d\otimes E)_x\otimes T^*_{X,x}.$$ \end{defn} By the fact that $F$ is ample (recall that $\deg{F}=1$), we get that for $d$ large enough the maps $ev^{\mathbb{R}}_x$, $ev_x$, $ev^{\mathbb{R}}_{2x}$ and $ev_{2x}$ are invertible. The following proposition estimates the norms of this maps and of their inverses. \begin{prop}\cite[Propositions 4 and 6]{gw1}\label{confronto evalu} For any $B>0$, then there exists an integer $d_B$ and a positive constant $c_B$ such that, for any $d\geq d_B$ and any point $x\in X$ with $\textrm{dist}(x,\mathbb{R} X)\geq B\frac{\log d}{\sqrt{d}}$, the maps $d^{-\frac{1}{2}}ev^{\mathbb{R}}_x$, $d^{-\frac{1}{2}}ev_x$, $d^{-1}ev^{\mathbb{R}}_{2x}$ and $d^{-1}ev_{2x}$ as well as their inverse have norms and determinants bounded from above by $c_B$. \end{prop} \begin{oss} In \cite[Propositions 4 and 6]{gw1}, the constant $B$ equals $1$, and the line bundle $E$ is trivial. The same proof actually holds for any fixed $B>0$ and any $E\in\textrm{Pic}^0_{\mathbb{R}}(X)$. Indeed, the proof is based on the theory peak sections and Bergman kernels and this theory holds in this more general setting (see for example \cite{daima} or \cite[Theorem 4.2.1]{ma2}). \end{oss} Using the $\mathcal{L}^2$-Hermitian product on $H^0(X,F^d\otimes E)$, we can identify $H^0(X,F^d\otimes E)/H_x$ with the orthogonal complement of $H_x$ in $H^0(X,F^d\otimes E)$. Similarly, we identify the quotient $H_x/H_{2x}$ with the orthogonal complement of $H_{2x}$ in $H_x$. We then have an orthogonal decomposition $$H^0(X,F^d\otimes E)= H^0(X,F^d\otimes E)/H_x\oplus H_x/H_{2x} \oplus H_{2x}.$$ Similarly, using the $\mathcal{L}^2$-scalar product on $\mathbb{R} H^0(X,F^d\otimes E)$, we have the orthogonal decomposition $$\mathbb{R} H^0(X,F^d\otimes E)= \mathbb{R} H^0(X,F^d\otimes E)/\mathbb{R} H_x\oplus \mathbb{R} H_x/\mathbb{R} H_{2x} \oplus \mathbb{R} H_{2x}.$$ The map $ev_x\times ev_{2x}$ (resp. $ev^{\mathbb{R}}_x\times ev^{\mathbb{R}}_{2x}$) gives an isomorphism between $H^0(X,F^d\otimes E)/H_x\oplus H_x/H_{2x}$ (resp. $\mathbb{R} H^0(X,F^d\otimes E)/\mathbb{R} H_x\oplus \mathbb{R} H_x/\mathbb{R} H_{2x}$) and the fiber $(F^d\otimes E)_x\oplus (F^d\otimes E)_x\otimes T^*_{X,x}$. \\ Moreover, remark that we have natural identifications $H^0(X,F^d\otimes E)/H_x\oplus H_x/H_{2x}=H_{2x}^{\perp}$ and $\mathbb{R} H^0(X,F^d\otimes E)/\mathbb{R} H_x\oplus \mathbb{R} H_x/\mathbb{R} H_{2x}=\mathbb{R} H_{2x}^{\perp}$. A direct consequence of Proposition \ref{confronto evalu} is the following \begin{cor}\label{bounded determinant} For any $B>0$, there exist an integer $d_B$ and a positive constant $c_B$ such that, for any $d\geq d_B$ and any $x$ with $\textrm{dist}(x,\mathbb{R} X)\geq B\frac{\log d}{\sqrt{d}}$, the map $(ev^{\mathbb{R}}_x\times ev^{\mathbb{R}}_{2x})^{-1}\circ(ev_x\times ev_{2x}):H_{2x}^{\perp}\rightarrow \mathbb{R} H_{2x}^{\perp}$ has determinant bounded from above by $c_B$ and from below by $1/c_B$. \end{cor} \begin{defn}\label{defin peak} We denote by $s_0$ and $s_1$ the global holomorphic sections of $L^d\otimes E$ of unit $\mathcal{L}^2$-norm which generates respectively the orthogonal of $H_x$ in $H^0(X,F^d\otimes E)$ and the orthogonal of $H_{2x}$ in $H_x$. We call these sections the \emph{peak sections} at $x$. \end{defn} The pointwise estimate of the norms (with respect to the Hermitian metric $h_d$ of curvature $d\cdot\omega$) of the peak sections are well known and strictly related to the estimates of the Bergman kernel along the diagonal (see \cite{tian,zel,ber1,ma2}). With a slight abuse of notation, we will denote by $\norm{\cdot}$ any norm induced by $h_d$. \begin{lemma}(\cite[Proposition 1.5]{anc3})\label{asympeak} For any $x\in X$, let $s_0$ and $s_1$ be the peak sections defined in Definition \ref{defin peak}. Then, as $d\rightarrow +\infty$, we have the estimates $\norm{s_0(x)}=\frac{\sqrt{d}}{\sqrt{\pi}}(1+O(d^{-1}))$ and $\norm{\nabla s_1(x)}=\frac{d}{\sqrt{\pi}}(1+O(d^{-1}))$, where the error terms are uniform in $x\in X$. \end{lemma} \subsection{Wronskian and higher moments} Let $F$ and $E$ be respectively degree $1$ and $0$ real holomorphic line bundles over $X$. The purpose of this section is to prove Proposition \ref{moments}, which gives key estimates of the higher moments of the random variable $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2\mapsto \log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}$, where $W_{\alpha\beta}$ is the Wronskian, given by the following \begin{defn}\label{wr} Let $\nabla$ be a connection on $F^d\otimes E$. For any pair of real holomorphic global sections $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2$, we denote by $W_{\alpha\beta}$ the Wronskian $\alpha\otimes\nabla\beta-\beta\otimes\nabla\alpha$, which is a real holomorphic global section of $F^{2d}\otimes E^2\otimes T^*_{X}$. \end{defn} \begin{oss} The Wronskian $W_{\alpha\beta}$ does not depend on the choice of a connection on $F^d\otimes E$. Indeed, two connections $\nabla$ and $\nabla'$ on $F^d\otimes E$ differ by a $1$-form $\theta$, and then we have $$(\alpha\otimes\nabla\beta-\beta\otimes\nabla\alpha)-(\alpha\nabla'\beta-\beta\nabla'\alpha)=\alpha\otimes(\nabla-\nabla')\beta-\beta\otimes(\nabla-\nabla')\alpha=\alpha\otimes\beta\otimes\theta-\beta\otimes\alpha\otimes\theta=0.$$ \end{oss} \begin{prop}\cite[Proposition 2.3]{anc3}\label{wronskiancritical} Let $F$ and $E$ be respectively degree $1$ and $0$ real line bundles over $X$ and $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2$ be a pair of sections without common zeros. A point $x\in X$ is a critical point of the map $u_{\alpha\beta}:x\in X\mapsto [\alpha(x):\beta(x)]\in\mathbb{C}\mathbb{P}^1$ if and only if it is a zero of the Wronskian $W_{\alpha\beta}$ defined in Definition \ref{wr}. \end{prop} \begin{prop}\label{moments} Let $X$ be a real algebraic curve equipped with a compatible volume form $\omega$ of total volume $1$ and let $F\in\textrm{Pic}^1_{\mathbb{R}}(X)$. For any $B>0$ there exists an integer $d_B$ and a constant $c_B$ such that for any $E\in \textrm{Pic}^0_{\mathbb{R}}(X)$, any $m\in\mathbb{N}$, any $d\geq d_B$ and any point $x\in X$ with $\textrm{dist}(x,\mathbb{R} X)\geq B\frac{\log d}{\sqrt{d}}$, we have $$\int_{(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m\textrm{d}\gamma_d(\alpha,\beta)\leq c_B(m+1)!.$$ Here, $\textrm{dist}(\cdot,\cdot)$ is the distance in $X$ induced by $\omega$, $\gamma_d$ is the Gaussian measure on $\mathbb{R} H^0(X,F^d\otimes E)^2$ constructed in Section \ref{secgauss} and $\norm{\cdot}$ denote the norm induced by the Hermitian metrics on $F$ and $E$ given by Proposition \ref{metr}. \end{prop} \begin{proof} Let us consider the integral we want to estimate: \begin{equation}\label{integrale da calcolare} \int_{(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m\textrm{d}\gamma_d(\alpha,\beta). \end{equation} First, remark that the function in the integral \eqref{integrale da calcolare} only depends on the $1$-jet of the sections $\alpha$ and $\beta$. We will then write the orthogonal decomposition $\mathbb{R} H^0(X,F^d\otimes E)=\mathbb{R} H_{2x}\oplus\mathbb{R} H_{2x}^{\perp}$, where $\mathbb{R} H_{2x}$ is the space of real sections $s$ such that $s(x)=0$ and $\nabla s(x)=0$. As the Gaussian measure is a product measure, after the integration over the orthogonal of $\mathbb{R} H_{2x}^{\perp}\times \mathbb{R} H_{2x}^{\perp}$, we get that the integral \eqref{integrale da calcolare} is equal to \begin{equation}\label{int sur l orthogo} \int_{(\alpha,\beta)\in \mathbb{R} H_{2x}^{\perp}\times \mathbb{R} H_{2x}^{\perp}}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m\textrm{d}\gamma_d\mid_{\mathbb{R} H_{2x}^{\perp}\times \mathbb{R} H_{2x}^{\perp}}(\alpha,\beta). \end{equation} Using the notations of Section \ref{secpeak}, and in particular Definitions \ref{defn eval} and \ref{defn real eval}, let $J_d: H_{2x}^{\perp}\rightarrow \mathbb{R} H_{2x}^{\perp}$ be the map $ (ev^{\mathbb{R}}_x\times ev^{\mathbb{R}}_{2x})^{-1}\circ (ev_x\times ev_{2x})$ and denote by $$I_d=J_d\times J_d:H_{2x}^{\perp}\times H_{2x}^{\perp}\rightarrow \mathbb{R} H_{2x}^{\perp}\times \mathbb{R} H_{2x}^{\perp}.$$ By changing of variables given by the isomorphism $I_d$, we get \begin{equation}\label{changing of variable} \eqref{int sur l orthogo}=\int_{(\alpha,\beta)\in H_{2x}^{\perp}\times H_{2x}^{\perp}}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m(I_d^{-1})_*(\textrm{d}\gamma_d\mid_{\mathbb{R} H_{2x}^{\perp}\times \mathbb{R} H_{2x}^{\perp}})(\alpha,\beta). \end{equation} By Corollary \ref{bounded determinant}, the maps $I_d$ and $I_d^{-1}$ have determinants bounded from above by a constant which only depends on $B$. In particular, there exists a constant $c_1$, depending only on $B$, such that \begin{equation}\label{int sur l ortho complex} \eqref{changing of variable}\leq c_1 \int_{(\alpha,\beta)\in H_{2x}^{\perp}\times H_{2x}^{\perp}}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m\textrm{d}\gamma^{\mathbb{C}}_d\mid_{ H_{2x}^{\perp}\times H_{2x}^{\perp}}(\alpha,\beta) \end{equation} where $\gamma^{\mathbb{C}}_d$ is the complex Gaussian measure defined in Definition \ref{complexgaussian}. In order to prove the result, we have to bound from above the quantity \begin{equation}\label{quanti da borner} \int_{(\alpha,\beta)\in H_{2x}^{\perp}\times H_{2x}^{\perp}}\abs{\log \norm{\frac{\pi}{d^{3/2}}W_{\alpha\beta}(x)}}^m\textrm{d}\gamma^{\mathbb{C}}_d\mid_{ H_{2x}^{\perp}\times H_{2x}^{\perp}}(\alpha,\beta) \end{equation} Let $s_0$ and $s_1$ be the peak sections at $x$ introduced in Definition \ref{defin peak} and we write $\alpha=a_0\sigma_0+a_1\sigma_1$ and $\beta=b_0\sigma_0+b_1\sigma_1$. We then have $$\norm{W_{\alpha\beta}(x)}=\abs{a_0b_1-a_1b_0}\norm{(s_0\otimes\nabla s_1-s_1\otimes\nabla s_0)(x)}=\abs{a_0b_1-a_1b_0}\frac{d^{3/2}}{\pi}(1+O(d^{-c_2(B)})),$$ where the last equality follows from Proposition \ref{asympeak}. This implies that the integral in \eqref{quanti da borner} equals $$ \int_{\substack{a=(a_0,a_1)\in \mathbb{C}^2 \\ b=(b_0,b_1)\in\mathbb{C}^2}}\abs{\log \bigg(\abs{a_0b_1-a_1b_0}\norm{\frac{\pi}{d^{3/2}}(s_0\otimes\nabla s_1-s_1\otimes\nabla s_0)(x)}\bigg)}^m\frac{e^{-\abs{a}^2-\abs{b}^2}}{\pi^4}\textrm{d}a\textrm{d}b $$ $$=\int_{\substack{a=(a_0,a_1)\in \mathbb{C}^2 \\ b=(b_0,b_1)\in\mathbb{C}^2}}\abs{\log \bigg(\abs{a_0b_1-a_1b_0}\bigg)}^m\frac{e^{-\abs{a}^2-\abs{b}^2}}{\pi^4}\big(1+O(d^{-c_3(B)})\big)\textrm{d}a\textrm{d}b $$ \begin{equation}\label{firstinequality} \leq 2\int_{\substack{a\in \mathbb{C}^2 \\ b\in\mathbb{C}^2}}\abs{\log\abs{a_0b_1-b_0a_1}}^m\frac{e^{-\abs{a}^2-\abs{b}^2}}{\pi^4}\textrm{d}a\textrm{d}b \end{equation} where the last inequality holds for $d\geq d_B$, for some $d_B$ large enough.\\ In the remaining part of the proof, we will estimate the last integral appearing in \eqref{firstinequality}. In order to do this, for any $a=(a_0,a_1)$ we make an unitary trasformation of $\mathbb{C}^2$ (of coordinates $b_0,b_1$) by sending the vector $(1,0)$ to $v_a=\frac{1}{\sqrt{|a_0|^2+|a_1|^2}}(a_0,a_1)$ and the vector $(0,1)$ to $w_a=\frac{1}{\sqrt{|a_0|^2+|a_1|^2}}(-\bar{a}_1,\bar{a}_0).$ We will write any vector of $\mathbb{C}^2$ as a sum $tv_a+sw_a $ with $s,t\in\mathbb{C}$. Under this change of variables, the integral appearing in (\ref{firstinequality}) becomes \begin{equation}\label{secondinequality} \leq 2\int_{\substack{a\in \mathbb{C}^2 \\ (s,t)\in\mathbb{C}^2}}\abs{\log\abs{s}\norm{a}}^m\frac{e^{-\abs{a}^2-\abs{s}^2-\abs{t}^2}}{\pi^4}\textrm{d}a\textrm{d}s\textrm{d}t=2\int_{\substack{a\in \mathbb{C}^2 \\ s\in\mathbb{C}}}\abs{\log\abs{s}\norm{a}}^m\frac{e^{-\abs{a}^2-\abs{s}^2}}{\pi^{3}}\textrm{d}a\textrm{d}s. \end{equation} We pass to polar coordinates $a=re^{i\theta}$, for $\theta\in S^3$ and $r\in\mathbb{R}_+$, and $s=\rho e^{i\phi}$, for $\phi\in S^1$ and $\rho\in\mathbb{R}_+$, and we obtain \begin{equation}\label{thirdinequality} 2\int_{\substack{a\in \mathbb{C}^2 \\ s\in\mathbb{C}}}\abs{\log\abs{s}\norm{a}}^m\frac{e^{-\abs{a}^2-\abs{s}^2}}{\pi^{3}}\textrm{d}a\textrm{d}s=8\int_{\substack{r\in \mathbb{R}_+ \\ \rho\in\mathbb{R}_+}}\abs{\log \rho r}^me^{-r^2-\rho^2}r^3\rho\textrm{d}r\textrm{d}\rho. \end{equation} Writing $\log \rho r= \log \rho +\log r$, developing the binomial and using the triangular inequality, we obtain \begin{equation}\label{forthinequality} (\ref{thirdinequality})\leq 8\int_{\substack{r\in \mathbb{R}_+ \\ \rho\in\mathbb{R}_+}}\sum_{k=0}^m\binom{m}{k}\abs{\log \rho}^k\abs{\log r}^{m-k}e^{-r^2-\rho^2}r^3\rho\textrm{d}r\textrm{d}\rho. \end{equation} Let us study the integrals $\int_{\rho\in\mathbb{R}_+}\abs{\log \rho}^ne^{-\rho^2}\rho\textrm{d}\rho$ and $\int_{r\in\mathbb{R}_+}\abs{\log r}^ne^{-r^2}r^3\textrm{d}r$ . To compute these two integrals, we will use the following formula obtained by integration by part: \begin{equation}\label{logrecursion} \int(\log x)^n\textrm{d}x=x\log x-n\int(\log x)^{n-1}\textrm{d}x, \hspace{2mm} n>0. \end{equation} \begin{itemize} \item Computation of the integral $\int_{\rho\in\mathbb{R}_+}\abs{\log \rho}^ne^{-\rho^2}\rho\textrm{d}\rho.$ We write \begin{equation}\label{secondintegral} \int_{\rho\in\mathbb{R}_+}\abs{\log \rho}^ne^{-\rho^2}\rho\textrm{d}\rho=\int_{\rho=0}^{1}(-\log \rho)^ne^{-\rho^2}\rho\textrm{d}\rho+\int_{\rho=1}^{\infty}(\log \rho)^ne^{-\rho^2}\rho\textrm{d}\rho. \end{equation} For the first term of this sum we have \begin{equation}\label{firstpartsecond} \int_{\rho=0}^{1}(-\log \rho)^ne^{-\rho^2}\rho\textrm{d}\rho\leq \frac{\sqrt{2}}{2}\int_{\rho=0}^{1}(-\log \rho)^n\textrm{d}\rho =\frac{\sqrt{2}}{2}n! \end{equation} where we used first that $e^{-\rho^2}\rho\leq \frac{\sqrt{2}}{2}$ for $\rho\in [0,1]$ and then we used $n$ times the formula (\ref{logrecursion}).\\ For the second term of the sum in \eqref{secondintegral}, we use first the fact that $e^{-\rho^2}\rho\leq \frac{e^{-\frac{1}{\rho^2}}}{\rho^3}$ for any $\rho\geq 1$ and then the change $t=1/\rho$, to have \begin{equation}\label{new2} \int_{\rho=1}^{\infty}(\log \rho)^ne^{-\rho^2}\rho\textrm{d}\rho\leq \int_{\rho=1}^{\infty}(\log \rho)^n\frac{e^{-\frac{1}{\rho^2}}}{\rho^3}\textrm{d}\rho\underset{t=1/\rho}{=}-\int_1^0(\log(1/t))^nte^{-t}\textrm{d}t=\int^1_0(-\log(t))^nte^{-t}\textrm{d}t. \end{equation} The last integral is the same as in (\ref{firstpartsecond}), so from (\ref{firstpartsecond}) and \eqref{new2} we obtain \begin{equation}\label{secondpartsecond} \int_{\rho=1}^{\infty}(\log \rho)^ne^{-\rho^2}\rho\textrm{d}\rho\leq \frac{\sqrt{2}}{2}n! \end{equation} Putting (\ref{firstpartsecond}) and (\ref{secondpartsecond}) in (\ref{secondintegral}), we obtain \begin{equation}\label{secondcomputation} \int_{\rho\in\mathbb{R}_+}\abs{\log \rho}^ne^{-\rho^2}\rho\textrm{d}\rho\leq \sqrt{2}n!. \end{equation} \item Computation of the integral $\int_{r\in\mathbb{R}_+}\abs{\log r}^ne^{-r^2}r^3\textrm{d}r$. As before, we write \begin{equation}\label{firstintegral} \int_{r\in\mathbb{R}_+}\abs{\log r}^ne^{-r^2}r^3\textrm{d}r=\int_{r=0}^1(-\log r)^ne^{-r^2}r^3\textrm{d}r+\int_{r=1}^{\infty}(\log r)^ne^{-r^2}r^3\textrm{d}r. \end{equation} For the first term of the sum, we get \begin{equation}\label{firstpartfirst} \int_{r=0}^1(-\log r)^ne^{-r^2}r^3\textrm{d}r\leq (-1)^n\frac{\sqrt{2}}{\sqrt{3}}\int_{r=0}^1(\log r)^n\textrm{d}r=\frac{\sqrt{2}}{\sqrt{3}}n! \end{equation} where the first inequality follows from $e^{-r^2}r^3\leq \frac{\sqrt{2}}{\sqrt{3}}$, for $r\in [0,1]$, and the last equality is obtained using $n$ times the formula (\ref{logrecursion}).\\ For the second term of the sum in the right-hand side of (\ref{firstintegral}), we use integration by parts with respect to the functions $-\frac{1}{2}(\log r)^nr^2$ and $-2re^{-r^2}$ to obtain \begin{equation}\label{new}\int_{s=1}^{\infty}(\log r)^ne^{-r^2}r^3\textrm{d}r=[-\frac{1}{2}(\log r)^nr^2e^{-r^2}]_{r=1}^{\infty}+\frac{n}{2}\int_{r=1}^{\infty}(\log r)^{n-1}re^{-r^2}\textrm{d}r+\int_{r=1}^{\infty}(\log r)^nre^{-r^2}\textrm{d}r. \end{equation} As $[-\frac{1}{2}(\log r)^nr^2e^{-r^2}]_{r=1}^{\infty}=0$ we obtain, by using \eqref{secondpartsecond} in \eqref{new}, that \begin{equation}\label{secondpartfirst} \int_{s=1}^{\infty}(\log r)^ne^{-r^2}r^3\textrm{d}r\leq \frac{3\sqrt{2}}{4}n!. \end{equation} Putting (\ref{firstpartfirst}) and (\ref{secondpartfirst}) in (\ref{firstintegral}), we get \begin{equation}\label{firstcomputation} \int_{r\in\mathbb{R}_+}\abs{\log r}^ne^{-r^2}r^3\textrm{d}s\leq \frac{4\sqrt{6}+9\sqrt{2}}{12}n!. \end{equation} \end{itemize} Now, we use (\ref{secondcomputation}) and (\ref{firstcomputation}) and we obtain the following estimate: \begin{equation}\label{fifthinequality}\int_{\substack{r\in \mathbb{R}_+ \\ \rho\in\mathbb{R}_+}}\sum_{k=0}^m\binom{m}{k}\abs{\log \rho}^k\abs{\log r}^{m-k}e^{-r^2-s^2}r^3\rho\textrm{d}r\textrm{d}\rho\leq \frac{4\sqrt{3}+9}{6}\sum_{k=0}^m\binom{m}{k}k!(m-k)!\leq \frac{4\sqrt{3}+9}{6}(m+1)!. \end{equation} Putting (\ref{fifthinequality}) in (\ref{forthinequality}) and using (\ref{thirdinequality}) , (\ref{secondinequality}) and (\ref{firstinequality}), we obtaine the desired estimate for \eqref{quanti da borner}, hence the result. \end{proof} \section{Proof of Theorem \ref{rarefaction}}\label{secproof} In this section, we prove our main result. We follow the notations of Sections \ref{ramframwork} and \ref{secmoment}. \begin{prop}\label{largedev} Let $X$ be a real algebraic curve equipped with a compatible volume form $\omega$ of total volume $1$ and let $F\in\textrm{Pic}^1_{\mathbb{R}}(X)$. Fix a sequence of positive real numbers $(a_d)_d$. Then, for any $B>0$ there exists $d_B\in\mathbb{N}$ and a constant $c_B$ such that, for any $E\in\textrm{Pic}_{\mathbb{R}}^0(X)$, any $d\geq d_B$ and any sequence of smooth functions $(\varphi_d)_d$ with $\textrm{dist}(\textrm{supp}(\varphi_d),\mathbb{R} X)\geq B\frac{\log d}{\sqrt{d}}$, the following holds $$\gamma_{F^d\otimes E}\bigg\{(\alpha,\beta)\in\mathbb{R} H^0(X,F^d\otimes E)^2, \abs{\int_X\log \bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d}\geq a_d\bigg\}$$ $$\leq c_B\exp(-\frac{a_d }{2\norm{\partial\bar{\partial}\varphi_d}_{\infty}\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d))}).$$ Here, $\textrm{dist}(\cdot,\cdot)$ is the distance in $X$ induced by $\omega$, $\gamma_{F^d\otimes E}$ is the Gaussian measure on $\mathbb{R} H^0(X,F^d\otimes E)^2$ constructed in Section \ref{secgauss} and $\norm{\cdot}$ denote the pointwise norm induced by the Hermitian metrics on $F$ and $E$ given by Proposition \ref{metr}. \end{prop} \begin{proof} For any $t_d>0$, let us denote \begin{equation}\label{defexp} \exp(t_d\abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d})=\sum_{m=0}^{\infty}\frac{t_d^m}{m!}\abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d}^m. \end{equation} Remark that \begin{equation}\label{equivalence of quantities} \abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d}\geq a_d d\Leftrightarrow\exp(t_d\abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d})\geq e^{t_da_d} \end{equation} so that, by Markov inequality, we have $$ \gamma_{F^d\otimes E}\bigg\{(\alpha,\beta)\in\mathbb{R} H^0(X,F^d\otimes E)^2, \abs{\int_X\log\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\partial\bar{\partial}\varphi_d}\geq a_d\bigg\}\leq $$ \begin{equation}\label{markov} e^{-t_d a_d}\int_{\mathbb{R} H^0(X,F^d\otimes E)^2}\exp(t_d\abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d})\textrm{d}\gamma_{F^d\otimes E}. \end{equation} Now, we have \begin{equation}\label{holder1} \abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\partial\bar{\partial}\varphi_d}^m\leq \norm{\partial\bar{\partial}\varphi_d}^m_{\infty}\abs{\int_{\textrm{Supp}(\partial\bar{\partial}\varphi_d)}\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)\omega}^m. \end{equation} We then apply H\"older inequality with $m$ and $m/(m-1)$ for the functions $\log \bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)$ and $1$, so that \begin{equation}\label{holder2} (\ref{holder1})\leq \norm{\partial\bar{\partial}\varphi_d}^m_{\infty}\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d))^{m-1}\int_{\textrm{Supp}(\partial\bar{\partial}\varphi_d)}\abs{\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}(x)}\bigg)}^m\omega. \end{equation} By Proposition \ref{moments}, there exists $d_B\in\mathbb{N}$ and a positive constant $c_B$ such that for any $d\geq d_B$ we get \begin{equation}\label{holder3} \textrm{right-hand side\hspace{1.5mm}of\hspace{1.5mm}}(\ref{holder2})\leq \norm{\partial\bar{\partial}\varphi_d}^m_{\infty}\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d))^{m}c_B(m+1)!. \end{equation} Then, by (\ref{markov}), (\ref{defexp}) and (\ref{holder3}), we have $$\gamma_{F^d\otimes E}\bigg\{(\alpha,\beta)\in\mathbb{R} H^0(X,F^d\otimes E)^2, \abs{\int_X\log\frac{\norm{W_{\alpha\beta}(x)}}{d^{3/2}}\partial\bar{\partial}\varphi_d}\geq a_d\bigg\}\leq$$ \begin{equation}\label{holdfinal} e^{-t_d a_d}c_B\sum_{m=0}^{\infty}(m+1)\bigg(\norm{\partial\bar{\partial}\varphi_d}_{\infty}\cdot\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d))\bigg)^mt_d^m. \end{equation} Now, we have the identity $\sum_{m=0}^{\infty}(m+1)x^m=\frac{\textrm{d}}{\textrm{d}x}\sum_{m=1}^{\infty}x^m=\frac{\textrm{d}}{\textrm{d}x}\big(\frac{1}{(1-x)}-1\big)=\frac{1}{(1-x)^2}$, so that the right hand side in \eqref{holdfinal} equals \begin{equation}\label{final} \frac{c_B\exp(-t_d a_d)}{\big(1-t_d\norm{\partial\bar{\partial}\varphi_d}_{\infty}\cdot\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d)) \big)^2} \end{equation} Putting $t_d=\big(2\norm{\partial\bar{\partial}\varphi_d}_{\infty}\cdot\textrm{Vol}(\textrm{Supp}(\partial\bar{\partial}\varphi_d))\big)^{-1}$, we get the result. \end{proof} \begin{lemma}[Lemma 2 of \cite{gwexp}]\label{cutoff} There exist positive constants $C_i$, $i\in\{1,\dots, 4\}$, and a family of cutoff functions $\chi_t:X\rightarrow [0,1]$, defined for $t\in (0,t_0]$, for some $t_0>0$, such that \begin{enumerate} \item $\textrm{Vol}(\textrm{supp}(\partial\bar{\partial}\chi_t))\leq C_1t$; \item $\textrm{Vol}(X\setminus\chi_t^{-1}(1))\leq C_2t$; \item $\norm{\partial\bar{\partial}\chi_t}_{L^{\infty}}\leq C_3t^{-2}$; \item $\textrm{dist}(\textrm{supp}(\chi_t),\mathbb{R} X))\geq C_4t$. \end{enumerate} \end{lemma} We now prove the following fiberwise version of Theorem \ref{rarefaction}. \begin{thm}\label{rarefiber} Let $\ell(d)$ be a sequence of positive real numbers such that $\ell(d)\geq B(\log d)$ for some $B>0$. Then there exist positive constants $c_1$ and $c_2$ such that $$\mu_{F^d\otimes E}\big\{u\in \mathcal{M}_d^{\mathbb{R}}(X,F^d\otimes E), \#(\textrm{Crit}(u)\cap \mathbb{R} X)\geq \ell(d)\sqrt{d}\big\}\leq c_1e^{-c_2\ell(d)^2}.$$ Here, $\mu_{F^d\otimes E}$ is the probability measure defined in Definition \ref{measurefiber} and $ \mathcal{M}_d^{\mathbb{R}}(X,F^d\otimes E)$ is defined in Definition \ref{rhfs}. \end{thm} \begin{proof} For any pair of real global sections $(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2$ without common zeros, let $u_{\alpha\beta}$ be the real branched covering defined by $x\mapsto[\alpha(x):\beta(x)]$. Consider the set \begin{equation}\label{cones} \mathcal{C}_{\ell(d)}\doteqdot\{(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2, \#(\textrm{Crit}(u_{\alpha\beta})\cap \mathbb{R} X)\geq \ell(d)\sqrt{d}\big\}. \end{equation} Remark that this set is a cone in $\mathbb{R} H^0(X,F^d\otimes E)^2$. By Proposition \ref{vs}, this implies that the Gaussian measure of $\mathcal{C}_{\ell(d)}$ equals the Fubini-Study measure of its projectivization, which is exactly the measure we want to estimate. In order to obtain the result, we will then compute the Gaussian measure of the cone (\ref{cones}). Moreover, by Proposition \ref{wronskiancritical}, we have that $x\in \textrm{Crit}(u_{\alpha\beta}) $ if and only if $W_{\alpha\beta}(x)=0$, so that, in order to compute $\#\textrm{Crit}(u_{\alpha\beta})$, we can compute the number of zeros of $W_{\alpha\beta}$. To do this, we will use Poincar\'e-Lelong formula, that is the following equality between currents \begin{equation}\label{poincarelelong} \omega_d- \sum_{x\in\{W_{\alpha\beta}=0\}}\delta_x =\frac{1}{2\pi i}\partial\bar{\partial}\log \norm{W_{\alpha\beta}}, \end{equation} where $\norm{\cdot}$ is the (induced) metric on $F^{2d}\otimes E^2\otimes T^*_{X}$ given by Proposition \ref{metr} and $\omega_d$ is the corresponding curvature form. Remark that $\omega_d$ equals $2d\cdot\omega+O(1)$ (the term $2d\cdot\omega$ comes from the curvature form of $F^{2d}\otimes E^{2}$ and the term $O(1)$ from the curvature form of $T^*_{X}$). Moreover, remark that the Hermitian metric $\frac{\pi}{d^{3/2}}\norm{\cdot}$ has the same curvature of the Hermitian metric $\norm{\cdot}$, because the curvature form is not affected by a multiplicative constant. Then, Poincar\'e-Lelong formula \eqref{poincarelelong}, can also be read \begin{equation}\label{poincareinthiscase} 2d\cdot\omega+O(1)- \sum_{x\in\{W_{\alpha\beta}=0\}}\delta_x =\frac{1}{2\pi i}\partial\bar{\partial}\log \bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}}\bigg) \end{equation} where the equality is in the sense of currents. We will apply \eqref{poincareinthiscase} for the functions $\chi_{t_d}$ given by Lemma \ref{cutoff}, for $t_d=\frac{\ell(d)}{4C_2\sqrt{d}}$, where $C_2$ is the constant appearing in Lemma \ref{cutoff}. By \eqref{poincareinthiscase}, we then get \begin{equation}\label{poincaresub0} \frac{1}{2\pi}\abs{\int_X\log \bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}}\bigg)\partial\bar{\partial}\chi_{t_d}}\geq \abs{2d\big(1-\frac{\ell(d)}{4\sqrt{d}}\big)+O(1)-\sum_{x\in\{W_{\alpha\beta}=0\}}\chi_{\frac{\ell(d)}{\sqrt{d}}}(x)}. \end{equation} Remark that, for any pair of real global sections $(\alpha,\beta)$ in the cone $\mathcal{C}_{\ell(d)}$ defined in \eqref{cones}, we have \begin{equation}\label{poincaresub1} \sum_{x\in\{W_{\alpha\beta}=0\}}\chi_{\frac{\ell(d)}{\sqrt{d}}}(x)\leq 2d+2g-2-\ell(d)\sqrt{d}, \end{equation} where $g$ is the genus of $X$. Then, putting \eqref{poincaresub1} in \eqref{poincaresub0}, we get $$\frac{1}{2\pi}\abs{\int_X\log \bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}}\bigg)\partial\bar{\partial}\chi_{\frac{\ell(d)}{\sqrt{d}}}}\geq \frac{1}{2}\ell(d)\sqrt{d}+O(1),$$ for any $(\alpha,\beta)\in \mathcal{C}_{\ell(d)}$. Then, for $d$ large enough, the cone (\ref{cones}) is included in the set $$\bigg\{(\alpha,\beta)\in \mathbb{R} H^0(X,F^d\otimes E)^2, \abs{\int_X\log\bigg(\frac{\pi}{d^{3/2}}\norm{W_{\alpha\beta}}\bigg)\partial\bar{\partial}\chi_{\frac{\ell(d)}{\sqrt{d}}}}\geq \ell(d)\sqrt{d}\bigg\}.$$ The result then follows from Proposition \ref{largedev} and Lemma \ref{cutoff}. \end{proof} \begin{proof}[Proof of Theorem \ref{rarefaction}] We fix a degree $1$ real holomorphic line bundle $F$ over $X$, so that for any $L\in\textrm{Pic}_{\mathbb{R}}^d(X)$ there exists an unique degree $0$ real holomorphic line bundle $ E\in \textrm{Pic}^0_{\mathbb{R}}(X)$ such that $L=F^d\otimes E$. The result then follows by integrating the inequality appearing in Theorem \ref{rarefiber} along the compact base $\textrm{Pic}^0_{\mathbb{R}}(X)\simeq \textrm{Pic}^d_{\mathbb{R}}(X)$ (the last isomorphism is given by the choice of the degree $1$ real line bundle $F$). \end{proof} \bibliographystyle{plain}
\section{Introduction} \label{Section1} In recent times, Schwarz-type topological field theory in 3+1 dimensions drew huge attentions due to some of its very important characteristics in gauge theory~\cite{momen,mann,jerzy}. One of the interesting features of the model is that it contains the massive vector modes in spite of unbroken global symmetry i.e. without taking any recourse of Higgs mechanism~\cite{cs:1974,aab:1990}. TMM in 3+1 dimensions carries many advantages in the perturbative analysis in both zero and finite temperature field theories over the massless YM theory. The interest is increased manifold when the model was found to be unitary~\cite{meig:1983, al:1997} and renormalizable~\cite{al:01}. In this model, YM fields become equally massive without leaving any extra degrees of freedom unlike the case of Higgs mechanism. Their masses are generated due to the presence of topological term $m B\wedge F$ which contains a quadratic mixing of a one-form YM field $A$ and a two-form field $B$. The massive one- and two-form fields have the same number of degrees of freedom~\cite{kr:1973,dewitt}. Hence, an effective theory, constructed by integrating out YM field or $B$ field, becomes a massive theory of vector bosons. Unlike the massless YM theory, the complete propagator of YM field in TMM carries a non-zero pole, which is the coefficient of topological term $B\wedge F$ in the model. In TMM, the YM field acquires an additional physical longitudinal mode due to its mass. But, in spite of having longitudinal mode, the high energy behavior of scattering matrix maintains unitarity in the scattering process involving those modes. This is because of the fact that the model is invariant under Becchi-Rouet-Stora-Tyutin (BRST) symmetry transformations~\cite{meig:1983,al:1997,rohit1,rohit2}. The unitarity is also maintained at every order of quantum corrections since it is renormalizable~\cite{al:01}. The massiveness of the gluon also plays a crucial role in maintaining the cluster decomposition principle i.e. causality~\cite{stro, haag} in quantum field theory. On the other hand, the non-zero pole of gluon propagator can explain gluon confinement in quantum chromodynamics (QCD)~\cite{kugo,fischer,chaichian}. In the regime of strong interaction, we shall see that the TMM provides the same asymptotic behaviour of strong coupling at high energy limit (i.e. asymptotic freedom) as found in massless YM theory~\cite{gross,politzer,sc:1973}. The asymptotic freedom is a very significant characteristic of strong sector in the Standard Model. Beside these important advantages of massive YM fields at zero temperature, we consider its significant role in the perturbative thermal field theory (TFT). The mass of the vector fields put an infrared (IR) cut-off in the model, which behaves as magnetic mass and overcome the Linde infrared problem ~\cite{linde, furusawa} in TFT. This assures the validity of perturbative analysis of the dynamics of YM field at finite temperature which is absent in massless case~\cite{furusawa}. Moreover, it is interesting to point out that the magnetic mass in massless YM theory is not gauge independent~\cite{kapusta, bellac}, hence it is not a physical quantity. But the lattice gauge theories have showed the short range behaviour of chromomagnetic field~\cite{billoire,degrand} due to the presence of physical magnetic mass. In TMM, the mass of the gluon is gauge independent~\cite{aab:1990} and it plays the role of magnetic mass in the perturbative regime. It was also observed that massless gluons make the QCD vacuum unstable in the formation of bound state~\cite{fukuda,huang}. This problem can be cured in this model (without breaking global $SU(N)$ symmetry) because of the massiveness of gluons. These essential characteristics motivate us to consider the TMM at finite temperature. We have already established the hard thermal loop effective action for TMM in~\cite{debmalya}. We now consider the transport phenomenon in topologically massive gluonic fluid. This can be considered in the analysis of quark gluon plasma~(QGP) formed in relativistic heavy ion collision (RHIC). QGP is created in a state slightly away from equilibrium characterised by various transport coefficients in TFT. The shear and bulk viscous coefficients of a fluid are useful quantities to characterize it. These quantities are required as inputs to solve the relativistic viscous hydrodynamical equations which have been used in the description of the space-time evolution of the strongly interacting QCD matter formed in nuclear collisions at relativistic energies. To understand the properties of QCD matter, it is important to reliably estimate both the shear and bulk viscous coefficients. Like shear viscosity~\cite{jeon,moor1,moor2}, bulk viscosity also carries significant physical significance which are discussed in many recent works~\cite{bernhard, alford, bemfica, czajka, astrakhantsev, hattori, Ryu}. We consider the bulk viscosity in pure topologically massive gluondynamics. The lattice simulation finds a non-zero bulk viscosity~\cite{meyer} in pure gluondynamics. To make the analysis simpler, the linear response theory~\cite{bala1} is taken into consideration in the present work. It helps to get the coefficients from the linear perturbation around equilibrium state of the fluid. As a consequence, the bulk viscosity $\zeta_T$ can be calculated from the well-known Kubo formula~\cite{jeon,moor1,moor2,benincasa} \begin{eqnarray} \zeta_T(\omega)&=&\frac{1}{18}\lim_{\omega\to 0}\frac{1}{\omega}\int_{-\infty}^{\infty} dt~e^{-i\omega t} \nonumber\\ &&\times \int d^3x \Braket{\left[\Theta^i_i(x,t), \,\Theta^i_i(0,0)\right]}, \label{em-emcoreltn} \end{eqnarray} where $\Theta^{\mu}_{\nu}$ is the energy momentum tensor of field theory under consideration and $\omega$ is the frequency appearing through the Fourier transformation of the correlation between the spatial trace of the energy momentum tensor (EMT) densities. We observe in Eq.~(\ref{em-emcoreltn}) how the bulk viscosity $\zeta_T$ depends on the trace of EMT densities of the quantum fields. Here, the Kubo formula is obtained from the linear response theory (LRT)~\cite{kapusta, jeon1, bala1, bala2} which reflects the assumption that the system maintains local equilibrium. Since, energy $\int d^3x~ \Theta^{00}(x)$ of the system is conserved, we can shift the spatial trace $\Theta^i_i$ by the energy or any multiple of the energy. The bulk viscosity was found in massless models like $\phi^4$ and YM theories~\cite{moor1,moor2,benincasa} where the conformal symmetry is obeyed classically~\cite{dowker}. The common characteristic of these models is that the classical conformal invariance breaks down due to the quantum correction in renormalization procedure (i.e. the spectral function corresponding to the correlation of energy momentum tensors depends on the breaking of conformal symmetry). The exceptional case is found in $\mathcal{N}=4$ super YM theory where it is observed that $\zeta_T=0$~\cite{benincasa}. The trace anomaly causes problems when we consider the theories in curved spacetime. It was found that this anomaly causes violation of the fifth axiom in a construction of its uniqueness in curved spacetime which affects significantly in the semi-classical treatment of general theory of relativity~\cite{wald, stelle}. This carries a great importance in the consideration of de-Sitter spacetime (i.e. maximally symmetric spacetime with positive cosmological constant $\Lambda>0$) where the trace of the EMT can determine the structure of full EMT. On the other hand, trace anomaly provides negative vacuum energy density from the perturbative regime~\cite{shifman} which contradicts with the cosmological observations~\cite{ralf}. The bulk viscosity may also lead to an alternative to the dark energy in cosmological scenario in de-Sitter spacetime~\cite{sebastein}. From Eq.~(\ref{em-emcoreltn}), we observe that the bulk viscosity depends on the correlation of energy momentum densities. We get the correlation from the low energy theorem (LET) at finite temperature~\cite{ellis, sushpanov, karsch} as: \begin{widetext} \begin{eqnarray} \left(T\frac{\partial}{\partial T}-4\right)^n\braket{\Theta^\mu_\mu} = \int d\tau_n d^3x_n\cdots d\tau_1 d^3x_1 \Braket{\Theta^\mu_\mu(\tau_n, x_n)\cdots\Theta^\mu_\mu(\tau_1, x_1) \Theta^\mu_\mu(0, 0)}, \label{let} \end{eqnarray} \end{widetext} where gulons degrees of freedom are relevant. We take background field method for the calculation of l.h.s. of Eq.~(\ref{let}). This calculation provides the vacuum expectation value of regularized trace of EMT density at finite temperature. With this purpose, we will construct the one-loop effective action using heat kernel method~\cite{dewitt, christensen1, christensen2, barvinsky, filho, Vassilevich} at finite temperature. In this procedure, it was already observed~\cite{megias1, megias2} that the heat kernel coefficients contain a holonomy: $L(x, \beta)= \mathcal{T}\exp\left(-\int_{x_0}^{x_0+\beta} A_0(x'_0, \textbf{x})~ dx'_0\right)$; $L(x, \beta)$ is known as untraced Polyakov loop\footnote{Here $A_0$ is the temporal component of quantum gauge field.}~\cite{polyakov} and $\mathcal{T}$ represents time-ordered product. It arises in the calculation due to the compactification of fourth Euclidean axis in thermal field theory. Hence, the modified heat kernel method, found in~\cite{megias1,megias2}, includes the contribution of $L(x, \beta)$ in the construction of effective action. This causes the dependence of $\zeta_T$ on $L$ and we shall show it in the next section. Specifically, we consider the behavior of spectral function \begin{eqnarray} \rho(\omega)=\int_{-\infty}^{\infty} dt~e^{-i\omega t}\int d^3x \Braket{\left[\Theta^\mu_\mu(x,t), \Theta^\nu_\nu(0,0)\right]}, \label{bulkvisdiagm1} \end{eqnarray} from the model. In the massless YM theory, the bulk viscosity $\zeta_T$ is calculated from quantum corrections of the trace of EMT density of the YM field (i.e. the leading contribution in the calculation comes from the conformal or trace anomaly). This causes the dependence of $\zeta_T$ on the strong coupling in the perturbative computation. In the lattice QCD~\cite{baza}, the ratio $\frac{\zeta_T}{s}$ was computed for pure gluondynamics where $s$ is the entropy density. But, in the case of TMM, we shall observe how the leading order in the spectral function depends on the mass of gauge fields and expectation value of untraced Polyakov loop. The present investigation emphasizes the possibility of finding bulk viscosity in the perturbative regime of QCD with the same asymptotic freedom as found in the literature. In this endeavor, we present an explicit calculation of the spectral function in Sec. \ref{Section2}. Section \ref{Section3} contains the discussion, conclusions and the future aspects of the model in the realm of thermal field theory. We take the signature of the Minkowski metric $\eta_{\mu\nu}$ as $(+,~-, ~-, ~-)$. We have also taken the convention: $\hbar=k_B=c=1$ where $k_B$ is Boltzmann's constant. \section{Calculation} \label{Section2} Within the scope of LRT, the hydrodynamical transport coefficients by using Green-Kubo formula can be written as follows: \begin{widetext} \begin{eqnarray} \eta(\omega)\left( \delta_{k\{i}\, \delta_{j\}l} - \frac{2}{3}\delta_{kl} \, \delta_{ij}\right) + \zeta_T(\omega)\delta_{ik}\, \delta_{lm} =\lim_{\omega\to 0} \frac{1}{\omega}\int d^3x \int_0^\infty dt~ e^{i(\omega t - \textbf{k}\cdot \textbf{x})} \Braket{\left[\Theta_{ij}(t, \textbf{x}),\, \Theta_{kl}\right]}, \end{eqnarray} \end{widetext} where $\eta(\omega)$ is called as shear viscosity and $\delta_{m\{a}\delta_{b\}n}=\dfrac{1}{2}\left(\delta_{am}\delta_{bn}+\delta_{bm}\delta_{an}\right)$. The bulk viscosity can be obtained from the above formula by contracting $i$, $j$ and $k$, $l$ as \begin{eqnarray} \zeta_T(\omega)=\lim_{\omega\to 0} \frac{1}{9\omega}\int d^3x \int_0^\infty dt~ e^{i(\omega t-\textbf{k}\cdot \textbf{x})}\Braket{\left[\Theta^j_{j}(t, \textbf{x}), \, \Theta^k_{k}\right]}. \nonumber\\ \end{eqnarray} The energy momentum tensor is obtained from the following part of the action in Minskowski spacetime \begin{eqnarray} S_0 &=&\int d^4x \Big(-\frac{1}{4}F^{a\mu\nu} F^a_{\mu\nu}+\frac{1}{12}H^{a\mu\nu\lambda} H^a_{\mu\nu\lambda} \nonumber\\ && \qquad \qquad \qquad + \frac{m}{4}\epsilon^{\mu\nu\alpha\beta} B^a_{\mu\nu} F^a_{\alpha\beta}\Big), \label{topactn} \end{eqnarray} where $F^a_{\mu\nu}=\partial_{\mu}A^a_{\nu}-\partial_{\nu}A^a_{\mu}+ g f^{abc} A_\mu^b A_\nu^c$ and $H^a_{\mu\nu\lambda} = \partial_{[\mu} \, B^a_{\nu\lambda]} + g f^{abc}\, A^b_{[\mu} \, B^c_{\nu\lambda]} - g f^{abc} \,F_{[\mu\nu}^b\, C_{\lambda]}^c$ are the field strength of YM field and tensor field, respectively, and $f^{abc}$ is the structure constant of $SU(N)$ group. The presence of an auxiliary field $C^a_\mu$ in the expression of $H^a_{\mu\nu\lambda}$ assures the invariance of the action under the following gauge transformations: \begin{eqnarray} && A_{\mu}^a \to A_{\mu}^a, \qquad B_{\mu\nu}^a \to B_{\mu\nu}^a + \left(D_{[\mu}\, \theta_{\nu]}\right)^a,\nonumber\\ && C_\mu^a \to C_\mu^a + \theta_{\mu}^a, \end{eqnarray} where $\theta_{\mu}^a$ is a vector field in the adjoint representation of $SU(N)$. Including ghosts' sectors, we have the full action as given by \begin{eqnarray} S = S_0 & + & \int d^4x \Big[h^af^a + \frac{\xi}{2}\, h^a h^a + h_\mu^a \big(f^{a\mu} + \partial^\mu \widetilde{n}^a \big) \nonumber\\ &+& \beta^a \big(D_\mu \beta^a - g f^{abc}\, \omega_{\mu}^b\, \omega^c \big) + \frac{\widetilde{\eta}}{2}\, h_\mu^a \,h^{a\mu} \nonumber\\ &-& \partial_\mu \bar{\omega}^{a\mu}\, \alpha^a + \bar{\alpha}^a\, \partial_\mu \omega^{a\mu} + \widetilde{\zeta} \,\bar{\alpha}^a \,\alpha^a + {\bar \omega}^a\, \partial_\mu D^\mu \omega^a \nonumber\\ &+& \bar{\omega}^a_\mu \big\{g f^{abc} \partial_\nu \big(B^{b\mu\nu}\,\omega^c \big) + \partial_\nu \big(D^{[\mu}\, \omega^{\nu]}\big)^a \nonumber\\ &+& \partial_\nu \big(g f^{abc}\, F^{b\mu\nu} \, \theta^c)\big \} \Big], \label{nonabactn} \end{eqnarray} where $S_0$ is the action given in Eq.~(\ref{topactn}) and $ f^a = \partial^\mu A^a_{\mu}$, $f^a_\mu = \partial^\nu B^a_{\nu\mu}$. The parameters $\xi, \widetilde{\eta}$ and $\widetilde{\zeta}$ are the dimensionless gauge-fixing parameters. The auxiliary fields $h^a$ and $h^a_\mu$ play the role of Nakanishi-Lautrup type fields. Here $(\bar{\omega}^a) \omega^a$ and $(\bar{\omega}^a_\mu) \omega^a_\mu$ (with ghost number $(-1)+1$) are the Fermionic scalar and vector (anti-)ghost fields for the vector gauge field $A^a_\mu$ and tensor field $B^a_{\mu\nu}$, respectively. The bosonic scalar fields $(\bar \beta^a) \beta^a$ (with ghost number $(-2)+2$) are the (anti-)ghost fields for the Fermionic vector (anti-)ghost fields and $\widetilde{n}^a$ is the bosonic scalar ghost field (with ghost number zero). These scalar ghost fields are required for the stage-one reducibility of the two-form field. Furthermore, $\alpha^a$ and $\bar{\alpha}^a$ are the Grassmann valued auxiliary fields (with ghost number $+1$ and $-1$, respectively). This model contains massive non-Abelian gauge field and it was shown to be BRST invariant~\cite{al:1997,rohit1,rohit2}. In~\cite{rohit1,rohit2}, it is seen that the model is also invariant under the anti-BRST symmetry transformations. The $\mathcal{CP}$ symmetry is not violated in this model. The EMT density corresponding to the action [cf. Eq.~{(\ref{topactn})}] in curved space time is given by \begin{eqnarray} \Theta_{\mu\nu}=\frac{2}{\sqrt{-\widetilde{g}}} \frac{\delta \widetilde{S}_0}{\delta g^{\mu\nu}}, \end{eqnarray} where $\widetilde{S}_0=\int\sqrt{-\widetilde{g}} \Big(-\frac{1}{4}F^{a\mu\nu} F^a_{\mu\nu}+\frac{1}{12}H^{a\mu\nu\lambda} H^a_{\mu\nu\lambda}$ $+\frac{m}{4}\epsilon^{\mu\nu\alpha\beta} B^a_{\mu\nu} F^a_{\alpha\beta}\Big)d^4x$ and $g_{\mu\nu}$ is the metric in the curved spacetime. Here $\widetilde{g}= \text{Det}g_{\mu\nu}$. We find that the EMT corresponding to the action of TMM classically as \begin{eqnarray} \Theta_{\mu\nu}=\Theta^{YM}_{\mu\nu}+\frac{1}{2}\,\left(H^a_{\mu\alpha\beta} H_\nu^{a~\alpha\beta}-\frac{1}{6}\,g_{\mu\nu} H^{a\alpha\beta\rho} H^a_{\alpha\beta\rho}\right), \nonumber\\ \label{emt} \end{eqnarray} where $\Theta^{YM}_{\mu\nu}=-F^a_{\mu\alpha}F^{a~\alpha}_{\nu}+\dfrac{1}{4}\,g_{\mu\nu}F^{a\alpha\beta} F^a_{\alpha\beta}$ is the standard EMT for the YM field $A$. Since the topological term is invariant under the variation of metric tensor, hence, it does not provide any contribution in TMT in Eq.~(\ref{emt}). The trace of $\Theta^\mu_\nu$ is non-zero in 3+1 dimensional spacetime reads \begin{eqnarray} \Theta^{\mu}_\mu= \frac{1}{6}\,H^{a\rho\nu\lambda} H^a_{\rho\nu\lambda}, \label{trace} \end{eqnarray} because $ g^{\mu\nu}\Theta^{YM}_{\mu\nu}=0$. Hence, it is clear from Eq.(\ref{trace}) and the action in Eq.~(\ref{topactn}) that the kinetic term of $B$ field is responsible for the absence of conformal symmetry at zero temperature. This implies that we can find the bulk viscosity for the topologically massive YM fluid at finite temperature. For our purpose, we use low energy theorem at finite temperature~\cite{ellis,sushpanov,karsch}. We use the splitting\footnote{The quantum fields are designated by lowercase letters having Lorentz and gauge indices.} \begin{eqnarray} A^e_\mu = \mathcal{A}^e_\mu+a^e_\mu, \label{split} \end{eqnarray} where $\mathcal{A}^e_\mu$ is background and $a^e_\mu$ is the quantum fields. Our aim is to calculate the effective action at one-loop order for massive gluon field. Due to the splitting, the YM field strength becomes \begin{eqnarray} F^e_{\mu\nu} ( \mathcal{A}, a)= F^e_{\mu\nu} (\mathcal{A})+\left(D^{\mathcal{A}}_{[\mu}\, a_{\nu]}\right)^e + g \,f^{ecd}\,a_\mu^c \,a_\nu^d, \end{eqnarray} where $e$ is a gauge index. The covariant derivative $ D^{\mathcal{A}}_\mu = \partial_\mu+ g \mathcal{A}_\mu$ is taken with respect to the background field $\mathcal{A}^\mu$. Here $g$ is the gauge coupling constant. Our aim is to find an effective action at one-loop level from Eq.~(\ref{nonabactn}), which can provide regularized EMT density as shown in ~\cite{dewitt, christensen1, christensen2}. For this purpose, it is sufficient to find the terms in the action which contain quantum fields $a_\mu$ quadratically. It is to be noted that the YM and $B$ fields are coupled quadratically due to presence of the topological term $B\wedge F$ in the Lagrangian density\footnote {Due to Eq.~(\ref{split}), the following term $\dfrac{m}{4}\epsilon^{\mu\nu\rho\lambda}B_{\mu\nu} F_{\rho\lambda}$ contributes $\dfrac{m}{4}\epsilon^{\mu\nu\rho\lambda}b_{\mu\nu}\left(F_{\rho\lambda}(\mathcal{A})+2\left(D^{\mathcal{A}}_{\rho}a_{\lambda}\right)\right)$ in the quadratic part under consideration.} in Eq.~(\ref{topactn}). This mixing leads us to construct a matrix from the kinetic terms of YM and $B$ fields and $\dfrac{m}{2} B\wedge F$ term \footnote{The $\Delta$ is appeared by the re-expressing $S_0$ [cf. Eq.~(\ref{topactn})] as $S_0=\displaystyle\int d^4x ~\Phi^{\mathbb{T}} \Delta \Phi$ where $\Phi=\binom{A}{B}$ and $\Phi^{\mathbb{T}}$ is the transpose of $\Phi$.} \begin{eqnarray} \Delta= \left( \begin{array}{cc} \Delta_A & \Delta_{AB}\\ \Delta_{BA} & \Delta_B \end{array} \right). \end{eqnarray} It is a block matrix whose determinant is given by~\cite{dewitt} \begin{eqnarray} \text{det}\Delta &=& \left(\text{det}\Delta_B \right)^{-1}\text{det}\left(\Delta_A-\Delta_{AB}\Delta^{-1}_B \Delta_{BA}\right) \nonumber\\ &=&\left(\text{det}\Delta_B \right)^{-1}\text{det} \Delta_A ~ \nonumber\\ && \times \text{det}\left(1-\left(\Delta_A\right)^{-1}\Delta_{AB}\Delta^{-1}_B \Delta_{BA}\right). \label{blkmatrix} \end{eqnarray} From the complete action of the model, we can clearly notice the presence of trilinear couplings among the ghost and gluon fields (due to the above splitting provides the quadratic terms in all quantum fields). The ghosts' sector consists of Faddeev-Popov (FP) ghosts for $a_\mu$, vector ghosts for $B$ field, FP ghosts of the vector ghost fields and a scalar ghost. The general structure of the effective action, at $T=0$, in one-loop level is given by~\cite{dewitt, sw} \begin{eqnarray} W^1[\mathcal{A}]&\propto & \int\sqrt{-\widetilde{g}} \, \bigg( n_1\text{Tr}\ln\Delta + n_2\text{Tr}\ln\Delta_{gh} \nonumber\\ && \qquad\quad + n_3\text{Tr}\ln\Delta_{vecgh} + n_4\text{Tr}\ln\Delta_{ghvecgh} \nonumber\\ && \qquad\quad + n_5\text{Tr}\ln\Delta_{sclgh}\bigg)d^Dx, \end{eqnarray} where $n_i$'s (with $i =1, 2, 3, 4, 5$) are the numerical factors which appear after integrating out the quantum fields in the partition functional. These numerical factors also depend on the spin-statistics of quantum fields~\cite{dewitt, sw}; $\Delta_{\Phi_i}$'s are appearing from the action after integrating out the quantum fields from the partition functional~\cite{dewitt, sw} \begin{eqnarray} Z[\Phi_{i0}]=\int\prod_{i=1}^n \mathcal{D}\widetilde{\phi_i} \exp\left(\frac{i}{2}\displaystyle\int d^4x\sqrt{-\widetilde{g}} \displaystyle\sum_{i=1}^{n=1}\Phi_i \Delta_{\Phi_i} \Phi_i\right), \nonumber\\ \label{partitionfuncn} \end{eqnarray} where $\Phi_{i0}$ is the background field of $i$-th type field: $\Phi_i=\Phi_{i0}+\widetilde{\phi}_i$; $\widetilde{\phi}_i$ is the quantum part of $\Phi_i$. We have suppressed the spin and gauge indices of the fields in Eq.~(\ref{partitionfuncn}) and $\Delta_{\Phi_i}$'s may be the function of background fields or not. For example, we note from the complete action of TMM that $\Delta$, $\Delta_{gh}$, $\Delta_{vecgh}$ and $\Delta_{ghvecgh}$ are the functions of covariant derivative with respect to the background YM field $\mathcal{A}$ but for the scalar ghost $\Delta_{sclgh}$ does not contain any covariant derivative and $\mathcal{A}$. One can also clearly check from the structure of the bulk matrix in Eq.~(\ref{blkmatrix}) that $\Delta$ contains $\Delta_A$, $\Delta_{AB}$, and $\Delta_{BA}$. Here, $\Delta_{A}$ and $\Delta_{B}$ appear from the kinetic terms of $A$ and $B$ fields whereas other $\Delta$'s comes from $B\wedge F$ term. Following the general rule~\cite{dewitt}, we can write the effective action at $T=0$ as \begin{eqnarray} W^1 &=& -\frac{1}{2}\int\sqrt{-\widetilde{g}} ~\Big[\text{Tr}\ln\Delta-2\text{Tr}\ln\Delta_{gh} + 2 \text{Tr}\ln\Delta_{vecgh} \nonumber\\ &-& 2\text{Tr}\ln\Delta_{ghvecgh}-\text{Tr}\ln\Delta_{sclgh}\Big]d^Dx. \label{effactn} \end{eqnarray} For the computation of $\text{Tr}\ln\Delta_{\Phi_i}$, we use the heat kernel method at finite temperature. The relation between the heat kernel coefficients at zero and finite temperature is given explicitly~\cite{filho, megias1, megias2}. This calculation is done with covariant gauge-fixing condition $D_\mu^{\mathcal{A}}a^\mu=D_\mu^{\mathcal{A}}b^{\mu\nu}=D_\mu^{\mathcal{A}}\omega^\mu=0$. We know from the detail of heat kernel method~\cite{dewitt, barvinsky, Vassilevich} how the trace of an operator $\Delta_{\Phi_i}$ is calculated from the coincidence limit of a matrix with matrix element is \begin{eqnarray} \text{Tr}\ln\Delta_{\Phi_i}= \int_0^\infty\frac{1}{\left(4\pi\tau\right)^{D/2}} H(x, x, \tau)~ \frac{d\tau}{\tau}, \label{heatkrnl1} \end{eqnarray} where $H(x, x, s)=\displaystyle\sum_{n=0}^\infty s^n~\text{Tr} a_n $ is called to be heat kernel corresponding to an operator $\Delta_{\Phi_i}$ and $a_n$'s are the heat kernel coefficients in $D$-dimensional spacetime. Here $\text{Tr}f(x,y)=\int\sqrt{-\widetilde{g}} ~ \text{tr}\,f(x,x) d^Dx$ and `tr' denotes the trace over the Lorentz and internal indices~\cite{dewitt, barvinsky, Vassilevich} of function $f(x,y)$. In the construction of the effective action at one-loop level, we consider the trace [cf. Eq.~(\ref{effactn})] at finite temperature. The expression in Eq.~(\ref{heatkrnl1}) is modified at finite temperature as~\cite{filho} \begin{eqnarray} H_\beta(x, y, \tau)= H(x, y, \tau)\left[1+2 \sum_{n=1}^\infty\kappa_n e^{-\frac{n^2\beta^2}{4\tau}}\right], \label{heatkrnl2} \end{eqnarray} where $\beta=\frac{1}{T}$ and $\kappa_n$ signifies the dependence of the expansion on the spin-statistics of the fields. In fact, $\kappa_n=(-1)^n$ for fermionic field and $\kappa_n =1$ for bosonic field. The relation in Eq.~(\ref{heatkrnl2}) was found to be incomplete~\cite{megias1, megias2}. This incompleteness occurs due to the exclusion of $L(x, \beta)$ as mentioned in the Sec. \ref{Section1} . The heat kernel expansion of trace: Tr$\left(e^{-s(-D^\mu D_\mu+X)}\right)=\displaystyle\int \dfrac{ds}{s}\dfrac{1}{(4\pi s)^{D/2}} \displaystyle\sum_{n=0}^\infty s^n\text{Tr}(a^T_n)$ is given with the following heat kernel coefficients (upto mass dimension 4)~\cite{megias1, megias2} \begin{eqnarray} a_0^T(x,x)&=&\phi_0(L,s),\\ a_1^T(x,x) &=&-\phi_0(L,s) X,\\ a_2^T(x,x) &=&-\frac{1}{2}\phi_0(L,s)X^2-\frac{1}{3}\bar{\phi}_2(L,s)E_i^2 \nonumber\\ &+& \frac{1}{12}\phi_0(L,s)F_{ij}^2, \end{eqnarray} where $E_i= F_{0i}$, and \begin{eqnarray} \phi_0(L,s) &=&\left[1+2\sum_{n=1}^\infty L^n e^{-\frac{n^2\beta^2}{4s}}\right]\label{phi0}, \\ \phi_n(L) &=& \frac{1}{\beta}\sqrt{4\pi s}\sum_{p_{0r}}s^{n/2}~ Q^n_r e^{sQ_r^2},\\ \bar{\phi}_2 &=&\phi_0+2\phi_2, \end{eqnarray} % where $Q_r=i p_{0r}-\frac{r}{\beta}\ln L$~\cite{megias1, megias2}. Thus, $\braket{\Theta_{\mu\nu}}$, derived from the effective action, will depend on $L$ and as a consequence of LET [cf. Eq.~(\ref{let})] we can see the correlation among the EMT densities become dependent on $L$, too. Its further consequence is very interesting which we shall show how $\zeta_T$ depends on $L$. According to the method outlined in~\cite{dewitt, barvinsky, Vassilevich}, we need to identify $X$ in the Laplace-type operator appearing in the kinetic terms of quantum fields: \begin{eqnarray} \Delta_A\equiv-\frac{1}{2} \left(-D^\mu_{\mathcal{A}}D^{\mathcal{A}}_\mu +X\right), \end{eqnarray} where covariant derivative is expressed as $D_\mu^{\mathcal{A}}=\partial_\mu+\widetilde{\omega}_\mu(\mathcal{A})$ and $\widetilde{\omega}_\mu$ is the ``connection''~\cite{dewitt, barvinsky, Vassilevich}. Generally, $X$ and $\widetilde{\omega}_\mu$ are matrix valued functions in the non-Abelian gauge theory. Corresponding to the YM field, we have~\cite{Vassilevich} \begin{eqnarray} \left(\widetilde{\omega}_\mu^{cd}\right)^\rho_\lambda &=& -gf^{ecd} \mathcal{A}^e_\mu\delta^\rho_\lambda,\label{omega}\\ \left(X^{cd}_A\right)_{\rho\lambda}&=& 2gf^{ecd}F^e_{\rho\lambda}(\mathcal{A})\label{Ecoef}. \end{eqnarray} The expression of the $\widetilde{\omega}_\mu$'s in Eq.~(\ref{omega}) are same for all the quantum fields in Eq.~(\ref{nonabactn}) but $X$'s will be different. For example, we get $X_B$ corresponding to the $b_{\mu\nu}$ and vector ghost fields as: \begin{eqnarray} \left(X_B^{cd}\right)^{\mu\nu}_{\rho\lambda}&=& 2g f^{ecd} F^e_{\alpha\beta}(\mathcal{A})\,\eta^{\alpha[\mu}\delta^{~\nu]}_{[\lambda}\delta_{\rho]}^{~\beta},\\ \left(X_{vecgh}^{cd}\right)_{\mu\nu}&=&-gf^{ecd}F^e_{\mu\nu}(\mathcal{A}). \end{eqnarray} For the rest of the ghost fields, $X=0$ which can be read-off from the action in Eq.~(\ref{nonabactn}). We also have the following explicit expressions \begin{eqnarray} (\Delta_{AB})^{\mu\rho\sigma} &=& i\frac{m}{2} \epsilon^{\alpha\mu\rho\sigma}\overrightarrow {D}_{\alpha}^x, \\ (\Delta_{BA})^{\mu\rho\sigma} &=& i\frac{m}{2} \epsilon^{\beta\mu\rho\sigma}\overleftarrow{D}_{\beta}^y, \\ \left(\Delta_B\right)_{\alpha\beta,~\rho\sigma} &=&-\eta_{\alpha[\rho} \,\eta_{\sigma]\beta}D^\mu D_\mu+\left(X\right)_{\alpha\beta,~\rho\sigma}. \end{eqnarray} In the above, $\Delta_B$ can be expressed as \begin{eqnarray} \left(\Delta_B\right)_{\alpha\beta,~\rho\sigma}=- \eta_{\alpha[\rho} \, \eta_{\sigma]\beta}\,\partial^\mu \partial_\mu +\sigma_{\alpha\beta,~\rho\sigma}, \end{eqnarray} where $\sigma_{\alpha\beta,~\rho\sigma}=\eta_{\alpha[\rho} \,\eta_{\sigma]\beta}\left(2g\mathcal{A}^\mu\partial_\mu+g\partial_\mu \mathcal{A}^\mu+g^2 \mathcal{A}^\mu \mathcal{A}_\mu\right)+\left(E\right)_{\alpha\beta,~\rho\sigma}$. We can safely neglect the contribution from $\Delta_{sclgh}$ in the effective action [cf. Eq.~(\ref{effactn})] because of the absence of the background field in kinetic term of the scalar ghost field of $b_{\mu\nu}$. Since, in the leading order \begin{widetext} \begin{eqnarray} (\Delta_{AB} \Delta^{-1}_B \Delta_{BA})^{\mu\nu}_{xy} &=& m^2\delta^4(x-y)\eta^{\mu\nu}\,\left(1-\frac{1}{D}\right) +\mathcal{J}^{\mu\nu}_{xy}(g^n,\mathcal{A}), \quad n\geq 1, \label{leadinodr} \end{eqnarray} \end{widetext} we can re-express $\text{Tr}\ln\Delta$ as \begin{eqnarray} \text{Tr}\ln\Delta &=& \text{Tr}\ln \widetilde{\Delta}-\text{Tr}\ln\Delta_B \nonumber\\ && \quad + \,\text{Tr}\ln\left(1-\mathcal{J}(g^n,\mathcal{A})\widetilde{\Delta}^{-1}\right), \label{reexpress} \end{eqnarray} where $\widetilde{\Delta}= \Delta_A +\widetilde{m}^2$ and $\widetilde{m}^2=\left(1-\frac{1}{D}\right)m^2$. In Eq.~(\ref{leadinodr}), the matrix-valued operator $\mathcal{J}^{\mu\nu}_{xy}(g^n,\mathcal{A})$ designates the parts of $\left(\Delta_{BA} \Delta^{-1}_B \Delta_{AB}\right)^{\mu\nu}_{xy}$ which contains various non-zero powers of $g$ and background YM field $\mathcal{A}$. The significance of the r.h.s. of Eq.~(\ref{reexpress}) will be shown later in our analysis. Hence, we have now \begin{eqnarray} W^1 &=& - \frac{1}{2}\int~\sqrt{-\widetilde{g}}\Big[\text{Tr}\ln\widetilde{\Delta}-\text{Tr}\ln\Delta_B-2\text{Tr}\ln\Delta_{gh} \nonumber\\ &+& \text{Tr}\ln\left(1-\mathcal{J}(g^n,\mathcal{A})\widetilde{\Delta}^{-1}\right)\Big]d^Dx. \label{modeffectiveactn} \end{eqnarray} The last term is found from the series expansion \begin{eqnarray} \ln(1-Y)=-\sum_{n=1}^\infty \frac{Y^n}{n}. \label{logexpnsn} \end{eqnarray} It can be readily checked that the first term in the above expansion is: $- Y = \left(\mathcal{J}(g^n,\mathcal{A})\widetilde{\Delta}^{-1}\right)$. The traces in the first three terms can be found from Eq.~(\ref{heatkrnl1}). Now we explain the significance of Eq.~(\ref{reexpress}). Following Eq.~(\ref{heatkrnl1}), we can write \begin{eqnarray} \braket{x|\ln\Delta|x}=\displaystyle\int_0^\infty \frac{ds}{s}~e^{-\widetilde{m}^2 s}~ \widetilde{H}(x, x, s), \label{heatkrnel3} \end{eqnarray} which shows the trace is convergent in the large-$s$ region. Further, $\widetilde{H}(x, x, s)$ is different from $H(x, x, s)$ [cf. Eq.~(\ref{heatkrnl1})] due to the rearrangement of the terms as shown in Eq.~(\ref{leadinodr}). To find the trace, we should note that the Laplace-type operator acts on the gluon and vector ghost fields in $(N^2-1)D$ dimensional internal space whereas it acts on the FP ghost fields in $(N^2-1)$ dimensional internal space. For the $b_{\mu\nu}$ field, the dimension of the internal space becomes $\dfrac{D(D-1)}{2}(N^2-1)$ where the operator acts. This leads to the following expression for the heat kernel expansion at finite temperature~\cite{megias1, megias2}: \begin{eqnarray} W^1=-\frac{1}{2}\int_0^{\infty}\frac{ds}{s} \frac{e^{-\widetilde{m}^2s}}{(4\pi s)^{D/2}}\sum_{n=0}^{\infty} \text{Tr}~ a^T_n(x,x) s^n, \end{eqnarray} where \begin{eqnarray} a^T_0 &=& \frac{7D-D^2-8}{2}\phi_0(L), \label{htkrnlceff0}\\ a^T_2 &=& \left[(2-D)+\frac{7D-D^2-8}{24}\right]\phi_0(L) F^{a\mu\nu} F_{\mu\nu}^b N^{ab} \nonumber\\ &+&\frac{7D-D^2-8}{12} E_i^a E_i^b N^{ab} \bar{\phi}_2(L), \label{htkrnlcoeff2} \end{eqnarray} and \begin{eqnarray} \phi_n(L)= \frac{1}{\beta}\sqrt{4\pi s}\sum_{p_{0r}}s^{n/2}~ Q^n_r e^{sQ_r^2}, \qquad \bar{\phi}_2=\phi_0+2\phi_2, \qquad \end{eqnarray} with $Q_r=i\left( p_{0r}-\frac{r}{\beta}\ln L\right)$~\cite{megias1, megias2} and $N^{ab}=f^{acd}\,f^{bcd}= N\delta^{ab}$ in Eq.~(\ref{htkrnlcoeff2}). Now we are going to get an explicit expression of the effective action at finite temperature using Eq.~(\ref{heatkrnl2}). From the general expression of heat kernel coefficients in~\cite {megias1,megias2}, we can write the effective action for massless gluon field at finite temperature as\footnote{We have suppressed the terms involving the Riemann curvature, Ricci tensor and scalar and their derivatives because they do not contribute in the limit $g_{\mu\nu}\to\eta_{\mu\nu}$.}~\cite{megias2} \begin{eqnarray} W^1 &=& \int d^Dx \sqrt{-\widetilde{g}}~\bigg(-\frac{\pi^2}{45}T^4(N^2-1) \nonumber\\ &+& \frac{2\pi^2}{3}T^4~\text{tr}\left[\nu^2(1-\nu)^2\right]+\mathcal{I}(\mathcal{A}, T)\bigg),\quad 0<\nu <1, \nonumber\\ \label{effactnmasslessYM} \end{eqnarray} where $\nu=\left(\dfrac{\ln L}{2\pi i}\right)$ and $\mathcal{I}(\mathcal{A}, T)$ designates the term depending on both temperature and background YM field. In the massless case, it is already seen in~\cite{megias2} that IR divergence exists in the large-$s$ region. This causes a serious problem in perturbative TFT which we have pointed out in the introduction of the paper. In the TMM, the problem is settled due to the presence of the factor $e^{-m^2s}$ [cf. Eq.~(\ref{heatkrnel3})]. We need the expression of $\phi_0$ [cf. Eq.~(\ref{phi0})] to calculate the dimensionally regularized effective action as~\cite{megias1, megias2} \begin{eqnarray} W^{1}=-\frac{1}{2}\int_0^{\infty}\frac{ds}{s} \frac{\mu^{2\epsilon}}{(4\pi s)^{D/2}}\sum_{n=0}^{\infty}\ \text{Tr}~ a^T_n(x,x)~ s^n, \end{eqnarray} where $\mu$ is called to be subtraction point and the regularization will be done in $D=4-2\epsilon$ dimensions. To calculate the terms in the leading order of heat kernel expansion, we need to work out the integration of the type~\cite{megias1, megias2} \begin{eqnarray} I_{l, n}=\int_0^{\infty}\frac{ds}{s}~(4\pi\mu^2 s)^{\epsilon}~ s^l~ \phi_n(\omega,s)~ e^{-m^2s}, \quad |\omega|=1, \quad \end{eqnarray} which yields in the leading order for $l=-2$ and $n=0$ \begin{eqnarray} I_{-2, 0}&=& \int_0^{\infty}\frac{ds}{s}~ e^{-m^2s}~(4\pi\mu^2 s)^{\epsilon} s^{-2} \phi_0(\omega,s)\nonumber\\ &=&\nonumber(4\pi\mu^2)^\epsilon \int_0^\infty ds s^{-2+\epsilon}e^{-m^2s}\sum_{k\in\mathbb{Z}}L^k e^{-\frac{k^2\beta^2}{4s}}\\ &=& (4\pi\mu^2)^\epsilon \bigg[\Gamma(\epsilon-2)m^{2(2-\epsilon)} \nonumber\\ &+& 2\sum_{k=1}^{\infty} L^k\left(\frac{k^2\beta^2}{4m^2}\right)^{-\frac{2-\epsilon}{2}} K_{-2+\epsilon}(mk\beta)\bigg],\label{intgtnresult} \end{eqnarray} where we have used the formula~\cite{gradshteyn} \begin{eqnarray} \int_0^{\infty} dx~ x^n e^{-\lambda x}= \frac{n!}{\lambda^{n+1}}, \quad [\text{Re}~\lambda>0], \end{eqnarray} and the modified Bessel function of ~$K_n(x)$ in Eq.~(\ref{intgtnresult}) appears through its integral representation: \begin{eqnarray} \int_0^\infty x^{n-1} e^{-\frac{\beta}{x}-\alpha x} dx= 2\left(\frac{\beta}{\alpha}\right)^{\frac{n}{2}}~K_n(2\sqrt{\beta\alpha}), \nonumber\\ \quad [\text{Re}~\alpha>0,~ \text{Re}~\beta >0]. \end{eqnarray} The first term in Eq.~(\ref{intgtnresult}) appears in any massive field theory at zero temperature. But, the next term is interesting because of its dependence on the untraced Polyakov loop (L) at finite temperature. The $L$-dependence of the EMT at high temperature will be discussed later. It is one of the main results of our present investigation. For the effective action at finite temperature, in the limit $\epsilon\to 0 $, $\beta\to 0$, we have \begin{eqnarray} W^{1(T\neq 0)}_0 = \int d^4x \sqrt{-\widetilde{g}}~ \bigg[- \frac{\pi^2}{45}T^4(N^2-1) \nonumber\\ + \,\mathcal{O}(L, m\beta)\bigg], \label{effectiveactnTMM} \end{eqnarray} where the leading order term is matched with the expected result in Eq.~(\ref{modeffectiveactn}). In getting the above expression, we have used $K_{-n}(x)= K_n(x)$~\cite{gradshteyn}. In the above, $\mathcal{O}(L, m\beta)$ designates the terms which contain various non-zero power of $L$ and dimensionless quantity $m\beta$ (with $\beta=T^{-1}$). The appearance of leading order terms can be understood from the behaviour of $K_n(x)$ for small argument $(x\to 0)$ as~\cite{gradshteyn} \begin{eqnarray} K_n(x)\sim \frac{1}{2}\Gamma(n)\left(\frac{x}{2}\right)^{-n}, \end{eqnarray} and the expansion of the time-ordered product is \begin{eqnarray} L^k(x, \beta)&=& \left(1-\int_{x_0}^{x_0+\beta} a_0(x'_0, x)L(x',\beta) dx'_0\right)^k \nonumber\\ &=&1-k\int_{x_0}^{x_0+\beta} a_0(x'_0, \mathbf{x})L(x', \beta)~dx'_0+\cdots, \quad \end{eqnarray} where $x'\equiv (x'_0, \mathbf{x})$. We also obtain another important result which carries a great significance in a renormalizable massive non-Abelian gauge theory. From the dimensional regularization for the coefficient $a_2^{T=0}$, we obtain \begin{eqnarray} W^{1(T=0)}_2=\lim_{\epsilon\to 0} g^2 N\frac{1}{(4\pi)^2}\int d^4x \sqrt{-\widetilde{g}} \frac{1}{\bar{\epsilon}} \frac{11}{12} F^{a\mu\nu} F^a_{\mu\nu}, \end{eqnarray} where $\dfrac{1}{\bar{\epsilon}}=\left(\dfrac{1}{\epsilon}-\gamma_E+\ln4\pi\right)$ and $\gamma_E\approx 0.5772$ is called to be Euler's constant. This result appears from the contribution of $a_2^{T=0}$. This contribution is same as found in the massless YM theory. Thus, we get the same asymptotic behaviour (i.e. asymptotic freedom) of gauge coupling $g$ in the non-Abelian TMM. Therefore, the applicability of the perturbative technique at high temperature is consistent. Now we go back to the low energy theorem at finite temperature [cf. Eq.~(\ref{let})]. For this purpose, we consider Eq.~(\ref{let}) for $n=1$: \begin{eqnarray} \left(T\frac{\partial}{\partial T}-4\right)\braket{\Theta^\mu_\mu} &=& \int d\tau d^3x \braket{\Theta^\mu_\mu(\tau, x)\Theta^\mu_\mu(0, 0)} \nonumber\\ &&+\, \frac{(1-3c_s^2)}{c_s^2}h, \label{keyeqn} \end{eqnarray} where, we add a term in the right hand side of the above equation. This term is appeared from the consideration of right hydrodynamic limit to get the transport coefficients ~\cite{romatschke}. $h$ is enthalpy density and $c_s$, the speed of sound. Now, putting the expression of $a^T_0$ [cf. Eq.~(\ref{htkrnlceff0})] in the above expression, we get, in the high temperature limit \begin{widetext} \begin{eqnarray} \int d\tau d^3x \braket{\Theta^\mu_\mu(\tau, x)\Theta^\mu_\mu(0, 0)} &=&-\frac{g^2(N^2-1)}{(4\pi)^2}\sum_{n=1}^\infty\frac{4\widetilde{m}^2}{n^2}\left[-\frac{n\widetilde{m}}{\beta}K_1(n\widetilde{m}\beta) \Braket{\text{tr}~L^n}+\frac{2}{n \widetilde{m}^2\beta^3}\Braket{\text{tr}\left(L'L^{n-1}\right)}+\cdots\right]\nonumber \\ &=&-\frac{g^2(N^2-1)}{(4\pi)^2}\sum_{n=1}^\infty \frac{4T^2\widetilde{m}^2}{n^2}\left[\frac{2T}{n\widetilde{m}^2}\braket{\text{tr}\left(L' L^{n-1}\right)}-\braket{\text{tr}~L^n}+\cdots\right], \label{emtcorreltn} \end{eqnarray} where $L'=\dfrac{\partial L}{\partial\beta}$. In the last step of the above equation, we have used a series expansion of the modified Bessel function~\cite{gradshteyn}: \begin{eqnarray} K_n(z)&=&\frac{1}{2}\left(\frac{1}{2}z\right)^{-n}\sum_{k=0}^{n-1}\frac{(n-k-1)!}{k!}\left(-\frac{z^2}{4}\right)^k-(-1)^{n}\ln\left(\frac{1}{2}z\right)I_n(z) \nonumber\\ &+& (-1)^n\frac{1}{2}\left(\frac{z}{2}\right)^n\sum_{k=0}^{\infty}\{\psi(k+1)+\psi(k+n+1)\}\frac{\left(\frac{z^2}{4}\right)^k}{k!(n+k)!}, \label{seriesexpntn} \end{eqnarray} \end{widetext} and the recursion relation~\cite{gradshteyn} has also been utilized: \begin{eqnarray} \frac{d K_n(z)}{dz}= -K_{n-1}-\frac{n}{z} K_n(z). \end{eqnarray} In the series expansion [cf. Eq.~(\ref{seriesexpntn})], $I_n(x)$ is the modified Bessel function ~\cite{gradshteyn}: \begin{eqnarray} I_n(x)=\left(\frac{x}{2}\right)^n\sum_{k=0}^{\infty}\frac{\left(\frac{x^2}{2}\right)^k}{k!\Gamma(n+k+1)} \end{eqnarray} and $\psi(n)$ is Euler's $\psi$ function or diagmma function defined as~\cite{gradshteyn} \begin{eqnarray} \psi(x)=-\gamma_E-\sum_{k=0}^{\infty}\left(\frac{1}{x+k}-\frac{1}{k+1}\right). \end{eqnarray} Introducing the spectral function $\rho(\omega)$ as \begin{eqnarray} \int d\tau d^3x \braket{\Theta^\mu_\mu(\tau, x)\Theta^\mu_\mu(0, 0)}= 2\int_0^{\infty}\frac{\rho(\omega, \vec{0})}{\omega}~d\omega, \label{spectral} \end{eqnarray} and taking the expression of $\rho(\omega, \vec{0})$ for small frequencies~\cite{karsch} \begin{eqnarray} \frac{\rho(\omega, \vec{0})}{\omega}= \frac{9\zeta_T}{\pi}\frac{\omega_0^2}{\omega^2+\omega_0^2}, \end{eqnarray} we get\footnote{Retarded correlation between the traces of energy momentum tensors cannot be distinguished from the correlation involving commutator of the traces in linear response theory (see~\cite{jeon} for details).} from Eq.~(\ref{emtcorreltn}) \begin{eqnarray} 9\omega_0 \zeta_T(\omega_0)&=-&\frac{g^2(N^2-1)}{(4\pi)^2} \sum_{n=1}^\infty \frac{8T^3}{n^2}\bigg[\Braket{\text{tr}\left (L' L^{n-1}\right)}\nonumber\\ && -\,\frac{\widetilde{m}^2}{2T}\Braket{\text{tr}~L^n}+\cdots\bigg] + \frac{(1-3c_s^2)}{c_s^2}h. \label{bulkviscosity} \end{eqnarray} The above equation shows the dependence of $\zeta_T$ on the mass of the gluon and thermal average value of various power of untraced Polyakov loop in the deconfined phase. The variation of $\braket{\text{tr}~L}$, which is considered as an ordered parameter for confinement to deconfinement transition, with temperature and baryonic chemical potential will also govern the variation of $\zeta_T$ near the transition point. Therefore, this relation will be useful to understand the variation of bulk viscosity with temperature and chemical potential to determine the value of critical exponent of bulk viscosity at the critical point of QCD-phase transition. \section{Summary and Discussion} \label{Section3} We have found the bulk viscosity $\zeta_T$ within the scope of TMM and its dependence on the thermally averaged untraced Polyakov loop as well as its various powers and derivative analytically in Eq.~(\ref{bulkviscosity}). We observe that $\zeta_T$ is positive in every order of quantum corrections. It is because of the BRST invariance of effective action in the corrections, which is a consequence of the renormalizibility of the model. This causes the maintenance of the convexity of effective potential~\cite{sw} in the corrections. The positivity of $\zeta_T$ is required to obey the second law of thermodynamics~\cite{weinberg}. The dependence on the various power of the thermal expectation value of $L$ [cf. Eq.~(\ref{bulkviscosity})] appears from the LET where correlation among trace of energy momentum tensor densities is involved. In Eq.~(\ref{bulkviscosity}), the terms containing $\Braket{\text{tr}~L^n}$ and $\Braket{\text{tr}~\left(L' L^{n-1}\right)}$ are not invariant under $\mathbb{Z}_N$ group\footnote{The elements of the $\mathbb{Z}_N$ is $z=e^{\frac{2\pi i n}{N}}\mathbf{1}$, where $n=0, 1, 2, \ldots, (N-1)$; $\mathbf{1}$ designates a $N\times N$ unit matrix.}, which is the centre of $SU(N)$ group. As a consequence, the contribution of $\zeta_T$ will also be significant in the study of QGP at heavy quark limit where the restoration of $\mathbb{Z}_N$ symmetry implies the phase transition of QGP i.e. deconfined phase to confined phase. Here we should make comments from our observations on a puzzle raised in~\cite{moor2}. The authors in ~\cite{moor2} pointed out a mismatch of the power of gauge coupling in the sum rule that is given in~\cite{karsch}. This issue was addressed in~\cite{hout} by considering an operator mixing in renormlization group approach. Generally, an operator product expansion is made in the deep ultraviolet region of Euclidean momentum space. The ultraviolet behaviour of various Green functions or correlators depend on their off-shell behaviour. But in thermal field theory, the real and imaginary time formalisms show that the off-shell nature of correlators, which causes the renormalization of the fields and couplings, is independent of temperature~\cite{das,laine}. Hence, the Callan-Symanzik renormalization group equation is always satisfied in a renormalizable gauge theory. For example, the $n$-point Green functions after quantum quantum corrections generally takes the form in Lorentz covariant way~\cite{mallik}: \begin{eqnarray} \Gamma_R^{\mu\nu\ldots}(x_1, x_2,\ldots, x_n,T )=\Gamma_R^{\mu\nu\ldots}(x_1, x_2,\ldots, x_n, 0 )\nonumber\\ +u^\mu u^\nu\ldots \Delta^i\Gamma((x_1, x_2,\ldots, x_n,T )+\cdots, \end{eqnarray} where the subscript $R$ designates the renormalized n-point function, $\Delta^i\Gamma$ represents the $i$-th order correction and $u^\mu$ is the four velocity of heat bath. It is interesting to note that the real and imaginary time formalisms in TFT provide the inequivalent $3$-point functions~\cite{evans, kobes}. The quantum correction of 3-point vertex in pure YM theory at finite temperature in real time formalism leads us, logically, to the dependence of the gauge coupling $g$ on temperature~\cite{fujimoto, bair, ashida}. This dependence shows that $T\dfrac{d\beta}{dT}$ is not proportional to $g^6$ at the leading order even in the case of massless YM theory. Rather, $T\dfrac{d\beta}{dT}\propto g^4$ at leading order. The puzzle will also never arises in the model that is considered in our the present work. It is because, the model does not provide any trace anomaly. Hence, at the leading order, the both side of the Eq.~(\ref{keyeqn})[cf. Eq.~(\ref{spectral})] are proportional to $g^2$. The authors in~\cite{romatschke} have pointed out the domain of validity of the low energy theorem~\cite{karsch} which is used in this work. However, the conformally Minskowski flat metric used in ~\cite{romatschke} is not consistent with the phenomenology of general relativity in small scale\footnote{Here `small scale' implies the scale which is much much less than the cosmological scale.}~\cite{hawking}. Besides this, there is no ``physically meaningful'' unique renormalized EMT in curved spacetime~\cite{wald78} for massless fields~\cite{amir,kay}. It is because the required Hadamard state has non-local singularity for massless field and there is no unique de-Sitter group invariant vacuum state of this field~\cite{allen}. Now, we are going to discuss on the results where we have reached in the last section. In arriving at Eq.~(\ref{bulkviscosity}), we have obtained two very significant results for QCD: \begin{enumerate}[label=(\roman*)] \item The leading terms in the expression of effective action [cf. Eq.~(\ref{effectiveactnTMM})] matches with the leading terms for the massless YM theory [cf. Eq.~(\ref{effactnmasslessYM})]. This equality is due to the resultant null contribution from the kinetic terms of $B$, $\omega_\mu$ and $\bar{\omega}_\mu$, $\beta$ and $\bar{\beta}$, and $\widetilde{n}$ ($B$ field sector)[cf. Eq.~(\ref{nonabactn})]. It can be understood by counting the total degrees of freedom of the fields~\cite{duff, siegel} in the $B$ field sector, contributing in the effective action in 3+1 dimensions: $1\times 6- 2\times 4+2\times 1=0$. This resultant null contribution occurs because the kinetic term of $\widetilde{n}$ does not contain any covariant derivative [cf. Eq.~(\ref{nonabactn})]. \item The asymptotic freedom remains same as found in massless YM field theory. It (with the IR cut-off) assures the validity of the calculation of bulk viscosity in the perturbative regime at non-zero temperature. We also note that the resuumation~\cite{kapusta} is absent due to the presence of IR cut-off in the TMM. As a consequence, the terms originated with odd power of $g$ or fractional power of strong coupling $\alpha_s =\frac{g^2}{4\pi}$, like $\mathcal{O}\left(g^3\right)\sim\mathcal{O}\left(\alpha_s^{\frac{3}{2}}\right)$ and the terms involving $\alpha_s^2 \ln \alpha_s$, etc., in the expression of pressure in massless YM theory at high temperature~\cite{kapusta}, is absent in the case of TMM. The appearance of those terms in the analysis ensures the breakdown of analytic property of perturbative theory according to~\cite{dyson, bellac}. The absence of the terms$\sim\mathcal{O}\left(\alpha_s^{\frac{3}{2}}\right)$ in the effective action shows particle number changing process is slower than the massless YM theories~\cite{moor1}. \end{enumerate} The present result has been obtained in the realm of perturbative approach. Even though, the hadronization is a non-perturbative process, we can make the following concluding remark. The variation of bulk viscosity near the transition point is governed by Polyakov loop. The enhancement of bulk viscosity near the transition point will reduce the effective pressure of the fluid which, in turn, will provide a smaller kick (as opposed the case when $\zeta_T=0$) to the produced particles. This would be reflected in the experimentally measured value of average transverse momentum of the hadrons. Moreover, the reduced pressure will slow down the expansion resulting in production of more soft gluons enhancing the multiplicity of produced hadrons. Therefore, the present work indicates a possibility to measure Polyakov loop experimentally. It is worth mentioning here that calculations, based on the lattice QCD ~\cite{okaczmarek,sgupta}, indicate a sharp decrease of Polyakov loop with temperature near critical point. This causes a sharp rise of $-\langle \text{tr}\, L^\prime\rangle=-\bigg\langle \text{tr} \,\dfrac{\partial L}{\partial\beta} \bigg\rangle$ appeared in Eq.~(\ref{bulkviscosity}). Hence, it implies a large increase of bulk viscosity near the critical point which is expected in phase transition. Such variation of bulk viscosity is consistent with the results obtained from calculations based on lattice QCD ~\cite{nyu} and phenomenological model~\cite{nicola}. The present investigation may play an important role in the study of early universe and its evolution. In the M\"{u}ller-Israel-Stewert theory of causal hydrodynamics~\cite{muller,israel1, israel2, paul}, it will be interesting to observe the importance of broken $\mathbb{Z}_N$ symmetry through the dependence of entropy production rate on $\zeta_T$ at the time of QGP phase transition. We can also note that the contribution of $\zeta_T$ from TMM will be different from the case of massless YM theory in entropy production rate due to absence of resummation. Other transport coefficients are remained to be calculated from the TMM at finite temperature, whose behaviours at large-$N$ limit can be investigated. The significance of Eq.~(\ref{bulkviscosity}) can also be explored in the scenarios of bulk viscous cosmology~\cite{zim1, zim2} for the study of dark matter and dark energy. \noindent \section*{Acknowledgments} DM is thankful to the Department of Atomic Energy, Government of India for financial support. RK would like to thank the UGC, Government of India, New Delhi, for financial support under the PDFSS scheme.
\section{Introduction}\label{intro} To model the behavior of large populations of competing rational agents, Lasry and Lions, in \cite{ll1}, \cite{ll2}, and \cite{ll3}, and, independently, Caines, Huang, and Malham\'{e}, in \cite{Caines2}, \cite{Caines1}, introduced a class of problems now called mean-field games (MFGs). In these games, agents are indistinguishable and seek to minimize an individual cost that depends on the statistical distribution of the population. Here, we consider the following time-dependent MFG with space-periodic boundary conditions. \begin{problem}\label{OP} Let $T>0$ and \(d\in{\mathbb{N}}\), and define $\Omega_T=(0,T)\times{\mathbb{T}}^d$, where \({\mathbb{T}}^d\) is the \(d\)-dimensional torus. Let $X(\Omega_T)$ and ${\mathcal{M}}_{ac}(\Omega_T)$ denote, respectively, the space of measurable functions on $\Omega_T$ and the space of positive measures on $\Omega_T$ that are finite and absolutely continuous with respect to the Lebesgue measure. Fix $\gamma>1$ and $k\in {\mathbb{N}}$ such that $2k >\frac{d+1}{2} + 3$. Assume that $a_{ij}\in C^2({\mathbb{T}}^d)$ for $1\leqslant i,j\leqslant d$, $V \in L^{\infty}(\Omega_T)\cap C(\Omega_T)$, $g\in C^1({\mathbb{R}}_0^+\times {\mathbb{R}})$, $h:{\mathcal{M}}_{ac}(\Omega_T)\to X(\Omega_T)$ is a (possibly nonlinear) operator, $m_0$, $u_T\in C^{4k}({\mathbb{T}}^d)$, and $H\in C^2({\mathbb{T}}^d\times{\mathbb{R}}^d)$ are such that $A(x)=(a_{ij}(x))$ is a symmetric positive semi-definite matrix for each $x\in {\mathbb{T}}^d$, $m_0>0$, $\int_{{\mathbb{T}}^d}m_0(x)\, {\rm d}x=1$, and $m\mapsto g(m,h(\boldsymbol{m}))$ is monotone with respect to the $L^2$-inner product. Find $(m,u)\in L^1(\Omega_T)\times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying $m\geq0$ and \begin{equation} \label{Highd1o} \begin{aligned} \begin{cases} u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x)=0 & \text{in } \Omega_T, \\[1mm] m_t - \sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j}-\div\big(mD_pH(x,Du)\big) = 0 & \text{in } \Omega_T, \\[1mm] \displaystyle m(0,x)=m_{0}(x),u(T,x)=u_T(x) & \text{on } {\mathbb{T}}^d. \end{cases} \end{aligned} \end{equation} \end{problem} The first equation in \eqref{Highd1o} is a Hamilton--Jacobi equation that determines the value function, \(u\), for a typical agent. The second equation, the Fokker--Planck equation, gives the evolution of the distribution of the agents, $m$. The initial-terminal conditions for $u$ and $m$ in \eqref{Highd1o} model the case where the initial distribution, $m_0$, of the agents is known, and agents seek to optimize a control problem with terminal cost $u_T$. In Problem~\ref{OP}, and in the sequel, the elements of ${\mathcal{M}}_{ac}(\Omega_T)$ are denoted with a boldface font and their densities with the same non-boldface letter. Hence, we define $\boldsymbol{m}$ as $\boldsymbol{m}:=m {\mathcal{L}}^{d+1}\lfloor_{\Omega_T}$, where ${\mathcal{L}}^{d+1}$ is the $(d+1)$-dimensional Lebesgue measure. Moreover, we write \(g(m,h(\boldsymbol{m}))(x,t)\) in place of \(g(m(x,t),h(\boldsymbol{m})(x,t))\). The coupling, $g$, between the Hamilton--Jacobi equation and the Fokker--Planck equation comprises a ``local" dependence, via the dependence on \(m\), and a non-local dependence, via the operator $h$ evaluated at \(\boldsymbol{m}\). This coupling describes the interactions between agents and the mean-field. Because agents solve a control problem, the Hamiltonian, $H=H(x,p)$, is convex in $p$ (Assumption~\ref{Hconv} below); moreover, the associated Lagrangian, \(L=L(x,v)=\sup_p \{ -p\cdot v-H(x,p)\}\), gives the agent's cost to move at speed $v$. The matrix $A=(a_{ij})$ yields the diffusion for agents. Finally, the potential, $V$, determines the spatial and time preferences of each agent. In recent years, MFGs have been studied intensively. Thanks to the regularizing properties of the Laplacian, both elliptic and parabolic MFGs are now well-understood. For example, the existence of solutions to second-order time-dependent MFGs without congestion was examined in \cite{cgbt}, \cite{ciranttonon}, \cite{Gomes2015b}, \cite{Gomes2016c}, \cite{GPM2}, \cite{GPM3}, and \cite{GP2}. Time-dependent cases with congestion were investigated in \cite{GVrt2}, \cite{porretta}, and \cite{porretta2}. The time-dependent MFG with nonlocal coupling is studied in \cite{cllp13}. As we explain next, various time-dependent first-order MFGs models were examined by several authors. Each of the models presents distinct difficulties that are addressed with methods that rely heavily on the structure of the particular problem. In \cite{CaCaCa2018}, the authors assume that the Lagrangian is quadratic. In \cite{Cd1}, the existence and uniqueness of solution was examined when $H(\cdot,p)$ is quadratic-like and $g$ is Lipschitz continuous and $g(\cdot,m)$ is bounded for the $C^2$-norm. In \cite{Cd2} and \cite{GraCard}, the authors suppose that the growth of $g(\cdot,m)$ and the growth of $H(\cdot, p)$ are of the form $m^{q-1}$ and $|p|^r$ respectively, where $q>1$ and $r>\max\{d(q-1),1\}$. In \cite{San16}, the density $m$ satisfies $0\leqslant m(t,x)\leqslant \overline m$ for all $(t,x)$, where $\overline m$ is given and $\overline m>1$. In \cite{graber2017sobolev}, the authors assume only that the growth of $H$ is greater than $|p|^r$ and $g$ satisfies $\frac{1}{C} |m|^{q-1}\leqslant g(x,m)\leqslant C|m|^{q-1}+C$ for all $m\geq1$ and $x\in {\mathbb{T}}^d$, where $r>1$, $q>1$, and $C$ is a constant. In \cite{Mayorga2018}, the existence and uniqueness of short-time solution to first-order time-dependent MFGs is addressed when $H$ is only of class $C^3$ in space; that is, we do not need convexity nor coercivity for $H$. In \cite{OrPoSa2018}, the growth of $g$ is $m^{q-1}$, where $q>1$, and $H$ satisfies $\frac{1}{2c_H}|p|^2 -\gamma_H^-(x)\leqslant H(x,p)\leqslant \frac{c_H}{2}|p|^2 + \gamma^+_H(x)$, where $\gamma_H^-(x)=c_1 (1+|x|)$ and $\gamma_H^+(x)=c_2 (1+|x|^2)$ with $c_1, c_2>0$. In \cite{PrSa2016}, the authors focus on $H(p)=\frac{1}{2}|p|^2$ and assume that $G'(m)=g(m)$ and $G$ is superlinear and strictly convex. However, the degenerate case is less well studied. In \cite{FG2}, the authors constructed a monotonicity method to solve the stationary MFGs with degenerate terms and non-local terms. This method is one of the few tools that can be applied to a diverse class of MFGs - local and non-local, with or without congestion, first or second-order (including possibly degenerate problems). Therefore, in this paper, we extend the monotonicity method to time-dependent MFGs with degenerate terms and non-local terms to construct weak solutions to Problem~\ref{OP} for any terminal time (see Section~\ref{PfMT2}). Problem~\ref{OP} encompasses multiple difficulties: the second-order terms may be degenerate,{\tiny } and the coupling can include both local and non-local terms. Using monotonicity methods, we prove the existence of weak solutions under a standard set of assumptions discussed in Section~\ref{Ass}. Let $m_0$ and $u_T$ be as in Problem~\ref{OP}. Throughout this paper, ${\mathcal{A}}$, $\widehat{\mathcal{A}}$, ${\mathcal{A}}_0$, ${\mathcal{B}},$ and ${\mathcal{B}}_0$ are the sets \begin{align} {\mathcal{A}}&:= \Big\{m \in H^{2k}(\Omega_T)\ |\ m(0,x)=m_0(x),\ m\geqslant 0\Big\} \label{DAa},\\ \widehat{\mathcal{A}}&:= \left\{ m\in {\mathcal{A}}\ \Big|\ \int_{{\mathbb{T}}^d}m(t,x)\,{\rm d}x=1\ \mbox{for a.e. }t\in[0,T] \right\} \label{DAawh},\\ {\mathcal{A}}_0&:=\Big\{m \in H^{2k}(\Omega_T)\ |\ m(0,x)=0,\ m+m_0\geqslant 0\Big\}\label{DAa0},\\ {\mathcal{B}}&:=\Big\{w\in H^{2k}(\Omega_T)\ |\ w(T,x)=u_T(x) \Big\}, \label{DBb} \\ {\mathcal{B}}_0&:=\Big\{w\in H^{2k}(\Omega_T)\ |\ w(T,x)=0 \Big\} \label{DBb0}. \end{align} \begin{definition}\label{DOPWS1} A weak solution to Problem \ref{OP} is a pair $(m,\tilde u) \in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying \begin{flalign} ({\rm D1})\enspace & m \geqslant 0 \ \mbox{a.e.~in }\Omega_T, &\nonumber \\ ({\rm D2})\enspace & \, \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ \tilde u \end{bmatrix} \right\rangle \geqslant 0 \quad \mbox{for all}\ (\eta, v)\in \widehat{\mathcal{A}} \times {\mathcal{B}},&\nonumber \end{flalign} where $F:H^{2k}(\Omega_T; {\mathbb{R}}_0^+) \times H^{2k}(\Omega_T) \to (L^1(\Omega_T)\times L^1(\Omega_T))^\ast$ is given by \begin{equation}\label{DRF2} \begin{aligned} \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangl :=&\, \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg( v_t + \sum_{i,j=1}^da_{ij}(x)v_{x_ix_j} -H(x,Dv) + g(\eta, h(\boldsymbol{\eta})) + V(t,x)\bigg)w_1 \, {\rm d}x{\rm d}t\\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg( \eta_t - \sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j} - \div\big(\eta D_pH(x,Dv)\big) \bigg)w_2\, {\rm d}x{\rm d}t . \end{aligned} \end{equation} \end{definition} Here, we establish the existence of weak solutions to Problem~\ref{OP} as stated in the following theorem. \begin{teo}\label{TOP} Consider Problem \ref{OP} and suppose that Assumptions \ref{Hconv}--\ref{Hmono} hold. Then, there exists a weak solution $(m,\tilde u)\in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ to Problem \ref{OP} in the sense of Definition~\ref{DOPWS1}. \end{teo} To prove Theorem~\ref{TOP}, we introduce a regularized problem, Problem~\ref{MP} below. This regularized problem is obtained from Problem~\ref{OP} by adding a high-order elliptic regularization on $[0,T]\times {\mathbb{T}}^d$. Due to this regularization, and using Schaefer's fixed-point theorem, we can prove that there exists a unique weak solution to Problem~\ref{MP} (see Section~\ref{PfMT1}). Then, we consider the limit with respect to the regularization parameter, $\epsilon\to 0$, to obtain a weak solution to Problem~\ref{OP} (see Section~\ref{PfMT2}). Before stating Problem~\ref{MP}, we introduce some notation regarding partial derivatives used throughout this manuscript. \begin{notation} Let $\Omega_T=(0,T)\times{\mathbb{T}}^d $ be as in Problem~\ref{OP}, let \((t,x) = (t, x_1, ..., x_d)\) denote an arbitrary point in \(\Omega_T\), and let \(\upsilon :\Omega_T\to{\mathbb{R}}\) be sufficiently regular so that the following partial derivatives make sense, at least in a weak sense. Fix \(i,\,j\in\{1,...d\}\), \(\ell\in{\mathbb{N}}\), \(\alpha=(\alpha_1, ..., \alpha_d)\in{\mathbb{N}}^d_0\), and \(\beta=(\beta_0,\beta_1,...,\beta_d)\in {\mathbb{N}}^{d+1}_0\); in this manuscript, we often write \begin{itemize} \item[\(\triangleright\)] \(\upsilon_t\) in place of \(\frac{\partial\upsilon}{\partial t}\) and \(\partial_t^\ell \upsilon\) in place of \(\frac{\partial^\ell \upsilon}{\partial t^\ell }\); \item[\(\triangleright\)] \(\upsilon_{x_i x_j}\) in place of \(\frac{\partial^2\upsilon}{\partial x_i \partial x_j}\) and \(\partial_x^\alpha \upsilon\) in place of \(\frac{\partial^{|\alpha|} \upsilon}{\partial x_1^{\alpha_1} ... \partial x_d^{\alpha_d} }\); \item[\(\triangleright\)] \(\partial_{t,x}^\beta \upsilon\) in place of \(\frac{\partial^{|\beta|} \upsilon}{\partial t^{\beta_0}\partial x_1^{\beta_1} ... \partial x_d^{\beta_d} }\). \end{itemize} Also, to simplify the notation, we often omit the domain of the multi-index of a partial derivative. For instance, if we write \(\partial_x^\alpha \upsilon\), we implicitly assume that \(\alpha\in {\mathbb{N}}^d_0\), while if we write \(\partial_{t,x}^\beta \upsilon\), we implicitly assume that \(\beta\in {\mathbb{N}}^{d+1}_0\). Similarly, we write \(\sum_{|\alpha|= \ell} \partial_x^\alpha \upsilon\) in place of \(\sum_{\alpha\in{\mathbb{N}}^d_0,|\alpha|= \ell} \partial_x^\alpha \upsilon\), for instance. To simplify the notation, we write \(Dv\) and \(\div v \) in place of \(D_x v\) and \(\div_x v \) to denote the gradient and divergence of \(v\), respectively, with respect to \(x\in {\mathbb{T}}^d\). Finally, \(\Delta_{x,t}\) denotes the Laplacian operator with respect to the variables $(t,x)$; that is, \(\Delta_{x,t}\upsilon = \frac{\partial^2 \upsilon}{\partial t^2 } + \sum_{i=1}^d \frac{\partial^2 \upsilon}{\partial x_i^2 }\). \end{notation} \begin{problem}\label{MP} Let $T>0$ and \(d\in{\mathbb{N}}\), and define $\Omega_T=(0,T)\times{\mathbb{T}}^d$. Let $X(\Omega_T)$ and ${\mathcal{M}}_{ac}(\Omega_T)$ be the spaces introduced in Problem~\ref{OP}. Fix $\epsilon\in(0,1)$ and $k\in {\mathbb{N}}$ such that $2k >\frac{d+1}{2} + 3$. Assume that $a_{ij}\in C^2({\mathbb{T}}^d)$ for $1\leqslant i,j\leqslant d$, $V\in L^\infty(\Omega_T)\cap C(\Omega_T)$, $\sigma$, $\xi \in C^{4k}(\overline{\Omega}_T)$, $g\in C^1({\mathbb{R}}_0^+\times {\mathbb{R}})$, $h:{\mathcal{M}}_{ac}(\Omega_T)\to X(\Omega_T)$ is a (possibly nonlinear) operator, $m_0$, $u_T\in C^{4k}({\mathbb{T}}^d)$, and $H\in C^2({\mathbb{T}}^d\times{\mathbb{R}}^d)$ are such that, for $x\in {\mathbb{T}}^d$, $A(x)=(a_{ij}(x))$ is a symmetric positive semi-definite matrix, $\sigma\geqslant 0$, $m_0> 0$, $\int_{{\mathbb{T}}^d}m_0(x)\,{\rm d}x=1$, and $m\mapsto g(m,h(\boldsymbol{m}))$ is monotone with respect to the $L^2$-inner product. Find $(m, u) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ satisfying the condition $m\geqslant 0$, the system \begin{equation}\label{HighdRP} \begin{aligned} \begin{cases} u_t + \sum_{i,j=1}^d a_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x) +\epsilon\sum_{|\beta|\in\{0,2k\}} \partial^{2\beta}_{t,x} (m+\sigma) = 0 & \text{in } \Omega_T\\[1mm] m_t - \sum_{i,j=1}^d\big(a_{ij}(x)(m+\sigma)\big)_{x_ix_j}- \div\big((m+\sigma)D_pH(x,Du)\big) +\epsilon\sum_{|\beta|\in\{0,2k\}} \partial^{2\beta}_{t,x} (u+\xi) = 0& \text{in } \Omega_T\\[1mm] m(0,\cdot)=m_{0}(\cdot),\enspace u(T,\cdot)=u_T(\cdot) & \text{on } {\mathbb{T}}^d \end{cases} \end{aligned} \end{equation} and, for each $i\in{\mathbb{N}}$ with $2\leqslant i\leqslant 2k$, the boundary conditions \begin{equation}\label{BCum} \begin{aligned} &\textstyle \sum_{j=1}^{2k} \partial^{2j-1}_t (L_j m) = 0 \enspace \text{on } \{T\}\times{\mathbb{T}}^d\quad \text{and}\quad \sum_{j=i}^{2k} \partial^{2j-i}_t (L_j m) = 0 \enspace \text{on } \{0,T\}\times{\mathbb{T}}^d, \\[1mm] &\textstyle \sum_{j=1}^{2k} \partial^{2j-1}_t (L_j u) = 0 \enspace \text{on } \{0\}\times{\mathbb{T}}^d\quad \text{and}\quad \sum_{j=i}^{2k} \partial^{2j-i}_t (L_j u) = 0 \enspace \text{on } \{0,T\}\times{\mathbb{T}}^d, \end{aligned} \end{equation} where \(L_j := \sum_{|\alpha|=2k-j} \partial^{2\alpha}_x\). \end{problem} In the preceding problem, $\sigma$ and $\xi$ are used to transform the boundary conditions for $m$ and $u$ into homogeneous boundary conditions (see Section~\ref{PfMT1}). Furthermore, the boundary conditions \eqref{BCum} at the initial and terminal time were selected to preserve the monotonicity of Problem~\ref{OP} in the sense of Assumption~\ref{Hmono} (also see Remark~\ref{rmk:intparts} below). Generally, monotonicity may not hold with arbitrary boundary conditions. Also, the boundary conditions above are natural for our construction of solutions that uses a variational approach (see Section~\ref{VP}). Because of the high-order terms in Problem~\ref{MP}, we do not expect that the maximum principle holds for the second equation. Hence, there may not be classical solutions with $m\geqslant 0$. Thus, as in \cite{FGT1}, we introduce a notion of weak solutions to Problem~\ref{MP}. This definition is related to the ones in \cite{cgbt} and \cite{FG2}, where $u$ is only a subsolution to the Hamilton--Jacobi equation. To construct weak solutions, we introduce two auxiliary problems: a variational problem and a problem given by a bilinear form, which correspond to the first and the second equations in Problem~\ref{MP}, respectively (see Sections~\ref{VP} and \ref{BF}). \begin{definition}\label{DMPWS1} A weak solution to Problem \ref{MP} is a pair $(m,u) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ satisfying, for all $w\in {\mathcal{A}}$ and $v \in {\mathcal{B}}_0$, \begin{flalign*} ({\rm E1})\enspace & \, (m,u)\in{\mathcal{A}}\times{\mathcal{B}}, &\\ \begin{split} ({\rm E2})\enspace & \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg( u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x) \bigg)(w-m) \, {\rm d}x{\rm d}t \\ &\quad +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \epsilon\bigg (m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} \sigma\bigg)(w-m) +\epsilon \sum_{|\beta|=2k}\partial_{t,x}^\beta m\big(\partial_{t,x}^\beta w-\partial_{t,x}^\beta m\big)\bigg]\, {\rm d}x{\rm d}t \geqslant 0,\end{split} &\\ \begin{split} ({\rm E3})\enspace& \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg( m_t - \sum_{i,j=1}^d\big(a_{ij}(x)(m+\sigma)\big)_{x_ix_j} - \div\big((m+\sigma) D_p H(x,Du)\big) \bigg)v\,{\rm d}x{\rm d}t \\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[\epsilon\bigg (u+\xi+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} \xi\bigg)v + \epsilon \sum_{ |\beta|= 2k}\partial_{t,x}^\beta u\partial_{t,x}^\beta v \bigg]\, {\rm d}x{\rm d}t=0. \end{split} \end{flalign*} \end{definition} \begin{remark}\label{rmk:intparts} Assume that \((m,u)\) is a classical solution to Problem~\ref{MP}, and let \(v\in H^{2k}(\Omega_T)\) with \(v(T,\cdot) = 0\) on \({\mathbb{T}}^d\). Then, integrating by parts and using \eqref{BCum} with \(i=2k\), we obtain \begin{equation*} \begin{aligned} &\int_{\Omega_T} \sum_{ |\beta|= 2k}\partial_{t,x}^\beta u\partial_{t,x}^\beta v\,{\rm d}x{\rm d}t =\sum_{\ell=0}^{2k} \sum_{ |\alpha|= 2k-\ell}\int_{\Omega_T} \partial_{t}^\ell\partial_{x}^\alpha u\,\partial_{t}^\ell\partial_{x}^\alpha v\,{\rm d}x{\rm d}t = \sum_{\ell=0}^{2k} (-1)^{2k-\ell} \int_{\Omega_T} \partial_{t}^\ell L_\ell u\,\partial_{t}^\ell v\,{\rm d}x{\rm d}t \\&\quad= \sum_{\ell =0}^{2k-1} (-1)^{2k-\ell } \int_{\Omega_T} \partial_{t}^\ell L_\ell u\,\partial_{t}^\ell v\,{\rm d}x{\rm d}t - \int_{\Omega_T} \partial^{2k+1}_t L_{2k} u\, \partial^{2k-1}_t v \,dx{\rm d}t\\ &\quad = \sum_{\ell =0}^{2k-2} (-1)^{2k-\ell } \int_{\Omega_T} \partial_{t}^\ell L_\ell u\,\partial_{t}^\ell v\,{\rm d}x{\rm d}t - \int_{\Omega_T} \big(\partial^{2k-1}_t L_{2k-1} u +\partial^{2k+1}_t L_{2k} u\big)\, \partial^{2k-1}_t v \,dx{\rm d}t. \end{aligned} \end{equation*} Next, we integrate by parts the last integral on the right-hand side of the previous identity, use \eqref{BCum} with \(i=2k-1\), and associate the terms with respect to \(\partial^{2k-2}_t v.\) Repeating this process iteratively, and recalling that \(v(T,\cdot) = 0\) on \({\mathbb{T}}^d\), we conclude that \begin{equation*} \begin{aligned} \int_{\Omega_T} \sum_{ |\beta|= 2k}\partial_{t,x}^\beta u\partial_{t,x}^\beta v\,{\rm d}x{\rm d}t =\int_{\Omega_T} \sum_{ |\beta|= 2k}\partial_{t,x}^{2\beta} u \,v\,{\rm d}x{\rm d}t. \end{aligned} \end{equation*} Similarly, if \(w\in H^{2k}(\Omega_T)\) satisfies \(w(0,\cdot) = 0\) on \({\mathbb{T}}^d\), we conclude that \begin{equation*} \begin{aligned} \int_{\Omega_T} \sum_{ |\beta|= 2k}\partial_{t,x}^\beta m\partial_{t,x}^\beta w\,{\rm d}x{\rm d}t =\int_{\Omega_T} \sum_{ |\beta|= 2k}\partial_{t,x}^{2\beta} m \,w\,{\rm d}x{\rm d}t. \end{aligned} \end{equation*} This observation is at the core of Definition~\ref{DMPWS1}. \end{remark} \begin{remark}\label{rmkmEL} Let $(m,u)$ be a weak solution to Problem~\ref{MP}. Let $\Omega_T' : = \{(t,x) \in \Omega_T\ |\ m(t,x)>0 \}$, and fix $w_1 \in C_c^\infty(\Omega_T')$. For all $\tau\in {\mathbb{R}}$ with $|\tau|$ small enough, we get $w=m+\tau w_1\in {\mathcal{A}}$. Then, from (E2), we have \begin{align*} & \tau\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg(u_t +\sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x) \bigg)w_1 \, {\rm d}x{\rm d}t \\&\quad+ \tau\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \epsilon\bigg (m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} \sigma\bigg)w_1+\epsilon \sum_{|\beta|=2k}\partial_{t,x}^\beta m\partial_{t,x}^\beta w_1\bigg]\, {\rm d}x{\rm d}t \geqslant 0 . \end{align*} Because the sign of $\tau$ is arbitrary, we verify that $m$ satisfies \begin{align*} &u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) + g(m,h(\boldsymbol{m})) + V(t,x)+\epsilon\bigg (m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} (m+\sigma)\bigg) =0 \end{align*} pointwise in \(\Omega_T'\). Furthermore, let $w_2\in C_c^\infty(\Omega_T)$ be such that $w_2\geqslant 0$; then, choosing $w=m+w_2\in {\mathcal{A}}$ in (E2) and integrating by parts, we obtain \begin{equation*} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg( u_t +\sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x) \bigg)w_2 \, {\rm d}x{\rm d}t\\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \epsilon\bigg (m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} (m+\sigma)\bigg) w_2\, {\rm d}x{\rm d}t\geqslant 0. \end{split} \end{equation*} Thus, in the sense of distributions in $\Omega_T$, \begin{equation*}\label{ELineq1} u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) + g(m,h(\boldsymbol{m})) + V(t,x)+\epsilon\bigg (m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} (m+\sigma)\bigg) \geqslant 0. \end{equation*} Also, from (E3), in the sense of distributions in $\Omega_T$, we have \begin{equation*}\label{Eqdist1} m_t - \sum_{i,j=1}^d\big(a_{ij}(x)(m+\sigma)\big)_{x_ix_j} - \div\big((m+\sigma) D_p H(x,Du) \big) +\epsilon \bigg( u+\xi + \sum_{|\beta|=2k} \partial^{2\beta}_{t,x}( u+\xi)\bigg ) = 0. \end{equation*} \end{remark} \begin{teo}\label{MT} Consider Problem \ref{MP} and suppose that Assumptions \ref{Hconv}--\ref{AWC1} and \ref{Hmono} hold for some $\gamma>1$. Then, there exists a unique weak solution $(m,u) \in H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)$ to Problem \ref{MP} in the sense of Definition~\ref{DMPWS1}. \end{teo} The above notions of weak solutions are more relaxed than typical weak solutions or classical solutions. However, sometimes, it is possible to show that these weak solutions have further regularity properties. This matter is examined in Section~\ref{prowsOP}, where we characterized further properties of weak solutions to Problems~\ref{OP} and \ref{MP}. Furthermore, in Section~\ref{Secfr}, we show how to extend the monotonicity method to congestion and density constrained MFGs. \section{Assumptions}\label{Ass} Our main results need the following hypotheses on the data in Problems~\ref{OP} and \ref{MP}. These hypotheses are similar to the ones in \cite{FGT1}. The first four assumptions provide standard convexity and growth conditions on $H$. For example, Assumptions~\ref{Hconv}--\ref{Bderi} hold for \begin{equation*} H(x,p)=c(x)|p|^{\gamma}+b(x)\cdot p, \end{equation*} where $c\in C^\infty({\mathbb{T}}^d)$ is positive, $b\in C^\infty({\mathbb{T}}^d)$, and $\gamma>1$ as in Problem~\ref{OP}. \begin{hyp}\label{Hconv} For all $x\in {\mathbb{T}}^d$, the map $p\mapsto H(x,p)$ is convex in ${\mathbb{R}}^d$. \end{hyp} \begin{remark}\label{Hconv2} Because of Assumption~\ref{Hconv}, for all $x\in {\mathbb{T}}^d$ and $(p, q) \in {\mathbb{R}}^d\times {\mathbb{R}}^d$, $H$ satisfies \begin{equation*} (D_p H(x, p)-D_p H(x,q))\cdot (p-q)\geqslant 0. \end{equation*} \end{remark} \begin{hyp}\label{Hcoer} There exists a constant, $C>0$, and $\gamma>1$ such that, for all $(x,p)\in {\mathbb{T}}^d\times{\mathbb{R}}^d$, we have% \begin{equation*} \begin{aligned} - H(x,p)+ D_p H(x,p)\cdot p\geqslant \frac{1}{C}|p|^\gamma -C. \end{aligned} \end{equation*} \end{hyp} \begin{hyp}\label{Hbdd} Let $\gamma>1$ be as in Assumption~\ref{Hcoer}. There exists a constant, $C>0$, such that, for all $(x,p)\in {\mathbb{T}}^d\times{\mathbb{R}}^d$, we have% \begin{equation*} \begin{aligned} H(x,p) \geqslant \frac{1}{C} |p|^\gamma -C. \end{aligned} \end{equation*} \end{hyp} \begin{hyp}\label{Bderi} Let $\gamma>1$ be as in Assumption~\ref{Hcoer}. There exists a constant, $C>0$, such that, for all $(x,p)\in {\mathbb{T}}^d\times{\mathbb{R}}^d$, we have\begin{equation*} |D_pH(x,p)|\leqslant C|p|^{\gamma-1}+C . \end{equation*} \end{hyp} The following assumption is a regularity condition for $h$, see \cite{FG2}. For instance, Assumption~\ref{hhyp} holds for \begin{equation}\label{exah} h(\boldsymbol{m})(t,x) = c(\zeta\ast (\zeta \ast \boldsymbol{m})^{\tau}(\cdot, x))(t) =c\int_{{\mathbb{T}}^d} \zeta(x-z)\bigg(\int_{{\mathbb{T}}^d} \zeta(z-y) m(y,t)\, {\rm d}y\bigg)^\tau{\rm d} z, \end{equation} where $c \geq0$ and $\tau>0$ and where $\zeta\in C_c^\infty({\mathbb{T}}^d)$ is such that $\zeta\geqslant 0$, $\int_{{\mathbb{T}}^d} \zeta\,{\rm d}x=1$ and $\zeta$ us symmetric. \begin{hyp}\label{hhyp} For each \(\kappa\in{\mathbb{N}}\) such that $\kappa>\frac{d+1}{2}+1$, we have \begin{align*} &({\rm a})\ \big\{h(\boldsymbol{m})| m\in H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+)\big\}\subset H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+),\\ &({\rm b})\ m\in H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+)\mapsto h(\boldsymbol{m})\in H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+)\ \mbox{defines a Fr\'{e}chet differentiable map}. \end{align*} \end{hyp} As observed in \cite{FG2}, if \(h\) satisfies Assumption~\ref{hhyp}, then for all $\bar m \in H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+)$, there exists a bounded linear operator, \(\mathfrak{H}_{\bar m} \in \mathcal{L} (H^{\kappa}(\Omega_T) ; H^{\kappa}(\Omega_T)) \), such that, for all $m \in H^{\kappa}(\Omega_T; {\mathbb{R}}_0^+)$, {\setlength\arraycolsep{0.5pt} \begin{eqnarray}\label{hFD} \begin{aligned} &\Vert h(\boldsymbol{m}) - h(\boldsymbol{\bar m})\Vert_{H^{\kappa}(\Omega_T)} \leqslant \Vert \mathfrak{H}_{\bar m}\Vert_{\mathcal{L}(H^{\kappa}(\Omega_T) ; H^{\kappa}(\Omega_T))} \Vert m - \bar m \Vert_{H^{\kappa}(\Omega_T)} + o\big(\Vert m - \bar m \Vert_{H^{\kappa}(\Omega_T)} \big). \end{aligned} \end{eqnarray}}% Therefore, taking $\bar m=0$ in \eqref{hFD}, we get {\setlength\arraycolsep{0.5pt} \begin{eqnarray}\label{hbounds} \begin{aligned} \Vert h(\boldsymbol{m})\Vert_{H^{\kappa}(\Omega_T)} \leqslant C\big(1+ \Vert m\Vert_{H^{\kappa}(\Omega_T)}\big) \end{aligned} \end{eqnarray}}% for some positive constant $C= C \big (\kappa,\Omega_T, \Vert \mathfrak{H}_{0}\Vert_{\mathcal{L} (H^{\kappa}(\Omega_T) ; H^{\kappa}(\Omega_T))} ,\Vert h(\boldsymbol{0}) \Vert_{ H^{\kappa}(\Omega_T)} \big)$. The next three assumptions concern the growth of $g$. For instance, as we discuss in Remark~\ref{esth1} below, Assumptions~\ref{gint}--\ref{gwc} hold for $g(m,\theta)=m^{\tau}+\theta$, $0<\tau\leqslant 1$, and \(h\) as in \eqref{exah}, which is a standard example in MFGs. \begin{hyp}\label{gint} The map $m\mapsto g(m,h(\boldsymbol{m}))$ is monotone with respect to the $ L^2$-inner product; that is, for $m_1, m_2\in L^2(\Omega_T)$, we have \begin{equation*} \int_{0^T}\int_{{\mathbb{T}}^d} (g(m_1,h(\boldsymbol{m_1}))-g(m_2,h(\boldsymbol{m_2})))(m_1-m_2) \,{\rm d}x{\rm d}t \geqslant 0. \end{equation*} Moreover, for all $\delta>0$, there exists a positive constant, $C_\delta$, such that, for all $m \in L^1(\Omega_T)$ with \(m\geqslant 0\), we have\begin{equation*} \max\bigg\{\int_0^T\!\!\!\int_{{\mathbb{T}}^d} |g(m, h(\boldsymbol{m}))|\, {\rm d}x{\rm d}t, \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m \,{\rm d}x{\rm d}t \bigg\} \leqslant \delta \int_0^T\!\!\!\int_{{\mathbb{T}}^d} mg(m,h(\boldsymbol{m}))\, {\rm d}x{\rm d}t + C_\delta. \end{equation*} \end{hyp} \begin{hyp}\label{AWC1} There exists a constant, $C>0$, such that, for all $m\in L^1(\Omega_T)$ with \(m\geqslant 0\), we have \begin{equation*} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} mg(m,h(\boldsymbol{m}))\, {\rm d}x{\rm d}t\geqslant -C. \end{equation*} \end{hyp} \begin{hyp}\label{gwc} If $\{m_j\}_{j=1}^\infty\subseteq L^1(\Omega_T)$ is a sequence of nonnegative functions satisfying \begin{equation*} \sup_{j\in{\mathbb{N}}} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_jg(m_j,h(\boldsymbol{m}_j))\, {\rm d}x{\rm d}t <+\infty, \end{equation*} then there exists a subsequence of $\{m_{j}\}_{j=1}^\infty$ that converges weakly in $L^1(\Omega_T)$. \end{hyp} \begin{remark}[On Assumptions~\ref{gint}--\ref{gwc}]\label{esth1} As we mentioned above, Assumptions~\ref{gint}--\ref{gwc} hold for $g(m,\theta)=m^{\tau}+\theta$, $\tau>0$, and \(h\) as in \eqref{exah}. To see this, we first note that \(mg(m, h(\boldsymbol{m})) = m^{\tau + 1} +mh(\boldsymbol{m})\). Then, because \(h(\boldsymbol{m})\geqslant 0\) for all \(\boldsymbol{m} \in{\mathcal{M}}_{ac}(\Omega_T) \), the only nontrivial condition is the one in Assumption~\ref{gint}. To verify that Assumption~\ref{gint} holds, we fix $\delta>0$ and assume that $c=1$, without loss of generality. We start by observing that there exists a positive constant, \(C_\delta\), only depending on \(\delta\) and \(\tau\), such that \(|s|^{\tau} \leqslant \delta |s|^{\tau+1} + C_\delta\) for all \(s\in{\mathbb{R}}\). By symmetry of $\zeta$, for any $f, g\in L^1({\mathbb{T}}^d)$, we have $\int_{{\mathbb{T}}^d} f(x) (\zeta \ast g)(x) \,{\rm d}x=\int_{{\mathbb{T}}^d} (\zeta \ast f)(x) g(x) \,{\rm d}x$. Hence, using the identity $\|\zeta\|_{L^1({\mathbb{T}}^d)}=1$, we get \begin{equation*} \begin{aligned} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} h(\boldsymbol{m})\, {\rm d}x{\rm d}t &= \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \big(\zeta\ast (\zeta \ast \boldsymbol{m})^\tau(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t= \int_0^T\!\!\!\int_{{\mathbb{T}}^d}(\zeta*1)(x)\big( (\zeta \ast \boldsymbol{m})^\tau(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t\\ &= \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\big( (\zeta \ast \boldsymbol{m})^\tau(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t\leqslant\delta\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\big( (\zeta \ast \boldsymbol{m})^{\tau+1}(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t + C_\delta\\ & = \delta\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\big((\zeta \ast \boldsymbol{m})(\cdot, x) (\zeta \ast \boldsymbol{m})^{\tau}(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t + C_\delta\\ &= \delta\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m(x) \big(\zeta\ast(\zeta \ast \boldsymbol{m})^{\tau}(\cdot, x)\big)(t)\, {\rm d}x{\rm d}t + C_\delta = \delta\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m h(\boldsymbol{m})\, {\rm d}x{\rm d}t + C_\delta, \end{aligned} \end{equation*} from which we deduce that Assumption~\ref{gint} holds. \end{remark} \begin{remark} In Remark~\ref{esth1}, we consider an explicit example where the nonnegativity and symmetry conditions on $\zeta$ are crucial. Under Assumption $ \boldsymbol{{\rm (g1)}}$ in \cite{FG2}, more general cases can be handled. \end{remark} Finally, the next assumption imposes the monotonicity of the functional in Definition~\ref{DOPWS1}. Monotonicity is crucial in the proof of Theorem~\ref{TOP} and Theorem~\ref{MT} through Minty's method. \begin{hyp}\label{Hmono} The functional $F$ introduced in Definition~\ref{DOPWS1} is monotone with respect to the $L^2\times L^2$-inner product; that is, for all $(\eta_1, v_1)$, $(\eta_2, v_2) \in {\mathcal{A}} \times {\mathcal{B}}$, $F$ satisfies \begin{equation*} \left\langle F \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - F \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix}, \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix} \right\rangle \geqslant 0. \end{equation*} \end{hyp} \section{Properties of weak solutions}\label{Prows} Here, we examine the properties of weak solutions, $(m,u)$, to Problem~\ref{MP}. As in \cite{FGT1}, we prove a priori estimates for classical solutions and weak solutions. Moreover, we establish that $u$ belongs to $L^{\gamma}((0,T); W^{1,\gamma}({\mathbb{T}}^d))$ and that $(\sqrt{\epsilon}m,\sqrt{\epsilon} u)$ is bounded in $H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)$, independently of $\epsilon$. To simplify the notation, throughout this section, we write the same letter $C$ to denote any positive constant depending only on the data; that is, depending only on \(\Omega_T\), \(d\), \(\gamma\), $H$, $V$, $\sigma$, $\xi$, $m_0$, $u_T$, on the constants in the Assumptions~\ref{Hcoer}--\ref{AWC1}, and on constants such as the constants in Morrey's theorem or in the Gagliardo--Nirenberg interpolation inequality. In particular, these constants are independent of the choice of solutions to Problem~\ref{MP} and of $\epsilon$. \begin{pro}\label{apriori1} Consider Problem~\ref{MP} and suppose that Assumptions~\ref{Hcoer}--\ref{gint} hold for some \(\gamma>1\). Then, there exists a positive constant, $C$, depending only on the problem data, such that any classical solution $(m, u)$ to Problem~\ref{MP} satisfies \begin{equation}\label{aprimu} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( mg(m,h(\boldsymbol{m}))+\frac{1}{C} (m+\sigma)|Du|^\gamma +\frac{1}{C} m_{0} |Du|^\gamma \Big)\, {\rm d}x{\rm d}t\\ &\quad+ {\epsilon} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \ \bigg( m^2 + u^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m)^2 + \sum_{|\beta|= 2k}(\partial_{t,x}^\beta u)^2 \bigg) \, {\rm d}x{\rm d}t \leqslant C\big (1+\|Du\|_{L^1(\Omega_T)}\big). \end{aligned} \end{equation} \end{pro} \begin{proof} Multiplying the first equation in \eqref{HighdRP} by $(m-m_{0})$ and the second one by $(u-u_T)$, adding and integrating over $\Omega_T$, and then integrating by parts and taking the boundary conditions into account, we obtain \begin{equation}\label{E3.2} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ m g(m,h(\boldsymbol{m}))+(m+\sigma) \big( - H(x,Du) + D_p H(x,Du) \cdot Du \big) \\ &\quad+ m_{0} H(x,Du) + \epsilon \bigg( m^2 + u^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m)^2 + \sum_{|\beta|= 2k}(\partial_{t,x}^\beta u)^2\bigg) \bigg] \, {\rm d}x{\rm d}t\\ = &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg[ -\sum_{i,j=1}^du_{x_i} \big(a_{ij}(m_0+\sigma)\big)_{x_j}+ m_{0} g(m,h(\boldsymbol{m})) +\bigg(-\sum_{i,j=1}^d\big(a_{ij}{u_T}_{x_ix_j}\big) - V \bigg) m\\ &\quad + \bigg( V m_{0} -\sum_{i,j=1}^d(a_{ij}\sigma)_{x_ix_j}u_T+\epsilon \sigma m_0 + \epsilon \xi u_T \bigg) \\ &\quad + ( m+\sigma ) D_p H(x,Du) \cdot Du_T - \sigma H(x,Du) + \epsilon \big( u(u_T-\xi) +m(m_0-\sigma)\big) \\ &\quad + \epsilon\bigg( \sum_{|\beta|=2k} \partial_{t,x}^\beta m \partial_{t,x}^\beta m_0 -\sum_{|\beta|= 2k} \partial_{t,x}^{2\beta}\sigma (m-m_0) + \sum_{|\beta|= 2k} \partial_{t,x}^\beta u \partial_{t,x}^\beta u_T -\sum_{|\beta|= 2k} \partial_{t,x}^{2\beta}\xi (u- u_T )\bigg)\bigg]\, {\rm d}x{\rm d}t. \end{aligned} \end{equation} From Assumptions~\ref{Hcoer}--\ref{Bderi}, Young's inequality, and the positivity of $m$, $\sigma$, and $m_0$, we get \begin{equation*} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} ( m+\sigma ) \big( - H(x,Du) + D_p H(x,Du) \cdot Du\big)\, {\rm d}x{\rm d}t \geqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( \frac{(m+\sigma)|Du|^\gamma}{C} -C(m+\sigma)\Big)\, {\rm d}x{\rm d}t, \end{aligned} \end{equation*} \begin{equation*} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_{0} H(x,Du) \,{\rm d}x{\rm d}t \geqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg( \frac{m_{0} |Du|^\gamma}{C} - C m_{0} \bigg)\,{\rm d}x{\rm d}t, \end{aligned} \end{equation*} \begin{equation*} \begin{aligned} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} ( m+\sigma ) D_p H(x,Du) \cdot Du_T \,{\rm d}x{\rm d}t &\leqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d} C ( m+\sigma )( |Du|^{\gamma-1} + 1 )\,{\rm d}x{\rm d}t\\ & \leqslant\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg( \frac{( m+\sigma ) |Du|^\gamma}{2C} + C m \bigg) \,{\rm d}x{\rm d}t + C, \end{aligned} \end{equation*} and \begin{equation*} \begin{aligned} &-\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \sigma H(x,Du)\, {\rm d}x{\rm d}t \leqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d}(- \frac{\sigma|Du|^\gamma}{C} + C \sigma )\, {\rm d}x{\rm d}t \leqslant C. \end{aligned} \end{equation*} Using these estimates in \eqref{E3.2}, together with Young's inequality and Assumption~\ref{gint}, we obtain \begin{equation*} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ mg(m,h(\boldsymbol{m})) + \frac{(m+\sigma)|Du|^\gamma}{C} + \frac{m_{0} |Du|^\gamma}{C} \\ &\quad + \frac{\epsilon}{2} \bigg( m^2 + u^2 + \sum_{|\beta|=2k} (\partial_{t,x}^\beta m)^2 + \sum_{|\beta|= 2k} (\partial_{t,x}^\beta u)^2 \bigg)\bigg] \, {\rm d}x{\rm d}t\\ \leqslant &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( m_{0} g(m,h(\boldsymbol{m}))+ C m + \frac{(m+\sigma)|Du|^\gamma}{2C} \Big)\, {\rm d}x{\rm d}t + C\big(1+ \|Du\|_{L^1(\Omega_T)}\big)\\ \leqslant &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( \frac{mg(m,h(\boldsymbol{m}))}{2} + \frac{(m+\sigma)|Du|^\gamma}{2C} \Big) \, {\rm d}x{\rm d}t + C\big(1+ \|Du\|_{L^1(\Omega_T)}\big), \end{split} \end{equation*} from which the conclusion follows. \end{proof} The preceding result can be extended to weak solutions of Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1}. \begin{pro}\label{apriWS1} Consider Problem \ref{MP} and suppose that Assumptions~\ref{Hcoer}--\ref{gint} hold for some \(\gamma>1\). Then, any weak solution $(m, u)$ to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1} satisfies \eqref{aprimu}. \end{pro} \begin{proof} Let $(m, u)$ be a weak solution to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1}. Using the properties (E2) and (E3) in Definition~\ref{DMPWS1} with $v = u_T -u\in {\mathcal{B}}_0$ and $w= m_0 \in {\mathcal{A}}$ and adding the resulting inequalities, we obtain \eqref{E3.2} with ``$=$'' replaced by ``$\leqslant$". Consequently, arguing as in the proof of Proposition~\ref{apriori1}, we obtain that $(m, u)$ satisfies \eqref{aprimu}. \end{proof} \begin{cor}\label{apriDu1} Consider Problem \ref{MP} and suppose that Assumptions~\ref{Hcoer}--\ref{AWC1} hold for some \(\gamma>1\). Then, there exists a positive constant, $C$, depending only on the problem data, such that any weak solution $(m,u)$ to Problem~\ref{MP} satisfies \(\Vert Du\Vert_{L^\gamma(\Omega_T)}\leqslant C\). \end{cor} \begin{proof} Because $m_0$ is strictly positive, we have $c:=\min_{{\mathbb{T}}^d}m_0>0$ and, using Proposition~\ref{apriWS1} with Assumption~\ref{AWC1} and Young's inequality with $\gamma>1$, we obtain \begin{align*} -C + \frac{c}{C}\int_0^T\!\!\!\int_{{\mathbb{T}}^d}|Du(t,x)|^\gamma\,{\rm d}x{\rm d}t &\leqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big(mg(m,h(\boldsymbol{m}))+\frac{m_0}{C}|Du(t,x)|^\gamma\Big)\, {\rm d}x{\rm d}t \\ &\leqslant C\big(1+\|Du\|_{L^1(\Omega_T)}\big) \leqslant C +\frac{c}{2C}\int_0^T\!\!\!\int_{{\mathbb{T}}^d}|Du(t,x)|^\gamma\, {\rm d}x{\rm d}t. \qedhere \end{align*} \end{proof} \begin{cor}\label{aprisqrt} Consider Problem \ref{MP} and suppose that Assumptions~\ref{Hcoer}--\ref{AWC1} hold for some \(\gamma>1\). Then, there exists a positive constant, $C$, depending only on the problem data, such that any weak solution $(m,u)$ to Problem~\ref{MP} satisfies \(\Vert \sqrt{\epsilon} m\Vert_{H^{2k}(\Omega_T)} + \Vert \sqrt{\epsilon} u\Vert_{H^{2k}(\Omega_T)}\leqslant C\). \end{cor} \begin{proof} Using Proposition~\ref{apriWS1}, Assumption~\ref{AWC1}, and the positivity of $m$, $\sigma$, and $m_0$, we obtain \begin{equation*} \begin{aligned} {\epsilon} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \ \bigg( m^2 + u^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m)^2 + \sum_{ |\beta|= 2k}(\partial_{t,x}^\beta u)^2 \bigg) \, {\rm d}x{\rm d}t \leqslant C\big(1+ \|Du\|_{L^1(\Omega_T)}\big), \end{aligned} \end{equation*} where \(C\) is a positive constant depending only on the problem data. From Corollary~\ref{apriDu1}, Corollary~\ref{aprisqrt} follows. \end{proof} \section{A variational problem}\label{VP} In this section, we investigate a variational problem whose Euler--Lagrange equation is related to the first equation in \eqref{HighdRP}. We show that there exists a unique minimizer, $m$, to this problem. Also, we examine properties of $m$ from which deduce the existence and uniqueness of a weak solution to Problem~\ref{MP}. Set $\widehat \sigma:=\sigma +m_0$ and $\widehat g(m,\widehat h(\boldsymbol{m})):=g(m+m_0,h(\boldsymbol{m}+\boldsymbol{m}_0))$. Given $(m, u) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $ m+m_0 \geqslant 0$, let $I_{(m, u)}: H^{2k}(\Omega_T) \to {\mathbb{R}}$, for $w\in H^{2k}(\Omega_T)$ be given by \begin{equation}\label{defImu} \begin{split} I_{(m, u)}[w]: =&\, \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \frac{\epsilon }{2} \Big( \Big(w+\widehat\sigma + \sum_{|\beta|=2k} \partial^{2\beta}_{t,x} \widehat\sigma\Big)^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta w)^2 \Big)\\ &\quad+ \Big( u_t + \sum_{i,j=1}^da_{ij}u_{x_i x_j} - H(x,Du) + \widehat g(m,\widehat h(\boldsymbol{m}))- V \Big) w \bigg] \, {\rm d}x{\rm d}t. \end{split} \end{equation} Next, we fix $(m_1,u_1)\in H^{2k-2}(\Omega_T)\times H^{2k-1}(\Omega_T)$ with $m_1+m_0\geq0$, and set $I_1=I_{(m_1,u_1)}$. We address the variational problem of finding $m\in {\mathcal{A}}_0$ such that \begin{equation}\label{VP1} I_1[m] =\inf_{w \in {\mathcal{A}}_0}I_1[w], \end{equation} where ${\mathcal{A}}_0$ is defined in \eqref{DAa0}. \begin{pro}\label{EMVP1} Let $H$, $g$, \(h\), $\sigma$, $V$, \(\{a_{ij}\}_{i,j=1}^d\), and \(m_0\) be as in Problem~\ref{MP}, and fix $(m_1, u_1) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ such that $m_1+m_0 \geqslant 0$. Then, there exists a unique $m \in {\mathcal{A}}_0$ satisfying \eqref{VP1}. \end{pro} \begin{proof} Invoking Young's inequality, $I_1[\cdot]$ is bounded from below and the bound depends on the problem data, $\epsilon$, $m_1$, and $u_1$. Thus, also taking \(w=0\) as test function in \eqref{VP1}, we conclude that the infimum in \eqref{VP1} is finite. Let $\{w_{n}\}_{n=1}^{\infty} \subset {\mathcal{A}}_0$ be a minimizing sequence for \eqref{VP1}, and fix $\delta\in(0,1)$. Then, there exists $N\in {\mathbb{N}}$ such that, for all $n \geqslant N$, \begin{equation}\label{Bvp1} I_1[w_n]<\inf_{w\in{\mathcal{A}}_0} I_1[w] +\delta \leqslant I_1[0] + 1=C. \end{equation} By Morrey's embedding theorem, $H^{2k-3}(\Omega_T)$ is compactly embedded in \(C^{0,l}(\overline \Omega_T)\) for some \(l\in (0,1)\). In particular, there exists a positive constant, \(C=C(\Omega_T,k,d,l)\), such that, for all \(\vartheta\in H^{2k-3}(\Omega_T)\), we have \begin{equation} \label{eq:MorreyET} \begin{aligned} \Vert \vartheta \Vert_{C^{0,l}(\overline \Omega_T)} \leqslant C \Vert \vartheta \Vert_{H^{2k-3}( \Omega_T)}. \end{aligned} \end{equation} From \eqref{eq:MorreyET}, we get $m_1\in C^{1,l}(\overline\Omega_T)$ and $u_1 \in C^{2,l }(\overline\Omega_T)$ for some $l\in(0,1)$, and $C_0:=\max\{\|\widehat\sigma\|_{C^{4k}(\Omega_T)},\| {u_1}_t + \sum_{i,j=1}^da_{ij}{u_1}_{x_ix_j} - H(\cdot,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \|_{L^\infty(\Omega_T)}\} <\infty$. Then, by Young's inequality and \eqref{Bvp1}, for all $n\geqslant N$, we obtain \begin{equation}\label{eqvp-3} \begin{split} \frac{\epsilon }{2}\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( w_{n}^2 + \sum_{|\beta|=2k} (\partial_{t,x}^\beta w_n)^2\Big) \, {\rm d}x{\rm d}t &\leqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d}C_0 (\epsilon +1 ) |w_n| \, {\rm d}x{\rm d}t + C\\ &\leqslant \frac{\epsilon }{4} \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( w_n^2 + \sum_{|\beta|=2k}(\partial_{t,x}^{\beta} w_n)^2\Big)\, {\rm d}x{\rm d}t +\frac{C}{\epsilon}+C. \end{split} \end{equation} Invoking the Gagliardo--Nirenberg interpolation inequality, we get \begin{equation}\label{eqvp-4} \|\partial_{t,x}^\beta w_n\|_{L^2(\Omega_T)}^2 \leqslant C \big(\|w_n\|_{L^2(\Omega_T)}^2 +\|D_{t,x}^{2k}w_n\|_{L^2(\Omega_T)}^2\big), \end{equation} where $\beta\in{\mathbb{N}}_0^{d+1}$ is any multi-index such that $|\beta|\leqslant 2k$. Hence, by \eqref{eqvp-3} and \eqref{eqvp-4}, we obtain that $\{w_n\}_{n=1}^{\infty}$ is bounded in $H^{2k}(\Omega_T)$. Therefore, $w_n \rightharpoonup m$ weakly in $H^{2k}(\Omega_T)$ for some $m\in H^{2k}(\Omega_T)$, extracting a subsequence if necessary. Furthermore, by Morrey's embedding theorem, $w_n \to m$ in $C^{2,l}(\overline \Omega_T)$ for some $l\in (0,1)$. Consequently, because $w_n +m_0 \geqslant 0$ and $w_n(0,x)=0$, also $m + m_0 \geq0$ and $m(0,x)=0$. Thus, $m \in {\mathcal{A}}_0$. Also, $w_n\to m$ in $L^2(\Omega_T)$ and $\Vert D_{t,x}^{2k} m\Vert_{L^2(\Omega_T)}^2 \leqslant \liminf_{n \to \infty} \Vert D_{t,x}^{2k} w_n \Vert_{L^2(\Omega_T)}^2$; hence, $I_1[m]\leqslant \liminf_n I_1[w_n]=\inf_{w \in {\mathcal{A}}_0}I_1[w]\leqslant I_1[m]$, from which we conclude that $m$ is a minimizer of $I_1$ over ${\mathcal{A}}_0$. Next, we verify uniqueness. Suppose that $m$, $\widetilde{m} \in {\mathcal{A}}_0$ are minimizers of $I_1$ over ${\mathcal{A}}_0$ with $m \neq \widetilde{m}$. Then, $\frac{m + \widetilde{m}}{2} \in {\mathcal{A}}_0$, $m-\widetilde{m}\in C^0(\overline\Omega_T)$, and $\int_0^T\!\!\!\int_{{\mathbb{T}}^d}(m-\widetilde{m})^2\,{\rm d}x{\rm d}t>0$. Thus, \begin{equation}\label{eqvp-5} \begin{aligned} I_1\left[\frac{m + \widetilde{m}}{2}\right] &=\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \frac{\epsilon }{2} \Big( \Big(\frac{m+\widetilde{m}}{2}+\widehat\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x}\widehat\sigma\Big)^2 + \sum_{|\beta|=2k}\Big(\frac{\partial_{t,x}^\beta m+\partial_{t,x}^\beta \widetilde{m}}{2}\Big)^2\Big)\\ &\quad\quad+ \Big( {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \Big) \Big(\frac{m+\widetilde{m}}{2}\Big) \bigg]\, {\rm d}x{\rm d}t \\ &=\frac{1}{2}\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \frac{\epsilon }{2} \Big( \Big(m+\widehat\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x}\widehat\sigma\Big)^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m )^2\Big)\\ &\quad \quad+ \Big( {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \Big)m \bigg] \, {\rm d}x{\rm d}t \\ &\quad+\frac{1}{2}\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \frac{\epsilon }{2} \Big( \Big(\widetilde{m}+\widehat\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x}\widehat\sigma\Big)^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta \widetilde{m})^2 \Big)\\ &\quad \quad+ \Big( {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \Big)\widetilde{m} \bigg] \, {\rm d}x{\rm d}t \\ &\quad- \frac{\epsilon}{8}\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ (m - \widetilde{m})^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m - \partial_{t,x}^\beta \widetilde{m})^2 \Big] \, {\rm d}x{\rm d}t \\ &<\frac{1}{2}I_1[m] + \frac{1}{2}I_1[\widetilde{m}] = \min_{w \in {\mathcal{A}}_0}I_1[w], \end{aligned} \end{equation} which contradicts the fact that $m$ and $\widetilde{m}$ are minimizers. Hence, we have $m=\widetilde{m}$. \end{proof} \begin{cor}\label{aprimvp1} Let $H$, $g$, \(h\), $\sigma$, $V$, \(\{a_{ij}\}_{i,j=1}^d\), and \(m_0\) be as in Problem~\ref{MP}, fix $(m_1, u_1) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $m_1+m_0 \geqslant 0$, and let $m \in {\mathcal{A}}_0$ be the unique solution to \eqref{VP1}. Set $C_0:=\|{u_1}_t + \sum_{i,j=1}^da_{ij}{u_1}_{x_ix_j} - H(\cdot,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \|_{L^\infty(\Omega_T)}$. Then, there exists a positive constant, $C$, depending only on the problem data and on \(C_0\), such that $\Vert m\Vert_{H^{2k}(\Omega_T)} \leqslant C $. \end{cor} \begin{proof} As $I_1[m]\leqslant I_1[0] $, it follows that \eqref{eqvp-3} and \eqref{eqvp-4} hold with $w_n$ replaced by $m$, which yields the conclusion. \end{proof} \begin{pro}\label{PVI} Let $H$, $g$, \(h\), $\sigma$, $V$, \(\{a_{ij}\}_{i,j=1}^d\), and \(m_0\) be as in Problem \ref{MP}, fix $(m_1, u_1) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $m_1+m_0\geqslant 0$, and let $m \in {\mathcal{A}}_0$ be the unique solution to \eqref{VP1}. Then, for any $w \in {\mathcal{A}}_0$, $m$ satisfies \begin{equation}\label{VI1} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))- V \Big)( w - m ) \, {\rm d}x{\rm d}t \\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big[\epsilon\Big ( m+\widehat\sigma +\sum_{|\beta|=2k} \partial^{2\beta}_{t,x}\widehat\sigma\Big ) ( w - m ) + \epsilon \sum_{|\beta|=2k}\partial_{t,x}^\beta m (\partial_{t,x}^\beta w-\partial_{t,x}^\beta m)\Big] \, {\rm d}x{\rm d}t \geqslant 0. \end{aligned} \end{equation} \end{pro} \begin{proof} Let $w \in {\mathcal{A}}_0$. For $\tau \in [0,1]$, we have $m + \tau(w - m)=( 1 - \tau)m + \tau w \in {\mathcal{A}}_0$. Thus, the mapping $i: [0,1] \to {\mathbb{R}}$ given by \begin{equation*} i[\tau] := I_1 \big[m + \tau(w - m)\big] \end{equation*} is a $C^\infty$-function. Because $i(0)\leqslant i(\tau)$ for all $0\leqslant \tau \leqslant 1$, we have $i'(0) \geqslant 0$. On the other hand, for $0<\tau\leq1$, we get \begin{equation*} \begin{aligned} \frac{1}{\tau}\big(i(\tau)-i(0)\big)=&\,\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big ( {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1))-V \Big)( w - m ) \, {\rm d}x{\rm d}t \\ &\quad + {\epsilon} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ \Big( m+\widehat\sigma +\sum_{|\beta|=2k} \partial^{2\beta}_{t,x}\widehat\sigma \Big)( w - m) +\sum_{|\beta|=2k}\partial_{t,x}^\beta m (\partial_{t,x}^\beta w - \partial_{t,x}^\beta m)\Big] \, {\rm d}x{\rm d}t\\ &\quad +\frac{\epsilon\tau}{2} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[( w - m)^2+ \sum_{|\beta|=2k}(\partial_{t,x}^\beta w -\partial_{t,x}^\beta m )^2\Big] \, {\rm d}x{\rm d}t. \end{aligned} \end{equation*} Thus, letting $\tau\to 0^+$ in the preceding inequality and using the inequality $i'(0)\geqslant 0$, we obtain \eqref{VI1}. \end{proof} \begin{pro Let $H$, $g$, \(h\), $\sigma$, $V$, \(\{a_{ij}\}_{i,j=1}^d\), and \(m_0\) be as in Problem~\ref{MP}, fix $(m_1, u_1) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $m_1+m_0 \geqslant 0$, and let $m$ be the unique solution of \eqref{VP1}. Set $\widehat\Omega_T = \{ (t,x) \in \Omega_T\ |\ m(t,x) +m_0(x) > 0 \}$. Then, $m$ satisfies \begin{align*} & {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1)) - V +\epsilon \Big( m+\widehat\sigma+ \sum_{|\beta|=2k} \partial^{2\beta}_{t,x}( m+\widehat\sigma ) \Big)= 0 \end{align*} pointwise in \(\widehat\Omega_T\) and \begin{equation*} {u_1}_t + \sum_{i,j=1}^da_{ij}(x){u_1}_{x_ix_j} - H(x,Du_1) +\widehat g(m_1,\widehat h(\boldsymbol{m}_1)) -V+\epsilon\Big ( m+\widehat\sigma + \sum_{|\beta|=2k} \partial^{2\beta}_{t,x}( m+\widehat\sigma ) \Big)\geqslant 0 \end{equation*} in the sense of distributions in $\Omega_T$. \end{pro} \begin{proof} To verify the statement, it is enough to argue as in Remark~\ref{rmkmEL}, using \eqref{VI1} instead of (E2) and recalling the embedding $H^{2k-2}(\Omega_T)\hookrightarrow C^{1,l}(\overline\Omega_T)$ for some $l\in(0,1)$. \end{proof} \section{A problem given by a bilinear form}\label{BF} Here, we consider a problem given by a bilinear form associated with the second equation in \eqref{HighdRP}. We use Lax--Milgram theorem to show that there exists a unique solution, $u$, to this problem. Also, we establish a uniform bound for $u$. In Section~\ref{PfMT1}, we apply these results to prove that there exists a unique weak solution to Problem~\ref{MP}. Let ${\mathcal{B}}_0$ be as in \eqref{DBb0}. Suppose that $H$, $\sigma$, \(\{a_{ij}\}_{i,j=1}^d\), \(m_0\), and $\xi$ are as in Problem~\ref{MP} and, as in the previous section, let $\widehat \sigma =\sigma+m_0$. Given $(m, u) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $m+m_0 \geqslant 0$, we define a bilinear form, $B:{\mathcal{B}}_0 \times {\mathcal{B}}_0 \to {\mathbb{R}}$, and a linear functional, $f_{(m, u)}:H^{2k}(\Omega_T) \to {\mathbb{R}}$, by setting, \begin{equation} \label{defBfmu} \begin{aligned} B[v_1,v_2]:=&\, \epsilon \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( v_1v_2 +\sum_{|\beta|=2k}\partial_{t,x}^\beta v_1 \partial_{t,x}^\beta v_2 \Big)\, {\rm d}x{\rm d}t,\\ \big\langle f_{(m, u)},v\big\rangle :=&\,\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[- m_t + \sum_{i,j=1}^d\big(a_{ij}(x)(m+\widehat\sigma)\big)_{x_ix_j} \\ & \quad + \div\big((m+\widehat\sigma) D_p H(x,Du)\big) - \epsilon \Big(\xi+\sum_{|\beta|=2k}\partial_{t,x}^{2\beta} \xi\Big) \Big]v \, {\rm d}x{\rm d}t \end{aligned} \end{equation} for $v_1,v_2\in {\mathcal{B}}_0$ and $v\in H^{2k}(\Omega_T)$. Fix $(m_1,u_1)\in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with \(m_1+m_0\geq0\), and take $f_1:= f_{(m_1,u_1)}$. Next, we study the problem of finding $u\in {\mathcal{B}}_0$ satisfying\begin{equation}\label{BL1} B[u,v]=\langle f_1,v \rangle \quad \mbox{for all}\ v \in {\mathcal{B}}_0. \end{equation} \begin{pro}\label{ESBP1} Let $H$, $\sigma$, \(\{a_{ij}\}_{i,j=1}^d\), \(m_0\), and $\xi$ be as in Problem~\ref{MP}, and fix $(m_1, u_1) \in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)$ with $m_1+m_0\geq0$. Then, there exists a unique solution, $u \in {\mathcal{B}}_0$, to \eqref{BL1}. Moreover, there exists a positive constant, $C$, depending only on the problem data, on \(\epsilon\), on $\Vert m_1\Vert_{H^{2k-2}(\Omega_T)}$, and on $\Vert u_1\Vert_{H^{2k-1}(\Omega_T)}$, such that $\Vert u\Vert_{H^{2k}(\Omega_T)} \leqslant C$. \end{pro} \begin{proof} Because $(m_1,u_1)\in \big(H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T)\big) \cap \big( C^{1,l}(\overline\Omega_T) \times C^{2,l}(\overline\Omega_T)\big)$ for some $l\in(0,1)$ (see \eqref{eq:MorreyET}), we obtain $\big( - {m_1}_t + \sum_{i,j=1}^d\big(a_{ij}(x)(m+\widehat\sigma)\big)_{x_ix_j} + \div\big( (m_1+\widehat\sigma) D_p H(x,Du_1)\big) -\epsilon \big(\xi+\sum_{|\beta|=2k}\partial_{t,x}^{2\beta} \xi\big)\big) \in L^2(\Omega_T)$. Hence, from H\"older's inequality, $f_1$ is bounded in \(L^2(\Omega_T)\). By Cauchy--Schwarz inequality, we get $|B[v_1,v_2]| \allowbreak \leqslant \epsilon \Vert v_1\Vert_{H^{2k}(\Omega_T)}\Vert v_2\Vert_{H^{2k}(\Omega_T)}$ for all $v_1,v_2\in {\mathcal{B}}_0$. Furthermore, by the Gagliardo--Nirenberg interpolation inequality (see \eqref{eqvp-4}), we have $B[v_1,v_1]\geqslant \epsilon C \Vert v_1\Vert_{H^{2k}(\Omega_T)}^2$ for all $v_1\in {\mathcal{B}}_0$. By applying the Lax--Milgram theorem to \eqref{BL1}, there exists a unique solution, $u\in {\mathcal{B}}_0$, to \eqref{BL1}. Since $c_0:=\big\Vert - {m_1}_t + \sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j} + \div\big((m_1+\widehat\sigma)D_p H(x,Du_1)\big) - \epsilon \big(\xi+\sum_{|\beta|=2k}\partial_{t,x}^{2\beta} \xi\big) \big\Vert_{ L^2(\Omega_T)}^2 <\infty$, from Young's inequality and the Gagliardo--Nirenberg interpolation inequality, we have \begin{equation*} \epsilon C\Vert u\Vert_{H^{2k}(\Omega_T)}^2 \leqslant B[u,u] = \langle f_1, u \rangle \leqslant \frac{\epsilon C}{2}\Vert u\Vert_{L^2(\Omega_T)}^2 + \frac{c_0}{4C\epsilon}. \end{equation*} Therefore, we have $\Vert u\Vert_{H^{2k}(\Omega_T)}^2 \leqslant \frac{c_0}{4(C\epsilon)^2} $, from which Lemma~\ref{ESBP1} follows. \end{proof} \section{Proof of Theorem~\ref{MT}}\label{PfMT1} Here, we prove Theorem~\ref{MT}. First, by Schaefer's fixed-point theorem, we verify that there exists a unique weak solution to \eqref{HighdRP} with $u_T\equiv0$. Next, we generalize this result for any $u_T\in C^{4k}({\mathbb{T}}^d)$. Suppose that $u_T\equiv 0$. As in Sections~\ref{VP} an \ref{BF}, let $\widehat g(m,\widehat h(\boldsymbol{m}))=g(m+m_0, h(\boldsymbol{m}+\boldsymbol{m_0}))$ and \(\widehat \sigma = \sigma + m_0\). Let $\widetilde{\mathcal{A}}_0$ and $\widetilde{\mathcal{B}}_0$ be the sets containing \({\mathcal{A}}_0\) and ${\mathcal{B}}_0$ (see \eqref{DAa0} and \eqref{DBb0}), respectively, given by \begin{align*} &\widetilde{\mathcal{A}}_0:=\{w \in H^{2k-2}(\Omega_T)\ |\ w(0,x)=0,\ w+m_0\geqslant 0 \},\\ &\widetilde{\mathcal{B}}_0:=\{v \in H^{2k-1}(\Omega_T)\ |\ v(T,x)=0 \}. \end{align*} Consider the mapping $A: \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0 \to \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$ defined, for $(m_1, u_1) \in \widetilde {\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$, by \begin{equation}\label{OpeA} A \begin{bmatrix} m_1 \\ u_1 \end{bmatrix} := \begin{bmatrix} m_1^\ast \\ u_1^\ast \end{bmatrix}, \end{equation} where $m_1^\ast \in {\mathcal{A}}_0$ is the unique minimizer to \eqref{VP1} and $u_1^\ast\in {\mathcal{B}}_0 $ is the unique solution to \eqref{BL1}. \begin{pro}\label{ACC} Let $H$, $g$, \(h\), $\sigma$, $V$, \(\{a_{ij}\}_{i,j=1}^d\), \(m_0\), and $\xi$ be as in Problem~\ref{MP}, and assume that Assumption~\ref{hhyp} holds. Then, the mapping $A: \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0 \to \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$ in \eqref{OpeA} is continuous and compact. \end{pro} \begin{proof} We start by verifying the continuity of \(A\). Let $(m_1, u_1),\, ( {m_1}_n, {u_1}_n) \in \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0 $ be such that ${m_1}_n \to m_1$ in $H^{2k-2}(\Omega_T)$ and ${u_1}_n \to u_1$ in $H^{2k-1}(\Omega_T)$. We want to prove that ${m_1}_n^\ast \to m_1^\ast$ in $H^{2k-2}(\Omega_T)$ and ${u_1}_n^\ast \to u_1^\ast$ in $H^{2k-1}(\Omega_T)$, where \begin{equation*} \begin{aligned} \begin{bmatrix} m_1^\ast \\ u_1^\ast \end{bmatrix} = A \begin{bmatrix} m_1 \\ u_1 \end{bmatrix} \enspace \text{and} \enspace \begin{bmatrix} {m_1}_n^\ast \\ {u_1}_n^\ast \end{bmatrix} = A \begin{bmatrix} {m_1}_n \\ {u_1}_n \end{bmatrix}. \end{aligned} \end{equation*} Recalling \eqref{defImu} and \eqref{defBfmu}, we define $I_n:=I_{({m_1}_n, {u_1}_n)}$ and $f_n := f_{({m_1}_n, {u_1}_n)}$. Because of the definition of \(A\), we have that $ (m_1^\ast, u_1^\ast)$ and $ ({m_1}_n^\ast, {u_1}_n^\ast)$ belong to $ {\mathcal{A}}_0 \times {\mathcal{B}}_0$ and satisfy, for all \(v\in {\mathcal{B}}_0\), \begin{equation*} \begin{aligned} I_1[m_1^\ast]=\min_{w \in {\mathcal{A}}_0} I_1[w],\enspace I_n[{m_1}_n^\ast]=\min_{w \in {\mathcal{A}}_0} I_n[w], \enspace B[u_1^\ast,v] = \langle f_1,v \rangle,\enspace B[{u_1}_n^\ast,v] = \langle f_n,v \rangle. \end{aligned} \end{equation*} Because ${m_1}_n^\ast$ and $m_1^\ast$ are minimizers, using the second equality in \eqref{eqvp-5}, we get \begin{equation*} \begin{aligned} I_1[m_1^\ast]+I_n[{m_1}_n^\ast] &\leqslant I_1\left[\frac{m_1^\ast + {m_1}_n^\ast}{2}\right] + I_n\left[\frac{m_1^\ast + {m_1}_n^\ast}{2}\right] \\ &=\frac12 I_1[m_1^\ast] + \frac12 I_1[{m_1}_n^\ast] + \frac12 I_n[m_1^\ast] + \frac12 I_n[{m_1}_n^\ast] \\&\quad\,-\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\frac{\epsilon}{4}\Big[ \big(m_1^\ast-{m_1}_n^\ast\big)^2 + \sum_{|\beta|=2k}\big(\partial_{t,x}^\beta m_{1}^\ast - \partial_{t,x}^\beta {m_1}_n^\ast \big)^2 \Big] \, {\rm d}x{\rm d}t, \end{aligned} \end{equation*} which can be rewritten as \begin{equation*}\label{eq:bymin} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\frac{\epsilon}{4}\Big[ \big(m_1^\ast-{m_1}_n^\ast\big)^2 + \sum_{|\beta|=2k}\big(\partial_{t,x}^\beta m_{1}^\ast - \partial_{t,x}^\beta {m_1}_n^\ast \big)^2 \Big] \, {\rm d}x{\rm d}t\\&\quad \leqslant \frac12 \big(I_1[{m_1}_n^\ast] + I_n[m_1^\ast] - I_1[m_1^\ast]- I_n[{m_1}_n^\ast]\big). \end{aligned} \end{equation*} Hence, Young's inequality yields \begin{equation}\label{eq1-6-1} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\frac{\epsilon}{4}\Big[ \big(m_1^\ast-{m_1}_n^\ast\big)^2 + \sum_{|\beta|=2k}\big(\partial_{t,x}^\beta m_{1}^\ast - \partial_{t,x}^\beta {m_1}_n^\ast \big)^2 \Big] \, {\rm d}x{\rm d}t \\ \leqslant &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\frac{\epsilon}{8}(m_1^\ast - {m_1}_n^\ast)^2 + \frac{1}{2\epsilon} \Big( | {u_1}_t - {{u_1}_n}_t | + \sum_{i,j=1}^d|a_{ij}(x)| |{u_1}_{x_ix_j}-{{u_1}_n}_{x_ix_j}|\\ & \quad + \big| H(x,Du_1) - H(x,D{u_1}_n) \big|+ | \widehat g( m_1,\widehat h(\boldsymbol{m}_1)) - \widehat g({m_1}_n,\widehat h({\boldsymbol{m}_1}_n) ) | \Big)^2 \, {\rm d}x{\rm d}t. \end{split} \end{equation} From \eqref{eq:MorreyET}, there exists a positive constant, \(c>0\), independent of \(n\in{\mathbb{N}}\), such that \begin{equation} \label{eq:bounds} \begin{aligned} \sup_{n\in{\mathbb{N}}} \big(\Vert m_1\Vert_{L^{\infty}(\Omega_T)} + \Vert {m_1}_n\Vert_{L^{\infty}(\Omega_T)} +\Vert u_1\Vert_{W^{1,\infty}(\Omega_T)} + \Vert {u_1}_n\Vert_{W^{1,\infty}(\Omega_T)}+ \Vert m_0\Vert_{L^{\infty}(\Omega_T)} \big) < c. \end{aligned} \end{equation} Then, using \eqref{eq1-6-1}, \eqref{eq:bounds}, the facts that \(H\), \(D_pH\), and \(g\) are locally Lipschitz functions, $\sigma$ and \(a_{ij}\) are bounded, and \eqref{hFD}--\eqref{hbounds} hold with \(\kappa=2k-1\) an with \(m\) replaced by \( {m_1}_n+m_0\) and \(\bar m\) replaced by \(m_1 + m_0\), we can find a positive constant, \(C\), independent of \(n\in{\mathbb{N}}\), such that % \begin{equation* \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\frac{\epsilon}{8}\Big[ \big(m_1^\ast-{m_1}_n^\ast\big)^2 + \sum_{|\beta|=2k}\big(\partial_{t,x}^\beta m_{1}^\ast - \partial_{t,x}^\beta {m_1}_n^\ast \big)^2 \Big] \, {\rm d}x{\rm d}t\\&\quad\leqslant \frac{C}{\epsilon}\Big(\Vert{m_1}_n - m_1\Vert_{H^{2k-2}(\Omega_T)}^2 + \Vert{u_1}_n - u_1\Vert_{H^{2k-1}(\Omega_T)}^2\Big). \end{split} \end{equation*} Because ${m_1}_n \to m_1$ in $H^{2k-2}(\Omega_T)$ and ${u_1}_n \to u_1$ in $ H^{2k-1}(\Omega_T)$, we have \begin{equation*} \lim_{n\to\infty}\Vert m_1^\ast - {m_1}_n^\ast \Vert_{L^2(\Omega_T)} = 0, \quad \lim_{n\to\infty}\sum_{|\beta|=2k}\Vert \partial_{t,x}^\beta m_{1}^\ast - \partial_{t,x}^\beta {m_1}_n^\ast\Vert_{L^2(\Omega_T)} = 0. \end{equation*} Then, invoking the Gagliardo--Nirenberg interpolation inequality, we obtain ${m_1}_n^\ast \to m_1^\ast$ in $H^{2k}(\Omega_T)$, and thus in $H^{2k-2}(\Omega_T)$. Next, we prove that ${u_1}_n^\ast$ converges to $u_1^\ast$ in $H^{2k}(\Omega_T)$, and thus in $H^{2k-1}(\Omega_T)$. Recalling \eqref{defBfmu} and \eqref{eq:bounds}, similar arguments to those above yield \begin{equation} \label{eq:eq2-6-1} \begin{aligned} & \,\epsilon C\Vert u_{1}^\ast - u_{n}^\ast\Vert_{H^{2k}(\Omega_T)}^2 \leqslant B[u_1^\ast-{u_1}_n^\ast, u_1^\ast-{u_1}_n^\ast] = \langle f_1-f_n, u_1^\ast-{u_1}_n^\ast \rangle \\ \leqslant &\, \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[|{{m_1}_n}_t - {m_1}_t ||u_1^\ast-{u_1}_n^\ast | + \bigg|\sum_{i,j=1}^d\big(a_{ij}(x)({m_1}_n - m_1)\big)_{x_ix_j}\bigg||u_1^\ast-{u_1}_n^\ast | \\ &\quad + \Big(|m_1 D_pH(x,Du_1)-{m_1}_n D_pH(x,Du_1) + {m_1}_n D_pH(x,Du_1)- {m_1}_n D_pH(x,D{u_1}_n)| \\ &\quad + \sigma | D_pH(x,Du_1) - D_pH(x,D{u_1}_n)| \Big)|Du_1^\ast-D{u_1}_n^\ast|\bigg]\,{\rm d}x{\rm d}t\\ \leqslant &\, \frac{\epsilon C}{2}\Vert u_{1}^\ast - u_{n}^\ast\Vert_{H^{2k}(\Omega_T)} + \frac{\tilde C}{\epsilon}\big(\Vert m_1 - {m_1}_n \Vert_{H^2(\Omega_T)}^2 + \Vert D u_1 -D {u_1}_n \Vert_{L^2(\Omega_T)}^2\big) \end{aligned} \end{equation} for some constants \(C, \, \tilde C>0\) independent of \(n\in{\mathbb{N}}\). From \eqref{eq:eq2-6-1}, we conclude that ${u_1}_n^\ast \to u_1^\ast$ in $H^{2k}(\Omega_T)$. Finally, we prove the compactness of $A$. We want to show that if \(\{({m_1}_n,{u_1}_n)\}_{n=1}^\infty\) is a bounded sequence in $\widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$, then \(\{A({m_1}_n,{u_1}_n)\}_{n=1}\) is pre-compact in $\widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$. This is a consequence of \eqref{eq:MorreyET}, Assumption~\ref{hhyp}, Corollary~\ref{aprimvp1}, Proposition~\ref{ESBP1}, and the compact embedding \(H^{2k}(\Omega_T) \times H^{2k}(\Omega_T) \hookrightarrow H^{2k-2}(\Omega_T)\times H^{2k-1}(\Omega_T)\) due to the Rellich--Kondrachov theorem. \end{proof} As we noted before, applying Schaefer's fixed-point theorem, we verify the existence of weak solutions to Problem~\ref{MP}. We introduce next the precise version of this theorem that we use, see Theorem~6.2 in \cite{FGT1}. \begin{theorem}\label{thm:SFPT} Let \(X\) be a convex and closed subset of a Banach space such that \(0\in X\). Suppose that \(A:X \to X\) is a continuous and compact mapping such that the set \begin{equation*} \begin{aligned} \big\{w\in X |\ w=\lambda A[w] \hbox{ for some } \lambda \in [0,1]\big\} \end{aligned} \end{equation*} is bounded. Then, \(A\) has a fixed point. \end{theorem} \begin{pro}\label{ExiUniS1} Consider Problem~\ref{MP}, let $A$ be the mapping defined in \eqref{OpeA}, and suppose that Assumptions~\ref{Hconv}--\ref{AWC1} and \ref{Hmono} hold for some \(\gamma>1\). Then, there exists a unique weak solution, $(m,u) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$, to Problem~\ref{MP} with $u_T=0$ in the sense of Definition~\ref{DMPWS1}. \end{pro} \begin{proof} \textit{(Existence) }Fix $\lambda \in [0,1]$, and let $(m_\lambda, u_\lambda)\in \widetilde{\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0$ be such that \begin{equation}\label{OLA1} \begin{bmatrix} m_\lambda \\ u_\lambda \end{bmatrix} = \lambda A \begin{bmatrix} m_\lambda \\ u_\lambda \end{bmatrix}. \end{equation} If $\lambda=0$, then $(m_\lambda,u_\lambda)=(0,0)$. Suppose that $0<\lambda \leq1$ and that there exists a pair $(m_\lambda, u_\lambda)$ satisfying \eqref{OLA1}; then, because of the definition of \(A\), Proposition~\ref{EMVP1}, Corollary~\ref{PVI}, and Proposition~\ref{ESBP1}, we obtain \(\frac{m_\lambda}\lambda \in{\mathcal{A}}_0\), \(\frac{u_\lambda}\lambda \in {\mathcal{B}}_0\), and \begin{equation*} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \lambda \big( {u_\lambda}_t + \sum_{i,j=1}^da_{ij}(x){u_{\lambda}}_{x_ix_j} - H(x,Du_\lambda) + \widehat g(m_\lambda,\widehat h(\boldsymbol{m}_{\lambda})) - V \big)(\lambda w-m_\lambda) \, {\rm d}x{\rm d}t\\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \epsilon\Big (m_\lambda+\lambda\widehat\sigma + \lambda\sum_{|\beta|=2k}\partial_{t,x}^{2\beta} \widehat\sigma\Big)(\lambda w-m_\lambda) + \epsilon \sum_{|\beta|=2k}\partial_{t,x}^\beta m_\lambda (\lambda \partial_{t,x}^\beta w-\partial_{t,x}^\beta m_\lambda)\, {\rm d}x{\rm d}t \geqslant 0 \end{aligned} \end{equation*} and \begin{equation*} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ \lambda\Big({m_\lambda}_t - \sum_{i,j=1}^d\big(a_{ij}(x)(m_{\lambda}+\widehat\sigma)\big)_{x_ix_j} -\div\big((m_\lambda+\widehat\sigma ) D_p H(x,Du_\lambda)\big) \Big)v\, \Big]{\rm d}x{\rm d}t\\ &\quad +\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg[ \epsilon\Big( u_\lambda v + \sum_{|\beta|= 2k} \partial_{t,x}^\beta u_\lambda\partial_{t,x}^\beta v\Big)+\epsilon\lambda\Big(\xi +\sum_{|\beta|=2k}\partial_{t,x}^{2\beta}\xi\Big)v \bigg]\, {\rm d}x{\rm d}t=0 \end{aligned} \end{equation*} for all \(w\in{\mathcal{A}}_0\) and \(v\in {\mathcal{B}}_0\). Consequently, taking \(w=0\) and \(v= u_\lambda\) in these two conditions, and arguing as in Proposition~\ref{apriWS1} using the Gagliardo--Nirenberg interpolation inequality and the conditions \(m_\lambda + \widehat\sigma =m_\lambda +m_0+ \sigma \geq0\), $m_{\lambda}(0,\cdot)=0$, and \(u_\lambda(T,\cdot)=0\), we get \begin{equation}\label{E3.1} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \lambda \left[m_\lambda \widehat g(m_\lambda, \widehat h(\boldsymbol{m}_\lambda))+ (m_\lambda+\widehat\sigma) |Du_\lambda|^\gamma \right]\, {\rm d}x{\rm d}t \\&\quad+\epsilon \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ m_\lambda^2 +u_\lambda^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta m_\lambda)^2+\sum_{|\beta|= 2k}(\partial_{t,x}^\beta u_{\lambda})^2 \Big] \, {\rm d}x{\rm d}t \leqslant C, \end{aligned} \end{equation} where $C$ is a positive constant independent of $\lambda$. Next, we observe that because \(m_\lambda + m_0 \geq0\), we can use Assumptions~\ref{gint} and \ref{AWC1} with \(\delta = \frac{1}{2(1+\Vert m_0\Vert_\infty)}\) to conclude that \begin{equation*} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\lambda \widehat g(m_\lambda, \widehat h(\boldsymbol{m}_\lambda)) \, {\rm d}x{\rm d}t\\ = &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} (m_\lambda + m_0) g(m_\lambda + m_0, h(\boldsymbol{m}_\lambda + \boldsymbol{m}_0)) \, {\rm d}x{\rm d}t - \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_0 g(m_\lambda + m_0, h(\boldsymbol{m}_\lambda + \boldsymbol{m}_0)) \, {\rm d}x{\rm d}t\\ \geqslant &\,\frac12 \int_0^T\!\!\!\int_{{\mathbb{T}}^d} (m_\lambda + m_0) g(m_\lambda + m_0, h(\boldsymbol{m}_\lambda + \boldsymbol{m}_0)) \, {\rm d}x{\rm d}t - C_\delta\Vert m_0\Vert_\infty \geqslant \frac{C}{2} - C_\delta\Vert m_0\Vert_\infty. \end{aligned} \end{equation*} This estimate, \eqref{E3.1}, and the condition \(m_\lambda + \widehat\sigma \geq0\) yield \begin{equation*} \begin{aligned} \epsilon \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ m_\lambda^2+u_\lambda^2 +\sum_{|\beta|=2k}(\partial_{t,x}^\beta m_\lambda)^2 + \sum_{|\beta|= 2k}(\partial_{t,x}^\beta u_{\lambda})^2 \Big] \, {\rm d}x{\rm d}t \leqslant C, \end{aligned} \end{equation*} where $C$ is another constant independent of $\lambda$. Invoking the Gagliardo--Nirenberg interpolation inequality, we verify that $(m_\lambda, u_\lambda)$ is uniformly bounded in $H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ with respect to $\lambda$. From this fact and Proposition~\ref{ACC}, we can use Theorem~\ref{thm:SFPT} and conclude that \(A \) has a fixed point, \((\widetilde m,u)\in \widetilde {\mathcal{A}}_0 \times \widetilde{\mathcal{B}}_0\). Let $\bar m:=\widetilde m+m_0$. By the definition of \(A\), Proposition~\ref{EMVP1}, Proposition~\ref{PVI}, and Proposition~\ref{ESBP1}, we conclude that \((\bar m,u) \in {\mathcal{A}} \times {\mathcal{B}}_0\) and \begin{itemize} \item[(i)] \eqref{VI1} holds with \((m_1,u_1)\) replaced by \((\widetilde m, u)\) and \(m\) replaced by \(\widetilde m\), \item[(ii)] \eqref{BL1} holds with \(f_1\) replaced by \(f_{(\widetilde m, u)}\). \end{itemize} Recalling that \(\widehat \sigma = \sigma+m_0\) and \(\widehat g(\widetilde m,\widehat h(\boldsymbol{\widetilde m})) = g(\widetilde m + m_0, h(\boldsymbol{\widetilde m} +\boldsymbol{ m_0})) = g(\bar m, h(\boldsymbol{\bar m}))\), condition (i) becomes \begin{equation*} \begin{aligned} & \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg( u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(\bar m, h(\boldsymbol{\bar m}))+ V(t,x) \bigg)(w+m_0-\bar m) \, {\rm d}x{\rm d}t \\ &\quad +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \bigg[ \epsilon\bigg (\bar m+\sigma+\sum_{|\beta|=2k} \partial^{2\beta}_{t,x} \sigma\bigg)(w+m_0-\bar m) +\epsilon \sum_{|\beta|=2k}\partial_{t,x}^\beta \bar m\big(\partial_{t,x}^\beta (w+m_0)-\partial_{t,x}^\beta \bar m\big)\bigg]\, {\rm d}x{\rm d}t \geqslant 0 \end{aligned} \end{equation*} for all \(w\in {\mathcal{A}}_0\). Observing that if \(\bar w\in {\mathcal{A}}\), then \(w:= \bar w - m_0\in {\mathcal{A}}_0\), we conclude from the previous estimate that condition (E2) in Definition~\ref{DMPWS1} holds for \((\bar m, u)\). Moreover, condition (ii) above is equivalent to condition (E3) in Definition~\ref{DMPWS1} for \((\bar m, u)\). Consequently, $(\bar m,u)$ belongs to $ H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ and satisfies (E1)--(E3) in Definition~\ref{DMPWS1} with \(u_T=0\). \smallskip \textit{(Uniqueness) } Suppose that $(m_1,u_1)$ and $(m_2,u_2)$ two weak solutions to Problem~\ref{MP} with $u_T=0$ in the sense of Definition~\ref{DMPWS1}. Choosing $w=m_2$ for \((u_1,m_1)\) and $w=m_1$ for \((u_2,m_2)\) in (E2) of Definition~\ref{DMPWS1}, and then adding the resulting inequalities, we have \begin{equation}\label{ineqUni-1} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big[ - ( {u_1}_t-{u_2}_t ) - \sum_{i,j=1}^da_{ij}(x)( {u_{1}}_{x_ix_j}-{u_{2}}_{x_ix_j}) + H(x,Du_1)-H(x,Du_2)\\ &\quad- ( g(m_1, h(\boldsymbol{m}_1)) - g(m_2, h(\boldsymbol{m}_2)) ) \Big](m_1-m_2)\,{\rm d}x{\rm d}t\\ &\quad - \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[\epsilon(m_1-m_2)^2+\epsilon\sum_{|\beta|=2k}(\partial_{t,x}^{\beta}m_1 - \partial_{t,x}^{\beta} m_2)^2\Big]\, {\rm d}x{\rm d}t \geq0. \end{aligned} \end{equation} Because $u_1-u_2\in {\mathcal{B}}_0$, setting $v=u_1-u_2$ in (E3) of Definition~\ref{DMPWS1} for \((u_1,m_1)\) and \((u_2,m_2)\), and then subtracting the resulting equalities, we have \begin{equation}\label{ineqUni-2} \begin{aligned} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big({m_1}_t-{m_2}_t-\sum_{i,j=1}^d\big(a_{ij}(x)(m_1-m_2)\big)_{x_ix_j}\\ &\quad -\div\big((m_1+ \sigma) D_pH(x,Du_1) - (m_2+\sigma) D_pH(x,Du_2)\big)\Big)(u_1-u_2)\,{\rm d}x{\rm d}t\\ &\quad +\epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big((u_1 - u_2)^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta u_1-\partial_{t,x}^\beta u_2)^2\Big)\, {\rm d}x{\rm d}t=0. \end{aligned} \end{equation} Subtracting \eqref{ineqUni-1} from \eqref{ineqUni-2}, we obtain \begin{equation*} \begin{aligned} 0\geqslant & \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big[ \epsilon(m_2-m_2)^2+\epsilon(u_1 - u_2)^2+\epsilon\sum_{|\beta|=2k}(\partial_{t,x}^\beta m_2-\partial_{t,x}^\beta m_2)^2 +\epsilon\sum_{|\beta|=2k}(\partial_{t,x}^\beta u_1-\partial_{t,x}^\beta u_2)^2 \Big]\,{\rm d}x{\rm d}t\\ & + \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \sigma(D_p H(x, Du_1)-D_p H(x,Du_2))\cdot (Du_1-Du_2) \,{\rm d}x{\rm d}t\\ &+\left\langle F \begin{bmatrix} m_2 \\ u_2 \end{bmatrix} - F \begin{bmatrix} m_1 \\ u_1 \end{bmatrix}, \begin{bmatrix} m_2 \\ u_2 \end{bmatrix} - \begin{bmatrix} m_1 \\ u_1 \end{bmatrix} \right\rangle \geqslant 0 \end{aligned} \end{equation*} because each of the three terms in preceding sum is nonnegative by Remark~\ref{Hconv2}, the positivity of \(\sigma\), and Assumption~\ref{Hmono}. Then, each of these three terms must be equal to zero, from which we conclude that $(m_1,u_2)=(m_2,u_2)$. \end{proof} \begin{proof}[Proof of Theorem~\ref{MT}] For \((t,x) \in\Omega_T\) and \(p\in{\mathbb{R}}^d\), define $\widehat H(x,p):=H(x,p+Du_T(x))$, $\widehat{V}(t,x):= V(t,x) + \sum_{i,j=1}^da_{ij}(x) {u_{T}}_{x_ix_j}(x)$, and $\widehat{\xi} (t,x):= \xi(t,x) +u_T(x)$. Note that Assumptions~\ref{Hconv}--\ref{AWC1} and \ref{Hmono} also hold with \(H\), \(V\), and \(\xi\) replaced by \(\widehat H\), \(\widehat V\), and \(\widehat \xi\), respectively, for the same \(\gamma>1\) and possibly different constants. Moreover, \((u,m)\in H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)\) satisfies (E1)--(E3) if and only if \((m,\bar u):=(m,u -u_T)\in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)\) satisfies (E1)--(E3) with \(u_T=0\) and with \(H\), \(V\), and \(\xi\) replaced by \(\widehat H\), \(\widehat V\), and \(\widehat \xi\), respectively. To conclude the proof, we use Proposition~\ref{ExiUniS1} that shows that there exists a unique pair \((m,\hat u)\in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)\) satisfying (E1)--(E3) with \(u_T=0\) and with \(H\), \(V\), and \(\xi\) replaced by \(\widehat H\), \(\widehat V\), and \(\widehat \xi\), respectively. \end{proof} \section{Proof of Theorem~\ref{TOP}}\label{PfMT2} To prove Theorem~\ref{TOP}, we begin by investigating the compactness, with respect to \(\epsilon\), of weak solutions to Problem~\ref{MP}. Then, we define a linear functional, $F_\epsilon$, associated with \eqref{HighdRP}, and we show that $F_\epsilon$ is monotone. Next, by Minty's method, we prove Theorem~\ref{TOP}. Moreover, we study consistency of weak solutions. In particular, if a weak solution $(m,u)$ has enough regularity and $m\mapsto g(m,h(\boldsymbol{m}))$ is strictly monotone with respect to the $ L^2$-inner product, then we show that the weak solution is the unique classical solution to Problem~\ref{OP}. Set $\sigma\equiv 0$ and $\xi\equiv 0$. Let $(m_\epsilon, u_\epsilon)$ be the weak solution given by Theorem~\ref{MT}. Then, we define $\big<u_\epsilon\big>:t\to {\mathbb{R}}$ and $\tilde u_\epsilon:\Omega_T\to {\mathbb{R}}$ by $\big<u_\epsilon\big>:=\int_{{\mathbb{T}}^d}u_\epsilon(t,x)\,{\rm d}x$ and \begin{equation} \tilde u_\epsilon(t,x):=u_\epsilon(t,x)-\big<u_\epsilon\big>(t).\label{Defutild} \end{equation} The next lemma addresses the weak convergence of $(m_\epsilon,\tilde u_\epsilon)$ in $L^1(\Omega_T)\times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$. \begin{lem}\label{WCWS1} Consider Problem~\ref{MP} with $\sigma= 0$ and $\xi= 0$, and suppose that Assumptions~\ref{Hconv}--\ref{Hmono} hold for some \(\gamma>1\). Let $(m_\epsilon, u_\epsilon) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ be the unique weak solution to Problem~\ref{MP} and let $\tilde u_\epsilon$ be given by \eqref{Defutild}. Then, there exists $(m,\tilde u)\in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ such that $m \geqslant 0$ and $(m_\epsilon,\tilde u_\epsilon)$ converges to $(m,\tilde u)$ weakly in $L^1(\Omega_T)\times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ as $\epsilon \to 0$, extracting a subsequence if necessary. \end{lem} \begin{proof} Because $\big<u_\epsilon\big>(t)=\int_{{\mathbb{T}}^d} \tilde u_\epsilon(t,x)\,{\rm d}x=0$ for a.e.\,$t\in(0,T)$ and $\partial_x^\alpha\tilde u_\epsilon=\partial_x^\alpha u_\epsilon$, from Corollary~\ref{apriDu1} and Poincar\'{e}--Wirtinger inequality, we have \begin{equation*} \|\tilde u_\epsilon\|_{L^\gamma(\Omega_T)}^\gamma =\int_0^T\!\!\!\int_{{\mathbb{T}}^d}|\tilde u_\epsilon -\big<u_\epsilon\big>|^\gamma\,{\rm d}x{\rm d}t \leqslant C \|D\tilde u_\epsilon\|_{L^\gamma(\Omega_T)}^\gamma \leqslant C, \end{equation*} where $C$ is independent of $\epsilon$. Because $L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ is a reflexive Banach space, there exist a subsequence $\{\tilde u_{\epsilon_j}\}_{j=1}^\infty$ and $\tilde u\in L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ such that $\tilde u_{\epsilon_j}\rightharpoonup \tilde u$ in $L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$. On the other hand, using Proposition~\ref{apriWS1} and the positivity of \(m_\epsilon\) and \(m_0\), we get \begin{equation* \sup_{\epsilon\in(0,1)} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon g(m_\epsilon,h(\boldsymbol{m}_\epsilon))\, {\rm d}x{\rm d}t <\infty. \end{equation*} Therefore, from Assumption~\ref{gwc}, there exists $m\in L^1(\Omega_T)$ such that $m_\epsilon \rightharpoonup m$ in $L^1(\Omega_T)$ as $\epsilon \to 0$, extracting a subsequence if necessary. Since $m_\epsilon\geq0$, we conclude that $m\geqslant 0$. \end{proof} Fix $(\eta, v) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$, let \(F[\eta,v]\) be the functional introduced in \eqref{DRF2}, and let $F_{\epsilon} [\eta,v]: H^{2k}(\Omega_T) \times H^{2k}(\Omega_T) \to {\mathbb{R}}$ be the linear functional given by \begin{equation}\label{DRF1} \begin{aligned} \left\langle F_\epsilon \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangle := & \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangle +\epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( \eta w_1 + \sum_{|\beta|=2k}\partial_{t,x}^\beta \eta \partial_{t,x}^\beta w_1 \Big)\,{\rm d}x{\rm d}t \\ & + \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( v w_2 + \sum_{|\beta|=2k}\partial_{t,x}^\beta v\partial_{t,x}^\beta w_2 \Big)\,{\rm d}x{\rm d}t. \end{aligned} \end{equation} Next, we prove the monotonicity of $F_\epsilon$ over ${\mathcal{A}}\times {\mathcal{B}}$, where \({\mathcal{A}}\) and ${\mathcal{B}}$ are given by \eqref{DAa} and \eqref{DBb}. \begin{lem}\label{PAm} Consider Problem~\ref{MP} with $\sigma= 0$ and $\xi= 0$, and suppose that Assumptions~\ref{Hconv}--\ref{Hmono} hold for some \(\gamma>1\). Let $(m_\epsilon, u_\epsilon) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ be the unique weak solution to Problem~\ref{MP} and let $m$ be given by Lemma~\ref{WCWS1}. Then, we have \begin{equation*} \frac{d}{dt}\left(\int_{{\mathbb{T}}^d}m(t,x)\,{\rm d}x\right)=0 \ \ \mbox{in the sense of distributions}; \end{equation*} that is, for $v\in C_c^\infty(0,T)$, \begin{equation}\label{Dst1} \int_0^Tv'(t)\bigg(\int_{{\mathbb{T}}^d}m(t,x)\,{\rm d}x\bigg){\rm d}t=0. \end{equation} \end{lem} \begin{proof} Fix $v\in C_c^{\infty}(0,T)$. Because $v \in {\mathcal{B}}_0$ and $v$ is independent of the space variables, from (E3) with $\sigma=0$ and $\xi= 0$, and using integration by parts, we have \begin{equation*} -\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon v_t \,{\rm d}x{\rm d}t + \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( u_\epsilon v + \sum_{|\beta|=2k}\partial_{t,x}^\beta u_\epsilon \partial_{t,x}^\beta v \Big)\,{\rm d}x{\rm d}t =0. \end{equation*} Thus, by Corollary~\ref{aprisqrt} and Lemma~\ref{WCWS1}, as $\epsilon\to 0$, we have that \eqref{Dst1} holds. \end{proof} \begin{lem}\label{MORF} Let $H$, $g$, $h$, $V$, and \(\{a_{ij}\}_{i,j=1}^d\) be as in Problem~\ref{MP}, let $F_\epsilon$ be given by \eqref{DRF1}, and suppose that Assumption~\ref{Hmono} holds. Then, for any $(\eta_1, v_1)$, $(\eta_2, v_2) \in {\mathcal{A}}\times {\mathcal{B}}$, we have \begin{equation*} \left\langle F_{\epsilon} \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - F_{\epsilon} \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix}, \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix} \right\rangle \geqslant 0. \end{equation*} \end{lem} \begin{proof} Let $(\eta_1, v_1)$, $(\eta_2, v_2) \in {\mathcal{A}}\times {\mathcal{B}}$. Then, $v_1 - v_2 \in {\mathcal{B}}_0$. Hence, from Assumption~\ref{Hmono} and integration by parts, we have \begin{align*} &\left\langle F_{\epsilon} \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - F_{\epsilon} \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix}, \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix} \right\rangle\\ &\quad\geqslant\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \epsilon\Big[(\eta_1-\eta_2)^2 + \sum_{|\beta|=2k}(\partial_{t,x}^\beta \eta_1-\partial_{t,x}^\beta \eta_2)^2 + (v_1 - v_2)^2+ \sum_{|\beta|= 2k}(\partial_{t,x}^\beta v_1-\partial_{t,x}^\beta v_2)^2\Big]\, {\rm d}x{\rm d}t \geqslant 0. \qedhere \end{align*} \end{proof} \begin{remark}\label{rmmono1} Let $\widehat {\mathcal{A}}$ be the set in \eqref{DAawh}. Then, Lemma~\ref{MORF} still holds for $(\eta_1,v_1), (\eta_2,v_2)\in\widehat {\mathcal{A}}\times {\mathcal{B}}$. \end{remark} \begin{lem}\label{Equtu} Let $H$, $g$, $h$, $V$, and \(\{a_{ij}\}_{i,j=1}^d\) be as in Problem~\ref{MP}, let $F_\epsilon$ be given by \eqref{DRF1}, and suppose that Assumptions \ref{Hconv}--\ref{AWC1} and \ref{Hmono} hold. Let $(m_\epsilon,u_\epsilon)\in H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)$ be the unique weak solution to Problem~\ref{MP} and let $\tilde u_\epsilon$ be as in \eqref{Defutild}. Then, for $(\eta, v)\in \widehat{\mathcal{A}}\times {\mathcal{B}}$, we have \begin{equation*} \begin{aligned} \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle = \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ \tilde u_\epsilon \end{bmatrix} \right\rangle . \end{aligned} \end{equation*} \end{lem} \begin{proof} Using \eqref{Defutild}, the second term on the right-hand side of \eqref{DRF2} with \(w_2=v- u_\epsilon\) can be written as \begin{equation*} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( \eta_t-\sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j}-\div\big(\eta D_p H(x,Dv)\big)\Big)( v- u_\epsilon )\,{\rm d}x{\rm d}t\\ =& \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( \eta_t - \sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j} - \div\big(\eta D_p H(x,Dv)\big)\Big)( v-\tilde u_\epsilon )\,{\rm d}x{\rm d}t\\ &- \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( \eta_t - \sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j} -\div\big(\eta D_p H(x,Dv)\big)\Big)\big<u_\epsilon\big>(t)\,{\rm d}x{\rm d}t. \end{split} \end{equation*} Because \(\eta\in \widehat {\mathcal{A}}\), we have $\int_{{\mathbb{T}}^d} \eta_t(x,t)\,{\rm d}x = \frac{d}{dt}\left(\int_{{\mathbb{T}}^d}\eta(t,x)\,{\rm d}x\right)=0$ for a.e.~$t\in (0,T)$. Moreover, using integration by parts with respect to the space variables together with the fact that $\big<u_\epsilon\big>$ depends only on $t$, we conclude that \begin{equation*} \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( \eta_t - \sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j} -\div\big(\eta D_p H(x,Dv)\big)\Big)\big<u_\epsilon\big>(t)\,{\rm d}x{\rm d}t=0, \end{equation*} from which the statement follows. \end{proof} \begin{proof}[Proof of Theorem~\ref{TOP}] Let $(m_\epsilon, u_\epsilon)\in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ be the unique weak solution to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1} and with $\sigma= 0$ and $\xi= 0$. Fix $(\eta, v)\in \widehat{\mathcal{A}} \times {\mathcal{B}}$. By (E2) and (E3) in Definition~\ref{DMPWS1}, we have \begin{equation*} \left\langle F_\epsilon \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \geqslant 0. \end{equation*} Then, using Lemma~\ref{MORF}, we have \begin{equation}\label{eq:pfe} \begin{aligned} 0&\leqslant \left\langle F_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix}-F_{\epsilon} \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \leqslant \left\langle F_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle= \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle + c_\epsilon, \end{aligned} \end{equation} where \begin{equation}\label{vanish1} \begin{aligned} c_\epsilon :=&\,\,\epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( \eta (\eta- m_\epsilon) + \sum_{|\beta|=2k}\partial_{t,x}^\beta \eta \partial_{t,x}^\beta (\eta- m_\epsilon) \Big)\,{\rm d}x{\rm d}t\\&\quad+ \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( v(v- u_\epsilon)+ \sum_{|\beta|=2k}\partial_{t,x}^\beta v\partial_{t,x}^\beta (v- u_\epsilon) \Big)\,{\rm d}x{\rm d}t. \end{aligned} \end{equation} Combining H\"older's inequality with Corollary~\ref{aprisqrt}, we get \begin{equation} \begin{aligned}\label{eq:lim1} \lim_{\epsilon\to0} c_\epsilon = 0. \end{aligned} \end{equation} On the other hand, by Lemma~\ref{WCWS1}, there exists $(m,\tilde u)\in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying (D1) in Definition~\ref{DOPWS1} and such that $(m_\epsilon, \tilde u_\epsilon)$ converges to $(m,\tilde u)$ weakly in $L^1(\Omega_T)\times L^\gamma((0,T);\allowbreak W^{1,\gamma}({\mathbb{T}}^d))$ as $\epsilon \to 0$, extracting a subsequence if necessary. Then, by the definition of \(F[\eta,v]\) (see \eqref{DRF2}) and Lemma~\ref{Equtu}, we obtain \begin{equation} \begin{aligned} \lim_{\epsilon\to0} \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \end{aligned} = \label{eq:lim2} \begin{aligned} \lim_{\epsilon\to0} \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ \tilde u_\epsilon \end{bmatrix} \right\rangle = \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ \tilde u \end{bmatrix} \right\rangle. \end{aligned} \end{equation} From \eqref{eq:pfe}, \eqref{eq:lim1}, and \eqref{eq:lim2}, we conclude that \begin{equation*} \begin{aligned} \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ \tilde u \end{bmatrix} \right\rangle\geqslant 0; \end{aligned} \end{equation*} thus, \((m,\tilde u)\) also satisfies (D2) in Definition~\ref{DOPWS1}. Therefore, \((m,\tilde u)\) is a weak solution of Problem~\ref{OP} in the sense of Definition~\ref{DOPWS1}. \end{proof} \begin{lem}\label{Elam1} Assume that Assumptions~\ref{Hconv}--\ref{Hmono} hold for some \(\gamma>1\), and let $(m,\tilde u)\in L^1(\Omega_T) \times L^{\gamma}((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ be a weak solution to Problem~\ref{OP} in the sense of Definition~\ref{DOPWS1}. Assume further that $(m , \tilde u)\in H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)$ and that $m(0,\cdot)=m_0(\cdot)$, $m>0$ in $\Omega_T$, and $\tilde u(T,\cdot)=u_T(\cdot)$. Then, there exists $\mu\in C(0,T)$ such that \begin{equation}\label{Meq2} {\tilde u}_t + \sum_{i,j=1}^da_{ij}(x){\tilde u}_{x_ix_j} - H(x,D\tilde u) + g(m,h(\boldsymbol{m})) + V(t,x) = \mu(t)\quad \hbox{ in } \Omega_T. \end{equation} \end{lem} \begin{proof} Recalling \eqref{eq:MorreyET}, since $m\in H^{2k}(\Omega_T)$ and thus, by Morrey's theorem, $m \in C^{1,l}(\Omega_T)$ for some $l\in (0,1)$, Lemma~\ref{PAm} yield \begin{equation*} \int_{{\mathbb{T}}^d}m(t,x)\,{\rm d}x = \int_{{\mathbb{T}}^d}m_0(x)\,{\rm d}x=1 \end{equation*} for all $t\in(0,T)$. Hence, $m\in \widehat{\mathcal{A}}$. Fix $\varphi\in C_c^\infty(\Omega_T)$ and $i\in\{1,...,d\}$. Then, $\int_{{\mathbb{T}}^d} \varphi_{x_i}(t,x)\,{\rm d}x=0$ for all $t\in(0,T)$. Thus, since $m>0$, we have $m+\delta \varphi_{x_i}\in \widehat {\mathcal{A}}$ for all $\delta\in {\mathbb{R}}$ with \(|\delta|\) sufficiently small. Taking $\eta=m+\delta \varphi_{x_i}$ and $v=\tilde u$ in (D2) and integrating by parts on \({\mathbb{T}}^d\), we obtain \begin{equation}\label{Meq1} \delta \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{\partial}{\partial x_i}\Big( {\tilde u}_t + \sum_{i,j=1}^da_{ij}(x){\tilde u}_{x_ix_j} - H(x,D\tilde u) + g(m+\delta\varphi, h(\boldsymbol{m}+\delta\boldsymbol{\varphi})) +V(t,x) \Big) \varphi\,{\rm d}x{\rm d}t \geqslant 0. \end{equation} As the sign of $\delta $ is arbitrary, we conclude that \eqref{Meq1} holds with ``$\geqslant$" replaced by ``$=$". Then, dividing by \(\delta\in{\mathbb{R}}\setminus\{0\}\) first and letting $\delta\to 0$ afterwards, we get \begin{equation*} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{\partial}{\partial x_i}\Big( {\tilde u}_t + \sum_{i,j=1}^da_{ij}(x){\tilde u}_{x_ix_j} - H(x,D\tilde u) + g(m,h(\boldsymbol{m})) +V(t,x) \Big) \varphi\,{\rm d}x{\rm d}t =0 \end{equation*} by Lebesgue dominated convergence theorem (recall \eqref{hFD}). Because $\varphi\in C_c^\infty(\Omega_T)$ and and $i\in\{1,...,d\}$ are arbitrary, the preceding equality implies that for each $t\in (0,T)$, there exists $\mu(t)$ for which \eqref{Meq2} holds a.e.~in \(\Omega_T\). Since the left-hand side of \eqref{Meq2} belongs to $C(\Omega_T)$, we conclude that $\mu\in C(0,T)$ and \eqref{Meq2} holds pointwise in \(\Omega_T\). \end{proof} \begin{pro}\label{ECS1 Assume that Assumptions~\ref{Hconv}--\ref{Hmono} hold for some \(\gamma>1\), and let $(m,\tilde u)\in L^1(\Omega_T) \times L^{\gamma}((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ be a weak solution to Problem~\ref{OP} in the sense of Definition~\ref{DOPWS1}. Assume further that $(m , \tilde u)\in H^{2k}(\Omega_T)\times H^{2k}(\Omega_T)$ satisfies $m(0,\cdot)=m_0(\cdot)$, $m>0$ in $\Omega_T$, and $\tilde u(T,\cdot)=u_T(\cdot)$ and that $m\mapsto g(m,h(\boldsymbol{m}))$ is a strictly monotone map with respect to the $ L^2$-inner product; that is, for $m_1, m_2 \in L^2(\Omega_T)$ with $m_1\neq m_2$, we have \begin{equation}\label{stmono1} \int_{0}^{T}\!\!\!\int_{{\mathbb{T}}^d} (g(m_1,h(\boldsymbol{m_1}))-g(m_2,h(\boldsymbol{m_2})))(m_1-m_2) \,{\rm d}x{\rm d}t>0. \end{equation} Let $\mu\in C(\Omega_T)$ be given by Lemma~\ref{Elam1}, and define $u:=\tilde u +\int_t^T \mu(s)\, {\rm d}s$. Then, $(m, u)$ is the unique classical solution to Problem~\ref{OP}. \end{pro} \begin{proof} We have \(u_t (x,t) ={\tilde u}_t(x,t) -\mu(t) \) and \(\partial^\alpha_x u (x,t) =\partial^\alpha_x {\tilde u} (x,t)\) for all \((x,t) \in \Omega_T\). Because \((m,\tilde u)\) satisfies \eqref{Meq2} pointwise in \(\Omega_T\), we conclude that \((m,u)\) satisfies \begin{align*} &{u}_t + \sum_{i,j=1}^da_{ij}(x) u_{x_ix_j} - H(x,Du) + g(m,h(\boldsymbol{m})) + V(t,x) =0 \end{align*} pointwise in \(\Omega_T\). Moreover, as proved in Lemma~\ref{Elam1}, $m\in \widehat{\mathcal{A}}$. Fix \(\delta>0\) and \(\psi\in C_c^{\infty}(\Omega_T)\), and choose $(\eta,v)=( m, \tilde u+\delta\psi )$ in (D2). Then, dividing by $\delta$, letting $\delta\to0$, and using the arbitrariness of \(\psi\) and the identity \(\partial^\alpha_x u=\partial^\alpha_x \tilde u\), we conclude that \((m,u)\) also satisfies \begin{align*} &m_t - \sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j} - \div\big(m D_p H(x,Du)\big)= 0 \end{align*} pointwise in \(\Omega_T\). Thus, \((m,u)\) is a classical solution to Problem~\ref{OP}. Finally, we observe that because $g(m,h(\boldsymbol{m}))$ satisfies \eqref{stmono1} for $m_1, m_2\in L^2(\Omega_T)$ with $m_1\neq m_2$, the solution is unique. \end{proof} \section{Properties of weak solutions to Problem~\ref{OP}}\label{prowsOP} Next, we study properties of weak solutions, $(m,u)$, to Problem~\ref{OP} in the sense of Definition~\ref{DOPWS1}. In particular, we show that $m$ and $u$ satisfy a transport equation and a Hamilton--Jacobi equation, respectively, in a weak sense. Hereafter, we fix $\sigma\equiv0$ and $\xi\equiv0$, and we consider the case in which \begin{equation}\label{exaHg} H(x,p)=\frac{1}{2}|p|^2, \quad g(m,\theta) = m^{r} + \theta, \quad h(\boldsymbol{m})(x,t)=\big(\zeta\ast(\zeta\ast m)(\cdot, x)\big)(t), \end{equation} where $r>0$ and $\zeta\in C_c^\infty({\mathbb{T}}^d)$ is such that $\zeta \geq0$, $\|\zeta\|_{L^2({\mathbb{T}}^d)}=1$, and, for any $f$, $g \in L^1({\mathbb{T}}^d)$, we have $\int_{{\mathbb{T}}^d}f(x)\, (\zeta\ast g)(x)\,{\rm d}x= \int_{{\mathbb{T}}^d}(\zeta \ast f)(x)\,g(x)\,{\rm d}x$. Then, recalling Remark~\ref{esth1}, it can be checked that Assumptions~\ref{Hconv}--\ref{Hmono} hold with \(\gamma=2\). \begin{lem}\label{wlmJ} Let \(H\), \(g\), and \(h\) be given by \eqref{exaHg}, let $(m_\epsilon,u_\epsilon)$ be the unique weak solution to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1} (with \(\sigma=0\) and \(\xi=0\)), and set \(q:=\frac{2(1+r)}{2+r}\). Then, there exist $m\in L^{1+r}(\Omega_T)$ and $J\in L^{q}(\Omega_T;{\mathbb{R}}^d)$ such that $m_\epsilon\rightharpoonup m$ weakly in $L^{1+r}(\Omega_T)$ and $m_\epsilon Du_\epsilon \rightharpoonup J$ weakly in $L^{q}(\Omega_T;{\mathbb{R}}^d)$ as $\epsilon \to 0$, extracting a subsequence if necessary. \end{lem} \begin{proof} Using the fact that \(m_\epsilon g(m_\epsilon, h(\boldsymbol{m}_\epsilon))=m_\epsilon^{1+r} +m_\epsilon h(\boldsymbol{m}_\epsilon) \geqslant m_\epsilon^{1+r} \) because \(m_\epsilon h(\boldsymbol{m}_\epsilon)\geqslant 0\), Proposition~\ref{apriWS1} and Corollary~\ref{apriDu1} yiel \begin{equation}\label{lem81a} \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m_\epsilon^{1+r}\,{\rm d}x{\rm d}t \leqslant \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m_\epsilon g(m_\epsilon, h(\boldsymbol{m}_\epsilon))\,{\rm d}x{\rm d}t \leqslant C( 1 + \Vert Du_\epsilon\Vert_{L^1(\Omega_T)}) \leqslant C, \end{equation} where $C$ is a positive constant independent of $\epsilon$. Next, we estimate \(m_\epsilon Du_\epsilon\) in \(L^{q}(\Omega_T;{\mathbb{R}}^d)\). We first note that \(q = 1+ \frac{r}{2+r}>1 \) and \(\frac{q}{2(1+r)} + \frac{q}{2} =1 \). Then, using Young's inequality, \eqref{lem81a}, Proposition~\ref{apriWS1}, and Corollary~\ref{apriDu1}, we get \begin{equation}\label{lem81b} \begin{aligned} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon^{q}|Du_\epsilon|^{q}\,{\rm d}x{\rm d}t &=\int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon^{\frac{q}{2}}\Big(m_\epsilon^{\frac{1}{2}}|Du_\epsilon|\Big)^q\,{\rm d}x{\rm d}t\\ & \leqslant \frac{q}{2(1+r)} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon^{1+r}\,{\rm d}x{\rm d}t +\frac{q}{2} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} m_\epsilon|Du_\epsilon|^2\,{\rm d}x{\rm d}t \leqslant C, \end{aligned} \end{equation} where $C$ is another positive constant independent of $\epsilon$. The conclusion follows from \eqref{lem81a} and \eqref{lem81b} together with the fact that $L^{1+r}(\Omega_T)$ and $L^q(\Omega_T;{\mathbb{R}}^d)$ are reflexive Banach spaces. \end{proof} \begin{pro}\label{Pwsm1} Under the assumptions of Lemma~\ref{wlmJ}, let $m\in L^{1+r}(\Omega_T)$ and $J\in L^q(\Omega_T;{\mathbb{R}}^d)$ be given by Lemma~\ref{wlmJ} and let \({\mathcal{B}}_0\) be the set introduced in \eqref{DBb0}. Then, for all $v\in {\mathcal{B}}_0$, $m$ satisfies \begin{equation}\label{eq:weakFP} -\int_{{\mathbb{T}}^d}v(0,x)m_0(x)\,{\rm d}x -\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ \big(v_t -\sum_{i,j=1}^da_{ij}(x)v_{x_ix_j}\big)m + J \cdot Dv \Big]\, {\rm d}x{\rm d}t =0. \end{equation} \end{pro} \begin{proof} Let $(m_\epsilon,u_\epsilon)$ be the unique weak solution to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1} and fix $v\in {\mathcal{B}}_0$; that is, $v\in H^{2k}(\Omega_T)$ and $v(x,T)=0$. Then, using (E3) and integration by parts, we have \begin{align*} &-\int_{{\mathbb{T}}^d}v(0,x)m_0(x)\,{\rm d}x -\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big[ \Big(v_t-\sum_{i,j=1}^da_{ij}(x)v_{x_ix_j} \Big)m_\epsilon + m_\epsilon Du_\epsilon \cdot Dv \Big]\, {\rm d}x{\rm d}t\\ &\quad= -\epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( u_\epsilon v + \sum_{|\beta|=2k}\partial_{t,x}^{\beta}u_\epsilon \partial_{t,x}^{\beta}v \Big)\,{\rm d}x{\rm d}t. \end{align*} By Corollary~\ref{aprisqrt} and H\"older's inequality, the right-hand side of the previous equality converges to zero as \(\epsilon\to0\). Hence, using the fact that $m_\epsilon\rightharpoonup m$ weakly in $L^{1+r}(\Omega_T)$ and $m_\epsilon Du_\epsilon \rightharpoonup J$ weakly in $L^{q}(\Omega_T;{\mathbb{R}}^d)$, as \(\epsilon\to0\), together with the regularity of \((a_{ij})_{1\leqslant i,j\leqslant d}\) and \(v\), letting \(\epsilon\to0\) in the equality above yields \eqref{eq:weakFP}. \end{proof}% \begin{remark} The preceding proposition gives that $(m,J)$ is a weak solution to the following equation: \begin{equation*} \begin{cases} m_t -\sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j} - \div(J)=0 &\mbox{in }\Omega_T,\\ m(0,x)=m_0(x) &\mbox{on }{\mathbb{T}}^d. \end{cases} \end{equation*} \end{remark} \begin{pro}\label{Pwsu1} Let \(H\), \(g\), and \(h\) be given by \eqref{exaHg} with \(r\in(0,1]\). Let $(m,u)$ be a weak solution to Problem~\ref{OP} in the sense of Definition~\ref{DOPWS1}, obtained as a sublimit of \(\{(m_\epsilon,u_\epsilon)\}_\epsilon\) with $(m_\epsilon,u_\epsilon)$ the unique weak solution to Problem~\ref{MP} in the sense of Definition~\ref{DMPWS1} (with \(\sigma=0\) and \(\xi=0\)). Then, for all $\varphi \in H^{2k}(\Omega_T)$ such that $\varphi\geq0$ and $\varphi(0,\cdot)=0$, we have \begin{align*} &-\int_{{\mathbb{T}}^d}u_T(x)\varphi(T,x)\,{\rm d}x +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( u\varphi_t + \sum_{i,j=1}^du_{x_i}(a_{ij}\varphi)_{x_j} \Big)\,{\rm d}x{\rm d}t\\ &\quad +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( \frac{1}{2}|Du|^2 - m^{r} - \zeta\ast(\zeta\ast m) - V\Big)\varphi\,{\rm d}x{\rm d}t \leqslant 0. \end{align*} \end{pro} \begin{proof} Let \((m,u)\) and $(m_\epsilon,u_\epsilon)\in \mathcal{A}\times \mathcal{B} $ be as stated, and fix $\varphi \in H^{2k}(\Omega_T)$ such that $\varphi\geq0$ and $\varphi(0,\cdot)=0$. Taking $w=m_\epsilon+\varphi\in{\mathcal{A}}$ in (E2) and integrating by parts, we obtain \begin{equation}\label{eq:subsHJ} \begin{aligned} &-\int_{{\mathbb{T}}^d}u_T\varphi(T,x)\,{\rm d}x + \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( u_\epsilon\varphi_t + \sum_{i,j=1}^d{u_\epsilon}_{x_i}(a_{ij}\varphi)_{x_j} - V\varphi \Big)\,{\rm d}x{\rm d}t +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{1}{2}|Du_\epsilon|^2 \varphi\,{\rm d}x{\rm d}t \\ &\quad- \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m_\epsilon^{r} \varphi\,{\rm d}x{\rm d}t - \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\zeta\ast(\zeta\ast m_\epsilon)\varphi \,{\rm d}x{\rm d}t\leqslant \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big(m_\epsilon\varphi +\sum_{|\beta|=2k} \partial_{t,x}^\beta m_\epsilon\partial_{t,x}^\beta \varphi\Big)\,{\rm d}x{\rm d}t. \end{aligned} \end{equation} Next, we pass \eqref{eq:subsHJ} to the limit as \(\epsilon\to0\). First, we observe that Corollary~\ref{aprisqrt} and H\"older's inequality yield \begin{equation} \label{eq:limHJ1} \begin{aligned} \lim_{\epsilon\to0} \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big(m_\epsilon\varphi +\sum_{|\beta|=2k} \partial_{t,x}^\beta m_\epsilon\partial_{t,x}^\beta \varphi\Big)\,{\rm d}x{\rm d}t = 0. \end{aligned} \end{equation} Using the fact that \(u_\epsilon \rightharpoonup u \) and \({u_\epsilon}_{x_i} \rightharpoonup {u}_{x_i}\) weakly in \(L^2(\Omega_T)\) for all \(i\in\{1,...,d\}\) (see Lemma~\ref{WCWS1}) together with the regularity of \((a_{ij})_{1\leqslant i,j\leqslant d}\) and \(\varphi\), we conclude that \begin{equation} \label{eq:limHJ2} \begin{aligned} &\lim_{\epsilon\to0} \bigg[-\int_{{\mathbb{T}}^d}u_T\varphi(T,x)\,{\rm d}x + \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( u_\epsilon\varphi_t + \sum_{i,j=1}^d{u_\epsilon}_{x_i}(a_{ij}\varphi)_{x_j} - V\varphi \Big)\,{\rm d}x{\rm d}t\bigg]\\ &\quad= -\int_{{\mathbb{T}}^d}u_T(x)\varphi(T,x)\,{\rm d}x +\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( u\varphi_t + \sum_{i,j=1}^du_{x_i}(a_{ij}\varphi)_{x_j} - V\varphi \Big)\,{\rm d}x{\rm d}t. \end{aligned} \end{equation} Similarly, the weak convergence \(m_\epsilon \rightharpoonup m\) in \(L^1(\Omega_T)\) and the symmetry of \(\zeta\) yield \begin{equation} \label{eq:limHJ3} \begin{aligned} \lim_{\epsilon\to0} \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\zeta\ast(\zeta\ast m_\epsilon)\,\varphi \,{\rm d}x{\rm d}t &= \lim_{\epsilon\to0}\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \zeta \ast(\zeta\ast \varphi)\, m_\epsilon \,{\rm d}x{\rm d}t \\&= \int_{{\mathbb{T}}^d} \zeta \ast(\zeta\ast \varphi)\, m \,{\rm d}x{\rm d}t = \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \zeta\ast(\zeta\ast m)\,\varphi \,{\rm d}x{\rm d}t. \end{aligned} \end{equation} Finally, recalling that \(\varphi \geqslant 0\) and \(r\in(0,1]\), we have that for each \((x,t)\in\Omega_T\), the maps \(p\in {\mathbb{R}}^d\mapsto \frac{1}{2}|p|^2\varphi(x,t) \) and \(m\in {\mathbb{R}}^+_0 \mapsto - m^r\varphi(x,t)\) define convex functions over \({\mathbb{R}}^d\) and \({\mathbb{R}}^+_0\), respectively. Then, the lower semicontinuous result \cite[Theorem 6.54]{FoLe07} and the weak convergence of \(\{m_\epsilon\}_\epsilon\) and \(\{Du_\epsilon\}_\epsilon\) mentioned above imply that \begin{equation*} \begin{aligned} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{1}{2}|Du|^2 \varphi\,{\rm d}x{\rm d}t - \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m^{r} \varphi\,{\rm d}x{\rm d}t&\leqslant \liminf_{\epsilon\to0} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{1}{2}|Du_\epsilon|^2 \varphi\,{\rm d}x{\rm d}t + \liminf_{\epsilon\to0}\bigg(\!- \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m_\epsilon^{r} \varphi\,{\rm d}x{\rm d}t\bigg) \\ & \leqslant \liminf_{\epsilon\to0}\bigg(\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \frac{1}{2}|Du_\epsilon|^2 \varphi\,{\rm d}x{\rm d}t - \int_0^T\!\!\!\int_{{\mathbb{T}}^d}m_\epsilon^{r} \varphi\,{\rm d}x{\rm d}t\bigg). \end{aligned} \end{equation*} This estimate, together with \eqref{eq:subsHJ}--\eqref{eq:limHJ3}, concludes the proof of Proposition~\ref{Pwsu1}. \end{proof} \begin{remark} Proposition~\ref{Pwsu1} still holds if we replace the quadratic Hamiltonian, \(H\), in \eqref{exaHg} by a Hamiltonian satisfying Assumptions~\ref{Hconv}--\ref{Bderi}. \end{remark} \begin{remark} For \(r\in(0,1]\), Proposition~\ref{Pwsu1} implies that $u$ is a subsolution to the following Hamilton--Jacobi equation: \begin{equation*} \begin{cases} -u_t +\sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} +\frac{1}{2}|Du|^2 - m^{r}-\zeta\ast(\zeta\ast m)-V=0&\mbox{in } \Omega_T,\\ u(T,x)=u_T(x)&\mbox{on }{\mathbb{T}}^d. \end{cases} \end{equation*} \end{remark} \section{Final remarks}\label{Secfr} In this section, we show how our methods can be adapted to address other MFG models. More precisely, we address the existence of weak solutions to a MFG with congestion and to a density constrained MFG. \subsection{MFGs with congestion} Here, we explain how the methods we developed in the previous sections can be used to prove the existence of weak solutions to problems with congestion, whose underlying Hamiltonian is singular at \(m=0\). More concretely, we consider the following MFG with congestion. \begin{problem}\label{fr1} Let $T>0$ and $d\in {\mathbb{N}}$, and define $\Omega_T=(0,T)\times{\mathbb{T}}^d$. Let $X(\Omega_T)$ and ${\mathcal{M}}_{ac}(\Omega_T)$ be the spaces introduced in Problem~\ref{OP}. Fix $\epsilon \in (0,1)$ and $k \in {\mathbb{N}}$ such that $2k>\frac{d+1}{2} +3$. Assume that $a_{ij}\in C^2({\mathbb{T}}^d)$ for $1\leqslant i,j\leqslant d$, $V \in L^{\infty}(\Omega_T)\cap C(\Omega_T)$, $g\in C^1({\mathbb{R}}_0^+\times {\mathbb{R}})$, $h:{\mathcal{M}}_{ac}(\Omega_T)\to X(\Omega_T)$ is a (possible nonlinear) operator, $m_0, u_T\in C^{4k}({\mathbb{T}}^d)$, and $H\in C^2({\mathbb{T}}^d\times{\mathbb{R}}^d\times {\mathbb{R}}^+)$ are such that, for $x\in {\mathbb{T}}^d$, $A(x)=(a_{ij}(x))$ is a symmetric positive semi-definite matrix, $m_0>0$, $\int_{{\mathbb{T}}^d}m_0(x)\, {\rm d}x=1$, and $m\mapsto g(m,h(\boldsymbol{m}))$ is monotone with respect to the $L^2$ inner product. Find $(m,u)\in L^1(\Omega_T)\times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ with $m>0$ solving \begin{equation*} \begin{cases} u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du,m) +g(m,h(\boldsymbol{m})) + V(t,x)=0 & {\rm in}\ \Omega_T, \\[1mm] m_t - \sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j}-\div\big(mD_pH(x,Du,m)\big) = 0 & {\rm in} \ \Omega_T, \\[1mm] m(0,x)=m_{0}(x),\enspace u(T,x)=u_T(x)& \rm{on}\ {\mathbb{T}}^d. \end{cases} \end{equation*} \end{problem} Fix $\delta_0\in (0,1)$ such that \(m_0\geqslant \delta_0\) in \({\mathbb{T}}^d\). Then, recalling ${\mathcal{A}}$ and $\widehat {\mathcal{A}}$ given by \eqref{DAa} and \eqref{DAawh} in Section~\ref{intro} respectively, we define \begin{align*} {\mathcal{A}}_{\delta_0} := \big\{\eta\in {\mathcal{A}}\ |\ \eta \geqslant\delta_0\big\}, \ \ \widehat {\mathcal{A}}_{\delta_0}:=\big\{\eta\in \widehat {\mathcal{A}}\ |\ \eta \geqslant \delta_0\big\}. \end{align*} We introduce a notion of weak solutions similar to that in Definition~\ref{DOPWS1}. % \begin{definition}\label{dwsfr1} A weak solution to Problem \ref{fr1} is a pair $(m,\tilde u) \in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying \begin{flalign} ({\rm F1})\enspace &\,m \geqslant 0 \ \mbox{a.e~in }\Omega_T, &\nonumber \\ ({\rm F2})\enspace & \left\langle \widehat F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ \tilde u \end{bmatrix} \right\rangle \geqslant 0 \quad \mbox{for all}\ (\eta, v)\in \widehat{\mathcal{A}}_{\delta_0} \times {\mathcal{B}},&\nonumber \end{flalign} where, for $(\eta, v) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ fixed, $\widehat F[\eta, v]: L^1(\Omega_T) \times L^1(\Omega_T) \to {\mathbb{R}}$ is the functional given by \begin{equation}\label{DFfr1} \begin{aligned} \left\langle \widehat F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangl &:= \int_0^T\!\!\!\int_{{\mathbb{T}}^d}\Big( v_t + \sum_{i,j=1}^da_{ij}(x)v_{x_ix_j} -H(x,Dv,\eta) + g(\eta, h(\boldsymbol{\eta})) + V(t,x)\Big)w_1 \, {\rm d}x{\rm d}t\\ &\quad+\int_0^T\!\!\!\int_{{\mathbb{T}}^d}\bigg[ \eta_t - \sum_{i,j=1}^d(a_{ij}(x)\eta)_{x_ix_j} - \div\Big(\eta D_pH(x,Dv,\eta)\Big) \bigg]w_2\, {\rm d}x{\rm d}t . \end{aligned} \end{equation} \end{definition} Instead of Assumptions~\ref{Hconv}--\ref{Bderi}, we suppose the next five assumptions that, for instance, hold for \begin{equation* H(x,p,m)=c(x)\frac{|p|^\gamma}{m^\tau}, \end{equation*} where $c\in C^\infty({\mathbb{T}}^d)$ is positive and $\tau\in (0,1)$. \begin{hyp}\label{Hconvc} For all $(x,m)\in {\mathbb{T}}^d\times {\mathbb{R}}^+$, $p\mapsto H(x,p,m)$ is convex in ${\mathbb{R}}^d$. \end{hyp} \begin{hyp}\label{Hcoer2} There exists a constant, $C>0$, and $\tau\in (0,1)$ such that, for all $(x,p,m)\in {\mathbb{T}}^d\times {\mathbb{R}}^d\times {\mathbb{R}}^+$, we have \begin{equation*} -H(x,p,m) + D_pH(x,p,m)\cdot p \geqslant \frac{1}{C}\frac{|p|^\gamma}{m^\tau}-C. \end{equation*} \end{hyp} \begin{hyp}\label{Hbdd2} Let $\tau$ be as in Assumption~\ref{Hcoer2}. There exists a constant, $C>0$, such that, for all $(x,p,m)\in {\mathbb{T}}^d\times{\mathbb{R}}^d\times {\mathbb{R}}^+$, we have% \begin{equation*} \begin{aligned} H(x,p,m) \geqslant \frac{1}{C} \frac{|p|^\gamma}{m^\tau}-C. \end{aligned} \end{equation*} \end{hyp} \begin{hyp}\label{Bderi2} Let $\tau$ be as in Assumption~\ref{Hcoer2}. There exists a constant, $C>0$, such that, for all $(x,p,m)\in {\mathbb{T}}^d\times{\mathbb{R}}^d\times {\mathbb{R}}^+$, we have \begin{equation*} |D_pH(x,p,m)|\leqslant C\frac{|p|^{\gamma-1}}{m^\tau}+C . \end{equation*} \end{hyp} Moreover, in place of and in analogy with Assumption~\ref{Hmono}, we assume the following monotonicity condition on $\widehat F$. \begin{hyp}\label{Hmono2} The functional $\widehat F$ introduced in Definition~\ref{dwsfr1} is monotone with respect to the $L^2\times L^2$-inner product; that is, for all $(\eta_1, v_1)$, $(\eta_2, v_2) \in {\mathcal{A}} \times {\mathcal{B}}$ with $\eta_1, \eta_2 >0$, $\widehat F$ satisfies \begin{equation*} \left\langle \widehat F \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - \widehat F \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix}, \begin{bmatrix} \eta_1 \\ v_1 \end{bmatrix} - \begin{bmatrix} \eta_2 \\ v_2 \end{bmatrix} \right\rangle \geqslant 0. \end{equation*} \end{hyp} Because $m$ given by our previous construction is only nonnegative, to address congestion we consider instead an approximation $m_\epsilon$ satisfying $m_\epsilon \geqslant \epsilon$ for some $\epsilon \in (0,1)$. Also, we set a test function space for $m$, $\widehat{\mathcal{A}}_{\delta_0}$, such that $\eta \in \widehat{\mathcal{A}}_{\delta_0}$ satisfies $\eta\geqslant \delta_0>0$ in $\Omega_T$. By Morrey's theorem, for all $(\eta, v)\in \widehat{\mathcal{A}}_{\delta_0}\times {\mathcal{B}}$, we have $\eta, v \in C^{1,l}(\Omega_T)$ for some $l\in (0,1)$, and thus, we obtain $\frac{|Dv|^\gamma}{\eta^\tau}\in C(\overline\Omega_T)$. Therefore, since test function spaces have enough regularity, we use a proof similar to the one in Theorem~\ref{TOP} given in Section~\ref{PfMT2} and obtain the following theorem. \begin{teo}\label{frtm1} Consider Problem~\ref{fr1} and suppose that Assumptions \ref{hhyp}--\ref{gwc} and \ref{Hconvc}--\ref{Hmono2} hold. Then, there exists a weak solution $(m,\tilde u)\in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ to Problem \ref{fr1} in the sense of Definition~\ref{dwsfr1}. \end{teo} \begin{proof}[Proof sketch] First, for \(\epsilon\in(0,\delta_0)\), we introduce the following regularized problem \begin{equation}\label{rpMFGfr1} \begin{cases} \displaystyle u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du,m) + g(m,h(\boldsymbol{m})) + V(t,x) + \epsilon\sum_{|\beta|\in\{0,2k\}} \partial^{2\beta}_{t,x}(m+\sigma) =0 & \hbox{in } \Omega_T,\\ \displaystyle m_t - \sum_{i,j=1}^d\big(a_{ij}(x)(m+\sigma)\big)_{x_ix_j} - \div\big((m + \sigma)D_pH(x,Du,m)\big) +\epsilon\sum_{|\beta|\in\{0,2k\}} \partial^{2\beta}_{t,x} (u+\xi)=0& \hbox{in } \Omega_T,\\ m(0,x)=m_{0}(x),\enspace u(T,x)=u_T(x) & {\rm on}\ {\mathbb{T}}^d, \end{cases} \end{equation} where $\sigma\in C^{4k}(\overline{\Omega}_T)$ is nonnegative and $\xi\in C^{4k}(\overline{\Omega}_T)$. Second, define \begin{equation*} {\mathcal{A}}_\epsilon:=\left\{ m \in H^{2k}(\Omega_T)\ |\ m(0, x)=m_0(x),\ m\geqslant \epsilon \right\} \end{equation*} and we consider a notion of weak solution to this regularized problem similar to the one in Definition~\ref{DMPWS1} by replacing ${\mathcal{A}}$ by ${\mathcal{A}}_\epsilon$ for each $\epsilon$. Arguing as in Proposition~\ref{apriWS1}, we have \begin{equation}\label{Eq9.1} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( mg(m,h(\boldsymbol{m})) + \frac{1}{C} (m + \sigma)\frac{|Du|^\gamma}{m^\tau} + \frac{1}{C} m_{0} \frac{|Du|^\gamma}{m^\tau} \Big)\, {\rm d}x{\rm d}t\\ &\quad+ {\epsilon} \int_0^T\!\!\!\int_{{\mathbb{T}}^d} \ \Big( m^2+u^2+\sum_{|\beta|=2k}(\partial_{t,x}^\beta m)^2 + \sum_{|\beta|\leqslant 2k}(\partial_{t,x}^\beta u)^2 \Big) \, {\rm d}x{\rm d}t \leqslant C (1+\|Du\|_{L^1(\Omega_T)}), \end{split} \end{equation} where $C$ is independent of $\epsilon$. Moreover, as in the proof of Proposition~4.2 in \cite{FG2} with $0<\epsilon\leq1$, because $\tau\in (0,1)$, we have \begin{equation}\label{Eq9.2} \begin{split} &\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( m\frac{|Du|^\gamma}{m^\tau} + \frac{|Du|^\gamma}{m^\tau} \Big)\, {\rm d}x{\rm d}t \geqslant \int\!\!\!\int_{\{m\geqslant 1\}} m\frac{|Du|^\gamma}{(m+1)^\tau}\,{\rm d}x{\rm d}t + \int\!\!\!\int_{\{m< 1\}} \frac{|Du|^\gamma}{(m+1)^\tau}\, {\rm d}x{\rm d}t\\ \geqslant& \int\!\!\!\int_{\{m\geq1\}} \frac{m^{1-\tau}}{2^\tau}|Du|^\gamma\,{\rm d}x{\rm d}t + \int\!\!\!\int_{\{m<1\}} \frac{1}{2^\tau}|Du|^\gamma\,{\rm d}x{\rm d}t \geqslant \frac{1}{2^\tau}\|Du\|_{L^\gamma(\Omega_T)}^\gamma. \end{split} \end{equation} Then, since $m_0$ is strictly positive in $\Omega_T$, combining \eqref{Eq9.1} with \eqref{Eq9.2} and Young's inequality, we conclude that $\|Du\|_{L^\gamma(\Omega_T)}\leqslant C $, where $C$ is independent of $\epsilon$. Also, Corollary~\ref{aprisqrt} holds. Thus, the results in Section~\ref{Prows} hold. Next, define \begin{equation*} {\mathcal{A}}_{\epsilon, 0}:= \left\{ m\in H^{2k}(\Omega_T)\ | \ m(0,x)=0,\ m+m_0\geqslant \epsilon \right\} \end{equation*} and recall $I_{(m, u)}$ given by \eqref{defImu}. Fix $(m_1, u_1)\in H^{2k-2}(\Omega_T)\times H^{2k-1}(\Omega_T)$ with $m_1 + m_0 \geqslant \epsilon$ and set $I_1=I_{(m_1,u_1)}$. Then, we consider the following variational problem: find $m \in {\mathcal{A}}_{\epsilon,0}$ such that \begin{equation}\label{fr1vp} I_1[m] = \inf_{w\in {\mathcal{A}}_{\epsilon, 0}} I_1[w]. \end{equation} By the same proof as in Proposition~\ref{EMVP1}, there exists a unique minimizer $m\in {\mathcal{A}}_{\epsilon, 0}$ satisfying \eqref{fr1vp}. Therefore, for each $\epsilon \in (0,1)$, we can apply the results of Sections~\ref{VP}--\ref{PfMT1} (with the obvious modifications) to prove the existence and uniqueness of weak solutions to \eqref{rpMFGfr1} in the sense of Definition~\ref{DMPWS1} with ${\mathcal{A}}$ replaced by ${\mathcal{A}}_{\epsilon}$. Then, because $\widehat {\mathcal{A}}_{\delta_0}\subset {\mathcal{A}}_\epsilon$ (as \(0<\epsilon<\delta_0\)), we obtain a unique weak solution $(m,u)$ satisfying (E1), (E2), and (E3) in Definition~\ref{DMPWS1} for all $w\in \widehat {\mathcal{A}}_{\delta_0}$ and $v\in {\mathcal{B}}_0$. Since Proposition~\ref{apriWS1} and Corollary~\ref{apriDu1} hold and $m_\epsilon \geqslant 0$, applying Poincar\'{e}--Wirtinger inequality and Assumption~\ref{gwc}, Lemma~\ref{WCWS1} follows and thus Lemmas~\ref{PAm} and \ref{Equtu} also hold. Set $\sigma\equiv 0$ and, for $(\eta, v)\in {\mathcal{A}}_{\delta_0}\times {\mathcal{B}}$, define $\widehat F_\epsilon$ by \begin{equation}\label{fr1eq1} \begin{split} \left\langle {\widehat F}_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangle = \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} w_1 \\ w_2 \end{bmatrix} \right\rangle &+ \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( \eta w_1 + \sum_{|\beta|=2k}\partial_{t,x}^\beta \eta \partial_{t,x}^\beta w_1 \Big) \,{\rm d}x{\rm d}t\\ &+ \epsilon\int_0^T\!\!\!\int_{{\mathbb{T}}^d} \Big( v w_2 + \sum_{|\beta|=2k}\partial_{t,x}^\beta v \partial_{t,x}^\beta w_2 \Big) \,{\rm d}x{\rm d}t, \end{split} \end{equation} where $\widehat F$ is given by \eqref{DFfr1}. Let $(m_\epsilon, u_\epsilon)$ be the unique weak solution to \eqref{rpMFGfr1} given by (the analogue of) Theorem~\ref{MT}. Then, for $(\eta, v) \in \widehat {\mathcal{A}}_{\delta_0}\times {\mathcal{B}}$, we get \begin{equation}\label{fr1eq2} \left\langle {\widehat F}_{\epsilon} \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \geqslant 0. \end{equation} Fix $(\eta,v)\in \widehat{\mathcal{A}}_{\delta_0}\times {\mathcal{B}}$. Since $\eta\geqslant \delta_0>0$ and $m_\epsilon\geqslant \epsilon$, from Assumption~\ref{Hmono2}, we have \begin{equation}\label{fr1eq3} \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix} - {\widehat F} \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \geqslant 0. \end{equation} Therefore, by \eqref{fr1eq1}, \eqref{fr1eq2}, and \eqref{fr1eq3}, we obtain \begin{equation*} 0\leqslant \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix} - {\widehat F} \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \leqslant \left\langle {\widehat F}_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix} - {\widehat F}_{\epsilon} \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle \leqslant \left\langle {\widehat F}_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle. \end{equation*} Recalling $c_\epsilon$ given by \eqref{vanish1}, we get \begin{equation*} \left\langle {\widehat F}_{\epsilon} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle = \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle + c_\epsilon. \end{equation*} Combining H\"older's inequality with Corollary~\ref{aprisqrt}, we have $\lim_{\epsilon\to 0}c_\epsilon=0$. Therefore, applying (the analogue of) Lemmas~\ref{WCWS1} and \ref{Equtu}, for $(\eta,v)\in \widehat {\mathcal{A}}_{\delta_0}\times {\mathcal{B}}$, we have \begin{equation*} 0 \leqslant \lim_{\epsilon\to0} \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ u_\epsilon \end{bmatrix} \right\rangle +\lim_{\epsilon\to0} c_\epsilon = \lim_{\epsilon\to0} \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m_\epsilon \\ \tilde u_\epsilon \end{bmatrix} \right\rangle = \left\langle {\widehat F} \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ u \end{bmatrix} \right\rangle, \end{equation*} from which Theorem~\ref{frtm1} follows. \end{proof} \subsection{Density constraints} Finally, we show how to apply our methods to prove the existence of weak solutions to MFGs with density constraints. We consider the following MFGs with a density constraint. \begin{problem}\label{fr2} Let $T>0$ and $d\in {\mathbb{N}}$, and define $\Omega_T=(0,T)\times{\mathbb{T}}^d$. Let $X(\Omega_T)$ and ${\mathcal{M}}_{ac}(\Omega_T)$ be the spaces introduced in Problem~\ref{OP}. Fix $M>1$, $\epsilon \in (0,1)$, and $k \in {\mathbb{N}}$ such that $2k>\frac{d+1}{2} +3$. Assume that $a_{ij}\in C^2({\mathbb{T}}^d)$ for $1\leqslant i,j\leqslant d$, $V \in L^{\infty}(\Omega_T)\cap C(\Omega_T)$, $g\in C^1({\mathbb{R}}_0^+\times {\mathbb{R}})$, $h:{\mathcal{M}}_{ac}(\Omega_T)\to X(\Omega_T)$ is a (possible nonlinear) operator, $m_0, u_T\in C^{4k}({\mathbb{T}}^d)$, and $H\in C^2({\mathbb{T}}^d\times{\mathbb{R}}^d)$ are such that, for $x\in {\mathbb{T}}^d$, $A(x)=(a_{ij})$ is a symmetric positive semi-definite matrix, $0<m_0\leqslant M$, $\int_{{\mathbb{T}}^d}m_0(x)\, {\rm d}x=1$, and $m\mapsto g(m,h(\boldsymbol{m}))$ is monotone with respect to the $L^2$-inner product. Find $(m,u)\in L^1(\Omega_T)\times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying $0\leqslant m\leqslant M$ and \begin{equation*} \begin{cases} u_t + \sum_{i,j=1}^da_{ij}(x)u_{x_ix_j} - H(x,Du) +g(m,h(\boldsymbol{m})) + V(t,x)=0 & {\rm in}\ \Omega_T, \\[1mm] m_t - \sum_{i,j=1}^d(a_{ij}(x)m)_{x_ix_j}-\div\big(mD_pH(x,Du)\big) = 0 & {\rm in} \ \Omega_T, \\[1mm] m(0,x)=m_{0}(x),\enspace u(T,x)=u_T(x)& \rm{on}\ {\mathbb{T}}^d. \end{cases} \end{equation*} \end{problem} For density constraints, we define new function spaces for $m$ with the constraints. More precisely, we define the set \( \widehat{\mathcal{A}}_1:=\Big\{m\in \widehat{\mathcal{A}}\ \big|\ 0\leqslant m\leqslant M\Big\}, \) where $\widehat{\mathcal{A}}$ is given by \eqref{DAawh}. We introduce a notion of weak solutions similar to that in Definition~\ref{DOPWS1}. \begin{definition}\label{dwsfr2} A weak solution to Problem \ref{fr2} is a pair $(m,\tilde u) \in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ satisfying \begin{flalign} ({\rm G1})\enspace &\, 0\leqslant m\leqslant M \ \mbox{a.e.~in }\Omega_T, &\nonumber \\ ({\rm G2})\enspace & \left\langle F \begin{bmatrix} \eta \\ v \end{bmatrix}, \begin{bmatrix} \eta \\ v \end{bmatrix} - \begin{bmatrix} m \\ \tilde u \end{bmatrix} \right\rangle \geqslant 0 \quad \mbox{for all}\ (\eta, v)\in \widehat{\mathcal{A}}_1 \times {\mathcal{B}},&\nonumber \end{flalign} where, for $(\eta, v) \in H^{2k}(\Omega_T) \times H^{2k}(\Omega_T)$ fixed, $F[\eta, v]: L^1(\Omega_T) \times L^1(\Omega_T) \to {\mathbb{R}}$ is the functional given by \eqref{DRF2}. \end{definition} Under Assumptions~\ref{Hconv}--\ref{Hmono}, we obtain the following result. \begin{teo}\label{frtm2} Consider Problem~\ref{fr2} and suppose that Assumptions \ref{Hconv}--\ref{Hmono} hold. Then, there exists a weak solution $(m,\tilde u)\in L^1(\Omega_T) \times L^\gamma((0,T);W^{1,\gamma}({\mathbb{T}}^d))$ to Problem \ref{fr2} in the sense of Definition~\ref{dwsfr2}. \end{teo} \begin{proof}[Proof sketch] Define \({\mathcal{A}}_1:=\big\{m\in {\mathcal{A}}\ \big|\ 0\leqslant m\leqslant M\big\}\) and \({\mathcal{A}}_{1,0}:=\big\{m\in {\mathcal{A}}_0\ \big|\ 0\leqslant m +m_0\leqslant M\big\}\), where ${\mathcal{A}}$ and ${\mathcal{A}}_0$ are given by \eqref{DAa} and \eqref{DAa0} respectively. First, we consider the same regularized problem given in Problem~\ref{MP}. We use the notion of weak solution, $(m_\epsilon, u_\epsilon)$, to the regularized problem given by Definition~\ref{DMPWS1} with ${\mathcal{A}}$ replaced by ${\mathcal{A}}_1$. Since $u_T-u_\epsilon\in {\mathcal{B}}_0$ and $m_0\in {\mathcal{A}}_1$, Proposition~\ref{apriWS1} holds and thus Corollaries~\ref{apriDu1}--\ref{aprisqrt} also follow. Fix $(m_1, u_1)\in H^{2k-2}(\Omega_T) \times H^{2k-1}(\Omega_T) $ with $0\leqslant m_1+m_0\leqslant M$. Recall $I_{(m,u)}$ defined by \eqref{defImu} and $I_1=I_{(m_1, u_1)}$. Then, as the same argument in Section~\ref{VP}, we consider the following variational problem: \begin{equation}\label{fr2vp1} I_1[m]=\inf_{w\in {\mathcal{A}}_{1,0}}I_1[w]. \end{equation} Let $ \{w_n\}_{n=1}^\infty \subset {\mathcal{A}}_{1,0}$ be a minimizing sequence for \eqref{fr2vp1}. As in the proof of Proposition~\ref{EMVP1}, $ \{w_n\}_{n=1}^\infty $ is bounded in $H^{2k}(\Omega_T)$ and $w_n \rightharpoonup m$ weakly in $H^{2k}(\Omega_T) $ for some $m\in H^{2k}(\Omega_T) $, extracting a subsequence if necessary. Moreover, by Morrey's theorem and Rellich--Kondrachov theorem, $w_n \to m$ in $C^{2,l}(\overline\Omega_T)$ for some $l\in(0,1)$. Since $0 \leqslant w_n +m_0 \leqslant M$ and $w_n(0,x)=0$, we have $0\leqslant m+m_0\leqslant M$ and $m(0,x)=0$. Hence, $m\in {\mathcal{A}}_{1,0}$. Thus, from the proof of Proposition~\ref{EMVP1}, there exists a unique minimizer $m\in{\mathcal{A}}_{1,0}$ satisfying \eqref{fr2vp1}. Therefore, the results of Sections~\ref{VP}--\ref{BF} follow. Recalling the mapping $A$ given by \eqref{OpeA}, define $\widetilde {\mathcal{A}}_{1,0}=\{w\in H^{2k-2}(\Omega_T)\ |\ w(0,x)=0,\ 0 \leqslant w + m_0 \leqslant M \}$ and consider $A: \widetilde {\mathcal{A}}_{1,0}\times \widetilde{\mathcal{B}} \to \widetilde {\mathcal{A}}_{1,0}\times \widetilde{\mathcal{B}} $ defined, for $(m_1,u_1)\in \widetilde{\mathcal{A}}_{1,0}\times \widetilde{\mathcal{B}}_0$, by \begin{equation*} A \begin{bmatrix} m_1 \\ u_1 \end{bmatrix} := \begin{bmatrix} m_1^\ast \\ u_1^\ast \end{bmatrix}, \end{equation*} where $m_1^\ast \in {\mathcal{A}}_{1,0}$ is the unique minimizer to \eqref{fr2vp1} and $u_1^\ast \in {\mathcal{B}}_0$ is the unique solution to \eqref{BL1}. Because $\widetilde {\mathcal{A}}_{1,0}$ is convex and closed, the results in Section~\ref{PfMT1} (with the obvious modifications) hold, and thus, we prove Theorem~\ref{MT}. Let $(m_\epsilon, u_\epsilon) $ be the unique weak solution to Problem~\ref{MP} and recall $\tilde u_\epsilon$ given by \eqref{Defutild}. Then, as in the same proof of Lemma~\ref{WCWS1}, there exists $(m,\tilde u)\in L^1(\Omega_T)\times L^\gamma((0,T); W^{1,\gamma}({\mathbb{T}}^d))$ such that $(m_\epsilon, u_\epsilon)$ converges to $(m,\tilde u)$ weakly in $L^1(\Omega_T)\times L^\gamma((0,T);W^{1\gamma}({\mathbb{T}}^d))$. Since $0\leqslant m_\epsilon\leqslant M$ a.e.~in $\Omega_T$, we have $0\leqslant m\leqslant M$ a.e.~in $\Omega_T$. Also, Lemmas~\ref{PAm}--\ref{MORF} and \ref{Equtu} follow. Therefore, arguing as in the proof of Theorem~\ref{TOP}, we establish the existence of a solution of Problem \ref{fr2}. \end{proof} \bibliographystyle{plain} \def$'${$'$}
\section{Introduction} \label{intro} In recent years, deep learning has achieved great success in many areas of image research. Deep learning models need to be driven by a large amount of labeled data to achieve good results, for example, using a million-level number of images to train deep neural networks \cite{Ref1,Ref2}. However, collecting labeled samples is difficult for many tasks, which requires a lot of manpower, time, and cost. The remote sensing image classification task can prove this point. In practical applications, the acquisition of labeled data for remote sensing requires not only field investigation but also professional interpretation, which limits the quantity of available labeled samples. In contrast, unlabeled samples are easier to obtain and more numerous, therefore how to use the readily available data to improve the performance of model is an important research issue. \paragraph{} Semi-supervised learning is a machine learning method between supervised learning and unsupervised learning. In the case of a small number of labeled samples, semi-supervised learning avoids the problem of insufficient model generalization by introducing unlabeled samples. Unlabeled samples provide important information for the spatial distribution of the data, which helps the model to get better decision boundaries. Semi-supervised learning can use only one-tenth or less labeled data to achieve similar results as supervised learning algorithms. \paragraph{} Recently, semi-supervised learning algorithm is implemented by adding an unlabeled data loss term to the loss function. Pseudo-Label \cite{Ref3} takes the class corresponding to the maximum predicted probability as the true label of the unlabeled sample. However, Pseudo-Label does not use data augmentation, so the results obtained are limited. The earlier semi-supervised methods than Pseudo-Label will not be introduced here, the related overviews are mentioned in literature \cite{Ref4}. In the following, we mainly introduce semi-supervised learning methods with data augmentation. \paragraph{} Based on the smoothness assumption of the system input and output, a robust model gives a stable and smooth prediction when the input changes (such as shearing, rotation, etc.). The commonly used regularization method in supervised learning is data augmentation, which obtains lifelike training data by transforming the input without changing the class semantics \cite{Ref5}. Similarly, data augmentation can be applied to unlabeled samples, keeping the output consistentcy before and after augmentation. A teacher-student model inputs noisy samples into the student model, minimizing the prediction error between the teacher model and the student model \cite{Ref6}. Subsequently, the teacher-student model is extended based on the number of iterations to get better results. {$\rm \Pi$}-Model \cite{Ref7,Ref8} updates the prediction of the teacher model by exponential moving average (EMA), and Mean Teacher \cite{Ref9} updates the parameters of teacher model with EMA. However, the data augmentation of {$\rm \Pi$}-Model and Mean Teacher is relatively simple, and only random noise is added to the inputs and hidden layers. Virtual Adversarial Training (VAT) \cite{Ref10} defines the direction of disturbance in the most sensitive direction of the model. MixUp \cite{Ref11} linearly interpolates the inputs and labels of two different samples to obtain augmented samples and labels. MixMatch \cite{Ref12} uses the MixUp method to augment both labeled and unlabeled data, with pseudo-label predicted by the model as the label of unlabeled sample. Nevertheless, VAT and Mixmatch all employ fixed augmentation method for various datasets. UDA \cite{Ref13} is the latest research from google-research, which use AutoAugment \cite{Ref14} to perform data augmentation. AutoAugment is the best-performing data augmentation method. Following UDA, we also use AutoAugment to generate augmented samples. The details of AutoAugment will be introduced in section 2.4. Importantly, the semi-supervised methods introduced above do not add constraints on sample features during network training, resulting in unclear classification boundaries. \begin{figure} \centering \includegraphics[width=1.0\textwidth]{figure1.eps} \caption{Our semi-supervised learning method. The input contains labeled samples, unlabeled samples and augmented samples. The outputs of avg-pool \\ layer are the corresponding feature vectors of the input. PEDCC is the predefined evenly-distributed class centroids} \label{fig2} \end{figure} \paragraph{} In semi-supervised learning, the loss function consists of two parts: the loss of the labeled samples and the loss of the unlabeled samples. In the field of image classification for supervised learning, in order to get a better feature description, many loss functions have been proposed. The cross-entropy loss function is simple to implement and has good performance, but its feature distribution cannot reach the optimal state. By combining the positive and negative samples, Triplet loss \cite{Ref15} can increase the feature constraints and improve the model generalization, but it takes a long time to train the model. L-Softmax \cite{Ref16} and AM-Softmax \cite{Ref17} change the angle between the weights of the fully connected layer and the features, which makes the intra-class distribution more compact and the inter-class distribution more dispersed. By using predefined evenly-distributed class centroids (PEDCC) and adding the MSE loss between features on AM-Softmax, PEDCC-Loss \cite{Ref18} achieves the best recognition accuracy in CIFAR100, LFW and other datasets. Therefore, we use PEDCC-Loss on a small number of labeled samples and extends its idea to the loss of unlabeled samples. We use the maximum mean discrepancy (MMD) loss \cite{Ref19} to measure the distance between the feature distribution of unlabeled samples extracted by the model and the feature distribution of PEDCC. Therefore, the unlabeled sample feature distribution also satisfies the uniform distribution. Our method makes full use of the labeled samples and unlabeled samples to optimize decision boundaries. The overall diagram of our method is shown in Fig. \ref{fig2}. And the details of the overall diagram are described in section 3.1. \paragraph{} Our main contributions are as follows: \paragraph{} 1) The PEDCC is applied to semi-supervised learning. The features of the labeled sample are constrained to the class centroids by the loss function based on the PEDCC-Loss. Our experiments have demonstrated the effectiveness of PEDCC on a small number of labeled samples. \paragraph{} 2) By adopting AutoAugment data augmentation strategy, the loss function based on MMD is used to restrict the distribution of unlabeled samples to the distribution of PEDCC, and the KL divergence loss function is used to calculate the classification loss between unlabeled samples and augmented samples. The generalization performance of the model is improved by unlabeled samples and augmented samples. \paragraph{} 3) The conducted experiments show that our semi-supervised learning method achieve the best model prediction accuracy with 4000 labeled samples on CIFAR10 datasets and 1000 labeled samples on SVHN datasets. \section{Related work} \label{sec:1} In this section, we present the work related to the semi-supervised methods we employ. \subsection{PEDCC} For deep learning algorithms, the neural network's fitting ability can ensure the intra-class distance is small, but cannot ensure the inter-class distance is large enough. However, if the inter-class distance is small, the accuracy of classification will be reduced. PEDCC is proposed based on the hypersphere charge model \cite{Ref20}. Due to mutual exclusion of charges, in equilibrium, $n$ charges will be evenly distributed on the hypersphere, and the distance between points is the farthest. The purpose of the PEDCC algorithm is to generate $n$ center points that are evenly distributed on the $d$-dimensional hypersphere. $d$ is the feature dimension and $n$ is the number of classification categories. Taking the $n$ center points generated by PEDCC as the clustering center points of $n$ classes can ensure that the inter-class distance is sufficiently large. \subsection{PEDCC-Loss} PEDCC-Loss is a loss function based on PEDCC. Fig. \ref{fig1} visualize the feature distribution finally learned by the neural network using different loss functions. It shows that the features learned by PEDCC-Loss have the characteristics of small intra-class spacing and large inter-class spacing. The formulas for PEDCC-Loss are as follows: \begin{equation} \label{eq1} L_{PEDCC-AM}=-\frac{1}{N}\sum_{i} log{\frac{e^{{s\cdot}({\cos\theta_y}_i-m)}}{e^{{s\cdot}({\cos\theta_y}_i-m)}+\begin{matrix} \sum_{j=1,j\ne y_i}^c e^{{s\cdot}{\cos\theta_j}}\end{matrix}}} \end{equation} \begin{equation} \label{eq2} L_{PEDCC-MSE}=\frac{1}{2}\sum_{i=1}^N{\left \| x_i-{pedcc_y}_i \right \|}^2 \end{equation} \begin{equation} \label{eq3} L=L_{PEDCC-AM}+\lambda\sqrt[n]{L_{PEDCC-MSE}} \end{equation} where Eq.(\ref{eq1}) is the AM-Softmax loss function, and $s$ and $m$ are adjustable hyperparameters. Eq.(\ref{eq2}) is the MSE loss function, calculating the distance between the model extraction features and the predefined class features. As shown in Eq.(\ref{eq3}), PEDCC-Loss is obtained by adding the above two loss functions together, and $n$ is a hyperparameter which satisfies $n\ge1$. \begin{figure*} \begin{subfigure}{.32\textwidth} \centering \includegraphics[width=4cm]{figure2_a.eps} \caption{Softmax} \label{sf1} \end{subfigure} \begin{subfigure}{.32\textwidth} \centering \includegraphics[width=4cm]{figure2_b.eps} \caption{Center Loss} \label{sf2} \end{subfigure} \begin{subfigure}{.32\textwidth} \centering \includegraphics[width=4cm]{figure2_c.eps} \caption{PEDCC-Loss} \label{sf3} \end{subfigure} \caption{The feature distribution finally learned by the neural network using three different loss functions. For ease of visualization, the feature dimension is set to 2} \label{fig1} \end{figure*} \subsection{Maximum Mean Discrepancy (MMD)} The mean discrepancy is obtained by finding the continuous function $f$, calculating the mean value of the $f$-mapped samples, and computing the difference between the mean values of the two differently distributed samples. The goal of MMD is to find the function $f$ to maximize the mean discrepancy. As a test statistic, MMD can be used to calculate the distance between two distributions. Therefore. MMD can be used as a tool to determine whether the two distributions are the same. In practical applications, the MMD loss of a batch of data is defined as follows: \begin{equation} \label{eq4} \begin{split} \begin{aligned} MMD^2[F,p,q]=&\frac{1}{m(m-1)}\sum_{i\ne j}^m{k(x_i,x_j)} +\frac{1}{n(n-1)}\sum_{i\ne j}^n{k(y_i,y_j)}\\ &-\frac{2}{mn}\sum_{i,j=1}^{m,n}{k(x_i,y_j)} \end{aligned} \end{split} \end{equation} \begin{equation} \label{eq5} k(x,x')=exp(-\frac{\left \| {x-x'}^2 \right \|}{2\sigma^2}) \end{equation} where $F$ is the set of all functions $f$, $p$ and $q$ are two different distributions, $x$,$y$ are their corresponding samples. The batch sizes of two distributions are $m$ and $n$, and $\sigma$ is the parameter value of the Gaussian kernel function. \subsection{AutoAugment} Using reinforcement learning to search for the best augmentation strategy for a given dataset, AutoAugment improves the effect of manually designed data augmentation method. AutoAugment determines a search space, which consists of multiple sub-policies. Each sub-policy contains two image operations, and each operation has three parts: operation mode, probability, and amplitude. Due to the diversity of image operations, the entire search space has $(16\times11\times10)^{10}$ possibilities. By searching in the search space, AutoAugment finds the most suitable augmentation method for different datasets. For example, the augmentation strategy of CIFAR10 mainly includes color transformation. Meanwhile, the augmentation strategy of SVHN mainly includes geometric transformation. In addition, the augmentation strategy of CIFAR10 can be extended to the strategy of CIFAR100 dataset. \section{Method} In this section, we introduce our semi-supervised classification learning method. Our approach incorporates what are presented in the second section. \subsection{Overall framework} As shown in Fig. \ref{fig2}, we use labeled samples and unlabeled samples of a given dataset to train the image classification model. Our method first processes the datas{}et, performing data enhancement on the unlabeled sample $u$ to get $u'$. For different datasets, different enhancement strategies are used. The enhancement strategies include a variety of image operations such as rotation, histogram equalization, clipping, and so on. For a given number of classification categories, feature points that are evenly distributed over the hypersphere are generated using PEDCC algorithm. \paragraph{} The labeled samples $x$, the unlabeled samples $u$ and the enhanced samples $u'$ are input to the convolutional neural network in the same batch according to the specified numbers. The feature description vector of labeled samples $z_x$ and the feature description vector of unlabeled samples $z_u$ are obtained at the output of the pooling layer. The category prediction $p_{\theta}(y|x)$, $p_{\theta}(y|u)$, and $p_{\theta}(y|u')$ are obtained in the final output of the network. Subsequently, the calculation of the loss is performed. For the features of labeled samples $z_x$ and the features of unlabeled sample $z_u$, we add the mean square error loss and the MMD loss respectively, so that the distribution is similar to the PEDCC distribution. Based on the assumption of model-based smoothness, we minimize the KL divergence between the network’s prediction of unlabeled samples and augmented samples. Meanwhile, the AM-Softmax is used to constraint the difference between the predicted values of the labeled samples and the ground truth labels. Through multiple constraints, our algorithm makes full use of the sample to get a clear decision boundary between different classes. The loss function is described in details below. \subsection{Loss function} The loss function of our semi-supervised learning algorithm consists of two parts: the loss of the labeled samples and the loss of the unlabeled samples. Each part of the loss is not limited to a single loss. \subsubsection{Loss of labeled samples} Usually the loss of the labeled samples is obtained by calculating the error between the output and the ground truth value of the label. However, this constraint can’t ensure the distance of inter-class large enough and the distance of intra-class small enough. We first generate the feature vectors $z_{PEDCC}$ by PEDCC, and its dimension is $C\times D$, where $C$ is the number of classification categories and $D$ is the dimension of the feature vector of each class. Subsequently, the weight of the fully connected layer of the convolutional neural network is fixed to the value of $z_{PEDCC}$, and the weights and features are normalized. Therefore, when the feature vector satisfies a predefined features of a certain class, the output $p_{\theta}(y|x)=wz_x$ of the network is a one-hot vector. \paragraph{} Assuming that the number of labeled samples in a batch is $M$, we calculate the mean squared error between the feature vectors extracted by the neural network and the predefined centroid as the feature loss function: \begin{equation} \label{eq6} L_1=\frac{1}{M}\sum_{i=1}^M{\left \| {z_x}_i-{z_{pedcc_y}}_i \right \|}^2 \end{equation} where $i$ is the $i$-th sample in a batch, ${z_{PEDCC}}_y$ is selected from $z_{PEDCC}$ according to the ground truth label $y$, and the feature dimension of ${{z_{PEDCC}}_y}_i$ is $1\times D$. In addition, AM-Softmax is used to calculate the error between the predicted value of the labeled sample and the ground truth label: \begin{equation} \label{eq7} L_2=-\frac{1}{M}\sum_{i} log{\frac{e^{{s\cdot}({\cos\theta_y}_i-m)}}{e^{{s\cdot}({\cos\theta_y}_i-m)}+\begin{matrix} \sum_{j=1,j\ne y_i}^c e^{{s\cdot}{\cos\theta_j}}\end{matrix}}} \end{equation} where $\theta$ is the angle between the weights of the fully connected layer and the feature vectors, and $y_i$ is the real label corresponding to the $i$-th sample. $s$ and $m$ are adjustable hyperparameters. The loss of the labeled samples consists of the two losses above: \begin{equation} \label{eq8} L_{labeled}=\lambda_2L_2+\lambda_1\sqrt[n]{L_1} \end{equation} where $n$ is an adjustable hyperparameter that satisfies $n\ge1$, and $\lambda_2$ and $\lambda_1$ are used to regulate the relative magnitude between losses. \subsubsection{Loss of unlabeled samples} In the supervised learning, the generalization performance of the model is often improved by data augmentation, and the augmented sample shares the same label as the original sample. Similarly, data augmentation can be applied to unlabeled examples of semi-supervised learning. Before and after the augmentation, the predicted output of the unlabeled samples should be consistent. Data augmentation should generate augmented samples that are close to the actual samples, so it is not recommended to use augmented methods that have a large impact on the image, such as adding Gaussian noise. AutoAugment optimizes enhancement strategies for different datasets and learns the most effective enhancement methods for the original datasets. While the previous enhancement methods adopt fixed enhancement strategies for all datasets. \paragraph{} We use the optimal strategy of AutoAugment to perform data augmentation. Meanwhile, KL divergence is used as a loss function to constrain the distribution consistency between the enhanced samples output and the original samples output: \begin{equation} \label{eq9} L_3=\frac{1}{S}\sum_{i=1}^Sp_{\tilde{\theta}}(y|u_i)log\frac{p_{\tilde{\theta}}(y|u_i)}{p_{\theta}(y|{u_i}')} \end{equation} where $S$ is the number of unlabeled samples in a batch. Note that, $S$ is different from the number of labeled samples $M$ in Eq. (\ref{eq6}). $p_{\tilde{\theta}}(y|u_i)$ is the model output of the unlabeled sample, and $p_{\theta}(y|{u_i}')$ is the output of the augmented samples. Following VAT, $\tilde{\theta}$ and $\theta$ share the same value, while $p_{\tilde{\theta}}(y|u_i)$ does not participate in the backpropagation of the model parameters. \paragraph{} To further minimize the feature distribution of unlabeled samples and the predefined class centroids, we use the MMD as the loss function: \begin{equation} \label{eq10} \begin{split} \begin{aligned} L_4=&\frac{1}{S(S-1)}\sum_{i\ne j}^S{k({z_u}_i,{z_u}_j)} +\frac{1}{C(C-1)}\sum_{i\ne j}^C{k({z_{PEDCC}}_i,{z_{PEDCC}}_j)}\\ &-\frac{2}{SC}\sum_{i,j=1}^{S,C}{k({z_u}_i,{z_{PEDCC}}_j)} \end{aligned} \end{split} \end{equation} where the dimension of $z_u$ is $M\times D$ and the dimension of $z_{PEDCC}$ is $C\times D$. $k(\cdot,\cdot)$ is the Gaussian kernel function in Eq. (\ref{eq5}). The loss of the unlabeled samples consists of the two losses above: \begin{equation} \label{eq11} L_{unlabeled}=\lambda_3L_3+\lambda_4L_4 \end{equation} where $\lambda_3$ and $\lambda_4$ are used to regulate the relative magnitude between losses. \subsubsection{Final loss} In our approach, the final loss function of the network is the sum of the labeled samples loss and the unlabeled samples loss: \begin{equation} \label{eq12} L=\lambda_1\sqrt[n]{L_1}+\lambda_2L_2+\lambda_3L_3+\lambda_4L_4 \end{equation} \subsection{Network structure} The network structure we use is WideResNet \cite{Ref21}, which reduces the depth and increases the width. Compared to thin and deep ResNet, WideResNet can achieve better image classification accuracy. Table \ref{tab1} lists the specific parameters of the network structure we use. Unlike the previous networks, the weight of fully connected layer is fixed to the predefined evenly-distributed class centroids, and the dimension is $B\times D$. $B$ is the total number of labeled and unlabeled samples in a batch, and $D$ is the feature vectors dimension of each class centroid. \begin{table} \caption{Network structure adopted by our algorithm} \label{tab1} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} Group name&Output size& Block type=B(3,3) \\ \noalign{\smallskip}\hline\noalign{\smallskip} Conv1&$32\times32$&$[3\times3,16]$ \\ \specialrule{0em}{1pt}{1pt} Conv2&$32\times32$&$\left[ \begin{array}{l}3 \times 3,16 \times 2\\3 \times 3,16 \times 2\end{array} \right] \times 4$\\ \specialrule{0em}{2pt}{2pt} Conv3&$16\times16$&$\left[ \begin{array}{l}3 \times 3,32 \times 2\\3 \times 3,32 \times 2\end{array} \right] \times 4$\\ \specialrule{0em}{2pt}{2pt} Conv4&$8\times8$&$\left[ \begin{array}{l}3 \times 3,64 \times 2\\3 \times 3,64 \times 2\end{array} \right] \times 4$\\ \specialrule{0em}{1pt}{1pt} Avg-pool&$1\times1$&$[8\times8]$ \\ \specialrule{0em}{1pt}{1pt} Fully connected&-&- \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \section{Experiments} \subsection{Implementation details} The network structure used in our experiments is WideResNet with depth 28 and width 2. As shown in Table \ref{tab4}, we evaluated our semi-supervised learning algorithms on CIFAR10 \cite{Ref22} and SVHN \cite{Ref23} datasets. Both CIFAR10 and SVHN are benchmark image classification datasets. The total number of sample categories is 10 and the image resolution is $32\times 32$. \begin{table} \caption{Datasets details} \label{tab4} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} & CIFAR10 & SVHN \\ \noalign{\smallskip}\hline\noalign{\smallskip} Samples &50000 &73257 \\ Labeled samples &4000 &1000\\ Categories &10 &10 \\ Image Resolution &$32\times 32$ &$32\times 32$ \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{} In the experiment, we used 4000 labeled samples for CIFAR10 and 1000 labeled samples for SVHN. Note that, AutoAugment uses these labeled samples to find the optimal strategy for data enhancement. Therefore, the selection of labeled samples in our experiments is consistent with AutoAugment. For each unlabeled sample, 100 enhanced samples are generated by data augmentation. In one batch, there are 32 labeled samples, 160 unlabeled samples and the corresponding 160 augmented samples. The mode of network learning rate attenuation uses cosine decay. The initial learning rate is set to 0.03 on CIFAR10 and 0.05 on SVHN. The gradient descent method with momentum is used as the optimizer, and the momentum is set to 0.9. All experiments are performed on GTX 1080Ti GPU. \paragraph{} From Eq. (\ref{eq6}) to Eq. (\ref{eq12}), we can see that there are seven hyperparameters, $s$, $m$, $n$, $\lambda_1$, $\lambda_2$, $\lambda_3$, and $\lambda_4$ involved in our method. Among them, $s$, $m$, $n$, $\lambda_1$, $\lambda_2$ are included in PEDCC-Loss. Therefore, referring to the previous study [16], the value of $s$ is 7.5, the value of $m$ is 0.35. and the values of $n$, $\lambda_1$, and $\lambda_2$ are all 1. Meanwhile, $\lambda_3$ and $\lambda_4$ are used to balance the relative magnitude between different losses. In the following, we will discuss how to determine the values of $\lambda_3$ and $\lambda_4$. The details of the hyperparameter settings are shown in Table \ref{tab5}. \begin{table} \caption{The values of hyperparameter settings} \label{tab5} \centering \begin{tabular}{cccccccc} \hline\noalign{\smallskip} Hyperparameters &$s$ &$m$ &$n$ &$\lambda_1$ &$\lambda_2$ &$\lambda_3$ &$\lambda_4$ \\ \noalign{\smallskip}\hline\noalign{\smallskip} CIFAR10 &7.5 &0.35 &1 &1 &1 &400 &0.2 \\ SVHN &7.5 &0.35 &1 &1 &1 &1600 &0.04 \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \subsection{Experimental results} \subsubsection{Comparison with semi-supervised learning methods} We compare our method with some representative semi-supervised learning algorithms, using the same number of labeled samples and the same network structure. The average results obtained from three replicate experiments are shown in Table \ref{tab2}. Specifically, we compare our method with five semi-supervised learning methods and the supervised methods. The supervised methods use only labeled samples while a large number of unlabeled samples are not used during training. By comparing our methods with the supervised methods, the improvement is 15.36\% on Cifar10 dataset and 10.41\% on SVHN dataset. \begin{table} \caption{The test error rates of the existing algorithm on the CIFAR10 and SVHN data sets. Supervised means that only labeled samples are used.The results of Pseudo-Label, {$\rm \Pi$}-Model, Mean Teacher, VAT are reproduced in the study by Oliver et al \cite{Ref24}} \label{tab2} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} & CIFAR10(4k) & SVHN(1k) \\ \noalign{\smallskip}\hline\noalign{\smallskip} Supervised & 20.26 & 12.83 \\ Pseudo-Label & 17.78 &7.62 \\ {$\rm \Pi$}-Model & 16.37 & 7.19 \\ Mean Teacher & 15.87 & 5.65 \\ VAT & 13.86 & 5.63 \\ UDA &5.34 &3.41 \\ Ours &\textbf{4.90} &\textbf{2.42} \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{}Pseudo-Label \cite{Ref3}, {$\rm \Pi$}-Model \cite{Ref7}, Mean Teacher \cite{Ref9}, VAT \cite{Ref10} and UDA \cite{Ref13} are representative methods in the semi-supervised field. The details of these methods are described in Introduction. However, the loss function used in those methods can not make the feature distribution learned by network reach an optimal state. Our method use PEDCC, and use PEDCC-Loss for labeled samples, MMD for unlabeled samples to constrains the feature distribution learned by neural network to PEDCC. The dimension of the PEDCC is $10\times 128$ on both datasets. As shown in the table, our method achieves 95.10\% accuracy with 4000 labeled samples on CIFAR10 and 97.58\% accuracy with 1000 labeled samples on the SVHN dataset. Compared with the previous state-of-the-art model UDA, the improvement is 0.44\% and 0.99\% respectively. Our method optimizes the feature distribution of network learning, which improves the accuracy of classification recognition. It is worth mentioning that since the UDA experiment is implemented on google TPU, we run UDA source code three times in our experimental environment and the average results are shown in the table. \subsubsection{Ablation Study} In this section, we demonstrate the validity of the loss function we employed on the labeled and unlabeled samples based on the predefined class centroids. We performed ablation experiments on both datasets. The performance of the different loss functions is revealed by adding or removing the corresponding component. Specifically, we have adopted the following combinations of loss functions: \paragraph{} 1) Cross Entropy on labeled samples and KL divergence on unlabeled samples. \paragraph{} 2) PEDCC-Loss on labeled samples and KL divergence on unlabeled samples. \paragraph{} 3) PEDCC-Loss on labeled samples and the sum of KL divergence and MMD on unlabeled samples. \begin{table} \caption{Test error rate of different loss functions on CIFAR10 and SVHN datasets} \label{tab3} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} Ablation & CIFAR10(4k) & SVHN(1k) \\ \noalign{\smallskip}\hline\noalign{\smallskip} \tabincell{c}{Cross Entropy on labeled and KL divergence \\ on unlabeled} &5.45 &2.98 \\ \tabincell{c}{PEDCC-Loss on labeled and KL divergence \\ on unlabeled} &4.95 &2.62 \\ \tabincell{c}{PEDCC-Loss on labeled and the sum of \\ KL divergence and MMD on unlabeled} &4.53 &2.48 \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \paragraph{} By comparing the second combination with the first way, the performance improvement brought by PEDCC-Loss is demonstrated. In the same way, by comparing the second combination with the third way, the performance improvement brought by the MMD is revealed. Note that PEDCC-Loss is the sum of the first two terms in Eq. (\ref{eq12}). The results of different combinations are given in Table \ref{tab3}. Obviously, it is effective to predefine the class centroids and apply PEDCC-Loss on a small number of labeled samples. Compared with the cross-entropy loss, the error rate of PEDCC-Loss decreased from 5.45\% to 4.95\% on the CIFAR10 dataset, and on the SVHN dataset the error rate decreased from 2.98\% to 2.62\%. By adding the MMD constraint, the distribution of the unlabeled samples approaches the uniform distribution, and the error rates on the two datasets can be reduced by 0.42\% and 0.14\% respectively. \subsubsection{Effect of $\lambda_3$ and $\lambda_4$} \begin{table} \caption{Effect of $\lambda_3$ and $\lambda_4$ on CIFAR10} \label{tab6} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} $\lambda_3$ &$\lambda_4$ &TER(\%) \\ \noalign{\smallskip}\hline\noalign{\smallskip} 400 &0.1 &4.85 \\ \textbf{400} &\textbf{0.2} &\textbf{4.53} \\ 400 &0.4 &5.33 \\ 200 &0.2 &5.27 \\ 600 &0.2 &5.15 \\ \noalign{\smallskip}\hline \end{tabular} \end{table} \begin{table} \caption{Effect of $\lambda_3$ and $\lambda_4$ on SVHN} \label{tab7} \centering \begin{tabular}{ccc} \hline\noalign{\smallskip} $\lambda_3$ &$\lambda_4$ &TER(\%) \\ \noalign{\smallskip}\hline\noalign{\smallskip} 1600 &0.02 &2.48 \\ \textbf{1600} &\textbf{0.04} &\textbf{2.34} \\ 1600 &0.08 &2.97 \\ 800 &0.04 &2.79 \\ 2400 &0.04 &2.84 \\ \noalign{\smallskip}\hline \end{tabular} \end{table} The impact of $\lambda_3$ and $\lambda_4$ on the classification results on CIFAR10 dataset is shown in Table \ref{tab6}. First, we fix the value of $\lambda_3$ to 400 and the values of $\lambda_4$ are set to 0.1, 0.2, and 0.4 respectively. Correspondingly, the test error rates (TER) are 4.85\%, 4.53\%, and 5.33\%. Therefore, the optimal value of $\lambda_4$ is determined as 0.2. Based on this result, we fix the value of $\lambda_4$ to 0.2 and the values of $\lambda_3$ are set to 200, 400, and 600 respectively. Correspondingly, the test error rates are 5.27\%, 4.53\%, and 5.15\%. Obviously, the algorithm obtains the optimal value when the value of $\lambda_3$ is 400 and the value of $\lambda_4$ is 0.2. \paragraph{}Similarly, on SVHN dataset, when the value of $\lambda_3$ is 1600 and the value of $\lambda_4$ is 0.04, the algorithm achieves the optimal result, and the test error rate is 2.34\%. The impact of $\lambda_3$ and $\lambda_4$ on SVHN dataset is shown in Table \ref{tab7}. \section{Conclusions} In this paper, we apply the PEDCC to semi-supervised learning. Unlike other semi-supervised methods, our method add feature constrains using the corresponding loss functions. Therefore, our method ensures that the inter-class distance is large and the intra-class distance is small to improve the accuracy of classification. Since the final loss function consists of multiple items, we experimentally find the optimal settings for parameters. Additionally, the performance gains of PEDCC on labeled and unlabeled samples are demonstrated separately through ablation experiments. At the same time, our method achieves the state-of-the-art performance on the CIFAR10 and SVHN datasets, using 4000 labeled samples and 1000 labeled samples respectively. In principle, the effect of data augmentation is directly related to the final performance of semi-supervised learning. The data augmentation strategy we use is AutoAugment, which is currently the best performing data augmentation algorithm. Our method mainly adds feature constraints through different loss functions. However, we have not improved the existing data augmentation strategies. Therefore, the improvement of data augmentation methods will be studied in the future.
\section{\label{sec:level1}Introduction} Squeezed states, in which squeezing is distributed to a set of independent optical modes, constitute an important quantum resource in the field of continuous-variable quantum information technology \cite{Braunstein2005b}, as for example, one-way quantum computation \cite{Menicucci2006}, and quantum communication \cite{Furusawa1998}. Besides, multimode squeezed light is a promising tool in metrological applications, in particular for multi-parameter estimation with quantum enhanced sensitivity \cite{Pinel2012,Gessner2018}. Examples include quantum imaging via spatially multimode squeezing \cite{Embrey2015,Kolobov2007}, and quantum improved synchronization of distant clocks exploiting temporal/spectral multimode squeezed light \cite{Lamine2008}. The aforementioned wide range of potential applications are closely linked to the ever-increasing ability to generate, control, and detect multimode quantum light, thanks to the development of optical technologies such as spatial light modulators, optical frequency combs, multi-pixel detectors, to name a few. Squeezed light is commonly obtained from parametric down conversion (PDC) in a second-order nonlinear crystal placed inside an optical cavity, a so-called optical parametric oscillator (OPO). The optical cavity enhances the nonlinear interaction as well as it confines the squeezed light to a single spatial mode. Multimode squeezing has been produced by exploiting different degrees of freedom of light such as temporal/spectral \cite{Roslund2013}, spatial \cite{Treps2003}, and orbital angular momentum \cite{Lassen2009}. However, the OPO resonator limits the squeezing bandwidth to the resonator bandwidth. A promising alternative to produce broadband multimode squeezing is a single-pass PDC source, pumped with a pulsed laser which features an optical frequency comb in the frequency domain \cite{Wasilewski2006}. The single-pass design with a pulsed pump ensures that squeezing sustains at every pulse of the PDC output \cite{Wenger2004, Slusher1987}. Nonlinear waveguide based single-pass PDC sources are interesting to obtain high level of squeezing due to tight confinement of light \cite{Eto2011}. However, waveguide-based designs traditionally suffer from high loss that deteriorates the purity of the generated squeezed state \cite{Lenzini2018}. Furthermore, most of the existing studies on single-pass PDC sources, to the best of our knowledge, only followed a single-mode approach to characterize the generated squeezed light. In this study, we report multimode analysis of a single-pass source of broadband squeezed light based on a type I PDC process inside a bulk nonlinear crystal, in a non-collinear configuration. This particular design of our source leads to the fact that the generated squeezed light exhibits multimode features in both spatial and temporal/spectral degrees of freedom. To characterize the spatiotemporal multimode feature, we implement a homodyne detection in which the local oscillator (LO) is shaped both spatially and temporally. Finally, we construct covariance matrices from the results of the homodyne measurement and perform eigenvalue decomposition of the measured covariance matrices, providing a definite proof for multimode squeezing. \section{Theoretical model} \label{sec:TheoMod} A theoretical analysis of a single-pass pulsed optical parametric amplifier in the temporal domain is reported in \cite{Wasilewski2006,Patera2009}, where the temporal modes in a waveguide are considered. In our case, we employ a bulk crystal where the spatial modes are not fixed by the waveguide geometry and, therefore, spatiotemporal coupling effects become important \cite{Gatti2009}. It is convenient to consider the fields in the Heisenberg picture and in the slowly varying envelope approximation: \begin{equation} \hat{E}^{(+)}_{s,p}\left(\vec{x},z,t\right)=iE_0\int\frac{\mathrm{d}\vec{q}}{2\pi}\frac{\mathrm{d}\Omega}{2\pi}\hat{a}_{s,p}\left(\vec{q},z,\Omega\right)e^{i\left(\vec{q}\cdot\vec{x}-\left(\omega_{s,p}+\Omega\right)t\right)} \end{equation} where the indices $s$ and $p$ indicate, respectively, the down converted field (oscillating at a central angular frequency of $\omega_s$) and the pump of the process (with a central angular frequency of $\omega_p=2\omega_s$). The creation operator can be written in the slowly varying envelope approximation: $\hat{a}_{s,p}\left(\vec{q},z,\Omega\right)=\hat{A}_{s,p}\left(\vec{q},z,\Omega\right)e^{ik_z(\vec{q},\Omega)}$ with $\hat{A}$ being the slowly varying envelope operator and $k_z(\vec{q},\Omega)=\sqrt{k(\omega_s+\Omega)-\left|\pvec{q}\right|^2}$ being the projection of the wave vector along the propagation axis $z$. The coordinates of interest are $\Omega$, the detuning from the central frequency $\omega_s=\omega_p/2$, and $\vec{q}$, the transverse wave-vector that corresponds to the position vector $\vec{x}$ in the Fourier plane of a lens. Usually being an intense coherent beam, and in the small pump depletion limit, the pump can be treated classically and the operator can be replaced by its mean value, $\hat{A}_p(\vec{q},z,\Omega)\rightarrow A_p(\vec{q},z,\Omega)$. The gain of the process is proportional to the non-linear susceptibility $\chi^{(2)}$, to the pump peak amplitude $\alpha_p$, and to the length of the crystal $\ell_c$, $g\propto \chi^{(2)}\alpha_p\ell_c$. As shown for example in \cite{Caspani2010}, in the low gain regime we can write the amplifier input-output relation: \begin{equation} \label{eq:Amplifier} \begin{aligned} \hat{A}_{s}^{\mathrm{out}}(\vec{q},\Omega)&=\hat{A}_{s}^{\mathrm{in}}(\vec{q},\Omega)+\\ &g\int\frac{\mathrm{d}\pvec{q}'}{2\pi}\frac{\mathrm{d}\Omega'}{\sqrt{2\pi}}\mathcal{K}(\vec{q},\Omega,\pvec{q}',\Omega')\hat{A}_{s}^{\mathrm{in}\dagger}(\pvec{q}',\Omega') \end{aligned} \end{equation} where the kernel $\mathcal{K}$ is given by: \begin{equation} \label{eq:kernel} \mathcal{K}(\vec{q},\Omega,\pvec{q}',\Omega')=A_p(\vec{q}+\pvec{q}',\Omega+\Omega')\mathrm{sinc}\left(\frac{\Delta(\vec{q},\pvec{q}',\Omega,\Omega')\ell_c}{2}\right). \end{equation} Here, $A_p$ is the Fourier transform of the spatiotemporal profile of the pump and $\Delta$ is the wavevector mismatch along the pump propagation direction $z$: \begin{equation} \Delta(\vec{q},\pvec{q}',\Omega,\Omega')=k_{sz}(\vec{q},\Omega)+k_{sz}(\pvec{q}',\Omega')-k_{pz}(\vec{q}+\pvec{q}',\Omega+\Omega') \end{equation} In our case of negative uniaxial crystal, the signal experiences the ordinary index $n_\mathrm{o}$ while the pump encounters the extraordinary index $n_\mathrm{ext}$, which depends on its orientation with respect to the optical axis of the nonlinear crystal: \begin{equation} \begin{aligned} k_s(\Omega)&=n_\mathrm{o}(\omega_0+\Omega)(\omega_0+\Omega)/c\\ k_p(q_y,\Omega)&=n_\mathrm{ext}(\theta_0+q_y/k_p(0,0),2\omega_0+\Omega)(2\omega_0+\Omega)/c \end{aligned} \end{equation} where $\theta_0$ is the angle between the optical axis and the pump propagation axis in the perfect phase matching condition for the desired non-collinear angle. Applying an eigenvalue decomposition to the matrix obtained by discretizing the kernel in equation \eqref{eq:kernel}, the description of the problem simplifies \cite{Bennink2002}, and if the kernel is complex a Takagi decomposition can be used \cite{Arzani2018}. Considering the initial field $\hat{A}_{s}^{\mathrm{in}}$ as a linear combination of the eigenmodes, $S_k(\vec{q},\Omega)$, of the integral operator related to the kernel: \begin{equation} \hat{A}_{s}^{\mathrm{in}}(\vec{q},\Omega)=\sum_kS_k(\vec{q},\Omega)\hat{a}_k, \end{equation} we simplify the equation of the amplifier, Eq. \eqref{eq:Amplifier}, as follows: \begin{equation} \label{eq:Aout} \hat{A}_{s}^{\mathrm{out}}=\sum_kS_k(\vec{q},\Omega)\left(\hat{a}_k+g\Lambda_k\hat{a}_k^{\dagger}\right) \end{equation} where $\Lambda_k$ is the corresponding eigenvalue. The quadratures of the eigenmodes are then independently squeezed with a squeezing parameter proportional to $g\Lambda_k$: \begin{equation} \label{eq:QuadSqz} \hat{X}^{\mathrm{out}}_k=\left(1+g\Lambda_k\right)\hat{X}^{\mathrm{in}}_k,\quad\hat{P}^{\mathrm{out}}_k=\left(1-g\Lambda_k\right)\hat{P}^{\mathrm{in}}_k \end{equation} A detailed simulation of the spatio-temporal modes of a single-pass squeezer is shown in \cite{LaVolpe2019}. In our experiment as detailed in the following sections, we attempt to probe the spatiotemporal eigenmodes, $S_k(\vec{q},\Omega)$, as well as the corresponding squeezing parameter $2g\Lambda_k$ of our single-pass source by employing a homodyne detection with a spatial and temporal shaping of the local oscillator. \section{Experimental set-up} \label{sec:Exset-up} A scheme of the experimental set-up is shown in figure \ref{fig:exset-up}. \begin{figure}[htbp] \centering\includegraphics[width=.7\linewidth]{ExSetupNewCut \caption{\label{fig:exset-up} Experimental set-up. In the figure we indicate the image plane and the Fourier plane for the signal and idler beams which are collimated by two identical lenses of \SI{200}{\milli\metre} focal length. The distance from the homodyne (HD) beam splitter and the Fourier plane corresponds to the distance of the cut plane from the HD beamsplitter in the LO path. } \end{figure} A titanium:sapphire (Ti:Sa) femtosecond oscillator, delivering \SI{22}{\femto\second} pulses at a repetition rate of \SI{156}{\mega\hertz}, constitutes the main frequency comb with a spectral FWHM of \SI{43}{\nano\metre} centred at \SI{795}{\nano\metre}. At the laser output, the pulses are separated by a beam splitter and 40$\%$ of the laser power is reserved for the LO while the rest is sent to the squeezer. A \SI{1}{\milli\metre} long bismuth-triborate (BiBO) crystal generates the pump for the PDC process, centered at a wavelength of \SI{397.5}{\nano\metre} with a spectral FWHM of \SI{1.82}{\nano\metre}, by frequency doubling the Ti:Sa pulses. The pump power is subsequently increased by a factor of seven using a synchronous cavity so that \SI{120}{\milli\watt} (0.77 nJ energy per pulse) are oscillating inside the linear cavity when it is locked with a Pound-Drever-Hall mechanism in transmission. The synchronous cavity also allows to clean the transverse profile of the pump beam. The PDC crystal is placed at the waist (\SI{49}{\micro\metre}) of the cavity. We choose a \SI{2}{\milli\metre} long beta barium borate (BBO) as the nonlinear crystal which is set to optimize the type I PDC in the non-collinear configuration. The angle between the pump and the down converted beam is fixed at \ang{1.8} such that the down converted photons can be collected without passing through the cavity end-mirror to avoid losses. At the PDC output we get two beams which are then combined on a 50-50 beam splitter \cite{Wenger2005}. Finally, we implement a homodyne detection scheme in one of the beam splitter outputs to measure the quadratures. By shaping the temporal and spatial profiles of the LO we are able to analyse the amount of squeezing in each spatiotemporal mode and we can demonstrate the multimodal aspect of the source. For the temporal shaping of the LO we use a pulse shaper based on a $792\times 600$ spatial light modulator (SLM) in a $4f$ line. A periodic saw-tooth grating is applied for each wavelength of the \SI{43}{\nano\metre} FWHM spectrum. The groove depth and position allow to control respectively the amplitude and phase for each spectral component \cite{Vaughan2005}. For the spatial shaping, we cut the beam at half power with a razor blade into left-cut (L) and right-cut modes (R), which are by construction orthogonal modes. As shown in figure \ref{fig:exset-up}, the distances from the homodyne beamspliter to the cut plane in the LO path and the Fourier plane of the squeezed beam are equal. In this way, the LO cut plane corresponds to the Fourier plane of the squeezed light beam. \section{Measurements} Our first goal is to measure the amount of squeezing in different temporal/spectral as well as spatial modes. It is known that the temporal/spectral squeezed modes of the pulsed PDC process closely resemble Hermite-Gaussian (HG) modes if the spatiotemporal coupling is neglected \cite{Wasilewski2006,Patera2009}. Therefore, we implement different HG pulse shapes on the LO, thanks to the pulse-shaper in the LO path. We observe squeezing for the first four HG modes, where the first one, $\text{HG}_{0}$, has a spectral FWHM of \SI{15}{\nano\metre}. Figures \ref{fig:MMSqz}\textbf{a} and \ref{fig:MMSqz}\textbf{b} show the spectral profile of the LO for the \text{0th}- ($\text{HG}_0$) and \text{1st}-order HG mode ($\text{HG}_1$), respectively. The traces in figures \ref{fig:MMSqz}\textbf{c} and \ref{fig:MMSqz}\textbf{d} report the noise variance of the homodyne signal, respectively, for $\text{HG}_0$ and $\text{HG}_1$ mode as a function of time while scanning the LO phase. The squeezing spectra are recorded with a spectrum analyser at a sideband frequency of \SI{10}{\mega\hertz} with a \SI{100}{\kilo\hertz} resolution bandwidth and \SI{30}{\hertz} video bandwidth, meaning that the measured squeezing is averaged over 15 pulses. \begin{figure}[htbp] \centering\includegraphics[width=.7\linewidth]{MultimodeSqz2modes \caption{\label{fig:MMSqz} \textbf{a} and \textbf{b} Spectral amplitude of the first two Hermite-Gaussian (HG) modes as measured by a spectrometer. \textbf{c} and \textbf{d} variance of the homodyne signal as a function of time while sweeping the phase of the LO at \SI{300}{\milli\hertz} for, respectively, the 0th- and the 1st-order HG mode. The solid purple and the green line indicate the average value of squeezing and anti-squeezing, respectively.} \end{figure} The amount of squeezing is \SI{-0.35\pm 0.03}{\decibel} in the $\text{HG}_0$ case, \SI{-0.25\pm 0.04}{\decibel} for $\text{HG}_1$, and it reduces to lower values for the higher order modes as expected from theory \cite{Horoshko2019}, so that we find \SI{-0.19\pm 0.05}{\decibel} for $\text{HG}_2$ and \SI{-0.19\pm 0.06}{\decibel} $\text{HG}_3$. The reason behind this low squeezing, compared to the existing studies of single-pass sources, is due to the limited pump pulse energy as well as not so tight confinement of the pump beam. In order to analyse multimode squeezing in the spatial domain, the LO beam is cut into two orthogonal modes, L and R. The homodyne traces for the whole beam and the half-cut beams are shown in figure \ref{fig:Razorcut} with the corresponding spatial shape of the beam at the homodyne beam splitter in the insets. In these measurements, the $\text{HG}_0$ temporal mode is chosen for the LO. We find that both the half-cut modes are squeezed, \SI{-0.18\pm 0.04}{\decibel} for mode L and \SI{-0.11\pm 0.04}{\decibel} for mode R, though less compared to the whole beam, which is at \SI{-0.26\pm 0.04}{\decibel}. \begin{figure}[htbp] \centering\includegraphics[width=.7\linewidth]{RazorCut \caption{\label{fig:Razorcut} Variance of the homodyne signal versus time with a linear ramp of the LO phase for different spatial modes: \textbf{a} the whole beam, which can be seen as the sum of the other two modes, \textbf{b} the left-cut mode (L), and \textbf{c} the right-cut mode (R). The spatial shape of the mode, recorded with a CCD camera close to the homodyne beam splitter position, is shown in the inset of each sub-figure. The solid purple and the green line indicate the average value of squeezing and anti-squeezing,respectively.} \end{figure} \subsection{Covariance matrix analysis} Finally, we follow a covariance matrix approach to disclose the underlying independent squeezed modes, to unequivocally validate the multimode nature of the generated squeezed light \cite{Opatrany2002,Fabre2020}. The covariance matrix $\bm{V}$ is made of four blocks: \begin{equation} \bm{V}=\begin{bmatrix} \bm{V^X}&\bm{V^{XP}}\\ \left(\bm{V^{XP}}\right)^T&\bm{V^P} \end{bmatrix} \end{equation} where $V^X_{ij}=\langle\hat{X}_i\hat{X}_j\rangle$, $V^P_{ij}=\langle\hat{P}_i\hat{P}_j\rangle$ and $V^{XP}_{ij}=\frac{\langle\hat{X}_i\hat{P}_j\rangle+\langle\hat{P}_j\hat{X}_i\rangle}{2}$. Here $\hat{X}_i$ and $\hat{P}_i$ indicates the quadratures of the squeezed state related to the i-th mode of the LO basis. With this notation the diagonal elements of the covariance matrix report the variance of the X quadrature, $\langle\hat{X}_i^2\rangle$ or the P quadrature $\langle\hat{P}_i^2\rangle$ which are both equal to unity if the i-th mode is in a vacuum state. The off-diagonal elements represent the quantum correlations between the X or P quadratures related to different mode of the LO basis. A Bloch-Messiah decomposition of the covariance matrix gives a basis of eigenmodes whose quadratures are not correlated. If, in this basis, there exist more than one eigenvalue, which are different from 1 (the variance of the vacuum state), then the generated state of light can be genuinely labelled as a multimode \cite{Fabre2020}. Our measurement set up does not allow us to measure the correlations between the X and P quadratures of the modes i.e. the $\bm{V^{XP}}$ block. Correlations could be observed between the X and P quadratures if the pump was complex at the center of the crystal, however, in our case, the chirp acquired by the pump can be neglected and thus we can neglect this block of the covariance matrix. We therefore consider only the $\bm{V^X}$ (X block) and $\bm{V^P}$ (P block) and diagonalize them separately. The quadrature variances of each squeezed mode are extracted from the corresponding homodyne trace. We relate the averaged maxima and minima of the homodyne trace to $\langle\hat{P}_i^2\rangle$ and $\langle\hat{X}_i^2\rangle$, respectively. To find the off diagonal elements of each block, we consider the following relation: \begin{equation} \langle\hat{X}_i\hat{X}_j\rangle=\frac{\langle\hat{X}_i+\hat{X}_j\rangle^2}{\sqrt{2}}-\frac{\langle\hat{X}_i\rangle^2}{2}-\frac{\langle\hat{X}_j\rangle^2}{2} \end{equation} where $\langle\hat{X}_i+\hat{X}_j\rangle^2$ is extracted from the homodyne measurement with a local oscillator in $(\text{HG}_i + \text{HG}_j)$ mode. In this way, all the elements of the X and the P block of the covariance matrix are measured. \subsubsection{Temporal domain} We first report the results of the covariance matrix analysis in the temporal/spectral domain. In figure \ref{fig:ExpCohTempo} the X and the P block in the basis of the first four HG modes are shown on the left. For clarity, we remove the identity (the vacuum contribution) from the X and P blocks. These two matrices are independently diagonalized and their eigenvalues are shown on the right of figure \ref{fig:ExpCohTempo}. \begin{figure}[htbp] \centering\includegraphics[width=.7\linewidth]{CovarianceO \caption{\label{fig:ExpCohTempo} Measured X and P blocks of the covariance matrix in the basis of the first four Hermite-Gaussian modes : $\lbrace\mathrm{HG}_0,\mathrm{HG}_1,\mathrm{HG}_2,\mathrm{HG}_3\rbrace$ in the temporal/spectral domain. On the right the eigenvalues for each block are reported, $S_0$, $S_1$, $S_2$ and $S_3$ are the relative eigenvectors.} \end{figure} As shown in figure \ref{fig:ExpCohTempo}, there are more than one eigenvalues that have an absolute value higher than 1 for the P block and lower than 1 for the X block, validating the multimode feature of the generated squeezed light. As can be seen from the eigenvalues, their absolute value is higher for the P block eigenvalues (anti-squeezing) than for the X block eigenvalues (squeezing). This means that even in this diagonal basis the state is not pure. A reduced purity can be caused by losses in the experimental measurement or by an imperfect spatial or temporal overlap. Since in a single-pass squeezing source the losses can be neglected, then this reduced purity is probably due to a imperfect spatial overlap in this case. The large errors on the eigenvectors, unfortunately, do not allow us to infer the exact shape of the eigenmodes related to the eigenvalues. This is probably because the HG basis is close to the eigenmode basis, as can be seen from the X and P blocks in figure \ref{fig:ExpCohTempo}. As a result, the relative errors on the off-diagonal elements of the blocks become quite high, thus increasing the errors on the eigenvectors. Nevertheless, as can be seen from the right part of figure \ref{fig:ExpCohTempo}, the error bars on the eigenvalues are low enough to claim that the system is truly multimode in temporal domain. \subsubsection{Spatial domain} As in the temporal case, we analyse the spatial properties of our system through the covariance matrix with the basis of L and R modes. It is interesting to point out that we can record a covariance matrix in this spatial mode basis for each of the temporal mode that we used in the time domain analysis. We have then four different two-dimensional spatial covariance matrices in the L and R mode basis related to each temporal/spectral mode. In figure \ref{fig:ExpCovSpace}, we present the X and P blocks of the spatial covariance matrices related to each temporal mode $\text{HG}_i$. Right to the X and P blocks, the eigenvalues and eigenvectors for each matrix are reported. \begin{figure}[htbp] \centering\includegraphics[width=1.0\linewidth]{CovarianceHoriDiffSpectraOSA.eps \caption{\label{fig:ExpCovSpace} Measurement of the X and P blocks of the covariance matrix in the basis of the left and right-cut modes: $\lbrace L,R\rbrace$ in the spatial domain. We report the X and P blocks together with the eigenvalues and eigenvectors in this spatial mode basis for each different Hermite-Gaussian temporal mode.} \end{figure} For each of the temporal mode, we find that both the spatial modes are squeezed and, interestingly, the distribution of squeezing changes with the temporal modes. This is linked to the spatiotemporal coupling effect as explained in the theory section. To the best of our knowledge this is the first experimental measurement of the quadrature correlations in the spatial domain related to different time-frequency modes. The error bars on the eigenvectors are too big to infer the exact shape of the squeezed modes. Nonetheless, for each temporal mode, we can see that the second eigenvector (the one related to the lowest eigenvalue) has always a $\pi$ phase shift between the left and the right part of the beam, while the first one does not. This indicates that the first squeezed mode in the spatial domain is a $TEM_{00}$ while the second is a flip-mode \cite{Treps2003}, and interestingly this feature is valid for every temporal/spectral mode. These measurements demonstrate that our source is multimode also in the spatial domain. However, it does not necessarily mean that the system has only two spatial squeezed modes. In fact, the number of detected eigenmodes is limited by the capabilities of our spatial mode shaping. In order to completely unveil the spatial distribution of squeezing, for example, a supplementary spatial-light modulator could be included in the LO path. \section{Conclusion and perspective} \label{sec:Perp} In this study, we present a single-pass source of multimode squeezed light based on a non-collinear type I PDC process, pumped with an optical frequency comb. Though single-pass squeezing was already observed long ago, its multimodal nature was never experimentally demonstrated in the continuous variable domain. In this paper, we showed that we can measure the amount of squeezing in different temporal modes as well as in different spatial modes. Furthermore, we adopt a covariance matrix based approach to find the principal squeezed modes both in temporal and spatial domain, that serves up a clear signature of the multimodal behavior of our source. An interesting perspective for this source concerns the generation of a dual-rail cluster state, which has been shown to be a good candidate for quantum information\cite{Chen2014}. As clear from figure \ref{fig:exset-up}, the non-collinear configuration of our source allows, in principle, to put an inter-pulse delay between the signal and the idler pulses before recombining them on the beam splitter. The state generated in this way would be a large-scale dual-rail cluster state as reported in ref. \cite{Yokoyama2013}. Another exciting perspective of the present source with a seed beam is that it would be possible to generate bright beams, when seeding the PDC, with entangled temporal properties as demonstrated in the spatial domain \cite{Wagner2008}. \section*{Acknowledgments} This work is supported by the French National Research Agency project SPOCQ and the European Union Grant QCUMbER (no. 665148). N.T. acknowledges financial support of the Institut Universitaire de France. V.P. acknowledges financial support from the European Research Council under the Consolidator Grant COQCOoN (Grant No. 820079). Luca La Volpe and Syamsundar De contributed equally to this work.
\section{Introduction} \label{sec:intro} Modular equations encode the presence of isogenies between polarized abelian varieties. An example is given by the elliptic modular polynomial~$\Phi_\ell$, where~$\ell$ is a prime: this bivariate polynomial vanishes on the $j$-invariants of $\ell$-isogenous elliptic curves \cite[§11.C]{cox_PrimesFormNy2013}, and can be used to detect and compute such isogenies \cite{elkies_EllipticModularCurves1998}. Elliptic modular polynomials are used for instance in the SEA algorithm to count points on elliptic curves over finite fields~\cite{schoof_CountingPointsElliptic1995}, and in multi-modular methods to compute class polynomials of imaginary quadratic fields~\cite{sutherland_ComputingHilbertClass2011}; being able to compute isogenies also has applications in cryptography. Analogues of~$\Phi_\ell$ for principally polarized abelian surfaces, called Siegel and Hilbert modular equations in dimension~$2$, have recently been defined and computed~\cite{milio_QuasilinearTimeAlgorithm2015,milio_ModularPolynomialsHilbert2020,martindale_HilbertModularPolynomials2020}, and are of similar interest. In the first part of this paper, we define modular equations in the general setting of PEL Shimura varieties of finite level; these varieties are moduli spaces for abelian varieties with polarization, endomorphisms, and level structure, hence the name. Choose connected components~$\mathcal{S}$ and~$\mathcal{T}$ of such a Shimura variety of dimension~$n\geq 1$; they have a canonical model over a certain number field~$L$. Choose coordinates on~$\mathcal{S}$ and~$\mathcal{T}$ that are defined over~$L$. Let~$H_\delta$ be an absolutely irreducible Hecke correspondence defined by an adelic element~$\delta$ of the underlying reductive group, and let~$\Heckedeg(\delta)$ be the degree of~$H_\delta$. In the modular interpretation, $H_\delta$ parametrizes isogenies of a certain degree~$\isogdeg(\delta)$ between abelian varieties with PEL structure. Then the \emph{modular equations of level~$\delta$} are a family of~$n+1$ univariate polynomials~$(\Psi_{\delta,m})_{1\leq m\leq n+1}$ with coefficients in the function field~$L(\mathcal{S})$ of~$\mathcal{S}$, of degree at most~$d(\delta)$, describing~$H_\delta$ on~$\mathcal{S}\times \mathcal{T}$. This definition includes all the examples of modular polynomials cited above, and provides a unified context to study them. For each~$1\leq m\leq n+1$, the coefficients of~$\Psi_{\delta,m}$ can be seen as multivariate rational fractions with coefficients in~$L$. From an algorithmic point of view, two quantities are of interest: first, the total degree of these fractions; and second, their height, which measures the size of their coefficients. For instance, if $\mathcal{F}\in \mathbb{Q}(Y_1,\ldots,Y_n)$, write $\mathcal{F}=P/Q$ where $P,Q\in \mathbb{Z}[Y_1,\ldots,Y_n]$ are coprime; then the height~$\h(\mathcal{F})$ of~$\mathcal{F}$ is defined as the maximum of~$\log\abs{c}$, where~$c$ runs through the nonzero coefficients of~$P$ and~$Q$. Our main result gives upper bounds on the degrees and heights of the coefficients of modular equations on a given PEL Shimura variety in terms of~$\Heckedeg(\delta)$ and~$\isogdeg(\delta)$. This provides complexity bounds for algorithms involving these modular equations. \begin{thm} \label{thm:main} Let~$\mathcal{S}$ and~$\mathcal{T}$ be connected components of a simple PEL Shimura variety of type~(A) or~(C) of finite level and dimension~$n\geq 1$, with underlying reductive group~$G$. Let~$L$ be the field of definition of~$\mathcal{S}$ and~$\mathcal{T}$, and choose coordinates on~$\mathcal{S}$ and~$\mathcal{T}$ that are defined over~$L$. Then there exist constants~$\refstepcounter{cstcount} \ensuremath{C_{\thecstcount}}\label{cst:main-degree}$ and~$\refstepcounter{cstcount} \ensuremath{C_{\thecstcount}}\label{cst:main-height}$ such that the following holds. Let~$H_\delta$ be an absolutely irreducible Hecke correspondence on~$\mathcal{S}\times \mathcal{T}$ defined by an adelic element~$\delta$ of~$G$; let~$\Heckedeg(\delta)$ be the degree of~$H_\delta$, and let~$\isogdeg(\delta)$ be the degree of the isogenies described by~$H_\delta$ in the modular interpretation. Let~$\mathcal{F}$ be a multivariate rational fraction over~$L$ occuring as a coefficient of one of the modular equations~$\Psi_{\delta,m}$ for $1\leq m\leq n+1$. Then \begin{enumerate} \item \label{item:degree-bound} The total degree of~$\mathcal{F}$ is bounded above by~$\oldC{cst:main-degree} \Heckedeg(\delta)$. \item \label{item:height-bound} The height of~$\mathcal{F}$ is bounded above by~$\oldC{cst:main-height} \Heckedeg(\delta) \max\{1, \log \isogdeg(\delta)\}$. \end{enumerate} \end{thm} This result generalizes known bounds on the size of the elliptic modular polynomial~$\Phi_\ell$, which has degree~$\ell+1$ in both variables. We have $\h(\Phi_\ell) \sim 6 \ell \log \ell$ as~$\ell$ tends to infinity \cite{cohen_CoefficientsTransformationPolynomials1984}, and explicit bounds can be given \cite{broker_ExplicitHeightBound2010}. Since~$\Heckedeg(\delta) = \ell+1$ and~$\isogdeg(\delta)=\ell$ in this case, Theorem~\ref{thm:main} seems optimal up to the value of the constants. In the case of Siegel and Hilbert modular equations in dimension~$2$, this result is new, and we can provide explicit values for the constants~$\oldC{cst:main-degree}$ and~$\oldC{cst:main-height}$. In particular, the degree bounds that we obtain match exactly with experimental data. The strategy to prove part~\ref{item:degree-bound} of Theorem~\ref{thm:main} is to exhibit a particular modular form that behaves as the denominator of~$\Psi_{\delta,m}$, and to control its weight; then, we show that rewriting quotients of modular forms in terms of the chosen coordinates transforms bounded weights into bounded degrees. The proof of part~\ref{item:height-bound} is inspired by previous works on~$\Phi_\ell$~\cite{pazuki_ModularInvariantsIsogenies2019}. We prove height bounds on \emph{evaluations} of modular equations at certain points using well-known results on the Faltings height of isogenous abelian varieties~\cite{faltings_EndlichkeitssaetzeFuerAbelsche1983}. Then we use a general tight relation between the height of a rational fraction over a number field and the height of its evaluations at sufficiently many points, proved by the author in a separate paper~\cite{kieffer_UpperBoundsHeights2020}. This paper is organized as follows. In Section~\ref{sec:pel}, we recall the necessary background on PEL Shimura varieties. In Section~\ref{sec:modeq}, we define the modular equations associated with a choice of PEL setting and absolutely irreducible Hecke correspondence, and explain how we recover the Siegel and Hilbert modular equations in dimension~$2$ as special cases. Sections~\ref{sec:degree-bound} and~\ref{sec:height-bound} are devoted to the proof of the degree and height bounds respectively. \section{Background on PEL Shimura varieties} \label{sec:pel} Our presentation is based on Milne's expository notes~\cite{milne_IntroductionShimuraVarieties2005}, which serve as a general reference for this section. These notes are themselves based on Deligne's reformulation of Shimura's works~\cite{deligne_TravauxShimura1970}. We use the following notation: if~$G$ is a connected reductive algebraic group over~$\mathbb{Q}$, then \begin{itemize} \item $G^{\mathrm{der}}$ is the derived group of~$G$, \item $Z$ is the center of~$G$, \item $G^{\mathrm{ad}} = G/Z$ is the adjoint group of~$G$, \item $T = G/G^\mathrm{der}$ is the largest abelian quotient of~$G$, \item $\nu\colon G\to T$ is the natural quotient map, \item $G^{\mathrm{ad}}(\mathbb{R})_+$ is the connected component of 1 in $G^{\mathrm{ad}}(\mathbb{R})$ for the real topology, \item $G(\mathbb{R})_+$ is the preimage of~$G^{\mathrm{ad}}(\mathbb{R})_+$ in~$G(\mathbb{R})$, and finally \item $G(\mathbb{Q})_+ = G(\mathbb{Q})\cap G(\mathbb{R})_+$. \end{itemize} We write~$\mathbb{A}_f$ for the ring of finite adeles of~$\mathbb{Q}$. \subsection{Simple PEL Shimura varieties of type~(A) or~(C)} \label{sub:pel} \paragraph{PEL data.} Let~$(B,*)$ be a finite-dimensional simple~$\mathbb{Q}$-algebra with positive involution. The center~$F$ of~$B$ is a number field; let~$F_0\subset F$ be the subfield of invariants under~$*$. For simplicity, we make the technical assumption that~$B$ is either of type~(A) or~(C) \cite[Prop.~8.3]{milne_IntroductionShimuraVarieties2005}: this means that for every embedding~$\theta$ of~$F_0$ in an algebraic closure~$\overline{\Q}$ of~$\mathbb{Q}$, the algebra with positive involution~$(B\otimes_{F_0,\theta}\overline{\Q}, *)$ is isomorphic to a product of factors of the form, respectively, \begin{itemize} \item[(A)] $M_n(\overline{\Q})\times M_n(\overline{\Q})$ with $(a,b)^* = (b^t, a^t)$, or \item[(C)] $M_n(\overline{\Q})$ with $a^* = a^t$. \end{itemize} Let~$(V,\psi)$ be a faithful symplectic~$(B,*)$-module. This means that~$V$ is a finite-dimensional $\mathbb{Q}$-vector space equipped with a faithful $B$-module structure and a nondegenerate alternating $\mathbb{Q}$-bilinear form~$\psi$ such that for all~$b\in B$ and for all~$u,v\in V$, \begin{displaymath} \psi(b^* u, v) = \psi(u, bv). \end{displaymath} Let~$\GL_B(V)$ denote the group of automorphisms of~$V$ respecting the action of~$B$, and let~$G$ be its reduced algebraic subgroup defined by \begin{displaymath} \begin{aligned} G(\mathbb{Q}) &= \bigl\{g\in \GL_B(V) \ |\ \psi(gx, gy) = \psi(\mu(g)x, y) \text{ for some } \mu(g)\in F_0^\times \bigr\}. \end{aligned} \end{displaymath} The group~$G$ is connected and reductive, and its derived group is $G^\mathrm{der} = \ker(\mu) \cap \ker(\det)$ \cite[Prop.~8.7]{milne_IntroductionShimuraVarieties2005}. We warn the reader that our~$G$ is denoted by~$G_1$ in \cite[§8 of the 2017 version]{milne_IntroductionShimuraVarieties2005}. In Milne's terminology, our~$G$ will define a Shimura variety (so that the results of~\cite[§5]{milne_IntroductionShimuraVarieties2005} apply), but not strictly speaking a PEL Shimura variety. This choice of reductive group will allow us to consider more Hecke correspondences later on. Let~$x$ be a complex structure on~$V(\mathbb{R})$, meaning an endomorphism of~$V(\mathbb{R})$ such that $x^2 =\nolinebreak -1$. We say that~$x$ is \emph{positive for~$\psi$} if it commutes with the action of~$B$ and if the bilinear form~$(u,v)\mapsto \psi\bigl(u, x(v)\bigr)$ on~$V(\mathbb{R})$ is symmetric and positive definite. In particular, $x\in G(\mathbb{R})$ and~$\mu(x)=1$. Such a complex structure~$x_0$ exists \cite[Prop.~8.14]{milne_IntroductionShimuraVarieties2005}. Define~$X_+$ to be the orbit of~$x_0$ under the action of~$G(\mathbb{R})_+$ by conjugation; the space~$X_+$ is a hermitian symmetric domain \cite[Cor.~5.8]{milne_IntroductionShimuraVarieties2005}. We call the tupe $(B, *, V, \psi, G, X_+)$ a \emph{simple PEL Shimura datum of type~(A) or~(C)}, or simply a \emph{PEL datum}. To simplify notations, we abbreviate PEL data as pairs~$(G,X_+)$, the underlying data~$(V,\psi)$ and~$(B,*)$ being implicit. \paragraph{PEL Shimura varieties.} Let $(G,X_+)$ be a PEL datum as above, let~$K$ be a compact open subgroup of~$G(\mathbb{A}_f)$, and let~$K_\infty$ be the stabilizer of~$x_0$ in~$G(\mathbb{R})_+$. The \emph{PEL Shimura variety} associated with~$(G,X_+)$ of level~$K$ is the double quotient \begin{equation} \label{eq:Sh-CC} \begin{aligned} \Sh_K(G,X_+)(\mathbb{C}) &= G(\mathbb{Q})_+\backslash (X_+\times G(\mathbb{A}_f)) /K \\ &= G(\mathbb{Q})_+ \backslash (G(\mathbb{R})_+ \times G(\mathbb{A}_f)) / K_\infty\times K. \end{aligned} \end{equation} Actually, this quotient will be the set of~$\mathbb{C}$-points of the Shimura variety, hence the notation. In the first line of~\eqref{eq:Sh-CC}, the group~$G(\mathbb{Q})_+$ acts on both~$X_+$ and~$G(\mathbb{A}_f)$ by conjugation and left multiplication respectively, and~$K$ acts on $G(\mathbb{A}_f)$ by right multiplication. When the context is clear, we omit~$(G,X_+)$ from the notation. The set~$\Sh_K(\mathbb{C})$ is given the quotient topology obtained from the real topology on~$G(\mathbb{R})_+$ and the adelic topology on~$G(\mathbb{A}_f)$. In order to describe~$\Sh_K(\mathbb{C})$ more explicitly, we study its connected components. The projection to the second factor induces a map with connected fibers from~$\Sh_K(\mathbb{C})$ to the double quotient~$G(\mathbb{Q})_+\backslash G(\mathbb{A}_f) / K$, which is finite \cite[Lem.~5.12]{milne_IntroductionShimuraVarieties2005}. Let~$\mathcal{C}$ be a set of representatives in~$G(\mathbb{A}_f)$ for this double quotient. The connected component~$\mathcal{S}_c$ of~$\Sh_K(\mathbb{C})$ indexed by~$c\in \mathcal{C}$ can be identified with~$\Gamma_c\backslash X_+$, where $\Gamma_c = G(\mathbb{Q})_+\cap\, cKc^{-1}$ is an arithmetic subgroup of $\Aut(X_+)$ \cite[Lem.~5.13]{milne_IntroductionShimuraVarieties2005}. Thus, the Shimura variety~$\Sh_K(\mathbb{C})$ has a natural structure of a complex analytic space, and is an algebraic variety by the theorem of Baily and Borel \cite[Thm.~3.12]{milne_IntroductionShimuraVarieties2005}. Since~$G^\mathrm{der}$ is simply connected, by \cite[Thm.~5.17 and Lem.~5.20]{milne_IntroductionShimuraVarieties2005} (the assumption that~$K$ is sufficiently small is not actually needed there), the map~$\nu$ induces an isomorphism \begin{displaymath} G(\mathbb{Q})_+ \backslash G(\mathbb{A}_f)/K \simeq \nu(G(\mathbb{Q})_+) \backslash T(\mathbb{A}_f) / \nu(K). \end{displaymath} Therefore the set of connected components of~$\Sh_K(\mathbb{C})$ is a finite abelian group. Moreover, each connected component is itself a Shimura variety with underlying group~$G^\mathrm{der}$ \cite[Rem.~5.23]{milne_IntroductionShimuraVarieties2005}. A fundamental theorem states that~$\Sh_K(G,X_+)$ exists as an algebraic variety defined over the \emph{reflex field} $E(G,X_+)$, which is a number field contained in~$\mathbb{C}$, depending only on the PEL datum~\cite[§12-14]{milne_IntroductionShimuraVarieties2005}. The field of definition of the individual connected components of~$\Sh_K(\mathbb{C})$ depends on~$K$, and is a finite abelian extension of~$E(G,X_+)$. \subsection{The modular interpretation} \label{sub:modular-int} Our motivation in constructing PEL Shimura varieties is to obtain moduli spaces of complex abelian varieties with polarization, endomorphism, and level structures. This \emph{modular interpretation} of PEL Shimura varieties is usually formulated in terms of isogeny classes of abelian varieties \cite[Thm.~8.17]{milne_IntroductionShimuraVarieties2005}. In order to obtain a modular interpretation in terms of \emph{isomorphism} classes of abelian varieties in the spirit of~\cite[§2.6.2]{carayol_MauvaiseReductionCourbes1986}, we fix \begin{itemize} \item a PEL datum~$(G,X_+)$, \item a lattice~$\Lambda_0\subset V$, \item a compact open subgroup~$K\subset G(\mathbb{A}_f)$ which stabilizes the lattice~$\widehat{\Lambda}_0 = \Lambda_0\otimes\widehat{\Z}\subset V(\mathbb{A}_f)$, and \item a set~$\mathcal{C}\subset G(\mathbb{A}_f)$ of representatives for the finite double quotient~$G(\mathbb{Q})_+\backslash G(\mathbb{A}_f) / K$. \end{itemize} By definition, a lattice in~$V$ is a subgroup of~$V(\mathbb{Q})$ generated by a $\mathbb{Q}$-basis of~$V$, hence a free~$\mathbb{Z}$-module of rank~$\dim V$. If~$p$ is a prime number, then a lattice in~$V(\mathbb{Q}_p)$ is a subgroup of the form~$\bigoplus_{i\in I} \mathbb{Z}_p e_i$ where~$(e_i)_{i\in I}$ is a $\mathbb{Q}_p$-basis of~$V(\mathbb{Q}_p)$. Finally, a lattice in~$V(\mathbb{A}_f)$ is a product of lattices in~$V(\mathbb{Q}_p)$ for each~$p$ that are equal to~$V(\mathbb{Z}_p)$ for all~$p$ but finitely many. Recall that the local-global principle for lattices holds: the map $\Lambda\mapsto \widehat{\Lambda} = \Lambda\otimes\widehat{\Z}$ is a bijection between lattices in~$V$ and lattices in~$V(\mathbb{A}_f)$, and its inverse is intersection with~$V(\mathbb{Q})$. The assumption that~$K$ stabilizes~$\widehat{\Lambda}_0$ does not imply a loss of generality, because every compact open subgroup of~$G(\mathbb{A}_f)$ stabilizes some lattice in~$V(\mathbb{A}_f)$. To complete the setup, let~$\mathcal{O}$ be the largest order in~$B$ stabilizing~$\Lambda_0$. We keep the notation of~§\ref{sub:pel}: for every~$c\in \mathcal{C}$, we write~$\Gamma_c = G(\mathbb{Q})_+\cap cKc^{-1}$, and we denote by~$\mathcal{S}_c = \Gamma_c\backslash X_+$ the connected component of~$\Sh_K(\mathbb{C})$ associated with~$c$. We define a \emph{polarized lattice} to be a pair~$(\Lambda,\phi)$ where~$\Lambda$ is a free~$\mathbb{Z}$-module of finite rank and~$\phi\colon \Lambda\times\Lambda\to\mathbb{Z}$ is a nondegenerate alternating form. Given a polarized lattice~$(\Lambda,\phi)$, we can extend~$\phi$ to the $\mathbb{Q}$-vector space~$\Lambda\otimes\mathbb{Q}$, and we define \begin{displaymath} \Lambda^\perp = \{v\in \Lambda\otimes\mathbb{Q}\ |\ \forall w\in \Lambda,\ \phi(v,w)\in\mathbb{Z}\}. \end{displaymath} Then~$\Lambda^\perp/\Lambda$ is a finite abelian group called the \emph{polarization type} of~$(\Lambda,\phi)$. We say that~$\phi$ is a \emph{principal polarization} on~$\Lambda$ if~$\Lambda^\perp=\Lambda$. \paragraph{A modular interpretation in terms of lattices.} Using the data above, we define a standard polarized lattice for every connected component of~$\Sh_K(\mathbb{C})$ as follows. \begin{defn} \label{def:standard-lattice} For each~$c\in \mathcal{C}$, we define \begin{displaymath} \widehat{\Lambda}_c = c(\widehat{\Lambda}_0) \quad\text{and}\quad \Lambda_c = \widehat{\Lambda}_c\cap V(\mathbb{Q}). \end{displaymath} The action of~$c$, or any other element of~$G(\mathbb{A}_f)$, on adelic lattices is easily defined locally at each prime. Since~$c$ respects the action of~$B$ on~$V(\mathbb{A}_f)$, the order~$\mathcal{O}$ is again the stabilizer of~$\widehat{\Lambda}_c$, and thus of~$\Lambda_c$. Let $\lambda_c\in\mathbb{Q}_+^\times$ be such that the nondegenerate alternating form~$\psi_c = \lambda_c\psi$ satisfies $\psi_c(\Lambda_c\times\Lambda_c)=\mathbb{Z}$. We call $(\Lambda_c,\psi_c)$ with its structure of~$\mathcal{O}$-module the \emph{standard polarized lattice} associated with~$(\Lambda_0, c)$. \end{defn} Choose~$c\in \mathcal{C}$, and let $(\Lambda_c,\psi_c)$ be the standard polarized lattice associated with~$(\Lambda_0,c)$. We consider tuples $(\Lambda,x,\iota,\phi,\eta K)$ where \begin{itemize} \item $\Lambda$ is a free~$\mathbb{Z}$-module of rank\, $\dim V$, \item $x\in \End(\Lambda\otimes\mathbb{R})$ is a complex structure on~$\Lambda\otimes\mathbb{R}$, \item $\iota$ is an embedding~$\mathcal{O}\hookrightarrow \End_\mathbb{Z}(\Lambda)$, \item $\phi\colon\Lambda\times\Lambda\to\mathbb{Z}$ is a nondegenerate alternating $\mathbb{Z}$-bilinear form on~$\Lambda$, \item $\eta K$ is a $K$-orbit of $\widehat{\Z}$-linear isomorphisms of $\mathcal{O}$-modules~$\widehat{\Lambda}_0 \to \Lambda\otimes\widehat{\Z}$, \end{itemize} satisfying the following condition of compatibility with~$(\Lambda_c,\psi_c)$: \begin{itemize} \item[($\star$)] There exists an isomorphism of $\mathcal{O}$-modules $a\colon \Lambda \to \Lambda_c$, carrying~$\eta K$ to~$c K$ and~$x$ to an element of~$X_+$, such that \begin{displaymath} \exists \zeta \in \mu(\Gamma_c),\ \forall u, v\in\Lambda,\ \phi(u,v) = \psi_c\bigl(\zeta a(u), a(v)\bigr). \end{displaymath} \end{itemize} For short, we will call such a tuple a \emph{lattice with PEL structure defined by $(\Lambda_0,c)$}, or simply a \emph{lattice with PEL structure} when the dependency on~$(\Lambda_0,c)$ is understood. An \emph{isomorphism} between lattices with PEL structure $(\Lambda, x,\iota,\phi,\eta K)$ and~$(\Lambda', x', \iota', \phi', \eta' K)$ is an isomorphism of $\mathcal{O}$-modules $f\colon \Lambda\to\Lambda'$ that sends~$x$ to~$x'$, sends~$\eta K$ to~$\eta' K$, and such that $\phi(u,v) = \phi'\bigl(\zeta f(u), f(v)\bigr)$ for some~$\zeta\in\mu(\Gamma_c)$. For every lattice with PEL structure $(\Lambda,x,\iota,\phi,\eta K)$, the compatibility condition~($\star$) implies in particular that the complex structure~$x$ is positive for~$\phi$, the adjunction involution defined by~$\phi$ coincides with~$*$ on~$B$, the action of~$B$ on~$\Lambda\otimes\mathbb{Q}$ leaves the complex structure~$x$ invariant, and the polarized lattices~$(\Lambda,\phi)$ and~$(\Lambda_c,\psi_c)$ have the same polarization type. \begin{prop} \label{prop:modular-int-lattices} Let~$c\in \mathcal{C}$, and let~$\mathcal{Z}_c$ be the set of isomorphism classes of lattices with PEL structure defined by~$(\Lambda_0,c)$. Then the map \begin{displaymath} \begin{matrix} \mathcal{Z}_c & \longrightarrow & \mathcal{S}_c \\ (\Lambda,x,\iota,\phi,\eta K) &\longmapsto &[a x a^{-1},\, c] &\text{ where~$a$ is as in~$(\star)$} \end{matrix} \end{displaymath} is well-defined and bijective. The inverse map is \begin{displaymath} [x, c] \mapsto (\Lambda_c, x, \iota, \psi_c, cK). \end{displaymath} where~$\iota$ is the natural action of~$\mathcal{O}$ on~$\Lambda_c$. \end{prop} \begin{proof} The proof is direct and omitted; the details are similar to \cite[Prop.~6.3]{milne_IntroductionShimuraVarieties2005}. \end{proof} \paragraph{A modular interpretation in terms of isomorphism classes of abelian varieties.} Giving an abelian variety~$A$ over~$\mathbb{C}$ is the same as giving the lattice~$\Lambda = H_1(A,\mathbb{Z})$ and a complex structure on the universal covering~$\Lambda\otimes\mathbb{R}$ of~$A$. Under this identification, endomorphisms of~$A$ correspond to endomorphisms of $\Lambda$ that respect the complex structure. Moreover, giving a polarization on~$A$ is the same as giving a nondegenerate alternating form~$\phi\colon \Lambda\times\Lambda\to\mathbb{Z}$ such that the bilinear form $(u,v)\mapsto \phi(u, iv)$ is symmetric and positive definite. The \emph{polarization type} of~$A$ is the polarization type of~$(\Lambda,\phi)$. Recall that for every prime number~$p$, the Tate module~$T_p(A)$ is defined as the projective limit of the torsion subgroups~$A[p^n]$ as~$n$ tends to infinity: \begin{displaymath} T_p(A) = \varprojlim A[p^n] = \varprojlim \Lambda/p^n\Lambda = \Lambda\otimes \mathbb{Z}_p. \end{displaymath} Therefore $\Lambda\otimes\widehat{\Z}$ is canonically isomorphic to the global Tate module~$\widehat{T}(A)$ of~$A$, defined as \begin{displaymath} \widehat{T}(A) = \prod_{p \text{ prime }} T_p(A). \end{displaymath} Fix~$c\in\mathcal{C}$, and let~$(\Lambda_c,\psi_c)$ be the standard polarized lattice associated with~$(\Lambda_0,c)$. We define a \emph{complex abelian variety with PEL structure defined by~$(\Lambda_0,c)$} to be a tuple~$(A,\phi,\iota,\eta K)$ where \begin{itemize} \item $(A,\phi)$ is a complex polarized abelian variety of dimension~$\dim V$, \item $\iota$ is an embedding~$\mathcal{O}\hookrightarrow\End(A)$, \item $\eta K$ is a $K$-orbit of $\widehat{\Z}$-linear isomorphisms of $\mathcal{O}$-modules~$\widehat{\Lambda}_0 \to \widehat{T}(A)$, \end{itemize} satisfying the following condition of compatibility with~$(\Lambda_c,\psi_c)$: \begin{itemize} \item[($\star\star$)] There exists an isomorphism of $\mathcal{O}$-modules $a\colon H_1(A,\mathbb{Z}) \to \Lambda_c$, carrying~$\phi$ to~$\psi_c$, carrying~$\eta K$ to~$c K$, and such that the complex structure induced by~$a$ on~$V(\mathbb{R})$ belongs to~$X_+$. \end{itemize} If $(A,\phi,\iota,\eta K)$ is a complex abelian variety with PEL structure defined by~$(\Lambda_0,c)$, then condition~($\star\star$) implies that~$A$ and~$(\Lambda_c,\psi_c)$ have the same polarization type, and that the Rosati involution on $\End(A)\otimes\mathbb{Q}$ (which is adjunction with respect to~$\phi$) restricts to~$*$ on~$B$. An \emph{isomorphism} between complex abelian varieties with PEL structure $(A,\phi,\iota,\eta K)$ and $(A',\phi',\iota',\eta' K)$ is an isomorphism of complex polarized abelian varieties $f\colon(A,\phi)\to(A,'\phi')$ respecting the action of~$\mathcal{O}$ and sending $\eta K$ to~$\eta ' K$. The difference with the setting of Proposition~\ref{prop:modular-int-lattices} is that isomorphisms of complex abelian varieties with PEL structure must respect the polarizations exactly, rather than up to an element of~$\mu(\Gamma_c)$. In general,~$\mu(\Gamma_c)\neq \{1\}$, but there is the following workaround. If~$\varepsilon\in F^\times$ lies in the center of~$B$, then multiplication by~$\varepsilon$ defines an element in the center of~$G(\mathbb{Q})$. Therefore it makes sense to define \begin{displaymath} \mathcal{E}_K = \{\varepsilon \in F^\times\ |\ \varepsilon\in K \} = \{\varepsilon\in F^\times \ |\ \varepsilon\in\Gamma_c\}, \quad \text{for every } c\in G(\mathbb{A}_f). \end{displaymath} \begin{prop} \label{prop:modular-int-AV} Let~$c\in \nolinebreak\mathcal{C}$, and let~$(\Lambda_c,\psi_c)$ be the standard polarized lattice associated with~$(\Lambda_0,c)$. If $\mu(\mathcal{E}_K) = \mu(\Gamma_c)$, then the map \begin{displaymath} [x,c]\longmapsto \bigl(V(\mathbb{R})/\Lambda_c, \psi_c, \iota, cK\bigr), \end{displaymath} where~$V(\mathbb{R})$ is seen as a complex vector space via~$x$, and~$\iota$ is the action of~$\mathcal{O}$ on~$V(\mathbb{R})/\Lambda_c$ induced by the action of~$B$ on~$V(\mathbb{R})$, is a bijection between~$\mathcal{S}_c$ and the set of isomorphism classes of complex abelian varieties with PEL structure defined by~$(\Lambda_0,c)$. \end{prop} \begin{proof} When defining~$\mathcal{Z}_c$ as in Proposition~\ref{prop:modular-int-lattices}, we can impose~$\zeta = 1$ in condition~$(\star)$ and strengthen the notion of isomorphism between lattices with PEL structure to respect the polarizations exactly. Indeed, multiplying the isomorphism~$a$ by~$\varepsilon\in \mathcal{E}_K$ leaves everything invariant except the alternating form, which is multiplied by~$\mu(\varepsilon)$. The result follows then from the equivalence of categories between lattices and complex abelian varieties outlined above. \end{proof} \begin{rem} The group~$\mu(\mathcal{E}_K)$ always has finite index in~$\mu(\Gamma_c)$. Indeed, if~$\mathbb{Z}_{F_0}^\times$ denotes the unit group of~$F_0$, then \begin{displaymath} \mu(\mathcal{E}_K)\subset \mu(\Gamma_c) \subset \mathbb{Z}_{F_0}^\times \end{displaymath} and~$\mu(\mathcal{E}_K)$ contains a subgroup of finite index in~$\mathbb{Z}_{F_0}^\times$, namely all the squares of elements in~$\mathbb{Z}_{F_0}^\times \cap K$. By \cite[Thm.~1]{chevalley_DeuxTheoremesArithmetique1951}, there exists a compact open subgroup~$M$ of~$\mu(K)$ such that $\mathbb{Z}_{F_0}^\times \cap M = \mu(\mathcal{E}_K)$. Define $K' = K\cap \mu^{-1}(M)$. Then~$\mathcal{E}_{K'} = \mathcal{E}_K$, and for every~$c\in G(\mathbb{A}_f)$, we have \begin{displaymath} G(\mathbb{Q})_+\cap c K' c^{-1} = \{\gamma\in \Gamma_c \ |\ \mu(\gamma) \in \mu(\mathcal{E}_K)\}. \end{displaymath} Therefore the hypothesis of Proposition~\ref{prop:modular-int-AV} will be satisfied for the smaller level subgroup~$K'$. \end{rem} When considering the classical modular curves as Shimura varieties associated with the reductive group~$G = \GL_2$ acting on~$V = \mathbb{Q}^2$, we can take~$\Lambda_0 = \mathbb{Z}^2$ and~$\psi = \tmat{0}{1}{-1}{0}$. Then Proposition~\ref{prop:modular-int-AV} applies, and we let the reader check that we recover the usual modular interpretation of modular curves in terms of complex elliptic curves with level structure. \subsection{Modular forms on PEL Shimura varieties} \label{sub:forms} Our definition of modular equations will involve choices of coordinates on connected components of PEL Shimura varieties. These coordinates, also called modular functions, are obtained as quotients of modular forms. This section briefly presents modular forms on PEL Shimura varieties without going into technical details. Let~$(G,X_+)$ be a PEL datum, and let~$K_\infty\subset G(\mathbb{R})_+$ be the stabilizer of a fixed complex structure~$x_0\in X_+$. Attached to this data is a certain canonical character of~$K_\infty$~\cite[§1.8]{baily_CompactificationArithmeticQuotients1966}, denoted by~$\rho\colon K_\infty\to\mathbb{C}^\times$. Let~$K$ be a compact open subgroup of~$G(\mathbb{A}_f)$. A \emph{modular form} of weight~$w\in\mathbb{Z}$ on $\Sh_K(G,X_+)(\mathbb{C})$ is a function \begin{displaymath} f\colon G(\mathbb{Q})_+ \backslash \bigl(G(\mathbb{R})_+ \times G(\mathbb{A}_f)\bigr) / K \to \mathbb{C} \end{displaymath} that satisfies suitable growth and holomorphy conditions \cite[Prop.~3.2]{milne_CanonicalModelsMixed1990}, and such that \begin{displaymath} \forall x\in G(\mathbb{R})_+,\ \forall g\in G(\mathbb{A}_f),\ \forall k_\infty\in K_\infty,\ f([xk_\infty, g]) = \rho(k_\infty)^w f([x,g]). \end{displaymath} The weight of~$f$ is denoted by~$\wt(f)$. We also say that $f$ is \emph{of level $K$}. Let~$\mathcal{S}$ be a connected component of~$\Sh_K(\mathbb{C})$, or a union of these, and let~$L$ be its field of definition. A \emph{modular form of weight~$w$ on~$\mathcal{S}$} is the restriction of a modular form of weight~$w$ on~$\Sh_K(\mathbb{C})$ to the preimage of~$\mathcal{S}$ in $G(\mathbb{Q})_+\backslash \bigl(G(\mathbb{R}_+) \times G(\mathbb{A}_f)\bigr) / K$ by the natural projection. There is a canonical notion of modular forms on~$\mathcal{S}$ being defined over~$L$ \cite[Chap.~III]{milne_CanonicalModelsMixed1990}. A \emph{modular function} on~$\mathcal{S}$ is the quotient of two modular forms of the same weight, the denominator being nonzero on each connected component of~$\mathcal{S}$. The following result is well known; since we did not find a precise reference in the literature, we present a short proof. \begin{thm} \label{thm:mf-algebraic} Let~$\mathcal{S}$ be a connected component of the Shimura variety~$\Sh_K(\mathbb{C})$, and let~$L$ be its field of definition. Then the graded $L$-algebra of modular forms on~$\mathcal{S}$ defined over~$L$ is finitely generated, and there exists a weight~$w\geq 1$ such that modular forms of weight~$w$ defined over~$L$ realize a projective embedding of~$\mathcal{S}$. Every element of the function field~$L(\mathcal{S})$ is a quotient of two modular forms of the same weight defined over~$L$. \end{thm} \begin{proof} Choose an element~$c\in\mathcal{C}\subset G(\mathbb{A}_f)$ defining the connected component~$\mathcal{S}$, so that $\mathcal{S} = \Gamma_c\backslash X_+$ where $\Gamma_c = G(\mathbb{Q})_+\cap c K c^{-1}$. Assume first that the level subgroup~$K$ of~$G(\mathbb{A}_f)$ is sufficiently small, so that~$\Gamma_c$ is torsion-free. Then, by the Baily--Borel theorem \cite[Thm.~10.11]{baily_CompactificationArithmeticQuotients1966}, there exists an ample line bundle~$\mathcal{M}_\mathbb{C}$ on~$\mathcal{S}$ such that for every~$w\geq 1$, the algebraic sections of~$\mathcal{M}_\mathbb{C}^{\otimes w}$ are exactly the modular forms of weight~$w$ on~$\mathcal{S}$. In fact, $\mathcal{M}_\mathbb{C}$ is the inverse determinant of the tangent bundle on~$\mathcal{S}$ \cite[Prop.~7.3]{baily_CompactificationArithmeticQuotients1966}. Since~$\mathcal{S}$ has a model over~$L$, there is a line bundle~$\mathcal{M}$ on~$\mathcal{S}$ defined over~$L$ such that $\mathcal{M} \otimes_L \mathbb{C} = \mathcal{M}_\mathbb{C}$. This is a particular case of a general result on the rationality of automorphic vector bundles \cite[Chap.~III, Thm.~4.3]{milne_CanonicalModelsMixed1990}. For every $w\geq 1$, the $L$-vector space modular forms of weight~$w$ on~$\mathcal{S}$ defined over~$L$ is~$H^0(\mathcal{S}, \mathcal{M}^{\otimes w})$. Since~$\mathcal{M}\otimes_L\mathbb{C}$ is ample, $\mathcal{M}$ is ample too, and this implies the conclusions of the theorem. In general, we can always find a level subgroup~$K'$ of finite index in~$K$ such that the arithmetic subgroups $G(\mathbb{Q})_+\cap c K' c^{-1}$ for $c\in G(\mathbb{A}_f)$ are torsion free \cite[Prop.~3.5]{milne_IntroductionShimuraVarieties2005}, and we can assume that~$K'$ is normal in~$K$. Let~$\mathcal{S}'$ be a connected component of~$\Sh_{K'}(\mathbb{C})$ lying over~$\mathcal{S}$, and let~$L'$ be its field of definition. Then the conclusions of the theorem hold for~$\mathcal{S}'$. We can identify the modular forms on~$\mathcal{S}$ defined over~$L$ with the modular forms on~$\mathcal{S}'$ defined over~$L'$ that are invariant under the action of a subgroup of~$K/K'$. Therefore the conclusions of the theorem also hold for~$\mathcal{S}$ by Noether's theorem \cite{noether_EndlichkeitssatzInvariantenEndlicher1915} on invariants under finite groups. \end{proof} We can also consider modular forms that are symmetric under certain automorphisms of~$\Sh_K$. Let~$\Sigma$ be a finite group of automorphisms of~$V$ as a $\mathbb{Q}$-vector space that leaves the symplectic form~$\psi$ invariant, and also acts on~$B$ in such a way that \begin{displaymath} \forall u\in V,\ \forall b\in B,\ \forall \sigma\in\Sigma, \ \sigma(bu) = \sigma(b)\sigma(u). \end{displaymath} This implies that the elements of~$\Sigma$ commute with the involution~$*$, and hence leave~$F_0$ stable. Under these assumptions, each~$\sigma\in \Sigma$ induces an automorphism of~$G$ defined over~$\mathbb{Q}$, also denoted by~$\sigma$. Assume further that these automorphisms leave~$G(\mathbb{R})_+$, $X_+$, $K$, $K_\infty$, $\nu$ and the character~$\rho$ invariant. Then~$\Sigma$ can be seen as a finite group of automorphisms of~$\mathcal{S}$, and one can check as in~\cite[Thm.~13.6]{milne_IntroductionShimuraVarieties2005} that these automorphisms are defined over~$L$. Then for every modular form~$f$ of weight~$w$ on~$\mathcal{S}$ defined over~$L$, and every~$\sigma\in\Sigma$, the function \begin{displaymath} \act{\sigma}{f}\ :\ [x,g] \mapsto f([\sigma^{-1}(x), \sigma^{-1}(g)]) \end{displaymath} is a modular form of weight~$w$ on~$\mathcal{S}$ defined over~$L$. We say that~$f$ is \emph{symmetric} under~$\Sigma$ if $\act{\sigma}{f} = f$ for every $\sigma\in\Sigma$. \begin{prop} \label{prop:mf-symmetric} Let~$\Sigma$ be a finite group of automorphisms of~$G$ as above. Then the graded $L$-algebra of symmetric modular forms on~$\mathcal{S}$ defined over~$L$ is finitely generated, and every symmetric modular function on~$\mathcal{S}$ defined over~$L$ is the quotient of two symmetric modular forms of the same weight defined over~$L$. \end{prop} \begin{proof} This results from Theorem~\ref{thm:mf-algebraic} and another application of Noether's theorem. \end{proof} \subsection{Hecke correspondences} \label{sub:hecke} We fix a PEL datum~$(G,X_+)$ as above, as well as a compact open subgroup~$K\subset G(\mathbb{A}_f)$. Let~$\delta \in G(\mathbb{A}_f)$, and let $K' = K\cap\,\delta K\delta^{-1}$. Consider the diagram \begin{equation} \label{diag:hecke} \begin{tikzcd} \Sh_{K'}(\mathbb{C}) \ar[d, "p_1"] \ar[rr, "R(\delta)"] && \Sh_{\delta^{-1} K'\delta}(\mathbb{C}) \ar[d, "p_2"] \\ \Sh_K(\mathbb{C}) && \Sh_K(\mathbb{C}) \end{tikzcd} \end{equation} where the map~$R(\delta)$ is $[x,g]\mapsto [x,g \delta]$, and~$p_1$ and~$p_2$ are the natural projections. This diagram defines a correspondence~$H_\delta$ in $\Sh_K\times \Sh_K$, called the \emph{Hecke correspondence} of level~$\delta$, consisting of all pairs of the form~$\bigl(p_1(x), p_2(R(\delta)x)\bigr)$ for $x\in \Sh_{K'}$. Hecke correspondences are algebraic: the diagram~\eqref{diag:hecke} is the analytification of a diagram existing at the level of algebraic varieties. Moreover, Hecke correspondences are defined over the reflex field \cite[Thm.~13.6]{milne_IntroductionShimuraVarieties2005}. We define the \emph{degree} of~$H_\delta$ to be the index \begin{displaymath} \Heckedeg(\delta) = [K:K'] = [K:K\cap\,\delta K\delta^{-1}]. \end{displaymath} This index is finite as both~$K$ and~$K'$ are compact open subgroups of~$G(\mathbb{A}_f)$, and is the degree of the map~$\Sh_{K'}\to \Sh_K$. One can also consider~$H_\delta$ as a map from~$\Sh_K$ to its $\Heckedeg(\delta)$-th symmetric power, sending~$z\in \Sh_K$ to the set $\{z'\in \Sh_K\ |\ (z,z')\in H_\delta\}$. It is easy to see how~$H_\delta$ behaves with respect to connected components: if~$z$ lies in the connected component indexed by $t\in T(\mathbb{A}_f)$, then its images lie in the connected component indexed by~$t\, \nu(\delta)$. We call the Hecke correspondence~$H_\delta$ \emph{absolutely irreducible} if for every connected component~$\mathcal{S}$ of~$\Sh_K(\mathbb{C})$ with field of definition~$L$, the preimage of~$\mathcal{S}$ in~$\Sh_{K'}$ is absolutely irreducible as a variety defined over~$L$ (or equivalently, connected as a variety over~$\mathbb{C}$). A sufficient condition for~$H_\delta$ to be absolutely irreducible is that~$\nu(K') = \nu(K)$. \paragraph{Modular interpretation of Hecke correspondences.} In the modular interpretation, Hecke correspondences describe isogenies of a certain type between polarized abelian varieties. Let~$\Lambda_0$, $\mathcal{C}$, and~$\mathcal{O}$ be as in~§\ref{sub:modular-int}, and write \begin{displaymath} K = \bigsqcup_{i=1}^{\Heckedeg(\delta)} \kappa_i K', \end{displaymath} where~$\kappa_i\in G(\mathbb{A}_f)$ for each~$1\leq i\leq \Heckedeg(\delta)$. Let~$c\in \mathcal{C}$, denote by~$\mathcal{S}_c$ the connected component of~$\Sh_K(\mathbb{C})$ indexed by~$c$, and consider the lattice with PEL structure~$(\Lambda_c, x, \iota, \psi_c, cK)$ associated with a point~$[x,c]\in \mathcal{S}_c$ by Proposition~\ref{prop:modular-int-lattices}. In order to construct the lattices associated with~$[x,c]$ via the Hecke correspondence~$H_\delta$, we partition the orbit~$c K$ into the $K'$-orbits~$c \kappa_i K'$ for~$1\leq i\leq \Heckedeg(\delta)$. Each element $c \kappa_i \delta\in G(\mathbb{A}_f)$ is then a $\widehat{\Z}$-linear embedding of $\mathcal{O}$-modules $\widehat{\Lambda}_0\hookrightarrow V(\mathbb{A}_f)$; it is well defined up to right multiplication by~$\delta^{-1}K'\delta$, hence by~$K$. Let~$\Lambda_i\subset V(\mathbb{Q})$ be the lattice such that~$\Lambda_i\otimes\widehat{\Z}$ is the image of this embedding. There is still a natural action of~$\mathcal{O}$ on~$\Lambda_i$. The decomposition~$c \kappa_i\delta K = q_i c' K$, with~$q_i\in G(\mathbb{Q})_+$ and $c'\in \mathcal{C}$, is well defined, and the element~$c'$ does not depend on~$i$. \begin{prop} \label{prop:hecke} Let~$\delta\in G(\mathbb{A}_f)$, let~$z=[x,c]\in \mathcal{S}_c$, and construct~$\Lambda_i,q_i,c'$ as above. Then the image of~$z$ under the Hecke correspondence~$H_\delta$ in the modular interpretation of Proposition~\ref{prop:modular-int-AV} is given by the~$\Heckedeg(\delta)$ isomorphism classes of tuples with representatives \begin{displaymath} \Bigl (\Lambda_i, x, \dfrac{\lambda_{c'}}{\lambda_c}\psi_c \bigl(\mu(q_i^{-1})\,\cdot\,,\cdot \bigr), c \kappa_i\delta K \Bigr) \qquad \text{for}\quad 1\leq i\leq \Heckedeg(\delta). \end{displaymath} \end{prop} \begin{proof} By construction, the images of~$[x,c]$ via the Hecke correspondence are the points~$[q_i^{-1} x, c']$ of~$\Sh_K(\mathbb{C})$. The relation~$c \kappa_i \delta K = q_i c' K$ shows that the map~$q_i^{-1}$ sends the lattice~$\Lambda_i$ to~$\Lambda_{c'}$. This map also respects the action of~$\mathcal{O}$, and sends the complex structure~$x$ to~$q_i^{-1}x$. Finally, it sends the polarization~$(u,v)\mapsto \psi_c(u,v)$ on~$\Lambda_i$ to $(u,v)\mapsto \psi_c\bigl(\mu(q_i)u, v\bigr)$ on~$\Lambda_{c'}$. \end{proof} After multiplying~$\delta$ by a unique suitable element in~$\mathbb{Q}^\times_+$, which does not change~$H_\delta$, we can assume that $\delta(\widehat{\Lambda}_0) \subset \widehat{\Lambda}_0$ and $\delta(\widehat{\Lambda}_0)\not\subset p\widehat{\Lambda}_0$ for every prime~$p$; we say that~$\delta$ is \emph{normalized} with respect to~$\Lambda_0$. In this case, we define the \emph{isogeny degree} of~$H_\delta$ as the unique integer~$\isogdeg(\delta)\geq 1$ such that~$\isogdeg(\delta)^{-1}\det(\delta)$ is a unit in~$\widehat{\Z}$. In other words, \begin{displaymath} \isogdeg(\delta) = \# \bigl( \widehat{\Lambda}_0/\delta(\widehat{\Lambda}_0) \bigr). \end{displaymath} For a general~$\delta\in G(\mathbb{A}_f)$, we set $\isogdeg(\delta) = \isogdeg(\lambda\delta)$ where~$\lambda\in\mathbb{Q}_+^\times$ is chosen such that~$\lambda\delta$ is normalized with respect to~$\Lambda_0$. \begin{cor} \label{cor:hecke-isog} Let~$\delta\in G(\mathbb{A}_f)$. Then, in the modular interpretation of Proposition~\ref{prop:modular-int-AV}, the Hecke correspondence~$H_\delta$ sends an abelian variety~$A$ with PEL structure to~$\Heckedeg(\delta)$ abelian varieties~$A_1,\ldots, A_{\Heckedeg(\delta)}$ such that for every~$1\leq i\leq \Heckedeg(\delta)$, there exists an isogeny $A_i\to A$ of degree~$\isogdeg(\delta)$. \end{cor} \begin{proof} We can assume that~$\delta$ is normalized with respect to~$\Lambda_0$. Then, in the result of Proposition~\ref{prop:hecke}, each lattice~$\Lambda_i$ for $1\leq i\leq \Heckedeg(\delta)$ is a sublattice of~$\Lambda_c$ endowed with the same complex structure~$x$. Moreover, for every~$1\leq i\leq \Heckedeg(\delta)$, we have $\Lambda_c/\Lambda_i\simeq \widehat{\Lambda}_0/\delta(\widehat{\Lambda}_0)$, so the index of each~$\Lambda_i$ in~$\Lambda_c$ is~$\isogdeg(\delta)$. \end{proof} \paragraph{A relation between degrees} For later purposes, we state an inequality relating~$\Heckedeg(\delta)$ and a power of~$\isogdeg(\delta)$. Since~$K\subset G(\mathbb{A}_f)$ is open, there exists a smallest integer~$N\geq 1$ such that \begin{displaymath} \bigl \{g\in G(\mathbb{A}_f) \cap \GL(\widehat{\Lambda}_0) \ |\ g = 1\ \mathrm{mod}\ N\widehat{\Lambda}_0 \bigr\} \subset K, \end{displaymath} that we call the~\emph{level} of~$K$ with respect to~$\widehat{\Lambda}_0$. \begin{prop} \label{prop:d-l-relation} There exists a constant~$C$ depending on~$K$ and~$\Lambda_0$ such that for every $\delta\in G(\mathbb{A}_f)$, we have $\Heckedeg(\delta)\leq C\,\isogdeg(\delta)^{(\dim V)^2}$. We can take $C = N^{(\dim V)^2}$, where~$N$ is the level of~$K$ with respect to~$\widehat{\Lambda}_0$. \end{prop} \begin{proof} We can assume that~$\delta$ is normalized with respect to~$\widehat{\Lambda}_0$. Then~$K\cap\,\delta K \delta^{-1}$ contains all the elements $g\in G(\mathbb{A}_f) \cap \GL(\widehat{\Lambda}_0)$ that are the identity modulo $\widehat{\Lambda} = \isogdeg(\delta) N \widehat{\Lambda}_0$. In other words we have a morphism $K\to \GL(\Lambda_0/N\isogdeg(\delta)\Lambda_0)$ whose kernel is contained in~$K\cap\delta K\delta^{-1}$. This yields the result since $\#\GL(\Lambda_0/N\isogdeg(\delta)\Lambda_0)\leq (N\isogdeg(\delta))^{(\dim V)^2}.$ \end{proof} \begin{rem} The upper bound on~$\Heckedeg(\delta)$ given in Proposition~\ref{prop:d-l-relation} is far from optimal in many cases: for instance, if~$\delta$ is normalized with respect to~$\widehat{\Lambda}_0$, if $\isogdeg(\delta)$ is prime to~$N$, and if moreover~$\delta$ normalizes the image of~$K$ in~$\GL(\Lambda_0/N\Lambda_0)$, then $\Heckedeg(\delta) \leq \isogdeg(\delta)^{(\dim V)^2}$. But in general, the level of~$K$ does enter into account. As an example, take~$G = \GL_2$, $\delta = \tmat{0}{1}{1}{0}$, and \begin{displaymath} K = \bigr\{\tmat{a}{b}{c}{d}\in \GL_2(\widehat{\Z}) \ |\ a = d = 1\text{ mod } N \text{ and } c = 0 \text{ mod } N\bigr\}. \end{displaymath} Then $\Heckedeg(\delta) = N$ even though~$\isogdeg(\delta)=1$. In the modular interpretation, the Hecke correspondence~$H_\delta$ has the effect of forgetting the initial~$K$-level structure entirely. \end{rem} \section{Modular equations on PEL Shimura varieties} \label{sec:modeq} This section presents a general definition of modular equations on PEL Shimura varieties, generalizing three examples mentioned in the introduction: the elliptic modular polynomials, and the modular equations of Siegel and Hilbert type for abelian surfaces (see §\ref{sub:siegel} and~§\ref{sub:hilbert}). \subsection{The example of elliptic modular polynomials} \label{sub:Phiell} Elliptic modular polynomials are the simplest example of modular equations. They are usually defined in terms of classical modular forms~\cite[§11.C]{cox_PrimesFormNy2013}. In order to motivate the general definition, we translate this definition in the adelic language. The underlying PEL datum is obtained by taking~$V = \mathbb{Q}^2$, $\psi = \tmat{0}{1}{-1}{0}$, and~$B=\mathbb{Q}$ with~$*$ the trivial involution. Then~$G = \GL_2$, and~$G(\mathbb{Q})_+$ consists of all rational~$2\times 2$ matrices with positive determinant. We take~$\Lambda_0 = \mathbb{Z}^2$ and $K = \GL_2(\widehat{\Z})$, so that~$\Sh_K(\mathbb{C})$ has only one connected component~$\mathcal{S}$ (indexed by the identity matrix) and the maximal order of~$B$ stabilizing~$\Lambda_0$ is~$\mathcal{O} = \mathbb{Z}$. If we take the complex structure~$x_0 = \tmat{0}{1}{-1}{0}$ as a base point, then~$X_+$ is naturally identified with the Poincaré upper half plane~$\mathbb{H}_1$, with~$x_0$ corresponding to~$i\in \mathbb{H}_1$. Then~$\mathcal{S}$ is identified with the modular curve~$\SL_2(\mathbb{Z})\backslash \mathbb{H}_1$, and modular forms on~$\mathcal{S}$ in the sense of~§\ref{sub:forms} correspond exactly to modular forms of level~$\SL_2(\mathbb{Z})$ on~$\mathbb{H}_1$ in the classical sense. The reflex field~$E(G,X_+)$ is equal to~$\mathbb{Q}$ in this case, and the~$j$-invariant realizes an isomorphism between~$\Sh_K$ and the affine line~$\mathbb{A}^1_\mathbb{Q}$; in particular~$j$ generates the function field of~$\mathcal{S}$ over~$\mathbb{Q}$. Let~$\ell$ be a prime number. Then the function on~$\mathbb{H}_1$ given by~$\tau\mapsto j(\tau/\ell)$ is invariant under the following congruence subgroup of~$\SL_2(\mathbb{Z})$: \begin{displaymath} \Gamma^0(\ell) = \bigl\{\tmat{a}{b}{c}{d}\in \SL_2(\mathbb{Z})\ |\ b=0 \text{ mod }\ell\bigr\}. \end{displaymath} Therefore, the coefficients of the polynomial \begin{displaymath} P_\ell(\tau) = \prod_{\gamma\in \Gamma^0(\ell)\backslash \SL_2(\mathbb{Z})} \Bigl(Y - j(\tfrac{1}{\ell}\gamma\tau)\Bigr),\quad \text{for }\tau\in \mathbb{H}_1 \end{displaymath} are modular functions of level~$\SL_2(\mathbb{Z})$. The elliptic modular polynomial~$\Phi_\ell$ is the unique element of~$\mathbb{C}(X)[Y]$ satisfying the relation~$\Phi_\ell(j(\tau),Y) = P_\ell(\tau)$ for every~$\tau\in\mathbb{H}_1$; actually~$\Phi_\ell\in \mathbb{Z}[X,Y]$. In other words, we have a map \begin{equation} \label{diag:classical-hecke} \Gamma^0(\ell)\backslash\mathbb{H}_1\to \mathcal{S}\times \mathcal{S}, \quad \tau\mapsto (\tau, \tau/\ell), \end{equation} and the product~$\mathcal{S}\times \mathcal{S}$ is birational to~$\mathbb{P}^1\times \mathbb{P}^1$ via~$(j,j)$. The modular curve~$\Gamma^0(\ell)\backslash\mathbb{H}_1$ is birational to its image in~$\mathbb{P}^1\times \mathbb{P}^1$, and~$\Phi_\ell$ is an equation of this image. Remark that for every~$\tau\in \mathbb{H}_1$, we have \begin{displaymath} \tau/\ell = \delta^{-1}\tau, \quad\text{where}\quad \delta = \tmat{\ell}{0}{0}{1} \in G(\mathbb{Q})_+. \end{displaymath} Therefore, if~$\tau\in \mathbb{H}_1$ corresponds to a point~$[x,I_2] \in \Sh_K(\mathbb{C})$, then~$\tau/\ell$ corresponds to the point~$[x,\delta]$. Moreover~$\Gamma^0(\ell) = \SL_2(\mathbb{Z}) \cap \bigl(\delta \SL_2(\mathbb{Z})\delta^{-1}\bigr)$. Therefore the map~\eqref{diag:classical-hecke} is precisely the Hecke correspondence~$H_\delta$ given in diagram~\eqref{diag:hecke}. The function~$\tau\mapsto j(\tau/\ell)$ corresponds to the modular function \begin{displaymath} \begin{matrix} j_\delta\ :\ & G(\mathbb{Q})_+\backslash\bigl(G(\mathbb{A}_f)\times G(\mathbb{R})_+\bigr) &\to &\mathbb{C}\\ & [x,g] & \mapsto & j([x,g\delta]), \end{matrix} \end{displaymath} which is right-invariant under~$\delta K\delta^{-1}$. Let~$K''$ be a normal subgroup of finite index in~$K$ contained in~$K' = K \cap \,\delta K\delta^{-1}$. We let~$K$ act (on the left) on the set of modular functions of level~$K''$ as follows: if~$k\in K$ and~$f$ is such a function, then we define \begin{displaymath} \act{k}{f}\ :\ [x,g]\mapsto f([x,gk]). \end{displaymath} Since~$K'$ is contained in the stabilizer of~$j_\delta$, the coefficients of the polynomial \begin{equation} \label{eq:Qell} Q_\ell = \prod_{\gamma\in K/K'} \bigl( Y - \act{\gamma}{j_\delta}\bigr) \end{equation} are modular functions of level~$K$; the analogue of~$Q_\ell$ in the classical world is exactly~$P_\ell$, as inversion induces a bijection between right cosets of~$\Gamma^0(\ell)$ in~$\SL_2(\mathbb{Z})$ and left cosets of~$K'$ in~$K$. The general definition of modular equations involves analogues of the product~\eqref{eq:Qell} for other Hecke correspondences. \subsection{General definition of modular equations} \label{sub:modeq} Let~$(G,X_+)$ be a PEL datum, let~$K$ be a compact open subgroup of $G(\mathbb{A}_f)$, and let~$\Sigma$ be a finite group of automorphisms of~$G$ as in~§\ref{sub:forms}. Let~$n$ be the complex dimension of~$X_+$; we assume that~$n\geq 1$. Let~$\mathcal{S}$,~$\mathcal{T}$ be connected components of~$\Sh_K(G,X_+)(\mathbb{C})$, and let~$L$ be their field of definition. To complete the picture, we also need to choose coordinates on~$\mathcal{S}$ and~$\mathcal{T}$. Since the field~$L(\mathcal{S})$ of modular functions on~$\mathcal{S}$ has transcendence degree~$n$ over~$L$, the field~$L(\mathcal{S})^\Sigma$ of modular functions on~$\mathcal{S}$ that are symmetric under~$\Sigma$ also has transcendence degree~$n$ over~$L$. Choose a transcendence basis $(j_1,\ldots, j_n)$ of~$L(\mathcal{S})^\Sigma$ over~$L$, and another symmetric function $j_{n+1}$ that generates the remaining finite extension, whose degree is denoted by~$e$. On~$\mathcal{S}$, the function~$j_{n+1}$ satisfies a minimal relation of the form \begin{equation} \label{eq:jn+1} E(j_1,\ldots,j_{n+1}) = 0 \qquad \text{where}\quad E = \sum_{k = 0}^{e} E_k(J_1,\ldots,J_n)\,J_{n+1}^{\,k} \in L[J_1,\ldots,J_{n+1}] \end{equation} and~$E$ is irreducible. If~$L(\mathcal{S})^\Sigma$ is purely transcendental over~$L$ (if~$\Sigma=\{1\}$, this means that~$\mathcal{S}$ is birational to~$\mathbb{P}^n_L$), then we take~$j_{n+1}=1$, ignore eq.~\eqref{eq:jn+1}, and work with~$n$ invariants only. We proceed similarly to define coordinates on~$\mathcal{T}$: no confusion will arise if we also denote them by $j_1,\ldots, j_{n+1}$. We refer to all the data defined up to now as the \emph{PEL setting}. Throughout the paper, our constants will depend on this data only. Given a PEL setting as above, let~$\delta\in G(\mathbb{A}_f)$ be an adelic element of~$G$ defining an absolutely irreducible Hecke correspondence~$H_\delta$ that intersects~$\mathcal{S}\times \mathcal{T}$ nontrivially. We want to define explicit polynomials with coefficients in~$L(\mathcal{S})$, called the \emph{modular equations of level $\delta$}, describing~$H_\delta$ in the product~$\mathcal{S}\times \mathcal{T}$. To do this, we mimic the definition of elliptic modular polynomials in the language of PEL Shimura varities given in~§\ref{sub:Phiell}. As in~§\ref{sub:hecke}, we write~$K' = K\cap \, \delta K\delta^{-1}$. Let~$K''$ be a normal subgroup of finite index in~$K$, contained in~$K'$, and stabilized by~$\Sigma$. Let~$\mathcal{S}''$ be the preimage of~$\mathcal{S}$ in~$\Sh_{K''}(\mathbb{C})$. There is a left action of~$K \rtimes \Sigma$ on the space of modular functions on~$\mathcal{S}''$, given by \begin{displaymath} \act{(k,\sigma)}{f} \ :\ [x,g] \mapsto \act{\sigma}{f}([x,gk]). \end{displaymath} The modular functions that are invariant under~$K'\rtimes\{1\}$ (resp.~$K\rtimes\Sigma$) are exactly the rational functions on~$H_\delta\cap(\mathcal{S}\times\mathcal{T})$ defined over~$\mathbb{C}$ (resp. the rational functions on~$\mathcal{S}$ defined over~$\mathbb{C}$ and invariant under~$\Sigma$). The modular functions \begin{displaymath} j_{i,\delta} \ :\ [x,g] \mapsto j_i([x,g\delta]) \end{displaymath} for~$1\leq i\leq n+1$ are defined over~$L$ and generate the function field of~$H_\delta\cap(\mathcal{S}\times\mathcal{T})$. We define the decreasing chain of subgroups \begin{displaymath} K \rtimes\Sigma = K_0 \supset K_1 \supset \cdots \supset K_{n+1} \supset K' \end{displaymath} as follows: for each $1\leq i\leq n+1$, the subgroup~$K_i$ is the stabilizer of the functions $j_{1,\delta},\ldots,j_{i,\delta}$. In~§\ref{sub:Phiell}, we had~$K_0=K$ and~$K_1=K'$. Galois theory applied to the Galois covering~$\mathcal{S}''\to\mathcal{S}$ tells us that for every~$1\leq i\leq n+1$, the field~$L(j_1,\ldots,j_{n+1},j_{1,\delta},\ldots,j_{i,\delta})$ is the function field of the preimage of~$\mathcal{S}$ in the Shimura variety~$\Sh_{K_i}$, and consists of all modular functions on~$\mathcal{S}''$ defined over~$L$ that are invariant under~$K_i$. In other words, we have a tower of function fields: \begin{displaymath} \begin{tikzcd} L(j_1,\ldots,j_{n+1},j_{1,\delta},\ldots,j_{n+1,\delta}) = L(H_\delta \cap(\mathcal{S}\times\mathcal{T})) \\ \vdots \ar[u, -, "{\text{degree } d_{n+1}}"] \\ L(j_1,\ldots,j_{n+1},j_{1,\delta}) \ar[u, -, "{\text{degree } d_2}"] \\ L(\mathcal{S})^\Sigma. \ar[u, -, "{\text{degree } d_1}"] \end{tikzcd} \end{displaymath} where $d_i = [K_{i-1}:K_i]$ for~$1\leq i\leq n+1$. The modular equations of level~$\delta$ are defining equations for the successive extensions in the tower. \begin{defn} \label{def:modeq} The \emph{modular equations} of level~$\delta$ on the product~$\mathcal{S}\times \mathcal{T}$ are the tuple $(\Psi_{\delta,1}, \Psi_{\delta,2},\ldots, \Psi_{\delta,n+1})$ defined as follows: for each $1\leq m\leq n+1$,~$\Psi_{\delta,m}$ is the multivariate polynomial in the~$m$ variables $Y_1,\ldots, Y_m$ defined by \begin{displaymath} \Psi_{\delta,m} = \sum_{\gamma\in K_0/K_{m-1}} \left( \left( \prod_{i=1}^{m-1} \prod_{ \gamma_i} \Bigl(Y_i - \act{\gamma_i}{j_{i,\delta}} \Bigr) \right) \prod_{\gamma_m \in K_{m-1}/K_m} \Bigl(Y_m - \act{\gamma\gamma_m}{j_{m,\delta}} \Bigr) \right) \end{displaymath} where the middle product is over all $\gamma_i\in K_0/K_i$ such that $\gamma_i = \gamma$ modulo~$K_{i-1}$, but $\gamma_i\neq \gamma$ modulo~$K_i$. The expression for~$\Psi_{\delta,m}$ makes sense, because multiplying~$\gamma$ on the right by an element in~$K_{m-1}$ only permutes the factors in the last product. \end{defn} In the case of the Hecke correspondence considered in~§\ref{sub:Phiell}, the polynomial~$\Psi_{\delta,1}$ is precisely~$Q_\ell$. The precise formula is inspired from preexisting definitions of modular equations for abelian surfaces \cite{broker_ModularPolynomialsGenus2009,milio_QuasilinearTimeAlgorithm2015,milio_ModularPolynomialsHilbert2020,martindale_HilbertModularPolynomials2020}. We will return to these examples in~§\ref{sub:siegel} and~§\ref{sub:hilbert}. Let us give elementary properties of modular equations. First, we need a lemma. \begin{lem} \label{lem:all-CC} Let~$\gamma,\gamma'\in K_0$ and~$1\leq i\leq n+1$. Assume that the equality~$\gamma\cdot j_{i,\delta}= \gamma'\cdot j_{i,\delta}$ holds on one connected component of~$\mathcal{S}''$. Then it holds on all connected components of~$\mathcal{S}''$. \end{lem} \begin{proof} Write~$\gamma = (k,\sigma)$ and~$\gamma' = (k',\sigma')$ where~$k,k'\in K$ and~$\sigma,\sigma'\in \Sigma$. Let~$c\in G(\mathbb{A}_f)$ be an adelic element of~$G$ defining the connected component~$\mathcal{S}$ in~$\Sh_K(\mathbb{C})$, so that~$\mathcal{S} = \Gamma_c\backslash X_+$ with $\Gamma_c = G(\mathbb{Q})_+\cap cKc^{-1}$. By assumption, there exists an element $g\in G(\mathbb{A}_f)$ such that~$g=c$ in the double quotient space $G(\mathbb{Q})_+\backslash G(\mathbb{A}_f)/K$, and \begin{equation} \label{eq:equality-one-CC} \forall x\in X_+,\ j_{i,\delta}\bigl([\sigma^{-1}(x), \sigma^{-1}(gk)]\bigr) = j_{i,\delta}\bigl([\sigma'^{-1}(x), \sigma'^{-1}(gk')]\bigr). \end{equation} Since~$H_\delta$ is absolutely irreducible, we have $G(\mathbb{Q})_+\backslash G(\mathbb{A}_f)/K = G(\mathbb{Q})_+\backslash G(\mathbb{A}_f)/K'$. Using the description of connected components of a PEL Shimura variety in~§\ref{sub:pel}, and the fact that the action~$\Sigma$ leaves~$\nu$ invariant, we find that there exist $\gamma_1,\gamma_2\in G(\mathbb{Q})_+$ such that $gk = \gamma_1 \sigma(c)$ mod~$\sigma(K')$ and $gk' = \gamma_2 \sigma'(c)$ mod~$\sigma'(K')$. Then equation~\eqref{eq:equality-one-CC} is equivalent to the following: \begin{equation} \label{eq:equality-all-CC} \forall x\in X_+,\ j_{i,\delta}\bigl([x,c]\bigr) = j_{i,\delta}\bigl([\sigma'^{-1}(\gamma_2^{-1}\gamma_1\sigma(x)), c]\bigr). \end{equation} Note that~$\gamma_2^{-1}\gamma_1$ is well-defined and independent of~$g$, up to multiplication on the left by an element of~$G(\mathbb{Q})_+\cap \sigma'(cK'c^{-1})$, and on the right by an element of~$G(\mathbb{Q})_+\cap\sigma(cK'c^{-1})$. Therefore equation~\eqref{eq:equality-all-CC} holds for every~$g\in G(\mathbb{A}_f)$ such that $g=c$ in $G(\mathbb{Q})_+\backslash G(\mathbb{A}_f)/K$. In other words, the equality $\gamma\cdot j_{i,\delta} = \gamma'\cdot j_{i,\delta}$ holds on every connected component of~$\mathcal{S}''$. \end{proof} \begin{prop} \label{prop:modeq-evaluate} Let $1\leq m\leq n+1$, and let $\gamma\in K_0/K_{m-1}$. Then, up to multiplication by an element in $L(j_1,\ldots,j_{n+1},\gamma\cdot j_{1,\delta},\ldots,\gamma\cdot j_{m-1,\delta})^\times$, we have \begin{displaymath} \Psi_{\delta,m}(\act{\gamma}{j_{1,\delta}}\,,\ldots,\act{\gamma}{j_{m-1,\delta}}\,, Y_m) = \prod_{\gamma_m\in K_{m-1}/K_m} \Bigl(Y_m - \act{\gamma\gamma_m}{j_{m,\delta}}\Bigr). \end{displaymath} \end{prop} \begin{proof} By Definition~\ref{def:modeq}, the above equality holds true after multiplying the right hand side by \begin{displaymath} f = \prod_{i=1}^{m-1} \prod_{\substack{\gamma_i\in K_0/K_i\\\gamma_i\neq \gamma\\\gamma_i=\gamma\text{ mod } K_{i-1}}} \Bigl(\act{\gamma}{j_{i,\delta}} - \act{\gamma_i}{j_{i, \delta}} \Bigr) \end{displaymath} The function~$f$ a product of nonzero modular functions on~$\mathcal{S}''$ defined over~$L$. In order to show that~$f\in L(j_1,\ldots,j_{n+1},\gamma\cdot j_{1,\delta},\ldots,\gamma\cdot j_{m-1,\delta})$, we check that~$f$ is invariant under the action of~$\gamma K_{m-1}\gamma^{-1}$. By definition of the subgroups~$K_i$, no factor of~$f$ is identically zero on~$\mathcal{S}''$. Therefore~$f$ is invertible by Lemma~\ref{lem:all-CC}. \end{proof} Let~$1\leq m\leq n+1$. Proposition~\ref{prop:modeq-evaluate} implies that up to scaling, the univariate polynomial $\Psi_{\delta,m}(j_{1,\delta},\ldots,j_{m-1,\delta},Y_m)$ is the minimal polynomial of the function~$j_{m,\delta}$ over the field $L(j_1,\ldots,j_{n+1},j_{1,\delta},\ldots,j_{m-1,\delta})$. In other words, when the multiplicative coefficient in Proposition~\ref{prop:modeq-evaluate} does not vanish, which is generically the case,~$\Psi_{\delta,m}$ provides all the possible values for~$j_{m,\delta}$ once $j_1,\ldots, j_{n+1}$ and $j_{1,\delta}, \ldots, j_{m-1,\delta}$ are known. In particular, modular equations vanish on~$H_\delta$ as promised. We could also define other modular equations~$\Phi_{\delta,m}$ for which there is true equality in Proposition~\ref{prop:modeq-evaluate}, as in the case of the classical modular polynomial~$\Phi_l$, but they have a more complicated expression. In practice, using the polynomials~$\Psi_{\delta,m}$ is more convenient as they are typically smaller. \begin{prop} \label{prop:modeq-coeffs} Let $1\leq m\leq n+1$. The coefficients of~$\Psi_{\delta,m}$ lie in $L(j_1,\ldots,j_{n+1})$. The degree of~$\Psi_{\delta,m}$ in~$Y_m$ is~$[K_{m-1}:K_m]$, and for each~$1\leq i<m$, the degree of~$\Psi_{\delta,m}$ in~$Y_i$ is at most~$[K_{i-1}:K_i] - 1$. \end{prop} \begin{proof} It is clear from Definition~\ref{def:modeq} that the action of~$K_0$ leaves~$\Psi_{\delta,m}$ invariant. Hence the coefficients of~$\Psi_{\delta,m}$ are rational functions on~$\mathcal{S}$ invariant under~$\Sigma$ and defined over~$L$, so the first statement holds. The second part is obvious. \end{proof} In general, using a nontrivial~$\Sigma$ increases the degree of modular equations. This has a geometric interpretation: modular equations describe the Hecke correspondence~$H_\delta$ and its conjugates under~$\Sigma$ simultaneously. Let~$J_1,\ldots, J_{n+1}$ be indeterminates, and let $1\leq m\leq n+1$. By the equation~\eqref{eq:jn+1} satisfied by~$j_{n+1}$ on~$\mathcal{S}$, there exists a unique element of the ring~$L(J_1,\ldots,J_n)[J_{n+1}, Y_1,\ldots, Y_m]$ with degree at most~$e-1$ in~$J_{n+1}$ which, when evaluated at $J_i = j_i$ for $1\leq i\leq n+1$, yields~$\Psi_{\delta,m}$. In the sequel, we also denote it by~$\Psi_{\delta,m}$ for simplicity. Therefore the coefficients of~$\Psi_{\delta,m}$ will be either functions on~$\mathcal{S}$, i.e.~as elements of~$L(j_1,\ldots,j_{n+1})$, or multivariate rational fractions in the indeterminates~$J_1,\ldots,J_{n+1}$ that are polynomial in~$J_{n+1}$ of degree at most~$e-1$, depending on the context. \begin{rem} \label{rem:simpler-modeqs} In several cases, the function~$j_{1,\delta}$ already generates the whole extension of function fields, so that $K_1 = \cdots = K_{n+1}=K'$, \begin{align*} \Psi_{\delta,1} &= \prod_{\gamma_1 \in K_0/K'} \bigl(Y_1 - \act{\gamma_1}{j_{1,\delta}}\bigr), \end{align*} and for every $2\leq m\leq n+1$, \begin{equation} \label{eq:simpler-Psidelta} \Psi_{\delta,m} = \sum_{\gamma\in K_0/K'} \left(\Biggl(\prod_{\gamma_1\neq \gamma} \bigl(Y_1 - \act{\gamma_1}{j_{1,\delta}}\bigr) \Biggr) \bigl(Y_m - \act{\gamma}{j_{m,\delta}}\bigr) \right). \end{equation} In this case, for each~$2\leq m\leq n+1$, we have~$\Psi_{\delta,m}(j_{1,\delta}) = \partial_{Y_1}\Psi_{\delta,1}(j_{1,\delta}) (Y_m - j_{m,\delta})$, where~$\partial_{Y_1}$ denotes derivative with respect to~$Y_1$. Therefore~$\Psi_{\delta,m}$ is just the expression of~$j_{m,\delta}$ as an element of~$L(\mathcal{S})^\Sigma[\,j_{1,\delta}]$ in a compact representation inspired from \cite{gaudry_2adicCMMethod2006}. In this case, we often keep only the constant term in equation~\eqref{eq:simpler-Psidelta}, and consider the modular equations~$\Psi_{\delta,m}$ for~$2\leq m\leq n+1$ as elements of the ring~$L(J_1,\ldots,J_n)[J_{n+1},Y]$ with degree at most~$e$ in~$J_{n+1}$, defined by \begin{displaymath} \Psi_{\delta,m}(j_1,\ldots,j_{n+1}) = \sum_{\gamma\in K_0/K'} \bigl(\act{\gamma}{j_{m,\delta}}\bigr) \prod_{\gamma_1\neq \gamma}\bigl(Y - \act{\gamma_1}{j_{1,\delta}} \bigr). \end{displaymath} Then, we simply have~$j_{m,\delta} = \Psi_{\delta,m}(j_{1,\delta})/\partial_{Y_1}\Psi_{\delta,1}(j_{1,\delta})$. \end{rem} \subsection{Modular equations of Siegel type for abelian surfaces} \label{sub:siegel} The Siegel modular varieties are prominent examples of PEL Shimura varieties. They are moduli spaces for complex abelian varieties of dimension~$g$ with a certain polarization and level structure. Another example is given by the Hilbert modular varieties, for which the PEL structure contains an additional real multiplication embedding. In this subsection and the next, we explain how these examples fit in the general setting of PEL Shimura varieties, and we show that modular equations of Siegel and Hilbert type in dimension 2 \cite{milio_QuasilinearTimeAlgorithm2015,milio_ModularPolynomialsHilbert2020} are special cases of modular equations as defined above. \paragraph{Siegel moduli spaces.} Let~$g\geq 1$. The \emph{Siegel modular variety} of dimension~$g$ \cite[§6]{milne_IntroductionShimuraVarieties2005} is obtained by taking $B = \mathbb{Q}$, with trivial involution~$*$, and taking the symplectic module $(V,\psi)$ to be $V = \mathbb{Q}^{2g}$ with \begin{displaymath} \forall u, v\in V,\ \psi(u,v) = u^t \mat{0}{I_g}{-I_g}{0} v. \end{displaymath} Then $G = \GSp_{2g}$. The $\mathbb{Q}$-algebra~$B$ is simple of type~(C). We can choose~$X_+$ to be the set of all complex structures on~$V(\mathbb{R})$ that are positive for~$\psi$ \cite[§6]{milne_IntroductionShimuraVarieties2005}, and we have \begin{displaymath} G(\mathbb{R})_+ = \{g\in G(\mathbb{R}) \ |\ \mu(g)>0 \}. \end{displaymath} The reflex field is~$\mathbb{Q}$ \cite[§14]{milne_IntroductionShimuraVarieties2005}. Generalizing the example of modular curves, we can identify~$X_+$ with the Siegel upper half-space~$\mathbb{H}_g$ endowed with the usual action of~$\GSp_{2g}(\mathbb{R})_+$: \begin{displaymath} \tmat{a}{b}{c}{d}\cdot \tau= (a\tau+b)(c\tau+d)^{-1} \end{displaymath} for every~$\tau\in \mathbb{H}_g$ and $\tmat{a}{b}{c}{d}\in G(\mathbb{R})_+$, where~$a,b,c$, and~$d$ are~$g\times g$ blocks. Let~$(e_1,\ldots,e_{2g})$ be the canonical basis of~$V(\mathbb{Q})$. Choose positive integers $D_1|\cdots|D_g$ such that~$D_1=1$, and let~$\Lambda_0\subset V(\mathbb{Q})$ be the lattice generated by~$e_1,\ldots,e_g, D_1 e_{g+1},\ldots, D_g e_{2g}$. Then~the type of the polarization~$\psi$ on~$\Lambda_0$ is a product of cyclic groups of order~$D_1,\ldots,D_g$; we also say that~$\psi$ is of type~$(D_1,\ldots,D_g)$. Let $K$ be a compact open subgroup of~$G(\mathbb{A}_f)$ that stabilizes $\Lambda_0\otimes\widehat{\Z}$, and let~$\mathcal{S}$ be the connected component of~$\Sh_K(\mathbb{C})$ defined by the identity matrix in~$G(\mathbb{A}_f)$. Then~$\mathcal{S}$ is identified with the quotient~$\Gamma\backslash \mathbb{H}_g$, where \begin{displaymath} \Gamma = \GSp_{2g}(\mathbb{Q})_+ \cap K = \Sp_{2g}(\mathbb{Q}) \cap K. \end{displaymath} By Proposition~\ref{prop:modular-int-AV}, $\mathcal{S}$ is a moduli space for polarized abelian varieties with polarization type~$(D_1,\ldots,D_g)$ and level~$K$ structure such that $H_1(A,\mathbb{Z})$ is isomorphic to the standard polarized lattice to~$(\Lambda_0,\psi)$. This modular interpretation coincides with the classical one \cite[§8.1]{birkenhake_ComplexAbelianVarieties2004}. Also, modular forms on~$\mathcal{S}$ can be identified with Siegel modular forms in the classical sense, as we mentioned in~§\ref{sub:Phiell} in the case~$g=1$. \paragraph{Siegel modular equations.} We now focus on the special case given by \begin{displaymath} g = 2,\ D_1 = D_2 = 1,\ \Lambda_0 = \mathbb{Z}^{2g},\ K = \GSp_{2g}(\widehat{\Z}). \end{displaymath} Then~$\Sh_K(\mathbb{C})$ has only one connected component defined over~$\mathbb{Q}$, and classifies principally polarized abelian surfaces over~$\mathbb{C}$. Modular forms on~$\Sh_K$ are identified with classical Siegel modular forms of level~$\Sp_4(\mathbb{Z})$. As shown by Igusa \cite{igusa_SiegelModularForms1962}, the graded $\mathbb{Q}$-algebra of these modular forms is generated by four elements of respective weights 4, 6, 10, and~12. These generators can be taken to be $I_4, I_6', I_{10}$, and~$I_{12}$ in Streng's notation \cite[p.\,42]{streng_ComplexMultiplicationAbelian2010}. The function field of $\Sh_K$ over~$\mathbb{Q}$ is therefore generated by the three algebraically independent \emph{Igusa invariants}: \begin{displaymath} j_1 = \dfrac{I_4 I_6'}{I_{10}},\quad j_2 = \dfrac{I_4^2 I_{12}}{I_{10}^2}, \quad j_3 = \dfrac{I_4^5}{I_{10}^2}. \end{displaymath} Let~$\ell$ be a prime, and consider the Hecke correspondence of level \begin{displaymath} \delta = \mat{\ell I_2}{0}{0}{\,I_2} \qquad\text{as a 4} \times \text{4 matrix in 2}\times \text{2 blocks}. \end{displaymath} The group $K\cap\, \delta K \delta^{-1} \cap G(\mathbb{Q})_+$ is usually denoted by~$\Gamma^0(\ell)$, and the degree of~$H_\delta$ is \begin{displaymath} \Heckedeg(\delta) = \ell^3 + \ell^2 + \ell + 1. \end{displaymath} The Hecke correspondence~$H_\delta$ is absolutely irreducible, and describes all principally polarized abelian surfaces $\ell$-isogeous to a given one; the degree of these isogenies is $\isogdeg(\delta) = \ell^2$. In this case, the function~$j_{1,\delta}$ generates the function field on the Hecke correspondence \cite[Lem.~4.2]{broker_ModularPolynomialsGenus2009}, so that $d_1 = \Heckedeg(\delta)$ and $d_2 = d_3 = 1$, in the notation of~§\ref{sub:modeq}. The modular equations from Definition~\ref{def:modeq} are called the Siegel modular equations of level~$\ell$ in Igusa invariants. They have been computed for $\ell = 2$ and $\ell=3$ \cite{milio_QuasilinearTimeAlgorithm2015}. \subsection{Modular equations of Hilbert type for abelian surfaces} \label{sub:hilbert} \paragraph{Hilbert moduli spaces.} Let~$F$ be a totally real number field of degree~$g$ over~$\mathbb{Q}$, and let $B = F$ with trivial involution~$*$. The $\mathbb{Q}$-algebra~$B$ is simple of type~(C). Let $V = F^2$, which is a $\mathbb{Q}$-vector space of dimension~$2g$, and define the symplectic form~$\psi$ on~$V$ as follows: \begin{displaymath} \forall a,b,c,d\in F,\ \psi\bigl((a,b),(c,d)\bigr) = \Tr_{F/\mathbb{Q}}(ad-bc). \end{displaymath} Then~$(V,\psi)$ is a faithful symplectic $(B,*)$-module, where~$B$ acts on~$V$ by multiplication. The associated algebraic group is $G = \GL_2(F)$. The~$g$ real embeddings of~$F$ induce identifications \begin{displaymath} V(\mathbb{R}) = (\mathbb{R}^2)^g \quad \text{and}\quad G(\mathbb{R}) = \prod_{i=1}^g \GL_2(\mathbb{R}). \end{displaymath} The subgroup~$G(\mathbb{R})_+$ consists of matrices with totally positive determinant. There is a particular complex structure~$x_0\in G(\mathbb{R})$ on $V(\mathbb{R})$ given by \begin{displaymath} x_0 = \Bigl(\tmat{0}{1}{-1}{0}\Bigr)_{1\leq i\leq g}. \end{displaymath} Let~$X_+$ be the~$G(\mathbb{R})_+$-conjugacy class of~$x_0$. Then $(G,X_+)$ is called a \emph{Hilbert Shimura datum}. Its reflex field is~$\mathbb{Q}$: see \cite[§X.4]{vandergeer_HilbertModularSurfaces1988} when $g=2$, and \cite[Ex.~12.4]{milne_IntroductionShimuraVarieties2005} in general. The domain~$X_+$ can be identified with $\mathbb{H}_1^g$, where~$\mathbb{H}_1$ is the complex upper half-plane, endowed with the action of~$\GL_2(\mathbb{R})_+$ on each coordinate. Let~$\mathbb{Z}_F$ be the integer ring of~$F$, and take $\Lambda_0 = \mathbb{Z}_F\oplus\mathbb{Z}_F^\vee$, where~$\mathbb{Z}_F^\vee$ is the dual of~$\mathbb{Z}_F$ with respect to the trace form. Then the stabilizer of~$\Lambda_0$ in~$B$ is~$\mathbb{Z}_F$, and~$\psi$ is principal on~$\Lambda_0$. Let~$K$ be a compact open subgroup of~$\GL(\Lambda_0\otimes\widehat{\Z})$. \begin{rem} In the Hilbert setting, the group~$\mu(\Gamma_c)$ is not equal to~$\mu(\mathcal{E})$ in general. For instance, if $K=\GL(\Lambda_0\otimes\widehat{\Z})$, and $c=\tmat{1}{0}{0}{1}$, then \begin{displaymath} \Gamma_c = G(\mathbb{R})_+\cap K = \{ g\in \GL(\Lambda_0)\ |\ \det(g) \text{ is totally positive}\}, \end{displaymath} so~$\mu(\Gamma_c)$ is the set of totally positive units in~$\mathbb{Z}_F$. On the other hand,~$\mu(\mathcal{E})$ is the set of all squares of units. For instance, if $g=2$, then $\mu(\mathcal{E}) = \mu(\Gamma_c)$ if and only if the fundamental unit in~$\mathbb{Z}_F$ has negative norm. \end{rem} We now assume that~$K$ has been chosen in such a way that \begin{equation} \label{eq:valid-K} G(\mathbb{Q})_+\cap K = \bigl\{g\in \GL(\Lambda_0)\ |\ \mu(g)\in \mathbb{Z}_F^{\times 2}\bigr\}. \end{equation} The Shimura variety~$\Sh_K(G,X_+)(\mathbb{C})$ has several connected components: the narrow class group of~$F$ is a quotient of $\pi_0(\Sh_K(\mathbb{C}))$ \cite[Cor.~I.7.3]{vandergeer_HilbertModularSurfaces1988}. Let $\mathcal{S}$ be the connected component defined by the identity matrix in~$G(\mathbb{A}_f)$. Then there is a natural isomorphism \begin{displaymath} \mathcal{S} = (G(\mathbb{Q})_+\cap K) \backslash \mathbb{H}_1^g \simeq \SL(\mathbb{Z}_F\oplus\mathbb{Z}_F^\vee)\backslash \mathbb{H}_1^g. \end{displaymath} By Proposition~\ref{prop:modular-int-AV}, the component~$\mathcal{S}$ parametrizes principally polarized abelian varieties with real multiplication by~$\mathbb{Z}_F$ and level~$K$ structure such that~$H_1(A,\mathbb{Z})$ is isomorphic to the polarized lattice~$(\Lambda_0,\psi)$ with its additional data. The modular forms of weight~$w$ on~$\mathcal{S}$ are identified with the classical Hilbert modular forms of weight~$(w,w,\ldots,w)$ for~$F$ and level~$\SL(\mathbb{Z}_F\oplus\mathbb{Z}_F^\vee)$ \cite[§4]{freitag_HilbertModularForms1990}. In the special case~$g = 2$, let $\Sigma = \{1,\sigma\}$, where~$\sigma$ is the involution of~$V$ coming from real conjugation in~$F$. On~$G(\mathbb{R})_+$, the involution~$\sigma$ acts as permutation of the two factors. Modular forms that are symmetric under~$\Sigma$ are symmetric Hilbert modular forms in dimension 2 in the usual sense \cite[§1.3]{bruinier_HilbertModularForms2008}. \paragraph{Hilbert modular equations.} Let~$F$ be a real quadratic field, and assume moreover that the fundamental unit of~$F$ has negative norm; then~$K=\GL(\Lambda_0\otimes\widehat{\Z})$ satisfies~\eqref{eq:valid-K}. Let~$\beta\in \mathbb{Z}_F$ be totally positive and prime, and let \begin{displaymath} \delta = \mat{\beta}{0}{0}{1} \in G(\mathbb{A}_f). \end{displaymath} The Hecke correspondence~$H_\delta$ is absolutely irreducible, has degree $\Heckedeg(\delta) = N_{F/\mathbb{Q}}(\beta) + 1$, and parametrizes isogenies of degree~$\isogdeg(\delta) = N_{F/\mathbb{Q}}(\beta)$. One can check that~$H_\delta$ intersects~$\mathcal{S}\times \mathcal{S}$ nontrivially. Being able to consider this Hecke correspondence is the reason for our different choice of~$G$ in~§\ref{sec:pel} compared to~\cite[§8]{milne_IntroductionShimuraVarieties2005}. As invariants on~$\mathcal{S}$, one possibility is to use the pullback of Igusa invariants by the forgetful map to the Siegel threefold, i.e.~the Siegel moduli space for~$g=2$ \cite{lauter_ComputingGenusCurves2011}. They are symmetric with respect to $\Sigma$, and the equation relating these three invariants is the equation of the associated \emph{Humbert surface}, the image of the Hilbert surface~$\mathcal{S}$ inside the Siegel threefold. In this case, the modular equations describe simultaneously $\beta$- and $\sigma(\beta)$-isogenies \cite{milio_ModularPolynomialsHilbert2020}. In special cases, the field of $\Sigma$-invariant modular functions can be generated by two elements called \emph{Gundlach invariants}. This reduction of the number of variables is interesting in practice. For instance, if $F = \mathbb{Q}(\sqrt{5})$, then the graded $\mathbb{Q}$-algebra of symmetric Hilbert modular forms is free over three generators~$F_2,F_6$, and~$F_{10}$ of respective weights~$2$, $6$, and $10$ \cite{gundlach_BestimmungFunktionenZur1963}; therefore, $L(\mathcal{S})^\Sigma = \mathbb{Q}(g_1,g_2)$ where the Gundlach invariants~$g_1$ and~$g_2$ are defined by \begin{displaymath} g_1 = \dfrac{F_2^5}{F_{10 }},\quad g_2 = \dfrac{F_2^2 F_6}{F_{10}}. \end{displaymath} Moreover, $g_1$ and~$g_2$ are algebraically independent. The associated modular equations are called the Hilbert modular equations of level~$\beta$ in Gundlach invariants for~$F=\mathbb{Q}(\sqrt{5})$, and have been computed up to $N_{F/\mathbb{Q}}(\beta) = 59$ \cite{milio_DatabaseModularPolynomials}. They also describe both $\beta$- and $\sigma(\beta)$-isogenies. \section{Degree estimates for modular equations} \label{sec:degree-bound} We fix a PEL setting as in~§\ref{sub:modeq}; in particular we make a choice of invariants~$j_1,\ldots,j_{n+1}$ on the Shimura components~$\mathcal{S}$ and~$\mathcal{T}$. Let $\delta\in G(\mathbb{A}_f)$, and assume that the Hecke correspondence~$H_\delta$ intersects~$\mathcal{S}\times \mathcal{T}$ nontrivially. In Definition~\ref{def:modeq}, we defined the modular equations $\Psi_{\delta,1},\ldots,\Psi_{\delta,n+1}$; they are multivariate polynomials in the variables $Y_1,\ldots, Y_{n+1}$ describing~$H_\delta$ and its conjugates under~$\Sigma$. Their coefficients are uniquely determined rational fractions in $L(J_1,\ldots,J_n)[J_{n+1}]$ of degree at most~$e$ in~$J_{n+1}$, where the integer~$e$ is defined as in equation~\eqref{eq:jn+1}. The goal of this section is to prove the upper bounds on the degree of the coefficients of the modular equations~$\Psi_{\delta,m}$ given in the first part of Theorem~\ref{thm:main}. We also give explicit variants in the case of modular equations for abelian surfaces. As indicated in the introduction, the proof works by identifying a denominator of the modular equations, then by analyzing the degree of the rational fractions we obtain when rewriting a quotient of modular forms of bounded weights in terms of the invariants~$j_1,\ldots,j_{n+1}$. \subsection{The common denominator of \texorpdfstring{$\Psi_{\delta,m}$}{}} \label{sub:denom} We keep the notation used in~§\ref{sub:modeq}: in particular \begin{displaymath} K' = K\cap \,\delta K \delta^{-1},\quad K_0 = K \rtimes\Sigma, \end{displaymath} and~$K''$ is a normal subgroup of finite index in~$K$, contained in~$K'$ and stabilized by~$\Sigma$. The natural action of~$K_0$ on modular functions of level~$K''$ extends to an action on modular forms. For each $1\leq i\leq {n+1}$, fix a nonzero modular form~$\chi_i$ invariant under~$\Sigma$ and defined over~$L$ such that $\chi_i j_i$ is again a modular form (i.e.~has no poles); we say that~$\chi_i$ is a \emph{denominator} of~$j_i$. This is possible by Proposition~\ref{prop:mf-symmetric}. For each~$i$, the function \begin{displaymath} \chi_{i,\delta}\ :\ [x,g] \mapsto \chi_i([x,g \delta]) \end{displaymath} is a modular form of weight~$\wt(\chi_i)$ on the preimage of~$\mathcal{S}$ in~$\Sh_{K'}(\mathbb{C})$. We define the functions~$g_{\delta,m}$ on~$\mathcal{S}$ for $1\leq m\leq n+1$ as follows: \begin{displaymath} \begin{aligned} g_{\delta,m} &= \prod_{i=1}^{m} \prod_{\gamma\in K_0/K'} \act{\gamma}{\chi_{i,\delta}}. \end{aligned} \end{displaymath} \begin{lem} \label{lem:denom-weight} For every $1\leq m\leq n+1$, the function~$g_{\delta,m}$ is a nonzero symmetric modular form on~$\mathcal{S}$, and \begin{displaymath} \wt(g_{\delta,m}) = (\#\Sigma) \Heckedeg(\delta) \sum_{i=1}^{m} \wt(\chi_i). \end{displaymath} \end{lem} \begin{proof} By construction, the function~$g_{\delta,m}$ is a modular form of level~$K''$ and weight $\sum_{i=1}^m \# (K_0/K')\, \wt(\chi_i)$. We have $\# (K_0/K') = (\#\Sigma) \Heckedeg(\delta)$. Each modular form~$\act{\gamma}{\chi_{i,\delta}}$ is nonzero on every connected component of~$\Sh_{K''}(\mathbb{C})$ above~$\mathcal{S}$, hence~$g_{\delta,m}$ is nonzero as well. Acting by an element of~$K_0$ permutes the factors in the product defining~$g_{\delta,m}$, so~$g_{\delta,m}$ is in fact a symmetric modular form on~$\mathcal{S}$. \end{proof} \begin{prop} \label{prop:denom-valid} For every $1\leq m\leq n+1$, the coefficients of the multivariate polynomial~$g_{\delta,m} \Psi_{\delta,m}$ are symmetric modular forms on~$\mathcal{S}$. \end{prop} \begin{proof} By Definition~\ref{def:modeq}, the polynomial~$\Psi_{\delta,m}$ is a sum of terms of the form \begin{align*} \left( \prod_{i=1}^{m-1} \prod_{ \gamma_i} \Bigl(Y_i - \act{\gamma_i}{j_{i,\delta}} \Bigr) \right) \prod_{\gamma_m \in K_{m-1}/K_m} \Bigl(Y_m - \act{\gamma\gamma_m}{j_{m,\delta}} \Bigr) \end{align*} where~$\gamma\in K_0$ is fixed, and the middle product is over all $\gamma_i\in K_0/K_i$ such that $\gamma_i = \gamma$ modulo~$K_{i-1}$, but $\gamma_i\neq \gamma$ modulo~$K_i$. In this expression, all the cosets~$\gamma_i$ and~$\gamma\gamma_m$ are simultaneously disjoint as subsets of~$K_0/K'$. Each denominator is accounted for by some factor in the product defining~$g_{\delta,m}$, so the coefficients of~$g_{\delta,m}\Psi_{\delta,m}$ are modular forms. \end{proof} When the modular functions~$j_1,\ldots,j_{n+1}$ have similar denominators, it is possible to make a better choice for~$g_{\delta,m}$. \begin{prop} \label{prop:better-g} Assume that there exists a modular form~$\chi$ on~$\mathcal{S}$ such that for every~$i$, we have $\chi_i = \chi^{\alpha_i}$ for some integer~$\alpha_i\geq 0$. Let $1\leq m\leq n+1$, and define \begin{displaymath} g_{\delta,m} = \Bigl(\prod_{\gamma\in K_0} \act{\gamma}{\chi_\delta}\Bigr)^\alpha, \qquad\text{where } \alpha = \max_{1\leq i\leq m} \alpha_i. \end{displaymath} Then~$g_{\delta,m}$ is a nonzero symmetric modular form on~$\mathcal{S}$, and \begin{displaymath} \wt(g_{\delta,m}) = (\#\Sigma) \, \Heckedeg(\delta)\, \alpha \wt(\chi). \end{displaymath} Moreover, the coefficients of~$g_{\delta,m}\Psi_{\delta,m}$ are symmetric modular forms on~$\mathcal{S}$. \end{prop} The proof is similar to that of Proposition~\ref{prop:denom-valid}, and omitted. \subsection{Writing quotients of modular forms in terms of invariants} \label{sub:rewrite} Let~$f/g$ be a quotient of symmetric modular forms of weight~$w$ on~$\mathcal{S}$. We show that when we rewrite such a quotient in terms of the invariants~$j_1,\ldots,j_{n+1}$, the degree of the rational fractions we obtain is bounded linearly in~$w$. To make the proportionality constant explicit, we define the \emph{symmetric geometric complexity} of our invariants as follows. \begin{defn} \label{def:gc} Let~$f_k$ for $1\leq k\leq r$ be nonzero generators over~$L$ for the graded ring of symmetric modular forms on~$\mathcal{S}$, with respective weights~$w_k$. For each $1\leq k\leq r-1$, let~$\beta_k\geq 1$ be the minimal integer such that \begin{displaymath} \beta_k w_k \in \mathbb{Z} w_{k+1} + \cdots + \mathbb{Z} w_r. \end{displaymath} We can find nonzero modular forms $\lambda_k,\, \xi_k\in L[f_{k+1},\ldots,f_r]$ such that $\wt(\lambda_k) - \wt(\xi_k) = \beta_k w_k$. For every~$1\leq k\leq r-1$, the function~$\xi_k f_k^{\beta_k}/\lambda_k$ is a quotient of two symmetric modular forms of the same weight on~$\mathcal{S}$; hence there exist polynomials~$P_k,Q_k\in L[J_1,\ldots,J_{n+1}]$ such that \begin{displaymath} \dfrac{\xi_k f_k^{\beta_k}}{\lambda_k} = \dfrac{P_k(j_1,\ldots, j_{n+1})}{Q_k(j_1,\ldots,j_{n+1})}. \end{displaymath} Denote the total degrees of~$P_k$ and~$Q_k$ by~$\deg(P_k)$ and~$\deg(Q_k)$ respectively. We define the \emph{symmetric geometric complexity} of~$j_1,\ldots,j_{n+1}$ relative to the choice of~$f_k,\lambda_k,\psi_k,P_k,Q_k$ to be the positive rational number given by, either \begin{enumerate} \item \label{case:gc-simple} \begin{displaymath} \left(1+\max_{1\leq k\leq r-1} \frac{\wt(\xi_k)}{\beta_k w_k}\right) \max_{1\leq k\leq r-1} \frac{\deg(P_k)}{\beta_k w_k + \wt(\xi_k)}\,, \end{displaymath} if the following conditions are satisfied: for every~$1\leq k\leq r-1$, the modular forms~$\lambda_k$ and~$\xi_k$ are powers of~$f_r$ and~$f_{r-1}$ respectively (in particular~$\xi_{r-1}=1)$, and~$Q_{k}=1$; or \item \label{case:gc-gen} \begin{displaymath} \sum_{k= 1}^{r-1} \left( \dfrac{1}{\beta_k w_k} \max \bigl\{\deg(P_k),\deg(Q_k) \bigr\} \prod_{l=1}^{k-1}\left(1 + \dfrac{\wt(\xi_l)}{\beta_l w_l}\right) \right), \end{displaymath} otherwise. \end{enumerate} Note that formula~\ref{case:gc-simple}, when it applies, yields a smaller result than formula~\ref{case:gc-gen}. The \emph{symmetric geometric complexity} of~$j_1,\ldots,j_{n+1}$, denoted by~$\SGC(j_1,\ldots,j_{n+1})$, is the infimum of this quantity over all possible choices of modular forms~$f_k,\lambda_k,\xi_k$ and polynomials~$P_k,Q_k$. \end{defn} Given Definition~\ref{def:gc}, explicit upper bounds on the geometric complexity are easy to obtain if a generating set of modular forms is known. Note that the symmetric geometric complexity is invariant under permutations of the invariants~$j_1,\ldots,j_{n+1}$, in contrast with their \emph{geometric complexity} to be defined later, which takes into account the fact that~$j_{n+1}$ is considered differently in equation~\eqref{eq:jn+1}. \begin{prop} \label{prop:rewrite} Let~$w\geq 0$, let $f,\, g$ be symmetric modular forms on~$\mathcal{S}$ of weight~$w$, and assume that~$g$ is nonzero. Then there exist polynomials~$P,\, Q\in L[J_1,\ldots, J_{n+1}]$ of total degree at most~$\SGC(j_1,\ldots,j_{n+1})w$ such that \begin{displaymath} \dfrac{f}{g} = \dfrac{P(j_1,\ldots,j_{n+1})}{Q(j_1,\ldots,j_{n+1})}. \end{displaymath} Moreover,~$Q$ can be chosen independently of~$f$. \end{prop} \begin{proof} We keep the notation used in~Definition~\ref{def:gc}, and make a choice of generators~$f_k$ for~$1\leq k\leq r$, modular forms $\lambda_k,\xi_k$ for~$1\leq k\leq r-1$, and polynomials~$P_k,Q_k\in L[J_1,\ldots,J_{n+1}]$ for~$1\leq k\leq r-1$. Let~$C$ be symmetric geometric complexity of~$j_1,\ldots,j_{n+1}$ relative to this choice. Let~$f$,~$g$ be as in the proposition. Then~$f$ and~$g$ can be expressed as a sum of monomial terms of the form \begin{displaymath} c f_1^{\alpha_1}\cdots f_r^{\alpha_r} \qquad\text{with } c\in L \text{ and } \sum_{k=1}^r \alpha_k w_k = w. \end{displaymath} We give algorithms to rewrite the fraction~$P/Q = f/g$ (currently a rational fraction in terms of the modular forms~$f_k$) as a fraction of invariants, and bound the total degree of the output. \paragraph{Case~\ref{case:gc-simple} of~Definition~\ref{def:gc}.} We assume that~$\lambda_k$ and~$\xi_k$ are powers of~$f_r$ and~$f_{r-1}$ respectively for every $1\leq k\leq r-1$. In this case, for each~$1\leq k\leq r-2$, the integer~$\beta_k$ can be seen as the order of~$w_k$ in the group~$\mathbb{Z}/(\mathbb{Z} w_{r-1}+\mathbb{Z} w_r)$. We can write \begin{displaymath} w = \sum_{k=1}^{r-2} s_k w_k \quad(\text{mod } \mathbb{Z} w_{r-1}+ \mathbb{Z} w_r) \end{displaymath} for some integers $0\leq s_k < \beta_k$, and this determines the integers~$s_k$ uniquely (if such a linear combination vanishes, considering the smallest nonzero~$s_k$ yields a contradiction). Then each monomial appearing in~$P$ and~$Q$ is divisible by $f_1^{s_1}\cdots f_{r-2}^{s_{r-2}}$. After simplifying by this common factor, we can assume that the common weight~$w$ of~$P$ and~$Q$ satisfies~$w\in \mathbb{Z} w_{r-1}+\mathbb{Z} w_r$. Then, for each $1\leq k\leq r-2$, the exponent of~$f_k$ in each monomial of~$P$ and~$Q$ is divisible by~$\beta_k$. For convenience, write \begin{displaymath} a = \max_{1\leq k\leq r-1} \frac{\wt(\xi_k)}{\beta_kw_k}. \end{displaymath} In order to rewrite~$P/Q$ in terms of invariants, we proceed as follows. \begin{enumerate} \item \label{step:case1-M} Multiply~$P$ and~$Q$ by~$f_{r-1}^{\floor{aw/\wt(f_{r-1})}}$. \item \label{step:case1-R} For each $1\leq k\leq r-2$, replace each occurence of~$f_k^{\beta_k}$ by~$\lambda_k P_k/\xi_k$ in~$P$ and~$Q$. \item \label{step:case1-D} Let~$0\leq s_{r-1}< \beta_{r-1}$ be such that~$w = s_{r-1}w_{r-1}\mod w_r$, and divide~$P$ and~$Q$ by~$f_{r-1}^{s_{r-1}}$. \item \label{step:case1-R2} Replace each occurence of~$f_{r-1}^{\beta_{r-1}}$ by~$\lambda_{r-1} P_{r-1}$ in~$P$ and~$Q$. \item \label{step:case1-D2} Finally, divide~$P$ and~$Q$ by~$f_r^{(w-s_{r-1}w_{r-1})/w_r}$. \end{enumerate} This algorithm runs independently on each monomial of~$P$ and~$Q$. Let~$M = c\prod_{k=1}^r f_k^{\alpha_k}$, with~$c\in L$, be such a monomial after step~\ref{step:case1-M}. Let us show that the exponent of~$f_{r-1}$ in~$M$ remains nonnegative after step~\ref{step:case1-R}. In this step, we introduce a denominator given by \begin{displaymath} \prod_{k=1}^{r-2} \xi_k^{\alpha_k/\beta_k} = \prod_{k=1}^{r-2} f_{r-1}^{\frac{\wt(\xi_k)\alpha_k}{\wt(f_{r-1})\beta_k}}. \end{displaymath} We have \begin{displaymath} \sum_{k=1}^{r-2} \frac{\wt(\xi_k)\alpha_k}{\wt(f_{r-1})\beta_k} \leq a \sum_{k=1}^{r-2} \frac{\alpha_k w_k}{\wt(f_{r-1})} \leq \frac{aw}{\wt(f_{r-1})}, \end{displaymath} hence \begin{displaymath} \sum_{k=1}^{r-2} \frac{\wt(\xi_k)\alpha_k}{\wt(f_{r-1})\beta_k} \leq \floor{\frac{aw}{\wt(f_{r-1})}} \leq \alpha_{r-1} \qquad \text{by step~\ref{step:case1-M}} \end{displaymath} because the left hand side is an integer. Therefore, at the end of step~\ref{step:case1-R},~$M$ belongs to the polynomial ring~$L[J_1,\ldots,J_{n+1}][f_{r-1},f_r]$. Hence, we have~$M\in L[J_1,\ldots,J_{n+1}][f_{r-1}^{\beta_{r-1}},f_r]$ after step~\ref{step:case1-D}, and finally~$M\in L[J_1,\ldots,J_{n+1}]$ after step~\ref{step:case1-D2}. It remains to bound the total degree of~$M$ after step~\ref{step:case1-D2}. To do this, we consider the total weight of~$M$ in~$f_1,\ldots,f_{r-1}$. For each~$1\leq k\leq r-1$, the modular form~$\lambda_k$ is a power of~$f_r$; hence replacing~$f_k^{\beta_k}$ by~$\lambda_k P_k/\xi_k$ in steps~\ref{step:case1-R} or~\ref{step:case1-R2} reduces this weight by~$\beta_k w_k + \wt(\xi_k)$, and increases the total degree of~$M$ in~$J_1,\ldots,J_{n+1}$ by at most~$\deg(P_k)$. At the beginning of step~\ref{step:case1-R}, the total weight of~$M$ in~$f_1,\ldots,f_{r-1}$ is at most $(1+a)w$. Therefore the total degree of~$M$ in~$J_1,\ldots,J_{n+1}$ at the end of the algorithm is bounded above by \begin{displaymath} (1+a)w \max_{1\leq k\leq r-1} \frac{\deg(P_k)}{\beta_k w_k+\deg(\xi_k)} = Cw. \end{displaymath} \paragraph{Case~\ref{case:gc-gen} of~Definition~\ref{def:gc}.} In the general case, we perform replacements and simplifications in a sequential way. We start by defining integers~$z_k, d_k$ for~$0\leq k\leq r-1$ and~$s_k, a_k$ for~$1\leq k\leq r-1$ by induction as follows: \begin{itemize} \item $z_0 = w$ and $d_0 = 0$; \item For each~$1\leq k\leq r$, the integer~$0\leq s_k< \beta_k$ is defined by the relation \begin{displaymath} z_{k-1} = s_k w_k \quad(\text{mod } \mathbb{Z} w_{k+1} +\cdots + \mathbb{Z} w_r); \end{displaymath} \item $a_k =\displaystyle \floor{\frac{z_{k-1}}{\beta_k w_k}}$ for each $1\leq k\leq r-1$; \item $z_k = z_{k-1} - s_k w_k + a_k \wt(\xi_k)$ for each $1\leq k\leq r-1$; $\phantom{\displaystyle\frac12}$ \item $d_k = d_{k-1} + a_k \max\{\deg(P_k),\deg(Q_k)\}$ for each $1\leq k\leq r-1$. \end{itemize} In order to rewrite~$P/Q$ in terms of invariants, we use the following algorithm. For~$k=1$ up to~$k=r-1$, do: \begin{enumerate} \item \label{step:case2-D} Divide~$P$ and~$Q$ by~$f_k^{s_k}$; \item \label{step:case2-R} Replace each occurence of~$f_k^{\beta_k}$ by $\dfrac{\lambda_k P_k}{\xi_k Q_k}$ in~$P$ and~$Q$; \item \label{step:case2-M} Multiply~$P$ and~$Q$ by $\xi_k^{a_k} Q_k^{a_k}$. \end{enumerate} Finally, simplify the remaining occurences of~$f_r$. We prove the following statement~$(H_k)$ by induction for every $1\leq k\leq r$: \claimemph{$(H_k)$ At the beginning of the~$k$-th loop,~$P$ and~$Q$ are elements of $L[J_1,\ldots,J_{n+1}][f_k,\ldots,f_r]$ of weight~$z_{k-1}$, with total degree at most~$d_{k-1}$ in $J_1,\ldots,J_{n+1}$, such that \begin{displaymath} \dfrac{f}{g} = \dfrac{P(j_1,\ldots,j_{n+1})}{Q(j_1,\ldots,j_{n+1})}. \end{displaymath}} The statement~$(H_1)$ is true by definition of~$z_0$ and~$d_0$; assume that~$(H_k)$ is true for some~$k\geq 1$. Then we see, in order, that during the $k$-th loop: \begin{itemize} \item $z_{k-1} \in \sum_{i=k}^r \mathbb{Z} w_i$, so~$s_k$ is well defined. \item In each monomial of~$P$ and~$Q$, the exponent of~$f_k$ is of the form $a\beta_k + s_k$ for some integer $a\leq a_k$. Therefore step~\ref{step:case2-D} is an exact division, and after step~\ref{step:case2-R} there are no more occurences of~$f_k$ in~$P$ or~$Q$. \item After step~\ref{step:case2-M},~$P$ and~$Q$ are elements of $L[J_1,\ldots,J_{n+1}][f_{k+1},\ldots,f_r]$ of weight \begin{displaymath} z_{k-1} - s_k w_k + a_k \wt(\xi_k) = z_k. \end{displaymath} \end{itemize} It remains to show that the degree of~$P,\,Q$ in $J_1,\ldots,J_{n+1}$ is bounded by~$d_k$ after step~\ref{step:case2-M}. This comes from the following observation: during the $k$-th loop, we only multiply the polynomials in $J_1,\ldots, J_{n+1}$ already present by $P_k^b Q_k^{a_k - b}$ for some $0\leq b\leq a_k$. This proves our claim~$(H_k)$ for all $1\leq k\leq r$. At the end of the algorithm, all the occurences of~$f_r$ cancel out. Therefore we obtain polynomials~$P$ and~$Q$ of total degree at most~$d_{r-1}$ such that \begin{displaymath} \dfrac{f}{g} = \dfrac{P(j_1,\ldots, j_{n+1})}{Q(j_1,\ldots, j_{n+1})}. \end{displaymath} By induction, we obtain \begin{displaymath} z_k \leq w\prod_{l=1}^k \left(1 + \dfrac{\wt(\xi_l)}{\beta_l w_l} \right) \end{displaymath} and \begin{displaymath} d_{r-1} \leq \sum_{k= 1}^{r-1} \left( \dfrac{w}{\beta_k w_k} \max\{\deg(P_k),\deg(Q_k)\} \prod_{l=1}^{k-1}\left(1 + \dfrac{\wt(\xi_l)}{\beta_l w_l}\right) \right) = C w. \end{displaymath} In both cases~\ref{case:gc-simple} and~\ref{case:gc-gen}, the algorithm runs independently on the numerator and denominator, hence~$Q$ can be chosen independently of~$f$. \end{proof} \subsection{Degree bounds in canonical form} \label{sub:canonical} Recall that the modular function~$j_{n+1}$ satisfies eq.~\eqref{eq:jn+1}: we have~$E(j_1,\ldots,j_{n+1})=0$ where \begin{displaymath} E = \sum_{k = 0}^{e} E_k(J_1,\ldots,J_n)\,J_{n+1}^{\,k} \in L[J_1,\ldots,J_n,J_{n+1}] \end{displaymath} has degree~$e$ in~$J_{n+1}$ and is irreducible. Let~$d_E$ denote the total degree of~$E$ in the variables~$J_1,\ldots,J_n$. In this section, we work in the ring~$L(J_1,\ldots,J_n)[J_{n+1}]$ modulo~$E$. We say that a fraction $R\in L(J_1,\ldots,J_{n+1})$ is in \emph{canonical form} if~$R$ is a polynomial in~$J_{n+1}$ of degree at most~$e-1$. \begin{prop} \label{prop:canonical} Let~$d\geq 0$, let~$P,\,Q\in L[J_1,\ldots, J_{n+1}]$ be polynomials of total degree at most~$d$, and assume that $Q(j_1,\ldots,j_{n+1})$ is not identically zero. Let $R\in L(J_1,\ldots,J_n)[J_{n+1}]$ be the fraction in canonical form such that~$P/Q = R\mod E$. Then the total degree of~$R$ in~$J_1,\ldots,J_n$ is bounded above by $(e+2d_E)d$. \end{prop} \begin{proof} In this proof, degrees and coefficients are taken with respect to the variable~$J_{n+1}$ unless otherwise specified. First, we invert the denominator~$Q$. Consider the resultant \begin{displaymath} Z = \Res_{J_{n+1}}(Q, E) \in L[J_1,\ldots,J_n], \end{displaymath} which is nonzero by hypothesis. Let $U, V\in L[j_1,\ldots, j_{n+1}]$ be the associated Bézout coefficients, so that \begin{displaymath} Z = UQ + VE. \end{displaymath} The inverse of~$Q$ modulo~$E$ is~$U/Z$, so we have $P/Q = UP/Z \mod E$. It is well-known that~$Z$ (resp.~$Q$) has a polynomial expression of degree~$e$ (resp.~$e-1$) in the coefficients of~$Q$, and degree~$\deg(Q)$ in the coefficients of~$E$. Since the total degree of~$Q$ is at most~$d$, the total degrees of~$Z$ and~$UP$ in $J_1,\ldots,J_{n}$ are bounded above by~$d(e+d_E)$. The degree of~$UP$ in~$J_{n+1}$ is at most $d+e-1$. Now, we reduce~$UP/Z$ modulo~$E$ to obtain a numerator of degree at most~$e-1$ in~$J_{n+1}$. We can decrease this degree by 1 by multiplying above and below by~$E_e(J_1,\ldots,J_n)$ and using the relation \begin{displaymath} E_e J_{n+1}^{e} = - \sum_{k=0}^{e-1} E_k J_{n+1}^{k}\qquad \mod E. \end{displaymath} When doing so, the total degree in~$J_1,\ldots,J_n$ increases by at most~$d_E$. This operation is done at most~$d$ times; therefore the result has total degree at most~$(e+2d_E)d$ in~$J_1,\ldots,J_n$ and degree at most~$e-1$ in~$J_{n+1}$. \end{proof} \begin{defn} We define the \emph{geometric complexity} of the invariants~$j_1,\ldots,j_{n+1}$ to be \begin{displaymath} \GC(j_1,\ldots,j_{n+1}) = (e+2d_E) \SGC(j_1,\ldots,j_{n+1}) +e-1. \end{displaymath} This quantity depends on the choice of~$j_{n+1}$ as a distinguished invariant. \end{defn} \begin{prop} \label{prop:gc} Let~$w\geq 0$, let $f, g$ be symmetric modular forms on~$\mathcal{S}$ of weight~$w$, and assume that~$g$ is nonzero. Let~$R\in L(J_1,\ldots J_n)[J_{n+1}]$ be the rational fraction in canonical form such that \begin{displaymath} \frac{f}{g} = R(j_1,\ldots,j_{n+1}). \end{displaymath} Then the total degree of~$R$ in~$J_1,\ldots,J_{n+1}$ is bounded above by $\GC(j_1,\ldots,j_{n+1}) w$. \end{prop} \begin{proof} Combine Propositions~\ref{prop:rewrite} and~\ref{prop:canonical}. \end{proof} We are ready to prove the first part of Theorem~\ref{thm:main} on degree bounds for modular equations, with an explicit expression for the constant~$C_1$. \begin{thm} \label{thm:degree-bound-proved} Let~$H_\delta$ be an absolutely irreducible Hecke correspondence on~$\mathcal{S}\times \mathcal{T}$ defined by an adelic element~$\delta$ of~$G$, and let~$\Heckedeg(\delta)$ be the degree of~$H_\delta$. For each~$1\leq i\leq n+1$, let~$\chi_i$ be a denominator of~$j_i$ as in~§\ref{sub:denom}. Let~$1\leq m\leq n+1$. Finally, let \begin{displaymath} C_1 = GC(j_1,\ldots,j_{n+1})\,(\#\Sigma) \sum_{i=1}^m \wt(\chi_i). \end{displaymath} Then there exists a polynomial~$D_m\in L[J_1,\ldots,J_n]$ of total degree at most~$C_1\Heckedeg(\delta)$ such that~$D_m\Psi_{\delta,m}$ is a polynomial in~$J_1,\ldots,J_{n+1},Y_1,\ldots,Y_m$ whose total degree in~$J_1,\ldots,J_{n+1}$ is also bounded above by~$C_1 \Heckedeg(\delta)$. In particular, if~$\mathcal{F}\in L(J_1,\ldots,J_n)[J_{n+1}]$ is a coefficient of~$\Psi_{\delta,m}$, then the total degree of~$\mathcal{F}$ is bounded above by~$C_1 \Heckedeg(\delta)$. \end{thm} \begin{proof} Let~$g_{\delta,m}$ be the modular form on~$\mathcal{S}$ defined in~§\ref{sub:denom}, and let~$\mathcal{F}$ be a coefficient of~$\Psi_{\delta,m}$. By Proposition~\ref{prop:denom-valid}, the modular function~$\mathcal{F}(j_1,\ldots,j_{n+1})$ is of the form~$f/g_{\delta,m}$, where~$f$ is a modular form on~$\mathcal{S}$ of weight~$\wt(g_{\delta,m})$. By Lemma~\ref{lem:denom-weight}, we have \begin{displaymath} \wt(g_{\delta,m}) = (\#\Sigma) \Heckedeg(\delta) \sum_{i=1}^{m} \wt(\chi_i), \end{displaymath} so the degree bound on~$\mathcal{F}$ follows from Proposition~\ref{prop:gc}. By Proposition~\ref{prop:rewrite}, the denominator can be chosen independently of the coefficient of~$\Psi_{\delta,m}$ we consider, hence the existence of a common denominator~$D_m$ of the correct total degree. \end{proof} \subsection{Explicit degree bounds in dimension 2} \label{sub:degree-genus-2} Our methods provide new results about the degrees of the coefficients of modular equations of Siegel and Hilbert type for abelian surfaces, introduced in~§\ref{sub:siegel} and~§\ref{sub:hilbert} respectively. In the Hilbert case, we restrict to the quadratic field~$F = \mathbb{Q}(\sqrt{5})$, and consider modular equations in terms of Gundlach invariants. In both cases, we can take~$j_{n+1}=1$ and~$E = J_{n+1}-1$ in the notation of~§\ref{sub:modeq}. Then the notions of geometric complexity and symmetric geometric complexity coincide. \begin{lem} \label{lem:rewrite-siegel} Let~$j_1,j_2$, and~$j_3$ denote the Igusa invariants on the Siegel threefold $\Sp_4(\mathbb{Z})\backslash\mathbb{H}_2$, as defined in~§\ref{sub:siegel}. Then we have \begin{displaymath} \GC(j_1,j_2,j_3,1)\leq \frac16. \end{displaymath} \end{lem} \begin{proof} Recall that the graded $\mathbb{Q}$-algebra of Siegel modular forms of level~$\Sp_4(\mathbb{Z})$ is generated by \begin{displaymath} f_1 = I_6',\quad f_2 = I_{12}, \quad f_3 = I_4, \quad\text{and}\quad f_4 = I_{10}. \end{displaymath} We are in case~\ref{case:gc-simple} of Definition~\ref{def:gc}, since \begin{displaymath} \frac{I_6'I_4}{I_{10}} = j_1, \quad \frac{I_{12}I_4^2}{I_{10}^2} = j_2, \quad\text{and}\quad \frac{I_4^5}{I_{10}^2} = j_3. \end{displaymath} The definition gives \begin{displaymath} \SGC(j_1,j_2,j_3,1) \leq \left(1 + \frac23\right) \cdot \frac{1}{10} = \frac16. \end{displaymath} \end{proof} \begin{prop} \label{prop:degree-siegel} Let~$\ell$ be a prime number, and let~$\Psi_{\ell,m}$ for~$1\leq m\leq 3$ denote the Siegel modular equations of level~$\ell$ in Igusa invariants. Let~$\mathcal{F}\in \mathbb{Q}(J_1,J_2,J_3)$ be a coefficient of~$\Psi_{\ell,1}$ (resp.~$\Psi_{\ell,2}$ or~$\Psi_{\ell,3}$). Then the total degree of~$\mathcal{F}$ is bounded above by $5 \Heckedeg(\ell)/3$ (resp.~$10 \Heckedeg(\ell)/3$), where $\Heckedeg(\ell) = \ell^3 + \ell^2 + \ell + 1$. \end{prop} \begin{proof} The integer~$\Heckedeg(\ell)$ is the degree of the Hecke correspondence. The denominators of~$j_1,j_2,$ and~$j_3$ can be taken to be the modular forms~$I_{10},I_{10}^2$, and $I_{10}^2$. Let~$g_{\ell,m}$ for~$1\leq m\leq 3$ be the common denominators of the modular equations~$\Psi_{\ell,m}$ defined in Proposition~\ref{prop:better-g}, so that $g_{\ell,2} = g_{\ell,3} = g_{\ell,1}^2$ and $\wt(g_{\ell,1}) = 10 \Heckedeg(\ell)$. Then~$\mathcal{F}(j_1,j_2,j_3)$ is the quotient of two modular forms of degree~$10 \Heckedeg(\ell)$ (resp.~$20 \Heckedeg(\ell)$) on~$\mathcal{S}$, by Proposition~\ref{prop:better-g}. Therefore the result follows from Lemma~\ref{lem:rewrite-siegel} and Proposition~\ref{prop:gc}. \end{proof} \begin{lem} \label{lem:rewrite-hilbert} Let~$F = \mathbb{Q}(\sqrt{5})$, and let~$g_1,g_2$ denote the Gundlach invariants on the Hilbert surface~$\SL(\mathbb{Z}_F\oplus\mathbb{Z}_F^\vee) \backslash\mathbb{H}_1^2$, as defined in~§\ref{sub:hilbert}. Then we have \begin{displaymath} \GC(g_1,g_2,1) \leq \frac16. \end{displaymath} \end{lem} \begin{proof} Choose~$F_6,F_2$, and~$F_{10}$ as generators of the graded $\mathbb{Q}$-algebra of Hilbert modular forms of level $\SL(\mathbb{Z}_F\oplus\mathbb{Z}_F^\vee)$. We have \begin{displaymath} \frac{F_6F_2^2}{F_{10}} = g_2\quad\text{and}\quad \frac{F_2^5}{F_{10}}=g_1. \end{displaymath} Therefore we are in case~\ref{case:gc-simple} of Definition~\ref{def:gc}, and \begin{displaymath} \GC(g_1,g_2,1)\leq \left(1+\frac23 \right)\cdot\frac{1}{10} = \frac16. \end{displaymath} \end{proof} \begin{prop} \label{prop:degree-hilbert} Let~$F = \mathbb{Q}(\sqrt{5})$, let $\beta\in \mathbb{Z}_F$ be a totally positive prime, and let~$\Psi_{\beta,m}$ for~$m\in\{1,2\}$ denote the Hilbert modular equations of level~$\beta$ in Gundlach invariants. Let~$\mathcal{F}\in \mathbb{Q}(J_1,J_2)$ be a coefficient of~$\Psi_{\beta,1}$ or~$\Psi_{\beta,2}$. Then the total degree of~$\mathcal{F}$ is bounded above by~$10 \Heckedeg(\beta)/3$, where $\Heckedeg(\beta) = N_{F/\mathbb{Q}}(\beta)+1$. \end{prop} \begin{proof} The integer~$\Heckedeg(\beta)$ is the degree of the Hecke correspondence, and the automorphism group~$\Sigma$ used to define the Hilbert modular equations has order 2. We can take the modular~$F_{10}$ as denominator of both~$g_1$ and~$g_2$; the common denominators $g_{\beta,1} = g_{\beta,2}$ from Proposition~\ref{prop:better-g} have weight~$20 \Heckedeg(\beta)$, so the result follows from Lemma~\ref{lem:rewrite-siegel} and Proposition~\ref{prop:gc}. \end{proof} The degree bounds in Propositions~\ref{prop:degree-siegel} and~\ref{prop:degree-hilbert} are both reached experimentally. In the Siegel case with $\ell=2$, the maximum degree is~25; in the Hilbert case with $N_{F/\mathbb{Q}}(\beta) = 41$, the maximum degree is~140 \cite{milio_DatabaseModularPolynomials}. \section{Height estimates for modular equations} \label{sec:height-bound} Another important information when manipulating modular equations, besides their degrees, is the size of their coefficients. More precisely, we use the notion of \emph{heights} of elements, polynomials and rational fractions over a number field. The goal of this section is to prove part~\ref{item:height-bound} of Theorem~\ref{thm:main}, giving height bounds on coefficients of modular equations. As mentioned in the introduction, the proof is inspired by existing works on elliptic modular polynomials~\cite{pazuki_ModularInvariantsIsogenies2019}. First, we study the heights of modular equations evaluated at well-chosen points, using the fact that the underlying Hecke correspondence describes isogenous abelian varieties. Then we apply the main result of~\cite{kieffer_UpperBoundsHeights2020}, which gives a tight relation between the height of a rational fraction and the heights of sufficiently many of its evaluations. \subsection{Definition of heights} \label{sub:heights} Let us recall the well-known definitions. We use the following notation: \begin{itemize} \item $L$ is a number field of degree~$d_L$ over~$\mathbb{Q}$; \item $\mathcal{V}_L^0$ (resp.~$\mathcal{V}_L^\infty$) is the set of all nonarchimedean (resp.~archimedean) places of~$L$; and \item $\mathcal{V}_L = \mathcal{V}_L^0\sqcup \mathcal{V}_L^\infty$ is the set of all places of~$L$. \end{itemize} For each place~$v$ of~$L$, \begin{itemize} \item $L_v$ (resp.~$\mathbb{Q}_v$) denotes the completion of~$L$ (resp.~$\mathbb{Q}$) at~$v$, \item $d_v = [L_v:\mathbb{Q}_v]$ denotes the local extension degree of~$L/\mathbb{Q}$ at~$v$, and \item $|\cdot|_v$ denotes the normalized absolute value associated with~$v$. \end{itemize} We normalize the nonarchimedean absolute values of~$L$ in the following way: for each $v\in \mathcal{V}_L^0$, if~$p\in \mathcal{P}_\mathbb{Q}$ is the prime below~$v$, then $|p|_v = 1/p$. The (absolute logarithmic Weil) \emph{height} of projective tuples, affine tuples, elements, poly\-nomials and rational fractions over~$L$ is defined as follows. \begin{defn}~ Let~$n\geq 1$, and let~$y_0,\ldots,y_n\in L$. \label{def:heights} \begin{enumerate} \item The \emph{projective height} of~$(y_0:\cdots:y_n)\in \mathbb{P}^n_L$ is \begin{displaymath} \h(y_0:\cdots:y_n) = \sum_{v\in\mathcal{V}_L} \frac{d_v}{d_L} \log \bigl(\max_{0\leq i\leq n} |y_i|_v \bigr). \end{displaymath} \item The \emph{affine height} of~$(y_1,\ldots,y_n)\in L^n$ is the projective height of~$(1:y_1:\cdots:y_n)$: \begin{displaymath} \h(y_1,\ldots,y_n) = \sum_{v\in\mathcal{V}_L} \frac{d_v}{d_L} \log \bigl(\max\{1, \max_{1\leq i\leq n} |y_i|_v\} \bigr). \end{displaymath} In particular, for every~$y\in L$, we have \begin{displaymath} \h(y) = \sum_{v\in\mathcal{V}_L} \dfrac{d_v}{d_L} \log \bigl( \max\{1, |y|_v\} \bigr). \end{displaymath} \item Let~$P\in L[Y_1,\ldots,Y_n]$ be a multivariate polynomial over~$L$, and write \begin{displaymath} P = \sum_{k = (k_1,\ldots,k_n)\in \mathbb{N}^n} c_k Y_1^{k_1}\cdots Y_n^{k_n}. \end{displaymath} Let~$v\in\mathcal{V}_L$. We write \begin{displaymath} |P|_v = \max_{k\in \mathbb{N}^n} |c_k|_v \end{displaymath} and \begin{displaymath} \h(P) = \sum_{v\in\mathcal{V}_L} \dfrac{d_v}{d_L} \log \bigl(\max\{1, |P|_v\} \bigr). \end{displaymath} In other words,~$h(P)$ is the height of the affine tuple formed by all the coefficients of~$P$. \item Let $\mathcal{F}\in L(Y_1,\ldots,Y_n)$ be a multivariate rational fraction over~$L$, and choose coprime polynomials~$P,Q\in L[Y_1,\ldots,Y_n]$ such that $\mathcal{F} = P/Q$. Then we define~$\h(\mathcal{F})$ as the height of the projective tuple formed by all the coefficients of~$P$ and~$Q$. \end{enumerate} \end{defn} Here are a few elementary properties of heights. \begin{enumerate} \item Projective heights are well defined, by the product formula \cite[Lem.~B.2.1(a)]{hindry_DiophantineGeometry2000}. Therefore the height of a fraction is also well defined. \item Heights are independent of the ambient number field \cite[Lem.~B.2.1(c)]{hindry_DiophantineGeometry2000}, by another application of the product formula. In particular we note that \begin{displaymath} \sum_{v\in \mathcal{V}_L^\infty} \frac{d_v}{d_L}=1. \end{displaymath} \item If~$L=\mathbb{Q}$, then Definition~\ref{def:heights} coincides with the naive one given in the introduction. \end{enumerate} Informally, the height of an element $y\in L$ measures the amount of information needed to represent $y$. \subsection{Heights, evaluations and roots} \label{sub:height-frac} In this section, we state relations between \begin{enumerate} \item The height of a univariate polynomial over~$L$ and the height of its roots; \item The height of a multivariate polynomial or multivariate rational fraction over~$L$ with the heights of its values at special points. \end{enumerate} Several of the statements are easy consequences of the formul\ae\ from Definition~\ref{def:heights}, while others are more intricate and are proved by the author in a separate paper~\cite{kieffer_UpperBoundsHeights2020}. Let us start with the evaluation of polynomials; the following proposition is a slight generalization of \cite[Prop.~B.7.1]{hindry_DiophantineGeometry2000}. \begin{prop} \label{prop:multivariate-evaluation} Let~$d\geq 0$, let~$P\in L[Y_1,\ldots, Y_n]$ be a polynomial of total degree at most~$d$, let $1\leq m\leq n$, and let $y_1,\ldots, y_m\in L$. Write $Q = P(y_1,\ldots, y_m, Y_{m+1}, \ldots, Y_n)$. Then \begin{displaymath} \h(Q) \leq \h(P) + m\log(d+1) + d \h(y_1,\ldots,y_n). \end{displaymath} More generally, if\, $\mathcal{I}_1\sqcup\cdots\sqcup \mathcal{I}_r$ is a partition of~$\Zint{ 1, m}$, and if~$d_k\geq 0$ denotes an upper bound on the total degree of~$P$ in the variables~$Y_i$ for $i\in \mathcal{I}_k$, then \begin{displaymath} \h(Q) \leq \h(P) + \sum_{k=1}^r (\# \mathcal{I}_k) \log(d_k + 1 ) + \sum_{k=1}^r d_k \h\bigl((y_i)_{i\in \mathcal{I}_k}\bigr). \end{displaymath} \end{prop} \begin{proof} It is enough to prove the second statement. If $v\in\mathcal{V}_L^0$, we have \begin{displaymath} \bigl|P(y_1,\ldots,y_m, Y_{m+1},\ldots, Y_n) \bigr|_v \leq |P|_v \prod_{k=1}^r \Bigl (\max\bigl\{1, \max_{i\in \mathcal{I}_k} |y_i|_v \bigr\}\Bigr)^{d_k}. \end{displaymath} If $v\in\mathcal{V}_L^\infty$, the same estimate holds after multiplying the right hand side by the number of possible monomials in $Y_1,\ldots, Y_m$, which is \begin{displaymath} \prod_{k=1}^r (d_k + 1)^{\# \mathcal{I}_k}. \end{displaymath} Taking logarithms and summing gives the result. \end{proof} As a consequence, we can bound the height of a monic polynomial by the height of its roots. \begin{prop} \label{prop:pol-roots} Let $Q\in L[Y]$ be monic of degree~$d$, and let $\alpha_1,\dots,\alpha_d$ be its roots in the algebraic closure of~$L$. Then \begin{displaymath} \h(Q)\leq \sum_{i=1}^d \h(\alpha_k) + d\log 2. \end{displaymath} \end{prop} \begin{proof} Apply Proposition~\ref{prop:multivariate-evaluation} on the multivariate polynomial \begin{displaymath} P = \prod_{k=1}^d (Y_{d+1} - Y_k) \end{displaymath} with $m = d$, $y_k = \alpha_k$, and $\mathcal{I}_k = \{k\}$. Since the coefficients of~$P$ all belong to $\{-1, 0, 1\}$, we have $\h(P) = 0$. \end{proof} Conversely, the height of a univariate polynomial over~$L$ controls the height of its roots. \begin{prop} \label{prop:pol-root} Let $P\in L[Y]\backslash\{0\}$, and let~$\alpha$ be a root of~$P$. Then \begin{displaymath} h(\alpha) \leq h(P) + \log(2). \end{displaymath} \end{prop} \begin{proof} We reproduce the proof given in a lecture by F.~Pazuki. We can assume that~$P$ is monic. Let~$v\in \mathcal{V}_L$. We want to show that $|\alpha|_v\leq |P|_v$ if~$v\in\mathcal{V}_L^0$, and $|\alpha|_v\leq 2|P|_v$ if~$v\in \mathcal{V}_L^\infty$. Since~$P$ is monic, we always have~$|P|_v\geq 1$. Write~$P = X^n + \sum_{k=0}^{n-1} c_k Y^k$, for some~$n\geq 1$. If~$v\in \mathcal{V}_L^0$, we can assume that~$|\alpha|_v\geq 1$. Then \begin{displaymath} |\alpha|_v = \left|\sum_{i=0}^{n-1} c_k \alpha^k\right|_v \leq |P|_v |\alpha|_v^{n-1}, \end{displaymath} so~$|\alpha|_v\leq |P|_v$. If~$v\in \mathcal{V}_L^\infty$, we can assume that~$|\alpha|_v\geq 2$. Then, by the triangle inequality, we obtain \begin{displaymath} |\alpha|_v\leq |P|_v |\alpha_v|^{n-1}\left(1 + \frac{1}{|\alpha|_v} + \cdots +\frac{1}{|\alpha|_v^{n-1}}\right) \leq 2|\alpha|_v^{n-1}|P|_v, \end{displaymath} so~$|\alpha|_v\leq 2|P|_v$. Taking logarithms and summing over all places of~$L$ yields the result. \end{proof} We now turn to the more difficult questions of giving upper bounds on the height of a polynomial or rational fraction from its values at special points. Our choice is to consider (almost) consecutive integers. \begin{prop}[({\cite[Prop.~1.1]{kieffer_UpperBoundsHeights2020}})] \label{prop:main-poly} Let $\Zint{A,B}$ be an interval in~$\mathbb{Z}$. Write $D=B-A$ and $M=\max\{\abs{A},\abs{B}\}$. Let~$d\geq 1$, let~$P\in L[Y]$ be a univariate polynomial of degree at most~$d$, let~$N\geq d+1$, and let $y_1,\ldots,y_N$ be distinct elements of~$\Zint{A,B}$. Let~$H\geq 0$, and assume that $\h(P(y_i))\leq H$ for every $1\leq i\leq N$. Then we have \begin{displaymath} \h(P) \leq \frac{N}{N-d} H + D\log(D) + d\log(2M) + \log(d+1). \end{displaymath} \end{prop} Note that the bound on~$\h(P)$ is of the order of~$dH$ when~$N=d+1$, as suggested by the Lagrange interpolation formula. On the other hand, if we take for instance~$N=2d$, then the bound on~$\h(P)$ is roughly in~$O(H)$. This remark will be crucial in~§\ref{sub:height-end}, when we consider the evaluation of multivariate polynomials in each variable successively. \begin{prop}[({\cite[Prop.~1.2]{kieffer_UpperBoundsHeights2020}})] \label{prop:main-frac} Let $\Zint{A,B}$ be an interval in~$\mathbb{Z}$. Write $D=B-A$ and $M=\max\{\abs{A},\abs{B}\}$. Let~$d\geq 1$, and let~$\mathcal{F}\in L(Y)$ be a univariate rational fraction of degree at most~$d$. Let~$S$ be a subset of~$\Zint{A,B}$ containing no poles of~$\mathcal{F}$, let~$\eta\geq 1$, and let $H\geq \max\{4, \log(2M)\}$. Assume that \begin{enumerate} \item $\h(\mathcal{F}(y))\leq H$ for every $y\in S$. \item $S$ contains at least $D/\eta$ elements. \item $D \geq \max\{\eta d^3 H, 4 \eta d d_L\}$. \end{enumerate} Then we have \begin{displaymath} \h(F) \leq H + C_L\eta d\log (\eta dH) + d \log(2M) + \log(d+1), \end{displaymath} where~$C_L$ is a constant depending only on~$L$. We can take $C_\mathbb{Q}=960$. \end{prop} The bound on~$\h(\mathcal{F})$ given in Proposition~\ref{prop:main-frac} is roughly in~$O(H)$ as well, but the number of evaluation points that we have to consider is bounded from below in terms of~$H$. \subsection{Heights of abelian varieties} \label{sub:heights-AV} We fix a PEL setting as in~§\ref{sub:modeq}, and keep the notation used there. We also write $\mathcal{S} = \Gamma\backslash X_+$, where~$\Gamma$ is a subgroup of~$G(\mathbb{Q})_+$. Different types of heights can be defined for an abelian variety~$A$ over~$\overline{\Q}$. The \emph{Faltings height}~$h_F(A)$ is defined in \cite[§3]{faltings_EndlichkeitssaetzeFuerAbelsche1983} in terms of Arakelov degrees of metrized line bundles on~$A$. If~$A$ is given a principal polarization~$\mathcal{L}$, and $r\geq 2$ is an even integer, we can also define the \emph{Theta height of level~$r$} of~$(A,\mathcal{L})$, denoted by~$h_{\Theta,r}(A,\mathcal{L})$, as the projective height of level~$r$ theta constants of~$(A,\mathcal{L})$ \cite[Def.~2.6]{pazuki_ThetaHeightFaltings2012}. Finally, if~$A$ is an abelian variety with PEL structure over~$\overline{\Q}$ given by a point~$z\in \mathcal{S}$ where $j_1,\ldots, j_{n+1}$ are well defined, we can define the \emph{$j$-height} of~$A$ as \begin{displaymath} h_j(A) = h\bigl(j_1(A),\ldots, j_{n+1}(A)\bigr). \end{displaymath} We also write $\Hbar_F(A) = \max\{1,h_F(A)\}$ and define $\Hbar,\Hbar_{\Theta,r}$, and~$\Hbar_j$ similarly. The goal of this section is to relate the~$j$-heights of isogenous abelian varieties, under mild conditions related to the geometry of the moduli space. Such a relation is known for instance in the case of elliptic curves, taking the usual $j$-invariant as coordinate \cite[Thm.~1.1]{pazuki_ModularInvariantsIsogenies2019}. To this end, we relate the $j$-height with the Faltings height, since the latter behaves well with respect to isogenies. Theta heights are an intermediate step between concrete values of invariants and the Faltings height. More precisely, we use the two following results. \begin{prop} \label{prop:faltings-isog} Let~$A$,~$A'$ be abelian varieties over~$\overline{\Q}$, and assume that an isogeny $\varphi\colon A\to A'$ exists. Then \begin{displaymath} \bigl |h_F(A) - h_F(A') \bigr| \leq \dfrac{1}{2} \log(\deg \varphi). \end{displaymath} \end{prop} \begin{proof} This is a consequence of \cite[Lem.~5]{faltings_EndlichkeitssaetzeFuerAbelsche1983}. \end{proof} \begin{thm}[{(\cite[Cor.~1.3]{pazuki_ThetaHeightFaltings2012})}] \label{thm:theta-faltings} For every~$g\geq 1$, and every even~$r\geq 2$, there exists a constant~$C(g,r)$ such that the following holds. Let~$(A,\mathcal{L})$ be a principally polarized abelian variety of dimension~$g$ defined over~$\overline{\Q}$. Then \begin{displaymath} \Bigl|\Hbar_{\Theta,r}(A,\mathcal{L}) - \dfrac{1}{2}\Hbar_F(A)\Bigr| \leq C(g,r) \log \bigl(\min\{\Hbar_F(A), \Hbar_{\Theta,r}(A,\mathcal{L})\} +2 \bigr). \end{displaymath} We can take \begin{displaymath} C(g,r) = 1000 r^{2g} \log^5(r^{2g}). \end{displaymath} \end{thm} \subsection{Relating the $j$-height and the Faltings height} \label{sub:j-faltings} Using Theorem~\ref{thm:theta-faltings}, we can prove that the $j$-height and the Faltings height of a generic abelian variety with PEL structure are related. \begin{prop} \label{prop:j-faltings} There exists a nonzero polynomial~$P\in L[Y_1,\ldots Y_{n+1}]$ and a positive constant~$C$ such that the following holds: if~$A$ is the abelian variety with PEL structure associated with a point~$z\in \mathcal{S}$ where $j_1,\ldots, j_{n+1}$ are well defined and $P(j_1,\ldots,j_{n+1}) \neq 0$, and if~$A$ is defined over~$\overline{\Q}$, then \begin{displaymath} \dfrac{1}{C} \Hbar_F(A) \leq \Hbar_j(A) \leq C \Hbar_F(A). \end{displaymath} \end{prop} \begin{proof} By \cite[Thm.~5.17]{milne_IntroductionShimuraVarieties2005}, we can write $\mathcal{S} = \Gamma'\backslash X_+$ where~$\Gamma'$ is a congruence subgroup of~$G^\mathrm{der}$. Since $G^\mathrm{der}\subset \ker(\det)$, it embeds into~$\GSp_{2g}(\mathbb{Q})$, where $2g=\dim_\mathbb{Q} V$. Therefore, by \cite[Thm.~5.16]{milne_IntroductionShimuraVarieties2005}, we can find a congruence subgroup~$\Gamma''$ of~$G^\mathrm{der}$ and an even integer~$r\geq 4$ such that~$\Gamma''\backslash X_+$ embeds in the moduli space~$\mathcal{A}_{\Theta,r}$ of principally polarized abelian varieties of dimension~$g$ with level~$r$ Theta structure. We have a diagram \begin{equation} \label{diag:j-faltings} \begin{tikzcd} & \widetilde{\mathcal{S}} = \widetilde{\Gamma}\backslash X_+ \ar{ld}[swap]{p'} \ar{rd}{p''} & & \\ \mathcal{S} = \Gamma'\backslash X_+ & & \mathcal{S}'' = \Gamma'' \backslash X_+ \ar[r, hook, "\iota"] & \mathcal{A}_{\Theta, r} \end{tikzcd} \end{equation} where $\widetilde{\Gamma} = \Gamma'\cap\Gamma''$. The maps~$p'$ and~$p''$ are finite coverings. All the varieties and maps in this diagram are defined over~$\overline{\Q}$. The modular interpretation of diagram~\eqref{diag:j-faltings} is the following. Let~$(\Lambda, \psi)$ be the standard polarized lattice associated with the connected component~$\mathcal{S}$, as in Proposition~\ref{prop:modular-int-lattices}. We can find a sublattice~$\Lambda''\subset \nolinebreak \Lambda$, and $\lambda\in \mathbb{Q}^\times$ such that~$(\Lambda'',\lambda\psi)$ is principally polarized. A point~$z\in \mathcal{S}$ defines a complex structure~$x$ on $\Lambda\otimes\mathbb{R} = V(\mathbb{R})$, up to action of~$\Gamma$. Lifting~$z$ to $\widetilde{z}\in\widetilde{\mathcal{S}}$ corresponds to considering~$x$ up to action of~$\widetilde{\Gamma}$ only, and this group leaves~$\Lambda''$ and its level~$r$ Theta structure stable. Then the image of~$\widetilde{z}$ in~$\mathcal{A}_{\Theta, r}$ is then given by $(\Lambda'', x, \lambda\psi)$. In particular, if $\widetilde{z}\in \widetilde{\mathcal{S}}$, and if~$A$ and~$A''$ are the abelian varieties corresponding to the points~$p'(\widetilde{z})\in \mathcal{S}$ and~$\iota \circ p''(\widetilde{z})\in \mathcal{A}_{\Theta, r}$ respectively, then~$A$ and~$A''$ are linked by an isogeny of degree~$d = \#(\Lambda/\Lambda'')$. Hence, by Proposition~\ref{prop:faltings-isog} and Theorem~\ref{thm:theta-faltings}, we have \begin{align*} \bigl|\Hbar_F(A) - 2\Hbar_{\Theta,r}(A'')\bigr| &\leq \dfrac{\log(d)}{2} + C(g,r) \log\left(\min \{\Hbar_F(A), \Hbar_{\Theta,r}(A'')\} + 2 + \dfrac{\log(d)}{2}\right) \\ &\leq C_F \min\{\Hbar_F(A), \Hbar_{\Theta,r}(A'')\} \end{align*} with~$C_F = (2 + \log(d)) C(g,r)$. Therefore \begin{align} \label{eq:h-faltings} \Hbar_F(A) \leq (2 + C_F) \Hbar_{\Theta,r}(A''),\qquad \Hbar_{\Theta,r}(A'') \leq \frac{1+C_F}{2} \Hbar_F(A). \end{align} Now we relate the Theta height and the~$j$-height using relation between modular functions; the genericity hypothesis encoded in the polynomial~$P$ appears in this step. Denote by $\theta_0,\ldots, \theta_k$ the Theta constants of level~$r$. They define a projective embedding of~$\mathcal{A}_{\Theta, r}$, therefore the pullbacks of $\theta_1/\theta_0,\ldots, \theta_k/\theta_0$ generate the function field of~$\mathcal{S}''$. By definition, $j_1,\ldots, j_{n+1}$ are coordinates on~$\mathcal{S}$. To ease notation, we identify all these functions with their pullbacks to~$\widetilde{\mathcal{S}}$. By the primitive element theorem, there exists a function~$f$ on~$\widetilde{\mathcal{S}}$ such that both $(j_1,\ldots,j_{n+1},f)$ and~$(\theta_1/\theta_0,\ldots, \theta_k/\theta_0, f)$ are generating families for the function field of~$\widetilde{\mathcal{S}}$ over~$\overline{\Q}$. We choose polynomials \begin{displaymath} P_J\in \overline{\Q}[Y_1,\ldots,Y_{n+1},X] \quad\text{and}\quad P_\Theta\in \overline{\Q}[Y_1,\ldots,Y_k,X] \end{displaymath} such that~$P_J(j_1,\ldots,j_{n+1},X)$ and~$P_\Theta(\theta_1/\theta_0,\ldots,\theta_k/\theta_0,X)$ are (non necessarily monic) minimal polynomials of~$f$ over the function fields of~$\mathcal{S}$ and~$\mathcal{S}''$ respectively. We also choose polynomials $N_{J,i}, D_{J,i}\in \overline{\Q}[Y_1,\ldots,Y_k, X]$ for each~$1\leq i\leq n+1$, and $N_{\Theta,i}, D_{\Theta,i} \in \overline{\Q}[Y_1,\ldots,Y_{n+1},X]$ for each~$1\leq i\leq k$, such that the following equalities hold on~$\widetilde{\mathcal{S}}$: \begin{align*} j_i &= \frac{N_{J,i}}{D_{J,i}}(\theta_1/\theta_0,\ldots,\theta_k/\theta_0,f) &\text{for each } 1\leq i\leq n+1, \text{ and}\\ \theta_i/\theta_0 &= \frac{N_{\Theta,i}}{D_{\Theta,i}}(j_1,\ldots,j_{n+1},f) &\text{for each } 1\leq i\leq k. \end{align*} Let~$\widetilde{F}$ be the smallest Zariski closed subset of~$\widetilde{\mathcal{S}}$ such that outside~$\widetilde{F}$, the following properties are all satisfied: \begin{itemize} \item all the functions~$f$, $j_i$ for~$1\leq i\leq n+1$ and $\theta_i/\theta_0$ for~$1\leq i\leq k$ are well defined; \item the polynomials~$P_J(j_1,\ldots,j_{n+1},X)$ and~$P_\Theta(\theta_1/\theta_0,\ldots,\theta_k/\theta_0, X)$ do not vanish; \item the quantities~$D_{J,i}(\theta_1/\theta_0,\ldots,\theta_k/\theta_0,f)$ for~$1\leq i\leq k$ and $D_{\Theta,i}(j_1,\ldots,j_{n+1},f)$ for~$1\leq i\leq k$ do not vanish. \end{itemize} Then~$\widetilde{F}$ has codimension~$1$ in~$\widetilde{\mathcal{S}}$, hence $\mathcal{U} = \mathcal{S}\backslash p'(\widetilde{F})$ is open dense in $\mathcal{S}$. Let $P\in L[j_1,\ldots, j_{n+1}]$ be a polynomial such that $\{P\neq 0\}\subset \mathcal{U}$. Let $z\in \mathcal{S}$ be a point where $j_1,\ldots, j_{n+1}$ are well defined, take values in~$\overline{\Q}$, and satisfy $P(j_1,\ldots, j_{n+1})\neq 0$. We look at the diagram~\eqref{diag:j-faltings}, from left to right. Lift~$z$ to a point~$\widetilde{z}\in \widetilde{\mathcal{S}}$; by construction, $\widetilde{z}\notin \widetilde{F}$. By Propositions~\ref{prop:multivariate-evaluation} and~\ref{prop:pol-root}, we have \begin{equation} \label{eq:h-f} \Hbar\bigl(j_1(\widetilde{z}), \ldots, j_{n+1}(\widetilde{z}), f(\widetilde{z})\bigr) \leq C \Hbar\bigl(j_1(z),\ldots, j_{n+1}(z)\bigr) \end{equation} with~$C = \h(P_J) + (n+1)\log(d_J+1) +d_J+1$, where~$d_J$ denotes the total degree of~$P_J$ in~$Y_1\ldots,Y_{n+1}$. Writing $z'' = p''(\widetilde{z})$, we also have for every $1\leq i\leq k$, \begin{equation} \label{eq:h-theta} \Hbar(\theta_i/\theta_0(\widetilde{z})) \leq C \Hbar\bigl(j_1(\widetilde{z}), \ldots, j_{n+1}(\widetilde{z}), f(\widetilde{z})\bigr) \end{equation} with \begin{align*} C &= \h(N_{\Theta,i}) + \h(D_{\Theta,i}) + (n+2)\bigl(\log(\deg(N_{\Theta,i})+1)+\log(\deg(D_{\Theta,i})+1)\bigr)\\ &\quad + \deg(N_{\Theta,i}) + \deg(D_{\Theta,i}), \end{align*} where~$\deg$ denotes the total degree. Combining equations~\eqref{eq:h-f} and~\eqref{eq:h-theta}, we obtain \begin{displaymath} \Hbar\Bigl(\dfrac{\theta_1}{\theta_0}(z''), \ldots, \dfrac{\theta_k}{\theta_0}(z'')\Bigr)\leq C_\Theta \Hbar\bigl(j_1(z), \ldots, j_{n+1}(z)\bigr) \end{displaymath} where~$C_\Theta$ has an explicit expression in terms of the heigts and degrees of the polynomials~$P_J$ and~$N_{\Theta,i},D_{\Theta,i}$ for~$1\leq i\leq k$. Equivalently, in the notation above, we have \begin{displaymath} \Hbar_{\Theta,r}(A'')\leq C_\Theta \Hbar_j(A), \end{displaymath} so by~\eqref{eq:h-faltings} \begin{displaymath} \Hbar_F(A)\leq (2+C_F)C_\Theta \Hbar_j(A). \end{displaymath} Going through the diagram from right to left gives the reverse inequality \begin{displaymath} \Hbar_j(A) \leq \frac{(1+C_F)C_J}{2} \Hbar_F(A) \end{displaymath} where~$C_J$ is defined in a similar way to~$C_\Theta$ in terms of the polynomials~$P_\Theta$ and~$N_{J,i}, D_{J,i}$ for~$1\leq i\leq n+1$. \end{proof} Assume that the integers~$r$ and~$d$, the modular function~$f$, as well as the polynomials~$P_J,P_\Theta,N_{J,i},D_{J,i},N_{\Theta,i},$ and~$D_{\Theta,i}$ can be explicitly determined. Then both the polynomial~$P$ and the constant~$C$ in Proposition~\ref{prop:j-faltings} can be determined explicitly as well. We will do this computation in a slightly different way in~§\ref{sub:height-explicit} in the case of Igusa invariants on the Siegel threefold. From now on, we define~$\mathcal{U}$ to be the Zariski open set in~$\mathcal{S}$ where $j_1,\ldots, j_{n+1}$ are well defined and $P(j_1,\ldots, j_{n+1})\neq 0$. \begin{cor} \label{cor:j-isog} Let~$C$ be the constant from Proposition~\ref{prop:j-faltings}, let~$z$ and~$z'$ be points of~$\mathcal{U}$ and let~$A$ and~$A'$ be the abelian varieties with PEL structure associated with~$z$ and~$z'$ respectively. Assume that~$A$ and~$A'$ are defined over~$\overline{\Q}$, and are linked by an isogeny of degree~$d$. Then \begin{displaymath} \Hbar_j(A') \leq C^2(\Hbar_j(A) + \log d). \end{displaymath} \end{cor} \begin{proof} Combine Propositions~\ref{prop:faltings-isog} and~\ref{prop:j-faltings}. \end{proof} \begin{rem} We can presumably do better than Corollary~\ref{cor:j-isog}. For instance, when studying $j$-invariants of isogenous elliptic curves, one can prove that $|h(j(E)) - h(j(E'))|$ is bounded by logarithmic terms \cite[Thm.~1.1]{pazuki_ModularInvariantsIsogenies2019}. This is also the kind of bound provided by Theorem~\ref{thm:theta-faltings}. The rough estimate in Corollary~\ref{cor:j-isog} is sufficient for our purposes, but has the drawback that the constants we derive from it are very pessimistic. \end{rem} \subsection{Heights of evaluated modular equations} \label{sub:interpolation} Let~$\mathcal{U}$ (resp.~$\mathcal{U}'$) be an open set of~$\mathcal{S}$ (resp.~$\mathcal{T}$) where a relation between the~$j$-height and the Faltings height holds, as in Proposition~\ref{prop:j-faltings}. Define $\mathcal{U}_\delta\subset \mathcal{S}$ to be the Zariski open set of all points~$[x,g]\in \mathcal{S}$ such that $[x,g]\in \mathcal{U}$, and moreover the images of~$[x,g]$ under the (symmetrized) Hecke correspondence~$H_\delta$ all lie in~$\mathcal{U}'$: in other words $[\sigma(x), \sigma(g k \delta)]\in \mathcal{U}'$ for every $(k,\sigma)\in \nolinebreak K_0/K_{n+1}$, in the notation of~§\ref{sub:modeq}. Finally, we define~$\mathcal{V}_\delta\subset L^n$ to be the Zariski open set of all points~$(j_1,\ldots, j_n)$ where the equation~\eqref{eq:jn+1} given by~$E(j_1,\ldots,j_n, J_{n+1})$ has~$e$ distinct roots and the following property holds: if~$j_{n+1}$ is a root of~\eqref{eq:jn+1}, then $(j_1,\ldots, j_{n+1})$ are the invariants of some point $z\in \mathcal{U}_\delta$. In particular, the modular equations~$\Psi_{\delta,m}$ do not have poles on~$\mathcal{V}_\delta$. \begin{lem} \label{lem:equation-V} There exist a positive constant~$C$ independent of~$\delta$, and a nonzero polynomial $P_\delta \in L[J_1,\ldots,J_n]$ of total degree at most~$C \Heckedeg(\delta)$ such that $\{P_\delta(j_1,\ldots,j_n)\neq 0\}\subset \mathcal{V}_\delta$. \end{lem} \begin{proof} Let~$E\in L[J_1,\ldots,J_{n+1}]$ be the polynomial defined in~§\ref{sub:modeq}, of degree~$e$ in~$J_{n+1}$, so that the equation satisfied by~$j_{n+1}$ on~$\mathcal{S}$ takes the form~$E(j_1,\ldots,j_{n+1}) = 0$. Let~$R$ be the the resultant of~$E$ and its derivative with respect to~$J_{n+1}$. If~$R$ does not vanish at $(j_1,\ldots, j_n)\in L^n$, then the polynomial $E(j_1,\ldots,j_n,J_{n+1})\in L[J_{n+1}]$ has~$e$ distinct roots. Similarly, there is a polynomial~$Q\in L[J_1,\ldots, J_{n+1}]$ such that every tuple $(j_1,\ldots,j_{n+1})$ satisfying~\eqref{eq:jn+1} and such that $Q(j_1,\ldots,j_{n+1})\neq 0$ lies in the image of~$\mathcal{S}$. Let~$R'$ be the resultant of~$Q$ and~$E$ with respect to~$J_{n+1}$. If~$R'$ does not vanish at $(j_1,\ldots, j_n)$, then for every root~$j_{n+1}$ of~$E(j_1,\ldots,j_n,J_{n+1})$, the tuple $(j_1,\ldots,j_{n+1})$ lies in the image of~$\mathcal{S}$. Let~$\lambda, \lambda'$ be symmetric modular forms on~$\mathcal{S}$ and~$\mathcal{T}$ respectively, defined over~$L$, such that $\{\lambda\neq 0\}\subset \mathcal{U}$ and $\{\lambda'\neq 0\}\subset \mathcal{U}'$. These modular forms can be chosen independently of~$\delta$. As in~§\ref{sub:denom}, we construct the modular form \begin{displaymath} \lambda^\delta = \lambda \prod_{\gamma\in K_0/K'} \act{\gamma}{\lambda'_\delta} \end{displaymath} where~$\lambda'_\delta$ is the modular form~$[x,g]\mapsto \lambda'([x,g\delta])$ of level~$K'$. The modular form~$\lambda^\delta$ is defined over~$L$ and has weight \begin{displaymath} \wt(\lambda^\delta) = \wt(\lambda) + (\#\Sigma) \Heckedeg(\delta) \wt(\lambda'). \end{displaymath} Modular forms realize a projective embedding of~$\mathcal{S}$ by Theorem~\ref{thm:mf-algebraic}; therefore, possibly after increasing the weight by a constant independent of~$\delta$, we can find a symmetric modular form~$\xi$ defined over~$L$ such that $\wt(\lambda^\delta) = \wt(\xi)$ and the divisors of~$\lambda^\delta$ and~$\xi$ have no common codimension~1 components. By Proposition~\ref{prop:gc}, if we write \begin{displaymath} \dfrac{\lambda^\delta}{\xi} = \sum_{k=0}^{e-1} R_k(j_1,\ldots, j_n) j_{n+1}^{\,k} \qquad \text{where } R_k\in L(J_1,\ldots,J_n), \end{displaymath} then $\deg R_k\leq \GC(j_1,\ldots,j_{n+1})\wt(\lambda^\delta)$ for every~$0\leq k\leq e-1$. Taking the resultant of the polynomials~$\sum R_k J_{n+1}^k$ and~$E$ with respect to~$J_{n+1}$ yields a rational fraction~$R''\in L(J_1,\ldots,J_n)$ of total degree at most \begin{displaymath} (e-1) d_E + e\max_{0\leq k\leq e-1} \deg(R_k), \end{displaymath} where~$d_E$ denotes the total degree of~$E$ in~$j_1,\ldots,j_n$. If~$R'$,~$R''$ are well defined and do not vanish at $(j_1,\ldots,j_n)$, then for every root~$j_{n+1}$ of~\eqref{eq:jn+1}, the tuple~$(j_1,\ldots,j_{n+1})$ comes from a point~$z\in \mathcal{U}_\delta$. We take~$P_\delta$ to be the product of~$R$, $R'$, and the numerator of~$R''$. The polynomials~$R$ and~$R'$ are independent of~$\delta$, and the degree of~$R''$ is bounded above linearly in~$\Heckedeg(\delta)$. \end{proof} If upper bounds on the degree of equations defining~$\mathcal{U}$ and~$\mathcal{U}'$ are explicitly known, together with the polynomials~$E$ and~$Q$, then the proof of Lemma~\ref{lem:equation-V} allows us to determine a valid constant~$C$ explicitly. \begin{prop} \label{prop:height-modeq-evaluation} There exists a constant~$C$, independent of~$\delta$, such that the following holds. Let $(j_1,\ldots,j_{n})\in \mathcal{V}_\delta$, and let $1\leq m\leq n+1$. Then \begin{displaymath} h \bigl(\Psi_{\delta,m}(j_1,\ldots,j_n) \bigr) \leq C \Heckedeg(\delta) \bigl(\Hbar(j_1,\ldots,j_n) + \log\isogdeg(\delta) \bigr). \end{displaymath} \end{prop} \begin{proof} Let~$\mathcal{J}$ be the set of roots of equation~\eqref{eq:jn+1} at $(j_1,\ldots,j_n)$, and let $j_{n+1}\in \mathcal{J}$. Let~$[x,g]$ be a point of~$\mathcal{S}$ describing an abelian variety~$A$ with PEL structure whose invariants are $(j_1,\ldots,j_{n+1})$. For every~$\sigma\in \Sigma$, denote by~$A_\sigma$ the abelian variety with PEL structure associated with the point~$[\sigma(x),\sigma(g)]$. Then for every $\gamma = (\sigma,k)\in K_0/K_m$, the point~$[\sigma(x),\sigma(gk\delta)]$ describes an abelian variety~$A_\gamma$ which is related to~$A_\sigma$ by an isogeny of degree~$\isogdeg(\sigma(\delta)) = \isogdeg(\delta)$, by Corollary~\ref{cor:hecke-isog}. Therefore, by Corollary~\ref{cor:j-isog}, we have \begin{displaymath} \Hbar \bigl(\act{\gamma}{j_{1,\delta}}([x,g]),\ldots, \act{\gamma}{j_{n+1,\delta}}([x,g]) \bigr) \leq C (\Hbar \bigl(j_1,\ldots, j_{n+1}) + \log \isogdeg(\delta) \bigr). \end{displaymath} where the constant~$C$ is positive and independent of~$\delta$. By Definition~\ref{def:modeq}, the polynomial $\Psi_{\delta,m}(j_1,\ldots,j_n,j_{n+1})\in L[Y_1,\ldots,Y_m]$ is the evaluation of a certain multivariate polynomial at the values~$\gamma\cdot j_{i,\delta}([x,g])$, for $1\leq i\leq m$ and $\gamma\in K_0/K_i$, each appearing with degree~1. The number of such values is \begin{displaymath} d_1 + d_1d_2 + \cdots + d_1\cdots d_m \leq m\,(\#\Sigma) \Heckedeg(\delta). \end{displaymath} Therefore, by Proposition~\ref{prop:multivariate-evaluation}, we have \begin{displaymath} \begin{aligned} h\bigl(\Psi_{\delta,m}(j_1,\ldots,j_{n+1})\bigr) & \leq m \, (\#\Sigma) \Heckedeg(\delta) \log(2) + m\, (\#\Sigma) \Heckedeg(\delta)\, C \bigl(\Hbar(j_1,\ldots,j_{n+1}) + \log\isogdeg(\delta) \bigr) \\ &\leq C' \Heckedeg(\delta) \bigl(\Hbar(j_1,\ldots,j_{n+1}) + \log\isogdeg(\delta) \bigr). \end{aligned} \end{displaymath} where~$C$ and~$C'$ denote explicit constants independent of~$\delta$. In order to obtain $\Psi_{\delta,m}(j_1,\ldots,j_n)$, we interpolate a polynomial of degree~$e-1$ in~$j_{n+1}$ where~$\mathcal{J}$ is the set of interpolation points. By Propositions~\ref{prop:multivariate-evaluation} and~\ref{prop:pol-root}, we have \begin{displaymath} h(j_{n+1}) \leq C \Hbar(j_1,\ldots,j_n) \qquad\text{for every } j_{n+1}\in \mathcal{J}, \end{displaymath} where~$C$ is a constant independent on~$\delta$. The result follows by applying Proposition~\ref{prop:main-poly} with~$N=d+1$. \end{proof} The proof of Proposition~\ref{prop:height-modeq-evaluation} provides an explicit value of~$C$ if the constant from Corollary~\ref{cor:j-isog} is known. \subsection{Heights of coefficients of modular equations} \label{sub:height-end} We are ready to prove upper bounds on the heights of modular equations (the second part of Theorem~\ref{thm:main}) using Proposition~\ref{prop:height-modeq-evaluation} and the results on heights of fractions given in~§\ref{sub:height-frac}. From now on, we add subscripts to constants: for instance~$C_{\ref{prop:j-faltings}}$ denotes a constant \emph{larger than~$1$} such that Proposition~\ref{prop:j-faltings} holds with this value of~$C$. Moreover, we denote by~$C_{\log}$ a constant independent of~$\delta$ such that~$\log \Heckedeg(\delta)\leq C_{\log}\max\{1,\log\isogdeg(\delta)\}$. By Proposition~\ref{prop:d-l-relation}, we can take $C_{\log} = (\dim V)^2 + \log(C_{\ref{prop:d-l-relation}})$, where~$V$ denotes the~$\mathbb{Q}$-vector space defining the PEL datum. \begin{defn} \label{def:tree} We call an \emph{$(n, N_1, N_2)$-evaluation tree} a rooted tree of depth~$n$, arity~$N_1$ at depths~$0,\ldots,n-2$, and arity~$N_2$ at depth~$n-1$, such that every vertex but the root is labeled by an element of~$\mathbb{Z}$ and the sons of every vertex are distinct. Let~$T$ be an $(n,N_1,N_2)$-evaluation tree, and let $1\leq k\leq n$. The~$k$-th \emph{evaluation set}~$\mathcal{I}_k(T)$ of~$T$ is the set of points~$(y_1,\ldots,y_k)\in\mathbb{Z}^k$ such that~$y_1$ is a son of the root, and~$y_{i+1}$ is a son of~$y_i$ for every $1\leq i\leq k-1$. We say that~$T$ is \emph{bounded by~$M$} if the absolute value of every vertex is bounded above by~$M$. We say that~$T$ has \emph{amplitude~$(D_1, D_2)$} if for every vertex~$y$ of depth~$0\leq r\leq n-2$ (resp.\ depth~$n-1$) in~$T$, the sons of~$y$ lie in an integer interval of amplitude at most~$D_1$ (resp.~$D_2$); by definition, the amplitude of~$\Zint{A,B}$ is~$B-A$. Let~$T$ be an $(n,N_1,N_2)$-evaluation tree, let $a = (a_1,\ldots,a_n)\in\mathbb{Z}^n$, and let~$M\geq 1$ be an integer. Let~$\mathcal{F}$ be a coefficient of~$\Psi_{\delta,m}$ for some $1\leq m\leq n+1$, seen as a polynomial in the variables~$J_{n+1},Y_1,\ldots,Y_m$; hence~$\mathcal{F}\in L(J_1,\ldots,J_n)$. Write $\mathcal{F} = P/Q$ in irreducible form, and let $d = \deg(\mathcal{F})$; assume that $d\geq 1$. We say that~$T,a$ and~$M$ are \emph{valid evaluation data for~$\mathcal{F}$} if the following conditions are satisfied: \begin{enumerate} \item \label{cd:large-M} $T$ and~$a$ are bounded by~$M$ \item We have $M \geq 2 B \log^2(B+1)$, where \begin{displaymath} B= 4 C_{\ref{thm:degree-bound-proved}}^3 C_{\ref{prop:height-modeq-evaluation}} \Heckedeg(\delta)^4 \max\{1,\log \isogdeg(\delta)\}. \end{displaymath} \item $N_1 = 2d$ and $N_2\geq M$. \item $T$ has amplitude~$(4d, 2M)$. \item \label{cd:V-delta} For every $(y_1,\ldots,y_n)\in \mathcal{I}_n(T)$, the point \begin{displaymath} (j_1,\ldots,j_n) = (y_1y_n + a_1,\ldots, y_{n-1}y_n + a_{n-1}, y_n + a_n) \end{displaymath} belongs to~$\mathcal{V}_\delta$. \item \label{cd:coprime} For every $(y_1,\ldots,y_{n-1})\in \mathcal{I}_{n-1}(T)$, the two polynomials~$P$ and~$Q$ evaluated at the tuple $(y_1 Y + a_1,\ldots, y_{n-1}Y + a_{n-1}, Y + a_n)$ are coprime in~$L[Y]$. \item $Q(a_1,\ldots,a_n)\neq 0$. \end{enumerate} \end{defn} \begin{lem} \label{lem:interpolation-data} There exists a constant~$C$, independent of~$\delta$, such that the following holds. Let~$\mathcal{F}$ be a coefficient of~$\Psi_{\delta,m}$ of degree $d\geq 1$. Then there exist valid evaluation data~$(T, a, M)$ for~$\mathcal{F}$ such that \begin{equation} \label{eq:choice-M} C \Heckedeg(\delta)^4 \max\{1,\log^3(\isogdeg(\delta))\}\leq M< C \Heckedeg(\delta)^4 \max\{1,\log^3(\isogdeg(\delta))\} +1 \end{equation} and~$M\geq 4d[L:\mathbb{Q}]$. We can take \begin{displaymath} C = \max\{C_1,C_2,C_3\} \end{displaymath} where \begin{align*} C_1 &= 24 C_{\ref{thm:degree-bound-proved}}^3 C_{\ref{prop:height-modeq-evaluation}} \bigl(4 C_{\log} + \log( 24 C_{\ref{thm:degree-bound-proved}}^3 C_{\ref{prop:height-modeq-evaluation}}) +1\bigr),\\ C_2 &= 14 C_{\ref{thm:degree-bound-proved}}^2 + 5C_{\ref{lem:equation-V}}, \quad\text{and}\quad C_3 = 4 C_{\ref{thm:degree-bound-proved}} [L:\mathbb{Q}]. \end{align*} \end{lem} \begin{proof} Let~$M$ be as in~\eqref{eq:choice-M}. Condition~\ref{cd:large-M} in Definition~\ref{def:tree} holds because~$C\geq C_1$. We start by constructing the vector~$a$. Note that~$M\geq 2d+1$. Since~$Q$ is nonzero, and has degree at most~$d$ in~$Y_1$, we can find $a_1\in\mathbb{Z}$ such that $|a_1|\leq M$ and the polynomial~$Q(a_1,Y_2,\ldots,Y_n)$ is nonzero. Iterating, we find a vector $a = (a_1,\ldots,a_n)$ bounded by~$M$ such that $Q(a_1,\ldots,a_n)\neq 0$. We now build the evaluation tree~$T$ down from the root. Let~$P_\delta$ be an equation for the complement of~$\mathcal{V}_\delta$ as in Lemma~\ref{lem:equation-V}, and define \begin{displaymath} R_\delta = P_\delta(Y_1 Y_n + a_1,\ldots, Y_{n-1} Y_n + a_{n-1}, Y_n + a_n) \end{displaymath} which is a nonzero polynomial of degree at most~$2 C_{\ref{lem:equation-V}} \Heckedeg(\delta)$. Let~$R$ be the resultant with respect to~$Y_n$ of the two polynomials \begin{displaymath} P(Y_1 Y_n + a_1,\ldots, Y_{n-1} Y_n + a_{n-1}, Y_n + a_n) \end{displaymath} and \begin{displaymath} Q(Y_1 Y_n + a_1,\ldots, Y_{n-1} Y_n + a_{n-1}, Y_n + a_n). \end{displaymath} The polynomial~$R$ is nonzero and has total degree at most~$4d^2$. We want to choose~$2d$ values of~$y_1$, lying in an interval with amplitude at most~$4d$, such that neither~$R_\delta$ nor~$R$ vanishes when evaluated at $Y_1 = y_1$; this nonvanishing condition excludes at most~$4d^2+ 2 C_{\ref{lem:equation-V}} \Heckedeg(\delta)$ possible values of~$y_1$. At least one of the integer intervals of the form~$\Zint{5kd, (5k+4)d}$ for~$0\leq k\leq 2d+C_{\ref{lem:equation-V}} \Heckedeg(\delta)/d$ contains at least~$2d$ valid choices of~$y_1$. Then~$\abs{y_1}$ is always bounded above by~$5(2d^2+C_{\ref{lem:equation-V}} \Heckedeg(\delta))+4d\leq M$, because~$C\geq C_2$. We iterate this procedure to construct~$T$ up to depth~$n-1$ with the right arity, bound and amplitude, such that the evaluations of the polynomials~$R_\delta$ and~$R$ are nonzero at every point $(y_1,\ldots,y_{n-1})\in \mathcal{I}_{n-1}(T)$. We conclude by constructing~$n$-th level of~$T$. Let $(y_1,\ldots,y_{n-1})\in \mathcal{I}_{n-1}(T)$. Then, as before, at most~$4d^2+ 2 C_{\ref{lem:equation-V}} \Heckedeg(\delta) \leq M$ values for~$y_n$ are forbidden as they make either~$R_\delta$ or~$R$ vanish. This leaves at least~$M$ available values for~$y_n$ in~$\Zint{-M,M}$. For every~$(y_1,\ldots,y_n)\in \mathcal{I}_n(T)$, the nonvanishing of the polynomials~$R_\delta$ and~$R$ at~$(y_1,\ldots,y_n)$ guarantees conditions~\ref{cd:V-delta} and~\ref{cd:coprime} of Definition~\ref{def:tree} respectively. Finally, the inequality~$C\geq C_3$ ensures that~$M\geq 4d[L:\mathbb{Q}]$. \end{proof} \begin{thm} \label{thm:height-bound-proved} Let~$H_\delta$ be an absolutely irreducible Hecke correspondence on~$\mathcal{S}\times \mathcal{T}$ defined by an element~$\delta\in G(\mathbb{A}_f)$, and let~$d(\delta)$ be the degree of~$H_\delta$. Let~$\mathcal{F}\in L(J_1,\ldots,J_n)$ be a coefficient of one of the modular equations~$\Psi_{\delta,m}$ for $1\leq m\leq n+1$. Then the height of~$\mathcal{F}$ is bounded above by~$C \Heckedeg(\delta)$, where~$C$ is a constant independent of~$\delta$; more precisely we can take \begin{align*} C = 2^{n-1} &\bpar{2 C_{\ref{prop:height-modeq-evaluation}} (1+C'') + 2 C_{\ref{prop:main-frac}} C_{\ref{thm:degree-bound-proved}} \bpar{\log(4 C_{\ref{thm:degree-bound-proved}} C_{\ref{prop:height-modeq-evaluation}}) + 2 C_{\log} +1 +C''} \\ &\quad + 4 C_{\ref{thm:degree-bound-proved}} (\log(C_{\ref{thm:degree-bound-proved}}) + C_{\log}) + 2C_{\ref{thm:degree-bound-proved}} (\log(2)+C'') + 2\log(2 C_{\ref{thm:degree-bound-proved}})+2 }, \end{align*} where $C'' = 3 + \log(2 C_{\ref{lem:interpolation-data}}) + 4 C_{\log}$. \end{thm} \begin{proof} By Lemma~\ref{lem:interpolation-data}, there exist valid evaluation data $(T,a,M)$ for~$\mathcal{F}$ such that the inequality $M \leq C_{\ref{lem:interpolation-data}} \Heckedeg(\delta)^4\max\{1,\log^3\isogdeg(\delta)\}+1$ holds. After scaling~$P$ and~$Q$ by an element of~$L^\times$, we can assume that $Q(a_1,\ldots,a_n) = 1$. Let $(y_1,\ldots,y_{n-1})\in \mathcal{I}_{n-1}(T)$, and write \begin{displaymath} \widetilde{\mathcal{F}}(Y) = \mathcal{F}(y_1Y + a_1,\ldots y_{n-1}Y + a_{n-1}, Y + a_n). \end{displaymath} For every son~$y_n$ of~$y_{n-1}$ in~$T$, we have \begin{displaymath} h\bigl(y_1y_n + a_1,\ldots, y_{n-1}y_n + a_n\bigr)\leq \log\bigl((M+1)M\bigr) \leq 2\log(M+1). \end{displaymath} Therefore, by Proposition~\ref{prop:height-modeq-evaluation}, \begin{align*} \h(\widetilde{\mathcal{F}}(y_n)) &\leq C_{\ref{prop:height-modeq-evaluation}} \Heckedeg(\delta) \bpar{2\log(M+1) + \log\isogdeg(\delta)}\\ &\leq 2 C_{\ref{prop:height-modeq-evaluation}} \Heckedeg(\delta) \bpar{\log(M+1) + \max\{1,\log\isogdeg(\delta)\}}. \end{align*} Denote this last quantity by~$H$. We have~$H\geq 4$ and~$H\geq \log(2M)$. Moreover, in the notation of Definition~\ref{def:tree}, the inequality~$M\geq 2B\log^2(B+1)$ ensures that \begin{displaymath} \frac{M}{\log(M+1)}\geq B \geq d^3\bpar{4 C_{\ref{prop:height-modeq-evaluation}} \Heckedeg(\delta) \max\{1,\log \isogdeg(\delta)\}}. \end{displaymath} Therefore~$M\geq d^3 H$. We are in position to apply Proposition~\ref{prop:main-frac} for the univariate rational fraction~$\widetilde{F}$ on the interval~$\Zint{-M,M}$, with~$\eta=2$, using the sons of~$(y_1,\ldots,y_{n-1})$ in~$T$ as evaluation points. We obtain \begin{align*} \h(\widetilde{\mathcal{F}}) &\leq H + 2 C_{\ref{prop:main-frac}} d\log(2dH) + d\log(2M) + \log(d+1)\\ &\leq C' \Heckedeg(\delta) \max\{1,\log \isogdeg(\delta)\}, \end{align*} where~$C'$ is a constant independent of~$\delta$. In order to obtain an explicit expression for~$C'$, we note that \begin{displaymath} \log(M+1)\leq C'' \max\{1,\log \isogdeg(\delta)\} \end{displaymath} where~$C''$ is defined as in the statement of the theorem. We check that we can take \begin{align*} C'&= 2 C_{\ref{prop:height-modeq-evaluation}} (1+C'') + 2 C_{\ref{prop:main-frac}} C_{\ref{thm:degree-bound-proved}} \bpar{\log(4 C_{\ref{thm:degree-bound-proved}} C_{\ref{prop:height-modeq-evaluation}}) + 2 C_{\log} +1 +C''}\\ &\qquad + C_{\ref{thm:degree-bound-proved}} (\log(2)+C'') + \log(2 C_{\ref{thm:degree-bound-proved}})+1. \end{align*} In the second part of the proof, we relate the height of~$\widetilde{\mathcal{F}}$ with the height of~$\mathcal{F}$. The quotient \begin{displaymath} \dfrac{P(y_1Y + a_1,\ldots, y_{n-1} Y + a_{n-1}, Y + a_n)}{Q(y_1 Y + a_1,\ldots, y_{n-1} Y + a_{n-1}, Y + a_n)} \end{displaymath} is a way to write~$\widetilde{\mathcal{F}}$ in irreducible form in~$L(Y)$, and has a coefficient equal to 1. Therefore~$\h(\widetilde{\mathcal{F}})$ is the affine height of the coefficients appearing in the quotient. Hence \begin{displaymath} \h\bigl(P(y_1 Y_n + a_1, \ldots, y_{n-1} Y_n + a_{n-1}, Y_n + a_n)\bigr) \leq C' \Heckedeg(\delta) \max\{1, \log\isogdeg(\delta)\} \end{displaymath} for every $(y_1,\ldots,y_{n-1})\in \mathcal{I}_{n-1}(P)$, and the same inequality holds for~$Q$. Since $N_1= 2d$, we can interpolate successively the variables~$y_{n-1},\ldots, y_1$, using Proposition~\ref{prop:main-poly} with~$2d$ evaluation points at each vertex of the tree~$T$. Finally we obtain \begin{align*} \h(\mathcal{F}) &\leq 2^{n-1}\bpar{C' \Heckedeg(\delta) \max\{1,\log \isogdeg(\delta)\} + 4d\log(4d) + d\log(2M) + \log(d+1)} \\ &\leq 2^{n-1} \bpar{C' + 4 C_{\ref{thm:degree-bound-proved}} (\log(C_{\ref{thm:degree-bound-proved}}) + C_{\log}) + C_{\ref{thm:degree-bound-proved}} (\log(2)+C'') \\ &\qquad\qquad + \log(2 C_{\ref{thm:degree-bound-proved}}) +1 } \Heckedeg(\delta) \max\{1,\log\isogdeg(\delta)\}. \end{align*} \end{proof} \subsection{Explicit height bounds in dimension 2} \label{sub:height-explicit} In this final section, we derive explicit height bounds for modular equations of Siegel type for abelian surfaces. Our first aim is to provide an explicit value for the constant in Corollary~\ref{cor:j-isog}, using Theta constants of level~4 as an intermediate step. To relate Theta heights and $j$-heights in this setting, we use Mestre's algorithm and Thomae's formul\ae\ instead of writing out polynomials~$N_{J,i},D_{J,i},N_{\Theta,i}$, and~$D_{\Theta,i}$ as in the proof of Proposition~\ref{prop:j-faltings}. \begin{prop} \label{prop:j-theta-as} Let $A$ be a principally polarized abelian surface defined over~$\overline{\Q}$ where~$j_1,j_2,j_3$ are well defined, and assume that~$j_3(A)\neq 0$. Then we have \begin{displaymath} \h_j(A) \leq 40 \h_{\Theta,4}(A) + 12 \quad\text{and}\quad \h_{\Theta,4}(A) \leq 200 \h_j(A) + 1000. \end{displaymath} \end{prop} \begin{proof} Recall the expression of Igusa invariants in terms of the Siegel modular forms $I_4,I_6',I_{10},$ and~$I_{12}$: \begin{equation} \label{eq:igusa-cov} j_1 = \dfrac{I_4 I_6'}{I_{10}},\quad j_2 = \dfrac{I_4^2I_{12}}{I_{10}^2},\quad\text{and}\quad j_3 = \dfrac{I_4^5}{I_{10}^2}. \end{equation} These modular forms have a polynomial expression in terms of theta constants of level~$4$: see for instance \cite[§II.7.1]{streng_ComplexMultiplicationAbelian2010}. The total degrees of the polynomials giving~$I_4,I_6',I_{10}$ and~$I_{12}$ are~$8, 12, 20$ and~$24$ respectively; they contain respectively~$10, 60, 1$ and~$15$ monomials, and their height is zero. Up to scaling, we may assume that the first theta constant~$\theta_0$ takes the value~$1$. Then, by Proposition~\ref{prop:multivariate-evaluation}, we have \begin{displaymath} \h(I_4^5 ,\, I_4 I_6' I_{10},\, I_4^2 I_{12},\, I_{10}^2) \leq 5\log(10) + 40 \h_{\Theta,4}(A), \end{displaymath} hence the first inequality \begin{displaymath} \h_j(A)\leq 40 \h_{\Theta,4}(A) + 12. \end{displaymath} For the second inequality, we follow Mestre's algorithm \cite{mestre_ConstructionCourbesGenre1991}. Starting from $j_1(A), j_2(A)$ and~$j_3(A)$, Mestre's algorithm constructs a hyperelliptic curve $y^2 = f(x)$ whose Jacobian is isomorphic to~$A$ over~$\overline{\Q}$. Up to scaling~$f$, we may take $I_{10} = 1$ in equation~\eqref{eq:igusa-cov}. Then we see that $j_1(A), j_2(A)$ and~$j_3(A)$ are realized by values of $I_2, I_4, I_6'$, and~$I_{10}$ in~$\overline{\Q}$ such that \begin{displaymath} \h(I_2,I_4,I_6',I_{10}) \leq h_j(A). \end{displaymath} The roots of~$f$ are the intersection points of a conic and a cubic in~$\mathbb{P}^2$ whose equations are given explicitly in terms of~$I_2,I_4,I_6$, and~$I_{10}$. In order to obtain the equation $\sum_{i,j=1}^3 c_{ij} z_i z_j = 0$ of the conic, we start from Mestre's equation $\sum_{i,j=1}^3 A_{ij} x_i x_j = 0$ and substitute the expressions of $A,B,C$, and~$D$ in terms of $I_2,I_4,I_6'$, and~$I_{10}$. Then we multiply by~$2^{11}3^{13}5^{14}$ and make the substitutions \begin{displaymath} z_1 = 202500x_1,\quad z_2 = 225x_2,\quad z_3 = x_3. \end{displaymath} Then, each coefficient~$c_{ij}$ has an expression as a multivariate polynomial in~$I_2,I_4$, and~$I_6'$ (recall that $I_{10} = 1$) of total degree at most~$7$; its coefficients are integers whose absolute values are bounded by~$324\cdot 10^6$. By Proposition~\ref{prop:multivariate-evaluation}, we have \begin{displaymath} \h\bpar{(c_{ij})_{1\leq i,j\leq 3}} \leq 7(h_j(A) + \log(3)) + 19.6 + 3\log(8) \leq 7h_j(A) + 33.6. \end{displaymath} If we restrict to $c_{11}, c_{12}$, and~$c_{22}$, then we obtain a smaller upper bound, since the total degree and the height of coefficients are at most~$5$ and~$18.3$ respectively. Similarly, the cubic equation, denoted by $\sum_{1\leq i\leq j\leq k\leq 3} c_{ijk}z_iz_jz_k = 0$, has total degree at most~11 in $I_2,I_4$, and~$I_6'$, and has integer coefficients whose heights are at most~$33.5$. In order to find the hyperelliptic curve equation~$f$, we parametrize the conic. Let us show that it contains a point~$P_0$ defined over~$\overline{\Q}$ such that $\h(P_0)\leq 5h_j(A) + 29.9$. We can assume that $c_{11}\neq 0$; otherwise we take $P_0 = (1:0:0)$. Let~$\alpha$ be a root of the monic polynomial \begin{displaymath} \alpha^2 + \dfrac{c_{12}}{c_{11}} \alpha + \dfrac{c_{22}}{c_{11}} =0. \end{displaymath} The point $P_0 = (\alpha:1:0)$ belongs to the conic, and by Proposition~\ref{prop:pol-root}, \begin{displaymath} \begin{aligned} \h(P_0) = \h(\alpha) &\leq \h(c_{11}, c_{12}, c_{22}) + \log(2) \\ &\leq 5(h_j(A) + \log(3)) + 18.3 + 3\log(6) + \log(2)\\ &\leq 5h_j(A) + 29.9. \end{aligned} \end{displaymath} We parametrize the conic using~$P_0$ as a base point; for simplicity, we continue to assume that~$c_{11}\neq 0$. For $(u:v)\in\mathbb{P}^1(\overline{\Q})$, the point $(z_1:z_2:z_3)$ defined by \begin{displaymath} \begin{aligned} z_1 &= \alpha(c_{11}u^2 + c_{13}uv + c_{33}v^2) - u((2c_{11}\alpha + c_{12})u + (c_{13}\alpha + c_{23})v), \\ z_2 &= c_{11}u^2 + c_{13} uv + c_{33}v^2, \quad\text{and} \\ z_3 &= - v((2c_{11}\alpha + c_{12})u + (c_{13}\alpha + c_{23})v) \end{aligned} \end{displaymath} runs through the conic. Substituting these expressions in the cubic equation gives the curve equation~$f$. The polynomials we obtain have total degrees at most~$29$ in $I_2,I_4$, and~$I_6'$; they have degree at most~$3$ in~$\alpha$; and their coefficients are integers whose heights are bounded above by~$86.9$. Therefore, by Proposition~\ref{prop:multivariate-evaluation} (separating $I_2,I_4,I_6'$ from $\alpha$), we have \begin{displaymath} \begin{aligned} \h(f) &\leq 29(h_j(A) + \log(3)) + 86.9 + 3(5h_j(A) + 29.9) + 3\log(30) + \log(4) \\ &\leq 44h_j(A) + 220.1. \end{aligned} \end{displaymath} Making~$f$ monic does not change its height. Thomae's formul\ae~\cite[IIIa.8.1]{mumford_TataLecturesTheta1984} give an expression of the Theta constants of level~4 of~$A$ in terms of roots of~$f$: if~$\theta$ is one of these Theta constants, then~$\theta^4$ is a product of 18 differences of roots of~$f$ (up to a common multiplicative factor). Therefore, by Proposition~\ref{prop:pol-root}, we obtain \begin{displaymath} h_{\Theta,4}(A,L) \leq \tfrac{1}{4}\cdot 18 (\h(f)+\log(4)) \leq 198 h_j(A) + 997. \end{displaymath} \end{proof} As a consequence, we obtain an explicit analogue of Corollary~\ref{cor:j-isog} in the case of isogenies between principally polarized abelian surfaces. \begin{prop} \label{prop:isog-as} Let~$A$ and~$A'$ be principally polarized abelian surfaces over~$\overline{\Q}$ where~$j_1,j_2,j_3$ are well defined, and assume that~$j_3(A)j_3(A')\neq 0$. Let~$d\geq 1$ be an integer. If~$A$ and~$A'$ are linked by an isogeny of degree~$d$, then we have \begin{displaymath} \Hbar_j(A') \leq 8000 \Hbar_j(A) + 1.08\cdot 10^{11} \log(\Hbar_j(A)) + 1.67\cdot 10^{12} + 20\log d. \end{displaymath} \end{prop} \begin{proof} By Theorem~\ref{thm:theta-faltings} and Proposition~\ref{prop:faltings-isog} and~\ref{prop:j-theta-as} (noting that $C(2,4)\leq 1.35\cdot 10^9$), we have \begin{align*} \Hbar_{\Theta,4}(A) &\leq 200 \Hbar_j(A) + 1000,\\ \tfrac12 \Hbar_F(A) &\leq \Hbar_{\Theta,4}(A) + C(2,4) \log(\Hbar_{\Theta,4}(A)+2) \\ &\leq 200 \Hbar_j(A) + C(2,4) \log(1202) + C(2,4)\log (\Hbar_j(A)), \\ \tfrac12 \Hbar_F(A')&\leq \tfrac12 \Hbar_F(A) + \tfrac14\log\ell,\\ \Hbar_{\Theta,4}(A') &\leq \tfrac12 \Hbar_F(A') + C(2,4) \log(\Hbar_F(A')+2) \\ &\leq 200 \Hbar_j(A) + C(2,4)\log(1202) + 2 C(2,4)\log(\Hbar_j(A)) + \tfrac14\log\ell \\ &\qquad + C(2,4) \log\bpar{402+2 C(2,4)\log(1202) + C(2,4) + \tfrac12\log\ell},\\ &\leq 200 \Hbar_j(A) + 2 C(2,4) \log(\Hbar_j(A)) + 4.17\cdot 10^{10} + \tfrac12\log\ell, \quad\text{and}\\ \Hbar_j(A') &\leq 40 \Hbar_{\Theta,4}(A) +12\\ &\leq 8000 \Hbar_j(A) + 80 C(2,4) \log\Hbar_j(A) + 1.67\cdot 10^{12} + 20\log\ell. \end{align*} \end{proof} In Lemma~\ref{lem:equation-V}, we take~$\lambda = I_4$ and $\lambda' = I_4 I_{10}$. We have \begin{displaymath} \wt(\lambda^\delta) = 14\Heckedeg(\delta)+4, \end{displaymath} which is greater than~16, the minimum weight for which Siegel modular forms define a projective embedding of~$\mathcal{S}$. Hence~$\xi$ can be chosen to be a modular form of weight~$\wt(\lambda^\delta)$. The fraction~$R''$ has degree at most~$\frac73(\Heckedeg(\delta)+1)$ by Lemma~\ref{lem:rewrite-siegel}; this is also an upper bound on~$\deg(P_\delta)$. We also mimic the proof of Proposition~\ref{prop:height-modeq-evaluation} in the Siegel case. Let~$[x,g]$ be a point of~$\mathcal{S}$ with Igusa invariants~$(j_1,j_2,j_3)\in\mathcal{V}_\delta$. For each~$1\leq m\leq 3$, by Remark~\ref{rem:simpler-modeqs}, the polynomial~$\Psi_{\delta,m}(j_1,j_2,j_3)$ is the evaluation of a multivariate polynomial in~$2 \Heckedeg(\delta)$ variables. Moreover, the Hecke correspondence describes isogenies of degree~$\ell^2$. By Proposition~\ref{prop:isog-as}, we have \begin{equation} \label{eq:height-eval-siegel} \h\bpar{\Psi_{\delta,m}(j_1,j_2,j_3)}\leq 2 \Heckedeg(\delta) \bpar{8000 \Hbar(j_1,j_2,j_3) + 1.08\cdot 10^{11} \log(\Hbar_j(A)) + 1.67\cdot 10^{12} + 40\log\ell}. \end{equation} Therefore, we can take \begin{displaymath} C_{\ref{prop:height-modeq-evaluation}} = 3.35 \cdot 10^{12}. \end{displaymath} Moreover, we have~$\Heckedeg(\delta) = \ell^3+\ell^2+\ell+1$ and~$\isogdeg(\delta) = \ell^2$. Hence we can take \begin{displaymath} C_{\log} = \frac32 + \log(2) \leq 2.2. \end{displaymath} We also take \begin{align*} C_{\ref{prop:main-frac}} &= 960 &\text{because } L=\mathbb{Q},\\ C_{\ref{thm:degree-bound-proved}} &= \frac{10}{3} &\text{by Proposition~\ref{prop:degree-siegel}}, \text{ and}\\ C_{\ref{lem:equation-V}} &= 15 &\text{since } \Heckedeg(\delta)\geq 15. \end{align*} In Lemma~\ref{lem:interpolation-data}, we can take \begin{displaymath} C_{\ref{lem:interpolation-data}} = 1.36 \cdot 10^{17} \end{displaymath} and in Theorem~\ref{thm:height-bound-proved}, we can take \begin{displaymath} C_{\ref{thm:height-bound-proved}} = 1.42 \cdot 10^{15}. \end{displaymath} Since~$d(\delta)\leq 2\ell^3$ and~$\max\{1,\log\ell(\delta)\}\leq 2\log(\ell)$, we obtain the following result. \begin{thm} \label{thm:explicit-height-siegel} Let~$\ell\geq 1$ be a prime number, and let~$\mathcal{F}\in \mathbb{Q}(J_1,J_2,J_3)$ be a coefficient of one of the Siegel modular equations of level~$\ell$ in Igusa invariants. Then we have \begin{displaymath} \h(\mathcal{F}) \leq 5.68 \cdot 10^{15} \ell^3 \log(\ell). \end{displaymath} \end{thm} In order to obtain tighter height bounds on Siegel modular equations, we could repeat the computations of~§\ref{sub:height-end} using an expression of the form~\eqref{eq:height-eval-siegel} for the height of evaluated modular equations, instead of the simpler formula used in Proposition~\ref{prop:height-modeq-evaluation}. However we cannot hope to obtain a constant in Theorem~\ref{thm:explicit-height-siegel} that is much smaller than~$C(2,4) \simeq 1.35\cdot 10^9$ using our methods. Experimentally, we observe that the tighter inequalities~$h(\mathcal{F})\leq 48.7\,\ell^3\log(\ell)$ and~$h(\mathcal{F})\leq 43.6\,\ell^3\log(\ell)$ hold for~$\ell=2$ and~$\ell=3$ respectively. We could also give an analogue of Theorem~\ref{thm:explicit-height-siegel} in the case of modular equations of Hilbert type for~$\mathbb{Q}(\sqrt{5})$ in Gundlach invariants. To replace Proposition~\ref{prop:j-theta-as}, we would use the relations between Gundlach and Igusa invariants (see for instance~\cite[§2.3]{milio_ModularPolynomialsHilbert2020}) and the explicit curve equation given by \cite[Prop.~A.4]{kieffer_ComputingIsogeniesModular2019}. We leave the precise calculations for future work. \begin{acknowledgement} The author thanks Fabien Pazuki and his Ph.D.~advisors, Damien Robert and Aurel Page, for answering the author's questions. The author also thanks the anonymous referees for helpful comments. Finally, acknowledgments are due to Aurel Page for his careful proofreading of an earlier version of the paper. \end{acknowledgement} \bibliographystyle{abbrv}
\section{Introduction} \label{S:intro} $\phantom{ab}$ \nopagebreak \subsection*{The general framework} $\phantom{ab}$ \nopagebreak Existence results for minimal surfaces have played a fundamental role in the development of the theory of minimal surfaces and more generally of Differential Geometry. Particularly important are the cases of embedded minimal (hyper)surfaces in Euclidean spaces or their quotients, embedded closed minimal (hyper)surfaces in the round spheres, properly embedded compact free boundary minimal (hyper)surfaces in Euclidean balls, closed embedded self-shrinkers for the mean curvature flow, and general closed embedded minimal (hyper)surfaces in closed Riemannian manifolds. Geometers have worked intensely on these directions and it is worth mentioning indicatively a sample of non-gluing results: by Scherk \cite{S}, by Lawson \cite{L2}, by Hsiang \cite{hsiang1}, by Kar\-cher-Pinkall-Sterling \cite{KPS}, by Hoffman-Meeks \cite{HM3}, by Fraser-Schoen \cite{fraser-schoen:2}, by Hoffman-Traizet-White \cite{white:helicoid}, by Marques-Neves \cite{neves:yau}, by Song \cite{song}, and by Chodosh-Mantoulidis \cite{mantoulidis:annals}. Gluing constructions by Partial Differential Equations (PDE gluing) methods have been very successful as well and hold further great promise. They are of two kinds: \emph{desingularization constructions} \cite{kapouleas:finite,kapouleas:compact,nguyenIII,kapshrinker,kapouleas:wiygul:toridesingularization,kapli} where the new surfaces resemble the union of given minimal surfaces intersecting along curves except in the vicinity of the intersection curves where they resemble singly periodic Scherk surfaces, and \emph{doubling constructions} \cite{kapouleas:clifford,Wiygul,FPZ,kapwiygul,kap,kapmcg} where the new surfaces resemble two (or more) copies of a given minimal surface joined by small catenoidal bridges; see also the survey articles \cite{kapouleas:survey,alm20}. We enumerate now some of the advantages of these gluing constructions. First, they provide new minimal surfaces which are almost explicit with well understood topology and geometry. In particular they are well suited for establishing the existence of infinitely many topological types of minimal surfaces in various situations. Second, the minimal surfaces constructed have low area, close to the total area of the ingredients, and so are important in classifications by increasing area. Third, the constructions are flexible, so they can be adjusted to apply to various different settings. Finally, doubling constructions hold great promise in high dimensions (for example \cite{kapouleas:Sn}) where very few existence results are currently known: even in Euclidean spaces the only complete embedded minimal hypersurfaces of finite geometry are the classical ones (hyperplane and high-dimensional catenoid). Note that new minimal hypersurfaces obtained via doubling are smooth in all dimensions by construction, similarly to the Constant Mean Curvature hypersurfaces in \cite{breiner:kapouleas:high}. Historically, PDE gluing methods have been applied extensively and with great success in Gauge Theories by Donaldson \cite{donaldson1986}, Taubes \cite{taubes1982,taubes1984,taubes1988}, and others. The particular kind of methods discussed here originate from Schoen's \cite{schoen} and NK's \cite{kapouleas:annals}, especially as they evolved and were systematized in \cite{kapouleas:wente:announce,kapouleas:wente,kapouleas:imc}. In the first doubling constructions \cite{kapouleas:clifford} the catenoidal bridges were attached to parallel copies of the given minimal surface to construct the initial surfaces, one of which was perturbed then to minimality. This approach turned out to be sufficient in some highly symmetric cases \cite{kapouleas:clifford,Wiygul,kapwiygul} where the symmetry does not allow horizontal forces and the surface modulo the symmetry is simple enough---although the constructions were still highly nontrivial. In most cases however this approach is not sufficient and for this reason NK introduced a powerful new approach called Linearized Doubling (LD) \cite{kap}. The LD approach was originally applied to construct doublings of a great two-sphere $\mathbb{S}^2$ in the round three-sphere $\mathbb{S}^3$ but was described for any given minimal surface $\Sigma$ \cite[Remark 3.21]{kap} embedded in a Riemannian three-manifold $N$ with an isometry of $N$ fixing $\Sigma$ pointwise and exchanging its sides. Given now such a $\Sigma$ let ${\mathcal{L}}_\Sigma$ be its Jacobi operator (see \ref{N:A}). The first step in the LD approach is to construct on $\Sigma$ a suitable family of Linearized Doubling (LD) solutions: an LD solution $\varphi$ is a singular solution of ${\mathcal{L}}_\Sigma \varphi=0$ with logarithmic singularities; equivalently $\varphi$ can be considered as a Green's function for ${\mathcal{L}}_\Sigma$ with multiple singularities of various strengths. In the second step the LD solutions are converted to approximately minimal ``initial surfaces'' with the aid of chosen finite dimensional obstruction spaces $\widehat{\mathscr{K}}[L]\subset C^\infty(\Sigma)$. The initial surface $M$ corresponding to an LD solution $\varphi$ consists of catenoidal bridges smoothly joined to the graphs of $\varphi+\underline{v}$ and $-\varphi-\underline{v}$ for some $\underline{v}\in \widehat{\mathscr{K}}[L]$ chosen to optimize the matching of the bridges with the graphs. Each bridge is located in the vicinity of a singular point of $\varphi$ and its size is given by the strength of the logarithmic singularity of $\varphi$ at the point. In the final step one of the initial surfaces is perturbed to exact minimality providing the desired new minimal surface. The LD approach effectively reduces doubling constructions to constructions of suitable families of LD solutions. This is similar in spirit to the reduction of constructions of CMC (hyper)surfaces \cite{schoen,kapouleas:annals,kapouleas:1991,breiner:kapouleas:low,breiner:kapouleas:high} to constructions of suitable families of approximately balanced graphs, the LD solutions playing the role of the graphs. The LD solutions used are also approximately balanced in the sense that they approximately satisfy a finite number of ``matching conditions'', some nonlinear \cite[Definitions 3.3 and 3.4]{kap}. Not surprisingly, because of the PDE's involved, the construction of approximately balanced LD solutions is much harder than the construction of balanced graphs. In the original article \cite{kap} the construction was carried out only in two cases: when the singularities lie on two parallel circles of $\mathbb{S}^2$, and when they lie on the equatorial circle and the poles. Subsequently in \cite{kapmcg} this was extended to an arbitrary number of circles, optionally including the poles. In both cases the constructions of the LD solutions make heavy use of the $\OZ$ symmetry of the background. Actually in \cite{kap,kapmcg} the construction of LD solutions is reduced to the construction of what we called \emph{rotationally invariant linearized doubling (RLD) solutions} \cite[Definition 3.5]{kapmcg}, which being $O(2)$-invariant, satisfy an ODE instead of a PDE and can be understood by using appropriate flux quantities. \subsection*{Brief discussion of the results} $\phantom{ab}$ \nopagebreak In Part I of this article we generalize the LD approach to apply to general situations by proving Theorem \ref{Ttheory} which we now describe informally. \begin{thmx}[Theorem \ref{Ttheory}] \label{TA} We assume given a \emph{background} $(\Sigma,N,g)$ with the \emph{base surface} $\Sigma$ a closed minimal two-sided surface embedded in the Riemannian three-manifold $(N,g)$ with Jacobi operator ${\mathcal{L}}_\Sigma$ (see \ref{N:A}) of trivial kernel on $\Sigma$ (see \ref{background} and \ref{cLker}). We assume given also a family of LD solutions on $\Sigma$ with appropriately uniform features, sufficiently small singularity strengths, and prescribable---when small---``unbalancing content'' (see \ref{A:FLD} for precise statements). There is then an \emph{initial surface $M\subset N$} (see \ref{Dinit}) which can be perturbed to a smooth closed embedded minimal surface doubling $\Sigma$ in $N$ of genus $2g_\Sigma-1+|L\llbracket {\widehat{\boldsymbol{\zeta}}}\rrbracket|$ where $g_\Sigma$ is the genus of $\Sigma$; moreover $M$ consists of catenoidal bridges smoothly joined to the graphs of $\varphi+\underline{v}_+$ and $-\varphi-\underline{v}_-$ over $\Sigma$, where \begin{enumerate}[label={(\roman*)}] \item $\varphi$ is one of the given LD solutions, \item each catenoidal bridge is located in the vicinity of a singular point of $\varphi$ with its size given by the strength of the logarithmic singularity of $\varphi$ at the point, and \item $\underline{v}_\pm \in \widehat{\mathscr{K}}[L]$ are chosen in \ref{Dinit} to optimize the matching of the bridges with the graph, where $\widehat{\mathscr{K}}[L]\subset C^\infty(\Sigma)$ is a finite dimensional obstruction space as in \ref{aK}. \end{enumerate} \end{thmx} The initial surface $M$ in Theorem \ref{TA} is one of a family of initial surfaces $M[\varphi, {\boldsymbol{\underline{\kappa}}}]$ defined in \ref{Dinit} and parametrized by the given LD solutions $\varphi$ and parameters ${\boldsymbol{\underline{\kappa}}}$ (see \ref{dalpha}). The construction of the initial surfaces is similar but more involved than in \cite{kap,kapmcg} where no ${\boldsymbol{\underline{\kappa}}}$ parameters are used. The main new features are that each catenoidal bridge can be elevated and tilted relative to $\Sigma$ as prescribed by ${\boldsymbol{\underline{\kappa}}}$ and $\underline{v}_+\ne\underline{v}_-$ when ${\boldsymbol{\underline{\kappa}}}\ne {\boldsymbol{0}}$. In \cite{kap,kapmcg} ${\boldsymbol{\underline{\kappa}}}\ne{\boldsymbol{0}}$ would violate the symmetry exchanging the two sides of the base surface; here however it introduces dislocations which (consistently with the \emph{geometric principle} \cite{kapouleas:survey,alm20}) allow us to deal with the antisymmetric (with respect to approximate exchange of the sides of $\Sigma$) component of the obstructions involved. Surprisingly the asymmetry of the sides of $\Sigma$ does not affect the nature of the families of LD solutions required or the mismatch operator \ref{Dmismatch}, so the LD solutions and their study are not sensitive to whether the sides of $\Sigma$ are symmetric or not. The proof of the theorem and the construction however require new ideas related to the introduction of the parameters ${\boldsymbol{\underline{\kappa}}}$ and the estimation of the mean curvature induced by a general Riemannian metric. Theorem \ref{TA} (or \ref{Ttheory}) not only generalizes the LD approach to the general case, but also makes the reduction to LD solutions explicit and systematic, unlike in \cite{kap,kapmcg}, where the reduction was described case by case. It is therefore a very powerful tool reducing doubling constructions to constructions of appropriate families of LD solutions, a much easier---but still very hard and open in general---problem. Note that although $\Sigma$ is assumed to be a closed surface in Theorem \ref{TA} (or \ref{Ttheory}), the theorem can be modified to apply to other situations as for example those in sections \ref{S:Cat} or \ref{S:ccat}. Moreover we expect that it will be an important step in proving a ``general'' doubling theorem asserting without any symmetry assumptions that any base surface $\Sigma$ with $|A|^2+\operatorname{Ric}(\nu,\nu)>0$ has infinitely many minimal doublings. As an example we next apply Theorem \ref{TA} to doublings of the Clifford torus $\mathbb{T}^2$. Recovering the doublings already known \cite{kapouleas:clifford,Wiygul} is fairly straightforward (see Remarks \ref{R:oldT} and \ref{R:uniqueness}). The catenoidal bridges in these doublings are located at the points of a $k\times m$ rectangular lattice $L$ with $k,m$ large ($m/k$ a priori bounded). We construct new doublings by allowing any $k\ge3$ (see Theorem \ref{Tcmain1} and for $k=1,2$ see Remark \ref{R:k12}), or by arranging for three bridges per fundamental domain when $k,m$ large (see Theorem \ref{Tcmain2}). Further results not discussed in this article are possible with more bridges per fundamental domain and any $k\ge3$. Note that the case of the Clifford torus is unusual because the background has $O(2)\times O(2)$ symmetry; the $O(2)\times\mathbb{Z}_2$-symmetric backgrounds on which we concentrate in Part II are not as symmetric but more common. In Part II we construct families of LD solutions for $O(2)\times\mathbb{Z}_2$-symmetric backgrounds $(\Sigma,N,g)$, which are then used to construct minimal doublings via Theorem \ref{TA}. This generalizes our earlier work in \cite{kap,kapmcg} where families of LD solutions are constructed in the case $\Sigma=\mathbb{S}^2 \subset N=\mathbb{S}^3$ and used to construct minimal doublings of $\mathbb{S}^2$. The assumptions on the background we choose in \ref{Aimm} are not the most general possible, but allow many interesting cases while avoiding further complications. They imply that the base surface $\Sigma$ is diffeomorphic to a sphere or torus and the nontrivial orbits of the action of $O(2)$ on $\Sigma$ are circles (see Lemma \ref{LAconf}); we call these circles \emph{parallel}. Calling ${\underline{\mathsf{S}}}$ the generator of the $\mathbb{Z}_2$ factor we have that ${\underline{\mathsf{S}}}$ fixes exactly one parallel circle when $\Sigma$ is a sphere and exactly two when $\Sigma$ is a torus; we call these circles \emph{equatorial}. The idea now (as in \cite{kap,kapmcg}) is to concentrate a large number of singularities on a prescribed number $k_{\mathrm{\circ}}$ of parallel circles and achieve partial (horizontal) balancing and unbalancing by studying the corresponding \emph{rotationally invariant (averaged) linearized doubling (RLD) solution} (defined in \ref{RL}). The balancing of the RLD's (see \ref{dLbalanced}) determines the approximate position of the parallel circles where the singularities concentrate. An interesting question is whether different numbers of singularities ($|m_i|$'s in the notation of \ref{dL}) can be prescribed in the vicinity of each of these $k_{\mathrm{\circ}}$ parallel circles. (In \cite{kap,kapmcg} we took all $m_i$'s to be the same large $m\in\mathbb{N}$.) Here with extra work we allow the number of singularities $|m_i|$ on some circles to be $2m$, and on the remaining circles to be $m$, for any $m\in\mathbb{N}$ large enough (see \ref{Ambold}). The imposed symmetry group on the constructions is a subgroup $\mathscr{G}_m$ of $O(2)\times\mathbb{Z}_2$ of order $4m$ in all cases (see \ref{dHcyl}). Note that the collection of the $m_i$'s is denoted by $\boldsymbol{m}$ and their signs prescribe a choice of alignment with respect to $\mathscr{G}_m$ (see \ref{dL} and \ref{RLcard}). Although not presented here, this can be further generalized to allowing the numbers $m_i$ to be any multiples of $m$ by small factors. The question however whether one can prescribe large $|m_i|$'s with a small greatest common divisor $m$, which would also imply a small imposed group of symmetries $\mathscr{G}_m$, is not understood yet. Given now $k_{\mathrm{\circ}}$ and $\boldsymbol{m}$ we want to construct a family of LD solutions with singularities as described above, and which can be used in Theorem \ref{TA} to provide a doubling of $\Sigma$. To achieve this we start by constructing a family of RLD solutions (see \ref{Nphik} and \ref{dLbalanced}). We next construct corresponding normalized maximally symmetric LD solutions (see \ref{Lphiavg}). By scaling these we obtain maximally symmetric LD solutions parametrized by an overall scaling parameter and the parameters of the RLD solutions which together we call ${\boldsymbol{\zeta}}^\top$ (see \ref{dParam} and \ref{dtau1}). When all $|m_i|=m$ these form the desired family. Otherwise in a last step we introduce more parameters called ${\boldsymbol{\zeta}}^\perp$ (see \ref{dParam}) which dictate perturbations of the maximally symmetric LD solutions (see \ref{dtau2}). These form the desired family parametrized by ${\boldsymbol{\zeta}}=({\boldsymbol{\zeta}}^\top,{\boldsymbol{\zeta}}^\perp)$. Estimating carefully we obtain the main result of Part II as follows. \begin{thmx}[Theorem \ref{Trldldgen}] \label{TB} Given a background $(\Sigma,N,g)$ satisfying Assumption \ref{Aimm} there is a minimum $k_{\circ}^{\mathrm{min}}\in\mathbb{N}$ (see \ref{Dkmin}) such that for each $k_{\mathrm{\circ}} \in\mathbb{N}$ with $k_{\mathrm{\circ}} \geq k_{\circ}^{\mathrm{min}}$ and any $\boldsymbol{m} \in \{m, -m, -2m\}^{ \lceilk_{\mathrm{\circ}}/2\rceil } $, with $m$ large enough in terms of $k_{\mathrm{\circ}}$, there is a family of LD solutions satisfying the required assumptions (see \ref{A:FLD}) in Theorem \ref{TA}, with the singularities concentrating along $k_{\mathrm{\circ}}$ parallel circles and the alignment and number of singularities at each circle prescribed by the entries of $\boldsymbol{m}$. \end{thmx} Combining this with Theorem \ref{TA} (or \ref{Ttheory}) we obtain \begin{thmx}[Theorem \ref{Tconstruct}] \label{TC} Given $(\Sigma,N,g)$, $k_{\mathrm{\circ}}\in\mathbb{N}$, and any $\boldsymbol{m}$ as in Theorem \ref{TB}, there is a minimal doubling containing one catenoidal bridge close to each singularity of one of the LD solutions in Theorem \ref{TB}. Moreover as $m\to\infty$ with fixed $k_{\mathrm{\circ}}$ the corresponding minimal doublings converge in the appropriate sense to $\Sigma$ covered twice. \end{thmx} In Part III of this article we apply Theorem \ref{TC} (that is \ref{Tconstruct}) to construct new self-shrinkers of the mean curvature flow via doubling the spherical self-shrinker in Theorem \ref{Tmainsph} or via doubling the Angenent torus \cite{angenent} in Theorem \ref{Tmaintor}. We also construct by adjusting the results and proofs in Parts II and III, new complete embedded minimal surfaces of finite total curvature with four catenoidal ends in the Euclidean three-space via doubling the catenoid in Theorem \ref{Tmaincat}, and new free boundary embedded minimal surfaces in the unit ball via doubling the critical catenoid in Theorem \ref{Tmainccat}. \subsection*{Outline of strategy and main ideas} $\phantom{ab}$ \nopagebreak In this article we define the catenoidal bridges $\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ as truncated catenoids in cylindrical Fermi coordinates at a singular point $p\in \Sigma$ of the corresponding LD solution $\varphi$. $\tau_p$ determines the size of the catenoid and ${\underline{\kappa}}_p = \kappa^{\perp}_p + {{\kappa}}_p$ its elevation in the normal direction and the tilt of its axis relative to the normal (see \ref{Dinit}). The construction of the bridges is simpler than in \cite{kap}, at the expense that now the bridges are only approximately minimal and their mean curvature has to be estimated and corrected. The estimation of the mean curvature on the bridges is done in two steps. First, we decompose the metric of $N$ in the vicinity of $p$ as $g = \mathring{g}+ h$, where $\mathring{g}$ is a Euclidean metric induced by Fermi coordinates and $\left. h \right|_p =0 $ (see \ref{dgeopolar}). $\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ is exactly minimal with respect to $\mathring{g}$ and the mean curvature induced by $g$ can be expressed in terms of tensor fields induced by $h$. Second, using properties of cylindrical Fermi coordinates, we estimate these tensors on $\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ in terms of the background geometry near $p$. An important feature is that the dominant term in the mean curvature of $\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ is driven by the second fundamental form $\left. A^\Sigma \right|_p $, and without the observation that the projection of the mean curvature to the first harmonics satisfies better estimates (see \ref{LH} and \ref{LH2}), this term would be too large for our purposes when $\left. A^\Sigma \right|_p \ne 0 $. (Note that in \cite{kapouleas:clifford,Wiygul} the symmetries kill the first harmonics completely.) In the definition of the global H\"older norms (see \ref{D:norm}) we use a stronger weight on the graphical regions and for the first harmonics on the catenoidal regions. On the graphical regions this parallels \cite[4.12]{kap} and leads to stronger estimates than those in \cite{kapouleas:clifford}. We now discuss Part II of this article. A large part of the effort in estimating the LD solutions, as in \cite{kapmcg}, lies in understanding and estimating in detail the RLD solutions. Achieving this is helped by the observation that the class of LD solutions is invariant under conformal changes of the intrinsic metric of the surface, which allows us to estimate the RLD and LD solutions in each case we consider on the flat cylinder. The main tool that allows us to study the LD solutions in terms of their associated RLD solutions is a scale invariant flux $F^\phi$ which amounts to the logarithmic derivative of the RLD solution $\phi$. As in \cite{kapmcg}, the balancing and unbalancing questions for the RLD solutions are studied systematically using the fluxes. More specifically, the family of RLD solutions is built around an RLD solution whose fluxes at any two latitudes where bridges are placed in the corresponding initial surface are equal, and the unbalancing parameters are used, along with an additional parameter to control the overall scale, to prescribe up to error terms (see \ref{Lmatching}) the mismatch of the associated LD solutions. Finally to understand the families of the LD solutions in the case of different $m_i$'s we have to dislocate guided by the geometric principle introducing appropriate parameters; in the case we examine in this article there is only one more parameter for each $m_i=-2m$ (see \ref{Rlp}). In Part III the applications of the earlier results are fairly straightforward. For the catenoid and the critical catenoid we need some modifications to account for the noncompactness of the catenoid and the boundary of the critical catenoid. For the latter we follow more closely the methodology of \cite{kapwiygul} (see also \cite{kapli}) and we study the modified RLD's with an imposed Robin condition. Finally we remark that since the catenoid is conformally isomorphic to $\mathbb{S}^2_{\mathrm{eq}}$, some of the families of RLD and LD solutions we use for the catenoid doubling were constructed and estimated already in \cite{kapmcg}. \subsection*{General notation and conventions} \label{sub:not} $\phantom{ab}$ \nopagebreak \begin{notation} \label{NT} For $(N, g)$ a Riemannian manifold we use the following notation where $N$ or $g$ may be omitted when clear from context. \begin{enumerate}[label={(\roman*)}] \item For $A\subset N$ we write ${\mathbf{d}}^{N, g}_A$ for the distance function from $A$ with respect to $g$ and we define the \emph{tubular neighborhood of $A$ of radius $\delta>0$} by $ D^{N, g}_A(\delta):=\left \{p\in N:{\mathbf{d}}^{N, g}_A(p)<\delta\right\}. $ If $A$ is finite we may just enumerate its points in both cases, for example if $A=\{q\}$ we write ${\mathbf{d}}_q(p)$. \item We denote by $\exp^{N, g}$ the exponential map and by ${\mathrm{inj}}^{N, g}$ the injectivity radius of $(N,g)$, and by $\exp_p^{N, g}$ and ${\mathrm{inj}}_p^{N, g}$ the same at $p\in N$. \item If $S$ and $T$ are symmetric two-tensors on $N$, we define a two-tensor $S *_{g,N} T$ by requesting that in any local coordinates $(S *_{g,N} T)_{ij} = S_{ik} g^{kl} T_{lj}$. \item We denote the curvature endomorphism by $\operatorname{R}^{N,g} (X, Y)Z := [\nabla_X, \nabla_Y] Z - \nabla_{[X, Y]} Z$, curvature tensor by $\operatorname{Rm}^{N,g}(X, Y, Z, W) := \langle \operatorname{R}(X, Y)Z, W \rangle$ and Ricci tensor by $\operatorname{Ric}^{N,g}_{ij} = \tensor{\operatorname{Rm}}{_k_i_j^k}$, where $\operatorname{Rm}_{ijkl} := \operatorname{Rm}(\partial_i, \partial_j, \partial_k, \partial_l)$. Given $p\in N$ and $Y\in T_pN$, we define an endomorphism field $\operatorname{R}_Y : = \operatorname{R}(Y, \cdot)Y$ and a tensor $\operatorname{Rm}_Y: = \langle R(Y, \cdot)Y, \cdot\rangle$. With these conventions, note that $\operatorname{Ric}(Y,Y) = - \operatorname{tr}_{g, N} \operatorname{Rm}_Y$. \item \label{isom} We denote by ${\mathrm{Isom}}(N,g)$ the group of Isometries of $(N,g)$. \hfill $\square$ \end{enumerate} \end{notation} \begin{notation} \label{N:A} Given a two-sided hypersurface $S\subset N$ with smooth unit normal vector field $\nu$ in a Riemannian manifold $(N,g)$, let $A^S$ and $B^S$ respectively denote the scalar-valued second fundamental form and Weingarten map of $S$, and ${\mathcal{L}}_S$ the second variation of area or Jacobi operator (well known also to provide the linearization of the mean curvature change as in \ref{Lquad}), defined by \begin{equation} \label{E:Lcal} \begin{gathered} A^S(X, Y) :=\langle \nabla_X Y, \nu\rangle = \langle B^S(X), Y\rangle, \quad B^S(X) := -\nabla_X \nu, \qquad \forall X, Y\in C^\infty(T S), \\ {\mathcal{L}}_S:=\Delta_S + |A^S|^2+ \operatorname{Ric}(\nu, \nu). \end{gathered} \end{equation} \end{notation} \begin{notation} \label{NEuc} We denote by $g_{Euc}$ the standard Euclidean metric on $\mathbb{R}^n$ and by $g_{\mathbb{S}}$ the induced standard metric on $\mathbb{S}^n:=\{v\in\mathbb{R}^n: |v|=1\}$. By standard notation $O(n):= {\mathrm{Isom}}(\mathbb{S}^{n-1},g_\mathbb{S})$ (recall \ref{NT}\ref{isom} ). \end{notation} Our arguments require extensive use of cut-off functions and the following will be helpful. \begin{definition} \label{DPsi} We fix a smooth function $\Psi:\mathbb{R}\to[0,1]$ with the following properties: \begin{enumerate}[label=\emph{(\roman*)}] \item $\Psi$ is nondecreasing. \item $\Psi\equiv1$ on $[1,\infty)$ and $\Psi\equiv0$ on $(-\infty,-1]$. \item $\Psi-\frac12$ is an odd function. \end{enumerate} \end{definition} Given $a,b\in \mathbb{R}$ with $a\ne b$, we define smooth functions ${\psi_{\mathrm{cut}}}[a,b]:\mathbb{R}\to[0,1]$ by \begin{equation} \label{Epsiab} {\psi_{\mathrm{cut}}}[a,b]:=\Psi\circ L_{a,b}, \end{equation} where $L_{a,b}:\mathbb{R}\to\mathbb{R}$ is the linear function defined by the requirements $L(a)=-3$ and $L(b)=3$. Clearly then ${\psi_{\mathrm{cut}}}[a,b]$ has the following properties: \begin{enumerate}[label={(\roman*)}] \item ${\psi_{\mathrm{cut}}}[a,b]$ is weakly monotone. \item ${\psi_{\mathrm{cut}}}[a,b]=1$ on a neighborhood of $b$ and ${\psi_{\mathrm{cut}}}[a,b]=0$ on a neighborhood of $a$. \item ${\psi_{\mathrm{cut}}}[a,b]+{\psi_{\mathrm{cut}}}[b,a]=1$ on $\mathbb{R}$. \end{enumerate} Suppose now we have two sections $f_0,f_1$ of some vector bundle over some domain $\Omega$. (A special case is when the vector bundle is trivial and $f_0,f_1$ real-valued functions). Suppose we also have some real-valued function $d$ defined on $\Omega$. We define a new section \begin{equation} \label{EPsibold} {\boldsymbol{\Psi}}\left [a,b;d \, \right](f_0,f_1):= {\psi_{\mathrm{cut}}}[a,b\, ]\circ d \, f_1 + {\psi_{\mathrm{cut}}}[b,a]\circ d \, f_0. \end{equation} Note that ${\boldsymbol{\Psi}}[a,b;d\, ](f_0,f_1)$ is then a section which depends linearly on the pair $(f_0,f_1)$ and transits from $f_0$ on $\Omega_a$ to $f_1$ on $\Omega_b$, where $\Omega_a$ and $\Omega_b$ are subsets of $\Omega$ which contain $d^{-1}(a)$ and $d^{-1}(b)$ respectively, and are defined by $$ \Omega_a=d^{-1}\left((-\infty,a+\frac13(b-a))\right), \qquad \Omega_b=d^{-1}\left((b-\frac13(b-a),\infty)\right), $$ when $a<b$, and $$ \Omega_a=d^{-1}\left((a-\frac13(a-b),\infty)\right), \qquad \Omega_b=d^{-1}\left((-\infty,b+\frac13(a-b))\right), $$ when $b<a$. Clearly if $f_0,f_1,$ and $d$ are smooth then ${\boldsymbol{\Psi}}[a,b;d\, ](f_0,f_1)$ is also smooth. In comparing equivalent norms or other quantities we will find the following notation useful. \begin{definition} \label{Dsimc} We write $a\Sim_c b$ to mean that $a,b\in\mathbb{R}$ are nonzero of the same sign, $c\in(1,\infty)$, and $\frac1c\le \frac ab \le c$. \end{definition} We use the standard notation $\left\|u: C^{k,\beta}(\,\Omega,g\,)\,\right\|$ to denote the standard $C^{k,\beta}$-norm of a function or more generally tensor field $u$ on a domain $\Omega$ equipped with a Riemannian metric $g$. Actually the definition is completely standard only when $\beta=0$ because then we just use the covariant derivatives and take a supremum norm when they are measured by $g$. When $\beta\ne0$ we have to use parallel transport along geodesic segments connecting any two points of small enough distance and this may be a complication if small enough geodesic balls are not convex. In this paper we take care to avoid situations where such a complication may arise and so we will not discuss this issue further. We adopt the following notation from \cite{kap} for weighted H\"{o}lder norms. \begin{definition} \label{dwHolder} Assuming that $\Omega$ is a domain inside a manifold, $g$ is a Riemannian metric on the manifold, $k\in \mathbb{N}_0$, $\beta\in[0,1)$, $u\in C^{k,\beta}_{\mathrm{loc}}(\Omega)$ or more generally $u$ is a $C^{k,\beta}_{\mathrm{loc}}$ tensor field (section of a vector bundle) on $\Omega$, $\rho,f:\Omega\to(0,\infty)$ are given functions, and that the injectivity radius in the manifold around each point $x$ in the metric $\rho^{-2}(x)\,g$ is at least $1/10$, we define $$ \left\|u: C^{k,\beta} ( \Omega,\rho,g,f)\right\|:= \sup_{x\in\Omega}\frac{\,\left\|u:C^{k,\beta}(\Omega\cap B_x, \rho^{-2}(x)\,g)\right\|\,}{f(x) }, $$ where $B_x$ is a geodesic ball centered at $x$ and of radius $1/100$ in the metric $\rho^{-2}(x)\,g$. For simplicity we may omit any of $\beta$, $\rho$, or $f$, when $\beta=0$, $\rho\equiv1$, or $f\equiv1$, respectively. \end{definition} $f$ can be thought of as a ``weight'' function because $f(x)$ controls the size of $u$ in the vicinity of the point $x$. $\rho$ can be thought of as a function which determines the ``natural scale'' $\rho(x)$ at the vicinity of each point $x$. Note that if $u$ scales nontrivially we can modify appropriately $f$ by multiplying by the appropriate power of $\rho$. Observe from the definition the following multiplicative property: \begin{equation} \label{E:norm:mult} \left\| \, u_1 u_2 \, : C^{k,\beta}(\Omega,\rho,g,\, f_1 f_2 \, )\right\| \le C(k)\, \left\| \, u_1 \, : C^{k,\beta}(\Omega,\rho,g,\, f_1 \, )\right\| \,\, \left\| \, u_2 \, : C^{k,\beta}(\Omega,\rho,g,\, f_2 \, )\right\|. \end{equation} \begin{definition} \label{dgraph} Given a function $f$ on a domain $\Omega$ of a two-sided hypersurface $\Sigma$ of a Riemannian manifold $(N, g)$, we define $\text{\emph{Graph}}^{N,g}_\Omega (f)$ by \begin{align*} \text{\emph{Graph}}^{N,g}_\Omega (f) = \left\{ \exp^{N, g}_q \left( f(q) \left. \nu\right|_q \right) : q \in \Omega\right\} . \end{align*} \end{definition} \begin{definition}[tilting rotations $\mathsf{R}_\kappa$] \label{dRk} Let $\kappa : V \rightarrow V^\perp$ be a linear map, where $V$ is a two-di\-men\-sion\-al subspace of a three-dimensional Euclidean vector space $W$ and $V^\perp$ denotes the orthogonal complement of $V$ in $W$. If $\kappa \neq 0$, we define $\mathsf{R}_\kappa$ to be the rotation of $W$ about the line $\ker \kappa$ characterized by $\mathsf{R}_\kappa (P_\kappa) = \{ (p, \kappa(p)): p \in P_\kappa\}$, where $P_\kappa$ is either of the two half-planes satisfying $P_\kappa \subset V$ and $\partial P_\kappa = \ker \kappa$. If $\kappa = 0$, we define $\mathsf{R}_\kappa: = \text{\emph{Id}}_{W}$. By choosing a unit normal vector to $V$, we can identify $\kappa$ with an element of $V^*$. \end{definition} \begin{definition}[tilted graph functions] \label{dTiltop} Let $u$ be a function defined on a domain $\Omega$ of $V$. If \\$\mathsf{R}_\kappa ( \text{\emph{Graph}}_\Omega u)$ is the graph of a function defined on a domain of $V$, we call this function $\text{\emph{Tilt}}_\kappa( u)$. \end{definition} \section*{Part I: Generalizing the Linearized Doubling Approach} \section[Tilted catenoids]{Tilted catenoids} \label{S:cat} \subsection*{Tilted catenoidal graphs in $T_p N$.} $\phantom{ab}$ \nopagebreak \begin{convention} \label{background} In Parts I and II of this article we assume given a surface $\Sigma$ smoothly immersed in a Riemannian three-manifold $(N,g)$. To facilitate the discussion we will assume, unless stated otherwise, that $\Sigma$ is connected embedded minimal and two-sided with a chosen smooth unit normal $\nu_\Sigma$. Note however that most results can be modified to apply to situations where some or all of these assumptions do not apply. We will call $\Sigma$ the \emph{base surface} and the data $(\Sigma,N,g)$ the \emph{background}. We will consider the background chosen and we will not mention the dependence of constants on it. \end{convention} \begin{definition}[Fermi coordinates about $\Sigma$] \label{dgeopolar} Given $p\in \Sigma$ we choose for $(T_pN, \left. g\right|_p)$ Cartesian coordinates $({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}},{\ensuremath{\widetilde{\mathrm{z}}}}) : T_pN\to \mathbb{R}^3$ satisfying $({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}},{\ensuremath{\widetilde{\mathrm{z}}}})\circ \nu_\Sigma(p) =(0,0,1)$; clearly then $\left. g\right|_p = d{\ensuremath{\widetilde{\mathrm{x}}}}^2 + d{\ensuremath{\widetilde{\mathrm{y}}}}^2 + d{\ensuremath{\widetilde{\mathrm{z}}}}^2 $ on $T_pN$ and moreover $({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}})$ restricted to $T_p\Sigma$ are Cartesian coordinates on $T_p\Sigma\subset T_pN$. Following \ref{dexp}, we define $U:= D^{\Sigma, N, g}_p ( \, {\mathrm{inj}}^{\Sigma, N, g}_p /2 \, ) \subset N $ and $U^\Sigma:= D^{\Sigma, g}_p ( \, {\mathrm{inj}}^{\Sigma, N, g}_p /2 \, ) = \Sigma \cap U $ to simplify the notation, and then we extend $\ensuremath{\mathrm{z}}$ to a coordinate system $({{\ensuremath{\mathrm{x}}}},\ensuremath{\mathrm{y}},\ensuremath{\mathrm{z}})$ on $U$ by requesting $({{\ensuremath{\mathrm{x}}}},\ensuremath{\mathrm{y}},\ensuremath{\mathrm{z}} ) = ({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}},{\ensuremath{\widetilde{\mathrm{z}}}}) \circ ( \exp^{\Sigma, N, g}_p )^{-1} $ on $U$. We define also a Riemannian metric $\mathring{g}$ on $ U $ and symmetric two-tensor fields $h$ on $U$ and $h^\Sigma $ on $U^\Sigma $ by \[ \mathring{g}:= ( \exp^{\Sigma, N, g}_p )_* \left. g\right|_p = d{{\ensuremath{\mathrm{x}}}}^2 + d\ensuremath{\mathrm{y}}^2 +d\ensuremath{\mathrm{z}}^2 , \qquad h: = g - \mathring{g}, \qquad h^\Sigma := \left. h\right|_{U^\Sigma}. \] Finally we define \emph{Fermi cylindrical coordinates} $(\ensuremath{\mathrm{r}},\theta,\ensuremath{\mathrm{z}})$ on $\breve{U}:=U\setminus \{ {{\ensuremath{\mathrm{x}}}} = \ensuremath{\mathrm{y}} =0 \}$ by requesting ${{\ensuremath{\mathrm{x}}}} = \ensuremath{\mathrm{r}} \cos \theta$ and $\ensuremath{\mathrm{y}} = \ensuremath{\mathrm{r}} \sin \theta$; we have then $\mathring{g}= d\ensuremath{\mathrm{r}}^2 + \ensuremath{\mathrm{r}}^2 d\theta^2 + d\ensuremath{\mathrm{z}}^2$ on $\breve{U}$ and that $\vec{e}_\ensuremath{\mathrm{r}}:= \partial_\ensuremath{\mathrm{r}}$, $\vec{e}_\theta := \partial_\theta / \, |\partial_\theta |_{\mathring{g} } $, and $\vec{e}_\ensuremath{\mathrm{z}}:= \partial_\ensuremath{\mathrm{z}}$ define an orthonormal frame $\{ \vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\theta, \vec{e}_\ensuremath{\mathrm{z}} \}$ on $( \breve{U} , \mathring{g})$. \end{definition} \begin{notation} \label{Ecyl} Let $\ensuremath{\mathrm{Cyl}} : = \mathbb{S}^1\times \mathbb{R} \subset \mathbb{R}^2\times\mathbb{R}$ be the standard cylinder and $\chi$ the standard product metric on $\ensuremath{\mathrm{Cyl}}$; we have then ${\mathrm{Isom}}(\ensuremath{\mathrm{Cyl}},\chi) = O(2)\times{\mathrm{Isom}}(\mathbb{R},g_{Euc})$ (recall \ref{NEuc}). Let $(\vartheta,{{\ensuremath{\mathrm{s}}}})$ be the standard coordinates on $\ensuremath{\mathrm{Cyl}}$ defined by considering the covering $Y_{\ensuremath{\mathrm{Cyl}}}:\mathbb{R}^2\to\ensuremath{\mathrm{Cyl}}$ given by $ Y_{\ensuremath{\mathrm{Cyl}}}(\vartheta,{{\ensuremath{\mathrm{s}}}}) := (\cos\vartheta,\sin\vartheta, {{\ensuremath{\mathrm{s}}}}) $ so that $\chi = d\vartheta^2 + d{{\ensuremath{\mathrm{s}}}}^2$. Finally, for $\underline{{{\ensuremath{\mathrm{s}}}}} \in \mathbb{R}$, we define a \emph{parallel circle} $\ensuremath{\mathrm{Cyl}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} := \{ Y_{\ensuremath{\mathrm{Cyl}}}(\vartheta, \underline{{{\ensuremath{\mathrm{s}}}}}) : \vartheta\in\mathbb{R} \}\subset \ensuremath{\mathrm{Cyl}}$ and for $I\subset \mathbb{R}$, we define $\ensuremath{\mathrm{Cyl}}_I := \cup_{\underline{{{\ensuremath{\mathrm{s}}}}}\in I} \ensuremath{\mathrm{Cyl}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}$. \hfill $\square$ \end{notation} Given $p\in N$ and $\tau\in\mathbb{R}_+$, we define a catenoid ${{\widehat{\cat}}}[p, \tau] \subset T_pN\simeq \mathbb{R}^3 $ of size $\tau$ and its parametrization $X_{{{\widehat{\cat}}}} = X_{{{\widehat{\cat}}}}[p,\tau] : \ensuremath{\mathrm{Cyl}} \rightarrow {{\widehat{\cat}}}[p, \tau]$ by taking $\quad \rho({{\ensuremath{\mathrm{s}}}}):=\tau\cosh {{\ensuremath{\mathrm{s}}}}, \quad \ensuremath{\mathrm{z}}({{\ensuremath{\mathrm{s}}}}):=\tau\, {{\ensuremath{\mathrm{s}}}}, \quad$ and (recall \ref{dgeopolar}) \begin{equation} \label{Ecatenoid} ({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}},{\ensuremath{\widetilde{\mathrm{z}}}})\circ X_{{{\widehat{\cat}}}}\circ Y_{\ensuremath{\mathrm{Cyl}}}(\vartheta, {{\ensuremath{\mathrm{s}}}}) = (\rho({{\ensuremath{\mathrm{s}}}}) \cos \vartheta , \rho({{\ensuremath{\mathrm{s}}}}) \sin \vartheta, \ensuremath{\mathrm{z}}({{\ensuremath{\mathrm{s}}}})). \end{equation} From now on we will use $X_{{{\widehat{\cat}}}}$ to identify ${{\widehat{\cat}}}[p, \tau]$ with $\ensuremath{\mathrm{Cyl}}$; $\vartheta$ and ${{\ensuremath{\mathrm{s}}}}$ can then be considered as coordinates on ${{\widehat{\cat}}}[p,\tau]$ and by \eqref{Ecatenoid} and \ref{Ecyl} we clearly have \begin{align} \label{Ecatmetric} g_{{\widehat{\cat}}} := X_{{{\widehat{\cat}}}}^* ( \left. g\right|_p) = \rho^2({{\ensuremath{\mathrm{s}}}}) \left( d \vartheta^2 + d{{\ensuremath{\mathrm{s}}}}^2 \right) = \rho^2\, \chi. \end{align} Alternatively $({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}},{\ensuremath{\widetilde{\mathrm{z}}}})^{-1} \{(\ensuremath{\mathrm{r}}\cos\vartheta,\ensuremath{\mathrm{r}}\sin\vartheta, {\varphi_{\mathrm{cat}}}(\ensuremath{\mathrm{r}}) \,) \, : \, (\ensuremath{\mathrm{r}},\vartheta) \in [\tau,\infty) \times \mathbb{R}\,\} \subset T_pN $ is the part above the waist of ${{\widehat{\cat}}}[p, \tau] $, where the function ${\varphi_{\mathrm{cat}}} = {\varphi_{\mathrm{cat}}}[\tau]:[\tau,\infty)\to\mathbb{R}$ is defined by \begin{equation} \begin{aligned} \label{Evarphicat} {\varphi_{\mathrm{cat}}}[\tau](\ensuremath{\mathrm{r}}):= \tau\operatorname{arccosh} \frac \ensuremath{\mathrm{r}} \tau &= \tau\left(\log \ensuremath{\mathrm{r}}-\log \tau+\log\left(1+\sqrt{1-{\tau^2}{\ensuremath{\mathrm{r}}^{-2}}\,}\right)\right) \\ &= \tau\left(\log \frac { 2 \ensuremath{\mathrm{r}} } {\tau} + \log\left(\frac12+\frac12\sqrt{1-\frac{\tau^2}{\ensuremath{\mathrm{r}}^{2}}\,}\right)\right). \end{aligned} \end{equation} By direct calculation or balancing considerations we have for future reference that \begin{equation} \label{Ecatder} \frac{\partial{\varphi_{\mathrm{cat}}}}{\partial\ensuremath{\mathrm{r}}_{\phantom{cat}}}(\ensuremath{\mathrm{r}}) = \frac\tau{\sqrt{\ensuremath{\mathrm{r}}^2-\tau^2\,}}. \end{equation} \begin{definition}[Spaces of affine functions] \label{DVcal} Given $p\in\Sigma$ let $\mathscr{V}[p]\subset C^\infty(T_p\Sigma) $ be the space of \emph{affine functions on $T_p\Sigma$}. Given a function $v$ defined on a neighborhood of $p$ in $\Sigma$, which is differentiable at $p$, let $\Ecalunder_p v:= v(p)+ d_pv\in\mathscr{V}[p]$. $\forall{\underline{\kappa}}\in\mathscr{V}[p]$ let ${\underline{\kappa}}=\kappa^{\perp}+{{\kappa}}$ be the unique decomposition with $\kappa^{\perp}\in\mathbb{R}$ and ${{\kappa}}\in T^*_p\Sigma$ and let $|{\underline{\kappa}}| := |\kappa^{\perp}| + |{{\kappa}}|$. We define for later use $\mathscr{V}[L] := \bigoplus_{p\in L} \mathscr{V}[p]$ for any finite $L\subset\Sigma$. \end{definition} \begin{definition}[Tilted catenoidal graphs] \label{dphicattilt} Given ${\underline{\kappa}}\in \mathscr{V}[p]$ we define $\varphi^{\pm}_{\mathrm{cat}}[\tau, {\underline{\kappa}}]: T_p \Sigma \setminus D_0^{T_p\Sigma} (9\tau) \rightarrow \mathbb{R}$ by $\varphi^{\pm}_{\mathrm{cat}}[\tau, {\underline{\kappa}}] : = \text{\emph{Tilt}}_{\pm {{\kappa}}} ( {\varphi_{\mathrm{cat}}}[\tau] \circ {\mathbf{d}}_0^{T_p\Sigma} ) \pm \kappa^{\perp}$ in the notation of Definitions \ref{dTiltop} and \ref{DVcal}. \end{definition} \begin{convention} \label{con:alpha} \label{Akappa} We fix now some $\alpha >0$ which we will assume as small in absolute terms as needed. In the rest of this section we assume that $\tau\in\mathbb{R}_+$ is as small as needed in terms of $\alpha$ only and that ${\underline{\kappa}}\in\mathscr{V}[p]$ satisfies $|{\underline{\kappa}}| < \tau^{1+ \alpha/6}$. \end{convention} \begin{lemma}[Tilted catenoid asymptotics] \label{Ltcest} For $k\in\mathbb{N}$, $\tau\in\mathbb{R}_+$ and ${\underline{\kappa}}\in\mathscr{V}[p]$ as in \ref{con:alpha} we have \[ \left\| \varphi^+_{\mathrm{cat}}[ \tau, {\underline{\kappa}}] - \tau \log ( { 2 \ensuremath{\mathrm{r}} } / {\tau} ) - {\underline{\kappa}} : C^{k}\left( D_0^{T_p\Sigma} (8\tau^\alpha) \setminus D_0^{T_p\Sigma} (9 \tau), \ensuremath{\mathrm{r}}, g, \ensuremath{\mathrm{r}}^{-2}\right)\right\| \le C(k)(|{{\kappa}}|+\tau)^3.\] \end{lemma} \begin{proof} If ${\underline{\kappa}}$ vanishes it is enough to prove the following, which is true $\forall \tau\in\mathbb{R}_+$ by \eqref{Evarphicat} and \eqref{Ecatder} {\cite[Lemma 2.25]{kap}}. \begin{equation} \label{Lcatenoid} \|\, {\varphi_{\mathrm{cat}}}[\tau] - \tau \log ( { 2 \ensuremath{\mathrm{r}} } / {\tau} ) \, : C^{k}(\, (9 \tau,\infty)\,,\, \ensuremath{\mathrm{r}}, d\ensuremath{\mathrm{r}}^2,\ensuremath{\mathrm{r}}^{-2}\,)\,\| \le \, C(k) \, \tau^3. \end{equation} Clearly $ \|\, \tau \log ( { 2 \ensuremath{\mathrm{r}} } / {\tau} ) \, : C^{k}(\, (9 \tau,8\tau^\alpha) \,,\, \ensuremath{\mathrm{r}}, d\ensuremath{\mathrm{r}}^2\,)\,\| \le \, C(k) \, \tau \, |\log\tau| . $ Combining with \eqref{Lcatenoid}, using \ref{dwHolder}, scaling, applying \ref{Ltiltgap}, and taking in this proof $\Omega:= D_0^{T_p\Sigma} (8\tau^\alpha)\setminus D_0^{T_p\Sigma} (9 \tau)$, we conclude \begin{align*} \| \varphi^+_{\mathrm{cat}}[ \tau, {{\kappa}}] - {\varphi_{\mathrm{cat}}}[\tau] - {{\kappa}} : C^{k}\left( \Omega, \ensuremath{\mathrm{r}}, g\right)\| \le C(k) (\tau |\log \tau| + |{{\kappa}}|)^3. \end{align*} Using that $\ensuremath{\mathrm{r}}^2\le 8^2 \tau^{2\alpha}$ on $\Omega$, combining with \eqref{Lcatenoid}, and observing that $\kappa^{\perp}$ cancels out, we conclude \[ \left\| \varphi^+_{\mathrm{cat}}[ \tau, {\underline{\kappa}}] - \tau \log ( { 2 \ensuremath{\mathrm{r}} } / {\tau} ) - {\underline{\kappa}} : C^{k}\left( \Omega, \ensuremath{\mathrm{r}}, g, \ensuremath{\mathrm{r}}^{-2}\right)\right\| \le C(k) \, \left(\tau^3 + \tau^{2\alpha} (\tau |\log \tau| + |{{\kappa}}|)^3 \right) , \] which implies the result by assuming $\tau$ small enough as in \ref{Akappa}. \end{proof} \subsection*{Mean curvature on tilted catenoids in $N$} $\phantom{ab}$ \nopagebreak \begin{definition}[Tilted catenoidal bridges in $T_p N$ and in $N$] \label{dtiltedbM} Given $p\in \Sigma$, $\tau>0$, and ${\underline{\kappa}} = \kappa^{\perp} + {{\kappa}} \in \mathscr{V}[p] $, we define $X_{{{\widehat{\cat}}}}[p, \tau, {\underline{\kappa}}] : \ensuremath{\mathrm{Cyl}} \rightarrow T_p N$ and $X_{\mathbb{K}}[p, \tau, {\underline{\kappa}}] : \ensuremath{\mathrm{Cyl}} \rightarrow N$ by \[ X_{{{\widehat{\cat}}}}[p, \tau, {\underline{\kappa}}] = \mathsf{R}_\kappa \circ X_{{{\widehat{\cat}}}}[p, \tau]+ \kappa^{\perp} \nu_\Sigma(p) \qquad \text{and} \qquad X_{\mathbb{K}}[p, \tau, {\underline{\kappa}}] := \exp^{\Sigma, N, g}_p \circ X_{{{\widehat{\cat}}}}[p, \tau, {\underline{\kappa}}], \] where $\mathsf{R}_\kappa$ was defined in \ref{dRk}. We define then a catenoid and a catenoidal bridge centered at $p$ and elevated and tilted by ${\underline{\kappa}}$ by \begin{align*} {{\widehat{\cat}}}[p, \tau, {\underline{\kappa}}] \, &:= \, X_{{{\widehat{\cat}}}}[p, \tau, {\underline{\kappa}}] \, ( \ensuremath{\mathrm{Cyl}}) \subset T_p N \qquad \text{ and} \\ \mathbb{K}[p, \tau, {\underline{\kappa}}] \, &:= \, X_{\mathbb{K}}[p, \tau, {\underline{\kappa}}] \, \left( \{Y_{\ensuremath{\mathrm{Cyl}}}(\vartheta, {{\ensuremath{\mathrm{s}}}}) \in \ensuremath{\mathrm{Cyl}}: \tau \cosh {{\ensuremath{\mathrm{s}}}} < 2 \tau^{\alpha}\} \right) \subset N. \end{align*} \end{definition} \begin{remark} \label{R:comp} Note that Definitions \ref{dphicattilt} and \ref{dtiltedbM} are compatible in the sense that (recall also \ref{dgraph}) \[ \text{Graph}_\Omega^{N}\left( \varphi^+_{\mathrm{cat}}[\tau, {\underline{\kappa}}]\circ (\exp^\Sigma_p)^{-1}\right) \cup \text{Graph}_\Omega^{N}\left(- \varphi^-_{\mathrm{cat}}[\tau, {\underline{\kappa}}]\circ (\exp^\Sigma_p)^{-1}\right) \cup \mathbb{K}[ p, \tau, {\underline{\kappa}}],\] where only here $\Omega := D^\Sigma_p(8\tau^\alpha)\setminus D^\Sigma_p(9\tau)$, is a smooth, connected surface with boundary in $N$. \end{remark} The final goal of this section is to estimate the mean curvature of a tilted bridge $\mathbb{K}[p, \tau, {\underline{\kappa}}] \subset N$. We first introduce some convenient notation. \begin{notation} \label{N:H} We denote by $\mathring{H}$ and $H$ the mean curvature of $\mathbb{K}[p, \tau, {\underline{\kappa}}] \subset N$ with respect to $\mathring{g}$ and $g$ respectively. \end{notation} Appendix \ref{S:A1} allows us to express $H$ in terms of $\mathring{H}$ and certain tensors defined on $\mathbb{K}$; because the metric $\mathring{g}$ is Euclidean, $\mathring{H}= 0$ and the task is reduced to estimating the tensors defined on $\mathbb{K}$. To motivate the discussion, we first consider the simplest situation in two model cases. \begin{example}[$H$ on catenoidal bridges over $\mathbb{S}^2_{\mathrm{eq}} \subset \mathbb{S}^3$] Let $\mathbb{S}^2_{\mathrm{eq}}$ be the equatorial two-sphere in the round three-sphere $\mathbb{S}^3 \subset \mathbb{R}^4$. Given $p=(0,0, 1, 0)$, let $\mathbb{K}: = \mathbb{K}[p, \tau,0]$. From \ref{exSph}, it follows that the metric induced by $g$ on $\mathbb{K}$ is \begin{gather*} g^\mathbb{K} = \ensuremath{\mathrm{r}}^2( 1- \tanh^2 {{\ensuremath{\mathrm{s}}}} \sin^2 \ensuremath{\mathrm{z}}) d{{\ensuremath{\mathrm{s}}}}^2 + \cos^2 \ensuremath{\mathrm{z}} \sin^2 \ensuremath{\mathrm{r}} \, d\theta^2, \end{gather*} where $\ensuremath{\mathrm{z}} = \tau {{\ensuremath{\mathrm{s}}}}$ on $\mathbb{K}$. A calculation shows $\nu_\mathbb{K} =( \tanh {{\ensuremath{\mathrm{s}}}}\, \partial_{\ensuremath{\mathrm{z}}} - \sec^2\ensuremath{\mathrm{z}} \operatorname{sech} {{\ensuremath{\mathrm{s}}}} \, \partial_{\ensuremath{\mathrm{r}}})/\sqrt{1+\tan^2 \ensuremath{\mathrm{z}} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}}$. We compute $A^\mathbb{K}$ via the formula $A^\mathbb{K} = \left( X^{k}_{, \alpha \beta} + \Gamma_{lm}^{k} X^l_{, \alpha} X^{m}_{, \beta}\right) g_{kn}\nu^n dx^\alpha dx^\beta$, where $X = X_\mathbb{K}[p, \tau, 0]$ is as in \ref{dtiltedbM}, we have renamed the cylinder coordinates $(x^1, x^2): = ({{\ensuremath{\mathrm{s}}}}, \theta)$, and Greek indices take the values $1$ and $2$ while Latin indices take the values $1,2,3$, corresponding to the coordinates $\ensuremath{\mathrm{r}}, \theta, \ensuremath{\mathrm{z}}$. Using the preceding and the Christoffel symbols in \ref{exSph}, we find \begin{align*} A^\mathbb{K} &= \frac{ \left[ \tau^2 \tanh {{\ensuremath{\mathrm{s}}}} \left( \tan \ensuremath{\mathrm{z}} + \frac{1}{2}\sinh^2 {{\ensuremath{\mathrm{s}}}} \sin 2\ensuremath{\mathrm{z}} \right) - \tau\right] d{{\ensuremath{\mathrm{s}}}}^2 +\frac{1}{2}(\sin 2\ensuremath{\mathrm{r}} \operatorname{sech} {{\ensuremath{\mathrm{s}}}} + \sin^2 \ensuremath{\mathrm{r}} \sin 2\ensuremath{\mathrm{z}} \tanh {{\ensuremath{\mathrm{s}}}}) \, d\theta^2 }{ \sqrt{ 1+ \tan^2 \ensuremath{\mathrm{z}} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}}}\\ &= (1+ O(\ensuremath{\mathrm{z}}^2)) \left( \tau( - d{{\ensuremath{\mathrm{s}}}}^2 + d\theta^2) + O(\ensuremath{\mathrm{r}}^2 \ensuremath{\mathrm{z}})d{{\ensuremath{\mathrm{s}}}}^2 + O(\ensuremath{\mathrm{r}}^3+\ensuremath{\mathrm{r}}^2 \ensuremath{\mathrm{z}}) d\theta^2\right), \end{align*} where in the second equality we have estimated using that $ \sqrt{ 1+ \tan^2 \ensuremath{\mathrm{z}} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}} = 1+ O(\ensuremath{\mathrm{z}}^2)$ and that $\frac{1}{2}\sin 2\ensuremath{\mathrm{r}} \operatorname{sech} {{\ensuremath{\mathrm{s}}}} = \tau + O(\ensuremath{\mathrm{r}}^3)$. Finally, using that $\ensuremath{\mathrm{r}}^2 g^{{{\ensuremath{\mathrm{s}}}} {{\ensuremath{\mathrm{s}}}}} = 1+ O(\ensuremath{\mathrm{z}}^2)$ and $\ensuremath{\mathrm{r}}^2 g^{\theta \theta} = 1+O(\ensuremath{\mathrm{z}}^2 +\ensuremath{\mathrm{r}}^2)$ we estimate \begin{align*} \ensuremath{\mathrm{r}}^2 H = O\left(\tau \ensuremath{\mathrm{z}}^2 +\ensuremath{\mathrm{r}}^2 |\ensuremath{\mathrm{z}}| + \tau \ensuremath{\mathrm{r}}^2 \right). \end{align*} \end{example} \begin{example}[$H$ on catenoidal bridges over $\mathbb{T}\subset\mathbb{S}^3$] Let $\mathbb{T}$ be the Clifford torus in $\mathbb{S}^3 \subset\mathbb{R}^4 \simeq \mathbb{C}^2$. Given $p = (1/\sqrt{2}, 1/\sqrt{2}) \in \mathbb{T}$, let $\mathbb{K}: = \mathbb{K}[p, \tau, 0]$. From \ref{exClifford}, the metric induced by $g$ on $\mathbb{K}$ is \begin{gather*} g^\mathbb{K} = \ensuremath{\mathrm{r}}^2 ( d{{\ensuremath{\mathrm{s}}}}^2 + d\theta^2) + \ensuremath{\mathrm{r}}^2 \sin2 \ensuremath{\mathrm{z}} \left( \tanh^2 {{\ensuremath{\mathrm{s}}}} \cos 2\theta d{{\ensuremath{\mathrm{s}}}}^2 - 2 \tanh {{\ensuremath{\mathrm{s}}}} \sin 2\theta d{{\ensuremath{\mathrm{s}}}} d\theta - \cos 2\theta d\theta^2\right), \end{gather*} where $\ensuremath{\mathrm{z}} = \tau {{\ensuremath{\mathrm{s}}}}$ and $\ensuremath{\mathrm{r}} = \tau \cosh {{\ensuremath{\mathrm{s}}}}$ on $\mathbb{K}$. As in \cite[Lemma 3.18]{kapouleas:clifford} or \cite[Proposition 4.28]{Wiygul}, it follows that \begin{align*} \left\| \ensuremath{\mathrm{r}}^2 H : C^{k}\left( \mathbb{K}, \chi, \tau |\ensuremath{\mathrm{z}}| + \ensuremath{\mathrm{r}}^2 |\ensuremath{\mathrm{z}}| + \tau^2 \right) \right\| \leq C. \end{align*} \end{example} The preceding examples show that the mean curvature on a catenoidal bridge over $\mathbb{S}^2_{\mathrm{eq}} \subset \mathbb{S}^3$ satisfies better estimates than the mean curvature on a bridge over $\mathbb{T}$. This is due to the fact that $\mathbb{S}^2_{\mathrm{eq}}$ is totally geodesic while $\mathbb{T}$ is not. We will see more generally (cf. \ref{Ltensest}(ii)(b) and (iii)(b) and \ref{LH}(i) below) that dominant terms in the mean curvature of a bridge $\mathbb{K}[p, \tau, {\underline{\kappa}}]$ are driven by the second fundamental form of $\Sigma$ when $\left. A^\Sigma\right|_p$ does not vanish. Unfortunately, the resulting estimates on $H$ will not be by themselves sufficient for our applications, and it will be essential to observe (cf. \ref{LH}(ii) and \ref{LH2}(ii)) that the projection as in \ref{dlowharm} of $H$ onto the first harmonics of such a bridge satisfies a better estimate. For the rest of the section, fix $p\in \Sigma$ and let $(\ensuremath{\mathrm{r}}, \theta, \ensuremath{\mathrm{z}})$ be cylindrical Fermi coordinates about $\Sigma$ centered at $p$ as in \ref{dgeopolar}. \begin{lemma} \label{Lh} \begin{enumerate}[label=\emph{(\roman*)}] \item $h= \Pi^*_\Sigma h^\Sigma - 2 \ensuremath{\mathrm{z}} \Pi^*_\Sigma A^\Sigma + \Pi^*_\Sigma(A^\Sigma*A^\Sigma + \operatorname{Rm}^\Sigma_{\nu})\ensuremath{\mathrm{z}}^2 + \ensuremath{\mathrm{z}}^3 h^{\mathrm{err}}$, where $h^{\mathrm{err}}$ is a smooth symmetric two-tensor field on $U$. \item $\operatorname{tr}_{N, \mathring{g}} h = \operatorname{tr}_{\Sigma, \mathring{g}} h^\Sigma + \Pi^*_\Sigma \left(|A^\Sigma|^2- \operatorname{Ric}(\nu_{\Sigma}, \nu_\Sigma) \right)\ensuremath{\mathrm{z}}^2 +\ensuremath{\mathrm{z}}^3 \operatorname{tr}_{N, \mathring{g}} h^{\mathrm{err}}.$ \item $\| \nabla h : C^k(U, \mathring{g})\| \le C(k)$. \item $\| h^\Sigma : C^k( U^\Sigma,\ensuremath{\mathrm{r}}, \mathring{g}, \ensuremath{\mathrm{r}}^2)\| \le C(k).$ \end{enumerate} \end{lemma} \begin{proof} (i) follows from Lemma \ref{Lgauss}. (ii) follows from taking the trace of (i), and (iii) follows from (i), using that $\mathring{g}$ is Euclidean. For (iv), recall that $g^\Sigma = d\ensuremath{\mathrm{r}}^2 + u(\ensuremath{\mathrm{r}}, \theta)^2 d\theta^2$ where $u(\ensuremath{\mathrm{r}},\theta)$ solves the Gauss-Jacobi initial value problem \begin{align*} u_{\ensuremath{\mathrm{r}}\rr} + K_\Sigma u = 0, \quad \lim_{\ensuremath{\mathrm{r}} \searrow 0} u(\ensuremath{\mathrm{r}}, \theta) = 0, \quad \lim_{\ensuremath{\mathrm{r}} \searrow 0} u_\ensuremath{\mathrm{r}}(\ensuremath{\mathrm{r}}, \theta) = 1. \end{align*} It follows that $u(\ensuremath{\mathrm{r}}, \theta) = \ensuremath{\mathrm{r}} - \frac{\left.K_\Sigma\right|_p}{3!} \ensuremath{\mathrm{r}}^3 + O(\ensuremath{\mathrm{r}}^5)$ and consequently \begin{align} h^\Sigma = f(\ensuremath{\mathrm{r}}, \theta) d\theta^2, \quad \text{where} \quad f(\ensuremath{\mathrm{r}},\theta) := - (\left. K_\Sigma\right|_p/3) \ensuremath{\mathrm{r}}^4 +O(\ensuremath{\mathrm{r}}^6). \end{align} This completes the proof of (iv). \end{proof} For the remainder of this section we use notation from Appendices \ref{A:tilt} and \ref{S:A1}, and to simplify the notation we denote $\mathbb{K}: = \mathbb{K}[p, \tau, {\underline{\kappa}}]$. \begin{notation} \label{Nw} Following \ref{Lrot} we define vector fields $\vec{w}$ and $\vec{w}'$ on $\mathbb{K}$ by \[ \vec{w} = \text{Proj}_{T_p \Sigma}( \mathsf{R}_\kappa \vec{e}_{\ensuremath{\mathrm{r}}} ) = \cos \vartheta \, \vec{v} + \sin \vartheta \cos \theta_\kappa \vec{v}^\perp, \quad \vec{w}' = \text{Proj}_{T_p \Sigma}( \mathsf{R}_\kappa \vec{e}_{\theta} ) = - \sin \vartheta \vec{v} + \cos \vartheta \cos \theta_\kappa \vec{v}^\perp. \] \end{notation} \begin{lemma} For $X_{{{\widehat{\cat}}}} = X_{{{\widehat{\cat}}}}[p, \tau, {\underline{\kappa}}]$ and ${{\widehat{\cat}}} = {{\widehat{\cat}}}[p, \tau, {\underline{\kappa}}] \subset T_p N$, the following hold. \label{Lcatrimm} \begin{enumerate}[label=\emph{(\roman*)}] \item $X_{{{\widehat{\cat}}}} = \rho \cos \vartheta \, \vec{v} + ( \rho \sin \vartheta - \tau {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa) \vec{v}^\perp +(\tau {{\ensuremath{\mathrm{s}}}} \cos \theta_\kappa + \rho \sin \theta_\kappa) \partial_{\ensuremath{\mathrm{z}}}$. \item $\partial_{{\ensuremath{\mathrm{s}}}} X_{{{\widehat{\cat}}}} = \tau \sinh {{\ensuremath{\mathrm{s}}}} \left( \vec{w} + \sin \vartheta \sin\theta_\kappa \partial_\ensuremath{\mathrm{z}}\right) - \tau \sin \theta_\kappa \vec{v} + \tau \cos \theta_\kappa \partial_\ensuremath{\mathrm{z}}$. \item $\partial_\vartheta X_{{\widehat{\cat}}} = \rho \left( \vec{w}' + \cos \vartheta \sin \theta_{\kappa}\partial_\ensuremath{\mathrm{z}}\right)$. \item $ {X_{{{\widehat{\cat}}}}}\!\!\!{}_{\phantom{K}}^{{ *_{{\phantom{p}_{\phantom{q}}}} }} \:\!\!\!\!\!g = \rho^2\chi$. \item $\nu_{{{\widehat{\cat}}} } = \nu^{\parallel}+ \nu^\perp$, where $\nu^\perp : = (\tanh {{\ensuremath{\mathrm{s}}}} \cos \theta_\kappa - \frac{\tau}{\rho} \sin \vartheta \sin \theta_\kappa ) \partial_{\ensuremath{\mathrm{z}}}$ and $\nu^{\parallel} : = - \frac{\tau}{\rho} \vec{w} - \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \, \vec{v}^\perp$. \end{enumerate} \end{lemma} \begin{proof} Straightforward computation using \eqref{Ecatenoid}, \ref{Nw}, and \ref{Lrot}(iii), which implies $\qquad \mathsf{R}_\kappa (\vec{v}) = \vec{v}$, \\ $\qquad \mathsf{R}_\kappa (\vec{v}^\perp) = \cos \theta_\kappa \vec{v}^\perp + \sin \theta_\kappa \partial_\ensuremath{\mathrm{z}}, \qquad$ and $\qquad \mathsf{R}_\kappa (\partial_\ensuremath{\mathrm{z}}) = \cos \theta_\kappa \partial_\ensuremath{\mathrm{z}} - \sin \theta_\kappa \vec{v}^\perp.$ \end{proof} \begin{lemma}[cf. {\cite[Lemma 3.18]{kapouleas:clifford}}] \label{Lzinit} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\| \rho^{\pm 1}: C^k(\mathbb{K}, \chi, \rho^{\pm 1}) \| \le C(k)$. \item $\| \ensuremath{\mathrm{z}} : C^k(\mathbb{K}, \chi, |\ensuremath{\mathrm{z}}| + \tau ) \| \le C(k) $. \item \begin{enumerate}[label=\emph{(\alph*)}] \item $\| \nabla^{N,\mathring{g}}_{\partial_{{\ensuremath{\mathrm{s}}}}} h : C^k(\mathbb{K}, \chi, \rho ( |\ensuremath{\mathrm{z}}| + \rho) + \tau) \| \le C(k)$. \item $\| \nabla^{N,\mathring{g}}_{\partial_\vartheta} h : C^k(\mathbb{K}, \chi, \rho|\ensuremath{\mathrm{z}}| + \rho^2 ) \| \le C(k)$. \item $\| \nabla^{N, \mathring{g}}_{\nu} h: C^k(\mathbb{K}, \chi ) \| \le C(k)$. \end{enumerate} \item $\| h\mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \vec{w}: C^k(\mathbb{K}, \chi, |\ensuremath{\mathrm{z}}| + \tau + \rho^2)\| \le C(k)$. \end{enumerate} \end{lemma} \begin{proof} The estimate in (i) with $\rho$ is obvious, and the estimate in (i) with $\rho^{-1} = \tau^{-1} \operatorname{sech} {{\ensuremath{\mathrm{s}}}}$ follows after observing that for each $k\geq 1$, $\partial^k_{{{\ensuremath{\mathrm{s}}}}}( \operatorname{sech} {{\ensuremath{\mathrm{s}}}})$ is a polynomial expression in $\operatorname{sech} {{\ensuremath{\mathrm{s}}}}$ and $\tanh {{\ensuremath{\mathrm{s}}}}$, each term of which contains a factor of $\operatorname{sech} {{\ensuremath{\mathrm{s}}}}$. From Lemma \ref{Lcatrimm} we have $\ensuremath{\mathrm{z}} = \tau ( \cos \theta_\kappa\, {{\ensuremath{\mathrm{s}}}} + \sinh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \sin \vartheta)$, which implies (ii). Using Lemma \ref{Lh}, \begin{align*} \nabla_{\partial_\ensuremath{\mathrm{z}}} h &= - 2 \Pi^*_\Sigma A^\Sigma + 2\ensuremath{\mathrm{z}} \Pi^*_\Sigma(A^\Sigma*A^\Sigma + \operatorname{Rm}^\Sigma_{\nu}) + 3\ensuremath{\mathrm{z}}^2 h^{\mathrm{err}} + \ensuremath{\mathrm{z}}^3 \nabla_{\partial_\ensuremath{\mathrm{z}}} h^{\mathrm{err}}, \\ \nabla_{u} h &= \nabla_u h^\Sigma - 2\ensuremath{\mathrm{z}} \, \nabla_u \Pi^*_\Sigma A^\Sigma + \ensuremath{\mathrm{z}}^2 \nabla_u \Pi^*_\Sigma(A^\Sigma*A^\Sigma + \operatorname{Rm}^\Sigma_{\nu})+ \ensuremath{\mathrm{z}}^3 \, \nabla_u h^{\mathrm{err}}, \end{align*} where $u$ is either $\vec{v}$ or $\vec{v}^\perp$. Using this in conjunction with (ii) and Lemma \ref{Lh}(iv), we conclude \begin{align} \label{Edh} \| \nabla_{\partial_\ensuremath{\mathrm{z}}}^{N, \mathring{g}} h : C^k(\mathbb{K}, \chi ) \| \le C(k), \qquad \| \nabla_{u}^{N,\mathring{g}} h : C^k(\mathbb{K}, \chi, |\ensuremath{\mathrm{z}}| + \rho) \| \le C(k). \end{align} Recalling from \ref{Lcatrimm} that \begin{align*} \partial_{{\ensuremath{\mathrm{s}}}} &= ( \tau \sinh {{\ensuremath{\mathrm{s}}}} \sin \vartheta \sin \theta_\kappa + \tau \cos \theta_\kappa) \partial_\ensuremath{\mathrm{z}} + \tau \sinh{{\ensuremath{\mathrm{s}}}} ( \cos \vartheta \, \vec{v} + \sin \vartheta \cos \theta_\kappa \vec{v}^\perp) - \tau \sin \theta_\kappa \vec{v}^\perp, \\ \partial_\vartheta &= \rho \left( - \sin \vartheta\, \vec{v} + \cos \vartheta \cos \theta_\kappa \, \vec{v}^\perp + \cos \vartheta \sin \theta_\kappa\, \partial_\ensuremath{\mathrm{z}}\right), \\ \nu &= - \frac{\tau}{\rho} ( \cos \vartheta \, \vec{v} + \sin \vartheta \cos \theta_\kappa \vec{v}^\perp ) - \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \, \vec{v}^\perp+ (\tanh {{\ensuremath{\mathrm{s}}}} \cos \theta_{\kappa} - \frac{\tau}{\rho} \sin \vartheta \sin \theta_\kappa ) \partial_{\ensuremath{\mathrm{z}}}, \end{align*} we see that (iii) follows from the preceding. Finally, for (iv), we compute that \begin{align*} h(\vec{w}, \vec{v}) &= \cos \vartheta\, h(\vec{v}, \vec{v}) + \sin \vartheta \cos \theta_\kappa h(\vec{v}, \vec{v}^\perp),\\ h(\vec{w}, \vec{v}^\perp) &= \cos \vartheta\, h(\vec{v}, \vec{v}^\perp) + \sin \vartheta \cos \theta_\kappa h(\vec{v}^\perp, \vec{v}^\perp). \end{align*} The estimate follows from this by combining the results of (ii) and (iii) above with Lemma \ref{Lh}(i). \end{proof} \begin{lemma} \label{Ltensest} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\| \alpha : C^k(\mathbb{K}, \chi, \rho^2 ( \rho^2 + |\ensuremath{\mathrm{z}}| + \tau ))\| \le C(k)$. \item \begin{enumerate}[label=\emph{(\alph*)}] \item $\| \widetilde{\alpha} : C^k(\mathbb{K}, \chi, \rho^2)\| \le C(k)$. \item $\| \operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} - 2\tau^2 \tanh {{\ensuremath{\mathrm{s}}}} \, A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}): C^k(\mathbb{K}, \chi, \rho^2( |\ensuremath{\mathrm{z}}| + \tau) ) \| \le C(k)$. \end{enumerate} \item \begin{enumerate}[label=\emph{(\alph*)}] \item $ \| \beta: C^k ( \mathbb{K}, \chi, \tau( |\ensuremath{\mathrm{z}}| + \rho^2 + \tau) ) \| \le C(k)$. \item $\| \mathrm{div}_{\mathbb{K}, \chi} \beta + 2\tau(2\ensuremath{\mathrm{z}} - \ensuremath{\mathrm{z}} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}} - \tau \tanh {{\ensuremath{\mathrm{s}}}}) A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}): C^k(\mathbb{K}, \chi, \rho^2( \tau + |\ensuremath{\mathrm{z}}|)) \| \le C(k)$. \end{enumerate} \item $\| \sigma : C^k( \mathbb{K}, \chi, |\ensuremath{\mathrm{z}}| + \tau) \| \le C(k) $. \end{enumerate} \end{lemma} \begin{proof} Using Lemma \ref{Lcatrimm} and Remark \ref{Nw}, compute \begin{equation*} \begin{gathered} \alpha_{{{\ensuremath{\mathrm{s}}}}\sss} = (\rho^2 - \tau^2) h(\vec{w} , \vec{w} ) + \tau^2 \sin^2 \theta_\kappa h( \vec{v}^\perp, \vec{v}^\perp) -2 \tau \sin \theta_\kappa \sqrt{\rho^2 - \tau^2} h(\vec{w} , \vec{v}^\perp), \\ \alpha_{\vartheta \vartheta} = \rho^2 h( \vec{w}', \vec{w}') , \\ \alpha_{{{\ensuremath{\mathrm{s}}}} \vartheta} = - \tau \rho \sin \theta_\kappa h(\vec{w}' , \vec{v}^\perp)+ \rho \sqrt{\rho^2 - \tau^2} h( \vec{w}' ,\vec{w}). \end{gathered} \end{equation*} The estimate on $\alpha$ then follows from Lemma \ref{Lzinit}. The estimate in (ii)(a) is trivial, so we now estimate $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha}$. Compute using \ref{Lcatrimm} \begin{align*} \widetilde{\alpha}_{{{\ensuremath{\mathrm{s}}}} {{\ensuremath{\mathrm{s}}}}} &= (\rho^2 - \tau^2) (\nabla_\nu h)(\vec{w}, \vec{w}) - 2\tau \sqrt{\rho^2 - \tau^2} \sin \theta_\kappa (\nabla_\nu h)( \vec{w}, \vec{v}^\perp)+ \tau^2 \sin^2 \theta_\kappa (\nabla_\nu h)(\vec{v}^\perp, \vec{v}^\perp),\\ \widetilde{\alpha}_{\vartheta \vartheta} &= \rho^2(\nabla_\nu h)(\vec{w}', \vec{w}'). \end{align*} Because $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} = \widetilde{\alpha}_{{{\ensuremath{\mathrm{s}}}} {{\ensuremath{\mathrm{s}}}}} + \widetilde{\alpha}_{\vartheta \vartheta}$, we have via \ref{Nw} \begin{equation} \label{Etrat} \begin{aligned} \operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} &= \rho^2 (\nabla_\nu h)(\vec{v}, \vec{v}) + \rho^2 (\nabla_\nu h)(\vec{v}^\perp, \vec{v}^\perp) + (\tau^2 - \rho^2) \sin^2 \theta_\kappa (\nabla_\nu h)(\vec{v}^\perp, \vec{v}^\perp)\\ &\mathrel{\phantom{=}}- \tau^2 (\nabla_\nu h)(\vec{w}, \vec{w}) - 2 \tau \sqrt{ \rho^2 - \tau^2} \sin \theta_\kappa (\nabla_\nu h )(\vec{w}, \vec{v}^\perp). \end{aligned} \end{equation} Noting that $(\nabla_\nu h)(\vec{v}, \vec{v}) + (\nabla_\nu h)(\vec{v}^\perp, \vec{v}^\perp ) = \operatorname{tr}_{N, \mathring{g}} (\nabla_\nu h) = \nabla_\nu (\operatorname{tr}_{N, \mathring{g}} h) = \nu (\operatorname{tr}_{N, \mathring{g}} h)$, we have by \ref{Lh} and \ref{Lcatrimm} that \begin{align*} \nu^\perp (\operatorname{tr}_{N, \mathring{g}} h) &= 2(\tanh {{\ensuremath{\mathrm{s}}}} \cos \theta_\kappa - \operatorname{sech} {{\ensuremath{\mathrm{s}}}} \sin \vartheta \sin\theta_\kappa)\left( |A^\Sigma|^2 - \operatorname{Ric}(\nu_\Sigma, \nu_\Sigma) \right) \ensuremath{\mathrm{z}} + O(\ensuremath{\mathrm{z}}^2), \\ \nu^\parallel (\operatorname{tr}_{N, \mathring{g}} h) &=- \frac{\tau}{\rho} \vec{w} \left( \operatorname{tr}_{\Sigma, \mathring{g}} h^\Sigma + \left( |A^\Sigma|^2 - \operatorname{Ric}(\nu_\Sigma, \nu_\Sigma)\right) \ensuremath{\mathrm{z}}^2 \right)\\ &\mathrel{\phantom{=}}- \left(\tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \vec{v}^\perp\right) \left( \operatorname{tr}_{\Sigma, \mathring{g}} h^\Sigma + \left( |A^\Sigma|^2 - \operatorname{Ric}(\nu_\Sigma, \nu_\Sigma)\right) \ensuremath{\mathrm{z}}^2\right) + O(\ensuremath{\mathrm{z}}^3). \end{align*} From this and \ref{Lzinit} It follows that $\| \rho^2 \nu( \operatorname{tr}_{N,\mathring{g}} h) : C^k(\mathbb{K}, \chi, \rho^2( |\ensuremath{\mathrm{z}}| + \tau ) ) \| \le C(k)$. We now estimate the remaining terms. Using \ref{Lh}(i) and \ref{Lcatrimm}(v) we have that \[ \| \nabla_\nu h + 2 \tanh {{\ensuremath{\mathrm{s}}}}\, A^\Sigma_p : C^k(\mathbb{K}, \chi, |\ensuremath{\mathrm{z}}| + \tau + \rho^2)\| \le C(k). \] Using Lemma \ref{Lzinit} to estimate terms in \eqref{Etrat} with a factor of $\sin\theta_\kappa$, we estimate \[ \| \operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} - \rho^2 \nu(\operatorname{tr}_{N, \mathring{g}} h) - 2\tau^2 \tanh {{\ensuremath{\mathrm{s}}}} \, A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}): C^k( \mathbb{K}, \chi, \rho^2 \tau) \| \le C(k), \] and the estimate on $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha}$ follows. Using that \begin{align} \label{Ebeta} \beta(X) = h(X, \nu_\mathbb{K}) = h( X, \nu^{\parallel}) = - \frac{\tau}{\rho} h(X, \vec{w} ) - \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \, h(X, \vec{v}^\perp), \end{align} we compute using Lemma \ref{Lcatrimm} \begin{align*} -\tau^{-1} \beta_{{\ensuremath{\mathrm{s}}}} &= \tanh {{\ensuremath{\mathrm{s}}}} \left[ h( \vec{w}, \vec{w}) - \sin^2 \theta_\kappa h(\vec{v}^\perp, \vec{v}^\perp)\right] + \sin \theta_\kappa h(\vec{w}, \vec{v}^\perp)( \sinh {{\ensuremath{\mathrm{s}}}} \tanh {{\ensuremath{\mathrm{s}}}} - \frac{ \tau}{ \rho}), \\ -\beta_\vartheta &= \tau h(\vec{w}', \vec{w}) + \rho \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa h( \vec{w}', \vec{v}^\perp). \end{align*} The estimate on $\beta$ follows from Lemma \ref{Lzinit}. We now compute $\mathrm{div}_{\mathbb{K}, \chi} \beta$. Note that \begin{align*} \mathrm{div}_{\mathbb{K}, \chi} \beta = \beta_{{{\ensuremath{\mathrm{s}}}}, {{\ensuremath{\mathrm{s}}}}} + \beta_{\vartheta, \vartheta}. \end{align*} We have $-\tau^{-1} \beta_{{{\ensuremath{\mathrm{s}}}}, {{\ensuremath{\mathrm{s}}}}} = (I) + (II)$, where \begin{align*} (I) &= \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}} \left[ h( \vec{w}, \vec{w}) - \sin^2 \theta_\kappa h(\vec{v}^\perp, \vec{v}^\perp)\right] + \sin \theta_\kappa h(\vec{w}, \vec{v}^\perp) ( \sinh {{\ensuremath{\mathrm{s}}}} + 2 \operatorname{sech} {{\ensuremath{\mathrm{s}}}} \tanh {{\ensuremath{\mathrm{s}}}}) , \\ (II) &= \tanh {{\ensuremath{\mathrm{s}}}} \left[ (\nabla_{\partial_{{\ensuremath{\mathrm{s}}}}} h)(\vec{w}, \vec{w}) - \sin^2 \theta_\kappa (\nabla_{\partial_{{\ensuremath{\mathrm{s}}}}} h )(\vec{v}^\perp, \vec{v}^\perp)\right] + \sin \theta_\kappa (\nabla_{\partial_{{\ensuremath{\mathrm{s}}}}} h )(\vec{w}, \vec{v}^\perp) ( \sinh {{\ensuremath{\mathrm{s}}}} \tanh {{\ensuremath{\mathrm{s}}}} - \frac{\tau}{\rho}). \end{align*} Using this with \ref{Lh}(i), \ref{Lcatrimm}(ii), \ref{Lzinit}, and \ref{Nw}, we estimate \begin{align*} \| \beta_{{{\ensuremath{\mathrm{s}}}}, {{\ensuremath{\mathrm{s}}}}} - 2 \tau \ensuremath{\mathrm{z}} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}\, A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}) - 2\tau^2 \tanh{{\ensuremath{\mathrm{s}}}}\, A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}): C^k({{\widehat{\cat}}}, \chi, \rho^2(|\ensuremath{\mathrm{z}}| + \tau))\| \le C(k ). \end{align*} Next we compute \begin{align*} - \beta_{\vartheta, \vartheta} = - \tau h( \vec{w}, \vec{w}) + \tau h( \vec{w}', \vec{w}')+\rho \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa \frac{\partial}{\partial \vartheta}\left( h( \vec{w}', \vec{v}^\perp)\right) + \tau (\nabla_{\partial_\vartheta} h)(\vec{w}', \vec{w}). \end{align*} Using this with \ref{Lh}(i), \ref{Lcatrimm}(iii), \ref{Lzinit}, \ref{Nw}, and noting that $A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}) = - A^\Sigma_p(\vec{e}_\theta, \vec{e}_\theta)$ we estimate \begin{align*} \| \beta_{\vartheta, \vartheta} + 4 \tau \ensuremath{\mathrm{z}} A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}}): C^k(\mathbb{K}, \chi, \rho^2(\tau +|\ensuremath{\mathrm{z}}|) )\| \le C(k). \end{align*} Combining the preceding completes the estimate on $\mathrm{div}_{\mathbb{K}, \chi} \beta$. Finally, we have \begin{align*} \sigma = h(\nu, \nu) = h(\nu^\parallel, \nu^\parallel) = \frac{\tau^2}{\rho^2} h( \vec{w}, \vec{w}) - 2 \frac{\tau}{\rho} \tanh {{\ensuremath{\mathrm{s}}}} \sin \theta_\kappa h(\vec{w}, \vec{v}) + \tanh^2 {{\ensuremath{\mathrm{s}}}} \sin^2 \theta_\kappa h(\vec{v}, \vec{v}) \end{align*} and the estimate on $\sigma$ follows from \ref{Lzinit}. \end{proof} \begin{definition} \label{dlowharm} Given a function $u$ defined on $\mathbb{K}$, we define the \emph{projection ${\mathcal{H}}_1( u) $ of $u$ onto the first harmonics of} $\mathbb{K}$ by \begin{align*} {\mathcal{H}}_1( u) = \frac{1}{\pi} \left( \int_0^{2\pi} u({{\ensuremath{\mathrm{s}}}}, \vartheta) \cos \vartheta d\vartheta\right) \cos \vartheta + \frac{1}{\pi} \left( \int_0^{2\pi} u({{\ensuremath{\mathrm{s}}}}, \vartheta) \sin \vartheta d\vartheta\right) \sin \vartheta. \end{align*} \end{definition} \begin{lemma} \label{LH} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\| \rho^2 H : C^k(\mathbb{K}, \chi, (\tau+ \rho^2)(|\ensuremath{\mathrm{z}}|+ \tau) ) \| \le C(k)$. \item $\| {\mathcal{H}}_1(\rho^2 H) :C^k\big(\mathbb{K}, \chi, \rho^2(|\ensuremath{\mathrm{z}}| + \tau) \big) \| \le C(k)$. \end{enumerate} \end{lemma} \begin{proof} (i) follows by combining the estimates in \ref{Ltensest} with \ref{LHpertsmall}, where we note in particular that $\mathring{H} =0$ because $\mathring{g}$ is Euclidean and that $\mathrm{div}_{\mathbb{K}, \chi}\beta = \rho^2 \mathrm{div}_{\mathbb{K}, \mathring{g}} \beta$ and $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} = \rho^2 \operatorname{tr}_{\mathbb{K}, \mathring{g}} \widetilde{\alpha}$. To prove the estimate in (ii) we will need a more refined expansion for $\rho^2 H$: from \ref{Lhasmp}, and the estimates in \ref{Ltensest}, note first that \begin{align*} \left\| {\mathcal{H}}_1( \rho^2 H - \mathrm{div}_{\mathbb{K}, \chi} \beta + \textstyle{\frac{1}{2}} \operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha} +\rho^2 \textstyle{\frac{1}{2}} \langle \widetilde{\alpha}, \widehat{\alpha}\rangle_{\mathring{g}} ) : C^k\big( \mathbb{K} , \chi, \rho^2( |\ensuremath{\mathrm{z}}| + \tau) \big) \right\| \le C(k), \end{align*} so it suffices to show that the estimate in (ii) holds when $\rho^2 H$ is replaced by $\mathrm{div}_{\mathbb{K}, \chi} \beta$, $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha}$, or $\rho^2\langle \widetilde{\alpha}, \widehat{\alpha}\rangle_{\mathring{g}}$. The estimate for $\rho^2 \langle \widetilde{\alpha}, \widehat{\alpha}\rangle_{\mathring{g}}$ follows by combining the estimates on $\alpha$ and $\widetilde{\alpha}$ in \ref{Ltensest}(i) and (ii). The estimates on $\operatorname{tr}_{\mathbb{K}, \chi} \widetilde{\alpha}$ and $\mathrm{div}_{\mathbb{K}, \chi} \beta$ follow from \ref{Ltensest}(ii)(b) and (iii)(b) using that $A^\Sigma_p(\vec{e}_\ensuremath{\mathrm{r}}, \vec{e}_\ensuremath{\mathrm{r}})$ is (up to higher order terms involving $|\kappa|$) orthogonal to the first harmonics on $\mathbb{K}$. \end{proof} The following lemma relates estimates on $H$, which will be crucial for our main applications, to estimates on $ \rho^2 H$, which are easy to compute due to the geometry of $\mathbb{K}$. \begin{lemma} \label{Erhow} Given $f\in C^k(\mathbb{K})$ and $n\in \mathbb{Z}$, we have $\| \rho^n f : C^k(\mathbb{K}, \chi)\| \Sim_{C(k, n)} \| f: C^k(\mathbb{K}, \chi, \rho^{-n})\|.$ \end{lemma} \begin{proof} Using \eqref{E:norm:mult} with $u_1 = \rho^n, u_2 = f, f_1 = \rho^n$, and $f_2 = \rho^{-n}$, we estimate \begin{align*} \| \rho^n f :C^k(\mathbb{K}, \chi)\|& \le C(k)\| \rho^{n} : C^k (\mathbb{K}, \chi, \rho^{n})\| \| f: C^k( \mathbb{K}, \chi, \rho^{-n}) \| \\ &\le C(k, n) \| \rho^{\frac{n}{|n|}} : C^k(\mathbb{K}, \chi, \rho^{\frac{n}{|n|}})\|^{|n|} \| f: C^k( \mathbb{K}, \chi, \rho^{-n}) \| \\ &\le C(k, n) \| f: C^k( \mathbb{K}, \chi, \rho^{-n}) \| , \end{align*} where in the second inequality we have used \eqref{E:norm:mult} iteratively and in the third we have used \ref{Lzinit}(i). Using \eqref{E:norm:mult} with $u_1 = \rho^{-n}, u_2 = \rho^n f, f_1= \rho^{-n}$, and $f_2 = 1$, we estimate in an analogous way \begin{align*} \| f: C^k (\mathbb{K}, \chi, \rho^{-n})\| &\le C(k ) \| \rho^{-n}: C^k (\mathbb{K}, \chi, \rho^{-n})\| \| \rho^n f: C^k ({{\widehat{\cat}}}, \chi)\| \\ &\le C(k, n) \| \rho^n f: C^k (\mathbb{K}, \chi)\| . \end{align*} Combining these estimates completes the proof. \end{proof} \begin{cor} \label{LH2} \begin{enumerate}[label=\emph{(\roman*)}] \item $\| H : C^k(\mathbb{K}, \chi ,\tau \rho^{-2} +1 )\| \le C(k) \tau | \log \tau |$. \item $\| {\mathcal{H}}_1 H : C^k(\mathbb{K}, \chi)\| \le C(k) \tau | \log \tau |$. \end{enumerate} \end{cor} \begin{proof} This follows from combining \ref{LH} with \ref{Erhow} and using that $|\ensuremath{\mathrm{z}}| \le C \tau | \log \tau |$ on $\mathbb{K}$. \end{proof} \section{LD solutions and initial surfaces} \label{S:LD} \subsection*{Green's functions and LD solutions} $\phantom{ab}$ \nopagebreak \begin{definition}[Green's functions] \label{dggen} Given a Riemannian surface $(\Sigma, g)$, $V\in C^\infty(\Sigma)$, and $p\in\Sigma$, we call $G_p$ a \emph{Green's function for $\Delta_g + V$ on $\Omega$ with singularity at $p$} if it satisfies the following. \begin{enumerate}[label=\emph{(\roman*)}] \item There exists an open neighborhood $\Omega\subset\Sigma$ of $p$ such that $G_p \in C^\infty \left( \Omega \setminus \{p\} \right)$. \item $\left( \Delta_g + V\right) G_p= 0$ on $\Omega\setminus\{p\}$. \item $G_p-\log {\mathbf{d}}^g_p$ is bounded on some deleted neighborhood of $p$ contained in $\Omega$. \end{enumerate} \end{definition} Clearly if $G_p$ is as in \ref{dggen} and $\Omega''\subset \Omega$ is also a neighborhood of $p$, then $\left. G_p \right|_{\Omega''}$ is a Green's function for $\Delta_g + V$ on $\Omega''$ with singularity at $p$. \begin{lemma} \label{Lsing} If $G_p \in C^\infty \left( \Omega \setminus \{p\} \right)$ and ${\widetilde{G}}_p \in C^\infty \left( \Omega \setminus \{p\} \right)$ are both Green's functions for $\Delta_g + V$ on $\Omega$ with singularity at $p$ as in Definition \ref{dggen}, then $G_p - {\widetilde{G}}_p$ has a unique extension in $C^\infty(\Omega)$. \end{lemma} \begin{proof} Clearly $G_p - {\widetilde{G}}_p$ is a smooth and bounded solution of the Partial Differential Equation on $\Omega\setminus \{p\} $ by the definitions. By standard regularity theory then the lemma follows \cite{bers}. \end{proof} \begin{lemma} \label{Lgreenlog} \label{Ldsolve} Given $(\Sigma, g)$, $V$, and $p\in\Sigma$ as in \ref{dggen} there exists ${\underline{\delta}}>0$ such that $\Delta_g +V$ on $D^\Sigma_p({\underline{\delta}'})$ satisfies the following $\forall{\underline{\delta}'}\in(0,{\underline{\delta}}]$. \begin{enumerate}[label=\emph{(\roman*)}] \item There is a Green's function $G_p$ for $\Delta_g+V$ on $D^\Sigma_p({\underline{\delta}'})$ with singularity at $p$ satisfying \begin{align} \label{Egreenlog} \left\| G_p - \log r : C^k\left( D^\Sigma_p ({\underline{\delta}'}) \setminus \{ p \} , r, g, r^2| \log r| \right)\right\| \le C(k), \qquad \text{where} \qquad r: = {\mathbf{d}}^\Sigma_p. \end{align} \item For any given $u_\partial \in C^{2,\beta }( \partial D^\Sigma_p({\underline{\delta}'}) \, )$ there is a unique solution $u\in C^{2,\beta }( D^\Sigma_p({\underline{\delta}'}) \, )$ to the Dirichlet problem $ \qquad (\Delta_g +V)u=0 \text{ on } D^\Sigma_p({\underline{\delta}'}), \qquad u=u_\partial \text{ on } \partial D^\Sigma_p({\underline{\delta}'}). $ \end{enumerate} \end{lemma} \begin{proof} (i) is standard, see for example \cite{bers}. (ii) follows easily by scaling to unit size and treating the operator as a small perturbation of the flat Laplacian. \end{proof} \begin{corollary} \label{cor:green} If $G_p$ and ${\widetilde{G}}_p$ are both Green's functions as in \ref{Lgreenlog}(i) satisfying \ref{Egreenlog} for some $\delta>0$, then the unique extension $G\in C^\infty(D^\Sigma_p (\delta) \, )$ of $G_p- {\widetilde{G}}_p$ (recall \ref{Lsing}) satisfies $G(p) = 0$ and $d_pG=0$. \end{corollary} \begin{proof} By subtracting the two versions of \eqref{Egreenlog} we conclude that $|G_p- {\widetilde{G}}_p|\le C r^2| \log r| $, which implies the result by \ref{Lsing}. \end{proof} \begin{definition}[LD solutions] \label{dLD} We call $\varphi$ a \emph{linearized doubling (LD) solution on $\Sigma$} when there exists a finite set $L\subset \Sigma$, called the \emph{singular set of $\varphi$}, and a function ${\boldsymbol{\tau}}: L \rightarrow \mathbb{R}\setminus\{0\}$, called the \emph{configuration of $\varphi$}, satisfying the following, where $\tau_p$ denotes the value of ${\boldsymbol{\tau}}$ at $p\in L$. \begin{enumerate}[label=\emph{(\roman*)}] \item $ \varphi \in C^\infty (\, \Sigma \setminus L \, ) $ and ${\mathcal{L}}_\Sigma\varphi=0$ on $\Sigma\setminus L$ (recall \ref{N:A}). \item $\forall p \in L$ the function $\varphi - \tau_p \log {\mathbf{d}}^g_p$ is bounded on some deleted neighborhood of $p$ in $\Sigma$. \end{enumerate} \end{definition} In other words LD solutions are Green's functions for ${\mathcal{L}}_\Sigma$ (recall \ref{dggen}) with multiple singularities of various strengths; we call them solutions because they satisfy the linearized equation as in \ref{dLD}(i). \begin{remark} \label{R:LD} In some constructions we will need to modify the definition of LD solutions in \ref{dLD} either by imposing boundary or decay conditions or by relaxing the requirement ${\mathcal{L}}_\Sigma\varphi=0$ on $\Sigma\setminus L$. Note that although we usually require $\forall p\in L$ $\tau_p>0$, in the definition we allow any $\tau_p \in \mathbb{R}\setminus\{0\}$ to ensure (by \ref{Lsing}) that the LD solutions form a vector space, and those with singular set a subset of a given finite set $L'\subset\Sigma$, a subspace. \end{remark} \subsection*{Mismatch and obstruction spaces} $\phantom{ab}$ \nopagebreak \begin{convention}[The constants $\delta_p$] \label{con:L} Given $L$ as in \ref{dLD} we assume that for each $p\in L$ a constant $\delta_p>0$ has been chosen so that the following are satisfied. \begin{enumerate}[label={(\roman*)}] \item $\forall p,p'\in L$ with $p\ne p'$ we have $D^\Sigma_p(9\delta_p) \cap D^\Sigma_{p'}(9\delta_{p'}) = \emptyset $. \item $\forall p\in L$ and $\forall{\underline{\delta}'}\in(0, 3 \delta_p]$, ${\mathcal{L}}_\Sigma$ on $D^\Sigma_p({\underline{\delta}'})$ satisfies \ref{Lgreenlog}(i)-(ii). \item $\forall p\in L$, $\delta_p < {\mathrm{inj}}^{\Sigma,N,g}_p$ (recall \ref{dexp}). \end{enumerate} \end{convention} \begin{lemma} \label{Rmismatch} Given $\varphi$, $L$, and ${\boldsymbol{\tau}}$ as in \ref{dLD} and assuming \ref{con:L}, $\forall p\in L$ there exist $\widehat{\varphi}_p\in C^\infty \! \left( D^\Sigma_p( 2 \delta_p) \right)$ and a Green's function $G_p$ for ${\mathcal{L}}_\Sigma$ on $D^\Sigma_p( 2 \delta_p)$ with singularity at $p$ satisfying \ref{Egreenlog} with $ 2 \delta_p$ instead of ${\underline{\delta}'}$, such that the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\varphi=\widehat{\varphi}_p + \tau_p \, G_p \, $ on $D^\Sigma_p( 2 \delta_p) \setminus \{ p \} $. \item $\widehat{\varphi}_p(p)$ and $d_p\widehat{\varphi}_p:T_p\Sigma\to\mathbb{R}$ are independent of the choice of $\delta_p$ and $G_p$ and depend only on $\varphi$. \item $\varphi \circ \exp^\Sigma_p(v)= \tau_p \log |v| + \widehat{\varphi}_p(p) + d_p\widehat{\varphi}_p (v) + O(|v|^2\log|v|)$ for small $v\in T_p\Sigma$. \end{enumerate} \end{lemma} \begin{proof} The existence of $G_p$ follows from \ref{con:L}(ii) and (i) serves then as the definition of $\widehat{\varphi}_p$. (ii) follows then from \ref{cor:green} and (iii) from a Taylor expansion of $\widehat{\varphi}_p$ combined with \eqref{Egreenlog}. \end{proof} \begin{definition}[Mismatch of LD solutions {\cite[Definition 3.3]{kap}}] \label{Dmismatch} Given $\varphi$, $L$, and ${\boldsymbol{\tau}}$ as in \ref{dLD} with $\tau_p>0$ $\forall p\in L$, we define the \emph{mismatch of $\varphi$}, ${\mathcal{M}}_L \varphi \in \mathscr{V}[L]$ (recall \ref{DVcal}), by ${\mathcal{M}}_L \varphi : = \bigoplus_{p\in L} {\mathcal{M}}_p \varphi$, where ${\mathcal{M}}_p \varphi \in \mathscr{V}[p]$ is defined by (recall \ref{Rmismatch}) \begin{equation*} \begin{aligned} {\mathcal{M}}_p \varphi : = & \,\, \Ecalunder_p \widehat{\varphi}_p + \tau_p \log (\tau_p/2) \, , \quad \text{ or equivalently by \ref{Rmismatch}(iii), } \\ \varphi \circ \exp^\Sigma_p(v)= & \,\, \tau_p \log ( 2 |v| / \tau_p ) + \left( {\mathcal{M}}_p \varphi \right) (v) + O(|v|^2\log|v|) \quad \text{ for small } v\in T_p\Sigma. \end{aligned} \end{equation*} \end{definition} The purpose of the following two lemmas is to understand LD solutions in the language of conformally modified metrics which will be useful in Part II. \begin{lemma}[Distance expansion under conformal change of metric] \label{LGdiff} Consider a metric $\widehat{g} = e^{-2\omega}g$ on $\Sigma$, where $\omega \in C^\infty(\Sigma)$. For each $p\in \Sigma$ and $q$ in some open neighborhood of $p$ in $\Sigma$, \begin{align*} \left|\log {\mathbf{d}}^{\widehat{g}}_p (q) - \log {\mathbf{d}}^{g}_p (q) + \omega(p)+ \frac{1}{2}d_p\omega(\, (\exp_p^g)^{-1} (q) \,) \right| \leq C \, ({\mathbf{d}}^{g}_p(q))^2. \end{align*} \end{lemma} \begin{proof} In this proof, denote $r = {\mathbf{d}}^g_p(q)$ and ${\hat{r}} = {\mathbf{d}}^{\widehat{g}}_p(q)$, where $q\in \Sigma$ is close to $p$. Let $\gamma$ and $\gammahat$ be respectively the $g$- and $\widehat{g}$-geodesics joining $p$ to $q$. We have \begin{equation*} \begin{gathered} {\hat{r}} \leq \int_{0}^{r} e^{-\omega(\gamma(t))}dt = e^{-\omega(p)}r \left(1-\frac{1}{2}d_p\omega(\gamma'(0))r + O(r^2)\right), \\ r \leq \int_{0}^{{\hat{r}}} e^{\omega(\gammahat(t))}dt = e^{\omega(p)}{\hat{r}}\left(1+ \frac{1}{2} d_p \omega(\gammahat'(0)){\hat{r}} + O({\hat{r}}^2)\right). \end{gathered} \end{equation*} This implies that ${\hat{r}}/r = e^{-\omega(p)}+ O(r)$ and consequently that $|r \gamma'(0)-{\hat{r}} \, \gammahat'(0)|< C r^2$. We complete the proof by taking logarithms of both inequalities above and expanding. \end{proof} \begin{lemma}[Mismatch expansion in a conformal metric] \label{Lmm} Given $\omega \in C^\infty(\Sigma)$ let $\widehat{g} := e^{-2\omega} g$. Given then $\varphi$ as in \ref{Dmismatch} we have $\forall p\in L$ and small $w\in T_p\Sigma$ \begin{align*} \varphi \circ \exp^{\Sigma, \widehat{g}}_p(w) = \tau_p \log (2 |w|_{\widehat{g}}/\tau_p) + ({\mathcal{M}}_p \varphi)(w) + \tau_p \omega(p) + \tau_p d_p \omega (w)/2 + O(|w|^2_{\widehat{g}} \log |w|_{\widehat{g}}). \end{align*} \end{lemma} \begin{proof} Given a small $w\in T_p \Sigma$, in this proof we denote by $v\in T_p\Sigma$ the unique small vector satisfying $\exp^{\Sigma, g}_p(v) = \exp^{\Sigma, \widehat{g}}_p(w)$, that is $v = (\exp^{\Sigma, g}_p)^{-1} \circ \exp^{\Sigma, \widehat{g}}_p(w)$. From this and \ref{Dmismatch} we have \begin{align*} \varphi \circ \exp^{\Sigma, \widehat{g}}_p(w) &= \tau_p \log (2 |w|_{\widehat{g}}/ \tau_p) +\tau_p \log(|v|_g / |w|_{\widehat{g}})+ ({\mathcal{M}}_p \varphi)(v) + O(|v|^2_g \log |v|_g). \end{align*} The proof is completed from this using \ref{LGdiff} and that $v = w+ O(|w|^2_{\widehat{g}})$. \end{proof} \begin{assumption}[Obstruction spaces] \label{aK} Given $L$ as in \ref{dLD} we assume chosen a subspace $\widehat{\mathscr{K}}[L] = \bigoplus_{p\in L}\widehat{\mathscr{K}}[p] \subset C^\infty(\Sigma)$ satisfying the following, where the map ${\mathcal{E}}_L : \widehat{\mathscr{K}}[L] \rightarrow \mathscr{V}[L]$ (recall \ref{DVcal}) is defined by ${\mathcal{E}}_L(v) := \bigoplus_{p\in L} \Ecalunder_p v$. \begin{enumerate}[label = {(\roman*)}] \item The functions in $\widehat{\mathscr{K}}[p]$ are supported on $D^\Sigma_p(4 \delta_p)$. \item The functions in $\mathscr{K}[p]$, where $\mathscr{K}[p]: = {\mathcal{L}}_\Sigma \widehat{\mathscr{K}}[p]$, are supported on $D^\Sigma_p(4 \delta_p) \setminus D^{\Sigma}_p(\delta_p/4)$. \item ${\mathcal{E}}_L : \widehat{\mathscr{K}}[L] \rightarrow \mathscr{V}[L]$ is a linear isomorphism. \item $\left\| {\mathcal{E}}^{-1}_L \right\| \le C \delta_{\min}^{-2-\beta}$, where $\delta_{\min}:=\min_{p\in L}\delta_p$ and $\left\| {\mathcal{E}}^{-1}_L \right\|$ is the operator norm of ${\mathcal{E}}^{-1}_L : \mathscr{V}[L] \rightarrow \widehat{\mathscr{K}}[L]$ with respect to the $C^{2, \beta}\left( \Sigma, g\right)$ norm on the target and the maximum norm on the domain subject to the metric $g$ on $\Sigma$. \item $\forall {\boldsymbol{\underline{\kappa}}} = ({\underline{\kappa}}_p)_{p\in L} \in \mathscr{V}[L]$ we have for each $p\in L$ \[ \| {\underline{\kappa}}_p \circ (\exp^\Sigma_p)^{-1} - {\mathcal{E}}^{-1}_L{\underline{\kappa}}_p : C^k( D^\Sigma_p(\delta_p), {\mathbf{d}}^\Sigma_p, g, ({\mathbf{d}}^\Sigma_p)^2)\| \le C(k) \, |{\underline{\kappa}}_p| . \] \end{enumerate} \end{assumption} \begin{remark} \label{R:p} Given $L$ as in \ref{dLD} and constants $\delta_p$ as in \ref{con:L}, a possible definition of spaces $\widehat{\mathscr{K}}[p]$ satisfying \ref{aK} is by $ \displaystyle{ \widehat{\mathscr{K}}[p] := \operatorname{span}\left( \left\{ {\boldsymbol{\Psi}}[\delta_p, 2\delta_p; {\mathbf{d}}^\Sigma_p]( u_i, 0)\right\}_{i=1}^3 \right), } $ where $u_i, i=1, 2,3$ are solutions of the Dirichlet problem ${\mathcal{L}}_\Sigma u_i = 0$ on $D^\Sigma_p (3\delta_p)$ with corresponding boundary data $u_1 = \sin \theta, u_2 = \cos \theta, u_3 = 1$ on $\partial D^\Sigma_p(3\delta_p)$, where $\theta$ is a local angular coordinate in geodesic polar coordinates for $D^\Sigma_p(\delta_p)$. In the constructions in this paper, we will use choices (see \ref{dkernelsym}) of $\widehat{\mathscr{K}}[L]$ and $\mathscr{K}[L]$ adapted to symmetries of the problems. \end{remark} \subsection*{The initial surfaces and their regions} $\phantom{ab}$ \nopagebreak Each initial surface we construct depends not only on an LD solution $\varphi$ as in \cite{kap}, but also on additional parameters ${\boldsymbol{\underline{\kappa}}} \in \mathscr{V}[L]$ controlling the elevation and tilt of the catenoidal bridges in the vicinity of $\varphi$'s singular set $L$. We list now the conditions imposed on these data. \begin{convention}[Uniformity of LD solutions] \label{con:one} We assume given $\varphi$, $L$, and ${\boldsymbol{\tau}}$ as in \ref{dLD} with $\tau_p>0$ $\forall p\in L$, and $\delta_p$'s as in \ref{con:L}, satisfying the following with $\alpha$ as in \ref{con:alpha} and \begin{equation} \label{Ddeltaprime} \delta_p':=\tau_p^{\alpha} \quad (\forall p\in L), \qquad \tau_{\min}:=\min_{p\in L}\tau_p, \qquad \tau_{\max}:=\max_{p\in L}\tau_p, \qquad \delta_{\min}':=\min_{p\in L}\delta_p'=\tau_{\min}^{\alpha}. \end{equation} \begin{enumerate}[label=(\roman*)] \item \label{con:one:i} \ref{con:L} holds and---in accordance with \ref{con:alpha}---$\tau_{\max}$ is small enough as needed in terms of $\alpha$ only. \item $\forall p\in L$ we have $9 \delta_p' = 9 \tau_p^{\alpha} < \tau_p^{\alpha/100} < \delta_p \, $. \item $\tau_{\max}\le \tau_{\min}^{1-{\alpha}/100}$. \item $\forall p\in L$ we have $(\delta_p)^{-2} \| \, \varphi : C^{2,\beta}(\, \partial D^\Sigma_p(\delta_p) ,\, g\,)\,\| \le\tau_p^{1-{\alpha}/9}$. \item $\| \varphi:C^{3,\beta} ( \, \Sigma \setminus\textstyle\bigsqcup_{q\in L}D^\Sigma_q(\delta_q') \, , \, g \, ) \, \| \le \tau_{\min}^{8/9} \, $. \item On $\Sigma\setminus\textstyle\bigsqcup_{q\in L}D^\Sigma_q(\delta_q') $ we have $\tau_{\max}^{1+\alpha/5} \le \varphi$. \end{enumerate} \end{convention} \begin{definition}[Initial surfaces] \label{Dinit} Assuming data as in \ref{con:one} and ${\boldsymbol{\underline{\kappa}}} = ({\underline{\kappa}}_p)_{p\in L} \in \mathscr{V}[L]$ satisfying in accordance with \ref{Akappa} \begin{equation} \label{dalpha} \forall p\in L \qquad |{\underline{\kappa}}_p| < \tau_p^{1+ \alpha/6}, \end{equation} we define the smooth initial surface (recall \ref{dgraph}) $$ M = M[\varphi, {\boldsymbol{\underline{\kappa}}}]:= \text{\emph{Graph}}^N_{\Omega}\big( \varphi^{gl}_+\, \big) \bigcup \text{\emph{Graph}}^N_{\Omega}\big(-\varphi^{gl}_-\, \big) \bigcup \bigsqcup_{p\in L} \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p ], $$ where $\Omega : = \Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p( 9 \tau_p)$ and the functions $\varphi^{gl}_{\pm} = \varphi^{gl}_{\pm} [ \varphi, {\boldsymbol{\underline{\kappa}}}] : \Omega \rightarrow \mathbb{R}$ are defined as follows. \begin{enumerate}[label = \emph{(\roman*)}] \item $\forall p\in L$ we have $\varphi^{gl}_{\pm} : = {\boldsymbol{\Psi}} [ 2 \delta'_p, 3 \delta'_p ; {\mathbf{d}}^\Sigma_p]\left( \varphi^{\pm}_{\mathrm{cat}}[\tau_p, {\underline{\kappa}}_p] \circ ( \, \exp^\Sigma_p\right)^{-1} , \, \varphi +\underline{v}_\pm )$ on $D^\Sigma_p(3 \delta'_p) \setminus D^\Sigma_p(9 \tau_p)$, where $\underline{v}_\pm := - {\mathcal{E}}_L^{-1} {\mathcal{M}}_L \varphi \pm {\mathcal{E}}^{-1}_L {\boldsymbol{\underline{\kappa}}} \in \widehat{\mathscr{K}}[L]$. \item On $\Sigma \setminus \bigsqcup_{p\in L} D^\Sigma_p(3 \delta'_p)$ we have $\varphi^{gl}_{\pm} : = \varphi +\underline{v}_\pm $. \end{enumerate} \end{definition} \begin{lemma}[The gluing region] \label{Lgluingreg} For $M = M[\varphi, {\boldsymbol{\underline{\kappa}}}]$ as in \ref{Dinit} and $\forall p \in L$ the following hold. \begin{enumerate}[label = \emph{(\roman*)}] \item $\left\| \varphi^{gl}_{\pm} - \tau_p \log {\mathbf{d}}^\Sigma_p : C^{3, \beta}\left( D^\Sigma_p(4 \delta'_p)\setminus D^\Sigma_p (\delta'_p), (\delta'_p)^{-2} g\right) \right\| \le \tau_p^{1+ \frac{15}{8}\alpha}$. \item $\left\| \varphi^{gl}_{\pm} : C^{3, \beta}\left( D^\Sigma_p(4 \delta'_p)\setminus D^\Sigma_p (\delta'_p), (\delta'_p)^{-2} g\right) \right\| \le C \tau_p |\log \tau_p|$. \item $\left\| (\delta'_p)^2 H'_{\pm}: C^{0, \beta}\left( D_p^\Sigma(3\delta'_p) \setminus D_p^{\Sigma}(2 \delta'_p), (\delta'_p)^{-2} g\right) \right\| \le \tau_p^{1+\frac{15}{8}\alpha}$, where $H'_{\pm}$ denotes the pushforward of the mean curvature of the graph of $\pm \varphi^{gl}_\pm$ to $\Sigma$ by $\Pi_{\Sigma}$. \end{enumerate} \end{lemma} \begin{proof} We have for each $p\in L$ on $\Omega_p := D_p^\Sigma(4 \delta'_p) \setminus D^\Sigma_p(\delta'_p)$, (recall \ref{Dinit}) \begin{equation} \label{ephiuu} \begin{aligned} \varphi^{gl}_{\pm} &= \tau_p G_p - \tau_p \log \frac{\tau_p}{2} {\mathcal{E}}^{-1}_L \delta^L_p \pm {\mathcal{E}}^{-1}_L {\boldsymbol{\underline{\kappa}}} + {\boldsymbol{\Psi}} [ 2 \delta'_p, 3 \delta'_p; {\mathbf{d}}^\Sigma_p ] ( {\underline{\varphi}}_{\pm}, \overline{\varphi}_{\pm}), \\ \text{where} \quad {\underline{\varphi}}_{\pm} &:= \varphi^{\pm}_{\mathrm{cat}}[\tau_p, {\underline{\kappa}}_p]\circ \left( \exp^\Sigma_p\right)^{-1}- \tau_p G_p + \tau_p \log \frac{\tau_p}{2}{\mathcal{E}}^{-1}_L \delta^L_p \mp {\mathcal{E}}^{-1}_L {\boldsymbol{\underline{\kappa}}}, \\ \overline{\varphi}_{\pm} &:= \varphi - \tau_p G_p+ \tau_p \log \frac{\tau_p}{2}{\mathcal{E}}^{-1}_L \delta^L_p - {\mathcal{E}}^{-1}_L {\mathcal{M}}_L \varphi , \end{aligned} \end{equation} where $\delta^L_p \in \mathscr{V}[L]$ is defined by $\delta^L_p := ( \delta_{pq} )_{q\in L}$ with $\delta_{pq}$ the Kronecker delta. By scaling the ambient metric to ${\widetilde{g}}' : = (\delta'_p)^{-2} g$ and expanding in linear and higher order terms we have \begin{align*} (\delta'_p)^2 H'_\pm = (\delta'_p)^2 {\mathcal{L}}_\Sigma \varphi^{gl}_\pm + \delta'_p \widetilde{Q}_{(\delta'_p)^{-1} \varphi^{gl}_\pm}. \end{align*} Note that on $\Omega_p$ we have \begin{align*} \varphi^{gl}_\pm - \varphi^{\pm}_{\mathrm{cat}}[\tau_p, {\underline{\kappa}}_p ] &= {\boldsymbol{\Psi}} \left[ 2 \delta'_p, 3\delta'_p; {\mathbf{d}}^\Sigma_p\right]\big( 0, \overline{\varphi}_\pm - {\underline{\varphi}}_\pm\big), \\ {\mathcal{L}}_\Sigma \varphi^{gl}_\pm &= {\mathcal{L}}_{\Sigma} {\boldsymbol{\Psi}} \left[ 2 \delta'_p, 3\delta'_p; {\mathbf{d}}^\Sigma_p\right]\big( {\underline{\varphi}}_\pm, \overline{\varphi}_\pm\big). \end{align*} Using these, we have \begin{equation*} \begin{aligned} \| \varphi^{gl}_{\pm}\| &\le C\left( \tau_p | \log \tau_p | + \| {\underline{\varphi}}_{\pm} \| + \| \overline{\varphi}_{\pm} \| \right),\\ \| \varphi^{gl}_{\pm} - \tau_p \log {\mathbf{d}}^\Sigma_p \| &\le C\left( \| {\underline{\varphi}}_\pm\| + \|\overline{\varphi}_\pm \| \right),\\ \left\| (\delta'_p)^2 {\mathcal{L}}_\Sigma \varphi^{gl}_\pm : C^{0, \beta}\left(\Omega_p, (\delta'_p)^{-2} g\right) \right\| &\le C \left( \| {\underline{\varphi}}_\pm\| + \| \overline{\varphi}_\pm\|\right),\\ \left\| \delta'_p \widetilde{Q}_{ (\delta'_p )^{-1} \varphi^{gl}_\pm} : C^{0, \beta}\left( \Omega_p, (\delta'_p)^{-2} g\right) \right\| &\le (\delta'_p)^{-1} \| \varphi^{gl}_\pm \|^2, \end{aligned} \end{equation*} where in this proof when we do not specify the norm we mean the $C^{3, \beta}\left( \Omega_p, (\delta'_p)^{-2}g \right)$ norm. We conclude that if $\|\varphi^{gl}_\pm\|\le\delta_p'$ (to control the quadratic terms), then we have $$ \left\| (\delta'_p)^{2}\, H'_\pm :C^{0,\beta}(\, \Omega_p ,\, (\delta'_p)^{-2} g\,)\,\right\| \le \,C\, ( \, (\delta_p')^{-1}\tau_p^2|\log\tau_p|^2 + \|{\underline{\varphi}}_\pm\,\| + \|\overline{\varphi}_\pm\,\| ). $$ Adding and subtracting $({\underline{\kappa}}_p+ \tau_p \log \frac{2\ensuremath{\mathrm{r}}}{\tau_p})\circ (\exp^{\Sigma}_p)^{-1}$ in \eqref{ephiuu} we have ${\underline{\varphi}}_\pm = (I)+(II)+(III)+(IV)$, where \begin{equation*} \begin{gathered} (I)\circ \exp^\Sigma_p = \varphi^{\pm}_{\mathrm{cat}}[\tau_p, {\underline{\kappa}}_p] - \tau_p \log \frac{2 \ensuremath{\mathrm{r}}}{\tau_p} \mp {\underline{\kappa}}_p, \quad (II) = \tau_p( \log {\mathbf{d}}^\Sigma_p - G_p) , \\ (III) = - \tau_p \log \frac{\tau_p}{2} (1- {\mathcal{E}}^{-1}_L \delta^L_p ), \quad (IV) = \pm ( ({\underline{\kappa}}_p)\circ (\exp^\Sigma_p)^{-1}- {\mathcal{E}}^{-1}_L {\boldsymbol{\underline{\kappa}}}). \end{gathered} \end{equation*} Using the triangle inequality and estimating (I)-(IV) using \ref{Ltcest}, \ref{Lgreenlog}(i), and \ref{aK}, we have \begin{align*} \| {\underline{\varphi}}_\pm \| &\le C(|\kappa_p|+ \tau_p)^3\tau_p^{-2\alpha} + C\tau_p^{1+2\alpha} |\log \tau_p|. \end{align*} Because ${\mathcal{L}}_\Sigma \overline{\varphi}_{\pm}=0$ on $\Omega_p$ and $\overline{\varphi}_{\pm}$ has vanishing value and differential at $p$ (recall \ref{Dmismatch}, \ref{aK} and \ref{ephiuu}), it follows from standard linear theory that \begin{align*} \left\|\overline{\varphi}_{\pm} \right\| &\le C( \delta'_p/\delta_p)^2 \left \| \overline{\varphi}_{\pm} : C^{2,\beta}\left( \partial D^\Sigma_p(\delta_p ), (\delta_p)^{-2} g\right)\right\|. \end{align*} Using \ref{Ddeltaprime}, \ref{con:one}(ii) and \ref{con:one}(iv), \ref{con:alpha}, and \ref{aK} to estimate the right hand side, we conclude that \begin{align*} \left\| \overline{\varphi}_\pm \right\| \le C \left( \delta'_p\right)^2 \tau_p^{1-\frac{1}{9}\alpha}+ C\tau^{1+2\alpha}_p |\log \tau_p| \le C\tau_p^{1+\frac{17}{9} \alpha}. \end{align*} Combining with the above we complete the proof. \end{proof} \begin{lemma} \label{LMemb} $M$ defined in \ref{Dinit} (assuming \ref{con:one}) is embedded and moreover the following hold. \begin{enumerate}[label = \emph{(\roman*)}] \item On $\Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p(\delta'_p )$ we have $\frac{8}{9} \tau_{\max}^{1+ \alpha/5} \leq \varphi_\pm^{gl}$. \item $\left\| \varphi_{\pm}^{gl} : C^{3, \beta}\left( \Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p(\delta'_p), g\right)\right\| \le \frac{9}{8} \tau_{\min}^{8/9}$. \end{enumerate} \end{lemma} \begin{proof} We first prove the estimates (i-ii): (i) on $\Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p(3 \delta'_p)$ follows from \ref{con:one}(vi) and \ref{Dinit}, and on $D^\Sigma_p(4\delta'_p) \setminus D^\Sigma_p(\delta'_p)$ for $p\in L$ from \ref{Lgluingreg}(i) and \ref{con:one}(iii). (ii) on $\Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p ( 3 \delta'_p)$ follows from \ref{con:one}(v) and \ref{Dinit}(i), and on $D^\Sigma_p(4\delta'_p) \setminus D^\Sigma_p(\delta'_p)$ for $p\in L$ from \ref{Lgluingreg}(ii) and \ref{con:one}(iii). Finally, the embeddedness of $M$ follows from (i) and by comparing the rest of $M$ with standard catenoids. \end{proof} \begin{definition} \label{D:regions} Following our general methodology we define the following for $x\in[0,4]$. \begin{subequations} \label{E:regions} \begin{align} \label{EStildep} \widetilde{S}'_x &:= \Sigma\setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p( b \tau_p (1+x) )\\ S_x[p] &:= M \cap \Pi_{\Sigma}^{-1}(\overline{D^\Sigma_p( b \tau_p (1+x) )}\,) \qquad \forall p\in L \, , \\ S_x[L] &:= \textstyle\bigsqcup_{p\in L} S_x[p], \\ \label{Shatp} \widehat{S}_x[p] &:= M \cap \Pi_{\Sigma}^{-1}(\overline{D^\Sigma_p(2\delta'_p /(1+x) )}\,)\subset \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p] \qquad \forall p\in L \, , \\ \widehat{S}_x[L] &:= \textstyle\bigsqcup_{p\in L}\widehat{S}_x[p], \end{align} \end{subequations} where $b$ is a large constant independent of the ${\boldsymbol{\tau}}$ and ${\boldsymbol{\underline{\kappa}}}$ parameters which is to be chosen appropriately later. When $x = 0$ we may omit the subscript. \end{definition} \begin{definition} \label{DtauK} We define ${{\widehat{\cat}}}_L : = \bigsqcup_{p\in L} {{\widehat{\cat}}}[p, \tau_p, {\underline{\kappa}}_p]$ and $Y: \widehat{S}[L] \rightarrow {{\widehat{\cat}}}_L$ by taking the restriction of $Y$ to each $\widehat{S}[p]$ to be $(\exp^{\Sigma, N, g}_p)^{-1}$. We define $\tau_L :\mathbb{K}_L\to \mathbb{R}$ by $\tau_L =\tau_p$ on $\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$, where $\mathbb{K}_L := \bigsqcup_{p\in L} \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$. \end{definition} \begin{notation} \label{Npm} If $f^+$ and $f^-$ are functions supported on $\widetilde{S}'$ (recall \eqref{EStildep}), we define $J_M(f^+, f^-)$ to be the function on $M$ supported on $\left( \left. \Pi_\Sigma \right|_M\right)^{-1} \widetilde{S}'$ defined by $f^+\circ \Pi_\Sigma$ on the graph of $\varphi^{gl}_{+}$ and by $f^- \circ \Pi_\Sigma$ on the graph of $- \varphi^{gl}_-$. \end{notation} \section[The linearized equation on the initial surfaces]{The linearized equation on the initial surfaces} \label{S:linearized} \subsection*{Global norms and the mean curvature on the initial surfaces} $\phantom{ab}$ \nopagebreak In this section we state and prove Proposition \ref{Plinear} where we solve with estimates the linearized equation on an initial surface $M$ defined as in \ref{Dinit}. We also provide in \ref{LglobalH} an estimate for the mean curvature in appropriate norm. In this subsection we discuss the global norms we use but first we introduce Assumption \ref{cLker} which simplifies the analysis and implies also Lemma \ref{Lldexistence}. \begin{assumption} \label{cLker} In the rest of Part I of this article we assume \ref{background} holds and furthermore the base surface $\Sigma$ (recall \ref{background}) is closed and the kernel of ${\mathcal{L}}_\Sigma$ is trivial. \end{assumption} \begin{definition} \label{D:norm} For $k\in\mathbb{N}$, $\betahat\in(0,1)$, $\gammahat\in\mathbb{R} $, and $\Omega$ a domain in $\Sigma$, $M$, or ${{\widehat{\cat}}}_L$, we define \[ \|u\|_{k,\betahat,\gammahat;\Omega} := \|u:C^{k,\betahat}(\Omega ,\ensuremath{\mathrm{r}},g,\ensuremath{\mathrm{r}}^\gammahat)\|,\] where $\ensuremath{\mathrm{r}}: = {\mathbf{d}}^\Sigma_L$ and $g$ is the standard metric on $\Sigma$ when $\Omega \subset \Sigma$, $\ensuremath{\mathrm{r}}:= {\mathbf{d}}^\Sigma_L \circ \Pi_\Sigma$ and $g$ is the metric induced on $M$ by the standard metric on $N$ when $\Omega \subset M$, and $\ensuremath{\mathrm{r}} = \rho$ and $g$ is the metric induced by the Euclidean metric $\left. g\right|_p$ on $T_p N$ when $\Omega \subset {{\widehat{\cat}}}_L$. Given $\gammahat, \gammahat' \in \mathbb{R}$ with $\gammahat - \gammahat' \in [1, 2)$ and $\Omega \subset M$ a domain with $\Omega \cap \widehat{S}[L] \neq \emptyset$, we define (recall \ref{DtauK}) \begin{multline*} \| u\|_{k, \betahat, \gammahat, \gammahat'; \Omega} : = \|u\|_{k, \betahat, \gammahat; \Omega\setminus \widehat{S}[L]}+ \| {\mathcal{H}}_1 u\|_{k, \betahat, \gammahat; \Omega \cap \widehat{S}[L]} + \| u : C^{k, \betahat}( \Omega \cap \widehat{S}[L], \rho, g, f_{\gammahat, \gammahat'})\|, \\ \text{where} \quad f_{\gammahat, \gammahat'} : = \max( \rho^{\gammahat}, \tau_L^{(1-\alpha)/2} \rho^{\gammahat'}) \quad (\text{note that } f_{\gammahat, \gammahat'}= \rho^{\gammahat} \text{ when } \rho^{\gammahat-\gammahat'} \ge \tau_L^{(1-\alpha)/2}). \end{multline*} \end{definition} \begin{lemma} \label{L:norms} \begin{enumerate}[label=\emph{(\roman*)}] \item If $\tau_{\max}$ is small enough in terms of given $\epsilon>0$, $\Omegatilde$ is a domain in $Y(\widehat{S}[L])$, $\Omega:=Y^{-1}(\Omegatilde)\subset \widehat{S}[L] \subset M$, $k=0,2$, $\gammahat\in\mathbb{R}$, and $f\in C^{k,\beta}(\Omegatilde)$, then we have (recall \ref{Dsimc}): \begin{align*} \| \, f\circ Y \, \|_{k,\beta,\gammahat;\Omega} \, \Sim_{1+\epsilon} \| f \|_{k,\beta,\gammahat;\Omegatilde} \,. \end{align*} \item If $b$ is large enough in terms of given $\epsilon>0$, $\tau_{\max}$ is small enough in terms of $\epsilon$ and $b$, $\Omega'$ is a domain in $\widetilde{S}' = \Sigma \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p( b \tau_p)$ (recall \eqref{EStildep}), $\Omega:=\Pi_{\Sigma}^{-1}(\Omega')\cap M$, $k=0,2$, $\gammahat\in\mathbb{R}$, and $f\in C^{k,\beta}(\Omega')$, then \begin{align*} \| \, f\circ\Pi_{\Sigma} \, \|_{k,\beta,\gammahat;\Omega} \, \Sim_{1+\epsilon} \, \|f\|_{k,\beta,\gammahat;\Omega'} \,. \end{align*} \end{enumerate} \end{lemma} \begin{proof} To prove (i) it suffices to prove for each $p\in L$ and each $\mathbb{K} = \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ that \begin{align*} \| f\circ Y : C^{k, \beta}( \Omega \cap \mathbb{K} , \rho, \mathring{g}) \| \Sim_{1+\epsilon} \| f \circ Y : C^{k, \beta}(\Omega\cap \mathbb{K} , \rho, g) \|, \end{align*} The induced metric from $g$ on $\mathbb{K}$ is $g= \mathring{g}+\alpha$, and so (i) follows from \ref{Lgcomp} and the estimate on $\alpha$ in \ref{Ltensest}(i) by taking $\tau_{\max}$ small enough. To prove (ii) let $q\in \widetilde{S}'$ and consider the metric ${\widetilde{g}}_q:= \, (\, {\mathbf{d}}^\Sigma_L(q)\, )^{-2} \, g $ on $N$, where $g$ is the standard metric on $N$. In this metric $M$ is locally the union of the graphs of $\pm \varphi^{\pm}_{:q}$ where $\varphi^{\pm}_{:q}:= \, (\, {\mathbf{d}}^\Sigma_L(q)\, )^{-1} \, \varphi^{gl}_{\pm}$. First suppose that ${\mathbf{d}}^{\Sigma}_p ( q) \le 4 \delta'_p$ for some $p \in L$. Note that \begin{align*} \left \| \frac{ \log( 2{\mathbf{d}}^\Sigma_p(q)/\tau_p)}{{\mathbf{d}}^\Sigma_p(q)/\tau_p}- \frac{{\underline{\kappa}}_p}{{\mathbf{d}}^\Sigma_p (q)} : C^{3, \beta}( B'_q, {\widetilde{g}}_q) \right\| \le C b^{-1} \log b , \end{align*} where $B'_q = D^{\Sigma, {\widetilde{g}}_q}_q(1/10)$. It follows from combining this with \ref{Ltcest} and \ref{Lgluingreg} that \begin{equation} \label{Efw} \begin{aligned} \|\,\varphi^{\pm}_{:q} \, : \, C^{3,\beta}(B'_q, {\widetilde{g}}_q)\,\| &\le C \tau^3_p ({\mathbf{d}}^\Sigma_p(q))^{-3} + C b^{-1} \log b\\ &\le C b^{-3} + C b^{-1} \log b\\ & \le C b^{-1} \log b, \end{aligned} \end{equation} where we have assumed $b$ is large enough. On the other hand, if ${\mathbf{d}}^\Sigma_L( q) > 4 \delta'_{\min} $, then by \ref{con:one}(v) we have \begin{equation*} \|\,\varphi^{\pm}_{:q} \, : \, C^{3,\beta}(B'_q, {\widetilde{g}}_q)\,\| \le C \tau_{\min}^{8/9}. \end{equation*} By comparing the metrics and appealing to the definitions we complete the proof. \end{proof} \begin{convention} \label{con:b} From now on we assume that $b$ (recall \ref{D:regions}) is as large as needed in absolute terms. We also fix some $\beta\in(0,1)$, $\gamma = \frac{3}{2}$, and $\gamma' = \gamma-1 = \frac{1}{2}$. Note that $1-\frac\gamma2>2\alpha$ and $(1-\alpha)\,(\gamma-1)>2\alpha$. We will suppress the dependence of various constants on $\beta$. \qed \end{convention} We estimate now the mean curvature in terms of the global norm we defined in \ref{D:norm} by using the earlier estimates in \ref{Lgluingreg} and \ref{LH2}. \begin{lemma} \label{LglobalH} $\| H - J_M(w^+, w^-)\|_{0, \beta, \gamma-2, \gamma'-2; M} \le \tau_{\max}^{1+\alpha/3}$, where $w^\pm := {\mathcal{L}}_\Sigma{\mathcal{E}}^{-1}_L ( \, - {\mathcal{M}}_L \varphi \pm {\boldsymbol{\underline{\kappa}}} \,)$. \end{lemma} \begin{proof} By \ref{D:norm} and that $J_M(w^+, w^-)=0$ on $\widehat{S}[L]$, we have \begin{multline*} \| H - J_M(w^+, w^-)\|_{0, \beta, \gamma-2, \gamma'-2; M} = \| H-J_M(w^+, w^-)\|_{0, \beta, \gamma-2; M\setminus \widehat{S}[L]} \, + \\ + \| {\mathcal{H}}_1 H \|_{0, \beta, \gamma-2; \widehat{S}[L]} +\| H : C^{0, \beta}(\widehat{S}[L], \rho, g ,f_{\gamma-2, \gamma'-2})\|. \end{multline*} By \ref{L:norms}(i) and \ref{LH2} we have \begin{align*} \| {\mathcal{H}}_1 H \|_{0, \beta, \gamma-2; \widehat{S}[L]} &\le C \max_{p\in L} \| {\mathcal{H}}_1H: C^{0, \beta}( \mathbb{K}_p, \chi, \rho^{\gamma-2})\| \\ &\le C \max_{p\in L} \tau^{(2-\gamma)\alpha}_p \tau_p |\log \tau_p| \le \tau^{1+\alpha/3}_{\max}, \end{align*} where here $\mathbb{K}_p = \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$ and we have used \ref{con:one}(iii). To estimate the weighted norm of $ H$, we use \ref{LH2}(i) in conjunction with the piecewise formula for $f_{\gamma-2, \gamma'-2}$ to see \begin{align*} \| H : C^{0, \beta}(\widehat{S}[L], \rho, g, f_{\gamma-2, \gamma'-2})\| \le C\max_{p\in L} \tau^{1+\alpha/2}_p |\log \tau_p| \le \tau_{\max}^{1+\alpha/3}. \end{align*} Finally, we consider the estimate on the exterior of the gluing region. Let $q' \in M\cap \Pi^{-1}_\Sigma(\textstyle\bigsqcup_{p\in L} D^\Sigma_p(3 \delta'_p))$, define $q: = \Pi_\Sigma q' \in \Sigma\setminus \textstyle\bigsqcup_{p\in L} D^\Sigma(3\delta'_p)$ and consider the metric ${\widetilde{g}}_q := ({\mathbf{d}}^\Sigma_L(q))^{-2} g$. In this metric $M$ is locally the union of the graphs of $\pm \varphi^{\pm}_{: q}$, where $\varphi^{\pm}_{:q} = ({\mathbf{d}}^\Sigma_L(q))^{-1} \varphi^{gl}_{\pm}$. By expanding $H'_+$ and $H'_-$ in linear and higher order terms, we find (recall \ref{Dinit}) \begin{align*} ({\mathbf{d}}^\Sigma_L(q))^2 H'_{\pm} &= ({\mathbf{d}}^\Sigma_L(q))^2 w^\pm + ({\mathbf{d}}^\Sigma_L(q)) \widetilde{Q}_{\varphi^{\pm}_{:q}}. \end{align*} We estimate then \begin{align*} \| ({\mathbf{d}}^\Sigma_L(q))^2 (H'_{\pm} - w^\pm) : C^{0, \beta}(B'_q,{\widetilde{g}}_q, ({\mathbf{d}}^\Sigma_L(q))^\gamma) \| &\le \| ({\mathbf{d}}^\Sigma_L(q)) \widetilde{Q}_{\varphi^{\pm}_{:q}}: C^{2, \beta}(B'_q,{\widetilde{g}}_q, ({\mathbf{d}}^\Sigma_L(q))^\gamma)\| \\ &\le C \frac{1}{({\mathbf{d}}^\Sigma_L(q))^{\gamma+1}} \| \varphi^{gl}_\pm : C^{3, \beta}(B'_q,{\widetilde{g}}_q )\|^2 \le \tau^{3/2}_{\max} , \end{align*} where $B'_q: = D^{{\widetilde{g}}_q}_{q}(1/10)$, and we have used \ref{con:one}(v) and \ref{con:alpha}. Combining this estimate with \ref{Lgluingreg}(iii), \ref{LH}, \ref{D:norm}, and \ref{L:norms}(ii) we complete the proof. \end{proof} \begin{lemma} \label{L:appr} \begin{enumerate}[label=\emph{(\roman*)}] \item If $\tau_{\max}$ is small enough and $f\in C^{2,\beta}( \, Y(\widehat{S}[L]) \, )$, then we have \begin{align*} \| \, {\mathcal{L}}_M \, (\, f \, \circ Y \, )\, - \, (\, {\mathcal{L}}_{{\widehat{\cat}}} f \, ) \circ Y \, \|_{0,\beta,\gammahat-2; \, \widehat{S}[L] } \, &\le \, C\, \tau_{\max}^{2\alpha}\, \|\,f \, \|_{2,\beta,\gammahat; \, Y( \widehat{S}[L] ) } \, , \\ \| \, {\mathcal{L}}_M \, (\, f \, \circ Y \, )\, - \, (\, {\mathcal{L}}_{{\widehat{\cat}}} f \, ) \circ Y \, \|_{0,\beta,\gammahat-2; \, \widehat{S}[L] } \, &\le \, C\, \|\,f \, \|_{2,\beta,\gammahat-1; \, Y( \widehat{S}[L] ) } . \, \end{align*} \item If $\tau_{\max}$ is small enough and $f\in C^{2,\beta}(\widetilde{S}'\,)$, then for $\epsilon_1\in[0,1/2]$ we have \begin{align*} \| \, {\mathcal{L}}_M \,\{ \, f \circ \Pi_{\Sigma} \,\}\, - \{\, {\mathcal{L}}_\Sigma \, f \,\}\, \circ \Pi_{\Sigma} \, \|_{0,\beta,\gammahat-2 ; \, \Pi_\Sigma^{-1}(\widetilde{S}'\,) } \, \le \, C \, b^{\epsilon_1-1}\, \log b \,\, \tau_{\max}^{\epsilon_1} \, \|\, f \, \|_{ 2 , \beta , \gammahat + \epsilon_1 ; \,\widetilde{S}' } \, . \end{align*} \end{enumerate} \end{lemma} \begin{proof} (i). By \ref{D:norm} and \ref{L:norms}(i) and the definitions it suffices to prove the first estimate that \begin{align*} \|( {\mathcal{L}}_{\mathbb{K}}- {\mathcal{L}}_\chi ) f\circ Y\|_{0, \beta, \gammahat; \widehat{S}[L]} \le C \tau^{2\alpha}_{\max} \| f \|_{2, \beta, \gammahat; \Omegatilde }, \end{align*} where $\Omegatilde = Y ( \widehat{S}[L])$, on each $\mathbb{K} = \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p]$, ${\mathcal{L}}_{\mathbb{K}} : =\rho^2( \Delta_{g} +|A|^2_{g} + \operatorname{Ric}(\nu_\mathbb{K}, \nu_\mathbb{K}) ) $, $A$ and $\operatorname{Ric}$ are the second fundamental form on $\mathbb{K}$ and the Ricci tensor induced by $g$ and we recall that ${\mathcal{L}}_\chi = \rho^2 ( \Delta_{\mathring{g}} + |\mathring{A}|^2_{\mathring{g}})$, where $\mathring{A}$ is the second fundamental form on $\mathbb{K}$ induced by $\mathring{g}$. Estimating the difference in the Laplacians using \ref{Llaplace}, we find \begin{align*} \| \rho^2 ( \Delta_{g} - \Delta_{\mathring{g}}) f\circ Y: C^{0, \beta}(\mathbb{K}\cap \widehat{S}[L], \chi, \rho^{\gammahat})\| &\le C \| \rho^{-2} \alpha : C^{1, \beta}(\mathbb{K}, \chi)\| \| f\circ Y : C^{2, \beta}(\mathbb{K}\cap \widehat{S}[L], \chi, \rho^{\gammahat})\| \\ & \le C \tau^{2\alpha}_{\max} \| f\|_{2, \beta, \gammahat; \Omegatilde}, \end{align*} where we have used \ref{Ltensest} to estimate $\alpha$. Next observe that \begin{align*} \| \rho^2 ( | A|^2_{g} - |\mathring{A}|^2_{\mathring{g}} ) f\circ Y : C^{0, \beta}(\mathbb{K}\cap \widehat{S}[L], \chi, \rho^{\gammahat})\| &\le \| \rho^2( | A|^2_{g} - |\mathring{A}|^2_{\mathring{g}}) : C^{0, \beta}(\mathbb{K}, \chi)\| \| f \|_{0, \beta, \gammahat;\Omegatilde}\\ &\le C\tau^{2\alpha}_{\max} \| f \|_{0, \beta,\gammahat; \Omegatilde}, \end{align*} where we have estimated $ \rho^2( | A|^2_{g} - |\mathring{A}|^2_{\mathring{g}})$ using \ref{Ljacdif}, estimated the tensors using \ref{Ltensest}, and used that $\mathring{A} = \tau_p ( - d{{\ensuremath{\mathrm{s}}}}^2 + d \theta^2) $ and that $\rho^2|\mathring{A}|^2_{\mathring{g}} = 2\operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}$. Finally, we have the trivial estimate $\| \rho^2 {\operatorname{Ric}}(\nu_\mathbb{K}, \nu_\mathbb{K}) f\circ Y \|_{0, \beta, \gammahat; \widehat{S}[L]} \le C \tau^{2\alpha}_{\max} \| f \|_{2, \beta, \gammahat; \Omegatilde}$; combined with the preceding, this concludes the proof of the first estimate in (i). The proof of the second estimate is similar, so we omit it. We now prove (ii). In this case we apply the notation and observations in the proof of \ref{L:norms}(ii) including \eqref{Efw}. We have then using scaling for the left hand side that for $q\in \widetilde{S}'$ we have \begin{multline*} (\, {\mathbf{d}}^{\Sigma}_L(q)\, )^{2} \, \| \, {\mathcal{L}}_M \,\{ \, f \circ \Pi_{\Sigma} \,\}\, - \{\, {\mathcal{L}}_\Sigma \, f \,\}\, \circ \Pi_{\Sigma} \, : C^{0,\beta} ( \Pi^{-1}_{\Sigma} (B'_q), \, g \, ) \, \| \, \le \\ \le \, C \, f_{\mathrm{weight}}(q) \, \|\, f \, : C^{2,\beta} ( B'_q, \, g \, ) \, \| \, , \end{multline*} where here $f_{\mathrm{weight}}(q) = \frac{\log ({\mathbf{d}}^\Sigma_p(q)/ \tau_p)}{{\mathbf{d}}^\Sigma_p(q)/ \tau_p}$ if $q \in D^\Sigma_p(3 \delta'_p)$ for some $p\in L$ and $f_{\mathrm{weight}}(q) = \tau^{8/9}_{\min}$ otherwise. By the definitions it is enough then to check that $\forall q\in \widetilde{S}'$ we have $$ f_{\mathrm{weight}}(q) \, (\, {\mathbf{d}}^\Sigma_L(q)\, )^{\epsilon_1} \, \le \, C \, b^{\epsilon_1-1}\, \log b \,\, \tau_{\max}^{\epsilon_1}. $$ This follows from the definition of $f_{\mathrm{weight}}$ and the observation that $x^{\epsilon_1 -1} \log x$ is decreasing in $x$ for $x\geq b$. This completes the proof. \end{proof} \subsection*{The definition of ${\mathcal{R}}_{M,appr}$} $\phantom{ab}$ \nopagebreak We consider now the linearized equation modulo $\mathscr{K}[L]$, that is the equation (recall \ref{N:A} and \ref{Npm}) \begin{equation} \label{ELcal} {\mathcal{L}}_M u=E+ J_M(w^+_E, w^-_E), \end{equation} with $E\in C^{0,\beta}(M)$ given and $u\in C^{2,\beta}(M)$ and $w^\pm_E \in \mathscr{K}[L]$ the unknowns. We construct a linear map \begin{equation} \label{ERcalMappr} {\mathcal{R}}_{M,appr} : C^{0,\beta}(M) \to C^{2,\beta}(M) \oplus \mathscr{K}[L] \oplus \mathscr{K}[L] \oplus C^{0,\beta}(M), \end{equation} satisfying $\forall E\in C^{0,\beta}(M)$ and ${\mathcal{R}}_{M,appr} E =(u_1,w^+_{E,1},w^-_{E,1},E_1)$ that \begin{equation} \label{EEone} E_1= {\mathcal{L}}_M u_1 - E - J_M(w^{+}_{E, 1}, w^-_{E, 1}). \end{equation} In other words $(u_1,w^+_{E,1},w^-_{E,1})$ provide an approximate solution of \eqref{ELcal} with approximation error $E_1$. The approximate solution $u_1$ will be constructed by combining semi-local approximate solutions. Before we proceed with the construction we define some cut-off functions we will need. \begin{definition} \label{DpsiM} We define $\psi'\in C^{\infty}(\Sigma)$ and $ \widehat{\psi} \in C^{\infty}(M)$ by requesting the following. \begin{enumerate}[label = \emph{(\roman*)}] \item $\widehat{\psi}$ is supported on $\widehat{S}[L]$ and $\psi'$ on $\widetilde{S}'$ (recall \ref{D:regions}). \item $\psi'=1$ on $\widetilde{S}'_1$ and for each $p\in L$ we have \begin{equation*} \begin{aligned} \psi'=&\, {\boldsymbol{\Psi}}\left[b \tau_p , 2 b \tau_p ; {\mathbf{d}}^\Sigma_p \right] (0,1) \quad\text{on}\quad D^\Sigma_p(\,2b\,\tau_p\,), \\ \widehat{\psi}=&\, {\boldsymbol{\Psi}}\left[2\delta'_p , \delta'_p ; \, {\mathbf{d}}^\Sigma_p \circ \Pi_{\Sigma} \, \right] (0,1) \quad\text{on}\quad \widehat{S}[p]. \end{aligned} \end{equation*} \end{enumerate} \end{definition} Given $E\in C^{0,\beta}(M)$, we define $E'_{\pm}\in C^{0,\beta}(\Sigma)$ by requiring that they are supported on $\widetilde{S}'$ and that \begin{equation} \label{Edecom} J_M(E'_+ , E'_-) = (\psi' \circ \Pi_\Sigma) E . \end{equation} Because of \ref{cLker} and \ref{aK}, there are unique $u'_{\pm} \in C^{2, \beta}(\Sigma)$ and $w^{\pm}_{E, 1} \in \mathscr{K}[L]$ such that \begin{align} \label{Eup} {\mathcal{L}}_\Sigma u'_{\pm} = E'_{\pm} + w^{\pm}_{E,1} \quad \text{on} \quad \Sigma \quad \text{and} \quad \forall p\in L \quad \Ecalunder_p u'_\pm =0. \end{align} Note that ${\mathcal{L}}_\Sigma \left( (1- \psi') u'_\pm\right) = [\psi', {\mathcal{L}}_\Sigma] u'_\pm + (1-\psi')E'_\pm$ is supported on $S_1[L] \setminus S[L]$. We define now $\widetilde{E}\in C^{0,\beta}({{\widehat{\cat}}}_L)$, supported on $Y(S_1[L] ) $, by requesting that \begin{equation} \label{EEpp} \widetilde{E} \circ Y = (1- \psi' \circ \Pi_\Sigma)E+ J_M\left( {\mathcal{L}}_\Sigma \left( (1-\psi') u'_{+}\right) , {\mathcal{L}}_\Sigma \left( (1-\psi') u'_{-}\right)\right) \quad \text{on } S_1[L]. \end{equation} We introduce a decomposition \begin{equation} \label{EEtildedecom} \widetilde{E} = \widetilde{E}_{\mathrm{low}} + \widetilde{E}_{\mathrm{high}}, \end{equation} where $ \widetilde{E}_{\mathrm{low}} \in C^{0,\beta}_{\mathrm{low}}({{\widehat{\cat}}}_L)$ and $ \widetilde{E}_{\mathrm{high}} \in C^{0,\beta}_{\mathrm{high}} ({{\widehat{\cat}}}_L)$ are supported on $Y( S_1[L] )$. Note that here we use subscripts ``$low$'' and ``$high$'' to denote subspaces of functions which satisfy the condition that their restrictions to a meridian of a ${{\widehat{\cat}}}[p, \tau_p, {\underline{\kappa}}_p]$ belong or are orthogonal respectively to the the span of the constants and the first harmonics on the meridian. Let ${\mathcal{L}}_{{\widehat{\cat}}} $ denote the linearized operator on ${{\widehat{\cat}}}_L$, and let $ \widetilde{u}_{\mathrm{low}} \in C^{2,\beta}_{\mathrm{low}}({{\widehat{\cat}}}_L)$ and $ \widetilde{u}_{\mathrm{high}} \in C^{2,\beta}_{\mathrm{high}} ({{\widehat{\cat}}}_L)$ be solutions of (recall \ref{DtauK}) \begin{equation} \label{Etildeueq} {\mathcal{L}}_{{\widehat{\cat}}} \, \widetilde{u}_{\mathrm{low}} = \widetilde{E}_{\mathrm{low}}, \qquad {\mathcal{L}}_{{\widehat{\cat}}} \, \widetilde{u}_{\mathrm{high}} = \widetilde{E}_{\mathrm{high}}, \end{equation} determined uniquely as follows. By separating variables the first equation amounts to uncoupled ODE equations which are solved uniquely by assuming vanishing initial data on the waist of the catenoids. For the second equation we can as usual change the metric conformally to $h=\frac12|A|^2g=\nu^*g_{\mathbb{S}^2}$, and then we can solve uniquely because the inhomogeneous term is clearly orthogonal to the kernel. We conclude now the definition of ${\mathcal{R}}_{M,appr}$: \begin{definition} \label{DRMappr} We define ${\mathcal{R}}_{M,appr}$ as in \ref{ERcalMappr} by taking ${\mathcal{R}}_{M,appr} E =(u_1,w^+_{E, 1}, w^-_{E,1},E_1)$, where $w^{\pm}_{E,1}$ were defined in \eqref{Eup}, $E_1$ was defined in \eqref{EEone}, and \begin{align*} u_1 := \widehat{\psi}\, \widetilde{u} \circ Y + J_M(\psi' u'_+, \psi' u'_-) , \end{align*} where $ \widetilde{u} := \widetilde{u}_{\mathrm{low}} + \widetilde{u}_{\mathrm{high}} \in C^{2,\beta}({{\widehat{\cat}}}_L) $. \end{definition} \subsection*{The main Proposition} $\phantom{ab}$ \nopagebreak \begin{prop} \label{Plinear} Recall that we assume that \ref{aK}, \ref{con:one}, \ref{cLker}, and \ref{con:b} hold. A linear map $ {\mathcal{R}}_M: C^{0,\beta}(M) \to C^{2,\beta}(M) \times \mathscr{K}[L] \times \mathscr{K}[L] $ can be defined then by $$ {\mathcal{R}}_M E := (u,w^+_E, w^-_E) := \sum_{n=1}^\infty(u_n, w^+_{E,n}, w^-_{E,n}) \in C^{2,\beta}(M) \times \mathscr{K}[L]\times\mathscr{K}[L] $$ for $E\in C^{0,\beta}(M)$, where the sequence $\{(u_n,w^+_{E,n}, w^-_{E,n},E_n)\}_{n\in \mathbb{N}}$ is defined inductively for $n\in \mathbb{N}$ by $$ (u_n,w^+_{E,n}, w^-_{E,n},E_n) := - {\mathcal{R}}_{M,appr} E_{n-1}, \qquad\quad E_0:=-E. $$ Moreover the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item ${\mathcal{L}}_M u = E + J_M(w^+_E, w^-_E)$. \item $ \| u \|_{2, \beta, \gamma; M} \le C(b) \delta^{-4-2\beta}_{\min} \| E\|_{0, \beta, \gamma-2; M}$. \item $\| w^{\pm}_E : C^{0, \beta}(\Sigma, g)\| \le C \delta^{\gamma-4-2\beta}_{\min} \| E\|_{0, \beta, \gamma-2; M}$. \end{enumerate} \end{prop} \begin{proof} We subdivide the proof into five steps:\newline \textit{Step 1: Estimates on $u'_\pm$ and $w^{\pm}_{E,1}$:} We start by decomposing $E'_+$ and $u'_+$ (defined as in \eqref{Edecom} and \eqref{Eup}) into various parts which will be estimated separately; $E'_-$ and $u'_-$ are decomposed in analogous fashion. We clearly have by the definitions and the equivalence of the norms as in \ref{L:norms} that $$ \|E'_+\|_{0,\beta,\gamma-2;\Sigma} \le \, C \, \|E\|_{0,\beta,\gamma-2;M}. $$ For each $p\in L$, we use \ref{Lwe} to define $u'_{p, +}\in C^{2,\beta}( D^\Sigma_p(2\delta_p ))$ satisfying $\Ecalunder_p u'_{p,+}=0$ and \begin{align*} \|u'_{p,+}\|_{2,\beta,\gamma;D^\Sigma_p(2\delta_p)} \le \, C \, \|E'_+\|_{0,\beta,\gamma-2;\Sigma}. \end{align*} We define now $u''_+\in C^{2,\beta}(\Sigma)$ supported on $\textstyle\bigsqcup_{p\in L} D^\Sigma_p( 2\delta_p )$ by requesting for each $p\in L$ that $$ u''_+=\, {\boldsymbol{\Psi}}\left[2 \delta_p , \delta_p ; {\mathbf{d}}^\Sigma_p \right] (0,u'_{p,+}) \quad\text{on}\quad D^\Sigma_p( 2\delta_p). $$ We clearly have \begin{align*} \| u''_+ \| _{2, \beta, \gamma; \Sigma} \le C\| E \|_{0, \beta, \gamma-2; M}. \end{align*} Now $E'_+-{\mathcal{L}}_\Sigma u''_+$ vanishes on $\textstyle\bigsqcup_{p\in L} D^\Sigma_p( \delta_p )$ and therefore it is supported on $S'_1 := \Sigma\setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p( \delta_p ) $. Moreover it satisfies $$ \|E'_+-{\mathcal{L}}_\Sigma u''_+\|_{0,\beta,\gamma-2;\Sigma} \le \, C \, \|E\|_{0,\beta,\gamma-2;M}. $$ Using the definition of the norms and the restricted support $S'_1$ we conclude that $$ \|E'_+-{\mathcal{L}}_\Sigma u''_+: C^{0,\beta}(\Sigma,g)\| \le \, C \, \delta_{\min}^{\gamma-2-\beta} \, \|E'_+-{\mathcal{L}}_\Sigma u''_+\|_{0,\beta,\gamma-2;\Sigma}. $$ The last two estimates and standard linear theory (recall \ref{cLker}) imply that the unique solution $u'''_+\in C^{2,\beta}(\Sigma)$ to ${\mathcal{L}}_\Sigma u'''_+=E'_+-{\mathcal{L}}_\Sigma u''_+$ satisfies $$ \|u'''_+ : C^{2,\beta}(\Sigma,g)\| \le \, C \, \delta_{\min}^{\gamma-2-\beta} \, \|E\|_{0,\beta,\gamma-2;M}. $$ By \ref{aK} there is a unique $v_+\in \widehat{\mathscr{K}}[L]$ (recall \ref{aK}) such that $\Ecalunder_p(u'''_++v_+)=0$ for each $p\in L$. Moreover by the last estimate and \ref{aK}, $v_+$ satisfies the estimate \begin{equation*} \|v_+ : C^{2,\beta}(\Sigma,g)\| + \|{\mathcal{L}}_\Sigma v_+ : C^{0,\beta}(\Sigma,g)\| \le \, C \, \delta_{\min}^{\gamma-4-2\beta} \, \|E\|_{0,\beta,\gamma-2;M}. \end{equation*} Combining now the definitions of $u'''_+$ and $v_+$ we conclude that ${\mathcal{L}}_\Sigma(u''_++u'''_++v_+) = E'_++ {\mathcal{L}}_\Sigma v_+$. By the definitions of $u''_+$ and $v_+$ we clearly have that $\Ecalunder_p(u''_++u'''_++v_+)=0$ $\forall p\in L$ and hence $$ u'_+=u''_++u'''_++v_+ \qquad \text{and}\qquad w^+_{E,1} = {\mathcal{L}}_\Sigma v_+. $$ Note now that ${\mathcal{L}}_\Sigma u'''_+=E'-{\mathcal{L}}_\Sigma u''_+$ vanishes on $\textstyle\bigsqcup_{p\in L} D^\Sigma_p( \delta_p/4 )$ and by \ref{aK} so does ${\mathcal{L}}_\Sigma v_+\in\mathscr{K}[L]$. We conclude that for each $p\in L$ we have ${\mathcal{L}}_\Sigma (u'''_++v_+)=0$ on $D^\Sigma_p( \delta_p /4)$, and since we know already that $\Ecalunder_p (u'''_++v_+)=0$, it follows that \begin{align*} \| u'''_++v_+ \|_{2, \beta, \widetilde{\gamma}; \Sigma} \le C \delta^{-\widetilde{\gamma}}_{\min} \| u'''_++v_+ : C^{2, \beta}( \Sigma, g)\|, \end{align*} where $\widetilde{\gamma}:=\frac{\gamma+2}2\in(\gamma,2)$. Combining with the earlier estimates for $u'''_+$ and $v_+$ we conclude that $$ \|u'''_++v_+ \|_{2,\beta,\widetilde{\gamma};\Sigma} \le \, C \, \delta_{\min}^{\gamma-\widetilde{\gamma}-4-2\beta} \, \| \, E \, \|_{0,\beta,\gamma-2;M}, $$ We need the stronger decay for estimating $E_1$ later. A similar estimate holds with $\gamma$ instead of $\widetilde{\gamma}$. Combining with the earlier estimate for $u''_+$ we finally conclude that $$ \|u'_+\|_{2,\beta,\gamma;\Sigma} \le \, C \, \delta_{\min}^{-4-2\beta} \, \| \, E \, \|_{0,\beta,\gamma-2;M}. $$ \textit{Step 2: Estimates on $\widetilde{u}$:} By the definitions and \ref{L:norms} (with $\epsilon=1$) we have that \begin{align*} \| \, \widetilde{E} \, \|_{0,\beta,\gamma-2;{{\widehat{\cat}}}_L} \, \le \, C\, (\, \|\, {E} \, \|_{0,\beta,\gamma-2;M} \, + \, \|\, u'_+ \, \|_{2,\beta,\gamma;\Sigma} + \, \|\, u'_- \, \|_{2,\beta,\gamma;\Sigma} \,). \end{align*} We first estimate $\widetilde{u}_{\mathrm{low}}$. Because $\widetilde{u}_{e} : = \operatorname{sech} {{\ensuremath{\mathrm{s}}}}$ and $\widetilde{u}_o: = \sinh {{\ensuremath{\mathrm{s}}}} + {{\ensuremath{\mathrm{s}}}} \operatorname{sech} {{\ensuremath{\mathrm{s}}}}$ form a basis for the kernel of ${\mathcal{L}}_\chi -1$, it follows using variation of parameters that given $\widetilde{\underbar{E}} \in C^{0, \beta}_{{{\ensuremath{\mathrm{s}}}}} (\ensuremath{\mathrm{Cyl}})$, \begin{align*} \widetilde{\underbar{u}}({{\ensuremath{\mathrm{s}}}}) = -\frac{1}{2} \widetilde{u}_{e}({{\ensuremath{\mathrm{s}}}}) \int_{0}^{{{\ensuremath{\mathrm{s}}}}} \widetilde{u}_{0}(\xi) \widetilde{\underbar{E}}(\xi) \, d\xi + \frac{1}{2} \widetilde{u}_{0}({{\ensuremath{\mathrm{s}}}}) \int_0^{{{\ensuremath{\mathrm{s}}}}} \widetilde{u}_{e}(\xi) \widetilde{\underbar{E}}(\xi)\, d\xi \end{align*} satisfies $({\mathcal{L}}_\chi -1) \widetilde{\underbar{u}} = \widetilde{\underbar{E}}$ with vanishing initial conditions at ${{\ensuremath{\mathrm{s}}}} =0$ and consequently that \begin{align*} {\mathcal{L}}_{{{\widehat{\cat}}}} ( \widetilde{\underbar{u}} \cos \theta) = \rho^2 \widetilde{\underbar{E}}({{\ensuremath{\mathrm{s}}}}) \cos \theta, \quad \text{and} \quad {\mathcal{L}}_{{{\widehat{\cat}}}} ( \widetilde{\underbar{u}} \cos \theta) = \rho^2 \widetilde{\underbar{E}}({{\ensuremath{\mathrm{s}}}})\sin \theta. \end{align*} Using this we conclude that \begin{align*} \| \, \widetilde{u}_{\mathrm{low}} \, \|_{2,\beta,1;{{\widehat{\cat}}}_L} \, \le \, C(b) \, \tau^{\gamma-1}_{\max} \| \, \widetilde{E} \, \|_{0,\beta,\gamma-2;{{\widehat{\cat}}}_L}. \end{align*} Similarly by standard linear theory and the obvious $C^0$ bound on $\widetilde{u}_{\mathrm{high}}$ we conclude \begin{align*} \| \tau^{-2} \, \widetilde{u}_{\mathrm{high}} \, \|_{2,\beta,\gamma-2;{{\widehat{\cat}}}_L} \, \le \, C(b) \, \| \, \widetilde{E} \, \|_{0,\beta,\gamma-2;{{\widehat{\cat}}}_L}. \end{align*} Combining the above we conclude that \begin{align*} \| \, \widetilde{u} \, \|_{2,\beta,\gamma;{{\widehat{\cat}}}_L} \, \le \, C(b) \, \delta_{\min}^{-4-2\beta} \| \, E \, \|_{0,\beta,\gamma-2;M}. \end{align*} \textit{Step 3: A decomposition of $E_1$:} Using \eqref{EEone} and \ref{DRMappr}, \eqref{Edecom}, \eqref{EEpp}, \eqref{EEtildedecom}, and \eqref{Etildeueq}, we obtain \begin{equation} \label{EEoneF} E_1=E_{1,I}+E_{1,II}+E_{1,III}, \end{equation} where $E_{1,I} ,E_{1, II}, E_{1,III}\in C^{0,\beta}(M)$ are supported on $\widehat{S}[L]\setminus\widehat{S}_1[L]$, $\widehat{S}[L]$, and $\widetilde{S}'$ respectively by \ref{DpsiM}(ii), and where they are defined by \begin{equation} \label{EEoneI} \begin{aligned} E_{1,I} \, :=& \, [{\mathcal{L}}_M,\widehat{\psi}] \,( \, \widetilde{u} \circ Y \,) \, , \\ E_{1,II}\, : =&\, \widehat{\psi}\, \left( {\mathcal{L}}_M \, (\, \widetilde{u} \, \circ Y \, )\, - \, (\, {\mathcal{L}}_{{\widehat{\cat}}} \widetilde{u} \, ) \circ Y \right) \, = \widehat{\psi} {\mathcal{L}}_M \, (\, \widetilde{u}\, \circ Y\, )\, - \widetilde{E}\circ Y , \\ E_{1,III} \, :=& \, {\mathcal{L}}_M \,\{ \, J_M(\psi' u'_+, \psi'u'_-)\}\, - J_M \left( {\mathcal{L}}_\Sigma (\psi' u'_+), {\mathcal{L}}_\Sigma (\psi' u'_-)\right) \end{aligned} \end{equation} and we have used from \eqref{Eup} that $ {\mathcal{L}}_\Sigma u'_{\pm}= E'_{\pm}+w^{\pm}_{1,E} $. \textit{Step 4: Estimates on $u_1$ and $E_1$:} Using the definitions, \ref{L:norms} with $\epsilon=1$, and the estimates for $u'_{\pm}$ and $\widetilde{u}$ above we conclude that \begin{align*} \| \, u_1 \, \|_{2,\beta,\gamma;M} \, \le \, C(b) \, \delta_{\min}^{-4-2\beta} \, \| \, E \, \|_{0,\beta,\gamma-2;M}. \end{align*} By \ref{L:norms} we have $\|\, \, \widetilde{u} \, \circ Y \, \|_{2,\beta,2;\, \widehat{S}[L]\setminus\widehat{S}_1[L]} \Sim_2 \| \, \widetilde{u} \, \|_{2,\beta,2;\, Y \,(\, \widehat{S}[L]\setminus\widehat{S}_1[L]\,)} $. Using definitions \ref{D:norm} and \ref{D:regions} we conclude that \begin{align*} \|\, \, \widetilde{u} \circ Y \, \|_{2,\beta,\gamma;\, \widehat{S}[L]\setminus\widehat{S}_1[L]} \, \le \, C\, \tau_{\max}^{\alpha(1-\gamma)} \, \, \| \, \widetilde{u} \, \|_{2,\beta,1;{{\widehat{\cat}}}_L}, \end{align*} and therefore we have by the definition of $E_{1,I}$ and the preceding estimates \begin{align*} \| \, E_{1,I} \, \|_{0,\beta,\gamma-2;\,M} &\, \le \, C\, \tau_{\max}^{\alpha(1-\gamma)} \, \, \| \, \widetilde{u}_{\mathrm{low}} \, \|_{2,\beta,1;{{\widehat{\cat}}}_L} + \|\, \widetilde{u}_{\mathrm{high}}\, \|_{2, \beta, \gamma; Y(\widehat{S}[L]\setminus\widehat{S}_1[L])}\\ &\le C(b) \tau_{\max}^{(1-\alpha)(\gamma-1)} \| \, \widetilde{E}\, \|_{0, \beta, \gamma-2; {{\widehat{\cat}}}_L}. \end{align*} Applying now \ref{L:appr}(i) with $f=\widetilde{u}$ and $\gammahat=\gamma$ and using the definition of $\widehat{\psi}$ we conclude that \begin{align*} \| \, E_{1,II} \, \|_{0,\beta,\gamma-2;\,M} \, \le \, C\, \tau_{\max}^{2\alpha}\, \, \, \| \, \widetilde{u} \, \|_{2,\beta,\gamma;{{\widehat{\cat}}}_L}. \end{align*} We decompose now $E_{1,III}= E''_{1,III}+E'''_{1,III}$ where $E''_{1,III}$ and $E'''_{1,III}$ are defined the same way as $E_{1,III}$ but with $u'_{\pm}$ replaced by $u''_{\pm}$ and $u'''_{\pm}+v_{\pm}$ respectively. Applying \ref{L:appr}(ii) with $\epsilon_1=0$, $f=u''_{\pm}$, and $\gammahat=\gamma$, we conclude that $$ \| \, E''_{1,III} \, \|_{0,\beta,\gamma-2;\,M} \, \le \, C\, b^{-1}\, \log b \,\, \left( \|u''_+\|_{2,\beta,\gamma;\Sigma}+\|u''_-\|_{2,\beta,\gamma;\Sigma}\right). $$ Applying \ref{L:appr}(ii) with $\epsilon_1=\widetilde{\gamma}-\gamma$, $f=u'''+v$, and $\gammahat=\gamma$, $$ \| \, E'''_{1,III} \, \|_{0,\beta,\gamma-2;\,M} \, \le \, C\, b^{\widetilde{\gamma}-\gamma-1}\, \log b \,\, \tau_{\max}^{\widetilde{\gamma}-\gamma} \, \left(\|u'''_{+}+v_{+} \|_{2,\beta,\widetilde{\gamma};\Sigma}+ \|u'''_{-}+v_{-} \|_{2,\beta,\widetilde{\gamma};\Sigma}\right). $$ Combining the above with the earlier estimates and using \ref{con:one}(ii) and \ref{con:b} we conclude that \begin{align*} \| \, E_{1} \, \|_{0,\beta,\gamma-2;\,M} \, \le \, (\, C(b)\, \tau_{\max}^{\alpha/2} \, + \, C\, b^{-1}\, \log b \,\, \, + \, C\, b^{-1/2}\, \log b \,\, \tau_{\max}^{\widetilde{\gamma}-\gamma-\alpha} \, \,)\, \| \, E \, \|_{0,\beta,\gamma-2;\,M}. \end{align*} \textit{Step 5: The final iteration:} By assuming $b$ large enough and $\tau_{\max}$ small enough in terms of $b$ we conclude using $\widetilde{\gamma}-\gamma-\alpha>0$ and induction that \begin{align*} \| \, E_{n} \, \|_{0,\beta,\gamma-2;\,M} \, \le \, 2^{-n} \, \| \, E \, \|_{0,\beta,\gamma-2;\,M}. \end{align*} The proof is then completed by using the earlier estimates. \end{proof} \begin{cor} \label{Plinear2} Recall that we assume that \ref{aK}, \ref{con:one}, \ref{cLker}, and \ref{con:b} hold. A linear map $ {\mathcal{R}}'_M: C^{0,\beta}(M) \to C^{2,\beta}(M) \times \mathscr{K}[L] \times \mathscr{K}[L] $ can be defined such that given $E\in C^{0, \beta}(M)$, the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item ${\mathcal{L}}_M u = E + J_M(w^+_E, w^-_E)$ where ${\mathcal{R}}'_M (E)=(u,w^+_E, w^-_E)$. \item $ \| u \|_{2, \beta, \gamma, \gamma'; M} \le C(b) \delta^{-4-2\beta}_{\min}|\log \tau_{\min}| \| E\|_{0, \beta, \gamma-2, \gamma'-2; M}$. \item $\| w^{\pm}_E : C^{0, \beta}(\Sigma, g)\| \le C \delta^{\gamma-4-2\beta}_{\min} \| E\|_{0, \beta, \gamma-2, \gamma'-2; M}$. \end{enumerate} \end{cor} \begin{proof} We first define $\widehat{E}\in C^{0, \beta}(M)$, supported on $\widehat{S}[L]$, by \begin{align} \label{Eehat} \widehat{E} = \widehat{\psi} E - {\mathcal{H}}_1(\widehat{\psi} E). \end{align} On ${{\widehat{\cat}}}_L$ we then solve ${\mathcal{L}}_{{{\widehat{\cat}}}} \widehat{u} = \widehat{E}\circ Y$ by separation of variables, solving for the constant and first Fourier modes and second and higher Fourier modes separately. By standard theory we have the estimate \begin{align} \label{Euhatest} \| \widehat{u}\|_{2, \beta, \gamma, \gamma'; {{\widehat{\cat}}}_L} \le C |\log \tau_{\min}| \| E\|_{0, \beta, \gamma-2, \gamma'-2; M}. \end{align} We then define $\widehat{E}'\in C^{0, \beta}(M)$ by \begin{align} \label{Eehat'} \widehat{E}': = E - \widehat{\psi} \widehat{E} - [{\mathcal{L}}_M, \widehat{\psi}] ( \widehat{u}\circ Y) - \widehat{\psi} \left({\mathcal{L}}_M( \widehat{u} \circ Y) - ({\mathcal{L}}_{{\widehat{\cat}}} \widehat{u} ) \circ Y\right) \end{align} and $(\widehat{u}', w^+_{E}, w^-_{E}): = {\mathcal{R}}_M \widehat{E}' \in C^{2,\beta}(M) \times \mathscr{K}[L] \times \mathscr{K}[L] $. Finally, we define \begin{align*} {\mathcal{R}}'_M E = (\widehat{\psi}\, \widehat{u}\circ Y + \widehat{u}', w^+_E, w^-_E). \end{align*} It is straightforward to check using \ref{Eehat}, \ref{Eehat'} and \ref{Plinear}(i) that (i) holds. Finally, (iii) and (iv) follows immediately from \ref{Plinear}(iii) and (iv) and the definitions above. Using \eqref{Euhatest}, \eqref{Eehat'}, \ref{L:appr}(i), and Definition \ref{D:norm}, we estimate \begin{align*} \| \widehat{E}'\|_{0, \beta, \gamma-2; M} &\le C\|E\|_{0, \beta, \gamma-2, \gamma'-2; M}+C \| \widehat{u} \|_{2, \beta, \gamma-1; {{\widehat{\cat}}}}+C \| \widehat{u}\|_{2, \beta, \gamma, \gamma'; Y(\widehat{S}[L]\setminus \widehat{S}_1[L])}\\ &\le C |\log \tau_{\min}|\| E\|_{0, \beta, \gamma-2, \gamma'-2; M}. \end{align*} Combined with \ref{Plinear}(iii) and \ref{Eehat} proves the estimate in (iii). \end{proof} \section[Constructing minimal doublings from families of LD solutions]{Constructing minimal doublings from families of LD solutions} \label{S:mainI} \subsection*{The nonlinear terms} $\phantom{ab}$ \nopagebreak In this section we state and prove Theorem \ref{Ttheory} which ``automates'' the construction of a minimal doubling given a suitable family of LD solutions. We first state and prove Lemma \ref{Lquad} where we estimate the nonlinear terms on the initial surface $M$. We use the notation $M_\phi: = \text{Graph}^{N, g}_M ( \phi)$ (recall \ref{dgraph}) for any $\phi \in C^1(M)$ which is appropriately small. We prove the global estimate for the nonlinear terms of the mean curvature of $M_\phi$ in Lemma \ref{Lquad} by using rescaling, as follows. \begin{lemma} \label{Lquad} If $M$ is as in \ref{Plinear} and $\phi\in C^{2,\beta}(M)$ satisfies $\|\phi\|_{2,\beta,\gamma, \gamma';M} \, \le \, \tau_{\max}^{1+\alpha/4} $, then $M_\phi$ is well defined as above, is embedded, and if $H_\phi$ is the mean curvature of $M_\phi$ pulled back to $M$ and $H$ is the mean curvature of $M$, then we have $$ \|\, H_\phi-\, H - {\mathcal{L}}_M \phi \, \|_{0,\beta,\gamma-2, \gamma'-2;M} \, \le \, C \, \tau_{\min}^{-\alpha/2} \|\, \phi\, \|_{2,\beta,\gamma, \gamma';M}^2. $$ \end{lemma} \begin{proof} Following the notation in the proof of \ref{L:norms} and by \ref{Efw} we have that for $q\in \widetilde{S}'$, the graph $B''_q$ of $\varphi_{:q}$ over $B_q'$ in $(\Sigma, {\widetilde{g}}_q)$ can be described by an immersion $X_{:q}: B'_q \rightarrow B''_q = X_{:q}(B'_q)$, such that there are coordinates on $B'_q$ and a neighborhood in $N$ of $B''_q$, which has uniformly bounded $C^{3, \beta}$ norms, the standard Euclidean metric on the domain is bounded by $CX^*_{:q}{\widetilde{g}}_q$, and the coefficients of ${\widetilde{g}}_q$ in the target coordinates have uniformly bounded $C^{3, \beta}$ norms. By the definition of the norm and since $\| \varphi \|_{2, \beta, \gamma,\gamma'; M}\le \tau^{1+\alpha/4}_{\max}$, we have that the restriction of $\phi$ on $B''_{q}$ satisfies \begin{align*} \| ({\mathbf{d}}_L(q))^{-1} \phi :C^{2, \beta}(B''_{q}, {\widetilde{g}}_q)\| \le C ({\mathbf{d}}_L(q))^{-1} \max ( ({\mathbf{d}}(q))^{\gamma}, \tau_{\max}^{(1-\alpha)/2} ({\mathbf{d}}_L(q))^{\gamma'}) \|\phi \|_{2, \beta, \gamma, \gamma'; M}. \end{align*} Since the right hand side is small in absolute terms we have that $\text{Graph}^{M, g}_{B'_q} \phi$ is well defined and is embedded, and by using scaling for the left hand side that \begin{multline*} \| {\mathbf{d}}_L(q)( H_\phi - H - {\mathcal{L}}_M \phi) : C^{0, \beta}(B''_q, {\widetilde{g}}_q)\| \le\\ C ({\mathbf{d}}_L(q))^{-2} \max ( ({\mathbf{d}}_L(q))^{\gamma}, \tau_{\max}^{(1-\alpha)/2} ({\mathbf{d}}_L(q))^{\gamma'})^2 \| \phi \|^2_{2, \beta, \gamma, \gamma'; M}. \end{multline*} Rearranging this, we conclude that (recalling from \ref{con:b} that $\gamma' = \gamma-1$) \begin{multline*} \| H_\phi - H - {\mathcal{L}}_M : C^{0, \beta}(B''_q, {\widetilde{g}}_q)\| \le C ({\mathbf{d}}_L(q))^{\gamma-1} \max ( ({\mathbf{d}}_L(q))^{\gamma-2}, \tau_{\max}^{1-\alpha} ({\mathbf{d}}_L(q))^{\gamma'-3})\| \phi \|^2_{2, \beta, \gamma, \gamma'; M}\\ \leq C \tau_{\min}^{-\alpha/2} \max( ({\mathbf{d}}_L(q))^{\gamma-2}, \tau_{\max}^{(1-\alpha)/2} (\tau/{\mathbf{d}}_L(q))^{1/2} ({\mathbf{d}}_L(q))^{\gamma'-2}) \| \phi \|^2_{2, \beta, \gamma, \gamma'; M}. \end{multline*} where we have used that $\gamma' = 1/2$. The conclusion now follows from the definitions. \end{proof} \subsection*{The fixed point theorem} $\phantom{ab}$ \nopagebreak \begin{assumption}[Families of LD solutions] \label{A:FLD} \label{Azetabold} \label{Adiffeo} We assume \ref{cLker} holds, and we are given continuous families of the following parametrized by ${\boldsymbol{\zeta}}\in {B}_{\Pcal} \subset {\mathcal{P}}$, where ${\mathcal{P}}$ is a finite dimensional vector space and ${B}_{\Pcal} \subset {\mathcal{P}}$ a convex compact subset containing the origin ${\boldsymbol{0}}$. \begin{enumerate}[label=(\roman*)] \item \label{Idiffeo} Diffeomorphisms ${\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}} : \Sigma \rightarrow \Sigma$ with ${\mathcal{F}}^\Sigma_{\boldsymbol{0}}$ the identity on $\Sigma$. \item Finite sets $L=L\llbracket {\boldsymbol{\zeta}}\rrbracket={\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}} L\llbracket{\boldsymbol{0}}\rrbracket \subset\Sigma$. \item Configurations ${\boldsymbol{\tau}}={\boldsymbol{\tau}}\llbracket{\boldsymbol{\zeta}}\rrbracket: L\llbracket{\boldsymbol{\zeta}}\rrbracket\to \mathbb{R}_+$. \item LD solutions $\varphi =\varphi \llbracket {\boldsymbol{\zeta}} \rrbracket$ as in \ref{dLD} of singular set $L=L\llbracket {\boldsymbol{\zeta}}\rrbracket$ and configuration ${\boldsymbol{\tau}}={\boldsymbol{\tau}}\llbracket{\boldsymbol{\zeta}}\rrbracket$. \item For each $L=L\llbracket {\boldsymbol{\zeta}}\rrbracket$ constants $\delta_p=\delta_p\llbracket{\boldsymbol{\zeta}}\rrbracket$ as in \ref{con:L}. \item For each $L=L\llbracket {\boldsymbol{\zeta}}\rrbracket$ a space $\widehat{\mathscr{K}} \llbracket {\boldsymbol{\zeta}} \rrbracket = \widehat{\mathscr{K}}[ \, L\llbracket {\boldsymbol{\zeta}} \rrbracket \, ]$ as in \ref{aK}. \item Linear isomorphisms $Z_{{\boldsymbol{\zeta}}}: \mathscr{V}\llbracket {\boldsymbol{\zeta}}\rrbracket \rightarrow {\mathcal{P}}$ where $\mathscr{V}\llbracket {\boldsymbol{\zeta}}\rrbracket := \mathscr{V} [\, L \llbracket {\boldsymbol{\zeta}} \rrbracket \, ]$. \end{enumerate} Moreover the following are satisfied $\forall {\boldsymbol{\zeta}}\in {B}_{\Pcal}$. \begin{enumerate}[label=\emph{(\alph*)}] \item \label{Aa} $\| {\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}} : C^4 \| \le C$ where the norm is defined with respect to some atlas of $\Sigma$ and the constant $C$ depends only on the background $(\Sigma,N,g)$. \item \label{Ab} $\forall p\in L\llbracket{\boldsymbol{0}}\rrbracket$ we have ${\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}}( D^\Sigma_p(3\delta_p)) = D^\Sigma_{q}(3\delta_q)$ with $q:={\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}}(p)$. \item \label{Ac} $\varphi =\varphi \llbracket {\boldsymbol{\zeta}} \rrbracket$, $L=L\llbracket {\boldsymbol{\zeta}}\rrbracket$, and ${\boldsymbol{\tau}}={\boldsymbol{\tau}}\llbracket{\boldsymbol{\zeta}}\rrbracket$ satisfy \ref{con:one}, including the smallness of $\tau_{\max}$ in \ref{con:one}\ref{con:one:i} which is now in terms of the constant $C$ in \ref{Aa} as well. \item \label{Atau} $\forall p\in L\llbracket{\boldsymbol{0}}\rrbracket$ we have the uniformity condition $\tau^2_q \leq \tau_p \leq \tau_q^{1/2}$, where here $\tau_p$ denotes the value of ${\boldsymbol{\tau}}\llbracket{\boldsymbol{0}}\rrbracket$ at $p$ and $\tau_q$ the value of ${\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}\rrbracket$ at $q = {\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}}(p)\in L\llbracket {\boldsymbol{\zeta}} \rrbracket$. \item \label{AZ} ${\boldsymbol{\zeta}} - Z_{{\boldsymbol{\zeta}}} ( {\mathcal{M}}_{L\llbracket{\boldsymbol{\zeta}}\rrbracket} \varphi\llbracket {\boldsymbol{\zeta}}\rrbracket) \in \frac{1}{2} {B}_{\Pcal}$ (prescribed unbalancing). \end{enumerate} \end{assumption} \begin{definition} \label{dfpf} Assuming \ref{Azetabold} we define a scaled push-forward map ${\mathcal{F}}^\mathscr{V}_{{\boldsymbol{\zeta}}} : \mathscr{V}\llbracket {\boldsymbol{0}}\rrbracket \rightarrow \mathscr{V}\llbracket {\boldsymbol{\zeta}} \rrbracket$ by \begin{align*} {\mathcal{F}}^\mathscr{V}_{{\boldsymbol{\zeta}}} (\widetilde{\kappa}^\perp_p+ \widetilde{\kappa}_p)_{p\in L\llbracket{\boldsymbol{0}}\rrbracket} = \left( \tau_{q}^{1+\alpha/5} \left( \widetilde{\kappa}^\perp_{({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})^{-1}(q)}+ ({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})_* \widetilde{\kappa}_{({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})^{-1}(q)} \right) \right)_{q\in L\llbracket{\boldsymbol{\zeta}}\rrbracket}, \end{align*} where $({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})_* \widetilde{\kappa}_{({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})^{-1}(q)} = \widetilde{\kappa}_{({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})^{-1}(q)} \circ (\, d_{({\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}})^{-1}(q)} {\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}} \,)^{-1} \, \in \, T^*_q \Sigma$ and $\tau_q$ denotes the value of ${\boldsymbol{\tau}}\llbracket{\boldsymbol{\zeta}}\rrbracket$ at $q\in L\llbracket{\boldsymbol{\zeta}}\rrbracket$. \end{definition} \begin{definition}[Families of initial surfaces] \label{dkappatilde} Assuming \ref{Azetabold} and following \ref{Dinit} we write \begin{equation*} \begin{gathered} M\llbracket \underline{\zetabold} \rrbracket : = M[ \, \varphi\llbracket {\boldsymbol{\zeta}} \rrbracket \, , \, {\mathcal{F}}^\mathscr{V}_{{\boldsymbol{\zeta}}} {\boldsymbol{\underline{\kappa}}} \, ] \quad \text{ for } \quad \underline{\zetabold} = ({\boldsymbol{\zeta}}, {\boldsymbol{\underline{\kappa}}}) \in {B}_{\Pcal} \times {B}_{\val\llbracket {\boldsymbol{0}}\rrbracket} \quad \text{ where} \\ {B}_{\val\llbracket {\boldsymbol{0}}\rrbracket} : = \left\{ \, (\widetilde{\kappa}^\perp_p+ \widetilde{\kappa}_p)_{p\in L} \, : \, \forall p\in L \, , \, \widetilde{\kappa}^\perp_p \in [-1, 1] \, , \, |\widetilde{\kappa}_p |_g \le 1 \right\} \, \subset \, \mathscr{V} \llbracket {\boldsymbol{0}}\rrbracket . \end{gathered} \end{equation*} \end{definition} \begin{lemma}[Diffeomorphisms ${\mathcal{F}}_{\underline{\zetabold}}$] \label{Lrefdiff} Assuming \ref{Azetabold} there exists a family of diffeomorphisms ${\mathcal{F}}_{\underline{\zetabold}} : M\llbracket{\boldsymbol{0}} \rrbracket \rightarrow M\llbracket\underline{\zetabold}\rrbracket$, where here ${\boldsymbol{0}}$ denotes the zero element of ${\mathcal{P}} \times \mathscr{V}\llbracket {\boldsymbol{0}}\rrbracket$, such that: \begin{enumerate}[label=\emph{(\roman*)}] \item ${\mathcal{F}}_{\underline{\zetabold}}$ depends continuously on $\underline{\zetabold}$. \item For any $u\in C^{2, \beta}(M\llbracket\underline{\zetabold}\rrbracket)$ and $E\in C^{0, \beta}(M\llbracket\underline{\zetabold}\rrbracket)$ we have the following equivalence of norms: \begin{align*} \| \, u\circ {\mathcal{F}}_{\underline{\zetabold}} \, \|_{2,\beta,\gamma, \gamma';M\llbracket{\boldsymbol{0}}\rrbracket } \, & \Sim_4 \, \| \, u\, \|_{2,\beta,\gamma, \gamma';M\llbracket\underline{\zetabold}\rrbracket } , \\ \| \, E\circ {\mathcal{F}}_{\underline{\zetabold}} \, \|_{0,\beta,\gamma-2, \gamma'-2;M\llbracket{\boldsymbol{0}}\rrbracket } \, & \Sim_4 \, \| \, E\, \|_{0,\beta,\gamma-2, \gamma'-2;M\llbracket\underline{\zetabold}\rrbracket} . \end{align*} \end{enumerate} \end{lemma} \begin{proof} For all $p\in L \llbracket {\boldsymbol{0}} \rrbracket$, we define first $\widehat{{\mathcal{F}}}_{{\boldsymbol{\zeta}}} : \ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}, {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}]} \rightarrow \ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}, {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}]}$, where $q: = {\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}}(p)$, ${{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}$ and ${{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}$ are defined by the equations $\tau_p \cosh {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p} = \tau_p^{\alpha}/2$ and $\tau_q \cosh {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q} = \tau^\alpha_q/2$, by $\widehat{{\mathcal{F}}}_{{\boldsymbol{\zeta}}} \circ Y_{\ensuremath{\mathrm{Cyl}}}(\theta, {{\ensuremath{\mathrm{s}}}}) = Y_{\ensuremath{\mathrm{Cyl}}}(\theta, \frac{ {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q} }{{{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}}{{\ensuremath{\mathrm{s}}}})$. We then define ${\mathcal{F}}_{\underline{\zetabold}}$ to map $\Lambda_{{\boldsymbol{0}}}$ onto $\Lambda_{{\boldsymbol{\zeta}}}$, where \begin{align*} \Lambda_{\boldsymbol{0}}: = X_\mathbb{K}[ p, \tau_p, {\underline{\kappa}}_p] ( \ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}, {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p}]})\subset M\llbracket {\boldsymbol{0}}\rrbracket, \quad \Lambda_{\boldsymbol{\zeta}}: = X_\mathbb{K}[ q, \tau_q, {\underline{\kappa}}_q](\ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}, {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}]}) \subset M\llbracket \underline{\zetabold} \rrbracket, \end{align*} by requesting that \begin{align} {\mathcal{F}}_{\underline{\zetabold}} \circ X_\mathbb{K}[p, \tau_p, {\underline{\kappa}}_p] = X_\mathbb{K}[q, \tau_q, {\underline{\kappa}}_q] \circ \widehat{{\mathcal{F}}}_{{\boldsymbol{\zeta}}}. \end{align} We define now the restriction of ${\mathcal{F}}_{\underline{\zetabold}}$ on $M\llbracket {\boldsymbol{0}} \rrbracket \setminus \widehat{S}\llbracket {\boldsymbol{0}}\rrbracket$ to be a map onto $M\llbracket \underline{\zetabold}\rrbracket \setminus \widehat{S}\llbracket {\boldsymbol{\zeta}}\rrbracket$ which preserves signs in the normal directions and satisfies \begin{align*} \Pi_\Sigma \circ {\mathcal{F}}_{\underline{\zetabold}} = {\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}} \circ \Pi_\Sigma. \end{align*} On the region $\widehat{S}\llbracket {\boldsymbol{0}}\rrbracket \setminus \Lambda_{{\boldsymbol{0}}}$ we apply the same definition as in the above paragraph but with ${\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}}$ appropriately modified by using cut-off functions and ${\mathbf{d}}^\Sigma_{L\llbracket{\boldsymbol{0}}\rrbracket}$ so that the final definition provides an interpolation between the two definitions above and satisfies (i). Using \ref{Azetabold}\ref{Atau} and \ref{Ecatenoid}, it is not difficult to check that for each $p\in L\llbracket{\boldsymbol{0}}\rrbracket$, \begin{align*} {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{0}}, p} \,\, \Sim_{1+ C/|\log \tau_p|} \,\, {{\ensuremath{\mathrm{s}}}}_{{\boldsymbol{\zeta}}, q}. \end{align*} Using this and arguing as in the proof of \ref{L:norms}, we conclude (ii). \end{proof} \begin{theorem}[Theorem \ref{TA}] \label{Ttheory} Assuming that \ref{Azetabold} holds, there exist ${\widehat{\zetaboldunder}} = ({\widehat{\boldsymbol{\zeta}}}, \widehat{{\boldsymbol{\underline{\kappa}}}}) \in {B}_{\Pcal}\times {B}_{\val\llbracket {\boldsymbol{0}}\rrbracket}$ and ${\widehat{\upphi}} \in C^\infty(M\llbracket {\widehat{\zetaboldunder}} \rrbracket)$ (recall \ref{dkappatilde}) satisfying $ \| {\widehat{\upphi}}\|_{2, \beta, \gamma, \gamma'; M\llbracket {\widehat{\zetaboldunder}} \rrbracket } \le \tau_{\max}^{1+\alpha/4} $ (recall \ref{D:norm}), such that the normal graph $(M\llbracket {\widehat{\zetaboldunder}}\rrbracket)_{\widehat{\upphi}}$ is a $\groupcyl$-invariant embedded smooth closed minimal surface in $N$ of genus $2g_\Sigma-1+|L\llbracket {\widehat{\boldsymbol{\zeta}}}\rrbracket|$ where $g_\Sigma$ is the genus of $\Sigma$. \end{theorem} \begin{proof} The proof is based on finding a fixed point for a map ${\mathcal{J}} : B \rightarrow C^{2, \beta}(M\llbracket{\boldsymbol{0}}\rrbracket)\times {\mathcal{P}} \times \mathscr{V}\llbracket {\boldsymbol{0}}\rrbracket$ we will define shortly, where $B \subset C^{2,\beta}(M\llbracket{\boldsymbol{0}}\rrbracket)\times {\mathcal{P}} \times \mathscr{V}\llbracket {\boldsymbol{0}}\rrbracket$ is defined by \begin{align} \label{E:proofA} B := \left\{ \, v\in C^{2,\beta}(M\llbracket {\boldsymbol{0}} \rrbracket):\|v\|_{2,\beta,\gamma, \gamma';M\llbracket {\boldsymbol{0}} \rrbracket} \, \le \, \tau_{\max}\llbracket{\boldsymbol{0}}\rrbracket^{1+\alpha}\, \right\} \times {B}_{\Pcal} \times {B}_{\val\llbracket {\boldsymbol{0}}\rrbracket}. \end{align} Suppose $(v, \underline{\zetabold}) \in B$. Use \ref{Plinear2} to define $(u, w^+_H, w^-_H):= - {\mathcal{R}}'_{M\llbracket \underline{\zetabold} \rrbracket}\left( H - J_M(w^+, w^-)\right)$, where $w^\pm$ is as in \ref{LglobalH}. Define also $\phi \in C^{2, \beta}\left(M\llbracket \underline{\zetabold} \rrbracket\right)$ by $\phi : = v\circ {\mathcal{F}}^{-1}_{\underline{\zetabold}} + u$. We then have: \begin{enumerate} \item ${\mathcal{L}}_M u + H = J_M(w^++w^+_H, w^-+w^-_H).$ \item By \ref{LglobalH} and \ref{Plinear2}, \begin{align*} \left\| w^\pm_H: C^{0, \beta}( \Sigma, g)\right\| +\left \| \phi \right \|_{2, \beta, \gamma, \gamma'; M\llbracket \underline{\zetabold} \rrbracket} \leq \tau_{\max}^{1+\alpha/4}. \end{align*} Using \ref{Plinear2} again, define $(u_Q, w^+_Q, w^-_Q): = - {\mathcal{R}}'_{M\llbracket \underline{\zetabold} \rrbracket}(H_\phi- H - {\mathcal{L}}_M \phi)$. By definition, \item ${\mathcal{L}}_M u_Q+H_\phi = H + {\mathcal{L}}_M \phi +J_M(w^+_Q, w^-_Q)$.\newline By \ref{Lquad}, we have the following estimate on the quadratic terms: \item $\left\| w^\pm_Q : C^{0, \beta}( \Sigma, g)\right\| + \left\| u_Q\right\|_{2, \beta, \gamma, \gamma'; M\llbracket \underline{\zetabold} \rrbracket} \leq \tau_{\max}^{2-\alpha/4}$.\newline By combining the above, we see \item ${\mathcal{L}}_M( u_Q - v\circ {\mathcal{F}}^{-1}_{\underline{\zetabold}}) + H_\phi = J_M({\mathcal{L}}_\Sigma {\mathcal{E}}^{-1}_L {\boldsymbol{\mu}}^+, {\mathcal{L}}_\Sigma {\mathcal{E}}^{-1}_L {\boldsymbol{\mu}}^- )$, \end{enumerate} where ${\boldsymbol{\mu}}^\pm : = - {\mathcal{M}}_L \varphi \pm {\boldsymbol{\underline{\kappa}}} + {\boldsymbol{\mu}}^{\pm}_{H, Q}$ and ${\boldsymbol{\mu}}^{\pm}_{H,Q}$ are defined by requesting that ${\mathcal{L}}_{\Sigma}{\mathcal{E}}^{-1}_L {\boldsymbol{\mu}}^\pm_{H, Q} = w^\pm_H + w^\pm_Q$. We also define ${\boldsymbol{\mu}}_{\mathrm{sym}}$, ${\boldsymbol{\mu}}_{{{\mathrm{asym}}}}$, ${\boldsymbol{\mu}}^{\mathrm{sym}}_{H, Q}$ and ${\boldsymbol{\mu}}^{{{\mathrm{asym}}}}_{H, Q}$ by \begin{equation*} \begin{gathered} 2 {\boldsymbol{\mu}}_{\mathrm{sym}} : = {\boldsymbol{\mu}}^+ +{\boldsymbol{\mu}}^-, \quad 2{\boldsymbol{\mu}}_{{{\mathrm{asym}}}} := {\boldsymbol{\mu}}^+ - {\boldsymbol{\mu}}^-, \\ 2{\boldsymbol{\mu}}^{\mathrm{sym}}_{H, Q}: = {\boldsymbol{\mu}}^+_{H, Q} + {\boldsymbol{\mu}}^{-}_{H, Q}, \quad 2{\boldsymbol{\mu}}^{{{\mathrm{asym}}}}_{H, Q}: = {\boldsymbol{\mu}}^+_{H, Q} - {\boldsymbol{\mu}}^{-}_{H, Q}. \end{gathered} \end{equation*} We then define \begin{equation} \label{Tfp} \begin{aligned} {\mathcal{J}}(v, \underline{\zetabold}) &:= \left( u_Q \circ {\mathcal{F}}_{\underline{\zetabold}} \, , \, {\boldsymbol{\zeta}} + Z_{{\boldsymbol{\zeta}}}({\boldsymbol{\mu}}_{\mathrm{sym}}) \, , \, ({\mathcal{F}}^\mathscr{V}_{{\boldsymbol{\zeta}}} )^{-1}( {\boldsymbol{\underline{\kappa}}} - {\boldsymbol{\mu}}_{{{\mathrm{asym}}}})\right) \\ &= \left( u_Q \circ {\mathcal{F}}_{\underline{\zetabold}} \, ,\, {\boldsymbol{\zeta}} - Z_{{\boldsymbol{\zeta}}}( {\mathcal{M}}_L \varphi )\, , \, 0\right)+ \left( 0\, , \, Z_{{\boldsymbol{\zeta}}}( {\boldsymbol{\mu}}^{\mathrm{sym}}_{H, Q})\, ,\, - ({\mathcal{F}}^\mathscr{V}_{{\boldsymbol{\zeta}}} )^{-1}( {\boldsymbol{\mu}}^{{{\mathrm{asym}}}}_{H, Q}) \right). \end{aligned} \end{equation} We are now ready for the fixed-point argument. Clearly $B$ is convex. Let $\beta' \in (0, \beta)$. The inclusion $B\hookrightarrow C^{2, \beta'}( M\llbracket \underline{\zerobold}\rrbracket)\times {B}_{\Pcal}\times {B}_{\val\llbracket {\boldsymbol{0}}\rrbracket}$ is compact by the Ascoli-Arzela theorem. By inspecting the proofs of \ref{Plinear} and \ref{Plinear2}, it is easy to see that ${\mathcal{R}}'_{M\llbracket \underline{\zetabold} \rrbracket}$ depends continuously on ${\boldsymbol{\zeta}}$, and from this, \ref{Azetabold}\ref{AZ} and \ref{Lrefdiff}(i), that ${\mathcal{J}}$ is continuous in the induced topology. We next check that ${\mathcal{J}}(B) \subset B$ by analyzing the action of ${\mathcal{J}}$ on each factor of $B$. By (4) above and \ref{Lrefdiff} it follows that ${\mathcal{J}}$ maps the first factor of $B$ to itself. We see that ${\mathcal{J}}$ maps the second and third factors of $B$ into themselves using Schauder estimates, \ref{Azetabold}\ref{AZ}, \ref{Tfp}, (2) and (4) above, and by \ref{con:one}. The Schauder fixed point theorem \cite[Theorem 11.1]{gilbarg} now implies there is a fixed point $(\widehat{v}, {\widehat{\zetaboldunder}})$ of ${\mathcal{J}}$. Using \eqref{Tfp} and the fixed point property in conjunction with \ref{Azetabold}\ref{AZ}, \ref{aK}, and \ref{cLker}, we see that $u_Q = \widehat{v} \circ {\mathcal{F}}^{-1}_{{\widehat{\zetaboldunder}}}$ and $\widehat{{\boldsymbol{\mu}}}^{\pm} = 0$, where we use ``$\widehat{\phantom{a}}$'' to denote the various quantities for $(\underline{\zetabold}, v) = (\widehat{\underline{\zetabold}}, \widehat{v})$. By (5), we conclude the minimality of $(M\llbracket {\widehat{\zetaboldunder}} \rrbracket)_{\phihat}$. The smoothness follows from standard regularity theory, and the embeddedness follows from \ref{Lquad}, (2), and (4). \end{proof} The following observation which follows from \ref{cLker} will be useful in constructing and studying LD solutions. \begin{lemma}[Existence and uniqueness for LD solutions {\cite[Lemma 3.10]{kap}}] \label{Lldexistence} Given finite ${L\subset \Sigma}$ and a function ${\boldsymbol{\tau}} : L\rightarrow \mathbb{R}$, there exists a unique LD solution $\varphi = \varphi[{\boldsymbol{\tau}}]$ of singular set $L':=\{p\in L: \tau_p\ne0\}$ and configuration $\left. {\boldsymbol{\tau}}\right|_{L'}$. Moreover, $\varphi$ depends linearly on ${\boldsymbol{\tau}}$. \end{lemma} \begin{proof} We define $\varphi_1 \in C^\infty(\Sigma \setminus L')$ by requesting that it is supported on $\bigsqcup_{p\in L'} (D^\Sigma_p(2\delta_p))$ and $\varphi_1 = {\boldsymbol{\Psi}}[ \delta_p, 2\delta_p; {\mathbf{d}}^\Sigma_p]( \tau_p G_p, 0)$ on $D^\Sigma_p(2\delta_p)$ for each $p\in L'$. Note that ${\mathcal{L}}_\Sigma \varphi_1 \in C^\infty(\Sigma)$ (by assigning $0$ values on $L'$) and it is supported on $\bigsqcup_{p\in L'} (D^\Sigma_p(2\delta_p)\setminus D^\Sigma_p(\delta_p))$. Using \ref{cLker}, there is a unique $\varphi_2 \in C^\infty(\Sigma)$ such that ${\mathcal{L}}_\Sigma \varphi_2 = - {\mathcal{L}}_\Sigma \varphi_1$. We then define $\varphi = \varphi_1+\varphi_2$ and the conclusion follows. \end{proof} \begin{remark}[Characterizations of minimal doublings] \label{R:uniqueness} It is interesting that currently no characterizations of doublings exist, even under strong assumptions, for example the position of the bridges and further information. This means that even a small modification in the construction process would lead in principle to different minimal surfaces, even though the new ones would strongly resemble the previous ones. Note that the only case where such characterizations have been proved for minimal surfaces in the round three-sphere is for Lawson surfaces \cite{KW:Luniqueness}. Since it seems extremely likely that surfaces constructed by similar or analogous constructions, and moreover strongly resembling each other by construction, are actually identical, it is customary in the literature to discuss them as if they were known to be. In this article we also discuss such surfaces as if they were known to be identical, for example the doublings produced in Theorem \ref{R:oldT} with the ones in \cite{Wiygul} and also (for square lattices) with the ones constructed in \cite{kapouleas:clifford}; similarly surfaces constructed as in Remark \ref{RSph2} in the case all $m_i=m$ with surfaces constructed in \cite{kapmcg}. \hfill $\square$ \end{remark} \section[New minimal surfaces via doubling the Clifford Torus]{New minimal surfaces via doubling the Clifford Torus} \label{S:clifford} \subsection*{Symmetries and LD solutions} $\phantom{ab}$ \nopagebreak Let $\mathbb{T} := \left\{ (z_1, z_2) \in \mathbb{C}^2: |z_1| = |z_2| = 1/\sqrt{2}\right\} \subset \mathbb{S}^3 \subset \mathbb{C}^2$ be the Clifford torus in the unit three-sphere $(\mathbb{S}^3,g)$. We recall that doublings of the Clifford torus with catenoidal bridges centered at the points of a square $m\times m$ (large $m\in\mathbb{N}$) lattice $L\subset \mathbb{T}$ were constructed for the first time in \cite{kapouleas:clifford}. This was extended to rectangular lattices $k\times m$ with large $k,m\in \mathbb{N}$ and given small $m/k$ in \cite{Wiygul}. These results can easily be reproduced by constructing the required LD solutions and applying Theorem \ref{Ttheory} (see Remark \ref{R:oldT}). Our main focus in this section however is to construct new doublings in the following cases: first, when the necks are centered at the points of a lattice with $m/k$ \emph{not} constrained (see \ref{Amkcliff}) and second, less symmetric doublings where there are three different bridges up to symmetries. The latter kind can be extended to more complicated situations with a larger number of necks but we will not discuss this further in this article. We briefly introduce some now notation from \cite{kapouleas:clifford, Wiygul}. Given an oriented circle $C$ in $\mathbb{S}^3$, write $\mathsf{R}^\theta_C$ for the rotation by $\theta$ about $C$. Define the circles $C: = \{z_2 = 0\}$ and $C^\perp: = \{ z_1 = 0\}$. We have \begin{align*} \mathsf{R}^\theta_{C^\perp}(z_1, z_2) = (e^{i\theta} z_1, z_2), \quad \text{and} \quad \mathsf{R}^\theta_{C}(z_1, z_2) = (z_1, e^{i\theta} z_2). \end{align*} Define the following symmetries of $\mathbb{C}^2$ and the domain of the coordinates $({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}})$ defined in \ref{exClifford}: \begin{equation} \begin{gathered} {\underline{\mathsf{X}}}(z_1, z_2) = (\overline{z_1}, z_2), \quad {\underline{\mathsf{Y}}}(z_1, z_2) = (z_1, \overline{z_2}), \quad {\underline{\mathsf{Z}}}(z_1, z_2) = (z_2, z_1),\\ \underline{\sssX}^h({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}})=({{\ensuremath{\mathrm{x}}}}+h , \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}), \quad \underline{\YYY}^h({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}) = ({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}+h, \ensuremath{\mathrm{z}}) \quad \forall h \in \mathbb{R}, \\ \widehat{{\underline{\mathsf{X}}}}({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}) = (-{{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}), \quad \widehat{{\underline{\mathsf{Y}}}}({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}) = ({{\ensuremath{\mathrm{x}}}}, -\ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}), \quad \widehat{{\underline{\mathsf{Z}}}}({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}) = (\ensuremath{\mathrm{y}}, {{\ensuremath{\mathrm{x}}}}, -\ensuremath{\mathrm{z}}). \end{gathered} \end{equation} With ${\widetilde{E}}$ the parametrization map in \ref{exClifford}, these satisfy the relations \begin{equation} \begin{gathered} {\widetilde{E}} \circ \widehat{{\underline{\mathsf{X}}}} = {\underline{\mathsf{X}}} \circ {\widetilde{E}} , \quad {\widetilde{E}} \circ \widehat{{\underline{\mathsf{Y}}}} = {\underline{\mathsf{Y}}} \circ {\widetilde{E}}, \quad {\widetilde{E}} \circ \widehat{{\underline{\mathsf{Z}}}} = {\underline{\mathsf{Z}}} \circ {\widetilde{E}}, \\ {\widetilde{E}} \circ \underline{\sssX}^h= \mathsf{R}^{\sqrt{2} h}_{C^\perp} \circ {\widetilde{E}} \quad \text{and} \quad {\widetilde{E}} \circ \underline{\YYY}^h= \mathsf{R}^{\sqrt{2} h}_{C} \circ {\widetilde{E}} \quad \forall h \in \mathbb{R}. \end{gathered} \end{equation} \begin{assumption} \label{Amkcliff} We fix $k, m\in \mathbb{N}$ with $k\geq 3$, $m\geq k$, and assume $m$ is as large as needed in absolute terms. \end{assumption} We define the symmetry group $\group$, a point $p_0\in \mathbb{T}$, a lattice $L$, and set of parallel circles ${L_{\mathrm{par}}}$ by \begin{equation} \label{Egsymcl} \begin{gathered} \group = \group[k, m] := \langle \mathsf{R}^\frac{2\pi}{k}_{C^\perp}, \mathsf{R}^{\frac{2\pi}{m}}_{C}, {\underline{\mathsf{X}}}, {\underline{\mathsf{Y}}} \rangle , \quad p_0 : = \frac{1}{\sqrt{2}}(1, 1) = {\widetilde{E}}(0, 0, 0), \\ L = L[k, m]: = \group p_0, \quad \text{and} \quad {L_{\mathrm{par}}} : = \{ \mathsf{R}^{i\frac{2\pi}{k}}_{C^\perp} \mathsf{R}^\theta_C p_0: \theta\in \mathbb{R}, i \in \mathbb{Z} \}. \end{gathered} \end{equation} If $X$ is a function space consisting of functions defined on a domain $\Omega\subset \mathbb{T}$ and $\Omega$ is invariant under the action of $\group$, we use a subscript ``$\mathrm{sym}$'' to denote the subspace $X_\mathrm{sym}\subset X$ consisting of those functions $f\in X$ which are invariant under the action of $\group$. The linearized operator is ${\mathcal{L}}_{\mathbb{T}} = \Delta_{\mathbb{T}} + 4$, and it is easy to see that $(\ker {\mathcal{L}}_{\mathbb{T}})_\mathrm{sym}$ is trivial. By Lemma \ref{Lldexistence} there is therefore a unique $\group$-symmetric LD solution $\Phi = \Phi[k,m]$ with singular set $L$ and satisfying $\tau_p = 1$ $\forall p \in L$. For convenience, we define the scaled metric, scaled linear operator, and scaled coordinates $({\ensuremath{\widetilde{\mathrm{x}}}},{\ensuremath{\widetilde{\mathrm{y}}}})$ on $\mathbb{T}$ by \begin{align} \label{Egtildecliff} {\widetilde{g}} = m^2 g, \qquad {\widetilde{\mathcal{L}}}_{\mathbb{T}} = \frac{1}{m^2} {\mathcal{L}}_{\mathbb{T}} = \Delta_{{\widetilde{g}}}+ \frac{4}{m^2} , \quad ({\ensuremath{\widetilde{\mathrm{x}}}}, {\ensuremath{\widetilde{\mathrm{y}}}}) = m({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}). \end{align} We define $\delta = 1/(100m )$ and for $p\in L$ define $\delta_p = \delta$. \begin{remark}[Applying the LD approach in the cases of \cite{kapouleas:clifford, Wiygul}] \label{R:oldT} We first sketch the construction of the required LD solutions $\Phi$. Integrating ${\mathcal{L}}_{\mathbb{T}} \Phi = 0$ over $\mathbb{T}$ and integrating by parts, we find $\frac{km}{4\pi}= \frac{1}{|\mathbb{T}|} \int_\mathbb{T} \Phi$. Define ${\widehat{G}} \in C^\infty_\mathrm{sym}(\mathbb{T}\setminus L)$ by requesting that ${\widehat{G}}$ is supported on $D^\mathbb{T}_L(3\delta)$ and satisfies there ${\widehat{G}} = {\boldsymbol{\Psi}}[2 \delta, 3\delta; {\mathbf{d}}^\mathbb{T}_p]( G_p - \log \delta, 0)$ and define $\Phi' \in C^\infty_\mathrm{sym}(\mathbb{T})$ by requesting $\Phi = {\widehat{G}} + \frac{km}{4\pi} + \Phi'$. From this decomposition, estimates on ${\widehat{G}}$, and the uniform boundedness of $m/k$, we conclude $\| \Phi' : C^j_\mathrm{sym}(\mathbb{T}, {\widetilde{g}}) \| \le C(j)$. For some $\underline{c}\,$ fixed independently of $m$, define now ${B}_{\Pcal} : = [ -\underline{c}\,, \underline{c}\,] \subset {\mathcal{P}} : = \mathbb{R}$, LD solutions $\varphi = \varphi\llbracket \zeta\rrbracket : = \tau \Phi : = \frac{1}{m} e^\zeta e^{- \frac{km}{4\pi}} \Phi$ for $\zeta \in {B}_{\Pcal}$, and $\mathscr{V}_\mathrm{sym}[L]$ the subspace of $\mathscr{V}[L]$ consisting of the $\group$-invariant elements. Clearly $\mathscr{V}_\mathrm{sym}[L]$ is one dimensional and may be identified with $\mathbb{R}$. Using the definition of $\tau$ and the estimate on $\Phi'$, it follows that the map $Z_\zeta : \mathscr{V}_\mathrm{sym}[L] \rightarrow {\mathcal{P}}$ defined by $Z_\zeta(\mu) = \frac{1}{\tau}\mu $ satisfies $|\zeta - Z_\zeta({\mathcal{M}}_L\varphi)| \leq C$ for a constant $C$ independent of $\underline{c}\,$. After restricting to spaces adapted to the symmetries, we can then apply Theorem \ref{Ttheory} because the remaining assumptions are easy to check. \qed \end{remark} \begin{definition} \label{davgcliff} Given a function $\varphi$ on some domain $\Omega\subset \mathbb{T}$, we define a rotationally invariant function $\varphi_{{\mathrm{avg}}}$ on the union $\Omega'$ of the orbit circles of $\{ \mathsf{R}^\theta_C: \theta \in \mathbb{R}\}$ on which $\varphi$ is integrable (whether contained in $\Omega$ or not), by requesting that on each such circle $C'$, \[\left. \varphi_{{\mathrm{avg}}} \right|_{C'} :=\operatornamewithlimits{avg}_{C'}\varphi.\] We also define $\varphi_{{\mathrm{osc}}}$ on $\Omega\cap\Omega'$ by $\varphi_{{\mathrm{osc}}}:=\varphi-\varphi_{{\mathrm{avg}}}$. \end{definition} \begin{lemma} \label{LVBcliff} $\Phi_{{\mathrm{avg}}} = \frac{m}{2 \sqrt{2} \sin(\sqrt{2}\frac{\pi}{k})} \cos\big( \sqrt{2} \frac{\pi}{k} - 2{\mathbf{d}}^{\mathbb{T}}_{{L_{\mathrm{par}}}}\big)$ and $\left. \Phi_{{\mathrm{avg}}}\right|_{{L_{\mathrm{par}}}} = \frac{m}{2F}$, where $F: = \sqrt{2} \tan \left( \sqrt{2} \frac{\pi}{k}\right)$. \end{lemma} \begin{proof} Since ${\mathcal{L}}_{\mathbb{T}} \Phi_{{\mathrm{avg}}} = 0$ on $\mathbb{T}\setminus {L_{\mathrm{par}}}$ and the distance between neighboring circles of ${L_{\mathrm{par}}}$ is $\sqrt{2}\pi/k$, the symmetries imply that $\Phi_{{\mathrm{avg}}} = C \cos\big( \sqrt{2} \frac{\pi}{k} - 2{\mathbf{d}}^{\mathbb{T}}_{{L_{\mathrm{par}}}}\big)$ for some $C\neq 0$. By integrating ${\mathcal{L}}_{\mathbb{T}} \Phi =0$ on $\Omega_{\epsilon_1, \epsilon_2} := D^{\mathbb{T}}_{{L_{\mathrm{par}}}}(\epsilon_2) \setminus D^{\mathbb{T}}_{L}(\epsilon_1)$, where $0< \epsilon_1<< \epsilon_2$ and integrating by parts, we obtain \begin{align*} \int_{\partial \Omega_{\epsilon_1, \epsilon_2}} \frac{\partial}{\partial \eta} \Phi + \int_{\Omega_{\epsilon_1, \epsilon_2}} 4\Phi = 0, \end{align*} where $\eta$ is the unit outward conormal field along $\partial \Omega_{\epsilon_1, \epsilon_2}$. By taking the limit as $\epsilon_1 \searrow 0$ first and then as $\epsilon_2\searrow 0$, we obtain by using the logarithmic behavior near $L$ and the preceding that \begin{align*} 2\pi m = 4 \sqrt{2}\pi C \sin\left(\sqrt{2}\frac{\pi}{k}\right), \end{align*} which implies the conclusion. \end{proof} We introduce now the following decomposition. Note that we could assume (but is not necessary) that $G_p$ is rotationally invariant, in which case it is uniquely determined and can be expressed in terms of Bessel functions. \begin{definition} \label{Dcliffdecomp2} Define ${\widehat{G}} \in C^\infty_\mathrm{sym}(\mathbb{T} \setminus L)$ and ${\widehat{\Phi}}, \Phi', E' \in C^\infty_\mathrm{sym}(\mathbb{T})$ by requesting that \begin{equation*} \begin{gathered} {\widehat{G}} = {\boldsymbol{\Psi}}[2 \delta, 3\delta; {\mathbf{d}}^{\mathbb{T}}_p]( G_p - \log \delta \cos (2 {\mathbf{d}}^{\mathbb{T}}_{{L_{\mathrm{par}}}}), 0) \quad \text{on} \quad D^{\mathbb{T}}_L(3 \delta), \\ {\widehat{\Phi}} =\Phi_{{\mathrm{avg}}} - {\boldsymbol{\Psi}} \bigg[ \frac{2}{m}, \frac{3}{m}; {\mathbf{d}}^{\mathbb{T}}_{{L_{\mathrm{par}}}} \bigg]\left(\frac{m}{2\sqrt{2}}\sin (2 {\mathbf{d}}^\mathbb{T}_{{L_{\mathrm{par}}}}) , 0\right) \quad \text{on} \quad D^{\mathbb{T}}_{{L_{\mathrm{par}}}}(3/m), \end{gathered} \end{equation*} that ${\widehat{G}} = 0$ on $\mathbb{T} \setminus D^{\mathbb{T}}_L(3\delta)$, ${\widehat{\Phi}} = \Phi_{{\mathrm{avg}}}$ on $\mathbb{T} \setminus D^{\mathbb{T}}_{{L_{\mathrm{par}}}}(3/m)$, and \begin{align} \label{EPhdcliff2} \Phi = {\widehat{G}} + {\widehat{\Phi}} + \Phi', \quad E' = -{\widetilde{\mathcal{L}}}_{\mathbb{T}}( {\widehat{G}} + {\widehat{\Phi}}). \end{align} \end{definition} \begin{remark} Note that from Lemma \ref{LVBcliff} and the fact that \[ \cos \left( \sqrt{2} \frac{\pi}{k} - 2 {\mathbf{d}}^\mathbb{T}_{L_{\mathrm{par}}}\right) = \cos \left( \sqrt{2} \frac{\pi}{k}\right) \cos \left( 2 {\mathbf{d}}^\mathbb{T}_{{L_{\mathrm{par}}}}\right) + \sin \left( \sqrt{2} \frac{\pi}{k}\right) \sin \left( 2 {\mathbf{d}}^\mathbb{T}_{L_{\mathrm{par}}}\right) \] that ${\widehat{\Phi}}$ as defined in \ref{Dcliffdecomp2} is indeed smooth across ${L_{\mathrm{par}}}$. \end{remark} We estimate the average and oscillatory parts of $\Phi$ separately. \begin{lemma} \label{LPhipcliff2} $E'$ vanishes on $D^\mathbb{T}_{L}(2\delta)$ and $E'_{{{\mathrm{osc}}}}$ is supported on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3\delta)$. Moreover: \begin{enumerate}[label=\emph{(\roman*)}] \item $\| {\widehat{G}} : C^j_\mathrm{sym}(\mathbb{T} \setminus D^\mathbb{T}_L(\delta), {\widetilde{g}})\| \leq C(j)$. \item $\| E' : C^j_\mathrm{sym}(\mathbb{T} , {\widetilde{g}} ) \| \le C(j)$. \item $\| \Phi' : C^j_\mathrm{sym}(\mathbb{T}, {\widetilde{g}}) \| \le C(j)$. \end{enumerate} In (ii), the same estimate holds if $E'$ is replaced with either $E'_{{{\mathrm{avg}}}}$ or $E'_{{{\mathrm{osc}}}}$. \end{lemma} \begin{proof} Because ${\widehat{G}}$ is supported on $D^\mathbb{T}_{L}(3\delta)\setminus L$, (i) follows using \eqref{Egreenlog} and Definition \ref{Dcliffdecomp2}. The statements on the support of $E'$ and $E'_{{\mathrm{osc}}}$ follow from Definition \ref{Dcliffdecomp2}, from which we also see that $E' = {\widetilde{\mathcal{L}}}_{\mathbb{T}} {\boldsymbol{\Psi}}[2, 3; {\mathbf{d}}^{\mathbb{T}, {\widetilde{g}}}_{{L_{\mathrm{par}}}}]( \frac{m}{2\sqrt{2}} \sin(2 {\mathbf{d}}^\mathbb{T}_{{L_{\mathrm{par}}}}), 0)$ on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3/m)\setminus D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$. Thus, when restricted to this set, the bound in (ii) follows from the uniform bounds on the cutoff in the ${\widetilde{g}}$ metric. It follows from \ref{Dcliffdecomp2} that $E'$ vanishes on $D^{\mathbb{T}}_{{L_{\mathrm{par}}}}(2/m)\setminus D^\mathbb{T}_L(3 \delta)$. On $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3\delta)$, note that ${\widetilde{\mathcal{L}}}_{\mathbb{T}} {\widehat{\Phi}} =0$. Since ${\widetilde{\mathcal{L}}}_{\mathbb{T}} {\widehat{G}} = 0$ on $D^\mathbb{T}_L(2\delta)$, when restricted to $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3\delta)$ the required bound in (ii) follows from (i). Finally, we can replace $E'$ by $E'_{{\mathrm{avg}}}$ or $E'_{{\mathrm{osc}}}$ in (ii) by taking averages and subtracting. To prove (iii) it suffices to prove that the estimate holds when $\Phi'= \Phi'_{{\mathrm{avg}}} + \Phi'_{{\mathrm{osc}}}$ is replaced by either $\Phi'_{{\mathrm{avg}}}$ or $\Phi'_{{\mathrm{osc}}}$. We first prove the estimate for $\Phi'_{{\mathrm{avg}}}$. Note by \ref{Dcliffdecomp2} that on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$, \begin{align*} \Phi'_{{\mathrm{avg}}} = \frac{m}{2\sqrt{2}} \sin ( 2 {\mathbf{d}}^\mathbb{T}_{{L_{\mathrm{par}}}}) - {\widehat{G}}_{{\mathrm{avg}}}. \end{align*} Note that the left hand side is smooth and the discontinuities on the right hand side cancel. Using that ${\widetilde{\mathcal{L}}}_{\mathbb{T}} \Phi'_{{\mathrm{avg}}} = E'_{{\mathrm{avg}}}$, on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3/m)$ we have \begin{align} \label{Eavcliff} \partial^2_{\widetilde{{{\ensuremath{\mathrm{x}}}}}} \Phi'_{{\mathrm{avg}}} + \frac{4}{m^2} \Phi'_{{\mathrm{avg}}} = E'_{{\mathrm{avg}}}, \end{align} where $\widetilde{{{\ensuremath{\mathrm{x}}}}} : = m {{\ensuremath{\mathrm{x}}}}$. On a neighborhood of $\partial D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$, we have that ${\widehat{G}}_{{\mathrm{avg}}} =0$ from Definition \ref{Dcliffdecomp2}. It follows that $\left|\Phi'_{{\mathrm{avg}}}\right|<C$ and $\left| \partial_{\, \widetilde{{{\ensuremath{\mathrm{x}}}}}} \, \Phi'_{{\mathrm{avg}}}\right|<C$ on $\partial D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$. Using this as initial data for the ODE and bounds of the inhomogeneous term from (ii) yields the $C^2$ bounds on $\Phi'_{{\mathrm{avg}}}$ in (iii). Higher derivative estimates follow inductively from differentiating \eqref{Eavcliff} and again using (ii). This establishes the bound on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$, and the proof of the estimate on $D^\mathbb{T}_{{L_{\mathrm{par}}}}(3/m) \setminus D^\mathbb{T}_{{L_{\mathrm{par}}}}(2/m)$ is even easier since ${\widehat{G}}_{{\mathrm{avg}}} = 0$ there, so we omit the details. We now estimate $\Phi'_{{\mathrm{osc}}}$. For $n\in \mathbb{N}$ and $l \in \{0, 1, \dots\}$, we define $\phi_{\ell, n} \in C^\infty_{\mathrm{sym}}(\mathbb{T})$ by \begin{align*} \phi_{\ell, n}({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}) : = \cos \bigg( \frac{\ell}{\sqrt{2}} \frac{k}{m} {\ensuremath{\widetilde{\mathrm{x}}}} \bigg) \cos \bigg( \frac{n}{\sqrt{2}} {\ensuremath{\widetilde{\mathrm{y}}}} \bigg). \end{align*} Clearly $\{ \varphi_{\ell, n} : n\in \mathbb{N}, \ell\geq 0\}$ is a complete orthogonal set for the subspace of $(L^2(\mathbb{T}))_\mathrm{sym}$ consisting of functions with zero average; moreover, \begin{align*} {\widetilde{\mathcal{L}}}_{\mathbb{T}} \phi_{\ell, n} = \lambda_{\ell, n} \phi_{\ell, n}, \quad \text{where} \quad \lambda_{\ell, n}: = - \frac{1}{2} \left( \frac{k^2}{m^2}\ell^2 + n^2 \right) + \frac{4}{m^2}. \end{align*} For appropriate coefficients $E'^{, \ell,n}_{{{\mathrm{osc}}}}$, we have then \begin{align*} E'_{{\mathrm{osc}}} = \sum_{\ell\geq 0, n\in \mathbb{N}} E'^{, \ell, n}_{{{\mathrm{osc}}}} \phi_{\ell, n}, \quad \text{and} \quad \Phi'_{{\mathrm{osc}}} = \sum_{\ell, n} \lambda^{-1}_{\ell, n} E'^{, \ell, n}_{{\mathrm{osc}}} \phi_{\ell,n} \end{align*} since ${\widetilde{\mathcal{L}}}_{\mathbb{T}} \Phi'_{{\mathrm{osc}}} = E'_{{\mathrm{osc}}}$. Since $n \geq 1$, $\lambda^{-1}_{\ell,n}$ is bounded by a constant independent of $\ell, n, m$, and $k$, provided $m$ is large enough. The required bound on $\Phi'_{{\mathrm{osc}}}$ now follows from the bound in (ii). \end{proof} \subsection*{Configurations with a single singularity modulo symmetries} $\phantom{ab}$ \nopagebreak \begin{definition}[Obstruction spaces] \label{dkercliff} Let $\widehat{\mathscr{K}}_{\mathrm{sym}}[L], \mathscr{V}_\mathrm{sym}[L]$ be the subspaces of $\widehat{\mathscr{K}}[L], \mathscr{V}[L]$ consisting of the $\group$-invariant elements, where $\widehat{\mathscr{K}}[L] = \bigoplus_{p\in L} \widehat{\mathscr{K}}[p]$, and $\forall p\in L$, $\widehat{\mathscr{K}}[p]$ is defined as in \ref{R:p}. \end{definition} Since $\group$ is generated by reflections, $\mathscr{V}_\mathrm{sym}[L]$ is one-dimensional and may be identified with $\mathbb{R}$. For some $\underline{c}\,>0$ fixed independently of $m$, define $ {B}_{\Pcal} : = [ -\underline{c}\,, \underline{c}\,] \subset {\mathcal{P}} : = \mathbb{R}$ and LD solutions \begin{align} \label{Etaucliff2} \varphi : = \varphi \llbracket \zeta \rrbracket = \tau \Phi: = \frac{1}{m} e^{\zeta} e^{-\frac{m}{2F}} \Phi , \quad \zeta \in {B}_{\Pcal}. \end{align} \begin{prop} \label{Pclifford1} There is an absolute constant $C$ (independent of $\underline{c}\,$) such that for $m$ large enough (depending on $\underline{c}\,$), the map $Z_\zeta : \mathscr{V}_\mathrm{sym}\llbracket\zeta\rrbracket \rightarrow {\mathcal{P}}$ defined by $Z_\zeta(\mu) = \frac{1}{\tau}\mu $ satisfies $|\zeta - Z_\zeta({\mathcal{M}}_L\varphi)| \leq C$. \end{prop} \begin{proof} For any $p\in L$, expanding $\frac{1}{\tau} {\mathcal{M}}_p \varphi$ (recall \ref{Dmismatch}) using \ref{Rmismatch} and \ref{EPhdcliff2}, we find \begin{align*} \frac{1}{\tau} {\mathcal{M}}_p \varphi= \frac{m}{2F} + \log\left( \frac{\tau}{2\delta}\right) + \Phi'(p) = \zeta + \Phi'(p)+ \log(50), \end{align*} where the second equality uses \eqref{Etaucliff2}. The conclusion follows from using \ref{LPhipcliff2}(iii) to estimate $\Phi'(p)$. \end{proof} \begin{theorem} \label{Tcmain1} There exists an absolute constant $\underline{c}\,>0$ such that for all $(k, m)\in \mathbb{N}^2$ satisfying \ref{Amkcliff} and $m$ large enough in terms of $\underline{c}\,$, there exists a genus $mk+1$, $\group[k, m]$-invariant doubling of $\mathbb{T}$ by applying Theorem \ref{Ttheory}. \end{theorem} \begin{proof} After the obvious trivial modifications to Theorem \ref{Ttheory} and its proof to restrict to $\group$-symmetric data, we need only to check that \ref{Azetabold} holds. It was noted above that \ref{cLker} holds in the space of $\group$-symmetric functions. Define diffeomorphisms ${\mathcal{F}}^\mathbb{T}_\zeta : \mathbb{T} \rightarrow \mathbb{T}$ as in \ref{Azetabold}\ref{Idiffeo} by ${\mathcal{F}}^\mathbb{T}_\zeta = \text{Id}_\mathbb{T}$. $L\llbracket \zeta\rrbracket$, ${\boldsymbol{\tau}}\llbracket \zeta\rrbracket$, and $\varphi \llbracket \zeta\rrbracket$ as in \ref{Azetabold}(ii)-(iv) were defined in \ref{Egsymcl} and \eqref{Etaucliff2}. Next, $\delta_p\llbracket \zeta\rrbracket = 1/(100m)$ as in \ref{Azetabold}(v) was defined earlier, and the spaces $\mathscr{K}_\mathrm{sym}[L], \widehat{\mathscr{K}}_\mathrm{sym}[L]$, and $\mathscr{V}_\mathrm{sym}[L]$ defined in \ref{dkercliff} satisfy \ref{aK}, verifying \ref{Azetabold}(vi). Finally, isomorphisms $Z_\zeta$ as in \ref{Azetabold}(vii) were defined in \ref{Pclifford1}. We now check \ref{Azetabold}\ref{Aa}-\ref{AZ}: \ref{Aa}-\ref{Ab} hold trivially. For \ref{Azetabold}\ref{Ac} we must verify that \ref{con:one} holds: Convention \ref{con:L} clearly holds for all large enough $m$. Because $k\geq 3$, $F = \sqrt{2}\tan\left( \sqrt{2} \frac{\pi}{k}\right)> 0$, and consequently $\tau$ in \eqref{Etaucliff2} can be made as small as needed by taking $m$ large. Then \ref{con:one}(ii)-(iii) follow immediately using that $\forall p\in L$, $\tau_p = \tau$ and $\delta_p = 1/(100 m)$, where $\tau$. Because $k\geq 3$, we have $\frac{\sqrt{2}\pi}{k}< \frac{\pi}{2}$ and consequently from Lemma \ref{LVBcliff} that $\Phi_{{\mathrm{avg}}}>0$. In particular, it follows from \ref{LVBcliff} that $\Phi_{{{\mathrm{avg}}}}>cmk$ for some $c> 0$. The estimates in \ref{con:one}(iv)-(vi) now follow easily using that $\varphi = \tau \Phi$, the decomposition of $\Phi$ in \ref{Dcliffdecomp2}, and the estimates on ${\widehat{G}}$ and $\Phi'$ in \ref{LPhipcliff2}. This completes the verification of \ref{Azetabold}\ref{Ac}. Next, \ref{Azetabold}\ref{Atau} holds trivially since $\tau_p =\tau$ $\forall p \in L$, where $\tau$ is as in \eqref{Etaucliff2}. \ref{Azetabold}\ref{AZ} holds by \ref{Pclifford1} by taking $\underline{c}\,$ large enough. This completes the proof. \end{proof} \begin{remark}[The cases where $k=1$ and $k=2$] \label{R:k12} In the proof of \ref{Tcmain1} we used that $k\geq 3$ (recall \ref{Amkcliff})---which implies that $\Phi_{{\mathrm{avg}}}>0$ to verify that \ref{con:one}(vi) holds. While \ref{con:one}(vi) is necessary in Theorem \ref{Ttheory} to ensure the embeddedness of the resulting surfaces, a modified version of \ref{Ttheory} holds---without requiring \ref{con:one}(vi)---which produces immersed doublings. This modified theorem produces immersed doublings when $k=1$: to see this, note that although when $k=1$ we no longer have $\Phi_{{\mathrm{avg}}}>0$ and consequently \ref{con:one}(vi) does not hold, the rest of \ref{Azetabold} holds. In particular, $\tau$ can still be made arbitrarily small by taking $m$ large since $F = \sqrt{2} \tan (\sqrt{2}\pi)> 0$. On the other hand, the construction fails when $k=2$ because $F = \sqrt{2} \tan (\sqrt{2}/2 \pi)< 0$ and $\tau$ cannot be made as small as needed. \end{remark} \subsection*{Configurations with three singularities modulo symmetries} $\phantom{ab}$ \nopagebreak In this subsection we construct and estimate $\group$-symmetric LD solutions on $\mathbb{T}$ (recall \eqref{Egsymcl}) which have three singularities on each fundamental domain and apply Theorem \ref{Ttheory} to construct corresponding minimal surfaces. To simplify the estimates, we assume in this subsection that $m/k < C_1$ for a fixed constant $C_1>0$. To begin, for $p_0$ as defined in \eqref{Egsymcl}, define \begin{align*} \begin{gathered} p_1:= \mathsf{R}^{\frac{\pi}k}_{C^\perp} p_0, \quad p_2: = \mathsf{R}^{\frac{\pi}{m}}_{C}p_0, \quad L = L[k,m]: = \bigcup_{i=0}^2 L_i : = \bigcup_{i=0}^2 \group p_i \end{gathered} \end{align*} and define for $i=0, 1, 2$ the $\group$-invariant LD solution $\Phi_i = \Phi_i[k,m]$ satisfying $\tau_p = 1$ $\forall p\in L_i$. \begin{figure}[h] \centering \begin{tikzpicture} \draw[-, dashed, thick, black] (-3, 0) to (3, 0); \draw[-, dashed, thick, black] (0, -1) to (0, 1); \draw[-, dashed, thick, black] (3, -1) to (3, 1); \draw[-, dashed, thick, black] (-3, -1) to (-3, 1); \draw[-, dashed, thick, black] (-3, 1) to (3, 1); \draw[-, dashed, thick, black] (-3, -1) to (3, -1); \filldraw[color=black](0, 0) circle (3pt); \filldraw[color=black](0, -1) circle (3pt); \filldraw[color=black](0, 1) circle (3pt); \filldraw[color=black](3, 0) circle (3pt); \filldraw[color=black](-3, 0) circle (3pt); \draw (0, 0) node[circle, below left]{$p_0$}; \draw (0, 1) node[circle, below left]{$p_2$}; \draw (0, -1) node[circle]{}; \draw (3, 0) node[circle, below left]{$p_1$}; \draw (-3, 0) node[circle]{}; \draw (-3, 1.5) -- (-.4, 1.5); \draw (.4, 1.5)-- (3, 1.5); \node at (0, 1.5)[align = center] {$\frac{\sqrt{2}\pi}{k}$}; \draw (3.5, -1) -- (3.5, -.4); \draw (3.5, .4)--(3.5, 1); \node at (3.5, 0)[align = center] {$\frac{\sqrt{2}\pi}{m}$}; \draw (-3, 1.3)--(-3,1.7); \draw (3, 1.3)--(3,1.7); \draw (3.3, -1)--(3.7, -1); \draw (3.3, 1)--(3.7, 1); \end{tikzpicture} \caption{A fundamental domain (for the group generated by rotations) with three singularities $p_0, p_1$, and $p_2$. Dotted lines indicate reflectional symmetries.} \end{figure} For $\underline{c}\,> 0$ to be determined later, define ${B}_{\Pcal} : = [-\underline{c}\,,\underline{c}\,] \times \left[ \frac{ \underline{c}\,}{km} , \frac{\underline{c}\,}{km} \right]^2$ and LD solutions \begin{equation} \label{Dvarphi3} \begin{gathered} \varphi : = \varphi\llbracket{\boldsymbol{\zeta}}\rrbracket= \sum_{i=0}^2 e^{\sigma_i} {\underline{\tau}} \Phi_i, \quad \text{where} \quad {\underline{\tau}} = {\underline{\tau}} \llbracket {\boldsymbol{\zeta}}\rrbracket: = \frac{1}{m}e^{\zeta} e^{-3\frac{km}{4\pi}}, \quad {\boldsymbol{\zeta}} = (\zeta, \sigma_1, \sigma_2) \in {B}_{\Pcal} \end{gathered} \end{equation} and by convention we define $\sigma_0: = - \sigma_1 - \sigma_2$. Since each of $p_0, p_1, p_2$ and their $\group$-orbits are fixed by a pair of orthogonal reflections in $\group$, $\mathscr{V}_{\mathrm{sym}}\llbracket {\boldsymbol{\zeta}}\rrbracket: = \mathscr{V}_\mathrm{sym}[L]$ is three-dimensional and may be identified with $\mathbb{R}^3$. \begin{prop} \label{Pclifford2} There is an absolute constant $C$ (independent of $\underline{c}\,$) such that for $k,m$ as in \ref{Amkcliff}, $mk$ large enough (depending on $\underline{c}\,$), and $m/k<C_1$ the map $Z_{\boldsymbol{\zeta}} : \mathscr{V}_\mathrm{sym}\llbracket{\boldsymbol{\zeta}}\rrbracket \rightarrow {\mathcal{P}}$ defined by \begin{align} Z_{\boldsymbol{\zeta}}({\widetilde{\mubold}}) = \frac{1}{3}\left( \sum_{i=0}^2 {\widetilde{\mu}}_i, \frac{4\pi}{3km}({\widetilde{\mu}}_0+ {\widetilde{\mu}}_2-2{\widetilde{\mu}}_1), \frac{4\pi}{3km}({\widetilde{\mu}}_0 + {\widetilde{\mu}}_1 -2 {\widetilde{\mu}}_2)\right) , \end{align} where here ${\widetilde{\mubold}} = {\underline{\tau}} ({\widetilde{\mu}}_0, {\widetilde{\mu}}_1, {\widetilde{\mu}}_2)$ satisfies ${\boldsymbol{\zeta}} - Z_{\boldsymbol{\zeta}}({\mathcal{M}}_L\varphi) \in [-C, C] \times \left[ \frac{-C}{km} , \frac{C}{km}\right].$ \end{prop} \begin{proof} Using \ref{Dcliffdecomp2} and \eqref{Dvarphi3}, for each $i\in \{0, 1, 2\}$, $\mu_i : = \frac{1}{{\underline{\tau}}} {\mathcal{M}}_{p_i} \varphi $ satisfies \begin{equation} \label{Emuc} \begin{aligned} \mu_i &= \frac{km}{4\pi}\sum_{j=0}^2 e^{\sigma_j} + \bigg(\sum_{j=0}^2 e^{\sigma_j} \Phi'_j \bigg)\bigg|_{p_i} + e^{\sigma_i} \log \left( \frac{e^{\sigma_i} {\underline{\tau}}}{2\delta}\right)\\ &= 3\frac{km}{4\pi} + O\left( \frac{\underline{c}\,^2}{km}\right)+ O(C) + (1+ \sigma_i) \log \frac{{\underline{\tau}}}{2\delta}, \end{aligned} \end{equation} where we have expanded the exponentials and used that $\sum_{i=0}^2 \sigma_i =0$. Therefore, \begin{equation} \label{Evbc1} \begin{aligned} \frac{1}{3}\sum_{i=0}^2 \mu_i &= 3 \frac{km}{4\pi} + \log \frac{{\underline{\tau}}}{2\delta} + O(C) + O\left( \frac{\underline{c}\,^2}{km}\right) = \zeta + O(C) + O\left( \frac{\underline{c}\,^2}{km}\right). \end{aligned} \end{equation} Using \eqref{Emuc}, that $\sum_{i=0}^2 \sigma_i =0$, and \eqref{Dvarphi3}, we calculate \begin{equation} \label{Evbc2} \begin{aligned} \frac{1}{3}(2\mu_2 - \mu_1 - \mu_0) &= -3 \frac{km}{4\pi} \sigma_2 + O(C) + O\left( \frac{\underline{c}\,^2}{km}\right), \\ \frac{1}{3}(2\mu_1 - \mu_2 - \mu_0) &= - 3\frac{km}{4\pi} \sigma_1 + O(C) + O\left( \frac{\underline{c}\,^2}{km}\right). \end{aligned} \end{equation} The proof is concluded by combining \eqref{Evbc1} and \eqref{Evbc2}. \end{proof} \begin{theorem} \label{Tcmain2} Given $C_1> 0$, there exists an absolute constant $\underline{c}\,>0$ such that for all $(k, m)\in \mathbb{N}^2$ satisfying \ref{Amkcliff}, $m$ large enough in terms of $\underline{c}\,$, and $m/k<C_1$, there exists a genus $3mk+1$, $\group[k, m]$-invariant doubling of $\mathbb{T}$ by applying Theorem \ref{Ttheory}. \end{theorem} \begin{proof} The proof consists of checking the hypotheses of Theorem \ref{Ttheory} and is very similar to the proof of \ref{Tcmain1}, so we only give a sketch pointing out some of the differences. Although now ${\boldsymbol{\tau}}$ takes three distinct values, Assumption \ref{Azetabold}\ref{Atau} still holds because of \ref{Dvarphi3}. The map $Z_{\boldsymbol{\zeta}}$ defined in \ref{Pclifford2} is clearly a linear isomorphism for each ${\boldsymbol{\zeta}} \in {B}_{\Pcal}$, and so by \ref{Pclifford2} Assumption \ref{Azetabold}\ref{AZ} holds. \end{proof} \section*{Part II: Construction of LD solutions on $O(2)\times \mathbb{Z}_2$ symmetric backgrounds} \section{RLD Solutions} \label{S:RLD} \subsection*{Symmetries} \label{sub:sym} $\phantom{ab}$ \nopagebreak \begin{definition} \label{Drotcyl} \label{Dgroup} We define the group $O(2)\times \mathbb{Z}_2$, where $O(2)$ was defined in \ref{NEuc} and $\mathbb{Z}_2: = \{ \mathrm{Id}, {\underline{\mathsf{S}}}\}$. By convention, we identify each element of $O(2)$ or $\mathbb{Z}_2$ with its image under the inclusion $O(2) \hookrightarrow O(2)\times \mathbb{Z}_2$ or $\mathbb{Z}_2 \hookrightarrow O(2) \times \mathbb{Z}_2$. Fix an orientation on $\mathbb{S}^1$ and define for $c\in \mathbb{R}$ the rotation ${\mathsf{\Theta}}_c \in O(2)$ of $\mathbb{S}^1$ by angle $c$ in accordance with the given orientation and the reflection ${\underline{\mathsf{\Theta}}}_c \in O(2)$ determined by requesting that ${\underline{\mathsf{\Theta}}}_c$ reverses orientation and has fixed-point set $\{ \pm (\cos c, \sin c)\}\subset \mathbb{S}^1$. Let $O(2)$ act on $\mathbb{S}^1$ by the usual isometric action, $\mathbb{Z}_2$ act on $\mathbb{R}$ by requesting that ${\underline{\mathsf{S}}} \, {{\ensuremath{\mathrm{s}}}} = - {{\ensuremath{\mathrm{s}}}}$ $\forall {{\ensuremath{\mathrm{s}}}}\in \mathbb{R}$, and $O(2)\times \mathbb{Z}_2$ act on $\ensuremath{\mathrm{Cyl}}: = \mathbb{S}^1\times \mathbb{R}$ (recall \ref{Ecyl}) by the product action with respect to the actions of $O(2)$ on $\mathbb{S}^1$ and $\mathbb{Z}_2$ on $\mathbb{R}$ just defined. Finally, for $c\in \mathbb{R}$ we define the reflection ${\underline{\mathsf{S}}}_c \in {\mathrm{Isom}} ( \ensuremath{\mathrm{Cyl}}, \chi)$ by ${\underline{\mathsf{S}}}_c(p, {{\ensuremath{\mathrm{s}}}}):= (p, 2c - {{\ensuremath{\mathrm{s}}}})$. \end{definition} \begin{assumption}[Assumptions on the background] \label{Aimm} In Part II we assume the following: \begin{enumerate}[label={(\roman*)}] \item Assumption \ref{background} holds and $\Sigma$ is orientable and closed. \item The embedding of $\Sigma$ in $N$ is equivariant with respect to effective, isometric actions of $O(2)\times \mathbb{Z}_2$ on $\Sigma$ and on $N$. Moreover, the action of ${\underline{\mathsf{S}}}$ on $\Sigma$ is orientation reversing. \item $|A|^2+ \operatorname{Ric}(\nu, \nu)> 0$ on $\Sigma$. \item $\ker {\mathcal{L}}_\Sigma$ is trivial modulo the $O(2)\times \mathbb{Z}_2$ action on $\Sigma$. \end{enumerate} \end{assumption} \begin{definition} \label{Dpar} We call the nontrivial orbits of the action of $O(2)$ on $\Sigma$ \emph{parallel circles}. We call such a circle \emph{equatorial} if it is fixed by the action of ${\underline{\mathsf{S}}}$. \end{definition} \begin{lemma} \label{LAconf} \ref{Aimm} implies that the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\Sigma$ is diffeomorphic to a sphere or to a torus. \item There is an $O(2)\times \mathbb{Z}_2$-equivariant (with respect to the actions in \ref{Aimm} and in \ref{Dgroup}) map $X_\Sigma : \ensuremath{\mathrm{Cyl}}_I \rightarrow \Sigma$, for some $I = (-l, l), 0 < l \leq \infty$ (recall \ref{Ecyl}), which is a conformal diffeomorphism onto its image and satisfies the following. \begin{enumerate}[label=\emph{(\alph*)}] \item If $\Sigma$ is a torus then $\Sigma$ contains exactly two equatorial circles and $l<\infty$. Moreover $X_\Sigma$ extends to a covering map ${\widetilde{X}}_{\Sigma} : \ensuremath{\mathrm{Cyl}} \rightarrow \Sigma$ satisfying ${\widetilde{X}}_\Sigma \circ {\underline{\mathsf{S}}}_l = {\widetilde{X}}_\Sigma$ and the equatorial circles are ${\widetilde{X}}_\Sigma(\ensuremath{\mathrm{Cyl}}_0)$ and ${\widetilde{X}}_\Sigma(\ensuremath{\mathrm{Cyl}}_l)$. Furthermore the image of $X_\Sigma$ is $\Sigma\setminus {\widetilde{X}}_\Sigma(\ensuremath{\mathrm{Cyl}}_l)$. \item If $\Sigma$ is a sphere then $I = \mathbb{R}$ and the image of $X_\Sigma$ is $\Sigma$ minus two points with the ends of $\ensuremath{\mathrm{Cyl}}$ mapped to deleted neighborhoods of the points removed. Moreover $X_\Sigma(\ensuremath{\mathrm{Cyl}}_0)$ is the unique equatorial circle of $\Sigma$. \end{enumerate} \end{enumerate} \end{lemma} \begin{proof} Since $\Sigma$ admits an effective circle action, a result of Kobayashi \cite[Corollary 4]{Kobayashi} implies that $\Sigma$ has nonnegative Euler characteristic. Item (i) follows from this since $\Sigma$ is orientable. Next, we claim that $\Sigma$ has no exceptional orbits under the action of $SO(2)$. To see this, consider a $SO(2)$-orbit circle $S\subset \Sigma$ and choose (since $\Sigma$ is orientable) a unit normal field $\nu$ on $S$ in $\Sigma$. Since $\exp^\Sigma$ commutes with $SO(2)$, $S_{z}: = \{ \exp^\Sigma_p( z \nu(p)) : p\in S\}$ is a $SO(2)$-orbit for all $z\in \mathbb{R}$, and smoothness implies the $S_z$ are of the same orbit type for all $z\in (-\epsilon, \epsilon)$ and $\epsilon>0$ small enough. Since the principal orbits are dense, $S$ is a principal orbit and (since $SO(2)$ acts effectively) is in particular covered exactly once by $SO(2)$. The quotient of the principal orbits of $\Sigma$ by $SO(2)$ is diffeomorphic to $\mathbb{R}$ or $\mathbb{S}^1$, corresponding to the cases where $\Sigma$ is respectively a sphere or torus. Observe that the $\mathbb{Z}_2$ action descends to the quotient and (by \ref{Aimm}(ii)) ${\underline{\mathsf{S}}}$ reverses orientation. The corresponding fixed point set is then either a single point (when $\Sigma$ is a sphere) or a pair of points (when $\Sigma$ is a torus). The existence of a conformal map $X_\Sigma$ as in (ii) and (a) and (b) now follows easily. \end{proof} \begin{remark} \label{Rcylid} Occasionally, we will use the diffeomorphism $X_\Sigma : \ensuremath{\mathrm{Cyl}}_I \rightarrow X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ in \ref{LAconf}(ii) to use the standard coordinates $({{\ensuremath{\mathrm{s}}}}, \vartheta)$ on $\ensuremath{\mathrm{Cyl}}$ as a coordinate system on $X_\Sigma( \ensuremath{\mathrm{Cyl}}) \subset \Sigma$. To simplify notation, later we will also occasionally identify $\ensuremath{\mathrm{Cyl}}_I$ with $X_{\Sigma}(\ensuremath{\mathrm{Cyl}}_I) \subset \Sigma$; for example, in Section \ref{S:LDs} we will identify configurations $L[\boldsymbol{\sss}; \boldsymbol{m}]$ defined in \ref{dL} with their images $X_\Sigma(L[\boldsymbol{\sss}; \boldsymbol{m}]) \subset \Sigma$ in order to define an appropriate class of LD solutions (see \ref{LsymLD} and \ref{Lphiavg}) on $\Sigma$. \end{remark} \begin{notation} \label{Nconf} We denote $\omega \in C^\infty(\ensuremath{\mathrm{Cyl}}_I)$ the function satisfying $X^*_\Sigma g = e^{2\omega} \chi$ (recall \ref{LAconf}(ii)). \end{notation} \begin{remark} \label{R:cc} In Sections \ref{S:cat} and \ref{S:ccat} \ref{Aimm}(i) does not apply since the catenoid is not compact and the critical catenoid is a compact annulus with boundary. The theory in this section then has to be modified accordingly (see for example Lemma \ref{Lccb}). \end{remark} We call a function defined on an $O(2)$-invariant domain of $\Sigma$ or of $\ensuremath{\mathrm{Cyl}}$ which is constant on each $O(2)$ orbit a \emph{rotationally invariant function}. The following notation will simplify the presentation. \begin{notation} \label{Nsym} Consider a function space $X$ consisting of functions defined on a domain $\Omega$, where $\Omega \subset \ensuremath{\mathrm{Cyl}}$ or $\Omega \subset \Sigma$. If $\Omega$ is a union of $O(2)$ orbits, we use a subscript ``${{\ensuremath{\mathrm{s}}}}$'' to denote the subspace of functions $X_{{{\ensuremath{\mathrm{s}}}}}$ consisting of rotationally invariant functions, which are therefore constant on each $O(2)$ orbit. If moreover $\Omega$ is invariant under $\grouprotcyl$, we use a subscript ``$|{{\ensuremath{\mathrm{s}}}}|$'' to denote the subspace of $O(2)\times \mathbb{Z}_2$-invariant functions. \qed \end{notation} \begin{notation} \label{Npartial} If $\Omega \subset \ensuremath{\mathrm{Cyl}}$ or $\Omega \subset X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ is a domain and $u \in C^0_{{\ensuremath{\mathrm{s}}}}(\Omega)$ has one-sided partial derivatives at ${{\ensuremath{\mathrm{s}}}}=\underline{{{\ensuremath{\mathrm{s}}}}}$, then we denote these partial derivatives by using the notation $$ \partial_{+\,}u(\underline{{{\ensuremath{\mathrm{s}}}}}) :=\left. \frac{\partial u }{\partial {{\ensuremath{\mathrm{s}}}}}\right|_{{{\ensuremath{\mathrm{s}}}}=\underline{{{\ensuremath{\mathrm{s}}}}}+}, \qquad\qquad \partial_{-\,} u(\underline{{{\ensuremath{\mathrm{s}}}}}) :=-\left. \frac{\partial u }{\partial {{\ensuremath{\mathrm{s}}}}}\right|_{{{\ensuremath{\mathrm{s}}}}=\underline{{{\ensuremath{\mathrm{s}}}}}-}. $$ If $u$ is $C^1$, we use the abbreviation $\partial u := \frac{\partial u}{\partial {{\ensuremath{\mathrm{s}}}}}$. In that case, $\partial u = \partial_{+}u = -\partial_{-}u$. \qed \end{notation} \begin{definition} \label{dHcyl} Given $\underline{m} \in \mathbb{N}$, define $\mathscr{H}_{\underline{m}} = \big\langle {\mathsf{\Theta}}_{2\pi/\underline{m}}, {\underline{\mathsf{S}}} \big \rangle$ and $\mathscr{G}_{\underline{m}} := \big\langle {\underline{\mathsf{\Theta}}}_0, {\underline{\mathsf{\Theta}}}_{\pi/\underline{m}}, {\underline{\mathsf{S}}} \big\rangle$ (recall \ref{Dgroup}). Clearly $\mathscr{H}_{\underline{m}} <\mathscr{G}_{\underline{m}}< \grouprotcyl$ and $\mathscr{G}_{\underline{m}} \cong D_{2\underline{m}} \times \mathbb{Z}_2$, where $D_{2\underline{m}}$ is the dihedral group of order $2\underline{m}$. \end{definition} \begin{definition} \label{Dlpar} \label{dL} \label{dLmbold} Given $\underline{{{\ensuremath{\mathrm{s}}}}} \in [0, \infty)$ or $\boldsymbol{\sss} := ({{\ensuremath{\mathrm{s}}}}_1, \dots, {{\ensuremath{\mathrm{s}}}}_k)\in \mathbb{R}^k$ such that $0 \leq{{\ensuremath{\mathrm{s}}}}_1<\cdots<{{\ensuremath{\mathrm{s}}}}_k < l$, we define \begin{align*} {L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}] := \ensuremath{\mathrm{Cyl}}_{\{\pm \underline{{{\ensuremath{\mathrm{s}}}}}\}}, \qquad {L_{\mathrm{par}}}[\boldsymbol{\sss}] := \bigcup_{i=1}^k {L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i], \end{align*} and we denote the number of connected components (circles) of ${L_{\mathrm{par}}}[\boldsymbol{\sss}]$ by $k_{\mathrm{\circ}}[\boldsymbol{\sss}]$. For $\underline{m} \in\mathbb{N}$ we define \begin{equation*} \begin{gathered} L[\underline{{{\ensuremath{\mathrm{s}}}}}; \pm \underline{m}] : ={L_{\mathrm{mer}}}[\pm \underline{m}]\cap {L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}], \quad \text{where} \\ {L_{\mathrm{mer}}}[\underline{m}]:= \mathscr{G}_{\underline{m}} {L_{\mathrm{mer}}}[1], \quad {L_{\mathrm{mer}}}[1] := \left\{ (1,0) \right\} \times \mathbb{R} , \quad {L_{\mathrm{mer}}}[-\underline{m}] := {\mathsf{\Theta}}_{\pi/\underline{m}} {L_{\mathrm{mer}}}[\underline{m}]. \end{gathered} \end{equation*} Given then $\boldsymbol{m} := (m_1, \dots, m_k)\in (\mathbb{Z}\setminus \{0\})^k$ we call a set $L\subset \Sigma$ or a configuration ${\boldsymbol{\tau}} : L \rightarrow \mathbb{R}_+ $ \emph{$(\boldsymbol{\sss},\boldsymbol{m})$-rotational} if $L := \bigcup_{i=1}^k L_i$ with each $L_i\subset {L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]$ containing $|m_i|$ points in each component of ${L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]$ ($i=1,...,k$); we denote then the average value of the restriction $\left. {\boldsymbol{\tau}} \right|_{L_i}$ by $\tau_i$. We call such an $L$ or ${\boldsymbol{\tau}}$ \emph{$(\boldsymbol{\sss},\boldsymbol{m})$-symmetric} if we moreover have $L_i = L[{{\ensuremath{\mathrm{s}}}}_i ; m_i ]$ and that the restriction $\left. {\boldsymbol{\tau}} \right|_{L_i}$ is $\mathscr{G}_{|m_i|}$-invariant---hence ${\boldsymbol{\tau}}(L_i)= \{\tau_i\}$---for each $i=1,...,k$. An $(\boldsymbol{\sss},\boldsymbol{m})$-symmetric set $L$ is then uniquely determined and will be denoted by $L[\boldsymbol{\sss}; \boldsymbol{m}]$. Finally we denote by $m\in \mathbb{N}$ the greatest common divisor of $|m_1|,\dots, |m_k|$, so that the stabilizer in $O(2)\times \mathbb{Z}_2$ of an $(\boldsymbol{\sss},\boldsymbol{m})$-symmetric $L$ or ${\boldsymbol{\tau}}$ is $\groupmcyl$. \end{definition} \begin{remark} \label{RLcard} It is worth noting the following: \begin{enumerate}[label={(\roman*)}] \item $k_{\mathrm{\circ}}[\boldsymbol{\sss}] = 2k$ if ${{\ensuremath{\mathrm{s}}}}_1 > 0$ and $k_{\mathrm{\circ}}[\boldsymbol{\sss}] = 2k-1$ if ${{\ensuremath{\mathrm{s}}}}_1 =0$. \item In the case where $\Sigma$ is a torus, we could allow ${{\ensuremath{\mathrm{s}}}}_k = l$ in the constructions later in Part II. In order to simplify the presentation, however, we do not discuss this case. \item $L[\underline{{{\ensuremath{\mathrm{s}}}}}; \pm \underline{m}]$ are the only subsets of ${L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]$ which are invariant under $\mathscr{G}_{\underline{m}}$ and contain exactly $\underline{m}$ points equidistributed on each circle of ${L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]$ ($2\underline{m}$ in total if $\underline{{{\ensuremath{\mathrm{s}}}}}\ne0$). The sign of $\pm \underline{m}$ encodes the choice between these two subsets in $L[\boldsymbol{\sss}; \boldsymbol{m}]$. \item An $(\boldsymbol{\sss},\boldsymbol{m})$-rotational set $L$ as in \ref{dLmbold} has cardinality $|L|= |m_1|+ 2\sum_{i=2}^k|m_i|$ if ${{\ensuremath{\mathrm{s}}}}_1=0$ and $|L|= 2\sum_{i=1}^k |m_i|$ points if ${{\ensuremath{\mathrm{s}}}}_1 >0$. \item Note that an $(\boldsymbol{\sss},\boldsymbol{m})$-symmetric configuration ${\boldsymbol{\tau}}$ is uniquely determined by $\{\tau_i\}_{i=1}^k$. \end{enumerate} \end{remark} \subsection*{Basic Facts and Definitions} $\phantom{ab}$ We will estimate our LD solutions by comparing them with corresponding rotationally invariant solutions. We therefore need to define the appropriate class of rotationally invariant solutions of the linearized equation. We begin with some notation from \cite{kapmcg}. \begin{definition} \label{dsigma} Let $\mathbb{R}^\mathbb{N} := \left\{ (a_i)_{i\in \mathbb{N}}: a_i \in \mathbb{R}\right\}$. For any $k\in \mathbb{N}$, we identify $\mathbb{R}^{k}$ with a subspace of~$\mathbb{R}^\mathbb{N}$ by the map $(a_1, \dots, a_{k}) \mapsto (a_1, \dots, a_{k}, 0, 0, \dots)$. We consider the normed space $\left(\ell^1(\mathbb{R}^{\mathbb{N}}), |\cdot |_{\ell^1}\right)$, where \begin{align*} \ell^1(\mathbb{R}^\mathbb{N}) := \bigg\{ \boldsymbol{a} = (a_i)_{i\in \mathbb{N}} \in \mathbb{R}^\mathbb{N} : \sum_{i=1}^{\infty} |a_i|< \infty \bigg \}, \quad |\boldsymbol{a} |_{\ell^1} := \sum_{i=1}^{\infty} |a_i|. \end{align*} \end{definition} \begin{remark} \label{rsigbij} If $\boldsymbol{\sigma} = (\sigma_i)_{i\in \mathbb{N}}\in \ell^{1}\left( \mathbb{R}^{\mathbb{N}}\right)$, ${\boldsymbol{\xi}} = (\xi_i)_{i\in \mathbb{N}} \in \ell^{\infty}\left( \mathbb{R}^{\mathbb{N}} \right)$ and some positive numbers $F_{i\pm}$, $i\in \mathbb{N}$, satisfy \begin{align*} e^{\sigma_i} = \frac{F_{i+1+} + F_{i+1-}}{F_{i+} + F_{i-}}, \quad \xi_i = \frac{F_{i+} - F_{i-}}{F_{i+}+F_{i-}}\quad i\in \mathbb{N}, \end{align*} then note that $\left| {\boldsymbol{\xi}} \right|_{\ell^\infty} < 1$ and for any $1\leq j \leq i <\infty$ that \begin{align*} F_{i+} = \frac{1 + \xi_i }{1 + \xi_j}\big(e^{\sum_{l=j}^{i-1}\sigma_l}\big)F_{j+} = \frac{1 + \xi_i }{1 - \xi_j}\big(e^{\sum_{l=j}^{i-1}\sigma_l}\big)F_{j-}, \\ F_{i-} = \frac{1 - \xi_i }{1 + \xi_j}\big(e^{\sum_{l=j}^{i-1}\sigma_l}\big)F_{j+} = \frac{1 - \xi_i }{1 - \xi_j}\big(e^{\sum_{l=j}^{i-1}\sigma_l}\big)F_{j-}, \end{align*} and therefore $\sup\{ F_{i\pm} \}_{i\in \mathbb{N}} \Sim_{\underline{E}\,} \inf\{ F_{i\pm} \}_{i\in \mathbb{N}}$ holds, where $\underline{E}\, : = \frac{1+|{\boldsymbol{\xi}}|_{\ell^\infty}}{1- |{\boldsymbol{\xi}}|_{\ell^\infty}}\big(e^{|\boldsymbol{\sigma}|_{\ell^1}}\big)$. \qed \end{remark} \begin{definition}[Scale invariant flux] \label{dF} If $\phi \in C^0_{{\ensuremath{\mathrm{s}}}}( \Omega)$, where either $\Omega = \ensuremath{\mathrm{Cyl}}_{(a, b)}$ or $\Omega = X_{\Sigma}( \ensuremath{\mathrm{Cyl}}_{(a, b)})$ (recall \ref{Ecyl} and \ref{Nsym}), $(a, b) \subset I$, and $\phi$ is piecewise smooth and nonzero on $\Omega$, we define $F^\phi_{\pm}:(a, b)\rightarrow \mathbb{R}$ by \[ F^\phi_{\pm}({{\ensuremath{\mathrm{s}}}}) = \frac{\partial_\pm \phi({{\ensuremath{\mathrm{s}}}})}{\phi({{\ensuremath{\mathrm{s}}}})} = \partial_\pm \log |\phi|({{\ensuremath{\mathrm{s}}}}).\] \end{definition} \begin{remark} \label{rFlux} Note that $F^\phi_\pm = F^{c\phi}_\pm$ $\forall c\in \mathbb{R} \setminus \{0\}$. \end{remark} \begin{definition}[Subdivisions of cylindrical domains] \label{Dlpar2} Given $\boldsymbol{\sss}$ as in \ref{Dlpar} and a domain $\Omega$, where $\Omega \subset \ensuremath{\mathrm{Cyl}}$ (or $\Omega \subset \Sigma$), we will denote by $\Omega^{\boldsymbol{\sss}}$ the \emph{subdivision of $\Omega$} by ${L_{\mathrm{par}}}[ \boldsymbol{\sss}]$ (or of $X_{\Sigma}({L_{\mathrm{par}}}[\boldsymbol{\sss}])$): $\Omega^{\boldsymbol{\sss}}$ is the abstract surface which is the disjoint union of the $\Omega \cap A$'s, where $A$ is the closure of any connected component (a disk or an annulus) of $\ensuremath{\mathrm{Cyl}}\setminus {L_{\mathrm{par}}}[\boldsymbol{\sss}]$ (or of $\Sigma \setminus X_{\Sigma}({L_{\mathrm{par}}}[\boldsymbol{\sss}])$). Clearly functions on $\Omega$ can be thought of as functions on $\Omega^{\boldsymbol{\sss}}$ as well. \end{definition} Note for example that a function defined on $\Omega$ which is in $C^\infty( \Omega^{\boldsymbol{\sss}})$ is also in $C^0(\Omega)$ but not necessarily in $C^1(\Omega)$; it is ``piecewise smooth" on $\Omega$. \begin{definition} \label{dLchi} We define an operator ${\mathcal{L}_\chi}$ on $\ensuremath{\mathrm{Cyl}}_I$ by \begin{align} \label{EopL} {\mathcal{L}_\chi} : = \Delta_\chi + V = e^{2\omega} {\mathcal{L}}_{\Sigma}, \quad \text{ where } \quad \Delta_\chi := \frac{\partial^2}{\partial {{\ensuremath{\mathrm{s}}}}^2} + \frac{\partial^2}{\partial \theta^2}, \end{align} $V\in C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}}_I)$ is defined by $V = e^{2\omega } X^*_{\Sigma}(|A|^2+ \operatorname{Ric}(\nu, \nu))$, and $\omega$ as in \ref{Nconf}. \end{definition} When $\phi$ is rotationally invariant, note also that the equation ${\mathcal{L}_\chi} \phi = 0$ amounts to the ODE \begin{align} \label{ELchirot} \frac{d^2\phi}{d{{\ensuremath{\mathrm{s}}}}^2} + V({{\ensuremath{\mathrm{s}}}}) \, \phi = 0. \end{align} \begin{definition}[RLD solutions, cf. {\cite[3.5]{kapmcg}}] \label{RL} Given $\Omega = \Sigma$ or $\Omega = X_{\Sigma}(\ensuremath{\mathrm{Cyl}}_I) \subset \Sigma$, we say $\phi\in C^0_{|{{\ensuremath{\mathrm{s}}}}|} \big( \Omega \big)$ is a \emph{rotationally invariant (averaged) linearized doubling (RLD) solution} on $\Omega$ if \begin{enumerate}[label=\emph{(\roman*)}] \item $\phi >0$. \item There is $k\in \mathbb{N}$ and $\boldsymbol{\sss}^\phi \in [0, l)^k$ as in \ref{Dlpar}, such that $\phi \in C^\infty_{|{{\ensuremath{\mathrm{s}}}}|} \big( \Omega^{\boldsymbol{\sss}^\phi}\big)$ and ${\mathcal{L}}_\Sigma \phi =0$ on $\Omega^{\boldsymbol{\sss}^\phi}$. \item For $i=1, \dots, k$, $F^\phi_-({{\ensuremath{\mathrm{s}}}}^\phi_i)> 0$ and $F^\phi_+({{\ensuremath{\mathrm{s}}}}^\phi_i)> 0$. \end{enumerate} We call $\boldsymbol{\sss}^\phi$ the \emph{jump latitudes} of $\phi$. If $\phi(0) = 1$, we say $\phi$ is a \emph{unit RLD solution}. \end{definition} By Lemma \ref{LAconf}, $X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ is either $\Sigma$ with two points (when $\Sigma$ is a sphere) or a circle (when $\Sigma$ is a torus) removed. We will first study RLD solutions on $X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$, instead of on $\Sigma$, and this additional flexibility allows us to easily parametrize families of RLD solutions. Later, we will study the RLD solutions among these which extend to RLD solutions on $\Sigma$; these extend smoothly to $\Sigma \setminus X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ and are ``smooth at the ends". \begin{definition} \label{Dkmin} Define $k_{\circ}^{\mathrm{min}} = \min k_{\mathrm{\circ}}[ \boldsymbol{\sss}^\phi]$, where the minimum is over all RLD solutions $\phi$. \end{definition} \begin{definition}[Quantities associated to RLD solutions, cf. {\cite[3.6]{kapmcg}}] \label{RLquant} Given $\phi$ as in \ref{RL}, define \begin{align*} \underline{\Fbold}^\phi = \big( F^\phi_{i-}, F^\phi_{i+} \big)_{i=1}^{k} \in \mathbb{R}^{2k}_+, \quad \boldsymbol{F}^\phi = ( F^\phi_i)_{i=1}^k \in \mathbb{R}^{k}_+, \quad \boldsymbol{\sigma}^\phi = (\sigma^\phi_j)_{j=1}^{k-1} \in \mathbb{R}^{k-1}, \quad {\boldsymbol{\xi}}^\phi = \big( \xi^\phi_i\big)_{i=1}^k \in \mathbb{R}^k, \end{align*} where for $i=1, \dots, k$ and $j=1, \dots, k-1$, \begin{align} \label{Exi} F^\phi_{i\pm} := F^\phi_\pm ({{\ensuremath{\mathrm{s}}}}^\phi_i), \qquad 2F^\phi_i := F^\phi_{i+} + F^\phi_{i-} , \qquad e^{\sigma^\phi_j} := \frac{F^\phi_{j+1}}{F^\phi_j}, \qquad \xi^\phi_i := \frac{F^\phi_{i+} - F^\phi_{i-}}{F^\phi_{i+} + F^\phi_{i-}} . \end{align} We define $\underline{\bsigma}^\phi: = (\boldsymbol{\sigma}^\phi, {\boldsymbol{\xi}}^\phi) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$ and call the entries of $\underline{\bsigma}^\phi$ the \emph{flux ratios} of $\phi$. \end{definition} In our applications later in Part II, we will primarily be interested (see \ref{Lphiavg}(iii) and \ref{Lmatching}) in RLD solutions which are close to being ``balanced" in the sense of the following definition. \begin{definition}[Balanced RLD solutions] \label{dLbalanced} Given $\boldsymbol{m} := (m_1, \dots, m_k)\in (\mathbb{Z}\setminus \{ 0\} )^k$ we define $\boldsymbol{\sigma}\mspace{.1mu}\!\!\!\! /\, = \boldsymbol{\sigma}\mspace{.1mu}\!\!\!\! /\,[\boldsymbol{m}] = (\sigma\mspace{.8mu}\!\!\!\! /_j)_{j=1}^{k-1} \in \mathbb{R}^{k-1}$ and $\bsigmaunder\mspace{.8mu}\!\!\!\! / = \bsigmaunder\mspace{.8mu}\!\!\!\! /[\boldsymbol{m}] := (\boldsymbol{\sigma}\mspace{.1mu}\!\!\!\! /\,, {\boldsymbol{0}}) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$ by $e^{\sigma\mspace{.8mu}\!\!\!\! /_j} := \left| {m_{j+1}} / {m_j} \right| $ for $j=1, \dots, k-1$. We call an RLD solution $\phi$ \emph{balanced} with respect to $\boldsymbol{m}$ if it satisfies $\underline{\bsigma}^\phi = \bsigmaunder\mspace{.8mu}\!\!\!\! /[\boldsymbol{m}]$ (recall \ref{RLquant}). \end{definition} The corresponding definition of balanced RLD solutions in \cite[Definition 3.5]{kapmcg} asserted instead that $\underline{\bsigma}^\phi = {\boldsymbol{0}}$, which occurs in the context of \ref{dLbalanced} when all the $m_i$s have the same absolute value. This difference is explained by the fact that in the constructions of \cite{kapmcg}, the intersection of an LD solution's singular set with ${L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]$ consisted of some number $m \in \mathbb{N}$ points for each $i \in \{1, \dots, k\}$, whereas the singular sets of the LD solutions we study later in Part II more generally have $|m_i| \in \mathbb{N}$ points on each component of ${L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]$ (see \ref{dLmbold} and \ref{Lphiavg}) for $i \in \{1, \dots, k\}$, and the $|m_i|$s need not all be equal. \begin{remark} \label{Rs0} If ${{\ensuremath{\mathrm{s}}}}^\phi_1 = 0$, note that the symmetry about $\{{{\ensuremath{\mathrm{s}}}}=0\} $ implies $\xi^\phi_1 = 0$. \end{remark} \begin{remark} \label{Rru} Using \eqref{Exi} (see also Remark \ref{rsigbij}), we recover $\underline{\Fbold}^\phi$ from $F^\phi_{1}$ and $\underline{\bsigma}^\phi$ by \begin{align} \label{EFxi} F^\phi_{1\pm} = (1\pm \xi^\phi_1)F^\phi_{1} , \qquad F^\phi_{i\pm} = (1\pm \xi^\phi_i) \big( e^{\sum_{l=1}^{i-1} \sigma^\phi_l} \big) F^\phi_{1}, \quad i>1. \end{align} In Proposition \ref{Pexist} we construct RLD solutions $\phi$ by prescribing $F^\phi_{1-}$ and $\underline{\bsigma}^\phi$. \qed \end{remark} \subsection*{Existence and uniqueness of RLD solutions} $\phantom{ab}$ \begin{lemma} \label{AV1} \label{AV2} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $V$ as defined in \ref{dLchi} satisfies $V> 0$. There exists $C>0$ and for each $j\in \mathbb{N}$, $C(j)>0$ such that for all ${{\ensuremath{\mathrm{s}}}}\in \ensuremath{\mathrm{Cyl}}_I$, $V({{\ensuremath{\mathrm{s}}}}) \Sim_{C} e^{-2 |{{\ensuremath{\mathrm{s}}}}|}$ and $\frac{\partial^jV}{\partial {{\ensuremath{\mathrm{s}}}}^j}({{\ensuremath{\mathrm{s}}}}) \leq C(j) e^{-2|{{\ensuremath{\mathrm{s}}}}|}$. \item There exists ${\phi_{\mathrm{end}}} \in C^\infty_{{{\ensuremath{\mathrm{s}}}}}(\ensuremath{\mathrm{Cyl}}_{I})$ satisfying \[ {\mathcal{L}_\chi} {\phi_{\mathrm{end}}} = 0, \quad \lim_{{{\ensuremath{\mathrm{s}}}} \nearrow l} {\phi_{\mathrm{end}}}({{\ensuremath{\mathrm{s}}}}) = 1, \quad \text{and} \quad \lim_{{{\ensuremath{\mathrm{s}}}} \nearrow l} F^{{\phi_{\mathrm{end}}}}_+({{\ensuremath{\mathrm{s}}}}) = 0. \] \item For all large enough ${{\ensuremath{\mathrm{s}}}}$, $F_+^{{\phi_{\mathrm{end}}}}({{\ensuremath{\mathrm{s}}}}) < C e^{-2{{\ensuremath{\mathrm{s}}}}}$ for some $C>0$. \end{enumerate} \end{lemma} \begin{proof} This follows easily from \ref{Aimm}, \ref{LAconf}, and \ref{dLchi} and is trivial in the case $\Sigma$ is a torus. In the case $\Sigma$ is a sphere, items (i)-(iii) follow easily from the fact that the conformal map $X_\Sigma$ maps the ends of $\ensuremath{\mathrm{Cyl}}$ to punctured disks on $\Sigma$. \end{proof} \begin{lemma}[Flux monotonicity] \label{LFmono} Suppose $\phi \in C^\infty_{{{\ensuremath{\mathrm{s}}}}}\big(\ensuremath{\mathrm{Cyl}}_{[a, b]}\big)$, $\phi> 0$, and ${\mathcal{L}_\chi} \phi = 0$. \begin{enumerate}[label=\emph{(\roman*)}] \item For ${{\ensuremath{\mathrm{s}}}}\in (a, b)$, $\frac{d F^{\phi}_-}{d{{\ensuremath{\mathrm{s}}}}}({{\ensuremath{\mathrm{s}}}}) = V({{\ensuremath{\mathrm{s}}}}) + \big(F^\phi_-({{\ensuremath{\mathrm{s}}}})\big)^2>0$. \item $F^\phi_-(b) + F^\phi_+(a) = \int_{a}^b V({{\ensuremath{\mathrm{s}}}}) + \big( F^\phi_-({{\ensuremath{\mathrm{s}}}})\big)^2d{{\ensuremath{\mathrm{s}}}}$. \end{enumerate} \end{lemma} \begin{proof} The equalities are calculations using \eqref{ELchirot} and \ref{dF}. The inequality in (i) follows from \ref{AV1}. \end{proof} \begin{definition} \label{dHflux} Given $F\in \mathbb{R}$ and $\underline{{{\ensuremath{\mathrm{s}}}}} \in I$, we define $H = H[ F; \underline{{{\ensuremath{\mathrm{s}}}}}] \in C^\infty_{{\ensuremath{\mathrm{s}}}} (\ensuremath{\mathrm{Cyl}}_I)$ by requesting that it satisfies the equation ${\mathcal{L}_\chi} H = 0$ with initial data $H(\underline{{{\ensuremath{\mathrm{s}}}}}) = 1$ and $F^H_+(\underline{{{\ensuremath{\mathrm{s}}}}}) = F$. We also define ${\phi_{\mathrm{even}}}: = H[0;0]$. \end{definition} \begin{lemma} \label{LHmono} \begin{enumerate}[label=\emph{(\roman*)}] \item $\displaystyle{\frac{ \partial F_+^{H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]}}{\partial \underline{{{\ensuremath{\mathrm{s}}}}}}({{\ensuremath{\mathrm{s}}}}) = \frac{V(\underline{{{\ensuremath{\mathrm{s}}}}})+F^2}{(H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]({{\ensuremath{\mathrm{s}}}}))^2} >0}$. \item $\displaystyle{\frac{ \partial F_+^{H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]}}{\partial F}({{\ensuremath{\mathrm{s}}}}) = \frac{1}{(H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]({{\ensuremath{\mathrm{s}}}}))^2} >0}$. \end{enumerate} \end{lemma} \begin{proof} By direct calculation, switching the order of differentiation, and using \ref{LFmono}, we find \begin{align*} \frac{\partial}{\partial {{\ensuremath{\mathrm{s}}}}} \left( \frac{\partial F^H_+}{\partial u} H^2 \right) = 0, \end{align*} where $H = H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]$ and $u$ is either $\underline{{{\ensuremath{\mathrm{s}}}}}$ or $F$. It follows that \begin{align*} \frac{\partial F^H_+}{\partial u}({{\ensuremath{\mathrm{s}}}}) = \frac{\partial F^H_+}{\partial u}(\underline{{{\ensuremath{\mathrm{s}}}}}) \left( \frac{H(\underline{{{\ensuremath{\mathrm{s}}}}})}{H({{\ensuremath{\mathrm{s}}}})}\right)^2. \end{align*} Differentiating both sides of the equation $F^{H[F; \underline{{{\ensuremath{\mathrm{s}}}}}]}_+(\underline{{{\ensuremath{\mathrm{s}}}}}) = F$ with respect to $\underline{{{\ensuremath{\mathrm{s}}}}}$ yields the first equality in \[ \frac{\partial F^H_+}{\partial \underline{{{\ensuremath{\mathrm{s}}}}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) = - \frac{\partial F^H_+}{\partial {{\ensuremath{\mathrm{s}}}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) = V( \underline{{{\ensuremath{\mathrm{s}}}}})+ F^2,\] where the second equality follows from \ref{LFmono}. Observing also that $\frac{\partial F^H_+}{\partial F}(\underline{{{\ensuremath{\mathrm{s}}}}}) = 1$ and combining the above completes the proof. \end{proof} \begin{definition} \label{Fmax} Define $F^{\phie}_{\max}: = \lim_{{{\ensuremath{\mathrm{s}}}} \nearrow l} F^{{\phi_{\mathrm{even}}}}_-({{\ensuremath{\mathrm{s}}}})$ if ${\phi_{\mathrm{even}}}>0$ on $\ensuremath{\mathrm{Cyl}}_I$ and $F^{\phie}_{\max}: =\infty$ otherwise. \end{definition} \begin{lemma} If $\Sigma$ is a sphere, $F^{\phie}_{\max} = \infty$. \end{lemma} \begin{proof} If $\Sigma$ is a sphere, then $I=\mathbb{R}$, and then it follows from \eqref{EopL}, that $V>0$, and that $\partial {\phi_{\mathrm{even}}}(0)=0$ that ${\phi_{\mathrm{even}}}$ has a root ${{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{even}}}}_{\mathrm{root}} \in (0, \infty)$. \end{proof} We are now ready to parametrize families of RLD solutions by their flux ratios and $F^\phi_{1-}$. The notation differs slightly depending on whether the total number of circles $k_{\mathrm{\circ}}$ (recall \ref{Dlpar}) is even (Proposition \ref{Pexist}) or odd (Proposition \ref{Pexist2}). \begin{prop} [Existence and uniqueness of RLD solutions, $k_{\mathrm{\circ}}$ even] \label{Pexist} Given $F \in (0, F^{\phie}_{\max})$ and \begin{align*} \underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}}) = \left( \, (\sigma_i)_{i=1}^\infty , (\xi_{j})_{j=1}^\infty\, \right) \in \ell^1\left(\mathbb{R}^\mathbb{N}\right)\oplus \ell^{\infty}\left( \mathbb{R}^\mathbb{N}\right) \end{align*} satisfying $|{\boldsymbol{\xi}} |_{\ell^\infty} < 1$, there is a unique $k= k[F; \underline{\bsigma}]\in \mathbb{N}$ and a unique unit RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[F; \underline{\bsigma}]$ on $X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ satisfying the following. \begin{enumerate}[label=\emph{(\alph*)}] \item $F^{{\widehat{\phi}}}_{1-} = F$ and ${{\ensuremath{\mathrm{s}}}}_1^{\widehat{\phi}} >0$. \item $\underline{\bsigma}^{\widehat{\phi}} = \left. \underline{\bsigma} \right|_k$ where $k = k[ F; \underline{\bsigma}] \in \mathbb{N}$ is the number of jump latitudes of ${\widehat{\phi}}$ (recall \ref{RL}) and $\left. \underline{\bsigma} \right|_k: = \left( \, (\sigma_i)_{i=1}^{k-1} , (\xi_{j})_{j=1}^{k}\, \right) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$. \end{enumerate} Moreover the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item ${{\ensuremath{\mathrm{s}}}}_1^{\widehat{\phi}}, \dots, {{\ensuremath{\mathrm{s}}}}_k^{\widehat{\phi}}$ are increasing smooth functions of $F$ for fixed $\underline{\bsigma}$. \item $k[F; \underline{\bsigma}]$ is a nonincreasing function of $F$. Further, there exists $k_{\mathrm{min}}^{\mathrm{ev}}\in \mathbb{N}$ and a decreasing sequence $\{a_{k_{\mathrm{min}}^{\mathrm{ev}}-1, \underline{\bsigma}}, a_{k_{\mathrm{min}}^{\mathrm{ev}}, \underline{\bsigma}}, \dots\}$ such that $k[F; \underline{\bsigma}] = k$ if and only if $F \in [a_{k, \underline{\bsigma}}, a_{k-1, \underline{\bsigma}})$. \item The restriction of ${\widehat{\phi}}[F; \underline{\bsigma}]$ on any compact subset of $\ensuremath{\mathrm{Cyl}}_I$ depends continuously on $F$ and $\underline{\bsigma}$. \end{enumerate} \end{prop} \begin{proof} Suppose ${\widehat{\phi}}$ is a unit RLD solution satisfying (a) and (b). Because ${{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_1>0$, the symmetries imply that ${\widehat{\phi}} = {\phi_{\mathrm{even}}}$ on a neighborhood of $\ensuremath{\mathrm{Cyl}}_0$. But then \ref{RL}(i)-(ii), the flux monotonicity (Lemma \ref{LFmono}), and Remark \ref{rsigbij} inductively determine $\boldsymbol{\sss}^{\widehat{\phi}}$ and ${\widehat{\phi}}$ uniquely on $\ensuremath{\mathrm{Cyl}}_I$. This concludes the uniqueness part. We next construct a family of RLD solutions ${\widehat{\phi}}[F; \underline{\bsigma}]$ satisfying (a) and (b). By the hypotheses, \ref{Fmax}, and \ref{LFmono}, there is a unique ${{\ensuremath{\mathrm{s}}}}_1 \in (0, l)$ such that ${\phi_{\mathrm{even}}}$ is positive on $\ensuremath{\mathrm{Cyl}}_{(-{{\ensuremath{\mathrm{s}}}}_1, {{\ensuremath{\mathrm{s}}}}_1)}$ and $F = F^{{\phi_{\mathrm{even}}}}_-({{\ensuremath{\mathrm{s}}}}_1)$. By Remark \ref{rsigbij}, there is a unique extension ${\widehat{\phi}}[F; \underline{\bsigma}]$ of $\left.{\phi_{\mathrm{even}}}\right|_{\ensuremath{\mathrm{Cyl}}_{(-{{\ensuremath{\mathrm{s}}}}_1, {{\ensuremath{\mathrm{s}}}}_1)}}$ to a maximal domain $\ensuremath{\mathrm{Cyl}}_{(-a, a)}$ and a unique (a priori possibly infinite) sequence $\boldsymbol{\sss} = ({{\ensuremath{\mathrm{s}}}}_1, {{\ensuremath{\mathrm{s}}}}_2, \dots )$ such that ${\widehat{\phi}} >0$, ${\mathcal{L}_\chi} {\widehat{\phi}} = 0$ on $\ensuremath{\mathrm{Cyl}}^{\boldsymbol{\sss}}_{(-a, a)}$, and $F^{\widehat{\phi}}_{\pm}({{\ensuremath{\mathrm{s}}}}_i) = F_{i\pm}$, where $F_{i-}:= F$ and all other $F_{i\pm}$ are defined by requesting the identities in \ref{rsigbij} hold. To show that ${\widehat{\phi}}$ is an RLD solution, we need only show that $a = l$ and $\boldsymbol{\sss}$ is a finite sequence. By Remark \ref{rsigbij} and Lemma \ref{LFmono}, \begin{align*} 2F & \Sim_{\underline{E}\,} \left( F_{i+1-} + F_{i+}\right)= \int_{{{\ensuremath{\mathrm{s}}}}_i}^{{{\ensuremath{\mathrm{s}}}}_{i+1}} V({{\ensuremath{\mathrm{s}}}}) + \big( F^{{\widehat{\phi}}}_-({{\ensuremath{\mathrm{s}}}})\big)^2d{{\ensuremath{\mathrm{s}}}}, \end{align*} where $\underline{E}\,$ is as in \ref{rsigbij}. This implies a uniform in $i$ lower bound on ${{\ensuremath{\mathrm{s}}}}_{i+1} - {{\ensuremath{\mathrm{s}}}}_i$. Therefore $a = l$. In the case $l = \infty$ we show there are finitely many jump latitudes by estimating an upper bound for ${{\ensuremath{\mathrm{s}}}}_k$ in terms of $F$ and $\underline{\bsigma}$: specifically, we claim that if ${\widehat{\phi}}$ has a jump at ${{\ensuremath{\mathrm{s}}}}_{j+1}$ and ${{\ensuremath{\mathrm{s}}}}_j$ is large enough that ${\phi_{\mathrm{end}}}>0$ on $({{\ensuremath{\mathrm{s}}}}_j, l)$ (recall \ref{AV2}), then $F^{\widehat{\phi}}_+({{\ensuremath{\mathrm{s}}}}_j) \leq F^{{\phi_{\mathrm{end}}}}_+({{\ensuremath{\mathrm{s}}}}_j)$, which using the comparability of all the fluxes to $F$ with the fact from \ref{AV2} that $\lim_{{{\ensuremath{\mathrm{s}}}} \rightarrow \infty} F^{\phi_{\mathrm{end}}}_+({{\ensuremath{\mathrm{s}}}}) = 0$, implies that ${{\ensuremath{\mathrm{s}}}}_j$ cannot be arbitrarily large. The claim follows by observing that $F^{\widehat{\phi}}_+ - F^{{\phi_{\mathrm{end}}}}_+$ cannot change sign on $({{\ensuremath{\mathrm{s}}}}_j, {{\ensuremath{\mathrm{s}}}}_{j+1})$ as $F^{\widehat{\phi}}_+$ and $F^{{\phi_{\mathrm{end}}}}_+$ satisfy the same first order equation \ref{LFmono}(i), while $F^{\widehat{\phi}}_+$ changes sign and $F^{{\phi_{\mathrm{end}}}}_+$ remains positive on $({{\ensuremath{\mathrm{s}}}}_j, {{\ensuremath{\mathrm{s}}}}_{j+1})$. This concludes the proof of the existence and uniqueness of ${\widehat{\phi}}[F; \boldsymbol{\sigma}]$ satisfying (a)-(b). Since as above $F = F^{{\phi_{\mathrm{even}}}}_-({{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_1)$, \ref{LFmono} implies ${{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_1$ is increasing as a function of $F$. By \ref{rsigbij}, $F^{\widehat{\phi}}_{2-} = \frac{1-\xi_2}{1-\xi_1}e^{\sigma_1} F$. By combining this with both parts of Lemma \ref{LHmono}, it follows that ${{\ensuremath{\mathrm{s}}}}^{{\widehat{\phi}}}_2$ is increasing as a function of $F$. Using this and arguing inductively shows that ${{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_j$ is a strictly increasing function of $F$ for $2<j \leq k$. That $k[F; \underline{\bsigma}]$ is nonincreasing in $F$ and the existence the sequence follows easily from the monotonicity of ${{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_k$ in (ii). To complete the proof of (ii), we must show that $k_{\mathrm{min}}^{\mathrm{ev}}$ is well defined, that is independent of $\underline{\bsigma}$. If $F^{\phie}_{\max} <\infty$, by the flux monotonicity \ref{LFmono} it is easy to see that this is true and moreover that $k_{\mathrm{min}}^{\mathrm{ev}} = 1$. Suppose then that $F^{\phie}_{\max} = \infty$, and consider RLD solutions ${\widehat{\phi}} = {\widehat{\phi}}[F, \underline{\bsigma}], {\widehat{\phi}}' = {\widehat{\phi}}[F', \underline{\bsigma}']$ for $\underline{\bsigma}, \underline{\bsigma}' \in \ell^1\left(\mathbb{R}^\mathbb{N}\right)\oplus \ell^{\infty}\left( \mathbb{R}^\mathbb{N}\right)$ fixed and variable $F, F' \in (0, F^{\phie}_{\max})$. By choosing $F'$ large enough in terms of $F$ and $\underline{\bsigma}$, we may ensure that $F^{{\widehat{\phi}}'}_{\pm i}> F^{\widehat{\phi}}_{\pm i}$ for all $i$ such that both of the preceding are defined. By \ref{LFmono} and \ref{LHmono}, this implies that $k[F; \underline{\bsigma}] \geq k[F'; \underline{\bsigma}']$. On the other hand, by choosing $F'$ small enough in terms of $F$ and $\underline{\bsigma}$, it follows analogously that $k[F; \underline{\bsigma}] \leq k[F'; \underline{\bsigma}']$, and together these inequalities prove that $k_{\mathrm{min}}^{\mathrm{ev}}$ is well defined. Finally, (iii) follows from \eqref{EFxi} and smooth dependence of ODE solutions on initial conditions. \end{proof} \begin{prop} [Existence and uniqueness of RLD solutions, $k_{\mathrm{\circ}}$ odd] \label{Pexist2} Given $F \in (0, \infty)$ and \begin{align*} \underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}}) = \left( \, (\sigma_i)_{i=1}^\infty , (\xi_{j})_{j=1}^\infty\, \right) \in \ell^1\left(\mathbb{R}^\mathbb{N}\right)\oplus \ell^{\infty}\left( \mathbb{R}^\mathbb{N}\right) \end{align*} satisfying $|{\boldsymbol{\xi}} |_{\ell^\infty} < 1$ and $\xi_1 =0$, there is a unique $k= k[F; \underline{\bsigma}]\in \mathbb{N}$ and a unique unit RLD solution ${\widecheck{\phi}} = {\widecheck{\phi}}[F; \underline{\bsigma}]$ on $X_\Sigma(\ensuremath{\mathrm{Cyl}}_I)$ satisfying the following. \begin{enumerate}[label=\emph{(\alph*)}] \item $F^{{\widecheck{\phi}}}_{1} = F^{{\widecheck{\phi}}}_{1\pm} = F$ and ${{\ensuremath{\mathrm{s}}}}_1^{\widecheck{\phi}}=0$. \item $\underline{\bsigma}^{\widecheck{\phi}} = \left. \underline{\bsigma} \right|_k$ where $k = k[ F; \underline{\bsigma}] \in \mathbb{N}$ is the number of jump latitudes of ${\widecheck{\phi}}$ (recall \ref{RL}) and $\left. \underline{\bsigma} \right|_k: = \left( \, (\sigma_i)_{i=1}^{k-1} , (\xi_{j})_{j=1}^{k}\, \right) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$. \end{enumerate} Moreover the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item ${{\ensuremath{\mathrm{s}}}}_2^{\widecheck{\phi}}, \dots, {{\ensuremath{\mathrm{s}}}}_k^{\widecheck{\phi}}$ are increasing smooth functions of $F$ for fixed $\underline{\bsigma}$. \item $k[F; \underline{\bsigma}]$ is a nonincreasing function of $F$. Further, there exists $k_{\mathrm{min}}^{\mathrm{odd}}\in \mathbb{N}$ and a decreasing sequence $\{b_{k_{\mathrm{min}}^{\mathrm{odd}}-1, \underline{\bsigma}}, b_{k_{\mathrm{min}}^{\mathrm{odd}}, \underline{\bsigma}}, \dots\}$ such that $k[F; \underline{\bsigma}] = k$ if and only if $F \in [b_{k, \underline{\bsigma}}, b_{k-1, \underline{\bsigma}})$. \item The restriction of ${\widecheck{\phi}}[F; \underline{\bsigma}]$ on any compact subset of $\ensuremath{\mathrm{Cyl}}_I$ depends continuously on $F$ and $\underline{\bsigma}$. \end{enumerate} \end{prop} \begin{proof} We omit the details of the proof, which are very similar to the proof of \ref{Pexist}. Note however that the assumption $\xi_1 = 0$ is necessary (recall \ref{Rs0}) due to the symmetry about ${{\ensuremath{\mathrm{s}}}}^{\widecheck{\phi}}_1 = 0$. \end{proof} \begin{remark} It is clear that any RLD solution is a constant multiple of a ${\widehat{\phi}}[F; \underline{\bsigma}]$ as in \ref{Pexist} or a ${\widecheck{\phi}}[F; \underline{\bsigma}]$ as in \ref{Pexist2}. \end{remark} \begin{remark} \label{Rphicheck} RLD solutions with $k_{\mathrm{\circ}}$ odd were constructed on $\mathbb{S}^2$ in \cite[Lemma 7.22]{kapmcg}, where they were called ${\widehat{\phi}}_{\mathrm{eq}}[F; \underline{\bsigma}]$. \end{remark} \subsection*{Estimates on RLD solutions} $\phantom{ab}$ We proceed to estimate the families of RLD solutions just constructed. To avoid unnecessary notational difficulties, we state and prove the next results for the families of RLD solutions ${\widehat{\phi}}$ with $k_{\mathrm{\circ}}$ even and leave the trivial modifications for the families of solutions ${\widecheck{\phi}}$ with $k_{\mathrm{\circ}}$ odd to the reader. \begin{definition} \label{Sk} We define for $k\in\mathbb{N}$, $k\geq k_{\mathrm{min}}^{\mathrm{ev}}$ the domain $S_k\subset \mathbb{R}\times\mathbb{R}^{k-1}\times\mathbb{R}^k$ by \begin{align*} S_k:= \left \{\, \left ( \, F \, , \, (\sigma_i )_{i=1}^{k-1} \, , \, (\xi_j)_{j=1}^k \, \right) \, : \, F \in (0, a_{k-1, \underline{\bsigma}}) \text{ and } |{\boldsymbol{\xi}}|_{\ell^\infty} < 1\right\}, \end{align*} where $a_{k-1, \underline{\bsigma}}$ is as in \ref{Pexist}. By \ref{dsigma} and \ref{Pexist}, $S_{k+1}\subset S_k \subset \mathbb{R}\times \mathbb{R}^\mathbb{N}\times\mathbb{R}^\mathbb{N}$. \end{definition} \begin{lemma}[Recursive formulas for the derivatives of ${{\ensuremath{\mathrm{s}}}}_k$] \label{Lsderiv} An RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[F; \underline{\bsigma}]$ as in \ref{Pexist} has $k \geq k_{\mathrm{min}}^{\mathrm{ev}}$ jumps if and only if $F \in (0, a_{k-1, \underline{\bsigma}})$ or equivalently by \ref{Sk}, $(F, \left. \underline{\bsigma}\right|_k) \in S_k$. The $k$th jump latitude ${{\ensuremath{\mathrm{s}}}}_k$ depends only on $F$ and $\left. \underline{\bsigma}\right|_k$ and can be considered as a smooth function defined on $S_k$. Alternatively, we can consider each $F$ as a smooth function of $F_1 = F^{\widehat{\phi}}_1$ and $\left. \underline{\bsigma}\right|_k$, and then we have for $k=1$ \begin{equation} \label{Msderiv0} \begin{aligned} \big(V({{\ensuremath{\mathrm{s}}}}_1) + \big( F^{\widehat{\phi}}_{1-}\big)^2\big)\frac{\partial {{\ensuremath{\mathrm{s}}}}_1 }{ \partial F_1} =1 - \xi_1, \qquad \big(V({{\ensuremath{\mathrm{s}}}}_1) + \big( F^{\widehat{\phi}}_{1-}\big)^2\big)\frac{\partial {{\ensuremath{\mathrm{s}}}}_1 }{ \partial \xi_1} = - F_1, \end{aligned} \end{equation} and for $k>1$ the recursive formulas (note $S_k\subset S_{k-1}$) \begin{multline} \label{Msderiv} \big( V({{\ensuremath{\mathrm{s}}}}_k) + \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial F_1} = \big( V({{\ensuremath{\mathrm{s}}}}_{k-1}) + \big(F^{\widehat{\phi}}_{k-1+}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k-1}}{ \partial F_1}\bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2+\\ + (1+ \xi_{k-1}) \big( e^{\sum_{l=1}^{k-2} \sigma_l} \big)\bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2 + (1- \xi_{k}) \big( e^{\sum_{l=1}^{k-1} \sigma_l} \big) , \end{multline} \begin{multline} \label{Msderiv3} \big( V({{\ensuremath{\mathrm{s}}}}_k) + \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial \sigma_j} = \big( V({{\ensuremath{\mathrm{s}}}}_{k-1}) + \big(F^{\widehat{\phi}}_{k-1+}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k-1}}{ \partial \sigma_j}\bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2+\\ +F_1(1+\xi_{k-1})\frac{\partial}{\partial \sigma_j} \big( e^{\sum_{l=1}^{k-2} \sigma_l} \big) \bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2 - F_1(1- \xi_{k}) \frac{\partial}{\partial \sigma_j}\big( e^{\sum_{l=1}^{k-1} \sigma_l} \big) , \end{multline} \begin{multline} \label{Msderiv2} \big( V({{\ensuremath{\mathrm{s}}}}_k) + \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial \xi_j} = \big( V({{\ensuremath{\mathrm{s}}}}_{k-1}) + \big(F^{\widehat{\phi}}_{k-1+}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k-1}}{ \partial \xi_j}\bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2+\\ +\delta_{j(k-1)} \big( e^{\sum_{l=1}^{k-2} \sigma_l} \big) F_1\bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})}\bigg)^2- \delta_{jk} \big( e^{\sum_{l=1}^{k-1} \sigma_l} \big) F_1. \end{multline} \end{lemma} \begin{proof} Below, we compute partial derivatives of ${{\ensuremath{\mathrm{s}}}}_k$ with respect to $F_1, {{\ensuremath{\mathrm{s}}}}_{k-1}$, and the entries of $\left.\underline{\bsigma}\right|_{k}$, from which the smoothness claimed follows immediately. To this end, we recall from \eqref{EFxi} and \ref{dHflux} that on $\ensuremath{\mathrm{Cyl}}_{[{{\ensuremath{\mathrm{s}}}}_{k-1}, {{\ensuremath{\mathrm{s}}}}_{k}]}$ \begin{align} \label{EHbump} {\widehat{\phi}} = {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1}) H\left[ (1+ \xi_{k-1}) \big( e^{\sum_{l=1}^{k-2}\sigma_l} \big) F_1; {{\ensuremath{\mathrm{s}}}}_{k-1} \right]. \end{align} For $H$ as in \eqref{EHbump} and using \eqref{EFxi}, we find \begin{align} \label{EFconstraint} F^{H}_-({{\ensuremath{\mathrm{s}}}}_{k}) = (1-\xi_{k}) \big( e^{\sum_{l=1}^{k-1}\sigma_l} \big) F_1. \end{align} Items \eqref{Msderiv}-\eqref{Msderiv2} then follow by using the chain rule to differentiate \eqref{EFconstraint} and Lemma \ref{LFmono} and both parts of \ref{LHmono} to calculate the partial derivatives of $F^H_-$. \end{proof} \begin{lemma}[Estimates for large $k$] \label{Lrldest} For all $(F, \underline{\bsigma} ) \in S_{k+1}\setminus S_{k+2} $ with $|\boldsymbol{\sigma}|_{\ell^1}$ bounded and $|{\boldsymbol{\xi}}|_{\ell^\infty}< 1/10$, the RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[F; \underline{\bsigma}]$ satisfies the following, where $C$ denotes constants depending only on an upper bound of $|\boldsymbol{\sigma}|_{\ell^1}$. \begin{enumerate}[label=\emph{(\roman*)}] \item $F_1 \Sim_{C} \frac{1}{k}$ and ${{\ensuremath{\mathrm{s}}}}_k < \frac{1}{2} \log Ck$. \item For $2\leq i \leq k$ we have $\frac{1}{C k } < {{\ensuremath{\mathrm{s}}}}_{i}-{{\ensuremath{\mathrm{s}}}}_{i-1} <C$ and $\left| \log \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_i)}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{i-1})}\right| < \frac{C}{k}$. \item $\big\| 1- {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}) : C^0\big( \ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}_k]} \big) \big\| < \frac{C}{k}\log k$. \end{enumerate} \end{lemma} \begin{proof} By Lemma \ref{LFmono} we conclude that the maximum of $|F^{{\widehat{\phi}}}_-|$ is achieved at the jump latitudes. Using also \ref{rsigbij} we conclude (where $\underline{E}\,$ in \ref{rsigbij} depends only on an upper bound of $|\boldsymbol{\sigma}|_{\ell^1}$ by the hypotheses) that \begin{align} \label{EFcomp} \max_{{{\ensuremath{\mathrm{s}}}}\in[0,l)} |F^{{\widehat{\phi}}}_-({{\ensuremath{\mathrm{s}}}})| = \max_{i=1}^{k+1} {F^{\widehat{\phi}}_{i\pm}} \Sim_{ \underline{E}\, } \min_{i=1}^{k+1}{ F^{\widehat{\phi}}_{i\pm}}. \end{align} Since ${\widehat{\phi}}$ has $k+1$ jumps, we may argue as in the proof of \ref{Pexist}, and by using also \eqref{EFcomp} and \ref{AV2} \begin{align} \label{EfVest} \frac{1}{\underline{E}\,} F_1 < F^{\widehat{\phi}}_{k+} < F^{\phi_{\mathrm{end}}}_+({{\ensuremath{\mathrm{s}}}}_k) < C e^{-2{{\ensuremath{\mathrm{s}}}}_k }. \end{align} By using Lemma \ref{LFmono} on $\ensuremath{\mathrm{Cyl}}_{[ 0, {{\ensuremath{\mathrm{s}}}}_1]}, \dots, \ensuremath{\mathrm{Cyl}}_{ [{{\ensuremath{\mathrm{s}}}}_{k-1}, {{\ensuremath{\mathrm{s}}}}_k]}$ and summing, we find \begin{align} \label{Emostfluxes} F^{\widehat{\phi}}_{1-}+ F^{\widehat{\phi}}_{1+}+ \cdots + F^{\widehat{\phi}}_{k-} = \int_{0}^{{{\ensuremath{\mathrm{s}}}}_k} V({{\ensuremath{\mathrm{s}}}}) + \big( F^{\widehat{\phi}}_-({{\ensuremath{\mathrm{s}}}})\big)^2 \, d{{\ensuremath{\mathrm{s}}}}. \end{align} Next using \ref{RLquant}, \eqref{EFcomp}, and \eqref{EfVest} to estimate \eqref{Emostfluxes}, we find \begin{align} \label{Efavg} \frac{1}{\underline{E}\,} \int_0^{{{\ensuremath{\mathrm{s}}}}_k} V({{\ensuremath{\mathrm{s}}}}) d{{\ensuremath{\mathrm{s}}}} < (2k-1)F_1 < \underline{E}\, \big(\| V\|_{L^1(\ensuremath{\mathrm{Cyl}}_I)}+ \underline{E}\,{{\ensuremath{\mathrm{s}}}}_k (F^{\phi_{\mathrm{end}}}_+({{\ensuremath{\mathrm{s}}}}_k))^2\big) \end{align} from which we conclude using \ref{AV2} the first part of (i) and then by \eqref{EfVest} and \ref{AV2} the rest of (i). For (ii), \ref{LFmono}(ii) and the mean value theorem imply that for some ${{\ensuremath{\mathrm{s}}}}' \in ({{\ensuremath{\mathrm{s}}}}_{i-1}, {{\ensuremath{\mathrm{s}}}}_i)$, \begin{align} {{\ensuremath{\mathrm{s}}}}_{i}- {{\ensuremath{\mathrm{s}}}}_{i-1} = \frac{F^{\widehat{\phi}}_{i-1+} + F^{{\widehat{\phi}}}_{i-}}{V({{\ensuremath{\mathrm{s}}}}') + (F^{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}'))^2}. \end{align} Estimating a trivial upper bound for $V$, using (i) and \eqref{EFcomp} gives the first inequality in the first part of (ii), and using that $\frac{1}{V({{\ensuremath{\mathrm{s}}}}')} \le \frac{C}{V({{\ensuremath{\mathrm{s}}}}_k)}$ and using \eqref{EfVest} and \ref{AV2}, we conclude ${{\ensuremath{\mathrm{s}}}}_i - {{\ensuremath{\mathrm{s}}}}_{i-1} \le C$. Using then Definition \ref{dF} and part (i), we have \begin{align*} \left| \log \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_i)}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{i-1})}\right| \leq \int_{{{\ensuremath{\mathrm{s}}}}_{i-1}}^{{{\ensuremath{\mathrm{s}}}}_i} \big|F^{\widehat{\phi}}_+({{\ensuremath{\mathrm{s}}}})\big| d{{\ensuremath{\mathrm{s}}}} \leq \frac{C}{k}\int_{{{\ensuremath{\mathrm{s}}}}_{i-1}}^{{{\ensuremath{\mathrm{s}}}}_i} d{{\ensuremath{\mathrm{s}}}} \leq \frac{C}{k}, \end{align*} which completes the proof of (ii), and (iii) follows similarly. \end{proof} \begin{corollary}[Estimates for the derivatives of ${{\ensuremath{\mathrm{s}}}}_k$] \label{Csderiv} If ${\widehat{\phi}} = {\widehat{\phi}}[F; \underline{\bsigma}]$ is an RLD solution as in \ref{Pexist}, $\boldsymbol{\sss} = \boldsymbol{\sss}^{{\widehat{\phi}}[F;\underline{\bsigma}]}$, $(F, \left. \underline{\bsigma}\right|_{k+1}) \in S_{k+1}$ (recall \ref{Sk}), and $|{\boldsymbol{\xi}}|_{\ell^\infty}<\min(\frac{1}{10}, \frac{1}{k})$, the following estimates hold, where $C$ depends only on an upper bound of $|\boldsymbol{\sigma}|_{\ell^1}$. \begin{enumerate}[label=\emph{(\roman*)}] \item $ \big( V( {{\ensuremath{\mathrm{s}}}}_{k}) + \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial F_1} \Sim_C k$. \ \item $ \left| \big( V( {{\ensuremath{\mathrm{s}}}}_{k} )+ \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial \sigma_i }\right| < C $, $i=1, \dots, k-1$. \item $ \left|\big( V( {{\ensuremath{\mathrm{s}}}}_{k}) + \big(F^{\widehat{\phi}}_{k-}\big)^2\big)\frac{ \partial {{\ensuremath{\mathrm{s}}}}_{k}}{ \partial \xi_j} \right| < \frac{C}{k} $, $j=1, \dots, k$. \end{enumerate} \end{corollary} \begin{proof} We first prove (i). To simplify notation in this proof, we denote \begin{equation*} \begin{gathered} P_k := \big( V( {{\ensuremath{\mathrm{s}}}}_k )+ \big( F^{\widehat{\phi}}_{k-}\big)^2\big) \frac{ \partial {{\ensuremath{\mathrm{s}}}}_k}{\partial F_1}, \quad Q_{k-1} := \bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k-1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_k)}\bigg)^2, \quad R_k := \frac{ V( {{\ensuremath{\mathrm{s}}}}_k) + \big( F^{\widehat{\phi}}_{k+}\big)^2}{ V( {{\ensuremath{\mathrm{s}}}}_k) + \big( F^{\widehat{\phi}}_{k-}\big)^2}, \\ T_{k-1} := Q_{k-1} (1+ \xi_{k-1}) \big( e^{\sum_{l=1}^{k-2} \sigma_l} \big) + (1- \xi_{k}) \big( e^{\sum_{l=1}^{k-1} \sigma_l} \big). \end{gathered} \end{equation*} In this notation, \eqref{Msderiv} from Lemma \ref{Lsderiv} is equivalent to the equation \begin{align} \label{Esderivrec} P_k = R_{k-1} Q_{k-1}P_{k-1} + T_{k-1} \end{align} from which we conclude by applying \eqref{Msderiv} recursively \begin{align} \label{Epk} P_k = P_1 \prod_{i=1}^{k-1} Q_i R_i + \sum_{i=1}^{k-1} \bigg( T_i \prod_{j=i+1}^{k-1} Q_j R_j\bigg). \end{align} From \eqref{Msderiv0} it follows that $P_1 = 1 - \xi_1$. By \ref{rsigbij}, \ref{Lrldest}, and the assumptions, the following estimates hold: \begin{align} \label{Eqrest} Q_i \Sim_{1+ C/k} 1, \quad R_i \Sim_{1+C/k} 1, \quad T_i \Sim_C 1, \qquad i=1, \dots, k-1. \end{align} Combining \eqref{Eqrest} with \eqref{Epk} completes the proof of (i). Proofs of (ii) and (iii) are similar and use respectively \eqref{Msderiv2} and \eqref{Msderiv3} in place of \eqref{Msderiv}, so we omit the details. \end{proof} \subsection*{Smooth at the ends RLD solutions} $\phantom{ab}$ We say an RLD solution $\phi$ is \emph{smooth at the ends} if $F^\phi_{k+} = F^{{\phi_{\mathrm{end}}}}_+({{\ensuremath{\mathrm{s}}}}^\phi_k)$. We are particularly interested in RLD solutions that are smooth at the ends. We now introduce a unified notation for smooth at the ends RLD solutions in terms of their flux ratios and total number of parallel circles $k_{\mathrm{\circ}}$: \begin{lemma}[RLD solutions {${\widehat{\phi}}[\underline{\bsigma}: k_{\mathrm{\circ}}]$}] \label{Nphik} Given $k_{\mathrm{\circ}}\in \mathbb{N}$ with $k_{\mathrm{\circ}} \geq k_{\circ}^{\mathrm{min}}$ (recall \ref{Dkmin}) and $\underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}}) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$, $k := \lceil k_{\mathrm{\circ}}/2\rceil$, satisfying $|{\boldsymbol{\xi}}|_{\ell^\infty} < 1$ and $\xi_1 = 0$ if $k_{\mathrm{\circ}}$ is odd, there is a unique, smooth at the ends, unit RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[ \underline{\bsigma} : k_{\mathrm{\circ}}]$ satisfying $k_{\mathrm{\circ}} [ \boldsymbol{\sss}^{\widehat{\phi}}] = k_{\mathrm{\circ}}$ and $\underline{\bsigma}^{\widehat{\phi}} = \underline{\bsigma}$. \end{lemma} \begin{proof} Recall from Proposition \ref{Pexist} that ${\widehat{\phi}}[F; \underline{\bsigma}]$ has $k\geq k_{\mathrm{min}}^{\mathrm{ev}}$ jump latitudes precisely when $F \in [a_{k, \underline{\bsigma}}, a_{k-1, \underline{\bsigma}})$ and from \ref{Pexist2} that ${\widecheck{\phi}}[F; \underline{\bsigma}]$ has $k \geq k_{\mathrm{min}}^{\mathrm{odd}}$ jump latitudes when $F \in [b_{k, \underline{\bsigma}}, b_{k-1, \underline{\bsigma}})$. By the flux monotonicity, \ref{Pexist}(i), and \ref{Pexist2}(i), there exist unique $\widetilde{a}_{k, \underline{\bsigma}} \in [a_{k, \underline{\bsigma}}, a_{k-1, \underline{\bsigma}})$ for all $k\geq k_{\mathrm{min}}^{\mathrm{ev}}$ such that ${\widehat{\phi}}[ \widetilde{a}_{k, \underline{\bsigma}} ; \underline{\bsigma}]$ is smooth at the ends, and unique $\widetilde{b}_{k, \underline{\bsigma}}\in [b_{k, \underline{\bsigma}}, b_{k-1, \underline{\bsigma}})$ for all $k\geq k_{\mathrm{min}}^{\mathrm{odd}}$ such that ${\widehat{\phi}}[\widetilde{b}_{k, \underline{\bsigma}}; \underline{\bsigma}]$ is smooth at the poles. To complete the proof, we need only show that $\{2k_{\mathrm{min}}^{\mathrm{ev}}, 2k_{\mathrm{min}}^{\mathrm{odd}}-1\}$ is a set of consecutive natural numbers. For this, first consider $\underline{\bsigma} = ({\boldsymbol{0}}, {\boldsymbol{0}})$ and the smooth-at-the ends RLD solution ${\widecheck{\phi}} = {\widecheck{\phi}}[\widetilde{b}_{k_{\mathrm{min}}^{\mathrm{odd}}, \underline{\bsigma}}; \underline{\bsigma}]$. For $\xi$ close to $1$, define $\underline{\bsigma}' = ({\boldsymbol{0}}, (\xi, 0, \dots))$ and the RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[ (1-\xi) \widetilde{b}_{k_{\mathrm{min}}^{\mathrm{odd}}, \underline{\bsigma}}; \underline{\bsigma}']$, which satisfies $F^{\widehat{\phi}}_1 = \widetilde{b}_{k_{\mathrm{min}}^{\mathrm{odd}}, \underline{\bsigma}} = F^{{\widecheck{\phi}}}_1$ and $F^{\widehat{\phi}}_{i\pm} = F^{{\widecheck{\phi}}}_{i\pm}$ for all $i>1$ such that both of the preceding are defined. On the other hand, by choosing $\xi$ close enough to $1$, we can ensure that $F^{{\widehat{\phi}}}_{1-} = (1-\xi)\widetilde{b}_{k_{\mathrm{min}}^{\mathrm{odd}}, \underline{\bsigma}}$ is as small as desired. By \ref{LFmono} and \ref{LHmono}, it follows that for $\xi$ close enough to $1$, $k_{\mathrm{\circ}}[\boldsymbol{\sss}^{\widehat{\phi}}] = 2k_{\mathrm{min}}^{\mathrm{odd}}$. An analogous argument shows that we can find an RLD solution ${\widecheck{\phi}}$ with $k_{\mathrm{\circ}}[\boldsymbol{\sss}^{{\widecheck{\phi}}}] = 2k_{\mathrm{min}}^{\mathrm{ev}}+1$, and these two assertions complete the proof. \end{proof} \begin{remark} In the case that $I = \mathbb{R}$, it may be the case that $\widetilde{a}_{k, \underline{\bsigma}} = a_{k, \underline{\bsigma}}$, as was the case for example in \cite[Prop. 3.14]{kapmcg}. If $I$ is a finite interval however, compactness guarantees that $\widetilde{a}_{k, \underline{\bsigma}} > a_{k, \underline{\bsigma}}$. \end{remark} \begin{figure}[h] \centering \begin{tikzpicture}[ declare function={ func(\s)= (\s <-1.377)*(-1.084*tanh(\s))+ and(\s >=-1.377, \s < -.744)*(.430*(1-\s*tanh(\s)) - 1.187*tanh(\s))+ and(\s >=-.744, \s < -.399)*( .746*(1-\s*tanh(\s)) - .922*tanh(\s))+ and(\s >=-.399, \s < -.127)*( .936*(1-\s*tanh(\s)) - .495*tanh(\s))+ and(\s >=-.127, \s < .127)*( 1-\s*tanh(\s))+ and(\s >=.127, \s < .399)*( .936*(1-\s*tanh(\s)) + .495*tanh(\s))+ and(\s >=.399, \s < .744)*( .746*(1-\s*tanh(\s)) + .922*tanh(\s))+ and(\s >=.744, \s < 1.377)*(.430*(1-\s*tanh(\s)) + 1.187*tanh(\s))+ (\s >= 1.377)*(1.084*tanh(\s)) ; func2(\s)= (\s<-1.30746)*(-1.13*tanh(\s))+ and(\s >=-1.30746, \s < -.661002)*( .49433*(1-\s*tanh(\s))-1.20*tanh(\s))+ and(\s >=-.661002, \s < -.29855)*( .830575*(1-\s*tanh(\s))-.8322*tanh(\s))+ and(\s >=-.29855, \s <=0)*( 1-\s*tanh(\s)-.29427*tanh(\s))+ and(\s >=0, \s <=.29855)*( 1-\s*tanh(\s)+.29427*tanh(\s))+ and(\s >=.29855, \s < .661002)*( .830575*(1-\s*tanh(\s))+.8322*tanh(\s))+ and(\s >=.661002, \s < 1.30746)*( .49433*(1-\s*tanh(\s))+1.20*tanh(\s))+ (\s >= 1.30746)*(1.13*tanh(\s)) ; } ] \begin{axis}[ legend pos=outer north east, axis x line=middle, axis y line=left, ymin=.9, ymax=1.15, ytick={.9, 1, 1.1}, ylabel=$y$, xmin=-2, xmax=2, xtick={-2, -1, 0,1, 2}, xticklabels={$-2$, $-1$, $0$, $1$, $2$}, xlabel=${{\ensuremath{\mathrm{s}}}}$, ylabel=, samples=450 ] \addplot[black, thick, domain=-2:2, ]{func(x)}; \addlegendentry{${\widehat{\phi}}[\underline{\bsigma}:8]$} \addplot[black, thick, dashed, domain=-2:2, ]{func2(x)}; \addlegendentry{${\widehat{\phi}}[\underline{\bsigma}: 7]$} \end{axis} \end{tikzpicture} \caption{Profiles of RLD solutions ${\widehat{\phi}}[\underline{\bsigma}:7]$ and ${\widehat{\phi}}[\underline{\bsigma}:8]$ with respectively $7$ and $8$ parallel circles. In each case $\underline{\bsigma} = {\boldsymbol{0}}$ and $V = 2\operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}$, corresponding to the case where $\Sigma$ is an equatorial $\mathbb{S}^2$ in $\mathbb{S}^3$.} \end{figure} \begin{convention} \label{conkcir} Hereafter, we assume $k_{\mathrm{\circ}} \in \mathbb{N}$ with $k_{\mathrm{\circ}}\geq k_{\circ}^{\mathrm{min}}$ is given, and define $k\in\mathbb{N}$ by $k = \lceil k_{\mathrm{\circ}}/2 \rceil$, i.e. $k_{\mathrm{\circ}} = 2k$ if $k_{\mathrm{\circ}}$ is even and $k_{\mathrm{\circ}} = 2k-1$ if $k_{\mathrm{\circ}}$ is odd. \end{convention} \begin{lemma}[Characterization of low $k_{\circ}^{\mathrm{min}}$] \label{Rk1} $\phantom{ab}$ \begin{enumerate}[label=\emph{(\roman*)}] \item $k_{\circ}^{\mathrm{min}} = 1$ if and only if ${\phi_{\mathrm{end}}}>0$ on $\ensuremath{\mathrm{Cyl}}_{[0, l)}$. \item $k_{\circ}^{\mathrm{min}} = 2$ if and only if for some ${{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}\geq 0$, ${\phi_{\mathrm{end}}} > 0$ on $({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}, l)$, ${\phi_{\mathrm{end}}}({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}) =0$ and ${\phi_{\mathrm{even}}}>0$ on $(0, {{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}]$. \item $k_{\circ}^{\mathrm{min}} \geq 3$ if and only if for some $0< {{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{even}}}}_{\mathrm{root}} < {{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}$, ${\phi_{\mathrm{end}}}>0$ on $({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}, l)$, ${\phi_{\mathrm{end}}}({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{end}}}_{\mathrm{root}}) = 0$, ${\phi_{\mathrm{even}}}> 0$ on $(0, {{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{even}}}_{\mathrm{root}})$, and ${\phi_{\mathrm{even}}}( {{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{even}}}_{\mathrm{root}}) =0$. \end{enumerate} \end{lemma} \begin{proof} We first prove (i). If ${\phi_{\mathrm{end}}}> 0$ on $\ensuremath{\mathrm{Cyl}}_{[0, l)}$, then clearly the function on $C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}}^{(0)})$ defined by ${{\ensuremath{\mathrm{s}}}} \mapsto {\phi_{\mathrm{end}}}(|{{\ensuremath{\mathrm{s}}}}|)$ is an RLD solution with $k_{\mathrm{\circ}} = 1$, so $k_{\circ}^{\mathrm{min}} = 1$. Conversely, if $k_{\circ}^{\mathrm{min}} = 1$, then in the notation of \ref{Pexist2}(ii), ${\widecheck{\phi}}[F; \underline{\bsigma}]$ has only one jump latitude for $F \in [b_{1, \underline{\bsigma}}, b_{0, \underline{\bsigma}})$. By the flux monotonicity \ref{LFmono} there is a unique $F$ in this interval such that ${\widecheck{\phi}}[F; \underline{\bsigma}]({{\ensuremath{\mathrm{s}}}}) = {\phi_{\mathrm{end}}}(|{{\ensuremath{\mathrm{s}}}}|)$. By \ref{RL}(i), it follows that ${\phi_{\mathrm{end}}} >0$ on $\ensuremath{\mathrm{Cyl}}_{[0, l)}$. The proofs of (ii)-(iii) are straightforward from \ref{LFmono}, so we omit the details. \end{proof} \begin{remark} \label{Rtorrld} If $\Sigma$ is a torus, recall from \ref{LAconf} that ${\underline{\mathsf{S}}}$ fixes the two equatorial circles $\widetilde{X}_\Sigma(\ensuremath{\mathrm{Cyl}}_0)$ and $\widetilde{X}_\Sigma(\ensuremath{\mathrm{Cyl}}_l)$. Up to redefining $\widetilde{X}_\Sigma$, we could interchange the role of which equatorial circle $\ensuremath{\mathrm{Cyl}}_0$ maps to, which would interchange the roles of ${\phi_{\mathrm{even}}}$ and ${\phi_{\mathrm{end}}}$. This would lead to slightly different classes of RLD solutions; in particular if either ${\phi_{\mathrm{even}}}>0$ or ${\phi_{\mathrm{end}}}> 0$ on $\ensuremath{\mathrm{Cyl}}_{[0,l)}$, we would have $k_{\circ}^{\mathrm{min}} = 1$ with respect to at least one of these choices (recall \ref{Rk1}(i)). It would also be possible (recall Remark \ref{RLcard}(ii)) to consider an expanded class of RLD solutions which have jumps on both equators, although we have not considered this case for the sake of simplicity. \end{remark} \begin{prop} \label{PODEest} Suppose ${\widehat{\phi}} = {\widehat{\phi}}[ \underline{\bsigma}: k_{\mathrm{\circ}}]$ and ${\widehat{\phi}}' = {\widehat{\phi}}[ \underline{\bsigma}': k_{\mathrm{\circ}}]$ are as in \ref{Nphik}, where $\underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}})\in \mathbb{R}^{k-1}\times \mathbb{R}^k , \underline{\bsigma}'= (\boldsymbol{\sigma}', {\boldsymbol{\xi}}') \in \mathbb{R}^{k-1}\times \mathbb{R}^k$ satisfy $ |{\boldsymbol{\xi}}|_{\ell^\infty}< \min(\frac{1}{10}, \frac{1}{k})$, $|{\boldsymbol{\xi}}'|_{\ell^\infty}< \min(\frac{1}{10}, \frac{1}{k})$. There is a constant $C>0$ depending only on an upper bound of $|\boldsymbol{\sigma}|_{\ell^1}$ and $|\boldsymbol{\sigma}'|_{\ell^1}$ such that \[ \left| \underline{\Fbold}^{{\widehat{\phi}}'} - \underline{\Fbold}^{\widehat{\phi}} \right|_{\ell^\infty} \le \frac{C}{k}\left( | \boldsymbol{\sigma}' - \boldsymbol{\sigma}|_{\ell^1}+ |{\boldsymbol{\xi}}' - {\boldsymbol{\xi}}|_{\ell^\infty}\right).\] \end{prop} \begin{proof} Observe that the conclusion follows from the estimate \begin{align} \label{Efluxdiff1} \left| F^{{\widehat{\phi}}'}_1 - F^{{\widehat{\phi}}}_1 \right| \le \frac{C}{k}\left( |\boldsymbol{\sigma}' - \boldsymbol{\sigma} |_{\ell^1} + |{\boldsymbol{\xi}}' - {\boldsymbol{\xi}}|_{\ell^\infty}\right), \end{align} since for any $i\in \{1, \dots, k\}$ we have (taking $+$ or $-$ in every instance of $\pm$ below) \begin{align*} \left| F^{{\widehat{\phi}}'}_{i\pm} - F^{\widehat{\phi}}_{i\pm}\right| &= \left| (1\pm \xi'_i ) \big( e^{\sum_{l=1}^{i-1}\sigma'_l} \big) F^{{\widehat{\phi}}'}_1 - (1\pm \xi_i) \big( e^{\sum_{l=1}^{i-1}\sigma_l} \big) F^{\widehat{\phi}}_{1}\right| \\ &\le \, \left| (1 \pm \xi'_i) \big( e^{\sum_{l=1}^{i-1}\sigma'_l} \big) - (1 \pm \xi_i) \big( e^{\sum_{l=1}^{i-1}\sigma_l} \big) \right| \, F^{{\widehat{\phi}}'}_1+ (1 \pm \xi_i) \big( e^{\sum_{l=1}^{i-1}\sigma_l} \big) \left| F^{{\widehat{\phi}}'}_1 - F^{{\widehat{\phi}}}_1\right| . \end{align*} We now prove \eqref{Efluxdiff1}. Fix $k\in \mathbb{N}$ and consider the map defined by \begin{equation} \label{EFcal} \begin{aligned} {\mathcal{F}} ( F_1, \underline{\bsigma} ) := & F^{{\widehat{\phi}}[ F; \underline{\bsigma}]}_+ \big({{\ensuremath{\mathrm{s}}}}_k^{{\widehat{\phi}}[ F; \underline{\bsigma}]} \big) - F^{{\phi_{\mathrm{end}}}}_+ \big({{\ensuremath{\mathrm{s}}}}_k^{{\widehat{\phi}}[ F; \underline{\bsigma}]} \big) \\ = & (1+ \xi_k) \big( e^{\sum_{l=1}^{k-1} \sigma_l} \big) F_1 - F^{{\phi_{\mathrm{end}}}}_+ \big({{\ensuremath{\mathrm{s}}}}_k^{{\widehat{\phi}}[ F; \underline{\bsigma}]} \big) , \end{aligned} \end{equation} where ${\widehat{\phi}}[ F; \underline{\bsigma}]$ is as in \ref{Pexist} and the second equality uses \eqref{EFxi}. Clearly, ${\mathcal{F}} ( F_1, \underline{\bsigma}) = 0$ if and only if ${\widehat{\phi}}[ F; \underline{\bsigma}] $ is smooth at the poles. Now let ${(F_1, \bsigmaunder)} \in {\mathcal{F}}^{-1}\left(\{0\}\right)$ be arbitrary. It follows from Lemma \ref{LFmono} and \ref{LHmono} that ${\mathcal{F}}$ is $C^1$; below we estimate the partial derivatives of ${\mathcal{F}}$ at ${(F_1, \bsigmaunder)}$. Differentiating \eqref{EFcal} with respect to $F_1$ and using \ref{LFmono}, we compute \begin{align} \label{EFF1} \left. \frac{ \partial {\mathcal{F}} }{ \partial F_1}\right |_{{(F_1, \bsigmaunder)}} &= (1+ \xi_k) \big( e^{\sum_{l=1}^{k-1} \sigma_l} \big) + \big( V( {{\ensuremath{\mathrm{s}}}}_k) + \big(F^{\widehat{\phi}}_{k+}\big)^2\big) \left.\frac{ \partial {{\ensuremath{\mathrm{s}}}}_k}{\partial F_1}\right|_{{(F_1, \bsigmaunder)}}, \end{align} and similarly the derivatives with respect to $\sigma_i$ and $\xi_j$. By combining with Corollary \ref{Csderiv}, we estimate that for $j\in \{1, \dots, k\}$ and $i\in \{1, \dots, k-1\}$, \begin{align} \label{EF1deriv} \left.\frac{\partial {\mathcal{F}}}{\partial F_1}\right|_{{(F_1, \bsigmaunder)}} \Sim_C k, \qquad \left| \left.\frac{\partial {\mathcal{F}}}{\partial \sigma_i}\right|_{{(F_1, \bsigmaunder)}} \right| \le C, \qquad \left|\left. \frac{\partial {\mathcal{F}}}{\partial \xi_j}\right|_{{(F_1, \bsigmaunder)}} \right| \le \frac{C}{k}, \end{align} where $C>0$ is a constant independent of $k$. By the implicit function theorem, ${\mathcal{F}}^{-1}\left(\{ 0 \} \right)$ is a graph of a function of $\underline{\bsigma}$ in the vicinity of any given $(F_1, \underline{\bsigma}) \in {\mathcal{F}}^{-1}\left( \{0\}\right)$, and moreover (abusing notation slightly), for $i\in \{1, \dots, k-1\}$ and $j\in \{1, \dots, k\}$, \begin{equation} \label{Eift} \begin{aligned} \left.\frac{\partial F_1}{\partial \sigma_i}\right|_{\underline{\bsigma}} = - \bigg(\left. \frac{ \partial {\mathcal{F}}}{ \partial F_1}\right|_{{(F_1, \bsigmaunder)}}\bigg)^{-1} \left.\frac{ \partial {\mathcal{F}} }{ \partial \sigma_i}\right|_{{(F_1, \bsigmaunder)}}, \qquad \left.\frac{\partial F_1}{\partial \xi_j} \right|_{\underline{\bsigma}} = - \bigg( \left.\frac{ \partial {\mathcal{F}}}{ \partial F_1}\right|_{{(F_1, \bsigmaunder)}}\bigg)^{-1}\left. \frac{ \partial {\mathcal{F}} }{ \partial \xi_j}\right|_{{(F_1, \bsigmaunder)}}. \end{aligned} \end{equation} The conclusion follows by combining this with the estimates \eqref{EF1deriv}. \end{proof} \section{LD solutions from RLD solutions} \label{S:LDs} \subsection*{Basic facts} $\phantom{ab}$ \nopagebreak Given $\underline{m} \in \mathbb{Z}\setminus \{ 0\} $, we define a scaled metric ${\widetilde{\chi}} = {\widetilde{\chi}}[\underline{m}]$ on $\ensuremath{\mathrm{Cyl}}$ and scaled coordinates $(\, {\widetilde{{{\ensuremath{\mathrm{s}}}}}}[\underline{m}], {\widetilde{\theta}}[\underline{m}]\, )$ defined by \begin{align} \label{Echitilde} {\widetilde{\chi}}:= \underline{m}^2 \chi, \qquad {\widetilde{{{\ensuremath{\mathrm{s}}}}}} =| \underline{m} |{{\ensuremath{\mathrm{s}}}}, \qquad {\widetilde{\theta}} =| \underline{m} |\theta. \end{align} We also define corresponding a scaled linear operator \begin{equation} \begin{aligned} {\mathcal{L}}_{{\widetilde{\chi}}[\underline{m}]}: = \Delta_{{\widetilde{\chi}}} + \underline{m}^{-2} V = \underline{m}^{-2} {\mathcal{L}_\chi}. \end{aligned} \end{equation} \begin{definition} \label{dchi} Given $\underline{{{\ensuremath{\mathrm{s}}}}} \in \mathbb{R}_+$ and $\underline{m} \in \mathbb{Z}\setminus \{0\}$, we define a shifted coordinate ${{\widehat{\sss}}} = {{\widehat{\sss}}}\, [{\underline{\sss}}, \underline{m}]$ by \[{{\widehat{\sss}}} := {\widetilde{{{\ensuremath{\mathrm{s}}}}}} - |\underline{m}|\, \underline{{{\ensuremath{\mathrm{s}}}}} = |\underline{m}| \, ({{\ensuremath{\mathrm{s}}}}-\underline{{{\ensuremath{\mathrm{s}}}}}) .\] \end{definition} \begin{definition} \label{dOmega} Given $\underline{m} \in \mathbb{Z}\setminus \{0\}$, we define \begin{align} \label{Edelta} \delta[\underline{m}] := 1/(9|\underline{m}|). \end{align} Given $\underline{{{\ensuremath{\mathrm{s}}}}}$, $\boldsymbol{\sss}$, and $\boldsymbol{m}$ as in \ref{dLmbold}, for $i=1, \dots, k$ we define $\delta_i := \delta[m_i]$ and define nested open sets $D^\chi_{L[\underline{{{\ensuremath{\mathrm{s}}}}};\underline{m}]}(3\delta[\underline{m}]) \subset \Omega'[\underline{{{\ensuremath{\mathrm{s}}}}};\underline{m}]\subset \Omega[\underline{{{\ensuremath{\mathrm{s}}}}};\underline{m}]$, where \begin{align*} \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}] : = D^{\chi[\underline{m}]}_{{L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]}\left(3/|\underline{m} |\right) = D^{{\widetilde{\chi}}[\underline{m}]}_{{L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]}\left(3\right),\\ \Omega'[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}] := D^{\chi[\underline{m}]}_{{L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]}\left(2/|\underline{m}|\right) = D^{{\widetilde{\chi}}[\underline{m}]}_{{L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]}\left(2\right). \end{align*} We also define $\Omega[\boldsymbol{\sss}; \boldsymbol{m}] : = \bigcup_{i=1}^k \Omega[{{\ensuremath{\mathrm{s}}}}_i; m_i]$ and $\Omega'[\boldsymbol{\sss}; \boldsymbol{m}]: = \bigcup_{i=1}^k \Omega'[{{\ensuremath{\mathrm{s}}}}_i; m_i]$. \end{definition} \begin{figure}[h] \centering \begin{tikzpicture}[scale=.65] \draw[-, dashed, black] (-7, -3) to (7, -3); \draw[-, dashed, black] (-7, -2) to (7, -2); \draw[-, dashed, black] (-7, -1/2) to (7, -1/2); \draw[-, dashed, black] (-7, 0) to (7, 0); \draw[-, dashed, black] (-7, 1/2) to (7, 1/2); \draw[-, dashed, black] (-7, 2) to (7, 2); \draw[-, dashed, black] (-7, 3) to (7, 3); \draw[-, thick] (-4, -1.25) node[]{${L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]$}; \draw[-, thick] (0, 1.25) node[]{$D^\chi_{{L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]}(3\delta)$}; \draw[-, thick] (8, 0) node[]{$\Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}]$}; \draw[-, thick] (4, 1.25) node[]{$\Omega'[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}]$}; \draw[->, thick] (-4, -1) to (-4, 0); \draw[-, thick] (0, .7) to (0, 0) to (1/2, 0) to (1/2, .4); \draw[-, thick] (.3, .4) to (.7, .4); \draw[-, thick] (1/2, 0) to (1/2, -.4) to (.3, -.4) to (.7, -.4); \draw[-, thick] (8, -3) to (8, -1/2); \draw[-, thick] (8, .5) to (8, 3); \draw[-, thick] (7.8, 3) to (8.2, 3); \draw[-, thick] (7.8, -3) to (8.2, -3); \draw[-, thick] (4, .8) to (4, -1.9); \draw[-, thick] (4, 1.9) to (4, 1.5); \draw[-, thick] (3.8, -1.9) to (4.2, -1.9); \draw[-, thick] (3.8, 1.9) to (4.2, 1.9); \end{tikzpicture} \caption{A schematic of connected components of the neighborhoods of ${L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}]$ (defined in \ref{dOmega}) near latitude $\underline{{{\ensuremath{\mathrm{s}}}}}$.} \end{figure} \begin{definition}[Antisymmetry operators] \label{Dantisym} Given a domain $\Omega \subset \ensuremath{\mathrm{Cyl}}$ satisfying ${\underline{\mathsf{S}}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}(\Omega) = \Omega$ for some $\underline{{{\ensuremath{\mathrm{s}}}}} \in \mathbb{R}$ (recall \ref{Dgroup}), we define operators ${\mathcal{R}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}$ and ${\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}$, each acting on real-valued functions defined on $\Omega$, by ${\mathcal{R}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} u = u \circ {\underline{\mathsf{S}}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}$ and ${\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} u = u - {\mathcal{R}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} u$. \end{definition} \begin{lemma} \label{Rprod} Let $\underline{{{\ensuremath{\mathrm{s}}}}} \in (\frac{3}{\underline{m}}, \infty)$ and $\underline{m} \in \mathbb{Z} \setminus \{ 0\}$. The following hold: \begin{enumerate}[label=\emph{(\roman*)}] \item For all $u, v \in C^0(\Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}])$, $ {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}\left( u v\right) = u \, {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} v + {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} u \, {\mathcal{R}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} v . $ \item For all $u \in C^2(\Omega[\underline{{{\ensuremath{\mathrm{s}}}}};\underline{m}])$, $[{\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}, {\mathcal{L}}_{\widetilde{\chi}} ] u = \underline{m}^{-2} {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} V \, {\mathcal{R}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} u $. \item For any domain $\Omega \subset \ensuremath{\mathrm{Cyl}}_I$, we have $\left\| V: C^j\left( \Omega , \chi\right) \right\| \le C(j) \left \| V : C^0\left(\Omega, \chi \right)\right\|$. \item $\left\| {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} V: C^j\left( \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}], \chi \, \right)\right\| \le \frac{C(j)}{|\underline{m}|} V(\underline{{{\ensuremath{\mathrm{s}}}}}) $. \end{enumerate} \end{lemma} \begin{proof} (i) follows from a straightforward computation, and (ii) follows from (i) and a similar computation, using the fact that $\Delta$ commutes with ${\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}}$. (iii) follows from \ref{AV1}. (iv) is a discrete version of (iii) which follows from the mean value theorem and (iii). \end{proof} \begin{lemma}[Green's functions {\cite[Lemma 2.28]{kapmcg}}] \label{Lgreen} There exists $\epsilon>0$ depending only on $V$ such that for any $p\in \ensuremath{\mathrm{Cyl}}$, there exists a Green's function $G^\chi_p$ for ${\mathcal{L}_\chi}$ on $D^\chi_p(\epsilon)$ satisfying: \begin{align*} \left\| G^{\chi}_p - \log r : C^j( D^\chi_p(\epsilon) \setminus \{p\}, r, \chi, r^2|\log r|)\right| \leq C(j), \quad{where} \quad r = {\mathbf{d}}^{\chi}_p. \end{align*} \end{lemma} \begin{proof} This follows from \ref{Lgreenlog} and \ref{AV1}. \end{proof} \begin{definition}[{\cite[Definition 2.21]{kapmcg}}] \label{dauxode} Given $a,b,c\in\mathbb{R}$ and $\underline{{{\ensuremath{\mathrm{s}}}}} \in \mathbb{R}_+$, we define (recall \ref{Dlpar}) \begin{equation*} \begin{aligned} {\underline{\phi}}={\underline{\phi}} [a,b;\underline{{{\ensuremath{\mathrm{s}}}}}]\in \,\, C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}\big( \, \ensuremath{\mathrm{Cyl}}^{(0)} \,\big ), \quad {\underline{j}}={\underline{j}}\big[c\, ;\underline{{{\ensuremath{\mathrm{s}}}}}\big]\in \,\, C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}\big( \ensuremath{\mathrm{Cyl}}^{(0, \underline{{{\ensuremath{\mathrm{s}}}}})} \,\big) \end{aligned} \end{equation*} by requesting they satisfy the initial data $$ {\underline{\phi}}(\underline{{{\ensuremath{\mathrm{s}}}}})=a, \qquad \partial {\underline{\phi}} (\underline{{{\ensuremath{\mathrm{s}}}}}) = b , \qquad {\underline{j}}(\underline{{{\ensuremath{\mathrm{s}}}}})=0, \qquad \partial_{+}{\underline{j}}(\underline{{{\ensuremath{\mathrm{s}}}}})=\partial_{-}{\underline{j}}(\underline{{{\ensuremath{\mathrm{s}}}}})=c, $$ and the ODEs ${\mathcal{L}_\chi} {\underline{\phi}}=0$ on $\ensuremath{\mathrm{Cyl}}^{(0)}$, and ${\mathcal{L}_\chi} {\underline{j}}=0$ on $\ensuremath{\mathrm{Cyl}}^{(0, \underline{{{\ensuremath{\mathrm{s}}}}})}$. \end{definition} \begin{remark} \label{Rauxode} Note that ${\underline{\phi}}$ depends linearly on the pair $(a, b)\in \mathbb{R}^2$ and ${\underline{j}}$ depends linearly on $c \in \mathbb{R}$. \qed \end{remark} \begin{lemma}[{\cite[Lemma 2.23]{kapmcg}}] \label{Lode} For all $\underline{m}\in \mathbb{N}$ large enough and $\underline{{{\ensuremath{\mathrm{s}}}}} \in (\frac{3}{\underline{m}}, \infty)$, the following estimates hold (recall \ref{Nsym}). \begin{enumerate}[label=\emph{(\roman*)}] \item $\left\| \, {\underline{\phi}}[1, 0 ;\underline{{{\ensuremath{\mathrm{s}}}}}] -1 \, : \, C_{|{{\ensuremath{\mathrm{s}}}}|}^{j}( \, \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}]\,,{\widetilde{\chi}}[\underline{m}] \, )\, \right\|\, \le \, C(j)/\underline{m}^2$. \item $\left\| \, {\underline{j}}[\underline{m};\underline{{{\ensuremath{\mathrm{s}}}}}] - |\, {{\widehat{\sbar}}} \, | \, : \, C_{|{{\ensuremath{\mathrm{s}}}}|}^{j}( \, \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}] \setminus {L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}] \,,{\widetilde{\chi}}[\underline{m}] \, ) \, \right\| \, \le \, C(j)/\underline{m}^2\, $. \item $\left\| \, {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} \, {\underline{\phi}}[1, 0 ;\underline{{{\ensuremath{\mathrm{s}}}}}] \, : C_{|{{\ensuremath{\mathrm{s}}}}|}^{j}( \, \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}]\, , {\widetilde{\chi}}[\underline{m}] \, ) \, \right\|\le \, C(j)/\underline{m}^3$. \item $\left\| \, {\mathcal{A}}_{\underline{{{\ensuremath{\mathrm{s}}}}}} \, {\underline{j}}[\underline{m};\underline{{{\ensuremath{\mathrm{s}}}}}] \, : \, C_{|{{\ensuremath{\mathrm{s}}}}|}^{j}( \, \Omega[\underline{{{\ensuremath{\mathrm{s}}}}}; \underline{m}] \setminus {L_{\mathrm{par}}}[\underline{{{\ensuremath{\mathrm{s}}}}}] \,,{\widetilde{\chi}}[\underline{m}] \, ) \, \right\| \, \le \, C(j)/\underline{m}^3 $. \end{enumerate} \end{lemma} \begin{proof} The proof is an ODE comparison argument which is only superficially different than the proof of \cite[Lemma 2.23]{kapmcg}---here we use properties of $V$ established in \ref{Rprod} instead of properties of $2\operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}$ as in \cite{kapmcg}---so we omit the details. \end{proof} \subsection*{Maximally symmetric LD solutions from RLD solutions} $\phantom{ab}$ \nopagebreak For convenience and uniformity, we now identify $\ensuremath{\mathrm{Cyl}}_I$ with $X_\Sigma(\ensuremath{\mathrm{Cyl}}_I) \subset \Sigma$ (recall Remark \ref{Rcylid}), which allows us to study LD solutions on the cylinder instead of on $\Sigma$. \begin{definition} \label{davg} Given a function $\varphi$ on some domain $\Omega\subset \ensuremath{\mathrm{Cyl}}$ or $\Omega \subset \Sigma$, we define a rotationally invariant function $\varphi_{{\mathrm{avg}}}$ on the union $\Omega'$ of the $O(2)$ orbits on which $\varphi$ is integrable (whether contained in $\Omega$ or not), by requesting that on each such orbit $C$, \[\left. \varphi_{{\mathrm{avg}}} \right|_C :=\operatornamewithlimits{avg}_C\varphi.\] We also define $\varphi_{{\mathrm{osc}}}$ on $\Omega\cap\Omega'$ by $\varphi_{{\mathrm{osc}}}:=\varphi-\varphi_{{\mathrm{avg}}}$. \end{definition} \begin{lemma}[$\groupcyl$-Symmetric LD solutions, cf. {\cite[Lemma 3.10]{kap}}] \label{LsymLD} For $m\in\mathbb{N}$ large enough (depending only on $\Sigma$) the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\ker {\mathcal{L}}_\Sigma$ is trivial modulo the $\groupcyl$ action on $\Sigma$. \item Given a $\groupcyl$-invariant invariant configuration ${\boldsymbol{\tau}} : L\rightarrow \mathbb{R}$ there exists a unique $\groupcyl$-invariant LD solution $\varphi = \varphi[{\boldsymbol{\tau}}]$ of configuration ${\boldsymbol{\tau}}$. \end{enumerate} \end{lemma} \begin{proof} Item (i) follows from the triviality of $\ker {\mathcal{L}}_\Sigma$ modulo $\grouprotcyl$ in \ref{Aimm}, by taking $m$ large enough. Item (ii) follows from (i) and applying Lemma \ref{Lldexistence}. \end{proof} \begin{lemma}[Vertical balancing, {\cite[Lemma 4.5]{kapmcg}}] \label{Lvbal} Suppose $\varphi$ is an LD solution whose configuration ${\boldsymbol{\tau}}$ and singular set $L$ are $(\boldsymbol{\sss}, \boldsymbol{m})$-rotational as in \ref{dL}. Then the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\varphi_{{\mathrm{avg}}} \in C^\infty( \ensuremath{\mathrm{Cyl}}_I^{\boldsymbol{\sss}})$, where ${L_{\mathrm{par}}} = {L_{\mathrm{par}}}[\boldsymbol{\sss}]$. \item On $\ensuremath{\mathrm{Cyl}}^{\boldsymbol{\sss}}_I$, $\varphi_{{\mathrm{avg}}}$ satisfies the ODE ${\mathcal{L}_\chi} \varphi_{{\mathrm{avg}}} = 0$. \item \label{Evbal} $|m_i|\tau_i = \partial_+ \varphi_{{\mathrm{avg}}}({{\ensuremath{\mathrm{s}}}}_i) + \partial_- \varphi_{{\mathrm{avg}}} ({{\ensuremath{\mathrm{s}}}}_i), \quad i=1, \dots, k$. \end{enumerate} \end{lemma} \begin{proof} To prove (i) and (ii), we need to check that $\varphi$ is integrable on each circle contained in ${L_{\mathrm{par}}}$ and that $\varphi_{{\mathrm{avg}}}$ is continuous there also. But these follow easily from the logarithmic behavior of $\varphi$ (recall \ref{dLD}). We now prove item (iii). Fix $i\in \{1, \dots, k\}$. For $0<\epsilon_1 << \epsilon_2$ we consider the domain $\Omega_{\epsilon_1, \epsilon_2}: = D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(\epsilon_2)\setminus D^\chi_{L}(\epsilon_1)$. By integrating ${\mathcal{L}_\chi} \varphi = 0$ on $\Omega_{\epsilon_1, \epsilon_2}$ and integrating by parts we obtain \begin{align*} \int_{\partial \Omega_{\epsilon_1, \epsilon_2}} \frac{\partial}{\partial \eta} \varphi + \int_{\Omega_{\epsilon_1, \epsilon_2}} V \varphi = 0, \end{align*} where $\eta$ is the unit outward conormal field along $\partial \Omega_{\epsilon_1, \epsilon_2}$. By taking the limit as $\epsilon_1 \searrow 0$ first and then as $\epsilon_2 \searrow 0$, we obtain \ref{Evbal} by using the logarithmic behavior near $L$. \end{proof} \begin{lemma}[Normalized maximally symmetric LD solutions {$\Phi = \Phi\llceil\underline{\bsigma} : k_{\mathrm{\circ}}, \boldsymbol{m}\rrfloor$}] \label{Lphiavg} Given $k_{\mathrm{\circ}} \geq k_{\circ}^{\mathrm{min}}$ and $k$ as in \ref{conkcir}, $\boldsymbol{m} \in (\mathbb{Z} \setminus \{ 0 \})^k$ with $m$ (as in \ref{dL}) large enough as in \ref{LsymLD}, and $\underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}}) \in \mathbb{R}^{k-1}\times \mathbb{R}^k$ with $|{\boldsymbol{\xi}}|_{\ell^\infty}<1$, there is a unique $\groupcyl$-invariant LD solution $\Phi = \Phi \llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor $ characterized by the following requirements where $\bsigmaunder\mspace{.8mu}\!\!\!\! /=\bsigmaunder\mspace{.8mu}\!\!\!\! /[\boldsymbol{m}]$ is as in \ref{dLbalanced}. \begin{enumerate}[label=\emph{(\alph*)}] \item $\phi = \phi\llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor :=\Phi_{{\mathrm{avg}}}$ is a multiple of ${\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+ \underline{\bsigma}: k_{\mathrm{\circ}}]$ (recall \ref{Nphik}). \item The singular set of $\Phi$ is $L = L \llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor := L[\boldsymbol{\sss}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}:k_{\mathrm{\circ}}]; \boldsymbol{m}]$ (recall \ref{dL}). \item The configuration ${\boldsymbol{\tau}}' := {\boldsymbol{\tau}}' \llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor $ of $\Phi$ is a $(\, \boldsymbol{\sss}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}:k_{\mathrm{\circ}}] , \boldsymbol{m} \,)$-symmetric configuration as in \ref{dL} satisfying $\tau'_1 = 1$ (normalizing condition). \end{enumerate} Moreover, the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item For $i\in \{1, \dots, k\}$ we have $\tau_i' = \displaystyle{ \frac{\phi({{\ensuremath{\mathrm{s}}}}_i)}{|m_i|}2F^\phi_i}$. Moreover $\tau_i'$ is independent of $m$ and satisfies $\tau_i' = \tau_i' \llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor :=\displaystyle{\frac{{\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}: k_{\mathrm{\circ}}]({{\ensuremath{\mathrm{s}}}}_i)}{{\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}: k_{\mathrm{\circ}} ]({{\ensuremath{\mathrm{s}}}}_1)} \big( e^{\sum_{l=1}^{i-1}\sigma_l} \big)}$. \item $\displaystyle{\phi \llceil \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m} \rrfloor \, = \, \frac{|m_1|}{\, {\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}:k_{\mathrm{\circ}}]({{\ensuremath{\mathrm{s}}}}_1) \,\, 2F^{{\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}:k_{\mathrm{\circ}}]}_1\,}\, {\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}: k_{\mathrm{\circ}} ]}$. \item On $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]$, $\phi = {\underline{\phi}}_i + {\underline{j}}_i$, where ${\underline{\phi}}_i : = \tau'_i {\underline{\phi}} \big[\textstyle{\frac{|m_1|}{2F^\phi_1}}(e^{-\sum_{l=1}^{i-1} \sigma_l}), \textstyle{\frac{|m_i|}{ 2}}\xi_i; {{\ensuremath{\mathrm{s}}}}_i\big]$ and ${\underline{j}}_i := \, \, {\underline{j}} \left [\textstyle{\frac{|m_i| }{2}}\tau'_i; {{\ensuremath{\mathrm{s}}}}_i\right]$. \end{enumerate} \end{lemma} \begin{proof} Let $m$ be as in \ref{LsymLD} and suppose $\Phi$ is a $\groupcyl$-invariant LD solution satisfying (a)-(c). Let $c$ be such that $\phi=c{\widehat{\phi}}$ and $i\in \{1, \dots, k\}$. Using Lemma \ref{Lvbal} to solve for $\tau'_i$, we immediately conclude $\tau'_i = \phi({{\ensuremath{\mathrm{s}}}}_i) 2F^\phi_i /|m_i|$; furthermore using Lemma \ref{Lvbal}, (a)-(c) above, \eqref{Exi}, and the definition of $\bsigmaunder\mspace{.8mu}\!\!\!\! /$ in \ref{dLbalanced}, we compute \begin{equation*} \begin{aligned} \tau'_i &= \frac{\tau'_i}{\tau'_1} = \frac{|m_1|}{|m_i|} \frac{\phi({{\ensuremath{\mathrm{s}}}}_i)}{\phi({{\ensuremath{\mathrm{s}}}}_1)} \frac{F^\phi_i}{F^\phi_1} = \frac{|m_1|}{|m_i|} \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_i)}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_1)} \left( e^{\sum_{l=1}^{i-1} \sigma\mspace{.8mu}\!\!\!\! /_l + \sigma_l}\right) = \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_i)}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_1)} \left( e^{\sum_{l=1}^{i-1} \sigma_l}\right), \\ 1&= \tau'_1 = \frac{\phi({{\ensuremath{\mathrm{s}}}}_1)}{|m_1|} 2F^\phi_1 = \frac{c {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_1)}{|m_1|}2 F^{\widehat{\phi}}_1. \end{aligned} \end{equation*} We conclude from these equations that (a)-(c) imply (i) and (ii). In particular, the second equation in (i) determines ${\boldsymbol{\tau}}'$ and hence uniqueness follows from Lemma \ref{LsymLD}. To prove existence we define $L$ by (b) and ${\boldsymbol{\tau}}'$ by the second equation in (i). Using \ref{LsymLD} we then define $\Phi : = \varphi[{\boldsymbol{\tau}}']$ and we verify that $\Phi_{{\mathrm{avg}}} = c{\widehat{\phi}}$, where $c$ is defined by $c {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_1) 2F^{{\widehat{\phi}}}_1 = |m_1|$: Let $i\in\{1, \dots, k\}$. By Lemma \ref{Lvbal}, it follows that $|m_i| \tau'_i = 2\Phi_{{\mathrm{avg}}}({{\ensuremath{\mathrm{s}}}}_i) F^{\Phi_{{\mathrm{avg}}}}_i$. By the definitions of $\tau'_i$ and $c$, we have $|m_i| \tau'_i = c {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_i ) 2F^{\widehat{\phi}}_i$. Since $F^{\widehat{\phi}}_i = F^{c{\widehat{\phi}}}_i$, by equating the right hand sides of the preceding equations, we conclude that the function $f := c{\widehat{\phi}} - \Phi_{{{\mathrm{avg}}}}$ satisfies \begin{align} \partial_+f({{\ensuremath{\mathrm{s}}}}_i)+\partial_-f({{\ensuremath{\mathrm{s}}}}_i) = 0, \quad i=1, \dots, k. \end{align} This amounts to the vanishing of the derivative jumps of $f$ at each ${{\ensuremath{\mathrm{s}}}}_i$. Clearly $f$ is smooth at the ends and satisfies ${\mathcal{L}}_\chi f = 0$ in between the ${{\ensuremath{\mathrm{s}}}}_i$. Hence we conclude $f\in C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}(\Sigma)$ and satisfies ${\mathcal{L}}_\Sigma f = 0$ everywhere. By \ref{Aimm}(iv), we conclude $f = 0$. It remains to check (iii). By \eqref{Evbal}, $m_i \tau'_{i} = \partial_+ \phi({{\ensuremath{\mathrm{s}}}}_i) + \partial_-\phi({{\ensuremath{\mathrm{s}}}}_i)$, so from the definition of ${\underline{j}}$ in \ref{dauxode}, \[ \partial_+{\underline{j}}_i ({{\ensuremath{\mathrm{s}}}}_i) = \partial_-{\underline{j}}_i ({{\ensuremath{\mathrm{s}}}}_i)= \frac{\partial_+\phi+\partial_-\phi}{2}({{\ensuremath{\mathrm{s}}}}_i). \] Therefore, $\phi - {\underline{j}}_i$ satisfies \begin{align*} \partial_+ (\phi - {\underline{j}}_i)({{\ensuremath{\mathrm{s}}}}_i) = \frac{ \partial_+ \phi - \partial_- \phi}{2}({{\ensuremath{\mathrm{s}}}}_i) = - \partial_-(\phi - {\underline{j}}_i)({{\ensuremath{\mathrm{s}}}}_i). \end{align*} Hence, $\phi - {\underline{j}}_i\in C^1_{{{\ensuremath{\mathrm{s}}}}}\left(\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]\right)$ and ${\mathcal{L}}_\chi(\phi-{\underline{j}}_i) = 0$. By uniqueness of ODE solutions, $\phi - {\underline{j}}_i = {\underline{\phi}}_i$. Finally, the expressions for ${\underline{\phi}}_i$ and ${\underline{j}}_i$ follow from this, (i) above, \eqref{Exi}, \ref{Rauxode}, and \ref{dLbalanced}. \end{proof} \subsection*{Decomposition and estimates of LD solutions $\Phi = \Phi\llceil\underline{\bsigma} : k_{\mathrm{\circ}}, \boldsymbol{m}\rrfloor$} $\phantom{ab}$ \nopagebreak We now decompose and estimate a $\Phi = \Phi\llceil\underline{\bsigma} : k_{\mathrm{\circ}}, \boldsymbol{m}\rrfloor$ as in \ref{Lphiavg}. In order to get good estimates, we assume the following. \begin{assumption} \label{Amk} We assume that $m$ may be taken as large as needed in terms of $k$. \end{assumption} \begin{notation} Consider a function space $X$ consisting of functions defined on a domain $\Omega \subset \ensuremath{\mathrm{Cyl}}$. If $\Omega$ is invariant under the action of $\mathscr{G}_{|\underline{m}|}$ for some $\underline{m} \in \mathbb{Z}\setminus \{0\}$ (recall \ref{dHcyl}), we use a subscript ``$\mathrm{sym}[\underline{m}]$'' to denote the subspace $X_{\mathrm{sym}[\underline{m}]}\subset X$ consisting of those functions $f\in X$ which are invariant under the action of $\mathscr{G}_{|\underline{m}|}$. \end{notation} \begin{definition}[A decomposition $\Phi = {\widehat{G}}+ {\widehat{\Phi}}+\Phi'$] \label{ddecomp} Define ${\widehat{\Phi}} \in C^{\infty}_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}}_I )$ and for $i\in \{1, \dots, k\}$ define ${\widehat{G}}_i \in C^{\infty}_{\mathrm{sym}[m_i]} \left(\ensuremath{\mathrm{Cyl}}_I \setminus L_i\right)$ by requesting \begin{equation*} \begin{gathered} {\widehat{G}}_i = \tau'_i {\boldsymbol{\Psi}}[2\delta_i, 3\delta_i; {\mathbf{d}}^\chi_{p}]( G^\chi_{p} - {\underline{\phi}}[ \log \delta_i,0; {{\ensuremath{\mathrm{s}}}}_i], 0) \quad \text{on } \quad D^\chi_{p}(3\delta_i), \quad \forall p \in L[{{\ensuremath{\mathrm{s}}}}_i;m_i], \\ {\widehat{\Phi}} = {\boldsymbol{\Psi}}\left[ \textstyle{\frac{2}{|m_i|}}, \textstyle{\frac{3}{|m_i|}}; {\mathbf{d}}^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}\right] \big( {\underline{\phi}}_i, \phi\big) = \phi - {\boldsymbol{\Psi}}\left[ \textstyle{\frac{2}{|m_i|}}, \textstyle{\frac{3}{|m_i|}}; {\mathbf{d}}^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}\right] \big({\underline{j}}_i, 0\big) \quad \text{on} \quad \Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i], \end{gathered} \end{equation*} (recall \ref{dOmega}, \ref{Lphiavg}(iii)), and that ${\widehat{\Phi}} = \phi$ on $\ensuremath{\mathrm{Cyl}}_I \setminus \Omega[\boldsymbol{\sss}; \boldsymbol{m}]$. Define also $\Phi' \in C^\infty_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}_I)$, ${\widehat{G}} \in C^\infty(\ensuremath{\mathrm{Cyl}}_{I}\setminus L)$ by ${\widehat{G}} = \sum_{i=1}^k {\widehat{G}}_i$ and for $i=1, \dots, k$, $E'_i \in C^\infty_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}}_I)$ by requesting that \begin{align*} \Phi={\widehat{G}}+{\widehat{\Phi}}+\Phi' \quad \text{on} \quad \ensuremath{\mathrm{Cyl}}_I \setminus L, \qquad E'_i=-{\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \big( {\widehat{G}}+ {\widehat{\Phi}}\big) \quad \text{on} \quad \Omega[{{\ensuremath{\mathrm{s}}}}_i ;m_i]. \end{align*} Finally, we define $E' \in C^\infty_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}_I)$ by $E' = \sum_{i=1}^k E'_i$. \end{definition} We estimate the average and oscillatory parts of $\Phi$ separately. The decomposition $\Phi = {\widehat{G}}+ {\widehat{\Phi}} + \Phi'$ is designed so that $\Phi'$ is small in comparison to ${\widehat{\Phi}}$ (cf. Proposition \ref{LPhip} below). To estimate $\Phi'$ we will first need to makes some further decompositions of its average and oscillatory parts. Note first that we have $\Phi'_{{\mathrm{avg}}} , \Phi'_{{\mathrm{osc}}}, E'_{{\mathrm{avg}}}, E'_{{\mathrm{osc}}} \in C^\infty(\ensuremath{\mathrm{Cyl}}_I)$ and \begin{align} \label{ELW} \Phi'= \Phi'_{{{\mathrm{avg}}}} + \Phi'_{{{\mathrm{osc}}}}, \quad E'=E'_{{{\mathrm{avg}}}}+E'_{{{\mathrm{osc}}}} ,\quad \end{align} We have the following characterization of $\Phi'_{{{\mathrm{avg}}}}$. \begin{lemma} \label{LPhipave} $\Phi'_{{\mathrm{avg}}}$ is supported on $\Omega[\boldsymbol{\sss};\boldsymbol{m}]$. Moreover, $\Phi'_{{{\mathrm{avg}}}} = \sum_{i=1}^k \Phi'_{i, {{\mathrm{avg}}}}$ where $\Phi'_{i, {{\mathrm{avg}}}}$ is supported on $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]$ and satisfies \begin{align} \label{Ephipavg} \Phi'_{i, {{\mathrm{avg}}}} = \begin{cases} {\boldsymbol{\Psi}}\left[ \frac{2}{|m_i|}, \frac{3}{|m_i|}; {\mathbf{d}}^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}\right] \big( {\underline{j}}_i, 0 \big) , \quad \text{on} \quad \Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]\setminus \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]\\ {\underline{j}}_i -({\widehat{G}}_i)_{{{\mathrm{avg}}}}, \quad \text{on} \quad \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]. \end{cases} \end{align} Moreover, ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \Phi'_{i, {{\mathrm{avg}}}}= E'_{i, {{\mathrm{avg}}}}: = (E'_i)_{{{\mathrm{avg}}}}$. \end{lemma} \begin{proof} Taking averages of $\Phi = {\widehat{G}} + {\widehat{\Phi}} + \Phi'$ and rearranging establishes $ \Phi'_{{\mathrm{avg}}} = \phi - {\widehat{\Phi}} - {\widehat{G}}_{{\mathrm{avg}}}$. Applying ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]}$ to both sides of this decomposition and using the definition of $E'_i$ in \ref{ddecomp} establishes ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \Phi'_{i, {{\mathrm{avg}}}}= E'_{i, {{\mathrm{avg}}}}$. Finally, \eqref{Ephipavg} follows from the decomposition $\Phi'_{{\mathrm{avg}}} = \phi - {\widehat{\Phi}} - {\widehat{G}}_{{\mathrm{avg}}}$ by substituting the expression for ${\widehat{\Phi}}$ from \ref{ddecomp} and using that ${\widehat{G}}_i = 0$ on $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]\setminus \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$. \end{proof} In order to decompose $\Phi'_{{{\mathrm{osc}}}}$ we will need the following lemma. \begin{lemma}[cf. {\cite[Lemma 5.23]{kap}}] \label{Lsol} Given $E\in C^{0,\beta}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}}_I)$ with $E_{{\mathrm{avg}}}\equiv 0$ and $E$ supported on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$ for some $i\in \{1, \dots, k\}$, there is a unique $u \in C^{2,\beta}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}})$ solving $ {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} u = E $ and satisfying the following. \begin{enumerate}[label=\emph{(\roman*)}] \item $u_{{\mathrm{avg}}}=0$. \item $ \left \|u: C^{2, \beta}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}[m_i], e^{-\frac{|m_i|}{2}\left| |{{\ensuremath{\mathrm{s}}}}| - {{\ensuremath{\mathrm{s}}}}_i \right|} )\right\| \leq C \big \| E: C^{0, \beta}_{\mathrm{sym}[m_i]}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i]\,\big)\big\|.$ \item $\big\|{\Acal_{\sss_i}\!} u:C^{2,\beta}_{\mathrm{sym}[m_i]}(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)\, ,{\widetilde{\chi}}[m_i] \, )\big\| \le \frac{C}{m_i^2} \big\| E : C_{\mathrm{sym}[m_i]}^{0,\beta }(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i] \, )\big \| \\ \phantom{k} \hfill +C\big\| {\Acal_{\sss_i}\!} E: C_{\mathrm{sym}[m_i]}^{0,\beta }(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta)\, ,{\widetilde{\chi}}[m_i] \, )\big\|.$ \end{enumerate} \end{lemma} \begin{proof} The existence and uniqueness of $u$ is clear, and (i) follows since ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} u= E_{{\mathrm{avg}}} = 0$. For (ii), let $u_1$ be the solution on $\ensuremath{\mathrm{Cyl}}$ of $\Delta_{{\widetilde{\chi}}[m_i]} u_1 = E$, subject to the condition that $u_1 \rightarrow 0 $ as ${{\ensuremath{\mathrm{s}}}} \rightarrow \pm \infty$. By standard theory and separation of variables, we have \begin{align*} \big\| u_1 : C^{2, \beta}_{\mathrm{sym}{[m_i]}}(\ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}[m_i], e^{-\frac{|m_i|}{2} | |{{\ensuremath{\mathrm{s}}}}| - {{\ensuremath{\mathrm{s}}}}_i |}\big)\big \| \le C \big\| E: C^{0, \beta}_{\mathrm{sym}[m_i]}\big(D^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i]\big)\big\|. \end{align*} Note that $(u_1)_{{\mathrm{avg}}}$ clearly vanishes. Define now inductively a sequence $(u_j)_{j\in \mathbb{N}}$, $u_j\in C^{2, \beta}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}})$ by requesting that for each $j\geq 2$, $\Delta_{{\widetilde{\chi}}[m_i]} u_j = - m_i^{-2} V u_{j-1}$ and $u_j\rightarrow 0$ as ${{\ensuremath{\mathrm{s}}}} \rightarrow \pm \infty$. Estimating $u_j$ in the same fashion used to estimate $u_1$, we have for $i\geq 2$ \begin{align*} \big\| u_j : C^{2, \beta}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}[m_i], e^{-\frac{|m_i|}{2} | |{{\ensuremath{\mathrm{s}}}}| - {{\ensuremath{\mathrm{s}}}}_i |}\big)\big \| \le C m_i^{-2} \big\| u_{j-1}: C^{0, \beta}_{\mathrm{sym}[m_i]}\big(D^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i]\big)\big\|. \end{align*} Note now that $u = \sum_{j=1}^\infty u_j$, and the estimates above imply (i). Applying ${\Acal_{\sss_i}\!}$ to both sides of the equation ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]}u = E$ and using Lemma \ref{Rprod}(ii), we obtain \begin{align*} {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \, {\Acal_{\sss_i}\!} \, u = {\Acal_{\sss_i}\!} E - m_i^{-2} {\Acal_{\sss_i}\!} V \, \mathcal{R}_{\sss_i}\! u . \end{align*} Although ${\Acal_{\sss_i}\!} \, E- m_i^{-2} {\Acal_{\sss_i}\!} \, V \, \mathcal{R}_{\sss_i}\! u$ is not supported on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$, it has average zero, so a straightforward modification of the argument proving (ii) by replacing the assumption that the inhomogeneous term is compactly supported with the assumption (from (ii) above) that the right hand side has exponential decay away from $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta)$, we conclude that \begin{multline*} \big\| {\Acal_{\sss_i}\!}\, u: C^{2, \beta}_{\mathrm{sym}[m_i]} \big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i) , {\widetilde{\chi}}[m_i]\, \big)\big\| \le C\big\| {\Acal_{\sss_i}\!}\, E: C^{0, \beta}_{\mathrm{sym}[m_i]} \big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i) , {\widetilde{\chi}}[m_i]\, \big)\big \| + \\ + C\big\|m_i^{-2} {\Acal_{\sss_i}\!} \, V \mathcal{R}_{\sss_i}\! u: C^{0, \beta}_{\mathrm{sym}[m_i]} \big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i) , {\widetilde{\chi}}[m_i]\, \big)\big \|. \end{multline*} (iii) follows after using \eqref{E:norm:mult}, Lemma \ref{Rprod}(iv), and part (i) above to estimate the last term. \end{proof} For each $i=1,\dots, k$, recall from \ref{ddecomp} that $E'_{i, {{\mathrm{osc}}}}: = (E'_i)_{{{\mathrm{osc}}}}$ is supported on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$. With this and Lemma \ref{Lsol} in mind, we make the following decompositions. When $\Sigma$ is a torus (so $\ensuremath{\mathrm{Cyl}}_I\ne\ensuremath{\mathrm{Cyl}}$, recall \ref{LAconf}) we must lift all of our functions to $\mathsf{S}_{2l}$-invariant functions on $\ensuremath{\mathrm{Cyl}}$. Our decompositions of $E'_{{{\mathrm{osc}}}}$ and $\Phi'_{{{\mathrm{osc}}}}$ in \ref{Deosc} are modified when $\ensuremath{\mathrm{Cyl}}_I$ is a strict subset of $\ensuremath{\mathrm{Cyl}}$ to reflect this feature. \begin{definition} \label{Deosc} For $i=1, \dots, k$ and when $\ensuremath{\mathrm{Cyl}}_I = \ensuremath{\mathrm{Cyl}}$ we define and $\Phi'_{i,{{\mathrm{osc}}}} \in C^{\infty}_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}})$ by requesting that \begin{align*} \sum_{i=1}^k \Phi'_{i,{{\mathrm{osc}}}} = \Phi'_{{\mathrm{osc}}}, \quad {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \, \Phi'_{i,{{\mathrm{osc}}}} = E'_{i,{{\mathrm{osc}}}}. \end{align*} When $I=(-l, l)$ is a finite subinterval of $\mathbb{R}$, we define $\widetilde{E}'_{i,{{\mathrm{osc}}}}, \widetilde{\Phi}'_{{{\mathrm{osc}}}} \in C^\infty_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}})$ and for $i=1, \dots,k$ and $j\in \mathbb{Z}$ functions $\widetilde{E}'_{i,j,{{\mathrm{osc}}}},\widetilde{\Phi}'_{i,j,{{\mathrm{osc}}}} \in C^\infty_{\mathrm{sym}[m_i]}(\ensuremath{\mathrm{Cyl}})$ by requesting that $\widetilde{E}'_{i,j,{{\mathrm{osc}}}}$ is supported on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i + 2lj]}(3\delta_i)$ and that \begin{align*} \widetilde{E}'_{i,{{\mathrm{osc}}}} = \sum_{j\in \mathbb{Z}} E'_{i,{{\mathrm{osc}}}} \circ \mathsf{S}^j_{2l} = \sum_{j\in \mathbb{Z}} \widetilde{E}'_{i,j,{{\mathrm{osc}}}}, \quad \widetilde{\Phi}'_{i,{{\mathrm{osc}}}} = \sum_{j\in \mathbb{Z}}\widetilde{\Phi}'_{{{\mathrm{osc}}}, i,j}, \quad {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \widetilde{\Phi}'_{i, j,{{\mathrm{osc}}}} = \widetilde{E}'_{i, j,{{\mathrm{osc}}}}. \end{align*} \end{definition} Note that the functions $\Phi'_{{{\mathrm{osc}}}, i}$ (or $\widetilde{\Phi}'_{{{\mathrm{osc}}}, i, j}$) are well-defined by Lemma \ref{Lsol}. We are now ready to begin estimating $\Phi'$. We will estimate $\Phi'_{{{\mathrm{avg}}}}$ and $\Phi'_{{{\mathrm{osc}}}}$ separately, by estimating each $\Phi'_{i, {{\mathrm{avg}}}}$ and $\Phi'_{i, {{\mathrm{osc}}}}$ in the decompositions (when $\ensuremath{\mathrm{Cyl}}_I = \ensuremath{\mathrm{Cyl}}$) $\Phi'_{{{\mathrm{avg}}}} = \sum_{i=1}^k \Phi'_{i, {{\mathrm{avg}}}}$, $\Phi'_{{{\mathrm{avg}}}} = \sum_{i=1}^k \Phi'_{i, {{\mathrm{osc}}}}$ (recall \ref{LPhipave} and \ref{Deosc}). To estimate $\Phi'_{i, {{\mathrm{avg}}}}$ and $\Phi'_{i, {{\mathrm{osc}}}}$ we will use that they satisfy the equations ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \Phi'_{i, {{\mathrm{avg}}}} = E'_{i, {{\mathrm{avg}}}}$ and ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \Phi'_{i, {{\mathrm{osc}}}} = E'_{i, {{\mathrm{osc}}}}$. First we establish relevant estimates for $E'_i, E'_{i, {{\mathrm{avg}}}}$ and $E'_{i, {{\mathrm{osc}}}}$. \begin{lemma} \label{LEest} For each $i=1, \dots, k$, $E'_i$ vanishes on $D^\chi_{L_i}(2\delta_i)$ and $E'_{i, {{\mathrm{osc}}}}$ is supported on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$. The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\big \|{\widehat{G}}_i: C_{\mathrm{sym}[m_i]}^{j}( \, D^{\chi}_{L_i}(3 \delta_i) \setminus D^\chi_{L_i}(\delta_i)\,,{\widetilde{\chi}}[m_i] \, )\big\|\le C(j)\,$ \item $\big\| {\Acal_{\sss_i}\!} {\widehat{G}}_i : C_{\mathrm{sym}[m_i]}^j( D^\chi_{L_i}(3\delta_i)\setminus D^\chi_{L_i}(2\delta_i) \, , {\widetilde{\chi}}[m_i] \, ) \big\| \le C(j)/|m_i|$. \item $\left\|E'_i:C_{\mathrm{sym}[m_i]}^{j}( \Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i] ,{\widetilde{\chi}}[m_i] \, )\right\|\le C(j)\,$ \item $\big\|{\Acal_{\sss_i}\!} \, E'_i :C_{\mathrm{sym}[m_i]}^{j}( D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i) , {\widetilde{\chi}}[m_i] \, )\big\|\le C(j)/|m_i|\,$, for $i\in \{1, \dots, k\}$. \end{enumerate} In either (iii) or (iv), the same estimate holds if $E'_i$ is replaced with either $E'_{i,{{\mathrm{avg}}}}$ or $E'_{i,{{\mathrm{osc}}}}$. \end{lemma} \begin{proof} (i) follows from Lemma \ref{Lgreen}, Definition \ref{ddecomp}, and uniform bounds on the $\tau'_i$'s which follow from \ref{Lphiavg}(i) and \ref{Lrldest}(ii). For (ii), it suffices to prove for any $i=1, \dots, k$ and any $p \in L[{{\ensuremath{\mathrm{s}}}}_i; m_i]$ the estimate \begin{align*} \label{Egasymmetry} \big\| {\Acal_{\sss_i}\!} {\widehat{G}}_i : C^j( D^\chi_{p}(3\delta_i)\setminus D^\chi_{p}(2\delta_i), {\widetilde{\chi}}[m_i] \, )\big\| \le C(j)/|m_i|. \end{align*} By Definition \ref{ddecomp}, we have ${\Acal_{\sss_i}\!} {\widehat{G}}_i = (I)-(II)$ on $D^\chi_{p}(3\delta_i)\setminus D^\chi_{p}(2\delta_i)$, where \begin{equation} \label{EAG} \begin{aligned} (I) := & {\boldsymbol{\Psi}}[2\delta_i, 3\delta_i; {\mathbf{d}}^\chi_{p}](\tau'_i {\Acal_{\sss_i}\!} \, G^\chi_{p}, 0) , \\ (II) := & {\boldsymbol{\Psi}}[2\delta_i, 3\delta_i; {\mathbf{d}}^\chi_{p}]( \tau'_i {\Acal_{\sss_i}\!}\, {\underline{\phi}}[ \log \delta_i , 0; {{\ensuremath{\mathrm{s}}}}_i], 0). \end{aligned} \end{equation} From Lemma \ref{Lgreen} and the uniform bounds on the cutoff ${\boldsymbol{\Psi}}$, we have $\| (I): C^j( D^\chi_{p}(3\delta_i)\setminus D^\chi_{p}(2\delta_i) \, , {\widetilde{\chi}}[m_i] \, ) \| \le C(j)/|m_i|$. By Lemma \ref{Lode}(iii), $\| (II): C^j( D^\chi_{p}(3\delta_i)\setminus D^\chi_{p}(2\delta_i) \, , {\widetilde{\chi}}[m_i] \, ) \| \le C(j) |m_i|^{-3}\log |m_i|$, and these estimates complete the proof of (ii). The statements on the support of $E'_i$ and $E'_{i,{{\mathrm{osc}}}}$ follow from Definition \ref{ddecomp}, from which we also see that on $\Omega[{{\ensuremath{\mathrm{s}}}}_i; m_i]\setminus \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$, $E'_i= {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} {\boldsymbol{\Psi}}\big[ 2, 3; {\mathbf{d}}^{{\widetilde{\chi}}[m_i]}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}\big] \big( {\underline{j}}_i, 0 \big)$. Thus, when restricted to $\Omega[{{\ensuremath{\mathrm{s}}}}_i; m_i]\setminus \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$, the bound in (iii) follows from \ref{dauxode}, \ref{Lphiavg}(iii), and the uniform bounds of the cutoff. By \ref{ddecomp}, $E'_i$ vanishes on $\Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]\setminus D^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$. On $D^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$, note that ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} {\widehat{\Phi}}=0$. Since ${\mathcal{L}}_{\chi} {\widehat{G}}_i = 0$ on $D^{\chi}_{L}(2\delta_i)$, when restricted to $D^{\chi}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$, the required bound in (iii) follows from (i). For (iv), we have using \ref{ddecomp} that ${\Acal_{\sss_i}\!}\, E'_i = -{\Acal_{\sss_i}\!} \, {\mathcal{L}}_{{\widetilde{\chi}}[m_i]}\, {\widehat{G}}_i$ on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$. Since $E'_i$ vanishes on $D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(2\delta_i)$, it is only necessary to prove the estimate on the set difference. Using \ref{Rprod}(ii) to switch the order of ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]}$ and ${\Acal_{\sss_i}\!}$, we find that \begin{align*} {\Acal_{\sss_i}\!}\, E'_i = - {\mathcal{L}}_{{\widetilde{\chi}}[m_i]}\, {\Acal_{\sss_i}\!} \, {\widehat{G}}_i - m_i^{-2} {\Acal_{\sss_i}\!} \, V \, \mathcal{R}_{\sss_i}\! \, E'_i \quad \text{on} \quad D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3 \delta_i) \setminus D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(2\delta_i). \end{align*} Using (ii) to estimate the first term on the right and Lemma \ref{Rprod}(iv) and (iii) to estimate the second term, we obtain (ii). Finally, we can replace $E'_i$ by $E'_{i,{{\mathrm{avg}}}}$ or $E'_{i,{{\mathrm{osc}}}}$ in either (iii) or (iv) by taking averages and subtracting. \end{proof} \begin{lemma} \label{LavePhi} For each $i=1, \dots, k$, the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\| \Phi'_{i,{{\mathrm{avg}}}}: C^{j}_{|{{\ensuremath{\mathrm{s}}}}|}\left( \Omega[{{\ensuremath{\mathrm{s}}}}_i; m_i], {\widetilde{\chi}}[m_i]\,\right) \| \le C(j)$. \item For $i\in \{ 1, \dots, k\}$, $\big\|{\Acal_{\sss_i}\!} \Phi'_{i,{{\mathrm{avg}}}} : C^{j}_{|{{\ensuremath{\mathrm{s}}}}|}\big( D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i]\, \big)\big \| \le C(j)/|m_i|$. \end{enumerate} \end{lemma} \begin{proof} Fix $i\in \{1, \dots, k\}$. We first establish the estimate on $\Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$. By \eqref{Ephipavg}, \begin{align*} \Phi'_{i, {{\mathrm{avg}}}} = {\underline{j}} \left [\textstyle{\frac{|m_i|}{2}\tau'_i}; {{\ensuremath{\mathrm{s}}}}_i\right] -({\widehat{G}}_i)_{{{\mathrm{avg}}}} \quad \text{on} \quad \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]. \end{align*} Note that the left hand side is smooth and the discontinuities on the right hand side cancel. Using that ${\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \Phi'_{i,{{\mathrm{avg}}}} = E'_{i,{{\mathrm{avg}}}}$ from \eqref{ELW}, on $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m]$ we have (where ${{\widehat{\sss}}} = {{\widehat{\sss}}}\, [ {{\ensuremath{\mathrm{s}}}}_i, m_i]$ is as in \ref{dchi}) \begin{align} \label{Ephipode} \partial^2_{\,{{\widehat{\sss}}}} \Phi'_{i,{{\mathrm{avg}}}} + \frac{1}{|m_i|^2}V\left( \frac{{{\widehat{\sss}}}}{|m_i|}+ {{\ensuremath{\mathrm{s}}}}_i\right) \Phi'_{i,{{\mathrm{avg}}}} = E'_{i,{{\mathrm{avg}}}}. \end{align} On a neighborhood of $\partial \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$, we have that ${\widehat{G}}_{{\mathrm{avg}}} = 0$ from Definition \ref{ddecomp}. This combined with estimates on ${\underline{j}}$ from Lemma \ref{Lode} implies that $\left|\Phi'_{i,{{\mathrm{avg}}}}\right|<C$ and $\left| \partial_{\, {{\widehat{\sss}}}} \, \Phi'_{i,{{\mathrm{avg}}}}\right|<C$ on $\partial \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$. Using this as initial data for the ODE and bounds of the inhomogeneous term from Lemma \ref{LEest} yields the $C^2$ bounds in (i). Higher derivative estimates follow inductively from differentiating \eqref{Ephipode} and again using Lemma \ref{LEest}. This establishes (i) on $\Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$. The proof of the estimate (i) on $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]\setminus \Omega'[{{\ensuremath{\mathrm{s}}}}_i;m_i]$ follows in a similar way using \eqref{Ephipavg} but is even easier since there $({\widehat{G}}_i)_{{{\mathrm{avg}}}} = 0$, so we omit the details. As in the proof of (i), Proposition \ref{LPhipest}(iii) implies it is sufficient to prove the estimate in (ii) for $ {\Acal_{\sss_i}\!} \Phi'_{i,{{\mathrm{avg}}}}$. By \eqref{Ephipode} and Lemma \ref{Rprod}(ii), ${\Acal_{\sss_i}\!} \Phi'_{i,{{\mathrm{avg}}}}$ satisfies (recall \ref{dchi} for the relation of ${{\ensuremath{\mathrm{s}}}}$ and ${{\widehat{\sss}}}$) \begin{align} \label{Eu} {\mathcal{L}}_{{\widetilde{\chi}}[m_i]} \, {\Acal_{\sss_i}\!} \Phi'_{i,{{\mathrm{avg}}}} + \frac{1}{m_i^2}\, {\Acal_{\sss_i}\!} \, V \, \mathcal{R}_{\sss_i}\! \Phi'_{i,{{\mathrm{avg}}}} = {\Acal_{\sss_i}\!} \, E'_{i,{{\mathrm{avg}}}}. \end{align} The $C^2$ bounds in (ii) follow in a similar way as above, by using Lemma \ref{Lode}(iii)-(iv) to estimate the initial data on $\partial D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i)$, estimates on ${\Acal_{\sss_i}\!} E'_{i,{{\mathrm{avg}}}}$ from Lemma \ref{LEest}(iv), and estimates on ${\Acal_{\sss_i}\!}\, V$ and $\Phi'_{i,{{\mathrm{avg}}}}$ from Lemma \ref{Rprod}(iv) and (i) above. Higher derivative bounds follow inductively from differentiating \eqref{Eu} and using Lemma \ref{Rprod}(iv) and Lemma \ref{LEest}(iv). \end{proof} By combining Definition \ref{Deosc} with Lemma \ref{Lsol}, we get global estimates for $\Phi'_{{\mathrm{osc}}}$. \begin{lemma} \label{LPhipest} The following estimates hold. \begin{enumerate}[label=\emph{(\roman*)}] \item \begin{enumerate}[label=\emph{(\alph*)}] \item $\big\| \Phi'_{i,{{\mathrm{osc}}}} : C^{j}_{\mathrm{sym}[m_i]}\big( \ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}, e^{-m\left| |{{\ensuremath{\mathrm{s}}}}| - {{\ensuremath{\mathrm{s}}}}_i\right|}\big)\big\|\le C(j)$. \item $\big\| {\Acal_{\sss_i}\!} \Phi'_{i,{{\mathrm{osc}}}} : C^{j}_{\mathrm{sym}[m_i]}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}\, \big)\big\| \le C(j)/|m_i|$. \end{enumerate} \item $\left\| \Phi'_{{{\mathrm{osc}}}} : C^{j}_{\mathrm{sym}[m]}\big( \ensuremath{\mathrm{Cyl}}_I, {\widetilde{\chi}}\, \big)\right \| \le C(j).$ \item $\big\| {\Acal_{\sss_i}\!} \Phi'_{{\mathrm{osc}}} : C^{j}_{\mathrm{sym}[m]}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta_i), {\widetilde{\chi}}[m_i]\, \big)\big\| \le C(j)/|m_i|$. \end{enumerate} \end{lemma} \begin{proof} We first complete the proof in the case where $\ensuremath{\mathrm{Cyl}}_I = \ensuremath{\mathrm{Cyl}}$ and leave the modifications for the case where $l<\infty$ to the end. (i) follows directly from applying Lemma \ref{Lsol} to $E'_{i,{{\mathrm{osc}}}}$, using Lemma \ref{LEest} and Schauder regularity for the higher derivative estimates. For small $k$, (ii) follows from (i). On the other hand, Lemma \ref{Lrldest}(ii) implies that for all $i, j \in \{1, \dots, k\}$, $|{{\ensuremath{\mathrm{s}}}}_j - {{\ensuremath{\mathrm{s}}}}_i| > \frac{|j-i|}{Ck}$. Using this with part (i) above, we estimate \begin{align*} \left\| \Phi'_{{{\mathrm{osc}}}} : C^{j}_\mathrm{sym}\left( \ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}\,\right)\right \| &\le C(j) \sup_{{{\ensuremath{\mathrm{s}}}}\in \mathbb{R}} \sum_{i=1}^k e^{-m\left| |{{\ensuremath{\mathrm{s}}}}| - {{\ensuremath{\mathrm{s}}}}_i\right|} \\ &\leq C(j) \sum_{l=0}^{k-1} e^{- \frac{m}{Ck} l } \leq C(j), \end{align*} where we have used Assumption \ref{Amk}. This completes the proof of (ii). Now fix some $i\in \{1, \dots, k\}.$ As before, for $i, j \in \{1, \dots, k\}$, $|{{\ensuremath{\mathrm{s}}}}_j - {{\ensuremath{\mathrm{s}}}}_i| > \frac{|j-i|}{Ck}$. Using the definitions and (i) above, \begin{align*} \big\| {\Acal_{\sss_i}\!} \Phi'_{{\mathrm{osc}}} : C^{r}_\mathrm{sym}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta), {\widetilde{\chi}}\,\big)\big\| &\le \big\| { {\Acal_{\sss_i}\!} \Phi'_{{{\mathrm{osc}}}, i}: C^{r}_\mathrm{sym} \big( D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta), {\widetilde{\chi}}\, \big) } \big\| + \\ &\phantom{ikkkk} + \sum_{ j\neq i}\big \| {\Acal_{\sss_i}\!} \Phi'_{{{\mathrm{osc}}}, j} : C^{r}_\mathrm{sym}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta), {\widetilde{\chi}}\,\big)\big\| \\ &\leq \frac{C(r)}{m} + C(r)\sum_{ j\neq i}\big \| \Phi'_{{{\mathrm{osc}}}, j} : C^{r}_\mathrm{sym}\big(D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta), {\widetilde{\chi}}\,\big)\big\| \\ &\leq \frac{C(r)}{m} + C(r) \sum_{j\neq i} e^{-m\left| {{\ensuremath{\mathrm{s}}}}_j - {{\ensuremath{\mathrm{s}}}}_i\right|} \\ &\leq \frac{C(r)}{m}+ C(r) \sum_{l=1}^k e^{-\frac{m}{Ck}l } \qquad \leq \qquad \frac{C(r)}{m}, \end{align*} where we have used Assumption \ref{Amk}. Finally, when $l < \infty$, we use the exponential decay of each $\widetilde{\Phi}'_{{{\mathrm{osc}}}, i, j}$ away from ${L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i+2lj]$ to complete the proof. We omit the details. \end{proof} \begin{prop}[cf. {\cite[Proposition 4.18]{kapmcg}}] \label{LPhip} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\| \Phi': C^{j}_{\mathrm{sym}[m]}\left( \ensuremath{\mathrm{Cyl}}_I, {\widetilde{\chi}}\,\right) \| \le C(j)$. \item For $i\in \{ 1, \dots, k\}$, $\big\|{\Acal_{\sss_i}\!} \Phi' : C^{j}_{\mathrm{sym}[m]}\big( D^\chi_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_i]}(3\delta), {\widetilde{\chi}}\, \big)\big \| \le C(j)/\max_i|m_i|$. \end{enumerate} \end{prop} \begin{proof} Because of the estimates on $\Phi'_{{\mathrm{osc}}}$ established in Proposition \ref{LPhipest}(ii), it is enough to prove the estimate (i) for $\Phi'_{{\mathrm{avg}}}$, and this follows from \ref{LPhipave} and \ref{LavePhi}. \end{proof} \section{Families of LD solutions on $O(2)\times \mathbb{Z}_2$ symmetric backgrounds} \label{S:LDfamilies} \subsection*{The family of LD solutions} $\phantom{ab}$ \nopagebreak For the applications at hand, it will be convenient to use definitions of $\mathscr{K}[L]$ and $\widehat{\mathscr{K}}[L]$ (recall \ref{aK}) which exploit the symmetries of the problem. When $m_{\mathrm{max}}>m$, we will also need to consider LD solutions with more general singular sets than the ones studied in Section \ref{S:LDs}. \begin{definition}[The space {$\mathscr{V}_{\mathrm{sym}}[\widetilde{L}]$}] \label{dVal} Given $\widetilde{L} = \cup_{i=1}^k \widetilde{L}_i$ which is a small $\mathscr{G}_m$-symmetric perturbation of an $L = L[\boldsymbol{\sss};\boldsymbol{m}]$ as in \ref{dLmbold}, define the subspace $\mathscr{V}_{\mathrm{sym}}[\widetilde{L}]$ of $\mathscr{V}[\widetilde{L}]$ (recall \ref{DVcal}) consisting of elements equivariant under the obvious action of $\mathscr{G}_m$ on $\mathscr{V}[\widetilde{L}]$, an inner product $\langle \cdot, \cdot\rangle_{\mathscr{V}[\widetilde{L}]}$ by $\langle \cdot, \cdot\rangle_{\mathscr{V}[\widetilde{L}]}: = \sum_{p\in \widetilde{L}}\langle \cdot, \cdot\rangle_{\mathscr{V}[p]}$, where $\langle a+b d{{\ensuremath{\mathrm{s}}}} + c d\theta, d +e d{{\ensuremath{\mathrm{s}}}} + f d\theta \rangle_{\mathscr{V}[p]} := ad+ be+cf$ and a decomposition \begin{equation*} \begin{gathered} \mathscr{V}_{\mathrm{sym}}[\widetilde{L}] = \bigoplus_{i=1}^k \mathscr{V}_{\mathrm{sym}}[\widetilde{L}_i] = \bigoplus_{i=1}^k \mathscr{V}^\top[\widetilde{L}_i]\oplus \mathscr{V}^\perp[\widetilde{L}_i], \quad \text{where} \\ \mathscr{V}^\top[\widetilde{L}_i] : = \{ (a+ b \, d{{\ensuremath{\mathrm{s}}}})_{p\in \widetilde{L}_i} \in \mathscr{V}_{\mathrm{sym}}[\widetilde{L}_i] : a, b \in \mathbb{R} \} \end{gathered} \end{equation*} and $\mathscr{V}^\perp[\widetilde{L}_i]$ is the orthogonal complement of $\mathscr{V}^\top[\widetilde{L}_i]$ in $\mathscr{V}_{\mathrm{sym}}[\widetilde{L}_i]$. \end{definition} We will need to convert estimates on the cylinder---particularly those established for $\Phi$ in Section \ref{S:LDs}---into estimates on $\Sigma$ with the $g$ metric. Before doing this we need the following lemma, which compares the geometry induced by the metrics $\chi$ and $g$. \begin{lemma} \label{Lconf} Suppose $u\in C^j(\Omega)$ for a domain $\Omega \subset \ensuremath{\mathrm{Cyl}}$. Then \begin{align*} \| u : C^{j}(\Omega, e^{2\omega} \chi ) \| \le C(j) \| u : C^{j}(\Omega, \chi)\| ( 1+ \sup_{x\in \Omega} e^{-\omega})^j (1+ \| \omega : C^k(\Omega, \chi)\|)^j. \end{align*} \end{lemma} \begin{proof} In this proof we denote objects computed with respect to $g = e^{2\omega} \chi$ by a hat, so for example the Levi-Civita connection of $g$ is denoted by $\widehat{\nabla}$. Taking covariant derivatives of $\widehat{\nabla}^j u$ with respect to $g$, we find \begin{align*} (\widehat{\nabla}^j u)_{i_1\cdots i_j \hat{;} m} = (\widehat{\nabla}^j u)_{i_1\cdots i_j , m} - \sum_{s=1}^j (\widehat{\nabla}^j u )_{i_1 \cdots p\cdots i_j} \widehat{\Gamma}^p_{m i_s}. \end{align*} Recall the formula for the Christoffel symbols computed with respect to the conformal metric $g = e^{2\omega} \chi$: \begin{align*} \widehat{\Gamma}_{m i_s}^p = \Gamma_{m i_s}^p + \delta^p_m \omega_{, i_s} + \delta^p_{i_s}\omega_{, m} - g_{m i_s} g^{p l} \omega_{, l}. \end{align*} Combining the preceding, we find \begin{align*} (\widehat{\nabla}^j u)_{i_1\cdots i_j \hat{;} m} = (\widehat{\nabla}^j u)_{i_1\cdots i_j ; m} - \sum_{i=1}^k (\widehat{\nabla}^j u)_{i_1\cdots m \cdots i_j} \omega_{, i_s} - (\widehat{\nabla}^j u)_{i_1 \cdots i_j} \omega_{, m} + \sum_{s=1}^j (\widehat{\nabla}^j u)_{i_1\cdots p \cdots i_j} g_{mi_s} (\nabla \omega)^p . \end{align*} The conclusion now follows by a straightforward inductive argument. \end{proof} \begin{definition}[The constants $\delta_p$, cf. \ref{con:L}] \label{ddeltai} For each $p\in L$ we define a constant $\delta_p>0$ by requesting that the set of $\delta_p$'s is invariant under the action of $\groupcyl$ on $L$ and that for $i=1, \dots, k$ we have $\delta_{p} = e^{-2\omega({{\ensuremath{\mathrm{s}}}}(p))} \delta = \frac{1}{9|m_i|}e^{-2\omega({{\ensuremath{\mathrm{s}}}}(p))} $. \end{definition} \begin{definition}[The space of parameters] \label{dParam} We define ${\mathcal{P}} := {\mathcal{P}}^\top \oplus {\mathcal{P}}^\perp$, where \begin{align*} {\mathcal{P}}^\top: = \mathbb{R}^{2k}, \quad {\mathcal{P}}^\perp := \bigoplus_{i=1}^k {\mathcal{P}}_i^\perp : =\bigoplus_{i=1}^k \mathbb{R}^{\dim \mathscr{V}^\perp[L_i]}. \end{align*} The continuous parameters of the LD solutions are \begin{align*} {\boldsymbol{\zeta}} &= ({\boldsymbol{\zeta}}^\top, {\boldsymbol{\zeta}}^\perp) \in {{B}}_{{\mathcal{P}}} := \underline{c}\, {{B}}^1_{{\mathcal{P}}} := \underline{c}\, ( {{B}}^1_{{\mathcal{P}}^\top} \times {{B}}^1_{{\mathcal{P}}^\perp}), \quad \text{where} \\ {\boldsymbol{\zeta}}^\top &: = (\zeta_1, \underline{\bsigma}) = (\zeta_1, \boldsymbol{\sigma}, {\boldsymbol{\xi}}) \in {{B}}^1_{{\mathcal{P}}^\top}, \quad \zeta_1\in\mathbb{R}, \quad \boldsymbol{\sigma}\in\mathbb{R}^{k-1}, \quad {\boldsymbol{\xi}} \in \mathbb{R}^k, \\ {{B}}^1_{{\mathcal{P}}^\top}: = [ - 1, 1] \times &\left[ -\frac{1}{m}, \frac{1}{m}\right]^{2k-1}, \quad {{B}}^1_{{\mathcal{P}}^\perp} : = \times_{i=1}^k {{B}}^1_{{\mathcal{P}}^\perp_i}, \quad {{B}}^1_{{\mathcal{P}}^\perp_i} := \big[ - e^{-{m}/{c'}}, e^{-{m}/{c'}}\big]^{\dim \mathscr{V}^\perp[L_i]}, \end{align*} and $c'>0$ is a constant which can be taken as large as needed in terms of $k$ but is independent of $m$. \end{definition} We now define a family $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ of LD solutions parametrized by ${\boldsymbol{\zeta}}^\top\in {{B}}_{{\mathcal{P}}^\top}$ and choose the overall scale so that we have approximate matching. The singular sets of the $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ are $(\boldsymbol{\sss}, \boldsymbol{m})$-symmetric singular sets (recall \ref{dLmbold}) and $(\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket)_{{{\mathrm{avg}}}}$ is close to being balanced in the sense of \ref{dLbalanced}. When ${\mathcal{P}}^\perp$ is nontrivial, we will need to use LD solutions (defined later in \ref{dtau2}) whose singular sets are perturbations of the ones defined below and are $(\boldsymbol{\sss}, \boldsymbol{m})$-rotational, but not $(\boldsymbol{\sss}, \boldsymbol{m})$-symmetric. \begin{definition}[Maximally symmetric LD solutions $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$] \label{dtau1} Given ${\boldsymbol{\zeta}}^\top\in {{B}}_{{\mathcal{P}}^\top}$ as in \ref{dParam}, we define using \ref{Lphiavg} the LD solution \begin{equation} \label{Etau1} \begin{gathered} \varphi = \varphi \llbracket {\boldsymbol{\zeta}}^\top\rrbracket= \varphi \llbracket {\boldsymbol{\zeta}}^\top; k_{\mathrm{\circ}}, \boldsymbol{m} \rrbracket := \tau_{1} \Phi [ \underline{\bsigma}: k_{\mathrm{\circ}}, \boldsymbol{m}], \qquad \text{where} \\ \tau_{1} = \tau_{1}\llbracket {\boldsymbol{\zeta}}^\top\rrbracket = \tau_{1}\llbracket{\boldsymbol{\zeta}}^\top; k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket := 2\delta_1 e^{\zeta_1} e^{-\phi({{\ensuremath{\mathrm{s}}}}_1)} = {2} e^{\zeta_1} e^{- {|m_1|} / {2F^\phi_1} } / {9|m_1|} , \end{gathered} \end{equation} and denote its singular set by $L =L \llbracket {\boldsymbol{\zeta}}^\top\rrbracket= L \llbracket {\boldsymbol{\zeta}}^\top;k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket$ and its configuration by ${\boldsymbol{\tau}} ={\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}^\top\rrbracket= {\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}^\top;k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket$. Finally using \ref{LsymLD} we define the decomposition $\varphi = \sum_{i=1}^k \tau_i \Phi_i$ with each $\Phi_i$ a $\mathscr{G}_{m}$-invariant LD solution with singular set $L_i$ related to $L$ as in \ref{dL}. \end{definition} Note that by \ref{Lphiavg} the above are $\groupcyl$-invariant, $L \llbracket {\boldsymbol{\zeta}}^\top;k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket = L[\boldsymbol{\sss}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+\underline{\bsigma}:k_{\mathrm{\circ}}]; \boldsymbol{m}]$, and ${\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}^\top;k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket = \tau_{1} {\boldsymbol{\tau}}' [ \bsigmaunder\mspace{.8mu}\!\!\!\! /+ \underline{\bsigma}: k_{\mathrm{\circ}}]$. \begin{lemma}[Matching equations for $\varphi\llbracket {\boldsymbol{\zeta}}^\top \rrbracket$] \label{Lmatching} Given $\varphi = \varphi \llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ as in \ref{dtau1} with ${\boldsymbol{\zeta}}^\top \in {{B}}_{{\mathcal{P}}^\top}$, we have ${\mathcal{M}}_L \varphi = \boldsymbol{\lambda}+ \boldsymbol{\lambda}'$, where $\boldsymbol{\lambda} = ( \tau_p ( \mu_p+|m_i|\mu'_p d{{\ensuremath{\mathrm{s}}}}))_{p\in L}\in \mathscr{V}^\top[L]$ satisfies for each $p\in L_i$ $\mu_p = \mu_i$ and $\mu'_p = \mu'_i$, where \begin{align*} \mu_i &= \frac{|m_1|}{ 2F^\phi_{1}} \left( e^{-\sum_{l=1}^{i-1}\sigma_l} - 1\right)+ \frac{\Phi'_{{\mathrm{avg}}}(p)}{\tau'_i} + \frac{\Phi'_{i, {{\mathrm{osc}}}}(p)}{\tau'_i}+\zeta_1 + \log \tau'_i - \omega(p) \,\\ |m_i|\mu'_i &= \frac{|m_i|}{2} \xi_i + \frac{1}{\tau'_i}\frac{\partial \Phi'_{{\mathrm{avg}}}}{\partial {{\ensuremath{\mathrm{s}}}}}(p)+ \frac{1}{\tau'_i}\frac{\partial \Phi'_{i, {{\mathrm{osc}}}}}{\partial {{\ensuremath{\mathrm{s}}}}}(p) - \frac{1}{2} \frac{\partial \omega}{\partial {{\ensuremath{\mathrm{s}}}}}(p), \end{align*} and $\boldsymbol{\lambda}' = (\tau_p(\hat{\mu}_p + |m_i|\hat{\mu}'_p d{{\ensuremath{\mathrm{s}}}} + m\hat{\mu}^\circ_p d\theta))_{p\in L} \in \mathscr{V}_{\mathrm{sym}}[L]$, where for $\forall p \in L_i$ \begin{align*} \hat{\mu}_p = \sum_{i\neq j} \frac{1}{\tau'_i} \Phi'_{j, {{\mathrm{osc}}}}(p), \quad |m_i|\hat{\mu}'_p = \sum_{i \neq j} \frac{1}{\tau'_i} \frac{\partial \Phi'_{j, {{\mathrm{osc}}}}}{\partial {{\ensuremath{\mathrm{s}}}}}( p), \quad m\hat{\mu}^\circ_p = \sum_{i\neq j} \frac{\tau'_j}{\tau'_i} \frac{\partial \Phi_{j, {{\mathrm{osc}}}}}{\partial \theta}(p). \end{align*} \end{lemma} \begin{proof} We first show that given $i=1, \dots, k$ and any $p \in L_i$, $\frac{1}{\tau_i}{\mathcal{M}}_{p} \varphi = \mu_p+{\widetilde{\mu}}_p+ |m_i|(\mu'_p+{\widetilde{\mu}}'_p) d{{\ensuremath{\mathrm{s}}}} + m {\widetilde{\mu}}^\circ_p \, d\theta$, where \begin{equation} \label{Em1} \begin{aligned} \mu_p+\hat{\mu}_p &= \frac{|m_1|}{ 2F^\phi_{1}} \left( e^{-\sum_{l=1}^{i-1}\sigma_l} - 1\right)+ \frac{\Phi'(p)} {\tau'_i} +\zeta_1 + \log \tau'_i - \omega(p) \,\\ |m_i|(\mu'_p+\hat{\mu}'_p) &= \frac{|m_i|}{2} \xi_i + \frac{1}{\tau'_i}\frac{\partial \Phi'}{\partial {{\ensuremath{\mathrm{s}}}}}(p) - \frac{1}{2} \frac{\partial \omega}{\partial {{\ensuremath{\mathrm{s}}}}}(p)\\ m\hat{\mu}^\circ_{p} &= \sum_{j\neq i } \frac{\tau'_j}{\tau'_i} \frac{\partial \Phi_{j, {{\mathrm{osc}}}}}{\partial \theta}(p). \end{aligned} \end{equation} Expanding $\frac{1}{\tau_i}{\mathcal{M}}_{p} \varphi$ (recall \ref{Dmismatch}) using \ref{Lmm}, \ref{Rmismatch} and \ref{ddecomp}, we find \begin{align*} \mu_p +\hat{\mu}_p&= \frac{1}{\tau'_i} {\underline{\phi}}_i({{\ensuremath{\mathrm{s}}}}_i) + \log \left( \frac{\tau'_i \tau_1}{2\delta_i}\right)+ \frac{\Phi'(p)}{\tau'_i} -\omega(p)\,\\ |m_i|( \mu'_p+\hat{\mu}'_p) &= \frac{1}{\tau'_i} \frac{\partial {\underline{\phi}}_i}{\partial {{\ensuremath{\mathrm{s}}}}}({{\ensuremath{\mathrm{s}}}}_i) + \frac{1}{\tau'_i} \frac{\partial \Phi'}{\partial {{\ensuremath{\mathrm{s}}}}}(p) - \frac{1}{2}\frac{\partial\omega}{\partial {{\ensuremath{\mathrm{s}}}}}(p). \end{align*} Using \ref{Lphiavg}(iii) to substitute the data for ${\underline{\phi}}_i$, substituting $\tau_1$ from \eqref{Etau1}, we complete the proof of the expansions of $\mu_p$ and $\mu'_p$. Using the decomposition \[ \varphi = \tau_i \Phi_i+ \sum_{j\neq i } \tau_j \Phi_j, \] and that $\Phi_i$ is $\mathscr{G}_{|m_i|}$-symmetric, we conclude the last part of \eqref{Em1}. The claimed decomposition ${\mathcal{M}}_L \varphi = \boldsymbol{\lambda} + \boldsymbol{\lambda}'$ now follows from \eqref{Em1}, by considering average and oscillatory parts, and using that $\Phi'_{i, {{\mathrm{osc}}}}$ is $\mathscr{G}_{|m_i|}$-symmetric. \end{proof} \begin{notation} Given $\boldsymbol{a} = (a_i)_{i=1}^k \in \mathbb{R}^k, k\geq 2$, we define ${\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} \boldsymbol{a} \in \mathbb{R}^{k-1}$ by requesting that $({\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} \boldsymbol{a})_j = a_{j+1} - a_j$, $j=1, \dots, k-1$. It is useful to think of ${\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} \boldsymbol{a}$ as a discrete derivative of $\boldsymbol{a}$.\qed \end{notation} \begin{corollary}[Matching Estimates for $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$] \label{LmatchingE} Let ${\boldsymbol{\zeta}}^\top \in {{B}}_{{\mathcal{P}}^\top}$ and $\varphi = \varphi \llbracket {\boldsymbol{\zeta}}^\top \rrbracket$ as in \ref{dtau1}. There is an absolute constant $C$ (independent of $\underline{c}\,$) such that for $m$ large enough (depending on $\underline{c}\,)$, the following hold, where ${\boldsymbol{\mu}} := (\mu_i)_{i=1}^k, {\boldsymbol{\mu}}': = (\mu'_i)_{i=1}^k$ and $\mu_i, \mu'_i$ are as defined as in \ref{Lmatching}: \begin{enumerate}[label=\emph{(\roman*)}] \item $\left|\zeta_1-\mu_1 \right| \le C$. \item $ \left| \boldsymbol{\sigma} + \frac{2F^\phi_1}{|m_1|} {\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} {\boldsymbol{\mu}} \right|_{\ell^\infty}\le C/m$. \item $\left|{\boldsymbol{\xi}}- 2{\boldsymbol{\mu}}' \right|_{\ell^\infty} \le C/m$. \item For any $p\in L_i$, and $\hat{\mu}_p, \hat{\mu}'_p, \hat{\mu}^\circ_p$ as in \ref{Lmatching}, $|\hat{\mu}_p|+|\hat{\mu}'_p|+|\hat{\mu}^\circ_p|\leq Ce^{- \frac{m}{Ck}}$. \end{enumerate} \end{corollary} \begin{proof} Taking $i=1$ in the first equation of \ref{Lmatching} we obtain for any $p\in L_1$ \begin{align} \mu_1 - \zeta_1 = \Phi'_{{{\mathrm{avg}}}}(p) + \Phi'_{1, {{\mathrm{osc}}}}(p) - \omega( {{\ensuremath{\mathrm{s}}}}_1). \end{align} Given $i\geq 2$, fix $p_i \in L_i$ and $p_{i-1}\in L_{i-1}$, compute $\mu_i - \mu_{i-1}$ using \ref{Lmatching}, multiply through by $\frac{2F^\phi_1}{|m_1|}$ and rearrange to see \begin{equation} \begin{aligned} \frac{2F^\phi_1}{|m_1|}(\mu_i - \mu_{i-1}) + \sigma_i &= \frac{2F^\phi_1}{|m_1|}\left( \frac{\Phi'_{{{\mathrm{avg}}}}(p_i)}{\tau'_i} - \frac{\Phi'_{{{\mathrm{avg}}}}(p_{i-1})}{\tau'_{i-1}} + \log \frac{\tau'_i}{\tau'_{i-1}} + \omega({{\ensuremath{\mathrm{s}}}}_i) - \omega({{\ensuremath{\mathrm{s}}}}_{i-1})\right)\\ & + \frac{2F^\phi_1}{|m_1|}\left( \frac{\Phi'_{i, {{\mathrm{osc}}}}(p_i)}{\tau'_i} - \frac{\Phi'_{i-1, {{\mathrm{osc}}}}(p_{i-1})}{\tau'_{i-1}}\right)+ O\left( \frac{\underline{c}\,^2}{m^3}\right). \end{aligned} \end{equation} Next, from \ref{Lmatching} we have for $i=1, \dots, k$ and any $p_i \in L_i$ \begin{align} 2 \mu'_i - \xi_i = \frac{1}{|m_i|}\left(\frac{2}{\tau'_i} \frac{\partial \Phi'_{{{\mathrm{avg}}}}}{\partial {{\ensuremath{\mathrm{s}}}}}(p_i) + \frac{2}{\tau'_i}\frac{\partial \Phi'_{i, {{\mathrm{osc}}}}}{\partial {{\ensuremath{\mathrm{s}}}}}(p_i) -\frac{\partial \omega}{\partial {{\ensuremath{\mathrm{s}}}}} ({{\ensuremath{\mathrm{s}}}}_i)\right). \end{align} Using \ref{LPhip} to estimate the terms involving $\Phi'$, using \ref{Ltauratio} to bound the $\tau'$ terms, and using the boundedness of the ${{\ensuremath{\mathrm{s}}}}_i$ from Lemma \ref{Lrldest} and uniform bounds on $\omega$ on compact sets, we deduce the inequalities $\left|\zeta_1-\mu_1 \right| \le C$, $ \left| \boldsymbol{\sigma} + \frac{2F^\phi_1}{|m_1|} {\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} {\boldsymbol{\mu}} \right|_{\ell^\infty}\le C/m$, and $\left|{\boldsymbol{\xi}}- 2{\boldsymbol{\mu}}' \right|_{\ell^\infty} \le C/m$, which together complete the proof of (i)-(iii). For (iv), we use the definition of $\hat{\mu}_p, \hat{\mu}'_p, \hat{\mu}^\circ_p$ in \ref{Lmatching} and estimate the oscillatory terms using \ref{Lsol} and arguing as in the proof of \ref{LPhipest}. \end{proof} \begin{lemma} \label{Ltauratio} For $\Phi$ as in Definition \ref{Lphiavg} and $1\leq j < i \leq k$, we have \begin{align*} \frac{\tau'_i}{\tau'_j} = \frac{\phi({{\ensuremath{\mathrm{s}}}}_i)}{\phi({{\ensuremath{\mathrm{s}}}}_j)} \big( e^{\sum_{l=j}^{i-1} \sigma_l} \big) \Sim_{1+C\frac{\log k}{k}} 1. \end{align*} \end{lemma} \begin{proof} The first equality follows from \ref{Lphiavg}(i). We have then \begin{equation} \label{Etauratio1} \begin{aligned} \log \frac{\tau'_i}{\tau'_{j}} &= \log\frac{\phi({{\ensuremath{\mathrm{s}}}}_i)}{\phi({{\ensuremath{\mathrm{s}}}}_{j})} + \sum_{l=j}^{i-1}\sigma_{l}= O\left(\frac{\log k }{k}\right) + O\left(\frac{k \underline{c}\,}{m}\right), \end{aligned} \end{equation} where the estimates follow from Lemma \ref{Lrldest}, Definition \ref{dtau1} and \ref{dParam}. \end{proof} \subsection*{${\boldsymbol{\zeta}}^\perp$ dislocations} $\phantom{ab}$ \nopagebreak When not all $|m_i|$'s are equal we need to expand our families of LD solutions. We first determine the spaces $\mathscr{V}^\perp[L_i]$ in some simple cases and define configurations for the corresponding families. \begin{lemma} \label{Rlp} Given $L_i = L[{{\ensuremath{\mathrm{s}}}}_i;m_i]$ as in \ref{dL} and $m_i \in \{\pm m, \pm 2m, \pm 3m\}$, $\boldsymbol{\lambda}^\perp_i = (\lambda^\perp_p)_{p\in L_i}\in \mathscr{V}^\perp[L_i]$ as defined in \ref{dVal} has the form determined by the following, except that $b=0$ when ${{\ensuremath{\mathrm{s}}}}_i=0$. \begin{enumerate}[label=\emph{(\alph*)}] \item For $m_i = \pm m$: $\lambda^\perp_p = 0$ $\forall p \in L_i$. \item For $m_i = -2m$: $\lambda^\perp_{p_i} = a \left. d \theta\right|_{p_{i}}$ for some $a \in \mathbb{R}$, where $p_i: =( e^{i \frac{2m}{3\pi}}, {{\ensuremath{\mathrm{s}}}}_i)$. \item For $m_i= 2m$: $\lambda^\perp_{p_{i\pm}} = \pm (a+ b \left. d {{\ensuremath{\mathrm{s}}}}\right|_{p_{i\pm}})$ for some $a, b \in \mathbb{R}$, where $p_{i\pm} := ( e^{i(\frac{\pi}{2m}\pm \frac{\pi}{2m})}, {{\ensuremath{\mathrm{s}}}}_i)$. \item For $m_i = 3m$: $\lambda^\perp_{p_{i+}} = 2( a+ b \left. d{{\ensuremath{\mathrm{s}}}}\right|_{p_{i+}})$ and $\lambda^\perp_{p_{i-}} = - a - b \left. d {{\ensuremath{\mathrm{s}}}}\right|_{p_{i-}} + c \left. d\theta\right|_{p_{i-}}$ for some $a, b, c \in \mathbb{R}$, where $p_{i+} := ( (1, 0), {{\ensuremath{\mathrm{s}}}}_i )$, $p_{i-} :=( e^{i\frac{2\pi}{3m}}, {{\ensuremath{\mathrm{s}}}}_i )$ \item For $m_i =-3m$: $\lambda^\perp_{p_{i+}} = 2( a+ b \left. d{{\ensuremath{\mathrm{s}}}}\right|_{p^i_+})$ and $ \lambda^\perp_{p_{i+}} = - a - b \left. d {{\ensuremath{\mathrm{s}}}}\right|_{p_{i-}} + c \left. d\theta\right|_{p_{i-}}$ for some $a, b, c \in \mathbb{R}$, where $p_{i+} := ( e^{i \frac{\pi}{m}}, {{\ensuremath{\mathrm{s}}}}_i)$, $ p_{i-} :=( e^{i\frac{\pi}{3m}}, {{\ensuremath{\mathrm{s}}}}_i)$. \end{enumerate} \end{lemma} \begin{proof} This follows immediately using the definitions of $L_i$ in \ref{dL}, $\mathscr{V}^\perp[L_i]$ in \ref{dVal}, and the symmetries. \end{proof} \begin{definition}[Configurations with ${\boldsymbol{\zeta}}^\perp$] \label{dLtilde} Given ${\boldsymbol{\zeta}} = {\boldsymbol{\zeta}}^\top+ {\boldsymbol{\zeta}}^\perp \in {{B}}_{{\mathcal{P}}}$, we define a $\mathscr{G}_m$-invariant ${\boldsymbol{\tau}} = {\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}} \rrbracket = {\boldsymbol{\tau}}\llbracket{\boldsymbol{\zeta}}; k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket : \widetilde{L} \rightarrow \mathbb{R}$, which is a perturbation of ${\boldsymbol{\tau}} \llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ defined in \ref{dtau1}, by $\widetilde{L} = L\llbracket {\boldsymbol{\zeta}}\rrbracket = \bigcup_{i=1}^k \widetilde{L}_i $, where $\widetilde{L}_i = L_i\llbracket {\boldsymbol{\zeta}}\rrbracket := \mathscr{G}_m p_{i}$ if $m_i =\pm m,-2m$ and $\widetilde{L}_i = L_i\llbracket {\boldsymbol{\zeta}}\rrbracket := \widetilde{L}_i^+ \textstyle\bigsqcup \widetilde{L}^-_i$ with $\widetilde{L}^{\pm}_i := \mathscr{G}_m p_{i\pm}$ otherwise, and where $p_{i}$, $\tau_{p_{i}}$, $p_{i\pm}$, and $\tau_{p_{i\pm}}$ are defined as follows (with $\tau_1$ and $\tau'_i$ as in \ref{dtau1}); except we have ${\widetilde{\xi}}_i =0$ when ${{\ensuremath{\mathrm{s}}}}_i=0$. \begin{enumerate}[label=\emph{(\alph*)}] \item For $m_i = \pm m$: $p_i := ( e^{i( \frac{\pi}{2m} \pm \frac{\pi}{2m})}, {{\ensuremath{\mathrm{s}}}}_i)$ and $\tau_{p_{i}} = \tau_1 \tau'_i$. \item For $m_i= -2m$: $p_i: =( e^{ \frac{i}{2m}(3\pi + {\widetilde{\xi}^{\circ}}_i)}, {{\ensuremath{\mathrm{s}}}}_i)$ and $\tau_{p_{i}} = \tau_1 \tau'_i$, where ${\widetilde{\xi}^{\circ}}_i \in {\mathcal{P}}^\perp_i \simeq \mathbb{R} $. \item For $m_i = 2m$: $p_{i\pm} := ( e^{i(\frac{\pi}{2m}\pm \frac{\pi}{2m})}, {{\ensuremath{\mathrm{s}}}}_i\pm {\widetilde{\xi}}_i)$, $\tau_{p_{i\pm}} =e^{\pm {\widetilde{\sigma}}_i} \tau_1 \tau'_i$, where $({\widetilde{\sigma}}_i, {\widetilde{\xi}}_i)\in {\mathcal{P}}^\perp_i \simeq \mathbb{R}^2$. \item For $m_i = 3m$: $p_{i+} := ( (1, 0), {{\ensuremath{\mathrm{s}}}}_i +2 {\widetilde{\xi}}_i)$, $p_{i-} :=( e^{i(\frac{2\pi}{3m} + {\widetilde{\xi}^{\circ}}_i)}, {{\ensuremath{\mathrm{s}}}}_i - {\widetilde{\xi}}_i)$, and $\tau_{p_{i\pm}} =e^{\pm {\widetilde{\sigma}}_i} \tau_1 \tau'_i$, where $({\widetilde{\sigma}}_i, {\widetilde{\xi}}_i, {\widetilde{\xi}^{\circ}}_i)\in {\mathcal{P}}^\perp_i \simeq \mathbb{R}^3$. \item For $m_i = -3m$: $p_{i+} := ( e^{i \frac{\pi}{m}}, {{\ensuremath{\mathrm{s}}}}_i +2 {\widetilde{\xi}}_i)$, $ p_{i-} :=( e^{i(\frac{\pi}{3m} + {\widetilde{\xi}^{\circ}}_i)}, {{\ensuremath{\mathrm{s}}}}_i - {\widetilde{\xi}}_i)$, and $\tau_{p_{i\pm}} =e^{\pm {\widetilde{\sigma}}_i} \tau_1 \tau'_i$, where $({\widetilde{\sigma}}_i, {\widetilde{\xi}}_i, {\widetilde{\xi}^{\circ}}_i)\in {\mathcal{P}}^\perp_i \simeq \mathbb{R}^3$. \end{enumerate} \end{definition} Note that ${\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}\rrbracket$ in \ref{dLtilde} is equal to $ {\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ as defined in \ref{dtau1} when ${\boldsymbol{\zeta}}^\perp = {\boldsymbol{0}}$. In order to keep the presentation simple we assume now the following. \begin{assumption} \label{Ambold} We assume in the rest of the article that $k, \boldsymbol{m}, m$ are as in \ref{dL} satisfying \ref{Amk}, and furthermore that $m_i \in \{m, -m, -2m\}$ $\forall i\in \{1, \dots, k\}$. \end{assumption} \begin{definition}[The spaces {$\widehat{\mathscr{K}}_{\mathrm{sym}}[\widetilde{L}]$} and {$\mathscr{K}_{\mathrm{sym}}[\widetilde{L}]$}] \label{dkernelsym} Given $\widetilde{L}$ as in \ref{dLtilde}, define \begin{align*} \widehat{\mathscr{K}}_\mathrm{sym}[\widetilde{L}] = \bigoplus_{i=1}^k \widehat{\mathscr{K}}_\mathrm{sym}[\widetilde{L}_i] = \bigoplus_{i=1}^k \widehat{\mathscr{K}}^\top_\mathrm{sym}[\widetilde{L}_i] \oplus \widehat{\mathscr{K}}^\perp_{\mathrm{sym}}[\widetilde{L}_i], \end{align*} where $ \widehat{\mathscr{K}}^\top_\mathrm{sym}[\widetilde{L}_i] := \mathrm{{span}}( V_i , V'_i)$, $V_i , V'_i \in C^\infty_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}_I)$ are defined by requesting that they are supported on $D^\chi_{\widetilde{L}_i}(2\delta_i)$ and for each $p\in \widetilde{L}_i$ on $D^\chi_{p}(2\delta_i)$ they satisfy \begin{equation} \label{EVV} \begin{aligned} V_i : = {\boldsymbol{\Psi}}[ \delta_i, 2\delta_i; {\mathbf{d}}^\chi_{p}]( {\underline{\phi}}[ 1, 0 ; {{\ensuremath{\mathrm{s}}}}(p)], 0), \quad V'_i : = {\boldsymbol{\Psi}}[ \delta_i, 2\delta_i; {\mathbf{d}}^\chi_{p}]( {\underline{\phi}}[ 0, 1 ; {{\ensuremath{\mathrm{s}}}}(p) ], 0), \end{aligned} \end{equation} and $\mathscr{K}^\perp_\mathrm{sym}[\widetilde{L}_i]$ is spanned by the following functions: \begin{enumerate}[label=\emph{(\alph*)}] \item For $|m_i| = m$: $0$. \item For $m_i = -2m$: $V^\circ_i$. \end{enumerate} For each $i$ such that $m_i=-2m$, $V^\circ_i \in C^\infty_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}_I)$ is defined by requesting that $V^\circ_i$ is supported on $D^\chi_{\widetilde{L}_i}(2\delta_i)$ and on $D^\chi_{p_i}( 2\delta_i)$, \begin{align*} V^\circ_i = {\boldsymbol{\Psi}}[ \delta_i, 2\delta_i; {\mathbf{d}}^\chi_{p_i}]( u^\circ_i - {\underline{\phi}}[u^\circ_i(p_i), \partial_{{{\ensuremath{\mathrm{s}}}}}u^\circ_i(p_i ); {{\ensuremath{\mathrm{s}}}}_i], 0), \end{align*} where $u^\circ_i$ is the solution of the Dirichlet problem ${\mathcal{L}}_{\chi} u^\circ_i=0$ on $D^\chi_{p_i}(3 \delta_i )$ with boundary data on $\partial D^\chi_{p_i}(3 \delta_i)$ given by $u^\circ_i( e^{i\theta}, {{\ensuremath{\mathrm{s}}}}) = \sin (\theta - \theta(p_i))$, where $\theta(p_i): = \frac{1}{2m}(3\pi + {\widetilde{\xi}^{\circ}}_i)$ (recall \ref{dLtilde}). \end{definition} \begin{lemma} \label{LVker} The spaces $\widehat{\mathscr{K}}_\mathrm{sym}\llbracket {\boldsymbol{\zeta}} \rrbracket$ (as in \ref{dkernelsym}) satisfy parts (i)-(v) of Assumption \ref{aK}. \end{lemma} \begin{proof} Items (i) and (ii) of \ref{aK} follow from Definition \ref{dkernelsym}, the definition of $\delta_i$ in \ref{ddeltai}, and Lemma \ref{LGdiff}, where we note we can bound $\frac{\partial \omega}{\partial {{\ensuremath{\mathrm{s}}}}}$ on $\Omega[{{\ensuremath{\mathrm{s}}}}_i;m_i]$ by a constant depending on $k$ using that ${{\ensuremath{\mathrm{s}}}}_k < C\log k$ from \ref{Lrldest}. Next, observe that ${\mathcal{E}}_L: \mathscr{K}_{\mathrm{sym}}[\widetilde{L}] \rightarrow \mathscr{V}_{\mathrm{sym}}[\widetilde{L}]$ splits as a direct sum of maps, ${\mathcal{E}}_L = \bigoplus_{i=1}^k ( {\mathcal{E}}^\top_{\widetilde{L}_i} \oplus {\mathcal{E}}^\perp_{\widetilde{L}_i})$, where ${\mathcal{E}}^\top_{\widetilde{L}_i} : \mathscr{K}^\top_{\mathrm{sym}}[\widetilde{L}_i]\rightarrow \mathscr{V}^\top[\widetilde{L}_i]$ and ${\mathcal{E}}^\perp_{\widetilde{L}_i }: \mathscr{K}^\perp_{\mathrm{sym}}[\widetilde{L}_i] \rightarrow \mathscr{V}^\perp[\widetilde{L}_i]$. Next, by the definitions and using that $g = e^{2\omega} \chi$ (recall \ref{Aimm}) we see that ${\mathcal{E}}^\top_{\widetilde{L}_i}$ is invertible for each $i=1, \dots, k$ and moreover that \begin{align} ({\mathcal{E}}^\top_{\widetilde{L}_i})^{-1}\left((a+b d{{\ensuremath{\mathrm{s}}}})_{p\in \widetilde{L}_i}\right) = a V_i + b V'_i. \end{align} Now fix $i \in \{1, \dots, k\}$ with $m_i = -2m$. Since $\Ecalunder_{p_i} V^\circ_i = u^\circ_i(p_i) + d_{p_i} u^\circ_i = \frac{\partial u^\circ_i}{\partial \theta}(p_i)d\theta$ (recall the definitions of $V^\circ_i$ and $u^\circ_i$ in \ref{dkernelsym}), it follows from the definition of $u^\circ_i$ that ${\mathcal{E}}^\perp_{\widetilde{L}_i}$ is an isomorphism as well. Next, it is easy to see from \eqref{EVV} that the estimates \begin{align*} \| V_i: C^{j}_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}\, ) \| \leq C(j), \quad \| V_i' : C^{j}_{\mathrm{sym}[m]}(\ensuremath{\mathrm{Cyl}}, {\widetilde{\chi}}\,) \| \leq C(j) \end{align*} hold for $i\in \{1, \dots, k\}$. Now using \ref{Lconf} to convert these estimates to estimates where the norm ${\widetilde{\chi}}$ is replaced first with $\chi$ and then with $g = e^{2\omega} \chi$, we conclude that $\|( {\mathcal{E}}^\top_{\widetilde{L}_i})^{-1} \| \le C(k) m^{2+ \beta}$, and analogously, $\|({\mathcal{E}}^\perp_{\widetilde{L}_i})^{-1}\| \leq C(k) m^{2+\beta}$, where we have extended the notation for norms in \ref{aK}(iv) in the obvious way. Then using from \ref{ddeltai} that $\delta_{p_i} = \frac{1}{9m}e^{-2\omega(p_i)}$ and combining the preceding, we conclude \ref{aK}(iv) holds. Finally, \ref{aK}(v) holds from the preceding and Taylor's theorem. \end{proof} We now define the full family of LD solutions we use. \begin{definition}[LD solutions $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$] \label{dtau2} Given ${\boldsymbol{\zeta}} = {\boldsymbol{\zeta}}^\top+ {\boldsymbol{\zeta}}^\perp \in {{B}}_{{\mathcal{P}}}$, we define using \ref{LsymLD} the LD solution $\varphi = \varphi\llbracket {\boldsymbol{\zeta}}\rrbracket = \varphi [ {\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}\rrbracket]$, where ${\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}\rrbracket$ is as in \ref{dLtilde}. \end{definition} \begin{definition} \label{dZcal} Given $p\in \ensuremath{\mathrm{Cyl}}$, we define $\mathcal{Z}_p : \mathscr{V}[p]\rightarrow \mathbb{R}^3$ by $\mathcal{Z}_p( \mu + \mu' d{{\ensuremath{\mathrm{s}}}} + \mu^\circ d\theta) = (\mu, \mu', \mu^\circ) $. \end{definition} \subsection*{Green's functions on $\ensuremath{\mathrm{Cyl}}$} $\phantom{ab}$ \nopagebreak In order to study the effect of the ${\boldsymbol{\zeta}}^\perp$ parameters on the mismatch of an LD solution $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$ defined in \ref{dtau2}, we will first study a $\mathscr{G}_m$-invariant LD solution $\Phi_m$ whose singular set is a single $L[{\underline{\sss}}; m]$. In particular in \ref{Lxitildecir}, we estimate $\Ecalunder_p \Phi_m$ for certain points $p \in {L_{\mathrm{par}}}[{\underline{\sss}}]\setminus L[{\underline{\sss}}; m]$. Later in \ref{Cphim} and \ref{Lmatchingperp}, this will be used to compare the mismatch of $\varphi\llbracket {\boldsymbol{\zeta}} \rrbracket$ to that of $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$. Given $m \geq 2$, ${\underline{\sss}} \in \mathbb{R}$, consider the $\mathscr{G}_m$-invariant LD solution $\Phi_m [ {\boldsymbol{\tau}}]$ (recall \ref{LsymLD}), where $\forall p \in L[{\underline{\sss}}; m]$, ${\boldsymbol{\tau}}$ takes the value $1$. Because of the symmetries, there is a function $G_{m} : \mathbb{R}^2 \setminus L_m \rightarrow \mathbb{R}$ uniquely determined by the condition \begin{align} \label{Eglift} \Phi_m \circ Y_{\ensuremath{\mathrm{Cyl}}} (\theta, {{\ensuremath{\mathrm{s}}}}) = G_m (m \theta, m({{\ensuremath{\mathrm{s}}}} - {\underline{\sss}})) = G_m( {\widetilde{\theta}}, {{\widehat{\sss}}}\, ), \end{align} where $L_m := \{ (2\pi k, m({\underline{\sss}} \pm {\underline{\sss}})) : k \in \mathbb{Z}\} \subset \mathbb{R}^2$, ${\widetilde{\theta}} : = m \theta$ and ${{\widehat{\sss}}} := m({{\ensuremath{\mathrm{s}}}} - {\underline{\sss}})$. Note that $G_m \in C^\infty(\mathbb{R}^2 \setminus L_m)$ and satisfies $\mathcal{L}_{\widetilde{\chi}} G_m = 0$, where $\mathcal{L}_{\widetilde{\chi}} = \Delta_{{\widetilde{\chi}}} + m^{-2} V$ and ${\widetilde{\chi}} = d \, {{\widehat{\sss}}}^2 + d{\widetilde{\theta}}^2$. \begin{lemma} \label{LGconv} There exist $\phi_m \in C^\infty(\mathbb{R}^2)$, depending only on ${{\widehat{\sss}}}$ and satisfying $\mathcal{L}_{\widetilde{\chi}} \phi_m = 0$, such that on compact subsets of $\mathbb{R}^2 \setminus L_\infty$, where $L_\infty: = \{(2\pi k, 0):k\in \mathbb{Z}\}$, the functions $G_m+\phi_m$ converge smoothly to $G_\infty : \mathbb{R}^2 \setminus L_\infty \rightarrow \mathbb{R}$, where \begin{align*} G_\infty ({\widetilde{\theta}}, {{\widehat{\sss}}}) = \frac{1}{2} \log \left( \sin^2 \frac{{\widetilde{\theta}}}{2} + \sinh^2 \frac{{{\widehat{\sss}}}}{2}\right). \end{align*} \end{lemma} \begin{proof} We first consider the average parts $G_{m, {{\mathrm{avg}}}}$ and $G_{\infty, {{\mathrm{avg}}}}$. It follows from the vertical balancing lemma \ref{Lvbal} that $G_{m, {{\mathrm{avg}}}}$ and $G_{\infty, {{\mathrm{avg}}}}$ have the same derivative jump at ${{\widehat{\sss}}} =0$, that is (recall \ref{Npartial}) \begin{align*} ( \partial_+ G_{m, {{\mathrm{avg}}}} + \partial_- G_{m, {{\mathrm{avg}}}})(0) = (\partial_+ G_{\infty, {{\mathrm{avg}}}} + \partial_- G_{\infty, {{\mathrm{avg}}}})(0). \end{align*} For each $m\in \mathbb{N}$, there is a unique $\phi_m \in C^\infty(\mathbb{R}^2)$ such that $\phi_m$ depends only on ${{\widehat{\sss}}}$, $\mathcal{L}_{\widetilde{\chi}}\phi_m = 0$, and \begin{align*} G_{m, {{\mathrm{avg}}}}(0) +\phi_m(0) &= G_{\infty, {{\mathrm{avg}}}}(0),\\ (\partial_+G_{m, {{\mathrm{avg}}}} - \partial_-G_{m, {{\mathrm{avg}}}})(0) + \partial \phi_m (0) &= (\partial_+G_{\infty, {{\mathrm{avg}}}} - \partial_-G_{\infty, {{\mathrm{avg}}}})(0). \end{align*} It follows that $G_{m, {{\mathrm{avg}}}} + \phi_m$ converges smoothly to $G_{\infty, {{\mathrm{avg}}}}$ on compact subsets of $\mathbb{R}^2 \setminus \{{{\widehat{\sss}}} = 0\}$. In the rest of this proof, denote $r: = {\mathbf{d}}^{\widetilde{\chi}}_{L_m}$, $D_m: = D^{{\widetilde{\chi}}}_{L_m}(1/5)$, and $D_\infty: = D^{{\widetilde{\chi}}}_{L_\infty}(1/5)$. We define ${\widetilde{G}}_m : = \sum_{k=0}^\infty {\widetilde{G}}^{(k)}_m$, for ${\widetilde{G}}^{(k)}_m$ defined as follows: ${\widetilde{G}}^{(0)}_m \in C^\infty( D_m\setminus L_m)$ is defined by requesting that $\mathcal{L}_{\widetilde{\chi}} {\widetilde{G}}^{(0)}_m=0$, ${\widetilde{G}}^{(0)}_m$ depends only on $r$, ${\widetilde{G}}^{(0)}_m$ vanishes on $\partial D_m$, and ${\widetilde{G}}^{(0)}_m = \log (5 r) +O((\frac{r}{m})^2\log \frac{r}{m})$; ${\widetilde{G}}^{(1)}_m \in C^{2, \beta}(D_m)$, on $D_\infty$ is the solution of the Dirichlet problem \begin{align*} \Delta_{{\widetilde{\chi}}} {\widetilde{G}}^{(1)}_m &= - m^{-2} (V- V(0)) {\widetilde{G}}^{(0)}_m \quad \text{on} \quad D_\infty\\ {\widetilde{G}}^{(1)}_m &= 0 \quad \text{on} \quad \partial D_\infty \end{align*} and on $D_m \setminus D_\infty$ solves the analogous Dirichlet problem with $V(0)$ replaced with $V(-2{\underline{\sss}} m)$; and for $k\in \mathbb{N}$, ${\widetilde{G}}^{(k+1)}_m \in C^{2, \beta}( D_m)$ is the solution of the Dirichlet problem \begin{align*} \Delta_{{\widetilde{\chi}}} {\widetilde{G}}^{(k+1)}_m &= - m^{-2} V {\widetilde{G}}^{(k)}_m \quad \text{on} \quad D_m\\ {\widetilde{G}}^{(k+1)}_m &= 0 \quad \text{on} \quad \partial D_m. \end{align*} By the preceding and standard regularity theory, it follows that ${\widetilde{G}}_m \in C^{\infty}(D_m\setminus L_m)$, that $\mathcal{L}_{\widetilde{\chi}} {\widetilde{G}}_m =0$ on $D$, and that on each compact subset of $D_\infty\setminus L_\infty$, ${\widetilde{G}}_m$ converges smoothly to $\log(5 r)$ as $m\rightarrow \infty$. We next define decompositions $G_m := {\widehat{G}}_m + G'_m$ and $G_\infty: = {\widehat{G}}_{\infty} + G'_{\infty}$, where ${\widehat{G}}_m, {\widehat{G}}_{\infty}$ are defined by requesting that they are supported on $D_m$ and $D_\infty$ respectively and satisfy \begin{align*} {\widehat{G}}_m = {\boldsymbol{\Psi}}[\textstyle{\frac{1}{10}}, \textstyle{\frac{1}{5}}; r]( {\widetilde{G}}_m, 0), \quad {\widehat{G}}_\infty &= {\boldsymbol{\Psi}}[\textstyle{\frac{1}{10}}, \textstyle{\frac{1}{5}}; r]( \log(5r), 0). \end{align*} Clearly ${\widehat{G}}_m$ converges smoothly to ${\widehat{G}}_\infty$ on compact subsets of $\mathbb{R}^2 \setminus L_\infty$. Next, because \begin{align*} \mathcal{L}_{\widetilde{\chi}} G'_{m, {{\mathrm{osc}}}} = - \mathcal{L}_{\widetilde{\chi}} {\widehat{G}}_{m, {{\mathrm{osc}}}} \quad \text{and} \quad \Delta_{{\widetilde{\chi}}} G'_{\infty, {{\mathrm{osc}}}} = - \Delta_{{\widetilde{\chi}}} {\widehat{G}}_{\infty, {{\mathrm{osc}}}}, \end{align*} by using the smooth convergence of ${\widehat{G}}_m$ to ${\widehat{G}}_{\infty}$, separation of variables (arguing as in \ref{Lsol}, including using the exponential decay away from $L_m$ of the oscillatory modes), it follows that ${\widehat{G}}'_{m, {{\mathrm{osc}}}}$ smoothly converges to ${\widehat{G}}'_{\infty, {{\mathrm{osc}}}}$ on compact subsets of $\mathbb{R}^2$. Combined with the preceding analysis of the average parts, this completes the proof. \end{proof} \begin{remark} Although we do not need it here, one can compute $G_{\infty, {{\mathrm{avg}}}}({{\widehat{\sss}}}) = \frac{|{{\widehat{\sss}}}|}{2} - \log 2$. \end{remark} \begin{lemma} \label{Lxitildecir} For ${\widetilde{\xi}^{\circ}} \in \mathbb{R}$ with $|{\widetilde{\xi}^{\circ}} |$ small, the following hold as $m\rightarrow \infty$. \begin{enumerate}[label=\emph{(\roman*)}] \item $\Phi_m( e^{\frac{i}{m}(\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) = \Phi_m(e^{\frac{i\pi}{m}}, {\underline{\sss}}) +O(|{\widetilde{\xi}}^\circ|^2). $ \item $\frac{\partial \Phi_m}{\partial {\widetilde{{{\ensuremath{\mathrm{s}}}}}}}( e^{\frac{i}{m}(\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) = \frac{\partial \Phi_m}{\partial {\widetilde{{{\ensuremath{\mathrm{s}}}}}}}( e^{\frac{i \pi}{m}}, {\underline{\sss}}) + O(|{\widetilde{\xi}^{\circ}}|).$ \item $\frac{\partial \Phi_m}{\partial {\widetilde{\theta}}}( e^{\frac{i}{m}(\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) = {\widetilde{\xi}^{\circ}} ( - \textstyle{\frac{1}{4}} + o(1)) + O(|{\widetilde{\xi}^{\circ}}|^2)$. \end{enumerate} \end{lemma} \begin{proof} For item (i), we have via Taylor's theorem \begin{align*} \Phi_m( e^{\frac{i}{m}(\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) &= G_m( \pi + {\widetilde{\xi}^{\circ}}, 0) \\ &= G_m(\pi, 0) + {\widetilde{\xi}^{\circ}} \frac{\partial G_m}{\partial {\widetilde{\theta}}}( \pi, 0) + O(|{\widetilde{\xi}^{\circ}}|^2) = \Phi_m(e^{\frac{i\pi}{m}}, {\underline{\sss}}) + O(|{\widetilde{\xi}^{\circ}}|^2), \end{align*} where we have used that $\frac{\partial G_m}{\partial {\widetilde{\theta}}}(\pi, 0) = 0$ by symmetry. This proves (i). Next, we have \begin{align*} \frac{\partial \Phi_m}{\partial {\widetilde{{{\ensuremath{\mathrm{s}}}}}}}( e^{\frac{i}{m}(\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) = \frac{\partial \Phi_m}{\partial {\widetilde{{{\ensuremath{\mathrm{s}}}}}}}( e^{\frac{i\pi}{m}}, {\underline{\sss}}) + {\widetilde{\xi}^{\circ}} \frac{\partial^2 G_m}{\partial {\widetilde{{{\ensuremath{\mathrm{s}}}}}} \partial {\widetilde{\theta}}}(\pi, 0) + O(|{\widetilde{\xi}^{\circ}}|^2), \end{align*} and item (ii) follows from this and \ref{LGconv}. Finally, in similar fashion we have \begin{align*} \frac{\partial \Phi_m}{\partial {\widetilde{\theta}}}( e^{\frac{i}{m} (\pi+{\widetilde{\xi}^{\circ}})}, {\underline{\sss}}) = \frac{\partial G_m}{\partial {\widetilde{\theta}}}(\pi +{\widetilde{\xi}^{\circ}}, 0) = {\widetilde{\xi}^{\circ}} \frac{\partial^2 G_m}{\partial {\widetilde{\theta}}^2}( \pi, 0) + O(|{\widetilde{\xi}^{\circ}}|^2), \end{align*} where we have used that $\frac{\partial G_m}{\partial {\widetilde{\theta}}}(\pi, 0) = 0$ by symmetry. Item (iii) then follows by using Lemma \ref{LGconv} and the direct calculation $\frac{\partial^2 G_\infty}{\partial {\widetilde{\theta}}^2}(\pi, 0) = -1/4$. \end{proof} \subsection*{Matching estimates} $\phantom{ab}$ \nopagebreak In the last part of this section, given ${\boldsymbol{\zeta}} = {\boldsymbol{\zeta}}^\top + {\boldsymbol{\zeta}}^\perp \in {{B}}_{{\mathcal{P}}}$, we will need to compare the LD solutions $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ and $\varphi \llbracket {\boldsymbol{\zeta}} \rrbracket$ defined in \ref{dtau1} and \ref{dtau2} respectively. To avoid confusion, we will denote hereafter $\varphitilde = \varphi\llbracket {\boldsymbol{\zeta}} \rrbracket$ and $\varphi = \varphi\llbracket {\boldsymbol{\zeta}}^\top \rrbracket$. It will be useful to consider the decompositions \begin{align*} \varphitilde = \sum_{i=1}^k \varphitilde_i, \quad \varphi = \sum_{i=1}^k \varphi_i, \end{align*} where $\varphitilde_i, \varphi_i$ are $\mathscr{G}_m$-invariant and have singular sets $\widetilde{L}_i$ and $L_i$. \begin{cor} \label{Cphim} Suppose $i\in \{1, \dots, k\}$ and $m_i = -2m$. Then (recall \ref{dZcal}) \begin{align*} \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i} \varphitilde_i - \mathcal{Z}_{p_i} {\mathcal{M}}_{p_i} \varphi_i = \tau_i \left( O(|{\widetilde{\xi}^{\circ}}_i|^2), mO( |{\widetilde{\xi}^{\circ}}_i|), - \frac{m}{4}{\widetilde{\xi}^{\circ}}_i(1 + o(1)+ O(|{\widetilde{\xi}^{\circ}}_i|))\right). \end{align*} \end{cor} \begin{proof} We have $\varphitilde_i = \varphitilde_{i+} + \varphitilde_{i-}$ and $\varphi_i = \varphi_{i+} + \varphi_{i-}$, where $\varphitilde_{i+}, \varphitilde_{i-}, \varphi_{i+}, \varphi_{i-}$ are $\mathscr{H}_m$-invariant and the singular sets of $\varphitilde_{i+}$ and $\varphi_{i+}$ are respectively $\mathscr{H}_m \tilde{p}_i$ and $\mathscr{H}_m p_i$. By symmetry, we have \begin{align*} \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i} \varphitilde_{i+} = \mathcal{Z}_{p_i} {\mathcal{M}}_{p_i} \varphi_{i+}. \end{align*} Next, from Lemma \ref{Lxitildecir}, we have (recall \ref{DVcal}) \begin{align*} \mathcal{Z}_{\tilde{p}_i} \Ecalunder_{\tilde{p}_i} \varphitilde_{i-} - \mathcal{Z}_{p_i} \Ecalunder_{p_i} \varphi_{i-} = \tau_i \left( O(|{\widetilde{\xi}^{\circ}}_i|^2), m O( |{\widetilde{\xi}^{\circ}}_i|), - \frac{m}{4}{\widetilde{\xi}^{\circ}}_i(1+ o(1)+ O(|{\widetilde{\xi}^{\circ}}_i|))\right). \end{align*} The conclusion now follows by combining these equations. \end{proof} \begin{lemma} \label{Lmphicomp} Given $i, j \in \{1, \dots, k\}$ with $i\neq j$, the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\mathcal{Z}_{\tilde{p}_i} \Ecalunder_{\tilde{p}_i} ( \varphitilde_j - \varphi_j) = \tau_j (O(e^{-\frac{m}{Ck}}) , mO(e^{-\frac{m}{Ck}}) , mO(e^{-\frac{m}{Ck}}) )$. \item $\mathcal{Z}_{\tilde{p}_i} \Ecalunder_{\tilde{p}_i} \varphi_j - \mathcal{Z}_{p_i} \Ecalunder_{p_i} \varphi_j = \tau_j (O(e^{-\frac{m}{Ck}}), mO(e^{-\frac{m}{Ck}}), mO(e^{-\frac{m}{Ck}}))$. \end{enumerate} \end{lemma} \begin{proof} Note first that $\varphitilde_j = \varphi_j$ if $|m_j|=m$, so (i) holds trivially in that case. Now suppose that $m_j = -2m$. Since $\varphitilde_{j,{{\mathrm{avg}}}} = \varphi_{j,{{\mathrm{avg}}}}$, we need only establish (i) when $\varphitilde_j - \varphi_j$ is replaced with $\varphitilde_{j,{{\mathrm{osc}}}}- \varphi_{j,{{\mathrm{osc}}}}$. The required estimate in (i) now follows from Lemma \ref{Lsol} and arguing as in the proof of \ref{LPhipest}, using \ref{Lrldest}(ii) to see that $|{{\ensuremath{\mathrm{s}}}}_j - {{\ensuremath{\mathrm{s}}}}_i|> \frac{|j-i|}{Ck}$. Item (ii) follows in similar fashion from \ref{Lsol}. \end{proof} \begin{lemma}[Matching Estimates for $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$] \label{Lmatchingperp} Let ${\boldsymbol{\zeta}} = {\boldsymbol{\zeta}}^\top+{\boldsymbol{\zeta}}^\perp \in {{B}}_{{\mathcal{P}}}$, $\varphitilde = \varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$, $\varphi = \varphi\llbracket {\boldsymbol{\zeta}}^\top \rrbracket$ be as in \ref{dtau2} and \ref{dtau1}. For each $i\in \{1, \dots, k\}$ such that $m_i=-2m$, the following holds: \begin{align*} \frac{1}{\tau_i} \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i} \varphitilde &= \frac{1}{\tau_i}\mathcal{Z}_{p_i} {\mathcal{M}}_{p_i} \varphi \\ &+ \left( O( |{\widetilde{\xi}^{\circ}}_i|^2 + e^{-\frac{m}{Ck}}), mO( |{\widetilde{\xi}^{\circ}}_i| + e^{-\frac{m}{Ck}}), - \frac{m}{4}{\widetilde{\xi}^{\circ}}_i(1 + o(1)) + O(|{\widetilde{\xi}^{\circ}}_i|^2+ m e^{-\frac{m}{Ck}})\right). \end{align*} \end{lemma} \begin{proof} We have $ \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i}\varphitilde = \mathcal{Z}_{p_i} {\mathcal{M}}_{p_i}\varphi + (I) +(II)+(III)$, where \begin{equation*} \begin{gathered} (I) := \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i} \varphitilde_i - \mathcal{Z}_{p_i} {\mathcal{M}}_{p_i} \varphi_i, \quad (II) := \sum_{j\neq i} \mathcal{Z}_{\tilde{p}_i} \Ecalunder_{\tilde{p}_i} ( \varphitilde_j - \varphi_j), \\ (III):= \sum_{j\neq i } \mathcal{Z}_{\tilde{p}_i} \Ecalunder_{\tilde{p}_i} \varphi_j- \mathcal{Z}_{p_i} \Ecalunder_{p_i} \varphi_j. \end{gathered} \end{equation*} The conclusion now follows from dividing through by $\tau_i$, combining \ref{Cphim} and \ref{Lmphicomp} to estimate (I), (II), and (III), and using from \ref{Ltauratio} that $\tau_j/\tau_i = \tau'_j/\tau'_i = O(1)$. \end{proof} \begin{definition} \label{dZ} Let ${\boldsymbol{\zeta}} \in {{B}}_{{\mathcal{P}}}$. Define a linear map $Z_{{\boldsymbol{\zeta}}} : \mathscr{V}_{\mathrm{sym}}[\widetilde{L}] \rightarrow {\mathcal{P}}$ by requesting that $Z_{\boldsymbol{\zeta}}$ has the direct sum decomposition $Z_{\boldsymbol{\zeta}} = Z^\top_{\boldsymbol{\zeta}} \oplus (\bigoplus_{i=1}^k Z^{\perp i}_{{\boldsymbol{\zeta}}})$, where $Z^\top_{{\boldsymbol{\zeta}}} : \mathscr{V}^\top[\widetilde{L}] \rightarrow {\mathcal{P}}^\top$ and $Z^{\perp i}_{{\boldsymbol{\zeta}}} : \mathscr{V}^\perp[\widetilde{L}_i] \rightarrow {\mathcal{P}}^\perp_i$ are defined as follows: given $\boldsymbol{\lambda}^\top = ( \tau_p ( \mu_p +|m_i| \mu'_p d{{\ensuremath{\mathrm{s}}}}))_{p\in \widetilde{L}}$, define \begin{align*} Z^\top_{{\boldsymbol{\zeta}}}( \boldsymbol{\lambda}^\top) = \bigg( \mu_1, -\frac{2F^\phi_1}{|m_1|} {\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} {\boldsymbol{\mu}}, 2 {\boldsymbol{\mu}}'\bigg), \end{align*} where ${\boldsymbol{\mu}} = (\mu_i)_{i=1}^k$, ${\boldsymbol{\mu}}'= (\mu'_i )_{i=1}^k$ are such that $ \forall p \in \widetilde{L}_i$, $\mu_p = \mu_i, \mu'_p = \mu'_i$. Given $i\in \{1,\dots, k\}$ define $Z^{\perp i}_{{\boldsymbol{\zeta}}}$ to be the trivial map if $|m_i|=m$ and for $m_i = -2m$, define \begin{align*} Z_{{\boldsymbol{\zeta}}}^{\perp i} ( \boldsymbol{\lambda}^\perp_i) = - 4{\widetilde{\mu}}^\circ_{\tilde{p}_i}, \end{align*} where $\boldsymbol{\lambda}^\perp_i = (\tau_i m {\widetilde{\mu}}^\circ_{\tilde{p}} \, d\theta)_{\tilde{p} \in \widetilde{L}_i}$. \end{definition} \begin{prop} \label{PZ} Let ${\boldsymbol{\zeta}} = {\boldsymbol{\zeta}}^\top+{\boldsymbol{\zeta}}^\perp \in {{B}}_{{\mathcal{P}}}$ and $\varphitilde = \varphi\llbracket{\boldsymbol{\zeta}} \rrbracket$ be as in \ref{dtau2}. There is an absolute constant $C$ (independent of $\underline{c}\,$) such that for $m$ large enough (depending on $\underline{c}\,$), the map $Z_{{\boldsymbol{\zeta}}}$ defined in \ref{dZ} satisfies (recall \ref{dParam}) \begin{align} \label{EZ} {\boldsymbol{\zeta}} - Z_{{\boldsymbol{\zeta}}}( {\mathcal{M}}_{L\llbracket {\boldsymbol{\zeta}}\rrbracket} \varphitilde) \in C {{B}}^1_{{\mathcal{P}}}. \end{align} \end{prop} \begin{proof} Define ${\widetilde{\mubold}} = ({\widetilde{\mu}}_i)_{i=1}^k$, ${\widetilde{\mubold}}'= ({\widetilde{\mu}}'_i)_{i=1}^k$, and ${\widetilde{\mubold}}^\circ = ({\widetilde{\mu}}_i^\circ)_{i=1}^k$ by requesting that for $i = 1, \dots, k$, \begin{align*} \frac{1}{\tau_i} \mathcal{Z}_{\tilde{p}_i} {\mathcal{M}}_{\tilde{p}_i} \varphitilde = ( {\widetilde{\mu}}_i, |m_i|{\widetilde{\mu}}'_i, m {\widetilde{\mu}}_i^\circ). \end{align*} Note that ${\widetilde{\mu}}^\circ_i = 0$ when $|m_i|=1$ by symmetry. By the definitions, \eqref{EZ} is equivalent to the following inequalities, where the final one holds only for those $i$ where $m_i = -2m$: \begin{align} \label{EZ1} | \zeta_1 - {\widetilde{\mu}}_1| < C, \quad \left| \boldsymbol{\sigma} + \frac{2F^\phi_1}{|m_1|} {\boldsymbol{\partial}\mspace{.8mu}\!\!\!\!\boldsymbol{/}} {\widetilde{\mubold}} \right|_{\ell^\infty}\le \frac{C}{m}, \quad |{\boldsymbol{\xi}} - 2{\widetilde{\mubold}}'| \leq \frac{C}{m}, \quad |{\widetilde{\xi}^{\circ}}_i + 4{\widetilde{\mu}}^\circ_i| \leq C e^{-\frac{m}{c'}}. \end{align} The conclusion now follows from combining the estimates in \ref{LmatchingE} and \ref{Lmatchingperp} and taking $c'$ large enough in terms of $k$ and the constant $C$ in \ref{Lmatchingperp}. \end{proof} \subsection*{Main results of Part II} $\phantom{ab}$ \nopagebreak \begin{lemma}[Estimates on the LD solutions] \label{LLD} Let $\varphi \llbracket {\boldsymbol{\zeta}} \rrbracket$ be as in Definition \ref{dtau2}. Then \begin{enumerate}[label=\emph{(\roman*)}] \item $m k \Sim_{C(\underline{c}\,)} | \log \tau_i|$, and $C(\underline{c}\,)>1$ depends only on $\underline{c}\,$. \item $\tau_1\llbracket{\boldsymbol{\zeta}}; k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket \Sim_{C(\underline{c}\,)} \tau_1\llbracket{\boldsymbol{0}}; k_{\mathrm{\circ}}, \boldsymbol{m}\rrbracket$, and $C(\underline{c}\,)>1$ depends only on $\underline{c}\,$. \item On $\ensuremath{\mathrm{Cyl}} \setminus \bigsqcup_{p\in L} D^{\Sigma, \chi}_p(\tau^{2\alpha}_p)$ we have $\varphi> \tau_1 cm k$ for some $c> 0$. \item For $i\in \{1,\dots, k\}$, $\| \frac{1}{\tau_i} \varphi: C^{2, \beta}( D^\chi_{p_i}(2 \delta_i)\setminus D^\chi_{p_i}(\delta_i), {\widetilde{\chi}}) \| \le Cm k$. \item $\| \varphi : C^{3, \beta}( \Sigma \setminus \bigsqcup_{p\in L} D^{\Sigma, \chi}_p (\tau^{2\alpha}_p), {\widetilde{\chi}} )\| \le C\tau_1(m k+ (\tau^{2\alpha}_{\min})^{-3-\beta}|\log \tau^{2\alpha}_{\min}|)$. \end{enumerate} \end{lemma} \begin{proof} (i) follows from the definitions of $\tau_i$ in \eqref{Etau1} and \ref{dLtilde}, using \ref{Lrldest} and \ref{Ltauratio}. For (ii), we denote for convenience in this proof $\phi = \phi[\bsigmaunder\mspace{.8mu}\!\!\!\! /+ \underline{\bsigma}:k_{\mathrm{\circ}}, \boldsymbol{m}]$ and $\phi'=\phi[\bsigmaunder\mspace{.8mu}\!\!\!\! /:k_{\mathrm{\circ}}, \boldsymbol{m}]$. We have \begin{align*} \left| \log \frac{\tau_1[{\boldsymbol{\zeta}}; k_{\mathrm{\circ}}, \boldsymbol{m}]}{\tau_1[{\boldsymbol{0}};k_{\mathrm{\circ}}, \boldsymbol{m}]}\right| = \left| \zeta_1 +\frac{|m_1|}{2} \frac{ F^{\phi'}_1 - F^{\phi}_1}{F^{\phi'}_1 F^\phi_1} \right| \leq Ck \underline{c}\,, \end{align*} where the equality uses \eqref{Etau1} and the estimate uses \ref{PODEest}, \ref{Lrldest}(i), and \ref{dParam}. This establishes (ii). For items (iii)-(v), note that it suffices to prove each estimate when $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$ is replaced with $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ as defined in \ref{dtau1}, since the former is a small perturbation of the latter (recall \ref{dLtilde} and \ref{dtau2}). Estimating $\Phi'$ using Lemma \ref{LPhipest} and using \ref{Lgreen}, \ref{Ltauratio}, and \eqref{Etau1} to bound ${\widehat{G}}$, we have \begin{align*} |{\widehat{G}} | < \alpha C m k \quad \text{and} \quad |\Phi'| < C \quad \text{on} \quad \ensuremath{\mathrm{Cyl}} \setminus \bigsqcup_{p\in L} D^{\Sigma, \chi}_p( \tau^{2\alpha}_p). \end{align*} On the other hand, it is easy to see from Definition \ref{ddecomp}, \ref{Lrldest}(iii), and \ref{Lphiavg}(ii) that there is an absolute constant $c> 0$ such that ${\widehat{\Phi}} > cm k$, so (iii) follows from the decomposition (recall \ref{ddecomp}) $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket = \tau_1\Phi = \tau_1({\widehat{\Phi}} + \Phi' + {\widehat{G}})$ by taking $m$ large enough and $\alpha$ small enough. We next prove (iv). By \ref{Lphiavg}(iii), \ref{ddecomp}, and \ref{dtau1}, on the domain under consideration we have \begin{align*} \frac{1}{\tau_i}\varphi = {\underline{\phi}} \bigg[{\frac{|m_1|}{2F^\phi_1}}(e^{-\sum_{l=1}^{i-1} \sigma_l}), {\frac{|m_i|}{ 2}}\xi_i; {{\ensuremath{\mathrm{s}}}}_i\bigg] + \frac{1}{\tau'_i} \Phi' + {\widehat{G}}_i. \end{align*} The estimate in (iv) now follows from this decomposition using \ref{Lrldest} and \ref{Lode} to estimate the ${\underline{\phi}}$ term, \ref{LPhip}(i) and \ref{Ltauratio} to estimate $\frac{1}{\tau'_i} \Phi'$, and \ref{LEest}(i) to estimate ${\widehat{G}}_i$. For (v), by Lemmas \ref{Lgreen} and \ref{LEest}, we have \begin{align} \label{Eghatcirc} \left\| {\widehat{G}} : C^{3, \beta}_\mathrm{sym}\left( \ensuremath{\mathrm{Cyl}}\setminus D^\chi_{L}(\tau^{2\alpha}_{\min}), \chi\right)\right\| \leq C (\tau^{2\alpha}_{\min})^{-3-\beta}| \log \tau^{2\alpha}_{\min} | . \end{align} Combined with the preceding estimates, this completes the proof of (v). \end{proof} \begin{lemma} \label{Ldiffeoshr} There exists a family of diffeomorphisms ${\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}}: \Sigma \rightarrow \Sigma, {\boldsymbol{\zeta}} \in {{B}}_{{\mathcal{P}}}$ satisfying \ref{Adiffeo}\ref{Aa}-\ref{Ab}. \end{lemma} \begin{proof} The proof is essentially the same as the first part of the proof \cite[Lemma 6.7]{kapmcg}, but we give the details for completeness. Let ${\boldsymbol{\zeta}} \in {B}_{\Pcal}$. For ease of notation, denote the positive ${{\ensuremath{\mathrm{s}}}}$-coordinates of the circles ${L_{\mathrm{par}}}\llbracket{\boldsymbol{0}}\rrbracket$ by $\boldsymbol{\sss}$ and likewise the coordinates of the circles in ${L_{\mathrm{par}}}\llbracket{\boldsymbol{\zeta}}\rrbracket$ by $\boldsymbol{\sss}'$. We define ${\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}}: \Sigma \rightarrow \Sigma$ to be an $O(2)\times \mathbb{Z}_2$ covariant diffeomorphism satisfying ${\mathcal{F}}^\Sigma_{{\boldsymbol{\zeta}}} (X_\Sigma (p, {{\ensuremath{\mathrm{s}}}}) ) = X_\Sigma( p, f_{\boldsymbol{\zeta}} ({{\ensuremath{\mathrm{s}}}}))$, where $f_{\boldsymbol{\zeta}} \in C^\infty(\mathbb{R})$ is a diffeomorphism satisfying $f_{\boldsymbol{\zeta}}({{\ensuremath{\mathrm{s}}}}) = {{\ensuremath{\mathrm{s}}}}'_i - {{\ensuremath{\mathrm{s}}}}_i + {{\ensuremath{\mathrm{s}}}}$ on $({{\ensuremath{\mathrm{s}}}}_i - 5\delta, {{\ensuremath{\mathrm{s}}}}_i + 5\delta)$ for each $i=1, \dots, k$. By choosing $f_{\boldsymbol{\zeta}}$ carefully, we can ensure \ref{Adiffeo}\ref{Aa} and \ref{Ab} hold. \end{proof} \begin{theorem}[Theorem \ref{TB}] \label{Trldldgen} Given a background as in \ref{background} satisfying \ref{Aimm}, $k_{\mathrm{\circ}} \geq k_{\circ}^{\mathrm{min}}$ (recall \ref{Dkmin}), and ${\boldsymbol{m}}\in \{m,-m,-2m\}^k$ where $k=\lceil k_{\mathrm{\circ}}/2\rceil $, there are positive constants $\underline{c}\,, \widehat{m}$ depending only on $k_{\mathrm{\circ}}$ such that if $m>\widehat{m}$ (implying \ref{Ambold}), then \ref{Azetabold} holds with ${\boldsymbol{\zeta}} \in {{B}}_{{\mathcal{P}}} := \underline{c}\, {{B}}^1_{{\mathcal{P}}}$ as in \ref{dParam}, ${\mathcal{F}}^\Sigma_{\boldsymbol{\zeta}}$ as in \ref{Ldiffeoshr}, $L\llbracket {\boldsymbol{\zeta}} \rrbracket$ and ${\boldsymbol{\tau}}\llbracket {\boldsymbol{\zeta}}\rrbracket$ as in \ref{dLtilde}, $\varphi\llbracket {\boldsymbol{\zeta}} \rrbracket$ as in \ref{dtau2}, $\delta_p\llbracket {\boldsymbol{\zeta}} \rrbracket$ as in \ref{ddeltai}, $\widehat{\mathscr{K}}_\mathrm{sym}\llbracket {\boldsymbol{\zeta}}\rrbracket$ as in \ref{dkernelsym}, and $Z_{\boldsymbol{\zeta}}$ as in \ref{dZ}. \end{theorem} \begin{proof} Clearly ${\mathcal{P}}$ as defined in \ref{dParam} is finite dimensional and ${B}_{\Pcal} \subset {\mathcal{P}}$ is compact and convex. We now check the properties \ref{Azetabold}\ref{Aa}-\ref{AZ}: \ref{Aa}-\ref{Ab} follow from \ref{Ldiffeoshr}. Next, we verify that the LD solutions $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$ satisfy \ref{con:one}: the smallness of $\tau_{\max}$ in \ref{con:one}(i) follows from \ref{LLD}(i), and \ref{con:L} holds from \eqref{Edelta} and taking $m$ large enough. Convention \ref{con:one}(ii) follows from \ref{LLD}(i) by taking $m$ large enough, and \ref{con:one}(iii) follows from \ref{Ltauratio} and \ref{LLD}(i) also by taking $m$ large enough. We will prove \ref{con:one}(iv)-(v) by suitably modifying the estimates in \ref{LLD}(iv)-(v). For (iii), first note that by \ref{LGdiff} and \ref{ddeltai}, $\partial D^{\Sigma, g}_{p_i}(\delta_{p_i}) \subset D^{\Sigma, \chi}_{p_i}(2\delta)$. Then, using \ref{Lconf}, we can switch the metric with which the norm on the left hand side of \ref{LLD}(iv) is computed with respect to from ${\widetilde{\chi}}$ to $\chi$ and then from $\chi$ to $g = e^{2\omega} \chi$ at the cost of multiplying the right hand side by powers of $m$ and constants depending on the norms of $\omega$. \ref{con:one}(iv) then follows because we can ensure that any polynomial in $m$ of bounded degree is bounded by $\tau_{p_i}^{-\alpha/9}$ by taking $m$ large enough and using \ref{LLD}(i). \ref{con:one}(v) follows in an analogous way: first, using the smallness of $\tau_{p_i}$ and the boundedness of $\omega$ and its derivatives in the $\chi$ metric in the vicinity of $L$, we have that $D^{\Sigma, \chi}_{p_i}(\tau^{2\alpha}_{p_i}) \subset D^{\Sigma, g}_{p_i}( \tau_{p_i}^{\alpha})$. Next, note that the estimate in \ref{con:one}(v) holds when $\Sigma$ in the domain is replaced with $\Omega: = \ensuremath{\mathrm{Cyl}}_{[-{{\ensuremath{\mathrm{s}}}}_k-3/m, {{\ensuremath{\mathrm{s}}}}_k+3/m]}$ by using Lemma \ref{Lconf} to convert the estimate in \ref{LLD}(v) to one where the metric ${\widetilde{\chi}}$ is replaced with $g$ at the cost of powers of $m$ and constants depending on the norms of $\omega$ on $\Omega$. Finally, on $\Sigma \setminus \Omega$, note that $\varphi = \tau_1({\widehat{\Phi}} + \Phi')$, so using the exponential decay of $\Phi'$ away from ${L_{\mathrm{par}}}$ from Lemma \ref{LPhipest} and that $\Phi'$ satisfies ${\mathcal{L}_\chi} {\widehat{\Phi}} = 0$ on $\Sigma \setminus \Omega$ we conclude the estimate \ref{con:one}(v) on $\Sigma\setminus \Omega$. Next, \ref{con:one}(vi) follows from \ref{LLD}(iii) and that $\varphi = \tau_1 \Phi$ using the smallness of $\tau_{\max}$. This finishes the verification of \ref{con:one} and thus the verification of \ref{Azetabold}\ref{Ac}. Next, the uniformity condition \ref{Azetabold}\ref{Atau} follows from \ref{LLD}(ii) and \ref{Ltauratio}. Finally, the prescribed unbalancing condition \ref{Azetabold}\ref{AZ} follows from Proposition \ref{PZ} by taking $\underline{c}\,$ large enough in terms of the constant $C$ in \ref{PZ}. \end{proof} We now construct embedded minimal doublings of $\Sigma$ by combining Theorems \ref{Trldldgen} and \ref{Ttheory}: \begin{theorem}[Theorem \ref{TC}] \label{Tconstruct} With the same assumptions and notation as in Theorem \ref{Trldldgen} there are ${\widehat{\zetaboldunder}} = ({\widehat{\boldsymbol{\zeta}}}, \widehat{{\boldsymbol{\underline{\kappa}}}}) \in {B}_{\Pcal} \times {{B}}_{\mathscr{V}\llbracket {\boldsymbol{0}} \rrbracket}$ (recall \ref{dParam}) and ${\widehat{\upphi}} \in C^\infty(M\llbracket {\widehat{\zetaboldunder}} \rrbracket)$ (recall \ref{dkappatilde}) satisfying $ \| {\widehat{\upphi}}\|_{2, \beta, \gamma, \gamma'; M\llbracket {\widehat{\zetaboldunder}} \rrbracket } \le \tau_{\max}^{1+\alpha/4} $ (recall \ref{D:norm}), such that the normal graph $(M\llbracket {\widehat{\zetaboldunder}}\rrbracket)_{\widehat{\upphi}}$ is a $\groupcyl$-invariant embedded smooth closed minimal surface in $N$ of genus $2g_\Sigma-1+|L\llbracket {\widehat{\boldsymbol{\zeta}}}\rrbracket|$ where $g_\Sigma$ is the genus of $\Sigma$ and $|L\llbracket {\widehat{\boldsymbol{\zeta}}}\rrbracket|$ is as in \ref{RLcard}. For each fixed $k_{\mathrm{\circ}}$, the surfaces $(M\llbracket {\widehat{\zetaboldunder}}\rrbracket)_{\widehat{\upphi}}$ converge in the sense of varifolds as $m\rightarrow \infty$ to $2\Sigma$. \end{theorem} \begin{proof} Since $\Sigma$ is closed and embedded (recall \ref{cLker}) and Assumption \ref{Azetabold} holds by \ref{Trldldgen}, we may apply Theorem \ref{Ttheory} to conclude the existence of $(M\llbracket {\widehat{\zetaboldunder}}\rrbracket)_{\widehat{\upphi}}$ as above, for all large enough $m$. $(M\llbracket {\widehat{\zetaboldunder}}\rrbracket)_{\widehat{\upphi}}$ has the claimed genus because the construction connects two copies of $\Sigma$ by $|L\llbracket {\widehat{\boldsymbol{\zeta}}}\rrbracket|$ bridges. \end{proof} \begin{remark} \label{RSph2} Theorem \ref{Tconstruct} applies also in the case studied in \cite{kapmcg} for the background $(\Sigma, N, g)$ with $\Sigma=\mathbb{S}^2 \subset N=\mathbb{S}^3$, providing new minimal doublings even for that background, because of the ability to prescribe $m_i \in \{m, -m, -2m\}$ $\forall i\in \{1, \dots, k\}$, whereas the doublings in \cite{kapmcg} had all $m_i=m$. \end{remark} \section*{Part III: New Minimal Surfaces and Self-shrinkers via Doubling} \section{Doubling The Spherical Shrinker and Angenent Torus} \label{S:SphShr} \begin{definition} \label{dshrinker} We call the class of minimal hypersurfaces in $ \big( \mathbb{R}^{n+1}, e^{- \frac{|x|^2}{2n}} \delta_{ij}\big)$ \emph{self-shrinkers}. \end{definition} The following well-known lemma catalogs several equivalent characterizations of self-shrinkers: \begin{lemma}[cf. {\cite[Section 1]{cmcompact}}] \label{Lssminimal} Let $\Sigma^n \subset \mathbb{R}^{n+1}$ be a smooth oriented hypersurface. The following are equivalent. \begin{enumerate}[label=\emph{(\roman*)}] \item $H = \frac{\langle x, \nu \rangle}{2}$. \item The one-parameter family of hypersurfaces $\Sigma_t : \Sigma \times (-\infty, 0] \rightarrow \mathbb{R}^{n+1}$ defined by $\Sigma_t ( p, t) = \sqrt{ - t} p$ flows by mean curvature. \item $\Sigma \subset \left( \mathbb{R}^{n+1}, e^{- \frac{|x|^2}{2n}} \delta_{ij}\right)$ is minimal. \item $\Sigma$ is a critical point for the functional ${\mathcal{F}}$ defined on hypersurfaces $\Sigma \subset \mathbb{R}^{n+1}$ by \[ {\mathcal{F}}(\Sigma) := (4\pi )^{-\frac{n}{2}} \int_{\Sigma} e^{- \frac{|x|^2}{4}}.\] \end{enumerate} \end{lemma} In this section we consider the ambient three-manifold $(N, g) = (\mathbb{R}^3, e^{-|x|^2/4} \delta)$. \subsection*{The spherical shrinker} $\phantom{ab}$ \nopagebreak By \ref{Lssminimal}(i) $\mathbb{S}^2_{\mathrm{shr}}:=\mathbb{S}^2(2)$ is a self-shrinker, and is clearly $O(2)\times \mathbb{Z}_2$-invariant in the sense of \ref{Aimm}. The Jacobi operator is \cite[Lemma C.2]{kapshrinker} ${\mathcal{L}}_{\mathbb{S}^2_{\mathrm{shr}}} := e \left( \Delta_{\mathbb{S}^2(2)} +1\right) = \frac{e}{4} \left(\Delta_{\mathbb{S}^2(1)} + 4\right)$. Note that $\ker {\mathcal{L}}_{\mathbb{S}^2_{\mathrm{shr}}}$ is trivial since $4$ is not an eigenvalue of $\Delta_{\mathbb{S}^2(1)}$. Next, note that $X_{\mathbb{S}^2_{\mathrm{shr}}} : \ensuremath{\mathrm{Cyl}} \rightarrow \Sigma$ and $\omega$ defined by \begin{align} \label{Esphimm} X_{\mathbb{S}^2_{\mathrm{shr}}} ( p, {{\ensuremath{\mathrm{s}}}}) = 2(\operatorname{sech} {{\ensuremath{\mathrm{s}}}} \, p, \tanh {{\ensuremath{\mathrm{s}}}}), \quad e^{2\omega({{\ensuremath{\mathrm{s}}}})} = \frac{4}{e} \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}} \end{align} are as in the conclusion of Lemma \ref{LAconf}, and that $V = 4 \operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}$ (recall \ref{dLchi}). \begin{lemma} \label{Lphiee} \label{Lphis} ${\phi_{\mathrm{even}}}$ and ${\phi_{\mathrm{end}}}$ satisfy the following (recall \ref{dHflux} and \ref{AV2}): \begin{enumerate}[label=\emph{(\roman*)}] \item ${\phi_{\mathrm{even}}}$ is strictly decreasing on $[0, \infty)$, and has a unique root ${{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{even}}}}_{\mathrm{root}} \in (0, \infty)$. \item ${\phi_{\mathrm{end}}}(0)<0$, ${\phi_{\mathrm{end}}}$ is strictly increasing on $[0, \infty)$, and has a unique root ${{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{end}}}}_{\mathrm{root}} \in (0, {{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{even}}}}_{\mathrm{root}} )$. \end{enumerate} \end{lemma} \begin{proof} A straightforward consequence of the fact that $4$ is between the first two nonzero eigenvalues ($2$ and $6$ respectively) of the Laplacian on $\mathbb{S}^2(1)$. \end{proof} \begin{theorem}[Doublings of the spherical shrinker $\mathbb{S}^2_{\mathrm{shr}}$] \label{Tmainsph} Given any integer $k_{\mathrm{\circ}} \geq 2$, any $m\in \mathbb{N}$ large enough depending only on $k_{\mathrm{\circ}}$, and any $\boldsymbol{m} \in \{m, -m, -2m\}^{\lceil k_{\mathrm{\circ}}/2\rceil}$, there is a $\mathscr{G}_m$-invariant doubling of $\mathbb{S}^2_{\mathrm{shr}}$ as a self-shrinker for the mean curvature flow containing one catenoidal bridge close to each singularity of one of a family of $\group_m$-invariant LD solutions as in Theorem \ref{Trldldgen} whose singularities concentrate on $k_{\mathrm{\circ}}$ parallel circles, with the number of singularities and their alignment at each circle prescribed by $\boldsymbol{m}$. Moreover, as $m\rightarrow \infty$ with fixed $k_{\mathrm{\circ}}$, the corresponding doublings converge in the appropriate sense to $\mathbb{S}^2_{\mathrm{shr}}$ covered twice. \end{theorem} \begin{proof} It follows that $k_{\circ}^{\mathrm{min}} = 2$ by combining Lemma \ref{Rk1}(ii) and \ref{Lphis}(ii). The discussion above shows that \ref{Aimm} holds, so the existence of the doublings follows immediately from Theorem \ref{Tconstruct}. \end{proof} \subsection*{The Angenent torus} $\phantom{ab}$ \nopagebreak In \cite{angenent}, Angenent constructed an embedded and $O(2)\times \mathbb{Z}_2$-invariant (in the sense of \ref{Aimm}(ii)) self-shrinking torus, which we denote in this subsection by $\mathbb{T}$. \begin{lemma} \label{Langric} $\operatorname{Ric}(\nu, \nu)>0$ on $\mathbb{T}$. \end{lemma} \begin{proof} We have (see e.g. the proof of \cite[Proposition C.2]{kapshrinker}) \begin{align*} \operatorname{Ric}(\nu, \nu) = e^{- \frac{|x|^2}{4}} \left( 1 + \frac{(x\cdot \nu_0)^2}{16} - \frac{|x|^2}{16}\right), \end{align*} where above $x$ and $\nu_0$ are the position vector field and the Euclidean unit normal to $\mathbb{T}$ and the norms and dot product are computed with respect to the Euclidean metric. From \cite[Proposition 2.1]{mollertorus} (see also \cite{Berchenko}), we have that $\max_{x\in \mathbb{T}} |x| < 3.4$ and the conclusion follows. \end{proof} \begin{theorem}[Doublings of the Angenent torus $\mathbb{T}$] \label{Tmaintor} There exists $k_{\circ}^{\mathrm{min}} \in \mathbb{N}$ such that if $k_{\mathrm{\circ}} \geq k_{\circ}^{\mathrm{min}}$, $m\in \mathbb{N}$ is large enough depending only on $k_{\mathrm{\circ}}$, and $\boldsymbol{m} \in \{m, -m, -2m\}^{\lceil k_{\mathrm{\circ}}/2\rceil}$, there is a $\mathscr{G}_m$-invariant doubling of $\mathbb{T}$ as a self-shrinker for the mean curvature flow containing one catenoidal bridge close to each singularity of one of a family of $\group_m$-invariant LD solutions as in Theorem \ref{Trldldgen} whose singularities concentrate on $k_{\mathrm{\circ}}$ parallel circles, with the number of singularities and their alignment at each circle prescribed by $\boldsymbol{m}$. Moreover, as $m\rightarrow \infty$ with fixed $k_{\mathrm{\circ}}$, the corresponding doublings converge in the appropriate sense to $\mathbb{T}$ covered twice. \end{theorem} \begin{proof} In order to apply Theorem \ref{Tconstruct}, we need only check that \ref{Aimm} holds. \ref{Aimm}(i)-(ii) hold by the discussion above. It follows from \ref{Langric} that $|A|^2 +\operatorname{Ric}(\nu, \nu)>0$ on $\mathbb{T}$ and therefore that \ref{Aimm}(iii) holds. Finally, it was checked in \cite[Theorem 2.7]{mollertorus} that the intersection of $\ker {\mathcal{L}}_{\mathbb{T}}$ with the set of $\grouprotcyl$-invariant functions on $\mathbb{T}$ is trivial. \end{proof} \begin{remark} Although we have not done so here, it would be interesting to determine the minimum number $k_{\circ}^{\mathrm{min}}$ of circles (recall \ref{Dkmin}) associated to the doublings of $\mathbb{T}$ in Theorem \ref{Tmaintor}. \end{remark} \section{Doubling the Catenoid} \label{S:Cat} \nopagebreak In this section, let $(N, g)$ be Euclidean three-space and $\Sigma$ be the Euclidean catenoid $\mathbb{K}$ parametrized by $X_\mathbb{K} : \ensuremath{\mathrm{Cyl}} \rightarrow \mathbb{R}^3$, where $X_\mathbb{K} (p, {{\ensuremath{\mathrm{s}}}}) = (\cosh {{\ensuremath{\mathrm{s}}}} \, p, {{\ensuremath{\mathrm{s}}}})$. Clearly $(\Sigma, N, g)$ is $O(2)\times \mathbb{Z}_2$-invariant in the sense of \ref{Aimm}(ii), and $X_\mathbb{K}$ satisfies \ref{LAconf}(ii) with $I = \mathbb{R}$. Moreover, $V$ and $\omega$ as in \ref{Nconf} and \ref{dLchi} satisfy \begin{align} V({{\ensuremath{\mathrm{s}}}}) = 2\operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}, \quad e^{\omega({{\ensuremath{\mathrm{s}}}})} = \cosh {{\ensuremath{\mathrm{s}}}}. \end{align} \begin{remark} \label{Rlinconf} The linearized operator ${\mathcal{L}}_{\mathbb{S}^2} = \Delta_{\mathbb{S}^2} + 2$ of an equatorial sphere $\mathbb{S}^2 \subset \mathbb{S}^3$ is conformally related to ${\mathcal{L}}_\Sigma$ by \[ {\mathcal{L}}_\Sigma = \Delta_\Sigma + | A|^2 = \frac{|A|^2}{2} \left( \Delta_{\nu^*g_{\mathbb{S}^2}} +2\right), \] where $\nu : \Sigma \rightarrow \mathbb{S}^2$ is the Gauss map, so RLD and LD studied in \cite{kapmcg} can be pulled back by $\nu$ to LD solutions on $\Sigma$. Because of this, we may use results from sections \ref{S:RLD} and \ref{S:LDs} in this section. \qed \end{remark} \begin{definition}[{\cite[2.18]{kapmcg}}] \label{dphie} Define ${\phi_{\mathrm{even}}} \in C^\infty_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}})$ and ${\phi_{\mathrm{odd}}} \in C^\infty_{{\ensuremath{\mathrm{s}}}}(\ensuremath{\mathrm{Cyl}})$ by \begin{align} {\phi_{\mathrm{even}}}({{\ensuremath{\mathrm{s}}}}) = 1-{{\ensuremath{\mathrm{s}}}} \tanh {{\ensuremath{\mathrm{s}}}}, \quad {\phi_{\mathrm{odd}}}({{\ensuremath{\mathrm{s}}}}) = \tanh {{\ensuremath{\mathrm{s}}}}. \end{align} \end{definition} \begin{lemma}[{\cite[2.19]{kapmcg}}] \label{Lphie} ${\phi_{\mathrm{even}}}$ and ${\phi_{\mathrm{odd}}}$ are even and odd in ${{\ensuremath{\mathrm{s}}}}$ respectively and satisfy ${\mathcal{L}}_\chi {\phi_{\mathrm{even}}} = 0$ and ${\mathcal{L}}_\chi {\phi_{\mathrm{odd}}} = 0$. ${\phi_{\mathrm{even}}}$ is strictly decreasing on $[0, \infty)$ and has a unique root ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}\in (0, \infty)$. ${\phi_{\mathrm{odd}}}$ is strictly increasing in $\mathbb{R}$. The Wronskian $W[ {\phi_{\mathrm{even}}}, {\phi_{\mathrm{odd}}}]$ satisfies \[ W[{\phi_{\mathrm{even}}}, {\phi_{\mathrm{odd}}}]({{\ensuremath{\mathrm{s}}}}): = {\phi_{\mathrm{even}}}({{\ensuremath{\mathrm{s}}}})\partial {\phi_{\mathrm{odd}}}({{\ensuremath{\mathrm{s}}}}) - \partial {\phi_{\mathrm{even}}}({{\ensuremath{\mathrm{s}}}}) {\phi_{\mathrm{odd}}}({{\ensuremath{\mathrm{s}}}}) = 1.\] \end{lemma} \begin{proof} Straightforward calculation using Definition \ref{dphie} and \eqref{ELchirot}. \end{proof} \begin{remark} \label{rH} By straightforward computations (recall Lemma \ref{Lphie}), \begin{align*} H({{\ensuremath{\mathrm{s}}}}) = \big( F_+^{{\phi_{\mathrm{odd}}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) - F\big) {\phi_{\mathrm{odd}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) \, {\phi_{\mathrm{even}}}({{\ensuremath{\mathrm{s}}}}) + \big( - F_+^{{\phi_{\mathrm{even}}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) + F\big) {\phi_{\mathrm{even}}}(\underline{{{\ensuremath{\mathrm{s}}}}}) \, {\phi_{\mathrm{odd}}}({{\ensuremath{\mathrm{s}}}}). \end{align*} Note also that when ${{\ensuremath{\mathrm{s}}}} \geq 0$, $H[F; {\underline{\sss}}]({{\ensuremath{\mathrm{s}}}}) = {\underline{\phi}}[1, F; {\underline{\sss}}]({{\ensuremath{\mathrm{s}}}})$ (recall \ref{dauxode}). \qed \end{remark} \begin{notation} \label{Nab} Given ${\widehat{\phi}}[F_1; \underline{\bsigma}]$ as in \ref{Pexist}, we define for $i \in \{1, \dots, k-1\}$ numbers $A_i, B_i$ by \[ {\widehat{\phi}}[F_1; \underline{\bsigma}] = A_i {\phi_{\mathrm{even}}} + B_i {\phi_{\mathrm{odd}}} \quad \text{on} \quad \ensuremath{\mathrm{Cyl}}_{[{{\ensuremath{\mathrm{s}}}}_{i}, {{\ensuremath{\mathrm{s}}}}_{i+1}]}. \] \end{notation} In contrast to the situation for the smooth at the poles $\mathbb{K}$-RLD solution ${\widehat{\phi}}[ \underline{\bsigma} : k_{\mathrm{\circ}} ]$, ${\widehat{\phi}}[ F; \boldsymbol{\sigma}]$ as defined in \ref{Pexist} above becomes severely distorted on $\ensuremath{\mathrm{Cyl}}_{({{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}_{k+1})}$ as $F \nearrow a_{k, \underline{\bsigma}}$. The following lemma makes this precise. \begin{lemma} \label{Llastring} Let ${\widehat{\phi}} = {\widehat{\phi}}[ F_1; \underline{\bsigma}]$ be as in \ref{Pexist}, where $F \in [ a_{k+1, \underline{\bsigma}}, a_{k, \underline{\bsigma}})$. The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item $\lim_{F \nearrow a_{k, \underline{\bsigma}}} {{\ensuremath{\mathrm{s}}}}_i = {{\ensuremath{\mathrm{s}}}}_i[ a_{k, \underline{\bsigma}}; \underline{\bsigma}]$ for $i=1, \dots, k$ and $\lim_{F \nearrow a_{k, \underline{\bsigma}}} {{\ensuremath{\mathrm{s}}}}_{k+1} = \infty$. \item $\lim_{F \nearrow a_{k, \underline{\bsigma}}} {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k+1}) = 0$ and $\lim_{F \nearrow a_{k, \underline{\bsigma}}}\frac{ {\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k+1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k})} = 0$. \end{enumerate} \end{lemma} \begin{proof} (i) follows immediately from Proposition \ref{Pexist}(iii). Since by \ref{dF} $F^{{\widehat{\phi}}}_+({{\ensuremath{\mathrm{s}}}}) = \partial ( \log {\widehat{\phi}})$ on any domain on which ${\widehat{\phi}}$ is smooth, we have by integrating on $({{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}_{k+1})$ that \begin{align} \label{Ephiratioint} \log \bigg( \frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{k+1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_k)}\bigg) = - \int_{{{\ensuremath{\mathrm{s}}}}_k}^{{{\ensuremath{\mathrm{s}}}}_{k+1}} F^{\widehat{\phi}}_-({{\ensuremath{\mathrm{s}}}}) \, d{{\ensuremath{\mathrm{s}}}}. \end{align} Reparametrizing the integral in \eqref{Ephiratioint} by $\big(F^{\widehat{\phi}}_-|_{[{{\ensuremath{\mathrm{s}}}}_i, {{\ensuremath{\mathrm{s}}}}_{i+1}]}\big)^{-1}$ (recall \ref{LFmono}(i)), we have \begin{equation} \label{Ephiratio2} \begin{aligned} \log\bigg(\frac{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{i+1})}{{\widehat{\phi}}({{\ensuremath{\mathrm{s}}}}_{i})}\bigg) &= -\int_{-F^{\widehat{\phi}}_{k+}}^{0} \frac{ f}{V({{\ensuremath{\mathrm{s}}}}(f))+f^2}dF-\int_{0}^{F^{\widehat{\phi}}_{k+1-}} \frac{ f}{V( {{\ensuremath{\mathrm{s}}}}(f))+f^2}df\\ &:= (I)+(II). \end{aligned} \end{equation} Note that (I) and (II) have opposite signs. To estimate (I), recall from the proof of \ref{Pexist} that $F^{\widehat{\phi}}_+({{\ensuremath{\mathrm{s}}}}) < F^{{\phi_{\mathrm{end}}}}_+({{\ensuremath{\mathrm{s}}}})$ on $({{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}')$, where ${{\ensuremath{\mathrm{s}}}}' \in ({{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}_{k+1})$ is defined by requesting that $F^{{\widehat{\phi}}}_+({{\ensuremath{\mathrm{s}}}}') = 0$. Using \ref{AV2}, we conclude that $F^{{\widehat{\phi}}}_+({{\ensuremath{\mathrm{s}}}}) < CV({{\ensuremath{\mathrm{s}}}})$ on $({{\ensuremath{\mathrm{s}}}}_k, {{\ensuremath{\mathrm{s}}}}')$, and from this we estimate $|(I)|< C F^{\widehat{\phi}}_{k+}$. For (II), we estimate \begin{equation} \begin{aligned} |(II)| &> \int_0^{F^{\widehat{\phi}}_{k+1-}} \frac{ f}{V({{\ensuremath{\mathrm{s}}}}')+ f^2} d f = \frac{1}{2} \log \bigg( 1+ \frac{F^{{\widehat{\phi}}}_{k+1-}}{V({{\ensuremath{\mathrm{s}}}}')}\bigg). \end{aligned} \end{equation} Since $\lim_{F \nearrow a_{k, \underline{\bsigma}}} {{\ensuremath{\mathrm{s}}}}' = \infty$, it follows that $\lim_{F \nearrow a_{k, \underline{\bsigma}}}V({{\ensuremath{\mathrm{s}}}}') = 0$ and we conclude the proof of (ii). \end{proof} \begin{lemma} \label{Lcatend} Let $\underline{\bsigma} = (\boldsymbol{\sigma}, {\boldsymbol{\xi}}) \in \ell^1 \left( \mathbb{R}^\mathbb{N} \right) \oplus \ell^\infty\left( \mathbb{R}^\mathbb{N}\right)$ satisfy $|{\boldsymbol{\xi}}|_{\ell^\infty}<\frac{1}{10}$. There exist constants $\underline{\epsilon}_1>0, C_1> 0$, depending only on $|\boldsymbol{\sigma}|_{\ell^1}$, such that for $k\in \mathbb{N}$, we have (recall \ref{Pexist}) $a_{k, \underline{\bsigma}}+ \underline{\epsilon}_2/k^2< a_{k-1, \underline{\bsigma}}$ and on $[ a_{k, \underline{\bsigma}} , a_{k, \underline{\bsigma}}+ \underline{\epsilon}_2/ k^2]$ we have $\frac{ \partial A_k [F; \underline{\bsigma}]}{\partial F} \Sim_{C_1} -k$ (Recall also $A_k[ a_{k, \underline{\bsigma}}; \underline{\bsigma}] = 0$). \end{lemma} \begin{remark} Lemma \ref{Lcatend} is similar to \cite[Lemma 7.4]{kapmcg}, except that in the present case, we are interested in the behavior of $A_k[F; \underline{\bsigma}]$ to the right of $a_{k, \underline{\bsigma}}$ instead of to the left, as was the case in \cite{kapmcg}. \end{remark} \begin{proof} We omit the proof because it is almost identical to the proof of \cite[Lemma 7.4]{kapmcg}. \end{proof} \begin{definition} \label{dphattau} Let $\underline{\epsilon}_2: = \underline{\epsilon}_1/C_1>0$ with $\underline{\epsilon}_1$ and $C_1>0 $ as in the statement of Lemma \ref{Lcatend}. Given $k_{\mathrm{\circ}} \in 2\mathbb{N}$ and $k: = k_{\mathrm{\circ}}/2$, $\underline{\bsigma}$ as in \ref{Lcatend}, and $\underline{a} \in (- \underline{\epsilon}_2/k, 0]$, we define ${\widehat{\phi}}[ \underline{\bsigma}, \underline{a} : k_{\mathrm{\circ}}] := {\widehat{\phi}}[ F; \underline{\bsigma}]$, where $F \in [a_{k, \underline{\bsigma}}, a_{k, \underline{\bsigma}}+\underline{\epsilon}_2/k^2]$ and $A_k[F; \underline{\bsigma}] = \underline{a}$. If $\underline{a} = 0$, we may suppress $\tau$ and write ${\widehat{\phi}}[ \underline{\bsigma}, 0 :k_{\mathrm{\circ}}] = {\widehat{\phi}}[\underline{\bsigma}: k_{\mathrm{\circ}}]$. \end{definition} By modifying the proof of \ref{Lcatend} and statement of \ref{dphattau}, we can analogously define for $\underline{a} \in (\underline{\epsilon}_2/k, 0]$ RLD solutions ${\widehat{\phi}}[\underline{\bsigma}, \underline{a} :k_{\mathrm{\circ}}]$ and $k_{\mathrm{\circ}}$ odd, $k_{\mathrm{\circ}}>1$. Moreover, by a straightforward modification of the statement and proof of \ref{Lphiavg}, we construct for $k_{\mathrm{\circ}} \in \mathbb{N}$ satisfying $k_{\mathrm{\circ}} >1$ LD solutions $\Phi\llceil\underline{\bsigma}, \underline{a}: k_{\mathrm{\circ}}, \boldsymbol{m}\rrfloor$ whose average is a multiple of ${\widehat{\phi}}[\bsigmaunder\mspace{.8mu}\!\!\!\! /+ \underline{\bsigma}, \underline{a} : k_{\mathrm{\circ}}] $. For each $\underline{a} \in (- \underline{\epsilon}_2/k, 0]$, we define LD solutions $\varphi\llbracket {\boldsymbol{\zeta}}^\top\rrbracket$ and $\varphi\llbracket {\boldsymbol{\zeta}}\rrbracket$ as in \ref{dtau1} and \ref{dtau2} but with the modified definition of $\Phi\llceil\underline{\bsigma}, \underline{a}: k_{\mathrm{\circ}}, \boldsymbol{m}\rrfloor$. Because $\mathbb{K}$ is noncompact, we must modify the definition of the initial surfaces (recall \ref{Dinit}). \begin{definition} \label{Dinitcat} Given $\varphi = \varphi\llbracket {\boldsymbol{\zeta}} \rrbracket$ as above and ${\boldsymbol{\underline{\kappa}}}$ as in \ref{dalpha} we define the smooth initial surface $$ M = M[\varphi, {\boldsymbol{\underline{\kappa}}}]:= \text{\emph{Graph}}^{\mathbb{R}^3}_{\Omega}\big( \varphi^{gl}_+\, \big) \bigcup \text{\emph{Graph}}^{\mathbb{R}^3}_{\Omega}\big(-\varphi^{gl}_-\, \big) \bigcup \bigsqcup_{p\in L} \mathbb{K}[p, \tau_p, {\underline{\kappa}}_p ], $$ where $ \Omega : = \Sigma \setminus \textstyle\bigsqcup_{p\in L} D^{\Sigma}_p( 9 \tau_p)$ and the functions $\varphi^{gl}_{\pm} = \varphi^{gl}_{\pm} [ \varphi, {\boldsymbol{\underline{\kappa}}}] : \Omega \rightarrow \mathbb{R}$ are defined as follows: \begin{enumerate}[label = \emph{(\roman*)} ] \item On $\Sigma_{\mathrm{core}}$, $\varphi^{gl}_{\pm}$ is defined as in (i)-(ii) of \ref{Dinit}, where $\Sigma_{\mathrm{core}} \subset \Sigma$ is the convex hull of $D^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}$. \item On $\Sigma_{\mathrm{end}}: = \Sigma \setminus \Sigma_{\mathrm{core}}$, $\varphi^{gl}_{\pm} = {\boldsymbol{\Psi}}[1, 2; {\mathbf{d}}^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}](\varphi, \varphi_{\mathrm{end}}^\pm)$, where $\varphi_{\mathrm{end}}^{\pm} \in C^{\infty}(\Sigma_{\mathrm{end}})$ are the unique functions whose graphs $\text{\emph{Graph}}^{\mathbb{R}^3}_{\Sigma_{\mathrm{end}}}(\pm \varphi_{\mathrm{end}}^{\pm})$ over $\Sigma_{\mathrm{end}}$ are catenoidal ends with vertical axes and initial values \[ \varphi_{\mathrm{end}}^{\pm}(p_k) = \varphi_{{{\mathrm{avg}}}}(p_k), \quad \frac{\partial \varphi_{\mathrm{end}}^\pm}{\partial {{\ensuremath{\mathrm{s}}}}}(p_k) = \lim_{{{\ensuremath{\mathrm{s}}}} \searrow {{\ensuremath{\mathrm{s}}}}_k} \frac{\partial \varphi_{{{\mathrm{avg}}}}}{\partial {{\ensuremath{\mathrm{s}}}}}. \] \end{enumerate} We define also $M_{\mathrm{end}} = \text{\emph{Graph}}^{\mathbb{R}^3}_{\Sigma_{\mathrm{end}}}(\varphi^{gl}_+)\cup \text{\emph{Graph}}^{\mathbb{R}^3}_{\Sigma_{\mathrm{end}}}(\varphi^{gl}_-)$ and $M_{\mathrm{core}} = \text{\emph{Graph}}^{\mathbb{R}^3}_{\Sigma_{\mathrm{core}}}(\varphi^{gl}_+)\cup \text{\emph{Graph}}^{\mathbb{R}^3}_{\Sigma_{\mathrm{core}}}(\varphi^{gl}_-)$. \end{definition} We need to update the definition of the global norms to deal with the ends. \begin{definition} \label{D:normcat} For $k\in \mathbb{N}, \betahat \in (0, 1), \gammahat \in \mathbb{R}$, we define \begin{align*} \| u \|_{k, \betahat, \gammahat, \gammahat'; M} : = \| u \|_{k, \betahat, \gammahat, \gammahat'; M_{\mathrm{core}}} + \| u : C^{k, \betahat}(M_{\mathrm{end}}, \frac{1}{2} |A|^2 g )\| , \end{align*} where the first term on the right hand side is as in \ref{D:norm} and $|A|$ above is the length of the second fundamental form on $M_{\mathrm{end}}$. \end{definition} \begin{lemma} \label{LglobalHcat} $\| H - J_M(w^+, w^-)\|_{0, \beta, \gamma-2, \gamma'-2; M} \le \tau_{\max}^{1+\alpha/3}$. \end{lemma} \begin{proof} Arguing as in the proof of \ref{LglobalH} and using that the graphs of $\pm \varphi_{\mathrm{end}}^{\pm}$ have zero mean curvature, we need only estimate the mean curvature on the transition region in \ref{Dinitcat}(ii). We have via \ref{Dinitcat}(ii) that \[ \varphi^{gl}_\pm = \varphi + {\boldsymbol{\Psi}}[1, 2; {\mathbf{d}}^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}](0, \varphi_{\mathrm{end}}^{\pm}- \varphi) \qquad \text{on} \quad \Sigma_{\mathrm{end}} \cap D^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}(2). \] Using \ref{con:one}(v) and the initial values in \ref{Dinitcat}(ii), note that $\| \varphi_{\mathrm{end}}^\pm - \varphi : C^k(\Sigma_{\mathrm{end}} \cap D^{g_\mathbb{K}}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}(2) ) \| \le \tau_{\max}^{3/2}.$ It now follows expanding $H'_{\pm}$ in linear and higher order terms as in the proof of \ref{Lgluingreg} that \begin{align*} \| H'_{\pm} : C^{0, \beta}(\Sigma_{\mathrm{end}} \cap D^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}(2) , g)\| \le \tau_{\max}^{3/2}, \end{align*} where $H'_{\pm}$ denotes the pushforward of the mean curvature of the graph of $\varphi^{gl}_\pm$ to $\mathbb{K}$ by $\Pi_{\mathbb{K}}$. This concludes the proof. \end{proof} \begin{definition} We define smooth surfaces $\Sigma_{\pm}$ by $\Sigma_\pm = \Sigma_{\mathrm{core}} \cup \text{\emph{Graph}}_{\Sigma_{\mathrm{end}}}( \varphi'_{\pm})$, where $\varphi'_{\pm} \in C^{\infty}(\Sigma_{\mathrm{end}})$ are defined by requesting that $\varphi'_{\pm} = \pm \varphi_{\mathrm{end}}$ on $\Sigma_{\mathrm{end}} \setminus D^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}(2)$ and \[ {\boldsymbol{\Psi}}[ 1, 2; {\mathbf{d}}^{\Sigma}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}] (0, \pm \varphi_{\mathrm{end}}). \] \end{definition} \begin{remark} Note that in the metric $h: = \frac{1}{2} |A|^2 g$, where here $g$ is the induced Euclidean metric, the ends of $\Sigma_\pm$ are isometric to spherical caps. \end{remark} We next modify the definition of ${\mathcal{R}}_{M, appr}$ to deal with the ends. For this, let $E\in C^{0, \beta}_{\mathrm{sym}[m]}(M)$, and let $E'_{\pm}$ be as in \ref{Edecom}. Using \ref{cLker}, \ref{aK}, and that $h$ is very close to the round metric on $\mathbb{S}^2$, there are unique $u'_\pm \in C^{2, \beta}_{\mathrm{sym}[m]}(\Sigma_\pm)$ and $w^{\pm}_{E, 1}\in \mathscr{K}_{\mathrm{sym}[m]}[L]$ such that \begin{align} \label{Eupcat} (\Delta_{h}+2)u'_\pm = \frac{1}{2}|A|^2 \big( E'_{\pm} + w^{\pm}_{E, 1}\big) \quad \text{on} \quad \Sigma_\pm. \end{align} \begin{notation} \label{Npmcat} If $f^{\pm}$ are functions supported on $\Sigma_{\pm} \setminus \textstyle\bigsqcup_{p\in L} D^\Sigma_p(b \tau_p)$, we define $J_M(f^+, f^-)$ to be the function on $M$ supported on $M \setminus \bigsqcup_{p\in L} D^{\mathbb{R}^3}_p(9\tau_p)$ defined by $f^+\circ \Pi_{\Sigma_+}$ on the graph of $\varphi^{gl}_{+}$ and by $f^- \circ \Pi_{\Sigma_-}$ on the graph of $- \varphi^{gl}_-$. \end{notation} Note in particular \ref{Eupcat} implies \begin{equation} \begin{gathered} {\mathcal{L}}_\Sigma u'_{\pm} = E'_{\pm} + w^{\pm}_{E, 1} \quad \text{on} \quad \Sigma_{\mathrm{core}} \quad \text{and}\\ \quad {\mathcal{L}}_{M} J_M(u'_+, u'_-) = E'_{\pm} \quad \text{on} \quad M_{\mathrm{end}}\setminus D^{\mathbb{R}^3}_{{L_{\mathrm{par}}}[{{\ensuremath{\mathrm{s}}}}_k]}(3). \end{gathered} \end{equation} We define ${\mathcal{R}}_{M, appr}$ exactly as in \ref{DRMappr}, except using the modified definitions of $u'_{\pm}$ and $J_M$ just discussed. Further, we define ${\mathcal{R}}_M$ as in the statement of \ref{Plinear} and ${\mathcal{R}}'_M$ as in the proof of \ref{Plinear2}. Define $(u, w^+_H, w^-_H) = - {\mathcal{R}}'_M(H - J_M(w^+, w^-))$. Using \ref{LglobalHcat}, the proof of \ref{Plinear}, \ref{D:normcat}, and \eqref{Eupcat}, it is not difficult to see (using separation of variables to estimate $u$ on the ends) that \begin{align} \label{Euhcat} \| w^\pm_H: C^{0, \beta}(\Sigma, g)\| + \| u\|_{2, \beta, \gamma, \gamma'; M} \le \tau_{\max}^{1+ \alpha/4}. \end{align} We next modify the estimates of the quadratic terms. Given $\phi \in C^{2, \beta}(M)$ with $\| \phi\|_{2, \beta, \gamma, \gamma'; M}\le \tau_{\max}^{1+\alpha/4}$, we have by arguing as in the proof of \ref{Lquad} and using \ref{D:normcat} that \begin{align} \label{Equadcat} \|H_\phi - H- {\mathcal{L}}_M \phi\|_{0, \beta, \gamma-2, \gamma'-2; M} \le \tau^{3/2}_{\max}. \end{align} Finally, define $(u_Q, w^+_Q, w^-_Q) = - {\mathcal{R}}'_M(H_\phi - H - {\mathcal{L}}_M \phi)$. Arguing as above, we have \begin{align} \label{Eqestcat} \| w^{\pm}_Q : C^{0, \beta}(\Sigma, g)\| + \| u_Q\|_{2, \beta, \gamma, \gamma'; M} \le \tau^{4/3}_{\max}. \end{align} \begin{lemma} \label{Ldiffeocat} There exists a family of diffeomorphisms ${\mathcal{F}}^\mathbb{K}_{{\boldsymbol{\zeta}}}: \mathbb{K}\rightarrow \mathbb{K}$, ${\boldsymbol{\zeta}} \in {{B}}_{{\mathcal{P}}}$ satisfying \ref{Azetabold}\ref{Aa}-\ref{Ab}. \end{lemma} \begin{proof} We omit the proof, which is very similar to the proof of \ref{Ldiffeoshr}. \end{proof} \begin{theorem} \label{Tmaincat} Given any integer $k_{\mathrm{\circ}} \geq 2$, and $m \in \mathbb{N}$ large enough determining only on $k_{\mathrm{\circ}}$, any $\boldsymbol{m} \in \{m, -m, -2m\}^{\lceil k_{\mathrm{\circ}}/ 2\rceil}$, and any $\underline{a} \in (- \underline{\epsilon}_2/k, 0]$ (recall \ref{dphattau}) there is a $\group_m$-invariant doubling of $\mathbb{K}$ containing one catenoidal bridge close to each singularity of one of a family of $\group_m$-invariant LD solutions as in Theorem \ref{Trldldgen} whose singularities concentrate on $k_{\mathrm{\circ}}$ parallel circles, with the number of singularities and their alignment at each circle prescribed by $\boldsymbol{m}$. Moreover, the doublings are embedded, have four ends, and as $m\rightarrow \infty$ with fixed $k_{\mathrm{\circ}}$, converge in the appropriate sense to $\mathbb{K}$ covered twice. \end{theorem} \begin{proof} We apply the steps of the proofs of Theorems \ref{Ttheory} and \ref{Trldldgen}---with small modifications because $\mathbb{K}$ is noncompact. We first check that Assumption \ref{Aimm} holds, except for the condition in \ref{Aimm}(i) that $\Sigma$ is closed. Clearly \ref{Aimm}(ii)-(iii) hold. Using the Gauss map, we can conformally identify $\mathbb{K}$ with a twice punctured sphere (recall \ref{Rlinconf}), and therefore \ref{Aimm}(iv) holds when considering solutions which extend to the poles of the sphere. By a straightforward modification of the arguments in the proof of \ref{Trldldgen}, Assumption \ref{Azetabold} holds, where ${\mathcal{F}}^\mathbb{K}_{{\boldsymbol{\zeta}}}$ are as in \ref{Ldiffeocat} and the isomorphisms $Z_{\boldsymbol{\zeta}}$ are as in \ref{dZ}. We may then apply the steps in the proof of Theorem \ref{Ttheory} except that we use the estimates \eqref{Euhcat} and \eqref{Equadcat} to replace items (2) and (4) in the proof of \ref{Ttheory}. This concludes the proof. \end{proof} \begin{remark} \label{Rcatk1} It is possible to construct doublings of $\mathbb{K}$ with $k_{\mathrm{\circ}}=1$. However, these would necessarily be immersed but not embedded because the corresponding LD solutions would be negative on the ends of $\mathbb{K}$ (recall \ref{Pexist2}, \ref{dphie}, and \ref{Nab}), so we do not study these examples in detail. \end{remark} \section{Doubling The Critical Catenoid} \label{S:ccat} \begin{definition} \label{dfbms} Let $(M^n, g)$ be a Riemannian manifold and $\Omega \subset M$ be a domain with smooth boundary. A smooth, properly immersed (in the sense that intersections with compact subsets of $\Omega$ are compact) submanifold $\Sigma^k \subset \Omega$ is a \emph{free boundary minimal submanifold} if \begin{enumerate}[label = \emph{(\roman*)} ] \item $\partial \Sigma \subset \partial \Omega$. \item $\Sigma$ is orthogonal to $\partial \Omega$ along $\partial \Sigma$. \end{enumerate} \end{definition} Let $\mathbb{B}^3:=\{\, x\in\mathbb{R}^3 \, : \, |x|\le1\,\}$ equipped with the standard Euclidean metric. By standard calculations the linearized equation for free boundary minimal surfaces in $\mathbb{B}^3$ at a free boundary minimal surface $\Sigma$ in $\Omega:= \mathbb{B}^3$ defined as in \ref{dfbms}, with unit normal (smooth) field $\nu$ and unit outward conormal field $\eta$ along $\partial \Sigma$, is given (see for example \cite[2.25, (2.31) and (2.41)]{kapli}) by the boundary value problem \begin{equation} \left\{ \,\, \label{Ejacfb} \begin{aligned} \Delta u + |A|^2 u \, &= \,\, 0 \quad \text{on} \quad \Sigma, \\ -\frac{\partial u}{\partial \eta} + u \quad &= \,\, 0 \quad \text{on} \quad \partial \Sigma. \end{aligned} \right. \end{equation} \begin{definition} \label{Dcc}Define $I: = (-{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}})$ (recall \ref{Lphie}) and an immersion $X_{\mathbb{K}_{\partial}} : \ensuremath{\mathrm{Cyl}}_{I} \rightarrow \mathbb{R}^3$ by \begin{equation} \label{Eccat} X_{\mathbb{K}_{\partial}} = \frac{ \operatorname{sech} {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}}{ {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}}\left. X_{\mathbb{K}}\right|_{\ensuremath{\mathrm{Cyl}}_I }. \end{equation} We call the image of $X_{\mathbb{K}_{\partial}}$ the \emph{critical catenoid} and denote it by $\mathbb{K}_{\partial}$. \end{definition} It is easy to check that $\mathbb{K}_{\partial}$ is a free boundary minimal surface in $\mathbb{B}^3$. Moreover, using \eqref{Ecatmetric} \begin{align} \label{Eccatmetric} e^{\omega({{\ensuremath{\mathrm{s}}}})}= \frac{ \operatorname{sech} {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}}{ {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}} \cosh {{\ensuremath{\mathrm{s}}}}, \quad V({{\ensuremath{\mathrm{s}}}}) = 2\operatorname{sech}^2 {{\ensuremath{\mathrm{s}}}}, \end{align} and it is straightforward to see that assumptions \ref{Aimm}(ii),(iii) hold. When $\Sigma = \mathbb{K}_{\partial}$, we have by \eqref{Eccat} that \eqref{Ejacfb} is equivalent to \begin{align} \label{Ejacccat} \begin{cases} {\mathcal{L}_{\chi}} u &= 0 \hfill \quad \text{on} \quad \ensuremath{\mathrm{Cyl}}_{I}\\ {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} \frac{\partial u}{\partial \eta} &= u \hfill \quad \text{on} \quad {L_{\mathrm{par}}}[ {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}]. \end{cases} \end{align} \begin{lemma} \label{Lkercc} There are no nontrivial $\grouprotcyl$-invariant solutions of \eqref{Ejacfb} on $\mathbb{K}_{\partial}$. \end{lemma} \begin{proof} This was checked in Lemma 3.18 and Remark 3.20 of \cite{kapli}. \end{proof} \begin{definition} \label{dphibd} Define a rotationally invariant function ${\phi_{\mathrm{crit}}} \in C^\infty_{{{\ensuremath{\mathrm{s}}}}}(\ensuremath{\mathrm{Cyl}})$ by \begin{align} \label{Ephibd} {\phi_{\mathrm{crit}}}({{\ensuremath{\mathrm{s}}}}) = (\operatorname{sech}^2{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} - \tanh^2{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) {\phi_{\mathrm{even}}}({{\ensuremath{\mathrm{s}}}}) - \partial {\phi_{\mathrm{even}}}({{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) {\phi_{\mathrm{odd}}}({{\ensuremath{\mathrm{s}}}}). \end{align} \end{definition} \begin{remark} \label{rphibd} ${\phi_{\mathrm{crit}}}$ appeared also in \cite[equation 3.19]{kapli}, although there it was called $\phi_{Robin}$. \end{remark} \begin{lemma} \label{Lphibd} ${\phi_{\mathrm{crit}}}$ is strictly increasing on $[0, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}]$, has a unique root ${{\ensuremath{\mathrm{s}}}}^{{\phi_{\mathrm{crit}}}}_{\mathrm{root}} \in (0, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}})$, and satisfies ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} F^{\phi_{\mathrm{crit}}}_+({{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) = 1$. \end{lemma} \begin{proof} Straightforward computation from \ref{dphibd}. \end{proof} \begin{lemma} \label{Lphi:bd} For a function $\phi \in C^1_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}}_I)$, the Robin boundary condition in \eqref{Ejacccat} is equivalent to the flux condition ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} F^\phi_+({{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) = 1$. \end{lemma} \begin{proof} This is immediate from the symmetries and the definition of $F^\phi_+$ in \ref{dF}. \end{proof} \begin{definition} \label{Dccatrld} We say $\phi \in C^0_{|{{\ensuremath{\mathrm{s}}}}|}(\ensuremath{\mathrm{Cyl}}_I)$ is a $\mathbb{K}_{\partial}$-RLD solution if $\phi$ is an RLD solution in the sense of Definition \ref{RL} which satisfies also the condition ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} F^\phi_+({{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) = 1$. \end{definition} By Definition \ref{Dccatrld} and Lemma \ref{Lphi:bd}, it follows that any $\mathbb{K}_{\partial}$-RLD solution $\phi$ coincides with a constant multiple of ${\phi_{\mathrm{crit}}}$ on $\ensuremath{\mathrm{Cyl}}_{[{{\ensuremath{\mathrm{s}}}}^\phi_k, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}]}$. In contrast to the situation for the RLD solutions established in Proposition \ref{Pexist}, the number of possible parallel circles of a $\mathbb{K}_{\partial}$-RLD solution with $\underline{\bsigma}^\phi = {\boldsymbol{0}}$ is limited: \begin{lemma} \label{Lccb} Suppose $\phi$ is a $\mathbb{K}_{\partial}$-RLD solution satisfying $\underline{\bsigma}^\phi = {\boldsymbol{0}}$. Then $k_{\mathrm{\circ}} [ \boldsymbol{\sss}^\phi] \leq 3$. \end{lemma} \begin{proof} Suppose first that ${{\ensuremath{\mathrm{s}}}}_1>0$. Let ${\widehat{\phi}} = {\widehat{\phi}}[F; {\boldsymbol{0}}]$ be as in \ref{Pexist}, where in this proof $F: = F^{{\phi_{\mathrm{crit}}}}_+({{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}})$. A numerical calculation establishes that ${{\ensuremath{\mathrm{s}}}}^{{\widehat{\phi}}}_2[F; {\boldsymbol{0}}] \approx 2.414>{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}$. The result then follows from the flux monotonicity and \ref{Pexist}(i). Next suppose that ${{\ensuremath{\mathrm{s}}}}_1 = 0$. Let $\phi = {\widecheck{\phi}}[ F; {\boldsymbol{0}}]$ (recall \ref{Pexist2}). It follows from Lemma \ref{LHmono}(i) that ${{\ensuremath{\mathrm{s}}}}^{{\widecheck{\phi}}}_2[F; {\boldsymbol{0}}]> {{\ensuremath{\mathrm{s}}}}^{{\widehat{\phi}}}_2[ F; {\boldsymbol{0}}] \approx 2.414>{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}$, where ${{\ensuremath{\mathrm{s}}}}^{{\widehat{\phi}}}_2[ F; {\boldsymbol{0}}]$ is as in the above paragraph. Using again the flux monotonicity this completes the proof. \end{proof} \begin{prop}[$\mathbb{K}_{\partial}$-RLD existence and uniqueness] \label{Pexistccat} The following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item (Two parallel circles) Given $\underline{\bsigma} = \xi \in \mathbb{R}$ satisfying $|\xi|<1$, there is a unique unit $\mathbb{K}_{\partial}$-RLD solution ${\widehat{\phi}} = {\widehat{\phi}} [ \underline{\bsigma}:2]$ satisfying $k_{\mathrm{\circ}}[\boldsymbol{\sss}^{\widehat{\phi}}] = 2$ and $\underline{\bsigma}^{\widehat{\phi}} = \xi$. Moreover ${{\ensuremath{\mathrm{s}}}}^{\widehat{\phi}}_1 \in ({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{crit}}}_{\mathrm{root}}, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}})$. \item (Three parallel circles) There exists $\underline{\epsilon}_1>0$ such that for all $\underline{\bsigma} = (\sigma, \xi) \in (- \underline{\epsilon}_1, \infty)\times (- \underline{\epsilon}_1, \underline{\epsilon}_1)$ there is a unique unit $\mathbb{K}_{\partial}$-RLD solution ${\widehat{\phi}} = {\widehat{\phi}}[ \underline{\bsigma}:3]$ satisfying $k_{\mathrm{\circ}}[\boldsymbol{\sss}^{\widehat{\phi}}] = 3$ and $\underline{\bsigma}^{\widehat{\phi}} = (\sigma, \xi)$. \end{enumerate} \end{prop} \begin{proof} We first prove (i). By \ref{LFmono}, \ref{Lphie}, and \ref{Lphibd}, the function $u: ({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{crit}}}_{\mathrm{root}}, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}) \rightarrow (0, \infty)$ defined by $u = F^{{\phi_{\mathrm{crit}}}}_+/F^{\phi_{\mathrm{even}}}_-$ is a strictly decreasing diffeomorphism. Therefore, there is a unique ${{\ensuremath{\mathrm{s}}}}_1 \in ({{\ensuremath{\mathrm{s}}}}^{\phi_{\mathrm{crit}}}_{\mathrm{root}}, {{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}})$ such that $u({{\ensuremath{\mathrm{s}}}}_1) = \frac{1+\xi}{1-\xi}$; equivalently \begin{align} \label{Exiccat} \xi = \frac{F^{{\phi_{\mathrm{crit}}}}_+({{\ensuremath{\mathrm{s}}}}_1) - F^{\phi_{\mathrm{even}}}_-({{\ensuremath{\mathrm{s}}}}_1)}{F^{\phi_{\mathrm{crit}}}_+({{\ensuremath{\mathrm{s}}}}_1) + F^{\phi_{\mathrm{even}}}_-({{\ensuremath{\mathrm{s}}}}_1)}. \end{align} By \ref{rsigbij}, \eqref{Exiccat}, and \ref{Pexist}, ${\widehat{\phi}}[2: \underline{\bsigma} ] := {\widehat{\phi}}[F^{{\phi_{\mathrm{even}}}}_-({{\ensuremath{\mathrm{s}}}}_1); \underline{\bsigma}']|_{\ensuremath{\mathrm{Cyl}}_I}$, where $\underline{\bsigma}' = (\, {\boldsymbol{0}}, (\xi, 0, 0, \dots)\, )$ (recall \ref{dsigma}), is an $\mathbb{K}_{\partial}$-RLD solution satisfying the conditions in (i). The uniqueness is clear. Proof of (ii): We first consider the case where $(\sigma, \xi) = (0, 0)$. Note first that ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}} \approx 1.1997$. Given $F>0$, denote in this proof $\phi = {\widecheck{\phi}}[F; {\boldsymbol{0}}]$ (recall the notation of \ref{Rphicheck}), where we recall that $\phi$ satisfies $\phi = {\phi_{\mathrm{even}}} + F {\phi_{\mathrm{odd}}}$ on $\ensuremath{\mathrm{Cyl}}_{[0, {{\ensuremath{\mathrm{s}}}}_1^\phi]}$ (so that in particular $F^\phi_+(0) = F$) and $F_-^\phi({{\ensuremath{\mathrm{s}}}}_1^\phi) = F$. By numerical computations, we have the following: \begin{align*} {{\ensuremath{\mathrm{s}}}}_1^{{\widecheck{\phi}}[.9; {\boldsymbol{0}}]} &\approx 1.109, \quad F^{\phi_{\mathrm{crit}}}_+( {{\ensuremath{\mathrm{s}}}}_1^{{\widecheck{\phi}}[.9; {\boldsymbol{0}}]}) \approx 1.152,\\ {{\ensuremath{\mathrm{s}}}}_1^{{\widecheck{\phi}}[1; {\boldsymbol{0}}]} &\approx 1.157, \quad F^{\phi_{\mathrm{crit}}}_+( {{\ensuremath{\mathrm{s}}}}_1^{{\widecheck{\phi}}[1; {\boldsymbol{0}}]}) \approx .902. \end{align*} Differentiating the equation $F_-^\phi({{\ensuremath{\mathrm{s}}}}_1^\phi) = F$ implicitly with respect to $F$ and using \ref{LFmono}, we conclude that $\frac{\partial {{\ensuremath{\mathrm{s}}}}^\phi_1}{\partial F}>0$. In combination with the flux monotonicity \ref{LFmono} applied to ${\phi_{\mathrm{crit}}}$, this and the preceding numerical calculations show that there is a unique $F>0$ such that $F^\phi_+({{\ensuremath{\mathrm{s}}}}_1^\phi) = F^{{\phi_{\mathrm{crit}}}}_+({{\ensuremath{\mathrm{s}}}}_1^\phi)$. This concludes the proof of (ii) in the case where $(\sigma, \xi) = (0, 0)$. The general case follows from the smooth dependence of ${{\ensuremath{\mathrm{s}}}}^{{\widecheck{\phi}}[F; \underline{\bsigma}]}_1$ on $\underline{\bsigma} = (\sigma, \xi)$, the fact that $\frac{\partial {{\ensuremath{\mathrm{s}}}}^{{\widecheck{\phi}}[F; \underline{\bsigma}]}_1}{\partial F}>0$ and the flux monotonicity by taking $\underline{\epsilon}_1>0$ small enough, in similar fashion to the case discussed above. \end{proof} \begin{figure}[h] \centering \begin{tikzpicture}[ declare function={ func(\s)= (\s <-.747)*.948*( -.389*(1-\s*tanh(\s))-1.199*tanh(\s))+ and(\s >=-.747, \s < .747)*( 1-\s*tanh(\s))+ (\s >= .747)*.948*( -.389*(1-\s*tanh(\s))+1.199*tanh(\s)) ; func2(\s)= (\s <-1.15684)*.87526*( -.389*(1-\s*tanh(\s))-1.199*tanh(\s))+ and(\s >=-1.15684, \s <=0)*( 1-\s*tanh(\s)-.966*tanh(\s))+ and(\s >=0, \s < 1.15684)*( 1-\s*tanh(\s)+.966*tanh(\s))+ (\s >= 1.15684)*.87526*( -.389*(1-\s*tanh(\s))+1.199*tanh(\s)) ; } ] \begin{axis}[ legend pos=outer north east, axis x line=middle, axis y line=left, ymin=.45, ymax=1.25, ytick={.4, .5, .6, .7, .8, .9, 1, 1.1, 1.2}, ylabel=$y$, xmin=-1.199, xmax=1.199, xtick={-1.19, -.5, 0, .5, 1.19}, xticklabels={$-{{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}$, $-.5$, $0$, $.5$, ${{{\ensuremath{\mathrm{s}}}}_{\mathrm{root}}}$}, xlabel=${{\ensuremath{\mathrm{s}}}}$, ylabel=, samples=450 ] \addplot[black, thick, domain=-2:2, ]{func(x)}; \addlegendentry{${\widehat{\phi}}[{\boldsymbol{0}}:2]$} \addplot[black, thick, dashed, domain=-2:2, ]{func2(x)}; \addlegendentry{${\widehat{\phi}}[{\boldsymbol{0}}:3]$} \end{axis} \end{tikzpicture} \caption{Profiles of the $\mathbb{K}_{\partial}$-RLD solutions ${\widehat{\phi}}[{\boldsymbol{0}}:2]$ and ${\widehat{\phi}}[{\boldsymbol{0}}:3]$. } \end{figure} \subsection*{LD Solutions} $\phantom{ab}$ \nopagebreak \begin{assumption} \label{Amcc} We assume $k_{\mathrm{\circ}} \in \{2, 3\}$, $m\in \mathbb{N}$ is as large as needed in terms of $k_{\mathrm{\circ}}$, $\boldsymbol{m} = (\pm m)$ when $k_{\mathrm{\circ}} =2$, and $\boldsymbol{m} = (\pm m, \pm m)$ or $\boldsymbol{m} = (\pm m, -2m)$ when $k_{\mathrm{\circ}} = 3$. \end{assumption} Now that we are equipped with $\mathbb{K}_{\partial}$-RLD solutions, we can apply the analysis of Section \ref{S:LDs}---with only small, mostly notational modifications, to construct and estimate LD solutions corresponding to the RLD solutions just constructed in Proposition \ref{Pexistccat}. For brevity, we remark only that the obvious modification of Lemma \ref{Lphiavg}---which constructs LD solutions from RLD solutions---holds because by Lemma \ref{Lkercc}, the boundary value problem \eqref{Ejacfb} has trivial kernel on $\mathbb{K}_{\partial}$. The remaining estimates and decompositions of the corresponding LD solutions hold essentially exactly as in Section \ref{S:LDs}. \subsection*{Initial Surfaces} $\phantom{ab}$ \nopagebreak To construct the initial surfaces and later also to perturb the initial surfaces, it will be useful to deform a surface which meets $\partial \mathbb{B}^3$ orthogonally without leaving the ball. To do this, we adopt an approach from \cite{kapwiygul} and introduce an auxiliary metric $g_A$ which makes the boundary $\mathbb{S}^2 = \partial \mathbb{B}^3$ totally geodesic. For numbers $\underline{r}, \overline{r}$ satisfying $0< \underline{r}< \overline{r} < 1$ which we will fix later, we define \begin{align*} g_A = \Omega^2 g, \quad \text{where} \quad \Omega := {\boldsymbol{\Psi}}\left[ \underline{r}, \overline{r}; {\mathbf{d}}^g_0\right](1, 0) + \frac{1}{{\mathbf{d}}^g_0} {\boldsymbol{\Psi}}\left[\underline{r}, \overline{r}; {\mathbf{d}}^g_0\right](0, 1). \end{align*} For the purposes of the following discussion, let $S$ be a properly embedded surface in $\mathbb{B}^3$; later we will take either $S = \mathbb{K}_{\partial}$ or $S$ to be an initial surface defined below. Note that the unit normal to $\partial S$ with respect to $g_A$ which points in the same direction as $\nu$ is $(\Omega \circ X)^{-1} \nu$. Now denote $X: S\rightarrow \mathbb{R}^3$ the inclusion map. Given ${\widetilde{u}} \in C^2(S)$, we define the perturbation $X_{{\widetilde{u}}}: \mathbb{K}_{\partial} \rightarrow \mathbb{R}^3$ by ${\widetilde{u}}$ of $\mathbb{K}_{\partial}$ by \begin{align*} X_{{\widetilde{u}}}(p) = \exp^{\mathbb{B}^3, g_A}_{X(p)} \left( \frac{{\widetilde{u}}(p) \nu(p)}{ (\Omega \circ X)(p)}\right). \end{align*} For ${\widetilde{u}}$ sufficiently small, $X_{\widetilde{u}}$ is an immersion, and then we denote the corresponding Euclidean normal by $\nu_{\widetilde{u}}$. On a neighborhood of $\partial S$ in $S$ we define the function $\sigma := {\mathbf{d}}^{g}_{\partial S}$; near $\partial \mathbb{K}_{\partial}$, we can take $\sigma$ to be a coordinate on $S$ whose associated coordinate vector field $\partial_\sigma$ is then the inward pointing unit conormal to $S$ along $\partial S$. We define also the boundary angle function $\Theta[{\widetilde{u}}] :\partial S \rightarrow \mathbb{R}$ by \begin{align} \label{Ethetacc} \Theta[{\widetilde{u}}]: = g( X_{{\widetilde{u}}}, \nu_{{\widetilde{u}}}). \end{align} It is shown in \cite{kapwiygul} that the condition $\Theta[{\widetilde{u}}] = 0$ is equivalent to the condition that ${\widetilde{u}}$ satisfies the Neumann condition ${\widetilde{u}}_{, \sigma} =0$. Next, let $\widetilde{{\mathcal{L}}}$ denote the linearized operator associated to the Euclidean mean curvature of $X_{\widetilde{u}}$ computed at ${\widetilde{u}} =0$. The following lemma from \cite{kapwiygul} relates $\widetilde{{\mathcal{L}}}$ to the usual Jacobi operator ${\mathcal{L}}_{S}$ on $S$ and relates the equation $\partial_\sigma {\widetilde{u}}|_{\partial S} = 0$ to a Robin boundary condition (recall \ref{Ejacfb}) for an associated function $u$. \begin{lemma}[{\cite[Lemma 5.19]{kapwiygul}}] \label{Lconvccat} Given ${\widetilde{u}} \in C^2(S)$, if we define $u \in C^2(S)$ by $u : = ( \Omega\circ X)^{-1} {\widetilde{u}}$, then \begin{enumerate}[label = \emph{(\roman*)} ] \item $\widetilde{{\mathcal{L}}} {\widetilde{u}} = {\mathcal{L}}_{S} u$. \item $\left. \partial_\sigma {\widetilde{u}}\right|_{\partial S } = ( \partial_\sigma +1) \left. u \right|_{\partial S}.$ \end{enumerate} \end{lemma} \begin{definition}[The initial surfaces] \label{Dinitccat} Given $\varphi$, ${\boldsymbol{\underline{\kappa}}}$, and $\varphi^{gl}_\pm$ as in \ref{Dinit} we define $\widetilde{\varphi}^{gl}_\pm =(\Omega \circ X) \varphi^{gl}_\pm$ (recall \ref{Lconvccat}). We then define the smooth initial surface $M = M[ \varphi, {\boldsymbol{\underline{\kappa}}}]$ in the same way as in \ref{Dinit}, except that we replace the graphs by \begin{align*} \text{\emph{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( \widetilde{\varphi}^{gl}_+\big) \quad \text{and} \quad \text{\emph{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( -\widetilde{\varphi}^{gl}_-\big). \end{align*} \end{definition} \begin{convention} \label{crunder} We now fix $\underline{r}$ and $\overline{r}$ so that $\underline{r}$ is large enough that $\bigcup_{p\in L} D^{\Sigma, g}_p(4\delta'_p)$ is contained in the set where $g_A$ coincides with the Euclidean metric. Note this is possible from \ref{Pexistccat}. \end{convention} \begin{lemma} \label{LglobalHccat} $\| H - J_M(w^+, w^-)\|_{0, \beta, \gamma-2, \gamma'-2; M} \le \tau_{\max}^{1+\alpha/3}$. \end{lemma} \begin{proof} Because $g_A$ only differs from being Euclidean outside the ball $D^{\mathbb{R}^3, g}_0(\underline{r})$, by convention \ref{crunder}, and repeating the estimates in the proof of \ref{Dinit}, we need only estimate the Euclidean mean curvature portions of the graphs \begin{align*} \text{{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( \widetilde{\varphi}^{gl}_+\big) \quad \text{and} \quad \text{{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( -\widetilde{\varphi}^{gl}_-\big) \end{align*} outside this ball. By using Lemma \ref{Lconvccat} and arguing as in the proof of \cite[Lemma 7.8]{kapwiygul} we can bound these terms and the proof is complete. \end{proof} We conclude this subsection with a discussion of perturbations of the initial surfaces. If $\phi \in C^1(M)$ is appropriately small, we denote $M_\phi = \text{Graph}_M^{\mathbb{R}^3, g_A}( \widetilde{\phi})$, where $\widetilde{\phi} = (\Omega \circ X) \phi$, and here $X: M \rightarrow \mathbb{R}^3$ is the inclusion map. We have the following estimate (recall \ref{Lquad} on the nonlinear terms of the mean curvature of $M_\phi$: \begin{lemma} \label{Lquadcc} If $M$ is as in \ref{Dinitccat} and $\phi\in C^{2,\beta}(M)$ satisfies $\|\phi\|_{2,\beta,\gamma, \gamma';M} \, \le \, \tau_{\max}^{1+\alpha/4} $, then $M_\phi$ is well defined as above, is embedded, and if $H_\phi$ is the Euclidean mean curvature of $M_\phi$ pulled back to $M$ and $H$ is the mean curvature of $M$, then we have $$ \|\, H_\phi-\, H - {\mathcal{L}}_M \phi \, \|_{0,\beta,\gamma-2, \gamma'-2;M} \, \le \, C \, \tau_{\min}^{-\alpha/2} \|\, \phi\, \|_{2,\beta,\gamma, \gamma';M}^2. $$ \end{lemma} \begin{proof} Although $M_\phi$ is defined as the normal graph of $\widetilde{\phi}$ with respect to the auxiliary metric $g_A$, Lemma \ref{Lconvccat} shows that the linear terms are given by $\widetilde{{\mathcal{L}}} \, \widetilde{\phi} = {\mathcal{L}}_M \phi$. The proof then essentially the same as that of \ref{Lquadcc} (see also \cite[Lemma 7.8]{kapwiygul}), so we omit the details. \end{proof} \subsection*{The Linearized Equation on the Initial Surfaces} $\phantom{ab}$ \nopagebreak Because the linearized equation on the initial surfaces is a boundary value problem, we need to modify the definition of ${\mathcal{R}}_{M, appr}$ in Definition \ref{DRMappr}: given $(E, E^\partial) \in C^{0, \beta}(M) \times C^{0, \beta}(\partial M)$ we will define ${\mathcal{R}}_{M, appr}(E, E^\partial) = (u_1, w^+_{E, 1}, w^{-}_{E, 1}, E_1, E^\partial_1)$, where $u_1$ is an approximate solution to the linearized equation modulo $\mathscr{K}[L]$, that is the boundary value problem \begin{equation*} \label{ELcalccat} \begin{cases} {\mathcal{L}}_M u=E+ J_M(w^+_E, w^-_E) \\ (\partial_\sigma+1)|_{\partial M} u = E^\partial \end{cases}, \quad \text{where} \quad w^\pm_E \in \mathscr{K}[L], \qquad {\mathcal{L}}_M:= \Delta_M+|A^M|^2+\operatorname{Ric}^N(\nu_{M}, \nu_{M}), \end{equation*} $w^\pm_{E, 1}$ are the $\mathscr{K}[L]$ terms, and $E_1, E^\partial_1$ are the approximation errors defined by \begin{equation} \label{EEone2} \begin{aligned} E_1&:= {\mathcal{L}}_M u_1 - E - J_M(w^{+}_{E, 1}, w^-_{E, 1}), \\ E^\partial_1 &: = (\partial_\sigma+1)|_{\partial M} u_1 - E^\partial. \end{aligned} \end{equation} Before proceeding with the definition, we need to modify the definition of $J_M$ from \ref{Npm} and define an analogous operator $J_{\partial M}$ for the boundary. \begin{notation} \label{Npm2} If $f^+$ and $f^-$ are functions supported on $\widetilde{S}'$ (recall \eqref{EStildep}), we define $J_M(f^+, f^-)$ to be the function on $M$ supported on $(\left.\Pi^{g_A}_{\mathbb{K}_{\partial}}\right|_M)^{-1}\widetilde{S}'$ defined by $f^+\circ \Pi^{g_A}_{\mathbb{K}_{\partial}}$ on $\text{{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( \widetilde{\varphi}^{gl}_+\big)$ and by $f^- \circ \Pi^{g_A}_{\mathbb{K}_{\partial}}$ on the $\text{{Graph}}^{\mathbb{R}^3, g_A}_\Omega\big( -\widetilde{\varphi}^{gl}_-\big)$. If $f^{\partial}_+$ and $f^\partial_-$ are functions defined on $\partial \mathbb{K}_{\partial}$, we define $J_{\partial M}(f^\partial_+, f^\partial_-)$ to be the function defined on $\partial M$ defined by $f^{\partial}_+\circ \Pi^{g_A}_{\mathbb{K}_{\partial}}$ on $\text{Graph}_{\partial \mathbb{K}_{\partial}}^{\mathbb{R}^3, g_A}(\widetilde{\varphi}^{gl}_+)$ and by $f^\partial_-\circ \Pi^{g_A}_{\mathbb{K}_{\partial}}$ on $\text{Graph}_{\partial \mathbb{K}_{\partial}}^{\mathbb{R}^3, g_A}( - \widetilde{\varphi}^{gl}_-)$. \end{notation} We follow the discussion before Definition \ref{DRMappr} with the following small modifications: just after the definition of $E'_{\pm}$ in \eqref{Edecom}, we define $E^\partial_{\pm} \in C^{0, \beta}(\partial \mathbb{K}_{\partial})$ by requesting that \begin{align} \label{Ejpm} J_{\partial M}(E^\partial_+, E^\partial_-) = E^\partial. \end{align} We then replace the equation \eqref{Eup} defining $u'_{\pm} \in C^{2, \beta}(\Sigma)$ and $w^{\pm}_{E, 1}$ with the equation \begin{align} \label{Eupcc} \begin{cases} {\mathcal{L}}_\Sigma u'_{\pm} = E'_{\pm} + w^{\pm}_{E,1}\\ (\partial_\sigma + 1)|_{\partial \mathbb{K}_{\partial}} u'_{\pm} = E^{\partial}_{\pm} \end{cases} \quad \text{and} \quad \forall p\in L \quad \Ecalunder_p u'_{\pm}=0. \end{align} We now define ${\mathcal{R}}_{M, appr}= (u_1, w^+_{E, 1}, w^{-}_{E, 1}, E_1, E^\partial_1)$, where $u_1, w^+_{E, 1}$, and $w^{-}_{E, 1}$ are defined as in \ref{DRMappr}, and $E_1, E^\partial_1$ are defined as in \eqref{EEone2}. We are now ready to state and prove an appropriately modified version of \ref{Plinear2} in the present setting. Note that in the statement below we only need to solve with homogeneous boundary value data because of the way we perturb using the auxiliary metric. \begin{prop} \label{Plinearcc} Recall that we assume that \ref{con:alpha}, \ref{cLker}, \ref{aK}, \ref{con:one}, and \ref{con:b} hold. A linear map $ {\mathcal{R}}_M: C^{0,\beta}(M) \to C^{2,\beta}(M) \times \mathscr{K}[L] \times \mathscr{K}[L] $ can be defined then by $$ {\mathcal{R}}_M E := (u,w^+_E, w^-_E) := \sum_{n=1}^\infty(u_n, w^+_{E,n}, w^-_{E,n}) \in C^{2,\beta}(M) \times \mathscr{K}[L]\times\mathscr{K}[L] $$ for $E\in C^{0,\beta}(M)$, where $\{(u_n,w^+_{E,n}, w^-_{E,n},E_n, E^\partial_{n})\}_{n\in \mathbb{N}}$ is defined inductively for $n\in \mathbb{N}$ by $$ (u_n,w^+_{E,n}, w^-_{E,n},E_n, E^\partial_n) := - {\mathcal{R}}_{M,appr} (E_{n-1}, E^\partial_{n-1}) \qquad\quad E_0:=-E, \quad E^\partial_0 = 0. $$ Moreover the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item ${\mathcal{L}}_M u = E + J_M(w^+_E, w^-_E)$ and $(\partial_\sigma + 1)|_{\partial M} u = 0$. \item $ \| u \|_{2, \beta, \gamma, \gamma'; M} \le C(b) \delta^{-4-2\beta}_{\min}|\log \tau_{\min}| \| E\|_{0, \beta, \gamma-2, \gamma'-2; M}$. \item $\| w^{\pm}_E : C^{0, \beta}(\Sigma, g)\| \le C \delta^{\gamma-4-2\beta}_{\min} \| E\|_{0, \beta, \gamma-2, \gamma'-2; M}$. \end{enumerate} \end{prop} \begin{proof} We need only check that $(\partial_\sigma + 1)|_{\partial M} u = 0$. Using \eqref{EEone2} and \eqref{Ejpm} and pulling back to $\partial \mathbb{K}_{\partial}$ we have \begin{align} \label{Ee1sm} E^\partial_{1\pm} = ( (\Pi^{g_A}_{\partial \mathbb{K}_{\partial}})^* \partial_\sigma +1) u'_{1\pm} = ( (\Pi^{g_A}_{\partial \mathbb{K}_{\partial}})^* \partial_\sigma - \partial_\sigma )|_{\partial \mathbb{K}_{\partial}} u'_{1\pm}, \end{align} where the second equality follows by combining with \eqref{Eupcc} and using that $E^\partial_0 = 0$. It follows by a straightforward inductive argument that \begin{align} \label{Eeism} ( ( \Pi^{g_A}_{\partial \mathbb{K}_{\partial}})^* \partial_\sigma +1) u'_{i\pm} = E^\partial_{i\pm} - E^\partial_{i-1\pm} \quad \text{and} \quad E^\partial_{i\pm} = (( \Pi^{g_A}_{\partial \mathbb{K}_{\partial}})^* \partial_\sigma- \partial_\sigma) u'_{i\pm}. \end{align} We have then for any $n\in \mathbb{N}$ \begin{align*} (( \Pi^{g_A}_{\partial \mathbb{K}_{\partial}})^* \partial_\sigma +1) \sum_{i=1}^n u'_{i\pm} = E^\partial_{n\pm}. \end{align*} Estimating the smallness of $E^\partial_{1\pm}$ using \eqref{Ee1sm} and inductively estimating $E^\partial_{n\pm}$ using \eqref{Eeism}, we conclude that for any $n\in \mathbb{N}$, \[ \bigg\| (\partial_\sigma +1)|_{\partial M} \sum_{i=1}^n u_i : C^{1, \beta}(\partial M, g)\bigg\| < 2^{-n},\] and from this we conclude that $(\partial_\sigma + 1)|_{\partial M} u = 0$. \end{proof} \subsection*{The main theorem} $\phantom{ab}$ \nopagebreak \begin{theorem} \label{Tmainccat} Let $k_{\mathrm{\circ}} \in \{2, 3\}$. For all $m\in \mathbb{N}$ sufficiently large and $\boldsymbol{m} =\pm m$ in the case $k_{\mathrm{\circ}} = 2$, and $\boldsymbol{m} = (\pm m, -2m)$ or $\boldsymbol{m} = (\pm m, \pm m)$ in the case $k_{\mathrm{\circ}} = 3$, there is a $\mathscr{G}_m$-invariant doubling of $\mathbb{K}_{\partial}$ as a free boundary minimal surface in $\mathbb{B}^3$ with four boundary components. It contains one catenoidal bridge close to each singularity of one of a family of $\group_m$-invariant LD solutions as in Theorem \ref{Trldldgen} whose singularities concentrate on $k_{\mathrm{\circ}}$ parallel circles, with the number of singularities and their alignment at each circle prescribed by $\boldsymbol{m}$. Moreover, as $m\rightarrow \infty$ with fixed $k_{\mathrm{\circ}}$, the corresponding doublings converge in the appropriate sense to $\mathbb{K}_{\partial}$ covered twice. \end{theorem} \begin{proof} The structure of the proof is the same as that of \ref{Tmainsph}, except that Theorem \ref{Ttheory} cannot be applied directly because of the boundary and the free boundary condition. However, we can still carry out steps (1)-(6) in the proof of \ref{Ttheory}, where we use \ref{Plinearcc} instead of \ref{Plinear2} and \ref{Lquadcc} to estimate the quadratic terms instead of \ref{Lquad}. We then conclude a fixed point of the map ${\mathcal{J}}$ in \ref{Tfp}. It follows as in \ref{Ttheory} that $(M\llbracket {\widehat{\zetaboldunder}} \rrbracket)_{{\widehat{\upphi}}}$ is smooth and minimal; moreover $(M\llbracket {\widehat{\zetaboldunder}} \rrbracket)_{{\widehat{\upphi}}}$ intersects $\partial \mathbb{B}^3$ othogonally because ${\widehat{\upphi}}$ satisfies the Robin boundary condition $(\partial_\sigma+1)|_{M} {\widehat{\upphi}} = 0$ (recall \ref{Plinearcc}(i), the discussion just below \eqref{Ethetacc}, and \ref{Lconvccat}). \end{proof} \appendices \section*{Appendices} \section{Fermi Coordinates} \label{Sfermi} In this appendix we define a modification of the standard exponential map we call \emph{Fermi exponential map}, and we collect some facts about the corresponding Fermi coordinates in Lemma \ref{Lgauss}, most of which can be found for example in \cite{Gray}. \begin{definition}[Fermi exponential map] \label{dexp} We assume given a hypersurface $\Sigma^n$ in a Riemannian manifold $(N^{n+1}, g)$ and a unit normal $\nu_p \in T_p N$ at some $p\in\Sigma$. For small enough $\delta$, the map $\exp^{\Sigma,N,g}_p : \widehat{D}^{\Sigma, N, g}_p (\delta) \to N$, defined by \begin{gather*} \widehat{D}^{\Sigma, N, g}_p (\delta) := \{v+ z\nu_p \, : \, v\in D_0^{T_p\Sigma, \left. g\right|_p} (\delta) \subset T_p\Sigma, \, z\in (-\delta,\delta) \, \} \subset T_p N, \\ \exp^{\Sigma,N,g}_p (v+ z\nu_p ) := \exp^{N,g}_q( z\nu_v) \quad \text{ for } v\in D_0^{T_p\Sigma, \left. g\right|_p} (\delta), \, z\in (-\delta,\delta), \, q:=\exp^{\Sigma,g}_p(v), \end{gather*} and $\nu_v\in T_qN$ a unit normal to $\Sigma$ at $q$ extending $\nu_p$ at $v=0$ continuously with respect to $v$, is a diffeomorphism onto its image $D^{\Sigma, N, g}_p (\delta)\subset N$. We define the \emph{injectivity radius ${\mathrm{inj}}^{\Sigma, N, g}_p$ of $(\Sigma,N,g)$ at $p$} to be the supremum of such $\delta$'s. Finally when $\delta< {\mathrm{inj}}^{\Sigma, N, g}_p$ we define on $D^{\Sigma, N, g}_p (\delta)$ the following. \begin{enumerate}[label=\emph{(\alph*)}] \item $\Pi_\Sigma : D^{\Sigma, N, g}_p (\delta) \to \Sigma\cap D^{\Sigma, N, g}_p (\delta)$ is the nearest point projection in $(D^{\Sigma, N, g}_p (\delta) \, , g)$. Alternatively $\Pi_\Sigma$ corresponds through $\exp^{\Sigma,N,g}_p$ to orthogonal projection to $T_p\Sigma$ in $(T_p N, \left. g \right|_p)$. \item $\ensuremath{\mathrm{z}}: D^{\Sigma, N, g}_p (\delta) \to (-\delta,\delta)$ is the signed distance from $\Sigma\cap D^{\Sigma, N, g}_p (\delta)$ in $(D^{\Sigma, N, g}_p (\delta) \, , g)$. Alternatively $\ensuremath{\mathrm{z}} \circ \exp^{\Sigma,N,g}_p (v) \, \nu_p$ is the orthogonal projection of $v$ to $\left< \nu_p \right>$ in $(T_p N, \left. g \right|_p)$ $\forall v\in \widehat{D}^{\Sigma, N, g}_p (\delta)$. \item A foliation by the level sets $\Sigma_z :=\ensuremath{\mathrm{z}}^{-1}(z)\subset \widehat{D}^{\Sigma, N, g}_p (\delta) $ for $z\in(-\delta,\delta)$. \item Tensor fields $g^{\Sigma,\ensuremath{\mathrm{z}}}$, $A^{\Sigma,\ensuremath{\mathrm{z}}}$ and $B^{\Sigma,\ensuremath{\mathrm{z}}}$ by requesting that on each level set $\Sigma_z$ they are equal to the first and second fundamental forms and Weingarten map of $\Sigma_z$ respectively. \end{enumerate} \end{definition} \begin{remark} \label{R:complete} Note if $\Sigma$ and $N$ are both complete with respect to $g$ in \ref{dexp}, then $\exp^{\Sigma,N,g}_p $ is well defined on $T_pN$ by the same definition, even in the case ${\mathrm{inj}}^{\Sigma, N, g}_p<\infty$. \end{remark} \begin{example}[Clifford torus, cf. {\cite[p. 263-264]{kapouleas:clifford}}] \label{exClifford} We identify $\mathbb{R}^4$ with $\mathbb{C}^2$ and let $N:=\mathbb{S}^3 \subset \mathbb{C}^2$, $\mathbb{T} := \{ (z_1, z_2) \in \mathbb{C}^2: |z_1| = |z_2| = 1/\sqrt{2}\} \subset \mathbb{S}^3$ be the Clifford torus, and $p = (1/\sqrt{2}, 1/\sqrt{2}) \in \mathbb{T}$. There is then a linear isomorphism $\breve{E}:\mathbb{R}^3\to T_p\mathbb{S}^3$ such that the map ${\widetilde{E}} := \exp^{\mathbb{T},\mathbb{S}^3,g}_p \circ \breve{E} :\mathbb{R}^3\to \mathbb{S}^3$ (called $\Phi$ in \cite{kapouleas:clifford}) satisfies $$ \begin{gathered} {\widetilde{E}}({{\ensuremath{\mathrm{x}}}}, \ensuremath{\mathrm{y}}, \ensuremath{\mathrm{z}}) = \left( \sin(\ensuremath{\mathrm{z}} + \textstyle{\frac{\pi}{4}}) e^{\sqrt{2} {{\ensuremath{\mathrm{x}}}} i } \, , \, \cos(\ensuremath{\mathrm{z}}+ \textstyle{\frac{\pi}{4}}) e^{\sqrt{2} \ensuremath{\mathrm{y}} i } \right) \in \mathbb{S}^3 \subset \mathbb{C}^2 \\ \text{and } {\widetilde{E}}^* g = (1+\sin 2\ensuremath{\mathrm{z}}) d{{\ensuremath{\mathrm{x}}}}^2 + (1- \sin 2\ensuremath{\mathrm{z}}) d\ensuremath{\mathrm{y}}^2 + d\ensuremath{\mathrm{z}}^2. \end{gathered} $$ \end{example} \begin{example}[Cylindrical Fermi coordinates about $\mathbb{S}^2_{\mathrm{eq}}$ in $\mathbb{S}^3$] \label{exSph} Let $N:=\mathbb{S}^3 \subset \mathbb{R}^4$, $\mathbb{S}^2_{\mathrm{eq}}$ be the equatorial two-sphere in the round three-sphere $\mathbb{S}^3$, and $p = (0, 0, 1, 0)\in \mathbb{S}^2_{\mathrm{eq}}$. There is then a ``spherical coordinates parametrization'' $\breve{E}:\mathbb{R}^3\to T_p\mathbb{S}^3$ such that the map ${\widetilde{E}} := \exp^{\mathbb{S}^2_{\mathrm{eq}},\mathbb{S}^3,g}_p \circ \breve{E} :\mathbb{R}^3\to \mathbb{S}^3$ (which is equivalent to the map $\Theta$ in \cite[(2.2)]{kap}) satisfies \begin{align*} {\widetilde{E}}( \ensuremath{\mathrm{r}}, \theta, \ensuremath{\mathrm{z}}) = & ( \sin \ensuremath{\mathrm{r}} \cos \theta \cos \ensuremath{\mathrm{z}}, \sin \ensuremath{\mathrm{r}} \sin \theta \cos\ensuremath{\mathrm{z}}, \cos \ensuremath{\mathrm{r}} \cos \ensuremath{\mathrm{z}}, \sin \ensuremath{\mathrm{z}}), \\ {\widetilde{E}}^* g = & \cos^2 \ensuremath{\mathrm{z}}\left( d \ensuremath{\mathrm{r}}^2 + \sin^2 \ensuremath{\mathrm{r}} d \theta^2\right) + d\ensuremath{\mathrm{z}}^2, \end{align*} and the only nonvanishing Christoffel symbols in the $(\ensuremath{\mathrm{r}}, \theta, \ensuremath{\mathrm{z}})$ coordinates are \begin{equation*} \begin{gathered} \Gamma_{\ensuremath{\mathrm{r}} \ensuremath{\mathrm{z}}}^{\ensuremath{\mathrm{r}}} = \Gamma_{\ensuremath{\mathrm{z}} \ensuremath{\mathrm{r}}}^{\ensuremath{\mathrm{r}}}= \Gamma_{\theta \ensuremath{\mathrm{z}}}^{\theta} = \Gamma_{\ensuremath{\mathrm{z}} \theta}^{\theta} = - \tan \ensuremath{\mathrm{z}}, \quad \Gamma_{\theta \theta}^\ensuremath{\mathrm{r}} = - \sin \ensuremath{\mathrm{r}} \cos \ensuremath{\mathrm{r}}, \\ \Gamma_{\ensuremath{\mathrm{r}}\theta}^{\theta} = \Gamma_{\theta \ensuremath{\mathrm{r}}}^{\theta} = \cot \ensuremath{\mathrm{r}}, \quad \Gamma_{\ensuremath{\mathrm{r}}\rr}^{\ensuremath{\mathrm{z}}} = \cos \ensuremath{\mathrm{z}} \sin \ensuremath{\mathrm{z}}, \quad \Gamma_{\theta \theta}^{\ensuremath{\mathrm{z}}} = \sin^2 \ensuremath{\mathrm{r}} \sin \ensuremath{\mathrm{z}} \cos \ensuremath{\mathrm{z}} . \end{gathered} \vspace{-.27in} \end{equation*} \qed \end{example} \begin{lemma}[Properties of Fermi coordinates] \label{Lgauss} Assuming $\delta< {\mathrm{inj}}^{\Sigma, N, g}_p$ as in \ref{dexp}, and with the same notation, the following hold on $D^{\Sigma, N, g}_p (\delta)\subset N$. \begin{enumerate}[label=\emph{(\roman*)}] \item $g_{\ensuremath{\mathrm{z}} \ensuremath{\mathrm{z}}} =1$ and $\nabla_{\partial_\ensuremath{\mathrm{z}}} \partial_\ensuremath{\mathrm{z}} = 0$. \item $g = g^{\Sigma,{\zz}}+ d\ensuremath{\mathrm{z}}^2$. \item ${\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} g^{\Sigma,{\zz}} = - 2 A^{\Sigma,\ensuremath{\mathrm{z}}}$. \item ${\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} B^{\Sigma,\ensuremath{\mathrm{z}}} = B^{\Sigma,\ensuremath{\mathrm{z}}}\circ B^{\Sigma,\ensuremath{\mathrm{z}}} - \operatorname{R}_{\partial_\ensuremath{\mathrm{z}}}$ and ${\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} A^{\Sigma,\ensuremath{\mathrm{z}}} = - \left( A^{\Sigma,\ensuremath{\mathrm{z}}}* A^{\Sigma,\ensuremath{\mathrm{z}}} + \operatorname{Rm}_{{\partial_\ensuremath{\mathrm{z}}}}\right)$. \item $g^{\Sigma,{\zz}} = \Pi^*_\Sigma g^\Sigma - 2 \ensuremath{\mathrm{z}} \Pi^*_\Sigma A^\Sigma + \ensuremath{\mathrm{z}}^2 \Pi^*_\Sigma\left( A^\Sigma * A^{\Sigma} + \operatorname{Rm}^\Sigma_\nu \right) + \ensuremath{\mathrm{z}}^3 h^{\mathrm{err}}$, where $h^{\mathrm{err}}$ is a smooth symmetric two-tensor on $D^{\Sigma, N, g}_p (\delta)\subset N$. \end{enumerate} \end{lemma} \begin{proof} (i) follows immediately from Definition \ref{dexp}. Next we compute \begin{align} \label{E2ff} \left( {\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} g\right)_{ij} = g_{ij, \ensuremath{\mathrm{z}}} = \langle \nabla_{\partial_i} {\partial_\ensuremath{\mathrm{z}}}, \partial_j\rangle+ \langle \partial_{i}, \nabla_{\partial_j}{\partial_\ensuremath{\mathrm{z}}}\rangle, \end{align} where the indices $i,j$ refer to the $\Sigma$ exponential coordinates. With (i), this implies $g_{i\ensuremath{\mathrm{z}}, \ensuremath{\mathrm{z}}} = \frac{1}{2}g_{\ensuremath{\mathrm{z}}\zz, i} = 0$ and (ii) follows, since $g_{i \ensuremath{\mathrm{z}}} = \delta_{i\ensuremath{\mathrm{z}}}$ on $\Sigma$. (iii) follows from \eqref{E2ff} and (ii). Next note that any $X$ satisfying $[X, {\partial_\ensuremath{\mathrm{z}}}] =0$ satisfies $\nabla_{\partial_\ensuremath{\mathrm{z}}} X = \nabla_X {\partial_\ensuremath{\mathrm{z}}} = -BX$; then \begin{align*} \left(\nabla_{\partial_\ensuremath{\mathrm{z}}} B\right) X = -\nabla_{\partial_\ensuremath{\mathrm{z}}} \nabla_X {\partial_\ensuremath{\mathrm{z}}} - B \left(\nabla_{\partial_\ensuremath{\mathrm{z}}} X\right) = - \operatorname{R}({\partial_\ensuremath{\mathrm{z}}}, X){\partial_\ensuremath{\mathrm{z}}} + B^2 X. \end{align*} The first equation of (iv) follows after noting that ${\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} B^{\Sigma,\ensuremath{\mathrm{z}}}= \nabla_{\partial_\ensuremath{\mathrm{z}}} B - (\nabla {\partial_\ensuremath{\mathrm{z}}})\circ B^{\Sigma,\ensuremath{\mathrm{z}}} + B^{\Sigma,\ensuremath{\mathrm{z}}} \circ \nabla {\partial_\ensuremath{\mathrm{z}}}$ and the second equation follows from the first by lowering an index and using (iii). (v) follows via the preceding parts and Taylor's theorem. \end{proof} \begin{remark} \label{rFermiH} Straightforward calculations using \ref{Lgauss} recover the usual formulas for the first variations of volume $dV^{\Sigma,\ensuremath{\mathrm{z}}}$ and mean curvature $H^{\Sigma,\ensuremath{\mathrm{z}}}$ along the parallel surfaces $\Sigma_\ensuremath{\mathrm{z}}$: \begin{align*} {\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} dV^{\Sigma,\ensuremath{\mathrm{z}}} &= \left(\mathrm{div}_{\Sigma_\ensuremath{\mathrm{z}}} {\partial_\ensuremath{\mathrm{z}}}\right) dV^{\Sigma,\ensuremath{\mathrm{z}}} = H^{\Sigma,\ensuremath{\mathrm{z}}} dV^{\Sigma,\ensuremath{\mathrm{z}}}, \\ \phantom{lkkkkkkkkkkkkkkk} {\mathscr{L}}_{{\partial_\ensuremath{\mathrm{z}}}} H^{\Sigma,\ensuremath{\mathrm{z}}} &= {\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} \operatorname{tr} B^{\Sigma,\ensuremath{\mathrm{z}}} = \operatorname{tr} \left( {\mathscr{L}}_{\partial_\ensuremath{\mathrm{z}}} B^{\Sigma,\ensuremath{\mathrm{z}}}\right) = | B^{\Sigma,\ensuremath{\mathrm{z}}} |^2 + \operatorname{Ric}({\partial_\ensuremath{\mathrm{z}}}, {\partial_\ensuremath{\mathrm{z}}}). \phantom{lkkkkkkkkkkkkkkk} \qed \end{align*} \end{remark} \section{Tilted Graphs} \label{A:tilt} In this appendix, we study tilting rotations $\mathsf{R}_\kappa$ defined in \ref{dRk}. Given $V, W$ as in \ref{dRk}, choose orientations for $V$ and $W$ and further identify $W$ with $\mathbb{R}^3$ by choosing an orthonormal frame. \begin{lemma} \label{Lrot} $\mathsf{R}_\kappa$ depends smoothly on $\kappa$. Moreover, the following hold. \begin{enumerate}[label=\emph{(\roman*)}] \item For $\kappa \neq 0$, $\mathsf{R}_{\kappa}$ is the right-handed rotation of angle $\theta_{\kappa}$ about $\vec{v}$, where $\theta_{\kappa}: = \arctan |\kappa|$, $|\kappa | := \sup_{|v| = 1} \kappa(v)$, and $\{ \vec{v}, \vec{v}^\perp\}$ is the positively oriented orthonormal frame for $\mathbb{R}^2$ defined by requesting that $\kappa = | \kappa | \langle \vec{v}^\perp, \cdot \rangle$. \item For any $w\in \mathbb{R}^3$, $\mathsf{R}_\kappa (w) = (\cos \theta_\kappa ) w +( \sin \theta_\kappa ) \vec{v}\times w + (1-\cos \theta_\kappa) \langle w, \vec{v}\rangle \vec{v}.$ \end{enumerate} \begin{proof} By \ref{dRk} we have $\mathsf{R}_\kappa = \exp(\frac{\theta_\kappa}{|\kappa|}K_\kappa)$, where $\exp : \mathfrak{so}(3)\rightarrow SO(3)$ is the exponential map and $K_\kappa \in \mathfrak{so}(3)$ is defined by requesting that $K_\kappa v = (\kappa(e_2), -\kappa(e_1), 0) \times v$ for $v\in \mathbb{R}^3$, where here $\times$ is the cross product. Since $K_\kappa$ and $\frac{\theta_\kappa}{|\kappa|}$ depend smoothly on $\kappa$, the smoothness of $\mathsf{R}_\kappa$ follows. By properties of the exponential map, $\mathsf{R}_\kappa$ is a right-handed rotation of angle $\theta_\kappa$ about vector $\frac{1}{|\kappa|}( \kappa(e_2), -\kappa(e_1), 0)$, which is $\vec{v}$ since clearly $\vec{v}^\perp = \frac{1}{|\kappa|}(\kappa(e_1), \kappa(e_2), 0)$. (ii) is standard and is known as Rodrigues' formula. \end{proof} \end{lemma} \begin{definition} \label{drotdiff} Given $u: \Omega \rightarrow \mathbb{R}$, where $\Omega \subset \mathbb{R}^2$, we define $\Gamma_u : \Omega \rightarrow \mathbb{R}^3$ by $\Gamma_u(p) = (p, u(p))$. Moreover, for any $\kappa \in T^*_0 \mathbb{R}^2$, define $\mathsf{D}_{u, \kappa}: \Omega \rightarrow \mathbb{R}^2$ and $\Omega_{u, \kappa}\subset \mathbb{R}^2$ by $\mathsf{D}_{u, \kappa} := \Pi \circ \mathsf{R}_\kappa \circ \Gamma_u$ and $\Omega_{u, \kappa} := \mathsf{D}_{u, \kappa}(\Omega)$, where $\Pi: \mathbb{R}^3\rightarrow \mathbb{R}^2$ is orthogonal projection. If furthermore $\mathsf{D}_{u, \kappa}$ is a bijection, we define $u_\kappa : \Omega_{u, \kappa} \rightarrow \mathbb{R}$ by requesting that $\Gamma_{u_\kappa} = \mathsf{R}_\kappa \circ \Gamma_u \circ \mathsf{D}^{-1}_{u, \kappa}$. Note then that the following diagram commutes: \begin{equation} \label{ediag2} \begin{tikzcd} \mathbb{R}^3 \arrow[r, rightarrow, "\mathsf{R}_\kappa"] & \mathbb{R}^3 \arrow[d, rightarrow, "\Pi"']\\ \Omega \arrow[r, rightarrow, "\mathsf{D}_{u, \kappa}"] \arrow[u, rightarrow, "\Gamma_u"] & \Omega_{u, \kappa} \arrow[u, bend right=25 , "\Gamma_{u_\kappa}"'] . \end{tikzcd} \end{equation} \end{definition} \begin{lemma} \label{Lcatgraph} Suppose $\| u \|_{\mathrm{Lip}} : = \displaystyle{\sup_{x, y\in \Omega, x\neq y} \frac{| u(x) - u(y)|}{|x-y|} < \infty}$. For $\kappa$ small enough in terms of $\| u \|_{\mathrm{Lip}} $, $\mathsf{D}_{u, \kappa}$ is a bijection. If moreover $u\in C^1(\Omega)$ and $\Omega$ is a domain, $\mathsf{D}_{u, \kappa}$ is a diffeomorphism. \end{lemma} \begin{proof} Note that $\| u \|_{\mathrm{Lip}}$ implies a uniform upper bound on the angle between the horizontal and the chord joining two distinct points on the graph of $u$. Therefore, for small enough $\kappa$, $\mathsf{D}_{u, \kappa}$ is bijective. Now define $\Phi: T^*_0 \mathbb{R}^2 \times \mathbb{R}^2 \times \Omega \rightarrow \mathbb{R}^2$ by \begin{align*} \Phi( \kappa, p , q) = p-\mathsf{D}_{u, \kappa}(q). \end{align*} Let $(y^1, y^2)$ denote the standard coordinates of $\Omega$. Fix $p_0\in \Omega$. Observe that $\left.\frac{\partial \Phi}{\partial y}\right|_{(0, p_0, p_0)} = \text{Id}_{\mathbb{R}^2}$. By the implicit function theorem, there exists a neighborhood $U \subset T^*_0\mathbb{R}^2\times \mathbb{R}^2$ of $(0, p_0)$, a neighborhood $V \subset \Omega$ of $p_0$, and a smooth map $F : U \rightarrow V$ such that $\Phi^{-1}( {\boldsymbol{0}}) \cap\left( U \times V\right)$ is the graph of $F$. In particular, given $(\kappa, p)\in U$, then $\Phi( \kappa, p, F(\kappa, p)) = 0$, hence $p = \mathsf{D}_{u, \kappa}(F(\kappa, p))$. This implies $\mathsf{D}_{u, \kappa}$ is a local diffeomorphism. Since $\mathsf{D}_{u, \kappa}$ is bijective, the conclusion follows. \end{proof} From \ref{Lrot}(ii) and \eqref{ediag2} we have \begin{align} \begin{gathered} \label{epsi2} \mathsf{D}_{u, \kappa}(p) = p + (\cos \theta_\kappa -1) \langle p, \vec{v}^{\perp} \rangle \vec{v}^\perp - (\sin \theta_\kappa) u(p) \vec{v}^\perp,\\ u_\kappa = \langle \vec{v}^{\perp}, \mathsf{D}^{-1}_{u, \kappa}\rangle \sin \theta_\kappa + u\circ \mathsf{D}^{-1}_{u, \kappa} \cos \theta_\kappa. \end{gathered} \end{align} \begin{assumption} \label{Aukappa} We assume now that $u \in C^\infty(\Omega)$ for $\Omega$ a domain and for each positive integer $k$ concerned that $|\kappa|$ is as small as needed in terms of $\| u : C^k(\Omega)\|$, in particular that $|\kappa | \| u : C^k ( \Omega)\| < 1$. \end{assumption} \begin{lemma} \label{Lutheta} The following estimates hold, where $R_\Omega$ is the smallest radius such that $\Omega \subset D_0(R_\Omega)$. \begin{enumerate}[label=\emph{(\roman*)}] \item \begin{enumerate}[label=\emph{(\alph*)}] \item $\| \mathsf{D}^{-1}_{u, \kappa}- \mathrm{Id}_{\mathbb{R}^2} : C^0( \Omega_{u, \kappa}) \| \le 2R_\Omega |\kappa|^2 + |\kappa| \| u : C^0(\Omega_{u, \kappa})\| $. \item $\| d( \mathsf{D}^{-1}_{u, \kappa} - \mathrm{Id}_{\mathbb{R}^2}) : C^k( \Omega_{u, \kappa}) \| \le C(k)\left( |\kappa| \| u : C^k(\Omega_{u, \kappa})\| + |\kappa|^2\right)$. \end{enumerate} \item $\| u \circ \mathsf{D}^{-1}_{u, \kappa}: C^k( \Omega_{u, \kappa}) \| \le C(k) \| u : C^k(\Omega_{u, \kappa})\| $. \item $\| u \circ \mathsf{D}^{-1}_{u, \kappa} - u : C^k(\Omega_{u, \kappa}) \| \le C(k) \| u : C^{k+1}( \Omega_{u, \kappa}) \| \| \mathsf{D}^{-1}_{u, \kappa} - \mathrm{Id}_{\mathbb{R}^2} : C^k(\Omega_{u, \kappa})\| $. \item $\| u_\kappa : C^k(\Omega) \| \le C(k) \| u: C^k(\Omega)\| + C |\kappa | R_\Omega$. \end{enumerate} \end{lemma} \begin{proof} Using \eqref{epsi2} we have \begin{align*} \mathsf{D}^{-1}_{u, \kappa}- \mathrm{Id}_{\mathbb{R}^2} = (1-\cos \theta_\kappa) \langle \mathsf{D}^{-1}_{u, \kappa}, \vec{v}^\perp\rangle \vec{v}^\perp + u \circ \mathsf{D}^{-1}_{u, \kappa} \sin \theta_\kappa. \end{align*} The $C^0$ estimate follows from this and \eqref{epsi2}, which supplies a $C^0$ estimate for $\mathsf{D}^{-1}_{u, \kappa}$. Next, the chain rule formula $d_{\mathsf{D}^{-1}_{u, \kappa}(p)} \mathsf{D}_{u, \kappa} \circ d_p \mathsf{D}^{-1}_{u, \kappa}= \mathrm{Id}$ and \eqref{epsi2} implies that \begin{align} \label{epsiA} d_p \mathsf{D}^{-1}_{u, \kappa} = \sum_{n=0}^\infty (-1)^n A_p^n, \quad \text{where} \quad A_p: = d_{\mathsf{D}^{-1}_{u, \kappa}(p)} \left((\cos \theta_\kappa -1) \langle p, \vec{v}^{\perp} \rangle - (\sin \theta_\kappa) u \right)\vec{v}^\perp. \end{align} This implies the $C^1$ estimate in (i). The higher derivative estimates follow from differentiating \eqref{epsiA}, using the chain rule, and estimating using assumption \ref{Aukappa}. The $C^0$ estimate in (ii) is immediate. From the chain rule, it follows that \[ \left\| d \left(u \circ \mathsf{D}^{-1}_{u, \kappa}\right) : C^{k-1}(\Omega_{u, \kappa}) \right\| \le C(k) \|(d u) \circ\mathsf{D}^{-1}_{u, \kappa} : C^{k-1}(\Omega_{u, \kappa})\| \left\| d \mathsf{D}^{-1}_{u, \kappa}: C^{k-1}(\Omega_{u, \kappa})\right\|,\] and (ii) follows from this, (i), and induction. The $C^0$ estimate in (iii) follows from the mean value theorem and (i). We prove the general estimate by induction on $k$. Differentiating $u \circ \mathsf{D}^{-1}_{u, \kappa} - u$ and adding and subtracting $(d u)\circ \mathsf{D}^{-1}_{u, \kappa}$, we have \begin{align*} d \left( u \circ \mathsf{D}^{-1}_{u, \kappa}- u \right) = (d u) \circ \mathsf{D}^{-1}_{u, \kappa} \circ d \left(\mathsf{D}^{-1}_{u, \kappa} -\mathrm{Id}_{\mathbb{R}^2}\right) +(d u)\circ \mathsf{D}^{-1}_{u, \kappa} - d u. \end{align*} The estimate in (iii) then follows by using (ii) to estimate the first term on the right hand side above and a recursive argument to estimate the second. (iv) follows by estimating \eqref{epsi2} using (i) and (ii). \end{proof} \begin{lemma} \label{Ltiltgap}$ \| u_{\kappa}- u - \kappa : C^k(\Omega_{u, \kappa}\cap \Omega)\| \le C(k)(1+R_\Omega) \left( \| u: C^{k+1}(\Omega)\|+ |\kappa| \right)^3$, where $R_\Omega$ is as in \ref{Lutheta}. \end{lemma} \begin{proof} We have $u_{\kappa} - u - \kappa = (I) + (II)+(III)+ (IV)$, where \begin{equation*} \begin{gathered} (I) := u \circ \mathsf{D}^{-1}_{u, \kappa} (\cos \theta_\kappa- 1) , \quad (II): = u \circ \mathsf{D}^{-1}_{u, \kappa} - u, \\ (III): = \sin \theta_\kappa \langle \vec{v}^\perp, \mathsf{D}^{-1}_{u, \kappa} - \mathrm{Id}_{\mathbb{R}^2}\rangle, \quad (IV): = \langle \vec{v}^\perp, \mathrm{Id}_{\mathbb{R}^2}\rangle ( \sin \theta_\kappa - \tan \theta_\kappa) \end{gathered} \end{equation*} and we have used \ref{epsi2} and added and subtracted $u\circ \mathsf{D}^{-1}_{u, \kappa}$ and $\langle \vec{v}^\perp, \mathrm{Id}_{\mathbb{R}^2}\rangle \sin \theta$. Using \ref{Lutheta}, we estimate \begin{align*} \begin{gathered} \| (I) : C^k(\Omega_{u, \kappa}) \| \le C(k)|\kappa|^2 \| u: C^k(\Omega)\|,\\ \| (II) : C^k(\Omega_{u, \kappa})\| \le C(k) \| u : C^{k+1}( \Omega) \| \| \mathsf{D}^{-1}_{u, \kappa} - \mathrm{Id}_{\mathbb{R}^2} : C^k(\Omega_{u, \kappa})\|, \\ \| (III) : C^k(\Omega_{u, \kappa}) \| \le C|\kappa| \| \mathsf{D}^{-1}_{u, \kappa} - \mathrm{Id}_{\mathbb{R}^2} : C^k(\Omega_{u, \kappa})\| , \quad \| (IV): C^k(\Omega_{u, \kappa}) \| \le C R_\Omega |\kappa|^3. \end{gathered} \end{align*} The conclusion follows from combining these estimates with Lemma \ref{Lutheta}. \end{proof} \section{Mean Curvature with Respect to a Perturbed Metric} \label{S:A1} Let $(N^n, g)$ be a Riemannian manifold with Levi-Civita connection $\nabla$. \begin{definition} \label{dhgdiff} Define a Christoffel-inspired operator ${\mathcal{C}} : C^\infty(\emph{\text{Sym}}^2(TN))\rightarrow C^\infty(\emph{\text{Sym}}^2(TN) \otimes T^*N)$ by \begin{align*} 2({\mathcal{C}} T)(X,Y, Z) = (\nabla_XT)(Y,Z) +(\nabla_Y T)(X,Z) - (\nabla_Z T)(X,Y). \end{align*} \end{definition} \begin{remark} \label{rebin} The operator ${\mathcal{C}}$ above was defined in \cite[Section 6.b]{BergerEbin}, although there it was called $\square$. \end{remark} Fix another Riemannian metric $\widehat{g}$ on $N$ and define $h: = \widehat{g} - g$. We denote various quantities when defined with respect to $\widehat{g}$ with a hat. By a calculation \cite[Lemma A.2]{BrendleRicci} using the Koszul formula, \begin{equation} \label{Ekoszuldiff} \begin{aligned} \widehat{g} (\widehat{\nabla}_X Y - \nabla_X Y, Z)= ({\mathcal{C}} h)(X, Y, Z) \qquad \text{for all} \quad X,Y,Z \in T_p N. \end{aligned} \end{equation} \begin{lemma}[Mean curvature under a change of metric] \label{LApert} Let $S\subset N$ be a two-sided hypersurface with unit normal field $\nu$. \begin{enumerate}[label=\emph{(\roman*)}] \item $\widehat{\nu} = (\nu- \beta^{\widehat{\sharp}})/| \nu - \beta^{\widehat{\sharp}}|_{\widehat{g}}$ and $| \nu - \beta^{\widehat{\sharp}}|^2_{\widehat{g}} = 1+ \sigma - | \beta|_g^2 -\widehat{\alpha}(\beta^\sharp, \beta^\sharp)$, \item $\displaystyle{ | \nu - \beta^{\widehat{\sharp}}|_{\widehat{g}}\widehat{A}^S = A^S+ \text{\emph{Sym}}\left( A^S *_g \alpha + \nabla^S \beta\right) - \frac{1}{2}\widetilde{\alpha}- ({\mathcal{C}} \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}}$, \item $ | \nu - \beta^{\widehat{\sharp}}|_{\widehat{g}} \widehat{H}^S = H^S+ \mathrm{div}_{S,g} \beta - \frac{1}{2} \operatorname{tr}_{S, g} \widetilde{\alpha}+ \langle \text{\emph{Sym}}\left(\nabla^S \beta\right) - \frac{1}{2}\widetilde{\alpha}, \widehat{\alpha} \rangle_g-\operatorname{tr}_{S, g}( ({\mathcal{C}}^S\alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}) $\\ $-\langle ({\mathcal{C}}^S\alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}, \widehat{\alpha}\rangle_g$, \end{enumerate} where the symmetric two-tensor fields $\alpha$, $\widetilde{\alpha}$, and $\widehat{\alpha}$, differential one-form $\beta$, vector fields $\beta^\sharp$ and $\beta^{\widehat{\sharp}}$, and function $\sigma$, are defined by requesting that for $p\in S$, $X, Y\in T_pS$, \begin{align*} \begin{gathered} \alpha(X,Y) = h(X,Y), \quad \beta(X) = h(X, \nu_p), \quad \sigma(p) = h(\nu_p, \nu_p), \quad \widetilde{\alpha}(X,Y) = (\nabla_{\nu_p} h)(X, Y), \\ g(\beta^\sharp, X) = \beta(X), \quad \widehat{g}( \beta^{\widehat{\sharp}}, X) = \beta(X) \quad \text{and} \quad \widehat{\alpha}(X, Y) = \widehat{g}(X^\flat, Y^\flat) - g(X,Y), \end{gathered} \end{align*} where here $X^\flat$ and $Y^\flat$ are computed with respect to $g$. Moreover, $\beta^{\widehat{\sharp}} = \beta^\sharp +( \widehat{\alpha} \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^\sharp)^\sharp$ and in any local coordinates, $\widehat{\alpha}_{ij}= \widehat{g}^{kl}g_{ik}g_{jl} - g_{ij} = \sum_{p=1}^\infty (-1)^p \alpha_{i k_1} g^{k_1 l_1} \alpha_{l_1 k_2} g^{k_2 l_2} \cdots \alpha_{l_{k-2}k_{p-1}} g^{k_{p-1} l_{p-1}}\alpha_{l_{p-1}j}$. \end{lemma} \begin{proof} Given $X\in T_pS$, note that $\widehat{g}( \nu - \beta^{\widehat{\sharp}}, X) = 0$. Therefore $\hat{\Pi}\nu = \beta^{\widehat{\sharp}}$, where $\hat{\Pi}$ is the $\widehat{g}$-orthogonal projection onto $T_p S$, and (i) follows, where the formula for $|\nu - \beta^{\widehat{\sharp}}|^2_{\widehat{g}}$ is a direct calculation. Next we compute (where in this proof we write $A$ in place of $A^S$ since no confusion will arise) \begin{equation*} \begin{aligned} |\nu - \beta^{\widehat{\sharp}}|_{\widehat{g}} \widehat{A}(X,X) &= \widehat{g}( \nabla_X X+ \widehat{\nabla}_X X- \nabla_X X , \nu - \beta^{\widehat{\sharp}})\\ &=\widehat{g}(\nu, \nu - \beta^{\widehat{\sharp}})A(X,X) +({\mathcal{C}} h)(X, X, \nu) - ({\mathcal{C}} h)(X, X, \beta^{\widehat{\sharp}})\\ &= |\nu - \beta^{\widehat{\sharp}}|^2_{\widehat{g}}A(X,X)+({\mathcal{C}} h)(X, X, \nu) - ({\mathcal{C}} h)(X, X, \beta^{\widehat{\sharp}}), \end{aligned} \end{equation*} where the second and third equalities use \eqref{Ekoszuldiff} and that $\widehat{g}(\beta^{\widehat{\sharp}}, \nu-\beta^{\widehat{\sharp}}) = 0$. Using \ref{dhgdiff}, we calculate \begin{align*} ({\mathcal{C}} h)(X, X, \nu) &= (\nabla_X h)(X, \nu )-\frac{1}{2} (\nabla_\nu h )(X,X)\\ &= X( h(X, \nu)) - h( \nabla_X X, \nu )- h(X, \nabla_X \nu) - \frac{1}{2}\widetilde{\alpha}(X,X)\\ &= X(\beta(X)) - \beta\left( \nabla_X^S X\right) - \sigma A(X,X)+ \alpha( X, B(X)) -\frac{1}{2} \widetilde{\alpha}(X,X)\\ &= (\nabla^S_X\beta)(X) - \sigma A(X,X) +\left( A*_g\alpha\right)(X,X)-\frac{1}{2} \widetilde{\alpha}(X,X). \end{align*} Using \eqref{Ekoszuldiff} and that $\widehat{\nabla} - \nabla = \widehat{\nabla}^S - \nabla^S + \widehat{A} \widehat{\nu} - A \nu$, we find \begin{align*} ({\mathcal{C}} h)(X, X, \beta^{\widehat{\sharp}}) &= ({\mathcal{C}}^S \alpha)(X, X, \beta^{\widehat{\sharp}}) - \widehat{g}(\nu, \beta^{\widehat{\sharp}})A(X,X) \\ &= ({\mathcal{C}}^S \alpha)(X,X, \beta^{\widehat{\sharp}})- \beta(\beta^{\widehat{\sharp}})A(X,X). \end{align*} Substituting these items above and simplifying using (i) establishes (ii). Taking the trace of (ii) with respect to $\widehat{g}_S$ and simplifying (note in particular that $\operatorname{tr}_{S, \widehat{g}} (A*_g\widehat{g}) = \operatorname{tr}_{S, g} A = H$) establishes (iii). Finally, let $[g]$ and $[\alpha]$ denote matrix representations of $g_S$ and $\alpha$ and note that \begin{align*} ([g]+[\alpha])^{-1} = ( \text{Id}+[g]^{-1} [\alpha])^{-1}[g]^{-1} = \sum_{k=0}^\infty (-1)^k \left( [g]^{-1} [\alpha]\right)^k [g]^{-1}, \end{align*} which implies the coordinate expression for $\widehat{\alpha}$ and the identity $\beta^{\widehat{\sharp}} = \beta^\sharp + (\widehat{\alpha} \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^\sharp)^\sharp$. \end{proof} \begin{remark} \label{rmars} The proof of Lemma \ref{LApert} above is self-contained and done independently from \cite{mars}, but we note that (i) and (ii) are consistent with results therein.\qed \end{remark} \begin{remark} \label{rconfh} When $\widehat{g} = e^{2w} g$ for some $w \in C^\infty(N)$, it follows that \begin{align*} \beta = \beta^{\widehat{\sharp}} = 0,\quad |\nu - \beta^{\widehat{\sharp}}|_{\widehat{g}} = e^{w}, \quad A^S *_g \widehat{g} = e^{2w}A^S, \quad \widetilde{\alpha} = 2 e^{2w}\nu(w) g, \end{align*} and \ref{LApert}(i) reduces to the usual transformation rule $\widehat{A} = e^{w} \left( A- ( \partial_\nu w) g\right)$ for the second fundamental form under a conformal change of metric.\qed \end{remark} \begin{remark} \label{rHpert} When $\widehat{g}$ is the ambient metric in a local system of Fermi coordinates about a hypersurface $\Sigma$ as in \ref{dexp}, we define $g = \left.g\right|_\Sigma+ d\ensuremath{\mathrm{z}}^2$ and $S = \Sigma_\ensuremath{\mathrm{z}}$, a parallel hypersurface. We have by \ref{Lgauss} \begin{equation*} \begin{gathered} \widehat{g} = \left. \widehat{g}\right|_{\Sigma_{\ensuremath{\mathrm{z}}}} + d\ensuremath{\mathrm{z}}^2, \quad \widehat{\nu} = \nu = \partial_\ensuremath{\mathrm{z}},\quad \sigma = 0, \quad\beta = 0,\\ \alpha = - 2 \ensuremath{\mathrm{z}} A^\Sigma + \ensuremath{\mathrm{z}}^2 \left( A^\Sigma * A^\Sigma + \operatorname{Rm}_\nu\right) +O(\ensuremath{\mathrm{z}}^3),\\ \widetilde{\alpha} = -2 A^\Sigma+2\ensuremath{\mathrm{z}}(A^\Sigma*A^\Sigma+ \operatorname{Rm}_\nu) + O(\ensuremath{\mathrm{z}}^2), \end{gathered} \end{equation*} so that \ref{LApert}(iii) implies the usual formula for the mean curvature of $\widehat{H}^{\Sigma_\ensuremath{\mathrm{z}}}$ (note that $H^{\Sigma_\ensuremath{\mathrm{z}}} = H^{\Sigma}$): \begin{equation*} \widehat{H}^{\Sigma_\ensuremath{\mathrm{z}}} =H^{\Sigma} - \frac{1}{2} \operatorname{tr}_\Sigma \widetilde{\alpha} + \frac{1}{2} \langle \alpha , \widetilde{\alpha}\rangle + O\left(\ensuremath{\mathrm{z}}^2\right) = H^\Sigma+ \left(|A^\Sigma|^2+\operatorname{Ric}(Z, Z)\right)\ensuremath{\mathrm{z}} + O\left(\ensuremath{\mathrm{z}}^2\right). \qed \end{equation*} \end{remark} \begin{corollary} \label{Lhasmp} $\widehat{H}^S - H^S - \widetilde{\sigma} = (H^S + \widetilde{\sigma}) \, ((1+\widehat{\sigma})^{-1/2}-1) $ \\ $\phantom{kk}$ \hfill $ +(1+\widehat{\sigma})^{-1/2} \left( \langle \mathrm{Sym}\left(\nabla^S \beta\right), \widehat{\alpha}\rangle_g - \operatorname{tr}_{S,g}( ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}) - \langle ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}, \widehat{\alpha}\rangle_g\right), $ \\ where here $\widetilde{\sigma}: = \mathrm{div}_{S, g} \beta - \frac{1}{2} \operatorname{tr}_{S, g} \widetilde{\alpha} - \frac{1}{2} \langle \widehat{\alpha}, \widetilde{\alpha}\rangle_{g}$ and $\widehat{\sigma}: = \sigma -\beta(\beta^{\widehat{\sharp}}) $. \end{corollary} \begin{proof} This follows immediately from dividing through \ref{LApert}(iii) by $| \nu - \beta^{\widehat{\sharp}}|_{\widehat{g}} = (1+\widehat{\sigma})^{1/2}$ (recall \ref{LApert}(i)) and subtracting $H^S + \widetilde{\sigma}$ from both sides. \end{proof} \begin{corollary} \label{LHpertsmall} Suppose $\alpha, \beta$, and $\sigma$ all have small enough $C^k(S, g)$ norm in terms of $k$. Then \begin{multline*} \| \widehat{H}^S: C^k(S, g) \| \le C(k)\left( \|H^S : C^k(S, g)\| + \| \beta: C^{k+1}(S, g)\|+ \| \operatorname{tr}_{S, g} \widetilde{\alpha}: C^k(S, g)\| \right. + \\ + \left. \, ( 1+ \| \widetilde{\alpha} : C^k(S, g)\| ) \, \| \alpha : C^{k+1}(S, g)\| \right) . \end{multline*} \end{corollary} \begin{proof} From the definition of $\beta^{\widehat{\sharp}}$ and the coordinate expression for $\widehat{\alpha}$, it follows that $\| \beta^{\widehat{\sharp}} : C^k(S, g)\| \le C(k) \| \beta: C^k(S,g)\|(1 + \| \alpha: C^k(S,g) \|)$. Using the notation in the proof of \ref{Lhasmp}, we have then \begin{align*} \begin{gathered} \| w: C^{k}(S, g)\| \le C(k) \left( \| \sigma:C^k(S, g) \|+ \| \beta: C^k(S, g)\|^2 \right),\\ \| \langle \text{{Sym}}\left(\nabla^S \beta\right), \widehat{\alpha} \rangle_g: C^k(S, g) \| \le C(k) \| \alpha : C^k(S, g) \| \| \beta: C^{k+1}(S, g)\| , \\ \| \langle \widetilde{\alpha}, \widehat{\alpha} \rangle_g : C^k(S, g) \| \le C(k) \| \alpha : C^k(S, g) \| \| \widetilde{\alpha}: C^k(S, g)\|. \end{gathered} \end{align*} Using the preceding, we also estimate \begin{align*} \| \operatorname{tr}_{S,g}( ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}) : C^k(S, g) \|+ \| \langle ( {\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}, \widehat{\alpha} \rangle_g: C^k(S, g) \| &\le C(k) \| \alpha : C^{k+1}(S, g) \| \| \beta: C^k(S, g) \| . \end{align*} Combining the estimates with the expansion in \ref{Lhasmp} completes the proof. \end{proof} \begin{lemma} \label{Llaplace} Let $u\in C^2(S)$ and $X$ be a vector field on $S$. \begin{enumerate}[label=\emph{(\roman*)}] \item $\widehat{\nabla} u = \nabla u + (\widehat{\alpha} \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \nabla u)^\sharp$. \item $\widehat{\mathrm{div}} X = \mathrm{div} X + \operatorname{tr}_{S, g}( ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} X) + \langle \widehat{\alpha}, ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} X\rangle_g$. \item $\widehat{\Delta} u = \Delta u + (\mathrm{div}_{S, g} \widehat{\alpha})(\nabla u) + (\operatorname{tr}_{S, g} \widehat{\alpha} ) \Delta u+ \operatorname{tr}_{S, g}( ( {\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} ( \nabla u + ( \widehat{\alpha}\mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \nabla u)^\sharp))$ \\ $+ \langle \widehat{\alpha}, ( {\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} ( \nabla u + ( \widehat{\alpha}\mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \nabla u)^\sharp)\rangle_g$. \item As long as $\alpha$ has small enough $C^{k+1}(S, g)$ norm in terms of $k$, then $\| \widehat{\Delta} u - \Delta u : C^k(S, g) \| \le C(k) \| \alpha : C^{k+1}(S, g)\| \| u : C^{k+2}(S, g)\| $. \end{enumerate} \end{lemma} \begin{proof} (i) and (ii) follow from the following calculations in coordinates: \begin{align*} (\widehat{\nabla}u)^i &= \widehat{g}^{ij} u_j = g^{ij} u_j +g^{ik}g^{jl} \widehat{\alpha}_{kl} u_j , \\ \widehat{\mathrm{div}} X &= \widehat{g}^{ij} \widehat{g}( \nabla_{\partial_i} X + \widehat{\nabla}_{\partial_i} X - \nabla_{\partial_i} X , \partial_j)\\ &= \widehat{g}^{ij} ( \widehat{g}( \nabla_{\partial_i} X, \partial_j) + ({\mathcal{C}}^S \alpha)(X, \partial_i, \partial_j))\\ &= \mathrm{div} X+ (g^{ij} + \widehat{\alpha}^{ij}) ({\mathcal{C}}^S\alpha)(X, \partial_i, \partial_j). \end{align*} (iii) follows by combining (i) and (ii) and observing that \[ \mathrm{div}( \widehat{\alpha} \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \nabla u) = (\mathrm{div} \widehat{\alpha}) (\nabla u ) + (\operatorname{tr}_{S, g} \widehat{\alpha}) \Delta u. \] Finally, (iv) follows immediately from estimating (iii). \end{proof} \begin{lemma} \label{Ljacdif} Suppose $\alpha$, $\beta$, and $\sigma$ all have small enough $C^{k+1}(S, g)$ norm in terms of $k$. Then \begin{multline*} \| \, |\widehat{A}^S|^2_{\widehat{g}} - |A^S|^2_{g} \|_{C^k} \le C(k) ( \| \sigma \|_{C^k} + \| \beta\|_{C^{k+1}} + \| \alpha \|_{C^k} ) \| A^S\|_{C^k}^2\\ +C(k) ( \| \beta \|_{C^{k+1}} + \| \widetilde{\alpha}\|_{C^k} ) \| A^S \|_{C^k} +C(k) ( \| \beta\|_{C^{k+1}} + \| \widetilde{\alpha}\|_{C^k} )^2, \end{multline*} where here $\| \cdot \|_{C^k}$ is short hand for the $C^k(S, g)$ norm. \end{lemma} \begin{proof} We first compute using \ref{LApert}(ii) that \begin{align*} |\widehat{A}^S|^2_g - |A^S|^2_g = - ( \sigma - |\beta|^2_g - \widehat{\alpha}(\beta^\sharp, \beta^\sharp)) |\widehat{A}^S|^2_g + 2\langle A, T\rangle_g + |T|^2_g, \end{align*} where here $T := \text{Sym}\left( A^S *_g \alpha + \nabla^S \beta\right) - \frac{1}{2}\widetilde{\alpha}- ({\mathcal{C}}^S \alpha) \mathbin{\raisebox{\depth}{\scalebox{1}[-1]{$\lnot$}}} \beta^{\widehat{\sharp}}$. Using this and the assumptions, we estimate \begin{align*} \| \, |\widehat{A}^S|^2_g - |A^S|^2_g \|_{C^k}&\le C(k) ( \| \sigma \|_{C^k} + \| \beta\|_{C^{k+1}} + \| \alpha \|_{C^k} ) \| A^S\|_{C^k}^2\\ &+C(k) ( \| \beta \|_{C^{k+1}} + \| \widetilde{\alpha}\|_{C^k} ) \| A^S \|_{C^k} +C(k) ( \| \beta\|_{C^{k+1}} + \| \widetilde{\alpha}\|_{C^k} )^2. \end{align*} Next, we compute \begin{align*} |\widehat{A}^S|^2_{\widehat{g}} - |\widehat{A}^S|^2_{g} = 2\langle \widehat{A}^S *_g \widehat{\alpha}, \widehat{A}^S \rangle_g + | \widehat{A}^S *_g \widehat{\alpha} |^2_g, \end{align*} and using this and \ref{LApert} to estimate $\| \widehat{A}^S\|_{C^k}$ we estimate \begin{align*} \| \, |\widehat{A}^S|^2_{\widehat{g}} - |\widehat{A}^S|^2_{g}\|_{C^k} &\le C(k) \| \alpha \|_{C^k} \| \widehat{A}^S\|_{C^k}^2\\ &\le C(k) \| \alpha \|_{C^k} ( \| A^S \|_{C^k} + \| \widetilde{\alpha}\|_{C^k} + \| \beta\|_{C^{k+1}} )^2. \end{align*} By the triangle inequality, combining these estimates finishes the proof. \end{proof} \begin{lemma} \label{Lgcomp} Let $u$ be a $C^k$ tensor field on $N$ and let $\epsilon> 0$. If $\| h : C^k(N, g)\|$ is small enough in terms of $k$ and $\epsilon$, then \begin{align} \label{Euggh} \| u : C^k(N, \widehat{g}) \| \Sim_{1+\epsilon} \| u :C^k(N, g)\| . \end{align} \end{lemma} \begin{proof} We first consider the case where $k=0$. Since $\widehat{g}(u, u) - g(u, u)$ is a sum of $g$-inner products of contractions of $u$ and $h$, we have that \begin{align*} \left| \| u : C^0(N, \widehat{g})\|^2 - \| u :C^0(N, g)\|^2 \right| \le C \| h : C^0(N, g)\| \| u : C^0(N, g)\|^2, \end{align*} which implies \eqref{Euggh} when $k=0$, where we have used that $\| h : C^0(N, g)\|$ is small. Using that the Christoffel symbols of $\widehat{\nabla}$ and $\nabla$ satisfy $\widehat{\Gamma}^{k}_{ij} - \Gamma^k_{ij} = \Gamma^{l}_{ij} h_{lk} + ({\mathcal{C}} h)_{ijk},$ substituting into the formula for the components of $\widehat{\nabla} u$, estimating, and using \eqref{Euggh} when $k=0$, we find \begin{align} \label{Eugh2} \| \widehat{\nabla} u : C^0(N, \widehat{g})\| \le (1+C \| h : C^1(N, g)\| ) \| u : C^1(N, g)\| . \end{align} Interchanging the roles of $\widehat{g}$ and $g$ in \eqref{Eugh2} and using \eqref{Eugh2} also to estimate $\| h: C^1(N, \widehat{g})\|$, we have \begin{align*} \| \nabla u : C^0(N, g)\| &\le (1+C \| h : C^1(N, \widehat{g})\| ) \| u : C^1(N, \widehat{g})\| \\ &\le ( 1+ C\| h: C^1(N, g)\| )\| u: C^1(N, \widehat{g})\| . \end{align*} With the preceding, this proves \eqref{Euggh} when $k=1$, and the result for general $k$ follows inductively. \end{proof} \section{Weighted decay estimates} \label{S:A4} We prove a weighted estimate on surfaces for solutions of inhomogeneous linear equations which is analogous to estimates in other gluing constructions, e.g. in \cite{kap, kapouleas:wente, breiner:kapouleas:high}. The proof relies on analogous estimates in the Euclidean setting established in \cite[Proposition C.1(i)]{breiner:kapouleas:high}. \begin{lemma} \label{Lwe} Given a Riemannian Surface $ (\Sigma^2, g)$, $V\in C^\infty(\Sigma)$, $p\in \Sigma$, $\beta\in (0, 1)$, and $\gamma \in (1, 2)$, there exists $\underline{\epsilon}>0$ such that for any $\epsilon \in (0,\underline{\epsilon}]$ there is a linear map ${\mathcal{R}}^\Sigma_p : C^{0, \beta}( D^\Sigma_p(\epsilon)) \rightarrow C^{2, \beta}(D^\Sigma_p(\epsilon))$ so that if $E\in C^{0, \beta}(D^\Sigma_p(\epsilon))$ and $u = {\mathcal{R}}^\Sigma_p (E)$, then \begin{enumerate}[label=\emph{(\roman*)}] \item $(\Delta_g +V) u = E$. \item $u(p) = d_p u = 0$. \item $\| u: C^{2, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g, ({\mathbf{d}}^\Sigma_p)^\gamma \| \le C \| E : C^{0, \beta}(D^\Sigma_p(\Sigma, {\mathbf{d}}^\Sigma_p, g, ({\mathbf{d}}^\Sigma_p)^{\gamma-2})\| $. \end{enumerate} \end{lemma} \begin{proof} The important special case of the lemma when $g$ is the Euclidean metric and $V =0$ was proved in \cite[Proposition C.1(i)]{breiner:kapouleas:high}. By identifying $D^{\Sigma, g}_p(\epsilon)$ with $D^{T_p\Sigma, g_p}_0(\epsilon)$ using the exponential map and considering the Euclidean Laplacian $\Delta_{g_p}$, where here $g_p :=\left. g\right|_p$, we may apply \cite[Proposition C.1(i)]{breiner:kapouleas:high} on $D^\Sigma_p(\epsilon)$ to define inductively sequences $\{ u_n\}_{n\in \mathbb{N}}$ and $\{ E_n\}_{n\in \mathbb{N}}$ where $u_n \in C^{2, \beta}(D^\Sigma_p(\epsilon))$ and $E_n \in C^{0, \beta}(D^\Sigma_p(\epsilon))$ by \begin{align*} \Delta_{g_p} u_i = - E_{i-1}, \quad E_i: = (\Delta_g - \Delta_{g_p}) u_{i} + V u_{i} \quad E_0: = -E, \end{align*} where each $u_i$ satisfies \begin{align} u_i(p) = d_p u_i = 0, \quad \left. u_i \right|_{\partial D^\Sigma_p(\epsilon)} \in {\mathcal{H}}_1(\partial D^\Sigma_p(\epsilon)) \end{align} (recall the notation of \cite{breiner:kapouleas:high}) and the estimate \begin{align*} \| u_i : C^{2, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^\gamma)\| \le C \| E_i : C^{0, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^{\gamma-2})\| . \end{align*} By choosing $\epsilon$ small enough and using the above estimates inductively we have for each $i\in \mathbb{N}$ \begin{align*} \| u_i : C^{2, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^\gamma))\| &\le C \| E_i : C^{0, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^{\gamma-2}\| \\ &\le \frac{1}{2} \| u_{i-1} : C^{2 ,\beta} (D^\Sigma_{p}(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^\gamma)\|\\ &\le \frac{1}{2^{i-1}} \| u_1 : C^{2, \beta} (D^\Sigma_{p}(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^\gamma)\|\\ &\le \frac{1}{2^{i-1}} \| E : C^{0, \beta} (D^\Sigma_{p}(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^{\gamma-2})\|. \end{align*} We then define $u:= {\mathcal{R}}^\Sigma_p E : = \sum_{i=1}^\infty u_i$, which by the preceding is well defined in $C^{2, \beta}(D^\Sigma_p(\epsilon))$, satisfies (i) and (ii), and the estimate \begin{align*} \| u: C^{2, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^{\gamma})\| \le C\| E: C^{0, \beta}(D^\Sigma_p(\epsilon), {\mathbf{d}}^\Sigma_p, g_p, ({\mathbf{d}}^\Sigma_p)^{\gamma-2})\| . \end{align*} The estimate (iii) follows from this by using \ref{Lgcomp} to switch to norms computed with respect to $g$. \end{proof} \bibliographystyle{abbrv}
\section{\texorpdfstring{$T$}{T} is a tilting and a \texorpdfstring{$\tau$}{tau}-tilting module.}\label{sec:tilting_module} In this section, we show that $T$ is a tilting $A$-module and a $\tau$-tilting $A$-module. We then show that $T$ induces a cluster-tilting object in the cluster category. Recall that an $A$-module $T$ is called a \emph{tilting module} if $\textup{Ext}^1(T,T)=0$, $\operatorname{pd}T\le 1$, and the number $|T|$ of isoclasses of indecomposable summands of $T$ is equal to the number of vertices $|Q_0|$ of $Q$. Furthermore, $T$ is said to be \emph{$\tau$-tilting} in the sense of \cite{AIR} if $\operatorname{Hom}(T, \tau T) = 0$ and $|T|=|Q_0|$. Tilting modules and their endomorphism algebras play a central role in representation theory, see \cite{AsSiSk} for an introduction. Recall that an $A$-module $L = (L_x, \varphi_\alpha)$ is called \textit{thin} if all vector spaces $L_x$ are of dimension at most one. Let $Q(L)$ denote the subquiver of $Q$ containing all vertices $x \in Q_0$ such that $L_x \neq 0$ and all arrows $\alpha \in Q_1$ such that $\varphi_\alpha \neq 0$. A thin module $L$ is indecomposable if and only if $Q(L)$ is connected. \begin{remark} For every vertex $x$, the $A$-module $M(x)$ is thin and indecomposable. \end{remark} \begin{lemma}\label{lem:zero_path} Let $L = (L_x, \varphi_\alpha)$ be a thin $A$-module and let $N = (N_x, \varphi_\alpha')$ be any $A$-module. Let $f \in \operatorname{Hom} (L, N)$ and let $w$ be a nonzero path in $Q(L)$ from a vertex $x$ to a vertex $y$. If $f_x = 0$, then $f_y = 0$. \end{lemma} \begin{proof} We have a commutative diagram: \[ \begin{tikzcd} L_x \arrow{r}{\varphi_w} \arrow[swap]{d}{f_x} & L_y \arrow{d}{f_y} \\ N_x \arrow{r}{\varphi'_w}& N_y \end{tikzcd} \] Since $L$ is thin, the map $\varphi_w$ is invertible, so $f_y = \varphi'_w f_x \varphi_w^{-1}$. \end{proof} \begin{lemma}\label{lem:M(r_i)_path} Let $L = M(r_i) = (M(r_i)_x, \varphi_\alpha)$ with $i \neq a_2$ and let $N = (N_x, \psi_\alpha)$ be indecomposable and thin. Suppose $\operatorname{Hom} (L,N) \neq 0$. Then $N_{s_1} \neq 0$ or there exists a vertex $r_j$ with $j \neq a_2-1, a_2$ such that $S(r_j)$ is a summand of the socle of $N$. \end{lemma} \begin{proof} Let $f \in \operatorname{Hom} (L,N)$ be a nonzero morphism. Suppose $N_{s_1} = 0$. Then \cref{lem:zero_path} implies $f_y = 0$ for all vertices $y$ that can be reached from $s_1$ by a path in $Q(L)$. In particular, $f_{r_{a_2}} = 0$. We have $\operatorname{top} L = S(r_{i+1}) \oplus S(s_1)$. Now consider the path $w : r_{i+1} \to \cdots \to r_{a_2}$. Note that $w$ runs through all vertices of $Q(L)$ which cannot be reached by a path from $s_1$ in $Q(L)$, plus the vertex $r_{a_2}$. Since $f$ is nonzero, it must be nonzero at some vertex on $w$. By \cref{lem:zero_path}, we see that $f$ must be nonzero at the vertex $r_{i+1}$. Now let $r_j$ be the last vertex in $w$ such that $f_{r_j} \neq 0$. Denote by $w'$ the subpath of $w$ from $r_{i+1}$ to $r_j$. Then we have a commutative diagram: \[ \begin{tikzcd} L_{r_{i+1}} \arrow{r}{\varphi_{w'}} \arrow[swap]{d}{0 \neq f_{r_{i+1}}} & L_{r_j} \arrow{r}{\varphi_\alpha} \arrow{d}{f_{r_j} \neq 0} & L_{r_{j+1}} \arrow{d}{f_{r_{j+1}} = 0} \\ N_{r_{i+1}} \arrow{r}{\psi_w} & N_{r_j} \arrow{r}{\psi_\alpha} & N_{r_{j+1}} \end{tikzcd} \] where $\alpha$ is the arrow $r_j \to r_{j+1}$. The left square implies $\psi_{w} \neq 0$ and the right square implies $\psi_\alpha = 0$. The arrow $\alpha$ is the only arrow whose source is $r_j$, since $1 \leq i+1 \leq j < a_2-1$. This implies that $S(r_j)$ is a summand of the socle of $N$. \end{proof} \begin{lemma}\label{lem:M(a2)M(si)_r0_support} Let $L = M(r_{a_2})$ or $M(s_i)$ with $i = 1,2, \cdots, a_1-1$ and let $N$ be indecomposable and thin. Suppose $\operatorname{Hom} (L,N) \neq 0$. Then $N_{r_0} \neq 0$. \end{lemma} \begin{proof} We have $\operatorname{top} L = S(r_0)$ and every vertex in $Q(L)$ can be reached by a path from $r_0$ in $Q(L)$. By \cref{lem:zero_path}, if $f \in \operatorname{Hom} (L,N)$ is a nonzero morphism, then $f_{r_0} \neq 0$. \end{proof} \begin{lemma}\label{lem:M(ti)_r1_support} Let $L = M(t_i)$ with $i = 1,2,\cdots, a_1-1$ and let $N$ be indecomposable and thin. Suppose $\operatorname{Hom} (L,N) \neq 0$. Then $N_{r_1} \neq 0$ or there exists a vertex $s_j$ with $i+1 \leq j \leq a_1-1$ such that $S(s_j)$ is a summand of the socle of $N$. \end{lemma} \begin{proof} The proof is similar to the proof in \cref{lem:M(r_i)_path} with $r_1$ in the role of $s_1$ and the path $s_{i+1} \to \cdots \to s_{a_1-1} \to r_{a_2}$ in the role of $r_{i+1} \to \cdots \to r_{a_2-1} \to r_{a_2}$. \end{proof} \begin{lemma}\label{lem:ext_M} Let $L$ be an indecomposable summand of the module $T$ defined in \cref{def:M} and let $N$ be an indecomposable summand of $\tau T$. Then \begin{align*} \operatorname{Hom} (L,N) = 0. \end{align*} In particular, \begin{align*} \operatorname{Hom}(T,\tau T) = 0 \quad\quad \text{and} \quad\quad \operatorname{Ext}^1 (T,T) = 0. \end{align*} \end{lemma} \begin{proof} From our computations in \cref{sec:tau_M}, we see that each indecomposable summand $N$ of $\tau T$ is thin, and zero at the vertices $s_1$, $r_1$, and $r_0$. Using \cref{lem:M(a2)M(si)_r0_support} and $N_{r_0} = 0$, we see that $\operatorname{Hom} (L,N) =0$ for $L = M(r_{a_2})$ or $M(s_i)$. Using \cref{lem:zero_path} and $N_{s_1} = 0$, we see that $\operatorname{Hom}(L,N) = 0$ for $L = M(r_i)$, $i \neq a_2$ because none of the summands of $\tau T$ has $S(r_j)$ with $1 \leq j \leq a_2-1$ in its socle. Indeed, our computations in \cref{sec:tau_M} show that $\operatorname{soc} N$ can only contain $S(r_{a_2})$ and $S(t_i)$ as summands. Similarly, using \cref{lem:M(ti)_r1_support} and $N_{r_i} = 0$, we see that $\operatorname{Hom}(N,L)=0$ for $L = M(t_i)$ because none of the summands of $\tau T$ admit $S(s_j)$ as a summand of its socle. This shows $\operatorname{Hom}(L,N)=0$, and thus $ \operatorname{Hom}(T,\tau T) = 0. $ Because of the Auslander-Reiten formula \[\operatorname{Ext}^1(T,T) \cong D \operatorname{\overline{Hom}}(T, \tau T)\] this also implies the vanishing of $\operatorname{Ext}^1(T,T)$. % \end{proof} \medskip We are now ready for the main results of this section. \begin{theorem}\label{thm:T-tilting} The module $T$ is a tilting $A$-module and a $\tau$-tilting $A$-module. \end{theorem} \begin{proof} The projective dimension of $T$ is $1$ by \cref{prop:pd_M} and $T$ is rigid by \cref{lem:ext_M}. In particular, we have shown that $\operatorname{Hom}(T, \tau T) = 0$. The result now follows since the number of non-isomorphic indecomposable summands of $T$ is equal to the number of vertices in $Q$. \end{proof} \begin{theorem}\label{thm:T-cto} The module $T$ induces a cluster-tilting object in the cluster category. \end{theorem} \begin{proof} Since $T$ does not share any indecomposable summands with $A[1] = \bigoplus_{x \in Q_0} P(x)[1]$, we see that \cref{thm:T-tilting} and \cite[Theorem 4.1]{AIR} complete the proof. \end{proof} \section{Definition of \texorpdfstring{$T$}{T}.}\label{sec:def_of_M} Throughout the paper, let $k$ denote an algebraically closed field. Let $a_1,a_2$ be positive integers and let $Q=Q[a_1,a_2]$ be the quiver shown in Figure \ref{fig:Q}. Thus $Q$ consists of an oriented cycle of length $a_2+1$ and a path of length $2a_1-1$ whose halfway arrow is part of the cycle. Let $Q_0$ be the set of vertices of $Q$ and $Q_1$ the set of arrows. We label the vertices that lie on the cycle by $r_0,r_1,\ldots, r_{a_2}$, those on the incoming branch by $s_1,s_2,\ldots, s_{a_1-1}$ and those on the outgoing branch by $t_1,t_2,\ldots, t_{a_1-1}$. We equip $Q$ with the potential $W=r_0\to r_1\to \cdots \to r_{a_2}\to r_0$ and denote the corresponding Jacobian algebra by $A$. Thus $A=kQ/I$ is the quotient of the path algebra of $Q$ by the two-sided ideal $I$ generated by all subpaths of $W$ of length $a_2$. The opposite quiver $Q^{\rm op} $ is obtained from $Q$ by reversing the direction of each arrow. Let $D=\operatorname{Hom}_k(-,k)$ denote the standard duality. \begin{remark} The quiver $Q$ is isomorphic to its opposite quiver $Q^{\rm op}$ and, hence, the algebra $A$ is isomorphic to its dual $D\!A$. \end{remark} For every $x\in Q_0$, let $P(x),I(x)$ and $ S(x)$ denote the indecomposable projective, injective and simple $A$-module at $x$, respectively. Every $A$-module $L$ is described as a representation of the quiver $Q$ satisfying the relations in $I$, and we shall frequently use the notation $L=(L_x,\varphi_\alpha)_{x\in Q_0,\alpha\in Q_1}$, where $L_x$ is the $k$-vector space at vertex $x$ and $\varphi_\alpha$ is the linear map on the arrow $\alpha$ of the representation corresponding to $L$. For further details on representation theory we refer to \cite{AsSiSk,Sbook}. \smallskip In this section, we define an indecomposable $A$-module $M(x)$ for every vertex $x\in Q_0$, and denote by $T$ the direct sum $T=\oplus_{x\in Q_0} M(x)$. The definition of $M(x)$ is given in three separate cases depending on $x$ being a vertex in the cycle or in one of the two branches. \begin{definition}\label{def:M(ri)} For all vertices labeled $r_i$, we define the module $M(r_i) = (M(r_i)_x, \varphi_\alpha)$ by \begin{align*} &M(r_i) = \begin{smallmatrix} r_{i+1} & & s_1 \\ r_{i+2} & & s_2 \\ \vdots & & \vdots \\ r_{a_2-1} & & s_{a_1-1} \\ & r_{a_2} & \\ & r_0 & \\ r_1 & & t_1 \\ r_2 & & t_2 \\ \vdots & & \vdots \\ r_{i-1} & & t_{a_1-1} \end{smallmatrix}, \quad\quad\quad&M(r_i)_x := \begin{cases} 0 & \text{if $x=r_i$;} \\ 0 & \text{if $r_i=r_0$ and $x=t_j$ for any $j$;} \\ 0 & \text{if $r_i=r_{a_2}$ and $x=s_j$ for any $j$;} \\ k & \text{otherwise.} \end{cases} \end{align*} Given any arrow $x \xrightarrow{\alpha} y$ in $Q_1$, the map $M(r_i)_x \xrightarrow{\varphi_\alpha} M(r_i)_y$ is defined by \begin{align*} \varphi_\alpha := \begin{cases} 1 & \text{if $M(r_i)_x = k = M(r_i)_y$;} \\ 0 & \text{otherwise.} \end{cases} \end{align*} Thus the support of $M(r_i)$ is given by removing the vertex $r_i$ from our quiver $Q$, together with vertices labeled $s_j$ when $i = a_2$, and respectively vertices labeled $t_j$ when $i = 0$. Equivalently, the support of $M(r_i)$ is given by removing the vertex $r_i$ from our quiver $Q$ and taking the component containing $r_{i+1}$. \end{definition} \begin{remark}\label{rem:M(ri)_min_path} For any minimal path $w$ between a vertex $x$ and a vertex $y$ of $Q$, let $\varphi_w$ be the composition of maps in the module $M(r_i)$ along the path $w$. If $M(r_i)_x = k$, then \begin{align*} \varphi_w = \begin{cases} 1 & \text{if $r_{i}$ is not in $w$;} \\ 0 & \text{if $r_{i}$ is in $w$.} \end{cases} \end{align*} \end{remark} \begin{definition}\label{def:M(ti)} For all vertices labeled $t_i$, we define the module $M(t_i) = (M(t_i)_x, \varphi_\alpha)$ by the short exact sequence \begin{align*} 0 \to M(t_i) \to I(r_{a_2}) \xrightarrow{f} I(s_i) \to 0, \end{align*} with $f$ given by the path $s_i \to s_{i+1} \to \cdots \to r_{a_2}$. For any vertex $x \in Q_0$, we have $M(t_i)_x = k$ if and only if $I(s_i)_x = 0$ and $I(r_{a_2})_x = k$. Also, $M(t_i)_x = 0$ otherwise. Therefore \begin{align*} &M(t_i) = \begin{smallmatrix} r_{1} & & s_{i+1} \\ r_{2} & & s_{i+2} \\ \vdots & & \vdots \\ r_{a_2-1} & & s_{a_1-1} \\ & r_{a_2} & \end{smallmatrix}, \quad\quad\quad&M(t_i)_x = \begin{cases} 0 & \text{if $x=r_{0}$;} \\ 0 & \text{if $x=t_j$ for any $j$;} \\ 0 & \text{if $x=s_j$ for any $j \geq i$;} \\ k & \text{otherwise.} \end{cases} \end{align*} Given any arrow $x \xrightarrow{\alpha} y$ in $Q_1$, the map $M(t_i)_x \xrightarrow{\varphi_\alpha} M(t_i)_y$ is given by \begin{align*} \varphi_\alpha = \begin{cases} 1 & \text{if $M(t_i)_x = k = M(t_i)_y$;} \\ 0 & \text{otherwise.} \end{cases} \end{align*} \end{definition} \begin{definition}\label{def:M(si)} For all vertices labeled $s_i$, we define the module $M(s_i) = (M(s_i)_x, \varphi_\alpha)$ by the short exact sequence \begin{align*} 0 \to P(t_i) \xrightarrow{g} P(r_0) \to M(s_i) \to 0, \end{align*} with $g$ given by the path $r_0 \to t_1 \to \cdots \to t_i$. For any vertex $x \in Q_0$, we have $M(s_i)_x = k$ if and only if $P(t_i)_x = 0$ and $P(r_0)_x = k$. Also, $M(s_i)_x = 0$ otherwise. Therefore \begin{align*} & M(s_i) = \begin{smallmatrix} & r_0 & \\ r_1 & & t_1 \\ r_2 & & t_2 \\ \vdots & & \vdots \\ r_{a_2-1} & & t_{i-1} \end{smallmatrix}, \quad\quad\quad&M(s_i)_x = \begin{cases} 0 & \text{if $x=r_{a_2}$;} \\ 0 & \text{if $x=t_j$ for any $j \geq i$;} \\ 0 & \text{if $x=s_j$ for any $j$;} \\ k & \text{otherwise.} \end{cases} \end{align*} Given any arrow $x \xrightarrow{\alpha} y$ in $Q_1$, the map $M(s_i)_x \xrightarrow{\varphi_\alpha} M(s_i)_y$ is given by \begin{align*} \varphi_\alpha = \begin{cases} 1 & \text{if $M(s_i)_x = k = M(s_i)_y$;} \\ 0 & \text{otherwise.} \end{cases} \end{align*} \end{definition} \begin{definition}\label{def:M} We define the module $T$ to be the sum of all modules defined in Definitions~\ref{def:M(ri)}, \ref{def:M(ti)}, and \ref{def:M(si)}. That is to say \begin{align*} T := \Bigg( \bigoplus_{i=0}^{a_2} M(r_i) \Bigg) \oplus \Bigg(\bigoplus_{i=1}^{a_1-1} M(s_i) \Bigg) \oplus \Bigg(\bigoplus_{i=1}^{a_1-1} M(t_i) \Bigg) = \bigoplus_{x \in Q_0} M(x). \end{align*} \end{definition} \section{The Endomorphism algebra \texorpdfstring{$\operatorname{End} T$}{End T}.}\label{sec:end_M} In this section, we study the endomorphism algebra of our $A$-module $T$ by computing the $\operatorname{Hom}$ spaces between its indecomposable summands. \begin{lemma}\label{lem 6.1} Given two vertices $r_i, r_j $ on the oriented cycle in $Q$, we have \begin{align*} \operatorname{Hom}(M(r_i),M(r_j)) = \begin{cases} 0 & \text{if $j = i+1$;} \\ k & \text{if $j \neq i+1$.} \end{cases} \end{align*} \end{lemma} \begin{proof} Denote $M(r_i)$ by $(M(r_i)_x, \varphi_\alpha)$ and $M(r_j)$ by $(M(r_j)_x, \varphi'_\alpha)$. Furthermore, let $f \in \operatorname{Hom}(M(r_i),M(r_j))$ be any morphism. Then $f=(f_x)_{x\in Q_0}$ and each $f_x$ is given by the multiplication with a scalar. Let $\lambda\in k$ be the scalar corresponding to $ f_{r_{i+1}}$. Note that $\lambda$ may be zero. We complete the proof by showing that the choice of $\lambda$ completely determines the morphism $f$, that is, we prove that $f_x = 0$ or $f_x = \lambda$, for every vertex $x$. Also, we show that if $j \neq i+1$, then $\lambda$ can be nonzero. We only need to consider vertices $x$ such that $M(r_i)_x$ and $M(r_j)_x$ are both nonzero; let $x \in Q_0$ be any vertex such that $M(r_i)_x = M(r_j)_x = k$. We consider two cases. First, suppose there exists a nonzero path $w$ from $r_{i+1}$ to $x$. Let $\varphi_w$ be the composition of maps from $r_{i+1}$ to $x$ in our module $M(r_i)$ along the path $w$, and let $\varphi'_w$ be the composition of maps from $r_{i+1}$ to $x$ in our module $M(r_j)$ along the path $w$. Note that by our assumption that $M(r_i)_x \neq 0$, we have $\varphi_w = 1$. On the other hand, $\varphi'_w = 0$ or $\varphi'_w = 1$. Since $f$ is a morphism, we have a commutative diagram: \[ \begin{tikzcd} M(r_i)_{r_i+1} \arrow{r}{\varphi_w} \arrow[swap]{d}{\lambda} & M(r_i)_x \arrow{d}{f_x} \\ M(r_j)_{r_i+1} \arrow{r}{\varphi'_w}& M(r_j)_x \end{tikzcd} \] Hence $f_x = \lambda \varphi'_w$, so $f_x = 0$ or $f_x = \lambda$. Second, suppose there does not exist a nonzero path from $r_{i+1}$ to $x$. Then $x=s_\ell$ for some $\ell$, or $x=r_i$, or $i=0$ and $x=r_0,t_1,\ldots,t_{a_1-1}.$ If $x=r_i$ then $f_x=0$, since $M(r_i)_{x}=0$. Similarly, if $i=0$ and $x$ is one of $r_0,t_1,\ldots,t_{a_1-1}$ then $f_x=0$, because $M(r_0)_x$ is zero. It remains the case where $x=s_\ell$. let $w$ be the nonzero path from $s_\ell$ to $r_{a_2}$. Let $\varphi_w$ be the composition of maps from $s_\ell$ to $r_{a_2}$ in $M(r_i)$ along the path $w$ and let $\varphi'_w$ be the composition of maps from $s_\ell$ to $r_{a_2}$ in $M(r_j)$ along the path $w$. In this case, $\varphi_w = 1$ and $\varphi'_w = 1$. Since $f$ is a morphism, we get a commutative diagram: \[ \begin{tikzcd} M(r_i)_{s_\ell} \arrow{r}{\varphi_w} \arrow[swap]{d}{f_{s_\ell}} & M(r_i)_{r_{a_2}} \arrow{d}{f_{r_{a_2}}} \\ M(r_j)_{s_\ell} \arrow{r}{\varphi'_w}& M(r_j)_{r_{a_2}} \end{tikzcd} \] Hence $f_x = f_{r_{a_2}}$, and since we have already shown that $f_{r_{a_2}} = 0$ or $f_{r_{a_2}} = \lambda$, we conclude that $\lambda$ completely determines $f$. To complete the proof, suppose first $j = i+1$. Then $\lambda = f_{r_{i+1}} = 0$, since $M(r_j)_{i+1} = 0$, and thus $\operatorname{Hom} (M(r_i), M(r_{j})) = 0$. Otherwise, $j \neq i+1$ and $\lambda\in k$ can be chosen arbitrarily. Thus $\operatorname{Hom}(M(r_i), M(r_{j}))= k$. \end{proof} \begin{lemma}\label{lem:hom(M(ti) M(tj))} Given two vertices labeled $t_i, t_j \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(t_i),M(t_j)) = \begin{cases} 0 & \text{if $i < j$;} \\ k & \text{if $i \geq j$.} \end{cases} \end{align*} \end{lemma} \begin{proof} This follows from the observation that if $i \geq j$, then $M(t_i)$ is a submodule of $M(t_j)$, so $\operatorname{Hom}(M(t_i),M(t_j))$ is generated by the inclusion map. \end{proof} \begin{lemma}\label{lem 6.3} Given two vertices labeled $s_i, s_j \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(s_i),M(s_j)) = \begin{cases} 0 & \text{if $i < j$;} \\ k & \text{if $i \geq j$.} \end{cases} \end{align*} \end{lemma} \begin{proof} Since $Q$ is isomorphic to $Q^{op}$, we see that this is the dual argument to \cref{lem:hom(M(ti) M(tj))}. \end{proof} \begin{lemma}\label{lem:hom(-M(si))} Let $x \in Q_0$ be any vertex labeled $r_j$ or $t_j$. Given any vertex labeled $s_i \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(x), M(s_i)) = \operatorname{Hom}(M(x), M(r_{a_2})). \end{align*} \end{lemma} \begin{proof} From \cref{def:M(si)}, we have a short exact sequence \begin{align*} 0 \to P(t_i) \to M(r_{a_2}) \to M(s_i) \to 0. \end{align*} We apply the functor $\operatorname{Hom}(M(x), -)$ to the sequence to get the exact sequence \begin{align*} 0 &\to \operatorname{Hom}(M(x), P(t_i)) \to \operatorname{Hom}(M(x), M(r_{a_2})) \to \operatorname{Hom}(M(x), M(s_i))\\ &\to \operatorname{Ext}^1(M(x), P(t_i)). \end{align*} We complete the proof by showing that $\operatorname{Hom}(M(x), P(t_i))=0$ and $\operatorname{Ext}^1(M(x), P(t_i)) = 0$. First, let $f \in \operatorname{Hom}(M(x), P(t_i))$. By \cref{def:M(ri)} and \cref{def:M(ti)}, we have \begin{align*} \operatorname{top} M(x) = \begin{cases} S(s_1) \oplus S(r_{j+1}) & \text{if $x=r_j$;} \\ S(r_1) \oplus S(s_{j+1}) & \text{if $x=t_j$.} \end{cases} \end{align*} In both cases, there is a nonzero path from a vertex $y$ in the top of $M(x)$ to $t_i$, and $P(t_i)$ is not supported on $y$. \cref{lem:zero_path} implies that $f_{t_i} = 0$, hence $f = 0$. Second, we see that $\operatorname{Hom} (P(t_i), \tau M(x)) = 0$ by \cref{lem:ext_M}. Hence by the AR formula, $\operatorname{Ext}^1(M(x), P(t_i)) = D \overline{\operatorname{Hom}} (P(t_i), \tau M(x)) = 0$. \end{proof} \begin{lemma}\label{lem 6.5} Let $x \in Q_0$ be any vertex labeled $r_j$ or $s_j$. Given any vertex labeled $t_i \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(t_i), M(x)) \cong \operatorname{Hom}(M(t_i), M(r_{0})). \end{align*} \end{lemma} \begin{proof} Since $Q$ is isomorphic to $Q^{op}$, the argument is dual to \cref{lem:hom(-M(si))}. \end{proof} \begin{lemma}\label{lem:Hom(M(ri) M(tj))} Given two vertices labeled $r_i, t_j \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(r_i), M(t_j)) = 0. \end{align*} \end{lemma} \begin{proof} This follows from \cref{lem:zero_path} and \cref{lem:M(a2)M(si)_r0_support}. \end{proof} \begin{lemma}\label{lem 6.7} Given two vertices labeled $r_i, s_j \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(s_j), M(r_i)) = 0. \end{align*} \end{lemma} \begin{proof} The argument is dual to \cref{lem:Hom(M(ri) M(tj))}. \end{proof} \begin{lemma}\label{lem 6.8} Given two vertices labeled $s_i, t_j \in Q_0$, we have \begin{align*} \operatorname{Hom}(M(s_i), M(t_j)) = 0. \end{align*} \end{lemma} \begin{proof} This follows from the fact that the top of $M(s_i)$ is $S(r_0)$ and the vertex $r_0$ does not lie in the support of $M(t_j)$. \end{proof} \medskip The results of this subsection can be combined in the following theorem. Recall that $A$ is isomorphic to its dual. \begin{theorem}\label{thm:end_T} The endomorphism algebra of $T$ is isomorphic to (the dual of) $A$, \[\operatorname{End}_A T\cong A.\] Furthermore, the mapping $x \mapsto M(x)$ induces an isomorphism of quivers $Q_A^{\operatorname{op}} \to Q_{\operatorname{End}_A T}$. In particular, the quiver $Q_{\operatorname{End}_A T}$ of $\operatorname{End}_A T$ is given by \begin{center} \begin{tikzpicture}[<-,scale=.7] \node (r0) at (60:2.5cm) {$M(r_0)$}; \node (ra2) at (120:2.5cm) {$M(r_{a_2})$}; \node (ra2-1) at (180:2.5cm) {$M(r_{a_2-1})$}; \node (r1) at (0:2.5cm) {$M(r_1)$}; \node (t1) at ($(r0) + (2.5,0)$) {$M(t_1)$}; \node (t2) at ($(t1) + (1.7,0)$) {}; \node (ta1-2) at ($(t2) + (1.7,0)$) {}; \node (ta1-1) at ($(ta1-2) + (2.1,0)$) {$M(t_{a_1-1})$}; \node (sa1-1) at ($(ra2) + (-3,0)$) {$M(s_{a_1-1})$}; \node (sa1-2) at ($(sa1-1) + (-2.1,0)$) {}; \node (s2) at ($(sa1-2) + (-1.7,0)$) {}; \node (s1) at ($(s2) + (-1.7,0)$) {$M(s_{1})$}; \draw (s1) -- (s2); \draw[thick, loosely dotted, -] (s2) -- (sa1-2); \draw (sa1-2) -- (sa1-1); \draw (sa1-1) -- (ra2); \draw (r0) -- (t1); \draw (t1) -- (t2); \draw[thick, loosely dotted, -] (t2) -- (ta1-2); \draw (ta1-2) -- (ta1-1); \draw (165:2.5cm) arc (165:135:2.5cm); \draw (45:2.5cm) arc (45:15:2.5cm); \draw (ra2) -- (r0); \draw (225:2.5cm) arc (225:195:2.5cm); \draw (-15:2.5cm) arc (-15:-45:2.5cm); \draw[thick, loosely dotted, -] (-55:2.5cm) arc (-55:-125:2.5cm); \end{tikzpicture} \end{center} \end{theorem} \begin{proof} By Lemma~\ref{lem 6.1}, the full subquiver with vertices $M(r_i)$ is an oriented cycle of length $a_2+1$ in which every subpath of length $a_2$ is zero. Lemmata \ref{lem:hom(M(ti) M(tj))} and \ref{lem 6.3} imply that the full subquivers with vertices $M(s_i)$ and $M(t_i)$, respectively, are equioriented of type $\mathbb{A}$ and there are no relations on these branches. Lemmata~\ref{lem:hom(-M(si))} and \ref{lem 6.5} imply that there is an arrow $M(r_{a_2})\to M(s_{a_1-1})$ and an arrow $M(t_1)\to M(r_0)$ and that there are no relations between the cycle and the two branches. The Lemmata~\ref{lem:Hom(M(ri) M(tj))} -- \ref{lem 6.8} show that are no other arrows. This shows that the quiver of $\textup{End}_AT$ is the one in the theorem and its relations are those coming from the potential. \end{proof} \section{Example}\label{sec:example} We illustrate the results in the example $(a_1,a_2)=(2,2)$ which is of type $\mathbb{A}_5$. The corresponding knot is the figure eight knot $L[2,2]$. We have \[Q=\xymatrix{1\ar[rr]&&2\ar[rr]&&3\ar[rr]&&4\\&&&5\ar[lu]\ar@{<-}[ru]}\] and the Jacobian algebra $A$ is the path algebra of $Q$ modulo the two-sided ideal generated by the subpaths of length 2 in the 3-cycle. Thus $A$ is a cluster-tilted algebra of Dynkin type $\mathbb{A}_5$. The $A$-module $T=\oplus_{i=1}^5 M(i)$ is given by \[ M(1)=\begin{smallmatrix}3\\5 \end{smallmatrix} \quad,\quad M(2) = \begin{smallmatrix}3\\4\ 5 \end{smallmatrix} \quad,\quad M(3) = \begin{smallmatrix}1\ 5\\ 2 \end{smallmatrix} \quad,\quad M(4)=\begin{smallmatrix} 5\\ 2 \end{smallmatrix} \quad,\quad M(5)= \begin{smallmatrix}1\\ 2\\ 3\\ 4 \end{smallmatrix}. \] The indecomposable summands $M(2),M(3),M(5)$ correspond to the vertices on the 3-cycle. Each of these indecomposables has precisely 5 submodules, as expected, since 5 is the number of terms in the Jones polynomial of the figure eight knot. For example, the submodules of $M(2)$ are $0, 4, 5, 4\oplus 5$ and $M(2)$. The Auslander-Reiten quiver of the cluster category is the following \[\xymatrix@!@R1pt@!@C1pt{ {\begin{smallmatrix}\bf 5 \\ \bf 2\end{smallmatrix}}\ar[dr] &&{\begin{smallmatrix}1\end{smallmatrix}\ar[dr]} && *+[Fo]{\begin{smallmatrix}{1}\end{smallmatrix}}\ar[dr] && {\begin{smallmatrix}\bf 1\\\bf 2\\\bf 3\\\bf 4 \end{smallmatrix}\ar[dr]} && *+[Fo]{\begin{smallmatrix}{4}\end{smallmatrix}}\ar[dr] &&{\begin{smallmatrix}{4}\end{smallmatrix}}\ar[dr] \\ &{\begin{smallmatrix}\bf 1\ 5\\\bf 2\end{smallmatrix}}\ar[dr]\ar[ur] && *+[Fo]{\begin{smallmatrix}{2}\end{smallmatrix}}\ar[ur]\ar[dr] && {\begin{smallmatrix}2\\3\\4\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}1\\2\\3\end{smallmatrix}}\ar[dr]\ar[ur] && *+[Fo]{\begin{smallmatrix}{3}\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}\bf 3\\\bf 4\ 5\end{smallmatrix}} \\ {\begin{smallmatrix}1\\2\end{smallmatrix}}\ar[dr]\ar[ur] &&{\begin{smallmatrix}5\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}3\\4\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}2\\3\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}1\\2\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}5\end{smallmatrix}}\ar[dr]\ar[ur] \\ &*+[Fo]{\begin{smallmatrix}{3}\end{smallmatrix}}\ar[ur]\ar[dr] && {\begin{smallmatrix}\bf 3\\\bf 4\ 5\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}3\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}2\end{smallmatrix}}\ar[dr]\ar[ur] && {\begin{smallmatrix}\bf 1\ 5\\\bf 2\end{smallmatrix}}\ar[dr]\ar[ur] && *+[Fo]{\begin{smallmatrix}{2}\end{smallmatrix}} \\ *+[Fo]{\begin{smallmatrix}{4}\end{smallmatrix}}\ar[ur] && {\begin{smallmatrix}{4}\end{smallmatrix}}\ar[ur] && {\begin{smallmatrix}\bf 3 \\ \bf 5\end{smallmatrix}}\ar[ur] && *+[Fo]{\begin{smallmatrix}{5}\end{smallmatrix}}\ar[ur] && {\begin{smallmatrix}\bf 5 \\ \bf 2\end{smallmatrix}}\ar[ur] && {\begin{smallmatrix}{1}\end{smallmatrix}}\ar[ur] } \] where vertices with the same labels are identified, and the shift of the projective $P(i)$ is denoted by an $i$ in a circle. The summands of $T$ are set in bold face. The mutation sequence $\mu$ of Section~\ref{sec:mutation} is $\mu=\mu_5\circ\mu_4\circ\mu_3\circ\mu_4\circ\mu_1\circ\mu_2\circ\mu_1\circ\mu_5$. This mutation sequence sequence sends $T$ to $A[1]$, more precisely \[M(1)\mapsto P(4)[1], \ M(2)\mapsto P(3)[1], \ M(3)\mapsto P(2)[1],\ M(4)\mapsto P(1)[1],\ M(5)\mapsto P(5)[1]. \] \section{Introduction} We construct tilting modules over Jacobian algebras that are motivated by knot invariants of two-bridge knots and their relation to cluster algebras. A relation between knot invariants and cluster algebras has been established recently in \cite{LS}, where the authors give a realization of the Jones polynomial of a two-bridge link in terms of the Laurent expansion of a certain cluster variable. In this approach, one first constructs a quiver $R$ of Dynkin type $\mathbb{A}$ from the link and then considers the cluster algebra $\mathcal{A}(R)$ determined by it. The cluster variable $x_M$ that realizes the Jones polynomial is the one associated with the unique indecomposable module $M$ of the path algebra of $R$ that is one-dimensional at each vertex. In this special situation, the cluster variable $x_M$ is a Laurent polynomial whose terms are parametrized by the submodules of the module $M$ \cite{CC}. Equivalently, it can be computed via a perfect matching formula of an associated snake graph \cite{MSW}. In particular, the number of terms (counted with multiplicities) in the Jones polynomial is equal to the number of submodules of $M$ and equal to the number of perfect matchings of the snake graph. We point out that a similar result for the Alexander polynomial was given more recently in \cite{NT} using ancestral triangles, and for the HOMFLY polynomial in \cite{Y} using path posets. See also \cite{MO} for an interesting reformulation of the results in \cite{LS}. On the other hand, the authors of \cite{CDR} established a dimer model for links, using the (overlaid) Tait graph $G$ of the link, to interpret the Alexander polynomial as a partition function. In this method, one has to remove two adjacent regions from the graph $G$ and thereafter one can compute the Alexander polynomial as the determinant of the (weighted) adjacency matrix of the reduced graph. This formula is reminiscent of Alexander's original definition of the polynomial as the determinant of the incidence matrix from which one removes two columns that correspond to two adjacent regions in the graph \cite{A}. It is crucial to note that the result does not depend on the choice of the two adjacent regions in $G$, and this observation motivated the research project in this paper. If the link is a two-bridge link, we can associate a quiver $Q$ with potential $W$ to the graph $G$, and we denote by $A$ the corresponding Jacobian algebra. The removal of two adjacent regions in $G$ corresponds to the removal of a connected subquiver of $Q$, and, for a certain choice of adjacent regions, the resulting quiver is precisely the quiver $R$ used in \cite{LS} to compute the Jones polynomial of the link. If we chose a different pair of adjacent regions then the subquiver may look very different, but it is natural to expect that a variation of the methods of \cite{LS} will also apply for these subquivers and give another way to compute the Jones polynomial. This problem will be considered in a different paper. In this paper, we want to consider all possible choices of adjacent pairs at the same time. Each such choice $i$ will determine a subquiver $Q^i$ of the quiver $Q$ which we need to remove. On the remaining quiver $Q(i)=Q\setminus Q^i$, we define a canonical indecomposable $A$-module $M(i) $ of dimension 1 at every vertex of $Q(i)$, and we let $M=\oplus_i M(i)$ be the direct sum of these indecomposables. Motivated by the results mentioned above, we want to study the structure of $M$ inside the module category of $A$. Thereby we combine all possible choices of adjacent regions into one object. It is natural to expect that this module $M$ has a particularly nice structure. By construction, $M$ is a sincere $A$-module, meaning it is supported at every vertex of $Q$, each indecomposable summand $M(i)$ of $M$ is supported on a different subquiver $Q(i)$ of $Q$ and each $M(i)$ should parametrize the Jones and the Alexander polynomial of the two-bridge link via its submodules. Recall that a two-bridge link $L[a_1,a_2,\ldots,a_n]$ is given by a sequence of positive integers $a_1,a_2,\ldots,a_n$ and the number of terms in the Jones (and Alexander) polynomial is equal to the numerator of the continued fraction \[[a_1,a_2,\ldots,a_n]= a_1+\cfrac{1}{a_2+\cfrac{1}{\ddots +\cfrac{1}{a_n}}}.\] In this paper, we consider the special case where $n=2$. Thus we have two positive integers $a_1,a_2$ and the number of terms in the Jones polynomial is $a_1a_2+1$. The case $n=1$ is contained in this case because the link $L[a_1]$ is equivalent to the link $L[1,a_1-1]$. For $n=2$, the quiver $Q$ is of the form illustrated in Figure~\ref{fig:Q}. In this situation the removal of two adjacent regions in $G$ corresponds to the removal of a vertex $r_i$ on the oriented cycle of $Q$ together with the branch at the vertex $r_i$ if $i =0$ or $i=a_2$. We let $M(r_i)$ be the unique indecomposable $A$-module that is one-dimensional at every vertex of the remaining subquiver. We prove that each $M(r_i)$ has precisely $a_1a_2+1$ submodules as expected. We then construct an indecomposable $A$-module $M(x)$ for each of the remaining vertices $x=s_1,s_2,\ldots,s_{a_1-1},t_1,t_2,\ldots,t_{a_1-1}$ of $Q$, and we define $T=\oplus_{x\in Q_0} M(x)$ to be the direct sum of all these indecomposables. We show that $T$ is a tilting $A$-module. This means that $\operatorname{Ext}^1_A(T,T)$ vanishes, that the projective dimension of $T$ is at most one and that there exists a short exact sequence of the form $0\to A\to T^0\to T^1\to 0$ with $T^0,T^1$ in the additive closure of $T$. Tilting modules and their endomorphism algebras play a central role in representation theory, see for example \cite{AsSiSk, handbook}. Furthermore, we show that $T$ is a $\tau$-tilting $A$-module as defined in \cite{AIR}. This means that in addition to being a tilting module, $\operatorname{Hom}(T, \tau T) = 0$ where $\tau$ is the Auslander-Reiten translation. Our $\tau$-tilting module $T$ is particularly nice, since we can show that its endomorphism algebra $\operatorname{End}_A T$ is isomorphic to the dual of $A$, and $A$ is self-dual. \medskip We then consider this situation at the level of the corresponding cluster algebra $\mathcal{A}(Q)$ defined in \cite{FZ1}. We show that the $\tau$-tilting module $T$ induces a cluster-tilting object in the cluster category $\mathcal{C}_Q$ introduced in \cite{Amiot}. It turns out that our quiver is mutation equivalent to an acyclic quiver and thus the cluster category is of acyclic type as defined in \cite{BMRRT} (and \cite{CCS}, for Dynkin type $\mathbb{A}$). Therefore, the results in \cite{CK2} imply that each of $A[1]$ and $T$ corresponds to a cluster $\mathbf{x}_{A[1]}$ and $\mathbf{x}_T$ in the cluster algebra (here $[1]$ denotes the shift in the cluster category). Using a result from \cite{ASS}, we see that the correspondence $T \mapsto A[1]$ induces a cluster automorphism $\sigma$ of $\mathcal{A}(Q)$, that maps the cluster $\mathbf{x}_T$ to the cluster $\mathbf{x}_{A[1]}$ and induces an isomorphism between the quiver $Q$ of the cluster $ \mathbf{x}_{A[1]}$ and the opposite of the quiver of the cluster $\mathbf{x}_T$. We further show that $\sigma$ has order 2. We then construct a sequence of mutations $\mu$ that realizes the automorphism $\sigma$. Our main results are summarized in the following theorem. \begin{theorem} Let $A$ be the Jacobian algebra of $Q=Q[a_1,a_2]$ and let $T=\oplus_{x\in Q_0} M(x)$. \begin{enumerate} \item $T$ is a tilting $A$-module and a $\tau$-tilting $A$-module. \item The endomorphism algebra $\operatorname{End}_A T$ is isomorphic to $A$. \item The correspondence $T \mapsto A[1]$ induces a cluster automorphism $\sigma$ of order two of the cluster algebra $\mathcal{A}(Q)$. \item The automorphism $\sigma$ is given by the sequence of mutations \[ \mu= \mu_{\mkern-1.5mu R}^{-1}\circ\mu_S\circ\mu_T\circ\mu_{\mkern-1.5mu R}, \] where \begin{align*} &\mu_{\mkern-1.5mu R} = \mu_{r_{a_2}-1} \circ \cdots \circ \mu_{r_2} \circ \mu_{r_1}, \\ &\mu_S = \mu_{s_1}\mu_{s_2}\mu_{s_3} \cdots \mu_{r_{a_2}} \circ \cdots \circ \mu_{s_1}\mu_{s_2}\mu_{s_3} \circ \mu_{s_1}\mu_{s_2} \circ \mu_{s_1}, \\ &\mu_T = \mu_{t_{a_1-1}}\mu_{t_{a_1-2}}\mu_{t_{a_1-3}} \cdots \mu_{r_0} \circ \cdots \circ \mu_{t_{a_1-1}}\mu_{t_{a_1-2}}\mu_{t_{a_1-3}} \circ \mu_{t_{a_1-1}}\mu_{t_{a_1-2}} \circ \mu_{t_{a_1-1}}. \end{align*} \item The cluster algebra $\mathcal{A}(Q)$ is of acyclic type $\mu_{\mkern-1.5mu R} \,Q = T_{p,q,r}$, a tree with three branches. Moreover, the cases where it is of finite or tame type are the following. \[ \begin{array}{ll} \mathbb{A}_{2a_1+1} & \textup{if $a_2=2$};\\ \mathbb{D}_{a_2+1} & \textup{if $a_1=1$};\\ \mathbb{E}_{6} & \textup{if $(a_1,a_2)=(2,3)$};\\ \widetilde{\mathbb{E}}_{7} & \textup{if $(a_1,a_2)=(3,3)$};\\ \widetilde{ \mathbb{E}}_{6} & \textup{if $(a_1,a_2)=(2,4)$}; \end{array} \] and it is of wild acyclic type in all other cases. \end{enumerate} \end{theorem} The case $n\ge 3$ is more complicated and will require different methods. We expect that we can still construct the tilting module $T$ and a mutation sequence. However, already in small examples, we do not obtain a cluster automorphism of order two. The paper is organized as follows. We define the $A$-module $T$ in Section~\ref{sec:def_of_M} and compute the number of submodules in Section~\ref{sec:submodules}. After computing the Auslander-Reiten translate of $T$ in Section~\ref{sec:tau_M}, we show that $T$ is a tilting and a $\tau$-tilting $A$-module in Section~\ref{sec:tilting_module}. Section~\ref{sec:end_M} is devoted to the study of the endomorphism algebra of $T$ and to the proof of $\operatorname{End}_A T\cong A$. In Section~\ref{sec:mutation}, we construct the mutation sequence that transforms $A$ into $T$ and show that the corresponding cluster automorphism has order two. We illustrate the results in an example in Section~\ref{sec:example}. \section{Mutation and the cluster algebra \texorpdfstring{$\mathcal{A}(Q)$}{A(Q)}}\label{sec:mutation} In \cref{thm:T-cto}, we have shown that $T$ induces a cluster-tilting object in the cluster category $\mathcal{C}_Q$ introduced in \cite{BMRRT}. From \cref{thm:end_T}, the quiver given by $T$ is the opposite quiver $Q^{op}$, so using a result in \cite{ASS} we see that the correspondence $T \mapsto A[1]$ induces a cluster automorphism $\sigma$. In this section, we define a mutation sequence $\mu$ on the quiver $Q$ and show that $Q$ is of acyclic type. The cluster automorphism $\sigma$ is given by $\mu$, which we prove by showing that $\mu$ sends $T$ to $A[1] = \oplus_{x \in Q_0} P(x)[1]$ in the cluster category. Furthermore, we show that $\sigma$ has order $2$. \begin{definition} We define the mutation sequence $\mu$ on the quiver $Q$ by \begin{align*} \mu := \mu_{\mkern-1.5mu R}^{-1} \circ \mu_S \circ \mu_T \circ \mu_{\mkern-1.5mu R}, \end{align*} where \begin{align*} &\mu_{\mkern-1.5mu R} = \mu_{r_{a_2}-1} \circ \cdots \circ \mu_{r_2} \circ \mu_{r_1}, \\ &\mu_S = \mu_{s_1}\mu_{s_2}\mu_{s_3} \cdots \mu_{r_{a_2}} \circ \cdots \circ \mu_{s_1}\mu_{s_2}\mu_{s_3} \circ \mu_{s_1}\mu_{s_2} \circ \mu_{s_1}, \\ &\mu_T = \mu_{t_{a_1-1}}\mu_{t_{a_1-2}}\mu_{t_{a_1-3}} \cdots \mu_{r_0} \circ \cdots \circ \mu_{t_{a_1-1}}\mu_{t_{a_1-2}}\mu_{t_{a_1-3}} \circ \mu_{t_{a_1-1}}\mu_{t_{a_1-2}} \circ \mu_{t_{a_1-1}}. \end{align*} \end{definition} We see the effect of these mutation sequences on the quiver illustrated in Figures~\ref{fig:mutation_R}-\ref{fig:mu_Q}. The quiver $\mu_{\mkern-1.5mu R}\, Q$ is seen in the left picture of \cref{fig:mutation_ST}. \input{Tikz_Figures/Mutation_R} \input{Tikz_Figures/Mutation_ST} \input{Tikz_Figures/Mutation_R_inverse} \input{Tikz_Figures/Mutation_Mu} \begin{theorem} The cluster algebra $\mathcal{A}(Q)$ is of acyclic type $\mu_{\mkern-1.5mu R}\, Q$. Moreover, the cases where it is of finite or tame type are the following. \[ \begin{array}{ll} \mathbb{A}_{2a_1+1} & \textup{if $a_2=2$};\\ \mathbb{D}_{a_2+1} & \textup{if $a_1=1$};\\ \mathbb{E}_{6} & \textup{if $(a_1,a_2)=(2,3)$};\\ \widetilde{\mathbb{E}}_{7} & \textup{if $(a_1,a_2)=(3,3)$};\\ \widetilde{ \mathbb{E}}_{6} & \textup{if $(a_1,a_2)=(2,4)$}; \end{array} \] and it is of wild acyclic type in all other cases. \end{theorem} \begin{proof} The quiver $\mu_{\mkern-1.5mu R}\, Q$ is given by \cref{fig:mutation_R} together with the branches $s_1 \to \cdots \to s_{a_1-1} \to r_{a_2}$ and $r_0 \to t_1 \to \cdots \to t_{a_1-1}$, and is shown in \cref{fig:mutation_ST}. \end{proof} \begin{remark} The quiver $\mu_T \mu_{\mkern-1.5mu R}\, Q$ is the quiver $T_{p,q,r}$ of \cite{Arnold, DW}, with $p = q = a_1+1$ and $r=a_2-1$. \end{remark} \begin{lemma}\label{lem 7.4} We have \[\mu_S(\mu_{\mkern-1.5mu R}\, T) = \mu_{S}^{-1}(\mu_{\mkern-1.5mu R}\, T),\] and dually \[\mu_T(\mu_{\mkern-1.5mu R}\, T) = \mu_{T}^{-1}(\mu_{\mkern-1.5mu R}\, T).\] \end{lemma} \begin{proof} In $\mu_{\mkern-1.5mu R} \,Q$, there are no arrows between $s_i$ and $s_{i + \ell}$ for $\ell > 1$. Therefore \[\mu_{s_i}\mu_{s_{i+\ell}}=\mu_{s_{i+\ell}} \mu_{s_i}.\] Thus the mutation sequence \[\mu_{s_1}\mu_{s_2}\mu_{s_3} \cdots \mu_{r_{a_2}} \circ \cdots \circ \mu_{s_1}\mu_{s_2}\mu_{s_3} \circ \mu_{s_1}\mu_{s_2} \circ \mu_{s_1}\] is equal to the mutation sequence \[\mu_{s_1} \circ \mu_{s_2}\mu_{s_1} \circ \mu_{s_3}\mu_{s_2}\mu_{s_1} \cdots \circ \mu_{r_{a_2}} \cdots \mu_{s_3}\mu_{s_2}\mu_{s_1},\] and so we have $\mu_S(\mu_{\mkern-1.5mu R}\, T) = \mu_{S}^{-1}(\mu_{\mkern-1.5mu R}\, T)$. \end{proof} \begin{corollary}\label{cor:order_two} The mutation sequence $\mu$ is of order two, i.e., \[\mu T = \mu^{-1}T.\] \end{corollary} \begin{proof} There are no arrows between $s_i$ and $t_j$ for any $1 \leq i,j \leq a_1-1$, so $\mu_S \mu_T = \mu_T \mu_S$. Thus $ \mu^2 = \mu_{\mkern-1.5mu R}^{-1} \mu_S \mu_T \mu_{\mkern-1.5mu R} \ \mu_{\mkern-1.5mu R}^{-1} \mu_S \mu_T \mu_{\mkern-1.5mu R} = \mu_{\mkern-1.5mu R}^{-1} \mu_S\mu_S \mu_T \mu_T \mu_{\mkern-1.5mu R} $, and by Lemma~\ref{lem 7.4}, this is equal to $ \mu_{\mkern-1.5mu R}^{-1} \mu_{\mkern-1.5mu R}$. \end{proof} \begin{theorem} The correspondence $T \mapsto A[1]$ induces a cluster automorphism $\sigma$. The automorphism $\sigma$ has order two, and is given by the sequence of mutations $\mu$. \end{theorem} \begin{proof} From \cref{cor:order_two}, it is enough to show that $\sigma$ is given by the sequence of mutations $\mu$. We show that $\mu_T \mu_S \mu_{\mkern-1.5mu R}\, T = \mu_{\mkern-1.5mu R}\, A[1]$. First, we apply the mutation sequence $\mu_{\mkern-1.5mu R}$ to $T$. As shown in \cref{fig:mutation_R}, at each step prior to mutating at the vertex $r_i$ we have exactly one arrow ending at $r_i$, namely $r_0 \to r_i$. Hence we replace the summand $M(r_i)$ of $T$ with the module $X(r_i)$, given by the exchange triangle \begin{align*} M(r_0)[-1] \to X(r_i)[-1] \to M(r_i) \xrightarrow{f} M(r_0) \to X(r_i), \end{align*} where $f$ is an $\operatorname{add} (T/M(r_i))$-approximation. By \cref{rem:proj_inj}, we know that $M(r_0)$ is injective. Therefore the image of this triangle under the functor $\operatorname{Hom}_{\mathcal{C}}(T,-)$ is the exact sequence in $\operatorname{Mod}A$: \begin{align*} 0 \to \tau^{-1}X(r_i) \to M(r_i) \xrightarrow{f} M(r_0). \end{align*} So $\tau^{-1}X(r_i)$ is given by the kernel of the morphism $M(r_i) \xrightarrow{f} M(r_0)$, hence \begin{align*} \tau^{-1}X(r_i) = \begin{smallmatrix} & r_0 & \\ r_1 & & t_1 \\ r_2 & & t_2 \\ \vdots & & \vdots \\ r_{i-1} & & t_{a_1-1}\end{smallmatrix}. \end{align*} Now $\tau^{-1}X(r_i)$ has a projective resolution $\cdots \to P(r_i) \xrightarrow{g} P(r_0) \to \tau^{-1}X(r_i) \to 0$, so by applying the Nakayama functor $\nu$ we see that $X(r_i)$ is given by the kernel of the map $I(r_i) \xrightarrow{\nu g} I(r_0)$. Hence \begin{align*} X(r_i) = \begin{smallmatrix} r_1 \\ r_2 \\ \vdots \\ r_i \end{smallmatrix}, \quad\quad \text{and} \quad\quad \mu_{\mkern-1.5mu R}\, T = T \setminus \Bigg(\bigoplus_{i=1}^{a_2-1}M(r_i)\Bigg) \oplus \Bigg(\bigoplus_{i=1}^{a_2-1} X(r_i)\Bigg) . \end{align*} Second, we apply the mutation sequence $\mu_S$. Note that the mutation sequence $\mu_S$ only mutates the quiver $\mu_{\mkern-1.5mu R}\, Q$ at sources. Since the quiver of $T$ is $Q^{\operatorname{op}}$, each mutation in this sequence acts on the corresponding summand of $T$ as the shift operator. Dually, each mutation in the sequence $\mu_T$ acts on the corresponding summand of $T$ as the inverse shift operator. Let $s_{a_1} := r_{a_2}$ and $t_0 := r_0$. For each $i$, the mutation sequence $\mu_S$ mutates the vertex $s_i$ exactly $a_1 - i + 1$ times and the mutation sequence $\mu_T$ mutates the vertex $t_i$ exactly $i+1$ times. We conclude that \begin{align*} \mu_T\mu_S\mu_{\mkern-1.5mu R}\, T = \Bigg(\bigoplus_{i=1}^{a_2-1} X(r_i)\Bigg) \oplus \Bigg(\bigoplus_{i=1}^{a_1} M(s_i)[a_1-i+1]\Bigg) \oplus \Bigg( \bigoplus_{i=0}^{a_1-1} M(t_i)[-(i+1)]\Bigg). \end{align*} Next, we compute $M(s_i)[a_1-i+1]$ and $M(t_i)[-(i+1)]$ for all $i$. Given a pair $(j, \ell)$ such that $1 \leq j \leq \ell < a_1-1$, define \begin{align*} L := \begin{smallmatrix}t_j \\ t_{j+1} \\ \vdots \\ t_{\ell} \end{smallmatrix}. \end{align*} Then $L$ has a projective resolution $\cdots \to P(t_{\ell+1}) \xrightarrow{g} P(t_j) \to L \to 0$. Applying the Nakayama functor $\nu$, we see that $\tau L = L[1]$ is given by the kernel of the morphism $I(t_{\ell + 1}) \xrightarrow{\nu g} I(t_j)$, so \begin{align*} L[1] = \begin{smallmatrix} t_{j+1} \\ t_{j+2} \\ \vdots \\ t_{\ell+1} \end{smallmatrix}. \end{align*} Recall $\tau M(s_i)$ from \cref{lem:tau_M(si)}. Then for all $i$, it follows that \begin{align*} M(s_i)[a_1-i+1] &= \tau M(s_i)[a_1 - i - 1][1], \\[1.5em] &= \begin{smallmatrix}t_1\\t_2 \\\vdots\\t_i\end{smallmatrix}[a_1 - i - 1][1], \\[1.5em] &= \begin{smallmatrix}t_{a_1-i}\\t_{a_1-i+1} \\\vdots\\t_{a_1-1}\end{smallmatrix}[1], \\[1.5em] &= P(t_{a_1-i})[1]. \end{align*} Then from a dual argument, we also have \begin{align*} M(t_i)[-(i+1)] = I(s_{a_1-i})[-1] = P(s_{a_1-i})[1]. \end{align*} Hence \begin{align*} \mu_T \mu_S \mu_{\mkern-1.5mu R}\, T = \Bigg(\bigoplus_{i=1}^{a_2-1}X(r_i)\Bigg)\oplus \Bigg(\bigoplus_{i=0}^{a_1-1}P(s_i)[1]\Bigg) \oplus \Bigg(\bigoplus_{i=1}^{a_1}P(t_i)[1]\Bigg). \end{align*} Finally, let $A[1] = \bigoplus_{x \in Q_0} P(x)[1]$ with quiver $Q^{\operatorname{op}}$. For $i=1,2, \cdots, a_2-1$, let $X'(r_i)$ be the module replacing the summand $P(r_i)[1]$ in the module $\mu_{\mkern-1.5mu R}\, A[1]$. To complete the proof, we show that $X'(r_i) = X(r_i)$. This proves that $\mu_S \mu_T \mu_{\mkern-1.5mu R}\, T = \mu_{\mkern-1.5mu R}\, A[1]$, and thus $\mu T = A[1]$. Recall from \cref{fig:mutation_R} that at each step of $\mu_{\mkern-1.5mu R}$, prior to mutating at the vertex $r_i$ we have exactly one arrow ending at $r_i$, namely $r_0 \to r_i$. So $X'(r_i)$ is given by the exchange triangle \begin{align*} P(r_i) \xrightarrow{h} P(r_0) \to X'(r_i)[-1] \to P(r_i)[1] \to P(r_0)[1] \to X'(r_i). \end{align*} The image of this triangle under the functor $\operatorname{Hom}_{\mathcal{C}}(A[1],-)$ is the exact sequence in $\operatorname{mod}A$: \begin{align*} P(r_i) \xrightarrow{h} P(r_0) \to \tau^{-1}X'(r_i) \to 0. \end{align*} We have a projective resolution $\cdots \to P(r_i) \xrightarrow{h} P(r_0) \to \tau^{-1}X'(r_i)$, so applying the Nakayama functor $\nu$ tells us that $X'(r_i)$ is given by the kernel of the map $I(r_i) \xrightarrow{\nu h} I(r_0)$. This is exactly how we computed $X(r_i)$, so $X'(r_i) = X(r_i)$. This completes the proof. \end{proof} \section{Submodules of \texorpdfstring{$M(r_i)$}{M(ri)}.}\label{sec:submodules} As mentioned in the introduction, we want that \emph{each} indecomposable module $M(r_i)$ gives a parametrization of the Alexander polynomial of the link $L[a_1,a_2]$ via its submodules. In particular, since the Alexander polynomial has $a_1a_2+1$ terms, we should expect that the number of submodules of $M(r_i)$ also equals $a_1a_2+1$ and does not depend on $i$. We prove this fact in this section. \begin{lemma}\label{lem:submod_supp_ra2} For every $i=0,1,\ldots,a_2$, the module $M(r_i)$ has exactly $a_1(a_2-i)$ submodules with support at $r_{a_2}$. \end{lemma} \begin{proof} If $i=a_2$, then there is nothing to show because $M(r_{a_2})$ is not supported at $r_{a_2}$. Otherwise, for each pair $(j,\ell)$ with $i+1 \leq j \leq a_2$ and $1 \leq \ell \leq a_1$, we have a submodule \begin{align*} \begin{smallmatrix} r_j & & s_{\ell} \\ \vdots & & \vdots \\ r_{a_2-1} & & s_{a_1-1} \\ & r_{a_2} & \\ & r_0 & \\ r_1 & & t_1 \\ r_2 & & t_2 \\ \vdots & & \vdots \\ r_{i-1} & & t_{a_1-1} \end{smallmatrix}, \end{align*} where we set $s_{a_1}=r_{a_2}$ if $\ell=a_1$. There are exactly $a_1(a_2-i)$ such submodules. \end{proof} \begin{lemma}\label{lem:submod_supp_r0} For every $i=1, 2\ldots,a_2$, the module $M(r_i)$ has exactly $1$ submodule that is supported at $r_0$ and not supported at $r_{a_2}$. \end{lemma} \begin{proof} The submodule is given by \begin{align*} \begin{smallmatrix} & r_0 & \\ r_1 & & t_1 \\ r_2 & & t_2 \\ \vdots & & \vdots \\ r_{i-1} & & t_{a_1-1} \end{smallmatrix}. \end{align*} \end{proof} \begin{lemma}\label{lem:submod_rest} For every $i=1,2,\ldots,a_2$, the module $M(r_i)$ has exactly $(i\,a_1)$ submodules that are zero at $r_0$ and $r_{a_2}$. \end{lemma} \begin{proof} For each pair $(j,\ell)$ such that $1 \leq j \leq i$ and $1 \leq \ell \leq a_1$, we have a submodule \begin{align*} \begin{smallmatrix} r_j \\ \vdots \\ r_{i-1} \end{smallmatrix} \oplus \begin{smallmatrix} t_{\ell} \\ \vdots \\ t_{a_1-1} \end{smallmatrix} =: L_1 \oplus L_2. \end{align*} Note that if $j = i$, then we take $L_1 = 0$. Similarly, if $\ell = a_1$, then we take $L_2 = 0$. There are exactly $i\,a_1$ such submodules. \end{proof} \begin{proposition} Let $r_i$ be any vertex on the cycle in $Q$. Then $M(r_i)$ has exactly $a_1a_2+1$ submodules. \end{proposition} \begin{proof} If $i=0$, then $M(r_0)$ has exactly $a_1a_2$ submodules supported at $r_{a_2}$, by \cref{lem:submod_supp_ra2}. Note that $M(r_0)=I(r_{a_2})$ is the injective at $r_{a_2}$. Thus the only other submodule of $M(r_0)$ is the zero module. Now suppose $i\ne 0$. Then Lemmata~\ref{lem:submod_supp_ra2}--\ref{lem:submod_rest} yield an exhaustive list of the $a_1a_2+1$ submodules of $M(r_i)$. \end{proof} \section{Computation of \texorpdfstring{$\tau T$}{TT}.} \label{sec:tau_M} In this section, we compute the Auslander-Reiten (AR) translate of each indecomposable summand of the $A$-module $T$ defined in \cref{sec:def_of_M}. First, we compare the indecomposable summands of $T$ the indecomposible projectives and injectives of $A$, and we see the following. \begin{remark}\label{rem:proj_inj} We have \[ \begin{array}{rclcrclcrcl} M(r_{a_2-1}) &=& P(s_1), &\quad& M(r_{a_2}) &=& P(r_0), &\quad& M(t_{a_1-1}) &=& P(r_1),\\[0.5pt] M(r_0) &=& I(r_{a_2}), &\quad& M(r_1) &=& I(t_{a_1-1}), &\quad& M(s_1) &=& I(r_{a_2-1}). \end{array}\] \end{remark} For the rest of this section, we use the notation $L=(L_x, \varphi_\alpha)_{x\in Q_0,\alpha\in Q_1}$ for an $A$-module $L$. \begin{lemma}\label{lem:tau_M(ri)} The modules $\tau M(r_{a_2})$ and $\tau M(r_{a_2-1})$ are zero, and for $i=0,1,\ldots, a_2-2$ we have \begin{align*} &\tau M(r_i) = \begin{smallmatrix} s_2 & & r_{i+2} \\ s_3 & & r_{i+3} \\ \vdots & & \vdots \\ s_{a_1-1} & & r_{a_2-1} \\ & r_{a_2}& \end{smallmatrix}, \quad\quad\quad &\tau M(r_i)_x = \begin{cases} 0 &\text{if $x=r_j$ for any $0 \leq j \leq i+1$;} \\ 0 &\text{if $x=t_j$ for any $j$;} \\ 0 &\text{if $x=s_1$;} \\ k &\text{otherwise.} \end{cases} \end{align*} Furthermore, the projective dimension of $M(r_i)$ is $1$. \end{lemma} \begin{proof} Remark \ref{rem:proj_inj} implies that $\tau M(r_{a_2})$ and $\tau M(r_{a_2-1})$ are zero. Suppose now that $0\le i\le a_2-2$. We have the projective resolution \begin{align*} 0 \to P(r_{a_2}) \xrightarrow{f} P(r_{i+1}) \oplus P(s_1) \to M(r_i) \to 0. \end{align*} This shows that $\operatorname{pd} M(r_i) = 1$. By applying the Nakayama functor $\nu$, we get the exact sequence \begin{align*} 0 \to \tau M(r_i) \to I(r_{a_2}) \xrightarrow{\nu f} I(r_{i+1}) \oplus I(s_1). \end{align*} The map $I(r_{a_2}) \to I(s_1)$ is nonzero only at the vertex $s_1$, so $\tau M(r_i)_{s_i} = 0$. The map $I(r_{a_2}) \to I(r_{i+1})$ is nonzero at the vertices $r_1, ..., r_{i+1}$, so $\tau M(r_i)$ is zero at these vertices. Also, both modules $I(r_{a_2})$ and $I(r_{i+1}) \oplus I(s_1)$ have no support at vertices labeled $t_j$, so $\tau M(r_i)$ is zero at these vertices. This completes the proof. \end{proof} \begin{lemma}\label{lem:tau_M(ti)} The module $\tau M(t_{a_1-1})$ is zero, and for $i=0,1,\ldots ,a_1-2$ we have \begin{align*} &\tau M(t_i) = \begin{smallmatrix} s_{i+2} & & r_{2} \\ s_{i+3} & & r_{3} \\ \vdots & & \vdots \\ s_{a_1-1} & & r_{a_2-1} \\ & r_{a_2}& \end{smallmatrix}, \quad\quad\quad & \tau M(t_i)_x = \begin{cases} 0 &\text{if $x=r_0$ or $x=r_1$;} \\ 0 &\text{if $x=t_j$ for any $j$;} \\ 0 &\text{if $x=s_j$ for any $1 \leq j \leq i+1$;} \\ k &\text{otherwise.} \end{cases} \end{align*} Furthermore, the projective dimension of $M(t_i) $ is $ 1$. \end{lemma} \begin{proof} Remark \ref{rem:proj_inj} implies that $\tau M(t_{a_1-1})$ is zero. Suppose now that $0\le i\le a_2-2$. We have the projective resolution \begin{align*} 0 \to P(r_{a_2}) \xrightarrow{f} P(r_1) \oplus P(s_{i+1}) \to M(t_i) \to 0. \end{align*} This shows that $\operatorname{pd} M(t_i) = 1$. The rest of the proof is analogous to \cref{lem:tau_M(ri)}. \end{proof} \begin{lemma}\label{lem:tau_M(si)} For $i=1,2,\ldots, a_1 - 1$, we have \begin{align*} &\tau M(s_i) = \begin{smallmatrix} t_1 \\ t_2 \\ \vdots \\ t_i \end{smallmatrix}, \quad\quad\quad & \tau M(s_i)_x = \begin{cases} 0 &\text{if $x = r_j$ for any $j$;} \\ 0 &\text{if $x = t_j$ for any $j > i$;} \\ 0 &\text{if $x = s_j$ for any $j$;} \\ k &\text{otherwise.} \end{cases} \end{align*} Furthermore, the projective dimension of $M(s_i) $ is $ 1$. \end{lemma} \begin{proof} By definition of $M(s_i)$, we have the projective resolution \begin{align*} 0 \to P(t_i) \xrightarrow{f} P(r_0) \to M(s_i) \to 0. \end{align*} This shows that $\operatorname{pd} M(s_i) = 1$. The rest of the proof is analogous to \cref{lem:tau_M(ri)}. \end{proof} \begin{proposition}\label{prop:pd_M} The module $T$ from \cref{def:M} has projective dimension $1$. \end{proposition} \begin{proof} This follows immediately from Lemmata \ref{lem:tau_M(ri)}--\ref{lem:tau_M(si)} \end{proof}
\section{Introduction} \label{sec:intro} Deep learning, a popular learning paradigm in computer vision, has improved the performance on numerous computer vision tasks, such as category recognition, scene understanding and action recognition. However, deep models heavily rely on large amounts of labeled training data, costly data collection and labelling. \begin{figure}[t] \centering \includegraphics[width=0.85\linewidth]{images/arl_demo_new.pdf} \vspace{-0.3cm} \caption{\small Our few-shot learning paradigm. Absolute Learning (AL) refers to the strategy where a pipeline learns to predict absolute object information \emph{e.g.}, object or concept class. Relative Learning (RL) denotes similarity (relation) learning with the use of binary $\{0,1\}$ and/or soft $[0;1]$ similarity labels. Absolute-relative Learning (ArL) is a combination of AL and RL, which is akin to multi-task learning, and unary and pair-wise potentials in semantic segmentation. ArL is also conceptually closer to how humans learn from few examples.} \label{fig:arl_demo} \vspace{-0.5cm} \end{figure} In contrast, humans enjoy the ability to learn and memorize new complex visual concepts from very few examples. Inspired by this observation, researchers have focused on the so-called Few-shot Learning (FSL), for which a network is trained by the use of only few labeled training instances. Recently, deep networks based on relation-learning have gained the popularity \cite{vinyals2016matching,snell2017prototypical,sung2017learning,NIPS2017_7082,sosn,salnet,zhang2020few,Zhang_2020_CVPR,ziko2020laplacian,deeper_look2,Simon_2020_CVPR}. Such approaches often apply a form of metric learning adapted to the few-shot learning task. They learn object relations (similarity learning on query and support images) based on support classes, and can be evaluated on images containing novel classes. However, there are two major problems in these relation learning pipelines, namely, (i) binary $\{0,1\}$ labels are used to express the similarity between pairs of images, which cannot capture the similarity nuisances in the real-world setting due to the hardness of such modeling, which leads to biases in the relation-based models, (ii) only pair-wise relation labels are used in these pipelines, so the models have no knowledge of the actual class concepts. In other words, these models are trained to learn the similarity between image pairs while they discard the explicit object classes despite they are accessible in the training stage. We conjuncture that these two problems pose inconsistency between current few-shot learning approaches and human's cognitive processes. To this end, we propose the Absolute-relative Learning (ArL) which exposes few-shot learners to both similarity and class labels, and we employ semantic annotations to circumvent the issue with the somewhat rigid binary similarity labels $\{0,1\}$. Our ArL consists of two separate learning modules, namely, Absolute Learning (AL) and Relative Learning (RL). AL denotes the strategy in which we learn to predict the actual object categories or class concepts in addition to learning the class relations. In this way, the feature extracting network is exposed to additional object- or concept-related knowledge. RL refers to the similarity learning strategy for which (apart of binary $\{0,1\}$ labels) we employ semantic annotations to promote the realistic similarity between image pairs. We use attributes or word2vec to obtain the semantic relation labels and learn element-wise similarities \emph{e.g.}, if two objects have same colour, texture, \emph{etc}. Such labels are further used as the supervisory cue in relation learning to capture the realistic soft relations between objects beyond the binary similarity. By combing AL and RL which constitute on ArL, the relation network is simultaneously taught the class/object concepts together with more realistic class/object relations, thus naturally yielding an improved accuracy. Moreover, we use the predictions from the absolute and relative learners as interpretable features to promote the original relation learning via feedback connections. Our approach is somewhat related to multi-modal learning which leverages multiple sources of data for training and testing. However, while multi-modal learning combines multiple streams of data on network inputs, our ArL models the semantic annotations in the label space, that is, we use them as the network output. We believe that using multiple abstractions of labels (relative \vs absolute) encourages the network to preserve more information about objects relevant to the few-shot learning task. Our strategy benefits from multi-task learning where two tasks learnt simultaneously help each other to outperform a naive fusion of two separate tasks. These tasks somewhat resemble unary and pair-wise potentials in semantic segmentation. We note that obtaining the semantic information for novel classes (the testing step in few-shot learning) is not always easy or possible. Since our pipeline design is akin to multi-task rather than multi-modal learning, our model does not require additional labeling at the testing stage. Therefore, it is a more realistic setting than that of existing approaches. In addition to the classic supervised few-shot recognition, we extend our ArL to the unsupervised scenario. Different with approach \cite{gidaris2019boosting} that merely applies the self-supervised discriminator as an auxiliary task to improve the performance of supervised FSL, we develop an effective unsupervised FSL based on ArL. As there is no annotations for training samples, we rely on augmentation labelling (\emph{e.g.}, rotations, flips and colors) to perform Absolute-relative Learning. Below, we summarize our contributions: \renewcommand{\labelenumi}{\roman{enumi}.} \hspace{-1.0cm} \begin{enumerate}[leftmargin=0.6cm] \item We propose so-called Absolute-relative Learning which can be embedded into popular few-shot pipelines to exploit both similarity and object/concept labelling. \item We extend our approach to unsupervised FSL, and we show how to create self-supervised annotations for unsupervised Absolute-relative Learning. \item We investigate the influence of different types of similarity measures on attributes in Relative Learning to simulate realistic object relations. \item We investigate the influence of different Absolute Learning branches on the classification performance. \end{enumerate} To the best of our knowledge, we are the first to perform an in-depth analysis of object and class relation modeling in the context of supervised and unsupervised few-shot learning given the Absolute-relative Learning paradigm via class, semantic and augmentation annotations. \section{Related Work} \label{sec:related} Below, we describe recent one- and few-shot learning algorithms followed by semantic-based approaches. \subsection{Learning From Few Samples} \label{sec:related_few_shot} For deep learning algorithms, the ability of {\em`learning from only a few examples is the desired characteristic to emulate in any brain-like system'} \cite{book_nip} is a desired operating principle which poses a challenge to typical CNNs designed for the large scale visual category recognition \cite{ILSVRC15}. \vspace{0.05cm} \noindent{\textbf{One- and Few-shot Learning }} has been studied widely in computer vision in both shallow \cite{miller_one_example,Li9596,NIPS2004_2576,BartU05,fei2006one,lake_oneshot} and deep learning scenarios \cite{koch2015siamese,vinyals2016matching,snell2017prototypical,finn2017model,snell2017prototypical,sung2017learning,sosn}. Early works \cite{fei2006one,lake_oneshot} propose one-shot learning methods motivated by the observation that humans can learn new concepts from very few examples. Siamese Network \cite{koch2015siamese} presents a two-streams convolutional neural network approach which generates image descriptors and learns the similarity between them. Matching Network \cite{vinyals2016matching} introduces the concept of support set and $L$-way $Z$-shot learning protocols. It captures the similarity between one testing and several support images, thus casting the one-shot learning problem as set-to-set learning. Prototypical Networks \cite{snell2017prototypical} learns a model that computes distances between a datapoint and prototype representations of each class. Model-Agnostic Meta-Learning (MAML) \cite{finn2017model} introduces a meta-learning model trained on a variety of different learning tasks. Relation Net \cite{sung2017learning} is an efficient end-to-end network for learning the relationship between testing and support images. Conceptually, this model is similar to Matching Network \cite{vinyals2016matching}. However, Relation Net leverages an additional deep neural network to learn similarity on top of the image descriptor generating network. Second-order Similarity Network (SoSN) \cite{sosn} is similar to Relation Net \cite{sung2017learning}, which consists of the feature encoder and relation network. However, approach \cite{sung2017learning} uses first-order representations for similarity learning. In contrast, SoSN investigates second-order representations to capture co-occurrences of features. Graph Neural Networks (GNN) have also been applied to few-shot learning in many recent works \cite{garcia2017few,Kim_2019_CVPR,Gidaris_2019_CVPR} achieving promising results. Finally, noteworthy are domain adaptation and related approaches which can also operate in the small sample regime \cite{koniusz2017domain,me_museum,zhang2018zero,zhang2018model,li2020word,li2020transferring,NEURIPS2020_8c00dee2}. \subsection{Learning from Semantic Labels} Semantic labels are used in various computer vision tasks \emph{e.g.}, object classification, face and emotion recognition, image retrieval, transfer learning, and especially in zero-shot learning. Metric learning often uses semantic information \emph{e.g.}, approach \cite{bradshaw2000semantic} proposes an image retrieval system which uses semantics of images via probabilistic modeling. Approach \cite{wang2011image} presents a novel bi-relational graph model that comprises both the data graph and semantic label graph, and connects them by an additional bipartite graph built from label assignments. Approach \cite{peng2014learning} proposes a classifier based on semantic annotations and provides the theoretical bound linking the error rate of the classifier and the number of instances required for training. Approach \cite{huai2018metric} improves metric learning via the use of semantic labels with different types of semantic annotations. {Our relative learning is somewhat related to the idea using semantic information to learn metric. However, we use similarity measures to simulate realistic relation labels in supervised and unsupervised few-shot learning.} \subsection{Multi-task Learning} {Multi-task learning operates on a set of multiple related tasks. Approach \cite{argyriou2007multi} treats the multi-task learning as a convex iterative problem. Approach \cite{Kendall_2018_CVPR} considers the homoscedastic uncertainty of each task to weight multiple loss functions while HallNet \cite{hall_net} learns old-fashioned descriptors as auxiliary tasks for action recognition. In contrast, we focus on how to refine the backbone by learning from class concepts and relations to address the high-level few-shot learning task.} \comment{ \begin{figure*}[t] \centering \vspace{-0.3cm} \includegraphics[width=0.9\linewidth]{images/separate-models.pdf}% \vspace{-0.2cm} \caption{The pipeline: standard Relation Learning, Relative Learning and Absolute Learning. The original SoSN uses the binary labels for supervision while we introduce different types of labelling which can be though of as soft \vs hard, and relative \vs absolute. Relative Learning employs semantic annotations (\emph{e.g.}, attributes, word2vec) to capture more realistic object relations while Absolute Learning leverages an extra branch of classifier to predict object annotations \emph{e.g.}, class label, attributes, and word2vec embeddings.} \label{fig:pipe-comp}% \vspace{-0.7cm} \end{figure*}} \section{Background} The concept of few-shot learning and the standard pipeline for few-shot learning are described next. \subsection{Relation Learning} Few-shot learning model typically consists of two parts: (i) feature encoder and (ii) relation module \emph{e.g.}, a similarity network or a classifier. Below we take the two-stage `feature encoder-relation network' \cite{sung2017learning,sosn} as an example to elaborate on main aspects of few-shot learning pipelines. A basic relation network \cite{sung2017learning,sosn} contains 2-4 convolutional blocks and 2 fully-connected layers. Let us define the feature encoding network as $f\!:(\mbr{W\!\times\!H}; \mbr{|\vec{\mathcal{F}}|})\!\shortrightarrow\!\mbr{K\!\times\!N}$, where $W$ and $H$ denote the width and height of an input image, $K$ is the length of feature vectors (number of filters), $N\!=\!N_W\!\cdot\!N_H$ is the total number of spatial locations in the last convolutional feature map. For simplicity, we denote an image descriptor by $\boldsymbol{\Phi}\!\in\!\mbr{K\!\times\!N}$, where $\boldsymbol{\Phi}\!=\!f(\mathbf{X}; \vec{\mathcal{F}})$ for an image $\mathbf{X}\!\in\!\mbr{W\!\times\!H}$ and $\vec{\mathcal{F}}$ are the parameters-to-learn of the encoding network. The relation network is denoted by $r\!:(\mbr{K'\!}; \mbr{|\vec{\mathcal{R}}|})\!\shortrightarrow\!\mbr{}$. Typically, we write $r(\boldsymbol{\psi}; \vec{\mathcal{R}})$, where $\boldsymbol{\psi}\!\in\!\mbr{K'}\!$, whereas $\vec{\mathcal{R}}$ are the parameters-to-learn of the relation network. \subsection{Supervised Few-shot Learning} \comment{\begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{images/k-func.pdf} \caption{\small The two element-wise measurement functions investigated in our work. The plots are the function curves w.r.t different p values. Right figure is the semantic-guided class relations. These relations are derived from attributes with Gaussian kernel function of different $\sigma$ values for 100 \textit{mini}Imagenet classes. It can be seen the semantic annotation can simulate more realistic object relations than binary labels.} \vspace{-0.5cm} \label{fig:soft_label} \end{figure*}} For the supervised $L$-way $Z$-shot problem, we assume some support images $\{\mathbf{X}_s\}_{s\in\mathcal{W}}$ from set $\mathcal{W}$ and their corresponding image descriptors $\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}}$ which can be considered as a $Z$-shot descriptor. Moreover, we assume one query image $\mathbf{X}_q\!$ with its image descriptor $\boldsymbol{\Phi}_q$. Both the $Z$-shot and the query descriptors belong to one of $L$ classes in the subset $\mathcal{C}^{\ddag}\!\equiv\!\{c_1,\cdots,c_L\}\!\subset\!\idx{C}\!\equiv\!\mathcal{C}$. The $L$-way $Z$-shot learning step can be defined as learning similarity: \begin{equation} \zeta_{sq}=r\left(\vartheta\!\left(\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}},\boldsymbol{\Phi}^*_q\!\right),\vec{\mathcal{R}}\right), \end{equation} where $\zeta$ refers to similarity prediction of given support-query pair, $r$ refers to the relation network, and $\vec{\mathcal{R}}$ denotes network parameters that have to be learnt. $\vartheta$ is the relation operator on features of image pairs: we simply use concatenation. Following approaches \cite{sung2017learning,sosn}, the Mean Square Error (MSE) is employed as the objective function: \begin{align} \vspace{-0.2cm} &L\!\!=\!\!\sum\limits_{c\in\mathcal{C}^{\ddag}}\!\sum\limits_{c'\in\mathcal{C}^{\ddag}} \left(r\left(\!\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}_c},\boldsymbol{\Phi}_{q\in\mathcal{Q}: \ell(q)=c'},\vec{\mathcal{R}}\right)\!-\!\delta\!\left(c\!-\!c'\right)\!\right)^2\!\!,\nonumber\\ &\qquad\text{ where }\; \boldsymbol{\Phi}_s\!=\!f(\mathbf{X}_s; \vec{\mathcal{F}}) \;\text{ and }\; \boldsymbol{\Phi}_q\!=\!f(\mathbf{X}_q; \vec{\mathcal{F}}). \vspace{-0.2cm} \end{align} In the above equation, $\mathcal{W}_c$ is a randomly chosen set of support image descriptors of class $c\!\in\!\mathcal{C}^{\ddag}$, $\mathcal{Q}$ is a randomly chosen set of $L$ query image descriptors so that its consecutive elements belong to the consecutive classes in $\mathcal{C}^{\ddag}\!\equiv\!\{c_1,\cdots,c_L\}$. $\ell(q)$ corresponds to the label of $q\!\in\!\mathcal{Q}$. Lastly, $\delta$ refers to the indicator function equal 1 if its argument is 0. \subsection{Unsupervised Few-shot Learning} There are no class annotations that can be directly used for relation learning in the unsupervised setting. However, the popular self-supervised contrastive learning captures self-object relations by learning the similarity between different augmentations of the same image. Thus, we build our unsupervised few-shot learning pipeline based on contrastive learning. Given two image inputs $\mathbf{X}$ and $\mathbf{Y}$, we apply random augmentations on these images \emph{e.g.}, rotation, flip, resized crop and color adjustment via operator $\text{Aug}(\cdot)$, which samples these transformations according to a uniform distribution. We obtain a set of $M$ augmented images: \begin{align} \hat{\mathbf{X}}_i \sim \text{Aug}(\mathbf{X}),\;\hat{\mathbf{Y}}_i \sim \text{Aug}(\mathbf{Y}),\;i\in\{1,\cdots,M\}. \end{align} We pass augmented images to the feature encoder $f$ to get feature descriptors and obtain relation predictions $\zeta,\zeta^*\!\in\mbr{M\!\times\!M}$ from relation network $r$ for augmented samples of $\mathbf{X}$ and $\mathbf{Y}$, respectively, as well as relation predictions $\zeta'\!\in\mbr{M\!\times\!M}$ evaluated between augmented samples of $\mathbf{X}$ and $\mathbf{Y}$: \begin{align} \label{eq:enc} &\boldsymbol{\Phi}_{i} = f(\hat{\mathbf{X}}_i; \vec{\mathcal{F}}),\; \boldsymbol{\Phi}^*_j = f(\hat{\mathbf{Y}}_j; \vec{\mathcal{F}}),\;i,j\in\{1,\cdots,M\}, \\ &\!\!\!\!\!\!\!\!\!\!\zeta_{ij}\!=\!r\left(\boldsymbol{\Phi}_i,\boldsymbol{\Phi}_j; \vec{\mathcal{R}}\right),\; \zeta'_{ij}\!=\! r\left(\boldsymbol{\Phi}_i,\boldsymbol{\Phi}^*_j; \vec{\mathcal{R}}\right),\; \zeta^*_{ij}\!=\! r\left(\boldsymbol{\Phi}^*_i,\boldsymbol{\Phi}^*_j; \vec{\mathcal{R}}\right).\nonumber \end{align} Lastly, we minimize the contrastive loss $L_{urn}$ \wrt $\vec{\mathcal{F}}$ and $\vec{\mathcal{R}}$ in order to push closer augmented samples generated from the same image ($\mathbf{X}$ and $\mathbf{Y}$, resp.) and push away augmented samples generated from pairs images $\mathbf{X}$ and $\mathbf{Y}$: \begin{align} L_{urn}=\,\parallel\!\boldsymbol{\zeta}-1\!\parallel^2_F + \parallel\!\boldsymbol{\zeta}^*\!-1\!\parallel^2_F +\parallel\!\boldsymbol{\zeta}'\!\parallel^2_F.\label{eq:urn} \end{align}} \vspace{-0.4cm} In practice, we sample a large number of image pairs $\mathbf{X}$ and $\mathbf{Y}$ with the goal of minimizing Eq. \eqref{eq:urn}. \section{Approach} Below, we firstly explain the Relative Learning and Absolute Learning modules followed by the introduction of the Absolute-relative Learning pipeline. We note that all auxiliary information \emph{e.g.}, attributes and word2vec embeddings are used in the label space (not as extra inputs). Given images $\mathbf{X}_i$ and $\mathbf{X}_j$, we feed them into the feature encoder $f$ to get image representations $\boldsymbol{\Phi}_i = f(\mathbf{X}_i; \vec{\mathcal{F}})$ and $\boldsymbol{\Phi}_j = f(\mathbf{X}_j; \vec{\mathcal{F}})$, where $\vec{\mathcal{F}}$ are the parameters of feature encoder. Subsequently, we perform our proposed Relative Learning and Absolute Learning on $\boldsymbol{\Phi}_i$ and $\boldsymbol{\Phi}_j$. \subsection{Relative Learning} In conventional few-shot learning, binary class labels are employed to train the CNNs in order to model the relations between pairs of images. However, labeling such pairs as similar/dissimilar (\emph{i.e.}, $\{0,1\}$) cannot fully reflect the actual relations between objects. In this paper, we take a deeper look at how to represent relations in the few-shot learning scenario. To better exploit class relations in the label space, we employ semantic annotations \emph{e.g.}, attributes and word2vec. Based on these semantic annotations, we investigate how semantic relation labels influence the final few-shot learning performance. Figure \ref{fig:arl} (bottom right corner) shows that the classic relation learning can be viewed as an intersection (or relation) operation over the original class labels. Thus, we apply intersection on the semantic annotations to obtain the relative semantic information for the relative supervision, which can contribute to obtaining more realistic image relations in the label space. Let us denote the class labels and attributes of image $\textbf{X}_i$ as $c_i, \mathbf{a}_i$. Given two samples $\textbf{X}_i$ and $\textbf{X}_j$ with their class labels $c_i, c_j$ (and one-hot vectors $\mathbf{c}_i, \mathbf{c}_j$) and attributes $\mathbf{a}_i, \mathbf{a}_j$, we obtain the binary relation label $\hat{c}_{ij}$ which represents if the two images are from the same class. We also have semantic relation label $\hat{a}_{ij}$ which represents attributes shared between $\textbf{X}_i$ and $\textbf{X}_j$. Semantic annotations often contain continuous rather than binary values. Thus, we use the RBF function with the $\ell^p_p$ norm. Specifically, we obtain: \begin{align} \label{eq6} \!\!\!\!\hat{c}_{ij}\!=\!c_i\!\wedge\!c_j\!=\!\delta(\mathbf{c}_i\!-\!\mathbf{c}_j) \text{ and } \hat{a}_{ij}\!=\!e^{-||\mathbf{a}_i-\mathbf{a}_j||_p^p}, \end{align} If we train the network only with $\hat{c}_{ij}$, it becomes the basic few-shot learning. However, the simultaneous use of $\hat{c}_{ij}$ and $\hat{a}_{ij}$ for similarity learning should yield smoother similarity decision boundaries. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/arl-pipeline.pdf}% \vspace{-0.3cm} \caption{\small The proposed pipeline for our Absolute-relative Learning (supervised setting). It consists of three blocks, namely (i) feature encoder to extract the image representations, (ii) Absolute Learning module to enhance the feature quality with auxiliary supervision, (iii) Relative Learning module to learn image relations based on multi-modal relation supervisions. With our Absolute-relative Learning, we want to both learn if the two objects share the same label and how similar they are semantically \emph{e.g.}, in terms of shared visual attributes.}% \label{fig:arl}% \vspace{-0.3cm} \end{figure*} To learn from multi-modal relative supervisions, we apply a two-stage learner consisting of a shared part $g$ and respective parts $r$. Let us denote the class and semantic relative learners as $r_c$ and $r_a$. To make relative predictions, we firstly apply the relation operator $\vartheta$ over $\boldsymbol{\Phi}_i$ and $\boldsymbol{\Phi}_j$ (concatenation along the channel mode), and feed such a relation descriptor into $g$ (4 blocks of Conv-BN-ReLU-MaxPool) to obtain the refined pair-wise representation $\boldsymbol{\psi}_{ij}$: \begin{equation} \boldsymbol{\psi}_{ij} = g(\vartheta(\boldsymbol{\Phi}_i, \boldsymbol{\Phi}_j);\boldsymbol{\mathcal{G}}). \end{equation} Subsequently, we feed $\boldsymbol{\psi}_{ij}$ into learners $r_c$ and $r_a$ to get class- and semantics-wise relation predictions $\hat{c}^*_{ij}$ and $\hat{a}^*_{ij}$: \begin{align} \hat{c}^*_{ij} = r_c(\boldsymbol{\psi}_{ij}; \vec{\mathcal{R}}_c) \text{ and } \hat{a}^*_{ij} = r_a(\boldsymbol{\psi}_{ij}; \vec{\mathcal{R}}_s), \end{align} where $\vec{\mathcal{R}}_c$ and $\vec{\mathcal{R}}_s$ refer to the parameters of $r_c$ and $r_a$, respectively. The objectives for class- and semantic-wise relative learners are: \begin{align} &L_{relc}=\sum\limits_i\!\sum\limits_j\! \left(r_c\left(\boldsymbol{\psi}_{ij};\vec{\mathcal{R}}_c\right)-\hat{c}_{ij}\right)^2, \\ &L_{rels}=\sum\limits_i\!\sum\limits_j\! \left(r_a\left(\boldsymbol{\psi}_{ij};\vec{\mathcal{R}}_s\right)-\hat{a}_{ij}\right)^2. \vspace{-0.3cm} \end{align} \subsection{Absolute Learning} In contrast to Relative Learning which applies the relative labels to learn similarity, Absolute Learning refers to the strategy in which the network learns predefined object annotations \emph{e.g.}, class labels, attributes, \emph{etc}. The motivation behind the Absolute Learning is that current few-shot learning pipelines use the relation labels as supervision which prevents the network from capturing objects concepts. In other words, the network knows if the two objects are similar (or not) but it does not know what these objects are. Branches for Absolute Learning are shown in Figure \ref{fig:arl}. In this paper, we apply an additional network branch following the feature encoder to learn the absolute object annotations. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/uml.pdf}% \vspace{-0.3cm} \caption{\small The proposed pipeline for Absolute-relative Learning (unsupervised setting). In contrast to supervised ArL that uses class and semantic annotations in absolute and relative learners, we apply a random augmentation sequence to augment unlabeled datapoints, and we store the augmentation keys as instance annotations.}% \label{fig:uarl} \vspace{-0.3cm} \end{figure*} Firstly, consider the class prediction as an example. Once we obtain the image representation $\boldsymbol{\Phi}_i$ given image $\mathbf{X}_i$, we feed it into the class absolute learner $h_c$ with parameter $\vec{\mathcal{H}}_c$.: \begin{equation} \mathbf{c}^*_i = h_c(\boldsymbol{\Phi}_i; \vec{\mathcal{H}}_c). \vspace{-0.2cm} \end{equation} Subsequently, we apply the cross-entropy loss to train the class absolute learner ($l^c$ is the target class integer): \vspace{-0.3cm} \begin{equation} L_{absc} = -\sum\limits_i^N log(\frac{exp(c^*_i[l^c_{i}])}{\sum\limits_{j} exp(c^*_i[j])}). \end{equation} \vspace{-0.3cm} \noindent For the semantic absolute learner, we use the MSE loss by feeding $\boldsymbol{\Phi}_i$ into $h_a$: \vspace{-0.3cm} \begin{equation} \mathbf{a}^*_i = h_a(\boldsymbol{\Phi}_i; \vec{\mathcal{H}}_s), \end{equation} \begin{equation} L_{abss} = \frac{1}{N} \sum\limits_i^N || \mathbf{a}_i - \mathbf{a}^*_i ||_2^2. \end{equation} The Absolute Learning module may appear somewhat similar to self-supervised learning applied to few-shot learning. However, we use discriminators to classify different types of object annotations while the typical self-supervision recognises the patterns of image transformations. We believe our strategy helps refine the feature encoder to capture both the notion of similarity as well as concrete object concepts. \subsection{Absolute-relative Learning} For our Absolute-relative Learning (ArL), we simultaneously train the relation network with relative object similarity labels, and introduce an auxiliary task which learns specific object labels. The pipeline of ArL is shown in Figure \ref{fig:arl} which highlights that the ArL model uses the auxiliary semantic soft labels to train the relation network to capture more realistic image relations while employing auxiliary predictor branches to infer different types of object information, thus refining the feature representations and the feature encoder. In addition to merging the absolute/relative learners, we introduce several connections from the outputs of absolute and relative learners wired to relative learners to promote the original relation learner, which does not require absolute labels or semantic labels at the testing time. In contrast, multi-modal learning needs all modalities in the testing step. Figure \ref{fig:uarl} shows the Absolute-relative Learning pipeline (unsupervised setting). As the supervised ArL, the unsupervised ArL pipeline consists of absolute and relative learners. However, the annotations used during the training phase are self-supervised augmentation keys, not class labels. Let $l$ denote the number of layers in $g$. We apply $\vartheta$ over the intermediate descriptor $\boldsymbol{\psi}_{ij}^{(l-1)}\!$, which is the ($l$-1)-th layer of $g$, and absolute predictions $\mathbf{c}^*_i, \mathbf{c}^*_j, \mathbf{a}^*_i, \mathbf{a}^*_j$. We call this operation the absolute feedback: \begin{equation} \!\!\!\!\!\!\!\!\!\!\!\hat{\boldsymbol{\psi}}_{ij}^{(l-1)}\!=\! \vartheta\left(\boldsymbol{\psi}_{ij}^{(l-1)},\mathbf{c}^*_i),\mathbf{c}^*_j),\mathbf{a}^*_i,\mathbf{a}^*_j\right). \end{equation} We use $\hat{\boldsymbol{\psi}}_{ij}$ from the last layer of $g$ to train the semantic relative learner $r_a$: \begin{align} \!&\hat{\boldsymbol{\psi}}_{ij} = \hat{\boldsymbol{\psi}}_{ij}^{(l)} = g^{(l)}\big(\hat{\boldsymbol{\psi}}_{ij}^{(l-1)}\big),\\ \!&L_{rels}=\sum\limits_i\!\sum\limits_j\! \left(\!r_a\big(\hat{\boldsymbol{\psi}}_{ij};\vec{\mathcal{R}}_s\big)-\hat{a}_{ij}\right)^2\!\!,\;\hat{a}_{ij}\!=\!e^{-||\mathbf{a}_i-\mathbf{a}_j|_p^p}.\nonumber \end{align} \begin{table*}[t] \centering \caption{Evaluations on the \textit{mini}Imagenet dataset (5-way acc. given) for the ArL in supervised and unsupervised settings. (`U-' refers to the unsupervised FSL.) } \vspace{-0.2cm} \label{table1} \makebox[\textwidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{10}\selectfont \begin{tabular}{lccc} \toprule Model & Backbone & 1-shot & 5-shot \\ \midrule & \multicolumn{3}{c}{Supervised Few-shot Learning} \\ \midrule \textit{Matching Nets} \cite{vinyals2016matching} & - & $43.56 \pm 0.84 $ & $55.31 \pm 0.73 $ \\ \textit{Meta Nets} \cite{munkhdalai2017meta} & - & $49.21 \pm 0.96 $ & - \\ \textit{PN} \cite{snell2017prototypical} & Conv-4-64 & $49.42 \pm 0.78 $ & $68.20 \pm 0.66 $ \\ \textit{MAML} \cite{finn2017model} & Conv-4-64 & $48.70 \pm 1.84 $ & $63.11 \pm 0.92 $ \\ \textit{RN} \cite{sung2017learning} & Conv-4-64 & $51.36 \pm 0.82 $ & $66.12 \pm 0.70 $ \\ \textit{SoSN} \cite{sosn} & Conv-4-64 & $53.73\pm 0.83 $ & $68.58 \pm 0.70$ \\ \textit{SoSN} \cite{sosn} & ResNet-12 & $59.01\pm 0.83 $ & $75.49 \pm 0.68$ \\ \textit{MAML++} \cite{antoniou2018train} & Conv-4-64 & $52.15 \pm 0.26 $ & $68.32 \pm 0.44$ \\ \textit{MetaOptNet} \cite{lee2019meta} & ResNet-12 & $62.64\pm 0.61 $ & $78.63 \pm 0.46$\\ \arrayrulecolor{black} \cdashline{1-4}[1pt/3pt] \textit{PN + ArL} & Conv-4-64 & $53.93 \pm 0.65$& $69.68 \pm 0.45$ \\ \textit{RN + ArL} & Conv-4-64 & $53.79 \pm 0.68$& $68.86 \pm 0.43$ \\ \textit{SoSN + ArL} & Conv-4-64 & $57.48 \pm 0.65$ & $72.64 \pm 0.45$ \\ \textit{SoSN + ArL} & ResNet-12 & ${61.36 \pm 0.67}$ & ${78.95 \pm 0.42}$ \\ \textit{MetaOptNet + ArL} & ResNet-12 & ${65.21\pm 0.58}$ & ${80.41 \pm 0.49}$ \\ \hline & \multicolumn{3}{c}{Unsupervised Few-shot Learning} \\ \hline \textit{Pixel (Cosine)} & - & $23.00$ & $26.60$ \\ \textit{BiGAN ($k_{nn}$)} \cite{bigan} & - & $25.56$ & $31.10$ \\ \textit{BiGAN (cluster matching)} \cite{bigan} & - & $24.63$ & $29.49$ \\ \textit{DeepCluster ($k_{nn}$)} \cite{deepcluster} & - & $28.90$ & $42.25$ \\ \textit{DeepCluster (cluster matching)} \cite{deepcluster} & - & $22.20$ & $23.50$ \\ \textit{UMTRA } \cite{umtra} & Conv-4-64 & $39.91$ & $ 50.70$ \\ \textit{CACTUs} \cite{cactu} & Conv-4-64 & $39.94$ & $ 54.01$ \\ \arrayrulecolor{black} \cdashline{1-4}[1pt/3pt] \textit{U-RN} & Conv-4-64 & $35.14 \pm 0.91$ & $44.10 \pm 0.88$ \\ \textit{U-PN} & Conv-4-64 & $35.85 \pm 0.85$ & $48.01 \pm 0.82$ \\ \textit{U-SoSN} & Conv-4-64 & $37.94 \pm 0.87$ & $50.95 \pm 0.81$ \\ \textit{U-RN + ArL} & Conv-4-64 & $36.37 \pm 0.92$ & $46.97 \pm 0.86$ \\ \textit{U-PN + ArL} & Conv-4-64 & $38.76 \pm 0.84$ & $51.08 \pm 0.84$ \\ \textit{U-SoSN + ArL} & Conv-4-64 & ${41.13 \pm 0.84}$ & ${55.39 \pm 0.79}$ \\ \textit{U-SoSN + ArL} & ResNet-12 & $41.08 \pm 0.83$ & ${57.01 \pm 0.79}$ \\ \bottomrule \end{tabular}} \vspace{-0.4cm} \end{table*} \begin{table}[b] \centering \vspace{-0.3cm} \caption{Evaluations on the CUB-200-2011 and Flower102. (5-way acc. given).} \vspace{-0.2cm} \label{table2} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{9.5}\selectfont \begin{tabular}{lcccc} \toprule & \multicolumn{2}{c}{CUB-200-2011} & \multicolumn{2}{c}{Flower102} \\ Model & 1-shot & 5-shot & 1-shot & 5-shot \\ \midrule & \multicolumn{4}{c}{Supervised Few-shot Learning} \\ \hline \textit{PN} \cite{snell2017prototypical} & $37.42 $ & $51.57$ & $62.81$ & $82.11$ \\ \textit{RN} \cite{sung2017learning} & $40.56 $ & $53.91$ & $68.26$ & $80.94$ \\ \textit{SoSN} \cite{sosn}& $46.72$ & $60.34$ & $71.90$ & $84.87$ \\ \textit{RN + ArL} & ${44.53}$ & ${58.76}$ & ${71.12}$ & ${83.49}$ \\ \textit{SoSN - RL(cls.)} \cite{sosn}& $46.72$ & $60.34$ & $71.90$ & $84.87$ \\ \textit{SoSN - RL(att.)} & ${49.24}$ & ${64.04}$ & ${74.96}$ & ${87.21}$\\ \textit{SoSN - AL(cls.)} & $46.88$ & $60.90$ & $72.97$ & $85.35$ \\ \textit{SoSN - AL(att.)} & ${48.85}$ & ${63.64}$ & ${74.31}$ & $86.97$ \\ \textit{SoSN + ArL} & $\mathbf{50.62}$ & ${65.87}$ & ${76.21}$ & ${88.36}$ \\ \hline & \multicolumn{4}{c}{Unsupervised Few-shot Learning} \\ \hline \textit{BiGAN($k_{nn}$)}\cite{bigan} & $28.02$ & $30.17$ & $44.68$ & $59.12$ \\ \textit{U-RN} & ${29.36}$ & ${36.36}$ & ${55.54}$ & ${68.86}$ \\ \textit{U-PN} & ${29.87}$ & ${37.13}$ & ${55.36}$ & ${68.49}$ \\ \textit{U-SoSN} & ${36.89}$ & ${45.81}$ & ${61.26}$ & ${75.98}$ \\ \textit{U-RN + ArL} & ${31.27}$ & ${38.41}$ & ${57.19}$ & ${70.23}$ \\ \textit{U-PN + ArL} & ${31.58}$ & ${39.95}$ & ${57.61}$ & ${70.31}$ \\ \textit{U-SoSN + ArL} & ${37.93}$ & ${51.55}$ & ${69.14}$ & ${84.10}$ \\ \bottomrule \end{tabular}} \end{table} \vspace{-0.3cm} Let $\hat{\mathbf{a}}^*_{ij}$ denote the outputs of semantic relative learner. Then we apply the relative feedback by combining $\hat{\boldsymbol{\psi}}_{ij}$ and $\hat{\mathbf{a}}^*_{ij}$ to promote the training of class relative learner $r_c$: \begin{align} & \hat{\boldsymbol{\psi}}^*_{ij} = \vartheta(\hat{\boldsymbol{\psi}}_{ij},\hat{\mathbf{a}}^*_{ij}),\\ & L_{relc}=\sum\limits_i\!\sum\limits_j\! \left(\!r_c\big(\hat{\boldsymbol{\psi}}^*_{ij};\vec{\mathcal{R}}_c\big)-\hat{c}_{ij}\right)^2\!\!,\; \hat{c}_{ij}\!=\!\delta(\mathbf{c}_i\!-\!\mathbf{c}_j).\nonumber \end{align} \vspace{-0.3cm} \noindent We minimize the following objective for ArL: \begin{equation} \min \quad L_{relc} + \alpha L_{rels} + \beta L_{absc} + \gamma L_{abss}. \end{equation} where $(\alpha, \beta, \gamma)\!\in\![0.001; 1]^3$ are hyper-parameters that control the impact of each learner and are estimated with 20 steps of the HyperOpt package \cite{bergstra2015hyperopt} on a given validation set. Nullifying $\alpha$, $\beta$ or $\gamma$ disables corresponding losses. \section{Experiments} Below, we demonstrate the usefulness of our approach by evaluating it on the \textit{mini}Imagenet \cite{vinyals2016matching}, fine-grained CUB-200-2011 \cite{WahCUB_200_2011} and Flower102 \cite{Nilsback08} datasets. Figure \ref{fig:arl} presents our ArL with the two-stage relation learning pipeline but ArL applies to any few-shot learning models with any type of base learners (\emph{e.g.}, nearest neighbour discrimination, relation module, multi-class linear classifier, \emph{etc}). The core objective of ArL is to improve the representation quality. Thus, we employ the classic baseline models, \emph{i.e.}, Prototypical Net (PN) \cite{snell2017prototypical}, Relation Net \cite{sung2017learning}, SoSN \cite{sosn}, MetaOptNet \cite{lee2019meta}, \emph{etc}, as our baseline models to evaluate our Relative Learning, Absolute Learning and the Absolute-relative Learning in both supervised and unsupervised settings. The Adam solver is used for model training. We set the initial learning rate to be 0.001 and decay it by 0.5 every 50000 iterations. % We evaluate ArL on RelationNet (RN) \cite{sung2017learning}, Prototypical Net (PN) \cite{snell2017prototypical}, Second-order Similarity Network (SoSN) \cite{sosn} and MetaOptNet \cite{lee2019meta}. For augmentations in the unsupervised setting, we randomly apply resized crop (scale 0.6--1.0, ratio 0.75--1.33), horizontal+vertical flips, rotations ($0$--$360^{\circ}$), and color jitter. \subsection{Datasets} Below, we describe our setup, standard and fine-grained datasets with semantic annotations and evaluation protocols. \vspace{0.05cm} \noindent\textbf{\textit{mini}Imagenet} \cite{vinyals2016matching} consists of 60000 RGB images from 100 classes, each class containing 600 samples. We follow the standard protocol \cite{vinyals2016matching} and use 80/20 classes for training/testing, and images of size $84\!\times\!84$ for fair comparisons with other methods. For semantic annotations, we manually annotate 31 attributes for each class. We also leverage word2vec extracted from GloVe as the class embedding. \vspace{0.05cm} \noindent\textbf{Caltech-UCSD-Birds 200-2011 (CUB-200-2011)} \cite{WahCUB_200_2011} has 11788 images of 200 bird species. 100/50/50 classes are randomly selected for meta-training, meta-validation and meta-testing. 312 attributes are provided for each class. \vspace{0.05cm} \noindent\textbf{Flower102} \cite{Nilsback08} is a fine-grained category recognition dataset that contains 102 classes of various flowers. Each class consists of 40-258 images. We randomly select 60 meta-train classes, 20 meta-validation classes and 22 meta-test classes. 1024 attributes are provided for each class. \begin{table}[b] \centering \vspace{-0.3cm} \caption{Ablation study of the impact of different annotations (\emph{e.g.}, class labels, attributes) on ArL.} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{0.9em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{8}\selectfont \begin{tabular}{ccccccc} \toprule & \multicolumn{2}{c}{Rel. Learn.} & \multicolumn{2}{c}{Abs. Learn.} & \multicolumn{2}{c}{Top-1 Acc.} \\ Baseline & cls. & att. & cls. & att. & 1-shot & 5-shot \\ \hline \multirow{4}{*}{RN} & \checkmark & & & & 51.36 & 65.32 \\ & & \checkmark & & & 52.38 & 66.74 \\ & & & \checkmark & & 51.41 & 66.01 \\ & & & & \checkmark & 52.35 & 66.53 \\\hline \multirow{4}{*}{SoSN} & \checkmark & & & & 53.73 & 68.58 \\ & & \checkmark & & & 55.56 & 70.97 \\ & & & \checkmark & & 55.12 & 70.91 \\ & & & & \checkmark & 55.31 & 71.03 \\ \bottomrule \end{tabular}} \end{table} \comment{ \begin{table}[b] \centering \caption{Ablation study on the impacts of absolute and relative learnings with different annotations (\emph{e.g.} class labels, attributes) on \textit{mini}Imagenet.} \vspace{-0.1cm} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{0.9em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{7}\selectfont \begin{tabular}{c|ccc|ccc|cc} \toprule & \multicolumn{3}{c}{Relative Learning} & \multicolumn{3}{c}{Absolute Learning} & \multicolumn{2}{c}{Top-1 Accuracy} \\ Baseline & cls. & att. & w2v. & cls. & att. & w2v. & 1-shot & 5-shot \\ \hline \multirow{6}{*}{RN} & \checkmark & & & & & & 51.36 & 65.32 \\ & & \checkmark & & & & & 52.38 & 66.74 \\ & & & \checkmark & & & & 52.87 & 66.73 \\ & & & & \checkmark & & & 51.41 & 66.01 \\ & & & & & \checkmark & & 52.35 & 66.53 \\ & & & & & & \checkmark & 52.67 & 66.91 \\ \hline \multirow{6}{*}{SoSN} & \checkmark & & & & & & 53.73 & 68.58 \\ & & \checkmark & & & & & 55.01 & 70.21 \\ & & & \checkmark & & & & 54.31 & 69.64 \\ & & & & \checkmark & & & 55.12 & 70.91 \\ & & & & & \checkmark & & 55.31 & 71.03 \\ & & & & & & \checkmark & 54.78 & 70.85 \\ \bottomrule \end{tabular}} \vspace{-0.3cm} \end{table}} \comment{\begin{table}[b] \centering \caption{Ablations on feedback connections on \textit{mini}Imagenet. (given 5-way acc.)} \vspace{-0.1cm} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{8}\selectfont \begin{tabular}{cccc} \toprule Absolute feedback & Relative Feedback & 1-shot & 5-shot \\ \hline & & 55.92 & 71.52 \\ \checkmark & & 56.13 & 71.89\\ & \checkmark & 56.67 & 71.99\\ \checkmark & \checkmark & 57.48 & 72.64 \\ \bottomrule \end{tabular}} \vspace{-0.3cm} \label{tab:ablations} \end{table}} \subsection{Performance Analysis} \comment{\begin{table}[t] \centering \caption{Ablations on measurement function $k$ in relative learning. (5-way 1-shot acc.)} \vspace{-0.3cm} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{8}\selectfont \begin{tabular}{ccc} \toprule Function & $e^{-|x_i - y_i|^p}$ & $max(1,|x_i-y_i|^p)$ \\ \hline \textit{mini}Imagenet & 54.73 & 55.01 \\ CUB-200-2011 & 49.24 & 48.43 \\ Flower102 & 74.29 & 74.96 \\ AwA2 & 51.03 & 51.61 \\ \bottomrule \end{tabular}} \vspace{-0.5cm} \label{tab:ablations} \end{table}} \begin{figure}[t] \vspace{-0.2cm} \centering \includegraphics[width=\linewidth]{images/arl-fig4.pdf} \vspace{-0.7cm} \caption{The validation of $p$ given the semantic similarity measure function $e^{-||\mathbf{a}_i-\mathbf{a}'_i||_p^p}$ on selected datasets.} \label{fig:fig4} \end{figure} \begin{figure}[t] \vspace{-0.3cm} \centering \includegraphics[width=\linewidth]{images/arl-fig5.pdf} \vspace{-0.7cm} \caption{Visualization of semantic absolute and relative predictions which shows how their bins relate.} \vspace{-0.3cm} \label{fig:fig5} \end{figure} \noindent\textbf{Absolute-relative Learning (ArL).} Table \ref{table1} shows that Absolute-relative Learning (ArL) effectively improves the performance on all datasets. On \textit{mini}Imagenet, SoSN+ArL improve the 1- and 5-shot performance by $3.6\%$ and $4.1\%$, MetaOptNet+ArL improves the performance by 2.6\% and 1.8\% respectively. Not in the table, DeepEMD \cite{Zhang_2020_CVPR} (ResNet-12) and LaplacianFSL \cite{ziko2020laplacian} (ResNet-18) scored 65.91\% and 66.41\% (1-shot prot.) In contrast, DeepEMD+ArL and LaplacianFSL+ArL scored 67.24\% and 68.07\%. For fine-grained datasets, CUB-200-2011 and Flower102 in Table \ref{table2}, SoSN+ArL improves the 1- and 5-shot accuracy by $1.4\%$ and $1.6\%$. For unsupervised learning, ArL with SoSN brings 3.5\% and 4.4\% gain on \textit{mini}Imagenet, 1.0\% and 5.7\% gain on CUB-200-2011, 7.9\% and 8.1\% gain on Flower102 for 1- and 5-shot learning, respectively. Our unsupervised U-SoSN+ArL often outperforms recent supervised methods on fine-grained classification datasets. \vspace{0.05cm} \noindent\textbf{Visualization.} Below, we visualize absolute and relative semantic predictions to explain how such an information can be used. As shown in Fig. \ref{fig:fig5}, we randomly select 4 images from two classes, among which $I_1$ and $I_2$ belong to one class, and $I_3$ and $I_4$ belong to another class. Figure \ref{fig:fig5} shows that the semantic absolute predictions of images from the same class have more consistent distributions, the relative predictions over same-class image pairs have high responses to the same subset of bins. Predictions over images from disjoint classes result in smaller intersection of corresponding peaks. \vspace{0.05cm} \noindent\textbf{Ablations on absolute and relative learners.} Figure \ref{fig:fig4} shows results \wrt $p$ from Eq. \ref{eq6}. Table \ref{table_ablation} shows how different absolute and relative learners affect few-shot learning results on \textit{mini}Imagenet. For example, for the SoSN baseline, the attribute-based absolute and relative learners work the best among all absolute and relative learning modules. \vspace{0.05cm} \noindent\textbf{Relative Learning (RL).} Table \ref{table_ablation} (\textit{mini}Imagenet) illustrates the performance enhanced by the semantic-based relation on Relation Net, SoSN and SalNet. Results in the table indicate that the performance of few-shot similarity learning can be improved by employing the semantic relation labels at the training stage. For instance, SoSN with attribute soft label ({\em att.}) achieves $0.6\%$ and $1.7\%$ gain for 1- and 5-shot protocols, compared with the baseline ({\em SoSN}) in Table \ref{table1}. The results on CUB-200-2011 and Flower102 from Table \ref{table2} indicate similar gains. \vspace{0.05cm} \noindent\textbf{Absolute Learning (AL).} Table \ref{table_ablation} shows that different absolute learning modules help improve the performance on \textit{mini}Imagenet. SoSN with the attribute predictor ({\em SoSN-AL}) achieves the best performance of $55.61$\% on 1-shot and $71.03$\% (5-shot). Table \ref{table_ablation} shows that applying multiple absolute learning modules does not always further improve the accuracy. The attribute-based predictor ({\em att.}) also works the best among all variants on CUB-200-2011 and Flower102. For instance, SoSN with the attribute-based predictor achieves $2.1\%$ and $3.3\%$ improvements on CUB-200-2011, and $2.4\%$ and $2.1\%$ improvement on Flower102 for 1- and 5-shot protocols, respectively. We note that the class predictor ({\em cls.}) does not work well on the fine-grained classification datasets. \begin{figure}[t] \vspace{-0.2cm} \centering \includegraphics[width=\linewidth]{images/arl-ablation.pdf} \vspace{-0.7cm} \caption{Ablations on $\alpha, \beta, \gamma$ for SoSN \cite{sosn} and RN \cite{sung2017learning} in the supervised setting. These evaluations are just an illustration as we tune parameters on the validation splits via the HyperOpt package.} \vspace{-0.1cm} \label{fig:plot} \end{figure} \section{Conclusions} In this paper, we have demonstrated that binary labels commonly used in few-shot learning cannot capture complex class relations well, leading to inferior results. Thus, we have introduced semantic annotations to aid the modeling of more realistic class relations during network training. Moreover, we have proposed a novel Absolute-relative Learning (ArL) paradigm which combines the similarity learning with the concept learning, and we extend ArL to unsupervised FSL. This surprisingly simple strategy appears to work well on all datasets in both supervised and unsupervised settings, and it perhaps resembles a bit more closely the human learning processes. In contrast to multi-modal learning, we only use semantic annotations as labels in training, and do not use them during testing. Our proposed approach achieves the state-of-the-art performance on all few-shot learning protocols. \vspace{0.1cm} \noindent\textbf{Acknowledgements.} This work is in part supported by the Equipment Research and Development Fund (no. ZXD2020C2316), NSF Youth Science Fund (no. 62002371), the ANU VC's Travel Grant and CECS Dean's Travel Grant (H. Zhang's stay at the University of Oxford). \begin{appendices} \section{Additional results in unsupervised setting.} Below we supplement additional results in the unsupervised setting on two popular datasets, \textit{tiered--}Imagenet and OpenMIC. \vspace{0.05cm} \noindent\textbf{\textit{tiered--}Imagenet} consists of 608 classes from ImageNet. We follow the protocol that uses 351 base classes, 96 validation classes and 160 novel test classes. \vspace{0.05cm} \noindent\textbf{Open MIC} is the Open Museum Identification Challenge (Open MIC) \cite{me_museum}, a recent dataset with photos of various museum exhibits, \emph{e.g.}~paintings, timepieces, sculptures, glassware, relics, science exhibits, natural history pieces, ceramics, pottery, tools and indigenous crafts, captured from 10 museum spaces according to which this dataset is divided into 10 subproblems. In total, it has 866 diverse classes and 1--20 images per class. Following the setup in SoSN, we combine ({\em shn+hon+clv}), ({\em clk+gls+scl}), ({\em sci+nat}) and ({\em shx+rlc}) into subproblems {\em p1}, $\!\cdots$, {\em p4}, and form 12 possible pairs in which subproblem $x$ is used for training and $y$ for testing (x$\rightarrow$y). \begin{table}[t] \centering \caption{\small Top-1 accuracy on the novel test classes of the \textit{tiered--}Imagenet dataset (5-way acc. given). Note that `U-' variants do not use class labels during learning at all.} \label{table_tiered} \makebox[\linewidth]{ \fontsize{8}{9}\selectfont \begin{tabular}{lcc} \toprule Model & 1-shot & 5-shot \\ \hline \textit{$\text{MAML}$} & $51.67 \pm 1.81$ & $70.30 \pm 0.08$ \\ \textit{$\text{Prototypical Net}$} & $53.31 \pm 0.89$ & $72.69 \pm 0.74$ \\ \textit{$\text{Relation Net}$} & $54.48 \pm 0.93$ & $71.32 \pm 0.78$ \\ \textit{$\text{SoSN}$} & $58.62 \pm 0.92$ & $75.19 \pm 0.79$ \\ \hline \textit{\text{Pixel (Cosine)}} & $27.13 \pm 0.94$ & $32.35 \pm 0.76$ \\ \textit{\text{BiGAN($k_{nn}$)}} & $29.65 \pm 0.92$ & $34.08 \pm 0.75$ \\ \textit{$\text{U-RN}$} & $37.23 \pm 0.94$ & $49.54 \pm 0.83$ \\ \textit{$\text{U-PN}$} & $38.83 \pm 0.92$ & $50.64 \pm 0.81$ \\ \textit{$\text{U-SoSN}$} & ${42.07 \pm 0.92}$ & ${56.21 \pm 0.76}$ \\ \textit{$\text{U-SoSN} + ArL$} & $\mathbf{43.68 \pm 0.91}$ & $\mathbf{58.56 \pm 0.74}$ \\ \bottomrule \end{tabular}} \end{table} } \begin{table}[t] \centering \caption{Ablation studies re. the impact of absolute and relative learning modules given \textit{mini}Imagenet dataset (5-way acc. with Conv-4 backbone given). We denote the same/different class relation as ({\em bin.}), attribute-based labels (relative and absolute) as ({\em att.}), {\em word2wec} embedding (relative and absolute) as ({\em w2v.}) and absolute class labeling as ({\em cls.}) RL and AL are Absolute and Relative Learners.} \vspace{-0.3cm} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{9}\selectfont \begin{tabular}{lcc} \toprule Model & 1-shot & 5-shot \\ \hline & \multicolumn{2}{c}{Relative Learning} \\ \hline \textit{RelationNet-RL(w2v.)} & $\mathbf{53.20}$ & $66.21$ \\ \textit{RelationNet-RL(att.)} & $52.38$ & $\mathbf{66.74}$ \\ \textit{RelationNet-RL(bin. + att. + w2v.)} & $52.38$ & $66.73$ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SoSN-RL(w2v.)} & $54.31$ & $69.64$ \\ \textit{SoSN-RL(att.)} & $54.49$ & $70.21$ \\ \textit{SoSN-RL(bin. + att. + w2v.)} & $\mathbf{55.49}$ & $\mathbf{70.86}$ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SalNet-RL(w2v.)} & $58.15$ & $72.45$ \\ \textit{SalNet-RL(att.)} & $58.43$ & $72.91$ \\ \textit{SalNet-RL(bin. + att. + w2v.)} & $\mathbf{58.67}$ & $\mathbf{73.01}$ \\ \hline & \multicolumn{2}{c}{Absolute Learning} \\ \hline \textit{Relation Net-AL(cls.)} & $51.41$ & $66.01$\\ \textit{Relation Net-AL(att.)} & $52.35$ & $66.53$\\ \textit{Relation Net-AL(w2v.)} & $\mathbf{52.67}$ & $\mathbf{66.91}$\\ \textit{Relation Net-AL(cls.+att.+w2v.)} & $52.30 $ & $66.51 $ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SoSN-AL(cls.)} & $55.12$ & $70.91$\\ \textit{SoSN-AL(att.)} & $\mathbf{55.61}$ & $\mathbf{71.03}$\\ \textit{SoSN-AL(w2v.)} & $54.78$ & $70.85$\\ \textit{SoSN-AL(cls.+att.+w2v.)} & $55.40 $ & $71.02 $ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{Salnet-AL(cls.)} & $57.98$ & $72.56$\\ \textit{SalNet-AL(att.)} & $\mathbf{58.94}$ & $\mathbf{73.12}$\\ \textit{SalNet-AL(w2v.)} & $58.36$ & $72.96$\\ \textit{SalNet-AL(cls.+att.+w2v.)} & $58.41 $ & $73.05 $ \\ \bottomrule \end{tabular}} \end{table} \begin{table*}[!h] \centering \caption{Evaluations on the Open MIC dataset (Protocol I) (given 5-way 1-shot learning accuracies). Note that the {` U-'} variants do not use class labels during learning at all.} \label{table_openmic} \makebox[\linewidth]{ \renewcommand{\arraystretch}{1} \fontsize{8}{9}\selectfont \begin{tabular}{lcccccccccccc} \toprule Model & $p1\!\!\rightarrow\!p2$ & $p1\!\!\rightarrow\!p3$& $p1\!\!\rightarrow\!p4$& $p2\!\!\rightarrow\!p1$& $p2\!\!\rightarrow\!p3$ &$p2\!\!\rightarrow\!p4$& $p3\!\!\rightarrow\!p1$& $p3\!\!\rightarrow\!p2$& $p3\!\!\rightarrow\!p4$& $p4\!\!\rightarrow\!p1$& $p4\!\!\rightarrow\!p2$& $p4\!\!\rightarrow\!p3$\\ \hline \textit{Relation Net} & $71.1$ & $53.6$ & $63.5$ & $47.2$ & $50.6$ & $68.5$ & $48.5$ & $49.7$ & $68.4$ & $45.5$ & $70.3$ & $50.8$\\ \textit{SoSN} & $81.4$ & ${65.2}$ & ${75.1}$ & ${60.3}$ & ${62.1}$ & ${77.7}$ & ${61.5}$ & ${82.0}$ & ${78.0}$ & ${59.0}$ & ${80.8}$ & ${62.5}$\\ \arrayrulecolor{black} \cdashline{1-13}[1pt/3pt] \it Pixle (Cosine) & ${56.8}$ & ${40.4}$ & ${57.5}$ & ${33.3}$ & ${35.1}$ & ${46.1}$ & ${32.3}$ & ${44.6}$ & ${45.9}$ & ${33.5}$ & ${50.1}$ & ${34.6}$\\ \it \text{BiGAN($k_{nn}$)} & ${59.9}$ & ${43.2}$ & ${60.3}$ & ${37.1}$ & ${38.6}$ & ${50.2}$ & ${37.6}$ & ${48.2}$ & ${47.5}$ & ${38.1}$ & ${55.0}$ & ${37.8}$\\ \it U-RN & ${70.3}$ & ${50.3}$ & ${64.1}$ & ${42.9}$ & ${48.2}$ & ${61.1}$ & ${53.2}$ & ${59.1}$ & ${55.7}$ & ${48.5}$ & ${68.3}$ & $45.2$\\ \it U-PN & ${70.1}$ & ${49.7}$ & ${64.4}$ & ${43.3}$ & ${47.9}$ & ${60.8}$ & ${52.8}$ & ${59.4}$ & ${56.2}$ & ${49.1}$ & ${68.8}$ & $44.9$\\ \it U-SoSN & ${78.6}$ & ${58.8}$ & ${74.3}$ & ${61.1}$ & ${57.9}$ & ${72.4}$ & ${62.3}$ & ${75.6}$ & ${73.7}$ & ${58.5}$ & ${76.5}$ & $54.6$\\ \it U-SoSN + ArL & $\textbf{80.2}$ & $\textbf{59.7}$ & $\textbf{76.1}$ & $\textbf{62.8}$ & $\textbf{59.6}$ & $\textbf{74.4}$ & $\textbf{64.2}$ & $\textbf{78.4}$ & $\textbf{75.2}$ & $\textbf{60.1}$ & $\textbf{79.2}$ & $\textbf{57.3}$\\ \bottomrule \end{tabular}} \end{table*} \vspace{0.05cm} \noindent\textbf{Results on tiered-Imagenet.} Table \ref{table_tiered} shows that our proposed unsupervised few-shot learning strategy achieves strong results of 42.31\% and 57.21\% accuracy for 1- and 5-shot learning protocols. Though it does not outperform the recent supervised works, the performance of many prior works is not provided for this recent dataset. In general, we believe that our ArL approach boosts unsupervised learning and our unsupervised learning yields reasonable accuracy given no training labels being used in this process at all. \vspace{0.05cm} \noindent\textbf{Results on Open MIC.} This dataset has very limited (3-15) images for both base and novel classes, which highlights its difference to \textit{mini}Imagenet and \textit{tiered-}Imagenet whose base classes consist of hundreds of images. Table \ref{table_openmic} shows that our unsupervised variant of Second-order Similarity Network, U-SoSN with $224\times224$ res. images outperforms the supervised SoSN on all evaluation protocols. Even without high-resolution training images, our U-SoSN outperforms the supervised SoSN on many data splits. This observation demonstrates that our unsupervised relation learning is beneficial and practical in case of very limited numbers of training images where the few-shot learning task is closer to the retrieval setting (in Open MIC, images of each exhibit constitute on one class). Most importantly, combining ArL with unsupervised SoSN boosts results further by up to 4\%. { \section{Ablation study on absolute and relative learners.} Table \ref{table_ablation} (\textit{mini}Imagenet as example) illustrates that the semantic relation learner enhanced performance on Relation Net\cite{sung2017learning}, SoSN\cite{sosn} and SalNet\cite{salnet}. The results in the table indicate that the performance of few-shot similarity learning can be improved by employing the semantic relation labels at the training stage. For instance, SoSN with attribute soft label ({\em att.}) achieves $0.6\%$ and $1.7\%$ improvements for 1- and 5-shot compared to the baseline ({\em SoSN}). Table \ref{table_ablation} also demonstrates the ablation studies for absolute learning. It can be seen from the table that the attribute predictor works the best among all options except for SoSN, and applying multiple Absolute Learning modules does not further improve the accuracy. We expect that attributes are a clean form of labels in contrast to {\em word2vec} and very complementary to class labels {\em cls.} } \section{Remaining experimental details.} For augmentations, we randomly apply resized crop (scale 0.6--1.0, ratio 0.75--1.33), horizontal+vertical flips, rotations ($0$--$360^{\circ}$), and color jitter. Annotated per class attribute vectors ({\em mini}Imagenet) have 31 attributes (5 environments, 10 colors, 7 shapes, 9 materials). For augmentation keys, taking rotation as example, we set a 4-bit degree to annotate random rotations, '0001' refers to rotations with $0\sim90^{\circ}$, '0010' refers to rotations with $90\sim180^{\circ}$. \end{appendices} {\small \bibliographystyle{ieee_fullname} \section{Introduction} \label{sec:intro} Deep learning, a popular learning paradigm in computer vision, has improved the performance on numerous computer vision tasks, such as category recognition, scene understanding and action recognition. However, deep models heavily rely on large amounts of labeled training data, costly data collection and labelling. \begin{figure}[t] \centering \includegraphics[width=0.85\linewidth]{images/arl_demo_new.pdf} \vspace{-0.3cm} \caption{\small Our few-shot learning paradigm. Absolute Learning (AL) refers to the strategy where a pipeline learns to predict absolute object information \emph{e.g.}, object or concept class. Relative Learning (RL) denotes similarity (relation) learning with the use of binary $\{0,1\}$ and/or soft $[0;1]$ similarity labels. Absolute-relative Learning (ArL) is a combination of AL and RL, which is akin to multi-task learning, and unary and pair-wise potentials in semantic segmentation. ArL is also conceptually closer to how humans learn from few examples.} \label{fig:arl_demo} \vspace{-0.5cm} \end{figure} In contrast, humans enjoy the ability to learn and memorize new complex visual concepts from very few examples. Inspired by this observation, researchers have focused on the so-called Few-shot Learning (FSL), for which a network is trained by the use of only few labeled training instances. Recently, deep networks based on relation-learning have gained the popularity \cite{vinyals2016matching,snell2017prototypical,sung2017learning,NIPS2017_7082,sosn,salnet,zhang2020few,Zhang_2020_CVPR,ziko2020laplacian,deeper_look2,Simon_2020_CVPR}. Such approaches often apply a form of metric learning adapted to the few-shot learning task. They learn object relations (similarity learning on query and support images) based on support classes, and can be evaluated on images containing novel classes. However, there are two major problems in these relation learning pipelines, namely, (i) binary $\{0,1\}$ labels are used to express the similarity between pairs of images, which cannot capture the similarity nuisances in the real-world setting due to the hardness of such modeling, which leads to biases in the relation-based models, (ii) only pair-wise relation labels are used in these pipelines, so the models have no knowledge of the actual class concepts. In other words, these models are trained to learn the similarity between image pairs while they discard the explicit object classes despite they are accessible in the training stage. We conjuncture that these two problems pose inconsistency between current few-shot learning approaches and human's cognitive processes. To this end, we propose the Absolute-relative Learning (ArL) which exposes few-shot learners to both similarity and class labels, and we employ semantic annotations to circumvent the issue with the somewhat rigid binary similarity labels $\{0,1\}$. Our ArL consists of two separate learning modules, namely, Absolute Learning (AL) and Relative Learning (RL). AL denotes the strategy in which we learn to predict the actual object categories or class concepts in addition to learning the class relations. In this way, the feature extracting network is exposed to additional object- or concept-related knowledge. RL refers to the similarity learning strategy for which (apart of binary $\{0,1\}$ labels) we employ semantic annotations to promote the realistic similarity between image pairs. We use attributes or word2vec to obtain the semantic relation labels and learn element-wise similarities \emph{e.g.}, if two objects have same colour, texture, \emph{etc}. Such labels are further used as the supervisory cue in relation learning to capture the realistic soft relations between objects beyond the binary similarity. By combing AL and RL which constitute on ArL, the relation network is simultaneously taught the class/object concepts together with more realistic class/object relations, thus naturally yielding an improved accuracy. Moreover, we use the predictions from the absolute and relative learners as interpretable features to promote the original relation learning via feedback connections. Our approach is somewhat related to multi-modal learning which leverages multiple sources of data for training and testing. However, while multi-modal learning combines multiple streams of data on network inputs, our ArL models the semantic annotations in the label space, that is, we use them as the network output. We believe that using multiple abstractions of labels (relative \vs absolute) encourages the network to preserve more information about objects relevant to the few-shot learning task. Our strategy benefits from multi-task learning where two tasks learnt simultaneously help each other to outperform a naive fusion of two separate tasks. These tasks somewhat resemble unary and pair-wise potentials in semantic segmentation. We note that obtaining the semantic information for novel classes (the testing step in few-shot learning) is not always easy or possible. Since our pipeline design is akin to multi-task rather than multi-modal learning, our model does not require additional labeling at the testing stage. Therefore, it is a more realistic setting than that of existing approaches. In addition to the classic supervised few-shot recognition, we extend our ArL to the unsupervised scenario. Different with approach \cite{gidaris2019boosting} that merely applies the self-supervised discriminator as an auxiliary task to improve the performance of supervised FSL, we develop an effective unsupervised FSL based on ArL. As there is no annotations for training samples, we rely on augmentation labelling (\emph{e.g.}, rotations, flips and colors) to perform Absolute-relative Learning. Below, we summarize our contributions: \renewcommand{\labelenumi}{\roman{enumi}.} \hspace{-1.0cm} \begin{enumerate}[leftmargin=0.6cm] \item We propose so-called Absolute-relative Learning which can be embedded into popular few-shot pipelines to exploit both similarity and object/concept labelling. \item We extend our approach to unsupervised FSL, and we show how to create self-supervised annotations for unsupervised Absolute-relative Learning. \item We investigate the influence of different types of similarity measures on attributes in Relative Learning to simulate realistic object relations. \item We investigate the influence of different Absolute Learning branches on the classification performance. \end{enumerate} To the best of our knowledge, we are the first to perform an in-depth analysis of object and class relation modeling in the context of supervised and unsupervised few-shot learning given the Absolute-relative Learning paradigm via class, semantic and augmentation annotations. \section{Related Work} \label{sec:related} Below, we describe recent one- and few-shot learning algorithms followed by semantic-based approaches. \subsection{Learning From Few Samples} \label{sec:related_few_shot} For deep learning algorithms, the ability of {\em`learning from only a few examples is the desired characteristic to emulate in any brain-like system'} \cite{book_nip} is a desired operating principle which poses a challenge to typical CNNs designed for the large scale visual category recognition \cite{ILSVRC15}. \vspace{0.05cm} \noindent{\textbf{One- and Few-shot Learning }} has been studied widely in computer vision in both shallow \cite{miller_one_example,Li9596,NIPS2004_2576,BartU05,fei2006one,lake_oneshot} and deep learning scenarios \cite{koch2015siamese,vinyals2016matching,snell2017prototypical,finn2017model,snell2017prototypical,sung2017learning,sosn}. Early works \cite{fei2006one,lake_oneshot} propose one-shot learning methods motivated by the observation that humans can learn new concepts from very few examples. Siamese Network \cite{koch2015siamese} presents a two-streams convolutional neural network approach which generates image descriptors and learns the similarity between them. Matching Network \cite{vinyals2016matching} introduces the concept of support set and $L$-way $Z$-shot learning protocols. It captures the similarity between one testing and several support images, thus casting the one-shot learning problem as set-to-set learning. Prototypical Networks \cite{snell2017prototypical} learns a model that computes distances between a datapoint and prototype representations of each class. Model-Agnostic Meta-Learning (MAML) \cite{finn2017model} introduces a meta-learning model trained on a variety of different learning tasks. Relation Net \cite{sung2017learning} is an efficient end-to-end network for learning the relationship between testing and support images. Conceptually, this model is similar to Matching Network \cite{vinyals2016matching}. However, Relation Net leverages an additional deep neural network to learn similarity on top of the image descriptor generating network. Second-order Similarity Network (SoSN) \cite{sosn} is similar to Relation Net \cite{sung2017learning}, which consists of the feature encoder and relation network. However, approach \cite{sung2017learning} uses first-order representations for similarity learning. In contrast, SoSN investigates second-order representations to capture co-occurrences of features. Graph Neural Networks (GNN) have also been applied to few-shot learning in many recent works \cite{garcia2017few,Kim_2019_CVPR,Gidaris_2019_CVPR} achieving promising results. Finally, noteworthy are domain adaptation and related approaches which can also operate in the small sample regime \cite{koniusz2017domain,me_museum,zhang2018zero,zhang2018model,li2020word,li2020transferring,NEURIPS2020_8c00dee2}. \subsection{Learning from Semantic Labels} Semantic labels are used in various computer vision tasks \emph{e.g.}, object classification, face and emotion recognition, image retrieval, transfer learning, and especially in zero-shot learning. Metric learning often uses semantic information \emph{e.g.}, approach \cite{bradshaw2000semantic} proposes an image retrieval system which uses semantics of images via probabilistic modeling. Approach \cite{wang2011image} presents a novel bi-relational graph model that comprises both the data graph and semantic label graph, and connects them by an additional bipartite graph built from label assignments. Approach \cite{peng2014learning} proposes a classifier based on semantic annotations and provides the theoretical bound linking the error rate of the classifier and the number of instances required for training. Approach \cite{huai2018metric} improves metric learning via the use of semantic labels with different types of semantic annotations. {Our relative learning is somewhat related to the idea using semantic information to learn metric. However, we use similarity measures to simulate realistic relation labels in supervised and unsupervised few-shot learning.} \subsection{Multi-task Learning} {Multi-task learning operates on a set of multiple related tasks. Approach \cite{argyriou2007multi} treats the multi-task learning as a convex iterative problem. Approach \cite{Kendall_2018_CVPR} considers the homoscedastic uncertainty of each task to weight multiple loss functions while HallNet \cite{hall_net} learns old-fashioned descriptors as auxiliary tasks for action recognition. In contrast, we focus on how to refine the backbone by learning from class concepts and relations to address the high-level few-shot learning task.} \comment{ \begin{figure*}[t] \centering \vspace{-0.3cm} \includegraphics[width=0.9\linewidth]{images/separate-models.pdf}% \vspace{-0.2cm} \caption{The pipeline: standard Relation Learning, Relative Learning and Absolute Learning. The original SoSN uses the binary labels for supervision while we introduce different types of labelling which can be though of as soft \vs hard, and relative \vs absolute. Relative Learning employs semantic annotations (\emph{e.g.}, attributes, word2vec) to capture more realistic object relations while Absolute Learning leverages an extra branch of classifier to predict object annotations \emph{e.g.}, class label, attributes, and word2vec embeddings.} \label{fig:pipe-comp}% \vspace{-0.7cm} \end{figure*}} \section{Background} The concept of few-shot learning and the standard pipeline for few-shot learning are described next. \subsection{Relation Learning} Few-shot learning model typically consists of two parts: (i) feature encoder and (ii) relation module \emph{e.g.}, a similarity network or a classifier. Below we take the two-stage `feature encoder-relation network' \cite{sung2017learning,sosn} as an example to elaborate on main aspects of few-shot learning pipelines. A basic relation network \cite{sung2017learning,sosn} contains 2-4 convolutional blocks and 2 fully-connected layers. Let us define the feature encoding network as $f\!:(\mbr{W\!\times\!H}; \mbr{|\vec{\mathcal{F}}|})\!\shortrightarrow\!\mbr{K\!\times\!N}$, where $W$ and $H$ denote the width and height of an input image, $K$ is the length of feature vectors (number of filters), $N\!=\!N_W\!\cdot\!N_H$ is the total number of spatial locations in the last convolutional feature map. For simplicity, we denote an image descriptor by $\boldsymbol{\Phi}\!\in\!\mbr{K\!\times\!N}$, where $\boldsymbol{\Phi}\!=\!f(\mathbf{X}; \vec{\mathcal{F}})$ for an image $\mathbf{X}\!\in\!\mbr{W\!\times\!H}$ and $\vec{\mathcal{F}}$ are the parameters-to-learn of the encoding network. The relation network is denoted by $r\!:(\mbr{K'\!}; \mbr{|\vec{\mathcal{R}}|})\!\shortrightarrow\!\mbr{}$. Typically, we write $r(\boldsymbol{\psi}; \vec{\mathcal{R}})$, where $\boldsymbol{\psi}\!\in\!\mbr{K'}\!$, whereas $\vec{\mathcal{R}}$ are the parameters-to-learn of the relation network. \subsection{Supervised Few-shot Learning} \comment{\begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{images/k-func.pdf} \caption{\small The two element-wise measurement functions investigated in our work. The plots are the function curves w.r.t different p values. Right figure is the semantic-guided class relations. These relations are derived from attributes with Gaussian kernel function of different $\sigma$ values for 100 \textit{mini}Imagenet classes. It can be seen the semantic annotation can simulate more realistic object relations than binary labels.} \vspace{-0.5cm} \label{fig:soft_label} \end{figure*}} For the supervised $L$-way $Z$-shot problem, we assume some support images $\{\mathbf{X}_s\}_{s\in\mathcal{W}}$ from set $\mathcal{W}$ and their corresponding image descriptors $\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}}$ which can be considered as a $Z$-shot descriptor. Moreover, we assume one query image $\mathbf{X}_q\!$ with its image descriptor $\boldsymbol{\Phi}_q$. Both the $Z$-shot and the query descriptors belong to one of $L$ classes in the subset $\mathcal{C}^{\ddag}\!\equiv\!\{c_1,\cdots,c_L\}\!\subset\!\idx{C}\!\equiv\!\mathcal{C}$. The $L$-way $Z$-shot learning step can be defined as learning similarity: \begin{equation} \zeta_{sq}=r\left(\vartheta\!\left(\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}},\boldsymbol{\Phi}^*_q\!\right),\vec{\mathcal{R}}\right), \end{equation} where $\zeta$ refers to similarity prediction of given support-query pair, $r$ refers to the relation network, and $\vec{\mathcal{R}}$ denotes network parameters that have to be learnt. $\vartheta$ is the relation operator on features of image pairs: we simply use concatenation. Following approaches \cite{sung2017learning,sosn}, the Mean Square Error (MSE) is employed as the objective function: \begin{align} \vspace{-0.2cm} &L\!\!=\!\!\sum\limits_{c\in\mathcal{C}^{\ddag}}\!\sum\limits_{c'\in\mathcal{C}^{\ddag}} \left(r\left(\!\{\boldsymbol{\Phi}_s\}_{s\in\mathcal{W}_c},\boldsymbol{\Phi}_{q\in\mathcal{Q}: \ell(q)=c'},\vec{\mathcal{R}}\right)\!-\!\delta\!\left(c\!-\!c'\right)\!\right)^2\!\!,\nonumber\\ &\qquad\text{ where }\; \boldsymbol{\Phi}_s\!=\!f(\mathbf{X}_s; \vec{\mathcal{F}}) \;\text{ and }\; \boldsymbol{\Phi}_q\!=\!f(\mathbf{X}_q; \vec{\mathcal{F}}). \vspace{-0.2cm} \end{align} In the above equation, $\mathcal{W}_c$ is a randomly chosen set of support image descriptors of class $c\!\in\!\mathcal{C}^{\ddag}$, $\mathcal{Q}$ is a randomly chosen set of $L$ query image descriptors so that its consecutive elements belong to the consecutive classes in $\mathcal{C}^{\ddag}\!\equiv\!\{c_1,\cdots,c_L\}$. $\ell(q)$ corresponds to the label of $q\!\in\!\mathcal{Q}$. Lastly, $\delta$ refers to the indicator function equal 1 if its argument is 0. \subsection{Unsupervised Few-shot Learning} There are no class annotations that can be directly used for relation learning in the unsupervised setting. However, the popular self-supervised contrastive learning captures self-object relations by learning the similarity between different augmentations of the same image. Thus, we build our unsupervised few-shot learning pipeline based on contrastive learning. Given two image inputs $\mathbf{X}$ and $\mathbf{Y}$, we apply random augmentations on these images \emph{e.g.}, rotation, flip, resized crop and color adjustment via operator $\text{Aug}(\cdot)$, which samples these transformations according to a uniform distribution. We obtain a set of $M$ augmented images: \begin{align} \hat{\mathbf{X}}_i \sim \text{Aug}(\mathbf{X}),\;\hat{\mathbf{Y}}_i \sim \text{Aug}(\mathbf{Y}),\;i\in\{1,\cdots,M\}. \end{align} We pass augmented images to the feature encoder $f$ to get feature descriptors and obtain relation predictions $\zeta,\zeta^*\!\in\mbr{M\!\times\!M}$ from relation network $r$ for augmented samples of $\mathbf{X}$ and $\mathbf{Y}$, respectively, as well as relation predictions $\zeta'\!\in\mbr{M\!\times\!M}$ evaluated between augmented samples of $\mathbf{X}$ and $\mathbf{Y}$: \begin{align} \label{eq:enc} &\boldsymbol{\Phi}_{i} = f(\hat{\mathbf{X}}_i; \vec{\mathcal{F}}),\; \boldsymbol{\Phi}^*_j = f(\hat{\mathbf{Y}}_j; \vec{\mathcal{F}}),\;i,j\in\{1,\cdots,M\}, \\ &\!\!\!\!\!\!\!\!\!\!\zeta_{ij}\!=\!r\left(\boldsymbol{\Phi}_i,\boldsymbol{\Phi}_j; \vec{\mathcal{R}}\right),\; \zeta'_{ij}\!=\! r\left(\boldsymbol{\Phi}_i,\boldsymbol{\Phi}^*_j; \vec{\mathcal{R}}\right),\; \zeta^*_{ij}\!=\! r\left(\boldsymbol{\Phi}^*_i,\boldsymbol{\Phi}^*_j; \vec{\mathcal{R}}\right).\nonumber \end{align} Lastly, we minimize the contrastive loss $L_{urn}$ \wrt $\vec{\mathcal{F}}$ and $\vec{\mathcal{R}}$ in order to push closer augmented samples generated from the same image ($\mathbf{X}$ and $\mathbf{Y}$, resp.) and push away augmented samples generated from pairs images $\mathbf{X}$ and $\mathbf{Y}$: \begin{align} L_{urn}=\,\parallel\!\boldsymbol{\zeta}-1\!\parallel^2_F + \parallel\!\boldsymbol{\zeta}^*\!-1\!\parallel^2_F +\parallel\!\boldsymbol{\zeta}'\!\parallel^2_F.\label{eq:urn} \end{align}} \vspace{-0.4cm} In practice, we sample a large number of image pairs $\mathbf{X}$ and $\mathbf{Y}$ with the goal of minimizing Eq. \eqref{eq:urn}. \section{Approach} Below, we firstly explain the Relative Learning and Absolute Learning modules followed by the introduction of the Absolute-relative Learning pipeline. We note that all auxiliary information \emph{e.g.}, attributes and word2vec embeddings are used in the label space (not as extra inputs). Given images $\mathbf{X}_i$ and $\mathbf{X}_j$, we feed them into the feature encoder $f$ to get image representations $\boldsymbol{\Phi}_i = f(\mathbf{X}_i; \vec{\mathcal{F}})$ and $\boldsymbol{\Phi}_j = f(\mathbf{X}_j; \vec{\mathcal{F}})$, where $\vec{\mathcal{F}}$ are the parameters of feature encoder. Subsequently, we perform our proposed Relative Learning and Absolute Learning on $\boldsymbol{\Phi}_i$ and $\boldsymbol{\Phi}_j$. \subsection{Relative Learning} In conventional few-shot learning, binary class labels are employed to train the CNNs in order to model the relations between pairs of images. However, labeling such pairs as similar/dissimilar (\emph{i.e.}, $\{0,1\}$) cannot fully reflect the actual relations between objects. In this paper, we take a deeper look at how to represent relations in the few-shot learning scenario. To better exploit class relations in the label space, we employ semantic annotations \emph{e.g.}, attributes and word2vec. Based on these semantic annotations, we investigate how semantic relation labels influence the final few-shot learning performance. Figure \ref{fig:arl} (bottom right corner) shows that the classic relation learning can be viewed as an intersection (or relation) operation over the original class labels. Thus, we apply intersection on the semantic annotations to obtain the relative semantic information for the relative supervision, which can contribute to obtaining more realistic image relations in the label space. Let us denote the class labels and attributes of image $\textbf{X}_i$ as $c_i, \mathbf{a}_i$. Given two samples $\textbf{X}_i$ and $\textbf{X}_j$ with their class labels $c_i, c_j$ (and one-hot vectors $\mathbf{c}_i, \mathbf{c}_j$) and attributes $\mathbf{a}_i, \mathbf{a}_j$, we obtain the binary relation label $\hat{c}_{ij}$ which represents if the two images are from the same class. We also have semantic relation label $\hat{a}_{ij}$ which represents attributes shared between $\textbf{X}_i$ and $\textbf{X}_j$. Semantic annotations often contain continuous rather than binary values. Thus, we use the RBF function with the $\ell^p_p$ norm. Specifically, we obtain: \begin{align} \label{eq6} \!\!\!\!\hat{c}_{ij}\!=\!c_i\!\wedge\!c_j\!=\!\delta(\mathbf{c}_i\!-\!\mathbf{c}_j) \text{ and } \hat{a}_{ij}\!=\!e^{-||\mathbf{a}_i-\mathbf{a}_j||_p^p}, \end{align} If we train the network only with $\hat{c}_{ij}$, it becomes the basic few-shot learning. However, the simultaneous use of $\hat{c}_{ij}$ and $\hat{a}_{ij}$ for similarity learning should yield smoother similarity decision boundaries. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/arl-pipeline.pdf}% \vspace{-0.3cm} \caption{\small The proposed pipeline for our Absolute-relative Learning (supervised setting). It consists of three blocks, namely (i) feature encoder to extract the image representations, (ii) Absolute Learning module to enhance the feature quality with auxiliary supervision, (iii) Relative Learning module to learn image relations based on multi-modal relation supervisions. With our Absolute-relative Learning, we want to both learn if the two objects share the same label and how similar they are semantically \emph{e.g.}, in terms of shared visual attributes.}% \label{fig:arl}% \vspace{-0.3cm} \end{figure*} To learn from multi-modal relative supervisions, we apply a two-stage learner consisting of a shared part $g$ and respective parts $r$. Let us denote the class and semantic relative learners as $r_c$ and $r_a$. To make relative predictions, we firstly apply the relation operator $\vartheta$ over $\boldsymbol{\Phi}_i$ and $\boldsymbol{\Phi}_j$ (concatenation along the channel mode), and feed such a relation descriptor into $g$ (4 blocks of Conv-BN-ReLU-MaxPool) to obtain the refined pair-wise representation $\boldsymbol{\psi}_{ij}$: \begin{equation} \boldsymbol{\psi}_{ij} = g(\vartheta(\boldsymbol{\Phi}_i, \boldsymbol{\Phi}_j);\boldsymbol{\mathcal{G}}). \end{equation} Subsequently, we feed $\boldsymbol{\psi}_{ij}$ into learners $r_c$ and $r_a$ to get class- and semantics-wise relation predictions $\hat{c}^*_{ij}$ and $\hat{a}^*_{ij}$: \begin{align} \hat{c}^*_{ij} = r_c(\boldsymbol{\psi}_{ij}; \vec{\mathcal{R}}_c) \text{ and } \hat{a}^*_{ij} = r_a(\boldsymbol{\psi}_{ij}; \vec{\mathcal{R}}_s), \end{align} where $\vec{\mathcal{R}}_c$ and $\vec{\mathcal{R}}_s$ refer to the parameters of $r_c$ and $r_a$, respectively. The objectives for class- and semantic-wise relative learners are: \begin{align} &L_{relc}=\sum\limits_i\!\sum\limits_j\! \left(r_c\left(\boldsymbol{\psi}_{ij};\vec{\mathcal{R}}_c\right)-\hat{c}_{ij}\right)^2, \\ &L_{rels}=\sum\limits_i\!\sum\limits_j\! \left(r_a\left(\boldsymbol{\psi}_{ij};\vec{\mathcal{R}}_s\right)-\hat{a}_{ij}\right)^2. \vspace{-0.3cm} \end{align} \subsection{Absolute Learning} In contrast to Relative Learning which applies the relative labels to learn similarity, Absolute Learning refers to the strategy in which the network learns predefined object annotations \emph{e.g.}, class labels, attributes, \emph{etc}. The motivation behind the Absolute Learning is that current few-shot learning pipelines use the relation labels as supervision which prevents the network from capturing objects concepts. In other words, the network knows if the two objects are similar (or not) but it does not know what these objects are. Branches for Absolute Learning are shown in Figure \ref{fig:arl}. In this paper, we apply an additional network branch following the feature encoder to learn the absolute object annotations. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{images/uml.pdf}% \vspace{-0.3cm} \caption{\small The proposed pipeline for Absolute-relative Learning (unsupervised setting). In contrast to supervised ArL that uses class and semantic annotations in absolute and relative learners, we apply a random augmentation sequence to augment unlabeled datapoints, and we store the augmentation keys as instance annotations.}% \label{fig:uarl} \vspace{-0.3cm} \end{figure*} Firstly, consider the class prediction as an example. Once we obtain the image representation $\boldsymbol{\Phi}_i$ given image $\mathbf{X}_i$, we feed it into the class absolute learner $h_c$ with parameter $\vec{\mathcal{H}}_c$.: \begin{equation} \mathbf{c}^*_i = h_c(\boldsymbol{\Phi}_i; \vec{\mathcal{H}}_c). \vspace{-0.2cm} \end{equation} Subsequently, we apply the cross-entropy loss to train the class absolute learner ($l^c$ is the target class integer): \vspace{-0.3cm} \begin{equation} L_{absc} = -\sum\limits_i^N log(\frac{exp(c^*_i[l^c_{i}])}{\sum\limits_{j} exp(c^*_i[j])}). \end{equation} \vspace{-0.3cm} \noindent For the semantic absolute learner, we use the MSE loss by feeding $\boldsymbol{\Phi}_i$ into $h_a$: \vspace{-0.3cm} \begin{equation} \mathbf{a}^*_i = h_a(\boldsymbol{\Phi}_i; \vec{\mathcal{H}}_s), \end{equation} \begin{equation} L_{abss} = \frac{1}{N} \sum\limits_i^N || \mathbf{a}_i - \mathbf{a}^*_i ||_2^2. \end{equation} The Absolute Learning module may appear somewhat similar to self-supervised learning applied to few-shot learning. However, we use discriminators to classify different types of object annotations while the typical self-supervision recognises the patterns of image transformations. We believe our strategy helps refine the feature encoder to capture both the notion of similarity as well as concrete object concepts. \subsection{Absolute-relative Learning} For our Absolute-relative Learning (ArL), we simultaneously train the relation network with relative object similarity labels, and introduce an auxiliary task which learns specific object labels. The pipeline of ArL is shown in Figure \ref{fig:arl} which highlights that the ArL model uses the auxiliary semantic soft labels to train the relation network to capture more realistic image relations while employing auxiliary predictor branches to infer different types of object information, thus refining the feature representations and the feature encoder. In addition to merging the absolute/relative learners, we introduce several connections from the outputs of absolute and relative learners wired to relative learners to promote the original relation learner, which does not require absolute labels or semantic labels at the testing time. In contrast, multi-modal learning needs all modalities in the testing step. Figure \ref{fig:uarl} shows the Absolute-relative Learning pipeline (unsupervised setting). As the supervised ArL, the unsupervised ArL pipeline consists of absolute and relative learners. However, the annotations used during the training phase are self-supervised augmentation keys, not class labels. Let $l$ denote the number of layers in $g$. We apply $\vartheta$ over the intermediate descriptor $\boldsymbol{\psi}_{ij}^{(l-1)}\!$, which is the ($l$-1)-th layer of $g$, and absolute predictions $\mathbf{c}^*_i, \mathbf{c}^*_j, \mathbf{a}^*_i, \mathbf{a}^*_j$. We call this operation the absolute feedback: \begin{equation} \!\!\!\!\!\!\!\!\!\!\!\hat{\boldsymbol{\psi}}_{ij}^{(l-1)}\!=\! \vartheta\left(\boldsymbol{\psi}_{ij}^{(l-1)},\mathbf{c}^*_i),\mathbf{c}^*_j),\mathbf{a}^*_i,\mathbf{a}^*_j\right). \end{equation} We use $\hat{\boldsymbol{\psi}}_{ij}$ from the last layer of $g$ to train the semantic relative learner $r_a$: \begin{align} \!&\hat{\boldsymbol{\psi}}_{ij} = \hat{\boldsymbol{\psi}}_{ij}^{(l)} = g^{(l)}\big(\hat{\boldsymbol{\psi}}_{ij}^{(l-1)}\big),\\ \!&L_{rels}=\sum\limits_i\!\sum\limits_j\! \left(\!r_a\big(\hat{\boldsymbol{\psi}}_{ij};\vec{\mathcal{R}}_s\big)-\hat{a}_{ij}\right)^2\!\!,\;\hat{a}_{ij}\!=\!e^{-||\mathbf{a}_i-\mathbf{a}_j|_p^p}.\nonumber \end{align} \begin{table*}[t] \centering \caption{Evaluations on the \textit{mini}Imagenet dataset (5-way acc. given) for the ArL in supervised and unsupervised settings. (`U-' refers to the unsupervised FSL.) } \vspace{-0.2cm} \label{table1} \makebox[\textwidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{10}\selectfont \begin{tabular}{lccc} \toprule Model & Backbone & 1-shot & 5-shot \\ \midrule & \multicolumn{3}{c}{Supervised Few-shot Learning} \\ \midrule \textit{Matching Nets} \cite{vinyals2016matching} & - & $43.56 \pm 0.84 $ & $55.31 \pm 0.73 $ \\ \textit{Meta Nets} \cite{munkhdalai2017meta} & - & $49.21 \pm 0.96 $ & - \\ \textit{PN} \cite{snell2017prototypical} & Conv-4-64 & $49.42 \pm 0.78 $ & $68.20 \pm 0.66 $ \\ \textit{MAML} \cite{finn2017model} & Conv-4-64 & $48.70 \pm 1.84 $ & $63.11 \pm 0.92 $ \\ \textit{RN} \cite{sung2017learning} & Conv-4-64 & $51.36 \pm 0.82 $ & $66.12 \pm 0.70 $ \\ \textit{SoSN} \cite{sosn} & Conv-4-64 & $53.73\pm 0.83 $ & $68.58 \pm 0.70$ \\ \textit{SoSN} \cite{sosn} & ResNet-12 & $59.01\pm 0.83 $ & $75.49 \pm 0.68$ \\ \textit{MAML++} \cite{antoniou2018train} & Conv-4-64 & $52.15 \pm 0.26 $ & $68.32 \pm 0.44$ \\ \textit{MetaOptNet} \cite{lee2019meta} & ResNet-12 & $62.64\pm 0.61 $ & $78.63 \pm 0.46$\\ \arrayrulecolor{black} \cdashline{1-4}[1pt/3pt] \textit{PN + ArL} & Conv-4-64 & $53.93 \pm 0.65$& $69.68 \pm 0.45$ \\ \textit{RN + ArL} & Conv-4-64 & $53.79 \pm 0.68$& $68.86 \pm 0.43$ \\ \textit{SoSN + ArL} & Conv-4-64 & $57.48 \pm 0.65$ & $72.64 \pm 0.45$ \\ \textit{SoSN + ArL} & ResNet-12 & ${61.36 \pm 0.67}$ & ${78.95 \pm 0.42}$ \\ \textit{MetaOptNet + ArL} & ResNet-12 & ${65.21\pm 0.58}$ & ${80.41 \pm 0.49}$ \\ \hline & \multicolumn{3}{c}{Unsupervised Few-shot Learning} \\ \hline \textit{Pixel (Cosine)} & - & $23.00$ & $26.60$ \\ \textit{BiGAN ($k_{nn}$)} \cite{bigan} & - & $25.56$ & $31.10$ \\ \textit{BiGAN (cluster matching)} \cite{bigan} & - & $24.63$ & $29.49$ \\ \textit{DeepCluster ($k_{nn}$)} \cite{deepcluster} & - & $28.90$ & $42.25$ \\ \textit{DeepCluster (cluster matching)} \cite{deepcluster} & - & $22.20$ & $23.50$ \\ \textit{UMTRA } \cite{umtra} & Conv-4-64 & $39.91$ & $ 50.70$ \\ \textit{CACTUs} \cite{cactu} & Conv-4-64 & $39.94$ & $ 54.01$ \\ \arrayrulecolor{black} \cdashline{1-4}[1pt/3pt] \textit{U-RN} & Conv-4-64 & $35.14 \pm 0.91$ & $44.10 \pm 0.88$ \\ \textit{U-PN} & Conv-4-64 & $35.85 \pm 0.85$ & $48.01 \pm 0.82$ \\ \textit{U-SoSN} & Conv-4-64 & $37.94 \pm 0.87$ & $50.95 \pm 0.81$ \\ \textit{U-RN + ArL} & Conv-4-64 & $36.37 \pm 0.92$ & $46.97 \pm 0.86$ \\ \textit{U-PN + ArL} & Conv-4-64 & $38.76 \pm 0.84$ & $51.08 \pm 0.84$ \\ \textit{U-SoSN + ArL} & Conv-4-64 & ${41.13 \pm 0.84}$ & ${55.39 \pm 0.79}$ \\ \textit{U-SoSN + ArL} & ResNet-12 & $41.08 \pm 0.83$ & ${57.01 \pm 0.79}$ \\ \bottomrule \end{tabular}} \vspace{-0.4cm} \end{table*} \begin{table}[b] \centering \vspace{-0.3cm} \caption{Evaluations on the CUB-200-2011 and Flower102. (5-way acc. given).} \vspace{-0.2cm} \label{table2} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{9.5}\selectfont \begin{tabular}{lcccc} \toprule & \multicolumn{2}{c}{CUB-200-2011} & \multicolumn{2}{c}{Flower102} \\ Model & 1-shot & 5-shot & 1-shot & 5-shot \\ \midrule & \multicolumn{4}{c}{Supervised Few-shot Learning} \\ \hline \textit{PN} \cite{snell2017prototypical} & $37.42 $ & $51.57$ & $62.81$ & $82.11$ \\ \textit{RN} \cite{sung2017learning} & $40.56 $ & $53.91$ & $68.26$ & $80.94$ \\ \textit{SoSN} \cite{sosn}& $46.72$ & $60.34$ & $71.90$ & $84.87$ \\ \textit{RN + ArL} & ${44.53}$ & ${58.76}$ & ${71.12}$ & ${83.49}$ \\ \textit{SoSN - RL(cls.)} \cite{sosn}& $46.72$ & $60.34$ & $71.90$ & $84.87$ \\ \textit{SoSN - RL(att.)} & ${49.24}$ & ${64.04}$ & ${74.96}$ & ${87.21}$\\ \textit{SoSN - AL(cls.)} & $46.88$ & $60.90$ & $72.97$ & $85.35$ \\ \textit{SoSN - AL(att.)} & ${48.85}$ & ${63.64}$ & ${74.31}$ & $86.97$ \\ \textit{SoSN + ArL} & $\mathbf{50.62}$ & ${65.87}$ & ${76.21}$ & ${88.36}$ \\ \hline & \multicolumn{4}{c}{Unsupervised Few-shot Learning} \\ \hline \textit{BiGAN($k_{nn}$)}\cite{bigan} & $28.02$ & $30.17$ & $44.68$ & $59.12$ \\ \textit{U-RN} & ${29.36}$ & ${36.36}$ & ${55.54}$ & ${68.86}$ \\ \textit{U-PN} & ${29.87}$ & ${37.13}$ & ${55.36}$ & ${68.49}$ \\ \textit{U-SoSN} & ${36.89}$ & ${45.81}$ & ${61.26}$ & ${75.98}$ \\ \textit{U-RN + ArL} & ${31.27}$ & ${38.41}$ & ${57.19}$ & ${70.23}$ \\ \textit{U-PN + ArL} & ${31.58}$ & ${39.95}$ & ${57.61}$ & ${70.31}$ \\ \textit{U-SoSN + ArL} & ${37.93}$ & ${51.55}$ & ${69.14}$ & ${84.10}$ \\ \bottomrule \end{tabular}} \end{table} \vspace{-0.3cm} Let $\hat{\mathbf{a}}^*_{ij}$ denote the outputs of semantic relative learner. Then we apply the relative feedback by combining $\hat{\boldsymbol{\psi}}_{ij}$ and $\hat{\mathbf{a}}^*_{ij}$ to promote the training of class relative learner $r_c$: \begin{align} & \hat{\boldsymbol{\psi}}^*_{ij} = \vartheta(\hat{\boldsymbol{\psi}}_{ij},\hat{\mathbf{a}}^*_{ij}),\\ & L_{relc}=\sum\limits_i\!\sum\limits_j\! \left(\!r_c\big(\hat{\boldsymbol{\psi}}^*_{ij};\vec{\mathcal{R}}_c\big)-\hat{c}_{ij}\right)^2\!\!,\; \hat{c}_{ij}\!=\!\delta(\mathbf{c}_i\!-\!\mathbf{c}_j).\nonumber \end{align} \vspace{-0.3cm} \noindent We minimize the following objective for ArL: \begin{equation} \min \quad L_{relc} + \alpha L_{rels} + \beta L_{absc} + \gamma L_{abss}. \end{equation} where $(\alpha, \beta, \gamma)\!\in\![0.001; 1]^3$ are hyper-parameters that control the impact of each learner and are estimated with 20 steps of the HyperOpt package \cite{bergstra2015hyperopt} on a given validation set. Nullifying $\alpha$, $\beta$ or $\gamma$ disables corresponding losses. \section{Experiments} Below, we demonstrate the usefulness of our approach by evaluating it on the \textit{mini}Imagenet \cite{vinyals2016matching}, fine-grained CUB-200-2011 \cite{WahCUB_200_2011} and Flower102 \cite{Nilsback08} datasets. Figure \ref{fig:arl} presents our ArL with the two-stage relation learning pipeline but ArL applies to any few-shot learning models with any type of base learners (\emph{e.g.}, nearest neighbour discrimination, relation module, multi-class linear classifier, \emph{etc}). The core objective of ArL is to improve the representation quality. Thus, we employ the classic baseline models, \emph{i.e.}, Prototypical Net (PN) \cite{snell2017prototypical}, Relation Net \cite{sung2017learning}, SoSN \cite{sosn}, MetaOptNet \cite{lee2019meta}, \emph{etc}, as our baseline models to evaluate our Relative Learning, Absolute Learning and the Absolute-relative Learning in both supervised and unsupervised settings. The Adam solver is used for model training. We set the initial learning rate to be 0.001 and decay it by 0.5 every 50000 iterations. % We evaluate ArL on RelationNet (RN) \cite{sung2017learning}, Prototypical Net (PN) \cite{snell2017prototypical}, Second-order Similarity Network (SoSN) \cite{sosn} and MetaOptNet \cite{lee2019meta}. For augmentations in the unsupervised setting, we randomly apply resized crop (scale 0.6--1.0, ratio 0.75--1.33), horizontal+vertical flips, rotations ($0$--$360^{\circ}$), and color jitter. \subsection{Datasets} Below, we describe our setup, standard and fine-grained datasets with semantic annotations and evaluation protocols. \vspace{0.05cm} \noindent\textbf{\textit{mini}Imagenet} \cite{vinyals2016matching} consists of 60000 RGB images from 100 classes, each class containing 600 samples. We follow the standard protocol \cite{vinyals2016matching} and use 80/20 classes for training/testing, and images of size $84\!\times\!84$ for fair comparisons with other methods. For semantic annotations, we manually annotate 31 attributes for each class. We also leverage word2vec extracted from GloVe as the class embedding. \vspace{0.05cm} \noindent\textbf{Caltech-UCSD-Birds 200-2011 (CUB-200-2011)} \cite{WahCUB_200_2011} has 11788 images of 200 bird species. 100/50/50 classes are randomly selected for meta-training, meta-validation and meta-testing. 312 attributes are provided for each class. \vspace{0.05cm} \noindent\textbf{Flower102} \cite{Nilsback08} is a fine-grained category recognition dataset that contains 102 classes of various flowers. Each class consists of 40-258 images. We randomly select 60 meta-train classes, 20 meta-validation classes and 22 meta-test classes. 1024 attributes are provided for each class. \begin{table}[b] \centering \vspace{-0.3cm} \caption{Ablation study of the impact of different annotations (\emph{e.g.}, class labels, attributes) on ArL.} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{0.9em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{8}\selectfont \begin{tabular}{ccccccc} \toprule & \multicolumn{2}{c}{Rel. Learn.} & \multicolumn{2}{c}{Abs. Learn.} & \multicolumn{2}{c}{Top-1 Acc.} \\ Baseline & cls. & att. & cls. & att. & 1-shot & 5-shot \\ \hline \multirow{4}{*}{RN} & \checkmark & & & & 51.36 & 65.32 \\ & & \checkmark & & & 52.38 & 66.74 \\ & & & \checkmark & & 51.41 & 66.01 \\ & & & & \checkmark & 52.35 & 66.53 \\\hline \multirow{4}{*}{SoSN} & \checkmark & & & & 53.73 & 68.58 \\ & & \checkmark & & & 55.56 & 70.97 \\ & & & \checkmark & & 55.12 & 70.91 \\ & & & & \checkmark & 55.31 & 71.03 \\ \bottomrule \end{tabular}} \end{table} \comment{ \begin{table}[b] \centering \caption{Ablation study on the impacts of absolute and relative learnings with different annotations (\emph{e.g.} class labels, attributes) on \textit{mini}Imagenet.} \vspace{-0.1cm} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{0.9em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{7}\selectfont \begin{tabular}{c|ccc|ccc|cc} \toprule & \multicolumn{3}{c}{Relative Learning} & \multicolumn{3}{c}{Absolute Learning} & \multicolumn{2}{c}{Top-1 Accuracy} \\ Baseline & cls. & att. & w2v. & cls. & att. & w2v. & 1-shot & 5-shot \\ \hline \multirow{6}{*}{RN} & \checkmark & & & & & & 51.36 & 65.32 \\ & & \checkmark & & & & & 52.38 & 66.74 \\ & & & \checkmark & & & & 52.87 & 66.73 \\ & & & & \checkmark & & & 51.41 & 66.01 \\ & & & & & \checkmark & & 52.35 & 66.53 \\ & & & & & & \checkmark & 52.67 & 66.91 \\ \hline \multirow{6}{*}{SoSN} & \checkmark & & & & & & 53.73 & 68.58 \\ & & \checkmark & & & & & 55.01 & 70.21 \\ & & & \checkmark & & & & 54.31 & 69.64 \\ & & & & \checkmark & & & 55.12 & 70.91 \\ & & & & & \checkmark & & 55.31 & 71.03 \\ & & & & & & \checkmark & 54.78 & 70.85 \\ \bottomrule \end{tabular}} \vspace{-0.3cm} \end{table}} \comment{\begin{table}[b] \centering \caption{Ablations on feedback connections on \textit{mini}Imagenet. (given 5-way acc.)} \vspace{-0.1cm} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{8.5}{8}\selectfont \begin{tabular}{cccc} \toprule Absolute feedback & Relative Feedback & 1-shot & 5-shot \\ \hline & & 55.92 & 71.52 \\ \checkmark & & 56.13 & 71.89\\ & \checkmark & 56.67 & 71.99\\ \checkmark & \checkmark & 57.48 & 72.64 \\ \bottomrule \end{tabular}} \vspace{-0.3cm} \label{tab:ablations} \end{table}} \subsection{Performance Analysis} \comment{\begin{table}[t] \centering \caption{Ablations on measurement function $k$ in relative learning. (5-way 1-shot acc.)} \vspace{-0.3cm} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{8}\selectfont \begin{tabular}{ccc} \toprule Function & $e^{-|x_i - y_i|^p}$ & $max(1,|x_i-y_i|^p)$ \\ \hline \textit{mini}Imagenet & 54.73 & 55.01 \\ CUB-200-2011 & 49.24 & 48.43 \\ Flower102 & 74.29 & 74.96 \\ AwA2 & 51.03 & 51.61 \\ \bottomrule \end{tabular}} \vspace{-0.5cm} \label{tab:ablations} \end{table}} \begin{figure}[t] \vspace{-0.2cm} \centering \includegraphics[width=\linewidth]{images/arl-fig4.pdf} \vspace{-0.7cm} \caption{The validation of $p$ given the semantic similarity measure function $e^{-||\mathbf{a}_i-\mathbf{a}'_i||_p^p}$ on selected datasets.} \label{fig:fig4} \end{figure} \begin{figure}[t] \vspace{-0.3cm} \centering \includegraphics[width=\linewidth]{images/arl-fig5.pdf} \vspace{-0.7cm} \caption{Visualization of semantic absolute and relative predictions which shows how their bins relate.} \vspace{-0.3cm} \label{fig:fig5} \end{figure} \noindent\textbf{Absolute-relative Learning (ArL).} Table \ref{table1} shows that Absolute-relative Learning (ArL) effectively improves the performance on all datasets. On \textit{mini}Imagenet, SoSN+ArL improve the 1- and 5-shot performance by $3.6\%$ and $4.1\%$, MetaOptNet+ArL improves the performance by 2.6\% and 1.8\% respectively. Not in the table, DeepEMD \cite{Zhang_2020_CVPR} (ResNet-12) and LaplacianFSL \cite{ziko2020laplacian} (ResNet-18) scored 65.91\% and 66.41\% (1-shot prot.) In contrast, DeepEMD+ArL and LaplacianFSL+ArL scored 67.24\% and 68.07\%. For fine-grained datasets, CUB-200-2011 and Flower102 in Table \ref{table2}, SoSN+ArL improves the 1- and 5-shot accuracy by $1.4\%$ and $1.6\%$. For unsupervised learning, ArL with SoSN brings 3.5\% and 4.4\% gain on \textit{mini}Imagenet, 1.0\% and 5.7\% gain on CUB-200-2011, 7.9\% and 8.1\% gain on Flower102 for 1- and 5-shot learning, respectively. Our unsupervised U-SoSN+ArL often outperforms recent supervised methods on fine-grained classification datasets. \vspace{0.05cm} \noindent\textbf{Visualization.} Below, we visualize absolute and relative semantic predictions to explain how such an information can be used. As shown in Fig. \ref{fig:fig5}, we randomly select 4 images from two classes, among which $I_1$ and $I_2$ belong to one class, and $I_3$ and $I_4$ belong to another class. Figure \ref{fig:fig5} shows that the semantic absolute predictions of images from the same class have more consistent distributions, the relative predictions over same-class image pairs have high responses to the same subset of bins. Predictions over images from disjoint classes result in smaller intersection of corresponding peaks. \vspace{0.05cm} \noindent\textbf{Ablations on absolute and relative learners.} Figure \ref{fig:fig4} shows results \wrt $p$ from Eq. \ref{eq6}. Table \ref{table_ablation} shows how different absolute and relative learners affect few-shot learning results on \textit{mini}Imagenet. For example, for the SoSN baseline, the attribute-based absolute and relative learners work the best among all absolute and relative learning modules. \vspace{0.05cm} \noindent\textbf{Relative Learning (RL).} Table \ref{table_ablation} (\textit{mini}Imagenet) illustrates the performance enhanced by the semantic-based relation on Relation Net, SoSN and SalNet. Results in the table indicate that the performance of few-shot similarity learning can be improved by employing the semantic relation labels at the training stage. For instance, SoSN with attribute soft label ({\em att.}) achieves $0.6\%$ and $1.7\%$ gain for 1- and 5-shot protocols, compared with the baseline ({\em SoSN}) in Table \ref{table1}. The results on CUB-200-2011 and Flower102 from Table \ref{table2} indicate similar gains. \vspace{0.05cm} \noindent\textbf{Absolute Learning (AL).} Table \ref{table_ablation} shows that different absolute learning modules help improve the performance on \textit{mini}Imagenet. SoSN with the attribute predictor ({\em SoSN-AL}) achieves the best performance of $55.61$\% on 1-shot and $71.03$\% (5-shot). Table \ref{table_ablation} shows that applying multiple absolute learning modules does not always further improve the accuracy. The attribute-based predictor ({\em att.}) also works the best among all variants on CUB-200-2011 and Flower102. For instance, SoSN with the attribute-based predictor achieves $2.1\%$ and $3.3\%$ improvements on CUB-200-2011, and $2.4\%$ and $2.1\%$ improvement on Flower102 for 1- and 5-shot protocols, respectively. We note that the class predictor ({\em cls.}) does not work well on the fine-grained classification datasets. \begin{figure}[t] \vspace{-0.2cm} \centering \includegraphics[width=\linewidth]{images/arl-ablation.pdf} \vspace{-0.7cm} \caption{Ablations on $\alpha, \beta, \gamma$ for SoSN \cite{sosn} and RN \cite{sung2017learning} in the supervised setting. These evaluations are just an illustration as we tune parameters on the validation splits via the HyperOpt package.} \vspace{-0.1cm} \label{fig:plot} \end{figure} \section{Conclusions} In this paper, we have demonstrated that binary labels commonly used in few-shot learning cannot capture complex class relations well, leading to inferior results. Thus, we have introduced semantic annotations to aid the modeling of more realistic class relations during network training. Moreover, we have proposed a novel Absolute-relative Learning (ArL) paradigm which combines the similarity learning with the concept learning, and we extend ArL to unsupervised FSL. This surprisingly simple strategy appears to work well on all datasets in both supervised and unsupervised settings, and it perhaps resembles a bit more closely the human learning processes. In contrast to multi-modal learning, we only use semantic annotations as labels in training, and do not use them during testing. Our proposed approach achieves the state-of-the-art performance on all few-shot learning protocols. \vspace{0.1cm} \noindent\textbf{Acknowledgements.} This work is in part supported by the Equipment Research and Development Fund (no. ZXD2020C2316), NSF Youth Science Fund (no. 62002371), the ANU VC's Travel Grant and CECS Dean's Travel Grant (H. Zhang's stay at the University of Oxford). \begin{appendices} \section{Additional results in unsupervised setting.} Below we supplement additional results in the unsupervised setting on two popular datasets, \textit{tiered--}Imagenet and OpenMIC. \vspace{0.05cm} \noindent\textbf{\textit{tiered--}Imagenet} consists of 608 classes from ImageNet. We follow the protocol that uses 351 base classes, 96 validation classes and 160 novel test classes. \vspace{0.05cm} \noindent\textbf{Open MIC} is the Open Museum Identification Challenge (Open MIC) \cite{me_museum}, a recent dataset with photos of various museum exhibits, \emph{e.g.}~paintings, timepieces, sculptures, glassware, relics, science exhibits, natural history pieces, ceramics, pottery, tools and indigenous crafts, captured from 10 museum spaces according to which this dataset is divided into 10 subproblems. In total, it has 866 diverse classes and 1--20 images per class. Following the setup in SoSN, we combine ({\em shn+hon+clv}), ({\em clk+gls+scl}), ({\em sci+nat}) and ({\em shx+rlc}) into subproblems {\em p1}, $\!\cdots$, {\em p4}, and form 12 possible pairs in which subproblem $x$ is used for training and $y$ for testing (x$\rightarrow$y). \begin{table}[t] \centering \caption{\small Top-1 accuracy on the novel test classes of the \textit{tiered--}Imagenet dataset (5-way acc. given). Note that `U-' variants do not use class labels during learning at all.} \label{table_tiered} \makebox[\linewidth]{ \fontsize{8}{9}\selectfont \begin{tabular}{lcc} \toprule Model & 1-shot & 5-shot \\ \hline \textit{$\text{MAML}$} & $51.67 \pm 1.81$ & $70.30 \pm 0.08$ \\ \textit{$\text{Prototypical Net}$} & $53.31 \pm 0.89$ & $72.69 \pm 0.74$ \\ \textit{$\text{Relation Net}$} & $54.48 \pm 0.93$ & $71.32 \pm 0.78$ \\ \textit{$\text{SoSN}$} & $58.62 \pm 0.92$ & $75.19 \pm 0.79$ \\ \hline \textit{\text{Pixel (Cosine)}} & $27.13 \pm 0.94$ & $32.35 \pm 0.76$ \\ \textit{\text{BiGAN($k_{nn}$)}} & $29.65 \pm 0.92$ & $34.08 \pm 0.75$ \\ \textit{$\text{U-RN}$} & $37.23 \pm 0.94$ & $49.54 \pm 0.83$ \\ \textit{$\text{U-PN}$} & $38.83 \pm 0.92$ & $50.64 \pm 0.81$ \\ \textit{$\text{U-SoSN}$} & ${42.07 \pm 0.92}$ & ${56.21 \pm 0.76}$ \\ \textit{$\text{U-SoSN} + ArL$} & $\mathbf{43.68 \pm 0.91}$ & $\mathbf{58.56 \pm 0.74}$ \\ \bottomrule \end{tabular}} \end{table} } \begin{table}[t] \centering \caption{Ablation studies re. the impact of absolute and relative learning modules given \textit{mini}Imagenet dataset (5-way acc. with Conv-4 backbone given). We denote the same/different class relation as ({\em bin.}), attribute-based labels (relative and absolute) as ({\em att.}), {\em word2wec} embedding (relative and absolute) as ({\em w2v.}) and absolute class labeling as ({\em cls.}) RL and AL are Absolute and Relative Learners.} \vspace{-0.3cm} \label{table_ablation} \makebox[\linewidth]{ \setlength{\tabcolsep}{1em} \renewcommand{\arraystretch}{1} \fontsize{9}{9}\selectfont \begin{tabular}{lcc} \toprule Model & 1-shot & 5-shot \\ \hline & \multicolumn{2}{c}{Relative Learning} \\ \hline \textit{RelationNet-RL(w2v.)} & $\mathbf{53.20}$ & $66.21$ \\ \textit{RelationNet-RL(att.)} & $52.38$ & $\mathbf{66.74}$ \\ \textit{RelationNet-RL(bin. + att. + w2v.)} & $52.38$ & $66.73$ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SoSN-RL(w2v.)} & $54.31$ & $69.64$ \\ \textit{SoSN-RL(att.)} & $54.49$ & $70.21$ \\ \textit{SoSN-RL(bin. + att. + w2v.)} & $\mathbf{55.49}$ & $\mathbf{70.86}$ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SalNet-RL(w2v.)} & $58.15$ & $72.45$ \\ \textit{SalNet-RL(att.)} & $58.43$ & $72.91$ \\ \textit{SalNet-RL(bin. + att. + w2v.)} & $\mathbf{58.67}$ & $\mathbf{73.01}$ \\ \hline & \multicolumn{2}{c}{Absolute Learning} \\ \hline \textit{Relation Net-AL(cls.)} & $51.41$ & $66.01$\\ \textit{Relation Net-AL(att.)} & $52.35$ & $66.53$\\ \textit{Relation Net-AL(w2v.)} & $\mathbf{52.67}$ & $\mathbf{66.91}$\\ \textit{Relation Net-AL(cls.+att.+w2v.)} & $52.30 $ & $66.51 $ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{SoSN-AL(cls.)} & $55.12$ & $70.91$\\ \textit{SoSN-AL(att.)} & $\mathbf{55.61}$ & $\mathbf{71.03}$\\ \textit{SoSN-AL(w2v.)} & $54.78$ & $70.85$\\ \textit{SoSN-AL(cls.+att.+w2v.)} & $55.40 $ & $71.02 $ \\ \arrayrulecolor{black} \cdashline{1-3}[1pt/3pt] \textit{Salnet-AL(cls.)} & $57.98$ & $72.56$\\ \textit{SalNet-AL(att.)} & $\mathbf{58.94}$ & $\mathbf{73.12}$\\ \textit{SalNet-AL(w2v.)} & $58.36$ & $72.96$\\ \textit{SalNet-AL(cls.+att.+w2v.)} & $58.41 $ & $73.05 $ \\ \bottomrule \end{tabular}} \end{table} \begin{table*}[!h] \centering \caption{Evaluations on the Open MIC dataset (Protocol I) (given 5-way 1-shot learning accuracies). Note that the {` U-'} variants do not use class labels during learning at all.} \label{table_openmic} \makebox[\linewidth]{ \renewcommand{\arraystretch}{1} \fontsize{8}{9}\selectfont \begin{tabular}{lcccccccccccc} \toprule Model & $p1\!\!\rightarrow\!p2$ & $p1\!\!\rightarrow\!p3$& $p1\!\!\rightarrow\!p4$& $p2\!\!\rightarrow\!p1$& $p2\!\!\rightarrow\!p3$ &$p2\!\!\rightarrow\!p4$& $p3\!\!\rightarrow\!p1$& $p3\!\!\rightarrow\!p2$& $p3\!\!\rightarrow\!p4$& $p4\!\!\rightarrow\!p1$& $p4\!\!\rightarrow\!p2$& $p4\!\!\rightarrow\!p3$\\ \hline \textit{Relation Net} & $71.1$ & $53.6$ & $63.5$ & $47.2$ & $50.6$ & $68.5$ & $48.5$ & $49.7$ & $68.4$ & $45.5$ & $70.3$ & $50.8$\\ \textit{SoSN} & $81.4$ & ${65.2}$ & ${75.1}$ & ${60.3}$ & ${62.1}$ & ${77.7}$ & ${61.5}$ & ${82.0}$ & ${78.0}$ & ${59.0}$ & ${80.8}$ & ${62.5}$\\ \arrayrulecolor{black} \cdashline{1-13}[1pt/3pt] \it Pixle (Cosine) & ${56.8}$ & ${40.4}$ & ${57.5}$ & ${33.3}$ & ${35.1}$ & ${46.1}$ & ${32.3}$ & ${44.6}$ & ${45.9}$ & ${33.5}$ & ${50.1}$ & ${34.6}$\\ \it \text{BiGAN($k_{nn}$)} & ${59.9}$ & ${43.2}$ & ${60.3}$ & ${37.1}$ & ${38.6}$ & ${50.2}$ & ${37.6}$ & ${48.2}$ & ${47.5}$ & ${38.1}$ & ${55.0}$ & ${37.8}$\\ \it U-RN & ${70.3}$ & ${50.3}$ & ${64.1}$ & ${42.9}$ & ${48.2}$ & ${61.1}$ & ${53.2}$ & ${59.1}$ & ${55.7}$ & ${48.5}$ & ${68.3}$ & $45.2$\\ \it U-PN & ${70.1}$ & ${49.7}$ & ${64.4}$ & ${43.3}$ & ${47.9}$ & ${60.8}$ & ${52.8}$ & ${59.4}$ & ${56.2}$ & ${49.1}$ & ${68.8}$ & $44.9$\\ \it U-SoSN & ${78.6}$ & ${58.8}$ & ${74.3}$ & ${61.1}$ & ${57.9}$ & ${72.4}$ & ${62.3}$ & ${75.6}$ & ${73.7}$ & ${58.5}$ & ${76.5}$ & $54.6$\\ \it U-SoSN + ArL & $\textbf{80.2}$ & $\textbf{59.7}$ & $\textbf{76.1}$ & $\textbf{62.8}$ & $\textbf{59.6}$ & $\textbf{74.4}$ & $\textbf{64.2}$ & $\textbf{78.4}$ & $\textbf{75.2}$ & $\textbf{60.1}$ & $\textbf{79.2}$ & $\textbf{57.3}$\\ \bottomrule \end{tabular}} \end{table*} \vspace{0.05cm} \noindent\textbf{Results on tiered-Imagenet.} Table \ref{table_tiered} shows that our proposed unsupervised few-shot learning strategy achieves strong results of 42.31\% and 57.21\% accuracy for 1- and 5-shot learning protocols. Though it does not outperform the recent supervised works, the performance of many prior works is not provided for this recent dataset. In general, we believe that our ArL approach boosts unsupervised learning and our unsupervised learning yields reasonable accuracy given no training labels being used in this process at all. \vspace{0.05cm} \noindent\textbf{Results on Open MIC.} This dataset has very limited (3-15) images for both base and novel classes, which highlights its difference to \textit{mini}Imagenet and \textit{tiered-}Imagenet whose base classes consist of hundreds of images. Table \ref{table_openmic} shows that our unsupervised variant of Second-order Similarity Network, U-SoSN with $224\times224$ res. images outperforms the supervised SoSN on all evaluation protocols. Even without high-resolution training images, our U-SoSN outperforms the supervised SoSN on many data splits. This observation demonstrates that our unsupervised relation learning is beneficial and practical in case of very limited numbers of training images where the few-shot learning task is closer to the retrieval setting (in Open MIC, images of each exhibit constitute on one class). Most importantly, combining ArL with unsupervised SoSN boosts results further by up to 4\%. { \section{Ablation study on absolute and relative learners.} Table \ref{table_ablation} (\textit{mini}Imagenet as example) illustrates that the semantic relation learner enhanced performance on Relation Net\cite{sung2017learning}, SoSN\cite{sosn} and SalNet\cite{salnet}. The results in the table indicate that the performance of few-shot similarity learning can be improved by employing the semantic relation labels at the training stage. For instance, SoSN with attribute soft label ({\em att.}) achieves $0.6\%$ and $1.7\%$ improvements for 1- and 5-shot compared to the baseline ({\em SoSN}). Table \ref{table_ablation} also demonstrates the ablation studies for absolute learning. It can be seen from the table that the attribute predictor works the best among all options except for SoSN, and applying multiple Absolute Learning modules does not further improve the accuracy. We expect that attributes are a clean form of labels in contrast to {\em word2vec} and very complementary to class labels {\em cls.} } \section{Remaining experimental details.} For augmentations, we randomly apply resized crop (scale 0.6--1.0, ratio 0.75--1.33), horizontal+vertical flips, rotations ($0$--$360^{\circ}$), and color jitter. Annotated per class attribute vectors ({\em mini}Imagenet) have 31 attributes (5 environments, 10 colors, 7 shapes, 9 materials). For augmentation keys, taking rotation as example, we set a 4-bit degree to annotate random rotations, '0001' refers to rotations with $0\sim90^{\circ}$, '0010' refers to rotations with $90\sim180^{\circ}$. \end{appendices} {\small \bibliographystyle{ieee_fullname}
\section{Introduction} \label{sec:introduction} In the recently released \textit{Fermi}-LAT{} 4FGL 8--year point source catalog \citep{Fermi-4FGL-2019-ARXIV}, nearly $70\%$ of the objects are associated with a known astrophysical object. Of these associated sources, the majority are classified as blazars: either of type BL Lac ($\ssim22\%$) or blazar, classification unknown ($\ssim23\%$). Additionally, Flat Spectrum Radio Quasars (FSRQs) account for $\ssim13\%$ of the associated point sources in the 4FGL. Less than $1\%$ of all 4FGL sources are associated with radio galaxies. According to the unified model of active galactic nuclei (AGN) \citep{Urry:1995aa}, radio galaxies are radio--loud AGN that have jets beamed at large inclination angles with respect to the observer's line of sight, and are therefore sometimes termed misaligned blazars. Unlike blazars, therefore, the non-thermal radiation emitted by radio galaxies is only modestly beamed \citep{Rieger:2017}. Thus radio galaxies are very interesting targets because any detected $\gamma$-ray{} signal from these AGN is not dominated by the highly beamed jet emission, meaning it might be possible to disentangle jet and core emission or even to detect other potential sources of $\gamma$-ray{} emission. The nearby, well-studied and (on \textit{Fermi}-LAT{} timescales) non-variable object Centaurus\,A (Cen\,A) is an obvious target to search for emission which does not originate in the jet. A study of \cite{Brown-2017-PhRvD} revealed evidence for a new population of energetic particles near Cen\,A's core. This evidence was manifested as a statistically significant ($\mathrm{>5 \sigma}$) hardening in the Fermi-LAT $\gamma$-ray{} spectrum, with the spectral index changing from $\mathrm{\Gamma = 2.73~\pm~0.02}$ to $\mathrm{\Gamma = 2.29~\pm~0.07}$ at a break energy of $\mathrm{2.6~\pm~0.3}$ GeV. The study of Cen\,A{} was motivated by a possible mechanism for the origin of the most energetic cosmic rays (CRs) in AGN. Such CRs extend to energies beyond $\mathrm{>10^{20} eV}$, making it difficult to explain the energy spectrum if CRs represent an accelerated thermal population. To solve this problem it might be possible to use dark matter (DM) annihilations as a source of non-thermal particles that can be further accelerated in astrophysical shocks. These shock--accelerated particles should produce a power-law spectrum for all energies, and the DM annihilation should produce a spectrum with a cut-off at the DM particle mass. The combination of these two effects should result in a characteristic spectrum \citep{Lacroix-2014-PhysRevD}. The lack of variability in Cen\,A{}'s emission ruled out the possibility of jet-induced leptonic processes being responsible for the spectral feature and it was found that the $\gamma$-ray spectrum of Cen\,A{} was compatible with a very large localized enhancement (i.e. a spike) in the DM halo profile \citep{Brown-2017-PhRvD}. However, it was noted that a population of unresolved millisecond pulsars or another population of energetic particles could also be responsible for the emission above 2.6\,GeV. Recent results from the H.E.S.S. telescopes have resolved the emission above 100\,GeV, and suggest that the highest-energy emission from Cen\,A{} comes from a small, inner jet close to Cen\,A's core (\cite{Sanchez-TeVPA-2018}; \cite{HESS-CenA-2018AA}), which could well be the source of the population of energetic particles postulated in \cite{Brown-2017-PhRvD}. The discovery of a spectral hardening of Cen\,A{}'s $\gamma$-ray spectrum provides the motivation to look at other radio galaxies detected with \textit{Fermi}-LAT{} in order to search for similar spectral features. This work describes our analysis of a selection of such radio galaxies. In Section \ref{sec:observations} we highlight the \textit{Fermi}-LAT{} observations used, our radio galaxy selection criteria, and the data analysis methods employed. In Section \ref{sec:results} we focus on the results of our \textit{Fermi}-LAT{} analysis before discussing possible interpretations of our findings in Section \ref{sec:interpretation}. \section{\textit{Fermi}-LAT{} observations and data analysis} \label{sec:observations} The Large Area Telescope [LAT; \cite{Atwood:2009apj}] aboard the NASA \textit{Fermi} $\gamma$-ray{} Space Telescope is a wide--field pair conversion telescope sensitive to $\gamma$-rays{} over the approximate energy range $\mathrm{30~MeV \leqslant E \leqslant 300~GeV}$. The \textit{Fermi}-LAT{} was launched from the Kennedy Space Center on June 11, 2008 and started conducting science operations on 11th August 2008; it has thus recently celebrated 11 years of near uninterrupted service. The great majority of data taken by \textit{Fermi}-LAT{} during this time has been in all-sky-survey mode. This observing mode scans the entire sky every $\mathord{\sim} 180$ minutes and has produced the deepest extragalactic scan ever at $\gamma$-ray{} energies. \subsection{Radio galaxy selection} \label{subsec:rg-selection} The 26 radio galaxies selected and listed in Table \ref{table:one} are those identified and categorized as radio galaxies in the \textit{Fermi}-LAT{} 4FGL catalog \citep{Fermi-4FGL-2019-ARXIV}, excluding four well--studied, nearby radio galaxies: M\,87, the Perseus cluster galaxies NGC\,1275 and IC\,310, all of which have been found to exhibit significant flux variability at $\gamma$-ray energies (\citep{AitBenkhali-2019-AA,Brown-2011-MNRAS,Aleksic-2014-Sci} respectively) and Cen\,A \citep{Brown-2017-PhRvD}. We have included PKS\,0625-35 in the list of selected radio galaxies; however, as discussed in a recent paper \citep{Abdalla-2018-MNRAS}, there is evidence to suggest that this galaxy could be a BL Lac object and thus its classification as a ``misaligned blazar'' may need to be reconsidered. The majority of the radio galaxies in our study are classified as having a Fanaroff-Riley type I (FR\,I) morphology \citep{Fanaroff:1974aa}; there are 6 Fanaroff-Riley type 2 (FR\,II) galaxies, and one compact radio galaxy (FR\,0). Our selection does not, of course, represent a complete list of radio galaxies detected above $\mathrm{20\ MeV}$, as there is always the possibility that some of the $1500+$ unassociated sources in the 4FGL catalog may be radio galaxies. \begin{table*} \footnotesize \begin{tabular}{| l | l | r | r | r | l | r | r |} \hline \textit{Fermi}-LAT{} name & Assoc. name & \textit{l} (deg.) & \textit{b} (deg.) & z & Morphology & Variability index & $\sigma$ ($\sqrt{TS}$) \\ \hline 4FGL J0322.6-3712e & Fornax\,A & 240.16 & -56.68 & 0.0059 & FR I & 36.5 & 16.99 \\ \hline 4FGL J0057.7+3023 & NGC\,315 & 124.56 & -32.49 & 0.0164 & FR II & 21.0 & 9.03 \\ \hline 4FGL J0708.9+4839 & NGC\,2329 & 168.57 & 22.79 & 0.0197 & - & 4.0 & 7.23 \\ \hline 4FGL J0334.3+3920 & 4C\,+39.12 & 154.16 & -13.43 & 0.0203 & FR 0 & 20.1 & 8.81 \\ \hline 4FGL J1144.9+1937 & $\mathrm{3C\,264\dagger}$ & 235.72 & +73.03 & 0.0216 & FR I & 66.5 & 11.38 \\ \hline 4FGL J0931.9+6737 & NGC\,2892 & 145.14 & +39.87 & 0.0226 & - & 45.9 & 16.76 \\ \hline 4FGL J1630.6+8234 & NGC\,6251 & 115.76 & +31.19 & 0.0239 & FR I & 39.7 & 38.33 \\ \hline 4FGL J0009.7-3217 & IC\,1531 & 2.39 & -32.27 & 0.0256 & - & 38.1 & 7.46 \\ \hline 4FGL J2156.0-6942 & PKS\,2153-69 & 321.31 & -40.6 & 0.0280 & - & 22.2 & 8.80 \\ \hline 4FGL J0308.4+0407 & NGC\,1218 & 174.85 & -44.51 & 0.0288 & FR I & 49.1 & 20.15 \\ \hline 4FGL J1449.5+2746 & B2\,1447+27 & 41.25 & 63.87 & 0.0308 & - & 7.4 & 5.30 \\ \hline 4FGL J0433.0+0522 & 3C\,120 & 190.37 & -27.39 & 0.0336 & FR I & 306.8 & 24.56 \\ \hline 4FGL J0519.6-4544 & Pictor\,A & 251.59 & -34.63 & 0.0340 & FR II & 10.7 & 10.59 \\ \hline 4FGL J0758.7+3746 & NGC\,2484 & 182.67 & +28.82 & 0.0408 & FR I & 10.3 & 4.80 \\ \hline 4FGL J1454.1+1622 & IC\,4516 & 223.59 & +16.35 & 0.0452 & FR II & 73.3 & 13.71 \\ \hline 4FGL J0418.2+3807 & 3C\,111 & 161.67 & -08.81 & 0.0485 & FR II & 89.9 & 19.07 \\ \hline 4FGL J2341.8-2917 & PKS\,2338-295 & 355.36 & -29.31 & 0.0523 & - & 38.1 & 6.63 \\ \hline 4FGL J1516.5+0015 & PKS\,1514+00 & 1.38 & 45.98 & 0.0526 & FR II & 17.9 & 8.73 \\ \hline 4FGL J0627.0-3529 & $\mathrm{\operatorname{PKS\,0625-35}\dagger}$ & 243.45 & -19.96 & 0.0562 & FR I & 42.7 & 33.65 \\ \hline 4FGL J1306.3+1113 & TXS\,1303+114 & 316.05 & 73.71 & 0.0857 & FR I & 7.6 & 4.95 \\ \hline 4FGL J1518.6+0614 & TXS\,1516+064 & 8.86 & 49.25 & 0.1021 & FR I & 6.3 & 6.49 \\ \hline 4FGL J1843.4-4835 & PKS\,1839-48 & 347.17 & -18.72 & 0.1112 & FR I & 15.0 & 6.15\\ \hline 4FGL J1306.7-2148 & PKS\,1304-215 & 307.62 & 40.92 & 0.1260 & - & 22.8 & 11.85 \\ \hline 4FGL J2302.8-1841 & PKS\,2300-18 & 45.89 & -63.71 & 0.1289 & - & 18.0 & 9.44 \\ \hline 4FGL J1443.1+5201 & 3C\,303 & 90.52 & +57.50 & 0.1412 & FR II & 22.2 & 7.38 \\ \hline 4FGL J2326.9-0201 & PKS\,2324-02 & 351.72 & -02.03 & 0.1880 & - & 35.8 & 6.32 \\ \hline \end{tabular} \caption{Details of the radio galaxies analyzed in this study including their \textit{Fermi}-LAT{} variability index and detection significance (obtained in this work). The radio galaxies were selected using the \textit{Fermi}-LAT{} 4FGL catalog and are ordered by increasing redshift (z). A variability index $\mathrm{> 39.7}$ indicates a $\mathrm{< 1 \%}$ chance of being a steady source. The two TeV-detected radio galaxies are highlighted with a $\mathrm{\dagger}$.} \label{table:one} \end{table*} \subsection{Data analysis} \label{subsec:data-analysis} Roughly 10 years worth of \textit{Fermi}-LAT{} data were used for each target. The exact exposure spans MJD 54682.65527778 through to and including MJD 58362.0, which is equivalent to 317895388 \textit{Fermi}-LAT{} seconds, 3679.34 \textit{Fermi}-LAT{} days or 10.08 \textit{Fermi}-LAT{} years. We consider photons with energies between $\mathrm{0.1 - 300\,GeV}$ within a $\mathrm{15^{\circ}}$ circular region of interest (ROI) centred on each radio galaxy target. These photons were obtained from \textit{Fermi}-LAT{} sky-survey observations in accordance with the \textsc{pass8} data analysis criteria. The \textit{Fermi}-LAT{} recommended quality cuts were used, including a zenith angle cut of $\mathrm{90^{\circ}}$ (to reduce $\gamma$-ray{} contamination originating from the Earth's limb), \texttt{(DATA\_QUAL>0)\&\&(LAT\_CONFIG==1)} and \texttt{abs}(\texttt{rock\_angle})$\mathrm{\,<52}$. We used the open--source \texttt{Python} package \texttt{Fermipy} \citep{Wood-Fermipy-2017-ICRC} to facilitate analysis of \textit{Fermi}-LAT{} data with the \textit{Fermi}-LAT{} \texttt{Fermitools} (v1.0.1). The analysis used the \texttt{P8R3$\_$SOURCE$\_$V2} instrument response function and adopted the binned maximum-likelihood method \citep{Mattox:1996apj}. To estimate the background, we included sources within the region of interest (ROI) listed in the 4FGL catalog \citep{Fermi-4FGL-2019-ARXIV} along with the recommended Galactic (\texttt{gll$\_$iem$\_$v07.fits}) and isotropic diffuse (\texttt{iso$\_$P8R3$\_$SOURCE$\_$V2$\_$v1.txt}) templates provided with the \texttt{Fermitools}. Since our study considered 10 years of \textit{Fermi}-LAT{} observations, we must search for additional point sources of $\gamma$-rays{} not accounted for by the 8-year integrated catalogue of the 4FGL. To do this, we used the \texttt{find\_sources} algorithm in \texttt{Fermipy} to construct a significance map centred on each radio galaxy candidate\footnote{The significance map was constructed assuming a point source with an $E^{-2}$ spectrum.}. This TS map was used to identify additional point sources of $\gamma$-rays, with $\mathrm{TS\geqslant25}$, that were not accounted for in our initial model. These new point sources were modelled using a power-law fixed at the location ($\alpha_{J2000}$, $\beta_{J2000}$) of the peak excess, and a final likelihood fit was performed with the normalisation and spectral index of the new point sources free to vary. \section{results} \label{sec:results} Once all sources of $\gamma$-rays were accounted for in our data, we conducted temporal and spectral studies for all 26 radio galaxies considered in our research. For each, we produced a spectral energy distribution (SED); these are shown in Figures \ref{fig:seds-setA} and \ref{fig:seds-setB}. The SED flux points are generated using a separate likelihood analysis for each equally--spaced logarithmic energy bin. For each target we initially used 8 bins per decade, but then rebinned the flux data into a binning scheme of 2 bins per decade. Each spectral bin requires a statistical significance above background as defined by the test statistic, TS \footnote{Defined as twice the difference between the log-likelihoods of two different models, $2[logL- logL_0]$, where $L$ and $L_0$ are defined as the likelihoods of individual model fits \citep{Mattox:1996apj}.}, such that $\mathrm{\sqrt{TS} \geqslant 2 \sigma}$, and a minimum number of $\gamma$-ray{} photons above background of $\mathrm{\gamma \geqslant 2}$; otherwise a $\mathrm{95\%}$ confidence--level upper limit is calculated. For each SED we also calculate and show the $\mathrm{1\sigma}$ uncertainty band. For each radio galaxy we initially only considered the spectral model given in the 4FGL catalogue as a description of the high-energy $\gamma$-ray{} emission. In the NGC\,1218 SED (Figure \ref{fig:seds-setB}) we see some tension between a power-law model description and the highest energy bin upper limit. As a result we also considered a log-parabola model for NGC\,1218, and find that with a test statistic value of 235 between the log-parabola and power-law models, the fit significantly improves and hence we discard the initial power-law model. \begin{figure*} \centering \captionbox[Text]{Spectral energy distributions obtained for the radio galaxies: 3C\,311, 3C\,120, 3C\,264, 3C\,303, 4C\,+39.12, B2\,1447+27, Fornax\,A and IC\,1531. Apart from 3C\,120, all the radio galaxy SEDs in this subset are best-fitted with a simple power-law model. The binning scheme is 2 bins per decade and a $\mathrm{95\%}$ confidence--level upper limit is shown for bins where $\mathrm{\sqrt{TS} < 2 \sigma}$ and the number of $\gamma$-ray{} photons above background in each bin is $\mathrm{\gamma < 2}$. \label{fig:seds-setA}}{% \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-SEDs-4FGL-Rulten-setA-withSigmaLegend-ALL.pdf} } \end{figure*} \begin{figure*} \centering \captionbox[Text]{Spectral energy distributions obtained for the radio galaxies IC\,4516, NGC\,1218, NGC\,2329, NGC\,2484, NGC\,2892, NGC\,315, NGC\,6251 and PKS\,0625-35. Apart from NGC\,1218 and NGC\,6251, all the radio galaxy SEDs in this subset are best-fitted with a simple power-law model. The binning scheme is 2 bins per decade and a $\mathrm{95\%}$ confidence--level upper limit is shown for bins where $\mathrm{\sqrt{TS} < 2 \sigma}$ and the number of $\gamma$-ray{} photons above background in each bin is $\mathrm{\gamma < 2}$. \label{fig:seds-setB}}{% \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-SEDs-4FGL-Rulten-setB-withSigmaLegend-ALL.pdf} } \end{figure*} \begin{figure*} \centering \captionbox[Text]{Spectral energy distributions obtained for the radio galaxies PKS\,1304-215, PKS\,1514+00, PKS\,1839-48, PKS\,2153-69, PKS\,2300-18, PKS\,2324-2, PKS\,2338-295, Pictor\,A, TXS\,1303+114 and TXS\,1516+064. Apart from PKS\,2153-69, all the radio galaxy SEDs in this subset are best-fitted with a simple power-law model. The binning scheme is 2 bins per decade and a $\mathrm{95\%}$ confidence--level upper limit is shown for bins where $\mathrm{\sqrt{TS} < 2 \sigma}$ and the number of $\gamma$-ray{} photons above background in each bin is $\mathrm{\gamma < 2}$. \label{fig:seds-setC}}{% \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-SEDs-4FGL-Rulten-setC-withSigmaLegend-ALL.pdf} } \end{figure*} \begin{table*} \footnotesize \begin{tabular}{| l | l | r | r | r | r |} \hline \textit{Fermi}-LAT{} name & Assoc. name & $\mathrm{N_{0}}$ ($\mathrm{cm^{-2} \enskip s^{-1} \enskip MeV^{-1}}$) & Index ($\Gamma$) & $\mathrm{E_{0}}$ (MeV) & $\mathrm{E_{pivot}}$ (MeV) \\ \hline 4FGL J0418.2+3807 & 3C 111 & $\text{(}7.39 \pm 0.46\text{)} \times 10^{-12}$ & $-2.75 \pm 0.05$ & 532.8 & 300.0 \\ \hline 4FGL J1144.9+1937 & 3C 264 & $\text{(}2.84 \pm 0.39\text{)} \times 10^{-14}$ & $-1.90 \pm 0.10$ & 3216.4 & 3601.2 \\ \hline 4FGL J1443.1+5201 & 3C 303 & $\text{(}1.22 \pm 0.24\text{)} \times 10^{-14}$ & $-1.94 \pm 0.14$ & 3426.4 & 3250.7 \\ \hline 4FGL J0334.3+3920 & 4C +39.12 & $\text{(}7.90 \pm 1.48\text{)} \times 10^{-15}$ & $-1.75 \pm 0.13$ & 5679.6 & 6777.7 \\ \hline 4FGL J1449.5+2746 & B2 1447+27 & $\text{(}7.23 \pm 2.49\text{)} \times 10^{-16}$ & $-1.40 \pm 0.20$ & 11380.8 & 13137.0 \\ \hline 4FGL J0322.6-3712e & Fornax A & $\text{(}2.02 \pm 0.15\text{)} \times 10^{-13}$ & $-2.11 \pm 0.06$ & 1762.5 & 1396.5 \\ \hline 4FGL J0009.7-3217 & IC 1531 & $\text{(}6.88 \pm 1.22\text{)} \times 10^{-14}$ & $-2.2 \pm 0.13$ & 1692.2 & 1440.7 \\ \hline 4FGL J1454.1+1622 & IC 4516 & $\text{(}6.76 \pm 0.63\text{)} \times 10^{-13}$ & $-2.31 \pm 0.07$ & 922.3 & 1073.6 \\ \hline 4FGL J0708.9+4839 & NGC 2329 & $\text{(}6.32 \pm 1.52\text{)} \times 10^{-15}$ & $-1.69 \pm 0.15$ & 4693.8 & 7416.6 \\ \hline 4FGL J0758.7+3746 & NGC 2484 & $\text{(}9.88 \pm 2.82\text{)} \times 10^{-15}$ & $-1.96 \pm 0.17$ & 3421.0 & 3346.8 \\ \hline 4FGL J0931.9+6737 & NGC 2892 & $\text{(}2.40 \pm 0.19\text{)} \times 10^{-13}$ & $-2.23 \pm 0.06$ & 1459.5 & 1205.1 \\ \hline 4FGL J0057.7+3023 & NGC 315 & $\text{(}2.56 \pm 0.35\text{)} \times 10^{-13}$ & $-2.31 \pm 0.11$ & 1124.0 & 1158.9 \\ \hline 4FGL J0627.0-3529 & PKS 0625-35 & $\text{(}2.32 \pm 0.11\text{)} \times 10^{-13}$ & $-1.88 \pm 0.04$ & 2337.5 & 2215.6 \\ \hline 4FGL J1306.7-2148 & PKS 1304-215 & $\text{(}9.91 \pm 1.16\text{)} \times 10^{-14}$ & $-2.20 \pm 0.08$ & 2151.2 & 1640.5 \\ \hline 4FGL J1516.5+0015 & PKS 1514+00 & $\text{(}8.55 \pm 1.13\text{)} \times 10^{-13}$ & $-2.43 \pm 0.10$ & 744.0 & 852.7 \\ \hline 4FGL J1843.4-4835 & PKS 1839-48 & $\text{(}1.09 \pm 0.27\text{)} \times 10^{-14}$ & $-1.78 \pm 0.16$ & 3893.3 & 6115.0 \\ \hline 4FGL J2302.8-1841 & PKS 2300-18 & $\text{(}8.58 \pm 1.22\text{)} \times 10^{-14}$ & $-2.10 \pm 0.09$ & 1788.0 & 1530.9 \\ \hline 4FGL J2341.8-2917 & PKS 2338-295 & $\text{(}7.56 \pm 1.47\text{)} \times 10^{-14}$ & $-2.33 \pm 0.15$ & 1548.7 & 1157.3 \\ \hline 4FGL J0519.6-4544 & Pictor A & $\text{(}1.72 \pm 0.23\text{)} \times 10^{-13}$ & $-2.37 \pm 0.10$ & 1462.0 & 1397.7 \\ \hline 4FGL J2326.9-0201 & PKS 2324-02 & $\text{(}1.70 \pm 0.36\text{)} \times 10^{-13}$ & $-2.21 \pm 0.13$ & 1215.0 & 2048.4 \\ \hline 4FGL J1306.3+1113 & TXS 1303+114 & $\text{(}7.06 \pm 2.16\text{)} \times 10^{-15}$ & $-2.24 \pm 0.19$ & 4187.4 & 1604.0 \\ \hline 4FGL J1518.6+0614 & TXS 1516+064 & $\text{(}3.75 \pm 1.11\text{)} \times 10^{-15}$ & $-1.59 \pm 0.19$ & 5831.5 & 10929.7 \\ \hline \end{tabular} \caption{Details of the power-law models best fitted to the radio galaxy SEDs.}. \label{table:two} \end{table*} \begin{table*} \footnotesize \begin{tabular}{| l | l | r | r | r | r | r | r |} \hline \textit{Fermi}-LAT{} name & Assoc. name & $\mathrm{N_{0}}$ ($\mathrm{cm^{-2} \enskip s^{-1} \enskip MeV^{-1}}$) & Index ($\alpha$) & Curvature ($\beta$) & $\mathrm{E_{0}}$ (MeV) & $\mathrm{E_{pivot}}$ (MeV) \\ \hline 4FGL J0433.0+0522 & 3C 120 & $ \text{(}14.8 \pm 0.86 \text{)} \times 10^{-12}$ & $2.55 \pm 0.07$ & $0.23 \pm 0.05$ & 445.8 & 366.8 \\ \hline 4FGL J0308.4+0407 & NGC 1218 & $ \text{(}7.27 \pm 0.78 \text{)} \times 10^{-13}$ & $1.76 \pm 0.10$ & $0.07 \pm 0.03$ & 1000.0 & 2518.8 \\ \hline 4FGL J1630.6+8234 & NGC 6251 & $ \text{(}4.28 \pm 0.17 \text{)} \times 10^{-12}$ & $2.26 \pm 0.04$ & $0.08 \pm 0.02$ & 667.8 & 479.9 \\ \hline 4FGL J2156.0-6942 & PKS2153-69 & $ \text{(}5.68 \pm 0.91 \text{)} \times 10^{-12}$ & $2.57 \pm 0.23$ & $0.29 \pm 0.18$ & 368.8 & 295.5 \\ \hline \end{tabular} \caption{Details of the log-parabola model best fitted to the radio galaxy SEDs.}. \label{table:three} \end{table*} As can be seen in Figures \ref{fig:seds-setA}, \ref{fig:seds-setB}, \ref{fig:seds-setC} and \ref{fig:sed-cenA-3C264-4C3912}, the 10-year SEDs produced do not share the spectral features which were seen in Cen\,A{} \citep{Brown-2017-PhRvD}. Instead, the majority of radio galaxy SEDs are best fitted with a simple power-law model. The exceptions are 3C\,120, NGC\,1218, NGC\,6251 and PKS\,2152-69, which are best fitted with a log-parabola model. We also note that NGC\,2484, PKS\,1839-48, TXS\,1303+114 and TXS\,1516+064 have only 2 statistically significant spectral flux bins above background; unsurprisingly, these targets are amongst those with the lowest detection significances within this analysis. Both NGC 2484 and TXS\,1303+114 fall just below the accepted $\mathrm{5 \sigma}$ significance threshold in this 10-year dataset, and in both cases, their SEDs lack sufficient statistics across the full energy band to produce a reliable power-law fit. In most cases we detect no significant $\gamma$-ray{} excess above $\mathrm{30~GeV}$. The exceptions to this are 3C\,264, 4C\,+39.12, B2\,1447+27, Fornax\,A, NGC\,1218, NGC\,2329 and PKS\,0625-35. Two of these are detected at TeV energies: PKS\,0625-35 \citep{Abdalla-2018-MNRAS} and 3C\,264 \citep{Mukherjee-2018-ATel-11436}. Apart from Fornax\,A, these radio galaxies all exhibit fairly hard spectra over the energy band considered in this analysis. In addition, 3C\,264 and 4C\,+39.21 share very similar SED characteristics across the \textit{Fermi}-LAT{} energy band. Intriguingly, no significant $\gamma$-ray{} excess above background is detected for either of these two radio galaxies at energies below $\mathrm{1~GeV}$. Above $\mathrm{1~GeV}$ their flux brightness is similar and their spectral indices are hard (0.1 and 0.14 respectively in $\mathrm{E^{2}dN/dE}$ units), resulting in a significant $\gamma$-ray{} excess up to energies of $\mathrm{100~GeV}$. Given 3C 264 was recently detected by VERITAS at TeV energies \citep{Mukherjee-2018-ATel-11436}, perhaps there is potential for detecting 4C\,+39.12 at TeV energies too. If detected, it would be the lowest luminosity radio galaxy yet seen at TeV energies apart from IC\,310, a peculiar galaxy with somewhat uncertain classification \citep{Graham:2019mnras}. \begin{figure} \centering \includegraphics[width=0.5\textwidth]{figures/radio-galaxy-SEDs-4FGL-vs-CenA-DM.pdf} \caption{Shown here is a comparison of the SED shapes obtained for Cen\,A{} (blue dashed line) versus the best fitted power-law spectral shapes for the non-variable 4FGL radio galaxies analysed in this work (orange dashed lines). Also shown is the 1 sigma confidence bands obtained for Cen\,A{} (blue band) and the 4FGL radio galaxies (orange bands). It is clear that if there were any Cen\,A{}-like spectral features present in the sample of radio galaxies analysed, we would have seen them. We have also overlaid the power-law and DM models (see legend) used to describe the total Cen\,A{} emission \citep{Brown-2017-PhRvD} for the given DM particle mass and annihilation channel. Assuming the supermassive black holes of the 4FGL radio galaxies are of a similar mass scale to that of Cen\,A's, which implies that the total mass of DM in the 4FGL radio galaxies is similar to that of Cen\,A{}, we see no evidence of spectral hardening in the \textit{Fermi}-LAT{} energy band to warrant consideration of DM scenarios.} \label{fig:sed-cenA-3C264-4C3912} \end{figure} In addition to this spectral investigation, we also investigated the temporal characteristics by producing lightcurves for each radio galaxy studied. Relative to blazars, radio galaxies are weak $\gamma$-ray{} emitting sources and at the energies we are considering, \textit{Fermi}-LAT{} does not have the sensitivity performance to detect enough $\gamma$-ray{} photons for a well-sampled lightcurve at timescales under 6 months. Therefore we constructed lightcurves using 20 time bins with each bin comprising 180 days of \textit{Fermi}-LAT{} data covering the full 10 year observation period. The lightcurves were produced using a binned likelihood approach where the normalisation value for the radio galaxy of interest, all sources within 1 degree of the radio galaxy and the diffuse background were kept free to vary. For each time bin a flux is calculated over the full energy range $\mathrm{100\; MeV \leqslant E \leqslant 300\; GeV}$. A variability index (see Table \ref{table:one}) was calculated for each radio galaxy using the method described in \cite{Nolan-2012-ApJS} which is a simple Likelihood Ratio test between the null hypothesis (a constant source) and the alternative hypothesis (variable source). If the null hypothesis is correct, then in accordance with this method, the variability index is distributed as $\mathrm{\chi^{2}}$ with 19 degrees of freedom. Thus any variability index above 39.7 indicates evidence for variability at the $\mathrm{\geqslant 3 \sigma}$ level. We find statistical evidence of flux variability on 6 month timescales for seven of the 26 radio galaxies analysed: 3C\,111, 3C\,120, 3C\,264, IC\,4516, NGC\,1218, NGC\,2892 and PKS\,0625-35. While fixed-time-width binning schemes, like that used in our temporal analysis are widely used within the field, there is merit in exploring a Bayesian Block binning scheme for the radio galaxies we identify here as variable. Such an analysis will aid the comparison of spectra obtained for flaring and non-flaring states and may enable us to uncover any Cen\,A{}-like spectral components potentially camouflaged by variable components. Such an analysis will be the subject of a future publication. \section{Interpretation} \label{sec:interpretation} Our analysis shows that the SEDs of the radio galaxies studied do not exhibit any spectral features to warrant fitting any extra spectral components. Although no firm conclusions can be drawn without a full multi-wavelength analysis on a source by source basis, it does appear as though the $\gamma$-ray{} emission found in the \textit{Fermi}-LAT{} categorised radio galaxies at energies $\mathrm{10~ MeV \leqslant E \leqslant 300~GeV}$ is dominated by jet particle acceleration and/or jet interaction. This is particularly the case for the 7 objects which display evidence for variability; such variability not only suggests a jet origin for the emission, but renders it difficult to detect any steady spectral features which may exist \citep{Graham:2019mnras}. For example, in blazars we know that the variable emission we detect is dominated by emission processes in their ultra-relativistic jets. TeV emission from blazars due to VLBI knots is seen in jets with variability timescales typically lasting minutes to hours during flaring periods. In the case of two radio galaxies, M\,87 and IC\,310, the variability timescales detected are much shorter than the light crossing time of the black hole horizon, which implies the $\gamma$-ray{} emission must be coming from a compact region \citep{Giannios:2009mnras}. It is immediately obvious from Figure \ref{fig:sed-cenA-3C264-4C3912} that if there were any spectral features similar to that seen in Cen\,A{}, they would have been detected. However, as the supermassive black hole masses for the radio galaxies are not known and the mass of the DM spike expected around the central SMBH is related to the mass of the SMBH, detailed modelling of any DM signal one might expect from these radio galaxies and how that compares to the Cen\,A{} DM model fitted by \cite{Brown-2017-PhRvD} is not possible; we can simply say that there is no such component at a similar level to that observed in Cen\,A{}. The observational evidence from \textit{Fermi}-LAT{} and H.E.S.S. suggests that whatever is happening in Cen\,A{} is unusual, or perhaps spectral features are simply easier to detect due to the object's proximity. The lack of evidence for variability in the $\gamma$-ray{} emission from Cen\,A{} means theorists are able to postulate scenarios where the $\gamma$-ray{} emission arises from larger scales i.e. not a compact emitting region. Such scenarios could include contributions from undetected millisecond pulsars or dark matter \citep{Brown-2017-PhRvD} or hadronic processes such as the interaction of energetic protons with ambient matter (proton-proton interactions) \citep{Sahakyan-2013-ApJ} or the inverse Compton upscattering of photons on kiloparsec scales \citep{Hardcastle-2011-MNRAS} or host galaxy starlight \citep{Stawarz-2003-ApJ}. These scenarios are largely degenerate and the only way to distinguish these models from one another is to accumulate more and better quality radio and ground-based TeV observations of radio galaxies.\\ Six of the radio galaxies studied, 3C\,264, 4C\,+39.12, B2\,1447+27, NGC\,1218, NGC\,2329 and PKS\,0625-35, have particularly hard spectra and emission above 30\,GeV. Furthermore, two of these objects, 3C\,264 and 4C\,+39.21, show no significant excess below 1\,GeV. It is possible that the hard spectra displayed by these objects are an indication that the peak of the inverse Compton emission is located in the \textit{Fermi}-LAT{} energy regime. This would be surprising, as radio galaxies do not have the strong Doppler-boosting normally required to produce such a high-frequency peak in their SED. Multi-wavelength observations would be required to confirm if this is the case. \begin{figure*} \centering \captionbox[Text]{The left panel shows the radio luminosity calculated using the total 5 GHz (where not available we used 4.8 GHz) radio flux density available in publicly accessible radio catalogues versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work. We find a strong positive correlation between the radio and $\gamma$-ray{} luminosity. The right panel shows the absolute magnitude for the visual optical band primarily using extinction corrected V filter data (where not available we used B filter data) versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work. We calculated the absolute magnitudes using photometric data available in NED and Simbad \citep{SIMBAD-2000-AAS}, except for PKS\,0625-35 \citep{Massardi-2008-MNRAS}. We find a weak correlation between the optical brightness of these radio galaxies versus their $\gamma$-ray{} luminosity. The TeV-detected radio galaxies are annotated and highlighted using blue star markers, and we see no clustering of these particular sources. The Cen\,A{} $\gamma$-ray{} luminosity was calculated assuming a power-law model and not the broken power-law model from \cite{Brown-2017-PhRvD}. \label{fig:correlation-analysis-one}} \includegraphics[width=0.5\textwidth]{figures/radio_vs_gammaray_luminosity_4FGL-PowerLaw-annot.pdf} \includegraphics[width=0.5\textwidth]{figures/optical_magnitude_vs_gammaray_luminosity_4FGL-PowerLaw.pdf}} \end{figure*} \begin{figure*} \centering \captionbox[Text]{The left panel shows the radio core power calculated using the core 5 GHz (except for PKS\,2324-02 we used 4.8 GHz) radio flux density versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work. The 5 GHz radio flux densities were taken from the NASA/IPAC Extragalactic Database (NED) except for those objects with references listed below$\dagger$. We find a strong positive correlation between radio core power at 5GHz and $\gamma$-ray{} luminosity. The right panel shows the radio core dominance parameter versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work. We find no correlation between the radio core dominance parameter of these radio galaxies versus their $\gamma$-ray{} luminosity. The TeV-detected radio galaxies are annotated and highlighted using blue star markers, and we see no clustering of these particular sources. $\dagger$Fornax\,A and IC\,1531 \citep{Ekers-1989-MNRAS}, NGC\,1218 \citep{Saikia-NGC1218-1986-MNRAS}, NGC\,2892 \citep{Kharb-2004-AA} and NGC\,6251 \citep{Evans-NGC6251-2005-MNRAS}. \label{fig:correlation-analysis-two}} \includegraphics[width=0.5\textwidth]{figures/gammaray-luminosity-v-core-power-5GHz-4FGL-PowerLaw-annot.pdf} \includegraphics[width=0.5\textwidth]{figures/gammaray-luminosity-v-core-dominance-5GHz-4FGL-PowerLaw-annot.pdf}} \end{figure*} \begin{figure*} \centering \captionbox[Text]{Skymaps showing the significance $\mathrm{\sqrt{TS}}$ for a subset of the radio galaxies analysed. Each skymap considers all energies between $\mathrm{100 \enskip MeV \leq E \leq 300 \enskip GeV}$ and the intensity scale in the z-axis highlights the significance. The dark-orange solid contour line indicates the $\mathrm{5\sigma}$ significance boundary and the light-orange solid contour the $\mathrm{15\sigma}$ significance boundary. The radio galaxy position is indicated with a green $\mathrm{\times}$ and the two orange dashed-line concentric circles in the upper left corner of the top left panel show the approximate \textit{Fermi}-LAT{} PSF at $\mathrm{100 \enskip MeV \enskip \textrm{(large)} \enskip and \enskip 1 \enskip GeV \enskip \textrm{(small)}}$ respectively. \label{fig:tsmaps-setA}} \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-TSMaps-100MeV-300GeV-setA-ALL.pdf} } \end{figure*} \begin{figure*} \centering \captionbox[Text]{Skymaps showing the significance $\mathrm{\sqrt{TS}}$ for a subset of the radio galaxies analysed. Each skymap considers all energies between $\mathrm{100 \enskip MeV \leq E \leq 300 \enskip GeV}$ and the intensity scale in the z-axis highlights the significance. The dark-orange solid contour line indicates the $\mathrm{5\sigma}$ significance boundary and the light-orange solid contour the $\mathrm{15\sigma}$ significance boundary. The radio galaxy position is indicated with a green $\mathrm{\times}$ and the two orange dashed-line concentric circles in the upper left corner of the top left panel show the approximate \textit{Fermi}-LAT{} PSF at $\mathrm{100 \enskip MeV \enskip \textrm{(large)} \enskip and \enskip 1 \enskip GeV \enskip \textrm{(small)}}$ respectively. \label{fig:tsmaps-setB}} \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-TSMaps-100MeV-300GeV-setB-ALL.pdf} } \end{figure*} \begin{figure*} \centering \captionbox[Text]{Skymaps showing the significance $\mathrm{\sqrt{TS}}$ for a subset of the radio galaxies analysed. Each skymap considers all energies between $\mathrm{100 \enskip MeV \leq E \leq 300 \enskip GeV}$ and the intensity scale in the z-axis highlights the significance. The dark-orange solid contour line indicates the $\mathrm{5\sigma}$ significance boundary and the light-orange solid contour the $\mathrm{15\sigma}$ significance boundary. The radio galaxy position is indicated with a green $\mathrm{\times}$ and the two orange dashed-line concentric circles in the upper left corner of the top left panel show the approximate \textit{Fermi}-LAT{} PSF at $\mathrm{100 \enskip MeV \enskip \textrm{(large)} \enskip and \enskip 1 \enskip GeV \enskip \textrm{(small)}}$ respectively. \label{fig:tsmaps-setB}} \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-TSMaps-100MeV-300GeV-setC-ALL.pdf} } \end{figure*} In the case of Cen\,A{}, the H.E.S.S. observations were really important in the identification of a statistically significant spectral hardening. Thus, with the construction of new ground-based instruments like CTA about to begin, we need to look for any hints of correlation across multiwavelength data to try and pinpoint the best radio galaxy candidates for observation with IACTs, which ultimately will help us to better understand any such spectral upturns and if they are a common occurrence in these galaxies. We therefore used our analysis results to search for correlations between a number of different characteristic properties and the $\gamma$-ray{} emission from these radio galaxies. Figures \ref{fig:correlation-analysis-one} and \ref{fig:correlation-analysis-two} show the results of our correlation studies using data from publicly accessible radio and optical catalogues. In Figure \ref{fig:correlation-analysis-one} the left panel shows the radio luminosity calculated using the \textit{total} 5 GHz radio flux density versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work, assuming a concordance cosmology with $\mathrm{H_{0} = 71\; km\; s^{-1}\; Mpc^{-1}}$, $\mathrm{\Omega_{M} = 0.27}$, ${\mathrm{\Omega_{\Lambda}=0.73}}$ and $\mathrm{T_{CMB} = 2.725\; K}$. Where no 5 GHz flux densities were available we used the 4.8 GHz flux density measurement. We find a strong positive correlation between the radio and $\gamma$-ray{} luminosity, with the correlation coefficient $\mathrm{r = 0.8}$. The right panel shows the absolute magnitude of the visual optical band calculated using extinction corrected V filter data versus the $\gamma$-ray{} luminosity, calculated using the integrated fluxes estimated in this work. Where no V filter data were available we used B filter data. We find a weak positive correlation ($\mathrm{r = 0.4}$) between the absolute magnitude of these radio galaxies versus their $\gamma$-ray{} luminosity. We also highlight and annotate the power-law modelled TeV-detected radio galaxies using blue star markers, and we see no clustering of these particular sources. The left panel of Figure \ref{fig:correlation-analysis-two} shows the radio power of the \textit{core} at 5 GHz frequencies versus the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work. Where no 5 GHz data were available we used the 4.8 GHz radio flux densities to estimate the core radio power. We find a strong positive correlation between the core radio power at 5 GHz frequencies versus the $\gamma$-ray{} luminosity, with the correlation coefficient $\mathrm{r = 0.9}$. The right panel shows the $\gamma$-ray{} luminosity calculated using the integrated fluxes estimated in this work versus the radio core dominance parameter calculated using the method highlighted in \cite{Fan-Zhang-2003-AA}. The core dominance parameter suffers from a number of different systematic uncertainties \citep{Abdo-Misaligned-2010-ApJ}, and as reported elsewhere \citep{Angioni-2019-AA} we find no correlation between the $\gamma$-ray{} luminosity and the radio core dominance parameter, with correlation coefficient $\mathrm{r = -0.3}$. Again we highlight and annotate the TeV-detected radio galaxies using blue star markers, and we see no clustering of these particular sources. Finally, in the context of potentially correlated $\gamma$-ray and radio flux, we also investigated the possibility of extended $\gamma$-ray emission associated with the kiloparsec scale jet of the radio galaxies. For each radio galaxy we produced a skymap as seen in Figures \ref{fig:tsmaps-setA} and \ref{fig:tsmaps-setB}. Each of these show the significance ($\mathrm{\sqrt{TS}}$) for an approximate 2 degree region centred on the radio galaxy target (indicated with a green $\mathsf{x}$). Significance values greater than 5 $\sigma$ are enclosed within the solid dark-orange contour line, and values greater than 15 $\sigma$ are enclosed within the solid light-orange contour line. We note that there is apparent evidence for extended emission coming from the direction of 3C\,111. However, on closer inspection this extension is likely an artefact of nearby ($\mathrm{<1.5^{\circ}}$) point sources just below the detection threshold. As discussed above, radio galaxies are very interesting targets for a host of reasons. With the forthcoming next-generation ground-based $\gamma$-ray{} observatory the Cherenkov Telescope Array (CTA) (\cite{CTA-Ong-2019-EPJWC}; \cite{Angioni-CTA-2017}), it is hoped that a larger sample of radio galaxies emitting radiation at very-high-energies will be gathered. Figure \ref{fig:extrapolation-south} shows the \textit{Fermi}-LAT{} 4FGL radio galaxy fluxes extrapolated to 100 TeV for both CTA-South (left panel) and CTA-North (right panel) respectively. The \textit{Fermi}-LAT{} detected fluxes were extrapolated assuming no breaks or features in the spectra from the GeV to TeV energy regime. CTA's ten times better sensitivity over the core energies compared to existing ground-based instruments should enable the detection of approximately 13 of the radio galaxies analysed in this work, assuming a 50 hour observation using the CTA-North and CTA-South arrays respectively. In practice, CTA has the potential to detect a larger number, as there are bound to be variable radio galaxies that will be seen with CTA during flaring periods. \begin{figure*} \centering \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-4FGL-extrapolation-for-CTA-South.pdf} } \captionbox[Text]{Shown here are the \textit{Fermi}-LAT{} 4FGL radio galaxy fluxes extrapolated up to 100 TeV for both CTA-South (top panel) and CTA-North (bottom panel). The respective sensitivity performance curves for each of the CTA sites is also shown (solid black line) as well as the \textit{Fermi}-LAT{} 10 year sensitivity (solid grey line). The \textit{Fermi}-LAT{} detected fluxes are extrapolated assuming no spectral breaks or features between the GeV and TeV energy range. \label{fig:extrapolation-south}} { \includegraphics[width=0.9\textwidth]{figures/radio-galaxy-4FGL-extrapolation-for-CTA-North.pdf} } \end{figure*} \section{Conclusions} \label{sec:conclusions} The discovery of a distinctive break in the power-law spectrum of Cen\,A{} posed many questions concerning the origin and mechanisms behind the spectral hardening. We therefore analysed $\mathrm{26}$ other \textit{Fermi}-LAT-detected radio galaxies to see whether any other ``similar'' objects to Cen\,A{} exhibit breaks and spectral hardening. This work has found no evidence for spectral hardening over a 10-year-averaged spectrum calculated for each radio galaxy. Had there been such a spectral feature in these objects, it would have been apparent in the data we analysed. This suggests that either Cen\,A{} is unique among radio galaxies, or that any break occurs outside \textit{Fermi}-LAT's energy range. We also noted that a number of the galaxies analysed show variability on the 6-month timescale, which strongly suggests a jet origin for the $\gamma$-ray{} emission from these objects and would render the detection of any spectral break with a non-jet origin difficult, if not impossible. With the advent of new large observatories such as SKA and CTA, a new era of astronomy is upon us that can help to better understand the non-thermal astroparticle physics at play in AGN-like radio galaxies. Many open questions still remain, such as where and how $\gamma$-rays{} are produced in these extragalactic objects and why a fraction of these largest and most energetically connected objects seen in our universe produce TeV $\gamma$-rays{} despite having much lower Doppler boosting factors compared to blazars? Although we may not get a complete understanding of how these objects work, new discoveries and findings may help to further our knowledge of the characteristics that distinguish between classes of objects under unification schemes, for example multi-wavelength studies across the broad electromagnetic spectrum from low frequency radio observations through to very-high-energy $\gamma$-ray{} observations may provide further support that these unifying characteristics are really down to differences in the masses of their supermassive black holes and their spins, their accretion rates, and the angles and distances at which we view these fascinating objects. \section*{Acknowledgements} The authors would like to acknowledge the excellent data and analysis tools provided by the NASA \textit{Fermi}-LAT{} collaboration, without which this work could not be done. This research has made use of the CTA instrument response functions provided by the CTA Consortium and Observatory; see http://www.cta-observatory.org/science/cta-performance/ (version prod3b-v2) for more details. In addition, this research has made use of the NASA/IPAC Extragalactic Database (NED) which is operated by the Jet Propulsion Laboratory, California Institute of Technology, under contract with the National Aeronautics and Space Administration. This research has also made use of the SIMBAD database, operated at CDS, Strasbourg, France. Finally, the authors acknowledge the financial support of the UK Science and Technology Facilities Council consolidated grant ST/P000541/1. \bibliographystyle{mnras}
\section{Introduction} \cite{tang:2018e, tang:2018a} obtained the exact power formulae for some commonly used t tests in superiority, noninferiority (NI) and equivalence trials. The power determination for the analysis of covariance (ANCOVA) and t-test with unequal variances in equivalence trials involves two-dimensional numerical integration. We show that the calculation can be simplified by using Owen's Q function, which is available in standard statistical software packages (e.g. SAS and R {\it PowerTOST }). We extend the method for ANCOVA to unstratified and stratified multi-arm randomized trials, and apply it to the power determination for multi-arm trials and gold standard NI trials \citep{pigeot:2003}. We use the same notations as \cite{tang:2018e, tang:2018a}. Let $t(f,\lambda)$ denote the t distribution with $f$ degrees of freedom and noncentrality parameter $\lambda$, $t_{f,p}$ the $p$th percentile of the central t distribution, $\Phi(\cdot)$ the cumulative distribution function (CDF) of $N(0,1)$, $F_{f_1,f_2}(\cdot)$ the CDF of a central $F(f_1,f_2)$ distribution, and $Q_f(t,\delta;a,b)=\frac{1}{\Gamma(f/2)2^{f/2-1}}\int_a^b \Phi(\frac{tx}{\sqrt{f}}-\delta)x^{f-1}\exp(-\frac{x^2}{2})dx$ Owen's Q function. Let $n_g$ be the number of subjects in group $g$, $n$ the total size, $M_0$ the superiority ($M_0=0$) or NI margin, and $(M_l,M_u)$ the lower and upper equivalence margins. Without loss of generality, we assume high scores indicate better health. \section{Two sample t tests} Let $(\hat\tau, n^{-1}\hat{V})$ be the estimated effect and variance with true values $(\tau_1, n^{-1}V)$ in a test based on the t distribution. Suppose $\frac{\hat\tau-\tau_1}{\sqrt{n^{-1}V}}\sim N(0,1)$ is independent of $\xi= \frac{\hat{V}}{{V}} \sim \frac{\chi_f^2}{f}$. In superiority and NI trials, we reject the null hypothesis when $t=\frac{\hat\tau -M_0}{\sqrt{n^{-1}\hat{V}}} >C= t_{f,1-\alpha/2}$. If $f$ and $V$ are known, the exact power is $\Pr\left[t(f, \frac{|\tau_1-M_0|}{\sqrt{n^{-1}V}})> C\right]$, or $1$ minus the CDF of $t \sim t(f, \frac{|\tau_1-M_0|}{\sqrt{n^{-1}V}})$ evaluated at $C$. An equivalence test is significant if both $t_l=\frac{\hat\tau -M_l}{\sqrt{n^{-1}\hat{V}}} > C$ and $t_u=\frac{\hat\tau -M_u}{\sqrt{n^{-1}\hat{V}}} <-C$. By the change of variable $x=\sqrt{f\xi}$, the exact power equation (26) of \cite{tang:2018a} can be rearranged in terms of Owen's Q function as \begin{equation}\label{power00equi0} P_{\text{equi}} =\int_0^{ \frac{(M_u-M_l)^2}{4 n^{-1}V C^2}} \left[\Phi(\delta_1- C \sqrt{\xi}) - \Phi(\delta_2+ C\sqrt{\xi}) \right] dG (\xi) ={\it Q_f(-C,\delta_2; 0,R)- Q_f(C, \delta_1;0,R)}\end{equation} where $G(\xi)$ is the CDF of $\xi\sim \frac{\chi_f^2}{f}$, $\delta_2=\frac{M_l-\tau_1}{\sqrt{ n^{-1}V}}<0$, $\delta_1=\frac{M_u-\tau_1}{ \sqrt{n^{-1}V}}>0$ and $R=\frac{\sqrt{f}(\delta_1-\delta_2)}{2 C}$. In the t test with unequal variances [i.e. $y_{0i}\stackrel{iid}{\sim} N(\mu_0,\sigma_0^2)$, $y_{1i}\stackrel{iid}{\sim} N(\mu_1,\sigma_1^2)$], the power of the superiority and NI trial is obtained from the fact \citep{moser:1989,tang:2018a} that $ \frac{\hat\tau -M_0}{\sqrt{n^{-1}\hat{V}}} h^*(u) = \frac{\hat\tau-M_0}{\sqrt{n^{-1}V}}\sqrt{\frac{n-2}{(n_1-1)s_1^2/\sigma_1^2 +(n_0-1)s_0^2/\sigma_0^2}}$ follows a noncentral $ t(n-2,\frac{|\tau_1-M_0|}{\sqrt{ n^{-1} V}})$ distribution given $u$ \begin{eqnarray}\label{powertsw_equi} \begin{aligned} P_{\text{sup/ni}} =\int_0^\infty\, \text{Pr}\left[ t\left(n-2,\frac{|\tau_1-M_0|}{\sqrt{ n^{-1}V}}\,\right) >h(u) \right]\,dF_{n_1-1,n_0-1}(u) \end{aligned} \end{eqnarray} where $\hat\tau=\hat\mu_1-\hat\mu_0$, $s_g^2$ is the sample variance in group $g$, $n^{-1}\hat{V}=\frac{s_1^2}{n_1}+ \frac{s_0^2}{n_0}$, $n^{-1}V=\frac{\sigma_1^2}{n_1}+ \frac{\sigma_0^2}{n_0}$, $u=\frac{s_1^2/\sigma_1^2}{s_0^2/\sigma_0^2}\sim F(n_1-1,n_0-1)$, and \begin{eqnarray*} \begin{aligned} h^*(u) &=\sqrt{ \frac{(n-2) [u\sigma_1^2/n_1+\sigma_0^2/n_0] }{n^{-1}V\, [(n_1-1)u+n_0-1] } },\\ f(u) & = \frac{\left[u\sigma_1^2/n_1 +\sigma_0^2/n_0\right]^2 }{u^{2}\sigma_1^4/[n_1^2(n_1-1)] +\sigma_0^4/[n_0^2(n_0-1)] }, \\ h(u) &=t_{f(u),1-\frac{\alpha}{2}} h^*(u). \end{aligned} \end{eqnarray*} The exact equivalence power (equation (A3) of \cite{tang:2018a}) can be reexpressed as \begin{equation}\label{power_equi_tun} P_{\text{equi}} =\int_0^\infty \left\{Q_{n-2}\left[-h(u),\delta_2; 0,R(u)\right]- Q_{n-2}\left[h(u), \delta_1;0,R(u)\right]\right\} dF_{n_1-1,n_0-1}(u) \end{equation} where $\delta_2=\frac{M_l-\tau_1}{\sqrt{n^{-1}V}}$, $\delta_1=\frac{M_u-\tau_1}{\sqrt{n^{-1}V}}$ and $R(u)=\frac{\sqrt{n-2}\,(\delta_1-\delta_2)}{2h(u)}$. Please see \cite{tang:2018a} for numerical examples. \section{ANCOVA} \cite{tang:2018e, tang:2018a} derived the exact power formulae for ANCOVA analysis of two-arm trials. Below we present more general results for unstratified or stratified multi-arm randomized trials. Suppose subjects are randomized to $K^*=K+1$ treatment groups ($g=0,\ldots,K$) within each of $h$ strata. In an unstratified trial, we set $h=1$. Subjects in treatment group $g$ are modeled by $$ y_{gi} = \mu_g + z_{gi_1}\alpha_1 +\ldots +z_{gi_{r-1}} \alpha_{r-1} + \bm{x}_{gi}' \bm{\beta} + \varepsilon_{gi} = \eta+ \delta_g + z_{gi_1}\alpha_1 +\ldots +z_{gi_{r-1}} \alpha_{r-1} + \bm{x}_{gi}' \bm{\beta} + \varepsilon_{gi} $$ where $z_{gi_k}$ ($k=1,\ldots,r-1$) is the indicator variable for the pre-stratification factors, $\mu_g$ is the effect for treatment group $g$, $\bm{x}_{gi}$ is the $q\times 1$ vector of baseline covariates, $\varepsilon_{gi}\sim N(0,\sigma^2)$, $\eta=\mu_0$ and $\delta_g =\mu_g-\mu_0$. In general, $r$ equals the number of strata $h$. In trials with multiple stratification factors, $r<h$ if there is no interaction between some stratification factors. By the same arguments as the proof of equation (15) in \cite{tang:2018e}, we obtain the variance for the linear contrast with coefficients $(l_0,\ldots, l_K)'$ $$\text{var}\left(\sum_{g=0}^K l_g \hat\mu_g\right) =\sigma^2 V_l\,\left(1+\frac{q}{n-q-r-K+1}\tilde{\Upsilon}\right)$$ where $\sum_{g=0}^K l_g=0$, $\bar{\bm{z}}_g$ is the mean of $\bm{z}_{gi}=(z_{gi_1},\ldots, z_{gi_{r-1}})'$ in group $g$, $S_{zz}=\sum_{g=0}^K\sum_{i=1}^{n_g} (\bm{z}_{gi}-\bar{\bm{z}}_g)^{\otimes 2}$, $\tilde{\Upsilon}$ is a function of the covariate $\bm{x}_{gi}$'s, and $V_l= \sum_g l_g^2/n_g + (\sum_g l_g \bar{\bm{z}}_g)' S_{zz}^{-1}(\sum_g l_g \bar{\bm{z}}_g)$. In a two arm trial \citep{tang:2018e}, $V_l= \left[\sum_{s=1}^h \frac{n_{s1}n_{s0}}{n_{s1}+n_{s0}}\right]^{-1}$ if there is no restriction on the stratum effect (i.e. $r=h$), where $n_{sg}$ is the number of subjects in stratum $s$, treatment group $g$. A constant treatment allocation ratio is commonly used in practice. Then $\bar{\bm{z}}_0=\ldots=\bar{\bm{z}}_K$ and $V_l= \sum_g l_g^2/n_g$. Let $\tau_1=\sum_g l_g\mu_g$, $f=n-q-r-K$, and $f_2= f+1$. When $\bm{x}_{gi}$'s are normally distributed, $\tilde{\Upsilon} \sim F(q, f_2)$ and the exact power for the superior or NI test is \begin{eqnarray}\label{power_ancova_un} \begin{aligned} P_{\text{sup/ni}} = \int_0^\infty \text{Pr}\left[ t\left(f,\sqrt{\frac{(\tau_1-M_0)^2} {\sigma^2V_l(1+q\tilde{\Upsilon}/f_2)}}\,\right) > t_{f,1-\frac{\alpha}{2}} \right] d F_{q,f_2}(\tilde{\Upsilon}). \end{aligned} \end{eqnarray} Formula \eqref{power_ancova_un} also provides very accurate power estimate for nonnormal covariates \citep{tang:2018a}. In equivalence trials, the exact power is \begin{equation}\label{power_equi_ancova} P_{\text{equi}} =\int_0^\infty \left\{Q_f\left[-t_{f,1-\alpha/2},\delta_2(\tilde{\Upsilon}); 0,R(\tilde{\Upsilon})\right]- Q_f\left[t_{f,1-\alpha/2}, \delta_1(\tilde{\Upsilon});0,R(\tilde{\Upsilon})\right]\right\} dF_{q,f_2}(\tilde{\Upsilon}) \end{equation} where $\delta_2(\tilde{\Upsilon})=\frac{M_l-\tau_1}{ \sqrt{\sigma^2 V_l(1+q\tilde{\Upsilon}/f_2)} }<0$, $\delta_1(\tilde{\Upsilon})=\frac{M_u-\tau_1}{\sqrt{\sigma^2 V_l(1+q\tilde{\Upsilon}/f_2)}}>0$ and $R(\tilde{\Upsilon})=\frac{\sqrt{f}(\delta_1-\delta_2)}{2 \,t_{f,1-\alpha/2}}$. The exact power formulae (equation (A1) of \cite{tang:2018a}, equation (30) of \cite{tang:2018e}) for two arm trials are equivalent to equation \eqref{power_equi_ancova} at $K=1$. The power formulae \eqref{powertsw_equi}, \eqref{power_equi_tun}, \eqref{power_ancova_un} and \eqref{power_equi_ancova} are of the form $\int_0^\infty P_c( x) dF_{f_1,f_2}(x)$, and can be calculated as \begin{equation} P= \int_0^\infty P_c( x) dF_{f_1,f_2}(x) = \int_0^1 P_c\left[ F_{f_1,f_2}^{-1}(\nu)\right]\,d\nu. \end{equation} Below we give three hypothetical examples. Sample R code is provided in the Supplementary Material. In each example, the simulated (SIM) power is evaluated based on $4,000,000$ simulated datasets. There is more than $95\%$ chance that the SIM power lies within $0.05\%$ of the true power. In example $1$, we perform the power calculation for a superiority trial. Subjects are randomized equally into $K^*=3$ groups ($K=2$ experimental, or control treatment) stratified by gender ($z_{gi_1}=1$ for male, $0$ for female) and age ($z_{gi_2}=1$ if old, $0$ otherwise). There are $6$ subjects per treatment group per stratum ($n_0=n_1=n_2=24$, $n=72$). There is no interaction between age and gender ($r=3$, $h=4$), and the outcome is normally distributed as $$ y_{gi} \sim N\left[ \mu_g + 0.6 \,z_{gi_1} + 0.3 \,z_{gi_{2}} + 0.5\,x_{gi} , 1\right]$$ where $(\mu_0,\mu_1,\mu_2)=(0,0.6,0.9)$ and $x_{gi} \sim N(0.2 z_{gi_1}+0.4 z_{gi_2},1)$. We compare each experimental treatment versus control treatment at the Bonferroni-adjusted one tailed significance level of $\alpha/2=0.0125$. The exact power by formula \eqref{power_ancova_un} is $78.63\%$ and $41.39\%$, and the SIM power is $78.62\%$ and $41.39\%$ respectively for the two tests. Example $2$ has similar setup to example $1$ except that $(\mu_0,\mu_1,\mu_2)=(0,0.05,0.1)$ and the sample size is $30$ per group per stratum ($n_0=n_1=n_2=120$, $n=360$). The aim is to establish the equivalence of each experimental treatment versus control treatment at $\alpha/2=0.0125$. The margin is $(M_l,M_u)=(-0.5,0.5)$. The exact power by formula \eqref{power_equi_ancova} is $79.14\%$ and $86.72\%$ respectively for the two tests, while the SIM power is $79.14\%$ and $86.71\%$. In example $3$, we design a three-arm ``gold standard'' NI trial \citep{pigeot:2003}. It consists of placebo ($g=0$), an active control treatment ($g=1$) and an experimental treatment ($g=2$). The set up is similar to example $1$ except that $(\mu_0,\mu_1,\mu_2)=(0,1,1.1)$, and the sample size is $10$ per group per stratum ($n_0=n_1=n_2=40$, $n=120$). Two tests are conducted at the one-sided significance level of $\alpha/2=0.025$. Test $1$ evaluates the superiority of treatment $1$ over placebo. The power for this test (exact $P_1=99.29\%$, SIM $99.28\%$) is very close to $1$. In test $2$, we assess the noninferiority of treatment $2$ to treatment $1$ by demonstrating that treatment $2$ preserves at least $50\%$ of the efficacy of treatment $1$ compared to placebo (i.e. $\frac{\mu_2-\mu_0}{\mu_1-\mu_0}> 50\%$ or $\mu_2-0.5\mu_1-0.5\mu_0>0$). The exact power of test $2$ is $P_2=86.41\%$ (SIM power $86.41\%$). The noninferiority is claimed only if both tests are significant \citep{pigeot:2003}, and the overall power is at least $P_1+P_2-1 =85.70\%$ while the simulated power is $85.80\%$. \bibliographystyle{Chicago}
\section{ Introduction} Since the emergence of nanotechnology, the design and properties of synthetic molecular motors and machines are the subjects of active research\cite{moto1,moto2,moto3,moto4,moto5,moto6,moto7,motor0,motor1,motor2,motor3,motor4,motor5,motor6,motor7,motor8,motor10,motor11,motor12,motor13,motor14,motor15,motor16,motor17,pccp,motor18}. Molecular motors applications range from medicine to engineering, sensing, the control of transport mechanisms, crystallization, hydrophobicity, optical properties, and actuation to name a few. Among molecular motors, nano-swimmers are of particular interest for medical applications. Biological molecular motors are quite complex molecular systems. Synthetic molecular motors that have been created up to date are also still relatively complex. Creating simpler motors is however of large interest as it will permit to produce them more easily in large number, and can lead to more stable motors. Due to Brownian motion and low Reynolds number, creating nano-swimming molecular motors is quite a challenge. Brownian motion hinders directional motor's motion by incessant interactions with the medium, and induces fluctuations in the environment local structure and dynamics. Moreover, because the Reynolds number $Re$ is proportional to the characteristic length-scale of the system, at the nanoscale $Re$ is small. As $Re$ measures the ratio of kinetic to viscous forces, at the nanoscale viscous forces govern the dynamics, hindering the motor's displacements. Eventually, low Reynolds number lead to Purcell's theorem\cite{scallop1,purc} that forbids the motion of time symmetrical nano-swimmers. While Brownian motion introduces some {\color{black} breakdown \cite{purc}} of the theorem due to fluctuations in the environment, previous studies found nevertheless that the theorem mostly holds at the nanoscale\cite{prefold,scallop13b}. Any attempt to create a simple mono-molecular motor will have to {\color{black} breakdown \cite{purc}} the Purcell theorem to be efficient. Various breakdowns of the theorem were reported \cite{scallop2,scallop4,scallop5,scallop6,scallop7,scallop8,scallop9,scallop11,scallop12,scallop13,scallop13b,scallop13c,scallop14,scallop15,prefold}. {\color{black} A few of these breakdowns appear for rapid flapping motors\cite{scallop6,scallop4,scallop14,scallop15} while most others are due to specific environments.} {\color{black} Diffusion of the motor can also occur due to fluidization of the medium by the motor's flaps}, the medium diffusion then carrying the motor\cite{md16,scallop3,cage,rate,carry,scallop10}. This effect called photofluidization \cite{flu1,flu2,flu3,flu4} for azobenzene motor molecules is of {\color{black} particular interest due to its relation with the long standing problem of the glass-transition \cite{gt1,gt2}.} Purcell suggests in his paper\cite{scallop1} more complicated mechanisms to bypass the theorem. These mechanisms need at least two hinges, with foldings that have to be non-symmetrical in a time reversal transformation. In this paper we test the effect of time symmetry, comparing two nano-swimmers based on Purcell's suggested motor. One of our swimmers uses the time asymmetrical succession of flaps proposed by Purcell to break the theorem, and the other one uses time symmetrical succession of flaps\cite{swim}. We describe our two nano-swimming motors in Figures \ref{f00} and \ref{f01}. Our swimmers are adapted from Purcell's motor, so that they can be experimentally engineered from two attached azobenzene molecules, that do have the property of photo-izomerization\cite{flu5,azo1,azo2,azo2b,azo3,azo4,azo5,azo6,azo7,azo8,azo9}. They are constituted of three parts, with the parts at the two extremities moving periodically in four steps. The only difference between the two motors is the order of the successive motions of the flapping parts. In contrast to the time asymmetric motor, for the time symmetric motor the successive motions are the same if time is reversed. As suggested by Purcell, the asymmetrical motor displacement is much larger due to the theorem. Molecular dynamics and Monte Carlo simulations\cite{md1,md2,md2b,md4} are invaluable tools, together with model systems\cite{ms1,ms2,ms3,ms4,ms5}, theoretical calculations and experimental data to increase our understanding of unsolved problems in condensed matter physics\cite{keys,md3,md4b,md6,md7,md8,md9,md10,yld,md11,md12,md13,md14,md15,md16,c2}. We study in this work the possible breakdown of the theorem on the time symmetrical motor, with molecular dynamics simulations, using an external electric field on a polarized motor. The purpose of the electric field is to both breakdown the theorem and induce a preferential direction in the motor's displacement. We then compare the effect of various electric fields on our two motors to understand the effect of time symmetry on the displacements. Our medium is a model system based on Lennard-Jones potentials so that most quantities (temperature, molecules sizes, etc.) can be tuned to approximately represent a number of viscous media, with our results scaled by the corresponding factors. \begin{figure \centering \includegraphics[height=4.8 cm]{FIG1A.pdf} \includegraphics[height=5.8 cm]{FIG1B.pdf} \caption{(color online) {\color{black} (a) Picture of the flat nano-swimmer before any arm's motion. Local coordinates $x$ and $y$ define the plane of the motor. The external forces are applied on the $4$ atoms of the rotation axis in the $-X$ and $X$ directions of the laboratory coordinates, so that the sum of the forces on the motor is null. For large fields, the motor eventually orients itself on the direction of the field and the $x$ motor's axis is then superimposed on the $X$ laboratory axis. The arrows indicate the external force field in that configuration. Note that when the force field is applied, the motor's reversed orientation in the $-X$ direction is unstable. (b) The $4$ steps, beginning from an initially flat swimmer are described in the Figure. The order of the flaps is (abcd) for the time asymmetric nano-swimmer and (abdc) for the time symmetric one. {\color{black} The time asymmetric swimmer is based on the motor suggested by Purcell to break his theorem} due to time asymmetry while the other one is the same motor but with time symmetry; that is reversing time leads to the same succession of steps for the time symmetric motor but not for the time asymmetric one. The swimmers are adapted from Purcell's motor, so that they can be experimentally engineered from two attached photo-isomerizing azobenzene molecules. As explained by Purcell\cite{scallop1} the motor main direction of motion is the $x$ local axis.} } \label{f00} \end{figure} \begin{figure \centering \includegraphics[height=5.8 cm]{FIG2A.pdf} \includegraphics[height=5.8 cm]{FIG2B.pdf} \caption{(color online) {\color{black} Snapshots of the motor and molecules surrounding it at a distance $r<10$\AA, with arbitrary colors. (a) The motor is in its flat configuration. (b) The two motor's arms are folded. } } \label{f01} \end{figure} \section{Calculation} The reader will find details on our simulation procedure in previous papers\cite{pccp,prefold,ariane}, however for convenience we will resume the simulation procedure. We use the Gear algorithm with the quaternion method\cite{md1} to solve the equations of motions with a time step $\Delta t=10^{-15} s$. Due to the release of energy from the motor, simulations where the motor is active are out of equilibrium. We evacuate the energy created by the motor's folding, from the system with a Berendsen thermostat\cite{berendsen}. We use the NVT canonic thermodynamic ensemble as approximated by that simple thermostat (see ref.\cite{finite2} for an evaluation of the effect of the thermostat on our calculations). {\color{black}Our simulations use one motor molecule imbedded inside a medium constituted of $500$ linear molecules, in a cubic box $30.32$ \AA\ wide.} We use periodic boundary conditions. The molecules of the medium (host)\cite{ariane} are constituted of two rigidly bonded atoms ($i=1, 2$) at the fixed interatomic distance {\color{black} $l_{h}$}$=1.73 $\AA$ $. These atoms interact with atoms of other molecules with the following Lennard-Jones potentials: \begin{equation} V_{ij}=4\epsilon_{ij}((\sigma_{ij}/r)^{12} -(\sigma_{ij}/r)^{6}) \label{e1} \end{equation} with the parameters\cite{ariane}: $\epsilon_{11}= \epsilon_{12}=0.5 KJ/mol$, $\epsilon_{22}= 0.4 KJ/mol$, $\sigma_{11}= \sigma_{12}=3.45$\AA, $\sigma_{22}=3.28$\AA. The mass of the motor is $M=420 g/mole$ (constituted of $14$ atoms, each one of mass $30g/mole$) and the mass of the host molecule is $m=1000 g/mole$ ($2$ atoms with a mass of $500g/mole$ each). We model the motor with $14$ atoms in a rectangular shape constituted of two rows of $7$ rigidly bonded atoms. The width of the swimmer is $L_{s}=4.4$\AA\ and its length $l_{s}=15.4$\AA. It is constituted of two flapping {\color{black} rigid} parts of length $l_{a_{0}}=l_{a_{1}}=5.7$\AA\ and a central {\color{black} rigid} non mobile part of length $d=4$\AA\ on which we apply the opposite force fields polarized in the $X$ direction of sum null. {\color{black}Notice that the flapping parts and the central part are three rigid bodies in the simulations.} The length of the host molecule is $l_{h}=5.09$\AA\ and its width $L_{h}=3.37$\AA. The motor's atoms interact with the medium's atoms using mixing rules and a Lennard-Jones interatomic potential on each atom of the motor, defined by the parameters: $\epsilon_{33}= 1.355 KJ/mol$, $\sigma_{33}=3.405$\AA. We use the following mixing rules \cite{mix1,mix2}: \begin{equation} \epsilon_{ij}=(\epsilon_{ii} . \epsilon_{jj})^{0.5} ; \sigma_{ij}=(\sigma_{ii} . \sigma_{jj})^{0.5} \label{e2} \end{equation} for the interactions between the motor and the host atoms. {\color{black}The medium (host) is a fragile liquid\cite{fragile1,fragile2} that falls out of equilibrium in our simulations below $T=38 K$, i.e. $T=38$ K is the smallest temperature for which we can equilibrate the system when the motor is not active. As a result above that temperature the medium behaves as a viscous supercooled liquid in our simulations and below that temperature it behaves as a solid (as $t_{simulation}<\tau_{\alpha}$). The simulations of this work correspond to $T=30 K$, therefore a temperature for which the medium behaves as a solid when the motor is not active. Notice however that when active, the motor's motions induce a fluidization of the medium around it. We evaluate the glass transition temperature $T_{g}$ to be slightly smaller $T_{g} \approx 28 K$, from the change of the slope of the potential energy as a function of the temperature.} However as they are modeled with Lennard-Jones atoms, the host and motor potentials are quite versatile. Due to that property, a shift in the parameters $\epsilon$ will shift all the temperatures by the same amount, including the glass-transition temperature and the melting temperature of the material. The two motors and their different folding steps are described in Figures \ref{f00} and \ref{f01}. Each folding is modeled as continuous, using a constant quaternion variation, with a folding time $\tau_{f}=0.5 ps$. The total cycle period is constant and fixed for both motors at $\tau_{p}=600 ps$. Each of the $4$ steps described in the Figure \ref{f01} has the same duration equal to $\tau_{p}/4=150 ps$ including the $0.5 ps$ folding or unfolding. Our simulations are out of equilibrium, as the motor releases periodically some energy into the medium surrounding it. That released energy is then extracted from our system by the Berendsen thermostat, and thus doesn't increase the mean temperature of our medium. However our system, while out of equilibrium, is in a steady state and is not aging. That behavior is obtained because the energy released by the motor into the medium is small enough and the time lapse between two stimuli large enough for the system to relax before a new stimuli appears. In other words we are in the linear response regime\cite{pccp}. Through this work we use the mean square displacements of the motor to measure its ability to diffuses. The mean square displacement is defined as\cite{md1}:\\ \begin{equation} \displaystyle{<r^{2}(t)>= {1\over N.N_{t_{0}}} \sum_{i,t_{0}} \mid{{\bf r}_{i}(t+t_{0})-{\bf r}_{i}(t_{0})} }\mid^{2} \label{e130} \end{equation} From the time evolution of the mean square displacement we then calculate the diffusion coefficient $D$ for diffusive displacements using the Stokes-Einstein equation: \begin{equation} \displaystyle{\lim_{t \to \infty}<r^{2}(t)>=6 D t} \end{equation} {\color{black} Notice that the external field induces a preferential direction of motion for the motor leading to super-diffusive displacements. Therefore the displacements have a diffusive and a super-diffusive component. However, due to symmetry for the time symmetric motor we expect the super-diffusive behaviors to disappear for larger time scales. To evaluate diffusion coefficients when super-diffusive behaviors are present, we use the diffusive (intermediate times) part of the mean square displacement instead of the long time limit. To be complete, we also calculate in our study the super-diffusive interpolation of the motor's motion. } To quantify the breakdown of Purcell's scallop theorem, following ref.\cite{prefold} we define a coefficient $\epsilon$ that we call the efficiency of the motor's motion: \begin{equation} \displaystyle{\epsilon= {<r^{2}(n\tau_{p})>\over 2n<r^{2}(\tau_{p}/2)>} } \label{e13bb} \end{equation} where $\tau_{p}$ is the period, $\tau_{p}/2$ the time lapse for only $2$ steps as described in Figure \ref{f01}, and $n$ the number of periods considered. In this paper we have used $n=3$. {\color{black} The motion's efficiency $\epsilon$ compares the motor's mean square displacement (MSD) after a number $n$ of periods (i.e. after the theorem has applied) to the motor's MSD after half a period (i.e. before the theorem can apply). In other words $\epsilon$ is the ratio of the observed displacement of the motor, to the displacement expected without the Purcell theorem effect. } With $\epsilon$ definition, if the scallop theorem holds the efficiency $\epsilon=0$, while with a random motion we will obtain $\epsilon=1$, and a larger value of $\epsilon$ will mean that the motion is not random but has a preferential direction. Unless otherwise mentioned, the results displayed in this paper correspond to a temperature $T=30$ K in our model, a temperature for which the medium would be solid without the motor's stimuli. {\color{black} However the motor's stimuli induce a fluidization of the medium around it. The fluidization mechanism\cite{flu1,flu2,flu3,flu4,md16} is of particular importance due to its relation with the glass-transition problem\cite{md16}. The effect of this fluidization on the motor's motion has been studied in previous papers \cite{scallop13b,scallop13c}. A motor carried by the medium due to fluidization will have an efficiency $\epsilon=1$ as it will not be subject to the Purcell theorem. From the ratio of the motor's and medium's thermal diffusion coefficients at various temperatures, we estimate the part of the motor's motion due to the fluidization to be $\leq 20$ percent, leading to a minimum value for the efficiency different from zero. } {\color{black} The motor is subject to an external force field, leading to two opposite forces that apply in our calculations on the edges of the central part of the motor, apart from a distance $d$ (see Figure \ref{f00}). The physical parameter of importance in our system is thus the force moment (or torque) ${\bf M}={\bf dxF}$ applied on the motor. However as this moment evolves with the motor's orientation, in our Figures we use the maximum moment ($M_{max}=\mid F \mid d$) as parameter. Notice that the applied forces are equivalent experimentally to the effect of an external electric (or magnetic) field to a motor with a permanent dipolar electric (or magnetic) moment.} We show a typical motor's moment time evolution in Figure \ref{ff00}. The larger peaks correspond to the flaps of the motor, while the Brownian noise stays mainly around $100 pN$.\AA, with some larger fluctuations. \begin{figure \centering \includegraphics[height=6.6 cm]{FIG3.pdf} \caption{{\color{black}(color online) Time evolution of the $y$ component in the motor reference frame (see Figure \ref{f00}) of the force moment $M_{y}= - F_{z}$ $<d>$ for a time symmetric motor without external force field. The Brownian force moment is approximately equal to $100 pN.$\AA\ in the Figure, with some larger fluctuations. The periodic large peaks correspond to the force moments induced by the motor's flaps.\\} } \label{ff00} \end{figure} \section{Results and discussion} \subsection{Does Purcell's theorem still hold at the nanoscale ?} Purcell's theorem was established for a continuous medium, with Navier-Stokes hydrodynamic equations. However at the nanoscale the medium is no longer continuous, because the medium's molecules are no longer small in comparison to the motor. Also, at that length scale fluctuations in the environment are important, arising both from Brownian noise and from the motor's flapping arms perturbations. Eventually, for amorphous soft matter and supercooled liquids, cooperative fluctuations (called dynamic heterogeneities) arise, increasing at low temperature. For all these reasons, Purcell's theorem should be intrinsically broken at the nanoscale. We will however see now that the theorem still holds at the nanoscale. \begin{figure \centering \includegraphics[height=6.6 cm]{FIG4A.pdf} \includegraphics[height=6.6 cm]{FIG4B.pdf} \caption{(color online) (a) Diffusion coefficient $D$ versus the maximum moment $F.d$ for the time symmetric and time asymmetric motors. The diffusion coefficients displayed here, are obtained from fits of the mean square displacement in the time range for which it is approximately linear. {\color{black}The small line shows the value of the Brownian noise (see Figure \ref{ff00}). {\color{black} (b) Interpolation of the square of the mean motor's velocity $\kappa$ for super-diffusive displacements.}\\} } \label{f3} \end{figure} We will now use the two motors diffusion coefficients displayed in Figure \ref{f3} to measure the breakdown of the scallop theorem. The asymmetric motor is not constrained by the theorem, while the symmetric motor is. Therefore a comparison between the diffusion behavior of the two motors shows the domain of departure from the theorem by the symmetric motor. Note also that the presence of diffusion is in itself a proof of breakdown of the theorem. Figure \ref{f3}a shows the diffusion coefficient {\color{black} $D$ and Figure \ref{f3}b the mean velocity $\kappa$ (for super-diffusive motions)} of the two motors as a function of the external force field torque. There is a threshold on the external force below which the time symmetric (i.e. reversible in time) motor doesn't move while the time asymmetric motor does. As the only difference between the two motors is the intrinsic breakdown of Purcell's theorem by the asymmetric motor, these results show that Purcell's theorem still holds at the nanoscale in our conditions of study. \subsection{Field-induced breakdown of Purcell's theorem} In the first part of this section we use the comparison between the two motors diffusion coefficients to measure the breakdown of the scallop theorem. Then in the second part of the section we use the efficiency of motion for a more precise investigation of the breakdown domains. Figure \ref{f3} shows that for small force field moments, the diffusion coefficient {\color{black}$D$ and the coefficient $\kappa$ are} very small for the time symmetric motor and roughly constant for the time asymmetric motor. As discussed in the previous section for these force fields the scallop theorem is not broken for the symmetric motor and the diffusion is roughly independent on the field for the asymmetric motor. We then observe a moment threshold around $100 pN.$\AA\ above which the diffusion increases. Figure \ref{ff00} shows that the threshold is of the order of magnitude of the Brownian noise on the moment. As a result, the threshold corresponds to the {\color{black} external force} value that counterbalance the Brownian forces fluctuations at the temperature of study. Around the threshold the diffusion is the same for both motors. Because the difference between the two motors is related to the Purcell theorem, the equivalence of the diffusion coefficients shows that the field induces a breakdown of the Purcell theorem for the time symmetric motor. The field evolution of the symmetric motor's efficiency in Figure \ref{f5} confirms that picture. These results suggest that when the external forces are comparable to the Brownian forces on the motor, it induces a fluctuating asymmetry that breaks the theorem. Then around $500 pN.$\AA\ the diffusion stabilizes to $D\approx1$\AA$^{2}/ns$ for the time symmetric motor and $D\approx3$\AA$^{2}/ns$ for the time asymmetric motor. That difference between the two saturation values suggests a decrease of the efficiency of the symmetric motor for large fields, in agreement with the results displayed in Figure \ref{f5}. To resume that picture, for small force fields the sum of Brownian fluctuations and of the field leads to an asymmetry of motion that induces the breakdown of the Purcell theorem, while for large fields, the field finally induces a one dimension motion, leading to a saturation and the observed flat curves. \begin{figure \centering \includegraphics[height=6.6 cm]{FIG5.pdf} \caption{(color online) Mobility efficiency coefficient $\displaystyle{\epsilon= {<r^{2}(n\tau_{p})>\over 2n<r^{2}(\tau_{p}/2)>} }$ with $n=3$, versus the maximum moment for the time symmetric motor. {\color{black}The small line at $100 pN.$\AA\ shows the value of the Brownian noise (see Figure \ref{ff00}).}} \label{f5} \end{figure} We verify this picture in Figure \ref{f5} that shows the motion's efficiency $\epsilon$ (a quantity that quantifies the breakdown of Purcell's theorem)\cite{prefold} versus {\color{black} the force field moment} for the time symmetric motor. The efficiency of the time symmetric motor in figure \ref{f5} first increases at the threshold value ({\color{black}for a moment $M\approx 100pN.$\AA}) and then decreases for large fields to its zero field value. Therefore the scallop theorem holds approximately ($\epsilon=0.3$) for small fields then is broken above a threshold field value and finally is restored for large fields. As a result, {\color{black}as observed in Figure \ref{f5}}, the efficiency is maximum when the force field is of the same order of magnitude than the Brownian force fluctuations, while large and small fields do not modify the efficiency. To conclude, for small fields, the effect of the field acts as a small perturbation inside the Brownian motion while large fields destroy the fluctuations restoring the scallop theorem for the symmetric motor. Only for fields of the same order of magnitude than the Brownian fluctuations, the field perturbation induces a significant breakdown of the scallop theorem. {\color{black} However for large force fields the motor's diffusion nonetheless increases in Figure \ref{f3} due to the orientation of the motor's motion.} \begin{figure \centering \includegraphics[height=6.6 cm]{FIG6.pdf} \caption{(color online) Mobility efficiency coefficient $\displaystyle{\epsilon= {<r^{2}(n\tau_{p})>\over 2n<r^{2}(\tau_{p}/2)>} }$ with $n=3$, versus the maximum moment for the time asymmetric motor. Values larger than $1$ imply that the motor has a preferential direction.} \label{f6} \end{figure} The time asymmetric motor's efficiency behaves differently (see Figure 6). It increases at the same threshold value, but do not decreases for large fields saturating instead to $\epsilon \approx 2.6$. As the breakdown of the scallop theorem for the time asymmetric motor doesn't relies only on Brownian motion but on the time asymmetry of the motor, the scallop theorem is not restored for large fields, explaining the large efficiency for large fields. {\color{black} The large values are here due to the orientation of the motor towards the field.} Eventually, this difference between the motor's efficiencies explains the difference between the motor's diffusion coefficients observed in Figure \ref{f3}. {\color{black} \subsection{Comparison of the two motor's displacements} In Figure \ref{f3x} we show the two motor's mean square displacements (MSD) for different force fields and temperatures. Figure \ref{f3x}a corresponds to a temperature for which the medium is solid when the motor is off. The dark-green curve (bottom) is flat showing that the medium is actually solid when the motor is off. At very short time scales, the ballistic regime gives us the average temperature of the motor. Figure \ref{f3x}a shows that the motor's temperature is $15\%$ larger when the motor is active than inactive while we didn't find any difference for the medium around it. However the ballistic part of the curves (giving the temperature) was calculated during the foldings only and do not take into account the long relaxation. Therefore the motor's temperature is actually smaller than the ballistic regime suggests in the Figure. The Figure shows that the time asymmetric motor is the more efficient of the two motors, for weak and large fields, but not for fields in between. The blue and dark blue curves superimpose, showing that for the corresponding field range the time asymmetric and symmetric motors are equivalent. We observe the same results at a larger temperature in Figure \ref{f3x}b when the medium is liquid. These results are in agreement with the time symmetric motor's maximum efficiency for intermediate fields observed in Figure \ref{f5}, and with the comparison between diffusive coefficients in Figure \ref{f3}. When the external field gives a privileged direction to the motor, we observe displacements larger than diffusive (see for example the end of the black curve on the top) as expected for a directional motion. For the time symmetric motor, we expect these super-diffusive behaviors to disappear for larger time scales, due to symmetry (as the $X$ and $-X$ directions are equivalent for that motor). The super-diffusive behavior demonstrates that the motor moves by its own, as a motor carried by the medium would be purely diffusive. } \begin{figure \centering \includegraphics[height=6.6 cm]{FIG7A.pdf} \includegraphics[height=6.6 cm]{FIG7B.pdf} {\color{black} \caption{(color online) Motor's mean square displacement $<r^{2}(t)>$ (a) At a temperature for which the medium without stimuli is solid T=30K, (b) the medium is a viscous liquid T=50K. In each Figure, from bottom to top the curves correspond to: The motor off and no field (dark green curve); the motor on: no field ($F.d$=0), time symmetric motor (red curve), then asymmetric (dark red curve); $F.d=6.6$ $10^{2} pN.$\AA\ : symmetric (blue curve), then asymmetric (dark blue curve) these two curves superimpose almost perfectly for both temperatures; $F.d= 6.6$ $10^{3} pN.$\AA\ time symmetric (gray curve) then asymmetric (black curve). } \label{f3x} } \end{figure} \subsection{Elementary displacements of the nano-swimmer} \begin{figure \centering \includegraphics[height=6.6 cm]{FIG8A.pdf} \caption{(color online) Mean square displacement of the motors after one flap ($\Delta t=\tau_{p}/4$) versus the maximum moment.} \label{f7} \end{figure} In this section we describe the motors displacements following each arm flap. The elementary displacements after the first to the fourth flaps of the motors {\color{black} are displayed respectively} in Figures \ref{f7}, \ref{f8}, \ref{f9} and \ref{f10}. After the first motor's flap in Figure \ref{f7}, the time symmetric and time asymmetric motors behave the same way as the time asymmetry didn't still act. $<r^{2}(\tau_{p}/4)>$ is small and constant below the force field moment threshold and then {\color{black} increases continuously above the threshold.} \begin{figure \centering \includegraphics[height=6.6 cm]{FIG8B.pdf} \caption{(color online) Mean square displacement of the motors after the second flap ($\Delta t=\tau_{p}/2$) versus the maximum moment.} \label{f8} \end{figure} After the second flap, {\color{black} we observe a small difference between the two motors average displacements} in Figure \ref{f8}. {\color{black} Notice that due to the averaging on the time origin, the second flap is not similar in the displacement calculations for the two motors.} While for the time symmetric motor the displacements are only slightly larger than after the first flap, for the time asymmetric motor the displacements are larger even at zero field. {\color{black}The difference between the displacements of the two motors is approximately constant on the Figure.} \begin{figure \centering \includegraphics[height=6.6 cm]{FIG8C.pdf} \caption{(color online) Mean square displacement of the motors after the third flap ($\Delta t=3\tau_{p}/4$) versus the maximum moment.} \label{f9} \end{figure} After the third flap in Figure \ref{f9}, the displacement of the time symmetric motor increases and becomes approximately equal to the time asymmetric motor displacement around the threshold. For large fields in contrast the time asymmetric motor displacement increases rapidly to values much larger than the time symmetric motor's displacements. {\color{black} The alignment of the motor towards the field leads to much larger displacements for the time asymmetric motor, as the scallop theorem begins to apply for that third step on the symmetric motor leading to backward motions.} \begin{figure \centering \includegraphics[height=6.6 cm]{FIG8D.pdf} \caption{(color online) Mean square displacement of the motors after the last flap ($\Delta t=\tau_{p}$) versus the maximum moment.} \label{f10} \end{figure} Eventually after the fourth and last flap in Figure \ref{f10}, the mean square displacements of the two motors is similar up to the threshold field's value and separate for large fields, the time asymmetric motor displacement being much larger. Notice that the time symmetric motor's displacement for large field after the last flap is approximately equal to its displacement after the first flap ($2.5$\AA$^{2}$), showing that the scallop theorem applies on the time symmetric motor. Notice that Brownian noise forces are rather large in our conditions, leading to a large external force field to counterbalance it. The Brownian noise forces can be lowered using a medium at lower pressure, but it will also increase at higher temperature. The threshold external torque in our system is around $100pN.$\AA. It corresponds {\color{black} in an example motor molecule (A typical azobenzene molecule is approximately $15$ \AA\ long)} to opposite forces of $10pN$ separated by a $10$ \AA\ distance. {\color{black} We used a shorter distance $d=4$\AA\ in our simulations in order to put the forces on non moving parts of the molecule (to insure the observed effects are not generated by the work induced by external forces on motor's moving parts). } For an electric charge $q=e${\color{black}, $10$pN forces} correspond to an electric field of $6. 10^{7} V/m$. Fields of that magnitude or larger can be encountered near polarized interfaces for example. {\color{black} The motor's alignment can also be generated by the environment if the long motor is embedded inside a nematic or smectic liquid crystal (see for example ref.\cite{lc1,lc2,lc3}), the interactions with the liquid crystal molecules orienting the motor. Eventually, the alignment can also be generated by confinement inside nanopores or on surface walls\cite{conf1}. } For application purposes our motor can be created with two chemically bounded azobenzene molecules or derivatives. That flat molecule in its trans conformation has the property of photo-isomerization, folding into its cis conformation when subjected to a light stimulus. The molecule then relaxes to its trans conformation, a relaxation that can be accelerated by a second light stimulus. For further information on azobenzene photo-isomerization properties and applications, see the sound authoritative review by Natansohn and Rochon ref.\cite{azo1} {\color{black} and recent applications \cite{az1,lc1,flu1,flu2,flu3,conf1}. } \vskip 1cm \section{Conclusion} In this work we have used molecular dynamics simulations to study the effect of an electric field on the motion of a polarized molecular motor (nano-swimmer). Our objectives were to induce a breakdown of the scallop theorem from the anisotropic motion induced by the electric field and to orient the motion of the swimmer in the direction of the field. To evaluate the extent of the scallop theorem {\color{black} breakdown}, we compared the motions of a nano-swimmer with a time reversible sequence of flaps, with the motion of the same swimmer with a non-reversible sequence of flaps. We found a field threshold for the orientation of the swimmer's motion that is the same for both swimmers. The two swimmers share the same displacements around the threshold, showing that the Purcell's theorem is also broken for the time symmetric swimmer in that field range. In agreement with that interpretation, the mobility efficiency $\epsilon$ measuring the extent of the breakdown of the theorem displays a wide peak around that field range for the time symmetric swimmer. Therefore there is a field range for which, due to the competition of the orientation field and Brownian forces, Purcell's theorem is broken for the time symmetric motor. For larger fields, the motion of the swimmer is oriented in the direction of the field, increasing the displacements even for the time symmetrical swimmer hindered by Purcell's theorem. Then the swimmer's orientation saturates as the swimmer tends to be totally oriented in the direction of the field. For small and large fields, the time asymmetrical swimmer is more efficient, as expected by Purcell\cite{scallop1}. Eventually, our results suggest a development in nano-swimmers embedded inside liquid crystals with and without electric fields.
\section{Introduction.} Last Passage Percolation (LPP) belongs to the KPZ universality class where models of random surface growth exhibit height and transversal fluctuations exponent of order $\nicefrac{1}{3}$ and $\nicefrac{2}{3}$ respectively. The different models in the KPZ universality class are believed to have the same limiting behaviour under this scaling. The LPP with exponential weights belongs to the set of models in the KPZ universality class that are exactly solvable, or integrable. For models in this group, one can obtain closed form expressions for their prelimiting statistics. Coupling this with techniques from combinatorics, representation and random matrix theory, one can take the limits of the prelimiting expression to obtain the statistics of the limiting object. By the KPZ universality conjecture, this should be the limit of all models in the KPZ universality class. One of the interesting questions about the model is its local prelimiting fluctuations. To make this more concrete, let $G_x$ be the last passage time between the points $(0,0)$ and $x$. Define \begin{align}\label{bc} L^N_{(x,y)}=G_{(N,N)+y}-G_{(N,N)+x}. \end{align} It is known that if $|x|,|y|=O(1)$, then $L^N$ should be close to a stationary cocycle called Busemann function \cite{geor-rass-sepp-17-buse}. In fact, these stationary cocycles are defined as, roughly speaking, the limits when $N$ is taken to infinity in \eqref{bc}. Busemann functions can be thought of as the extension of the stationary LPP to the whole lattice and play a major role in the study of infinite geodesics. The main contribution of this paper is to show the convergence in total variation of $L^N$ to the Busemann function when $|x|,|y|\leq \delta N^\frac{2}{3}$ and $\delta$ goes to $0$. Moreover, the results are quantitative; we show that the decay of the error is polynomial in $\delta$. We stress that this cannot be simply obtained by using the 'Crossing Lemma'. Indeed, in order to compare the LPP increments to those of the stationary LPP one must tweak the intensity of the stationary LPP by order of $N^{-\frac{1}{3}}$ such that the error of the approximation along each edge is of the order of $N^{-\frac{1}{3}}$ as well. Therefore, a simple union bound on the different $N^\frac{2}{3}$ edges will give $N^\frac{2}{3}N^{-\frac{1}{3}}=N^\frac{1}{3}$ and will not work. In a recent work, Fan and Sepp{\"a}l{\"a}inen \cite{fan-sepp-arxiv} obtained a coupling of different Busemann functions using queueing mapping. We use new insights on this coupling to obtain the result which we refer to as \textit{local stationarity}. The rest of our results are applications of local stationarity to questions about the $\text{Airy}_2$ process and geodesics. LPP can be viewed as a $1+1$ dimensional growing surface, and also as a Markov process that takes values in the space of continuous functions. Using the $1:2:3$ KPZ scaling, the conjectural limit of this Markov process is believed to be the KPZ-fixed point \cite{matetski2016kpz}. An extension of this limiting object was shown to exist recently in \cite{dauvergne2018directed}. In \cite{joha-03} Johansson showed the convergence of the spatial fluctuations to the $\text{Airy}_2$ process minus a parabola and that the limit is continuous. As was mentioned previously, the fact that LPP has stationary counterparts whose spatial fluctuations are that of a simple random walk suggests that locally, the $\text{Airy}_2$ process should have a Brownian behaviour around a fixed point. The existing results in the literature regarding the Brownian behaviour of the $\text{Airy}_2$ process can be roughly divided into two groups - \begin{enumerate} \item \label{g1} on a small interval $[0,\epsilon]$ the $\text{Airy}_2$ process should be close to the Brownian motion in some sense \medskip \item \label{g2} on the interval $[0,1]$ the law of the $\text{Airy}_2$ process can be related to that of the Brownian motion. \end{enumerate} \medskip In Group (\ref{g1}), Pimentel \cite{pime-16}, in the LPP setup, showed that locally the $\text{Airy}_2$ process converges weakly to a Brownian motion in the Skorohord topology. The proof relied on a technique called 'Comparison Lemma' or 'Crossing Lemma'. The idea is that the spatial increments of the last passage time can be compared with high probability to stationary increments with a small drift. In \cite[Theorem 4.14]{matetski2016kpz}, Matetski, Quastel and Remenik showed that the $\text{Airy}_2$ process has Brownian regularity and converges to the two-sided brownian motion in finite dimensional distributions. In \cite{pimentel2019brownian} (where some of the results lie in Group (\ref{g2})) Pimentel extends the results in \cite{pime-16} while the convergence is still in the weak sense. In Group (\ref{g2}), Corwin and Hammond \cite{corw-hamm-14} showed that the Airy line ensemble minus parabola, conditioned on its values at the boundaries has the distribution of Brownian bridges conditioned not to meet. Building on these ideas, Hammond obtained through the Brownian LPP \cite{hammond2016brownian}, among other things, a control on the moment of the Radon-Nykodim derivative of the law of the Airy line ensemble with respect to the Brownian bridge and a modulus of continuity of the $\text{Airy}_2$ process (see also \cite{calvert2019brownian}). In LPP on the lattice, control on the modulus of continuity of the prelimiting spatial fluctuations was obtained in \cite{basu2018time} by Basu and Ganguly. In \cite{dauvergne2018basic} Dauvergne and Vir\'ag, using better insight on the sampled Airy line ensemble, managed to show that the Airy line ensemble can be approximated, in total variation, by Brownian bridges, conditioned on not intersecting, without the conditioning on the lower boundary that appears in the Brownian Gibbs property. Our result is concerned in comparing the $\text{Airy}_2$ process with a Brownian motion on a small interval. Our result on the Brownian regularity of $\text{Airy}_2$ process lies in Group (\ref{g1}). In Theorem \ref{thm:airy} we show that $\text{Airy}_2$ process is close to a Brownian motion of rate $2$ in total variation. This improves similar results in Group (\ref{g1}). As a consequence we show in Corollary \ref{thm:airyr} that the regularity of the $\text{Airy}_2$ process cannot be better than that of the Brownian one. Note that Corollary \ref{thm:airyr} can also be deduced by \cite[Theorem 1.1]{calvert2019brownian}. Next we apply local stationarity to study two aspects of the behaviour of geodesics, their behaviour close to the end points which we refer to as \emph{stabilization}, and the coalescence of point to point geodesics starting from two points whose distance scales with $N$. Let us start with the latter. In the past few years the study of coalescence of geodesics has gained focus. Methods for the study of geodesics of growth models can be traced back to Newman and co-authors in \cite{howa-newm-01,howa-newm-97,lice-newm-96,newm-icm-95} for First Passage Percolation (FPP), another random growth model believed to be in the KPZ universality class. These methods were then used by Ferrari and Pimentel \cite{ferr-pime-05} and Coupier \cite{coup-11} to show that in LPP, for a fixed direction, from any point in the lattice there exists a.s.\ a unique infinite geodesic and that these geodesics coalesce. A first quantitive result on the coalescence of geodesics in LPP came from Pimentel \cite{pime-16}, who showed that two infinite geodesics with the same direction, coming out of two points that are $k$ away from each other will coalesce after about $k^{\nicefrac{3}{2}}$ steps. The tail of the decay was conjectured to be of exponent $-\nicefrac{2}{3}$. The proof used the fact that the geodesic tree has the same distribution as its dual tree and existing bounds on the distribution of exit point of a geodesic of stationary LPP. The question of showing that the geodesics will not coalesce too far compared to $k$ i.e.\ a matching upper bound, was left open. This question was then taken up by Basu, Sarkar and Sly \cite{basu-sark-sly-arxiv-17} who proved the -$\nicefrac{2}{3}$ exponent for the lower bound and a matching upper bound. In that paper, the authors also proved a polynomial upper bound for point to point coalescence. In \cite{sepp2019coal} Sepp{\"a}l{\"a}inen and Shen, studied coalescence of infinite geodesics. Without relying on integrable probability methods, they proved the upper bound and a new exponential lower bound for fast coalescence of the geodesics. In \cite{zhang2019optimal} Zhang proved the optimal bounds of $-\nicefrac{2}{3}$ for point to point coalescence of two geodesics leaving from two points of fixed distance $k$. The proof relies on diffusive concentration of geodesics fluctuations coming from integrable probability. In this work, we also study the coalescence of two geodesics starting from two points whose distance scales with the length of the geodesics. Results of that flavour were proved in \cite{hammond2020exponents} and \cite{basu2019fractal} for Brownian LPP, and in \cite{FerrSpohn2003} for Poissonian LPP. More precisely, we are interested in the following question; if $\pi^1$ and $\pi^2$ are the geodesics starting from $(0,0)$ and $(0,N^\frac{2}{3})$ respectively, terminating at $(N,N)$, what is the typical distance of the coalescence point from the three endpoints? We show in Theorem \ref{thm:ubc} and Theorem \ref{thm:ubc2} that the coalescence point will not be too close, on a macroscopic scale, to any of the end points. We emphasize that the methods used in \cite{pime-16} and \cite{sepp2019coal} cannot be used here, as they rely on a well understood duality principle for stationary LPP geodesics \cite{sepp-arxiv-18}. Let us now turn to stabilization. Let $\pi$ be the geodesic going from $(0,0)$ to the point $(N,N)$. Since the work of Johansson in \cite{joha-ptrf-00} it is known that the fluctuations of $\pi$ around the diagonal at any macroscopic point should be of order $N^{\nicefrac{2}{3}}$. If $1 \leq l << N$, as the geodesic is expected to have a self-similarity property, one would expect the fluctuation of $\pi$ in a square of size $l^2$ around the origin to be of order $l^{\nicefrac{2}{3}}$. A proof of this was given in \cite[Theorem 3]{basu-sark-sly-arxiv-17} with diffusive concentration bounds. In \cite{hammond2016brownian} Hammond considered the regularity of the spatial fluctuation around the point $(l,l)$ for the Brownian LPP while for the Corner Growth Model with exponential weights this was proven in \cite[Theorem 3]{basu2018time} by Basu and Ganguly. The behaviour of infinite geodesics is somewhat better understood. This is due to the fact that the Busemann functions 'point out' the way in which the geodesic go, through the minimum gradient principle \cite{sepp-arxiv-18,geor-rass-sepp-17-geod,geor-rass-sepp-17-buse}. This implies that a link between point to point geodesics and infinite ones should provide better insight on the former. Consider a small square of side length $M$ around the origin. From each point in the square leaves a unique geodesic that terminate at the point $(N,N)$. Let us denote by $\mathcal{T}^{pp}$ the tree consisting of all the geodesics starting from the square and ending at the point $(N,N)$. Similarly let $\mathcal{T}^{\infty}$ be the tree that consists of all infinite geodesics of direction $45^\circ$ starting from the square. Our stabilization result, Theorem \ref{thm:stb}, shows that on a square of side $M=\delta N^\frac{2}{3}$, the trees $\mathcal{T}^{pp}$ and $\mathcal{T}^{\infty}$ agree outside a set of probability of order power of $\delta$. We use this to show in \eqref{cor:stp}, for example, that the fluctuations of the point to point geodesic in a small box of side $l$ around the origin are, with high probability, the same as those of a stationary geodesic for which the fluctuations are known to be of the order $l^\frac{2}{3}$. Finally, we use stabilization to study coalescence of point to point geodesics where the distance of the starting point is fixed. More precisely, for fixed $k>0$ let $\pi^1$ and $\pi^2$ be the geodesics starting from $(0,0)$ and $(0,k^\frac23)$ respectively. Let $u^N$ be the coalescence point of $\pi^1$ and $\pi^2$. Similarly let $v^*$ be the coalescence point of two infinite geodesics starting at the points $(0,0)$ and $(0,k^\frac23)$ in direction $(1,1)$. Theorem \ref{thm:stpp} shows that $u^N$ converges weakly to $v^*$. In particular, using the results in \cite{basu-sark-sly-arxiv-17}, we show that the exponent for the decay of the tail of the distance of $u^N$ from the origin is $-\nicefrac{2}{3}$ as was shown in \cite{zhang2019optimal}. The main body of our arguments only uses probabilistic methods. The only integrable-probability input we use is the emergence of the $\text{Airy}_2$ process as the limit of the increments of the last passage time. \vspace*{4px}\\ {\bf Some general notation and terminology} $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\ge0}=\{0,1,2,3, \dotsc\}$ and $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}=\{1,2,3,\dotsc\}$. For $n\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}$ we abbreviate $[n]=\{1,2,\dotsc,n\}$. A sequence of $n$ points is denoted by $x_{0,n}=(x_k)_{k=0}^n=\{x_0,x_1,\dotsc,x_n\}$, and in case it is a path of length $n$ also by $x_{\bbullet}$. $a\vee b=\max\{a,b\}$. $C$ is a constant whose value can change from line to line. The standard basis vectors of $\R^2$ are $e_1=(1,0)$ and $e_2=(0,1)$. For a point $x=(x_1,x_2)\in\R^2$ the $\ell^1$-norm is $\abs{x}=\abs{x_1} + \abs{x_2}$ . We call the $x$-axis occasionally the $e_1$-axis, and similarly the $y$-axis and the $e_2$-axis are the same thing. Inequalities on $\R^2$ are interpreted coordinatewise: for $x=(x_1,x_2)\in\R^2$ and $y=(y_1,y_2)\in\R^2$, $x\le y$ means $x_1\le y_1$ and $x_2\le y_2$. Notation $[x,y]$ represents both the line segment $[x,y]=\{tx+(1-t)y: 0\le t\le 1\}$ for $x,y\in\R$ and the rectangle $[x,y]=\{(z_1,z_2)\in\R^2: x_i\le z_i\le y_i \text{ for }i=1,2\}$ for $x=(x_1,x_2), y=(y_1,y_2)\in\R^2$. The context will make clear which case is used. $0$ denotes the origin of both $\R$ and $\R^2$. $X\sim$ Exp($\lambda$) for $0<\lambda<\infty$ means that random variable $X$ has exponential distribution with rate $\lambda$, in other words $P(X>t)=e^{-\lambda t}$ for $t\ge 0$. The mean is $E(X)=\lambda^{-1}$ and variance $\Var(X)=\lambda^{-2}$. In general, $\overline X=X-EX$ denotes a random variable $X$ centered at its mean. If $x<y$ we write $\lzb x,y \rzb$ for the set of integers $[x,y]\cap \mathbb{Z}$. If $x,y\in \mathbb{R}^2$ such that $x\leq y$ we denote by $\lzb x,y \rzb =[x,y]\cap \mathbb{Z}^2$. If $A\subset \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ is connected, we let $\mathcal{E}(A)$ denote the set of edges induced by $A$ in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$. \section{Main results} Let $\omega=\{\omega_x\}_{x\in \mathbb{Z}^2}$ be a set of random weights on the vertices of $\mathbb{Z}^2$. We assume that $\omega$ is i.i.d.\ of $\text{Exp}(1)$ distribution. For $o\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, we define the last-passage time on $o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\geq0}^2$ to be \begin{equation}\label{v:G} G_{o,y}=\max_{x_{\brbullet}\,\in\,\Pi_{o,y}}\sum_{k=0}^{\abs{y-o}_1}\omega_{x_k}\quad\text{ for } y\in o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\geq 0}^2. \end{equation} $\Pi_{o,y}$ is the set of paths $x_{\bbullet}=(x_k)_{k=0}^n$ that start at $x_0=o$, end at $x_n=y$ with $n=\abs{y-o}_1$, and have increments $x_{k+1}-x_k\in\{e_1,e_2\}$. The a.s.\ unique path $\pi^{o,y}\in \Pi_{o,y}$ that attains the maximum in \eqref{v:G} is called the geodesic from $o$ to $y$. Similarly we define the stationary LPP (see \eqref{Gr2}) $G^{\frac{1}{2}}_{o,y}$ associated with the direction $(1,1)$. Let $\rim{R}^c=[N\xi-cN^\frac{2}{3}\xi,N\xi]$ be the rectangle whose lower left corner is $(N-cN^\frac{2}{3},N-cN^\frac{2}{3})$ and whose upper right corner is $(N,N)$. Let $\mathcal{E}(\rim{R}^c)$ be the set of directed edges in the subgraph of $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ induced by the vertices in $\rim{R}^c$. We define the following random variables indexed by $\mathcal{E}(\rim{R}^c)$ \begin{align*} H^{N,c}_{(x,y)}&=G_{o,y}-G_{o,x} \quad (x,y)\in \mathcal{E}(\rim{R}^c)\\ H^{\frac{1}{2},N,c}_{(x,y)}&=G^{\frac{1}{2}}_{o,y}-G^{\frac{1}{2}}_{o,x}, \end{align*} and \begin{align*} H^{N,c}&=\Big\{H^{N,c}_{(x,y)}\ :\ (x,y)\in \mathcal{E}(\rim{R}^c)\Big\}\\ H^{\frac{1}{2},N,c}&=\Big\{H^{\frac{1}{2},N,c}_{(x,y)}\ :\ (x,y)\in \mathcal{E}(\rim{R}^c)\Big\}. \end{align*} Let $d_\text{TV}(\cdot,\cdot)$ denote the total variation distance between two distributions. If $X\sim\mu$ and $Y\sim \nu$, we abuse notation and write $d_\text{TV}(X,Y)$ for $d_\text{TV}(\mu,\nu)$. The following is the main result of the paper. It shows that on the scale of $N^\frac{2}{3}$, around the point $(N,N)$, local increments of $G$ {\bf jointly equal} to those in $G^{\frac{1}{2}}$ with high probability. The choice of $\frac{1}{2}$ is for a neater exposition of the result, our proof is for every $0<\rho<1$, where the constants depend on $\rho$. \begin{theorem}\label{thm:loc} There exists $c_0>0$ and $C(c_0)>0$, such that for $c\leq c_0$ and $N\geq1$ \begin{align}\label{loc} d_\text{TV}\Big(H^{N,c},H^{\frac{1}{2},N,c}\Big)\leq Cc^\frac{3}{8}. \end{align} \end{theorem} Let \begin{align*} L^N_x=2^{-\frac{4}{3}}N^{-\frac{1}{3}}\Big(G_{(0,0),(N+x(2N)^\frac{2}{3},N-x(2N)^\frac{2}{3})}-4N\Big). \end{align*} It is known \cite{BoroFerr2008} that $L^N_x\rightarrow\mathcal{A}_2(x)-x^2$ as $N\rightarrow \infty$, where $\mathcal{A}_2(x)$ is the $\text{Airy}_2$ process and the convergence is in distribution, in the topology of continuous functions on compact sets. Set \begin{align*} \mathcal{A}'_2(x)=\mathcal{A}_2(x)-\mathcal{A}_2(0)-x^2. \end{align*} Let $\mathcal{B}$ be an two-sided Brownian motion of variance $2$ on $\R$. Our next result shows that locally, the $\text{Airy}_2$ process looks like a Brownian motion in a strong sense. It follows easily from Theorem \ref{thm:loc} (see a proof in the end of Section \ref{sec:stb}). \begin{theorem}\label{thm:airy} There exists $c_0>0$ and $C(c_0)>0$, such that for $c\leq c_0$ \begin{align*} d_\text{TV}\Big(\mathcal{A}'_2|_{[-c,c]},\mathcal{B}|_{[-c,c]}\Big)\leq Cc^\frac{3}{8}. \end{align*} \end{theorem} Let $I\subset \R$ be an interval and let \begin{align*} \omega_B(t)=2\sqrt{t\log(t)^{-1}} \end{align*} be the modulus of continuity of the Brownian motion. In \cite[Theorem 1.11]{hammond2016brownian} Hammond showed that the regularity of the Airy process is not worse than that of a Brownian motion i.e.\ \begin{align*} \sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}_2(t+h)-\mathcal{A}_2(t)}{\omega_B(h)}< \infty\quad \text{with probability $1$}. \end{align*} As a corollary of Theorem \ref{thm:airy}, we show that the regularity of the $\text{Airy}_2$ process is not better than that of a Brownian motion. \begin{corollary}\label{thm:airyr} \begin{align*} \sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}_2(t+h)-\mathcal{A}_2(t)}{\omega_B(h)}\geq 1\quad \text{with probability $1$}. \end{align*} \end{corollary} Let us now turn to our stabilization results. The set of possible asymptotic velocities or direction vectors for semi-infinite up-right paths is $\mathcal U=\{(t, 1-t): 0\le t\le 1\}$, with relative interior ${\mathrm{ri\,}}\mathcal U=\{(t, 1-t): 0< t<1\}$. For $\xi \in {\mathrm{ri\,}} \mathcal U$, let $\mathcal{R}^{\xi,N}=[0,N\xi]$ be the rectangle whose lower left corner is $(0,0)$ and upper right corner is $N\xi$. Let $\pi$ be an up-right path whose origin is $(0,0)$. Let $I^\pi=\{i:\pi_i\in \mathcal{R}^{\xi,N}\}$ be the set of indices of $\pi$ for which $\pi$ is in $\mathcal{R}^{\xi,N}$. We define $\mathcal{P}^{\xi,N}(\pi)$ to be the restriction of the path $\pi$ on the rectangle $\mathcal{R}^{\xi,N}$, that is, $\mathcal{P}^{\xi,N}(\pi)$ is a finite path defined by \begin{align} (\mathcal{P}^{\xi,N}(\pi))_i=\pi_i \quad \forall i\in I^\pi. \end{align} Let $\pi^{x,\xi\infty}$ be the infinite geodesic starting from $x$ whose direction is $\xi$ \cite{sepp-arxiv-18}. For $M<N$, define the following event \begin{align}\label{Sf} \mathcal{S}^{\xi,M}=\{\mathcal{P}^{\xi,M}(\pi^{x,\xi\infty})=\mathcal{P}^{\xi,M}(\pi^{x,\xi N})\text{ for all } x\in \mathcal{R}^{\xi,M}\}. \end{align} $\mathcal{S}^{\xi,M}$ is the event on which any geodesic leaving from any site $x\in \mathcal{R}^{\xi,M}$ and terminating at $\xi N$ agree with the infinite geodesic $\pi^{x,\xi\infty}$ on $\mathcal{R}^{\xi,M}$ (see Figure \ref{fig:stb}). Our first result gives a lower bound on the probability of stabilization on small enough rectangles. \begin{theorem}\label{thm:stb} Let $\xi\in{\mathrm{ri\,}} \mathcal U$ and $c>0$. For any $M > 0$ such that $M\leq cN^\frac{2}{3}$, there exists $C(\xi,c)>0$, locally bounded in $c$, such that \begin{align} \P(\mathcal{S}^{\xi,M})\geq 1-CN^{-\frac{1}{4}}M^\frac{3}{8}. \end{align} \end{theorem} Define the the following set \begin{align} \mathcal{F}=\{f\in \R_+\rightarrow\R_+:\text{$f$ is increasing and $f(t)\leq t$}\}. \end{align} For $f\in \mathcal{F}$, we say the sequence $\bold{R}^{\xi,f}=\{\mathcal{R}^{\xi,f(N)}\}_{N\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}}$ stabilizes if \begin{align} \lim_{N\rightarrow \infty}\P(\mathcal{S}^{\xi,f(N)})=1. \end{align} In words, the sequence $\bold{R}^{\xi,f}$ stablizes if with high probability the tree of all the geodesics starting at points in $\mathcal{R}^{\xi,f(N)}$ and terminating at $\xi N$ agree on $\mathcal{R}^{\xi,f(N)}$ with the tree of infinite geodesics in direction $\xi $ starting from $\mathcal{R}^{\xi,f(N)}$. As $f$ is a function of $N$ we shall often write $f$ instead of $f(N)$ so that $\mathcal{R}^{\xi,f}=\mathcal{R}^{\xi,f(N)}$. As a corollary of Theorem \ref{thm:stb} we have the following. \begin{corollary}\label{cor:stb} For any $\xi\in{\mathrm{ri\,}} \mathcal U$ and $f\in \mathcal{F}$ such that $f(t)=o(t^\frac{2}{3})$, $\bold{R}^{\xi,f}$ stabilizes and there exists $C(\xi)>0$ such that \begin{align} \P(\mathcal{S}^{\xi,f})\geq 1-CN^{-\frac{1}{4}}f(N)^\frac{3}{8} \end{align} \end{corollary} \begin{figure}[t] \includegraphics[scale=1]{coalesence_pic_c.pdf} \caption{\small The infinite geodesic $\pi^{0,\xi \infty}$ and the geodesic $\pi^{0,\xi N}$ agree in the box $\mathcal{R}^{\xi,f}$. On the event $\mathcal{S}^{\xi,f}$ for any $x\in \mathcal{R}^{\xi,f}$ the geodesics $\pi^{x,\xi \infty}$ and $\pi^{x,\xi N}$ have the same restriction on the small square $\mathcal{R}^{\xi,f}$.}\label{fig:stb} \end{figure} \medskip As was mentioned earlier, stabilization can be used to study the behaviour of point to point geodesics close to their end points. For Fixed $M$, on $\mathcal{R}^{\xi,M}$ consider the stationary LPP $\rim{G}^{\rho}_{\xi (M+1),0}$ (see \eqref{Gr12}), starting from the point $\xi (N+1)$ and terminating at the origin. Let us denote its geodesic by $\rim{\pi}^\rho$. Let $\pi^{0,\xi N}$ be the geodesic of LPP starting from the origin $0$ and terminating at $\xi N$. The following corollary relates the behaviour of $\pi^{0,\xi N}$ to that of $\rim{\pi}^\rho$. \begin{corollary}\label{cor:stp} For fixed $M\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> 0}$ \begin{align}\label{stp} \lim_{N\rightarrow \infty}d_{TV}\big(\rim{\pi}^\rho,\mathcal{P}^{\xi,M}(\pi^{0,\xi N})\big)=0. \end{align} In particular, there exists $C(\xi)>0$ such that for $l\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> 0}$ \begin{align}\label{stp1} \lim_{N\rightarrow \infty}\P(|\pi^{0,\xi N}_2l-(l,l)|>rl^\frac{2}{3})\leq Cr^{-3}. \end{align} \end{corollary} \begin{proof} \eqref{stp} follows from Corollary \ref{cor:stb} and the fact that, the distribution of an infinite geodesic going backwards is that of a stationary one (see the proof of Theorem \ref{thm:stb}). \eqref{stp1} follows from \eqref{stp} and well known bounds on the fluctuations of stationary geodesics \cite[Theorem 5.3]{sepp-cgm-18}. \end{proof} Stabilization can help relating results on infinite geodesics to results on point-to-point geodesics and vice versa. Consider the points $v_1=(0,0)$ and $v_2=k^{\nicefrac{2}{3}}e_2$ for some $k\geq1$. Let $\pi^{v_1,\xi \infty}$ and $\pi^{v_2,\xi \infty}$ be the infinite geodesics in direction $\xi$ starting from $v_1$ and $v_2$ respectively. Let $v^*=(v^*_1,v^*_2)$ be the point in $\pi^{v_1,\xi \infty}\cap \pi^{v_2,\xi \infty}$ that is closest to the origin. Similarly let $u^N$ be the closest point in $\pi^{v_1,\xi N}\cap \pi^{v_2,\xi N}$ to the origin. In \cite{basu-sark-sly-arxiv-17} Basu, Sarkar and Sly showed that there exist universal constants $C_1,C_2,R_0$ such that for every $k>0$ and $R>R_0$ \begin{align}\label{bss3} C_1R^{-\frac{2}{3}}\leq \P(|v^*|>Rk) \leq C_2R^{-\frac{2}{3}}. \end{align} Moreover, they showed that there exist $C,R_0,c>0$ such that for every $k>0$ and $R>R_0$ \begin{align}\label{bss} \limsup_{n\rightarrow \infty} \P(u_1^N>Rk)\leq CR^{-c}. \end{align} The exponent $c$ in \eqref{bss} was not identified but was conjectured to be $\nicefrac{2}{3}$. This was recently settled by Zhang in \cite{zhang2019optimal} using input from integrable probability. We now show how this can be approached via our stabilization result. \begin{theorem}\label{thm:stpp} The sequence $|u^{N}|$ converges weakly to $|v^*|$. Moreover, there exist universal constants $C_1,C_2,R_0>0$ such that for $R>R_0$, for any $k\geq 1$ and $N>(Rk)^5$ \begin{align*} C_1R^{-\frac{2}{3}}\leq \P(|u^N|>Rk) \leq C_2R^{-\frac{2}{3}}. \end{align*} \end{theorem} \begin{proof} If exactly one of the events $\{|v^*|>Rk\},\{|u^N|>Rk\}$ occurs then paths must not have coalesced in $\mathcal{R}^{\xi,\frac12 Rk}$, in other words, $\mathcal{S}^{\xi,\frac12 Rk}$ does not occur. Therefore, via the symmetric difference and using Theorem \ref{thm:stb}, \begin{align*} |\P(|v^*|>Rk)-\P(|u^N|>Rk)|\leq \P\big(\{|v^*|>Rk\}\Delta\{|u^N|>Rk\}\big)\leq \P\big((\mathcal{S}^{\xi,\frac12 Rk})^\text{c}\big)\leq N^{-\frac{1}{4}}(Rk)^{\frac{3}{8}}, \end{align*} which shows that $|v^{N}|$ converges weakly to $|v^*|$. Taking $N=(Rk)^{5}$ and using Theorem \ref{thm:stb} \begin{align} \P(|v^*|>Rk)- R^{-\frac{7}{8}}\leq \P(|u^N|>Rk)\leq \P(|v^*|>Rk)+ R^{-\frac{7}{8}}\label{bss2}. \end{align} As $\nicefrac{7}{8}> \nicefrac{2}{3}$ \eqref{bss2} and \eqref{bss3} imply the result. \end{proof} \medskip Let us now turn to our coalescence results. In $\mathcal{R}^{\xi, N}$, consider the points $o=\xi N$, $q^1=(0,0)$ and $q^2=aN^\frac{2}{3}e_2$ where $a>0$ and where we assume that $N$ is large enough so that $q^2\in \mathcal{R}^{\xi, N}$. Let \begin{align} \mathcal{C}} \def\cD{\mathcal{D}^{a,\xi}=\pi^{q^1,o}\cap \pi^{q^2,o}, \end{align} be the points shared by the geodesics starting from $q_i$ and terminating at $o$ for $i\in {1,2}$. We define the coalescence point $p_c$ to be the unique point such that \begin{align} p_c\in \mathcal{C}} \def\cD{\mathcal{D}^{a,\xi} \quad \text{and} \quad p_c\leq x \quad \forall x\in \mathcal{C}} \def\cD{\mathcal{D}^{a,\xi}, \end{align} as in Figure \ref{fig:coal}. Our next result shows that the point $p_c$ is not likely to be too close to the point $o$ on a macroscopic scale. \begin{theorem}\label{thm:ubc} For every $a>0$ and $\xi\in{\mathrm{ri\,}}\mathcal U$, there exists a constant $C(\xi,a)>0$, locally bounded in $a$, such that for every $0<\alpha<1$ and $N>N(\alpha)$ \begin{align}\label{cub} \P(|o-p_c|\leq \alpha N)\leq C\alpha^\frac{2}{9}. \end{align} \end{theorem} The following result shows that the geodesics $\pi_{q^1,o}$ and $\pi_{q^2,o}$ do not coalesce too close to their origins on a macroscopic scale. Although the proof does not require local stationarity, we state it for completeness. \begin{theorem}\label{thm:ubc2} For every $a>0$ and $\xi\in{\mathrm{ri\,}}\mathcal U$, there exists a constants $C(\xi,a)>0$ such that for every $0<\alpha<1$ and $N>N(\alpha)$ \begin{align*} \P(|q^2-p_c|\leq \alpha N)\leq C\alpha^2. \end{align*} \end{theorem} \begin{figure}[t] \includegraphics[scale=1]{coal_pic_straight_c.pdf} \caption{\small Two geodesics leaving from two points that are $aN^\frac{2}{3}$ far from one another, meet at the point $p_c$ (red). With high probability the point $p_c$ is not too close to the points $q^1,q^2,o$ on a macroscopic scale}\label{fig:coal} \end{figure} \subsection{Acknowledgements} The authors thank B\'alint T\'oth for useful discussions and comments and Alan Hammond for guidance to the literature. \section{Preliminaries} \medskip{\bf Order on Geodesics} \\ We would like to construct a partial order on the set of non-intersecting paths in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$. For $x,y\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ we write $x \preceq y$ if $y$ is below and to the right of $x$, i.e. \begin{align} x_1 \leq y_1 \quad \text{and} \quad x_2\geq y_2. \end{align} We also write $x{\prec} y$ if \begin{align} x {\preceq} y \quad \text{and} \quad x\neq y \end{align} If $A,B\subset \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, we write $A \preceq B$ if \begin{align} x \preceq y \quad \forall x\in A,y\in B. \end{align} A down-right path is a bi-infinite sequence $\cY=(y_k)_{k\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$ in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ such that $y_k-y_{k-1}\in\{e_1,-e_2\}$ for all $k\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN$. Let $\mathcal{DR}$ be the set of infinite down-right paths in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$. Let $\gamma_1,\gamma_2$ be two up-right paths in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ we write $\gamma_1{\preceq} \gamma_2$ if \begin{align}\label{og} \gamma_1\cap \cY \preceq \gamma_2\cap\cY \quad \forall\cY\in \mathcal{DR}, \end{align} where we assume the inequality to be vacuously true if one of the intersections in \eqref{og} is empty(see Figure \ref{fig:ogs}). \begin{figure}[t] \includegraphics[scale=1]{order_on_geodesics_pic_c.pdf} \caption{\small The two geodesics $\gamma_1$ and $\gamma_2$ are ordered i.e. $\gamma_1{\prec} \gamma_2$. For any down-right path $\cY$ in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ the set of points $x=\cY\cap \gamma_1$ and $y=\cY\cap \gamma_2$ are ordered, i.e. $x{\prec} y$.}\label{fig:ogs} \end{figure} \medskip{\bf Stationary LPP} \\ For each $o=(o_1,o_2)\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ and a parameter value $\rho\in(0,1)$ we introduce the stationary last-passage percolation process $G^\rho_{o,\abullet}$ on $o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\ge0}^2$. This process has boundary conditions given by two independent sequences \begin{align}\label{IJ} \{I^\rho_{o+ie_1}\}_{i=1}^{\infty} \quad\text{and}\quad \{J^\rho_{o+je_2}\}_{j=1}^{\infty} \end{align} of i.i.d.\ random variables with marginal distributions $I^\rho_{o+e_1}\sim\text{Exp}(1-\rho)$ and $J^\rho_{o+e_2}\sim\text{Exp}(\rho)$. Put $G^\rho_{o,o}=0$ and on the boundaries \begin{equation}\label{Gr1} G^\rho_{o,\,o+\,ke_1}=\sum_{i=1}^k I_{ie_1} \quad\text{and}\quad G^\rho_{o,\,o+\,le_2}= \sum_{j=1}^l J_{je_2} . \end{equation} Then in the bulk for $x=(x_1,x_2)\in o+ \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}^2$, \begin{equation}\label{Gr2} G^\rho_{o,\,x}= \max_{1\le k\le x_1-o_1} \; \Bigl\{ \;\sum_{i=1}^k I_{o+ie_1} + G_{o+ke_1+e_2, \,x} \Bigr\} \bigvee \max_{1\le \ell\le x_2-o_2}\; \Bigl\{ \;\sum_{j=1}^\ell J_{o+je_2} + G_{o+\ell e_2+e_1, \,x} \Bigr\} . \end{equation} For a northeast endpoint $p\in o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}^2$, let $Z^\rho_{o,p}$ be the signed exit point of the geodesic $\pi^{o,p}_\bbullet$ of $G^\rho_{o,p}$ from the west and south boundaries of $o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}^2$. More precisely, \begin{align}\label{exit2} Z^\rho_{o,p}= \begin{cases} \argmax{k} \bigl\{ \,\sum_{i=1}^k I_{o+ie_1} + G_{o+ke_1+e_2, \,x} \bigr\}, &\text{if } \pi^{o,p}_1=o+e_1,\\ -\argmax{\ell}\bigl\{ \;\sum_{j=1}^\ell J_{o+je_2} + G_{o+\ell e_2+e_1, \,x} \bigr\}, &\text{if } \pi_1^{o,p}=o+e_2. \end{cases} \end{align} The value $G^\rho_{o,x}$ can be determined by \eqref{Gr1} and the following recursive relation \begin{align}\label{recu} G^\rho_{o,x}=\omega_x+G^\rho_{o,x-e_1}\vee G^\rho_{o,x-e_2}. \end{align} Relation \eqref{recu} implies that one can backtrack the geodesic $\pi^{o,p}$ in the box $[o+e_1+e_2,p]$ in the following way; for each (directed) edge $(x,y)$ in $[o+e_1+e_2,p]$ assign the weight ${w}_{x,y}=G^\rho_{o,y}-G^\rho_{o,x}$. Let $m=|p-o|$, and denote $p_i=\pi^{o,p}_{i}$. We have \begin{align}\label{recu2} &p_m=p,\\ &p_i= \begin{cases} p_{i+1}-e_1 &\mbox{if } {w}_{p_{i+1}-e_1,p_{i+1}}<{w}_{p_{i+1}-e_2,p_{i+1}} \\ \nonumber p_{i+1}-e_2 & \mbox{if } {w}_{p_{i+1}-e_1,p_{i+1}}>{w}_{p_{i+1}-e_2,p_{i+1}}\end{cases}\quad |Z^\rho_{o,p}| \leq i\leq m-1. \end{align} In other words, we trace the geodesic $\pi^{o,p}$ backwards up to the exit point from the boundaries, by following the edges on which the increments of the process $G^\rho_{o,p}$ are minimal.\\ Next we consider LPP maximizing down-left paths. For $y\leq o$, define \begin{equation}\label{v:Gr} \rim{G}_{o,y}=G_{y,o}. \end{equation} For each $o\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ and a parameter value $\rho\in(0,1)$ define a stationary last-passage percolation processes $\rim{G}^\rho$ on $o+\mathbb{Z}^2_{\le0}$, with boundary variables on the north and east, in the following way. Let \begin{align}\label{IJ hat} &\{I^\rho_{o-ie_1}\}_{i=1}^{\infty} \quad\text{and}\quad \{J^\rho_{o-je_2}\}_{j=1}^{\infty} \end{align} be mutually independent sequences of i.i.d. random variables with marginal distributions $I^\rho_{o-ie_1}\sim\text{Exp}(1-\rho)$ and $J^\rho_{o-je_2}\sim\text{Exp}(\rho)$. The boundary variables in \eqref{IJ} and those in \eqref{IJ hat} are taken independent of each other. Put $\rim{G}^\rho_{o,\,o}=0$ and on the boundaries \begin{equation}\label{Gr11} \rim{G}^\rho_{o,\,o-ke_1}=\sum_{i=1}^k I_{o-ie_1} \quad\text{and}\quad \rim{G}^\rho_{o,\,o-le_2}= \sum_{j=1}^l J_{o-je_2} . \end{equation} Then in the bulk for $x=(x_1,x_2)\in o+ \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{<0}^2$, \begin{equation}\label{Gr12} \rim{G}^\rho_{o,\,x}= \max_{1\le k\le o_1-x_1} \; \Bigl\{ \;\sum_{i=1}^k I_{o-ie_1} + \rim{G}_{ \,o-ke_1-e_2,x} \Bigr\} \bigvee \max_{1\le \ell\le o_2-x_2}\; \Bigl\{ \;\sum_{j=1}^\ell J_{o-je_2} + \rim{G}_{ \,o-\ell e_2-e_1,x} \Bigr\} . \end{equation} For a southwest endpoint $p\in o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{<0}^2$, let $\rim{Z}^\rho_{o,p}$ be the signed exit point of the geodesic $\pi^{o,p}_{\bbullet}$ of $\rim{G}^\rho_{o,p}$ from the north and east boundaries of $o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{<0}^2$. Precisely, \begin{align}\label{exit} \rim{Z}^\rho_{o,\,x}= \begin{cases} \argmax{k} \bigl\{ \,\sum_{i=1}^k I_{o-ie_1} + \rim{G}_{\,o-ke_1-e_2,x} \bigr\}, &\text{if } \pi^{o,x}_1=o-e_1,\\ -\argmax{\ell}\bigl\{ \;\sum_{j=1}^\ell J_{o-je_2} + \rim{G}_{\,o-\ell e_2-e_1,x} \bigr\}, &\text{if } \pi_1^{o,x}=o-e_2. \end{cases} \end{align} Similar to \eqref{recu2}, one can backtrack the geodesic $\pi^{o,p}$ in the box $[p,o-e_1-e_2]$ in the following way; for each edge $(x,y)$ (where $y\leq x$) in $[p,o-e_1-e_2]$ assign the weight \begin{align}\label{W} \rim{{w}}_{y,x}=\rim{G}^\rho_{o,y}-\rim{G}^\rho_{o,x}. \end{align} Let $p_i=\pi^{o,p}_i$, we have \begin{align}\label{Gdr} &p_m=p,\\ &p_{i}= \begin{cases} p_{i+1}+e_1 &\mbox{if } \rim{{w}}_{p_{i+1},p_{i+1}+e_1}<\rim{{w}}_{p_{i+1},p_{i+1}+e_2} \\ \nonumber p_{i+1}+e_2 & \mbox{if } \rim{{w}}_{p_{i+1},p_{i+1}+e_1}>\rim{{w}}_{p_{i+1},p_{i+1}+e_2} \end{cases}\quad |\rim{Z}^\rho_{o,p}| \leq i\leq m-1. \end{align} Since \begin{align} \omega_x=(\rim{G}^\rho_{o,x}-\rim{G}^\rho_{o,x+e_1})\wedge (\rim{G}^\rho_{o,x}-\rim{G}^\rho_{o,x+e_2}) \end{align} we see that \eqref{Gdr} can be written as \begin{align}\label{recu Gd} \pi^{o,x}_n&=x\\ \omega_{\pi^{o,x}_i}&=w_{\pi^{o,x}_i,\pi^{o,x}_{i-1}}.\nonumber \end{align} The following is a construction we shall refer to often. For general weights $\{Y_x\}_{x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2}$ on the lattice and a point $u\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, let $G_{u,x}$ be the LPP by \begin{equation} G_{u,x}=\max_{x_{\brbullet}\,\in\,\Pi_{u,x}}\sum_{k=0}^{\abs{x-u}_1}Y_{x_k}\quad\text{ for } y\in u+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\geq 0}^2. \end{equation} Now let $v\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ be such that $u\leq v$. One can construct a new LPP on $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2_{> v}$ as follows. Define the south-west boundary weight \begin{align}\label{be4} I^{[u]}_{v+ke_1}=& G_{u,v+ke_1}-G_{u,v+(k-1)e_1} \qquad\text{for $1 \leq k \leq \infty$},\\ J^{[u]}_{v+ke_2}=& G_{u,v+ke_2}-G_{u,v+(k-1)e_2} \qquad\text{for $1 \leq k \leq \infty$}\nonumber. \end{align} Let $\{G^{[u]}_{v,x}\}_{x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> v}}$ be the LPP defined through relations \eqref{Gr1}--\eqref{Gr2} using the boundary conditions \eqref{be4} and the bluk weights $\{Y_x\}_{x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> v}}$. We call $G^{[u]}$ \textit{the induced LPP at $v$ by $G_{u,x}$}. The superscript $[u]$ indicates that $G^{[u]}$ uses boundary weights determined by the process $G_{u,\bbullet}$ with base point $u$. Figure \ref{fig-app1} illustrates the next lemma. The proof of the lemma is elementary. \begin{figure} \begin{center} \begin{picture}(200,140)(20,-10) \put(40,0){\line(1,0){170}} \put(90,40){\line(1,0){120}}\put(210,0){\line(0,1){110}} \put(40,110){\line(1,0){170}} \put(40,0){\line(0,1){110}} \put(90,40){\line(0,1){70}} \put(37,-3){\Large$\bullet$} \put(30,-2){\small$u$} \put(86.5,36.5){\Large$\bullet$} \put(80,30){\small$v$} \put(126.5,36.5){\Large$\bullet$} \put(134,32){\small$x$} % \put(206,106){\Large$\bullet$} \put(215,107){\small$y$} \linethickness{3pt} \put(44.5,0){\line(1,0){72}} \put(115,0){\line(0,1){21}} \put(114,20){\line(1,0){17.5}} \put(130,20){\line(0,1){16}} \put(130,44){\line(0,1){16}} \put(128.5,61.5){\line(1,0){60}} \put(189,60){\line(0,1){21.5}} \put(189,80){\line(1,0){22}} \put(210,78.5){\line(0,1){27}} \multiput(94.5,40)(8.5,0){4}{\line(1,0){5.5}} \end{picture} \end{center} \caption{ \small Illustration of Lemma \ref{app-lm1}. Path $u$-$x$-$y$ is a geodesic of $G_{u,y}$ and path $v$-$x$-$y$ is a geodesic of $G^{[u]}_{v,y}$. } \label{fig-app1} \end{figure} \begin{lemma} \label{app-lm1} Let $u\le v\le y$ in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$. Then $G_{u,y}=G_{u,v}+G^{[u]}_{v,y}$. The restriction of any geodesic of $G_{u,y}$ to $v+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\ge0}^2$ is part of a geodesic of $G^{[u]}_{v,y}$. The edges with one endpoint in $v+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}^2$ that belong to a geodesic of $G^{[u]}_{v, y}$ extend to a geodesic of $G_{u,y}$. \end{lemma} In case the process inherited is associated to a stationary process $G^\rho$ we shall use the notation $G^{\rho,[u]}$ to indicate the density $\rho$ as well. Similarly, if $\rim{G}_{u,x}$ is a LLP on $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2_{<u}$ for some $u\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, if $v<u$, we can construct the induced process $\rim{G}^{[u]}_{v,x}$ on $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2_{<v}$. A result similar to Lemma \ref{app-lm1} holds for $\rim{G}_{u,x}$ and $\rim{G}^{[u]}_{v,x}$. \section{Busemann functions} \subsection{Existence and properties of Busemann functions} Let $(\Omega,\mathcal{F},\P)$ be a probability space and let $\{\tau_z\}_{z\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2}$ be a group of translations on $\Omega$. \begin{definition} A measurable function $B:\Omega \times\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2 \times \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2\rightarrow \R$ is a stationary cocycle if it satisfies these two conditions for $\P$-a.e. $\omega$ and all $x,y,z\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$: \begin{align} B(\omega,x+z,y+z)&=B(\tau_z\omega,x,y) \quad \text{(stationarity)}\\ B(\omega,x,y)+B(\omega,y,z)&=B(\omega,x,z)\quad \text{(additivity)} \end{align} \end{definition} Given a down-right path $\cY\in \mathcal{DR}$, the lattice decomposes into a disjoint union $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2=\mathcal{G}_-\cup\cY\cup\mathcal{G}_+$ where the two regions are \[ \mathcal{G}_-=\{x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2: \exists j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0} \text{ such that } x+j(e_1+e_2)\in \cY\} \] and \[ \mathcal{G}_+=\{x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2: \exists j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0} \text{ such that } x-j(e_1+e_2)\in \cY\} . \] \\ \begin{definition} \label{v:d-exp-a} Let $0<\alpha<1$. Let us say that a process \begin{equation}\label{IJw800} \{ \eta_{x} ,\, I_{x}, \, J_{x}, \,\wc\eta_{x} : x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2\} \end{equation} is an {\it exponential-$\alpha$ last-passage percolation system} if the following properties {\rm (a)--(b)} hold. \\[-7pt] \begin{enumerate}[{\rm(a)}]\itemsep=7pt \item The process is stationary with marginal distributions \begin{equation}\label{w19}\begin{aligned} \eta_{x},\, \wc\eta_x \sim \text{\rm Exp}(1), \quad I_{x}\sim \text{\rm Exp}(1-\alpha) , \quad \text{ and } \quad J_{x}\sim \text{\rm Exp}(\alpha) . \end{aligned}\end{equation} For any down-right path $\cY=(y_k)_{k\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$ in $\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, the random variables \begin{equation}\label{v:Y4} \{\wc\eta_z: z\in\mathcal{G}_-\}, \quad \{ \tincr(\{y_{k-1},y_k\}): k\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN\}, \quad\text{and}\quad \{ \eta_x: x\in\mathcal{G}_+\} \end{equation} are all mutually independent, where the undirected edge variables $\tincr(e)$ are defined as \begin{equation}\label{v:tincr6} \tincr(e)= \begin{cases} I_x &\text{if $e=\{x-e_1,x\}$}\\ J_x &\text{if $e=\{x-e_2,x\}$.} \end{cases} \end{equation} \item The following equations are in force at all $x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$: \begin{align} \label{IJw5.1.7} \wc\eta_{x-e_1-e_2}&=I_{x-e_2}\wedge J_{x-e_1} \\ \label{IJw5.2.7} I_x&=\eta_x+(I_{x-e_2}-J_{x-e_1})^+ \\ \label{IJw5.3.7} J_x&=\eta_x+(I_{x-e_2}-J_{x-e_1})^-. \end{align} \end{enumerate} \end{definition} The following Theorem was proven in \cite{sepp-arxiv-18} \begin{theorem}\label{t:buse} For each $0<\alpha<1$ there exist a stationary cocycle $B^\alpha$ and a family of random weights $\{\Xw^\alpha_x\}_{x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2}$ on $(\Omega, \kS, \P)$ with the following properties. \begin{enumerate}\itemsep=3pt \item[{\rm(i)}] For each $0<\alpha<1$, process \begin{align}\label{v:bf} \{ \Xw^\alpha_x, \, B^\alpha_{x-e_1,x}, \, B^\alpha_{x-e_2,x}, \,\Yw_x: x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2\} \end{align} is an exponential-$\alpha$ last-passage system as described in Definition \ref{v:d-exp-a}. \item[{\rm(ii)}] There exists a single event $\Omega_2$ of full probability such that for all $\omega\in\Omega_2$, all $x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ and all $\lambda<\rho$ in $(0,1)$ we have the inequalities \begin{equation}\label{v:853.1} B^\lambda_{x,x+e_1}(\omega) \le B^\rho_{x,x+e_1}(\omega) \quad\text{and}\quad B^\lambda_{x,x+e_2}(\omega) \ge B^\rho_{x,x+e_2}(\omega). \end{equation} Furthermore, for all $\omega\in\Omega_2$ and $x,y\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, the function $\lambda\mapsto B^\lambda_{x,y}(\omega)$ is right-continuous with left limits. \item[{\rm(iii)}] For each fixed $0<\alpha<1$ there exists an event $\Omega^{(\alpha)}_2$ of full probability such that the following holds: for each $\omega\in\Omega^{(\alpha)}_2$ and any sequence $v_n\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ such that $\abs{v_n}_1\to\infty$ and \begin{equation}\label{v:853.3} \lim_{n\to\infty} \frac{v_n}{\abs{v_n}_1} \, = \,\xi(\alpha)\,=\, \biggl( \frac{(1-\alpha)^2}{(1-\alpha)^2+\alpha^2} \,, \frac{\alpha^2}{(1-\alpha)^2+\alpha^2}\biggr) , \end{equation} we have the limits \begin{equation}\label{v:855} B^\alpha_{x,y}(\omega) =\lim_{n\to\infty} [ G_{x, v_n}(\omega)-G_{y,v_n}(\omega)] \qquad\forall x,y\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2. \end{equation} The LPP process $G_{x,y}$ is now defined by \eqref{v:G}. Furthermore, for all $\omega\in\Omega^{(\alpha)}_2$ and $x,y\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$, \begin{equation}\label{v:855.7} \lim_{\lambda\to\alpha}B^\lambda_{x,y}(\omega)=B^\alpha_{x,y}(\omega). \end{equation} \end{enumerate} \end{theorem} {\bf Busemann Functions and Infinite Geodesics.} Fix $x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$. An infinite up-right path $\pi^{x,\infty}_\bbullet$ originating at $x$ is called a geodesic if for all $m,n\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}$ such that $m<n$, the path $\{\pi^{x,\infty}_l\}_{l\in\lzb m,n\rzb}$ is a geodesic. We say a geodesic has direction $\xi\in {\mathrm{ri\,}} \mathcal U$ if \begin{align} \lim_{n\rightarrow \infty} \frac{\pi^{x,\infty}_n(2)}{\pi^{x,\infty}_n(1)}=\frac{\xi_2}{\xi_1}. \end{align} To each direction $\xi\in {\mathrm{ri\,}} \mathcal U$ we associate a density $\rho\in(0,1)$ through the relations \begin{align}\label{rhoxi} \xi(\rho)=\left(\frac{(1-\rho)^2}{(1-\rho)^2+\rho^2},\frac{\rho^2}{(1-\rho)^2+\rho^2}\right \end{align} In some literature $\xi(\rho)$ is called the {\it characteristic direction} associated with the parameter $\rho$. It is known that for $\xi\in {\mathrm{ri\,}} \mathcal U$, with probability one, every point $x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ has a unique geodesic $\pi^{x,\infty}$ of direction $\xi$. Busemann functions can be used to construct infinite geodesic. Consider the family of random variables \begin{align} \{ B^\alpha_{x-e_1,x}, \, B^\alpha_{x-e_2,x}, \,\Yw_x: x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2\} \end{align} defined in \eqref{v:bf}. Let $\xi:=\xi(\alpha)$ be the characteristic direction associated with $\rho$. Let us denote by $\pi^{x,\xi\infty}$ the infinite geodesic with respect to the weights $\{\omega_x\}_{x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$, starting from $x$ in direction $\xi$. In \cite{geor-rass-sepp-17-buse}, it was shown that one can trace the infinite geodesic $\pi^{x,\infty}$ by following the gradient of the Busemann function $B^\alpha$. Let $\{p_i\}_{i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{>0}}$ be an enumeration of the vertices in $\pi^{x,\xi\infty}$, i.e. \begin{align*} p_i=\pi^{x,\xi\infty}_i \quad i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\geq 0}, \end{align*} where $p_0=x$. Then the vertices $\{p_i\}_{i\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{\geq 0}}$ are given recursively through \begin{align}\label{recu3} &p_0=x,\\ &p_i= \begin{cases} p_{i-1}+e_1 &\mbox{if } B^\alpha_{p_{i-1},p_{i-1}+e_1}<B^\alpha_{p_{i-1},p_{i-1}+e_2} \\ \nonumber p_{i-1}+e_2 & \mbox{if } B^\alpha_{p_{i-1},p_{i-1}+e_1}>B^\alpha_{p_{i-1},p_{i-1}+e_2}\end{cases}\quad i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> 0}. \end{align} Note that in \eqref{recu3} $p_i$ is attained by taking an up\textbackslash right step from the point $p_{i-1}$ in the direction where the minimal increment of the Busemann function is attained. Since $\omega_x=B^\alpha_{x,x+e_1}\wedge B^\alpha_{x,x+e_2}$, $\pi^{x,\xi\infty}$ is the unique path that satisfies \begin{align} \pi^{x,\infty}_0&=x\\ \Yw_{\pi^{x,\infty}_i}&=B^\rho_{\pi^{x,\infty}_i,\pi^{x,\infty}_{i+1}}. \end{align} \begin{lemma}\label{lem:ing} Let $x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ and $\xi_1,\xi_2\in {\mathrm{ri\,}}\mathcal U$ such that $\xi_1{\preceq} \xi_2$. For $i\in\{1,2\}$ let $\pi^{x,\xi_i\infty}$ be the infinite geodesic starting from $x$ in direction $\xi_i$. Then \begin{align}\label{gin} \pi^{x,\xi_1\infty}{\preceq} \pi^{x,\xi_2\infty} \end{align} \end{lemma} \begin{proof} Suppose \eqref{gin} does not hold. Then there exists $y_1\in \pi^{x,\xi_1\infty}$ and $y_2\in \pi^{x,\xi_2\infty}$ such that $x \leq y_1,y_2$ and $y_2 {\prec} y_1$. Since both geodesics have a direction and $\xi_1{\preceq} \xi_2$, there exists $w_1\in \pi^{x,\xi_1\infty}$ and $w_2\in \pi^{x,\xi_2\infty}$ such that $y_1,y_2\leq w_1,w_2$ and $w_1 {\preceq} w_2$. It follows that there exists a point $x \leq z$ such that $z\in \pi^{x,\xi_1\infty}\cap \pi^{x,\xi_2\infty}$ and that the geodesics \begin{align} \gamma_1&=\pi^{x,\xi_1\infty}\cap [x,z]\\ \gamma_2&=\pi^{x,\xi_2\infty}\cap [x,z], \end{align} start from $x$ and terminate at $z$. As $y_2 {\prec} y_1$ it follows that $\gamma_1\neq \gamma_2$ which violates the uniqueness of geodesics. \end{proof} \subsection{Coupling Busemann Functions} In \cite{fan-sepp-arxiv} a coupling between Busemann functions of different densities was given which relies on the queueing mapping. Consider the queueing mapping $D:\R_+^\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN \rightarrow \R_+^\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN$ from Appendix \ref{app:queues}. \begin{lemma}\label{Bus cop} Let $0<\rhodown{\rho}<\rhoup{\rho}<1$. There exists a coupling of $B^{\rhodown{\rho}}$ and $B^{\rhoup{\rho}}$ such that \begin{enumerate}[{\rm(i)}] \item for every $x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ \begin{align} B^{\rhodown{\rho}}_{x,x+e_2} &\geq B^{\rhoup{\rho}}_{x,x+e_2}\\ B^{\rhoup{\rho}}_{x,x+e_1} &\geq B^{\rhodown{\rho}}_{x,x+e_1}\nonumber. \end{align} \item for every $x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2$ \begin{align*} \Big(B^{\rhoup{\rho}}_{x+ie_1,x+(i+1)e_1},B^{\rhodown{\rho}}_{x+ie_1,x+(i+1)e_1}\Big)_{i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN} &\sim \nu^{1-\rhoup{\rho},1-\rhodown{\rho}}\\ \Big(B^{\rhodown{\rho}}_{x+ie_2,x+(i+1)e_2},B^{\rhoup{\rho}}_{x+ie_2,x+(i+1)e_2}\Big)_{i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN} &\sim \nu^{\rhodown{\rho},\rhoup{\rho}}, \end{align*} where for $0<\lambda<\rho<1$ $\nu^{\lambda,\rho}$ is the distribution defined in \eqref{qd}. \item fix $x\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2_{> 0}$. For every $k,l\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN$ the following sets of random variables are independent \begin{align} &\{B^{\rhoup{\rho}}_{x+ie_2,x+(i+1)e_2}\}_{0 \leq i \leq l-1 },\quad \{B^{\rhodown{\rho}}_{x+ie_2,x+(i+1)e_2}\}_{-k \leq i \leq -1 } \nonumber\\ \text{and so are}\\ &\{B^{\rhodown{\rho}}_{x+ie_1,x+(i+1)e_1}\}_{0 \leq i \leq l-1 },\quad \{B^{\rhoup{\rho}}_{x+ie_1,x+(i+1)e_1}\}_{-k \leq i \leq -1 } \nonumber. \end{align} \end{enumerate} \end{lemma} \section{stabilization}\label{sec:stb} In this section we prove Theorem \ref{thm:loc} and Theorem \ref{thm:stb}. Let us define the event \begin{align*} \mathcal{H}^{\xi,M}=\{\rim{G}_{N\xi,y}-\rim{G}_{N\xi,x}=B^{\rho(\xi)}_{x,y}\text{ for all }(x,y)\in \mathcal{E}(\mathcal{R}^{\xi,M}) \}. \end{align*} $\mathcal{H}^{\xi,M}$ is the event where the increments of $G$ along the edges in $\mathcal{E}(\mathcal{R}^{\xi,M})$ coincide with those of the Busemann function associated with the direction $\xi$. It will be clear from the proof that $\mathcal{H}^{\xi,M}$ and $\mathcal{S}^{\xi,M}$ defined in \eqref{Sf} and are equivalent events. \subsection{Bounds on $\P(\mathcal{S}^{\xi,M})$ and $\P(\mathcal{H}^{\xi,M})$} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and let $\rhodown{\rho}(\xi)=\rho(\xi)-rN^{-\frac{1}{3}}$ and $\rhoup{\rho}(\xi)=\rho(\xi)+rN^{-\frac{1}{3}}$. We also let $\rim{o}=\xi N+e_1+e_2$. Assign weights on the edges of the north-east boundary of $\mathcal{R}^{\xi,N}$ by \begin{align}\label{BW1} &I^\rhoup{\rho}_i=B^\rhoup{\rho}_{\rim{o}_N-(i+1)e_1,\rim{o}_N-ie_1} \quad 0\leq i \leq N\xi_1 \\ &J^\rhoup{\rho}_i=B^\rhoup{\rho}_{\rim{o}_N-(i+1)e_2,\rim{o}_N-ie_2} \quad 0\leq i \leq N\xi_2. \nonumber \end{align} Use the boundary weights $\{I^\rhoup{\rho}_i\}_{0\leq i \leq N\xi_1},\{J^\rhoup{\rho}_i\}_{0\leq i \leq N\xi_2}$ and the bulk weights $\{\omega_x\}_{x\in \mathcal{R}^{\xi,N}}$ to construct the stationary LPP $\rim{G}^\rhoup{\rho}$ as in \eqref{Gr11}--\eqref{Gr12}. Similarly we construct $\rim{G}^\rhodown{\rho}$. As in \eqref{exit} we let $\rim{Z}^\rhoup{\rho}_{\rim{o},x}$($\rim{Z}^\rhodown{\rho}_{\rim{o},x}$) denote the exit point of the geodesic $\pi^{\rim{o},x}$ of $\rim{G}^\rhoup{\rho}$($\rim{G}^\rhodown{\rho}$). Let \begin{align}\label{Adef} \rim{A}^{\xi,M}=\Big\{\sup_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhodown{\rho}(\xi)}_{o,x}<0\Big\}\bigcap \Big\{\inf_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhoup{\rho}(\xi)}_{o,x}>0\Big\} \end{align} $\rim{A}^{\xi,M}$ is the event that for any $x\in\mathcal{R}^{\xi,M}$, the geodesic $\pi^{\rim{o},x}$ of $\rim{G}^\rhoup{\rho}$($\rim{G}^\rhodown{\rho}$) crosses the boundary of $\mathcal{R}^{\xi,N}$(not to be confused with $\mathcal{R}^{\xi,M}$!) from the north (east) boundary. Recall the definition of $\xi(\rho)$ in \eqref{v:853.3}. Define \begin{align}\label{xibar} \rhoup{\xi}=\xi(\rhoup{\rho}) \quad \text{and }\quad \rhodown{\xi}=\xi(\rhodown{\rho}). \end{align} \begin{lemma}\label{og2} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and $M>0$. On the set $\rim{A}^{\xi,M}$ \begin{align}\label{gin1} \pi^{x,\rhoup{\xi}\infty} {\preceq} \pi^{x,\xi N} {\preceq} \pi^{x,\rhodown{\xi}\infty} \quad x\in \mathcal{R}^{\xi,M}. \end{align} \end{lemma} \begin{proof} We show the first inequality in \eqref{gin1}, the second one is analogous. Note that by our construction, the exit point $Z^{\rhoup{\rho}}_{\rim{o},x}$ is the leftmost point in the north boundary of $\mathcal{R}^{\xi,N+1}$ that belongs to $\pi^{x,\rhoup{\xi}\infty}$, more precisely, on the set $\rim{A}^{\xi,M}$, for any $x\in \mathcal{R}^{\xi,M}$ \begin{align} \inf \{i:\rim{o}_N-ie_1 \in \pi^{x,\rhoup{\xi}\infty}\} = |Z^{\rhoup{\rho}}_{\rim{o},x}|>0. \end{align} By order of geodesics \begin{align} \sup \{i:\rim{o}_N-e_2-ie_1 \in \pi^{x,\rhoup{\xi}\infty}\} \geq \inf \{i:\rim{o}_N -e_2 -ie_1 \in \pi^{x,\xi N}\}, \end{align} which in turn implies that \begin{align} \pi^{x,\rhoup{\xi}\infty} {\preceq} \pi^{x,\xi N}. \end{align} \end{proof} Let $\rim{o}_M=M\xi+e_1+e_2$ be the upper right corner of $\mathcal{R}^{\xi,M}$. Assign weights on the edges of the north-east boundary of $\mathcal{R}^{\xi,M}$ by \begin{align}\label{BW} &I^\rhoup{\rho}_i=B^\rhoup{\rho}_{\rim{o}-(i+1)e_1,\rim{o}-ie_1} \quad 0\leq i \leq M\xi_1 \\ &J^\rhoup{\rho}_i=B^\rhoup{\rho}_{\rim{o}-(i+1)e_2,\rim{o}-ie_2} \quad 0\leq i \leq M\xi_2. \nonumber \end{align} Similarly we define $\{I^\rhodown{\rho}_i\}_{0\leq i \leq M\xi_1}$ and $\{J^\rhodown{\rho}_i\}_{0\leq i \leq M\xi_2}$. Define the event \begin{align}\label{Cd} C^{\xi,M}=\Big\{I^\rhoup{\rho}_i=I^\rhodown{\rho}_i\Big\}_{0\leq i \leq M\xi_1} \bigcap \Big\{J^\rhoup{\rho}_i=J^\rhodown{\rho}_i\Big\}_{0\leq i \leq M\xi_2}. \end{align} \medskip \begin{lemma}\label{lem:og} On the event $C^{\xi,M}$ \begin{align} &B^\rhoup{\rho}_e=B^{\rho}_e=B^\rhodown{\rho}_e \quad e\in \mathcal{E}(\mathcal{R}^{\xi,M})\label{ge3}\\ &\mathcal{P}^{\xi,M}(\pi^{x,\rhoup{\xi}\infty}) = \mathcal{P}^{\xi,M}(\pi^{x,\rhodown{\xi}\infty}) \label{ge} \end{align} \end{lemma} \begin{proof} First we note that for every $0<\rho(\xi)<1$ the mapping \begin{align} e\mapsto B^\rho_e \quad e\in \mathcal{E}(\mathcal{R}^{\xi,M}) \end{align} is determined uniquely by the bulk weights $\{\omega\}_{x\in \mathcal{R}^{\xi,M}}$ and the boundary weights $\{I^\rho_i\}_{0\leq i \leq M\xi_1}$ and $\{J^\rho_i\}_{0\leq i \leq M\xi_2}$ constructed as in \eqref{BW}. This follows from the recursive relation (\eqref{IJw5.2.7}--\eqref{IJw5.3.7}) \begin{align*} B^\rho_{x,x+e_1} &= \omega_x + ( B^\rho_{x+e_2, x+e_1+e_2} - B^\rho_{x+e_1, x+e_1+e_2} )^+\\ B^\rho_{x,x+e_2} &= \omega_x + ( B^\rho_{x+e_2, x+e_1+e_2} - B^\rho_{x+e_1, x+e_1+e_2} )^-. \end{align*} On the event $C^{\xi,M}$ the boundary conditions in \eqref{BW} are equal for the processes $\rim{G}^{\rhoup{\rho}}$ and $\rim{G}^{\rhodown{\rho}}$ i.e. \begin{align}\label{be2} I^\rhoup{\rho}_{\rim{o}_N-ke_1}=& I^\rhodown{\rho}_{\rim{o}_N-ke_1} \qquad\text{for $1 \leq k \leq \xi_1 M$}.\\ J^\rhoup{\rho}_{\rim{o}_N-ke_2}=& J^\rhodown{\rho}_{\rim{o}_N-ke_2} \qquad\text{for $1 \leq k \leq \xi_2 M$}\nonumber. \end{align} As both $\{B^\rhoup{\rho}_e\}_{e\in \mathcal{E}(\mathcal{R}^{\xi,M})}$ and $\{B^\rhodown{\rho}_e\}_{e\in \mathcal{E}(\mathcal{R}^{\xi,M})}$ use the same bulk weights, by \eqref{be2}, we conclude that on $C^{\xi,M}$ \begin{align}\label{be} B^\rhoup{\rho}_e=B^\rhodown{\rho}_e \quad e\in \mathcal{E}(\mathcal{R}^{\xi,M}). \end{align} By Lemma \ref{lm:crs} (the Crossing Lemma), for every $e\in \mathcal{E}(\mathcal{R}^{\xi,M})$ \begin{align*} B^\rhoup{\rho}_e\leq B^{\rho}_e\leq B^\rhodown{\rho}_e \text{ or }B^\rhodown{\rho}_e\leq B^{\rho}_e\leq B^\rhoup{\rho}_e \quad \forall e\in \mathcal{E}(\mathcal{R}^{\xi,M}) \end{align*} which, together with \eqref{be}, implies \eqref{ge3}. The geodesics $\mathcal{P}^{\xi,M}(\pi^{x,\rhoup{\xi}\infty})$ and $\mathcal{P}^{\xi,M}(\pi^{x,\rhodown{\xi}\infty})$ are determined by $ \{B^\rhoup{\rho}_e\}_{e\in \mathcal{E}(\mathcal{R}^{\xi,M})}$ and $\{B^\rhodown{\rho}_e\}_{e\in \mathcal{E}(\mathcal{R}^{\xi,M})}$ respectively using \eqref{recu3}. \eqref{ge} is now implied by \eqref{ge3}. \end{proof} \medskip \begin{corollary}\label{cor:ge} On $C^{\xi,M}\cap \rim{A}^{\xi,M}$ \begin{align} \{\rim{G}_{N\xi,y}-\rim{G}_{N\xi,x}=B^{\rho(\xi)}_{x,y}&\text{ for all }(x,y)\in \mathcal{E}(\mathcal{R}^{\xi,M}) \}\label{ge4}.\\ \mathcal{P}^{\xi,M}(\pi^{x,\rhoup{\xi}\infty}) = \mathcal{P}^{\xi,M}(\pi^{x,{\xi}\infty})&=\mathcal{P}^{\xi,M}(\pi^{x,{\xi}N})= \mathcal{P}^{\xi,M}(\pi^{x,\rhodown{\xi}\infty}) \quad x\in \mathcal{R}^{\xi,M}\label{ge2}. \end{align} \end{corollary} \begin{proof} By Lemma \ref{lm:crs}, on the event $\rim{A}^{\xi,M}$ \begin{align*} B^\rhoup{\rho}_{x,x+e_2}\leq \rim{G}_{N\xi,x+e_2}&-\rim{G}_{N\xi,x}\leq B^\rhodown{\rho}_{x,x+e_2}\quad \forall (x,x+e_2)\in \mathcal{E}(\mathcal{R}^{\xi,M}) \\&\text{ and }\\ B^\rhodown{\rho}_{x,x+e_1}\leq \rim{G}_{N\xi,x+e_1}&-\rim{G}_{N\xi,x}\leq B^\rhoup{\rho}_{x,x+e_1} \quad \forall (x,x+e_1)\in \mathcal{E}(\mathcal{R}^{\xi,M}), \end{align*} which implies \eqref{ge4}, using \eqref{ge3}. By Lemma \ref{lem:ing} we see that \begin{align}\label{og3} \pi^{x,\rhoup{\xi}\infty}{\preceq} \pi^{x,{\xi}\infty} {\preceq} \pi^{x,\rhodown{\xi}\infty} \quad x\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2. \end{align} By Lemma \ref{og2}, on $\rim{A}^{\xi,M}$ \begin{align}\label{og4} \pi^{x,\rhoup{\xi}\infty} {\preceq} \pi^{x,\xi N} {\preceq} \pi^{x,\rhodown{\xi}\infty} \quad x\in \mathcal{R}^{\xi,M}. \end{align} Lemma \ref{lem:og} along with \eqref{og3} and \eqref{og4} imply the result. \end{proof} For $M>0$, recall the set $\mathcal{S}^{\xi,M}$ in \eqref{Sf}. Using \ref{cor:ge} we have the following. \medskip It should be now clear to the reader that $\mathcal{H}^{\xi,M}=\mathcal{S}^{\xi,M}$. We have the following control on the probability of these events. \begin{corollary} \begin{align} \P(\mathcal{H}^{\xi,M})=\P(\mathcal{S}^{\xi,M})\geq \P\big(C^{\xi,M}\cap \rim{A}^{\xi,M}\big)\geq 1-\P((C^{\xi,M})^\mathrm{c})-\P((\rim{A}^{\xi,M})^\mathrm{c}) \label{ubs}. \end{align} \end{corollary} \subsection{Upper bound on $\P((\rim{A}^{\xi,M})^c)$} \medskip \begin{lemma}\label{lem-lb1} Fix $\xi\in (0,1)$ and $M>0$ such that $M\leq ct^\frac{2}{3}$ for some constant $c>0$. Let $o=\xi N$. There exist constants $C(c,\xi),C_1,N_0(\xi,c)>0$, locally bounded in $c$, such that for all $N>N_0$ and $1\leq r \leq N^\frac{1}{3}(\log(N))^{-1}$ and all $x\in \mathcal{R}^{\xi,M}$ \begin{equation}\label{lb-1} \P\Big(\sup_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhodown{\rho}(\xi)}_{o,x}>0\Big) \le \frac{C_1}{r^3} \end{equation} and \begin{equation}\label{lb-2} \P\Big(\inf_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhoup{\rho}(\xi)}_{o,x}< 0\Big) \le \frac{C_1}{r^3}, \end{equation} where $\rhodown{\rho}(\xi)=\rho(\xi)-rN^{-\frac{1}{3}}$ and $\rhoup{\rho}(\xi)=\rho(\xi)+rN^{-\frac{1}{3}}$. \end{lemma} \begin{proof} We only prove \eqref{lb-2} as \eqref{lb-1} is similar. Given $\xi\in{\mathrm{ri\,}}\mathcal U$, abbreviate $\rho=\rho(\xi)$ and $\rhoup{\rho}=\rhoup{\rho}(\xi)$. Let $x^0=(M\xi_1,0)$ be the lower-right corner of $\mathcal{R}^{\xi,M}$. By the order on geodesics we have \begin{align*} \Big\{\inf_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhoup{\rho}}_{o,\,x}<0\Big\}\subset \Big\{\rim{Z}^{\rhoup{\rho}}_{o,\,x_0}<0\Big\}, \end{align*} which implies \begin{align}\label{epl} \P\Big(\inf_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhoup{\rho}}_{o,\,x}<0\Big)\leq \P\Big(\rim{Z}^{\rhoup{\rho}}_{o,\,x_0}<0\Big). \end{align} In order to upper bound \eqref{epl} we must show that the characteristic line of direction $\xi(\rhoup{\rho})$ that leaves from $o$ goes, on the scale of $N^\frac{2}{3}$, well below the point $x^0$. We have, via \eqref{rhoxi}, \begin{align}\label{comp} &N\xi_2-\frac{(N\xi_1-M\xi_1)\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}=\frac{N\xi_2(1-\rhoup{\rho})^2-(N\xi_1-M\xi_1)\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\\&=\frac{\xi_2[-2(1-\rho)rN^\frac{2}{3}+r^2N^\frac{1}{3}]-\xi_1[2\rho rN^\frac{2}{3}+r^2N^\frac{1}{3}]+\xi_1M\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\nonumber\\ &=-rN^\frac{2}{3}\frac{[\xi_22(1-\rho)+\xi_12\rho ]}{(1-\rhoup{\rho})^2}+\frac{M\xi_1\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}+\frac{(\xi_2-\xi_1)r^2N^\frac{1}{3}}{(1-\rhoup{\rho})^2}\nonumber\\ &\leq-rN^\frac{2}{3}\frac{[\xi_22(1-\rho)+\xi_12\rho ]}{(1-\rhoup{\rho})^2}+\frac{cN^{\frac{2}{3}}\xi_1\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}+\frac{(\xi_2-\xi_1)r^2N^\frac{1}{3}}{(1-\rhoup{\rho})^2}\nonumber\\ &\leq -rN^\frac{2}{3}\frac{[\xi_22(1-\rho)+\xi_12\rho -r^{-1}c\xi_1(\rho^2-2\rho rN^{-\frac{1}{3}}+r^2N^{-\frac{2}{3}})-rN^{-\frac{1}{3}}]}{(1-\rhoup{\rho})^2}.\label{comp1} \end{align} For large enough $N$ and $r\leq N^\frac{1}{3}(\log(N))^{-1}$ plug into \eqref{comp1} to obtain \begin{align}\label{comp2} &N\xi_2-\frac{(N\xi_1-M\xi_1)\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\\ &\leq -rN^\frac{2}{3}\frac{[\xi_22(1-\rho)+\xi_12\rho -r^{-1}c\xi_1(\rho^2-2\rho rN^{-\frac{1}{3}}+r^2N^{-\frac{2}{3}})-rN^{-\frac{1}{3}}]}{(1-\rhoup{\rho})^2}\nonumber\\ &\leq -rN^\frac{2}{3}\frac{[\xi_22(1-\rho)+\xi_12\rho -r^{-1}c\xi_1\rho^2+c\xi_1(2\rho N^{-\frac{1}{3}}+N^{-\frac{1}{3}}(\log(N))^{-1})-(\log(N))^{-1}]}{(1-\rho)^2},\nonumber \end{align} such that for $N$ large enough \begin{align*} N\xi_2-\frac{(N\xi_1-M\xi_1)\rhoup{\rho}^2}{(1-\rhoup{\rho})^2} \leq -rN^\frac{2}{3}\frac{[\xi_2(1-\rho)+\xi_1\rho -r^{-1}c\xi_1\rho^2]}{(1-\rho)^2}. \end{align*} For \begin{align*} r>\frac{c\xi_1\rho^2}{[\xi_2(1-\rho)+\xi_1\rho -(1-\rho)^2]}\vee 1, \end{align*} the right hand side of \eqref{comp2} is smaller than $-N^\frac{2}{3}$. This in turn implies that there exists a constant $C'(\xi,c)>0$ (locally bounded in $c$) such that \begin{align*} N\xi_2-\frac{(N\xi_1-M\xi_1)\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\leq -C'(\xi,c)rN^\frac{2}{3}, \end{align*} It then follows by \cite{sepp-cgm-18}[Corollary 5.10] that there exists a constant $C_1(\xi,c)>0$ \begin{align*} \P\Big(\rim{Z}^{\rhoup{\rho}}_{o,\,x_0}<0\Big)\leq C_1r^{-3}, \end{align*} which proves the result. \end{proof} \begin{corollary}\label{cor:ubA} Fix $\xi\in (0,1)$ and $M>0$ such that $M\leq ct^\frac{2}{3}$ for some constant $c>0$. There exists $C(c,\xi)>0$, locally bounded in $c$, such that \begin{align} \P((\rim{A}^{\xi,M})^c)\leq \frac{C}{r^3}\label{ubA}. \end{align} \end{corollary} \begin{proof} By the definition of $\rim{A}^{\xi,M}$ we see that \begin{align}\label{se} (\rim{A}^{\xi,M})^c\subseteq \Big\{\sup_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhodown{\rho}(\xi)}_{o,x}>0\Big\}\cup \Big\{\inf_{x\in \mathcal{R}^{\xi,M}}\rim{Z}^{\rhoup{\rho}(\xi)}_{o,x}< 0\Big\} \end{align} Taking probability on both sides of \eqref{se} and using \eqref{lb-1} and \eqref{lb-2} we obtain the result. \end{proof} \subsection{Upper bound on $\P((C^{\xi,M})^c)$} Define \begin{align*} C^{\xi,M}_1&=\{B^{\rhoup{\xi}}_{\rim{o}_M-ke_1,\rim{o}_M-(k-1)e_1}=B^{\rhodown{\xi}}_{\rim{o}_M-ke_1,\rim{o}_M-(k-1)e_1}\} \qquad\text{for $1 \leq k \leq \xi_1 M$}\\ C^{\xi,M}_2&=\{B^{\rhoup{\xi}}_{\rim{o}_M-ke_2,\rim{o}_M-(k-1)e_2}=B^{\rhodown{\xi}}_{\rim{o}_M-ke_2,\rim{o}_M-(k-1)e_2}\} \qquad\text{for $1 \leq k \leq \xi_2 M$}. \end{align*} Recall \eqref{Cd} and note that \begin{align}\label{C} C^{\xi,M}=C^{\xi,M}_1\cap C^{\xi,M}_2. \end{align} This subsection is aimed at proving the following. \begin{proposition}\label{prop:Cub} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and $c>0$ and let $M>0$ such that $M\leq cN^\frac{2}{3}$. There exists $C(\xi,c)>0$, locally bounded in $c$, such that \begin{align} \P\Big(\big(C^{\xi,M}\big)^c\Big)\leq C N^{-\frac{1}{4}}M^\frac{3}{8}\label{ubC}. \end{align} \end{proposition} Before we prove Proposition \ref{prop:Cub} we obtain some auxiliary results. As was noted in Lemma \ref{Bus cop}[ii], for $\rhoup{\xi}{\preceq} \rhodown{\xi}$ (and therefore $\rhodown{\rho} \leq \rhoup{\rho}$) \begin{align*} &\P \Big(B^{\rhoup{\xi}}_{\rim{o}_M-ke_1,\rim{o}_M-(k-1)e_1}=B^{\rhodown{\xi}}_{\rim{o}_M-ke_1,\rim{o}_M-(k-1)e_1} \qquad \text{for $1 \leq k \leq \xi_1 M$} \Big)\\[3pt] &=\nu^{1-\rhoup{\rho},1-\rhodown{\rho}}(d_i=s_i \qquad \text{for $1 \leq i \leq \xi_1 M$}), \end{align*} where $\depav=D(\arrv,\mathbf\serv)$(see Appendix \ref{app:queues}), and $\arrv=(\arr_j)_{j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$ and $\mathbf\serv=(s_j)_{j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$ are two independent i.i.d sequences of exponential random variables of intensity $\rhodown{\rho}$ and $\rhoup{\rho}$ respectively, such that $0<\rhodown{\rho}<\rhoup{\rho}<1$. Using \eqref{e} \begin{align*} \nu^{1-\rhoup{\rho},1-\rhodown{\rho}}(d_i=s_i \qquad \text{for $1 \leq i \leq \xi_1 M$})& = \nu^{1-\rhoup{\rho},1-\rhodown{\rho}}(e_i=0 \qquad \text{for $1 \leq i \leq \xi_1 M$})\\ &=\nu^{1-\rhoup{\rho},1-\rhodown{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i=0\Big). \end{align*} It follows that \begin{align}\label{C1} \P(C^{\xi,M}_1)=\nu^{1-\rhoup{\rho},1-\rhodown{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i=0\Big), \end{align} and similarly \begin{align}\label{C2} \P(C^{\xi,M}_2)=\nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i=0\Big). \end{align} Altogether, plugging \eqref{C1} and \eqref{C2} into \eqref{C} we obtain \begin{align} \P\big((C^{\xi,M})^c\big)\leq \nu^{1-\rhoup{\rho},1-\rhodown{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big)+\nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big). \end{align} Let us now try to explain the idea behind the proof. Let $x_j=s_{j-1}-a_j$, from \eqref{wr} we see that \begin{align*} w_j=\big(w_{j-1}+x_j\big)^+. \end{align*} Define the stopping time \begin{align*} T=\sup\big\{k:k>0,w_{k-1}+x_k\geq 0\big\} \end{align*} so that \begin{align*} w_j=w_{j-1}+x_j \quad 1\leq j \leq T. \end{align*} Using this recursion and \eqref{S} \begin{align}\label{wp} &w_j=w_0+S^{1,j} \quad 1\leq j \leq T\\ \text{and}\quad &w_j\geq 0 \quad 1\leq j \leq T.\nonumber \end{align} The dynamics behind \eqref{wp} is as follows. The waiting time $w_j$ increases when the service times are longer then usual and the interarrival times are shorter i.e. when the random walk $S^{0,j}$ goes up. Similarly, the $w_j$ decreases when the service times are fast compared to the arrival of customers i.e. $S^{0,j}$ goes down. This dynamics hold until the random walk goes below $-w_0$ where the waiting time at the queue vanishes. The r.v. $\sum_{i=1}^{\xi_1 M} e_i$ can be thought of as the local time of the queue at zero, i.e. the accumulated time of the queue being empty. The main idea behind the proof of Proposition \ref{prop:Cub} is the observation that when $\rhoup{\rho}-\rhodown{\rho}\sim N^{-\frac{1}{3}}$, that is when the queue is in the so-called heavy traffic regime, at stationarity, the waiting time $w_0$ of customer $0$, is of order $N^\frac{1}{3}$. As the difference between the average service time rate and the average inter-arrival time rate is of order $\rhoup{\rho}-\rhodown{\rho}\sim N^{-\frac{1}{3}}$, the simple random walk $S^{0,j}$ has drift $-N^{-\frac{1}{3}}$. \eqref{wp} implies that the queue's waiting time vanishes by time of order $N^\frac{2}{3}$. Over time $t=o(N^{\frac{2}{3}})$ the random walk $S_t$ will not change the waiting time at the queue by much so that with high probability $w_t$ will be of order $N^{\frac{1}{3}}$ and the r.v. $\sum_{i=1}^{t} e_i$ will be zero (see Figure \ref{fig:emptyq}). \begin{lemma} \begin{figure}[t] \centering \begin{subfigure}{.4\textwidth} \includegraphics[scale=1]{heavy_traffic_c.pdf} \caption{\small While the waiting time $W$ at the queue is of order $N^{\frac{1}{3}}$, over time of order smaller than $N^\frac{2}{3}$ the waiting time is not likely to change by much.} \end{subfigure}\hspace{2cm}% \begin{subfigure}{.4\textwidth} \includegraphics[scale=1]{heavy_traffic2_c.pdf} \caption{\small Over time of order $N^\frac{2}{3}$, with positive probability the waiting time $W$ vanishes, i.e. the queue will be empty.} \end{subfigure} \caption{\small The two cases of a queue at stationarity. $S_t$ is the random walk whose incremental step is $x_t=s_{t-1}-a_t$. As the rate of service at the queue is higher than the rate of interarrival $\bE(x_t)<0$ and so $S_t$ is a simple random walk with a negative drift. The waiting time at the queue decreases by $S_t$ until it vanishes.} \label{fig:emptyq} \end{figure} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and let $M>0$. For $0<\beta<\alpha<1$ \begin{align}\label{ub} \nu^{\beta,\alpha}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big)\leq 1-\frac{\beta}{\alpha}+\text{int}\Big[\frac{\alpha}{(\alpha+\theta)}\frac{\beta}{(\beta-\theta)}\Big]^{\xi_1M}e^{-\theta w}\frac{(\alpha-\beta)\beta}{\alpha}e^{-(\alpha-\beta)w}dw. \end{align} \end{lemma} \begin{proof} By \eqref{sume} \begin{align}\label{se2} \sum_{i=1}^{\xi_1 M} e_i=\Big(\inf_{1\leq i\leq \xi_1M}w_{0}+S_x^{1,i}\Big)^- \end{align} where \begin{align*} S^{1,i}_x=\sum_{j=1}^{i}s_{j-1}-a_j. \end{align*} Next we bound from above the probability that the infimum of the path of $\{S_x^{1,i}\}_{1 \leq i\leq \xi_1 M}$ drops too low. Let $C>0$, then \begin{align*} \P\Big(\inf_{1\leq i\leq \xi_1M}S^{1,i}_x\leq -C\Big)=\P\Big(\sup_{1\leq i\leq \xi_1M}-S^{1,i}_x\geq C\Big). \end{align*} As $-S^{1,i}_x$ is a submartingale and $\phi_\theta(x)=e^{\theta x}$ is a strictly increasing convex function for $\theta>0$ $\phi_{\theta}(-S^{1,i}_x)$ is again a submartingale. By Doob's inequality \begin{align}\label{doobi} \P\Big(\sup_{1\leq i\leq \xi_1M}-S^{1,i}_x\geq C\Big)=\P\Big(\sup_{1\leq i\leq \xi_1M}e^{\theta(-S^{1,i}_x)}\geq e^{\theta C}\Big)\leq \frac{\bE\big(e^{\theta(-S^{1,\xi_1M}_x)}\big)}{e^{\theta C}} \end{align} Note that by the independence of $\arrv=(\arr_j)_{j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$ and $\mathbf\serv=(s_j)_{j\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN}$, for $-\alpha<\theta<\beta$ \begin{align}\label{mgf} \bE\Big(e^{\theta(-S^{1,\xi_1 M})}\Big)=\Big[\bE\Big(e^{-\theta s_1}\Big)\bE\Big(e^{\theta a_1}\Big)\Big]^{\xi_1 M}=\Big[\frac{\alpha}{(\alpha+\theta)}\frac{\beta}{(\beta-\theta)}\Big]^{\xi_1M}. \end{align} Plugging \eqref{mgf} in \eqref{doobi} \begin{align}\label{doobi2} \P\Big(\sup_{1\leq i\leq \xi_1M}-S^{1,i}_x\geq C\Big)\leq\Big[\frac{\alpha}{(\alpha+\theta)}\frac{\beta}{(\beta-\theta)}\Big]^{\xi_1M}e^{-\theta C} \end{align} By \eqref{se2} \begin{align*} \sum_{i=1}^{\xi_1 M} e_i>0 \iff w_{0}+\inf_{1\leq i\leq \xi_1M}S_x^{1,i}<0, \end{align*} and so \begin{align} \P\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big)=\P\big(w_{0}+\inf_{1\leq i\leq \xi_1M}S_x^{1,i}<0\big) \end{align} Note that by the definition of $w_0$ (\eqref{w}), $w_0$ is independent of $\{S_x^{1,i}\}_{i\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN_{> 0}}$ and so \begin{align} &\P\Big(w_{0}+\inf_{1\leq i\leq \xi_1M}S_x^{1,i}<0\Big)=\P\Big(\sup_{1\leq i\leq \xi_1M}-S_x^{1,i}>w_{0}\Big)\nonumber\\\nonumber &=\text{int}\P\Big(\sup_{1\leq i\leq \xi_1M}-S_x^{1,i}>w|w_0=w\Big)\P(w_0\in dw)\\\label{eq} &=\text{int}\P\Big(\sup_{1\leq i\leq \xi_1M}-S_x^{1,i}>w|w_0=w\Big)f_w(dw)=\text{int}\P\Big(\sup_{1\leq i\leq \xi_1M}-S_x^{1,i}>w\Big)f_w(dw) \end{align} where $f_w$ is given by (see \eqref{des}) \begin{align}\label{fw} f_w(dw)=\Big((1-\frac{\beta}{\alpha})\delta_0(dw)+\frac{(\alpha-\beta)\beta}{\alpha}e^{-(\alpha-\beta)w}dw\Big), \end{align} so that \begin{align}\label{rwub} \P\Big(w_{0}+\inf_{1\leq i\leq \xi_1M}S_x^{1,i}<0\Big)\leq 1-\frac{\beta}{\alpha}+\text{int}\P\Big(\sup_{1\leq i\leq \xi_1M}-S_x^{1,i}>w\Big)\frac{(\alpha-\beta)\beta}{\alpha}e^{-(\alpha-\beta)w}dw. \end{align} Plugging \eqref{doobi2} in \eqref{rwub} we obtain the result. \end{proof} \medskip \begin{lemma} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and let $M>0$. For $\rhodown{\rho}(\xi)=\rho(\xi)-rN^{-\frac{1}{3}}$, $\rhoup{\rho}(\xi)=\rho(\xi)+rN^{-\frac{1}{3}}$ and $0<\theta<\rhoup{\rho}$, \begin{align}\label{tub} \nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big)\leq \frac{2rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}+\frac{\rho-rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}\Bigg[1+\frac{2r\theta N^{-\frac{1}{3}}+\theta^2}{\rho^2-(r^2N^{-\frac{2}{3}}+2rN^{-\frac{1}{3}}\theta+\theta^2)}\Bigg]^{\xi_1M}\Big(1+2\theta r^{-1}N^\frac{1}{3}\Big)^{-1}. \end{align} \end{lemma} \begin{proof} Set $\beta=\rhodown{\rho}$ and $\alpha=\rhoup{\rho}$ so that \begin{align} \Big[\frac{\alpha}{(\alpha+\theta)}\frac{\beta}{(\beta-\theta)}\Big]^{\xi_1M}e^{-\theta w} &\leq \Big[\frac{\rho+rN^{-\frac{1}{3}}}{(\rho+rN^{-\frac{1}{3}}+\theta)}\frac{\rho-rN^{-\frac{1}{3}}}{(\rho-rN^{-\frac{1}{3}}-\theta)}\Big]^{\xi_1M}e^{-\theta w}\nonumber\\ &=\Big[\frac{\rho^2-r^2N^{-\frac{2}{3}}}{\rho^2-(r^2N^{-\frac{2}{3}}+2rN^{-\frac{1}{3}}\theta+\theta^2)}\Big]^{\xi_1M}e^{-\theta w}\nonumber\\ &=\Big[1+\frac{2r\theta N^{-\frac{1}{3}}+\theta^2}{\rho^2-(r^2N^{-\frac{2}{3}}+2rN^{-\frac{1}{3}}\theta+\theta^2)}\Big]^{\xi_1M}e^{-\theta w}\label{ub2}. \end{align} and that \begin{align}\label{fw2} \frac{(\alpha-\beta)\beta}{\alpha}e^{-(\alpha-\beta)w}=\frac{(2rN^{-\frac{1}{3}})(\rho-rN^{-\frac{1}{3}})}{\rho+rN^{-\frac{1}{3}}}e^{-2rN^{-\frac{1}{3}}w}. \end{align} Using \eqref{ub2} and \eqref{fw2} in \eqref{ub} and the change of variable $2rN^{-\frac{1}{3}}w\mapsto w$ \begin{align} \nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big) &=\frac{2rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}+\frac{\rho-rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}\text{int}_0^\infty\Bigg[1+\frac{2r\theta N^{-\frac{1}{3}}+\theta^2}{\rho^2-(r^2N^{-\frac{2}{3}}+2rN^{-\frac{1}{3}}\theta+\theta^2)}\Bigg]^{\xi_1M}e^{-\theta \frac{1}{2r}N^{\frac{1}{3}}w}e^{-w}dw \nonumber\\ &=\frac{2rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}+\frac{\rho-rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}\Bigg[1+\frac{2r\theta N^{-\frac{1}{3}}+\theta^2}{\rho^2-(r^2N^{-\frac{2}{3}}+2rN^{-\frac{1}{3}}\theta+\theta^2)}\Bigg]^{\xi_1M}\Big(1+\theta 2r^{-1}N^\frac{1}{3}\Big)^{-1}\nonumber \end{align} \end{proof} \begin{lemma}\label{lem:C1ub} Let $\xi\in {\mathrm{ri\,}}\mathcal U$ and let $M>0$ such that $M\leq cN^\frac{2}{3}$. There exists $C(\xi,c)>0$ such that \begin{align}\label{C1ub} \P\Big(\big(C^{\xi,M}_1\big)^c\Big)\leq C N^{-\frac{1}{4}}(\xi_1M)^\frac{3}{8}. \end{align} \end{lemma} \begin{proof} Let $r=(\xi_1M)^{-\frac{1}{8}}N^{\frac{1}{12}}$ and $\theta=(\xi_1M)^{-\frac{1}{2}}$ in \eqref{tub} to obtain \begin{align}\label{mub} \nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{\xi_1 M} e_i>0\Big)\leq A+B, \end{align} where \begin{align*} A=\frac{2N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}}{\rho+N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}} \end{align*} and \begin{align}\label{BT} B=B_1\times B_2 \times B_3 \end{align} where \begin{align} B_1&=\frac{\rho-N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}}{\rho+N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}}=1-\frac{2N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}}{\rho+N^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}}}\label{B1}\\ B_2&=\Bigg[1+\frac{2N^{-\frac{1}{4}}(\xi_1M)^{-\frac{5}{8}}+(\xi_1M)^{-1}}{\rho^2-(N^{-\frac{1}{2}}(\xi_1M)^{-\frac{1}{4}}+2N^{-\frac{1}{4}}(\xi_1M)^{-\frac{5}{8}}+(\xi_1M)^{-1})}\Bigg]^{\xi_1M}\label{B22}\\ B_3&=\Big(1+2(\xi_1M)^{-\frac{3}{8}}N^{\frac{1}{4}}\Big)^{-1}\leq N^{-\frac{1}{4}}(\xi_1M)^\frac{3}{8}.\label{B3} \end{align} There exists $C_A(\rho)>0$ such that \begin{align}\label{A} A\leq C_AN^{-\frac{1}{4}}(\xi_1M)^{-\frac{1}{8}} \quad \text{for $N\geq 1$}. \end{align} Note that by our assumption on $M$ the numerator in \eqref{B22} is dominated by $2cN^\frac{2}{3} \vee(\xi_1M)^{-1}$ and \begin{align*} B_2 \rightarrow C(c) \quad \text{as $N\rightarrow \infty$}, \end{align*} where $C(c)>0$ is locally bounded in $c$. In particular, there exists $C_{B_2}(\rho)>0$ such that \begin{align}\label{B2} B_2\leq C_{B_2} \quad \text{for $N\geq 1$}. \end{align} Plugging \eqref{B1}, \eqref{B2} and \eqref{B3} into \eqref{BT} we see that there exists $C_B(\rho)>0$ such that \begin{align}\label{B} B\leq N^{-\frac{1}{4}}(\xi_1M)^\frac{3}{8}. \end{align} Plugging now \eqref{A} and \eqref{B} into \eqref{mub} and using \eqref{C1} we obtain the result. \end{proof} \begin{proof}[Proof of Proposition \ref{prop:Cub}] Similar to Lemma \ref{lem:C1ub} one can show that for $\xi\in {\mathrm{ri\,}}\mathcal U$ and $M>0$ such that $M\leq cN^\frac{2}{3}$. There exists $C(\xi,c)>0$ such that \begin{align}\label{C2ub} \P\Big(\big(C^{\xi,M}_2\big)^c\Big)\leq C N^{-\frac{1}{4}}(\xi_2M)^\frac{3}{8}. \end{align} \eqref{C1ub} and \eqref{C2ub} imply the result. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:loc}] Plugging \eqref{ubA} and \eqref{ubC} into \eqref{ubs} we see that there exists $c_0>0$ such that for every $c\leq c_0$ \begin{align}\label{ine} \P\Big((\mathcal{H}^{\xi,cN^\frac{2}{3}})^c\Big)\leq CN^{-\frac{1}{4}}(cN^\frac{2}{3})^\frac{3}{8}\leq Cc^\frac{3}{8}. \end{align} By the definition of $\mathcal{H}^{\xi,cN^\frac{2}{3}}$, \eqref{ine} shows that there exists a coupling between \begin{align*} \tilde{H}^{N,c}_{(x,y)}=\rim{G}_{N\xi,y}-\rim{G}_{N\xi,x} \quad (x,y)\in \mathcal{E}(R^{\xi,c}), \end{align*} and $B^{\xi(\rho)}|_{\mathcal{E}(R^{\xi,c})}$, the Busemann function $B^{\xi(\rho)}$ restricted on edges in $\mathcal{E}(R^{\xi,c})$, such that \begin{align}\label{ine2} \P\Big(\tilde{H}^{N,c}\neq B^{\xi(\rho)}|_{\mathcal{E}(R^{\xi,c})}\Big)\leq Cc^\frac{3}{8}. \end{align} \eqref{ine2} shows that \begin{align}\label{ine3} d_\text{TV}\Big(\tilde{H}^{N,c}, B^{\xi(\rho)}|_{\mathcal{E}(R^{\xi,c})}\Big)\leq Cc^\frac{3}{8}. \end{align} As the distribution of $B^{\xi(\rho)}|_{\mathcal{E}(R^{\xi,c})}$ equals that of \begin{align*} \tilde{H}^{{\xi(\rho)},N,c}_{(x,y)}=\rim{G}^{\rho(\xi)}_{N\xi,y}-\rim{G}^{\rho(\xi)}_{N\xi,x} \quad (x,y)\in \mathcal{E}(R^{\xi,c}), \end{align*} \eqref{ine3} implies that \begin{align}\label{ine4} d_\text{TV}\Big(\tilde{H}^{N,c}, \tilde{H}^{{\xi(\rho)},N,c}\Big)\leq Cc^\frac{3}{8}. \end{align} \eqref{ine4} implies \eqref{loc} by rotating the LPP picture by $180^\circ$. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:stb}] Plugging \eqref{ubA} and \eqref{ubC} into \eqref{ubs} we obtain the result. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:airy}] Define \begin{align*} &\Delta L^N_x=L^N_x-L^N_0\\ &=2^{-\frac{4}{3}}N^{-\frac{1}{3}}\Big(G_{(0,0),(N+x(2N)^\frac{2}{3},N-x(2N)^\frac{2}{3})}-G_{(0,0),(N,N)}\Big). \end{align*} By Theorem \ref{thm:loc} there exists $c_0>0$ and $C(c_0)>0$ such that for any $|c|\leq c_0$, with probability at least $1-Cc^\frac{3}{8}$, simultaneously for all $|x|\leq c$ \begin{align*} G_{(0,0),(N+x(2N)^\frac{2}{3},N-x(2N)^\frac{2}{3})}-G_{(0,0),(N,N)}=G^\frac{1}{2}_{(0,0),(N+x(2N)^\frac{2}{3},N-x(2N)^\frac{2}{3})}-G^\frac{1}{2}_{(0,0),(N,N)}. \end{align*} Defining \begin{align*} \Delta L^{\frac12,N}_x=2^{-\frac{4}{3}}N^{-\frac{1}{3}}\Big(G^\frac{1}{2}_{(0,0),(N+x(2N)^\frac{2}{3},N-x(2N)^\frac{2}{3})}-G^\frac{1}{2}_{(0,0),(N,N)}\Big), \end{align*} we conclude that with probability at least $1-Cc^\frac{3}{8}$, simultaneously for all $|x|\leq c$ \begin{align} \Delta L^N_x=\Delta L^{\frac12,N}_x. \end{align} which implies that \begin{align}\label{eq1} d_{TV}\big(\Delta L^N_x|_{[-c,c]},\Delta L^{\frac12,N}_x|_{[-c,c]}\big)\leq Cc^{\frac{3}{8}}. \end{align} The following limits are in distribution in the topology of continuous functions on $[-c,c]$. \begin{align} &\lim_{N\rightarrow \infty}\Delta L^N=\mathcal{A}'_2=\mathcal{A}_2(x)-\mathcal{A}_2(0)-x^2\label{limits}\\ &\lim_{N\rightarrow \infty}\Delta L^{\frac12,N}=\mathcal{B}\label{limits2}. \end{align} Using Lemma \ref{lem:cod2} with \eqref{limits}--\eqref{limits2} and \eqref{eq1} implies that \begin{align*} d_{TV}\big(\mathcal{A}'_2|_{[-c,c]},\mathcal{B}|_{[-c,c]}\big)\leq 3Cc^\frac{3}{8}, \end{align*} which implies the result. \end{proof} \begin{proof}[Proof of Corollary \ref{thm:airyr}] By the stationarity of the $\mathcal{A}_2$, it is enough to verify the claim for $I=[0,a]$ for some $a>0$. For every $\epsilon>0$, let $\Omega^\epsilon=C[0,\epsilon]$ be the space of continuous functions on the interval $[0,\epsilon]$. Let $\mathcal{F}^\epsilon$ be the Borel sigma algebra associated with the supremum metric on $\Omega^\epsilon$. By Theorem \ref{thm:airy}, for every $\delta>0$ there exists $0<\epsilon\leq a$ and a probability space $(\Omega^\epsilon,\P^\epsilon)$ such that \begin{align}\label{reg} \P^\epsilon\Big(\mathcal{A}'_2|_{[0,\epsilon]}=\mathcal{B}|_{[0,\epsilon]}\Big)>1-\delta. \end{align} For $\epsilon\in(0,a]$, \eqref{reg} implies that with probability larger than $1-\delta$ \begin{align}\label{reg3} &\sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}'_2(t+h)-\mathcal{A}'_2(t)}{\omega_B(h)}\geq \sup_{t\in [0,\epsilon)}\limsup_{h\downarrow 0}\frac{\mathcal{A}'_2(t+h)-\mathcal{A}'_2(t)}{\omega_B(h)}\\ &= \sup_{t\in [0,\epsilon)}\limsup_{h\downarrow 0}\frac{\mathcal{B}(t+h)-\mathcal{B}(t)}{\omega_B(h)}=1,\nonumber \end{align} where the last equality comes from L\'{e}vy's modulus of continuity \cite[Theorem 10.1]{morters2010brownian} and self-similarity of the Brownian motion. Taking $\delta\rightarrow 0$ \begin{align*} \sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}'_2(t+h)-\mathcal{A}'_2(t)}{\omega_B(h)}\geq 1 \quad \text{with probability $1$}. \end{align*} Note that \begin{align}\label{reg2} &\sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}'_2(t+h)-\mathcal{A}'_2(t)}{\omega_B(h)}\\\nonumber &=\sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}_2(t+h)-\mathcal{A}_2(t)}{\omega_B(h)}+\sup_{t\in I}\limsup_{h\downarrow 0}\frac{(t+h)^2-t^2}{\omega_B(h)}\\\nonumber &=\sup_{t\in I}\limsup_{h\downarrow 0}\frac{\mathcal{A}_2(t+h)-\mathcal{A}_2(t)}{\omega_B(h)} \end{align} Plugging \eqref{reg2} in \eqref{reg3} implies the result. \end{proof} \section{Coalescence of Geodesics} In this section we prove Theorem \ref{thm:ubc} and Theorem \ref{thm:ubc2}. For technical reasons, namely the direction in which we send $v_n$ to infinity in \eqref{v:853.3}, we prove the results for a setup that is a bit different, yet equivalent, to the one in Figure \ref{fig:coal} (see Figure \ref{fig:ubc}). \subsection{Upper bound on $\P(|o-p_c|\leq \alpha N)$} Let $\rim{G}^\rhoup{\rho}$ and $\rim{G}^\rhodown{\rho}$ be the stationary LPP with $\rhoup{\rho}=\rho+rN^{-\frac{1}{3}}$ and $\rhodown{\rho}=\rho-rN^{-\frac{1}{3}}$ constructed through \eqref{Gr11}--\eqref{Gr12} with the boundary weights on the north-east boundaries of $\mathcal{R}^{\xi N}$ as in \eqref{BW} and the bulk weights $\{\omega_x\}_{x\in\mathcal{R}^{\xi N}}$. Similarly to \eqref{Adef} define \begin{align*} \rim{A}^{r}=\Big\{\rim{Z}^{\rhodown{\rho}(\xi)}_{q^1,o}<-aN^\frac{2}{3}\Big\}\bigcap \Big\{\rim{Z}^{\rhoup{\rho}(\xi)}_{q^1,o}>0\Big\}. \end{align*} Similarly to Corollary \ref{cor:ubA} we have \begin{lemma} Fix $\xi\in {\mathrm{ri\,}}\mathcal U$ and $a>0$. There exist $C(\xi,a)>0$, locally bounded in $a$, and $N_0(\xi,r)>0$ such that \begin{align}\label{ub3} \P((\rim{A}^{r})^c)\leq Cr^{-3}. \end{align} \end{lemma} \begin{proof} By definition of $\rim{A}^{r}$ \begin{align} \P((\rim{A}^{r})^c)\leq \P\big(\rim{Z}^{\rhodown{\rho}(\xi)}_{q^1,o}\geq-aN^\frac{2}{3}\big)+\P\big(\rim{Z}^{\rhoup{\rho}(\xi)}_{q^1,o}<0\big) \end{align} The bound on $\P\big(\rim{Z}^{\rhoup{\rho}(\xi)}_{q^1,o}<0\Big)$ comes from \eqref{lb-2}, it remains to bound $\P\big(\rim{Z}^{\rhodown{\rho}(\xi)}_{q^1,o}\geq -aN^\frac{2}{3}\big)$. Let $u=(u_1,u_2)=\xi N-aN^\frac{2}{3}e_2$, and let $\rim{G}^{\rhodown{\rho},[q^1]}_{u,x}$ be the LPP induced by $\rim{G}^\rhodown{\rho}_{q^1,x}$ at $u$. By Lemma \ref{app-lm1} we see that \begin{align} \P\big(\rim{Z}^\rhodown{\rho}_{q^1,x}\geq-aN^\frac{2}{3}\big)=\P\big(\rim{Z}^{[q^1]}_{u,x}\geq 0\big), \end{align} where $\rim{Z}^{[q^1]}_{u,x}$ is the exit point of $\rim{G}^{\rhodown{\rho},[q^1]}_{u,x}$. Compute \begin{align*} &\big(u_2-\frac{\rhodown{\rho}^2}{(1-\rhodown{\rho})^2}u_1\big)-o_2=\xi_2N-\frac{\rhodown{\rho}^2}{(1-\rhodown{\rho})^2}\xi_1 N-aN^\frac{2}{3}\\ &=\frac{\xi_2 N\big(1-2(\rho-rN^{-\frac{1}{3}})+(\rho-rN^{-\frac{1}{3}})^2\big)-\big(\rho^2-2\rho rN^{-\frac{1}{3}}+r^2N^{-\frac{2}{3}}\big)\xi_1N}{(1-\rhodown{\rho})^2}-aN^\frac{2}{3}\nonumber\\ &=\frac{ N\big(\xi_2(1-\rho)^2-\xi_1\rho^2\big)+2r N^\frac{2}{3}\big(\xi_1\rho +\xi_2(1-\rho)\big)+ N^\frac{1}{3}r^2(\xi_2-\xi_1)}{(1-\rhodown{\rho})^2}-aN^\frac{2}{3}\\ &=\frac{2(r-c'a) N^\frac{2}{3}\big(\xi_1\rho +\xi_2(1-\rho)\big)+ N^{-\frac{1}{3}}r^2(\xi_2-\xi_1)}{(1-\rhodown{\rho})^2}\nonumber, \end{align*} where \begin{align} c'=\frac{(1-\rhodown{\rho})^2}{2[\xi_1\rho+\xi_2(1-\rho)]}. \end{align} It follows that there exists $N_0(\xi,r)$ such that for $N>N_0$ \begin{align} \Big(u_2-\frac{\rhodown{\rho}^2}{(1-\rhodown{\rho})^2}u_1\Big)-o_2>\frac{(r-ca) N^\frac{2}{3}\big(\xi_1\rho +\xi_2(1-\rho)\big)}{(1-\rho)^2}\nonumber, \end{align} where \begin{align} c=\frac{(1-\rho)^2}{4[\xi_1\rho+\xi_2(1-\rho)]}. \end{align} It then follows by \cite{sepp-cgm-18}[Corollary 5.10] that there exists a constant $C_1(\xi)>0$ such that \begin{align*} \P\big(\rim{Z}^{[q^1]}_{u,x}>0\big)\leq C_1(r-ca)^{-3}, \end{align*} the proof is now complete. \end{proof} Let $0<\alpha<1$ and $o_\alpha=\alpha\xi N$. We define $\mathfrak{R}_\alpha=[o,o_\alpha]$ to be the rectangle whose left bottom corner is $o$ and whose upper right corner is $o_\alpha$. We shall need the following result. \begin{lemma}\label{lem:zub} Fix $\xi\in {\mathrm{ri\,}}\mathcal U$, $0<\alpha<1$ and $r>0$. There exists $C(\xi)>0$ such that for $t>\alpha r$ and $N>N_0(\xi,r)$ \begin{align} &\P\Big(|\rim{Z}^\rhoup{\rho}_{o_\alpha,o}|\geq tN^\frac{2}{3}\Big)\leq C\alpha^2 t ^{-3}\label{aub1}\\ &\P\Big(|\rim{Z}^\rhodown{\rho}_{o_\alpha,o}|\geq tN^\frac{2}{3}\Big)\leq C\alpha^2 t^{-3}\label{aub2}. \end{align} \end{lemma} \begin{proof} We prove \eqref{aub1} as \eqref{aub2} is similar. In fact we only prove here the upper bound for $\P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,o}>tN^\frac{2}{3}\big)$ as the bound on $\P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,o}<tN^\frac{2}{3}\big)$ is similar. Let $\rim{G}^{\rhoup{\rho},[o_\alpha]}_{u,x}$ be the LPP induced by $\rim{G}^\rhoup{\rho}_{o_\alpha,x}$ at $u$ where $u=\alpha \xi N-A_1tN^\frac{2}{3}e_1$, and \begin{align}\label{A1} A_1=\frac{4(\xi_1\rho+\xi_2(1-\rho))}{\rho^2}. \end{align} By Lemma \ref{app-lm1} we see that \begin{align}\label{ib} \P\big(\rim{Z}^{[o_\alpha]}_{u,x}>0\big)=\P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,x}>A_1tN^\frac{2}{3}\big), \end{align} where $\rim{Z}^{[o_\alpha]}_{u,x}$ and $\rim{Z}^\rhoup{\rho}_{o_\alpha,x}$ are the exit points of $\rim{G}^{\rhoup{\rho},[o_\alpha]}_{u,x}$ and $\rim{G}^\rhoup{\rho}_{o_\alpha,x}$ respectively. We would like to show that the characteristic $\xi(\rhoup{\rho})$ emanating from the point $u=(u_1,u_2)$ goes well above the point $o$ on the scale of $N^\frac{2}{3}$. Compute \begin{align*} &\big(u_2-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}u_1\big)-o_2=\alpha\xi_2N-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\big(\alpha\xi_1 N-A_1 tN^\frac{2}{3}\big)\\ &=\frac{\alpha\xi_2 N\big(1-2(\rho+rN^{-\frac{1}{3}})+(\rho+rN^{-\frac{1}{3}})^2\big)-\big(\rho^2+2\rho rN^{-\frac{1}{3}}+r^2N^{-\frac{2}{3}}\big)\alpha\xi_1N}{(1-\rhoup{\rho})^2}+\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}A_1 tN^\frac{2}{3}\nonumber\\ &=\frac{\alpha N\big(\xi_2(1-\rho)^2-\xi_1\rho^2\big)-2r\alpha N^\frac{2}{3}\big(\xi_1\rho +\xi_2(1-\rho)\big)+\alpha N^\frac{1}{3}r^2(\xi_2-\xi_1)}{(1-\rhoup{\rho})^2}+\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}A_1 tN^\frac{2}{3}\nonumber\\ &\geq\frac{tN^{\frac{2}{3}}\Big(\rho^2A_1-\frac{2r\alpha}{t} \big(\xi_1\rho +\xi_2(1-\rho)\big)+\frac{\alpha r^2}{t} N^{-\frac{1}{3}}(\xi_2-\xi_1)\Big)}{(1-\rhoup{\rho})^2}\nonumber. \end{align*} By \eqref{A1}, for $t\geq r\alpha$ \begin{align*} &\Big(u_2-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}u_1\Big)-o_2\geq\frac{t N^\frac{2}{3}\big(2\big(\xi_1\rho +\xi_2(1-\rho)\big)+\frac{\alpha r^2}{t} N^{-\frac{1}{3}}(\xi_2-\xi_1)\big)}{(1-\rho)^2}\nonumber. \end{align*} It follows that there exists $N_0(r)>0$ such that for $N>N_0$ \begin{align*} &\Big(u_2-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}u_1\Big)-o_2\geq\frac{\alpha^{-\frac{2}{3}}t (\alpha N)^\frac{2}{3}\big[\xi_1\rho +\xi_2(1-\rho)\big]}{(1-\rho)^2}\nonumber. \end{align*} It then follows by \cite{sepp-cgm-18}[Corollary 5.10] that there exists a constant $C'_1(\xi)>0$ \begin{align}\label{ib1} \P\big(\rim{Z}^{[o_\alpha]}_{u,x}>0\big)\leq C'_1\alpha^2 t^{-3} \end{align} Plugging \eqref{ib} in \eqref{ib1} implies that \begin{align*} \P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,x}>A_1tN^\frac{2}{3}\big)\leq C'_1\alpha^2 t^{-3}. \end{align*} Applying the change of variables $A_1t\mapsto t$, there exists $C_1(\xi)>0$ such that \begin{align} \P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,x}>tN^\frac{2}{3}\big)\leq C_1\alpha^2 t^{-3}. \end{align} Similarly we show that there exists $C_2(\xi)$ such that \begin{align*} \P\big(\rim{Z}^\rhoup{\rho}_{o_\alpha,x}<-tN^\frac{2}{3}\big)\leq C_2\alpha^2 t^{-3}. \end{align*} Setting $C=C_1\vee C_2$ implies the result. \end{proof} Define the sets \begin{align*} \partial^{\alpha}&= \Big\{\alpha \xi N-ie_1\Big\}_{0\leq i \leq \alpha \xi_1 N}\bigcup \Big\{\alpha \xi N-ie_2\Big\}_{0\leq i \leq \alpha \xi_2 N}\\ \partial^{\alpha,t}_c&= \Big\{\alpha \xi N-ie_1\Big\}_{0\leq i \leq t N^\frac{2}{3}}\bigcup \Big\{\alpha \xi N-ie_2\Big\}_{0\leq i \leq t N^\frac{2}{3}}\\ \partial^{\alpha,t}_f&=\partial^{\alpha}\setminus \partial^{\alpha,t}_c. \end{align*} In words, $\partial^{\alpha}$ is the north-east boundary of $\mathfrak{R}_\alpha$, $\partial^{\alpha,t}_c$ are all the points in $\partial^{\alpha}$ whose $l_1$ distance from $o_\alpha$ is less or equal to $t N^\frac{2}{3}$ while $\partial^{\alpha,t}_f$ are the set of points in $\partial^{\alpha}$ whose $l_1$ distance from $o_\alpha$ is larger or equal to $t N^\frac{2}{3}$. Let $\rhoup{\pi}^{q^1,o}$ and $\rhodown{\pi}^{q^1,o}$ be the geodesics that start from $q^1$ and terminate at $o$, associated to $\rim{G}^\rhoup{\rho}$ and $\rim{G}^\rhodown{\rho}$ respectively. Define \begin{align} \mathcal{B}^{r,\alpha,t}=\big\{\rhoup{\pi}^{q^1,o}\cap \partial^{\alpha,t}_f = \emptyset\big\}\cap \big\{\rhodown{\pi}^{q^1,o}\cap \partial^{\alpha,t}_f = \emptyset\big\} \end{align} The superscript $r$ in $\mathcal{B}^{r,\alpha,t}$ appears implicitly in $\rhoup{\rho},\rhodown{\rho}$. The following result shows that with high probability the geodesics $\rhoup{\pi}^{q^1,o}$ and $\rhodown{\pi}^{q^1,o}$ will not wonder too far from the point $o_\alpha$. \begin{corollary} Fix $\xi\in {\mathrm{ri\,}}\mathcal U$, $0<\alpha<1$ and $r>0$. There exists $C(\xi)>0$ such that for $t>\alpha r$ and $N>N_0(\xi,r)$ \begin{align} &\P\big((\mathcal{B}^{r,\alpha,t})^c\big)\leq C\alpha^2 t^{-3}\label{iub}. \end{align} \end{corollary} \begin{proof} Note that \begin{align}\label{es} &\Big\{\rhoup{\pi}^{q^1,o}\cap \partial^{\alpha,t}_f \neq \emptyset\Big\}=\Big\{|\rim{Z}^\rhoup{\rho}_{o_\alpha,o}|\geq tN^\frac{2}{3}\Big\}\\ &\Big\{\rhodown{\pi}^{q^1,o}\cap \partial^{\alpha,t}_f \neq \emptyset\Big\}=\Big\{|\rim{Z}^\rhodown{\rho}_{o_\alpha,o}|\geq tN^\frac{2}{3}\Big\}\label{es2}. \end{align} Taking probabilities on both sides of \eqref{es} and \eqref{es2}, using Lemma \ref{lem:zub} and union bound we obtain \eqref{iub}. \end{proof} Define the sets \begin{align*} \cD^{r,\alpha,t}_1&=\{B^{\rhoup{\xi}}_{o_\alpha-ke_1,o_\alpha-(k-1)e_1}=B^{\rhodown{\xi}}_{o_\alpha-ke_1,o_\alpha-(k-1)e_1}\} \qquad\text{for $1 \leq k \leq t N^\frac{2}{3}$}\\ \cD^{r,\alpha,t}_2&=\{B^{\rhoup{\xi}}_{o_\alpha-ke_2,o_\alpha-(k-1)e_2}=B^{\rhodown{\xi}}_{o_\alpha-ke_2,o_\alpha-(k-1)e_2}\} \qquad\text{for $1 \leq k \leq t N^\frac{2}{3}$}\\ \cD^{r,\alpha,t}&=\cD_1^{r,\alpha,t}\cap \cD_2^{r,\alpha,t}, \end{align*} where the superscript $r$ is implicit in $\rhoup{\xi},\rhodown{\xi}$ (\eqref{xibar}). \begin{lemma} For every $\xi\in{\mathrm{ri\,}}\mathcal U$ and $0<\alpha<1$, there exists $C(\xi)>0$ so that for every $r\geq 1$ and $t\leq r^{-2}$ there exists $N_0(r)>0$ such that for $N\geq N_0$ \begin{align}\label{Dub} \P\Big((\cD^{r,\alpha,t})^c\Big)\leq Ct^{\frac{1}{2}}r. \end{align} \end{lemma} \begin{proof} We show \eqref{Dub} for $\cD^{r,\alpha,t}_2$ the result then follows by union bound. As in \eqref{C2} we have \begin{align}\label{D2ub} \P\Big(\big(\cD^{r,\alpha,t}_2\big)^c\Big)=\nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{tN^\frac{2}{3}} e_i>0\Big). \end{align} Using \eqref{tub} with $\theta=t^{-\frac{1}{2}}N^{-\frac{1}{3}}$ \begin{align}\label{qub} \nu^{\rhodown{\rho},\rhoup{\rho}}\Big(\sum_{i=1}^{tN^\frac{2}{3}} e_i>0\Big)\leq \frac{2rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}+\frac{\rho-rN^{-\frac{1}{3}}}{\rho+rN^{-\frac{1}{3}}}\Bigg[1+\frac{\big(2rt^{\frac{1}{2}}+1\big)t^{-1}N^{-\frac{2}{3}}}{\rho^2-(r^2N^{-\frac{2}{3}}+2rt^{-\frac{1}{2}}N^{-\frac{2}{3}}+t^{-1}N^{-\frac{2}{3}})}\Bigg]^{tN^\frac{2}{3}}\Big(1+2t^{-\frac{1}{2}} r^{-1}\Big)^{-1} \end{align} Sending $N$ to $\infty$, the right hand site of \eqref{qub} converges to \begin{align}\label{qub2} e^{\rho^{-2}\big(2rt^{\frac{1}{2}}+1\big)}\Big(1+2t^{-\frac{1}{2}} r^{-1}\Big)^{-1}\leq e^{\rho^{-2}\big(2rt^{\frac{1}{2}}+1\big)}\frac{1}{2}t^{\frac{1}{2}} r. \end{align} Plugging \eqref{qub2} in \eqref{D2ub}, by our assumption on $t$, $rt^{\frac{1}{2}}\leq 1$, and so we see that there exists $C_2(\xi)>0$ such that for every $r\geq 1$, there exists $N_0(r)>0$ such that for $N\geq N_0$ \begin{align*} \P\Big((\cD_2^{r,\alpha,t})^c\Big)\leq C_2t^{\frac{1}{2}}r. \end{align*} Similar bound can be obtained for $\cD_2^{r,\alpha,t}$ the result then follows by union bound. \end{proof} \begin{figure}[t] \includegraphics[scale=1]{coal_two_sqaures_pic_c.pdf} \caption{\small With high probability the geodesics $\rhoup{\pi}_{q^1,o}$ and $\rhodown{\pi}_{q^1,o}$ sandwich the geodesics $\pi_{q^1,o}$ and $\pi_{q^2,o}$. The stationary geodesics (in red) use the same weights on edges in $\mathcal{E}(\partial^{\alpha,t}_c)$.}\label{fig:ubc} \end{figure} \begin{proof}[Proof of Theorem \ref{thm:ubc}] We first claim that on the event $\rim{A}^{r} \cap \mathcal{B}^{r,\alpha,t}\cap \cD^{r,\alpha,t}$ the geodesics $\pi^{q^1,o}$ and $\pi^{q^2,o}$ must coalesce outside $\mathfrak{R}_\alpha$ (see Figure \ref{fig:ubc}). On the event $\rim{A}^{r}$ \begin{align} \rhoup{\pi}_{q^1,o}{\preceq} \pi^{q^1,o} {\preceq} \pi^{q^2,o} {\preceq} \rhodown{\pi}_{q^1,o}. \end{align} This means that coalescence of the geodesics $\rhoup{\pi}_{q^1,o}$ and $\rhodown{\pi}_{q^1,o}$ outside $\mathfrak{R}_\alpha$ implies the coalescence of the geodesics $\pi^{q^1,o}$ and $\pi^{q^2,o}$ outside $\mathfrak{R}_\alpha$. It is therefore enough to show that on the set $\mathcal{B}^{r,\alpha,t}\cap \cD^{r,\alpha,t}$ \begin{align}\label{cog} \mathcal{P}^{\xi,\alpha N}(\rhoup{\pi}_{q^1,o})= \mathcal{P}^{\xi,\alpha N}(\rhodown{\pi}_{q^1,o}). \end{align} On the event $\mathcal{B}^{r,\alpha,t}$ the geodesics $\rhoup{\pi}_{q^1,o}$ and $\rhodown{\pi}_{q^1,o}$ do not cross $\partial^{\alpha,t}_f$ and therefore use only the weights $B^\rhoup{\rho}_e,B^\rhodown{\rho}_e$ where $e\in\mathcal{E}(\partial^{\alpha,t}_c)$ and the bulk weights $\{\omega_x\}_{x\in\mathfrak{R}_\alpha}$. It follows that on $\mathcal{B}^{r,\alpha,t}\cap \cD^{r,\alpha,t}$ \eqref{cog} holds. Set $r=\alpha^{-\frac{2}{27}},t=\alpha^\frac{16}{27}$ so that $t=\alpha^{\frac{16}{27}}\geq \alpha^{\frac{25}{27}}=\alpha r$ holds (since $0<\alpha<1$). Use \eqref{ub3}, \eqref{iub} and \eqref{Dub} to see that there exists $C'(\xi,a)>0$ such that \begin{align*} &\P(|o-p_c|\leq (\xi_1\wedge\xi_2) \alpha N)\leq \P(p_c \in \mathfrak{R}_\alpha)\\ &\leq \P\Big((\rim{A}^{\alpha^{-\frac{2}{27}}})^c\Big)+\P\Big((\mathcal{B}^{\alpha^{-\frac{2}{27}},\alpha,\alpha^{\frac{16}{27}}})^c\Big)+\P\Big((\cD^{\alpha^{-\frac{2}{27}},\alpha,\alpha^{\frac{16}{27}}})^c\Big)\\ &\leq C'\Big(\alpha^{\frac{2}{9}}+\alpha^{\frac{2}{9}}+\alpha^{\frac{2}{9}}\Big). \end{align*} The result now follows. \end{proof} \subsection{Upper bound on $\P(|q^2-p_c|\leq \alpha N)$} For every $\xi\in {\mathrm{ri\,}}\mathcal U$ and $m\in \bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN$, define the set \begin{align*} &\mathcal{C}} \def\cD{\mathcal{D}^{\xi+}_{m,t}=\{m\}\times \{y\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN:m\nicefrac{\xi_2}{\xi_1}-y\leq tN^{\frac{2}{3}}\}\\ &\mathcal{C}} \def\cD{\mathcal{D}^{\xi-}_{m,t}=\{m\}\times \{y\in\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN:m\nicefrac{\xi_2}{\xi_1}-y\geq -tN^{\frac{2}{3}}\}. \end{align*} Let $\xi^1=\xi$ and $\xi^2=\xi-(0,aN^{-\frac{1}{3}})$ be two vectors whose direction is that of the characteristics emanating from $o$ associated with the point $q^1$ and $q^2$ respectively. Let $\rhoup{\rho}=\rho(\xi)+rN^{-\frac{1}{3}}$, $\rhodown{\rho}=\rho(\xi)-rN^{-\frac{1}{3}}$ and consider $G^\rhoup{\rho}_{o,x}$ and $G^\rhodown{\rho}_{o,x}$ on $\mathcal{R}^{\xi N}$ as in \eqref{Gr2}. For $x\in o+\bZ} \def\Q{\bQ} \def\R{\bR}\def\N{\bN^2_{>0}$, let $\rhoup{\pi}^{o,x}$ and $\rhodown{\pi}^{o,x}$ be the geodesics associated with the last passage time $G^\rhoup\rho_{o,x}$ and $G^\rhodown\rho_{o,x}$ respectively. We shall need the following auxiliary result. \begin{lemma}\label{lem:cg} Let $0<\alpha<1$ and $r\geq 1$. There exists $N_0(\xi,r),C(\xi),A(\xi)>0$ such that for $N>N_0$ and $t\geq A\alpha r$ \begin{align} &\P\Big(\pi^{q^1,o}\in (\mathcal{C}} \def\cD{\mathcal{D}^{\xi^1+}_{(1-\alpha)\xi_1 N,t})^c\Big)\leq C(\alpha^{2}t^{-3}+r^{-3})\label{cub2}\\ &\P\Big(\pi^{q^2,o}\in (\mathcal{C}} \def\cD{\mathcal{D}^{\xi^2-}_{(1-\alpha)\xi_1 N,t})^c\Big)\leq C(\alpha^{2}t^{-3}+r^{-3})\label{cub3}. \end{align} \end{lemma} \begin{proof} We prove only \eqref{cub2} as the proof of \eqref{cub3} is similar. We would first like to show that there exist $N_0(\xi,r),C_1(\xi),A(\xi)>0$ such that for $N>N_0$ and $t\geq A\alpha r$ (see Figure \ref{fig:gd}) \begin{align}\label{ubp} \P\Big(\rhoup{\pi}^{o,q^1}\in \big(\mathcal{C}} \def\cD{\mathcal{D}^{\xi+}_{(1-\alpha)\xi_1 N,t}\big)^c\Big) \leq C_1\alpha^{2}t^{-3} . \end{align} To see that \eqref{ubp} holds, let $u=\big((1-\alpha) \xi_1N,(1-\alpha) \xi_2N-tN^\frac{2}{3}\big)$ and consider $G^{\rhoup{\rho},[o]}_{u,x}$. Note that \begin{align}\label{pze} \big\{\rhoup{\pi}^{o,q^1}\in \big(\mathcal{C}} \def\cD{\mathcal{D}^{\xi+}_{(1-\alpha)\xi_1 N,t}\big)^c\big\}=\big\{Z^{[o]}_{u,q^1}>0\big\}. \end{align} We compute \begin{align*} &\xi_2N-\big[(1-\alpha) \xi_2 N-tN^\frac{2}{3}+\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\alpha \xi_1N\big]\\ &=\alpha\xi_2N-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\alpha\xi_1N+tN^\frac{2}{3}\\ &=\frac{\alpha\xi_2 N\big(1-2(\rho+rN^{-\frac{1}{3}})+(\rho+rN^{-\frac{1}{3}})^2\big)-\big(\rho^2+2\rho rN^{-\frac{1}{3}}+r^2N^{-\frac{2}{3}}\big)\alpha\xi_1N}{(1-\rhoup{\rho})^2}+tN^\frac{2}{3}\nonumber\\ &=\frac{\alpha N\big(\xi_2(1-\rho)^2-\xi_1\rho^2\big)-2r\alpha N^\frac{2}{3}\big(\xi_1\rho +\xi_2(1-\rho)\big)+\alpha N^\frac{1}{3}r^2(\xi_2-\xi_1)}{(1-\rhoup{\rho})^2}+tN^\frac{2}{3}\nonumber\\ &=\frac{tN^{\frac{2}{3}}\Big((1-\rhoup{\rho})^2-(1-\rho)^2+(1-\rho)^2-\frac{2r\alpha}{t} \big(\xi_1\rho +\xi_2(1-\rho)\big)+\frac{\alpha r^2}{t} N^{-\frac{1}{3}}(\xi_2-\xi_1)\Big)}{(1-\rhoup{\rho})^2}\nonumber. \end{align*} If \begin{align*} t\geq \frac{5\alpha r(\xi_1\rho+\xi_2(1-\rho))}{(1-\rho)^2}, \end{align*} then there for $C'(\xi)>0$ \begin{align}\label{lh} \alpha\xi_2N-\frac{\rhoup{\rho}^2}{(1-\rhoup{\rho})^2}\alpha\xi_1N+tN^\frac{2}{3}&\geq \frac{tN^{\frac{2}{3}}\Big((1-\rhoup{\rho})^2-(1-\rho)^2+\frac{3}{5}(1-\rho)^2+ C'r N^{-\frac{1}{3}}(\xi_2-\xi_1)\Big)}{(1-\rhoup{\rho})^2}, \end{align} so that there exists $N_0(\xi,r)$ such that for $N>N_0$ the left hand side of \eqref{lh} is greater of equal to \begin{align*} \frac{tN^{\frac{2}{3}}\Big(\frac{1}{2}(1-\rho)^2\Big)}{(1-\rho)^2}\nonumber=\frac{1}{2}\alpha^{-\frac{2}{3}}t(\alpha N)^{\frac{2}{3}}. \end{align*} It then follows by \cite{sepp-cgm-18}[Corollary 5.10] that there exists a constant $C_1(\xi)>0$ such that such that for $N>N_0$ \begin{align}\label{zub} \P\big(Z^{[o]}_{u,q^1}>0\big)\leq C_1\alpha^{2}t^{-3}. \end{align} \eqref{ubp} now follows from \eqref{zub} using \eqref{pze}. Next we use \eqref{ubp} to obtain \eqref{cub2}. To see that, we first note that (similar to \eqref{lb-2}) there exists $C_2(\xi)>0$ such that \begin{align*} \P\big(Z^{\rhoup{\rho}}_{o,q^1}>0\big)\geq 1-C_2r^{-3} \end{align*} which implies that \begin{align}\label{og1} \P\big(\pi^{q^1,o}{\preceq}\rhoup{\pi}^{o,q^1})\geq 1-C_2r^{-3}. \end{align} Note that \begin{align}\label{sp} \{\pi^{o,q^1}\in \big(\mathcal{C}} \def\cD{\mathcal{D}^{\xi+}_{(1-\alpha)\xi_1 N,t}\big)^c\}\cap \big\{\pi^{q^1,o}{\preceq}\rhoup{\pi}^{o,q^1}\big\}\subset \{\rhoup{\pi}^{o,q^1}\in \big(\mathcal{C}} \def\cD{\mathcal{D}^{\xi+}_{(1-\alpha)\xi_1 N,t}\big)^c\}. \end{align} Taking probability in \eqref{sp} and using \eqref{ubp} and \eqref{og1} we arrive at \eqref{cub2}. \end{proof} \begin{figure}[t] \includegraphics[scale=1]{coal_sec_pic_c.pdf} \caption{\small With high probability the geodesic $\rhoup{\pi}^{o,q^1}$ exits from the south boundary of $\mathcal{R}^{\xi,N}$ and crosses the set $\mathcal{C}} \def\cD{\mathcal{D}^{\xi^1+}_{(1-\alpha)\xi_1 N,t}$.} \end{figure}\label{fig:gd} \begin{proof}[Proof of Theorem \ref{thm:ubc2}] Fix $0<\alpha<1$. Note that \begin{align*} \Bigg(\frac{N\xi_2}{N\xi_1}-\frac{N\xi_2-aN^\frac{2}{3}}{N\xi_1}\Bigg)(1-\alpha) \xi_1 N=a(1-\alpha)N^\frac{2}{3} \end{align*} Let $t=\frac{a}{3}(1-\alpha)$ and $r=\frac{t}{A}\alpha^{-\frac{2}{3}}$ where $A$ is the constant from Lemma \ref{lem:cg}, so that $t\geq A\alpha r=t\alpha^{\frac{1}{3}}$. By Lemma \ref{lem:cg}, there exists $C(\xi,a)>0$ \begin{align}\label{aub} &\P\Big(\pi^{q^1,o}\in (\mathcal{C}} \def\cD{\mathcal{D}^{\xi^1+}_{(1-\alpha)\xi_1 N,t})^c\Big)\leq C\alpha^2\\ &\P\Big(\pi^{q^2,o}\in (\mathcal{C}} \def\cD{\mathcal{D}^{\xi^2-}_{(1-\alpha)\xi_1 N,t})^c\Big)\leq C\alpha^2.\nonumber \end{align} Let $p_1=\inf\{y:((1-\alpha)\xi_1 N,y)\in \pi^{q^1,o}\}$ and $p_2=\sup\{y:((1-\alpha)\xi_1 N,y)\in \pi^{q^2,o}\}$ be the lowest and highest intersection points of the vertical line at $(1-\alpha)\xi_1 N$ with $\pi^{q^1,o}$ and $\pi^{q^2,o}$ respectively. \eqref{aub} implies that \begin{align*} \P\Big(p_1-p_2< \frac{a}{3}(1-\alpha)N^\frac{2}{3}\Big)\leq 2C\alpha^2. \end{align*} It follows that \begin{align}\label{ub1} \P\Big(p_c\in [\big((1-\alpha)\xi_1 N,0\big),\xi N]\Big)\leq 2C\alpha^2. \end{align} \eqref{ub1} implies the result. \begin{figure}[t] \includegraphics[scale=1]{far_enough_pic_c.pdf} \caption{\small With high probability the geodesic $\pi^{o,q^1}$ crosses the vertical line at $(1-\alpha)\xi_1N$ no too far below the characteristic $\xi^1$ while $\pi^{o,q^2}$ crosses not too far above the characteristic $\xi^2$.} \end{figure}\label{fig:cg} \end{proof} \newpage
\section{Introduction} ``What is the guarantee that a given model uses important and relevant features among the given features?'' This question has been the topic of research for decades in many learning areas, including supervised learning. To address this question in a binary classification task, we present a cooperative game-theoretic framework for feature subset selection. We introduce a classification game with features as players and hinge loss based characteristic function (in terms of linear programs, LPs). As the training error of a classifier that does not use any features (players) is always non-zero, the challenge in defining a cost game is to deal with the requirement that characteristic function's value should be zero for the empty coalition. We overcome this challenge by suitably defining a value game and apportioning the total training error of the hinge loss based linear classifiers using an affine transformation of the Shapley value of the value game. As Shapley value allocates the total training error to each feature based on its proportional contribution (`paid as per your participation, no more, no less'), it is theoretically sound and has been famous as a cost allocation measure (\cite{fiestras2011cooperative,khare2015shapley,Kimms2016}) and in other areas as well (\cite{nisan2007algorithmic}). It also captures the interactions among features by the marginal contribution of a feature. Thus, it is a suitable choice for tasks like Feature Subset Selection (FSS). Further, Shapley value is a core selector in convex games and hence has desirable properties like stability in coalition formation. Our \textbf{major contributions} are: \begin{enumerate} \item Identification of features whose joint contribution to label prediction is significant, as given in Section \ref{subsec: neg_fss}. The feature subset can either be determined by a uniform threshold of 0 for all datasets on Shapley value based error apportioning (SVEA) value or by ranking the SVEA values for a user-given feature set size. \item We explicitly define the notion of an interpretable FSS scheme (Definition \ref{def: Interpre}) and evaluate a range of FSS scheme w.r.t. the proposed definition. We observe that our scheme satisfies all conditions required of an interpretable FSS scheme. \item Identification of features that span a subspace in which data lies with high probability and hence crucial for label prediction, as given in Section \ref{subsec: neg_dr}. Unlike many existing dimension reduction techniques, our scheme doesn't transform the feature space. {Working with a feature subspace, rather than a transformed space, is desirable for model interpretability and explainability}. \item In Section \ref{subsec: eta_error_decomp} and \ref{subsec: converg_SV_error}, we provide insights on the contribution of features whose SVEA value is positive, to the excess $0$-$1$ risk of a surrogate loss based classifier. We also provide an estimate of the unknown true hinge risk of each feature. \item To capture stable apportioning of training error in classification tasks, we introduce the set $C_E(m)$ that is analogous to the core and hence useful for feature selection. We also study convex classification games as Shapley values are core selectors for such games and relate them to FSS (Section \ref{subsec: stable_app}). \end{enumerate} In addition to the above-listed contributions, we present a sampling-based approximation algorithm built on \cite{castro2009polynomial} that does not require computing characteristic function (LP) for $2^{n}$ subset of features all at once; instead, compute it only when a particular subset of features is sampled. Also, in Section \ref{subsec: sample_bias_robust_tech}, we attempt to address the sample bias issue by averaging over the Shapley value based error apportioning across multiple sub-samples and provide $t$-distribution based confidence intervals. We also considered another variant where the linear classifier based training error is regularized and computationally observed that the feature subset selected is the same as that of the unregularized model (details in Supplementary Material (SM) D.3). Our idea that thresholding the modified Shapley value of classification game at 0 identifies the features with substantial joint contribution to the prediction has following motivation. Suppose among a group of players (features), one player has sufficient resources so that it has the power to work (classify) alone. Let us call it a dominant player. Now, if the other players (features) ask this dominant player to join their coalition (to form a classifier), then it asks them for a payoff. Since, the quantity to be divided is an error (cost), for such dominant players, the payoff is in the form of modified Shapley value being negative. We demonstrate this phenomenon in Pima Diabetes dataset where, knowing the blood sugar level (feature) is sufficient to decide whether the patient has diabetes or not. An innate understanding of how our SVEA scheme possesses explainability and interpretability (formally in Definition \ref{def: Interpre}) is as follows. Explainability in our scheme refers to its ability to provide a reason for selecting a feature as important using its SVEA value; a feature with negative SVEA lowers the total training error. An important feature subset constituting such features makes FSS (using the SVEA scheme) explainable. {Interpretability in the context of the SVEA scheme includes accounting for possible interactions among features using Shapley value, using the training error similar to the one used in final classification task and mapping SVEA (importance) value of a particular feature to an apportioning of training error by the Shapley value of the well defined classification game.} The SVEA values can either be negative or positive; features with negative value can be interpreted as the dominant ones (more details in Section \ref{subsec: neg_fss}). \\ \subsection{Related work} \label{subsec: related_work} In this section, first, we provide some work on feature subset selection. Recursive feature elimination by \cite{kohavi1997wrappers} and ReliefF by \cite{kononenko1997ReliefF} are the most popular wrapper and filter methods for feature subset selection. Recently, \cite{song2013fastFSS} present a graph-theoretic clustering-based FSS scheme that first clusters the features and then chose a representative from each cluster to get the final important feature set. An interesting idea of instance dependent FSS for a general task (classification or regression), is presented in \cite{cancela2019scalableInstanceFSS}, where the authors compute saliency for each feature by identifying a task and loss dependent gain function. Cooperative game theory provides a compelling framework for understanding the influence of a single feature or their interactions on the label/class. With this motivation, we give a brief overview of how cooperative game theory has been applied to solve various sub-problems arising in classification. To avoid any misunderstandings, we would like first to present how our work is different (in purpose and approach) from some existing work, which uses similar ideas, along with other contributions as well. Our explicit game formulation in terms of training error (natural approach of ERM) is novel; this further leads to {\it understanding of non-important features' contribution to excess 0-1-risk} and provides an { \it estimate of true hinge risk of each feature}. If the machine learning pipeline consists of 3 components, pre-processing steps like feature selection, actual learning of the hypothesis (classifier), and implications (explainability, transparency), then \cite{kononenko2010efficient} and \cite{oakland16_Datta} deal with the last component and \cite{cohen2005feature} deals with the first component of the pipeline. Explainability, transparency, and interpretability related work use the contribution of a feature (via Shapley value) to understand the reasons for a given classifier making a particular decision; in contrast, our objective is to use Shapley value to identify a subset of features important for predictions or the feature dimensions spanning the dataspace, and hence, belongs to the first component of the pipeline. \cite{cohen2005feature} uses Shapley value on top of the iterative wrapper technique, whereas we only use Shapley value (no iterations). Also, the former technique requires user given threshold on the contribution value whereas for us the threshold of 0, to decide feature subset is not user-given or tuned for but instead decided by the SVEA (indirectly using $tr\_er(\emptyset, m)$ while apportioning). Explicitly, our work can be related to broadly following five research areas. \\ \textbf{Cooperative game theory in classification and related tasks:} \cite{torkaman2011approach} used Shapley value to get the weights for a classifier. \cite{fragnelli2008game} used cooperative game theory where the classifier used is predefined, and Shapley value is directly proportional to the power of a feature (gene). \\ \textbf{Cooperative game theory in feature selection:} Based on the search strategy used, \cite{chandrashekar2014survey} classifies the feature selection techniques into three categories viz., filter techniques, wrapper techniques, and embedded methods. \cite{cohen2007feature} proposed a contribution selection algorithm that uses Shapley value to improve upon wrapper techniques like backward elimination and forward selection. \cite{sun2012ShapleyValue} and \cite{sun2012BanzafIndex} used Shapley value and Banzhaf index respectively to compute the importance of features which is further used with the filter methods based on information-theoretic ranking criteria. All the methods mentioned above use cooperative game theory mainly to give additional information to either a wrapper or filter method. {However, cooperative game theory is central to our scheme as it uses an affine transformation of Shapley value of the classification game which further provides interpretability and explainability to the selected feature subset.} \\ \textbf{Cooperative game theory for explaining a prediction:} \cite{kononenko2010efficient} provide a Shapley value based explainability scheme and use feature contribution for explaining prediction for a given data point; here feature's contribution can change when a different data point is used. An axiomatic approach based on cooperative game theory to define an influence measure is available in \cite{datta2015influence}. Instead of training classifiers, the influence measure is used to decide which features influence the decision of an unknown classifier. \cite{lundberg2017unified} define a class of additive feature attribution methods and use game theory results to explain a model's prediction. \cite{sundararajan2017axiomatic} presented an axiomatic attribution approach for deep neural networks. Unlike \cite{kononenko2010efficient} and other explainability methods, we are interested in apportioning the total training error using Shapley value allocation. Based on this apportioning, we want to differentiate the features as {\em essential} and {\em inessential}. Due to this, the training error functions and value functions in our approach are entirely different from the models in the current literature; we also provide various other interesting interpretations of our model. \\ \textbf{Cooperative game theory for data valuation:} Quantifying the value of data in algorithmic predictions and decisions has become a fundamental challenge. \cite{jia2019towardsvaluationAISTATS} study the problem of data valuation by utilizing the Shapley value and propose two Shapley value estimation algorithms that exploit the structure of the utility function of the game. \cite{ghorbani2019dataShapleyICML} also proposes Monte Carlo and gradient-based methods to efficiently estimate data Shapley values in practical settings where complex learning algorithms, including neural networks, are trained on large datasets. In addition, the authors claim that their methods can identify outliers and corrupted data and provide suggestions on how to acquire future data to improve the predictor. For both the above works, the player set for the underlying game is the set of total data points available. This is in contrast to our scheme, where we use the feature set as the player set. \cite{agarwal2019marketplaceEC} proposes a mathematical model of a system design for a data marketplace. They use Shapley value to divide the generated revenue ``fairly'' among the training features, so sellers get paid for their marginal contribution. The difference between our work of using CGT for FSS (\textit{before training}) and existing work using it for explaining predictions (\textit{after training}), has been also clarified and highlighted by \cite{sundararajan2019shapley}, where they treat feature importance across all the training data and attribution (explaining model prediction) as two separate problems. CGT based data valuation work focuses on selection of the most relevant data points to apportion the overall profit among various contributors by considering data points as players, unlike our work, where we model features as players. We would like to emphasize that our scheme is not just a global version of Shap \cite{lundberg2017unified} as the later scheme averages over the Shap values for every feature across data points to get a summary importance. Instead, we have an explicit game formulation (whose relevance has been already pointed out by \cite{merrick2020explanation} in a different setup of explaining predictions) whose Shapley values are used as feature contribution to the training error. Hence, our definition is novel and takes natural approach of Empirical Risk Minimization (ERM). \textbf{Interpretability in feature subset selection:} Feature subset selection being an integral part of any learning model needs interpretable and explainable methods too. A visual explanation and interpretation approach for dimension reduction is presented by \cite{cavallo2018visual}. Mutual information based feature selection method that uses the unique relevant information and show its importance in health data is given in \cite{liu2018suri}. Local information based interpretable feature subset selection is also studied by \cite{yooninterpretable}. Another more recent approach called Informative Variable Identifier (IVI) in FSS by ensemble category is proposed by \cite{munoz2020informative} where they also provide levels of interpretability in FSS. However, their scheme relies on statistical properties of feature distribution to incorporate feature interactions. We provide a single definition for an FSS algorithm to be interpretable in Definition \ref{def: Interpre}. FSS methods that mitigate the bias amplification in linear models have been proposed by \cite{leino2019feature} wherein the authors have presented two new feature selection algorithms for mitigating bias amplification in linear models, and show how they can be adapted to convolutional neural networks efficiently. The influence function is used to remove the features which have bias towards the prediction. However, our focus is on the feature subset selection. We have also addressed the issue of sample biasedness, but that is different from the biasness of the features towards the prediction. \subsection{Preliminaries}\label{subsec: preliminary} In this section, we introduce some classification (\cite{Mohri}, \cite{steinwart2008support}) and cooperative game (\cite{Narahari},\cite{peleg2007introduction}) terminology and concepts to provide a better understanding of the connection which we will be studying in rest of the paper. \textbf{Classification setup:} Let $\mathcal{X}$ be the feature space and $\mathcal{Y}$ be the label set. Let $\mathcal{D}$ be the joint distribution over $\mathbf{X}\times Y$ with $\mathbf{X} \in \mathcal{X} \subseteq \mathbb{R}^{n}$ and $Y\in \mathcal{Y} = \{-1,1\}.$ Let the in-class probability and class marginal on $\mathcal{D}$ be denoted by $\eta(\mathbf{x}):=P(Y=1|\mathbf{x})$ and $\pi := P(Y=1)$ respectively. Let the decision function be $f:\mathbf{X}\mapsto \mathbb{R}$ and hypothesis class of all measurable functions be $\mathcal{H}$. {We consider linear hypothesis class $\mathcal{H}_{lin}= \{ (\mathbf{w},b), \mathbf{w}\in \mathbb{R}^n, b \in \mathbf{R}\}$ for all real dataset based experiments in this paper. This is because for non-linear models the basic assumption for Shapley value is violated; more details are provided in Section \ref{subsec: kernel_reg_ntworking_exp}.} We have an i.i.d. sample of size $m$ from distribution $\mathcal{D}$, viz., $ D = \{(\mathbf{x}_i,y_i)\}_{i = 1}^{m}$ where $\mathbf{x}_i = (x_{i1}, x_{i2},\ldots, x_{in})$ is the value of the feature and $y_i \in \{-1,1\}$ is the label for $i^{th}$ data point. We use hinge loss based Empirical Risk Minimization (ERM) setup because in addition to many desirable properties such as classification calibration and large margin it imparts to classifiers, it leads to an LP which can be solved in polynomial time. \textbf{Cooperative game theory} (\cite{Narahari,peleg2007introduction}): The Transferable Utility (TU) cooperative game is a pair $(N,v)$ where $N=\{1,\ldots,n\}$ is a set of players and $v: 2^N \mapsto \mathbb{R}$ is the characteristic function, with $v(\emptyset)= 0.$ Shapley value (\cite{Narahari,peleg2007introduction}) is a unique, symmetric, and strongly monotonic solution concept defined as a mapping $\phi : \mathbb{R}^{2^n-1} \mapsto \mathbb{R}^n$ given below: \begin{equation*} \label{eq: Shapley value_cost} \phi_j(v) = \sum_{S\subseteq N\backslash \{j\}} \frac{|S|!(n-|S|-1)!}{n!}[v(S\cup \{j\}) - v(S)], ~~\forall j \in N, ~~\forall ~v \in \mathbb{R}^{2^n-1}. \end{equation*} Detailed interpretation of Shapley value axioms from classification perspective is available in SM B. \section{Training error based classification game $(N,v(\cdot, m))$} \label{sec:training_error_game} In this section, we define the training error incurred by using a subset of features for classification based on the standard ERM setting. Next, we describe a value game and relate it to the training error via a one-to-one mapping. \subsection{Training error function}\label{training_error_fn} Given the dataset/sample $D = \{(\mathbf{x}_i,y_i)\}_{i=1}^m$ with features $N = \{1,\ldots,n\}$, we consider a training error function, $tr\_er(S,m)$ associated with all possible subsets $S\subseteq N$ when sample size is $m$. We define $tr\_er(\emptyset, m)$ as hinge loss based training error of an intercept only classifier and denote it by $\tilde{c}(m):= tr\_er(\emptyset, m)$. \begin{equation} \begin{aligned} \label{empty_lp} &tr\_er(\emptyset, m) =\min\limits_{b, \{\xi_i\}_{i=1}^m} \frac{1}{m}\sum\limits_{i=1}^{m}\xi_i \\ & \text{s.t. } y_i b \geq 1 - \xi_i, ~~ \forall i = 1,\ldots, m\\ & \xi_i \geq 0, ~~ \forall i = 1,\ldots,m. \end{aligned} \end{equation} Similarly, we define the training error, $tr\_er(S,m)$ for any nonempty subset $S= \{j_1,j_2,\ldots,j_r\}$ of size $r$ with $r$ distinct elements/features. This would be minimal hinge loss of the classifier $ (w^{\ast}_{j_1},\ldots,w^{\ast}_{j_r},b^{\ast}_r)$ obtained from the dataset projected to $r$-dimensional subspace, i.e., dataset having feature values $\{x_{ij_1},\ldots,x_{ij_r}\}_{i=1}^m$ and label $\{y_i\}_{i=1}^m$. \begin{equation} \begin{aligned} \label{S_cost_lp} &tr\_er(S,m) = \min\limits_{w_{j_1},\ldots,w_{j_r},b_r,\{\xi_i\}_{i=1}^m} \frac{1}{m}\sum\limits_{i=1}^{m}\xi_i \\ & \text{s.t. } y_i \left(\sum\limits_{j \in S}w_{j}x_{ij} + b_{r}\right) \geq 1 - \xi_i, ~ \forall i \in [m]\\ & \xi_i \geq 0, ~~ \forall i = 1,\ldots,m. \end{aligned} \end{equation} When $S=N$, we have $tr\_er(N,m)$ that is the minimal hinge loss based empirical risk of the classifier $(\mathbf{w}_N^{\ast},b^{\ast}_N)$ when the given dataset is $n$ dimensional, i.e. all $n$ feature values from the sample $D$ are used. Note that the variables used in each ERM are local to that optimization problem only. As conventional cooperative games assume $v(\emptyset)=0$, training error function $tr\_er(\cdot,m)$ with $tr\_er(\emptyset,m) \neq0$ cannot be a valid characteristic function. To circumvent this problem, we define a payoff/value game with characteristic function $v(S,m)$\footnote{Characteristic function as defined here depends on sample size $m$, so we use $m$ as an argument in $v(\cdot, m)$.} given below: \begin{equation}\label{value_to_cost} v(S,m) = tr\_er(\emptyset,m) - tr\_er(S,m), ~ \forall~ S \subseteq N. \end{equation} $v(S,m)$ represents the marginal improvement in the training error obtained due to the presence of the features in $S$. As, $v(\emptyset,m)=0$, it is a valid characteristic function also. This characteristic function along with the feature set $N$ defines a TU \textbf{classification game} $(N,v(\cdot,m))$. Further, the characteristic function $v(S,m)$ is monotonic w.r.t the coalitions, which is an important property from the perspective of allocation. This property is formalized in Proposition \ref{prop: game monotonic} with proof being available in SM B.1. \begin{prop} \label{prop: game monotonic} If $(N,v(\cdot,m))$ is a classification game, then the characteristic function $v(\cdot,m)$ is monotonic, i.e., \begin{equation}\label{v_structure_1} \forall ~~ S \subseteq T \subseteq N, ~~ v(S,m) \leq v(T,m). \end{equation} \end{prop} \subsection{Training error allocation using Shapley value} \label{subsec: train_error_shapley} As Shapley value solution concept has the idea of allocation based on a feature's marginal contribution (no more, no less), it emerges as a suitable candidate for apportioning of $v(N,m)$ among the features in a classification game. The Shapley value of classification game is given below: \begin{equation} \label{eq: Shapley value} \phi_j(N,v(\cdot,m)) = \sum\limits_{S\subseteq N\backslash \{j\}} \frac{|S|!(n-|S|-1)!}{n!}[v(S\cup \{j\},m) - v(S,m)], ~\forall j \in N. \end{equation} Using this Shapley value, Theorem \ref{thm: appor} provides an equitable training error allocation among features. We refer to it as {\bf Shapley value based error apportioning (SVEA)} denoted by $e_j(tr\_er(N,m)), ~\forall ~ j \in N$; as we see below, it is an affine transformation of Shapley value for feature $j\in N$. A proof of Theorem \ref{thm: appor} is available in SM A.1. \begin{thm} \label{thm: appor} There exists a Shapley value based error apportioning, $e: \mathbb{R}^{2^n-1} \rightarrow \mathbb{R}^n$ of the total training error among the features as given in the expression below: \begin{equation}\label{eq: apport_total_train_error} e_j(tr\_er(N,m)) = \frac{\tilde{c}(m)}{n} - \phi_j(N,v(\cdot,m)), ~~ \forall j ~ \in N. \end{equation} \end{thm} For notational convenience, hereafter, we will denote the allocation of training error to feature $j$, by $e_j(m)$ and Shapley value of feature $j$ by $\phi_j(m)$ when the sample size is $m.$ In general, the problem of computing Shapley value is known to be NP-hard \cite{faigle1992shapley}. Also, it has high space complexity due to the space requirement of storing $n!$ permutations or $2^n -1$ characteristic functions. To bypass this issue, we adapt the approximation algorithm given by \cite{castro2009polynomial} for computing the Shapley value of features in the classification game $(N,v(\cdot,m))$. The advantage of using this algorithm is that characteristic function is calculated for a coalition as and when required in the marginal contribution sum. {Note that the computation of required $tr\_er(S,m)$ for a coalition $S$ is scalable as it is by an LP.} Algorithm and related details are available in SM C. In Section \ref{subsec: real_neg_SV_exp_feature}, we use this approximation for datasets with $n\geq 10$. {To evaluate the quality of Shapley value estimates, we compute their difference from the true Shapley value for datasets with $n<10$ and observed that use of 100 Monte Carlo (MC) samples lead to a min 0.5 \% and max 10\% error over 10 trials (different train and test partitioning) across all datasets. If the MC samples are increased to 1000, this error comes down to a max 4 percent. Since only the sign of the apportioning via approx Shapley value matters, use of 100 MC sample is sufficient as the sign is not affected (tested empirically for more than 100 samples too).} \subsection{Properties of the classification game $(N,v(\cdot,m))$} As shown in Proposition \ref{prop: game monotonic} the characteristic function, $v(S, m)$ is monotone as a function of feature set $S$. Next, a rational player (feature) joins a coalition only if it gets better than what it would get individually (by not forming a coalition), never less (Individual Rationality (IR)). Also, there shouldn't be any surplus from the total value after allocation among the players (Collective rationality). As we are ultimately interested in SVEA, $e_j(m), ~j\in N$, we show that it is IR in Theorem \ref{thm: apportion_train IR} (Proof is available in SM A.2). \begin{thm} \label{thm: apportion_train IR} Shapley value based error apportioning $\{e_j(m)\}_{j\in N}$ satisfies individual rationality, i.e., \begin{equation}\label{eq:IR_total train error} e_j(m) \leq tr\_er(\{j\}), ~\forall ~ j \in N. \end{equation} \end{thm} This implies that the allocation of total training error to a feature is less than the training error had it been used alone, which is desirable and reasonable to expect. We observed on UCI datasets that various game theoretic properties for classification game don't hold universally and are dataset dependent. A detailed description of these properties along with counter examples is available in SM B. \section{Insights from Shapley Value based Error Apportioning (SVEA) approach} \label{sec: SVEA_implications} As we are interested in apportioning of $tr\_er(N,m)$ among features, it is possible that for some feature $j\in N$, $e_j(m)<0$. The intuition is as follows: suppose a player (feature) is so dominant that it can work (classify) alone. Now, if the other players (features) ask this dominant player to join their coalition (to form a classifier), then it asks them for a payoff. Since, the quantity to be divided is an error (cost), for such dominant players, the payoff is in the form of SVEA being negative. We formally present this idea in Proposition \ref{prop: 2d_SV_neg} for the two player case whose proof is available in SM A.3. \begin{prop} \label{prop: 2d_SV_neg} Consider a 2-feature classification game $(N,v(\cdot,m))$ with training error function $tr\_er(\{1\},m) = g >0$, $tr\_er(\{2\},m)= G >0$, $tr\_er(\{1,2\},m) = g^{\prime} \leq \min\{g,G\}$. If $\frac{G}{2} > g$, then SVEA of $tr\_er(\{1,2\},m)$ is such that $e_1(m) \leq 0$ and $e_2(m) \geq 0.$ \end{prop} If we generalize the notion of Proposition \ref{prop: 2d_SV_neg} then, apportioning $\{e_j(m)\}_{j\in N}$ of $tr\_er(N,m)$ can provide us with various insights. Based on the above arguments, we study the role of those features for which SVEA is negative, in FSS, in dimension reduction, and in excess $0$-$1$ risk decomposition of a finite sample-based classifier. Also, SVEA values can be interpreted as estimates of true unknown hinge risk of a feature. Based on the above arguments, in this work, we study the role of those features for which SVEA is negative in feature subset selection. In particular, we show SVEA based decision of whether a feature is to be selected or not is easily interpretable. To formalize the notion of interpretabilty in FSS, we define it as follows: \begin{defi} \label{def: Interpre} A scheme for FSS is said to be interpretable if it satisfies following conditions: \begin{enumerate} \item[(P1)] \textbf{Transparency in the process:} The process of finding the feature importance should be transparent and it should be clear how the feature interactions are being accounted for. \item[(P2)] \textbf{Relation to final task:} The feature importance computation should be based on a criterion which takes into account their role in final task (classification). \item[(P3)] \textbf{Justifiable importance values:} Feature importance values should have a meaning/justification in the context of the final task in addition to being just called feature contributions. \end{enumerate} \end{defi} SVEA is interpretable as it satisfies all above conditions. It accounts for all possible interactions among features using Shapley value (P1), uses the training error similar to the one used in final classification task (P2) and SVEA (importance) value of a particular feature correspond to an apportioning of training error by the Shapley value of the \emph{well defined} classification game (P3). Figure \ref{fig: overall_Scheme} depicts the steps of SVEA scheme in which the above properties are satisfied. Next, we summarize which FSS methods satisfy the different conditions from Definition \ref{def: Interpre} in Table \ref{tab: FSS_inter_methods}. \emph{Remark:} The above definition of interpretablilty is fairly generic, as it can be adopted for other schemes (other than FSS) in a broader task (other than classifier design). \begin{table}[h!] \centering \begin{tabular}{|c|c|c|c|} \hline \textbf{Methods/Conditions} & \textbf{P1} & \textbf{P2} & \textbf{P3} \\ \hline \textbf{ReliefF \cite{kononenko1997ReliefF}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{RFECV \cite{kohavi1997wrappers}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{BanzhafI based \cite{sun2012BanzafIndex}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{ShapleyV based \cite{sun2012ShapleyValue}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{LFS \cite{yooninterpretable}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{IVI \cite{munoz2020informative}} & \checkmark & \checkmark & $\times$ \\ \hline \textbf{SVEA based FSS \cite{munoz2020informative}} & \checkmark & \checkmark & \checkmark \\ \hline \end{tabular} \caption{Table summarizing FSS methods w.r.t. interpretability from Definition \ref{def: Interpre}.} \label{tab: FSS_inter_methods} \end{table} \begin{figure}[h!] \centering \includegraphics[width=0.8\textwidth]{Psedocode_SVEA-cropped.pdf} \caption{Flow chart describing interpretable FSS scheme SVEA with highlighted properties, P1, P2, and P3 defined in Def. \ref{def: Interpre}. Here, Tr\_D and Te\_D denote train and test dataset.} \label{fig: overall_Scheme} \end{figure} {Before proceeding further, we would like to note the difference between FSS and dimension reduction considered in this paper. FSS is a special case of dimension reduction, and to perform FSS, we use the SVEA scheme where feature subset to be used for the final classifier is identified based on the sign of SVEA value of a feature (Section \ref{subsec: neg_fss}). However, there can be scenarios when some feature dimensions do not play a role in \textit{spanning the dataspace} as explained in Section \ref{subsec: neg_dr}; this is irrespective of learning task at hand, as seen in Fig \ref{fig:dim_red_2d} with the 2 dimensional data space being effectively spanned by 1 dimension, i.e., $x_1$.} \subsection{Negative valued SVEA and FSS} \label{subsec: neg_fss} We observed that the features for which SVEA is negative (set $SVEA_{neg}$) are the ones whose joint contribution in label prediction is significant. To formalize this idea, we introduce the notion of the power of classification of a subset, say $K$, of features, defined below: \begin{defi}[Power of classification of feature subset $K$, $P_{SV}(K)$] Given a training dataset $D$ of size $m$ with feature values $\{x_{i1},\ldots,x_{in}\}_{i=1}^m$ and labels $\{y_i\}_{i=1}^m$, the power of classification of a set of features $K =\{j_1,j_2,\ldots,j_k \} \subset N$ is defined as follows: \begin{equation} P_{SV}(K) = \frac{\sum\limits_{i=1}^{m_{te}}\mathbf{1}_{[y_if_K^*(x_{ij_1},x_{ij_2},\ldots,x_{ij_k}) \geq 0]}}{\sum\limits_{i=1}^{m_{te}}\mathbf{1}_{[y_if_N^*(x_{i1},x_{i2},\ldots,x_{in}) \geq 0]}}, \end{equation} where $f_K^*(\cdot)$ and $f_N^*(\cdot)$ are the optimal {linear} classifiers in the respective subspaces and $m_{te}$ (different from $D$) is the number of sample points used for testing the classifiers and $\mathbf{1}_{[A]}$ is the indicator function with value 1 if $A$ holds; else has 0 value. \end{defi} The higher the value of $P_{SV}(K)$, the higher is the joint influence of the subset $K$ in classification. {The powerful subset $K = SVEA_{neg}$ is not pre-decided but determined by SVEA. Due to Shapley value's property of identifying the important players based on their contributions, SVEA scheme identifies features that play a dominating role in the task of classification and forms a set $K$.} We demonstrate this FSS phenomenon using Synthetic dataset 2 ($SD2$) in SM D.2. We give details about the FSS interpretation for UCI datasets with SVEA, $\{e_j(m)\}_{j\in N}$ being negative in Section \ref{subsec: real_neg_SV_exp_feature}. Besides, we observe as in SM D.5 that $l_1$-regularized squared hinge loss based ERM doesn't identify important features for UCI datasets like Heart, Pima diabetes, and Thyroid. \subsection{Relation between negative valued SVEA and dimension reduction} \label{subsec: neg_dr} By dimension reduction from $\mathbb{R}^n$ to $\mathbb{R}^d$, we mean that $(n-d)$ feature dimensions have zero class conditional expected values and minimal class conditional variance. We consider a special structure on the distribution for dimension reduction and provide the following result: \begin{thm}\label{thm: dimen_gen} Consider the random variables $\mathbf{X}\subseteq \mathbb{R}^n,~Y\in \{-1,1\}$. Let $A :=\{ k \in N : E[X_k|Y=y]=0, var(X_k|Y=y) \leq \epsilon^{\prime}_k, ~\mathbb{P}[X_k \cap X_{k^{\prime}}|Y=y] = \mathbb{P}[X_k|Y=y]\times \mathbb{P}[X_{k^{\prime}}|Y=y],~ \forall k\neq k^{\prime} \in N,~ y\in Y\}.$ Also, $X_j, ~j\in A^c$ are independent of $X_k, k\in A.$ Then, \begin{equation} \label{eq: dimen_red_formalize} \mathbb{P}[(X_j,X_k): X_j \in \mathbb{R}, |X_k| \leq \epsilon_k, j \in A^c, k \in A] \geq \prod_{k\in A} \left(1- \frac{var(X_k|Y=y)}{\epsilon_k^2} \right). \end{equation} \end{thm} Proof of Theorem \ref{thm: dimen_gen} is available in SM A.4. Consider the R.H.S of Eq. \eqref{eq: dimen_red_formalize}. Since, $Var(X_k|Y)$ is very small, the cross product terms in the expansion of R.H.S can be ignored. Hence, using the first order approximation provides a high probability ($1-\delta$) bound with $\delta \approx \sum\limits_{k \in A}\frac{Var(X_k|Y)}{\epsilon^2_k}.$ The above analysis says that the dataset lies in the lower sub-space whose basis corresponds to features with indices belonging to $A^c$ with high probability. We observed that in such datasets, $e_j(m)<0$ for feature $X_j, ~j \in A^c.$ Hence, the lower dimensional subspace has basis corresponding to features $X_j$ with SVEA $e_j(m) < 0$. We consider a $2$-dimensional synthetic dataset (generated using the technique given in \cite{efron1997improvements}) to demonstrate the above aspect. \begin{figure}[h!] \centering \includegraphics[scale=0.45]{2_d_dim_red_updated.png} \caption{\footnotesize{Scatter plot of 50 data points from SD1. Here, $P(\mathbf{X}=(X_1,X_2):X_1\in \mathbb{R}, |X_2|\leq 0.03) \geq 0.99$, i.e., the data predominantly lies in 1-d subspace corresponding to feature 1 with Shapley value based error apportioning $e_1(m)<0$.}} \label{fig:dim_red_2d} \end{figure} \textbf{Synthetic dataset 1 (SD1):} We first generate $1000$ binary labels $Y$ uniformly at random and then, a $2$-dimensional feature vector $X$ for each label by drawing a sample such that $X|Y=1 \sim N([0.3; 0], [0.1, 0; 0, 0.001])$ and $X|Y=-1 \sim N([-0.3;0], [0.1, 0; 0, 0.001])$. SVEA $e_j(m), ~ j=\{1,2\}$ for 2 features is $[-0.073; 0.494]$. Invoking Theorem \ref{thm: dimen_gen}, the probability of the event that feature 2's value is within an $\epsilon$-ball, i.e., $P(|X_2| \leq \epsilon)$ is greater than $\left(1- \frac{var(X_2|Y=y)}{\epsilon^2}\right)$. When $\epsilon = 0.03$, we have $|X_2|\leq 0.03$ with probability more than $0.99$ as evident in Figure \ref{fig:dim_red_2d}. Also, using SVM, 1-dimensional classifier (trained on feature 1 only) has test accuracy of $0.85$ which is same as that of 2-dimensional classifier (test accuracy $= 0.855$). Hence, SD1 is reducible to a subspace with basis as the feature ($1$ here) with $e_1(m)<0$. In SM D.2, we provide one more Synthetic dataset 3 ($SD3$) example where the 6-dimensional dataset is predominantly lying in a 3-dimensional subspace as identified by SVEA. We would like to emphasis that this is different from Principal Component Analysis (PCA) in two aspects: firstly, unlike our method, PCA does not use the labels, and secondly, the one-to-one mapping between the transformed dimensions (reduced) and the features are well defined in our scheme but not in PCA. \subsection{Identification of non-important features for classification by SVEA scheme} \label{subsec: eta_error_decomp} In this section, we attempt to understand what contributes to the excess $0$-$1$ risk of surrogate loss function based classifiers. In this direction, we first consider a simple distribution $\mathcal{D}$ and present an explicit form of in-class probability $\eta(\mathbf{x})$. Following lemma is a special case of result provided in \cite{tripathi2019cost}. For the sake of completeness, a proof of Lemma \ref{lem: eta-normal} is available in SM A.5. \begin{lem} \label{lem: eta-normal} Let Y has Bernoulli distribution with parameter $p$. Let $\mathbf{X} \subset \mathbb{R}^n$ be such that $\mathbf{X}|Y = 1 \sim N(\boldsymbol{\mu}_+,\Sigma)$ and $\mathbf{X}|Y = -1 \sim N(\boldsymbol{\mu}_-,\Sigma)$. Let $A_e =\{$ even numbers between 1 to n $\}$ and $A_o = \{\text{odd numbers between 1 to n}\}$. Also, $\mu_{-,j} = \mu_{+,j}~~ \text{if } j\in A_e$, $\mu_{-,j} = -\mu_{+,j}~~ \text{if } j\in A_o$ and $\Sigma = a\mathbf{I}_{n\times n}, ~ a>0.$ Then, the in-class probability $\eta(\mathbf{x}) = P(Y=1|\mathbf{X}=\mathbf{x})$ is given as follows: \begin{equation}\label{eq: eta-normal} \eta(\mathbf{x}) = \left[1 + \frac{1-p}{p}\exp\left(-\frac{2}{a}\left( \sum\limits_{j\in A_0}x_j\mu_{+,j}\right)\right)\right]^{-1}. \end{equation} \end{lem} This implies that the Bayes classifier $f^*_{\text{0-1}}(\mathbf{x}) = sign(\eta(\mathbf{x})-1/2) \in \mathcal{H}$ doesn't depend on feature $X_j, ~j \in A_e.$ We observe that SVEA scheme is able to identify those features which do not appear in the Bayes classifier as the ones with $e_j(m)>0.$ Computational evidence for this claim is available in SM D.2 using Synthetic dataset 4 (SD4). This observation has following implication: finite sample and surrogate loss based classifiers contribute to the excess $0$-$1$ risk because coefficients of features of which $\eta(\mathbf{x})$ is not a function, are non-zero and for such features $e_j(m)>0.$ To support our observation, we first provide a detailed interpretation of the decomposition of excess $0$-$1$ risk of a surrogate loss function $l$ based classifier $\hat{f_l} = \arg\min\limits_{f\in \mathcal{H}_{lin}} \hat{R}_{l}(f):=\frac{1}{m}\sum\limits_{i=1}^{m}l(\mathbf{x_i},f(\mathbf{x_i})).$ Let $f^*_{l}\in \mathcal{H}$ denote the minimizer of true $l$-risk, $R_{l}(f):= E_{\mathcal{D}}[l(\mathbf{x},f(\mathbf{x}))]$. Also, empirical $0$-$1$ risk is $\hat{R}_{\text{0-1}}(f):=\frac{1}{m}\sum\limits_{i=1}^{m}l_{\text{0-1}}(\mathbf{x_i},f(\mathbf{x_i})).$ Consider the excess $0$-$1$ risk of $\hat{f}_l$ as given below: \begin{scriptsize} \begin{eqnarray} \nonumber R_{\text{0-1}}(\hat{f}_l) - R_{\text{0-1}}(f^*_{\text{0-1}}) &=& R_{\text{0-1}}(\hat{f}_l) -R_{\text{0-1}}(f^*_{l}) + R_{\text{0-1}}(f^*_{l}) - R_{\text{0-1}}(f^*_{\text{0-1}}) \\ \nonumber &=& {(\hat{R}_{\text{0-1}}(\hat{f}_l) - \hat{R}_{\text{0-1}}(f^*_{l}))} + {(R_{\text{\text{0-1}}}(\hat{f}_l) -\hat{R}_{\text{0-1}}(\hat{f}_{l}) + \hat{R}_{\text{0-1}}(f^*_l) -R_{\text{0-1}}(f^*_{l}))} \\ \nonumber & & + {(R_{\text{0-1}}(f^*_l) -R_{\text{0-1}}(f^*_{\text{0-1}}))}\\ \nonumber &=& \underbrace{(\hat{R}_{\text{0-1}}(\hat{f}_l) - \hat{R}_{\text{0-1}}(f^*_{\text{0-1}}))}_{\text{Error }1} + \underbrace{(R_{\text{0-1}}(\hat{f}_l) -\hat{R}_{\text{0-1}}(\hat{f}_{l}) + \hat{R}_{\text{0-1}}(f^*_l) -R_{\text{0-1}}(f^*_{l}))}_{\text{Error }2} \\ \label{eq: decom_error} & & + \underbrace{(R_{\text{0-1}}(f^*_l) -R_{\text{0-1}}(f^*_{\text{0-1}}))}_{\text{Error }3}. \end{eqnarray} \end{scriptsize} The last equality follows from the fact that for classification calibrated loss functions $sign(f^*_l)=sign(f^*_{\text{0-1}})$ \cite{zhang2004statistical,Bartlett2006,steinwart2008support} and hence their $0$-$1$ risks (both empirical and true) are equal. This also implies that $\text{Error }3$ is zero. $\text{Error }2$ is the error due to the use of a sample based risk instead of true risk. This term will vanish as the sample size increases. Finally, we have $\text{Error }1$ which is a combination of using a finite sample, using a surrogate loss function and restricting the hypothesis class to say linear class $\mathcal{H}_{lin}.$ After identifying the important features based on the sign of SVEA $e_j(m)$, one can get some extra insight about $\text{Error } 1$'s decomposition. We believe that $\text{Error }1$ will also have error due to the following reason: in spite of $f^*_{\text{0-1}}(\mathbf{x})$ not depending on features $X_j,~j\in A_e$, $\hat{f}_l$ can be a function of features $X_j,~j\in A_e$ (apart from those features $X_j,~j\in A_o$). This error could either be an additional component in $\text{Error }1$ or absorbed in the existing components explained before. For surrogate loss functions, we consider hinge loss (using SVM), logistic loss (using Logistic regression) and exponential loss (using ExpERM given in \cite{ExpERM18}). It was observed that none of the surrogate loss functions considered had zero coefficient corresponding to features $X_j,~j\in A_e$ in a linear classifier. This implies that inclusion of such features is one of the contributors to the extra error (excess risk) incurred by the surrogate loss function based classifiers in comparison to Bayes classifiers, in particular, to $\text{Error }1$ term. Details about these results are provided in SM D.2 using Synthetic dataset 4 $(SD4).$ \subsection{SVEA based decomposition of true hinge risk among features} \label{subsec: converg_SV_error} In this section, we attempt to understand what one can say about the nature of SVEA, $\{e_j(m)\}_{j\in N}$ as sample size $m$ increases. In various computational experiments, we observed that the Shapley values of the classification game, $\{\phi_j(m)\}_{j\in N}$ and SVEA, $\{e_{j}(m)\}_{j\in N}$, converge to limiting values, say $\{\phi_j\}_{j\in N}$ and $\{e_{j}\}_{j\in N}$ as the sample size $m$ increases. Since, $\{e_j(m)\}_{j\in N}$ is the empirical hinge risk of feature $j$, we can interpret the limiting value $\{e_j\}_{j\in N}$ as the true hinge risk of feature $j\in N$. In other words, $\{e_j\}_{j\in N}$ represents the components in the decomposition of minimum true hinge risk $R_{l_{hinge}}(f^*_{hinge})$, i.e., $\sum_{j\in N}e_j = R_{l_{hinge}}(f^*_{hinge})$ where $R_{l}(f):= E_{\mathcal{D}}[l(\mathbf{x},f(\mathbf{x}))]$. As $\{e_j(m)\}_{j\in N}$ is computed for a given sample, it can be interpreted as an estimate of the true hinge risk of feature $j\in N$. Also, since it converges to $\{e_j\}_{j\in N}$ as sample size $m$ increases, one can expect it to be a consistent estimate of $\{e_j\}_{j\in N}$. To illustrate this convergence, we provide an example based on a 7-dimensional Synthetic dataset 5 $(SD5)$ in SM D.2. \subsection{Stable SVEA and convex classification games}\label{subsec: stable_app} In this section, we discuss additional properties of the allocation measure of classification games, in terms of stability and convexity of the games. Core, a well-known solution concept in cooperative game theory, is defined as the set of allocations in the imputation set (allocations satisfying IR and collective rationality; details in SM B.3), which are Coalitional Rational (CR). Such allocations are said to be stable as no player or group of players objects to the allocations in the core. As we are interested in apportioning of total training error, CR is desirable; so, we extend the notion of the core to SVEA, denoted by $C_{E}(m)$, as follows: \begin{equation*} \begin{scriptsize} C_{E}(m) := \{\mathbf{e}^{\prime}(m) \in \mathbb{R}^n \vert \sum_{j \in S}e^{\prime}_j(m) \leq tr\_er(S,m), ~ \forall S \subseteq N, \sum_{j \in N}e^{\prime}_j(m) = tr\_er(N,m)\}. \end{scriptsize} \end{equation*} Allocations belonging to $ C_E(m)$ will also be stable in the sense that any feature or group of features will not object to the error allocations $e^{\prime}_j(m),~ j \in N$. So, we would like our SVEA to be an element of $C_E(m)$. However, as seen in Table 2 of SM B, whether $SVEA \in C_E(m)$ or not depends on the dataset; IR and Collective rationality holds, but, CR, {\footnotesize $\sum_{j \in S} e_j(m) \le tr\_{er}(S,m)$} may not hold for a given dataset. If a game is convex (definition in SM B), then its Shapley value belongs to the core. As SVEA is an affine transformation of Shapley value, one would expect that for such games, SVEA belongs to core's counterpart $C_E(m)$; true for Haberman dataset as seen in Table 2 of SM B. Also, for the datasets (Thyroid, Pima, Magic, and Banknote) in which $e_j(m)$ belongs to $C_E(m)$, there are some features for which these $e_j$s are negative; note that such features are unique for a given sample of a dataset (as Shapley value is unique for a sample). As observed in Section \ref{subsec: neg_fss}, classifiers based on these features alone can yield the accuracy comparable to those obtained with full feature set ($P_{SV} \approx 1$) and such a unique set of features with allocations also in $C_E(m)$ have stable allocations. \subsection{Sample bias robustness of SVEA scheme} \label{subsec: sample_bias_robust_tech} With the goal of being robust to sample bias, we provide interval estimates for SVEA of features by using multiple sub-samples from a given dataset. A feature's joint contribution in label prediction is significant if the interval estimate of SVEA for a feature lies on the left of origin on $\mathbb{R}$. The procedure is first to partition the dataset into multiple disjoint sub-samples and compute the apportioning for each sub-sample. Then, a group of 30 such sub-samples is selected, and using CLT, the average apportioning $\bar{e}_j^g, j \in N$ for each group $g$ is asymptotically normally distributed with unknown mean $\mu_e$ and variance $\sigma_e^2$. Next, using $\bar{e}_j^g$, we compute t-distribution based $100(1-\alpha)$ confidence intervals. By the definition of confidence intervals, we have following high probability statement: \begin{equation*} P(e_j^p \in [\bar{\bar{e}}_j \pm t^*_{\alpha/2, G-1} (s_j/ \sqrt{G})]) \geq 1-\alpha, ~~\forall j \in N, \end{equation*} where $e_j^p$ is the population mean for the error apportioning of feature $j \in N$, $\bar{\bar{e}}_j = \frac{1}{G}\sum_g \bar{e}_j^g$ and $s_j = (\frac{1}{G-1}\sum_g (\bar{e}_j^g - \bar{\bar{e}}_j)^2)^{1/2}$ and $t^*_{\alpha/2, G-1}$ is the upper $\alpha/2$ critical value for the $t$ distribution with $G-1$ degrees of freedom ($G$ is the number of groups). More details of this procedure are provided in SM D.1. Based on our experiments in Section \ref{subsec: real_SVNeg_exp_inter}, we observe that the interval estimates also lead to the same threshold of $0$ while performing FSS. Also, the conclusions are robust to sample bias due to multiple averaging. This shows that the behaviour of features with SVEA<0 mentioned in Section \ref{subsec: stable_app} is a property of the dataset and not of a particular sample. In SM D.2, we implement the above technique on Synthetic dataset 4 (SD4) and observe that the results are consistent with Section \ref{subsec: eta_error_decomp}. {The above presented method is tailor-made for SVEA scheme. A more general framework to address the instability issue, i.e., change in sample leading to change in feature subset is presented in \cite{nogueira2017FSSstability}. They first show that any existing stability measure doesn't possess all five desirable properties which a stability measure should have. Then, taking a statistical approach they propose a novel measure which is treated as an estimator of true stability. Note that the ``stability of a feature selection algorithm'' considered in this sub-section is different from the ``stability of an allocation'' in Section \ref{subsec: stable_app}.} \section{Computational experiments} \label{sec: Computations} In this section, we empirically demonstrate the implications of SVEA being negative for some features on real-world datasets from \cite{alcala2011keel,UCI_dataset}. For the FSS interpretation, we train a classifier using SVM (linear and rbf kernel), Logistic Regression (LR), Random Forest (RF) and Multi Layer Perceptron (MLP) to compute $P_{SV}$. We also compare our SVEA approach to Recursive Feature Elimination with Cross-Validation (RFECV) and RefliefF. Implementation of RFECV with $5$-folds was done in Scikit learn module of Python \cite{scikit-learn}. For ReliefF, we used the implementation of \cite{li2016feature_reliefF} with neighbour parameter $k=2$. All the above mentioned algorithms are implemented in { \em Python 3} with { \em Gurobi 8.0.0} solver for LPs, on a machine equipped with 4 Intel Xeon 2.13 GHz cores and 64 GB RAM. To account for randomness, we repeat each experiment 5 times and report the average test accuracy (and standard deviation). \textbf{Real datasets: Demonstration of FSS using $\mathbf{P_{SV}}$ with threshold 0 on SVEA values} \label{subsec: real_neg_SV_exp_feature} Out of the 14 benchmark dataset considered, 3 datasets namely, WDBC, Banknote and Iris0 are almost linearly separable. We used Breastcancer, German and Thyroid datasets from (\url{http://theoval.cmp.uea.ac.uk/matlab}). First, we consider those UCI datasets in which some features have negative SVEA and compute their Power of classification, $P_{SV}.$ Let $SVEA_{neg}$ be the set of features with $e_j(m)<0$ and $P_{SV}(SVEA_{neg})$ is the power of classification of the set $SVEA_{neg}$. From Table \ref{Table:real_dataset_SV_neg}, the value of $P_{SV}(SVEA_{neg})$ is close to 1 in most of the cases. Hence, the features in the set $SVEA_{neg}$ have a large joint contribution towards classification. Five different types of classifiers support this behavior, viz., SVM (linear), LR, RF, SVM(rbf) and MLP. Except for the Thyroid dataset, the $P_{SV}$ value for a given dataset is similar across classifiers. Moreover, we have also computed the $P_{SV}$ for all subsets of the $SVEA_{neg}$ set for Heart dataset and observed that in comparison to its subsets, $SVEA_{neg}$ has the highest value of $P_{SV}$. For heart dataset, we observed that average accuracy ($\pm$ s.d.) over three trials with only feature 3 is $0.765\pm 0.046$, with only feature 12 is $0.697\pm0.043$, with only feature 13 is $0.77\pm 0.453$, with features 3 and 12 is $0.771\pm 0.046$, with features 12 and 13 is $0.77 \pm 0.045$ and with features 3, 12 and 13, i.e., $SVEA_{neg}$ set is $0.81 \pm 0.008$ which is highest among all the subsets. In addition to the datasets reported in Table \ref{Table:real_dataset_SV_neg}, we also implemented our SVEA scheme on other large scale datasets like EEG-Eye state dataset (14 features, 14980 examples), Numerai dataset (21 features, 96320 examples). However, we did not observe any feature with negative value of SVEA and hence in Table \ref{Table:real_dataset_SV_neg} we only report datasets that had features with SVEA values less than zero. \textbf{Real datasets: Demonstration of FSS with a user given threshold and comparison to RFECV and ReliefF} {For a user given feature size, say $l$, with due justification in terms of SVEA, our scheme can identify the $l$ sized feature set with best test accuracy based on the ranking of the SVEA values.} We demonstrate this property of SVEA scheme and compare it to RFECV and ReliefF. To do this, we order the features based on the score/SVEA value for each scheme and then plot the SVM test accuracy of linear classifiers learnt using first $l$ features (Figure \ref{fig: comparison_real_data}). Clearly, too few features leads to degradation in performance, and too many features defeat the purpose of feature selection. In comparison to other methods, our scheme achieves the highest accuracy when one looks for a trade-off by selecting a subset of features whose cardinality is neither too small nor too large. {Also, if the user given threshold on the number of features is $l$, then SVEA has best accuracy as observed in Figure \ref{fig: comparison_real_data} for Magic, Heart and IJCNN dataset with $l=2,3,5$ respectively.} {Using a statistical significance test to compare our scheme to RFECV and ReliefF is not straight forward due to computation of incremental feature accuracy, so we use the measure that given a fixed number of features and a lower bound on accuracy, a good scheme should identify feature subset leading to high accuracy. However, for the sake of completeness, we still performed many Friedman tests (using Scikit-posthocs package in python) by fixing the number of features across datasets and found no significant difference between the schemes at 5\% level of significance except for the cases where SVEA is better as found by Nemenyi posthoc test \cite{demvsar2006statisticalTests}.} Comparative plots for other datasets and additional explanations (Table 15) are provided in SM D.5. Using Pima Diabetes dataset, we show that the high value of $P_{SV}(SVEA_{neg})$ in Table \ref{Table:real_dataset_SV_neg} is a case of FSS and not of dimension reduction. Details of latter argument are presented in Table 13 of SM D.5. \textbf{Real datasets: Sample bias robust interval estimates} \label{subsec: real_SVNeg_exp_inter} In this section, we demonstrate our idea of addressing the issue of sample bias while making conclusions based on the SVEA scheme. Since the technique requires partitioning the whole dataset into many disjoint subsets, large sample sized datasets are considered. Figure \ref{fig: Syn_Real_datasets_interval_estimates} shows t-distribution based $95\%$ confidence intervals of SVEA estimates for synthetic dataset SD4 (sdB) and real datasets Magic, IJCNN (\cite{LIBSVMdatsets}) and MINIBOONE (\cite{OpenML2013}). There is a partitioning of feature set into two subsets; one in which the features have their SVEA's confidence intervals above origin and other in which the features have their SVEA's confidence intervals below the origin. As $P_{SV}(SVEA_{neg})$ (given in Table \ref{Table:real_dataset_SV_neg}) for the latter subset of features is high, one can conclude that these features have a large contribution in label prediction. Since the feature set partitioning is based on interval estimates, the conclusions regarding important features are robust to sample bias. \begin{table}[h!] \centering \setlength{\tabcolsep}{1.5pt} \renewcommand{\arraystretch}{1.2} {\small \begin{tabular}{|c|c|c|c|c|c|} \hline \textbf{\begin{tabular}[c]{@{}c@{}}Dataset\\(m,n)\end{tabular}} & \textbf{Clf} & \textbf{\begin{tabular}[c]{@{}c@{}}Avg Acc \\ ($\pm$std dev)\end{tabular}} & \textbf{$SVEA_{neg}$} & \textbf{\begin{tabular}[c]{@{}c@{}}Avg Acc ($\pm$std dev) \\ $SVEA_{neg}$\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}$P_{SV}$\\ \end{tabular}} \\ \hline \multirow{3}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Thyroid \\ (215,5)\end{tabular}}} & SVM & 0.89$\pm$0.0145 & \multirow{3}{*}{$\{4\}$} & 0.83$\pm$0.0087 & 0.93\\ \cline{2-3} \cline{5-6} & LR & 0.89$\pm$0.0315 & & 0.79$\pm$0.0328 & 0.89 \\ \cline{2-3} \cline{5-6} & RF & 0.93$\pm$0.0400 & & 0.76$\pm$0.0641 & 0.82 \\ \cline{2-3} \cline{5-6} & SVM\_K & 0.95+-0.025 & & 0.78+-0.0405 & 0.82 \\ \cline{2-3} \cline{5-6} & MLP & 0.94 & & 0.78+-0.0372 & 0.83 \\ \hline \multirow{3}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Pima\\ Diabetes\\ (768,8)\end{tabular} }} & SVM & 0.77$\pm$0.0060 & \multirow{3}{*}{$\{2\}$} & 0.75$\pm$0.008 & 0.98 \\ \cline{2-3} \cline{5-6} & LR & 0.75$\pm$0.0075 & & 0.73$\pm$0.0218 & 0.97 \\ \cline{2-3} \cline{5-6} & RF & 0.73$\pm$0.0097 & & 0.72$\pm$0.0230 & 0.98 \\ \cline{2-3} \cline{5-6} & SVM\_K & 0.72+-0.0257 & & 0.71+-0.0544 & 0.99 \\ \cline{2-3} \cline{5-6} & MLP & 0.67+-0.0269 & & 0.66+-0.0273 & 0.98 \\ \hline \multirow{3}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Magic \\ (19020,10)\end{tabular}}} & SVM & 0.79$\pm$0.0058 & \multirow{3}{*}{$\{9\}$} & 0.74$\pm$0.0060 & 0.93 \\ \cline{2-3} \cline{5-6} & LR & 0.79$\pm$0.0058 & & 0.73$\pm$0.0061 & 0.92\\ \cline{2-3} \cline{5-6} & RF & 0.75 $\pm$ 0.0035 & & 0.73$\pm$ 0.0097 & 0.97 \\ \cline{2-3} \cline{5-6} & SVM\_K & 0.82+-0.0620 & & 0.84+-0.0544 & 1.02 \\ \cline{2-3} \cline{5-6} & MLP & 0.82+-0.007 & & 0.73+-0.0075 & 0.89 \\ \hline \multirow{3}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Heart \\ (270,13)\end{tabular}}} & SVM & 0.84$\pm$0.0478 & \multirow{3}{*}{$\{3,12,13\}$} & 0.81$\pm$0.0080 & 0.96 \\ \cline{2-3} \cline{5-6} & LR & 0.82$\pm$0.0381 & & 0.79$\pm$0.0309 & 0.96\\ \cline{2-3} \cline{5-6} & RF & 0.82$\pm$0.0343 & & 0.84$\pm$0.0578 & 1.02 \\ \cline{2-3} \cline{5-6} & SVM\_K & 0.64+-0.0608 & & 0.84+-0.0544 & 1.31 \\ \cline{2-3} \cline{5-6} & MLP & 0.77+-0.0482 & & 0.79+-0.0035 & 1.02 \\ \hline \multirow{3}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}IJCNN\\(126701,22)\end{tabular}}} & SVM & 0.91 & \multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}$\{11,12,17,$\\ $18,19\}$\end{tabular}} & 0.90 & 0.99 \\ \cline{2-3} \cline{5-6} & LR & 0.91 & & 0.90 & 0.99\\ \cline{2-3} \cline{5-6} & RF & 0.90 & & 0.90 & 1 \\ \cline{2-3} \cline{5-6} & SVM\_K& 0.979 & & 0.957 & 0.98 \\ \cline{2-3} \cline{5-6} & MLP & 0.977 & & 0.956 & 0.98 \\ \hline \end{tabular}} \caption{Accuracies of the datasets having negative SVEA for features in $SVEA_{neg}$ for SVM (linear kernel), LR, RF, SVM\_K (rbf kernel) and single layer MLP classifier. The sixth column has the accuracy of the classifiers learnt only on features in $SVEA_{neg}$. $P_{SV}$ is the ratio of accuracies in column 3 and column 5 when the important feature subset is $(SVEA_{neg})$. SVM, LR, SVM\_K parameter $C \in \{0.1,1,50,500\}$, RF parameters $n\_estimators \in \{0.1,1,50,500\}$ and $max\_depth = 2$, SVM\_K parameter $\gamma = \frac{1}{n*Var(X)}$, MLP regularization parameter $\alpha \in \{10^{-7},\ldots,10^{-1}\}$, constant learning rate of $10^{-3}$, Relu activation and Adam solver. $m$ is the sample size and $n$ is the number of features. No averaging is done for IJCNN as the train-test (35000+91701) partitioning is already available from the source. }\label{Table:real_dataset_SV_neg} \end{table} \begin{figure*}[!h] \centering \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{heartApprox_comparison_fig.png} \caption{\footnotesize{Dataset: Heart(270,13)}} {} \end{subfigure} \hfill \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{magicApprox_comparison_fig.png} \caption{\footnotesize{Dataset: Magic(19020,10)}} {} \end{subfigure} \vskip\baselineskip \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{ijcnnApprox_comparison_fig.png} \caption{\footnotesize{Dataset: IJCNN(35000(tr),22)}} {} \end{subfigure} \hfill \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{wdbcApprox_comparison_fig.png} \caption{\footnotesize{Dataset: Wdbc(569,30)}} {} \end{subfigure} \caption{\footnotesize Plot of test accuracy vs number of features used to train the linear classifier using SVM. For each scheme, we have $95\%$ error bar computed over 5 iterations. Given a fixed number of features and a lower bound on accuracy, SVEA provides the feature subset which leads to highest test accuracy in most of the cases. Number of trials in the plot for Magic dataset is three; for other datasets number of trials is five.} \label{fig: comparison_real_data} \end{figure*} \begin{figure*}[!h] \centering \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{New_sdB_interval_estimates_95per.png} \caption*{}% {} \end{subfigure} \hfill \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{New_Magic_interval_estimates_95per.png} \caption*{}% {} \end{subfigure} \vskip\baselineskip \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{New_IJCNN_interval_estimates_95per.png} \caption*{}% {} \end{subfigure} \hfill \begin{subfigure}[b]{0.475\textwidth} \centering \includegraphics[width=1.04\textwidth]{New_MINIBOONE_interval_estimates_95per.png} \caption*{}% {} \end{subfigure} \caption{\footnotesize Above plots depict $95\%$ confidence intervals for SVEA of features for 6 dimensional synthetic dataset sdB and 3 UCI datasets. As the importance of a feature is based on intervals of SVEA, we can say that on an average the population value of SVEA would lie inside the interval estimates 95 out of 100 times (which are below $0$) and hence important features via SVEA is a pattern manifestation of underlying population.} \label{fig: Syn_Real_datasets_interval_estimates} \end{figure*} \section{Discussion} \label{sec: discussion} To interpret the influence of a single feature or their interactions on the label/class, we use the framework of transferable utility cooperative games and introduce a classification game with features as players and hinge loss based characteristic function (computed as LPs). \subsection{Summary} We propose SVEA scheme to apportion the total hinge loss based empirical risk among the features. As Shapley value is computationally expensive, we build on an approximation algorithm that does not compute the characteristic function (an LP) for all subsets at one go but only when needed. From the perspective of classification, SVEA leads to the following contributions. \textit{Feature subset selection:} Features with negative SVEA are the ones whose joint contribution for label prediction is significant. \textit{Identification of lower-dimensional subspace:} Dataset lies in subspace with basis as features having negative SVEA value. {Our scheme uses a universal threshold of $0$ on the SVEA value for all datasets to identify both the sets mentioned above. Also, our scheme can also identify the subset with the best accuracy based on ranking SVEA values if the feature set size is user-given.} \textit{Decomposition of excess $0$-$1$ risk:} under a special structure on data distribution, only features (essential) with negative valued SVEA contribute to Bayes risk. However, we empirically observe that any surrogate loss based classifier depends on features non-important for classification also, and thereby increasing the excess $0$-$1$ risk of the classifier. We also provide an estimate of the unknown true hinge risk of each feature. We attempt to make our SVEA estimate robust to sample bias by computing interval estimates by averaging over multiple disjoint sub-samples. We demonstrate all the above contributions and our SVEA scheme compares favourably with the existing feature selection schemes RFECV and ReliefF on various synthetic and UCI datasets. \subsection{Characteristic function $v(S,m)$ with regularization and kernels} \label{subsec: kernel_reg_ntworking_exp} Regularization to avoid over-fitting is a natural thing to do in most of the learning problems. We considered a $l_2$-regularized version of $tr\_er(S,m)$ defined in Section \ref{training_error_fn} and used in Eq. \eqref{value_to_cost} for defining the characteristic function $v(S,m)$. However, this characteristic function turned out to be negative due to extra $\Vert \mathbf{w} \Vert^2$ term in $tr\_er(S,m)$. To avoid this issue, we defined the characteristic function $v_{reg}(S,m)$ (using regularized $tr\_er(S,m)$) which was empirically observed to be positive on all datasets. We compared the final results (for feature subset selection in Section \ref{subsec: neg_fss}) using $v(S,m)$ and $v_{reg}(S,m)$ and found that using regularization doesn't change important feature set $SVEA_{neg}$ (verified across 5 trials on 2 real and 3 synthetic datasets). Details with empirical results are available in SM D.3. We also considered the case when non-linear classifiers (via kernels) are used in the characteristic function. Note that regularization is necessary when using kernels to get the dot product of feature mapping $\phi(\mathbf{x})$. We used Eq. \eqref{value_to_cost} with kernelized and regularized $tr\_er(S,m)$ to obtain $v_{k,reg}(S,m)$. In the computational experiments, we observed variation in identification of important feature subset $SVEA_{neg}$ across trials, and in some cases, the important feature set (using $v_{k,reg}(S,m)$) did not have any common element with the set obtained using linear classifiers. Also, in most of the datasets, the test accuracy (with kernels) using all features did not improve over the linear case. One issue here is that $v_{k,reg}(S,m)$ is negative in most of the cases, and the trick used to make the characteristic function positive used in the linear case is not applicable here. The variation across trials could be attributed to the non-monotonic nature of $v_{k,reg}(S,m)$, which implies that the implicit assumption for Shapley value that the grand coalition will form is not satisfied. This issue is arising due to the use of regularization and exists in linear cases too. However, it is more prominent with kernels because here $v_{k,reg}(S,m)$ cannot be made positive. More details with supporting computational experiments are available in SM D.4. To summarize, in addition to the linear unregularized case that led to some interesting insights, we also considered two other cases, viz., linear regularized, and non-linear regularized. Even though the use of Shapley value in the linear regularized case could be justified, its performance is the same as that of linear unregularized and hence good. However, in the regularized kernel case, the performance of the SVEA scheme is not good as far as feature subset selection is considered; in fact, use of Shapley value can not be justified as the characteristic function is not monotone. \subsection{Looking ahead} A comparison of SVEA from $0$-$1$ loss function and other surrogate loss function based classification games would be interesting to explore; a ranking of surrogate losses can be expected. A thorough study on more game-theoretic aspects like understanding of dataset dependent properties of the game, modeling as NTU game, etc., could be another direction. Finally, in classification setup, a natural extension would be to generalize binary classification games to multi-class games. In this paper, we have used linear and unregularized training error function, which makes sure that $v(\cdot,m)$ is monotonic (Proposition \ref{prop: game monotonic}) and use of Shapley value is justified. However, if some problem does require using regularization for feature subset selection, then our computational experience suggests that the characteristic function $v(\cdot,m)$ has to be suitably defined. \nocite{Beleites2013samplesize} \nocite{young1985monotonic} \bibliographystyle{spmpsci}
\section*{Acknowledgments} Many parts of these notes were improved by feedback from students taking various versions of this course, as well as others who have kindly pointed out errors in the notes after reading them online. Many of these suggestions, sadly, went unrecorded, so I must apologize to the many students who should be thanked here but whose names I didn't keep track of in the past. However, I can thank Mike Marmar and Hao Pan in particular for suggesting improvements to some of the posted solutions, Guy Laden for suggesting corrections to Figure~\ref{fig-Paxos-mixed-up-execution}, and Ali Mamdouh for pointing out an error in the original presentation of Algorithm~\ref{alg-peterson}. \myChapter{Lecture schedule}{2020}{} As always, the future is uncertain, so you should take parts of the schedule that haven't happened yet with a grain of salt. Unless otherwise specified, readings refer to chapters or sections in the course notes. \begin{description} \item[2020-09-01] What is distributed computing and why do we have a theory of it? Basic models: message passing, shared memory, local interactions. Configurations, events, executions, and schedules. The adversary. Basic message-passing model. A simple flooding protocol. Safety properties and invariants. Readings: Chapters~\ref{chapter-introduction} and~\ref{chapter-message-passing-basics}. \item[2020-09-03] Liveness properties. Fairness and performance measures. Safety and liveness. Drawing message-passing executions. Broadcast and convergecast. Synchronous vs.~asynchronous message-passing. Readings: Rest of Chapter~\ref{chapter-message-passing-basics}, Chapter~\ref{chapter-broadcast-and-convergecast}. \item[2020-09-08] Distributed breadth-first search. Start of leader election. Readings: Chapters~\ref{chapter-distributed-BFS} and~\ref{chapter-leader-election} through §\ref{section-symmetry}. \item[2020-09-10] More leader election. Readings: Rest of Chapter~\ref{chapter-leader-election}. \item[2020-09-15] Causal ordering, logical clocks, and snapshots. Readings: Chapter~\ref{chapter-logical-clocks}. \item[2020-09-17] Synchronizers. Readings: Chapter~\ref{chapter-synchronizers}. \item[2020-09-22] Synchronous agreement with crash failures. Impossibility of Byzantine agreement with $n/3$ faults. Readings: Chapter~\ref{chapter-coordinated-attack} (except §\ref{section-randomized-coordinated-attack}), Chapter~\ref{chapter-synchronous-agreement}, §\ref{section-Byzantine-minimum-processes}. \item[2020-09-24] Phase king algorithm for synchronous Byzantine agreement. Impossibility of asynchronous agreement with one crash failure. Readings: §\ref{section-Byzantine-phase-king}, Chapter~\ref{chapter-FLP}. \item[2020-09-29] Paxos. Readings: Chapter~\ref{chapter-Paxos}. \item[2020-10-01] Failure detectors. Readings: Chapter~\ref{chapter-failure-detectors}. \item[2020-10-06] Shared memory: model, linearizability, emulating message passing using shared memory, the ABD algorithm for distributed shared memory. Readings: Chapters~\ref{chapter-shared-memory-model} and~\ref{chapter-distributed-shared-memory}. \item[2020-10-08] Start of mutual exclusion: description of the problem, algorithms for various models. Readings: Chapter~\ref{chapter-mutex} through §\ref{section-mutex-Peterson}. \item[2020-10-13] More mutual exclusion: Fast mutual exclusion using splitters, Burns-Lynch space lower bound, RMR complexity. Readings: §§\ref{section-mutex-fast}, \ref{section-Burns-Lynch}, and~\ref{section-RMR-complexity}. \item[2020-10-15] Wait-free computation and the wait-free hierarchy (levels $1$, $2$, and $∞$). Readings: Chapter~\ref{chapter-wait-free-hierarchy} except §§\ref{section-wait-free-multi-register-writes} and~\ref{section-universal-construction}; \cite{Herlihy1991waitfree}. \item[2020-10-20] More wait-free stuff: Intermediate levels of the wait-free hierarchy. Herlihy's universal construction and helping. Readings: Rest of Chapter~\ref{chapter-wait-free-hierarchy}. \item[2020-10-22] Atomic snapshots of shared memory. Atomic snapshots in $O(n^2)$ individual steps using double collects with helping. Reduction to lattice agreement. Readings: Chapter~\ref{chapter-atomic-snapshots} through §\ref{section-lattice-agreement-reduction-proof}. \item[2020-10-27] Implementing lattice agreement. The Jayanti-Tan-Toueg lower bound. Readings: §\ref{section-lattice-agreement-implementation}, Chapter~\ref{chapter-JTT}. \item[2020-10-29] Restricted-use objects. Readings: Chapter~\ref{chapter-restricted-use}. \item[2020-11-03] Randomized consensus: adopt-commit objects, shared coins, Chor-Israeli-Li and variants. Readings: Chapter~\ref{chapter-randomized-consensus} through §\ref{section-conciliator-one-register}. \item[2020-11-05] Randomized renaming and test-and-set for an adaptive adversary. Randomized test-and-set and consensus for an oblivious adversary. Deterministic renaming using splitters. Readings: Rest of Chapter~\ref{chapter-randomized-consensus}, §\ref{section-moir-anderson}; \cite{AlistarhAGGG2010,AlistarhA2011,GiakkoupisW2012}, \cite{MoirA1995}. \item[2020-11-10] BG simulation of $n$ process with $f$ failures by $f+1$ processes with $f$ failures. Topological methods for testing solvability of asynchronous decision tasks. Readings: Chapter~\ref{chapter-BG-simulation}, Chapter~\ref{chapter-topological-methods}; \cite{BorowskyG1993,BorowskyGLR2001}; AW §16.1 if you want to see a non-topological proof of the $k$-set agreement result, \cite{BorowskyG1997} for iterated immediate snapshots, \cite{HerlihyS1999} for more about the topological approach. \item[2020-11-12] Self-stabilization and local computation: Dijkstra's token ring circulation algorithm, self-stabilizing synchronizers and BFS trees, relation between local algorithms and self-stabilization. Readings: Chapter~\ref{chapter-self-stabilization}; \cite{Dijkstra1974,AwerbuchKMPV1993,LenzenSW2009}. \item[2020-11-17] Distributed graph algorithms. The LOCAL and CONGEST models. Local graph coloring. Readings: Chapter~\ref{chapter-distributed-graph-algorithms}. \item[2020-11-19] Population protocols. Readings: Chapter~\ref{chapter-population-protocols}. \item[2020-12-01] CPSC 565 student presentations. See §\ref{section-MMXX-presentation}. \item[2020-12-03] CPSC 565 student presentations. \end{description} \mainmatter \myChapter{Introduction}{2020}{} \label{chapter-introduction} \indexConcept{distributed systems}{Distributed systems} are characterized by their structure: a typical distributed system will consist of some large number of interacting devices that each run their own programs but that are affected by receiving messages, or observing shared-memory updates or the states of other devices. Examples of distributed systems range from simple systems in which a single client talks to a single server to huge amorphous networks like the Internet as a whole. As distributed systems get larger, it becomes harder and harder to predict or understand their behavior. Part of the reason for this is that we as programmers have not yet developed a standardized set of tools for managing complexity (like subroutines or objects with narrow interfaces, or even simple structured programming mechanisms like loops or if/then statements) as are found in sequential programming. Part of the reason is that large distributed systems bring with them large amounts of inherent \concept{nondeterminism}—unpredictable events like delays in message arrivals, the sudden failure of components, or in extreme cases the nefarious actions of faulty or malicious machines opposed to the goals of the system as a whole. Because of the unpredictability and scale of large distributed systems, it can often be difficult to test or simulate them adequately. Thus there is a need for theoretical tools that allow us to prove properties of these systems that will let us use them with confidence. The first task of any theory of distributed systems is modeling: defining a mathematical structure that abstracts out all relevant properties of a large distributed system. There are many foundational models in the literature for distributed systems, but for this class we will follow \cite{AttiyaW2004} and use simple automaton-based models. What this means is that we model each process in the system as an automaton that has some sort of local \concept{state}, and model local computation as a transition rule that tells us how to update this state in response to various \indexConcept{event}{events}. Depending on what kinds of system we are modeling, these events might correspond to local computation, to delivery of a message by a network, carrying out some operation on a shared memory, or even something like a chemical reaction between two molecules. The transition rule for a system specifies how the states of all processes involved in the event are updated, based on their previous states. We can think of the transition rule as an arbitrary mathematical function (or relation if the processes are nondeterministic); this corresponds in programming terms to implementing local computation by processes as a gigantic table lookup. Obviously this is not how we program systems in practice. But what this approach does is allow us to abstract away completely from how individual processes work, and emphasize how all of the processes interact with each other. This can lead to odd results: for example, it's perfectly consistent with this model for some process to be able to solve the halting problem, or carry out arbitrarily complex calculations between receiving a message and sending its response. A partial justification for this assumption is that in practice, the multi-millisecond latencies in even reasonably fast networks are eons in terms of local computation. And as with any assumption, we can always modify it if it gets us into trouble. \section{Models} The global state consisting of all process states is called a \concept{configuration}, and we think of the system as a whole as passing from one global state or \concept{configuration} to another in response to each event. When this occurs the processes participating in the event update their states, and the other processes do nothing. This does not model concurrency directly; instead, we interleave potentially concurrent events in some arbitrary way. The advantage of this interleaving approach is that it gives us essentially the same behavior as we would get if we modeled simultaneous events explicitly, but still allows us to consider only one event at a time and use induction to prove various properties of the sequence of configurations we might reach. We will often use lowercase Greek letters for individual events or sequences of events. Configurations are typically written as capital Latin letters (often $C$). An \concept{execution} of a schedule is an alternating sequence of configurations and events $C_0 σ_0 C_1 σ_1 C_2 \dots$, where $C_{i+1}$ is the configuration that results from applying event $σ_i$ to configuration $C$. A \concept{schedule} is a sequence of events $σ_0 σ_1 \dots$ from some execution. We say that an event $σ$ is \concept{enabled} in $C$ if this event can be carried out in $C$; an example would be that the event that we deliver a particular message in a message-passing system is enabled only if that message has been sent and not yet delivered. When $σ$ is enabled in $C$, it is sometime convenient to write $Cσ$ for the configuration that results from applying $σ$ to $C$. What events are available, and what effects they have, will depend on what kind of model we are considering. We may also have additional constraints on what kinds of schedules are \concept{admissible}, which restricts the schedules under consideration to those that have certain desirable properties (say, every message that is sent is eventually delivered). There are many models in the distributed computing literature, which can be divided into a handful of broad categories: \begin{itemize} \item \indexConcept{message-passing}{Message passing} models (which we will cover in Part~\ref{part-message-passing}) correspond to systems where processes communicate by sending messages through a network. In \index{message-passing!synchronous}\concept{synchronous message-passing}, every process sends out messages at time $t$ that are delivered at time $t+1$, at which point more messages are sent out that are delivered at time $t+2$, and so on: the whole system runs in lockstep, marching forward in perfect synchrony.\footnote{In an interleaving model, these apparently simultaneous events are still recorded one at a time. What makes the system synchronous is that we demand that, in any admissible schedule, all $n$ events for time $t$ occur as a sequential block, followed by all $n$ events for time $t+1$, and so on.} Such systems are difficult to build when the components become too numerous or too widely dispersed, but they are often easier to analyze than \index{message-passing!asynchronous}\indexConcept{asynchronous message-passing}{asynchronous} systems, where messages are only delivered eventually after some unknown delay. Variants on these models include \index{message-passing!semi-synchronous}\indexConcept{semi-synchronous message-passing}{semi-synchronous} systems, where message delays are unpredictable but bounded, and various sorts of timed systems. Further variations come from restricting which processes can communicate with which others, by allowing various sorts of failures: \index{failure!crash}\indexConcept{crash failure}{crash failures} that stop a process dead, \index{failure!Byzantine}\indexConcept{Byzantine failure}{Byzantine failures} that turn a process evil, or \index{failure!omission}\indexConcept{omission failure}{omission failures} that drop messages in transit. Or—on the helpful side—we may supply additional tools like \indexConcept{failure detector}{failure detectors} (Chapter~\ref{chapter-failure-detectors}) or \concept{randomization} (Chapter~\ref{chapter-randomized-consensus}). \item \indexConcept{shared memory}{Shared-memory} models (Part~\ref{part-shared-memory}) correspond to systems where processes communicate by executing operations on shared objects In the simplest case, the objects are simple memory cells supporting read and write operations. These are called \index{register!atomic}\indexConcept{atomic register}{atomic registers}. But in general, the objects could be more complex hardware primitives like \concept{compare-and-swap} (§\ref{section-compare-and-swap}), \concept{load-linked/store-conditional} (§\ref{section-LLSC}), \index{queue!atomic}\indexConcept{atomic queue}{atomic queues}, or even more exotic objects from the seldom-visited theoretical depths. Practical shared-memory systems may be implemented as \concept{distributed shared-memory} (Chapter~\ref{chapter-distributed-shared-memory}) on top of a message-passing system. This gives an alternative approach to designing message-passing systems if it turns out that shared memory is easier to use for a particular problem. Like message-passing systems, shared-memory systems must also deal with issues of asynchrony and failures, both in the processes and in the shared objects. Realistic shared-memory systems have additional complications, in that modern CPUs allow out-of-order execution in the absence of special (and expensive) operations called \index{fence!memory}\index{memory fence}\indexConcept{fence}{fences} or \index{barrier!memory}\indexConcept{memory barrier}{memory barriers}.\cite{AdveG1995} We will effectively be assuming that our shared-memory code is liberally sprinkled with these operations so that nothing surprising happens, but this is not always true of real production code, and indeed there is work in the theory of distributed computing literature on algorithms that don't require unlimited use of memory barriers. \item A third family of models has no communication mechanism independent of the processes. Instead, the processes may directly observe the states of other processes. These models are used in analyzing \concept{self-stabilization}, for some \concept{biologically inspired systems}, and for computation by \concept{population protocols} or \concept{chemical reaction networks}. We will discuss some of this work in Part~\ref{part-other-models}. \item Other specialized models emphasize particular details of distributed systems, such as the labeled-graph models used for analyzing routing or the topological models used to give a very high-level picture of various distributed decision problems (see Chapter~\ref{chapter-topological-methods}). \end{itemize} We'll see many of these at some point in this course, and examine which of them can simulate each other under various conditions. \section{Properties} Properties we might want to prove about a system include: \begin{itemize} \item \indexConcept{safety}{Safety} properties, of the form ``nothing bad ever happens'' or, more precisely, ``there are no bad reachable configurations.'' These include things like ``at most one of the traffic lights at the intersection of Busy Road and Main Street is ever green'' or ``every value read from a counter equals the number of preceding increment operations.'' Such properties are typically proved using an \index{invariant}, a property of configurations that is true initially and that is preserved by all transitions (this is essentially a disguised induction proof). \item \indexConcept{liveness}{Liveness} properties, of the form ``something good eventually happens.'' An example might be ``my email is eventually either delivered or returned to me.'' These are not properties of particular states (I might unhappily await the eventual delivery of my email for decades without violating the liveness property just described), but of executions, where the property must hold starting at some finite time. Liveness properties are generally proved either from other liveness properties (e.g., ``all messages in this message-passing system are eventually delivered'') or from a combination of such properties and some sort of timer argument where some progress metric improves with every transition and guarantees the desirable state when it reaches some bound (also a disguised induction proof). \item \indexConcept{fairness}{Fairness} properties are a strong kind of liveness property of the form ``something good eventually happens to everybody.'' Such properties exclude \concept{starvation}, a situation where most of the kids are happily chowing down at the orphanage (``some kid eventually eats something'' is a liveness property) but poor \index{Twist!Oliver}\index{Oliver Twist}Oliver Twist is dying in the corner for lack of gruel. \item \indexConcept{simulation}{Simulations} show how to build one kind of system from another, such as a reliable message-passing system built on top of an unreliable system (TCP~\cite{Postel1981}), a shared-memory system built on top of a message-passing system (distributed shared memory—see Chapter~\ref{chapter-distributed-shared-memory}), or a synchronous system build on top of an asynchronous system (\concept{synchronizers}—see Chapter~\ref{chapter-synchronizers}). \item \indexConcept{impossibility}{Impossibility results} describe things we can't do. For example, the classic \concept{Two Generals} impossibility result (Chapter~\ref{chapter-two-generals}) says that it's impossible to guarantee agreement between two processes across an unreliable message-passing channel if even a single message can be lost. Other results characterize what problems can be solved if various fractions of the processes are unreliable, or if asynchrony makes timing assumptions impossible. These results, and similar lower bounds that describe things we can't do quickly, include some of the most technically sophisticated results in distributed computing. They stand in contrast to the situation with sequential computing, where the reliability and predictability of the underlying hardware makes proving lower bounds extremely difficult. \end{itemize} There are some basic proof techniques that we will see over and over again in distributed computing. For \index{proof!lower bound}\concept{lower bound} and \index{proof!impossibility}\concept{impossibility} proofs, the main tool is the \concept{indistinguishability} argument. Here we construct two (or more) executions in which some process has the same input and thus behaves the same way, regardless of what algorithm it is running. This exploitation of process's ignorance is what makes impossibility results possible in distributed computing despite being notoriously difficult in most areas of computer science.\footnote{An exception might be lower bounds for data structures, which also rely on a process's ignorance.} For \index{proof!safety}\indexConcept{safety property}{safety properties}, statements that some bad outcome never occurs, the main proof technique is to construct an \index{proof!invariant}\concept{invariant}. An invariant is essentially an induction hypothesis on reachable configurations of the system; an invariant proof shows that the invariant holds in all initial configurations, and that if it holds in some configuration, it holds in any configuration that is reachable in one step. Induction is also useful for proving \index{proof!termination}\concept{termination} and \index{proof!liveness}\concept{liveness} properties, statements that some good outcome occurs after a bounded amount of time. Here we typically structure the induction hypothesis as a \concept{progress measure}, showing that some sort of partial progress holds by a particular time, with the full guarantee implied after the time bound is reached. \part{Message passing} \label{part-message-passing} \myChapter{Model}{2020}{} \label{chapter-message-passing-basics} Message passing models simulate networks. Because any interaction between physically separated processors requires transmitting information from one place to another, all distributed systems are, at a low enough level, message-passing systems. We start by defining a formal model of these systems. \section{Basic message-passing model} \label{section-message-passing-model} We have a collection of $n$ \indexConcept{process}{processes} $p_{1}\dots{}p_{2}$, each of which has a \concept{state} consisting of a state from from state set $Q_{i}$. We think of these processes as nodes in a directed \index{graph!communication}\concept{communication graph} or \concept{network}. The edges in this graph are a collection of point-to-point \indexConcept{channel}{channels} or \indexConcept{buffer}{buffers} $b_{ij}$, one for each pair of adjacent processes $i$ and $j$, representing messages that have been sent but that have not yet been delivered. Implicit in this definition is that messages are point-to-point, with a single sender and recipient: if you want broadcast, you have to build it yourself. A \concept{configuration} of the system consists of a vector of states, one for each process and channel. The configuration of the system is updated by an \concept{event}, in which (1) zero or more messages in channels $b_{ij}$ are delivered to process $p_j$, removing them from $b_{ij}$; (2) $p_j$ updates its state in response; and (3) zero or more messages are added by $p_j$ to outgoing channels $b_{ji}$. We generally think of these events as \index{event!delivery}\indexConcept{delivery event}{delivery events} when at least one message is delivered, and as \index{event!computation}\indexConcept{computation event}{computation events} when none are. An \concept{execution segment} is a sequence of alternating configurations and events $C_{0},\phi_{1},C_{1},\phi_{2},\dots{}$, in which each triple $C_{i}\phi_{i+1}C_{i+1}$ is consistent with the transition rules for the event $\phi_{i+1}$, and the last element of the sequence (if any) is a configuration. If the first configuration $C_{0}$ is an \index{configuration!initial}\concept{initial configuration} of the system, we have an \concept{execution}. A \concept{schedule} is an execution with the configurations removed. \subsection{Formal details} Let $P$ be the set of processes, $Q$ the set of process states, and $M$ the set of possible messages. Each process $p_i$ has a state $\State_{i}∈Q$. Each channel $b_{ij}$ has a state $\Buffer_{ij}∈\powerset(M)$. We assume each process has a \concept{transition function} $δ: Q×\powerset(M) → Q×\powerset(P×M)$ that maps tuples consisting of a state and a set of incoming messages a new state and a set of recipients and messages to be sent. An important feature of the transition function is that the process's behavior can't depend on which of its previous messages have been delivered or not. A delivery event $\Del(i,A)$, where $A = \Set{(j_k,m_k)})$ removes each message $m_k$ from $b_{ji}$, updates $\State_i$ according to $δ(\State_i,A)$, and adds the outgoing messages specified to $δ(\State_i,A)$ to the appropriate channels. A computation event $\Comp(i)$ does the same thing, except that it applies $δ(\State_j,∅)$. Some implicit features in this definition: \begin{itemize} \item A process can't tell when its outgoing messages are delivered, because the channel states aren't available as input to $δ$. \item Processes are \concept{deterministic}: The next action of each process depends only on its current state, and not on extrinsic variables like the phase of the moon, coin-flips, etc. We may wish to relax this condition later by allowing coin-flips; to do so, we will need to extend the model to incorporate probabilities. \item It is possible to determine the accessible state of a process by looking only at events that involve that process. Specifically, given a schedule $S$, define the \concept{restriction} $S|i$ to be the subsequence consisting of all $\Comp(i)$ and $\Del(i,A)$ events (ranging over all possible $A$). Since these are the only events that affect the state of $i$, and only the state of $i$ is needed to apply the transition function, we can compute the state of $i$ looking only at $S|i$. In particular, this means that $i$ will have the same accessible state after any two schedules $S$ and $S'$ where $S|i = S'|i$, and thus will take the same actions in both schedules. This is the basis for \concept{indistinguishability proofs} (§\ref{section-indistinguishability-proofs}), a central technique in obtaining lower bounds and impossibility results. \end{itemize} Attiya and Welch~\cite{AttiyaW2004} use a different model in which communication channels are not modeled separately from processes, but instead are baked into processes as \Outbuf and \Inbuf variables. This leads to some oddities like having to distinguish the accessible state of a process (which excludes the \Outbuf{}s) from the full state (which doesn't). Our approach is close to that of Lynch~\cite{Lynch1996}, in that we have separate automata representing processes and communication channels. But since the resulting model produces essentially the same executions, the exact details don't really matter.\footnote{The late 1970s and early 1980s saw a lot of research on finding the ``right'' definition of a distributed system, and some of the disputes from that era were hard fought. But in the end, all the various proposed models turned out to be more or less equivalent, which is not surprising since the authors were ultimately trying to represent the same intuitive understanding of these systems. So most distributed computing papers now just use some phrasing like ``we consider the standard model of an asynchronous message-passing system'' and leave it to the reader to assume that this standard model is their favorite one. An example of this trick in action is that you will never see $\Del(i,A)$ or $\Comp(i)$ again after you finish reading this footnote.} \subsection{Network structure} \index{network} It may be the case that not all processes can communicate directly; if so, we impose a network structure in the form of a directed graph, where $i$ can send a message to $j$ if and only if there is an edge from $i$ to $j$ in the graph. Typically we assume that each process knows the identity of all its neighbors. For some problems (e.g., in peer-to-peer systems or other \index{network!overlay} \indexConcept{overlay network}{overlay networks}) it may be natural to assume that there is a fully-connected underlying network but that we have a dynamic network on top of it, where processes can only send to other processes that they have obtained the addresses of in some way. \section{Asynchronous systems} \label{section-asynchronous-message-passing} In an \index{asynchronous message-passing}\index{message-passing!asynchronous}\concept{asynchronous} model, only minimal restrictions are placed on when messages are delivered and when local computation occurs. A schedule is said to be \index{schedule!admissible}\concept{admissible} if (a) there are infinitely many computation steps for each process, and (b) every message is eventually delivered. (These are \concept{fairness} conditions.) The first condition (a) assumes that processes do not explicitly terminate, which is the assumption used in \cite{AttiyaW2004}; an alternative, which we will use when convenient, is to assume that every process either has infinitely many computation steps or reaches an explicit halting state. \subsection{Example: client-server computing} \label{section-client-server} Almost every distributed system in practical use is based on \concept{client-server} interactions. Here one process, the \concept{client}, sends a \concept{request} to a second process, the \concept{server}, which in turn sends back a \concept{response}. We can model this interaction using our asynchronous message-passing model by describing what the transition functions for the client and the server look like: see Algorithms~\ref{alg-client} and~\ref{alg-server}. \newData{\ClientServerRequest}{request} \newData{\ClientServerResponse}{response} \begin{algorithm} \Initially{ send \ClientServerRequest to server\; } \caption{Client-server computation: client code} \label{alg-client} \end{algorithm} \begin{algorithm} \UponReceiving{\ClientServerRequest}{ send \ClientServerResponse to client\; } \caption{Client-server computation: server code} \label{alg-server} \end{algorithm} The interpretation of Algorithm~\ref{alg-client} is that the client sends \ClientServerRequest (by adding it to its \Outbuf) in its very first computation event (after which it does nothing). The interpretation of Algorithm~\ref{alg-server} is that in any computation event where the server observes \ClientServerRequest in its \Inbuf, it sends \ClientServerResponse. We want to claim that the client eventually receives \ClientServerResponse in any admissible execution. To prove this, observe that: \begin{enumerate} \item After finitely many steps, the client carries out a computation event. This computation event puts \ClientServerRequest in its \Outbuf. \item After finitely many more steps, a delivery event occurs that delivers \ClientServerRequest to the server. This causes the server to send \ClientServerResponse. \item After finitely many more steps, a delivery event delivers \ClientServerResponse to the client, causing it to process \ClientServerResponse (and do nothing, given that we haven't included any code to handle this response). \end{enumerate} Each step of the proof is justified by the constraints on admissible executions. If we could run for infinitely many steps without a particular process doing a computation event or a particular message being delivered, we'd violate those constraints. Most of the time we will not attempt to prove the correctness of a protocol at quite this level of tedious detail. But if you are only interested in distributed algorithms that people actually use, you have now seen a proof of correctness for 99.9\% of them, and do not need to read any further. \section{Synchronous systems} A \index{message-passing!synchronous}\concept{synchronous message-passing} system is exactly like an asynchronous system, except we insist that the schedule consists of alternating phases in which (a) every process executes a computation step, and (b) all messages are delivered while none are sent.\footnote{Formally, the delivery phase consists of $n$ separate delivery events, in any order, that between them clean out all the channels.} The combination of a computation phase and a delivery phase is called a \concept{round}. Synchronous systems are effectively those in which all processes execute in lock-step, and there is no timing uncertainty. This makes protocols much easier to design, but makes them less resistant to real-world timing oddities. Sometimes this can be dealt with by applying a \concept{synchronizer} (Chapter~\ref{chapter-synchronizers}), which transforms synchronous protocols into asynchronous protocols at a small cost in complexity. \section{Drawing message-passing executions} \label{section-drawing-message-passing} Though formally we can describe an execution in a message-passing system as a long list of events, this doesn't help much with visualizing the underlying communication pattern. So it can sometimes be helpful to use a more visual representation of a message-passing execution that shows how information flows through the system. A typical example is given in Figure~\ref{fig-world-lines}. In this picture, time flows from left to right, and each process is represented by a horizontal line. This convention reflects the fact that processes have memory, so any information available to a process at some time $t$ is also available at all times $t' ≥ t$. Events are represented by marked points on these lines, and messages are represented by diagonal lines between events. The resulting picture looks like a collection of \indexConcept{world line}{world lines}\index{line!world} as used in physics to illustrate the path taken by various objects through spacetime. \begin{figure} \centering \begin{tikzpicture}[auto] \foreach \x in {1,2,3}{ \node at (0,\x) {$p_{\x}$}; \draw (1,\x) -- (10,\x); } \node at (5.5,0) {Time $\rightarrow$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) circle -- (4,2) circle -- (7.2,3) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (4,2) -- (8,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (6.5,2) circle -- (7,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) -- (9,3) circle; \end{tikzpicture} \caption[Asynchronous message-passing execution]{Asynchronous message-passing execution. Time flows left-to-right. Horizontal lines represent processes. Nodes represent events. Diagonal edges between events represent messages. In this execution, $p_1$ executes a computation event that sends messages to $p_2$ and $p_3$. When $p_2$ receives this message, it sends messages to $p_1$ and $p_3$. Later, $p_2$ executes a computation event that sends a second message to $p_1$. Because the system is asynchronous, there is no guarantee that messages arrive in the same order they are sent.} \label{fig-world-lines} \end{figure} Pictures like Figure~\ref{fig-world-lines} can be helpful for illustrating the various constraints we might put on message delivery. In Figure~\ref{fig-world-lines}, the system is completely asynchronous: messages can be delivered in any order, even if sent between the same processes. If we run the same protocol under stronger assumptions, we will get different communication patterns. For example, Figure~\ref{fig-world-lines-fifo} shows an execution that is still asynchronous but that assumes FIFO (first-in first-out) channels. A \concept{FIFO channel}\index{channel!FIFO} from some process $p$ to another process $q$ guarantees that $q$ receives messages in the same order that $p$ sends them (this can be simulated by a non-FIFO channel by adding a \concept{sequence number}\index{number!sequence} to each message, and queuing messages at the receiver until all previous messages have been processed). \begin{figure} \centering \begin{tikzpicture}[auto] \foreach \x in {1,2,3}{ \node at (0,\x) {$p_{\x}$}; \draw (1,\x) -- (10,\x); } \node at (5.5,0) {Time $\rightarrow$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) circle -- (4,2) circle -- (7.2,3) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (4,2) -- (7,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (6.5,2) circle -- (8,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) -- (9,3) circle; \end{tikzpicture} \caption[Asynchronous message-passing execution with FIFO channels]{Asynchronous message-passing execution with FIFO channels. Multiple messages from one process to another are now guaranteed to be delivered in the order they are sent.} \label{fig-world-lines-fifo} \end{figure} If we go as far as to assume synchrony, we get the execution in Figure~\ref{fig-world-lines-synchronous}. Now all messages take exactly one time unit to arrive, and computation events follow each other in lockstep. \begin{figure} \centering \begin{tikzpicture}[auto] \foreach \x in {1,2,3}{ \node at (0,\x) {$p_{\x}$}; \draw (1,\x) -- (10,\x); } \node at (5.5,0) {Time $\rightarrow$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) circle -- (4,2) circle -- (6,3) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (4,2) -- (6,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (6,2) circle -- (8,1) circle; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) -- (4,3) circle; \end{tikzpicture} \caption[Synchronous message-passing execution]{Synchronous message-passing execution. All messages are now delivered in exactly one time unit, and computation events occur exactly one time unit after the previous event.} \label{fig-world-lines-synchronous} \end{figure} \section{Complexity measures} \label{section-message-passing-complexity} There is no explicit notion of time in the asynchronous model, but we can define a time measure by adopting the rule that every message is delivered and processed at most 1 time unit after it is sent. Formally, we assign time 0 to the first event, and assign the largest time we can to each subsequent event, subject to the constraints that (a) no event is assigned a larger time than any later event; (b) if a message $m$ from $i$ to $j$ is created by an event at time $t$, then the time for the delivery of $m$ from $i$ to $j$ is no greater than $t+1$, and (c) any computation step is assigned a time no later than the previous event at the same process (or $0$ if the process has no previous events). This is consistent with an assumption that message propagation takes at most 1 time unit and that local computation takes 0 time units. Another way to look at this is that it is a definition of a time unit in terms of maximum message delay together with an assumption that message delays dominate the cost of the computation. This last assumption is pretty much always true for real-world networks with any non-trivial physical separation between components, thanks to speed of light limitations. An example of an execution annotated with times in this way is given in Figure~\ref{fig-world-lines-times}. \begin{figure} \centering \begin{tikzpicture}[auto] \foreach \x in {1,2,3}{ \node at (0,\x) {$p_{\x}$}; \draw (1,\x) -- (10,\x); } \node at (5.5,0) {Time $\rightarrow$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) circle node[anchor=north] {$0$} -- (2.8,2) circle node[anchor=north] {$1$} -- (5.2,3) circle node[anchor=north] {$1$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2.8,2) -- (8,1) circle node[anchor=north] {$2$}; \draw[color=blue,fill=blue,thick,radius=0.1] (6.5,2) circle node[anchor=north]{$1$} -- (7,1) circle node[anchor=north]{$2$}; \draw[color=blue,fill=blue,thick,radius=0.1] (2,1) -- (6,3) circle node[anchor=north] {$1$}; \end{tikzpicture} \caption[Asynchronous time]{Asynchronous message-passing execution with times.} \label{fig-world-lines-times} \end{figure} The \index{complexity!time}\concept{time complexity} of a protocol (that terminates) is the time of the last event at any process. Note that looking at \index{complexity!step}\concept{step complexity}, the number of computation events involving either a particular process (\index{complexity!step!individual}\concept{individual step complexity}) or all processes (\index{complexity!step!total}\concept{total step complexity}) is not useful in the asynchronous model, because a process may be scheduled to carry out arbitrarily many computation steps without any of its incoming or outgoing messages being delivered, which probably means that it won't be making any progress. These complexity measures will be more useful when we look at shared-memory models (Part~\ref{part-shared-memory}). For a protocol that terminates, the \index{complexity!message}\concept{message complexity} is the total number of messages sent. We can also look at message length in bits, total bits sent, etc., if these are useful for distinguishing our new improved protocol from last year's model. For synchronous systems, time complexity becomes just the number of rounds until a protocol finishes. Message complexity is still only loosely connected to time complexity; for example, there are synchronous \concept{leader election} (Chapter~\ref{chapter-leader-election}) algorithms that, by virtue of grossly abusing the synchrony assumption, have unbounded time complexity but very low message complexity. \myChapter{Broadcast and convergecast}{2020}{} \label{chapter-broadcast-and-convergecast} Here we'll describe protocols for propagating information throughout a network from some central initiator and gathering information back to that same initiator. We do this both because the algorithms are actually useful and because they illustrate some of the issues that come up with keeping time complexity down in an asynchronous message-passing system. \section{Flooding} \label{section-flooding} \indexConcept{flooding}{Flooding} is about the simplest of all distributed algorithms. It's dumb and expensive, but easy to implement, and gives you both a broadcast mechanism and a way to build rooted spanning trees. We'll give a fairly simple presentation of flooding roughly following Chapter 2 of \cite{AttiyaW2004}. \subsection{Basic algorithm} \newData{\SeenMessage}{seen-message} The basic flooding algorithm is shown in Algorithm~\ref{alg-flooding}. The idea is that when a process receives a message $M$, it forwards it to all of its neighbors unless it has seen it before, which it tracks using a single bit $\SeenMessage$. \begin{algorithm} \Initially{ \eIf{$\Pid = \Root$}{ $\SeenMessage ← \True$ \; send $M$ to all neighbors\; }{ $\SeenMessage ← \False$\; } } \UponReceiving{$M$}{ \If{$\SeenMessage = \False$}{ $\SeenMessage ← \True$\; send $M$ to all neighbors\; } } \caption{Basic flooding algorithm} \label{alg-flooding} \end{algorithm} \begin{theorem} \label{theorem-flooding} Every process receives $M$ after at most $D$ time and at most $\card*{E}$ messages, where $D$ is the diameter of the network and $E$ is the set of (directed) edges in the network. \end{theorem} \begin{proof} Message complexity: Each process only sends $M$ to its neighbors once, so each edge carries at most one copy of $M$. Time complexity: By induction on $d(\Root, v)$, we'll show that each $v$ receives $M$ for the first time no later than time $d(\Root, v) ≤ D$. The base case is when $v = \Root$, $d(\Root, v) = 0$; here $\Root$ receives message at time $0$. For the induction step, Let $d(\Root, v) = k > 0$. Then $v$ has a neighbor $u$ such that $d(\Root, u) = k-1$. By the induction hypothesis, $u$ receives $M$ for the first time no later than time $k-1$. From the code, $u$ then sends $M$ to all of its neighbors, including $v$; $M$ arrives at $v$ no later than time $(k-1)+1 = k$. \end{proof} Note that the time complexity proof also demonstrates correctness: every process receives $M$ at least once. As written, this is a one-shot algorithm: you can't broadcast a second message even if you wanted to. The obvious fix is for each process to remember which messages it has seen and only forward the new ones (which costs memory) and/or to add a \concept{time-to-live} (TTL) field on each message that drops by one each time it is forwarded (which may cost extra messages and possibly prevents complete broadcast if the initial TTL is too small). The latter method is what was used for searching in \index{Gnutella}\wikipedia{Gnutella}, an early peer-to-peer system. An interesting property of Gnutella was that since the application of flooding was to search for huge (multiple MiB) files using tiny (~100 byte) query messages, the actual bit complexity of the flooding algorithm was not especially large relative to the bit complexity of sending any file that was found. We can optimize the algorithm slightly by not sending $M$ back to the node it came from; this will slightly reduce the message complexity in many cases but makes the proof a sentence or two longer. (It's all a question of what you want to optimize.) \subsection{Adding parent pointers} To build a spanning tree, modify Algorithm~\ref{alg-flooding} by having each process remember who it first received $M$ from. The revised code is given as Algorithm~\ref{alg-flooding-parents} \begin{algorithm} \Initially{ \eIf{$\Pid = \Root$}{ $\Parent ← \Root$\; send $M$ to all neighbors\; }{ $\Parent ← ⊥$\; } } \UponReceiving{$M$ \From $p$}{ \If{$\Parent = ⊥$}{ $\Parent ← p$\\\; send $M$ to all neighbors\; } } \caption{Flooding with parent pointers} \label{alg-flooding-parents} \end{algorithm} We can easily prove that Algorithm~\ref{alg-flooding-parents} has the same termination properties as Algorithm~\ref{alg-flooding} by observing that if we map \Parent to \SeenMessage by the rule $⊥ \rightarrow \False$, anything else $\rightarrow \True$, then we have the same algorithm. We would like one additional property, which is that when the algorithm \indexConcept{quiesce}{quiesces} (has no outstanding messages), the set of parent pointers form a rooted spanning tree. For this we use induction on time: \begin{lemma} \label{lemma-flooding-parent-invariant} At any time during the execution of Algorithm~\ref{alg-flooding-parents}, the following invariant holds: \begin{enumerate} \item If $u.\Parent ≠ ⊥$, then $u.\Parent.\Parent ≠ ⊥$ and following parent pointers gives a path from $u$ to \Root. \item If there is a message $M$ in transit from $u$ to $v$, then $u.\Parent ≠ ⊥$. \end{enumerate} \end{lemma} \begin{proof} We have to show that that the invariant is true initially, and that any event preserves the invariant. We'll assume that all events are delivery events for a single message, since we can have the algorithm treat a multi-message delivery event as a sequence of single-message delivery events. We'll treat the initial configuration as the result of the root setting its parent to itself and sending messages to all its neighbors. It's not hard to verify that the invariant holds in the resulting configuration. For a delivery event, let $v$ receive $M$ from $u$. There are two cases: if $v.\Parent$ is already non-null, the only state change is that $M$ is no longer in transit, so we don't care about $u.\Parent$ any more. If $v.\Parent$ is null, then \begin{enumerate} \item $v.\Parent$ is set to $u$. This triggers the first case of the invariant. From the induction hypothesis we have that $u.\Parent ≠ ⊥$ and that there exists a path from $u$ to the root. Then $v.\Parent.\Parent = u.\Parent ≠ ⊥$ and the path from $v→u→\Root$ gives the path from $v$. \item Message $M$ is sent to all of $v$'s neighbors. Because $M$ is now in transit from $v$, we need $v.\Parent ≠ ⊥$; but we just set it to $u$, so we are happy. \end{enumerate} \end{proof} At the end of the algorithm, the invariant shows that every process has a path to the root, i.e., that the graph represented by the parent pointers is connected. Since this graph has exactly $\card*{V}-1$ edges (if we don't count the self-loop at the root), it's a tree. Though we get a spanning tree at the end, we may not get a very good spanning tree. For example, suppose our friend the adversary picks some Hamiltonian path through the network and delivers messages along this path very quickly while delaying all other messages for the full allowed 1 time unit. Then the resulting spanning tree will have depth $\card*{V}-1$, which might be much worse than $D$. If we want the shallowest possible spanning tree, we need to do something more sophisticated: see the discussion of \concept{distributed breadth-first search} in Chapter~\ref{chapter-distributed-BFS}. However, we may be happy with the tree we get from simple flooding: if the message delay on each link is consistent, then it's not hard to prove that we in fact get a shortest-path tree. As a special case, flooding always produces a BFS tree in the synchronous model. Note also that while the algorithm works in a directed graph, the parent pointers may not be very useful if links aren't two-way. \subsection{Termination} See \cite[Chapter 2]{AttiyaW2004} for further modifications that allow the processes to detect termination. In a sense, each process can terminate as soon as it is done sending $M$ to all of its neighbors, but this still requires some mechanism for clearing out the \Inbuf; by adding acknowledgments as described in \cite{AttiyaW2004}, we can terminate with the assurance that no further messages will be received. \section{Convergecast} A \concept{convergecast} is the inverse of broadcast: instead of a message propagating down from a single root to all nodes, data is collected from outlying nodes to the root. Typically some function is applied to the incoming data at each node to summarize it, with the goal being that eventually the root obtains this function of all the data in the entire system. (Examples would be counting all the nodes or taking an average of input values at all the nodes.) A basic convergecast algorithm is given in Algorithm~\ref{alg-convergecast}; it propagates information up through a previously-computed spanning tree. \begin{algorithm} \Initially{ \If{I am a leaf}{ send $\Input$ to $\Parent$\; } } \UponReceiving{$M$ \From $c$}{ append $(c,M)$ to \Buffer\\ \If{\Buffer contains messages from all my children}{ $v ← f(\Buffer, \Input)$\; \eIf{$\Pid = \Root$}{ \Return $v$\; }{ send $v$ to $\Parent$\; } } } \caption{Convergecast} \label{alg-convergecast} \end{algorithm} The details of what is being computed depend on the choice of $f$: \begin{itemize} \item If $\Input = 1$ for all nodes and $f$ is sum, then we count the number of nodes in the system. \item If $\Input$ is arbitrary and $f$ is sum, then we get a total of all the input values. \item Combining the above lets us compute averages, by dividing the total of all the inputs by the node count. \item If $f$ just concatenates its arguments, the root ends up with a vector of all the input values. \end{itemize} Running time is bounded by the depth of the tree: we can prove by induction that any node at height $h$ (height is length of the longest path from this node to some leaf) sends a message by time $h$ at the latest. Message complexity is exactly $n-1$, where $n$ is the number of nodes; this is easily shown by observing that each node except the root sends exactly one message. Proving that convergecast returns the correct value is similarly done by induction on depth: if each child of some node computes a correct value, then that node will compute $f$ applied to these values and its own input. What the result of this computation is will, of course, depend on $f$; it generally makes the most sense when $f$ represents some associative operation (as in the examples above). \section{Flooding and convergecast together} A natural way to build the spanning tree used by convergecast is to run flooding first. This also provides a mechanism for letting the leaves know that they are leaves and initiating the protocol. The combined algorithm is shown as Algorithm~\ref{alg-flooding-plus-convergecast}. \newData{\FloodingInit}{init} \newData{\NonChildren}{nonChildren} \begin{algorithm} \Initially{ $\Children ← ∅$ \; $\NonChildren ← ∅$ \; \eIf{$\Pid = \Root$}{ $\Parent ← \Root$ \; send $\FloodingInit$ to all neighbors }{ $\Parent ← ⊥$\; } } \UponReceiving{$\FloodingInit$ \From $p$}{ \eIf{$\Parent = ⊥$}{ $\Parent ← p$\; send $\FloodingInit$ to all neighbors\; }{ send $\Nack$ to $p$\; } } \UponReceiving{$\Nack$ \From $p$}{ $\NonChildren ← \NonChildren ∪ \Set{p}$\; } \AsSoonAs{$\Children ∪ \NonChildren$ includes all my neighbors}{ $v ← f(\Buffer, \Input)$\; \eIf{$\Pid = \Root$}{ \Return $v$\; }{ send $\Ack(v)$ to $\Parent$\; } } \UponReceiving{$\Ack(v)$ \From $k$}{ add $(k,v)$ to \Buffer\; add $k$ to $\Children$\; } \caption{Flooding and convergecast combined} \label{alg-flooding-plus-convergecast} \end{algorithm} However, this may lead to very bad time complexity for the convergecast stage. Consider a wheel-shaped network consisting of one central node $p_0$ connected to nodes $p_1, p_2, \dots, p_{n-1}$, where each $p_i$ is also connected to $p_{i+1}$. By carefully arranging for the $p_i p_{i+1}$ links to run much faster than the $p_0 p_i$ links, the adversary can make flooding build a tree that consists of a single path $p_0 p_1 p_2 \dots p_{n-1}$, even though the diameter of the network is only $2$. While it only takes 2 time units to build this tree (because every node is only one hop away from the initiator), when we run convergecast we suddenly find that the previously-speedy links are now running only at the guaranteed $≤ 1$ time unit per hop rate, meaning that convergecast takes $n-1$ time. This may be less of an issue in real networks, where the latency of links may be more uniform over time, meaning that a deep tree of fast links is still likely to be fast when we reach the convergecast step. But in the worst case we will need to be more clever about building the tree. We show how to do this in Chapter~\ref{chapter-distributed-BFS}. \myChapter{Distributed breadth-first search}{2020}{} \label{chapter-distributed-BFS} Here we describe some algorithms for building a \concept{breadth-first search} (\concept{BFS}) tree in a network. All assume that there is a designated \concept{initiator} node that starts the algorithm. At the end of the execution, each node except the initiator has a parent pointer and every node has a list of children. These are consistent and define a BFS tree: nodes at distance $k$ from the initiator appear at level $k$ of the tree. In a synchronous network, \concept{flooding} (§\ref{section-flooding}) solves BFS; see \cite[Lemma 2.8, page 21]{AttiyaW2004} or \cite[\S4.2]{Lynch1996}. So the interesting case is when the network is asynchronous. In an asynchronous network, the complication is that we can no longer rely on synchronous communication to reach all nodes at distance $d$ at the same time. So instead we need to keep track of distances explicitly, or possibly enforce some approximation to synchrony in the algorithm. (A general version of this last approach is to apply a synchronizer to one of the synchronous algorithms using a \concept{synchronizer}; see Chapter~\ref{chapter-synchronizers}.) To keep things simple, we'll drop the requirement that a parent learn the IDs of its children, since this can be tacked on as a separate notification protocol, in which each child just sends one message to its parent once it figures out who its parent is. \section{Using explicit distances} \label{section-distributed-BFS-relaxation} This is a translation of the AsynchBFS automaton from \cite[\S15.4]{Lynch1996}. It's a very simple algorithm, closely related to Dijkstra's algorithm for shortest paths, but there is otherwise no particular reason to use it. Not only does it not detect termination, but it is also dominated by the $O(D)$ time and $O(DE)$ message complexity synchronizer-based algorithm described in §\ref{section-distributed-BFS-synchronizer}. (Here $D$ is the \concept{diameter} of the network, the maximum distance between any two nodes.) The idea is to run flooding with distances attached. Each node sets its distance to $1$ plus the smallest distance sent by its neighbors and its parent to the neighbor supplying that smallest distance. A node notifies all its neighbors of its new distance whenever its distance changes. Pseudocode is given in Algorithm~\ref{alg-asynchBFS} \newData{\AsynchBFSdist}{distance} \begin{algorithm} \Initially{ \eIf{$\Pid = \Initiator$}{ $\AsynchBFSdist ← 0$\; send $\AsynchBFSdist$ to all neighbors\; }{ $\AsynchBFSdist ← \infty$\; } } \UponReceiving{$d$ \From $p$}{ \If{$d+1 < \AsynchBFSdist$}{ $\AsynchBFSdist ← d+1$\; $\Parent ← p$\; send $\AsynchBFSdist$ to all neighbors\; } } \caption{AsynchBFS algorithm (from \cite{Lynch1996})} \label{alg-asynchBFS} \end{algorithm} (See \cite{Lynch1996} for a precondition-effect description, which also includes code for buffering outgoing messages.) The claim is that after at most $O(VE)$ messages and $O(D)$ time, all distance values are equal to the length of the shortest path from the initiator to the appropriate node. The proof is by showing the following: \begin{lemma} \label{lemma-lynch-bfs} The variable $\AsynchBFSdist_p$ is always the length of some path from initiator to $p$, and any message sent by $p$ is also the length of some path from $\Initiator$ to $p$. \end{lemma} \begin{proof} The second part follows from the first; any message sent equals $p$'s current value of distance. For the first part, suppose $p$ updates its distance; then it sets it to one more than the length of some path from $\Initiator$ to $p'$, which is the length of that same path extended by adding the $pp'$ edge. \end{proof} We also need a liveness argument that says that $\AsynchBFSdist_p = d(\Initiator, p)$ no later than time $d(\Initiator, p)$. Note that we can't detect when $\AsynchBFSdist$ stabilizes to the correct value without a lot of additional work. In \cite{Lynch1996}, there's an extra $\card*{V}$ term in the time complexity that comes from message pile-ups, since the model used there only allows one incoming message to be processed per time units (the model in \cite{AttiyaW2004} doesn't have this restriction). The trick to arranging this to happen often is to build a graph where node 1 is connected to nodes 2 and 3, node 2 to 3 and 4, node 3 to 4 and 5, etc. This allows us to quickly generate many paths of distinct lengths from node 1 to node $k$, which produces $k$ outgoing messages from node $k$. It may be that a more clever analysis can avoid this blowup, by showing that it only happens in a few places. \section{Using layering} \label{section-distributed-BFS-layered} \newData{\LayeringBound}{bound} This approach is used in the \emph{LayeredBFS} algorithm in \cite{Lynch1996}, which is due to Gallager~\cite{Gallager1982}. Here we run a sequence of up to $\card*{V}$ instances of the simple algorithm with a distance bound on each: instead of sending out just 0, the initiator sends out $(0, \LayeringBound)$, where $\LayeringBound$ is initially 1 and increases at each phase. A process only sends out its improved distance if it is less than \LayeringBound. Each phase of the algorithm constructs a partial BFS tree that contains only those nodes within distance $\LayeringBound$ of the root. This tree is used to report back to the root when the phase is complete. For the following phase, notification of the increase in $\LayeringBound$ increase is distributed only through the partial BFS tree constructed so far. With some effort, it is possible to prove that in a bidirectional network that this approach guarantees that each edge is only probed once with a new distance (since distance-1 nodes are recruited before distance-2 nodes and so on), and the \LayeringBound-update and acknowledgment messages contribute at most $\card*{V}$ messages per phase. So we get $O(E + VD)$ total messages. But the time complexity is bad: $O(D^2)$ in the worst case. \section{Using local synchronization} \label{section-distributed-BFS-synchronizer} \newData{\BFSdistance}{distance} \newData{\BFSnotDistance}{not-distance} \newData{\BFSexactly}{exactly} \newData{\BFSmoreThan}{more-than} The reason the layering algorithm takes so long is that at each phase we have to phone all the way back up the tree to the initiator to get permission to go on to the next phase. We need to do this to make sure that a node is only recruited into the tree once: otherwise we can get pile-ups on the channels as in the simple algorithm. But we don't necessarily need to do this globally. Instead, we'll require each node at distance $d$ to delay sending out a recruiting message until it has confirmed that none of its neighbors will be sending it a smaller distance. We do this by having two classes of messages:\footnote{In an earlier version of these notes, these messages where called $\BFSdistance(d)$ and $\BFSnotDistance(d)$; the more self-explanatory $\BFSexactly$ and $\BFSmoreThan$ terminology is taken from \cite{Boulinier2008}.} \begin{itemize} \item $\BFSexactly(d)$: ``I know that my distance is $d$.'' \item $\BFSmoreThan(d)$: ``I know that my distance is $>d$.'' \end{itemize} The rules for sending these messages for a non-initiator are: \begin{enumerate} \item I can send $\BFSexactly(d)$ as soon as I have received $\BFSexactly(d-1)$ from at least one neighbor and $\BFSmoreThan(d-2)$ from all neighbors. \item I can send $\BFSmoreThan(d)$ if $d = 0$ or as soon as I have received $\BFSmoreThan(d-1)$ from all neighbors. \end{enumerate} The initiator sends $\BFSexactly(0)$ to all neighbors at the start of the protocol (these are the only messages the initiator sends). My distance will be the unique distance that I am allowed to send in an $\BFSexactly(d)$ messages. Note that this algorithm terminates in the sense that every node learns its distance at some finite time. If you read the discussion of synchronizers in Chapter~\ref{chapter-synchronizers}, this algorithm essentially corresponds to building the \index{synchronizer!alpha}\concept{alpha synchronizer} into the synchronous BFS algorithm, just as the layered model builds in the \index{synchronizer!beta}\concept{beta synchronizer}. See \cite[\S11.3.2]{AttiyaW2004} for a discussion of BFS using synchronizers. The original approach of applying synchronizers to get BFS is due to Awerbuch~\cite{Awerbuch1985}. We now show correctness. Under the assumption that local computation takes zero time and message delivery takes at most 1 time unit, we'll show that if $d(\Initiator, p) = d$, (a) $p$ sends $\BFSmoreThan(d')$ for any $d' < d$ by time $d'$, (b) $p$ sends $\BFSexactly(d)$ by time $d$, (c) $p$ never sends $\BFSmoreThan(d')$ for any $d' ≥ d$, and (d) $p$ never sends $\BFSexactly(d')$ for any $d' ≠ d$. For parts (c) and (d) we use induction on $d'$; for (a) and (b), induction on time. This is not terribly surprising: (c) and (d) are safety properties, so we don't need to talk about time. But (a) and (b) are liveness properties so time comes in. Let's start with (c) and (d). The base case is that the initiator never sends any $\BFSmoreThan$ messages at all, and so never sends $\BFSmoreThan(0)$, and any non-initiator never sends $\BFSexactly(0)$. For larger $d'$, observe that if a non-initiator $p$ sends $\BFSmoreThan(d')$ for $d'≥d$, it must first have received $\BFSmoreThan(d'-1)$ from all neighbors, including some neighbor $p'$ at distance $d-1$. But the induction hypothesis tells us that $p'$ can't send $\BFSmoreThan(d'-1)$ for $d'-1 ≥ d-1$. Similarly, to send $\BFSexactly(d')$ for $d' < d$, $p$ must first have received $\BFSexactly(d'-1)$ from some neighbor $p'$, but again $p'$ must be at distance at least $d-1$ from the initiator and so can't send this message either. In the other direction, to send $\BFSexactly(d')$ for $d' > d$, $p$ must first receive $\BFSmoreThan(d'-2)$ from this closer neighbor $p'$, but then $d'-2 > d-2 ≥ d-1$ so $\BFSmoreThan(d'-2)$ is not sent by $p'$. Now for (a) and (b). The base case is that the initiator sends $\BFSexactly(0)$ to all nodes at time 0, giving (a), and there is no $\BFSmoreThan(d')$ with $d' < 0$ for it to send, giving (b) vacuously; and any non-initiator sends $\BFSmoreThan(0)$ immediately. At time $t+1$, we have that (a) $\BFSmoreThan(t)$ was sent by any node at distance $t+1$ or greater by time $t$ and (b) $\BFSexactly(t)$ was sent by any node at distance $t$ by time $t$; so for any node at distance $t+2$ we send $\BFSmoreThan(t+1)$ no later than time $t+1$ (because we already received $\BFSmoreThan(t)$ from all our neighbors) and for any node at distance $t+1$ we send $\BFSexactly(t+1)$ no later than time $t+1$ (because we received all the preconditions for doing so by this time). Message complexity: A node at distance $d$ sends $\BFSmoreThan(d')$ for all $0 < d' < d$ and $\BFSexactly(d)$ and no other messages. So we have message complexity bounded by $\card*{E} \cdot D$ in the worst case. Note that this is gives a bound of $O(DE)$, which is slightly worse than the $O(E+DV)$ bound for the layered algorithm. Time complexity: It's immediate from (a) and (b) that all messages that are sent are sent by time $D$, and indeed that any node $p$ learns its distance at time $d(\Initiator, p)$. So we have optimal time complexity, at the cost of higher message complexity. I don't know if this trade-off is necessary, or if a more sophisticated algorithm could optimize both. Our time proof assumes that messages don't pile up on edges, or that such pile-ups don't affect delivery time (this is the default assumption used in \cite{AttiyaW2004}). A more sophisticated proof could remove this assumption. One downside of this algorithm is that it has to be started simultaneously at all nodes. Alternatively, we could trigger ``time 0'' at each node by a broadcast from the initiator, using the usual asynchronous broadcast algorithm; this would give us a BFS tree in $O(\card*{E}\cdot D)$ messages (since the $O(\card*{E})$ messages of the broadcast disappear into the constant) and $2D$ time. The analysis of time goes through as before, except that the starting time $0$ becomes the time at which the last node in the system is woken up by the broadcast. Further optimizations are possible; see, for example, the paper of Boulinier~\etal~\cite{Boulinier2008}, which shows how to run the same algorithm with constant-size messages. \myChapter{Leader election}{2020}{} \label{chapter-leader-election} (See also \cite[Chapter 3]{AttiyaW2004} or \cite[Chapter 3]{Lynch1996}.) The basic idea of leader election is that we want a single process to declare itself leader and the others to declare themselves non-leaders. The non-leaders may or may not learn the identity of the leader as part of the protocol; if not, we can always add an extra phase where the leader broadcasts its identity to the others. Traditionally, leader election has been used as a way to study the effects of symmetry, and many leader election algorithms are designed for networks in the form of a ring. A classic result of Angluin~\cite{Angluin1980} shows that leader election in a ring is impossible if the processes do not start with distinct identities. The proof is that if everybody is in the same state at every step, they all put on the crown at the same time. We discuss this result in §\ref{section-symmetry}. With ordered identities, a simple algorithm due to Le Lann~\cite{LeLann1977} and Chang and Roberts~\cite{ChangR1979} solves the problem in $O(n)$ time with $O(n^{2})$ messages: I send out my own id clockwise and forward any id bigger than mine. If I get my id back, I win. This works with a unidirectional ring, doesn't require synchrony, and never produces multiple leaders. See §\ref{section-LCR}. On a bidirectional ring we can get $O(n \log n)$ messages and $O(n)$ time with power-of-2 probing, using an algorithm of Hirschberg and Sinclair~\cite{HirschbergS1980}. See §\ref{section-hirschberg-sinclair}. An evil trick: if we have synchronized starting, known $n$, and known id space, we can have process with id $i$ wait until round $i\cdot n$ to start sending its id around, and have everybody else drop out when they receive it; this way only one process (the one with smallest id) ever starts a message and only $n$ messages are sent~\cite{FredericksonL1987}. But the running time can be pretty bad. For general networks, we can apply the same basic strategy as in Le Lann-Chang-Roberts by having each process initiate a broadcast/convergecast algorithm that succeeds only if the initiator has the smallest id. See §\ref{section-leader-election-in-general-networks}. Some additional algorithms for the asynchronous ring are given in §§\ref{section-Peterson-leader-election} and~\ref{section-randomized-leader-election}. Lower bounds are shown in §\ref{section-leader-election-lower-bounds}. \section{Symmetry} \label{section-symmetry} A system exhibits \concept{symmetry} if we can permute the nodes without changing the behavior of the system. More formally, we can define a symmetry as an \concept{equivalence relation} on processes, where we have the additional properties that all processes in the same equivalence class run the same code; and whenever $p$ is equivalent to $p'$, each neighbor $q$ of $p$ is equivalent to a corresponding neighbor $q'$ of $p'$. An example of a network with a lot of symmetries would be an \concept{anonymous} \concept{ring}, which is a network in the form of a cycle (the ring part) in which every process runs the same code (the anonymous part). In this case all nodes are equivalent. If we have a line, then we might or might not have any non-trivial symmetries: if each node has a \concept{sense of direction} that tells it which neighbor is to the left and which is to the right, then we can identify each node uniquely by its distance from the left edge. But if the nodes don't have a sense of direction, we can flip the line over and pair up nodes that map to each other.\footnote{Typically, this does not mean that the nodes can't tell their neighbors apart. But it does mean that if we swap the labels for all the neighbors (corresponding to flipping the entire line from left to right), we get the same executions.} Symmetries are convenient for proving impossibility results, as observed by Angluin~\cite{Angluin1980}. The underlying theme is that without some mechanism for \concept{symmetry breaking}, a message-passing system escape from a symmetric initial configuration. The following lemma holds for \concept{deterministic} systems, basically those in which processes can't flip coins: \begin{lemma} \label{lemma-symmetry} A symmetric deterministic message-passing system that starts in an initial configuration in which equivalent processes have the same state has a synchronous execution in which equivalent processes continue to have the same state. \end{lemma} \begin{proof} Easy induction on rounds: if in some round $p$ and $p'$ are equivalent and have the same state, and all their neighbors are equivalent and have the same state, then $p$ and $p'$ receive the same messages from their neighbors and can proceed to the same state (including outgoing messages) in the next round. \end{proof} An immediate corollary is that you can't do leader election in an anonymous system with a symmetry that puts each node in a non-trivial equivalence class, because as soon as I stick my hand up to declare I'm the leader, so do all my equivalence-class buddies. With \concept{randomization}, Lemma~\ref{lemma-symmetry} doesn't directly apply, since we can break symmetry by having my coin-flips come up differently from yours. It does show that we can't guarantee convergence to a single leader in any fixed amount of time (because otherwise we could just fix all the coin flips to get a deterministic algorithm). Depending on what the processes know about the size of the system, it may still be possible to show that a randomized algorithm necessarily fails in some cases.\footnote{Specifically, if the processes don't know the size of the ring, we can imagine a ring of size $2n$ in which the first $n$ processes happen to get exactly the same coin-flips as the second $n$ processes for long enough that two matching processes, one in each region, both think they have won the fight in a ring of size $n$ and declare themself to be the leader.} A more direct way to break symmetry is to assume that all processes have \indexConcept{identity}{identities}; now processes can break symmetry by just declaring that the one with the smaller or larger identity wins. This approach is taken in the algorithms in the following sections. \section{Leader election in rings} \label{section-leader-election-in-rings} Here we'll describe some basic leader election algorithms for rings. Historically, rings were the first networks in which leader election was studied, because they are the simplest networks whose symmetry makes the problem difficult, and because of the connection to token-ring networks, a method for congestion control in local-area networks that is no longer used much. \subsection{The Le Lann-Chang-Roberts algorithm} \label{section-LCR} This is about the simplest leader election algorithm there is. It works in a \concept{unidirectional ring}, where messages can only travel clockwise.\footnote{We'll see later in §\ref{section-Peterson-leader-election} that the distinction between unidirectional rings and bidirectional rings is not a big deal, but for now let's imagine that having a unidirectional ring is a serious hardship.} The algorithms works does not require synchrony, but we'll assume synchrony to make it easier to follow. Formally, we'll let the state space for each process $i$ consist of two variables: \Leader, initially $0$, which is set to $1$ if $i$ decides it's a leader; and \MaxId, the largest id seen so far. We assume that $i$ denotes $i$'s position rather than its id, which we'll write as $\Id_i$. We will also treat all positions as values mod $n$, to simplify the arithmetic. The initial version of this algorithm was proposed by Le Lann~\cite{LeLann1977}; it involved sending every id all the way around the ring, and having a node decide it was a leader if it had the largest id. Chang and Roberts~\cite{ChangR1979} improved on this by having nodes refuse to forward any id smaller than the maximum id seen so far. This means that only the largest id makes it all the way around the ring, so a node can declare itself leader the moment it sees its own id. The resulting algorithm is known as either Chang-Roberts or Le Lann-Chang-Roberts (LCR). We'll go with the latter because it is always polite to be generous with credit. Code for the LCR algorithm is given in Algorithm~\ref{alg-LCR}. \begin{algorithm} \Initially{ $\Leader ← 0$\; $\MaxId ← \Id_i$\; send $\Id_i$ to clockwise neighbor } \UponReceiving{$j$}{ \If{$j = \Id_i$}{ $\Leader ← 1$\; } \If{$j > \MaxId$}{ $\MaxId ← j$\; send $j$ to clockwise neighbor\; } } \caption{LCR leader election} \label{alg-LCR} \end{algorithm} \subsubsection{Proof of correctness for synchronous executions} By induction on the round number $k$. The induction hypothesis is that in round $k$, each process $i$'s leader bit is $0$, its $\MaxId$ value is equal to the largest id in the range $(i-k)\dots i$, and that it sends $\Id_{i-k}$ if and only if $\Id_{i-k}$ is the largest id in the range $(i-k)\dots i$. The base case is that when $k = 0$, $\MaxId = \Id_{i}$ is the largest id in $i\dots i$, and $i$ sends $\Id_{i}$. For the induction step, observe that in round $k-1$, $i-1$ sends $\Id_{(i-1)-(k-1)} = \Id_{i-k}$ if and only if it is the largest in the range $(i-k)\dots (i-1)$, and that $i$ adopts it as the new value of $\MaxId$ and sends it just in case it is larger than the previous largest value in $(i-k+1)\dots (i-1)$, i.e., if it is the largest value in $(i-k)\dots i$. Finally, in round $n-1$, $i-1$ sends $\Id_{i-N} = \Id_{i}$ if and only if $i$ is the largest id in $(i-n+1)\dots i$, the whole state space. So $i$ receives $\Id_{i}$ and sets $\Leader_{i} = 1$ if and only if it has the maximum id. With some tinkering, this proof can be adapted to show that the protocol also works in asynchronous executions. \subsubsection{Performance} It's immediate from the correctness proof that the protocols terminates after exactly $n$ rounds. To count message traffic, observe that each process sends at most $1$ message per round, for a total of $O(n^{2})$ messages. This is a tight bound since if the ids are in decreasing order $n, n-1, n-2, \dots{} 1$, then no messages get eaten until they hit $n$. \subsection{The Hirschberg-Sinclair algorithm} \label{section-hirschberg-sinclair} This algorithm improves on Le Lann-Chang-Roberts by reducing the message complexity. The idea is that instead of having each process send a message all the way around a ring, each process will first probe locally to see if it has the largest id within a short distance. If it wins among its immediate neighbors, it doubles the size of the neighborhood it checks, and continues as long as it has a winning id. This means that most nodes drop out quickly, giving a total message complexity of $O(n \log n)$. The running time is a constant factor worse than LCR, but still $O(n)$. To specify the protocol, it may help to think of messages as mobile agents and the state of each process as being of the form $(\text{local-state}, \{ \text{agents I'm carrying} \})$. Then the sending rule for a process becomes \emph{ship any agents in whatever direction they want to go} and the transition rule is \emph{accept any incoming agents and update their state in terms of their own internal transition rules}. An agent state for LCR will be something like (original-sender, direction, hop-count, max-seen) where direction is $R$ or $L$ depending on which way the agent is going, hop-count is initially $2^{k}$ when the agent is sent and drops by $1$ each time the agent moves, and max-seen is the biggest id of any node the agent has visited. An agent turns around (switches direction) when hop-count reaches 0. To prove this works, we can mostly ignore the early phases (though we have to show that the max-id node doesn't drop out early, which is not too hard). The last phase involves any surviving node probing all the way around the ring, so it will declare itself leader only when it receives its own agent from the left. That exactly one node does so is immediate from the same argument for LCR. Complexity analysis is mildly painful but basically comes down to the fact that any node that sends a message $2^{k}$ hops had to be a winner at phase $2^{k-1}$, which means that it is the largest of some group of $2^{k-1}$ ids. Thus the $2^{k}$-hop senders are spaced at least $2^{k-1}$ away from each other and there are at most $n/2^{k-1}$ of them. Summing up over all $\ceil{\lg n}$ phases, we get $\sum_{k=0}^{\ceil{\lg n}} 2^{k} n / 2^{k-1} = O(n \log n)$ messages and $\sum_{k=0}^{\ceil{\lg n}} 2^{k} = O(n)$ time. \subsection{Peterson's algorithm for the unidirectional ring} \label{section-Peterson-leader-election} This algorithm is due to Peterson~\cite{Peterson1982} and assumes an asynchronous, unidirectional ring. It gets $O(n \log n)$ message complexity in all executions. The basic idea (2-way communication version): Start with $n$ candidate leaders. In each of at most $\lg n$ asynchronous phases, each candidate probes its nearest neighbors to the left and right; if its ID is larger than the IDs of both neighbors, it survives to the next phase. Non-candidates act as relays passing messages between candidates. As in Hirschberg and Sinclair (§\ref{section-hirschberg-sinclair}), the probing operations in each phase take $O(n)$ messages, and at least half of the candidates drop out in each phase. The last surviving candidate wins when it finds that it's its own neighbor. To make this work in a 1-way ring, we have to simulate 2-way communication by moving the candidates clockwise around the ring to catch up with their unsendable counterclockwise messages. Peterson's algorithm does this with a two-hop approach that is inspired by the 2-way case above; in each phase $k$, a candidate effectively moves two positions to the right, allowing it to look at the ids of three phase-$k$ candidates before deciding to continue in phase $k+1$ or not. Here is a very high-level description; it assumes that we can buffer and ignore incoming messages from the later phases until we get to the right phase, and that we can execute sends immediately upon receiving messages. Doing this formally in terms of the model of §\ref{section-message-passing-model} means that we have to build explicit internal buffers into our processes, which we can easily do but won't do here (see \cite[pp.~483--484]{Lynch1996} for the right way to do this). We can use a similar trick to transform any bidirectional-ring algorithm into a unidirectional-ring algorithm: alternate between phases where we send a message right, then send a virtual process right to pick up any left-going messages deposited for us. The problem with this trick is that it requires two messages per process per phase, which gives us a total message complexity of $O(n^2)$ if we start with an $O(n)$-time algorithm. Peterson's algorithm avoids this by propagating only the surviving candidates. Pseudocode for Peterson's algorithm is given in Algorithm~\ref{alg-peterson}. \begin{algorithm} \newData{\PetersonPhase}{phase} \newData{\PetersonCurrent}{current} \newFunc{\PetersonProbe}{probe} \newFunc{\PetersonCandidate}{candidate} \newFunc{\PetersonRelay}{relay} \Procedure{$\PetersonCandidate()$}{ $\PetersonPhase ← 0$ \; $\PetersonCurrent ← \Pid$ \; \While{\True}{ send $\PetersonProbe(\PetersonPhase, \PetersonCurrent)$ \; wait for $\PetersonProbe(\PetersonPhase, x)$ \; $\Id_2 ← x$ \; send $\PetersonProbe(\PetersonPhase + 1/2, \Id_2)$ \; wait for $\PetersonProbe(\PetersonPhase + 1/2, x)$ \; $\Id_3 ← x$ \; \uIf{$\Id_2 = \PetersonCurrent$}{ I am the leader!\; \Return\; } \uElseIf{$\Id_2 > \PetersonCurrent$ \KwAnd $\Id_2 > \Id_3$}{ $\PetersonCurrent ← \Id_2$\; $\PetersonPhase ← \PetersonPhase + 1$\; } \Else{ switch to $\PetersonRelay()$\; } } } \Procedure{$\PetersonRelay()$}{ \UponReceiving{$\PetersonProbe(p, i)$}{ send $\PetersonProbe(p, i)$\; } } \caption{Peterson's leader-election algorithm} \label{alg-peterson} \end{algorithm} Note: The phase arguments in the probe messages are useless if one has FIFO channels, which is why \cite{Lynch1996} doesn't use them. Proof of correctness is essentially the same as for the 2-way algorithm. For any pair of adjacent candidates, at most one of their current IDs survives to the next phase. So we get a sole survivor after $\lg n$ phases. Each process sends or relays at most 2 messages per phases, so we get at most $2 n \lg n$ total messages. \subsection{A simple randomized \texorpdfstring{$O(n \log n)$}{O(n log n)}-message algorithm} \label{section-randomized-leader-election} An alternative to running a more sophisticated algorithm is to reduce the average cost of LCR using randomization. The presentation here follows the average-case analysis done by Chang and Roberts~\cite{ChangR1979}. Run LCR where each id is constructed by prepending a long random bit-string to the real id. This gives uniqueness (since the real id's act as tie-breakers) and something very close to a random permutation on the constructed id's. When we have unique random id's, a simple argument shows that the $i$-th largest id only propagates an expected $n/i$ hops, giving a total of $O(n H_{n}) = O(n \log n)$ hops.\footnote{Alternatively, we could consider the \concept{average-case complexity} of the algorithm when we assume all $n!$ orderings of the ids are equally likely; this also gives $O(n \log n)$ expected message complexity~\cite{ChangR1979}.} Unique random id's occur with high probability provided the range of the random sequence is $\gg n^{2}$. The downside of this algorithm compared to Peterson's is that knowledge of $n$ is required to pick random id's from a large enough range. It also has higher bit complexity, since Peterson's algorithm is sending only IDs (in the FIFO-channel version) without any random padding. An possible upside is that if the range of random ids is large enough, we can run it without any initial ids at all, as long as we are willing to accept a small probability of accidentally electing two leaders. \section{Leader election in general networks} \label{section-leader-election-in-general-networks} For general networks, a simple approach is to have each node initiate a breadth-first-search and convergecast, with nodes refusing to participate in the protocol for any initiator with a lower id. It follows that only the node with the maximum id can finish its protocol; this node becomes the leader. If messages from parallel broadcasts are combined, it's possible to keep the message complexity of this algorithm down to $O(DE)$. More sophisticated algorithms reduce the message complexity by coalescing local neighborhoods similar to what happens in the Hirschberg-Sinclair and Peterson algorithms. A noteworthy example is an $O(n \log n)$ message-complexity algorithm of Afek and Gafni~\cite{AfekG1991}, who also show an $Ω(n \log n)$ lower bound on message complexity for any synchronous algorithm in a complete network. \section{Lower bounds} \label{section-leader-election-lower-bounds} Here we present two classic $\Omega(\log n)$ lower bounds on message complexity for leader election in the ring. The first, due to Burns~\cite{Burns1980}, assumes that the system is asynchronous and that the algorithm is \concept{uniform}: it does not depend on the size of the ring. The second, due to Frederickson and Lynch~\cite{FredericksonL1987}, allows a synchronous system and relaxes the uniformity assumption, but requires that the algorithm can't do anything to ids but copy and compare them. \subsection{Lower bound on asynchronous message complexity} \label{section-asynchronous-leader-election-lower-bound} Here we describe a lower bound for uniform asynchronous leader election in the ring. The description here is based on~\cite[\S3.3.3]{AttiyaW2004}; a slightly different presentation can also be found in~\cite[\S15.1.4]{Lynch1996}. The original result is due to Burns~\cite{Burns1980}. We assume the system is deterministic. The basic idea is to construct a bad execution in which $n$ processes send lots of messages recursively, by first constructing two bad $(n/2)$-process executions and pasting them together in a way that generates many extra messages. If the pasting step produces $Θ(n)$ additional messages, we get a recurrence $T(n) ≥ 2T(n/2) + Θ(n)$ for the total message traffic, which has solution $T(n) = \Omega(n \log n)$. We'll assume that all processes are trying to learn the identity of the process with the smallest id. This is a slightly stronger problem that mere leader election, but it can be solved with at most an additional $2n$ messages once we actually elect a leader. So if we get a lower bound of $f(n)$ messages on this problem, we immediately get a lower bound of $f(n)-2n$ on leader election. To construct the bad execution, we consider ``open executions'' on rings of size $n$ where no message is delivered across some edge (these will be partial executions, because otherwise the guarantee of eventual delivery kicks in). Because no message is delivered across this edge, the processes can't tell if there is really a single edge there or some enormous unexplored fragment of a much larger ring. Our induction hypothesis will show that a line of $n/2$ processes can be made to send at least $T(n/2)$ messages in an open execution (before seeing any messages across the open edge); we'll then show that a linear number of additional messages can be generated by pasting two such executions together end-to-end, while still getting an open execution with $n$ processes. In the base case, we let $n=1$. Somebody has to send a message eventually, giving $T(2) ≥ 1$. For larger $n$, suppose that we have two open executions on $n/2$ processes that each send at least $T(n/2)$ messages. Break the open edges in both executions and paste the resulting lines together to get a ring of size $n$; similarly paste the schedules $σ_1$ and $σ_2$ of the two executions together to get a combined schedule $σ_1σ_2$ with at least $2T(n/2)$ messages. Note that in the combined schedule no messages are passed between the two sides, so the processes continue to behave as they did in their separate executions. Let $e$ and $e'$ be the edges we used to past together the two rings. Extend $σ_1σ_2$ by the longest possible suffix $σ_3$ in which no messages are delivered across $e$ and $e'$. Since $σ_3$ is as long as possible, after $σ_1σ_2σ_3$, there are no messages waiting to be delivered across any edge except $e$ and $e'$ and all processes are \concept{quiescent}—they will send no additional messages until they receive one. We now consider some suffix $σ_4$ such causes the protocol to finish. While executing $σ_4$, construct two sets of processes $S$ and $S'$ by the following rules: \begin{enumerate} \item If a process is not yet in $S$ or $S'$ and receives a message delivered across $e$, put it in $S$; similarly if it receives a message delivered across $e'$, put it in $S'$. \item If a process is not yet in $S$ or $S'$ and receives a message that was sent by a process in $S$, put it in $S$; similarly for $S'$. \end{enumerate} triggered by a delivery across $e$ Observe that $S∪S'$ includes every process on the half of the ring with the larger minimum id, because any such process that doesn't receive a message in $σ_4$ doesn't learn the global minimum. So $\card{S∪S'} ≥ n/2$ and thus $\min\parens{\card{S},\card{S'}} ≥ n/4$. Assume without loss of generality that it is $\card{S}$ that is at least $n/4$. Except for the two processes incident to $e$, every process that is added to $S$ is added in response to a message sent in $σ_4$. So there are at least $n/4-2$ such messages. We can also argue that all of these messages are sent in the subschedule $τ$ of $σ_4$ that contains only messages that do not depend on messages delivered across $e'$. It follows that $σ_1σ_2σ_3τ$ is an open execution on $n$ processes with at least $2T(n/2) + n/4 - 2$ sent messages. This gives $T(n) ≥ 2T(n/2) + n/4 - 2 = 2T(n/2) + Ω(n)$ as claimed. \subsection{Lower bound for comparison-based algorithms} Here we give an $\Omega(n \log n)$ lower bound on messages for synchronous-start comparison-based algorithms in bidirectional synchronous rings. For full details see \cite[\S3.6]{Lynch1996}, \cite[\S3.4.2]{AttiyaW2004}, or the original JACM paper by Frederickson and Lynch~\cite{FredericksonL1987}. Basic ideas: \begin{itemize} \item Two fragments $i \dots i+k$ and $j\dots j+k$ of a ring are \concept{order-equivalent} provided $\Id_{i+a} > \Id_{i+b}$ if and only if $\Id_{j+a} > \Id_{j+b}$ for $b = 0\dots k$. \item An algorithm is \indexConcept{comparison-based algorithm}{comparison-based} if it can't do anything to IDs but copy them and test for $<$. The state of such an algorithm is modeled by some non-ID state together with a big bag of IDs, messages have a pile of IDs attached to them, etc. Two states/messages are equivalent under some mapping of IDs if you can translate the first to the second by running all IDs through the mapping. An equivalent version uses an explicit equivalence relation between processes. Let executions of $p_{1}$ and $p_{2}$ be \concept{similar} if both processes send messages in the same direction(s) in the same rounds and both processes declare themselves leader (or not) at the same round. Then an algorithm is comparison-based based if order-equivalent rings yield similar executions for corresponding processes. This can be turned into the explicit-copying-IDs model by replacing the original protocol with a \concept{full-information protocol} in which each message is replaced by the ID and a complete history of the sending process (including all messages it has every received). \item Define an \concept{active round} as a round in which at least one message is sent. Claim: Actions of $i$ after $k$ active rounds depends, up to an order-equivalent mapping of ids, only on the order-equivalence class of ids in $i-k\dots i+k$, the \concept{$k$-neighborhood} of $i$. Proof: by induction on $k$. Suppose $i$ and $j$ have order-equivalent $(k-1)$-neighborhoods; then after $k-1$ active rounds they have equivalent states by the induction hypothesis. In inactive rounds, $i$ and $j$ both receive no messages and update their states in the same way. In active rounds, $i$ and $j$ receive order-equivalent messages and update their states in an order-equivalent way. \item If we have an order of ids with a lot of order-equivalent $k$-neighborhoods, then after $k$ active rounds if one process sends a message, so do a lot of other ones. \end{itemize} Now we just need to build a ring with a lot of order-equivalent neighborhoods. For $n$ a power of $2$ we can use the bit-reversal ring, e.g., id sequence $000, 100, 010, 110, 001, 101, 011, 111$ (in binary) when $n=8$. Figure~\ref{figure-bit-reversal-ring} gives a picture of what this looks like for $n=32$. \begin{figure} \centering \includegraphics[scale=0.8]{revbin.pdf} \caption{Labels in the bit-reversal ring with $n=32$} \label{figure-bit-reversal-ring} \end{figure} For $n$ not a power of $2$ we look up Frederickson and Lynch~\cite{FredericksonL1987} or Attiya~\etal~\cite{AttiyaSW1988}. In either case we get $\Omega(n/k)$ order-equivalent members of each equivalence class after $k$ active rounds, giving $\Omega(n/k)$ messages per active round, which sums to $\Omega(n \log n)$. For non-comparison-based algorithms we can still prove $\Omega(n \log n)$ messages for time-bounded algorithms, but it requires techniques from \concept{Ramsey theory}, the branch of combinatorics that studies when large enough structures inevitably contain substructures with certain properties.\footnote{The classic example is \concept{Ramsey's Theorem}, which says that if you color the edges of a complete graph red or blue, while trying to avoid having any subsets of $k$ vertices with all edges between them the same color, you will no longer be able to once the graph is large enough (for any fixed $k$). See~\cite{GrahamRS1990} for much more on the subject of Ramsey theory.} Here ``time-bounded'' means that the running time can't depend on the size of the ID space. See \cite[\S3.4.2]{AttiyaW2004} or \cite[\S3.7]{Lynch1996} for the textbook version, or \cite[\S7]{FredericksonL1987} for the original result. The intuition is that for any fixed protocol, if the ID space is large enough, then there exists a subset of the ID space where the protocol acts like a comparison-based protocol. So the existence of an $O(f(n))$-message time-bounded protocol implies the existence of an $O(f(n))$-message comparison-based protocol, and from the previous lower bound we know $f(n)$ is $\Omega(n \log n)$. Note that time-boundedness is necessary: we can't prove the lower bound for non-time-bounded algorithms because of the $i\cdot n$ trick. \myChapter{Logical clocks}{2020}{} \label{chapter-logical-clocks} \index{clock!logical}\indexConcept{logical clock}{Logical clocks} assign a timestamp to all events in an asynchronous message-passing system that simulates real time, thereby allowing timing-based algorithms to run despite asynchrony. In general, they don't have anything to do with clock synchronization or wall-clock time; instead, they provide numerical values that increase over time and are consistent with the observable behavior of the system. This means that local events on a single process have increasing times, and messages are never delivered before they are sent, when time is measured using the logical clock. \section{Causal ordering} The underlying notion of a logical clock is \index{ordering!causal}\concept{causal ordering}, a partial order on events that describes when one event $e$ provably occurs before some other event $e'$. For the purpose of defining casual ordering and logical clocks, we will assume that a schedule consists of \index{event!send}\indexConcept{send event}{send events} and \index{event!receive}\indexConcept{receive event}{receive events}, which correspond to some process sending a single message or receiving a single message, respectively. Given two schedules $S$ and $S'$, call $S$ and $S'$ \concept{similar} if $S|p = S'|p$ for all processes $p$; in other words, $S$ and $S'$ are similar if they are indistinguishable by all participants. We can define a causal ordering on the events of some schedule $S$ implicitly by considering all schedules $S'$ similar to $S$, and declare that $e < e'$ if $e$ precedes $e'$ in all such $S$. But it is usually more useful to make this ordering explicit. Following~\cite[\S6.1.1]{AttiyaW2004} (and ultimately~\cite{Lamport1978}), define the \concept{happens-before} relation $\happensBefore{S}$ on a schedule $S$ to consist of: \begin{enumerate} \item All pairs $(e, e')$ where $e$ precedes $e'$ in $S$ and $e$ and $e'$ are events of the same process. \item All pairs $(e, e')$ where $e$ is a send event and $e'$ is the receive event for the same message. \item All pairs $(e, e')$ where there exists a third event $e''$ such that $e \happensBefore{S} e''$ and $e'' \happensBefore{S} e'$. (In other words, we take the \concept{transitive closure} of the relation defined by the previous two cases.) \end{enumerate} It is not terribly hard to show that this gives a partial order; the main observation is that if $e \happensBefore{S} e'$, then $e$ precedes $e'$ in $S$. So $\happensBefore{S}$ is a subset of the total order $<_{S}$ given by the order of events in $S$. A \concept{causal shuffle} $S'$ of a schedule $S$ is a permutation of $S$ that is consistent with the happens-before relation on $S$; that is, if $e$ happens-before $e'$ in $S$, then $e$ precedes $e'$ in $S'$. The importance of the happens-before relation follows from the following lemma, which says that the causal shuffles of $S$ are precisely the schedules $S'$ that are similar to $S$. \begin{lemma} \label{lemma-happens-before} Let $S'$ be a permutation of the events in $S$. Then the following two statements are equivalent: \begin{enumerate} \item $S'$ is a causal shuffle of $S$. \item $S'$ is the schedule of an execution fragment of a message-passing system with $S|p = S'|p$ for all $S'$. \end{enumerate} \end{lemma} \begin{proof} $(1 ⇒ 2)$. We need to show both similarity and that $S'$ corresponds to some execution fragment. We'll show similarity first. Pick some $p$; then every event at $p$ in $S$ also occurs in $S'$, and they must occur in the same order by the first case of the definition of the happens-before relation. This gets us halfway to showing $S'$ is the schedule of some execution fragment, since it says that any events initiated by $p$ are consistent with $p$'s programming. To get the rest of the way, observe that any other events are receive events. For each receive event $e'$ in $S$, there must be some matching send event $e$ also in $S$; thus $e$ and $e'$ are both in $S'$ and occur in the right order by the second case of the definition of happens-before. $(2 ⇒ 1)$. First observe that since every event $e$ in $S'$ occurs at some process $p$, if $S'|p = S|p$ for all $p$, then there is a one-to-one correspondence between events in $S'$ and $S$, and thus $S'$ is a permutation of $S$. Now we need to show that $S'$ is consistent with $\happensBefore{S}$. Let $e \happensBefore{S} e'$. There are three cases. \begin{enumerate} \item $e$ and $e'$ are events of the same process $p$ and $e <_{S} e'$. But then $e <_{S'} e'$ because $S|p = S'|p$. \item $e$ is a send event and $e'$ is the corresponding receive event. Then $e <_{S'} e'$ because $S'$ is the schedule of an execution fragment. \item $e \happensBefore{S} e'$ by transitivity. Then each step in the chain connecting $e$ to $e'$ uses one of the previous cases, and $e <_{S'} e'$ by transitivity of $<_{S'}$. \end{enumerate} \end{proof} There are two main applications for causal shuffles: \begin{enumerate} \item We can prove upper bounds by using a causal shuffle to turn some arbitrary $S$ into a nice $S'$, and argue that the niceness of $S'$ means that $S$ at least looks nice to the processes. An example of this can be found in Lemma~\ref{lemma-local-synchronizer}. \item We can prove lower bounds by using a causal shuffle to turn some specific $S$ into a nasty $S'$, and argue that the existence of $S'$ tells us that there exist bad schedules for some particular problem. An example of this can be found in §\ref{section-session-problem}. This works particularly well because $\happensBefore{S}$ includes enough information to determine the latest possible time of any event in either $S$ or $S'$, so rearranging schedules like this doesn't change the worst-case time. \end{enumerate} In both cases, we are using the fact that if I tell you $\happensBefore{S}$, then you know everything there is to know about the order of events in $S$ that you can deduce from reports from each process together with the fact that messages don't travel back in time. In the case that we want to use this information \emph{inside} an algorithm, we run into the issue that $\happensBefore{S}$ is a pretty big relation ($Θ(\card*{S}^2)$ bits with a naive encoding), and seems to require global knowledge of $<_{S}$ to compute. So we can ask if there is some simpler, easily computable description that works almost as well. This is where logical clocks come in. \section{Implementations} The basic idea of a logical clock is to compute a \concept{timestamp} for each event, so that comparing timestamps gives information about $\happensBefore{S}$. Note that these timestamps need not be totally ordered. In general, we will have a relation $<_L$ between timestamps such that $e \happensBefore{S} e'$ implies $e <_L e'$, but it may be that there are some pairs of events that are ordered by the logical clock despite being incomparable in the happens-before relation. Examples of logical clocks that use small timestamps but add extra ordering are Lamport clocks~\cite{Lamport1978}, discussed in §\ref{section-Lamport-clock}; and Neiger-Toueg-Welch clocks~\cite{NeigerT1987,Welch1987}, discussed in §\ref{section-Neiger-Toueg-Welch-clock}. These both assign integer timestamps to events and may order events that are not causally related. The main difference between them is that Lamport clocks do not alter the underlying execution, but may allow arbitrarily large jumps in the logical clock values; while Neiger-Toueg-Welch clocks guarantee small increments at the cost of possibly delaying parts of the system.\footnote{This makes them similar to \indexConcept{synchronizer}{synchronizers}, which we will discuss in Chapter~\ref{chapter-synchronizers}.} More informative are \indexConcept{vector clock}{vector clocks}~\cite{Fidge1991,Mattern1993}, discussed in §\ref{section-vector-clocks}. These use $n$-dimensional vectors of integers to capture $\happensBefore{S}$ exactly, at the cost of much higher overhead. \subsection{Lamport clock} \label{section-Lamport-clock} \newData{\Clock}{clock} \index{Lamport clock} \index{logical clock!Lamport} \index{clock!logical!Lamport} Lamport's \concept{logical clock}~\cite{Lamport1978} runs on top of any other message-passing protocol, adding additional state at each process and additional content to the messages (which is invisible to the underlying protocol). Every process maintains a local variable \Clock. When a process sends a message or executes an internal step, it sets $\Clock ← \Clock + 1$ and assigns the resulting value as the clock value of the event. If it sends a message, it piggybacks the resulting clock value on the message. When a process receives a message with timestamp $t$, it sets $\Clock ← \max(\Clock, t)+1$; the resulting clock value is taken as the time of receipt of the message. (To make life easier, we assume messages are received one at a time.) \begin{theorem} \label{theorem-lamport-clock} If we order all events by clock value, we get an execution of the underlying protocol that is locally indistinguishable from the original execution. \end{theorem} \begin{proof} Let $e <_{L} e'$ if $e$ has a lower clock value than $e'$. If $e$ and $e'$ are two events of the same process, then $e <_{L} e'$. If $e$ and $e'$ are send and receive events of the same message, then again $e <_{L} e'$. So for \emph{any} events $e$, $e'$, if $e \happensBefore{S} e'$, then $e <_{L} e'$. Now apply Lemma~\ref{lemma-happens-before}. \end{proof} \subsection{Neiger-Toueg-Welch clock} \label{section-Neiger-Toueg-Welch-clock} \index{Neiger-Toueg-Welch clock} \index{logical clock!Neiger-Toueg-Welch} \index{clock!logical!Neiger-Toueg-Welch} Lamport's clock has the advantage of requiring no changes in the behavior of the underlying protocol, but has the disadvantage that clocks are entirely under the control of the logical-clock protocol and may as a result make huge jumps when a message is received. If this is unacceptable—perhaps the protocol needs to do some unskippable maintenance task every 1000 clock ticks—then an alternative approach due to Neiger and Toueg~\cite{NeigerT1987} and Welch~\cite{Welch1987} can be used. Method: Each process maintains its own variable \Clock, which it increments whenever it feels like it. To break ties, the process extends the clock value to $\langle\Clock, \Id, \DataSty{eventCount}\rangle$ where \DataSty{eventCount} is a count of send and receive events (and possibly local computation steps). As in Lamport's clock, each message in the underlying protocol is timestamped with the current extended clock value. Because the protocol can't change the clock values on its own, when a message is received with a timestamp later than the current extended clock value, its delivery is delayed until \Clock exceeds the message timestamp, at which point the receive event is assigned the extended clock value of the time of delivery. \begin{theorem} \label{theorem-welch-clock} If we order all events by clock value, we get an execution of the underlying protocol that is locally indistinguishable from the original execution. \end{theorem} \begin{proof} Again, we have that (a) all events at the same process occur in increasing order (since the event count rises even if the clock value doesn't, and we assume that the clock value doesn't drop) and (b) all receive events occur later than the corresponding send event (since we force them to). So Lemma~\ref{lemma-happens-before} applies. \end{proof} The advantage of the Neiger-Toueg-Welch clock is that it doesn't impose any assumptions on the clock values, so it is possible to make \Clock be a real-time clock at each process and nonetheless have a causally-consistent ordering of timestamps even if the local clocks are not perfectly synchronized. If some process's clock is too far off, it will have trouble getting its messages delivered quickly (if its clock is ahead) or receiving messages (if its clock is behind)—the net effect is to add a round-trip delay to that process equal to the difference between its clock and the clock of its correspondent. But the protocol works well when the processes' clocks are closely synchronized, which is a reasonable assumption in many systems thanks to the Network Time Protocol, cheap GPS receivers, and clock synchronization mechanisms built into most cellular phone networks.\footnote{As I write this, my computer reports that its clock is an estimated 289 microseconds off from the timeserver it is synchronized to, which is less than a tenth of the round-trip delay to machines on the same local-area network and a tiny fraction of the round-trip delay to machines elsewhere, including the timeserver machine.} \subsection{Vector clocks} \label{section-vector-clocks} Logical clocks give a \emph{superset} of the happens-before relation: if $e \happensBefore{S} e'$, then $e <_{L} e'$ (or conversely, if $e \not<_{L} e'$, then it is not the case that $e \happensBefore{S} e'$). This is good enough for most applications, but what if we want to compute $\happensBefore{S}$ exactly? \newData{\VC}{VC} Here we can use a \concept{vector clock}, invented independently by Fidge~\cite{Fidge1991} and Mattern~\cite{Mattern1993}. Instead of a single clock value, each event is stamped with a vector of values, one for each process. When a process executes a local event or a send event, it increments only its own component $x_{p}$ of the vector. When it receives a message, it increments $x_{p}$ and sets each $x_{q}$ to the max of its previous value and the value of $x_{q}$ piggybacked on the message. We define $\VC(e) ≤ \VC(e')$, where $\VC(e)$ is the value of the vector clock for $e$, if $\VC(e)_{i} ≤ \VC(e')_{i}$ for all $i$. \begin{theorem} \label{theorem-vector-clock} Fix a schedule $S$; then for any $e$, $e'$, $VC(e) < VC(e')$ if and only if $e \happensBefore{S} e'$. \end{theorem} \begin{proof} The if part follows immediately from the update rules for the vector clock. For the only if part, suppose $e$ does not happen-before $e'$. Then $e$ and $e'$ are events of distinct processes $p$ and $p'$. For $\VC(e) < \VC(e')$ to hold, we must have $\VC(e)_{p} < \VC(e')_{p}$; but this can occur only if the value of $\VC(e)_{p}$ is propagated to $p'$ by some sequence of messages starting at $p$ and ending at $p'$ at or before $e'$ occurs. In this case we have $e \happensBefore{S} e'$. \end{proof} \section{Consistent snapshots} \label{section-chandy-lamport} A \concept{consistent snapshot} of a message-passing computation is a description of the states of the processes (and possibly messages in transit, but we can reduce this down to just states by keeping logs of messages sent and received) that gives the global configuration at some instant of a schedule that is a consistent reordering of the real schedule (a \concept{consistent cut} in the terminology of \cite[\S6.1.2]{AttiyaW2004}. Without shutting down the protocol before taking a snapshot this is the about the best we can hope for in a message-passing system. Logical clocks can be used to obtain consistent snapshots: pick some logical clock time and have each process record its state at this time (i.e., immediately after its last step before the time or immediately before its first step after the time). We have already argued that the logical clock gives a consistent reordering of the original schedule, so the set of values recorded is just the configuration at the end of an appropriate prefix of this reordering. In other words, it's a consistent snapshot. \newData{\CLsnap}{snap} \newData{\CLmarker}{marker} If we aren't building logical clocks anyway, there is a simpler consistent snapshot algorithm due to Chandy and Lamport~\cite{ChandyL1985}. Here some central initiator broadcasts a \CLsnap message, and each process records its state and immediately forwards the \CLsnap message to all neighbors when it first receives a snap message. To show that the resulting configuration is a configuration of some consistent reordering, observe that (with FIFO channels) no process receives a message before receiving \CLsnap that was sent after the sender sent \CLsnap: thus causality is not violated by lining up all the pre-snap operations before all the post-snap ones.\footnote{If FIFO channels are not available, they can be simulated in the absence of failures by adding a sequence number to each outgoing message on a given channel, and processing messages at the recipient only when all previous messages have been processed.} The full Chandy-Lamport algorithm adds a second \CLmarker message that is used to sweep messages in transit out of the communications channels, which avoids the need to keep logs if we want to reconstruct what messages are in transit (this can also be done with the logical clock version). The idea is that when a process records its state after receiving the \CLsnap message, it issues a \CLmarker message on each outgoing channel. For incoming channels, the process all records all messages received between the snapshot and receiving a marker message on that channel (or nothing if it receives \CLmarker before receiving \CLsnap). A process only reports its value when it has received a marker on each channel. The \CLmarker and \CLsnap messages can also be combined if the broadcast algorithm for \CLsnap resends it on all channels anyway, and a further optimization is often to piggyback both on messages of the underlying protocol if the underlying protocol is chatty enough. Note that Chandy-Lamport is equivalent to the logical-time snapshot using Lamport clocks, if the snap message is treated as a message with a very large timestamp. For Neiger-Toueg-Welch clocks, we get an algorithm where processes spontaneously decide to take snapshots (since Neiger-Toueg-Welch clocks aren't under the control of the snapshot algorithm) and delay post-snapshot messages until the local snapshot has been taken. This can be implemented as in Chandy-Lamport by separating pre-snapshot messages from post-snapshot messages with a marker message, and essentially turns into Chandy-Lamport if we insist that a process advance its clock to the snapshot time when it receives a marker. \subsection{Property testing} Consistent snapshots are in principle useful for debugging (since one can gather a consistent state of the system without being able to talk to every process simultaneously), and in practice are mostly used for detecting \index{property!stable}\indexConcept{stable property}{stable properties} of the system. Here a stable property is some predicate on global configurations that remains true in any successor to a configuration in which it is true, or (bending the notion of properties a bit) functions on configurations whose values don't change as the protocol runs. Typical examples are quiescence and its evil twin, deadlock. More exotic examples include total money supply in a banking system that cannot create or destroy money, or the fact that every process has cast an irrevocable vote in favor of some proposal or advanced its Neiger-Toueg-Welch-style clock past some threshold. The reason we can test such properties using consistent snapshot is that when the snapshot terminates with value $C$ in some configuration $C'$, even though $C$ may never have occurred during the actual execution of the protocol, there \emph{is} an execution which leads from $C$ to $C'$. So if $P$ holds in $C$, stability means that it holds in $C'$. Naturally, if $P$ doesn't hold in $C$, we can't say much. So in this case we re-run the snapshot protocol and hope we win next time. If $P$ eventually holds, we will eventually start the snapshot protocol after it holds and obtain a configuration (which again may not correspond to any global configuration that actually occurs) in which $P$ holds. \myChapter{Synchronizers}{2020}{} \label{chapter-synchronizers} \indexConcept{synchronizer}{Synchronizers} simulate an execution of a failure-free synchronous system in a failure-free asynchronous system. See \cite[Chapter 11]{AttiyaW2004} or \cite[Chapter 16]{Lynch1996} for a detailed (and rigorous) presentation. \section{Definitions} Formally, a synchronizer sits between the underlying network and the processes and does one of two things: \begin{itemize} \item A \index{synchronizer!global}\concept{global synchronizer} guarantees that no process receives a message from round $r$ until \emph{all processes} have sent their messages for round $r$. \item A \index{synchronizer!local}\concept{local synchronizer} guarantees that no process receives a message from round $r$ until \emph{all of that process's neighbors} have sent their messages for round $r$. \end{itemize} In both cases, the synchronizer packages all the incoming round $r$ messages $m$ for a single process together and delivers them as a single action $\Recv(p, m, r)$. Similarly, a process is required to hand over all of its outgoing round-$r$ messages to the synchronizer as a single action $\Send(p, m, r)$—this prevents a process from changing its mind and sending an extra round-$r$ message or two. It is easy to see that the global synchronizer produces executions that are effectively indistinguishable from synchronous executions, assuming that a synchronous execution is allowed to have some variability in exactly when within a given round each process does its thing. The local synchronizer only guarantees an execution that is locally indistinguishable from an execution of the global synchronizer: an individual process can't tell the difference, but comparing actions at different (especially widely separated) processes may reveal some process finishing round $r+1$ while others are still stuck in round $r$ or earlier. Whether this is good enough depends on what you want: it's bad for coordinating simultaneous missile launches, but may be just fine for adapting a synchronous message-passing algorithm (as with distributed breadth-first search as described in §\ref{section-distributed-BFS-synchronizer}) to an asynchronous system, if we only care about the final states of the processes and not when precisely those states are reached. Formally, the relation between global and local synchronization is described by the following lemma: \begin{lemma} \label{lemma-local-synchronizer} For any schedule $S$ of a locally synchronous execution, there is a schedule $S'$ of a globally synchronous execution such that $S|p = S'|p$ for all processes $p$. \end{lemma} \begin{proof} Essentially, we use the same \concept{happens-before} relation as in Chapter~\ref{chapter-logical-clocks}, and the fact that if a schedule $S'$ is a causal shuffle of another schedule $S$ (i.e., a permutation of $T$ that preserves causality), then $S'|p = S|p$ for all $p$ (Lemma~\ref{lemma-happens-before}). Given a schedule $S$, consider a schedule $S'$ in which the events are ordered first by increasing round and then by putting all sends before receives. This ordering is consistent with $\happensBefore{S}$, so it's a causal shuffle of $S$ and $S'|p = S|p$. But it is globally synchronized, because no round $r$ operation ever happens before a round $(r-1)$ operation. \end{proof} \section{Implementations} \label{section-synchronizer-implementations} Here we describe several implementations of synchronizers. All of them give at least local synchrony. One of them, the beta synchronizer (§\ref{section-beta-synchronizer}), also gives global synchrony. The names were chosen by their inventor, Baruch Awerbuch~\cite{Awerbuch1985}. The main difference between them is the mechanism used to determine when round-$r$ messages have been delivered. In the \index{synchronizer!alpha}\concept{alpha synchronizer}, every node sends a message to every neighbor in every round (possibly a dummy message if the underlying protocol doesn't send a message); this allows the receiver to detect when it's gotten all its round-$r$ messages (because it expects to get a message from every neighbor) but may produce huge blow-ups in message complexity in a dense graph. In the \index{synchronizer!beta}\concept{beta synchronizer}, messages are acknowledged by their receivers (doubling the message complexity), so the senders can detect when all of their messages are delivered. But now we need a centralized mechanism to collect this information from the senders and distribute it to the receivers, since any particular receiver doesn't know which potential senders to wait for. This blows up time complexity, as we essentially end up building a global synchronizer with a central leader. The \index{synchronizer!gamma}\concept{gamma synchronizer} combines the two approaches at different levels to obtain a trade-off between messages and time that depends on the structure of the graph and how the protocol is organized. Details of each synchronizer are given below. \subsection{The alpha synchronizer} \label{section-alpha-synchronizer} \newData{\alphaNoMsg}{noMsg} The alpha synchronizer uses local information to construct a local synchronizer. In round $r$, the synchronizer at $p$ sends $p$'s message (tagged with the round number) to each neighbor $p'$ or $\alphaNoMsg(r)$ if it has no messages. When it collects a message or \alphaNoMsg from each neighbor for round $r$, it delivers all the messages. It's easy to see that this satisfies the local synchronization specification. This produces no change in time but may drastically increase message complexity because of all the extra \alphaNoMsg messages flying around. For a synchronous protocol that runs in $T$ rounds with $M$ messages, the same protocol running with the alpha synchronizer will still run in $T$ time units, but the message complexity will go up to $T\cdot\card*{E}$ messages, or worse if the original algorithm doesn't detect termination. \subsection{The beta synchronizer} \label{section-beta-synchronizer} \newData{\betaAck}{ack} \newData{\betaOK}{OK} \newData{\betaGo}{go} The beta synchronizer centralizes detection of message delivery using a rooted directed spanning tree (previously constructed). When $p'$ receives a round-$r$ message from $p$, it responds with $\betaAck(r)$. When $p$ collects an \betaAck for all the messages it sent plus an \betaOK from all of its children, it sends \betaOK to its parent. When the root has all the \betaAck and \betaOK messages it is expecting, it broadcasts \betaGo. Receiving \betaGo makes $p$ deliver the queued round-$r$ messages. This works because in order for the root to issue \betaGo, every round-$r$ message has to have gotten an acknowledgment, which means that all round-$r$ messages are waiting in the receivers' buffers to be delivered. For the beta synchronizer, message complexity for one round increases slightly from $M$ to $2M+2(n-1)$, but time complexity goes up by a factor proportional to the depth of the tree. \subsection{The gamma synchronizer} The gamma synchronizer combines the alpha and beta synchronizers to try to get low blowups on both time complexity and message complexity. The essential idea is to cover the graph with a spanning forest and run beta within each tree and alpha between trees. Specifically: \newData{\GammaReady}{ready} \newData{\GammaGo}{go} \begin{itemize} \item Every message in the underlying protocol gets $\Ack$ed (including messages that pass between trees). \item When a process has collected all of its outstanding round-$r$ $\Ack$s, it sends \OK up its tree. \item When the root of a tree gets all {\Ack}s and \OK, it sends \GammaReady to the roots of all adjacent trees (and itself). Two trees are adjacent if any of their members are adjacent. \item When the root collects \GammaReady from itself and all adjacent roots, it broadcasts \GammaGo through its own tree. \end{itemize} As in the alpha synchronizer, we can show that no root issues \GammaGo unless it and all its neighbors issue \GammaReady, which happens only after both all nodes in the root's tree and all their neighbors (some of whom might be in adjacent trees) have received acks for all messages. This means that when a node receives \GammaGo it can safely deliver its bucket of messages. Message complexity is comparable to the beta synchronizer assuming there aren't too many adjacent trees: $2M$ messages for sends and acks, plus $O(n)$ messages for in-tree communication, plus $O(E_{\text{roots}})$ messages for root-to-root communication. Time complexity per synchronous round is proportional to the depth of the trees: this includes both the time for in-tree communication, and the time for root-to-root communication, which might need to be routed through leaves. In a particularly nice graph, the gamma synchronizer can give costs comparable to the costs of the original synchronous algorithm. An example in \cite{Lynch1996} is a ring of $k$-cliques, where we build a tree in each clique and get $O(1)$ time blowup and $O(n)$ added messages. This is compared to $O(n/k)$ time blowup for the beta synchronizer and $O(k)$ message blowup (or worse) for the alpha synchronizer. Other graphs may favor tuning the size of the trees in the forest toward the alpha or beta ends of the spectrum, e.g., if the whole graph is a clique (and we didn't worry about contention issues), we might as well just use beta and get $O(1)$ time blowup and $O(n)$ added messages. \section{Applications} See \cite[\S11.3.2]{AttiyaW2004} or \cite[\S16.5]{Lynch1996}. The one we have seen is distributed breadth-first search, where the two asynchronous algorithms we described in Chapter~\ref{chapter-distributed-BFS} were essentially the synchronous algorithms with the beta and alpha synchronizers embedded in them. But what synchronizers give us in general is the ability to forget about problems resulting from asynchrony provided we can assume no failures (which may be a very strong assumption) and are willing to accept a bit of overhead. \section{Limitations of synchronizers} Here we show some lower bounds on synchronizers, justifying our previous claim that failures are trouble and showing that global synchronizers are necessarily slow in a high-diameter network. \subsection{Impossibility with crash failures} These synchronizers all fail badly if some process crashes. In the $α$ synchronizer, the system slowly shuts down as a wave of waiting propagates out from the dead process. In the $β$ synchronizer, the root never gives the green light for the next round. The $\gamma$ synchronizer, true to its hybrid nature, fails in a way that is a hybrid of these two disasters. This is unavoidable in the basic asynchronous model, although we don't have all the results we need to prove this yet. The idea is that if we are in a synchronous system with crash failures, it's possible to solve \concept{agreement}, the problem of getting all the processes to agree on a bit (see Chapter~\ref{chapter-synchronous-agreement}). But it's not possible to solve this problem in an asynchronous system with even one crash failure (see Chapter~\ref{chapter-FLP}). Since a synchronous-with-crash-failure agreement protocol on top of a fault-tolerant synchronizer would give a solution to an unsolvable problem, the element of this stack that we don't know an algorithm for must be the one we can't do. Hence there are no fault-tolerant synchronizers. We'll see more examples of this trick of showing that a particular simulation is impossible because it would allow us to violate impossibility results later, especially when we start looking at the strength of shared-memory objects in Chapter~\ref{chapter-wait-free-hierarchy}. \subsection{Unavoidable slowdown with global synchronization} \label{section-session-problem} The \concept{session problem}~\cite{ArjomandiFL1983} gives a lower bound on the speed of a global synchronizer, or more generally on any protocol that tries to approximate synchrony in a certain sense. Recall that in a global synchronizer, our goal is to produce a simulation that looks synchronous \emph{from the outside}; that is, that looks synchronous to an observer that can see the entire schedule. In contrast, a local synchronizer produces a simulation that looks synchronous \emph{from the inside}—the resulting execution is indistinguishable from a synchronous execution to any of the processes, but an outside observer can see that different processes execute different rounds at different times. The global synchronizer we've seen takes more time than a local synchronizer; the session problem shows that this is necessary. In our description, we will mostly follow \cite[\S6.2.2]{AttiyaW2004}. A solution to the session problem is an asynchronous protocol in which each process repeatedly executes some \concept{special action}. Our goal is to guarantee that these special actions group into $s$ \indexConcept{session}{sessions}, where a session is an interval of time in which every process executes at least one special action. We also want the protocol to terminate: this means that in every execution, every process executes a finite number of special actions. A synchronous system can solve this problem trivially in $s$ rounds: each process executes one special action per round. For an asynchronous system, a lower bound of Attiya and Mavronicolas~\cite{AttiyaM1994} (based on an earlier bound of Arjomandi, Fischer, and Lynch~\cite{ArjomandiFL1983}, who defined the problem in a slightly different communication model), shows that if the diameter of the network is $D$, there is no solution to the $s$-session problem that takes $(s-1)D$ time or less in the worst case. The argument is based on reordering events in any such execution to produce fewer than $s$ sessions, using the happens-before relation described in Chapter~\ref{chapter-logical-clocks}. We now give an outline of the proof that this is expensive. (See \cite[\S6.2.2]{AttiyaW2004} for the real proof.) Fix some algorithm $A$ for solving the $s$-session problem, and suppose that its worst-case time complexity is $(s-1)D$ or less. Consider some synchronous execution of $A$ (that is, one where the adversary scheduler happens to arrange the schedule to be synchronous) that takes $(s-1)D$ rounds or less. Divide this execution into two segments: an initial segment $β$ that includes all rounds with special actions, and a suffix $δ$ that includes any extra rounds where the algorithm is still floundering around. We will mostly ignore $δ$, but we have to leave it in to allow for the possibility that whatever is happening there is important for the algorithm to work (say, to detect termination). We now want to perform a causal shuffle on $β$ that leaves it with only $s-1$ sessions. Because causal shuffles don't affect time complexity, this will give us a new bad execution $β'δ$ that has only $s-1$ sessions despite taking $(s-1)D$ time. The first step is to chop $β$ into at most $s-1$ segments $β_{1},β_{2}, \dots$ of at most $D$ rounds each. Because a message sent in round $i$ is not delivered until round $i+1$, if we have a chain of $k$ messages, each of which triggers the next, then if the first message is sent in round $i$, the last message is not delivered until round $i+k$. If the chain has length $D$, its events (including the initial send and the final delivery) span $D+1$ rounds $i, i+1, \dots, i+D$. In this case the initial send and final delivery are necessarily in different segments $β_i$ and $β_{i+1}$. Now pick processes $p_{0}$ and $p_{1}$ at distance $D$ from each other. Then any chain of messages starting at $p_{0}$ within some segment reaches $p_{1}$ after the end of the segment. It follows that for any events $e_{0}$ of $p_{0}$ and $e_{1}$ of $p_{1}$ in the \emph{same} segment $β_{i}$, $e_{0}\not\happensBefore{βδ}e_{1}$. So there exists a causal shuffle of $β_{i}$ that puts all events of $p_{0}$ after all events of $p_{1}$.\footnote{Proof: Because $e_0\not\happensBefore{βδ}e_1$, we can add $e_1 < e_0$ for all events $e_1$ and $e_0$ in $β_i$ and still have a partial order consistent with $\happensBefore{βδ}$. Now apply topological sort to get the shuffle.} By a symmetrical argument, we can similarly put all events of $p_{1}$ after all events of $p_{0}$. In both cases the resulting schedule is indistinguishable by all processes from the original. So now we apply these shuffles to each of the segments $β_{i}$ in alternating order: $p_{0}$ goes first in the even-numbered segments and $p_{1}$ goes first in the odd-numbered segments, yielding a sequence of shuffled segments $β'_{i}$. This has the effect of putting the $p_{0}$ events together, as in this example with $(s-1) = 4$: \begin{align*} βδ|(p_{0},p_{1}) &= β_{1}β_{2}β_{3}β_{4}δ|(p_{0},p_{1}) \\&= β'_{1}β'_{2}β'_{3}β'_{4}δ|(p_{0},p_{1}) \\&= (p_{1}p_{0}) (p_{0}p_{1}) (p_{1}p_{0}) (p_{0}p_{1}) δ \\&= p_{1} (p_{0}p_{0}) (p_{1}p_{1}) (p_{0}p_{0}) p_{1} δ \end{align*} (here each $p_{0}$, $p_{1}$ stands in for a sequence of events of each process). Now let's count sessions. We can't end a session until we reach a point where both processes have taken at least one step since the end of the last session. If we mark with a slash the earliest places where this can happen, we get a picture like this: \begin{align*} p_{1} p_{0}/p_{0} p_{1}/p_{1} p_{0}/p_{0} p_{1}/p_{1} δ. \end{align*} We have at most $s-1$ sessions! This concludes the proof. \myChapter{Coordinated attack}{2020}{} \label{chapter-coordinated-attack} \label{chapter-two-generals} (See also \cite[\S5.1]{Lynch1996}.) The \concept{Two Generals} problem was the first widely-known distributed consensus problem, described in 1978 by Jim Gray~\cite[§5.8.3.3.1]{Gray1978}, although the same problem previously appeared under a different name~\cite{AkkoyunluEH1975}. The setup of the problem is that we have two generals on opposite sides of an enemy army, who must choose whether to attack the army or retreat. If only one general attacks, his troops will be slaughtered. So the generals need to reach agreement on their strategy. To complicate matters, the generals can only communicate by sending messages by (unreliable) carrier pigeon. We also suppose that at some point each general must make an irrevocable decision to attack or retreat. The interesting property of the problem is that if carrier pigeons can become lost, there is no protocol that guarantees agreement in all cases unless the outcome is predetermined (e.g., the generals always attack no matter what happens). The essential idea of the proof is that any protocol that does guarantee agreement can be shortened by deleting the last message; iterating this process eventually leaves a protocol with no messages. Adding more generals turns this into the \concept{coordinated attack} problem, a variant of \concept{consensus}; but it doesn't make things any easier. \section{Formal description} \label{section-two-generals-formalized} To formalize this intuition, suppose that we have $n ≥ 2$ generals in a synchronous system with unreliable channels—the set of messages received in round $i+1$ is always a subset of the set sent in round $i$, but it may be a proper subset (even the empty set). Each general starts with an input 0 (retreat) or 1 (attack) and must output 0 or 1 after some bounded number of rounds. The requirements for the protocol are that, in all executions: \begin{description} \item[Agreement]\index{agreement} All processes output the same decision (0 or 1). \item[Validity]\index{validity} If all processes have the same input $x$, and no messages are lost, all processes produce output $x$. (If processes start with different inputs or one or more messages are lost, processes can output 0 or 1 as long as they all agree.) \item[Termination]\index{termination} All processes terminate in a bounded number of rounds.\footnote{\indexConcept{bounded}{Bounded} means that there is a fixed upper bound on the length of any execution. We could also demand merely that all processes terminate in a \emph{finite} number of rounds. In general, finite is a weaker requirement than bounded, but if the number of possible outcomes at each step is finite (as they are in this case), they're equivalent. The reason is that if we build a tree of all configurations, each configuration has only finitely many successors, and the length of each path is finite, then \concept{König's lemma} (see \wikipedia{Konig's_lemma}) says that there are only finitely many paths. So we can take the length of the longest of these paths as our fixed bound.~\cite[Lemma 3.1]{BorowskyG1997} } \end{description} Sadly, there is not protocol that satisfies all three conditions. We show this in the next section. \section{Impossibility proof} \label{section-two-generals-impossible} \label{section-indistinguishability-proofs} To show coordinated attack is impossible,\footnote{Without making additional assumptions, always a caveat when discussing impossibility.} we use an \concept{indistinguishability proof}. The basic idea of an indistinguishability proof is this: \begin{itemize} \item Execution $A$ is \concept{indistinguishable} from execution $B$ for some process $p$ if $p$ sees the same things (messages or operation results) in both executions. \item If $A$ is indistinguishable from $B$ for $p$, then because $p$ can't tell which of these two possible worlds it is in, it returns the same output in both. \end{itemize} So far, pretty dull. But now let's consider a chain of hypothetical executions $A = A_{0} A_{1} \dots{} A_{k} = B$, where each $A_{i}$ is indistinguishable from $A_{i+1}$ for some process $p_{i}$. Suppose also that we are trying to solve an agreement task, where every process must output the same value. Then since $p_{i}$ outputs the same value in $A_{i}$ and $A_{i+1}$, every process outputs the same value in $A_{i}$ and $A_{i+1}$. By induction on $k$, every process outputs the same value in $A$ and $B$, even though $A$ and $B$ may be very different executions. This gives us a tool for proving impossibility results for agreement: show that there is a path of indistinguishable executions between two executions that are supposed to produce different output. Another way to picture this: consider a graph whose nodes are all possible executions with an edge between any two indistinguishable executions; then the set of output-0 executions can't be adjacent to the set of output-1 executions. If we prove the graph is connected, we prove the output is the same for all executions. For coordinated attack, we will show that no protocol satisfies all of agreement, validity, and termination using an indistinguishability argument. The key idea is to construct a path between the all-0-input and all-1-input executions with no message loss via intermediate executions that are indistinguishable to at least one process. Let's start with $A = A_{0}$ being an execution in which all inputs are 1 and all messages are delivered. We'll build executions $A_{1}, A_{2},$ etc., by pruning messages. Consider $A_{i}$ and let $m$ be some message that is delivered in the last round in which any message is delivered. Construct $A_{i+1}$ by not delivering $m$. Observe that while $A_{i}$ is distinguishable from $A_{i+1}$ by the recipient of $m$, on the assumption that $n ≥ 2$ there is some other process that can't tell whether $m$ was delivered or not (the recipient can't let that other process know, because no subsequent message it sends are delivered in either execution). Continue until we reach an execution $A_{k}$ in which all inputs are 1 and no messages are sent. Next, let $A_{k+1}$ through $A_{k+n}$ be obtained by changing one input at a time from 1 to 0; each such execution is indistinguishable from its predecessor by any process whose input didn't change. Finally, construct $A_{k+n}$ through $A_{k+n+k'}$ by adding back messages in the reverse process used for $A_0$ through $A_k$; note that this might not result in exactly $k$ new messages, because the number of messages might depend on the inputs. This gets us to an execution $A_{k+n+k'}$ in which all processes have input $0$ and no messages are lost. If agreement holds, then the indistinguishability of adjacent executions to some process means that the common output in $A_{0}$ is the same as in $A_{k+n+k'}$. But validity requires that $A_{0}$ outputs 1 and $A_{k+n+k'}$ outputs 0: so either agreement or validity is violated in some execution. \section{Randomized coordinated attack} \label{section-randomized-coordinated-attack} So we now know that we can't solve the coordinated attack problem. But maybe we want to solve it anyway. The solution is to change the problem. \index{coordinated attack!randomized} \indexConcept{randomized coordinated attack}{Randomized coordinated attack} is like standard coordinated attack, but with less coordination. Specifically, we'll allow the processes to flip coins to decide what to do, and assume that the communication pattern (which messages get delivered in each round) is fixed and independent of the coin-flips. This corresponds to assuming an \index{adversary!oblivious} \concept{oblivious adversary} that can't see what is going on at all or perhaps a \index{adversary!content-oblivious} \concept{content-oblivious adversary} that can only see where messages are being sent but not the contents of the messages. We'll also relax the agreement property to only hold with some high probability: \begin{description} \item[Randomized agreement]\index{agreement!randomized}\index{randomized agreement} For any adversary $A$, the probability that some process decides $0$ and some other process decides $1$ given $A$ is at most $ε$. \end{description} Validity and termination are as before. \subsection{An algorithm} Here's an algorithm that gives $ε = 1/r$. (See \cite[\S5.2.2]{Lynch1996} for details or~\cite{VargheseL1992} for the original version.) A simplifying assumption is that network is complete, although a strongly-connected network with $r$ greater than or equal to the diameter also works. \newData{\RandAttackLevel}{level} \newData{\RandAttackKey}{key} \begin{itemize} \item First part: tracking information levels \begin{itemize} \item Each process tracks its ``information level,'' initially $0$. The state of a process consists of a vector of (input, information-level) pairs for all processes in the system. Initially this is (my-input, 0) for itself and $(⊥, -1)$ for everybody else. \item Every process sends its entire state to every other process in every round. \item Upon receiving a message $m$, process $i$ stores any inputs carried in $m$ and, for each process $j$, sets $\RandAttackLevel_{i}[j]$ to $\max(\RandAttackLevel_{i}[j], \RandAttackLevel_{m}[j])$. It then sets its own information level to $\min_{j}(\RandAttackLevel_{i}[j])+1$. \end{itemize} \item Second part: deciding the output \begin{itemize} \item Process 1 chooses a random key value uniformly in the range $[1,r]$. \item This key is distributed along with $\RandAttackLevel_i[1]$, so that every process with $\RandAttackLevel_i[1] ≥ 0$ knows the key. \item A process decides $1$ at round $r$ if and only if it knows the key, its information level is greater than or equal to the key, and all inputs are 1. \end{itemize} \end{itemize} \subsection{Why it works} \begin{description} \item[Termination] Immediate from the algorithm. \item[Validity] \begin{itemize} \item If all inputs are 0, no process sees all 1 inputs (technically requires an invariant that processes' non-null views are consistent with the inputs, but that's not hard to prove.) \item If all inputs are 1 and no messages are lost, then the information level of each process after $k$ rounds is $k$ (prove by induction) and all processes learn the key and all inputs (immediate from first round). So all processes decide $1$. \end{itemize} \item[Randomized Agreement] \begin{itemize} \item First prove a lemma: Define $\RandAttackLevel_{i}^{t}[k]$ to be the value of $\RandAttackLevel_{i}[k]$ after $t$ rounds. Then for all $i, j, k, t$, (1) $\RandAttackLevel_{i}[j]^{t} ≤ \RandAttackLevel_{j}[j]^{t-1}$ and (2) $\abs*{\RandAttackLevel_{i}[k]^{t} - \RandAttackLevel_{j}[k]^{t} } ≤ 1$. As always, the proof is by induction on rounds. Part (1) is easy and boring so we'll skip it. For part (2), we have: \begin{itemize} \item After $0$ rounds, $\RandAttackLevel_{i}^{0}[k] = \RandAttackLevel_{j}^{0}[k] = -1$ if neither $i$ nor $j$ equals $k$; if one of them is $k$, we have $\RandAttackLevel_{k}^{0}[k] = 0$, which is still close enough. \item After $t$ rounds, consider $\RandAttackLevel_{i}^{t}[k] - \RandAttackLevel_{i}^{t-1}[k]$ and similarly $\RandAttackLevel_{j}^{t}[k] - \RandAttackLevel_{j}^{t-1}[k]$. It's not hard to show that each can jump by at most 1. If both deltas are $+1$ or both are 0, there's no change in the difference in views and we win from the induction hypothesis. So the interesting case is when $\RandAttackLevel_{i}[k]$ stays the same and $\RandAttackLevel_{j}[k]$ increases or vice versa. \item There are two ways for $\RandAttackLevel_{j}[k]$ to increase: \begin{itemize} \item If $j \ne k$, then $j$ received a message from some $j'$ with $\RandAttackLevel_{j'}^{t-1}[k] > \RandAttackLevel_{j}^{t-1}[k]$. From the induction hypothesis, $\RandAttackLevel_{j'}^{t-1}[k] ≤ \RandAttackLevel_{i}^{t-1}[k] + 1 = \RandAttackLevel_{i}^{t}[k]$. So we are happy. \item If $j = k$, then $j$ has $\RandAttackLevel_{j}^{t}[j] = 1 + \min_{k \ne j} \RandAttackLevel_{j}^{t}[k] ≤ 1 + \RandAttackLevel_{j}^{t}[i] ≤ 1 + \RandAttackLevel_{i}^{t}[i]$. Again we are happy. \end{itemize} \end{itemize} \item Note that in the preceding, the key value didn't figure in; so everybody's \RandAttackLevel at round $r$ is independent of the key. \item So now we have that $\RandAttackLevel_{i}^{r}[i]$ is in $\{ \ell, \ell+1 \}$, where $\ell$ is some fixed value uncorrelated with the key. The only way to get some process to decide 1 while others decide 0 is if $\ell+1 ≥ \RandAttackKey$ but $\ell < \RandAttackKey$. (If $\ell = 0$, a process at this level doesn't know $\RandAttackKey$, but it can still reason that $0 < \RandAttackKey$ since $\RandAttackKey$ is in $[1,r]$.) This can only occur if $\RandAttackKey = \ell+1$, which occurs with probability at most $1/r$ since $\RandAttackKey$ was chosen uniformly. \end{itemize} \end{description} \subsection{Almost-matching lower bound} \label{section-randomized-coordinated-attack-lower-bound} The bound on the probability of disagreement in the previous algorithm is almost tight. Varghese and Lynch~\cite{VargheseL1992} show that no synchronous algorithm can get a probability of disagreement less than $\frac{1}{r+1}$, using a stronger validity condition that requires that the processes output $0$ if any input is $0$. This is a natural assumption for database commit, where we don't want to commit if any process wants to abort. We restate their result below: \begin{theorem} \label{theorem-randomized-coordinated-attack-lower-bound} For any synchronous algorithm for randomized coordinated attack that runs in $r$ rounds that satisfies the additional condition that all non-faulty processes decide $0$ if any input is $0$, $\Pr[\text{disagreement}] ≥ 1/(r+1)$. \end{theorem} \begin{proof} Let $ε$ be the bound on the probability of disagreement. Define $\RandAttackLevel_{i}^{t}[k]$ as in the previous algorithm (whatever the real algorithm is doing). We'll show $\Pr[\text{$i$ decides $1$}] ≤ ε \cdot (\RandAttackLevel_{i}^{r}[i] + 1)$, by induction on $\RandAttackLevel_{i}^{r}[i]$. \begin{itemize} \item If $\RandAttackLevel_{i}^{r}[i] = 0$, the real execution is indistinguishable (to $i$) from an execution in which some other process $j$ starts with 0 and receives no messages at all. In that execution, $j$ must decide 0 or risk violating the strong validity assumption. So $i$ decides $1$ with probability at most $ε$ (from the disagreement bound). \item If $\RandAttackLevel_{i}^{r}[i] = k > 0$, the real execution is indistinguishable (to $i$) from an execution in which some other process $j$ only reaches level $k-1$ and thereafter receives no messages. From the induction hypothesis, $\Pr[\text{$j$ decides $1$}] ≤ ε k$ in that pruned execution, and so $\Pr[\text{$i$ decides $1$}] ≤ ε(k+1)$ in the pruned execution. But by indistinguishability, we also have $\Pr[\text{$i$ decides $1$}] ≤ ε(k+1)$ in the original execution. \end{itemize} Now observe that in the all-1 input execution with no messages lost, $\RandAttackLevel_{i}^{r}[i] = r$ and $\Pr[\text{$i$ decides $1$}] = 1$ (by validity). So $1 ≤ ε(r+1)$, which implies $ε ≥ 1/(r+1)$. \end{proof} \myChapter{Synchronous agreement}{2020}{} \label{chapter-synchronous-agreement} \index{synchronous agreement} \index{agreement!synchronous} \index{consensus!synchronous} Here we'll consider synchronous agreement algorithm with stopping failures, where a process stops dead at some point, sending and receiving no further messages. We'll also consider Byzantine failures, where a process deviates from its programming by sending arbitrary messages, but mostly just to see how crash-failure algorithms hold up; for algorithms designed specifically for a Byzantine model, see Chapter~\ref{chapter-Byzantine-agreement}. If the model has communication failures instead, we have the coordinated attack problem from Chapter~\ref{chapter-coordinated-attack}. \section{Problem definition} \label{section-synchronous-agreement-problem} We use the usual synchronous model with $n$ processes with binary inputs and binary outputs. Up to $f$ processes may fail at some point; when a process fails, one or one or more of its outgoing messages are lost in the round of failure and all outgoing messages are lost thereafter. There are two variants on the problem, depending on whether we want a useful algorithm (and so want strong conditions to make our algorithm more useful) or a lower bound (and so want weak conditions to make our lower bound more general). For algorithms, we will ask for these conditions to hold: \begin{description} \item[Agreement] \index{agreement}All non-faulty processes decide the same value. \item[Validity] \index{validity}If all processes start with the same input, all non-faulty processes decide it. \item[Termination] \index{termination}All non-faulty processes eventually decide. \end{description} For lower bounds, we'll replace validity with \concept{non-triviality} (often called validity in the literature): \begin{description} \item[Non-triviality] There exist failure-free executions $A$ and $B$ that produce different outputs. \end{description} Non-triviality follows from validity but doesn't imply validity; for example, a non-trivial algorithm might have the property that if all non-faulty processes start with the same input, they all decide something else. In §\ref{section-synchronous-agreement-flooding}, we'll show that a simple algorithm gives agreement, termination, and validity with $f$ failures using $f+1$ rounds. We'll then show in §\ref{section-synchronous-agreement-lower-bound} that non-triviality, agreement, and termination imply that $f+1$ rounds is the best possible. In Chapter~\ref{chapter-Byzantine-agreement}, we'll show that the agreement is still possible in $f+1$ rounds even if faulty processes can send arbitrary messages instead of just crashing, but only if the number of faulty processes is strictly less than $n/3$. \section{Solution using flooding} \label{section-synchronous-agreement-flooding} The flooding algorithm, due to Dolev and Strong~\cite{DolevS1983} gives a straightforward solution to synchronous agreement for the crash failure case. It runs in $f+1$ rounds assuming $f$ crash failures. (This algorithm is also described in more detail in \cite[\S5.1.3]{AttiyaW2004} or \cite[\S6.2.1]{Lynch1996}.) Each process keeps a set of (process, input) pairs, initially just $\{(\DataSty{myId}, \DataSty{myInput})\}$. At round $r$, I broadcast my set to everybody and take the union of my set and all sets I receive. At round $f+1$, I decide on $f(S)$, where $f$ is some fixed function from sets of process-input pairs to outputs that picks some input in $S$: for example, $f$ might take the input with the smallest process-id attached to it, take the max of all known input values, or take the majority of all known input values. \begin{lemma} \label{lemma-synchronous-agreement-flooding-gives-same-set} After $f+1$ rounds, all non-faulty processes have the same set. \end{lemma} \begin{proof} Let $S_{i}^{r}$ be the set stored by process $i$ after $r$ rounds. What we'll really show is that if there are no failures in round $k$, then $S_{i}^{r} = S_{j}^{r} = S_{i}^{k+1}$ for all $i$, $j$, and $r > k$. To show this, observe that no faults in round $k$ means that all processes that are still alive at the start of round $k$ send their message to all other processes. Let $L$ be the set of live processes in round $k$. At the end of round $k$, for $i$ in $L$ we have $S_{i}^{k+1} = \bigcup_{j\in{}L} S_{j}^{k} = S$. Now we'll consider some round $r = k+1+m$ and show by induction on $m$ that $S_{i}^{k+m} = S$; we already did $m = 0$, so for larger $m$ notice that all messages are equal to $S$ and so $S_{i}^{k+1+m}$ is the union of a whole bunch of $S$'s. So in particular we have $S_{i}^{f+1} = S$ (since some failure-free round occurred in the preceding $f+1$ rounds) and everybody decides the same value $f(S)$. \end{proof} Flooding depends on being able to trust second-hand descriptions of values; it may be that process 1 fails in round 0 so that only process 2 learns its input. If process 2 can suddenly tell 3 (but nobody else) about the input in round $f+1$—or worse, tell a different value to 3 and 4—then we may get disagreement. This remains true even if Byzantine processes can't fake inputs (e.g., because an input value is really a triple $(i, v, \DataSty{signature}(v))$ using an unforgeable digital signature)—the reason is that a Byzantine process could horde some input $(i, v, \DataSty{signature}(v))$ until the very last round and then deliver it to only some of the non-faulty processes. \section{Lower bound on rounds} \label{section-synchronous-agreement-lower-bound} Here we show that synchronous agreement requires at least $f+1$ rounds if $f$ processes can fail. This proof is modeled on the one in \cite[§{}6.7]{Lynch1996} and works backwards from the final state; for a proof of the same result that works in the opposite direction, see \cite[§{}5.1.4]{AttiyaW2004}. The original result (stated for Byzantine failures) is due to Dolev and Strong~\cite{DolevS1983}, based on a more complicated proof due to Fischer and Lynch~\cite{FischerL1982}; see the chapter notes for Chapter 5 of~\cite{AttiyaW2004} for more discussion of the history. Note that unlike the algorithms in the preceding and following sections, which provide validity, the lower bound applies even if we only demand non-triviality. Like the similar proof for coordinated attack (§\ref{section-two-generals-impossible}), the proof uses an \index{indistinguishability}indistinguishability argument. But we have to construct a more complicated chain of intermediate executions. A \index{failure!crash}\concept{crash failure} at process $i$ means that (a) in some round $r$, some or all of the messages sent by $i$ are not delivered, and (b) in subsequent rounds, no messages sent by $i$ are delivered. The intuition is that $i$ keels over dead in the middle of generating its outgoing messages for a round. Otherwise $i$ behaves perfectly correctly. A process that crashes at some point during an execution is called \concept{faulty} We will show that if up to $f$ processes can crash, and there are at least $f+2$ processes,\footnote{With only $f+1$ processes, we can solve agreement in $f$ rounds using flooding. The idea is that either (a) at most $f-1$ processes crash, in which case the flooding algorithm guarantees agreement; or (b) exactly $f$ processes crash, in which case the one remaining non-faulty process agrees with itself. So $f+2$ processes are needed for the lower bound to work, and we should be suspicious of any lower bound proof that does not use this assumption.} then at least $f+1$ rounds are needed (in some execution) for any algorithm that satisfies agreement, termination, and non-triviality. In particular, we will show that if all executions run in $f$ or fewer rounds, then the indistinguishability graph is connected; this implies non-triviality doesn't hold, because (as in §\ref{section-two-generals-impossible}), two adjacent states must decide the same value because of the agreement property.\footnote{The same argument works with even a weaker version of non-triviality that omits the requirement that $A$ and $B$ are failure-free, but we'll keep things simple.} Now for the proof. To simplify the argument, let's assume that all executions terminate in exactly $f$ rounds (we can always have processes send pointless chitchat to pad out short executions) and that every processes sends a message to every other process in every round where it has not crashed (more pointless chitchat). Formally, this means we have a sequence of rounds $0, 1, 2, \dots{}, f-1$ where each process sends a message to every other process (assuming no crashes), and a final round $f$ where all processes decide on a value (without sending any additional messages). We now want to take any two executions $A$ and $B$ and show that both produce the same output. To do this, we'll transform $A$'s inputs into $B$'s inputs one process at a time, crashing processes to hide the changes. The problem is that just crashing the process whose input changed might change the decision value—so we have to crash later witnesses carefully to maintain indistinguishability all the way across the chain. Let's say that a process $p$ \concept{crashes fully} in round $r$ if it crashes in round $r$ and no round-$r$ messages from $p$ are delivered. The \concept{communication pattern} of an execution describes which messages are delivered between processes without considering their contents—in particular, it tells us which processes crash and what other processes they manage to talk to in the round in which they crash. With these definitions, we can state and prove a rather complicated induction hypothesis: \begin{lemma} \label{lemma-synchronous-agreement-lower-bound} For any $f$-round protocol with $n≥f+2$ processes permitting up to $f$ crash failures; any process $p$; and any execution $A$ in which at most one process crashes per round in rounds $0\dots r-1$, $p$ crashes fully in round $r+1$, and no other processes crash; there is a sequence of executions $A = A_{0} A_{1} \dots{} A_{k}$ such that each $A_{i}$ is indistinguishable from $A_{i+1}$ by some process, each $A_{i}$ has at most one crash per round, and the communication pattern in $A_{k}$ is identical to $A$ except that $p$ crashes fully in round $r$. \end{lemma} \begin{proof} By induction on $f-r$. If $r = f$, we just crash $p$ in round $r$ and nobody else notices. For $r < f$, first crash $p$ in round $r$ instead of $r+1$, but deliver all of its round-$r$ messages anyway (this is needed to make space for some other process to crash in round $r+1$). Then choose some message $m$ sent by $p$ in round $r$, and let $p'$ be the recipient of $m$. We will show that we can produce a chain of indistinguishable executions between any execution in which $m$ is delivered and the corresponding execution in which it is not. If $r=f-1$, this is easy; only $p'$ knows whether $m$ has been delivered, and since $n ≥ f+2$, there exists another non-faulty $p''$ that can't distinguish between these two executions, since $p'$ sends no messages in round $f$ or later. If $r < f-1$, we have to make sure $p'$ doesn't tell anybody about the missing message. By the induction hypothesis, there is a sequence of executions starting with $A$ and ending with $p'$ crashing fully in round $r+1$, such that each execution is indistinguishable from its predecessor. Now construct the sequence \begin{align*} A &\rightarrow{} (\text{$A$ with $p'$ crashing fully in $r+1$}) \\& \rightarrow{} (\text{$A$ with $p'$ crashing fully in $r+1$ and $m$ lost}) \\& \rightarrow{} (\text{$A$ with $m$ lost and $p'$ not crashing}). \end{align*} The first and last step apply the induction hypothesis; the middle one yields indistinguishable executions since only $p'$ can tell the difference between $m$ arriving or not and its lips are sealed. We've shown that we can remove one message through a sequence of executions where each pair of adjacent executions is indistinguishable to some process. Now paste together $n-1$ such sequences (one per message) to prove the lemma. \end{proof} The rest of the proof: Crash some process fully in round 0 and then change its input. Repeat until all inputs are changed. \section{Variants} So far we have described \index{consensus!binary}\concept{binary consensus}, since all inputs are $0$ or $1$. We can also allow larger input sets. With crash failures, this allows a stronger validity condition: the output must be equal to some non-faulty process's input. It's not hard to see that Dolev-Strong (§\ref{section-synchronous-agreement-flooding}) gives this stronger condition. \myChapter{Byzantine agreement}{2020}{} \label{chapter-Byzantine-agreement} \index{agreement!Byzantine}\index{Byzantine agreement} Like synchronous agreement (as in Chapter~\ref{chapter-synchronous-agreement}) except that we replace crash failures with \index{failure!Byzantine}\indexConcept{Byzantine failure}{Byzantine failures}, where a faulty process can ignore its programming and send any messages it likes. Since we are operating under a universal quantifier, this includes the case where the Byzantine processes appear to be colluding with each other under the control of a centralized adversary. \section{Lower bounds} \label{section-Byzantine-lower-bounds} We'll start by looking at lower bounds. \subsection{Minimum number of rounds} We've already seen an $f+1$ lower bound on rounds for crash failures (see §\ref{section-synchronous-agreement-lower-bound}). This lower bound applies \emph{a fortiori} to Byzantine failures, since Byzantine failures can simulate crash failures. \subsection{Minimum number of processes} \label{section-Byzantine-minimum-processes} We can also show that we need $n > 3f$ processes. For $n = 3$ and $f = 1$ the intuition is that Byzantine $B$ can play non-faulty $A$ and $C$ off against each other, telling $A$ that $C$ is Byzantine and $C$ that $A$ is Byzantine. Since $A$ is telling $C$ the same thing about $B$ that $B$ is saying about $A$, $C$ can't tell the difference and doesn't know who to believe. Unfortunately, this tragic soap opera is not a real proof, since we haven't actually shown that $B$ can say exactly the right thing to keep $A$ and $C$ from guessing that $B$ is evil. The real proof:\footnote{The presentation here is based on \cite[\S5.2.3]{AttiyaW2004}. The original impossibility result is due to Pease, Shostak, and Lamport~\cite{PeaseSL1980}. This particular proof is due to Fischer, Lynch, and Merritt~\cite{FischerLM1986}.} Consider an artificial execution where (non-Byzantine) $A$, $B$, and $C$ are duplicated and then placed in a ring $A_{0} B_{0} C_{0} A_{1} B_{1} C_{1}$, where the digits indicate inputs. We'll still keep the same code for $n=3$ on $A_{0}$, $B_{0}$, etc., but when $A_{0}$ tries to send a message to what it thinks of as just $C$ we'll send it to $C_{1}$ while messages from $B_{0}$ will instead go to $C_{0}$. For any adjacent pair of processes (e.g. $A_{0}$ and $B_{0}$), the behavior of the rest of the ring could be simulated by a single Byzantine process (e.g. $C$), so each process in the 6-process ring behaves just as it does in some 3-process execution with 1 Byzantine process. It follows that all of the processes terminate and decide in the unholy 6-process \index{Frankenexecution}Frankenexecution\footnote{Not a real word.} the same value that they would in the corresponding 3-process Byzantine execution. So what do they decide? \begin{figure} \centering \begin{tikzpicture}[auto,node distance=4cm] \node (3) { \begin{tikzpicture} \node (A) at (150:1) {$A_0$}; \node (B) at (30:1) {$B_0$}; \node[color=red] (C) at (270:1) {$\evil{C}$}; \path (A) edge (B) (B) edge (C) (C) edge (A) ; \end{tikzpicture} }; \node (6) [right of=3] { \begin{tikzpicture} \node (A0) at (120:1) {$A_0$}; \node (B0) at (60:1) {$B_0$}; \node (C0) [color=red] at (0:1) {$C_0$}; \node (A1) [color=red] at (300:1) {$A_1$}; \node (B1) [color=red] at (240:1) {$B_1$}; \node (C1) [color=red] at (180:1) {$C_1$}; \path (A0) edge (B0) (B0) edge (C0) (C0) edge [color=red] (A1) (A1) edge [color=red] (B1) (B1) edge [color=red] (C1) (C1) edge (A0) ; \end{tikzpicture} }; \end{tikzpicture} \caption[Synthetic execution for Byzantine agreement lower bound]{Three-process vs.~six-process execution in Byzantine agreement lower bound. Processes $A_0$ and $B_0$ in right-hand execution receive same messages as in left-hand three-process execution with Byzantine $\evil{C}$ simulation $C_0$ through $C_1$. So validity forces them to decide $0$. A similar argument using Byzantine $\evil{A}$ shows the same for $C_0$.} \label{fig-Byzantine-agreement-six-processes} \end{figure} Given two processes with the same input, say, $A_{0}$ and $B_{0}$, the giant execution is indistinguishable from an $A_{0} B_{0} \evil{C}$ execution where $\evil{C}$ is Byzantine (see Figure~\ref{fig-Byzantine-agreement-six-processes}. Validity says $A_{0}$ and $B_{0}$ must both decide 0. Since this works for any pair of processes with the same input, we have each process deciding its input. But now consider the execution of $C_{0} A_{1} \evil{B}$, where $\evil{B}$ is Byzantine. In the big execution, we just proved that $C_{0}$ decides 0 and $A_{1}$ decides 1, but since the $C_{0} A_{1} B$ execution is indistinguishable from the big execution to $C_{0}$ and $A_{1}$, they do the same thing here and violate agreement. This shows that with $n=3$ and $f=1$, we can't win. We can generalize this to $n = 3f$. Suppose that there were an algorithm that solved Byzantine agreement with $n=3f$ processes. Group the processes into groups of size $f$, and let each of the $n=3$ processes simulate one group, with everybody in the group getting the same input, which can only make things easier. Then we get a protocol for $n=3$ and $f=1$, an impossibility. \subsection{Minimum connectivity} \label{section-Byzantine-minimum-connectivity} So far, we've been assuming a complete communication graph. If the graph is not complete, we may not be able to tolerate as many failures. In particular, we need the connectivity of the graph (minimum number of nodes that must be removed to split it into two components) to be at least $2f+1$. See \cite[\S6.5]{Lynch1996} for the full proof. The essential idea is that if we have an arbitrary graph with a vertex cut of size $k < 2f+1$, we can simulate it on a 4-process graph where $A$ is connected to $B$ and $C$ (but not $D$), $B$ and $C$ are connected to each other, and $D$ is connected only to $B$ and $C$. Here $B$ and $C$ each simulate half the processes in the size-$k$ cut, $A$ simulates all the processes on one side of the cut and $D$ all the processes on the other side. We then construct an 8-process artificial execution with two non-faulty copies of each of $A$, $B$, $C$, and $D$ and argue that if one of $B$ or $C$ can be Byzantine then the 8-process execution is indistinguishable to the remaining processes from a normal 4-process execution. (See Figure~\ref{fig-Byzantine-agreement-six-processes}.) \begin{figure} \centering \begin{tikzpicture}[auto,node distance=4cm] \node (4) { \begin{tikzpicture}[auto,node distance=1.5cm] \node (A) {$A_0$}; \node (B) [above right of=A] {$B_0$}; \node (C) [color=red,below right of=A] {$\evil{C}$}; \node (D) [below right of=B] {$D_0$}; \path (A) edge (B) edge (C) (B) edge (C) edge (D) (C) edge (D) ; \end{tikzpicture} }; \node (8) [right of=4] { \begin{tikzpicture}[auto,node distance=1.5cm] \node (A0) {$A_0$}; \node (B0) [above right of=A0] {$B_0$}; \node (D0) [below right of=B0] {$D_0$}; \node (C0) [color=red,below left of=D0] {$C_0$}; \node (A1) [color=red,below right of=C0] {$A_1$}; \node (B1) [color=red,below of=C0] {$B_1$}; \node (C1) [color=red,below of=A0] {$C_1$}; \node (D1) [color=red,below of=C1] {$D_1$}; \path (A0) edge (B0) edge (C1) (B0) edge (C0) edge (D0) (C0) edge (D0) edge [color=red] (A1) (A1) edge [color=red] (B1) (B1) edge [color=red] (C1) edge [color=red] (D1) (C1) edge [color=red] (D1) ; \end{tikzpicture} }; \end{tikzpicture} \caption[Synthetic execution for Byzantine agreement connectivity]{Four-process vs.~eight-process execution in Byzantine agreement connectivity lower bound. Because Byzantine $\evil{C}$ can simulate $C_0,D_1,B_1,A_1,$ and $C_1$, good processes $A_0$, $B_0$ and $D_0$ must all decide $0$ or risk violating validity.} \label{fig-Byzantine-agreement-connectivity} \end{figure} An argument similar to the $n > 3f$ proof then shows we violate one of validity or agreement: if we replacing $C_0$, $C_1$, and all the nodes on one side of the $C_0+C_1$ cut with a single Byzantine $\evil{C}$, we force the remaining non-faulty nodes to decide their inputs or violate validity. But then doing the same thing with $B_0$ and $B_1$ yields an execution that violates agreement. Conversely, if we have connectivity $2f+1$, then the processes can simulate a general graph by sending each other messages along $2f+1$ predetermined vertex-disjoint paths and taking the majority value as the correct message. Since the $f$ Byzantine processes can only corrupt one path each (assuming the non-faulty processes are careful about who they forward messages from), we get at least $f+1$ good copies overwhelming the $f$ bad copies. This reduces the problem on a general graph with sufficiently high connectivity to the problem on a complete graph, allowing Byzantine agreement to be solved if the other lower bounds are met. \subsection{Weak Byzantine agreement} (Here we are following \cite[\S6.6]{Lynch1996}. The original result is due to Lamport~\cite{Lamport1983}.) \index{Byzantine agreement!weak}\indexConcept{weak Byzantine agreement}{Weak Byzantine agreement} is like regular Byzantine agreement, but validity is only required to hold if there are no faulty processes at all. If there is a single faulty process, the non-faulty processes can output any value regardless of their inputs (as long as they agree on it). Sadly, this weakening doesn't improve things much: even weak Byzantine agreement can be solved only if $n ≥ 3f+1$. Proof: As in the strong Byzantine agreement case, we'll construct a many-process Frankenexecution to figure out a strategy for a single Byzantine process in a 3-process execution. The difference is that now the number of processes in our synthetic execution is much larger, since we want to build an execution where at least some of our test subjects think they are in a non-Byzantine environment. The trick is to build a very big, highly-symmetric ring so that at least some of the processes are so far away from the few points of asymmetry that might clue them in to their odd condition that the protocol terminates before they notice. Fix some protocol that allegedly solves weak Byzantine agreement, and let $r$ be the number of rounds for the protocol. Construct a ring of $6r$ processes $A_{01} B_{01} C_{01} A_{02} B_{02} C_{02} \dots{} A_{0r} B_{0r} C_{0r} A_{10} B_{10} C_{10} \dots{} A_{1r} B_{1r} C_{1r}$, where each $X_{ij}$ runs the code for process $X$ in the 3-process protocol with input $i$. For each adjacent pair of processes, there is a 3-process Byzantine execution which is indistinguishable from the $6r$-process execution for that pair: since agreement holds in all Byzantine executions, each adjacent pair decides the same value in the big execution and so either everybody decides $0$ or everybody decides $1$ in the big execution. Now we'll show that means that validity is violated in some no-failures 3-process execution. We'll extract this execution by looking at the execution of processes $A_{0,r/2} B_{0,r/2} C_{0,r/2}$. The argument is that up to round $r$, any input-0 process that is at least $r$ steps in the ring away from the nearest 1-input process acts like the corresponding process in the all-0 no-failures 3-process execution. Since $A_{0,r/2}$ is $3r/2 > r$ hops away from $A_{1r}$ and similarly for $C_{0,r/2}$, our 3 stooges all decide 0 by validity. But now repeat the same argument for $A_{1,r/2} B_{1,r/2} C_{1,r/2}$ and get 3 new stooges that all decide 1. This means that somewhere in between we have two adjacent processes where one decides 0 and one decides 1, violating agreement in the corresponding 3-process execution where the rest of the ring is replaced by a single Byzantine process. This concludes the proof. This result is a little surprising: we might expect that weak Byzantine agreement could be solved by allowing a process to return a default value if it notices anything that might hint at a fault somewhere. But this would allow a Byzantine process to create disagreement revealing its bad behavior to just one other process in the very last round of an execution otherwise headed for agreement on the non-default value. The chosen victim decides the default value, but since it's the last round, nobody else finds out. Even if the algorithm is doing something more sophisticated, examining the $6r$-process execution will tell the Byzantine process exactly when and how to start acting badly. \section{Upper bounds} \label{section-Byzantine-upper-bounds} \label{section-Byzantine-algorithms} Here we describe two upper bounds for Byzantine agreement, one of which gets an optimal number of rounds at the cost of many large messages, and the other of which gets smaller messages at the cost of more rounds. (We are following §\S5.2.4--5.2.5 of \cite{AttiyaW2004} in choosing these algorithms.) Neither of these algorithms is state-of-the-art, but they demonstrate some of the issues in solving Byzantine agreement without the sometimes-complicated optimizations needed to get all the parameters of the algorithm down simultaneously. \subsection{Exponential information gathering gets \texorpdfstring{$n = 3f+1$}{n = 3f+1}} \label{section-Byzantine-exponential-information-gathering} \newData{\EIGval}{val} \newData{\EIGpath}{path} \newData{\EIGvalue}{value} \newData{\EIGround}{round} The idea of \concept{exponential information gathering} is that each process will do a lot of gossiping, but now its state is no longer just a flat set of inputs, but a tree describing who it heard what from. We build this tree out of pairs of the form $(\EIGpath, \Input)$ where $\EIGpath$ is a sequence of intermediaries with no repetitions and $\Input$ is some input. A process's state at each round is just a set of such pairs. At the end of $f+1$ rounds of communication (necessary because of the lower bound for crash failures), each non-faulty process attempts to untangle the complex web of hearsay and second-hand lies to compute the same decision value as the other processes. This technique was used by Pease, Shostak, and Lamport~\cite{PeaseSL1980} to show that their impossibility result is tight: there exists an algorithm for Byzantine agreement that runs in $f+1$ synchronous rounds and guarantees agreement and validity as long as $n ≥ 3f+1$. \begin{algorithm} $S ← \Set{ \Tuple{\Tuple{}, \Input} }$\; \For{$\EIGround ← 0 \dots f$}{ Send $\SetWhere{ \Tuple{xi,v} }{ \Tuple{x,v}∈S ∧ \card{x} = \EIGround ∧ i ∉ x}$ to all processes\; \UponReceiving{$S'$ from $j$}{ \tcp{Filter out obviously bogus tuples} \If{$∀ \Tuple{xj',v} ∈ S': \card{x} = \EIGround ∧ j'=j$}{ $S ← S ∪ S'$\; } } } \tcp{Compute decision value} \Foreach{path $w$ of length $f+1$ with no repeats}{ \eIf{$\Tuple{w,v} ∈ S$ for some $v$}{ Let $\EIGval'(w,i) = v$\; }{ Let $\EIGval'(w,i) = 0$\; } } \Foreach{path $w$ of length $f$ or less with no repeats}{ Let $\EIGval'(w,i) = \maj_{j∉w} \EIGval(wj,i)$\; } Decide $\EIGval'(\Tuple{},i)$\; \caption[Exponential information gathering]{Exponential information gathering. Code for process $i$.} \label{alg-exponential-information-gathering} \end{algorithm} The algorithm is given in Algorithm~\ref{alg-exponential-information-gathering}. The communication phase is just gossiping, where each process starts with its only its input and forwards any values it hears about along with their provenance to all of the other processes. At the end of this phase, each process has a set of pairs of the form $(\EIGpath, \EIGvalue)$ where \EIGpath spans all sequences of 0 to $f+1$ distinct ids and \EIGvalue is the input value forwarded along that path. We write $\EIGval(w,i)$ for the value stored in $i$'s list at the end of the protocol that is associated with path $w$. Because we can't trust these $\EIGval(w,i)$ values to be an accurate description of any process's input if there is a Byzantine process in $w$, each process computes for itself replacement values $\EIGval'(w,i)$ that use majority voting to try to get a more trustworthy picture of the original inputs. Formally, we think of the set of paths as a tree where $w$ is the parent of $wj$ for each path $w$ and each id $j$ not in $w$. To apply EIG in the Byzantine model, ill-formed messages received from $j$ are treated as missing messages, but otherwise the data-collecting part of EIG proceeds as in the crash failure model. However, we compute the decision value from the last-round values recursively as follows. First replace any missing pair involving a path $w$ with $\card*{w} = f+1$ with $(w, 0)$. Then for each path $w$, define $\EIGval'(w, i)$ to be the majority value among $\EIGval'(wj, i)$ for all $j$, or $\EIGval(w, i)$ if $\card*{w} = f+1$. Finally, have process $i$ decide $\EIGval'(\Tuple{}, i)$, which it can compute locally from its own stored values $\EIGval(w, i)$. Each $\EIGval'$ is a reconstruction of older values from later ones. As we move up the tree from $wj$ to $w$ we are moving backwards in time, until in the end we get the decision value $\EIGval'(\langle\rangle, i)$ as a majority of reconstructed inputs $\EIGval'(j, i)$. One way to think about this is that I don't trust $j$ to give me the right value for $wj$—even when $w = \langle\rangle$ and $j$ is claiming to report its own input—so instead I take a majority of values of $wj$ that $j$ allegedly reported to other people. But since I don't trust those other people either, I use the same process recursively to construct those reports. \subsubsection{Proof of correctness} This is just a sketch of the proof from \cite[§{}6.3.2]{Lynch1996}; essentially the same argument appears in \cite[§{}5.2.4]{AttiyaW2004}. We start with a basic observation that good processes send and record values correctly: \begin{lemma} \label{lemma-EIG-trivial} If $i$, $j$, and $k$ are all non-faulty then for all $w$, $\EIGval(wk, i) = \EIGval(wk, j) = \EIGval(w, k)$. \end{lemma} \begin{proof} Trivial: $k$ announces the same value $\EIGval(w, k)$ to both $i$ and $j$. \end{proof} More involved is this lemma, which says that when we reconstruct a value for a trustworthy process at some level, we get the same value that it sent us. In particular this will be used to show that the reconstructed inputs $\EIGval'(j,i)$ are all equal to the real inputs for good processes. \begin{lemma} \label{lemma-EIG-common} If $j$ is non-faulty then $\EIGval'(wj, i) = \EIGval(w, j)$ for all non-faulty $i$ and all $w$. \end{lemma} \begin{proof} By induction on $f+1-\card*{wj}$. If $\card*{wj} = f+1$, then $\EIGval'(wj, i) = \EIGval(wj, i) = \EIGval(w, j)$. If $\card*{wj} < f+1$, then $\EIGval(wj, k) = \EIGval(w, j)$ for all non-faulty $k$. It follows that $\EIGval(wjk, i) = \EIGval(w, j)$ for all non-faulty $i$ and $k$ (that do not appear in $w$). The bad guys report at most $f$ bad values $\EIGval(wj, k')$, but the good guys report at least $n-f-\card*{wj}$ good values $\EIGval(wj, k)$. Since $n ≥ 3f + 1$ and $\card*{wj} ≤ f$, we have $n - f - \card*{wj} ≥ 3f+1 - f - f ≥ f+1$ good values, which are a majority. \end{proof} We call a node $w$ \index{node!common}\indexConcept{common node}{common} if $\EIGval'(w, i) = \EIGval'(w, j)$ for all non-faulty $i, j$. Lemma~\ref{lemma-EIG-common} implies that $wk$ is common if $k$ is non-faulty. We can also show that any node whose children are all common is also common, whether or not the last process in its label is faulty. \begin{lemma} \label{lemma-EIG-common-children} Let $wk$ be common for all $k$. Then $w$ is common. \end{lemma} \begin{proof} Recall that, for $\card*{w} < f+1$, $\EIGval'(w,i)$ is the majority value among all $\EIGval'(wk,i)$. If all $wk$ are common, then $\EIGval'(wk,i) = \EIGval'(wk,j)$ for all non-faulty $i$ and $j$, so $i$ and $j$ compute the same majority values and get $\EIGval'(w,i) = \EIGval'(w,j)$. \end{proof} We can now prove the full result. \begin{theorem} \label{theorem-Byzantine-EIG} Exponential information gathering using $f+1$ rounds in a synchronous Byzantine system with at most $f$ faulty processes satisfies validity and agreement, provided $n ≥ 3f+1$. \end{theorem} \begin{proof} Validity: Immediate application of Lemmas~\ref{lemma-EIG-trivial} and~\ref{lemma-EIG-common} when $w = \langle \rangle$. We have $\EIGval'(j, i) = \EIGval(j, i) = \EIGval(\langle \rangle, j)$ for all non-faulty $j$ and $i$, which means that a majority of the $\EIGval'(j, i)$ values equal the common input and thus so does $\EIGval'(\langle \rangle, i)$. Agreement: Observe that every path has a common node on it, since a path travels through $f+1$ nodes and one of them is good. If we then suppose that the root is not common: by Lemma~\ref{lemma-EIG-common-children}, it must have a not-common child, that node must have a not-common child, etc. But this constructs a path from the root to a leaf with no not-common nodes, which we just proved can't happen. \end{proof} \subsection{Phase king gets constant-size messages} \label{section-Byzantine-phase-king} The following algorithm, based on work of Berman, Garay, and Perry~\cite{BermanGP1989}, achieves Byzantine agreement in $2(f+1)$ rounds using constant-size messages, provided $n ≥ 4f+1$. The description here is drawn from \cite[\S5.2.5]{AttiyaW2004}. The original Berman-Garay-Perry paper gives somewhat better bounds, but the algorithm and its analysis are more complicated. \subsubsection{The algorithm} The basic idea of the algorithm is that we avoid the recursive majority voting of EIG by running a vote in each of $f+1$ \emph{phases} through a \concept{phase king}, some process chosen in advance to run the phase. Since the number of phases exceeds the number of faults, we eventually get a non-faulty phase king. The algorithm is structured so that one non-faulty phase king is enough to generate agreement and subsequent faulty phase kings can't undo the agreement. \newData{\PKpref}{pref} \newData{\PKmajority}{majority} \newData{\PKmultiplicity}{multiplicity} \newData{\PKkingMajority}{kingMajority} Pseudocode appears in Algorithm~\ref{alg-phase-king}. Each processes $i$ maintains an array $\PKpref_{i}[j]$, where $j$ ranges over all process ids. There are also utility values \PKmajority, \PKkingMajority and \PKmultiplicity for each process that are used to keep track of what it hears from the other processes. Initially, $\PKpref_{i}[i]$ is just $i$'s input and $\PKpref_{i}[j] = 0$ for $j \ne i$. \begin{algorithm} $\PKpref_{i}[i] = \DataSty{input}$\; \lFor{$j \ne i$}{$\PKpref_{i}[j] = 0$} \For{$k ← 1$ \KwTo $f+1$}{ \tcp{First round of phase $k$} send $\PKpref_{i}[i]$ to all processes (including myself) \; $\PKpref_{i}[j] ← v_{j}$, where $v_{j}$ is the value received from process $j$ \; $\PKmajority ←$ majority value in $\PKpref_{i}$ \; $\PKmultiplicity ←$ number of times $\PKmajority$ appears in $\PKpref_{i}$ \; \tcp{Second round of phase $k$} \If{$i=k$}{ \tcp{I am the phase king} send $\PKmajority$ to all processes \; } \eIf{received $m$ from phase king}{ $\PKkingMajority \gets m$\; }{ $\PKkingMajority \gets 0$\; } \eIf{$\PKmultiplicity > n/2 + f$}{ $\PKpref_{i}[i] = \PKmajority$\; }{ $\PKpref_{i}[i] = \PKkingMajority$\; } } \Return $\PKpref_{i}[i]$ \caption{Byzantine agreement: phase king} \label{alg-phase-king} \end{algorithm} The idea of the algorithm is that in each phase, everybody announces their current preference (initially the inputs). If the majority of these preferences is large enough (e.g., all inputs are the same), everybody adopts the majority preference. Otherwise everybody adopts the preference of the phase king. The majority rule means that once the processes agree, they continue to agree despite bad phase kings. The phase king rule allows a good phase king to end disagreement. By choosing a different king in each phase, after $f+1$ phases, some king must be good. This intuitive description is justified below. \subsubsection{Proof of correctness} Termination is immediate from the algorithm. For validity, suppose all inputs are $v$. We'll show that all non-faulty $i$ have $\PKpref_{i}[i] = v$ after every phase. In the first round of each phase, process $i$ receives at least $n-f$ messages containing $v$; since $n ≥ 4f + 1$, we have $n-f ≥ 3f+1$ and $n/2 + f ≤ (4f+1)/2 + f = 3f+1/2$, and thus these $n-f$ messages exceed the $n/2+f$ threshold for adopting them as the new preference. So all non-faulty processes ignore the phase king and stick with $v$, eventually deciding $v$ after round $2(f+1)$. For agreement, we'll ignore all phases up to the first phase with a non-faulty phase king. Let $k$ be the first such phase, and assume that the \PKpref values are set arbitrarily at the start of this phase. We want to argue that at the end of the phase, all non-faulty processes have the same preference. There are two ways that a process can set its new preference in the second round of the phase: \begin{enumerate} \item The process $i$ observes a majority of more than $n/2+f$ identical values $v$ and ignores the phase king. Of these values, more than $n/2$ of them were sent by non-faulty processes. So the phase king also receives these values (even if the faulty processes change their stories) and chooses $v$ as its majority value. Similarly, if any other process $j$ observes a majority of $n/2+f$ identical values, the two $>n/2$ non-faulty parts of the majorities overlap, and so $j$ also chooses $v$. \item The process $i$ takes its value from the phase king. We've already shown that $i$ then agrees with any $j$ that sees a big majority; but since the phase king is non-faulty, process $i$ will agree with any process $j$ that also takes its new preference from the phase king. \end{enumerate} This shows that after any phase with a non-faulty king, all processes agree. The proof that the non-faulty processes continue to agree is the same as for validity. \subsubsection{Performance of phase king} It's not hard to see that this algorithm sends exactly $(f+1)(n^2+n)$ messages of $1$ bit each (assuming $1$-bit inputs). The cost is doubling the minimum number of rounds and reducing the tolerance for Byzantine processes. As mentioned earlier, a variant of phase-king with 3-round phases gets optimal fault-tolerance with $3(f+1)$ rounds (but 2-bit messages). Still better is a rather complicated descendant of the EIG algorithm due to Garay and Moses~\cite{GarayM1998}, which gets $f+1$ rounds with $n ≥ 3f+1$ while still having polynomial message traffic. \myChapter{Impossibility of asynchronous agreement}{2020}{} \label{chapter-FLP} There's an easy argument that says that you can't do most things in an asynchronous message-passing system with $n/2$ crash failures: partition the processes into two subsets $S$ and $T$ of size $n/2$ each, and allow no messages between the two sides of the partition for some long period of time. Since the processes in each side can't distinguish between the other side being slow and being dead, eventually each has to take action on their own. For many problems, we can show that this leads to a bad configuration. For example, for agreement, we can supply each side of the partition with a different common input value, forcing disagreement because of validity. We can then satisfy the fairness condition that says all messages are eventually delivered by delivering the delayed messages across the partition, but it's too late for the protocol. The Fischer-Lynch-Paterson (FLP) result~\cite{FischerLP1985} says something much stronger: you can't do agreement in an asynchronous message-passing system if even \emph{one} crash failure is allowed.\footnote{Unless you augment the basic model in some way, say by adding randomization (Chapter~\ref{chapter-randomized-consensus}) or failure detectors (Chapter~\ref{chapter-failure-detectors}).} After its initial publication, it was quickly generalized to other models including asynchronous shared memory~\cite{LouiA1987}, and indeed the presentation of the result in~\cite[\S12.2]{Lynch1996} is given for shared-memory first, with the original result appearing in \cite[\S17.2.3]{Lynch1996} as a corollary of the ability of message passing to simulate shared memory. In these notes, I'll present the original result; the dependence on the model is surprisingly limited, and so most of the proof is the same for both shared memory (even strong versions of shared memory that support operations like atomic snapshots\footnote{Chapter~\ref{chapter-atomic-snapshots}.}) and message passing. Section 5.3 of \cite{AttiyaW2004} gives a very different version of the proof, where it is shown first for two processes in shared memory, then generalized to $n$ processes in shared memory by adapting the classic Borowsky-Gafni simulation~\cite{BorowskyG1993} to show that two processes with one failure can simulate $n$ processes with one failure. This is worth looking at (it's an excellent example of the power of simulation arguments, and BG simulation is useful in many other contexts) but we will stick with the original argument, which is simpler. We will look at this again when we consider BG simulation in Chapter~\ref{chapter-BG-simulation}. \section{Agreement} Usual rules: \concept{agreement} (all non-faulty processes decide the same value), \concept{termination} (all non-faulty processes eventually decide some value), \concept{validity} (for each possible decision value, there an execution in which that value is chosen). Validity can be tinkered with without affecting the proof much. To keep things simple, we assume the only two decision values are 0 and 1. \section{Failures} A failure is an internal action after which all send operations are disabled. The adversary is allowed one failure per execution. Effectively, this means that any group of $n-1$ processes must eventually decide without waiting for the $n$-th, because it might have failed. \section{Steps} The FLP paper uses a notion of \emph{steps} that is slightly different from the send and receive actions of the asynchronous message-passing model we've been using. Essentially a step consists of receiving zero or more messages followed by doing a finite number of sends. To fit it into the model we've been using, we'll define a step as either a pair $(p,m)$, where $p$ receives message $m$ and performs zero or more sends in response, or $(p,⊥)$, where $p$ receives nothing and performs zero or more sends. We assume that the processes are deterministic, so the messages sent (if any) are determined by $p$'s previous state and the message received. Note that these steps do not correspond precisely to delivery and send events or even pairs of delivery and send events, because what message gets sent in response to a particular delivery may change as the result of delivering some other message; but this won't affect the proof. The fairness condition essentially says that if $(p,m)$ or $(p,⊥)$ is continuously enabled it eventually happens. Since messages are not lost, once $(p,m)$ is enabled in some configuration $C$, it is enabled in all successor configurations until it occurs; similarly $(p,⊥)$ is always enabled. So to ensure fairness, we have to ensure that any non-faulty process eventually performs any enabled step. Comment on notation: I like writing the new configuration reached by applying a step $e$ to $C$ like this: $Ce$. The FLP paper uses $e(C)$. \section{Bivalence and univalence} The core of the FLP argument is a strategy allowing the adversary (who controls scheduling) to steer the execution away from any configuration in which the processes reach agreement. The guidepost for this strategy is the notion of \concept{bivalence}, where a configuration $C$ is \concept{bivalent} if there exist traces $T_{0}$ and $T_{1}$ starting from $C$ that lead to configurations $CT_{0}$ and $CT_{1}$ where all processes decide 0 and 1 respectively. A configuration that is not bivalent is \concept{univalent}, or more specifically \concept{0-valent} or \concept{1-valent} depending on whether all executions starting in the configuration produce 0 or 1 as the decision value. (Note that bivalence or univalence are the only possibilities because of termination.) The important fact we will use about univalent configurations is that any successor to an $x$-valent configuration is also $x$-valent. It's clear that any configuration where some process has decided is not bivalent, so if the adversary can keep the protocol in a bivalent configuration forever, it can prevent the processes from ever deciding. The adversary's strategy is to start in an initial bivalent configuration $C_{0}$ (which we must prove exists) and then choose only bivalent successor configurations (which we must prove is possible). A complication is that if the adversary is only allowed one failure, it must eventually allow any message in transit to a non-faulty process to be received and any non-faulty process to send its outgoing messages, so we have to show that the policy of avoiding univalent configurations doesn't cause problems here. \section{Existence of an initial bivalent configuration} We can specify an initial configuration by specifying the inputs to all processes. If one of these initial configurations is bivalent, we are done. Otherwise, let $C$ and $C'$ be two initial configurations that differ only in the input of one process $p$; by assumption, both $C$ and $C'$ are univalent. Consider two executions starting with $C$ and $C'$ in which process $p$ is faulty; we can arrange for these executions to be indistinguishable to all the other processes, so both decide the same value $x$. It follows that both $C$ and $C'$ are $x$-valent. But since any two initial configurations can be connected by some chain of such indistinguishable configurations, we have that all initial configurations are $x$-valent, which violations validity. \section{Staying in a bivalent configuration} Now start in a failure-free bivalent configuration $C$ with some step $e = (p,m)$ or $e = (p,⊥)$ enabled in $C$. Let $S$ be the set of configurations reachable from $C$ without doing $e$ or failing any processes, and let $e(S)$ be the set of configurations of the form $C'e$ where $C'$ is in $S$. (Note that $e$ is always enabled in $S$, since once enabled the only way to get rid of it is to deliver the message.) We want to show that $e(S)$ contains a failure-free bivalent configuration. The proof is by contradiction: suppose that $C'e$ is univalent for all $C'$ in $S$. We will show first that there are $C_{0}$ and $C_{1}$ in $S$ such that each $C_{i}e$ is $i$-valent. To do so, consider any pair of $i$-valent $A_{i}$ reachable from $C$; if $A_{i}$ is in $S$, let $C_{i} = A_{i}$. If $A_{i}$ is not in $S$, let $C_{i}$ be the last configuration before executing $e$ on the path from $C$ to $A_{i}$ ($C_{i}e$ is univalent in this case by assumption). So now we have $C_{0}e$ and $C_{1}e$ with $C_{i}e$ $i$-valent in each case. We'll now go hunting for some configuration $D$ in $S$ and step $e'$ such that $De$ is 0-valent but $De'e$ is 1-valent (or vice versa); such a pair exists because $S$ is connected and so some step $e'$ crosses the boundary between the $C'e =$ 0-valent and the $C'e =$ 1-valent regions. By a case analysis on $e$ and $e'$ we derive a contradiction: \begin{enumerate} \item Suppose $e$ and $e'$ are steps of different processes $p$ and $p'$. Let both steps go through in either order. Then $Dee' = De'e$, since in an asynchronous system we can't tell which process received its message first. But $De$ is 0-valent, which implies $Dee'$ is also 0-valent, which contradicts $De'e$ being 1-valent. \item Now suppose $e$ and $e'$ are steps of the same process $p$. Again we let both go through in either order. It is not the case now that $Dee' = De'e$, since $p$ knows which step happened first (and may have sent messages telling the other processes). But now we consider some finite sequence of steps $e_{1}e_{2}\dots{}e_{k}$ in which no message sent by $p$ is delivered and some process decides in $Dee_{1}\dots{}e_{k}$ (this occurs since the other processes can't distinguish $Dee'$ from the configuration in which $p$ died in $D$, and so have to decide without waiting for messages from $p)$. This execution fragment is indistinguishable to all processes except $p$ from $De'ee_{1}\dots{}e_{k}$, so the deciding process decides the same value $i$ in both executions. But $Dee'$ is $0$-valent and $De'e$ is 1-valent, giving a contradiction. \end{enumerate} It follows that our assumption was false, and there is some reachable bivalent configuration $C'e$. Now to construct a fair execution that never decides, we start with a bivalent configuration, choose the oldest enabled action and use the above to make it happen while staying in a bivalent configuration, and repeat. \section{Generalization to other models} To apply the argument to another model, the main thing is to replace the definition of a step and the resulting case analysis of 0-valent $De'e$ vs 1-valent $Dee'$ to whatever steps are available in the other model. For example, in asynchronous shared memory, if $e$ and $e'$ are operations on different memory locations, they commute (just like steps of different processes), and if they are operations on the same location, either they commute (e.g., two reads) or only one process can tell whether both happened (e.g., with a write and a read, only the reader knows, and with two writes, only the first writer knows). Killing the witness yields two indistinguishable configurations with different valencies, a contradiction. We are omitting a lot of details here. See \cite[§{}12.2]{Lynch1996} for the real proof, or Loui and Abu-Amara~\cite{LouiA1987} for the generalization to shared memory, or Herlihy~\cite{Herlihy1991waitfree} for similar arguments for a wide variety of shared-memory primitives. We will see many of these latter arguments in Chapter~\ref{chapter-wait-free-hierarchy}. \myChapter{Paxos}{2020}{} \label{chapter-Paxos} The \concept{Paxos} algorithm for consensus in a message-passing system was first described by Lamport in 1990 in a tech report that was widely considered to be a joke (see \url{http://research.microsoft.com/users/lamport/pubs/pubs.html#lamport-paxos} for Lamport's description of the history). The algorithm was finally published in 1998~\cite{Lamport1998}, and after the algorithm continued to be ignored, Lamport finally gave up and translated the results into readable English~\cite{Lamport2001}. It is now understood to be one of the most efficient practical algorithms for achieving consensus in a message-passing system with failure detectors, mechanisms that allow processes to give up on other stalled processes after some amount of time (which can't be done in a normal asynchronous system because giving up can be made to happen immediately by the adversary). We will describe the basic Paxos algorithm in §\ref{section-Paxos-algorithm}. This is a one-shot version of Paxos that solves a single agreement problem. The version that is more typically used, called \concept{multi-Paxos}, uses repeated executions of the basic Paxos algorithm to implement a replicated state machine; we'll describe this in §\ref{section-multi-Paxos}. There are many more variants of Paxos in use. The WikiPedia article on Paxos (\wikipedia{Paxos_(computer_science)}) gives a reasonably good survey of subsequent developments and applications. \section{The Paxos algorithm} \label{section-Paxos-algorithm} The algorithm runs in a message-passing model with asynchrony and fewer than $n/2$ crash failures (but not Byzantine failures, at least in the original algorithm). As always, we want to get agreement, validity, and termination. The Paxos algorithm itself is mostly concerned with guaranteeing agreement and validity, while allowing for the possibility of termination if there is a long enough interval in which no process restarts the protocol. A noteworthy feature of Paxos is that it is robust even to omission failures, in the sense that lost messages can prevent termination, but if new messages start being delivered again, the protocol can recover. Processes are classified as \indexConcept{proposer}{proposers}, \indexConcept{accepter}{accepters}, and \indexConcept{learner}{learners} (a single process may have all three roles). The idea is that a proposer attempts to ratify a proposed decision value (from an arbitrary input set) by collecting acceptances from a majority of the accepters, and this ratification is observed by the learners. Agreement is enforced by guaranteeing that only one proposal can get the votes of a majority of accepters, and validity follows from only allowing input values to be proposed. The tricky part is ensuring that we don't get deadlock when there are more than two proposals or when some of the processes fail. The intuition behind how this works is that any proposer can effectively restart the protocol by issuing a new proposal (thus dealing with lockups), and there is a procedure to release accepters from their old votes if we can prove that the old votes were for a value that won't be getting a majority any time soon. To organize this vote-release process, we attach a distinct proposal number to each proposal. The safety properties of the algorithm don't depend on anything but the proposal numbers being distinct, but since higher numbers override lower numbers, to make progress we'll need them to increase over time. The simplest way to do this in practice is to make the proposal number be a timestamp with the proposer's id appended to break ties. We could also have the proposer poll the other processes for the most recent proposal number they've seen and add 1 to it. \newData{\PaxosPrepare}{prepare} \newData{\PaxosAccept}{accept} \newData{\PaxosAccepted}{accepted} The revoting mechanism now works like this: before taking a vote, a proposer tests the waters by sending a $\PaxosPrepare(n)$ message to all accepters, where $n$ is the proposal number. An accepter responds to this with a promise never to accept any proposal with a number less than $n$ (so that old proposals don't suddenly get ratified) together with the highest-numbered proposal that the accepter has accepted (so that the proposer can substitute this value for its own, in case the previous value was in fact ratified). If the proposer receives a response from a majority of the accepters, the proposer then does a second phase of voting where it sends $\PaxosAccept(n, v)$ to all accepters and wins if receives a majority of votes. So for each proposal, the algorithm proceeds as follows: \begin{enumerate} \item The proposer sends a message $\PaxosPrepare(n)$ to all accepters. (Sending to only a majority of the accepters is enough, assuming they will all respond.) \item Each accepter compares $n$ to the highest-numbered proposal for which it has responded to a $\PaxosPrepare$ message and the highest-numbered proposal it has accepted. If $n$ is greater than both, it responds with $\Ack(n, v, n_{v})$, where $v$ is the highest-numbered proposal it has accepted and $n_{v}$ is the number of that proposal (or $⊥$ and $-∞$ if there is no such proposal). An optimization at this point is to allow the accepter to send back $\Nack(n,n')$ where $n'$ is some higher number to let the proposer know that it's doomed and should back off and try again with a higher proposal number. (This keeps a confused proposer who thinks it's the future from locking up the protocol until 2087.) \item The proposer waits (possibly forever) to receive \Ack from a majority of accepters. If any \Ack contained a value, it sets $v$ to the most recent (in proposal number ordering) value that it received. It then sends $\PaxosAccept(n, v)$ to all accepters (or just a majority). You should think of \PaxosAccept as a demand (``Accept!'') rather than acquiescence (``I accept'')—the accepters still need to choose whether to accept or not. \item Upon receiving $\PaxosAccept(n, v)$, an accepter accepts $v$ unless it has already received $\PaxosPrepare(n')$ for some $n' > n$. If a majority of accepters accept the value of a given proposal, that value becomes the decision value of the protocol. \end{enumerate} Implementing these rules require only that each accepter track $n_a$, the highest number of any proposal for which it sent an $\Ack$, and $\Tuple{v,n_v}$, the last proposal that it accepted. Pseudocode showing the behavior of proposer and accepters in the core Paxos protocol is given in Algorithm~\ref{alg-Paxos}. \begin{algorithm} \Procedure{$\FuncSty{Propose}(n,v)$}{ \tcp{Issue proposal number $n$ with value $v$} \tcp{Assumes $n$ is unique} send $\PaxosPrepare(n,v)$ to all accepters\; wait to receive $\Ack(n,v',n_{v'})$ from a majority of accepters\; \If{some $v'$ is not $⊥$}{ $v \gets v'$ with maximum $n_{v'}$\; } send $\PaxosAccept(n,v)$ to all accepters\; } \Procedure{$\FuncSty{accepter}()$}{ \Initially{ $n_a \gets -∞$\; $v \gets ⊥$\; $n_v \gets -∞$\; } \UponReceiving{$\PaxosPrepare(n)$ from $p$}{ \If{$n > \max(n_a,n_v)$}{ \tcp{Respond to proposal} send $\Ack(n,v,n_v)$ to $p$\; $n_a \gets n$\; } } \UponReceiving{$\PaxosAccept(n,v')$}{ \If{$n ≥ \max(n_a,n_v)$}{ \tcp{Accept proposal} send $\PaxosAccepted(n,v')$ to all learners\; \If{$n > n_v$}{ \tcp{Update highest accepted proposal} $\Tuple{v,n_v} \gets \Tuple{v',n}$\; } } } } \caption{Paxos} \label{alg-Paxos} \end{algorithm} Note that acceptance is a purely local phenomenon; additional messages are needed to detect which if any proposals have been accepted by a majority of accepters. Typically this involves a fourth round, where accepters send $\PaxosAccepted(n, v)$ to all learners. There is no requirement that only a single proposal is sent out (indeed, if proposers can fail we will need to send out more to jump-start the protocol). The protocol guarantees agreement and validity no matter how many proposers there are and no matter how often they start. \section{Informal analysis: how information flows between rounds} Call a \concept{round} the collection of all messages labeled with some particular proposal $n$. The structure of the algorithm simulates a sequential execution in which higher-numbered rounds follow lower-numbered ones, even though there is no guarantee that this is actually the case in a real execution. When an accepter sends $\Ack(n, v, n_{v})$, it is telling the round-$n$ proposer the last value preceding round $n$ that it accepted. The rule that an accepter only acknowledges a proposal higher than any proposal it has previously accepted prevents it from sending information ``back in time''—the round $n_{v}$ in an acknowledgment is always less than $n$. The rule that an accepter doesn't accept any proposal earlier than a round it has acknowledged means that the value $v$ in an $\Ack(n, v, n_{v})$ message never goes out of date—there is no possibility that an accepter might retroactively accept some later value in round $n'$ with $n_{v} < n' < n$. So the \Ack message values tell a consistent story about the history of the protocol, even if the rounds execute out of order. The second trick is to use overlapping majorities to make sure that any value that is accepted is not lost. If the only way to decide on a value in round $n$ is to get a majority of accepters to accept it, and the only way to make progress in round $n'$ is to get acknowledgments from a majority of accepters, these two majorities overlap. So in particular the overlapping process reports the round-$n$ proposal value to the proposer in round $n'$, and we can show by induction on $n'$ that this round-$n$ proposal value becomes the proposal value in all subsequent rounds that proceed past the acknowledgment stage. So even though it may not be possible to detect that a decision has been reached in round $n$ (say, because some of the accepters in the accepting majority die without telling anybody what they did), no later round will be able to choose a different value. This ultimately guarantees agreement. \subsection{Example execution} For Paxos to work well, proposal numbers should increase over time. But there is no requirement that proposal numbers are increasing or even that proposals with different proposal numbers don't overlap. When thinking about Paxos, it is easy to make the mistake of ignore cases where proposals are processed concurrently or out of order. In Figure~\ref{fig-Paxos-mixed-up-execution}, we give an example of an execution with three proposals running concurrently. \begin{figure} \begin{displaymath} \begin{array}{cccccc} p_1 &p_2 &p_3 &a_1 &a_2 &a_3 \\ & &\PaxosPrepare(3) & & &\\ &\PaxosPrepare(2) & & & &\\ \PaxosPrepare(1) & & & & &\\ & & & & &\Ack(3,⊥,0)\\ & & &\Ack(1,⊥,0)& &\\ & & &&\Ack(1,⊥,0) &\\ \PaxosAccept(1,1)&&&&&\\ &&&\PaxosAccepted(1,1)&&\\ &&&&&\Nack(1,3)\\ & & &\Ack(2,1,1) & &\\ & & & &\Ack(2,⊥,0) &\\ &\PaxosAccept(2,1)&&&&\\ & & & & &\Nack(2,3)\\ &&&&\PaxosAccepted(2,1)&\\ & && &\Ack(3,1,2) &\\ &&\PaxosAccept(3,1)&&&\\ & & &\PaxosAccepted(3,1)& &\\ && & & & \PaxosAccepted(3,1)\\ \end{array} \end{displaymath} \caption[Example execution of Paxos]{Example execution of Paxos. There are three proposers $p_1, p_2$, and $p_3$ and three accepters $a_1, a_2,$ and $a_3$. Proposer $p_1$'s proposed value $1$ is not accepted by a majority of processes in round $1$, but it is picked up by proposer $p_2$ in round $2$, and is eventually adopted and accepted in round $3$.} \label{fig-Paxos-mixed-up-execution} \end{figure} \subsection{Safety properties} We now present a more formal analysis of the Paxos protocol. We consider only the safety properties of the protocol, corresponding to validity and agreement. Without additional assumptions, Paxos does \emph{not} guarantee termination. Call a value \emph{chosen} if it is accepted by a majority of accepters. The safety properties of Paxos are: \begin{itemize} \item No value is chosen unless it is first proposed. (This gives validity.) \item No two distinct values are both chosen. (This gives agreement.) \end{itemize} The first property is immediate from examination of the algorithm: every value propagated through the algorithm is ultimately a copy of some proposer's original input. We can formalize this observation by checking that, for any set of values $S$, the property that all values contained in messages or processes' internal state are in $S$ is an invariant. For the second property, we'll show by induction on proposal number that a value $v$ chosen with proposal number $n$ is the value chosen by any proposer $p_{n'}$ with proposal number $n'$. There are two things that make this true: \begin{enumerate} \item Any $\Ack(n',v',n_{v'})$ message received by $p_{n'}$ has $n_{v'} < n'$. Proof: Immediate from the code. \item If a majority of accepters accept a proposal with number $n$ at some point during the execution, and $p_{n'}$ receives $\Ack(n',-,-)$ messages from a majority of accepters, then $p_{n'}$ receives at least one $\Ack(n',v',n_{v'})$ message with $n' ≥ n$. Proof: Let $S$ be the set of processes that issue $\PaxosAccepted(n,v)$ and let $T$ be the set of processes that send $\Ack(n',-,-)$ to $p'$. Because $S$ and $T$ are both majorities, there is at least one accepter $a$ in $S∩T$. Suppose $p_{n'}$ receives $\Ack(n,v'',n'')$ from $a$. If $n'' < n$, then at the time $a$ sends its $\Ack(n,v'',n'')$ message, it has not yet accepted a proposal with number $n$. But then when it does receive $\PaxosAccept(n,v)$, it rejects it. This contradicts $a∈S$. \end{enumerate} These two properties together imply that $p_{n'}$ receives at least one $\Ack(n,v'',n'')$ with $n ≤ n'' < n'$ and no such messages with $n'' < n$. So the maximum proposal number it sees is $n''$ where $n ≤ n'' < n$. By the induction hypothesis, the corresponding value is $v$. It follows that $p_{n'}$ also chooses $v$. \subsection{Learning the results} Somebody has to find out that a majority accepted a proposal in order to get a decision value out. The usual way to do this is to have a fourth round of messages where the accepters send $\PaxosAccepted(v, n)$ to some designated learners. These are often the processes that need to implement whatever decision was made by the agreement protocol, but in principle could be any processes that care about the outcome. \subsection{Liveness properties} We'd like the protocol to terminate eventually. Suppose there is a single proposer, and that it survives long enough to collect a majority of \Ack{}s and to send out \PaxosAccept{}s to a majority of the accepters. If everybody else cooperates, we get termination in 4 message delays, including the time for the learners to detect acceptance. If there are multiple proposers, then they can step on each other. For example, it's enough to have two carefully-synchronized proposers alternate sending out \PaxosPrepare messages to prevent any accepter from every accepting (since an accepter promises not to accept $\PaxosAccept(n, v)$ once it has responded to $\PaxosPrepare(n+1)$). The solution is to ensure that there is eventually some interval during which there is exactly one proposer who doesn't fail. One way to do this is to use exponential random backoff (as popularized by Ethernet): when a proposer decides it's not going to win a round (e.g., by receiving a \Nack or by waiting long enough to realize it won't be getting any more acks soon), it picks some increasingly large random delay before starting a new round. Unless something strange is going on, new rounds will eventually start far enough apart in time that one will get done without interference. A more abstract solution is to assume some sort of weak leader election mechanism, which tells each accepter who the ``legitimate'' proposer is at each time. The accepters then discard messages from illegitimate proposers, which prevents conflict at the cost of possibly preventing progress. Progress is however obtained if the mechanism eventually reaches a state where a majority of the accepters bow to the same non-faulty proposer long enough for the proposal to go through. Such a weak leader election method is an example of a more general class of mechanisms known as \indexConcept{failure detector}{failure detectors}, in which each process gets hints about what other processes are faulty that eventually converge to reality. The weak-leader-election failure detector needed for Paxos is called the $\Omega$ failure detector. There are other still weaker failure detectors that can also be used to solve consensus. We will discuss failure detectors in detail in Chapter~\ref{chapter-failure-detectors}. \section{Replicated state machines and multi-Paxos} \label{section-multi-Paxos} \label{section-replicated-state-machines} The most common practical use of Paxos is to implement a \concept{replicated state machine}~\cite{Lamport1978}. The idea is to maintain many copies of some data structure, each on a separate machine, and guarantee that each copy (or \concept{replica}) stays in sync with all the others as new operations are applied to them. This requires some mechanism to ensure that all the different replicas apply the same sequence of operations, or in other words that the machines that hold the replicas solve a sequence of agreement problems to agree on these operations. The payoff is that the state of the data structure survives the failure of some of the machines, without having to copy the entire structure every time it changes. Making all copies consistent requires solving a new version of agreement every time we want to add another operation. Paxos works well for this because we can have to proposer simply issue a new proposal without taking into account any lower-numbered values, assuming that it has verified that lower-numbered values have in fact been accepted. The round-number mechanism means that all of the accepters will switch to working on the new proposal without any modifications to their code. Typically for this application, we'll have a single active proposer that is responsible for serializing any incoming operations to the replicated state machine. If the proposer doesn't change very often, a further optimization allows skipping the \PaxosPrepare and \Ack messages in between agreement protocols for consecutive operations. This reduces the time to certify each operation to a single round-trip for the \PaxosAccept and \PaxosAccepted messages, which is about the best we can reasonably hope for. One detail is that to make this work, we need to distinguish between consecutive proposals by the same proposer, and ``new'' proposals that change the proposer in addition to reaching agreement on some value. This is done by splitting the proposal number into a major and minor number, with proposals ordered lexicographically. A proposer that wins $\Tuple{x,0}$ is allowed to make further proposals numbered $\Tuple{x,1}, \Tuple{x,2},$ etc. But a different proposer will need to increment $x$. Lamport calls this optimization Paxos in~\cite{Lamport2001}; other authors have called it \concept{multi-Paxos} to distinguish it from the basic Paxos algorithm. \myChapter{Failure detectors}{2020}{} \label{chapter-failure-detectors} \index{detector!failure}\indexConcept{failure detector}{Failure detectors} were proposed by Chandra and Toueg~\cite{ChandraT1996} as a mechanism for solving consensus in an asynchronous message-passing system with crash failures by distinguishing between slow processes and dead processes. The basic idea is that each process has attached to it a failure detector module that continuously outputs an estimate of which processes in the system have failed. The output need not be correct; indeed, the main contribution of Chandra and Toueg's paper (and a companion paper by Chandra, Hadzilacos, and Toueg~\cite{ChandraHT1996}) is characterizing just how bogus the output of a failure detector can be and still be useful. We will mostly follow Chandra and Toueg in these notes; see the paper for the full technical details. To emphasize that the output of a failure detector is merely a hint at the actual state of the world, a failure detector (or the process it's attached to) is said to \concept{suspect} a process at time $t$ if it outputs \DataSty{failed} at that time. Failure detectors can then be classified based on when their suspicions are correct. We use the usual asynchronous message-passing model, and in particular assume that non-faulty processes execute infinitely often, get all their messages delivered, etc. From time to time we will need to talk about time, and unless we are clearly talking about real time this just means any steadily increasing count (e.g., of total events), and will be used only to describe the ordering of events. \section{How to build a failure detector} Failure detectors are only interesting if you can actually build them. In a fully asynchronous system, you can't (this follows from the FLP result and the existence of failure-detector-based consensus protocols). But with timeouts, it's not hard: have each process ping each other process from time to time, and suspect the other process if it doesn't respond to the ping within twice the maximum round-trip time for any previous ping. Assuming that ping packets are never lost and there is an (unknown) upper bound on message delay, this gives what is known as an \index{failure detector!eventually perfect}\concept{eventually perfect failure detector}: once the max round-trip times rise enough and enough time has elapsed for the live processes to give up on the dead ones, all and only dead processes are suspected. \section{Classification of failure detectors} Chandra and Toueg define eight classes of failure detectors, based on when they suspect faulty processes and non-faulty processes. Suspicion of faulty processes comes under the heading of \concept{completeness}; of non-faulty processes, \concept{accuracy}. \subsection{Degrees of completeness} \begin{description} \item[Strong completeness] Every faulty process is eventually permanently suspected by every non-faulty process. \item[Weak completeness] Every faulty process is eventually permanently suspected by some non-faulty process. \end{description} There are two temporal logic operators embedded in these statements: ``eventually permanently'' means that there is some time $t_{0}$ such that for all times $t ≥ t_{0}$, the process is suspected. Note that completeness says nothing about suspecting non-faulty processes: a paranoid failure detector that permanently suspects everybody has strong completeness. \subsection{Degrees of accuracy} These describe what happens with non-faulty processes, and with faulty processes that haven't crashed yet. \begin{description} \item[Strong accuracy] No process is suspected (by anybody) before it crashes. \item[Weak accuracy] Some non-faulty process is never suspected. \item[Eventual strong accuracy] After some initial period of confusion, no process is suspected before it crashes. This can be simplified to say that no non-faulty process is suspected after some time, since we can take end of the initial period of chaos as the time at which the last crash occurs. \item[Eventual weak accuracy] After some initial period of confusion, some non-faulty process is never suspected. \end{description} Note that ``strong'' and ``weak'' mean different things for accuracy vs completeness: for accuracy, we are quantifying over suspects, and for completeness, we are quantifying over suspectors. Even a weakly-accurate failure detector guarantees that all processes trust the one visibly good process. \subsection{Boosting completeness} \label{section-failure-detector-boosting-completeness} It turns out that any weakly-complete failure detector can be boosted to give strong completeness. Recall that the difference between weak completeness and strong completeness is that with weak completeness, somebody suspects a dead process, while with strong completeness, everybody suspects it. So to boost completeness we need to spread the suspicion around a bit. On the other hand, we don't want to break accuracy in the process, so there needs to be some way to undo a premature rumor of somebody's death. The simplest way to do this is to let the alleged corpse speak for itself: I will suspect you from the moment somebody else reports you dead until the moment you tell me otherwise. Pseudocode is given in Algorithm~\ref{alg-boosting-completeness}. \begin{algorithm} \newData{\BCsuspects}{suspects} \Initially{ $\BCsuspects ← \emptyset$\; } \While{\True}{ Let $S$ be the set of all processes my weak detector suspects.\; Send $S$ to all processes.\; } \UponReceiving{$S$ from $q$}{ $\BCsuspects ← (\BCsuspects ∪ p) ∖ \Set{q}$\; } \caption{Boosting completeness} \label{alg-boosting-completeness} \end{algorithm} It's not hard to see that this boosts completeness: if $p$ crashes, somebody's weak detector eventually suspects it, this process tells everybody else, and $p$ never contradicts it. So eventually everybody suspects $p$. What is slightly trickier is showing that it preserves accuracy. The essential idea is this: if there is some good-guy process $p$ that everybody trusts forever (as in weak accuracy), then nobody ever reports $p$ as suspect—this also covers strong accuracy since the only difference is that now every non-faulty process falls into this category. For eventual weak accuracy, wait for everybody to stop suspecting $p$, wait for every message ratting out $p$ to be delivered, and then wait for $p$ to send a message to everybody. Now everybody trusts $p$, and nobody every suspects $p$ again. Eventual strong accuracy is again similar. This will justify ignoring the weakly-complete classes. \subsection{Failure detector classes} Two degrees of completeness times four degrees of accuracy gives eight classes of failure detectors, each of which gets its own name. But since we can boost weak completeness to strong completeness, we can use this as an excuse to consider only the strongly-complete classes. \begin{description} \item[$P$ (perfect)]\index{failure detector!perfect} \index{perfect failure detector} Strongly complete and strongly accurate: non-faulty processes are never suspected; faulty processes are eventually suspected by everybody. Easily achieved in synchronous systems. \item[$S$ (strong)] \index{failure detector!strong} \index{strong failure detector} Strongly complete and weakly accurate. The name is misleading if we've already forgotten about weak completeness, but the corresponding $W$ (weak) class is only weakly complete and weakly accurate, so it's the strong completeness that the $S$ is referring to. \item[$◇P$ (eventually perfect)] \index{failure detector!eventually perfect} \index{eventually perfect failure detector} Strongly complete and eventually strongly accurate. \item[$◇S$ (eventually strong)] \index{failure detector!eventually strong} \index{eventually strong failure detector} Strongly complete and eventually weakly accurate. \end{description} Jumping to the punch line: $P$ can simulate any of the others, $S$ and $◇P$ can both simulate $◇S$ but can't simulate $P$ or each other, and $◇S$ can't simulate any of the others (See Figure~\ref{fig-failure-detectors}—we'll prove all of this later.) Thus $◇S$ is the weakest class of failure detectors in this list. However, $◇S$ \emph{is} strong enough to solve consensus, and in fact any failure detector (whatever its properties) that can solve consensus is strong enough to simulate $◇S$ (this is the result in the Chandra-Hadzilacos-Toueg paper~\cite{ChandraHT1996})—this makes $◇S$ the ``weakest failure detector for solving consensus'' as advertised. Continuing our tour through Chandra and Toueg~\cite{ChandraT1996}, we'll show the simulation results and that $◇S$ can solve consensus, but we'll skip the rather involved proof of $◇S$'s special role from Chandra-Hadzilacos-Toueg. \begin{figure} \centering \begin{tikzpicture}[auto,node distance=2cm] \node (P) {P}; \node (S) [below left of=P] {$S$}; \node (dP) [below right of=P] {$◇P$}; \node (dS) [below right of=S] {$◇S$}; \path (P) edge (S) edge (dP) (S) edge (dS) (dP) edge (dS) ; \end{tikzpicture} \caption[Failure detector classes]{Partial order of failure detector classes. Higher classes can simulate lower classes but not vice versa.} \label{fig-failure-detectors} \end{figure} \section{Consensus with \texorpdfstring{$S$}{S}} \label{section-consensus-with-strong} With the strong failure detector $S$, we can solve consensus for any number of failures. In this model, the failure detectors as applied to most processes are completely useless. However, there is some non-faulty process $c$ that nobody every suspects, and this is enough to solve consensus with as many as $n-1$ failures. The basic idea of the protocol: There are three phases. In the first phase, the processes gossip about input values for $n-1$ asynchronous rounds. In the second, they exchange all the values they've seen and prune out any that are not universally known. In the third, each process decides on the lowest-id input that hasn't been pruned (minimum input also works since at this point everybody has the same view of the inputs). \begin{algorithm} $V_p \gets \Set{\Tuple{p,v_p}}$\; $δ_p \gets \Set{\Tuple{p,v_p}}$\; \tcp{Phase 1} \For{$i \gets 1$ \KwTo $n-1$}{ Send $\Tuple{i, δ_p}$ to all processes.\; Wait to receive $\Tuple{i, δ_q}$ from all $q$ I do not suspect.\; $δ_p \gets \left(\bigcup_{q} δ_q\right) ∖ V_p$\; $V_p \gets \left(\bigcup_{q} δ_q\right) ∪ V_p$\; } \tcp{Phase 2} Send $\Tuple{n, V_p}$ to all processes.\; Wait to receive $\Tuple{n, V_q}$ from all $q$ I do not suspect.\; $V_p \gets \left(\bigcap_{q} V_q\right) ∩ V_p$\; \tcp{Phase 3} \Return some input from $V_p$ chosen via a consistent rule.\; \caption{Consensus with a strong failure detector} \label{alg-strong-failure-detector-consensus} \end{algorithm} Pseudocode is given in Algorithm~\ref{alg-strong-failure-detector-consensus} In Phase 1, each process $p$ maintains two partial functions $V_{p}$ and $δ_{p}$, where $V_{p}$ lists all the input values $\Tuple{q,v_{q}}$ that $p$ has ever seen and $δ_{p}$ lists only those input values seen in the most recent of $n-1$ asynchronous rounds. Both $V_{p}$ and $δ_{p}$ are initialized to $\Set{\Tuple{p,v_{p}}}$. In round $i$, $p$ sends $(i,δ_{p})$ to all processes. It then collects $\Tuple{i,δ_{q}}$ from each $q$ that it doesn't suspect and sets $δ_{p}$ to $\bigcup_{q} δ_{q} ∖ V_{p}$ (where $q$ ranges over the processes from which $p$ received a message in round $i$) and sets $V_{p}$ to $V_{p} \cup δ_{p}$. In the next round, it repeats the process. Note that each pair $\Tuple{q,v_{q}}$ is only sent by a particular process $p$ the first round after $p$ learns it: so any value that is still kicking around in round $n-1$ had to go through $n-1$ processes. In Phase 2, each process $p$ sends $\Tuple{n,V_{p}}$, waits to receive $\Tuple{n,V_{q}}$ from every process it does not suspect, and sets $V_{p}$ to the intersection of $V_{p}$ and all received $V_{q}$. At the end of this phase all $V_{p}$ values will in fact be equal, as we will show. In Phase 3, everybody picks some input from their $V_{p}$ vector according to a consistent rule. \subsection{Proof of correctness} Let $c$ be a non-faulty process that nobody every suspects. The first observation is that the protocol satisfies validity, since every $V_{p}$ contains $v_{c}$ after round 1 and each $V_{p}$ can only contain input values by examination of the protocol. Whatever it may do to the other values, taking intersections in Phase 2 still leaves $v_{c}$, so all processes pick some input value from a nonempty list in Phase 3. To get termination we have to prove that nobody ever waits forever for a message it wants; this basically comes down to showing that the first non-faulty process that gets stuck eventually is informed by the $S$-detector that the process it is waiting for is dead. For agreement, we must show that in Phase 3, every $V_{p}$ is equal; in particular, we'll show that every $V_{p} = V_{c}$. First it is necessary to show that at the end of Phase 1, $V_{c} \subseteq V_{p}$ for all $p$. This is done by considering two cases: \begin{enumerate} \item If $\Tuple{q,v_{q}} \in V_{c}$ and $c$ learns $\Tuple{q,v_{q}}$ before round $n-1,$ then $c$ sends $\Tuple{q,v_{q}}$ to $p$ no later than round $n-1$, $p$ waits for it (since nobody ever suspects $c$), and adds it to $V_{p}$. \item If $\Tuple{q,v_{q}} \in V_{c}$ and $c$ learns $\Tuple{q,v_{q}}$ only in round $n-1,$ then $\Tuple{q,v_{q}}$ was previously sent through $n-1$ other processes, i.e., all of them. Each process $p \ne c$ thus added $\Tuple{q,v_{q}}$ to $V_{p}$ before sending it and again $\Tuple{q,v_{q}}$ is in $V_{p}$. \end{enumerate} (The missing case where $\Tuple{q,v_{q}}$ isn't in $V_{c}$ we don't care about.) But now Phase 2 knocks out any extra elements in $V_{p}$, since $V_{p}$ gets set to $V_{p}\cap V_{c}\cap (\text{some other $V_{q}$'s that are supersets of $V_{c}$)}$. It follows that, at the end of Phase 2, $V_{p} = V_{c}$ for all $p$. Finally, in Phase 3, everybody applies the same selection rule to these identical sets and we get agreement. \section{Consensus with \texorpdfstring{$◇S$}{<>S} and \texorpdfstring{$f < n/2$}{f < n/2}} \label{section-consensus-eventually-strong} \label{section-Chandra-Toueg} The consensus protocol for $S$ depends on some process $c$ never being suspected; if $c$ is suspected during the entire (finite) execution of the protocol—as can happen with $◇S$—then it is possible that no process will wait to hear from $c$ (or anybody else) and the processes will all decide their own inputs. So to solve consensus with $◇S$ we will need to assume fewer than $n/2$ failures, allowing any process to wait to hear from a majority no matter what lies its failure detector is telling it. The resulting protocol, known as the \index{consensus!Chandra-Toeug}\concept{Chandra-Toueg consensus protocol}, is structurally similar to the consensus protocol in Paxos.\footnote{See Chapter~\ref{chapter-Paxos}.} The difference is that instead of proposers blindly showing up, the protocol is divided into rounds with a rotating \concept{coordinator} $p_{i}$ in each round $r$ with $r = i \pmod{n}$. The termination proof is based on showing that in any round where the coordinator is not faulty and nobody suspects it, the protocol finishes. The consensus protocol uses as a subroutine a protocol for \index{broadcast!reliable} \concept{reliable broadcast}, which guarantees that any message that is sent is either received by no non-faulty processes or exactly once by all non-faulty processes. Pseudocode for reliable broadcast is given as Algorithm~\ref{alg-reliable-broadcast}. It's easy to see that if a process $p$ is non-faulty and receives $m$, then the fact that $p$ is non-faulty means that is successfully sends $m$ to everybody else, and that the other non-faulty processes also receive the message at least once and deliver it. \newFunc{\CTbroadcast}{broadcast} \begin{algorithm} \caption{Reliable broadcast} \label{alg-reliable-broadcast} \Procedure{$\CTbroadcast(m)$}{ send $m$ to all processes.\; } \UponReceiving{$m$}{ \If{I haven't seen $m$ before}{ send $m$ to all processes\; deliver $m$ to myself\; } } \end{algorithm} Here's a sketch of the actual consensus protocol: \begin{itemize} \item Each process keeps track of a preference (initially its own input) and a timestamp, the round number in which it last updated its preference. \item The processes go through a sequence of asynchronous rounds, each divided into four phases: \begin{enumerate} \item All processes send (round, preference, timestamp) to the coordinator for the round. \item The coordinator waits to hear from a majority of the processes (possibly including itself). The coordinator sets its own preference to some preference with the largest timestamp of those it receives and sends (round, preference) to all processes. \item Each process waits for the new proposal from the coordinator \emph{or} for the failure detector to suspect the coordinator. If it receives a new preference, it adopts it as its own, sets timestamp to the current round, and sends (round, ack) to the coordinator. Otherwise, it sends (round, nack) to the coordinator. \item The coordinator waits to receive ack or nack from a majority of processes. If it receives ack from a majority, it announces the current preference as the protocol decision value using reliable broadcast. \end{enumerate} \item Any process that receives a value in a reliable broadcast decides on it immediately. \end{itemize} Pseudocode is in Algorithm~\ref{alg-Chandra-Toueg}. \begin{algorithm} \newData{\CTpreference}{preference} \newData{\CTtimestamp}{timestamp} \newData{\CTround}{round} $\CTpreference \gets \Input$\; $\CTtimestamp \gets 0$\; \For{$\CTround \gets 1 \dots \infty$}{ Send $\Tuple{\CTround, \CTpreference, \CTtimestamp}$ to coordinator\; \If{I am the coordinator}{ Wait to receive $\Tuple{\CTround, \CTpreference, \CTtimestamp}$ from majority of processes.\; Set $\CTpreference$ to value with largest $\CTtimestamp$.\; Send $\Tuple{\CTround, \CTpreference}$ to all processes.\; } Wait to receive $\Tuple{\CTround, \CTpreference'}$ from coordinator or to suspect coordinator.\; \eIf{I received $\Tuple{\CTround, \CTpreference'}$} { $\CTpreference \gets \CTpreference'$\; $\CTtimestamp \gets \CTround$\; Send $\Ack(\CTround)$ to coordinator.\; }{ Send $\Nack(\CTround)$ to coordinator.\; } \If{I am the coordinator}{ Wait to receive $\Ack(\CTround)$ or $\Nack(\CTround)$ from a majority of processes.\; \If{I received no $\Nack(\CTround)$ messages}{ Broadcast $\CTpreference$ using reliable broadcast.\; } } } \label{alg-Chandra-Toueg} \end{algorithm} \subsection{Proof of correctness} For validity, observe that the decision value is an estimate and all estimates start out as inputs. For termination, observe that no process gets stuck in Phase 1, 2, or 4, because either it isn't waiting or it is waiting for a majority of non-faulty processes who all sent messages unless they have already decided (this is why we need the nacks in Phase 3). The loophole here is that processes that decide stop participating in the protocol; but because any non-faulty process retransmits the decision value in the reliable broadcast, if a process is waiting for a response from a non-faulty process that already terminated, eventually it will get the reliable broadcast instead and terminate itself. In Phase 3, a process might get stuck waiting for a dead coordinator, but the strong completeness of $◇S$ means that it suspects the dead coordinator eventually and escapes. So at worst we do finitely many rounds. Now suppose that after some time $t$ there is a process $c$ that is never suspected by any process. Then in the next round in which $c$ is the coordinator, in Phase 3 all surviving processes wait for $c$ and respond with ack, $c$ decides on the current estimate, and triggers the reliable broadcast protocol to ensure everybody else decides on the same value. Since reliable broadcast guarantees that everybody receives the message, everybody decides this value \emph{or some value previously broadcast}—but in either case everybody decides. Agreement is the tricky part. It's possible that two coordinators both initiate a reliable broadcast and some processes choose the value from the first and some the value from the second. But in this case the first coordinator collected acks from a majority of processes in some round $r$, and all subsequent coordinators collected estimates from an overlapping majority of processes in some round $r' > r$. By applying the same induction argument as for Paxos, we get that all subsequent coordinators choose the same estimate as the first coordinator, and so we get agreement. \section{\texorpdfstring{$f < n/2$}{f < n/2} is still required even with \texorpdfstring{$◇P$}{<>P}} \label{section-failure-detector-eventually-perfect-requires-majority} We can show that with a majority of failures, we're in trouble with just $◇P$ (and thus with $◇S$, which is trivially simulated by $◇P$). The reason is that $◇P$ can lie to us for some long initial interval of the protocol, and consensus is required to terminate eventually despite these lies. So the usual partition argument works: start half of the processes with input 0, half with 1, and run both halves independently with $◇P$ suspecting the other half until the processes in both halves decide on their common inputs. We can now make $◇P$ happy by letting it stop suspecting the processes, but it's too late. \section{Relationships among the classes} \label{section-failure-detector-relationships} It's easy to see that $P$ simulates $S$ and $◇P$ simulates $◇S$ without modification. It's also immediate that $P$ simulates $◇P$ and $S$ simulates $◇S$ (make ``eventually'' be ``now''), which gives a diamond-shaped lattice structure between the classes. What is trickier is to show that this structure doesn't collapse: $◇P$ can't simulate $S$, $S$ can't simulate $◇P$, and $◇S$ can't simulate any of the other classes. First let's observe that $◇P$ can't simulate $S$: if it could, we would get a consensus protocol for $f ≥ n/2$ failures, which we can't do. It follows that $◇P$ also can't simulate $P$ (because $P$ can simulate $S$). To show that $S$ can't simulate $◇P$, choose some non-faulty victim process $v$ and consider an execution in which $S$ periodically suspects $v$ (which it is allowed to do as long as there is some other non-faulty process it never suspects). If the $◇P$-simulator ever responds to this by refusing to suspect $v$, there is an execution in which $v$ really is dead, and the simulator violates strong completeness. But if not, we violate eventual strong accuracy. Note that this also implies $S$ can't simulate $P$, since $P$ can simulate $◇P$. It also shows that $◇S$ can't simulate either of $◇P$ or $P$. We are left with showing $◇S$ can't simulate $S$. Consider a system where $p$'s $◇S$ detector suspects $q$ but not $r$ from the start of the execution, and similarly $r$'s $◇S$ detector also suspects $q$ but not $p$. Run $p$ and $r$ in isolation until they give up and decide that $q$ is in fact dead (which they must do eventually by strong completeness, since this run is indistinguishable from one in which $q$ is faulty). Then wake up $q$ and crash $p$ and $r$. Since $q$ is the only non-faulty process, we've violated weak accuracy. Chandra and Toueg~\cite{ChandraT1996} give as an example of a natural problem that can be solved only with $P$ the problem of \index{broadcast!terminating reliable} \index{reliable broadcast!terminating} \concept{terminating reliable broadcast}, in which a single leader process attempts to send a message and all other processes eventually agree on the message if the leader is non-faulty but must terminate after finite time with a default \emph{no message} return value if the leader is faulty.\footnote{This is a slight weakening of the problem, which however still separates $P$ from the other classes. For the real problem see Chandra and Toueg~\cite{ChandraT1996}.} The process is solvable using $P$ by just having each process either wait for the message or for $P$ to suspect the leader, which can only occur if the leader does in fact crash. If the leader is dead, the processes must eventually decide on no message; this separates $P$ from $◇S$ and $◇P$ since we can then wake up the leader and let it send its message. But it also separates $P$ from $S$, since we can have the $S$-detector only be accurate for non-leaders. For other similar problems see the paper. \myChapter{Quorum systems}{2014}{} \label{chapter-quorum-systems} \section{Basics} In the past few chapters, we've seen many protocols that depend on the fact that if I talk to more than $n/2$ processes and you talk to more than $n/2$ processes, the two groups overlap. This is a special case of a \concept{quorum system}, a family of subsets of the set of processes with the property that any two subsets in the family overlap. By choosing an appropriate family, we may be able to achieve lower load on each system member, higher availability, defense against Byzantine faults, etc. The exciting thing from a theoretical perspective is that these turn a systems problem into a combinatorial problem: this means we can ask combinatorialists how to solve it. \section{Simple quorum systems} \begin{itemize} \item Majority and weighted majorities \item Specialized read/write systems where write quorum is a column and read quorum a row of some grid. \item Dynamic quorum systems: get more than half of the most recent copy. \item Crumbling walls~\cite{PelegW1997dc,PelegW1997dam}: optimal small-quorum system for good choice of wall sizes. \end{itemize} \section{Goals} \begin{itemize} \item Minimize \concept{quorum size}. \item Minimize \concept{load}, defined as the minimum over all access strategies (probability distributions on quorums) of the maximum over all servers of probability it gets hit. \item Maximize \concept{capacity}, defined as the maximum number of quorum accesses per time unit in the limit if each quorum access ties up a quorum member for 1 time unit (but we are allowed to stagger a quorum access over multiple time units). \item Maximize \indexConcept{fault-tolerance!quorum system}{fault-tolerance}: minimum number of server failures that blocks all quorums. Note that for standard quorum systems this is directly opposed to minimizing quorum size, since killing the smallest quorum stops us dead. \item Minimize \indexConcept{failure probability!quorum system}{failure probability} = probability that every quorum contains at least one bad server, assuming each server fails with independent probability. \end{itemize} Naor and Wool~\cite{NaorW1998} describe trade-offs between these goals (some of these were previously known, see the paper for citations): \begin{itemize} \item $\text{capacity} = 1/\text{load}$; this is obtained by selecting the quorums independently at random according to the load-minimizing distribution. In particular this means we can forget about capacity and just concentrate on minimizing load. \item $\text{load} ≥ \max(c/n, 1/c)$ where $c$ is the minimum quorum size. The first case is obvious: if every access hits $c$ nodes, spreading them out as evenly as possible still hits each node $c/n$ of the time. The second is trickier: Naor and Wool prove it using LP duality, but the argument essentially says that if we have some quorum $Q$ of size $c$, then since every other quorum $Q'$ intersects $Q$ in at least one place, we can show that every $Q'$ adds at least $1$ unit of load in total to the $c$ members of $Q$. So if we pick a random quorum $Q'$, the average load added to all of $Q$ is at least $1$, so the average load added to some particular element of $Q$ is at least $1/\card*{Q} = 1/c$. Combining the two cases, we can't hope to get load better than $1/\sqrt{n}$, and to get this load we need quorums of size at least $\sqrt{n}$. \item failure probability is at least $p$ when $p > 1/2$ (and optimal system is to just pick a single leader in this case), failure probability can be made exponentially small in size of smallest quorum when $p < 1/2$ (with many quorums). These results are due to Peleg and Wool~\cite{PelegW1995}. \end{itemize} \section{Paths system} This is an optimal-load system from Naor and Wool~\cite{NaorW1998} with exponentially low failure probability, based on percolation theory. The basic idea is to build a $d\times{}d$ mesh-like graph where a quorum consists of the union of a top-to-bottom path (TB path) and a left-to-right path (LR path); this gives quorum size $O(\sqrt{n})$ and load $O(1/\sqrt{n})$. Note that the TB and LR paths are not necessarily direct: they may wander around for a while in order to get where they are going, especially if there are a lot of failures to avoid. But the smallest quorums will have size $2d+1 = O(\sqrt{n})$. The actual mesh is a little more complicated. Figure~\ref{figure-naor-wool-grid} reproduces the picture of the $d=3$ case from the Naor and Wool paper. \begin{figure} \centering \includegraphics[scale=0.5]{naorwool-fig2.png} \caption[Figure 2 from~\cite{NaorW1998}]{Figure 2 from~\cite{NaorW1998}. Solid lines are $G(3)$; dashed lines are $G^*(3)$.} \label{figure-naor-wool-grid} \end{figure} Each server corresponds to a \emph{pair} of intersecting edges, one from the $G(d)$ grid and one from the $G^{*}(d)$ grid (the star indicates that $G^{*}(d)$ is the \concept{dual graph}\footnote{See \wikipedia{Dual_graph}; the basic idea is that the dual of a graph $G$ embedded in the plane has a vertex for each region of $G$, and an edge connecting each pair of vertices corresponding to adjacent regions, where a region is a subset of the plane that is bounded by edges of $G$.} of $G(d)$. A quorum consists of a set of servers that produce an LR path in $G(d)$ and a TB path in $G^{*}(d)$. Quorums intersect, because any LR path in $G(d)$ must cross some TB path in $G^{*}(d)$ at some server (in fact, each pair of quorums intersects in at least two places). The total number of elements $n$ is $(d+1)^{2}$ and the minimum size of a quorum is $2d+1 = Θ(\sqrt{n})$. The symmetry of the mesh gives that there exists a LR path in the mesh if and only if there does not exist a TB path in its \concept{complement}, the graph that has an edge only if the mesh doesn't. For a mesh with failure probability $p < 1/2$, the complement is a mesh with failure probability $q = 1-p > 1/2$. Using results in percolation theory, it can be shown that for failure probability $q > 1/2$, the probability that there exists a left-to-right path is exponentially small in $d$ (formally, for each $p$ there is a constant $\phi(p)$ such that $\Pr[\exists \text{LR path}] ≤ \exp(-\phi(p)d)$). We then have \begin{align*} \Pr[\exists \text{(live quorum)}] & = \Pr[\exists \text{(TB path)} ∧ \exists \text{(LR path)}] \\& = \Pr[¬\exists \text{(LR path in complement)} ∨ ¬\exists \text{(TB path in complement)}] \\& ≤ \Pr[¬\exists \text{(LR path in complement)}] + \Pr[¬\exists \text{(TB path in complement)}] \\& ≤ 2 \exp(-\phi(1-p)d) \\& = 2 \exp(-Θ(\sqrt{n})). \end{align*} So the failure probability of this system is exponentially small for any fixed $p < 1/2$. See the paper~\cite{NaorW1998} for more details. \section{Byzantine quorum systems} Standard quorum systems are great when you only have crash failures, but with Byzantine failures you have to worry about finding a quorum that includes a Byzantine serve who lies about the data. For this purpose you need something stronger. Following Malkhi and Reiter~\cite{MalkhiR1998} and Malkhi~\etal~\cite{MalkhiRWW2001}, one can define: \begin{itemize} \item A \index{quorum system!$b$-disseminating} \concept{$b$-disseminating quorum system} guarantees $\card*{Q_{1}\cap{}Q_{2}} ≥ b+1$ for all quorums $Q_{1}$ and $Q_{2}$. This guarantees that if I update a quorum $Q_{1}$ and you update a quorum Q$_{2}$, and there are at most $b$ Byzantine processes, then there is some non-Byzantine process in both our quorums. Mostly useful if data is ``self-verifying,'' that is, signed with digital signatures that the Byzantine processes can't forge. Otherwise, I can't tell which of the allegedly most recent data values is the right one since the Byzantine processes lie. \item A \index{quorum system!$b$-masking} \concept{$b$-masking quorum system} guarantees $\card*{Q_{1}\cap{}Q_{2}} ≥ 2b+1$ for all quorums $Q_{1}$ and $Q_{2}$. (In other words, it's the same as a $2b$-disseminating quorum system.) This allows me to defeat the Byzantine processes through voting: given $2b+1$ overlapping servers, if I want the most recent value of the data I take the one with the most recent timestamp that appears on at least $b+1$ servers, which the Byzantine guys can't fake. \end{itemize} An additional requirement in both cases is that for any set of servers $B$ with $\card*{B} ≤ b$, there is some quorum $Q$ such that $Q\cap{}B = \emptyset$. This prevents the Byzantine processes from stopping the system by simply refusing to participate. Note: these definitions are based on the assumption that there is some fixed bound on the number of Byzantine processes. Malkhi and Reiter~\cite{MalkhiR1998} give more complicated definitions for the case where one has an arbitrary family $\{ \mathcal{B} \}$ of potential Byzantine sets. The definitions above are actually simplified versions from~\cite{MalkhiRWW2001}. The simplest way to build a $b$-disseminating quorum system is to use supermajorities of size at least $(n+b+1)/2$; the overlap between any two such supermajorities is at least $(n+b+1)-n = b+1$. This gives a load of substantially more than $\frac{1}{2}$. There are better constructions that knock the load down to $Θ(\sqrt{b/n})$; see~\cite{MalkhiRWW2001}. For more on this topic in general, see the survey by by Merideth and Reiter~\cite{MeridethR2010}. \section{Probabilistic quorum systems} The problem with all standard (or \index{quorum system!strict} \indexConcept{strict quorum system}{strict}) quorum systems is that we need big quorums to get high fault tolerance, since the adversary can always stop us by knocking out our smallest quorum. A \index{quorum system!probabilistic} \concept{probabilistic quorum system} or more specifically an \index{quorum system!$ε$-intersecting} \concept{$ε$-intersecting quorum system}~\cite{MalkhiRWW2001} improves the fault-tolerance by relaxing the requirements. For such a system we have not only a set system $Q$, but also a probability distribution $w$ supplied by the quorum system designer, with the property that $\Pr[Q_{1}\cap Q_{2} = \emptyset] ≤ ε$ when $Q_{1}$ and $Q_{2}$ are chosen independently according to their weights. \subsection{Example} Let a quorum be any set of size $k\sqrt{n}$ for some $k$ and let all quorums be chosen uniformly at random. Pick some quorum $Q_{1}$; what is the probability that a random $Q_{2}$ does not intersect $Q_{1}$? Imagine we choose the elements of $Q_{2}$ one at a time. The chance that the first element $x_{1}$ of $Q_{2}$ misses $Q_{1}$ is exactly $(n-k\sqrt{n})/n = 1 - k/\sqrt{n}$, and conditioning on $x_{1}$ through $x_{i-1}$ missing $Q_{1}$ the probability that $x_{i}$ also misses it is $(n-k\sqrt{n}-i+1)/(n-i+1) ≤ (n-k\sqrt{n})/n = 1 - k/\sqrt{n}$. So taking the product over all $i$ gives $\Pr[\text{all miss $Q_{1}$}] ≤ (1-k/\sqrt{n})^{k\sqrt{n}} ≤ \exp(-k\sqrt{n})^{k/\sqrt{n})} = \exp(-k^{2})$. So by setting $k = Θ(\ln 1/ε)$, we can get our desired $ε$-intersecting system. \subsection{Performance} Failure probabilities, if naively defined, can be made arbitrarily small: add low-probability singleton quorums that are hardly ever picked unless massive failures occur. But the resulting system is still $ε$-intersecting. One way to look at this is that it points out a flaw in the $ε$-intersecting definition: $ε$-intersecting quorums may cease to be $ε$-intersecting conditioned on a particular failure pattern (e.g., when all the non-singleton quorums are knocked out by massive failures). But Malkhi~\etal~\cite{MalkhiRWW2001} address the problem in a different way, by considering only survival of \index{quorum!high quality}\indexConcept{high quality quorum}{high quality} quorums, where a particular quorum $Q$ is \index{quorum!$δ$-high-quality} \indexConcept{$δ$-high-quality quorum}{$δ$-high-quality} if $\Pr[Q_{1}\cap Q_{2} = \emptyset | Q_{1} = Q] ≤ δ$ and high quality if it's $\sqrt{ε}$-high-quality. It's not hard to show that a random quorum is $δ$-high-quality with probability at least $ε/δ$, so a high quality quorum is one that fails to intersect a random quorum with probability at most $\sqrt{ε}$ and a high quality quorum is picked with probability at least $1-\sqrt{ε}$. We can also consider load; Malkhi~\etal~\cite{MalkhiRWW2001} show that essentially the same bounds on load for strict quorum systems also hold for $ε$-intersecting quorum systems: $\QuorumLoad(S) ≥ \max((\E(\card*{Q})/n, (1-\sqrt{ε})^{2}/\E(\card*{Q}))$, where $\E(\card*{Q})$ is the expected size of a quorum. The left-hand branch of the max is just the average load applied to a uniformly-chosen server. For the right-hand side, pick some high quality quorum $Q'$ with size less than or equal to $(1-\sqrt{ε})\E(\card*{Q})$ and consider the load applied to its most loaded member by its nonempty intersection (which occurs with probability at least $1-\sqrt{ε})$ with a random quorum. \section{Signed quorum systems} A further generalization of probabilistic quorum systems gives \index{quorum system!signed} \indexConcept{signed quorum system}{signed quorum systems}~\cite{Yu2006}. In these systems, a quorum consists of some set of positive members (servers you reached) and negative members (servers you tried to reach but couldn't). These allow $O(1)$-sized quorums while tolerating $n-O(1)$ failures, under certain natural probabilistic assumptions. Because the quorums are small, the load on some servers may be very high: so these are most useful for fault-tolerance rather than load-balancing. See the paper for more details. \part{Shared memory} \label{part-shared-memory} \myChapter{Model}{2020}{} \label{chapter-shared-memory-model} Shared memory models describe the behavior of processes in a multiprocessing system. These processes might correspond to actual physical processors or processor cores, or might use time-sharing on a single physical processor. In either case the assumption is that communication is through some sort of shared data structures. Here we describe the basic shared-memory model. See also \cite[§{}4.1]{AttiyaW2004}. The idea of shared memory is that instead of sending messages to each other, processes communicate through a pool of shared \indexConcept{object}{objects}. These are typically \indexConcept{register}{registers} supporting read and write operations, but fancier objects corresponding to more sophisticated data structures or synchronization primitives may also be included in the model. It is usually assumed that the shared objects do not experience faults. This means that the shared memory can be used as a tool to prevent partitions and other problems that can arise in message passing if the number of faults get too high. As a result, for large numbers of processor failures, shared memory is a more powerful model than message passing, although we will see in Chapter~\ref{chapter-distributed-shared-memory} that both models can simulate each other provided a majority of processes are non-faulty. \section{Atomic registers} \label{section-atomic-registers} An \index{register!atomic}\concept{atomic register} supports read and write operations; we think of these as happening instantaneously, and think of operations of different processes as interleaved in some sequence. Each read operation on a particular register returns the value written by the last previous write operation. Write operations return nothing. A process is defined by giving, for each state, the operation that it would like to do next, together with a transition function that specifies how the state will be updated in response to the return value of that operation. A configuration of the system consists of a vector of states for the processes and a vector of value for the registers. A sequential execution consists of a sequence of alternating configurations and operations $C_{0}, π_{1}, C_{1}, π_{2}, C_{2} \dots{}$, where in each triple $C_{i}, π_{i+1}, C_{i+1}$, the configuration $C_{i+1}$ is the result of applying $π_{i+1}$ to configuration $C_{i}$. For read operations, this means that the state of the reading process is updated according to its transition function. For write operations, the state of the writing process is updated, and the state of the written register is also updated. \newData{\SMdone}{done} \newData{\SMleftDone}{leftDone} \newData{\SMrightDone}{rightDone} \newData{\SMleftIsDone}{leftIsDone} \newData{\SMrightIsDone}{rightIsDone} Pseudocode for shared-memory protocols is usually written using standard pseudocode conventions, with the register operations appearing either as explicit subroutine calls or implicitly as references to shared variables. Sometimes this can lead to ambiguity; for example, in the code fragment \begin{align*} \SMdone &← \SMleftDone ∧ \SMrightDone, \end{align*} it is clear that the operation $\Write(\Done, -)$ happens after $\Read(\SMleftDone)$ and $\Read(\SMrightDone)$, but it is not clear which of $\Read(\SMleftDone$ and $\Read(\SMrightDone)$ happens first. When the order is important, we'll write the sequence out explicitly: \begin{algorithm}[h] $\SMleftIsDone ← \Read(\SMleftDone)$ \; $\SMrightIsDone ← \Read(\SMrightDone)$ \; $\Write(\Done, \SMleftIsDone ∧ \SMrightIsDone)$ \; \end{algorithm} Here \SMleftIsDone and \SMrightIsDone are internal variables of the process, so using them does not require read or write operations to the shared memory. \section{Single-writer versus multi-writer registers} One variation that does come up even with atomic registers is what processes are allowed to read or write a particular register. A typical assumption is that registers are \index{register!single-writer} \index{single-writer register} \indexConcept{single-writer multi-reader register}{single-writer multi-reader}—there is only one process that can write to the register (which simplifies implementation since we don't have to arbitrate which of two near-simultaneous writes gets in last and thus leaves the long-term value), although it's also common to assume \index{register!multi-writer} \index{multi-writer register} \indexConcept{multi-writer multi-reader register}{multi-writer multi-reader} registers, which if not otherwise available can be built from single-writer multi-reader registers using atomic snapshot (see Chapter~\ref{chapter-atomic-snapshots}). Less common are \index{register!single-reader} \indexConcept{single-writer single-reader register}{single-writer single-reader} registers, which act much like message-passing channels except that the receiver has to make an explicit effort to pick up its mail. \section{Fairness and crashes} From the perspective of a schedule, the fairness condition says that every processes gets to perform an operation infinitely often, unless it enters either a crashed or halting state where it invokes no further operations. (Note that unlike in asynchronous message-passing, there is no way to wake up a process once it stops doing operations, since the only way to detect that any activity is happening is to read a register and notice it changed.) Because the registers (at least in in multi-reader models) provide a permanent fault-free record of past history, shared-memory systems are much less vulnerable to crash failures than message-passing systems (though FLP\footnote{See Chapter~\ref{chapter-FLP}.} still applies); so in extreme cases, we may assume as many as $n-1$ crash failures, which makes the fairness condition very weak. The $n-1$ crash failures case is called the \concept{wait-free} case—since no process can wait for any other process to do anything—and has been extensively studied in the literature. For historical reasons, work on shared-memory systems has tended to assume crash failures rather than Byzantine failures—possibly because Byzantine failures are easier to prevent when you have several processes sitting in the same machine than when they are spread across the network, or possibly because in multi-writer situations a Byzantine process can do much more damage. But the model by itself doesn't put any constraints on the kinds of process failures that might occur. \section{Concurrent executions} Often, the operations on our shared objects will be implemented using lower-level operations. When this happens, it no longer makes sense to assume that the high-level operations occur one at a time—although an implementation may try to give that impression to its users. To model to possibility of concurrency between operations, we split an operation into an \concept{invocation} and \concept{response}, corresponding roughly to a procedure call and its return. The user is responsible for invoking the object; the object's implementation (or the shared memory system, if the object is taken as a primitive) is responsible for responding. Typically we will imagine that an operation is invoked at the moment it becomes pending, but there may be executions in which that does not occur. The time between the invocation and the response for an operation is the \concept{interval} of the operation. A \index{execution!concurrent}\concept{concurrent execution} is a sequence of invocations and responses, where after any prefix of the execution, every response corresponds to some preceding invocation, and there is at most one invocation for each process—always the last—that does not have a corresponding response. How a concurrent execution may or may not relate to a sequential execution depends on the consistency properties of the implementation, as described below. \section{Consistency properties} \label{section-consistency-properties} Different shared-memory systems may provide various \index{consistency property} \conceptFormat{consistency properties}, which describe how views of an object by different processes mesh with each other. The strongest consistency property generally used is \concept{linearizability}~\cite{HerlihyW1990}, where an implementation of an object is \concept{linearizable} if, for any concurrent execution of the object, there is a sequential execution of the object with the same operations and return values, where the (total) order of operations in the sequential execution is a linearization of the (partial) order of operations in the concurrent execution. Less formally, this means that if operation $a$ finishes before operation $b$ starts in the concurrent execution, then $a$ must come before $b$ in the sequential execution. An equivalent definition is that we can assign each operation a \concept{linearization point} somewhere between when its invocation and response, and the sequential execution obtained by assuming that all operations occur atomically at their linearization points is consistent with the specification of the object. Using either definition, we are given a fair bit of flexibility in how to order overlapping operations, which can sometimes be exploited by clever implementations (or lower bounds). A weaker condition is \concept{sequential consistency}~\cite{Lamport1979}. This says that for any concurrent execution of the object, there exists some sequential execution that is indistinguishable to all processes; however, this sequential execution might include operations that occur out of order from a global perspective. For example, we could have an execution of an atomic register where you write to it, then I read from it, but I get the initial value that precedes your write. This is sequentially consistent but not linearizable. Mostly we will ask any implementations we consider to be linearizable. However, both linearizability and sequential consistency are much stronger than the consistency conditions provided by real multiprocessors. For some examples of weaker memory consistency rules, a good place to start might be the dissertation of Jalal Y. Kawash~\cite{Kawash2000}. \section{Complexity measures} There are several complexity measures for shared-memory systems. \begin{description} \item[Time] Assume that no process takes more than 1 time unit between operations (but some fast processes may take less). Assign the first operation in the schedule time 1 and each subsequent operation the largest time consistent with the bound. The time of the last operation is the \index{complexity!time} \concept{time complexity}. This is also known as the \concept{big-step} or \concept{round} measure because the time increases by 1 precisely when every non-faulty process has taken at least one step, and a minimum interval during which this occurs counts as a big step or a round. \item[Total work] The \index{work!total}\concept{total work} or \index{complexity!step!total} \index{step complexity!total} \concept{total step complexity} is just the length of the schedule, i.e., the number of operations. This doesn't consider how the work is divided among the processes, e.g., an $O(n^{2})$ total work protocol might dump all $O(n^{2})$ operations on a single process and leave the rest with almost nothing to do. There is usually not much of a direct correspondence between total work and time. For example, any algorithm that involves \concept{busy-waiting}—where a process repeatedly reads a register until it changes—may have unbounded total work (because the busy-waiter might spin very fast) even though it runs in bounded time (because the register gets written to as soon as some slower process gets around to it). However, it is trivially the case that the time complexity is never greater than the total work. \item[Per-process work] The \index{work!per-process} \concept{per-process work}, \index{work!individual} \concept{individual work}, \index{complexity!step!per-process} \index{step complexity!per-process} \concept{per-process step complexity}, or \index{complexity!step!individual} \index{step complexity!individual} \concept{individual step complexity} measures the maximum number of operations performed by any single process. Optimizing for per-process work produces more equitably distributed workloads (or reveals inequitably distributed workloads). Like total work, per-process work gives an upper bound on time, since each time unit includes at least one operation from the longest-running process, but time complexity might be much less than per-process work (e.g., in the busy-waiting case above). \item[Remote memory references] As we've seen, step complexity doesn't make much sense for processes that busy-wait. An alternative measure is \concept{remote memory reference} complexity or \concept{RMR} complexity. This measure charges one unit for write operations and the first read operation by each process following a write, but charges nothing for subsequent read operations if there are no intervening writes (see §\ref{section-RMR-complexity} for details). In this measure, a busy-waiting operation is only charged one unit. RMR complexity can be justified to a certain extent by the cost structure of multi-processor caching~\cite{Mellor-CrummeyS91,Anderson1990}. \item[Contention] In multi-writer or multi-reader situations, it may be bad to have too many processes pounding on the same register at once. The \concept{contention} measures the maximum number of pending operations on any single register during the schedule (this is the simplest of several definitions out there). A single-reader single-writer algorithm always has contention at most 2, but achieving such low contention may be harder for multi-reader multi-writer algorithms. Of course, the contention is never worse that $n$, since we assume each process has at most one pending operation at a time. \item[Space] Just how big are those registers anyway? Much of the work in this area assumes they are \emph{very} big. But we can ask for the maximum number of bits in any one register (\concept{width}) or the total size (\index{complexity!bit}\concept{bit complexity}) or number (\index{complexity!space}\concept{space complexity}) of all registers, and will try to minimize these quantities when possible. We can also look at the size of the internal states of the processes for another measure of space complexity. \end{description} \section{Fancier registers} In addition to stock read-write registers, one can also imagine more tricked-out registers that provide additional operations. These usually go by the name of \concept{read-modify-write} (\concept{RMW}) registers, since the additional operations consist of reading the state, applying some function to it, and writing the state back, all as a single atomic action. Examples of RMW registers that have appeared in real machines at various times in the past include: \begin{description} \item[Test-and-set bits] A \concept{test-and-set} operation sets the bit to 1 and returns the old value. \item[Fetch-and-add registers] A \concept{fetch-and-add} operation adds some increment (typically -1 or 1) to the register and returns the old value. \item[Compare-and-swap registers] A \concept{compare-and-swap} operation writes a new value only if the previous value is equal to a supplied test value. \end{description} These are all designed to solve various forms of \concept{mutual exclusion} or locking, where we want at most one process at a time to work on some shared data structure. Some more exotic read-modify-write registers that have appeared in the literature are \begin{description} \item[Fetch-and-cons] Here the contents of the register is a linked list; a \concept{fetch-and-cons} adds a new head and returns the old list. \item[Sticky bits (or sticky registers)] With a \concept{sticky bit} or \concept{sticky register}~\cite{Plotkin1989}, once the initial empty value is overwritten, all further writes fail. The writer is not notified that the write fails, but may be able to detect this fact by reading the register in a subsequent operation. \item[Bank accounts] Replace the write operation with \FuncSty{deposit}, which adds a non-negative amount to the state, and \FuncSty{withdraw}, which subtracts a non-negative amount from the state provided the result would not go below 0; otherwise, it has no effect. \end{description} These solve problems that are hard for ordinary read/write registers under bad conditions. Note that they all have to return something in response to an invocation. There are also blocking objects like locks or semaphores, but these don't fit into the RMW framework. We can also consider generic read-modify-write registers that can compute arbitrary functions (passed as an argument to the read-modify-write operation) in the modify step. Here we typically assume that the read-modify-write operation returns the old value of the register. Generic read-modify-write registers are not commonly found in hardware but can be easily simulated (in the absence of failures) using mutual exclusion.\footnote{See Chapter~\ref{chapter-mutex}.} \myChapter{Distributed shared memory}{2020}{} \label{chapter-distributed-shared-memory} In \index{shared memory!distributed} \concept{distributed shared memory}, our goal is to simulate a collection of memory locations or \indexConcept{register}{registers}, each of which supports a \concept{read} operation that returns the current state of the register and a \concept{write} operation that updates the state. Our implementation should be \concept{linearizable}~\cite{HerlihyW1990}, meaning that read and write operations appear to occur instantaneously (\indexConcept{atomic}{atomically}) at some point in between when the operation starts and the operation finishes; equivalently, there should be some way to order all the operations on the registers to obtain a \concept{sequential execution} consistent with the behavior of a real register (each read returns the value of the most recent write) while preserving the observable partial order on operations (where $π_1$ precedes $π_2$ if $π_1$ finishes before $π_2$ starts). Implicit in this definition is the assumption that implemented operations take place over some interval, between an \concept{invocation} that starts the operation and a \concept{response} that ends the operation and returns its value.\footnote{More details on the shared-memory model are given in Chapter~\ref{chapter-shared-memory-model}.} In the absence of process failures, we can just assign each register to some process, and implement both read and write operations by remote procedure calls to the process (in fact, this works for arbitrary shared-memory objects). With process failures, we need to make enough copies of the register that failures can't destroy all of them. This creates an asymmetry between simulations of message-passing from shared-memory and vice versa; in the former case (discussed briefly in §\ref{section-message-passing-from-shared-memory} below), a process that fails in the underlying shared-memory system only means that the same process fails in the simulated message-passing system. But in the other direction, not only does the failure of a process in the underlying message-passing system mean that the same process fails in the simulated shared-memory system, but the simulation collapses completely if a majority of processes fail. \section{Message passing from shared memory} \label{section-message-passing-from-shared-memory} We'll start with the easy direction. We can build a reliable FIFO channel from single-writer single-reader registers using polling. The naive approach is that for each edge $uv$ in the message-passing system, we create a (very big) register $r_{uv}$, and $u$ writes the entire sequence of every message it has ever sent to $v$ to $r_{uv}$ every time it wants to do a new send. To receive messages, $v$ polls all of its incoming registers periodically and delivers any messages in the histories that it hasn't processed yet.\footnote{If we are really cheap about using registers, and are willing to accept even more absurdity in the register size, we can just have $u$ write every message it ever sends to $r_{u}$, and have each $v$ poll all the $r_u$ and filter out any messages intended for other processes.} The ludicrous register width can be reduced by adding in an acknowledgment mechanism in a separate register $\Ack_{vu}$; the idea is that $u$ will only write one message at a time to $r_{uv}$, and will queue subsequent messages until $v$ writes in $\Ack_{vu}$ that the message in $r_{uv}$ has been received. With some tinkering, it is possible to knock $r_{uv}$ down to only three possible states (sending 0, sending 1, and reset) and $\Ack_{vu}$ down to a single bit (value-received, reset-received), but that's probably overkill for most applications. Process failures don't affect any of these protocols, except that a dead process stops sending and receiving. \section{Shared memory from message passing: the Attiya-Bar-Noy-Dolev algorithm} \label{section-ABD} \newData{\ABDvalue}{value} \newData{\ABDtimestamp}{timestamp} Here we show how to implement shared memory from message passing. We'll assume that our system is asynchronous, that the network is complete, and that we are only dealing with $f < n/2$ crash failures. We'll also assume we only want to build single-writer registers, just to keep things simple; we can extend to multi-writer registers later. Here's the algorithm, which is due to Attiya, Bar-Noy, and Dolev~\cite{AttiyaBD1995}; see also \cite[\S17.1.3]{Lynch1996}. (Section~9.3 of \cite{AttiyaW2004} gives an equivalent algorithm, but the details are buried in an implementation of totally-ordered broadcast). We'll make $n$ copies of the register, one on each process. Each process's copy will hold a pair $(\ABDvalue, \ABDtimestamp)$ where timestamps are (unbounded) integer values. Initially, everybody starts with $(⊥, 0)$. A process updates its copy with new values $(v,t)$ upon receiving $\Write(v,t)$ from any other process $p$, provided $t$ is greater than the process's current timestamp. It then responds to $p$ with $\Ack(v,t)$, whether or not it updated its local copy. A process will also respond to a message $\Read(u)$ with a response $\Ack(\ABDvalue, \ABDtimestamp, u)$; here $u$ is a \concept{nonce}\footnote{A \conceptFormat{nonce} is any value that is guaranteed to be used at most once (the term originally comes from cryptography, which in turn got it from linguistics). In practice, a reader will most likely generate a nonce by combining its process id with a local timestamp.} used to distinguish between different read operations so that a process can't be confused by out-of-date acknowledgments. To write a value, the writer increments its timestamp, updates its value and sends $\Write(\ABDvalue, \ABDtimestamp)$ to all other processes. The write operation terminates when the writer has received acknowledgments containing the new timestamp value from a majority of processes. To read a value, a reader does two steps: \begin{enumerate} \item It sends $\Read(u)$ to all processes (where $u$ is any value it hasn't used before) and waits to receive acknowledgments from a majority of the processes. It takes the value $v$ associated with the maximum timestamp $t$ as its return value (no matter how many processes sent it). \item It then sends $\Write(v,t)$ to all processes, and waits for a response $\Ack(v,t)$ from a majority of the processes. Only then does it return. \end{enumerate} (Any extra messages, messages with the wrong nonce, etc., are discarded.) Both reads and writes cost $Θ(n)$ messages ($Θ(1)$ per process). Intuition: Nobody can return from a write or a read until they are sure that subsequent reads will return the same (or a later) value. A process can only be sure of this if it knows that the values collected by a read will include at least one copy of the value written or read. But since majorities overlap, if a majority of the processes have a current copy of $v$, then the majority read quorum will include it. Sending $\Write(v,t)$ to all processes and waiting for acknowledgments from a majority is just a way of ensuring that a majority do in fact have timestamps that are at least $t$. If we omit the $\Write$ stage of a $\Read$ operation, we may violate linearizability. An example would be a situation where two values ($1$ and $2$, say), have been written to exactly one process each, with the rest still holding the initial value $⊥$. A reader that observes $1$ and $(n-1)/2$ copies of $⊥$ will return $1$, while a reader that observes $2$ and $(n-1)/2$ copies of $⊥$ will return $2$. In the absence of the $\Write$ stage, we could have an arbitrarily long sequence of readers return $1$, $2$, $1$, $2$, \dots, all with no concurrency. This would not be consistent with any sequential execution in which $1$ and $2$ are only written once. \section{Proof of linearizability} \label{section-ABD-linearizable} Our intuition may be strong, but we still need a proof the algorithm works. In particular, we want to show that for any trace $T$ of the ABD protocol, there is an trace of an atomic register object that gives the same sequence of invoke and response events. The usual way to do this is to find a \index{linearizability}\concept{linearization} of the read and write operations: a total order that extends the observed order in $T$ where $π_1 < π_2$ in $T$ if and only if $π_1$ ends before $π_2$ starts. Sometimes it's hard to construct such an order, but in this case it's easy: we can just use the timestamps associated with the values written or read in each operation. Specifically, we define the timestamp of a write or read operation as the timestamp used in the $\Write(v,t)$ messages sent out during the implementation of that operation, and we put $π_1$ before $π_2$ if: \begin{enumerate} \item $π_1$ has a lower timestamp than $π_2$, or \item $π_1$ has the same timestamp as $π_2$, $π_1$ is a write, and $π_2$ is a read, or \item $π_1$ has the same timestamp as $π_2$ and $π_1 <_{T} π_2$, or \item none of the other cases applies, and we feel like putting $π_1$ first. \end{enumerate} The intent is that we pick some total ordering that is consistent with both $<_{T}$ and the timestamp ordering (with writes before reads when timestamps are equal). To make this work we have to show (a) that these two orderings are in fact consistent, and (b) that the resulting ordering produces values consistent with an atomic register: in particular, that each read returns the value of the last preceding write. Part (b) is easy: since timestamps only increase in response to writes, each write is followed by precisely those reads with the same timestamp, which are precisely those that returned the value written. For part (a), suppose that $π_1 <_{T} π_2$. The first case is when $π_2$ is a read. Then before the end of $π_1$, a set $S$ of more than $n/2$ processes send the $π_1$ process an $\Ack(v1,t_1)$ message. Since local timestamps only increase, from this point on any $\Ack(v_2,t_2,u)$ message sent by a process in $S$ has $t_2 ≥ t_1$. Let $S'$ be the set of processes sending $\Ack(v_2,t_2,u)$ messages processed by $π_2$. Since $\card*{S} > n/2$ and $\card*{S'} > n/2$, we have $S\cap S'$ is nonempty and so $S'$ includes a process that sent $\Ack(v_2,t_2)$ with $t_2 ≥ t_1$. So $π_2$ is serialized after $π_1$. The second case is when $π_2$ is a write; but then $π_1$ returns a timestamp that precedes the writer's increment in $π_2,$ and so again is serialized first. \section{Proof that \texorpdfstring{$f < n/2$}{f < n/2} is necessary} \label{section-distributed-shared-memory-requires-majority} This is pretty much the standard partition argument that $f < n/2$ is necessary to do anything useful in a message-passing system. Split the processes into two sets $S$ and $S'$ of size $n/2$ each. Suppose the writer is in $S$. Consider an execution where the writer does a write operation, but all messages between $S$ and $S'$ are delayed. Since the writer can't tell if the $S'$ processes are slow or dead, it eventually returns. Now let some reader in $S'$ attempt to read the simulated register, again delaying all messages between $S$ and $S'$; now the reader is forced to return some value without knowing whether the $S$ processes are slow or dead. If the reader doesn't return the value written, we lose. If by some miracle it does, then we lose in the execution where the write didn't happen and all the processes in $S$ really were dead. \section{Multiple writers} \label{section-ABD-multi-writer} \newData{\ABDcount}{count} So far we have assumed a single writer. The main advantage of this approach is that we don't have to do much to manage timestamps: the single writer can just keep track of its own. With multiple writers we can use essentially the same algorithm, but each write needs to perform an initial round of gathering timestamps so that it can pick a new timestamp bigger than those that have come before. We also extend the timestamps to be of the form $\Tuple{\ABDcount, \Id}$, lexicographically ordered, so that two timestamps with the same count field are ordered by process id. The modified write algorithm is: \begin{enumerate} \item Send $\Read(u)$ to all processes and wait to receive acknowledgments from a majority of the processes. \item Set my timestamp to $t = (\max_q \ABDcount_q + 1, \Id)$ where the max is taken over all processes $q$ that sent me an acknowledgment. Note that this is a two-field timestamp that is compared lexicographically, with the \Id field used only to prevent duplicate timestamps. \item Send $\Write(v,t)$ to all processes, and wait for a response $\Ack(v,t)$ from a majority of processes. \end{enumerate} This increases the cost of a write by a constant factor, but in the end we still have only a linear number of messages. The proof of linearizability is essentially the same as for the single-writer algorithm, except now we must consider the case of two write operations by different processes. Here we have that if $π_1 <_{T} π_2$, then $π_1$ gets acknowledgments of its write with timestamp $t_1$ from a majority of processes before $π_2$ starts its initial phase to compute \ABDcount. Since $π_2$ waits for acknowledgments from a majority of processes as well, these majorities overlap, so $π_2$'s timestamp $t_2$ must exceed $t_1$. So the linearization ordering previously defined still works. \section{Other operations} The basic ABD framework can be extended to support other operations. One such operation is a \concept{collect}~\cite{SaksSW1991}, where we read $n$ registers in parallel with no guarantee that they are read at the same time. This can trivially be implemented by running $n$ copies of ABD in parallel, and can be implemented with the same time and message complexity as ABD for a single register by combining the messages from the parallel executions into single (possibly very large) messages. \myChapter{Mutual exclusion}{2020}{} \label{chapter-mutex} For full details see \cite[Chapter 4]{AttiyaW2004} or \cite[Chapter 10]{Lynch1996}. \section{The problem} \label{section-mutex-definition} The goal is to share some critical resource between processes without more than one using it at a time—this is \emph{the} fundamental problem in time-sharing systems. The solution is to only allow access while in a specially-marked block of code called a \concept{critical section}, and only allow one process at a time to be in a critical section. A \concept{mutual exclusion protocol} guarantees this, usually in an asynchronous shared-memory model. Formally: We want a process to cycle between states \concept{trying} (trying to get into critical section), \concept{critical} (in critical section), \concept{exiting} (cleaning up so that other processes can enter their critical sections), and \concept{remainder} (everything else—essentially just going about its non-critical business). Only in the trying and exiting states does the process run the mutual exclusion protocol to decide when to switch to the next state; in the critical or remainder states it switches to the next state on its own. The ultimate payoff is that mutual exclusion solves for systems without failures what consensus solves for systems with failures: if the only way to update a data structure is to hold a lock on it, we are guaranteed to get a nice clean sequence of atomic-looking updates. Of course, once we allow failures back in, mutex becomes less useful, as our faulty processes start crashing without releasing their locks, and with the data structure in some broken, half-updated state.\footnote{In principle, if we can detect that a process has failed, we can work around this problem by allowing some other process to bypass the lock and clean up. This may require that the original process leaves behind notes about what it was trying to do, or perhaps copies the data it is going to modify somewhere else before modifying it. But even this doesn't work if some zombie process can suddenly lurch to life and scribble its ancient out-of-date values all over our shiny modern data structure.} \section{Goals} \label{section-mutex-goals} (See also \cite[\S4.2]{AttiyaW2004}, \cite[\S10.2]{Lynch1996}.) Core mutual exclusion requirements: \begin{description} \item[Mutual exclusion] \index{mutual exclusion} At most one process is in the critical state at a time. \item[No deadlock (progress)] \index{deadlock}\index{progress} If there is at least one process in a trying state, then eventually some process enters a critical state; similarly for exiting and remainder states. \end{description} Note that the protocol is not required to guarantee that processes leave the critical or remainder state, but we generally have to insist that the processes at least leave the critical state on their own to make progress. An additional useful property (not satisfied by all mutual exclusion protocols; see \cite[§{}10.4)]{Lynch1996}: \begin{description} \item[No lockout] \index{lockout}(\concept{lockout-freedom}): If there is a particular process in a trying or exiting state, that process eventually leaves that state. This means that I don't starve because somebody else keeps jumping past me and seizing the critical resource before I can. \end{description} Stronger starvation guarantees include explicit time bounds (how many rounds can go by before I get in) or \concept{bounded bypass} (nobody gets in more than $k$ times before I do). Each of these imply lockout-freedom assuming no deadlock. \section{Mutual exclusion using strong primitives} \label{section-mutex-strong-primitives} See \cite[\S4.3]{AttiyaW2004} or \cite[10.9]{Lynch1996}. The idea is that we will use some sort of \concept{read-modify-write} register, where the RMW operation computes a new value based on the old value of the register and writes it back as a single atomic operation, usually returning the old value to the caller as well. \subsection{Test and set} \label{section-mutex-test-and-set} A \concept{test-and-set} operation does the following sequence of actions atomically: \begin{algorithm}[h] \newData{\TASoldValue}{oldValue} \newData{\TASbit}{bit} $\TASoldValue ← \Read(\TASbit)$\; $\Write(\TASbit, 1)$\; \Return \TASoldValue\; \end{algorithm} Typically there is also a second \concept{reset} operation for setting the bit back to zero. For some implementations, this reset operation may only be used safely by the last process to get $0$ from the test-and-set bit. Because a test-and-set operation is atomic, if two processes both try to perform test-and-set on the same bit, only one of them will see a return value of 0. This is not true if each process simply executes the above code on a stock atomic register: there is an execution in which both processes read 0, then both write 1, then both return 0 to whatever called the non-atomic test-and-set subroutine. Test-and-set provides a trivial implementation of mutual exclusion, shown in Algorithm~\ref{alg-mutex-TAS}. \newFunc{\MTreset}{reset} \newData{\MTlock}{lock} \begin{algorithm} \While{\True}{ \tcp{trying} \lWhile{$\TestAndSet(\MTlock) = 1$}{nothing} \tcp{critical} (do critical section stuff) \; \tcp{exiting} $\MTreset(\MTlock)$\; \tcp{remainder} (do remainder stuff) \; } \caption{Mutual exclusion using test-and-set} \label{alg-mutex-TAS} \end{algorithm} It is easy to see that this code provides mutual exclusion, as once one process gets a 0 out of \MTlock, no other can escape the inner while loop until that process calls the \MTreset operation in its exiting state. It also provides progress (assuming the lock is initially set to 0); the only part of the code that is not straight-line code (which gets executed eventually by the fairness condition) is the inner loop, and if \MTlock is 0, some process escapes it, while if \MTlock is 1, some process is in the region between the \TestAndSet call and the \MTreset call, and so it eventually gets to \MTreset and lets the next process in (or itself, if it is very fast). The algorithm does \emph{not} provide lockout-freedom: nothing prevents a single fast process from scooping up the lock bit every time it goes through the outer loop, while the other processes ineffectually grab at it just after it is taken away. Lockout-freedom requires a more sophisticated turn-taking strategy. \subsection{A lockout-free algorithm using an atomic queue} \label{section-mutex-queue} Basic idea: In the trying phase, each process enqueues itself on the end of a shared queue (assumed to be an atomic operation). When a process comes to the head of the queue, it enters the critical section, and when exiting it dequeues itself. So the code would look something like Algorithm~\ref{alg-mutex-queue}. \newFunc{\MThead}{head} Note that this requires a queue that supports a \MThead operation. Not all implementations of queues have this property. \begin{algorithm} \While{\True}{ \tcp{trying} $\Enq(Q, \MyId)$\; \lWhile{$\MThead(Q) \ne \MyId$}{nothing} \tcp{critical} (do critical section stuff) \; \tcp{exiting} $\Deq(Q)$\; \tcp{remainder} (do remainder stuff) \; } \caption{Mutual exclusion using a queue} \label{alg-mutex-queue} \end{algorithm} Here the proof of mutual exclusion is that only the process whose id is at the head of the queue can enter its critical section. Formally, we maintain an invariant that any process whose program counter is between the inner while loop and the call to $\Deq(Q)$ must be at the head of the queue; this invariant is easy to show because a process can't leave the while loop unless the test fails (i.e., it is already at the head of the queue), no \Enq operation changes the head value (if the queue is nonempty), and the \Deq operation (which does change the head value) can only be executed by a process already at the head (from the invariant). Deadlock-freedom follows from proving a similar invariant that every element of the queue is the id of some process in the trying, critical, or exiting states, so eventually the process at the head of the queue passes the inner loop, executes its critical section, and dequeues its id. Lockout-freedom follows from the fact that once a process is at position $k$ in the queue, every execution of a critical section reduces its position by $1$; when it reaches the front of the queue (after some finite number of critical sections), it gets the critical section itself. Alternatively, we can argue lockout-freedom by showing bounded bypass: once I am in the queue, no process can execute two critical sections before I do, because once it leaves its first critical section, it enqueues behind me. \subsubsection{Reducing space complexity} \label{section-mutex-RMW} Following \cite[\S4.3.2]{AttiyaW2004}, we can give an implementation of this algorithm using a single read-modify-write (RMW) register instead of a queue; this drastically reduces the (shared) space needed by the algorithm. The reason this works is because we don't really need to keep track of the position of each process in the queue itself; instead, we can hand out numerical tickets to each process and have the process take responsibility for remembering where its place in line is. \newData{\MTfirst}{first} \newData{\MTlast}{last} \newFunc{\MTrmw}{RMW} The RMW register has two fields, \MTfirst and \MTlast, both initially 0. Incrementing last simulates an enqueue, while incrementing \MTfirst simulates a dequeue. The trick is that instead of testing if it is at the head of the queue, a process simply remembers the value of the \MTlast field when it ``enqueued'' itself, and waits for the \MTfirst field to equal it. Algorithm~\ref{alg-mutex-RMW} shows the code from Algorithm~\ref{alg-mutex-queue} rewritten to use this technique. The way to read the \MTrmw operations is that the \MTfirst argument specifies the variable to update and the second specifies an expression for computing the new value. Each \MTrmw operation returns the old state of the object, before the update. \newData{\MTposition}{position} \begin{algorithm} \While{\True}{ \tcp{trying} $\MTposition ← \MTrmw(V, \langle V.\MTfirst, V.\MTlast+1 \rangle)$\; \tcp{enqueue} \While{ $\MTrmw(V,V).\MTfirst \ne \MTposition.\MTlast$ }{nothing} \tcp{critical} (do critical section stuff) \; \tcp{exiting} $\MTrmw(V, \langle V.\MTfirst+1, V.\MTlast \rangle)$\; \tcp{dequeue} \tcp{remainder} (do remainder stuff) \; } \caption{Mutual exclusion using read-modify-write} \label{alg-mutex-RMW} \end{algorithm} \section{Mutual exclusion using only atomic registers} \label{section-mutex-registers} While mutual exclusion is easier using powerful primitives, we can also solve the problem using only registers. \subsection{Peterson's algorithm} \label{section-mutex-Peterson} Algorithm~\ref{alg-mutex-Peterson} shows Peterson's lockout-free mutual exclusion protocol for two processes $p_{0}$ and $p_{1}$~\cite{Peterson1981} (see also \cite[\S4.4.2]{AttiyaW2004} or \cite[\S10.5.1]{Lynch1996}). It uses only atomic registers. \newData{\MTwaiting}{waiting} \newData{\MTpresent}{present} \begin{algorithm} \SharedData\\ \MTwaiting, initially arbitrary\\ $\MTpresent[i]$ for $i\in\{0,1\}$, initially $0$\\ Code for process $i$:\\ \While{\True}{ \tcp{trying} $\MTpresent[i] ← 1$ \nllabel{line-alg-Peterson-present}\; $\MTwaiting ← i$ \nllabel{line-alg-Peterson-waiting}\; \While{\True}{ \If{$\MTpresent[¬ i] = 0$}{ \nllabel{line-alg-Peterson-break-1} \Break\; } \If{$\MTwaiting \ne i$}{ \nllabel{line-alg-Peterson-break-2} \Break\; } } \tcp{critical} (do critical section stuff) \nllabel{line-alg-Peterson-critical}\; \tcp{exiting} $\MTpresent[i] = 0$ \nllabel{line-alg-Peterson-reset-present}\; \tcp{remainder} (do remainder stuff) \nllabel{line-alg-Peterson-remainder}\; } \caption{Peterson's mutual exclusion algorithm for two processes} \label{alg-mutex-Peterson} \end{algorithm} This uses three bits to communicate: $\MTpresent[0]$ and $\MTpresent[1]$ indicate which of $p_0$ and $p_1$ are participating, and $\MTwaiting$ enforces turn-taking. The protocol requires that $\MTwaiting$ be multi-writer, but it's OK for $\MTpresent[0]$ and $\MTpresent[1]$ to be single-writer. In the description of the protocol, we write Lines~\ref{line-alg-Peterson-break-1} and~\ref{line-alg-Peterson-break-2} as two separate lines because they include two separate read operations, and the order of these reads is important. \subsubsection{Correctness of Peterson's protocol} Intuitively, let's consider all the different ways that the entry code of the two processes could interact. There are basically two things that each process does: it sets its own $\MTpresent$ variable in Line~\ref{line-alg-Peterson-present} and grabs the $\MTwaiting$ variable in Line~\ref{line-alg-Peterson-waiting}. Here's a typical case where one process gets in first: \begin{enumerate} \item $p_0$ sets $\MTpresent[0] ← 1$ \item $p_0$ sets $\MTwaiting ← 0$ \item $p_0$ reads $\MTpresent[1] = 0$ and enters critical section \item $p_1$ sets $\MTpresent[1] ← 1$ \item $p_1$ sets $\MTwaiting ← 1$ \item $p_1$ reads $\MTpresent[0] = 1$ and $\MTwaiting = 1$ and loops \item $p_0$ sets $\MTpresent[0] ← 0$ \item $p_1$ reads $\MTpresent[0] = 0$ and enters critical section \end{enumerate} The idea is that if I see a $0$ in your $\MTpresent$ variable, I know that you aren't playing, and can just go in. Here's a more interleaved execution where the waiting variable decides the winner: \begin{enumerate} \item $p_0$ sets $\MTpresent[0] ← 1$ \item $p_0$ sets $\MTwaiting ← 0$ \item $p_1$ sets $\MTpresent[1] ← 1$ \item $p_1$ sets $\MTwaiting ← 1$ \item $p_0$ reads $\MTpresent[1] = 1$ \item $p_1$ reads $\MTpresent[0] = 1$ \item $p_0$ reads $\MTwaiting = 1$ and enters critical section \item $p_1$ reads $\MTpresent[0] = 1$ and $\MTwaiting = 1$ and loops \item $p_0$ sets $\MTpresent[0] ← 0$ \item $p_1$ reads $\MTpresent[0] = 0$ and enters critical section \end{enumerate} Note that it's the process that set the \MTwaiting variable last (and thus sees its own value) that stalls. This is necessary because the earlier process might long since have entered the critical section. Sadly, examples are not proofs, so to show that this works in general, we need to formally verify each of mutual exclusion and lockout-freedom. Mutual exclusion is a safety property, so we expect to prove it using invariants. The proof in~\cite{Lynch1996} is based on translating the pseudocode directly into automata (including explicit program counter variables); we'll do essentially the same proof but without doing the full translation to automata. Below, we write that $p_{i}$ is at line $k$ if it the operation in line $k$ is enabled but has not occurred yet. \begin{lemma} \label{lemma-alg-Peterson-invariant-1} If $\MTpresent[i] = 0$, then $p_{i}$ is at Line~\ref{line-alg-Peterson-present} or~\ref{line-alg-Peterson-remainder}. \end{lemma} \begin{proof} Immediate from the code. \end{proof} \begin{lemma} \label{lemma-alg-Peterson-invariant-2} If $p_{i}$ is at Line~\ref{line-alg-Peterson-critical}, and $p_{¬{}i}$ is at Line~\ref{line-alg-Peterson-break-1}, \ref{line-alg-Peterson-break-2}, or~\ref{line-alg-Peterson-critical}, then $\MTwaiting = ¬{}i$. \end{lemma} \begin{proof} We'll do the case $i = 0$; the other case is symmetric. The proof is by induction on the schedule. We need to check that any event that makes the left-hand side of the invariant true or the right-hand side false also makes the whole invariant true. The relevant events are: \begin{itemize} \item Transitions by $p_{0}$ from Line~\ref{line-alg-Peterson-break-1} to Line~\ref{line-alg-Peterson-critical}. These occur only if $\MTpresent[1] = 0$, implying $p_{1}$ is at Line Line~\ref{line-alg-Peterson-present} or~\ref{line-alg-Peterson-remainder} by Lemma~\ref{lemma-alg-Peterson-invariant-1}. In this case the second part of the left-hand side is false. \item Transitions by $p_{0}$ from Line~\ref{line-alg-Peterson-break-2} to Line~\ref{line-alg-Peterson-critical}. These occur only if $\MTwaiting \ne 0$, so the right-hand side is true. \item Transitions by $p_{1}$ from Line~\ref{line-alg-Peterson-waiting} to Line~\ref{line-alg-Peterson-break-1}. These set $\MTwaiting$ to $1$, making the right-hand side true. \item Transitions that set $\MTwaiting$ to $0$. These are transitions by $p_{0}$ from Line~\ref{line-alg-Peterson-waiting} to Line~\ref{line-alg-Peterson-break-2}, making the left-hand side false. \end{itemize} \end{proof} We can now read mutual exclusion directly off of Lemma~\ref{lemma-alg-Peterson-invariant-2}: if both $p_{0}$ and $p_{1}$ are at Line~\ref{line-alg-Peterson-critical}, then we get $\MTwaiting = 1$ and $\MTwaiting = 0$, a contradiction. To show progress, observe that the only place where both processes can get stuck forever is in the loop at Lines~\ref{line-alg-Peterson-break-1} and~\ref{line-alg-Peterson-break-2}. But then $\MTwaiting$ isn't changing, and so some process $i$ reads $\MTwaiting = ¬{}i$ and leaves. To show lockout-freedom, observe that if $p_0$ is stuck in the loop while $p_1$ enters the critical section, then after $p_1$ leaves it sets $\MTpresent[1]$ to $0$ in Line~\ref{line-alg-Peterson-reset-present} (which lets $p_0$ in if $p_0$ reads $\MTpresent[1]$ in time), but even if it then sets $\MTpresent[1]$ back to $1$ in Line~\ref{line-alg-Peterson-present}, it still sets \MTwaiting to $1$ in Line~\ref{line-alg-Peterson-waiting}, which lets $p_0$ into the critical section. With some more tinkering this argument shows that $p_1$ enters the critical section at most twice while $p_0$ is in the trying state, giving $2$-bounded bypass; see \cite[Lemma~10.12]{Lynch1996}. With even more tinkering we get a constant time bound on the waiting time for process $i$ to enter the critical section, assuming the other process never spends more than $O(1)$ time inside the critical section. \subsubsection{Generalization to \texorpdfstring{$n$}{n} processes} \label{section-mutex-tournament} (See also \cite[\S4.4.3]{AttiyaW2004}.) The easiest way to generalize Peterson's two-process algorithm to $n$ processes is to organize a tournament in the form of log-depth binary tree; this method was invented by Peterson and Fischer~\cite{PetersonF1977}. At each node of the tree, the roles of the two processes are taken by the winners of the subtrees, i.e., the processes who have entered their critical sections in the two-process algorithms corresponding to the child nodes. The winner of the tournament as a whole enters the real critical section, and afterwards walks back down the tree unlocking all the nodes it won in reverse order. It's easy to see that this satisfies mutual exclusion, and not much harder to show that it satisfies lockout-freedom—in the latter case, the essential idea is that if a winner at some node reaches the root infinitely often, then lockout-freedom at that node means that a winner of each child node reaches the root infinitely often. The most natural way to implement the nodes is to have $\MTpresent[0]$ and $\MTpresent[1]$ at each node be multi-writer variables that can be written to by any process in the appropriate subtree. Because the \MTpresent variables don't do much, we can also implement them as the OR of many single-writer variables (this is what is done in \cite[\S10.5.3]{Lynch1996}), but there is no immediate payoff to doing this since the waiting variables are still multi-writer. Nice properties of this algorithm are that it uses only bits and that it's very fast: $O(\log n)$ time in the absence of contention. \subsection{Fast mutual exclusion} \label{section-mutex-fast} With a bit of extra work, we can reduce the no-contention cost of mutual exclusion to $O(1)$, while keeping whatever performance we previously had in the high-contention case. The trick (due to Lamport~\cite{Lamport1987}) is to put an object at the entrance to the protocol that diverts a solo process onto a ``fast path'' that lets it bypass the $n$-process mutex that everybody else ends up on. Our presentation mostly follows \cite{AttiyaW2004}[\S4.4.5], which uses the \concept{splitter} abstraction of Moir and Anderson~\cite{MoirA1995} to separate out the mechanism for diverting a lone process.\footnote{Moir and Anderson call these things \concept{one-time building blocks}, but the name \concept{splitter} has become standard in subsequent work.} Code for a splitter is given in Algorithm~\ref{alg-splitter}. \newFunc{\Splitter}{splitter} \newData{\SplitterRight}{right} \newData{\SplitterStop}{stop} \newData{\SplitterDown}{down} \newData{\SplitterDoor}{door} \newData{\SplitterRace}{race} \newData{\SplitterOpen}{open} \newData{\SplitterClosed}{closed} \newcommand{\AlgSplitterBody}[1]{ \SharedData\\ atomic register $\SplitterRace$, big enough to hold an id, initially $⊥$\\ atomic register $\SplitterDoor$, big enough to hold a bit, initially $\SplitterOpen$\\ \Procedure{$\Splitter(\Id)$}{ $\SplitterRace ← \Id$\; \If{$\SplitterDoor = \SplitterClosed$}{ \Return \SplitterRight\; } $\SplitterDoor ← \SplitterClosed$\; \eIf{$\SplitterRace = \Id$}{ \Return \SplitterStop \nllabel{line-#1-stop}\; }{ \Return \SplitterDown\; } } } \begin{algorithm} \AlgSplitterBody{alg-splitter} \caption{Implementation of a splitter} \label{alg-splitter} \end{algorithm} A splitter assigns to each processes that arrives at it the value \SplitterRight, \SplitterDown, or \SplitterStop. The useful properties of splitters are that if at least one process arrives at a splitter, then (a) at least one process returns \SplitterRight or \SplitterStop; and (b) at least one process returns \SplitterDown or \SplitterStop; (c) at most one process returns \SplitterStop; and (d) any process that runs by itself returns \SplitterStop. The first two properties will be useful when we consider the problem of \concept{renaming} in Chapter~\ref{chapter-renaming}; we will prove them there. The last two properties are what we want for mutual exclusion. The names of the variables $\SplitterRace$ and $\SplitterDoor$ follow the presentation in \cite[\S4.4.5]{AttiyaW2004}; Moir and Anderson~\cite{MoirA1995}, following Lamport~\cite{Lamport1987}, call these $X$ and $Y$. As in~\cite{MoirA1995}, we separate out the \SplitterRight and \SplitterDown outcomes—even though they are equivalent for mutex—because we will need them later for other applications. The intuition behind Algorithm~\ref{alg-splitter} is that setting \SplitterDoor to $\SplitterClosed$ closes the door to new entrants, and the last entrant to write its id to \SplitterRace wins (it's a slow race), assuming nobody else writes \SplitterRace and messes things up. The added cost of the splitter is always $O(1)$, since there are no loops. To reset the splitter, write \SplitterOpen to \SplitterDoor. This allows new processes to enter the splitter and possibly return \SplitterStop. \begin{lemma} \label{lemma-splitter-mutex} After each time that \SplitterDoor is set to \SplitterOpen, at most one process running Algorithm~\ref{alg-splitter} returns $\SplitterStop$. \end{lemma} \begin{proof} To simplify the argument, we assume that each process calls $\Splitter$ at most once. Let $t$ be some time at which $\SplitterDoor$ is set to $\SplitterOpen$ ($-\infty$ in the case of the initial value). Let $S_t$ be the set of processes that read $\SplitterOpen$ from $\SplitterDoor$ after time $t$ and before the next time at which some process writes $\SplitterClosed$ to $\SplitterDoor$, and that later return $\SplitterStop$ by reaching Line~\ref{line-alg-splitter-stop}. Then every process in $S_t$ reads $\SplitterDoor$ before any process in $S_t$ writes $\SplitterDoor$. It follows that every process in $S_t$ writes $\SplitterRace$ before any process in $S_t$ reads $\SplitterRace$. If some process $p$ is not the \emph{last} process in $S_t$ to write $\SplitterRace$, it will not see its own id, and will not return \SplitterStop. But only one process can be the last process in $S_t$ to write $\SplitterRace$.\footnote{It's worth noting that this last process still might not return \SplitterStop, because some later process—not in $S_t$—might overwrite $\SplitterRace$. This can happen even if nobody ever resets the splitter.} \end{proof} \begin{lemma} \label{lemma-splitter-solo-wins} If a process runs Algorithm~\ref{alg-splitter} by itself starting from a configuration in which $\SplitterDoor = \SplitterOpen$, it returns \SplitterStop. \end{lemma} \begin{proof} Follows from examining a solo execution: the process sets $\SplitterRace$ to $\Id$, reads $\SplitterOpen$ from $\SplitterDoor$, then reads $\Id$ from $\SplitterRace$. This causes it to return \SplitterStop as claimed. \end{proof} To turn this into an $n$-process mutex algorithm, we use the splitter to separate out at most one process (the one that gets \SplitterStop) onto a \concept{fast path} that bypasses the \concept{slow path} taken by the rest of the processes. The slow-path process first fight among themselves to get through an $n$-process mutex; the winner then fights in a $2$-process mutex with the process (if any) on the fast path. Releasing the mutex is the reverse of acquiring it. If I followed the fast path, I release the $2$-process mutex first then reset the splitter. If I followed the slow path, I release the $2$-process mutex first then the $n$-process mutex. This gives mutual exclusion with $O(1)$ cost for any process that arrives before there is any contention ($O(1)$ for the splitter plus $O(1)$ for the $2$-process mutex). A complication is that if nobody wins the splitter, there is no fast-path process to reset it. If we don't want to accept that the fast path just breaks forever in this case, we have to include a mechanism for a slow-path process to reset the splitter if it can be assured that there is no fast-path process left in the system. The simplest way to do this is to have each process mark a bit in an array to show it is present, and have each slow-path process, while still holding all the mutexes, check on its way out if the $\SplitterDoor$ bit is set and no processes claim to be present. If it sees all zeros (except for itself) after seeing $\SplitterDoor = \SplitterClosed$, it can safely conclude that there is no fast-path process and reset the splitter itself. The argument then is that the last slow-path process to leave will do this, re-enabling the fast path once there is no contention again. This approach is taken implicitly in Lamport's original algorithm, which combines the splitter and the mutex algorithms into a single miraculous blob. \subsection{Lamport's Bakery algorithm} See \cite[§{}4.4.1]{AttiyaW2004} or \cite[§{}10.7]{Lynch1996}. This is a lockout-free mutual exclusion algorithm that uses only single-writer registers (although some of the registers may end up holding arbitrarily large values). Code for the Bakery algorithm is given as Algorithm~\ref{alg-bakery}. \newData{\MTchoosing}{choosing} \newData{\MTnumber}{number} \begin{algorithm} \SharedData\\ $\MTchoosing[i]$, an atomic bit for each $i$, initially 0\\ $\MTnumber[i]$, an \emph{unbounded} atomic register, initially 0\\ Code for process $i$:\\ \While{\True}{ \tcp{trying} $\MTchoosing[i] ← 1$\; $\MTnumber[i] ← 1 + \max_{j\ne i} \MTnumber[j]$ \nllabel{line-alg-bakery-get-number} \; $\MTchoosing[i] ← 0$\; \For{$j \ne i$}{ loop until $\MTchoosing[j] = 0$ \nllabel{line-alg-bakery-loop-choosing}\; loop until $\MTnumber[j] = 0$ or $\langle \MTnumber[i], i \rangle <\langle \MTnumber[j], j \rangle$ \nllabel{line-alg-bakery-loop-number} \; } \tcp{critical} (do critical section stuff)\; \tcp{exiting} $\MTnumber[i] ← 0$\; \tcp{remainder} (do remainder stuff) \; } \caption{Lamport's Bakery algorithm} \label{alg-bakery} \end{algorithm} Note that several of these lines are actually loops; this is obvious for Lines~\ref{line-alg-bakery-loop-choosing} and~\ref{line-alg-bakery-loop-number}, but is also true for Line~\ref{line-alg-bakery-get-number}, which includes an implicit loop to read all $n-1$ values of $\MTnumber[j]$. Intuition for mutual exclusion is that if you have a lower number than I do, then I block waiting for you; for lockout-freedom, eventually I have the smallest number. (There are some additional complications involving the \MTchoosing bits that we are sweeping under the rug here.) For a real proof see~\cite[\S4.4.1]{AttiyaW2004} or~\cite[\S10.7]{Lynch1996}. Selling point is a strong near-FIFO guarantee and the use of only single-writer registers (which need not even be atomic—it's enough that they return correct values when no write is in progress). Weak point is unbounded registers. \subsection{Lower bound on the number of registers} \label{section-Burns-Lynch} There is a famous result due to Burns and Lynch~\cite{BurnsL1993} that any mutual exclusion protocol using only read/write registers requires at least $n$ of them. Details are in \cite[\S10.8]{Lynch1996}. A slightly different version of the argument is given in~\cite[§4.4.4]{AttiyaW2004}. The proof is another nice example of an indistinguishability proof, where we use the fact that if a group of processes can't tell the difference between two executions, they behave the same in both. Assumptions: We have a protocol that guarantees mutual exclusion and progress. Our base objects are all atomic registers. Key idea: In order for some process $p$ to enter the critical section, it has to do at least one write to let the other processes know it is doing so. If not, they can't tell if $p$ ever showed up at all, so eventually either some $p'$ will enter the critical section and violate mutual exclusion or (in the no-$p$ execution) nobody enters the critical section and we violate progress. Now suppose we can park a process $p_{i}$ on each register $r_{i}$ with a pending write to $i$; in this case we say that $p_{i}$ \indexConcept{cover}{covers} $r_{i}$. If every register is so covered, we can let $p$ go ahead and do whatever writes it likes and then deliver all the covering writes at once, wiping out anything $p$ did. Now the other processes again don't know if $p$ exists or not. So we can say something stronger: before some process $p$ can enter a critical section, it has to write to an uncovered register. The hard part is showing that we can cover all the registers without letting $p$ know that there are other processes waiting—if $p$ can see that other processes are waiting, it can just sit back and wait for them to go through the critical section and make progress that way. So our goal is to produce states in which (a) processes $p_{1}\dots{},p_{k}$ (for some $k$) between them cover $k$ registers, and (b) the resulting configuration is indistinguishable from an \index{configuration!idle}\concept{idle configuration} to $p_{k+1}\dots{}p_{n}$, where an idle configuration is one in which every process is in its remainder section. \begin{lemma} Starting from any idle configuration $C$, there exists an execution in which only processes $p_{1}\dots{}p_{k}$ take steps that leads to a configuration $C'$ such that (a) $C'$ is indistinguishable by any of $p_{k+1}\dots{}p_{n}$ from some idle configuration $C''$ and (b) $k$ distinct registers are covered by $p_{1}\dots{}p_{k}$ in $C'$. \end{lemma} \begin{proof} The proof is by induction on $k$. For $k=0$, let $C'' = C' = C$. For larger $k$, the essential idea is that starting from $C$, we first run to a configuration $C_{1}$ where $p_{1}\dots{}p_{k-1}$ cover $k-1$ registers and $C_1$ is indistinguishable from an idle configuration by the remaining processes, and then run $p_{k}$ until it covers one more register. If we let $p_{1}\dots{}p_{k-1}$ go, they overwrite anything $p_{k}$ wrote. Unfortunately, they may not come back to covering the same registers as before if we rerun the induction hypothesis (and in particular might cover the same register that $p_{k}$ does). So we have to look for a particular configuration $C_{1}$ that not only covers $k-1$ registers but also has an extension that covers the same $k-1$ registers. Here's how we find it: Start in $C$. Run the induction hypothesis to get $C_{1}$; here there is a set $W_{1}$ of $k-1$ registers covered in $C_{1}$. Now let processes $p_{1}$ through $p_{k-1}$ do their pending writes, then each enter the critical section, leave it, and finish, and rerun the induction hypothesis to get to a state $C_{2}$, indistinguishable from an idle configuration by $p_{k}$ and up, in which $k-1$ registers in $W_{2}$ are covered. Repeat to get sets $W_{3}$, $W_{4}$, etc. Since this sequence is unbounded, and there are only $\binom{r}{k-1}$ distinct sets of registers to cover (where $r$ is the number of registers), eventually we have $W_{i} = W_{j}$ for some $i≠j$. The configurations $C_{i}$ and $C_{j}$ are now our desired configurations covering the same $k-1$ registers. Now that we have $C_{i}$ and $C_{j}$, we run until we get to $C_{i}$. We now run $p_{k}$ until it is about to write some register not covered by $C_{i}$ (it must do so, or otherwise we can wipe out all of its writes while it's in the critical section and then go on to violate mutual exclusion). Then we let the rest of $p_{1}$ through $p_{k-1}$ do all their writes (which immediately destroys any evidence that $p_{k}$ ran at all) and run the execution that gets them to $C_{j}$. We now have $k-1$ registers covered by $p_{1}$ through $p_{k-1}$ and a $k$-th register covered by $p_{k}$, in a configuration that is indistinguishable from idle: this proves the induction step. \end{proof} The final result follows by the fact that when $k=n$ we cover $n$ registers; this implies that there are $n$ registers to cover. It's worth noting that the execution constructed in this proof might be \emph{very, very long}. It's not clear what happens if we consider executions in which, say, the critical section is only entered a polynomial number of times. If we are willing to accept a small probability of failure over polynomially-many entries, there is a randomized mutex that runs in $O(\log n)$ space~\cite{AspnesHTW2018}. \section{RMR complexity} \label{section-RMR-complexity} It's not hard to see that we can't build a shared-memory mutex without busy-waiting: any process that is waiting can't detect that the critical section is safe to enter without reading a register, but if that register tells it that it should keep waiting, it is back where it started and has to read it again. This makes our standard step-counting complexity measures useless for describe the worst-case complexity of a mutual exclusion algorithm. However, the same argument that suggests we can ignore local computation in a message-passing model suggests that we can ignore local operations on registers in a shared-memory model. Real multiprocessors have memory hierarchies where memory that is close to the CPU (or one of the CPUs) is generally much faster than memory that is more distant. This suggests charging only for \index{RMR} \indexConcept{remote memory reference}{remote memory references}, or RMRs, where each register is local to one of the processes and only operations on non-local registers are expensive. This has the advantage of more accurately modeling real costs~\cite{Mellor-CrummeyS91,Anderson1990}, and allowing us to build busy-waiting mutual exclusion algorithms with costs we can actually analyze. As usual, there is a bit of a divergence here between theory and practice. Practically, we are interested in algorithms with good real-time performance, and RMR complexity becomes a heuristic for choosing how to assign memory locations. This gives rise to very efficient mutual exclusion algorithms for real machines, of which the most widely used is the beautiful MCS algorithm of Mellor-Crummey and Scott~\cite{Mellor-CrummeyS91}. Theoretically, we are interested in the question of how efficiently we can solve mutual exclusion in our formal model, and RMR complexity becomes just another complexity measure, one that happens to allow busy-waiting on local variables. \subsection{Cache-coherence vs.\ distributed shared memory} The basic idea of RMR complexity is that a process doesn't pay for operations on local registers. But what determines which operations are local? In the \concept{cache-coherent} model (CC for short), once a process reads a register it retains a local copy as long as nobody updates it. So if I do a sequence of read operations with no intervening operations by other processes, I may pay an RMR for the first one (if my cache is out of date), but the rest are free. The assumption is that each process can cache registers, and there is some cache-coherence protocol that guarantees that all the caches stay up to date. We may or may not pay RMRs for write operations or other read operations, depending on the details of the cache-coherence protocol, but for upper bounds it is safest to assume that we do. In the \concept{distributed shared memory} model (DSM), each register is assigned permanently to a single process. Other processes can read or write the register, but only the owner gets to do so without paying an RMR. Here memory locations are nailed down to specific processes. In general, we expect the cache-coherent model to be cheaper than the distributed shared-memory model, if we ignore constant factors. The reason is that if we run a DSM algorithm in a CC model, then the process $p$ to which a register $r$ is assigned incurs an RMR only if some other process $q$ accesses $p$ since $p$'s last access. But then we can amortize $p$'s RMR by charging $q$ double. Since $q$ incurs an RMR in the CC model, this tells us that we pay at most twice as many RMRs in DSM as in CC for any algorithm. The converse is not true: there are (mildly exotic) problems for which it is known that CC algorithms are asymptotically more efficient than DSM algorithms~\cite{Golab2011,DanekH2004}. \subsection{RMR complexity of Peterson's algorithm} \label{section-mutex-RMR-of-Peterson} As a warm-up, let's look at the RMR complexity of Peterson's two-process mutual exclusion algorithm (Algorithm~\ref{alg-mutex-Peterson}). Acquiring the mutex requires going through mostly straight-line code, except for the loop that tests $\MTpresent[¬ i]$ and $\MTwaiting$. In the DSM model, spinning on $\MTpresent[¬ i]$ is not a problem (we can make it a local variable of process $i$). But $\MTwaiting$ is trouble. Whichever process we don't assign it to will pay an RMR every time it looks at it. So Peterson's algorithm behaves badly by the RMR measure in this model. Things are better in the CC model. Now process $i$ may pay RMRs for its first reads of $\MTpresent[¬ i]$ and $\MTwaiting$, but any subsequent reads are free unless process $¬ i$ changes one of them. But any change to either of the variables causes process $i$ to leave the loop. It follows that process $i$ pays at most 3 RMRs to get through the busy-waiting loop, giving an RMR complexity of $O(1)$. RMR complexities for parts of a protocol that access different registers add just like step complexities, so the Peterson-Fischer tree construction described in §\ref{section-mutex-tournament} works here too. The result is $O(\log n)$ RMRs per critical section access, but only in the CC model. \subsection{Mutual exclusion in the DSM model} \label{section-Yang-Anderson} Yang and Anderson~\cite{YangA1995} give a mutual exclusion algorithm for the DSM model that requires $Θ(\log n)$ RMRs to reach the critical section. This is now known to be optimal for deterministic algorithms~\cite{AttiyaHW2008}. The core of the algorithm is a $2$-process mutex similar to Peterson's, with some tweaks so that each process spins only on its own registers. Pseudocode is given in Algorithm~\ref{alg-yang-anderson}; this is adapted from \cite[Figure 1]{YangA1995}. \newFunc{\YAside}{side} \newData{\YArival}{rival} \begin{algorithm} $C[\YAside(i)] ← i$ \; $T ← i$\; $P[i] ← 0$\; $\YArival ← C[¬ \YAside(i)]$\; \If{$\YArival \ne ⊥$ \KwAnd $T = i$}{ \If{$P[\YArival] = 0$}{ $P[\YArival] = 1$\; } \lWhile{$P[i] = 0$}{spin} \If{$T = i$} { \lWhile{$P[i] ≤ 1$}{spin} } } \tcp{critical section goes here} $C[\YAside(i)] ← ⊥$\; $\YArival ← T$\; \If{$\YArival \ne i$}{ $P[\YArival] ← 2$\; } \caption{Yang-Anderson mutex for two processes} \label{alg-yang-anderson} \end{algorithm} The algorithm is designed to be used in a tree construction where a process with id in the range $\{1\dots n/2\}$ first fights with all other processes in this range, and similarly for processes in the range $\{n/2+1 \dots n\}$. The function $\YAside(i)$ is $0$ for the first group of processes and $1$ for the second. The variables $C[0]$ and $C[1]$ are used to record which process is the winner for each side, and also take the place of the $\MTpresent$ variables in Peterson's algorithm. Each process has its own variable $P[i]$ that it spins on when blocked; this variable is initially $0$ and ranges over $\{0,1,2\}$; this is used to signal a process that it is safe to proceed, and tests on $P$ substitute for tests on the non-local variables in Peterson's algorithm. Finally, the variable $T$ is used (like $\MTwaiting$ in Peterson's algorithm) to break ties: when $T = i$, it's $i$'s turn to wait. Initially, $C[0] = C[1] = ⊥$ and $P[i] = 0$ for all $i$. When I want to enter my critical section, I first set $C[\YAside(i)]$ so you can find me; this also has the same effect as setting $\MTpresent[\YAside(i)]$ in Peterson's algorithm. I then point $T$ to myself and look for you. I'll block if I see $C[¬ \YAside(i)] = 1$ and $T=i$. This can occur in two ways: one is that I really write $T$ after you did, but the other is that you only wrote $C[¬ \YAside(i)]$ but haven't written $T$ yet. In the latter case, you will signal to me that $T$ may have changed by setting $P[i]$ to $1$. I have to check $T$ again (because maybe I really did write $T$ later), and if it is still $i$, then I know that you are ahead of me and will succeed in entering your critical section. In this case I can safely spin on $P[i]$ waiting for it to become $2$, which signals that you have left. There is a proof that this actually works in~\cite{YangA1995}, but it's 27 pages of very meticulously-demonstrated invariants (in fairness, this includes the entire algorithm, including the tree parts that we omitted here). For intuition, this is not much more helpful than having a program mechanically check all the transitions, since the algorithm for two processes is effectively finite-state if we ignore the issue with different processes $i$ jumping into the role of $\YAside(i)$. A slightly less rigorous but more human-accessible proof would be analogous to the proof of Peterson's algorithm. We need to show two things: first, that no two processes ever both enter the critical section, and second, that no process gets stuck. For the first part, consider two processes $i$ and $j$, where $\YAside(i) = 0$ and $\YAside(j) = 1$. We can't have both $i$ and $j$ skip the loops, because whichever one writes $T$ last sees itself in $T$. Suppose that this is process $i$ and that $j$ skips the loops. Then $T=i$ and $P[i] = 0$ as long as $j$ is in the critical section, so $i$ blocks. Alternatively, suppose $i$ writes $T$ last but does so after $j$ first reads $T$. Now $i$ and $j$ both enter the loops. But again $i$ sees $T=i$ on its second test and blocks on the second loop until $j$ sets $P[i]$ to $2$, which doesn't happen until after $j$ finishes its critical section. Now let us show that $i$ doesn't get stuck. Again we'll assume that $i$ wrote $T$ second. If $j$ skips the loops, then $j$ sets $P[i] = 2$ on its way out as long as $T=i$; this falsifies both loop tests. If this happens after $i$ first sets $P[i]$ to 0, only $i$ can set $P[i]$ back to $0$, so $i$ escapes its first loop, and any $j'$ that enters from the $1$ side will see $P[i]=2$ before attempting to set $P[i]$ to $1$, so $P[i]$ remains at $2$ until $i$ comes back around again. If $j$ sets $P[i]$ to 2 before $i$ sets $P[i]$ to $0$ (or doesn't set it at all because $T=j$, then $C[\YAside(j)]$ is set to $⊥$ before $i$ reads it, so $i$ skips the loops. If $j$ doesn't skip the loops, then $P[i]$ and $P[j]$ are both set to $1$ after $i$ and $j$ enter the loopy part. Because $j$ waits for $P[j] \ne 0$, when it looks at $T$ the second time it will see $T=i \ne j$ and will skip the second loop. This causes it to eventually set $P[i]$ to 2 or set $C[\YAside(j)]$ to $⊥$ before $i$ reads it as in the previous case, so again $i$ eventually reaches its critical section. Since the only operations inside a loop are on local variables, the algorithm has $O(1)$ RMR complexity. For the full tree this becomes $O(\log n)$. \subsection{Lower bounds} \label{section-mutex-lower-bounds} For deterministic algorithms, there is a lower bound due to Attiya, Hendler, and Woelfel~\cite{AttiyaHW2008} that shows that any one-shot mutual exclusion algorithm for $n$ processes incurs $\Omega(n \log n)$ total RMRs in either the CC or DSM models (which implies that some single process incurs $\Omega(\log n)$ RMRs). This is based on an earlier breakthrough lower bound of Fan and Lynch~\cite{FanL2006} that proved the same lower bound for the number of times a register changes state. Both bounds are information-theoretic: a family of $n!$ executions is constructed containing all possible orders in which the processes enter the critical section, and it is shown that each RMR or state change only contributes $O(1)$ bits to choosing between them. For randomized algorithms, Hendler and Woelfel~\cite{HendlerW2011} have an algorithm that uses $O(\log n/\log \log n)$ expected RMRs against an adaptive adversary, beating the deterministic lower bound. This is the best possible for an adaptive adversary, due to a matching lower bound of Giakkoupis and Woelfel~\cite{GiakkoupisW2012RMR} that holds even for systems that provide compare-and-swap objects. For an oblivious adversary, an algorithm of Giakkoupis and Woelfel~\cite{GiakkoupisW2014} achieves $O(1$) expected RMRs in the DSM model. With compare-and-swap, a more recent algorithm of Giakkoupis and Woelfel~\cite{GiakkoupisW2017} gives $O(1)$ expected RMRs in the CC model. Curiously, there also exist linearizable $O(1)$-RMR implementations of CAS from registers in this model~\cite{GolabHHW2012}; however, it is not clear that these implementations can be combined with the Giakkoupis-Woelfel algorithm to give $O(1)$ expected RMRs using registers, because variations in scheduling of randomized implementations may produce subtle conditioning that gives different behavior from actual atomic objects in the context of a randomized algorithm~\cite{GolabHW2011}. \myChapter{The wait-free hierarchy}{2020}{} \label{chapter-wait-free-hierarchy} In a shared memory model, it may be possible to solve some problems using \concept{wait-free} protocols, in which any process can finish the protocol in a bounded number of steps, no matter what the other processes are doing (see Chapter~\ref{chapter-obstruction-freedom} for more on this and some variants). The \index{hierarchy!wait-free}\concept{wait-free hierarchy} $h^{r}_{m}$ classifies asynchronous shared-memory object types $T$ by \concept{consensus number}, where a type $T$ has consensus number $n$ if with objects of type $T$ and atomic registers (all initialized to appropriate values\footnote{The justification for assuming that the objects can be initialized to an arbitrary state is a little tricky. The idea is that if we are trying to implement consensus from objects of type $T$ that are themselves implemented in terms of objects of type $S$, then it's natural to assume that we initialize our simulated type-$T$ objects to whatever states are convenient. Conversely, if we are using the ability of type-$T$ objects to solve $n$-process consensus to show that they can't be implemented from type-$S$ objects (which can't solve $n$-process consensus), then for both the type-$T$ and type-$S$ objects we want these claims to hold no matter how they are initialized.}) it is possible to solve wait-free consensus (i.e., agreement, validity, wait-free termination) for $n$ processes but not for $n+1$ processes. The consensus number of any type is at least $1$, since $1$-process consensus requires no interaction, and may range up to $\infty$ for particularly powerful objects. The general idea is that a type $T$ with consensus number $c$ can't simulate at type $T'$ with a higher consensus number $c'$, because then we could use the simulation to convert a $c'$-process consensus protocol using $T'$ into a $c'$-process consensus protocol using $T$. The converse claim, that objects with the same or higher consensus numbers can simulate those with lower ones, is not necessarily true: even though $n$-process consensus can implement any object for $n$ processes (see §\ref{section-universal-construction}), it may be that for more than $n$ processes there is some object that has consensus number $n$ but that cannot be implemented from an arbitrary $n$-consensus object.\footnote{The existence of such objects was eventually demonstrated by Afek, Ellen, and Gafni~\cite{AfekEG2016}.} The wait-free hierarchy was suggested by work by Maurice Herlihy~\cite{Herlihy1991waitfree} that classified many common (and some uncommon) shared-memory objects by consensus number, and showed that an unbounded collection of objects with consensus number $n$ together with atomic registers gives a wait-free implementation of any object in an $n$-process system. Various subsequent authors noticed that this did not give a \index{hierarchy!robust}\concept{robust hierarchy} in the sense that combining two types of objects with consensus number $n$ could solve wait-free consensus for larger $n$, and the hierarchy $h^{r}_{m}$ was proposed by Prasad Jayanti~\cite{Jayanti1997} as a way of classifying objects that might be robust: an object is at level $n$ of the $h^{r}_{m}$ hierarchy if having unboundedly many objects plus unboundedly many registers solves $n$-process wait-free consensus but not $(n+1)$-process wait-free consensus.\footnote{The $r$ in $h^r_m$ stands for the registers, the $m$ for having many objects of the given type. Jayanti~\cite{Jayanti1997} also defines a hierarchy $h^r_1$ where you only get finitely many objects. The $h$ stands for ``hierarchy,'' or, more specifically, $h(T)$ stands for the level of the hierarchy at which $T$ appears~\cite{Jayanti2011}.} Whether or not the resulting hierarchy is in fact robust for arbitrary deterministic objects is still open, but Ruppert~\cite{Ruppert2000} subsequently showed that it is robust for RMW registers and objects with a read operation that returns the current state, and there is a paper by Borowsky, Gafni, and Afek~\cite{BorowskyGA1994} that sketches a proof based on a topological characterization of computability\footnote{See Chapter~\ref{chapter-topological-methods}.} that $h^{r}_{m}$ is robust for deterministic objects that don't discriminate between processes (unlike, say, single-writer registers). So for well-behaved shared-memory objects (deterministic, symmetrically accessible, with read operations, etc.), consensus number appears to give a real classification that allows us to say for example that any collection of read-write registers (consensus number $1$), fetch-and-increments ($2$), test-and-set bits ($2$), and queues ($2$) is not enough to build a compare-and-swap ($\infty$).\footnote{Ruppert's paper is particularly handy because it gives an algorithm for computing the consensus number of the objects it considers. However, for infinite-state objects, this requires solving the halting problem (as previously shown by Jayanti and Toueg~\cite{JayantiT1992}.} Another useful result from the Borowsky-Gafni-Afek paper is that the consensus number is not generally dependent on what assumptions we make about the initial state of the objects. Specifically, \cite[Lemma 3.2]{BorowskyGA1994} states that as long as there is some sequence of operations that takes an object from a fixed initial state to a desirable initial state for consensus, then we can safely assume that the object is in the desirable state. The core idea of the proof is that each process can initialize its own copy of the object and then announce that it is ready; each process will then participate in a sequence of consensus protocols using the objects that they observe are ready, with the output of each protocol used as the input to the next. Because the first object $S_i$ to be announced as initialized will be visible to all processes, they will all do consensus using $S_i$. Any subsequent protocols that may be used by only a subset of the processes will not change the common agreed output from the $S_i$ protocol.\footnote{The result in the paper is stated for a consensus protocol that uses a single copy of the object, but it generalizes in the obvious way to those that use multiple copies of the object.} When considering multiple objects, the usual assumption is that objects are combined by putting them next to each other. If we can combine two objects by constructing a single object with operations of both—which is essentially what happens when we apply different machine language instructions to the same memory location—then the object with both operations may have a higher consensus number than the object with either operation individually. This was observed by Ellen~\etal~\cite{EllenGSZ2016}. A simple example would be a register than supports increment ($+1$) and doubling ($×2$) operations. A register with only one of these operations is equivalent to a counter and has consensus number $1$. But a register with both operations has consensus number at least $2$, since if it is initialized to $2$, we can tell which of the two operations went first by looking at the final value: $3 = 2+1, 4 = 2×2, 5=(2×2)+1, 6 = (2+1)×2$. We won't attempt to do the robustness proofs of Borowsky~\etal~\cite{BorowskyGA1994} or Ruppert~\cite{Ruppert2000}. Instead, we'll concentrate on Herlihy's original results and show that specific objects have specific consensus numbers when used in isolation. The procedure in each case will be to show an upper bound on the consensus number using a variant of Fischer-Lynch-Paterson (made easier because we are wait-free and don't have to worry about fairness) and then show a matching lower bound (for non-trivial upper bounds) by exhibiting an $n$-process consensus protocol for some $n$. Essentially everything below is taken from Herlihy's paper~\cite{Herlihy1991waitfree}, so reading that may make more sense than reading these notes. \section{Classification by consensus number} \label{section-wait-free-hierarchy-examples} Here we show the position of various types in the wait-free hierarchy. The quick description is shown in Table~\ref{table-wait-free-hierarchy}; more details (mostly adapted from~\cite{Herlihy1991waitfree}) are given below. \begin{table} \begin{tabular}{p{0.14\textwidth} p{0.2\textwidth} p{0.5\textwidth} } \toprule Consensus number&Defining \mbox{characteristic}&Examples\\ \midrule 1&Read with \mbox{interfering} no-return RMW.&\mbox{Registers, counters,} \mbox{generalized~counters}, \mbox{max~registers}, atomic~snapshots. \\ 2&Interfering RMW; queue-like structures.&Test-and-set, \mbox{fetch-and-add}, queues, \mbox{process-to-memory swap}.\\ $m$& &$m$-process consensus objects.\\ $2m-2$& &Atomic $m$-register write.\\ $\infty$&First write-like operation wins.&Queue with peek, fetch-and-cons, sticky bits, compare-and-swap, memory-to-memory swap, memory-to-memory copy.\\ \bottomrule \end{tabular} \caption{Position of various types in the wait-free hierarchy} \label{table-wait-free-hierarchy} \end{table} \subsection[Level 1: registers etc.]{Level 1: atomic registers, counters, other interfering RMW registers that don't return the old value} \label{section-wait-free-level-1} First observe that any type has consensus number at least 1, since 1-process consensus is trivial. We'll argue that a large class of particularly weak objects has consensus number exactly 1, by running FLP with 2 processes. Recall from Chapter~\ref{chapter-FLP} that in the Fischer-Lynch-Paterson~\cite{FischerLP1985} proof we classify states as bivalent or univalent depending on whether both decision values are still possible, and that with at least one failure we can always start in a bivalent state (this doesn't depend on what objects we are using, since it depends only on having invisible inputs). Since the system is wait-free there is no constraint on adversary scheduling, and so if any bivalent state has a bivalent successor we can just do it. So to solve consensus we have to reach a bivalent configuration $C$ that has only univalent successors, and in particular has a 0-valent and a 1-valent successor produced by applying operations $x$ and $y$ of processes $p_{x}$ and $p_{y}$. Assuming objects don't interact with each other behind the scenes, $x$ and $y$ must be operations of the same object. Otherwise $Cxy = Cyx$ and we get a contradiction. Now let's suppose we are looking at atomic registers, and consider cases: \begin{itemize} \item $x$ and $y$ are both reads, Then $x$ and $y$ commute: $Cxy = Cyx$, and we get a contradiction. \item $x$ is a read and $y$ is a write. Then $p_{y}$ can't tell the difference between $Cyx$ and $Cxy$, so running $p_{y}$ to completion gives the same decision value from both $Cyx$ and $Cxy$, another contradiction. \item $x$ and $y$ are both writes. Now $p_{y}$ can't tell the difference between $Cxy$ and $Cy$, so we get the same decision value for both, again contradicting that $Cx$ is 0-valent and $Cy$ is 1-valent. \end{itemize} There's a pattern to these cases that generalizes to other objects. Suppose that an object has a read operation that returns its state and one or more read-modify-write operations that don't return anything (perhaps we could call them ``modify-write'' operations). We'll say that the MW operations are \index{operations!interfering} \indexConcept{interfering operations}{interfering} if, for any two operations $x$ and $y$, either: \begin{itemize} \item $x$ and $y$ \index{operations!commuting} \indexConcept{commuting operations}{commute}: $Cxy = Cyx$. \item One of $x$ and $y$ \index{operations!overwriting} \indexConcept{overwriting operations}{overwrites} the other: $Cxy = Cy$ or $Cyx = Cx$. \end{itemize} Then no pair of read or modify-write operations can get us out of a bivalent state, because (a) reads commute; (b) for a read and MW, the non-reader can't tell which operation happened first; (c) and for any two MW operations, either they commute or the overwriter can't detect that the first operation happened. So any MW object with uninformative, interfering MW operations has consensus number 1. For example, consider a counter that supports operations read, increment, decrement, and write: a write overwrites any other operation, and increments and decrements commute with each other, so the counter has consensus number 1. The same applies to a generalized counter that supports an atomic $x ← x+a$ operation; as long as this operation doesn't return the old value, it still commutes with other atomic increments. Max registers~\cite{AspnesAC2012}, which have read operations that return the largest value previously written, also have commutative updates, so they also have consensus number 1. This gives an example of an object not invented at the time of Herlihy's paper that is still covered by Herlihy's argument. \subsection[Level 2: interfering RMW objects etc.]{Level 2: interfering RMW objects that return the old value, queues (without peek)} \label{section-wait-free-level-2} Suppose now that we have a RMW object that returns the old value, and suppose that it is \emph{non-trivial} in the sense that it has at least one RMW operation where the embedded function $f$ that determines the new value is not the identity (otherwise RMW is just read). Then there is some value $v$ such that $f(v) \ne v$. To solve two-process consensus, have each process $p_{i}$ first write its preferred value to a register $r_{i}$, then execute the non-trivial RMW operation on the RMW object initialized to $v$. The first process to execute its operation sees $v$ and decides its own value. The second process sees $f(v)$ and decides the first process's value (which it reads from the register). It follows that non-trivial RMW object has consensus number \emph{at least} 2. In many cases, this is all we get. Suppose that the operations of some RMW type $T$ are non-interfering in a way analogous to the previous definition, where now we say that $x$ and $y$ commute if they leave the object in the same state (regardless of what values are returned) and that $y$ overwrites $x$ if the object is always in the same state after both $x$ and $xy$ (again regardless of what is returned). The two processes $p_x$ and $p_y$ that carry out $x$ and $y$ know what happened, but a third process $p_z$ doesn't. So if we run $p_z$ to completion we get the same decision value after both $Cx$ and $Cy$, which means that $Cx$ and $Cy$ can't be 0-valent and 1-valent. It follows that no collection of RMW registers with interfering operations can solve 3-process consensus, and thus all such objects have consensus number 2. Examples of these objects include \concept{test-and-set} bits, \concept{fetch-and-add} registers, and \concept{swap} registers that support an operation \Swap that writes a new value and returns the previous value. There are some other objects with consensus number 2 that don't fit this pattern. Define a \index{queue!wait-free}\concept{wait-free queue} as an object with enqueue and dequeue operations (like normal queues), where dequeue returns $⊥$ if the queue is empty (instead of blocking). To solve 2-process consensus with a wait-free queue, initialize the queue with a single value (it doesn't matter what the value is). We can then treat the queue as a non-trivial RMW register where a process wins if it successfully dequeues the initial value and loses if it gets empty.\footnote{But wait! What if the queue starts empty? This turns out to be a surprisingly annoying problem, and was one of the motivating examples for $h^r_m$ as opposed to Herlihy's vaguer initial definition. With one empty queue and nothing else, Jayanti and Toueg~\cite[Theorem~7]{JayantiT1992} show that there is no solution to consensus for two processes. This is also true for stacks (Theorem 8 from the same paper). But adding a register (Theorem 9) lets you do it. A second empty queue also works.} However, enqueue operations are non-interfering: if $p_{x}$ enqueues $v_{x}$ and $p_{y}$ enqueues $v_{y}$, then any third process can detect which happened first; similarly we can distinguish $\Enq(x) \Deq()$ from $\Deq() \Enq(x)$. So to show we can't do three process consensus we do something sneakier: given a bivalent state $C$ with allegedly 0- and 1-valent successors $C \Enq(x)$ and $C \Enq(y)$, consider both $C \Enq(x) \Enq(y)$ and $C \Enq(y) \Enq(x)$ and run $p_x$ until it does a $\Deq()$ (which it must, because otherwise it can't tell what to decide) and then stop it. Now run $p_y$ until it also does a $\Deq()$ and then stop it. We've now destroyed the evidence of the split and poor hapless $p_z$ is stuck. In the case of $C \Deq() \Enq(x)$ and $C \Enq(x) \Deq()$ on a non-empty queue we can kill the initial dequeuer immediately and then kill whoever dequeues $x$ or the value it replaced, and if the queue is empty only the dequeuer knows. In either case we reach indistinguishable states after killing only 2 witnesses, and the queue has consensus number at most 2. Similar arguments work on stacks, deques, and so forth—these all have consensus number exactly 2. \subsection{Level \texorpdfstring{$\infty$}{infinity}: objects where the first write wins} \label{section-wait-free-level-infinity} \label{section-compare-and-swap} \label{section-LLSC} \newData{\SwapVictory}{victory} \newData{\SwapPrize}{prize} These are objects that can solve consensus for any number of processes. Here are a bunch of level-$\infty$ objects: \begin{description} \item[Queue with peek] \index{queue!with peek} Has operations $\Enq(x)$ and $\Peek()$, which returns the first value enqueued. (Maybe also $\Deq()$, but we don't need it for consensus). Protocol is to enqueue my input and then peek and return the first value in the queue. \item[Fetch-and-cons] \index{fetch-and-cons} Returns old \DataSty{cdr} and adds new \DataSty{car} on to the head of a list. Use preceding protocol where $\Peek() = \FuncSty{tail}(\DataSty{car}::\DataSty{cdr})$. \item[Sticky bit] \index{sticky bit} Has a $\Write$ operation that has no effect unless register is in the initial $⊥$ state. Whether the $\Write$ succeeds or fails, it returns nothing. The consensus protocol is to write my input and then return result of a read. \item[Compare-and-swap] \index{compare-and-swap}\index{CAS} Has $\FuncSty{CAS}(\DataSty{old}, \DataSty{new})$ operation that writes \DataSty{new} only if previous value is \DataSty{old}. Use it to build a sticky bit. \item[Load-linked/store-conditional] \index{load-linked/stored-conditional}\index{LL/SC} Like compare-and-swap split into two operations. The \indexConcept{load-linked} operation reads a memory location and marks it. The \indexConcept{store-conditional} operation succeeds only if the location has not been changed since the preceding load-linked by the same process. Can be used to build a sticky bit. \item[Memory-to-memory swap] \index{swap!memory-to-memory}\index{memory-to-memory swap} Has $\Swap(r_{i}, r_{j})$ operation that atomically swaps contents of $r_{i}$ with $r_{j}$, as well as the usual read and write operations for all registers. Use to implement fetch-and-cons. Alternatively, use two registers $\Input[i]$ and $\SwapVictory[i]$ for each process $i$, where $\SwapVictory[i]$ is initialized to 0, and a single central register \SwapPrize, initialized to 1. To execute consensus, write your input to $\Input[i]$, then swap $\SwapVictory[i]$ with \SwapPrize. The winning value is obtained by scanning all the \SwapVictory registers for the one that contains a 1, then returning the corresponding $\Input$ value.) \item[Memory-to-memory copy] \index{copy!memory-to-memory} \index{memory-to-memory copy} Has a $\FuncSty{copy}(r_{i}, r_{j})$ operation that copies $r_{i}$ to $r_{j}$ atomically. Use the same trick as for memory-to-memory swap, where a process copies \SwapPrize to $\SwapVictory[i]$. But now we have a process follow up by writing $0$ to \SwapPrize. As soon as this happens, the $\SwapVictory$ values are now fixed; take the leftmost $1$ as the winner.\footnote{Or use any other rule that all processes apply consistently.} Herlihy~\cite{Herlihy1991waitfree} gives a slightly more complicated version of this procedure, where there is a separate $\SwapPrize[i]$ register for each $i$, and after doing its copy a process writes $0$ to all of the \SwapPrize registers. This shows that memory-to-memory copy solves consensus for arbitrarily many processes even if we insist that copy operations can never overlap. The same trick also works for memory-to-memory swap, since we can treat a memory-to-memory swap as a memory-to-memory copy given that we don't care what value it puts in the $\SwapPrize[i]$ register. \item[Bank accounts] A \concept{bank account} object stores a non-negative integer, and supports a \Read operation that returns the current value and a $\FuncSty{withdraw}(k)$ operation that reduces the value by $k$, unless this would reduce the value below $0$, in which case it has no effect. To solve (binary) consensus with a bank account, start it with $3$, and have each process with input $b$ attempt to withdraw $3-b$ from the account. After the first withdrawal, the object will hold either $0$ or $1$, and no further withdrawals will have any effect. So the bank account acts exactly like a sticky bit where $3$ represents $⊥$.\footnote{If you have more money, you can extend this construction to any fixed set of values. For example, to choose among values $v$ in $0\dots m-1$, start with $2m$ and have a process with input $v$ subtract $2m-v$.} For many years, I assumed that this example demonstrated why cryptocurrencies all seem to use embedded consensus protocols of some sort. However, it turns out that there is a critical assumption needed for this proof, which is that more than one process can spend from the same account. Without this assumption, it has been shown by Guerraoui~\etal~\cite{GuerraouiKMPS2019} that the consensus number of a single-spender bank account is $1$, and more generally that the consensus number of a $k$-spender bank account is exactly $k$. \end{description} \subsection{Level \texorpdfstring{$2m-2$}{2m-2}: simultaneous \texorpdfstring{$m$}{m}-register write} \label{section-wait-free-multi-register-writes} \newData{\MultiWriteShared}{shared} Here we have a (large) collection of atomic registers augmented by an $m$-register write operation that performs all the writes simultaneously. The intuition for why this is helpful is that if $p_{1}$ writes $r_{1}$ and $r_{\MultiWriteShared}$ while $p_{2}$ writes $r_{2}$ and $r_{\MultiWriteShared}$ then any process can look at the state of $r_{1}$, $r_{2}$ and $r_{\MultiWriteShared}$ and tell which write happened first. Code for this procedure is given in Algorithm~\ref{alg-multiwrite-race}; note that up to 4 reads may be necessary to determine the winner because of timing issues.\footnote{The main issue is that processes can only read the registers one at a time. An alternative to running Algorithm~\ref{alg-multiwrite-race} is to use a double-collect snapshot (see §\ref{section-double-collect}) to simulate reading all three registers at once. However, this might require as many as twelve read operations, since a process doing a snapshot has to re-read all three registers if any of them change.} \begin{algorithm} $v_1 ← r_1$ \; $v_2 ← r_2$ \; \If{$v_1 = v_2 = ⊥$}{ \Return no winner\; } \If{$v_1 = 1$ \KwAnd $v_2 = ⊥$}{ \tcp{$p_1$ went first} \Return 1\; } \tcp{read $r_1$ again} $v_1' ← r_1$\; \If{$v_2 = 2$ \KwAnd $v_1' = ⊥$}{ \tcp{$p_2$ went first} \Return 2\; } \tcp{both $p_1$ and $p_2$ wrote} \eIf{$r_{\MultiWriteShared} = 1$}{ \Return 2\; }{ \Return 1\; } \caption[Determining the winner of a race between 2-register writes]{Determining the winner of a race between 2-register writes. The assumption is that $p_1$ and $p_2$ each wrote their own ids to $r_i$ and $r_\MultiWriteShared$ simultaneously. This code can be executed by any process (including but not limited to $p_1$ or $p_2$) to determine which of these 2-register writes happened first.} \label{alg-multiwrite-race} \end{algorithm} The workings of Algorithm~\ref{alg-multiwrite-race} are straightforward: \begin{itemize} \item If the process reads $r_{1} = r_{2} = ⊥$, then we don't care which went first, because the reader (or somebody else) already won. \item If the process reads $r_{1} = 1$ and then $r_{2} = ⊥$, then $p_{1}$ went first. \item If the process reads $r_{2} = 2$ and then $r_{1} = ⊥$, then $p_{2}$ went first. (This requires at least one more read after checking the first case.) \item Otherwise the process saw $r_{1} = 1$ and $r_{2} = 2$. Now read $r_{\MultiWriteShared}$: if it's 1, $p_{2}$ went first; if it's $2$, $p_1$ went first. \end{itemize} Algorithm~\ref{alg-multiwrite-race} requires 2-register writes, and will give us a protocol for 2 processes (since the reader above has to participate somewhere to make the first case work). For $m$ processes, we can do the same thing with $m$-register writes. We have a register $r_{pq} = r_{qp}$ for each pair of distinct processes $p$ and $q$, plus a register $r_{pp}$ for each $p$; this gives a total of $\binom{m}{2} + m = O(m^{2})$ registers. All registers are initialized to $⊥$. Process $p$ then writes its initial preference to some single-writer register $\DataSty{pref}_{p}$ and then simultaneously writes $p$ to $r_{pq}$ for all $q$ (including $r_{pp}$). It then attempts to figure out the first writer by applying the above test for each $q$ to $r_{pq}$ (standing in for $r_{\MultiWriteShared}$), $r_{pp}$ ($r_{1}$) and $r_{qq}$ ($r_{2}$). If it won against all the other processes, it decides its own value. If not, it repeats the test recursively for some $p'$ that beat it until it finds a process that beat everybody, and returns its value. So $m$-register writes solve $m$-process wait-free consensus. A further tweak gets $2m-2$: run two copies of an $(m-1)$-process protocol using separate arrays of registers to decide a winner for each group. Then add a second phase where processes contend across the groups. This involves each process $p$ from group $1$ writing the winning id for its group simultaneously into $s_{p}$ and $s_{pq}$ for each $q$ in the other group. To figure out who won in the end, build a graph of all victories, where there is an edge from $p$ to $q$ if and only if $p$ beat $q$ in Phase 1 or $p$'s id was written before $q$'s id in Phase 2. The winner is the (unique) process with at least one outgoing edge and no incoming edges, which will be the process that won its own group (by writing first) and whose value was written first in Phase 2. One thing to note about the second phase is that, unlike mutex, we can't just have the winners of the two groups fight each other, since this would not give the wait-free property for non-winners. Instead, we have to allow a non-winner $p$ to pick up the slack for a slow winner and fight on behalf of the entire group. This requires an $m$-process write operation to write $s_p$ and all $s_{pq}$ at once. \subsubsection{Matching impossibility result} It might seem that the technique used to boost from $m$-process consensus to $(2m-2)$-process consensus could be repeated to get up to at least $Θ(m^{2})$, but this turns out not to be the case. The essential idea is to show that in order to escape bivalence, we have to get to a configuration $C$ where \emph{every} process is about to do an $m$-register write leading to a univalent configuration (since reads don't help for the usual reasons, and normal writes can be simulated by $m$-register writes with an extra $m-1$ dummy registers), and then argue that these writes can't overlap too much. So suppose we are in such a configuration, and suppose that $Cx$ is 0-valent and $Cy$ is 1-valent, and we also have many other operations $z_{1}\dots{}z_{k}$ that lead to univalent states. Following Herlihy~\cite{Herlihy1991waitfree}, we argue in two steps: \begin{enumerate} \item There is some register that is written to by $x$ alone out of all the pending operations. Proof: Suppose not. Then the 0-valent configuration $Cxyz_{1}\dots{}z_{k}$ is indistinguishable from the 1-valent configuration $Cyz_{1}\dots{}z_{k}$ by any process except $p_{x}$, and we're in trouble. \item There is some register that is written to by $x$ and $y$ but not by any of the $z_{i}$. Proof:: Suppose not. The each register is written by at most one of $x$ and $y$, making it useless for telling which went first; or it is overwritten by some $z_i$, hiding the value that tells which went first. So $Cxyz_{1}\dots{}z_{k}$ is indistinguishable from $Cyxz_{1}\dots{}z_{k}$ for any process other than $p_{x}$ and $p_{y}$, and we're still in trouble. \end{enumerate} Now suppose we have $2m-1$ processes. The first part says that each of the pending operations ($x$, $y$, all of the $z_{i}$) writes to 1 single-writer register and at least $k$ two-writer registers where $k$ is the number of processes leading to a different univalent value. This gives $k+1$ total registers simultaneously written by this operation. Now observe that with $2m-1$ process, there is some set of $m$ processes whose operations all lead to a $b$-valent state; so for any process to get to a ($¬{}b$)-valent state, it must write $m+1$ registers simultaneously. It follows that with only $m$ simultaneous writes we can only do $(2m-2)$-consensus. \subsection{Level \texorpdfstring{$m$}{m}: \texorpdfstring{$m$}{m}-process consensus objects} An $m$-process \concept{consensus object} has a single \FuncSty{consensus} operation that, the first $m$ times it is called, returns the input value in the first operation, and thereafter returns only $⊥$. Clearly this solves $m$-process consensus. To show that it doesn't solve $(m+1)$-process consensus even when augmented with registers, run a bivalent initial configuration to a configuration $C$ where any further operation yields a univalent state. By an argument similar to the $m$-register write case, we can show that the pending operations in $C$ must all be consensus operations on the same consensus object (anything else commutes or overwrites). Now run $Cxyz_{1}\dots{}z_{k}$ and $Cyxz_{1}\dots{}z_{k}$, where $x$ and $y$ lead to 0-valent and 1-valent states, and observe that $p_{k}$ can't distinguish the resulting configurations because all it got was $⊥$. (Note: this works even if the consensus object isn't in its initial state, since we know that before $x$ or $y$ the configuration is still bivalent.) So the $m$-process consensus object has consensus number $m$. This shows that $h^{r}_{m}$ is nonempty at each level. A natural question at this point is whether the inability of $m$-process consensus objects to solve $(m+1)$-process consensus implies robustness of the hierarchy. One might consider the following argument: given any object at level $m$, we can simulate it with an $m$-process consensus object, and since we can't combine $m$-process consensus objects to boost the consensus number, we can't combine any objects they can simulate either. The problem here is that while $m$-process consensus objects can simulate any object in a system with $m$ processes (see below), it may be that some objects can do more in a system with $m+1$ objects while still not solving $(m+1)$-process consensus. A simple way to see this would be to imagine a variant of the $m$-process consensus object that doesn't fail completely after $m$ operations; for example, it might return one of the first two inputs given to it instead of $⊥$. This doesn't help with solving consensus, but it might (or might not) make it too powerful to implement using standard $m$-process consensus objects. \section{Universality of consensus} \label{section-universal-construction} \index{consensus!universality of} \indexConcept{universality of consensus}{Universality of consensus} says that any type that can implement $n$-process consensus can, together with atomic registers, give a wait-free implementation of any object in a system with $n$ processes. That consensus is universal was shown by Herlihy~\cite{Herlihy1991waitfree} and Plotkin~\cite{Plotkin1989}. Both of these papers spend a lot of effort on making sure that both the cost of each operation and the amount of space used is bounded. But if we ignore these constraints, the same result can be shown using a mechanism similar to the replicated state machines of §\ref{section-replicated-state-machines}. Here the processes repeatedly use consensus to decide between candidate histories of the simulated object, and a process successfully completes an operation when its operation (tagged to distinguish it from other similar operations) appears in a winning history. A round structure avoids too much confusion. Details are given in Algorithm~\ref{alg-universal-construction}. \newFunc{\UniversalApply}{apply} \newFunc{\UniversalConsensus}{consensus} \newData{\UniversalOp}{op} \newData{\UniversalRound}{round} \begin{algorithm} \Procedure{$\UniversalApply(π)$}{ \tcp{announce my intended operation} $\UniversalOp[i] ← π$\; \While{\True}{ \tcp{find a recent round} $r ← \max_j \UniversalRound[j]$\; \tcp{obtain the history as of that round} \If{$h_r = ⊥$}{ $h_r ← \UniversalConsensus(c[r], ⊥)$\; } \If{$π \in h_r$}{ \Return value $π$ returns in $h_r$\; } \tcp{else attempt to advance} $h' ← h_r$\; \Foreach{$j$}{ \If{$\UniversalOp[j] \not\in h'$}{ append $\UniversalOp[j]$ to $h'$\; } } $h_{r+1} ← \UniversalConsensus(c[r+1], h')$ \; $\UniversalRound[i] ← r+1$\; } } \caption{A universal construction based on consensus} \label{alg-universal-construction} \end{algorithm} There are some subtleties to this algorithm. The first time that a process calls consensus (on $c[r]$), it may supply a dummy input; the idea is that it is only using the consensus object to obtain the agreed-upon history from a round it missed. It's safe to do this, because no process writes $r$ to its \UniversalRound register until $c[r]$ is complete, so the dummy input can't be accidentally chosen as the correct value. It's not hard to see that whatever $h_{r+1}$ is chosen in $c[r+1]$ is an extension of $h_r$ (it is constructed by appending operations to $h_r$), and that all processes agree on it (by the agreement property of the consensus object $c[r+1]$. So this gives us an increasing sequence of consistent histories. We also need to show that these histories are linearizable. The obvious linearization is just the most recent version of $h_r$. Suppose some call to $\UniversalApply(π_1)$ finishes before a call to $\UniversalApply(π_2)$ starts. Then $π_1$ is contained in some $h_r$ when $\UniversalApply(π_1)$ finishes, and since $π_2$ can only enter $h$ by being appended at the end, we get $π_1$ linearized before $π_2$. Finally, we need to show termination. The algorithm is written with a loop, so in principle it could run forever. But we can argue that no process after executes the loop more than twice. The reason is that a process $p$ puts its operation in $\UniversalOp[p]$ before it calculates $r$; so any process that writes $r' > r$ to \UniversalRound sees $p$'s operation before the next round. It follows that $p$'s value gets included in the history no later than round $r+2$. (We'll see this sort of thing again when we do atomic snapshots in Chapter~\ref{chapter-atomic-snapshots}.) Building a consistent shared history is easier with some particular objects that solve consensus. For example, a \concept{fetch-and-cons} object that supplies an operation that pushes a new head onto a linked list and returns the old head trivially implements the common history above without the need for helping. One way to implement fetch-and-cons is with memory-to-memory swap; to add a new element to the list, create a cell with its \DataSty{next} pointer pointing to itself, then swap the \DataSty{next} field with the \DataSty{head} pointer for the entire list. The solutions we've described here have a number of deficiencies that make them impractical in a real system (even more so than many of the algorithms we've described). If we store entire histories in a register, the register will need to be very, very wide. If we store entire histories as a linked list, it will take an unbounded amount of time to read the list. For solutions to these problems, see \cite[15.3]{AttiyaW2004} or the papers of Herlihy~\cite{Herlihy1991waitfree} and Plotkin~\cite{Plotkin1989}. \myChapter{Atomic snapshots}{2020}{} \label{chapter-atomic-snapshots} We've seen in the previous chapter that there are a lot of things we can't make wait-free with just registers. But there are a lot of things we can. Atomic snapshots are a tool that let us do a lot of these things easily. An \index{object!snapshot} \concept{atomic snapshot object} acts like a collection of $n$ single-writer multi-reader atomic registers with a special \concept{snapshot} operation that returns (what appears to be) the state of all $n$ registers at the same time. This is easy without failures: we simply lock the whole register file, read them all, and unlock them to let all the starving writers in. But it gets harder if we want a protocol that is wait-free, where any process can finish its own snapshot or write even if all the others lock up. We'll give the usual sketchy description of a couple of snapshot algorithms. More details on early snapshot results can be found in~\cite[\S10.3]{AttiyaW2004} or~\cite[\S13.3]{Lynch1996}. There is also a reasonably recent survey by Fich on upper and lower bounds for the problem~\cite{Fich2005}. \section{The basic trick: two identical collects equals a snapshot} \label{section-double-collect} \newData{\SeqNo}{seqno} Let's tag any value written with a sequence number, so that each value written has a \SeqNo field attached to it that increases over time. We can now detect if a new write has occurred between two reads of the same variable. Suppose now that we repeatedly perform \indexConcept{collect}{collects}—reads of all $n$ registers—until two successive collects return exactly the same vector of values and sequence numbers. We can then conclude that precisely these values were present in the registers at some time in between the two collects. This gives us a very simple algorithm for snapshot. Unfortunately, it doesn't terminate if there are a lot of writers around.\footnote{This isn't always a problem, since there may be external factors that keep the writers from showing up too much. Maurice Herlihy and I got away with using exactly this snapshot algorithm in an ancient, pre-snapshot paper on randomized consensus~\cite{AspnesH1990consensus}. The reread-until-no-change idea was used as early as 1977 by Lamport~\cite{Lamport1977}.} So we need some way to slow the writers down, or at least get them to do snapshots for us. \section{Snapshots using double collects with helping} \label{section-AADGMS} This is the approach taken by Afek and his five illustrious co-authors~\cite{AfekADGMS1993} (see also \cite[§10.3]{AttiyaW2004} or \cite[§13.3.2]{Lynch1996}): before a process can write to its register, it first has to complete a snapshot and leave the results behind with its write.\footnote{The algorithm is usually called the AADGMS algorithm by people who can remember all the names—or at least the initials—of the team of superheroes who came up with it (Afek, Attiya, Dolev, Gafni, Merritt, and Shavit). Historically, this was one of three independent solutions to the problem that appeared at about the same time. A similar algorithm for \index{register!composite} \indexConcept{composite register}{composite registers} was given by James Anderson~\cite{Anderson1994} and a somewhat different algorithm for \concept{consistent scan} was given by Aspnes and Herlihy~\cite{AspnesH1990waitfree}. The Afek~\etal{} algorithm had the advantage of using bounded registers (in its full version), and so it and its name for atomic snapshot prevailed over its competitors.} This means that if some slow process (including a slow writer, since now writers need to do snapshots too) is prevented from doing the two-collect snapshot because too much writing is going on, eventually it can just grab and return some pre-packaged snapshot gathered by one of the many successful writers. Specifically, if a process executing a single snapshot operation $σ$ sees values written by a single process $i$ with three different sequence numbers $s_{1}$, $s_{2}$ and $s_3$, then it can be assured that the snapshot $σ_3$ gathered with sequence number $s_{3}$ started no earlier than $s_{2}$ was written (and thus no earlier than $σ$ started, since $σ$ read $s_{1}$ after it started) and ended no later than $σ$ ended (because $σ$ saw it). It follows that the snapshot can safely return $σ_3$, since that represents the value of the registers at some time inside $σ_3$'s interval, which is contained completely within $σ$'s interval. So a snapshot repeatedly does collects until either (a) it gets two identical collects, in which case it can return the results (a \index{scan!direct} \concept{direct scan}, or (b) it sees three different values from the same process, in which case it can take the snapshot collected by the second write (an \index{scan!indirect} \concept{indirect scan}). See pseudocode in Algorithm~\ref{alg-simplified-AADGMS}. Amazingly, despite the fact that updates keep coming and everybody is trying to do snapshots all the time, a snapshot operation of a single process is guaranteed to terminate after at most $n+1$ collects. The reason is that in order to prevent case (a) from holding, the adversary has to supply at least one new value in each collect after the first. But it can only supply one new value for each of the $n-1$ processes that aren't doing collects before case (b) is triggered (it's triggered by the first process that shows up with a second new value). Adding up all the collects gives $1 + (n-1) + 1 = n+1$ collects before one of the cases holds. Since each collect takes $n-1$ read operations (assuming the process is smart enough not to read its own register), a snapshot operation terminates after at most $n^{2}-1$ reads. \newData{\AADGMScount}{count} \newData{\AADGMSvalue}{value} \newData{\AADGMSsnapshot}{snapshot} \newData{\AADGMSinitial}{initial} \newData{\AADGMSprevious}{previous} \begin{algorithm} \Procedure{$\Update_i(A,v)$}{ $s ← \Scan(A)$ \; $A[i] ← \Tuple{A[i].\AADGMScount + 1, v, s}$\; } \Procedure{$\Scan(A)$}{ $\AADGMSinitial ← \Collect(A)$ \; $\AADGMSprevious ← \AADGMSinitial$ \While{\True}{ $s ← \Scan(A)$ \; \uIf{$s = \AADGMSprevious$}{ \tcp{Two identical collects} \Return $s$\; } \ElseIf{$∃j: s[j].\AADGMScount ≥ \AADGMSinitial[j].\AADGMScount + 2$}{ \tcp{Three different counts from $j$} \Return $s[j].\AADGMSsnapshot$\; } \Else{ \tcp{Nothing useful, try again} $\AADGMSprevious ← s$\; } } } \caption{Snapshot of~\cite{AfekADGMS1993} using unbounded registers} \label{alg-simplified-AADGMS} \end{algorithm} For a write operation, a process first performs a snapshot, then writes the new value, the new sequence number, and the result of the snapshot to its register (these are very wide registers). The total cost is $n^{2}-1$ read operations for the snapshot plus $1$ write operation. \subsection{Linearizability} \label{section-AADGMS-linearizability} We now need to argue that the snapshot vectors returned by the Afek~\etal{} algorithm really work, that is, that between each matching \FuncSty{invoke-snapshot} and \FuncSty{respond-snapshot} there was some actual time where the registers in the array contained precisely the values returned in the respond-snapshot action. We do so by assigning a \concept{linearization point} to each snapshot vector, a time at which it appears in the registers (which for correctness of the protocol had better lie within the interval between the snapshot invocation and response). For snapshots obtained through case (a), take any time between the two collects. For snapshots obtained through case (b), take the linearization point already assigned to the snapshot vector provided by the third write. In the latter case we argue by induction on termination times that the linearization point lies inside the snapshot's interval. Note that this means that all snapshots were ultimately collected by two successive collects returning identical values, since any case-(b) snapshot sits on top of a finite regression of case-(b) snapshots that must end with a case-(a) snapshot. This means that any snapshot corresponds to an actual global state of the registers at some point in the execution, which is not true of all snapshot algorithms. It also means that we can replace the registers in the snapshot array with other objects that allow us to detect updates (say, counters or max registers) and still get snapshots. In an actual execution, the fact that we are waiting for double collects with no intervening updates means that if there are many writers, eventually all of them will stall waiting for a case-(a) snapshot to complete. So that snapshot will complete because all the writers are stuck. In a sense, requiring writers to do snapshots first almost gives us a form of locking, but without the vulnerability to failures of a real lock. \subsection{Using bounded registers} The simple version of the Afek~\etal{} algorithm requires unbounded registers (since sequence numbers may grow forever). One of the reasons why this algorithm required so many smart people was to get rid of this assumption: the paper describes a (rather elaborate) mechanism for recycling sequence numbers that prevents unbounded growth (see also \cite[13.3.3]{Lynch1996}). In practice, unbounded registers are probably not really an issue once one has accepted very large registers, but getting rid of them is an interesting theoretical problem. It turns out that with a little cleverness we can drop the sequence numbers entirely. The idea is that we just need a mechanism to detect when somebody has done a lot of writes while a snapshot is in progress. A naive approach would be to have sequence numbers wrap around mod $m$ for some small constant modulus $m$; this fails because if enough snapshots happen between two of my collects, I may notice none of them because all the sequence numbers wrapped around all the way. But we can augment mod-$m$ sequence numbers with a second handshaking mechanism that detects when a large enough number of snapshots have occurred; this acts like the guard bit on an automobile odometer, than signals when the odometer has overflowed to prevent odometer fraud by just running the odometer forward an extra million miles or so. \newFunc{\TryHandshake}{tryHandshake} \newFunc{\CheckHandshake}{checkHandshake} The result is the full version of Afek~\etal~\cite{AfekADGMS1993}. (Our presentation here follows \cite[10.3]{AttiyaW2004}.) The key mechanism for detecting odometer fraud is a \concept{handshake}, a pair of single-writer bits used by two processes to signal each other that they have done something. Call the processes $S$ (for \emph{same}) and $D$ (for \emph{different}), and supposed we have handshake bits $h_{S}$ and $h_{D}$. We then provide operations \TryHandshake (signal that something is happening) and \CheckHandshake (check if something happened) for each process; these operations are asymmetric. The code is: \begin{description} \item[$\TryHandshake(S)$:] $h_{S} ← h_{D}$ (make the two bits the same) \item[$\TryHandshake(D)$:] $h_{D} ← ¬{}h_{S}$ (make the two bits different) \item[$\CheckHandshake(S)$:] return $h_{S} ≠ h_{D}$ (return true if D changed its bit) \item[$\CheckHandshake(D)$:] return $h_{S} = h_{D}$ (return true if S changed its bit) \end{description} The intent is that \CheckHandshake returns true if the other process called \TryHandshake after I did. The situation is a bit messy, however, since \TryHandshake involves two register operations (reading the other bit and then writing my own). So in fact we have to look at the ordering of these read and write events. Let's assume that \CheckHandshake is called by $S$ (so it returns true if and only if it sees different values). Then we have two cases: \begin{enumerate} \item $\CheckHandshake(S)$ returns true. Then $S$ reads a different value in $h_{D}$ from the value it read during its previous call to $\TryHandshake(S)$. It follows that $D$ executed a write as part of a $\TryHandshake(D)$ operation in between $S$'s previous read and its current read. \item $\CheckHandshake(S)$ returns false. Then $S$ reads the same value in $h_{D}$ as it read previously. This does not necessarily mean that $D$ didn't write $h_{D}$ during this interval—it is possible that $D$ is just very out of date, and did a write that didn't change the register value—but it does mean that $D$ didn't perform both a read and a write since $S$'s previous read. \end{enumerate} How do we use this in a snapshot algorithm? The idea is that before performing my two collects, I will execute \TryHandshake on my end of a pair of handshake bits for every other process. After performing my two collects, I'll execute \CheckHandshake. I will also assume each update (after performing a snapshot) toggles a mod-2 sequence number bit on the value stored in its segment of the snapshot array. The hope is that between the toggle and the handshake, I detect any changes. (See \cite[Algorithm 30]{AttiyaW2004} for the actual code.) Does this work? Let's look at cases: \begin{enumerate} \item The toggle bit for some process $q$ is unchanged between the two snapshots taken by $p$. Since the bit is toggled with each update, this means that an even number of updates to $q's$ segment occurred during the interval between $p$'s writes. If this even number is 0, we are happy: no updates means no call to \TryHandshake by $q$, which means we don't see any change in $q$'s segment, which is good, because there wasn't any. If this even number is 2 or more, then we observe that each of these events precedes the following one: \begin{itemize} \item $p$'s call to \TryHandshake. \item $p$'s first read. \item $q$'s first write. \item $q$'s call to \TryHandshake at the start of its second scan. \item $q$'s second write. \item $p$'s second read. \item $p$'s call to \CheckHandshake. \end{itemize} It follows that $q$ both reads and writes the handshake bits in between $p$'s calls to \TryHandshake and \CheckHandshake, so $p$ correctly sees that $q$ has updated its segment. \item The toggle bit for $q$ has changed. Then $q$ did an odd number of updates (i.e., at least one), and $p$ correctly detects this fact. \end{enumerate} What does $p$ do with this information? Each time it sees that $q$ has done a scan, it updates a count for $q$. If the count reaches 3, then $p$ can determine that $q$'s last scanned value is from a scan that is contained completely within the time interval of $p$'s scan. Either this is a \index{scan!direct}\concept{direct scan}, where $q$ actually performs two collects with no changes between them, or it's an \index{scan!indirect}\concept{indirect scan}, where $q$ got its value from some other scan completely contained within $q$'s scan. In the first case $p$ is immediately happy; in the second, we observe that this other scan is also contained within the interval of $p$'s scan, and so (after chasing down a chain of at most $n-1$ indirect scans) we eventually reach a direct scan contained within it that provided the actual value. In either case $p$ returns the value of pair of adjacent collects with no changes between them that occurred during the execution of its scan operation, which gives us linearizability. \section{Faster snapshots using lattice agreement} \label{section-snapshots-lattice-agreement} The Afek~\etal{} algorithm and its contemporaries all require $O(n^2)$ operations for each snapshot. It is possible to get this bound down to $O(n)$ using a more clever algorithm,~\cite{InoueMCT1994} which is the best we can reasonably hope for in the worst case given that (a) even a collect (which doesn't guarantee anything about linearizability) requires $Θ(n)$ operations when implemented in the obvious way, and (b) there is a linear lower bound, due to Jayanti, Tan, and Toueg~\cite{JayantiTT2000}, on a large class of wait-free objects that includes snapshot.\footnote{But see §\ref{section-max-register-snapshots} for a faster alternative if we allow either randomization or limits on the number of times the array is updated.} The first step, due to Attiya, Herlihy, and Rachman~\cite{AttiyaHR1995}, is a reduction to a related problem called \concept{lattice agreement}. \subsection{Lattice agreement} \label{section-lattice-agreement-definition} A \concept{lattice} is a partial order in which every pair of elements $x$, $y$ has a least upper bound $x∨{}y$ called the \concept{join} of $x$ and $y$ and a greatest lower bound $x∧{}y$ called the \concept{meet} of $x$ and $y$. For example, we can make a lattice out of sets by letting join be union and meet be intersection; or we can make a lattice out of integers by making join be $\max$ and meet be $\min$. In the lattice agreement problem, each process starts with an input $x_{i}$ and produces an output $y_{i}$, where both are elements of some lattice. The requirements of the problem are: \begin{description} \item[Comparability]\index{comparability} For all $i$, $j$, $y_{i} ≤ y_{j}$ or $y_{j} ≤ y_{i}$. \item[Downward validity]\index{validity!downward} \index{downward validity} For all $i$, $x_{i} ≤ y_{i}$. \item[Upward validity] \index{validity!upward} \index{upward validity} For all $i$, $y_{i} ≤ x_{1}∨{}x_{2}∨{}x_{3}∨{}\dots{}∨{}x_{n}$. \end{description} These requirements are analogous to the requirements for consensus. Comparability acts like agreement: the views returned by the lattice-agreement protocol are totally ordered. Downward validity says that each process will include its own input in its output. Upward validity acts like validity: an output can't include anything that didn't show up in some input. For the snapshot algorithm, we also demand \concept{wait-freedom}: each process terminates after a bounded number of its own steps, even if other processes fail. Note that if we are really picky, we can observe that we don't actually need meets; a \concept{semi-lattice} that provides only joins is enough. In practice we almost always end up with a full-blown lattice, because (a) we are working with finite sets, and (b) we generally want to include a bottom element $⊥$ that is less than all the other elements, to represent the ``empty'' state of our data structure. But any finite join-semi-lattice with a bottom element turns out to be a lattice, since we can define $x ∧ y$ as the join of all elements $z$ such that $z ≤ x$ and $z ≤ y$. We don't \emph{use} the fact that we are in a lattice anywhere, but it does save us two syllables not to have to say ``semi-lattice agreement.'' \subsection{Connection to vector clocks} \label{section-lattice-agreement-and-vector-clocks} The first step in reducing snapshot to lattice agreement is to have each writer generate a sequence of increasing timestamps $r_{1}, r_{2}, \dots{},$ and a snapshot corresponds to some vector of timestamps $\Tuple{t_{1}, t_{2} \dots{} t_{n}}$, where $t_{i}$ indicates the most recent write by $p_{i}$ that is included in the snapshot (in other words, we are using vector clocks again; see §\ref{section-vector-clocks}). Now define $v≤v'$ if $v_{i}≤v'_{i}$ for all $i$; the resulting partial order is a lattice, and in particular we can compute $x∨{}y$ by the rule $(x∨{}y)_{i} = x_{i}∨{}y_{i}$. Suppose now that we have a bunch of snapshots that satisfy the comparability requirement. This means they are totally ordered. Then we can construct a sequential execution by ordering the snapshots in increasing order with each update operation placed before the first snapshot that includes it. This sequential execution is not necessarily a linearization of the original execution, and a single lattice agreement object won't support more than one operation for each process, but the idea is that we can nonetheless use lattice agreement objects to enforce comparability between concurrent executions of snapshot, while doing some other tricks (exploiting, among other things, the validity properties of the lattice agreement objects) to get linearizability over the full execution. \subsection{The full reduction} \label{section-lattice-agreement-reduction} \newData{\LACollect}{collect} \newData{\LAView}{view} \newData{\LALA}{LA} The Attiya-Herlihy-Rachman algorithm is given as Algorithm~\ref{alg-lattice-agreement-snapshot}. It uses an array of registers $R_{i}$ to hold round numbers (timestamps); an array $S_{i}$ to hold values to scan; an unboundedly humongous array $V_{ir}$ to hold views obtained by each process in some round; and a collection of lattice-agreement objects $\LALA_r$, one for each round. \begin{algorithm} \Procedure{$\Scan()$}{ \For{$\DataSty{attempt} ← 1$ \KwTo $2$}{ $R_{i} ← r ← \max(R_{1}\dots{}R_{n}; R_{i}+1)$ \; $\LACollect ← \Read(S_{1}\dots{}S_{n})$ \; $\LAView ← \LALA_r(\LACollect)$ \; \tcp{max computation requires a collect} \If{$\max(R_{1}\dots{}R_{n}) ≤ R_{i}$\nllabel{line-LA-check}}{ $V_{ir} ← \LAView$\; \Return $V_{ir}$\; } } \tcp{finding nonempty $V_{jr}$ also requires a collect} $V_{ir} ←$ some nonempty $V_{jr}$ \nllabel{line-LA-take-indirect}\; \Return $V_{ir}$\; } \caption{Lattice agreement snapshot} \label{alg-lattice-agreement-snapshot} \end{algorithm} The algorithm makes two attempts to obtain a snapshot. In both cases, the algorithm advances to the most recent round it sees (or its previous round plus one, if nobody else has reached this round yet), attempts a collect, and then runs lattice-agreement to try to get a consistent view. If after getting its first view it finds that some other process has already advanced to a later round, it makes a second attempt at a new, higher round $r'$ and uses some view that it obtains in this second round, either directly from lattice agreement, or (if it discovers that it has again fallen behind), it uses an indirect view from some speedier process. The reason why I throw away my view if I find out you have advanced to a later round is not because the view is bad for me but because it's bad for you: I might have included some late values in my view that you didn't see, breaking consistency between rounds. But I don't have to do this more than once; if the same thing happens on my second attempt, I can use an indirect view as in~\cite{AfekADGMS1993}, knowing that it is safe to do so because any collect that went into this indirect view started after I did. The update operation is the usual update-and-scan procedure; for completeness this is given as Algorithm~\ref{alg-lattice-agreement-update}. To make it easier to reason about the algorithm, we assume that an update returns the result of the embedded scan. \begin{algorithm} \Procedure{$\Update_i(v)$}{ $S_{i} ← (S_{i}.\SeqNo + 1, v)$ \; \Return $\Scan()$\; } \caption{Update for lattice agreement snapshot} \label{alg-lattice-agreement-update} \end{algorithm} \subsection{Why this works} \label{section-lattice-agreement-reduction-proof} We need to show three facts: \begin{enumerate} \item All views returned by the scan operation are comparable; that is, there exists a total order on the set of views (which can be extended to a total order on scan operations by breaking ties using the execution order). \item The view returned by an update operation includes the update (this implies that future views will also include the update, giving the correct behavior for snapshot). \item The total order on views respects the execution order: if $π_1$ and $π_2$ are scan operations that return $v_1$ and $v_2$, then $π_{1} <_{S} π_{2}$ implies $v_{1} ≤ v_{2}$. (This gives us linearization.) \end{enumerate} Let's start with comparability. First observe that any view returned is either a direct view (obtained from $\LALA_r)$ or an indirect view (obtained from $V_{jr}$ for some other process $j$). In the latter case, following the chain of indirect views eventually reaches some direct view. So all views returned for a given round are ultimately outputs of $\LALA_r$ and thus satisfy comparability. But what happens with views from different rounds? The lattice-agreement objects only operate within each round, so we need to ensure that any view returned in round $r$ is included in any subsequent rounds. This is where checking round numbers after calling $\LALA_r$ comes in. Suppose some process $i$ returns a direct view; that is, it sees no higher round number in either its first attempt or its second attempt. Then at the time it starts checking the round number in Line~\ref{line-LA-check}, no process has yet written a round number higher than the round number of $i$'s view (otherwise $i$ would have seen it). So no process with a higher round number has yet executed the corresponding collect operation. When such a process does so, it obtains values that are at least as large as those fed into $\LALA_r$, and $i$'s round-$r$ view is less than or equal to the vector of these values by upward validity of $\LALA_r$, and thus less than or equal to the vector of values returned by $LA_{r'}$ for $r' > r$, by downward validity of $\LALA_{r'}$. So we have comparability of all direct views, which implies comparability of all indirect views as well. To show that each view returned by a scan includes any preceding update, we observe that either a process returns its first-try scan (which includes the update by downward validity) or it returns the results of a scan in the second-try round (which includes the update by downward validity in the later round, since any collect in the second-try round starts after the update occurs). So no updates are missed. Now let's consider two scan operations $π_1$ and $π_2$ where $π_{1}$ precedes $π_{2}$ in the execution. We want to show that, for the views $v_1$ and $v_2$ that these scans return, $v_{1} ≤ v_{2}$. Pick some time between when $π_1$ finishes and $π_2$ starts, and let $s$ be the contents of the registers at this time. Then $v_1 ≤ s$ by upward validity, since any input fed to a lattice agreement object before $π_1$ finishes was collected from a register whose value was no greater than it is in $s$. Similarly, $s ≤ v_2$ by downward validity, because $v_2$ is at least as large as the $\LACollect$ value read by $π_2$, and this is at least as large as $s$. So $v_1 ≤ s ≤ v_2$. \subsection{Implementing lattice agreement} \label{section-lattice-agreement-implementation} There are several known algorithms for implementing lattice agreement, including the original algorithm of Attiya, Herlihy, and Rachman~\cite{AttiyaHR1995} and an adaptive algorithm of Attiya and Fouren~\cite{AttiyaF2001}. The best of them (assuming multi-writer registers) is Inoue~\etal's linear-time lattice agreement protocol~\cite{InoueMCT1994}. The intuition behind this protocol is to implement lattice agreement using divide-and-conquer. The processes are organized into a tree, with each leaf in the tree corresponding to some process's input. Internal nodes of the tree hold data structures that will report increasingly large subsets of the inputs under them as they become available. At each internal node, a double-collect snapshot is used to ensure that the value stored at that node is always the union of two values that appear in its children at the same time. This is used to guarantee that, so long as each child stores an increasing sequence of sets of inputs, the parent does so also. Each process ascends the tree updating nodes as it goes to ensure that its value is included in the final result. A clever data structure is used to ensure that out-of-date smaller sets don't overwrite larger ones at any node, and the cost of using this data structure and carrying out the double-collect snapshot at a node with $m$ leaves below it is shown to be $O(m)$. So the total cost of a snapshot is $O(n + n/2 + n/4 + \dots{} 1) = O(n)$, giving the linear time bound. \newFunc{\InoueUnion}{Union} \newFunc{\InoueReadSet}{ReadSet} \newFunc{\InoueWriteSet}{WriteSet} Let's now look at the details of this protocol. There are two main components: the \InoueUnion algorithm used to compute a new value for each node of the tree, and the \InoueReadSet and \InoueWriteSet operations used to store the data in the node. These are both rather specialized algorithms and depend on the details of the other, so it is not trivial to describe them in isolation from each other; but with a little effort we can describe exactly what each component demands from the other, and show that it gets it. The \InoueUnion algorithm does the usual two-collects-without change trick to get the values of the children and then stores the result. In slightly more detail: \begin{enumerate} \item Perform \InoueReadSet on both children. This returns a set of leaf values. \item Perform \InoueReadSet on both children again. \item If the values obtained are the same in both collects, call \InoueWriteSet on the current node to store the union of the two sets and proceed to the parent node. Otherwise repeat the preceding step. \end{enumerate} The requirement of the \InoueUnion algorithm is that calling \InoueReadSet on a given node returns a non-decreasing sequence of sets of values; that is, if \InoueReadSet returns some set $S$ at a particular time and later returns $S'$, then $S\subseteq{}S'$. We also require that the set returned by \InoueReadSet is a superset of any set written by a \InoueWriteSet that precedes it, and that it is equal to some such set. This last property only works if we guarantee that the values stored by \InoueWriteSet are all comparable (which is shown by induction on the behavior of \InoueUnion at lower levels of the tree). Suppose that all these conditions hold; we want to show that the values written by successive calls to \InoueUnion are all comparable, that is, for any values $S$, $S'$ written by union we have $S\subseteq{}S'$ or $S'\subseteq{}S$. Observe that $S = L\cup{}R$ and $S' = L'\cup{}R'$ where $L$, $R$ and $L'$, $R'$ are sets read from the children. Suppose that the \InoueUnion operation producing $S$ completes its snapshot before the operation producing $S'$. Then $L\subseteq{}L'$ (by the induction hypothesis) and $R\subseteq{}R'$, giving $S\subseteq{}S'$. We now show how to implement the \InoueReadSet and \InoueWriteSet operations. The main thing we want to avoid is the possibility that some large set gets overwritten by a smaller, older one. The solution is to have $m$ registers $a[1\dots m]$, and write a set of size $s$ to every register in $a[1\dots s]$ (each register gets a copy of the entire set). Because register $a[s]$ gets only sets of size $s$ or larger, there is no possibility that our set is overwritten by a smaller one. If we are clever about how we organize this, we can guarantee that the total cost of all calls to \InoueReadSet by a particular process is $O(m)$, as is the cost of the single call to \InoueWriteSet in \InoueUnion. Pseudocode for both is given as Algorithm~\ref{alg-LA-set}. This is a simplified version of the original algorithm from~\cite{InoueMCT1994}, which does the writes in increasing order and thus forces readers to finish incomplete writes that they observe, as in Attiya-Bar-Noy-Dolev~\cite{AttiyaBD1995} (see also Chapter~\ref{chapter-distributed-shared-memory}). \begin{algorithm} \SharedData{array $a[1\dots m]$ of sets, initially $\emptyset$} \LocalData{index $p$, initially $0$} \bigskip \Procedure{$\InoueWriteSet(S)$}{ \For{$i ← \card*{S}$ \DownTo $1$}{ $a[i] ← S$\; } } \bigskip \Procedure{$\InoueReadSet()$}{ \tcp{update $p$ to last nonempty position} \While{$\True$}{ $s ← a[p]$ \; \eIf{$p = m$ \KwOr $a[p+1] = \emptyset$}{ \Break\; }{ $p ← p+1$\; } } \Return $s$\; } \caption{Increasing set data structure} \label{alg-LA-set} \end{algorithm} Naively, one might think that we could just write directly to $a[\card*{S}]$ and skip the previous ones, but this makes it harder for a reader to detect that $a[\card*{S}]$ is occupied. By writing all the previous registers, we make it easy to tell if there is a set of size $\card*{S}$ or bigger in the sequence, and so a reader can start at the beginning and scan forward until it reaches an empty register, secure in the knowledge that no larger value has been written.\footnote{This trick of reading in one direction and writing in another dates back to a paper by Lamport from 1977~\cite{Lamport1977}.} Since we want to guarantee that no reader every spends more that $O(m)$ operations on an array of $m$ registers (even if it does multiple calls to \InoueReadSet), we also have it remember the last location read in each call to \InoueReadSet and start there again on its next call. For \InoueWriteSet, because we only call it once, we don't have to be so clever, and can just have it write all $\card*{S} ≤ m$ registers. We need to show linearizability. We'll do so by assigning a specific linearization point to each high-level operation. Linearize each call to \InoueReadSet at the last time that it reads $a[p]$. Linearize each call to $\InoueWriteSet(S)$ at the first time at which $a[\card*{S}] = S$ and $a[i] \ne \emptyset$ for every $i < \card*{S}$ (in other words, at the first time that some reader might be able to find and return $S$); if there is no such time, linearize the call at the time at which it returns. Since every linearization point is inside its call's interval, this gives a linearization that is consistent with the actual execution. But we have to argue that it is also consistent with a sequential execution, which means that we need to show that every \InoueReadSet operation returns the largest set among those whose corresponding \InoueWriteSet operations are linearized earlier. Let $R$ be a call to \InoueReadSet and $W$ a call to $\InoueWriteSet(S)$. If $R$ returns $S$, then at the time that $R$ reads $S$ from $a[\card*{S}]$, we have that (a) every register $a[i]$ with $i < \card*{S}$ is non-empty (otherwise $R$ would have stopped earlier), and (b) $\card*{S} = m$ or $a[\card*{S}+1] = \emptyset$ (as otherwise $R$ would have kept going after later reading $a[\card*{S}+1]$. From the rule for when \InoueWriteSet calls are linearized, we see that the linearization point of $W$ precedes this time and that the linearization point of any call to \InoueWriteSet with a larger set follows it. So the return value of $R$ is consistent. The payoff: unless we do more updates than snapshots, don't want to assume multi-writer registers, are worried about unbounded space, have a beef with huge registers, or care about constant factors, it costs no more time to do a snapshot than a collect. So in theory we can get away with assuming snapshots pretty much wherever we need them. \section{Practical snapshots using LL/SC} \label{section-snapshots-LL/SC} \newData{\RSTcurrSeq}{currSeq} \newData{\RSTmem}{memory} \newData{\RSThigh}{high} \newData{\RSTlow}{low} \newFunc{\RSTscan}{scan} \newData{\RSTview}{view} \newFunc{\RSTupdate}{update} \newData{\RSTvalue}{value} \newData{\RSTseq}{seq} Though atomic registers are enough for snapshots, it is possible to get a much more efficient snapshot algorithm using stronger synchronization primitives. An algorithm of Riany, Shavit, and Touitou~\cite{RianyST2001} uses \concept{load-linked/store-conditional} objects to build an atomic snapshot protocol with linear-time snapshots and constant-time updates using small registers. We'll give a sketch of this algorithm here. The RST algorithm involves two basic ideas: the first is a snapshot algorithm for a single scanner (i.e., only one process can do snapshots) in which each updater maintains two copies of its segment, a \RSThigh copy (that may be more recent than the current scan) and a \RSTlow copy (that is guaranteed to be no more recent than the current scan). The idea is that when a scan is in progress, updaters ensure that the values in memory at the start of the scan are not overwritten before the scan is completed, by copying them to the low registers, while the high registers allow new values to be written without waiting for the scan to complete. Unbounded sequence numbers, generated by the scanner, are used to tell which values are recent or not. As long as there is only one scanner, nothing needs to be done to ensure that all scans are consistent, and indeed the single-scanner algorithm can be implemented using only atomic registers. But extending the algorithm to multiple scanners is tricky. A simple approach would be to keep a separate low register for each concurrent scan—however, this would require up to $n$ low registers and greatly increase the cost of an update. Instead, the authors devise a mechanism, called a \index{collect!coordinated}\concept{coordinated collect}, that allows the scanners collectively to implement a sequence of \emph{virtual scans} that do not overlap. Each virtual scan is implemented using the single-scanner algorithm, with its output written to a common \emph{view} array that is protected from inconsistent updates using LL/SC operations (CAS also works). A scanner participates in virtual scans until it obtains a virtual scan that is useful to it (this means that the virtual scan has to take place entirely within the interval of the process's actual scan operation); the simplest way to arrange this is to have each scanner perform two virtual scans and return the value obtained by the second one. The paper puts a fair bit of work into ensuring that only $O(n)$ view arrays are needed, which requires handling some extra special cases where particularly slow processes don't manage to grab a view before it is reallocated for a later virtual scan. We avoid this complication by simply assuming an unbounded collection of view arrays; see the paper for how to do this right. A more recent paper by Fatourou and Kallimanis~\cite{FatourouK2007} gives improved time and space complexity using the same basic technique. \subsection{Details of the single-scanner snapshot} The single-scanner snapshot is implemented using a shared \RSTcurrSeq variable (incremented by the scanner but used by all processes) and an array \RSTmem of n snapshot segments, each of which is divided into a \RSThigh and \RSTlow component consisting of a value and a timestamp. Initially, \RSTcurrSeq is 0, and all memory locations are initialized to $(⊥, 0)$. This part of the algorithm does not require LL/SC. A call to \RSTscan\ copies the first of $\RSTmem[j].\RSThigh$ or $\RSTmem[j].\RSTlow$ that has a sequence number less than the current sequence number. Pseudocode is given as Algorithm~\ref{alg-RST-scan}. \begin{algorithm} \Procedure{$\RSTscan()$}{ $\RSTcurrSeq ← \RSTcurrSeq + 1$\; \For{$j ← 0$ \KwTo $n-1$}{ $h ← \RSTmem[j].\RSThigh$ \; \eIf{$h.\RSTseq < \RSTcurrSeq$}{ $\RSTview[j] ← h.\RSTvalue$\; }{ $\RSTview[j] ← \RSTmem[j].\RSTlow.\RSTvalue$\; } } } \caption{Single-scanner snapshot: \FuncSty{scan}} \label{alg-RST-scan} \end{algorithm} The \RSTupdate operation for process $i$ cooperates by copying $\RSTmem[i].\RSThigh$ to $\RSTmem[i].\RSTlow$ if it's old. The \RSTupdate\ operation always writes its value to $\RSTmem[i].\RSThigh$, but preserves the previous value in $\RSTmem[i].\RSTlow$ if its sequence number indicates that it may have been present at the start of the most recent call to \RSTscan. This means that $\RSTscan$ can get the old value if the new value is too recent. Pseudocode is given in Algorithm~\ref{alg-RST-update}. \begin{algorithm} \Procedure{$\RSTupdate()$}{ $\RSTseq ← \RSTcurrSeq$ \; $h ← \RSTmem[i].\RSThigh$ \; \If{$h.\RSTseq \ne \RSTseq$}{ $\RSTmem[i].\RSTlow ← h$\; } $\RSTmem[i].\RSThigh ← (\RSTvalue, \RSTseq)$\; } \caption{Single-scanner snapshot: \FuncSty{update}} \label{alg-RST-update} \end{algorithm} To show this actually works, we need to show that there is a linearization of the scans and updates that has each scan return precisely those values whose corresponding updates are linearized before it. The ordering is based on when each \RSTscan operation $S$ increments \RSTcurrSeq and when each \RSTupdate\ operation $U$ reads it; specifically: \begin{itemize} \item If $U$ reads \RSTcurrSeq after $S$ increments it, then $S < U$. \item If $U$ reads \RSTcurrSeq before $S$ increments it and $S$ reads $\RSTmem[i].\RSThigh$ (where $i$ is the process carrying out $U$) before $U$ writes it, then $S < U$. \item If $U$ reads \RSTcurrSeq before $S$ increments it, but $S$ reads $\RSTmem[i].\RSThigh$ after $U$ writes it, then $U < S$. \end{itemize} Updates are ordered based on intervening scans (i.e., $U_1 < U_2$ if $U_1<S$ and $S<U_2$ by the above rules), or by the order in which they read \RSTcurrSeq if there is no intervening scan. To show this is a linearization, we need first to show that it extends the ordering between operations in the original schedule. Each of the above rules has $π_1 < π_2$ only if some low-level operation of $π_1$ precedes some low-level operation of $π_2$, with the exception of the transitive ordering of two update events with an intervening scan. But in this last case we observe that if $U_1<S$, then $U_1$ writes $\RSTmem[i].\RSThigh$ before $S$ reads it, so if $U_1$ precedes $U_2$ in the actual execution, $U_2$ must write $\RSTmem[i].\RSThigh$ after $S$ reads it, implying $S<U_2$. Now we show that the values returned by \RSTscan are consistent with the linearization ordering; that, is, for each $i$, \RSTscan copies to $\RSTview[i]$ the value in the last \RSTupdate by process $i$ in the linearization. Examining the code for \RSTscan, we see that a \RSTscan operation $S$ takes $\RSTmem[i].\RSThigh$ if its sequence number is less than $\RSTcurrSeq$, i.e., if the \RSTupdate operation $U$ that wrote it read \RSTcurrSeq before $S$ incremented it and wrote $\RSTmem[i].\RSThigh$ before $S$ read it; this gives $U<S$. Alternatively, if \RSTscan takes $\RSTmem[i].\RSTlow$, then $\RSTmem[i].\RSTlow$ was copied by some update operation $U'$ from the value written to $\RSTmem[i].\RSThigh$ by some update $U$ that read \RSTcurrSeq before $S$ incremented it. Here $U'$ must have written $\RSTmem[i].\RSThigh$ before $S$ read it (otherwise $S$ would have taken the old value left by $U$) and since $U$ precedes $U'$ (being an operation of the same process) it must therefor also have written $\RSTmem[i].\RSThigh$ before $S$ read it. So again we get the first case of the linearization ordering and $U<S$. So far we have shown only that $S$ obtains values that were linearized before it, but not that it ignores values that were linearized after it. So now let's consider some $U$ with $S < U$. Then one of two cases holds: \begin{itemize} \item $U$ reads \RSTcurrSeq after $S$ increments it. Then $U$ writes a sequence number in $\RSTmem[i].\RSThigh$ that is greater than or equal to the \RSTcurrSeq value used by $S$; so $S$ returns $\RSTmem[i].\RSTlow$ instead, which can't have a sequence number equal to \RSTcurrSeq and thus can't be $U$'s value either. \item $U$ reads \RSTcurrSeq before $S$ increments it but writes $\RSTmem[i].\RSThigh$ after $S$ reads it. Now $S$ won't return $U$'s value from $\RSTmem[i].\RSThigh$ (it didn't read it), and won't get it from $\RSTmem[i].\RSTlow$ either (because the value that \emph{is} in $\RSTmem[i].\RSThigh$ will have $\DataSty{seq} < \RSTcurrSeq$, and so $S$ will take that instead). \end{itemize} So in either case, if $S<U$, then $S$ doesn't return $U$'s value. This concludes the proof of correctness. \subsection{Extension to multiple scanners} See the paper for details. The essential idea: \RSTview now represents a \emph{virtual scan} $\RSTview_{r}$ generated cooperatively by all the scanners working together in some asynchronous round $r$. To avoid conflicts, we update $\RSTview_{r}$ using LL/SC or compare-and-swap (so that only the first scanner to write wins), and pretend that reads of $\RSTmem[i]$ by losers didn't happen. When $\RSTview_{r}$ is full, start a new virtual scan and advance to the next round (and thus the next $\RSTview_{r+1}$). \section{Applications} \label{section-snapshot-applications} Here we describe a few things we can do with snapshots. \subsection{Multi-writer registers from single-writer registers} One application of atomic snapshot is building multi-writer registers from single-writer registers. The idea is straightforward: to perform a write, a process does a snapshot to obtain the maximum sequence number, tags its own value with this sequence number plus one, and then writes it. A read consists of a snapshot followed by returning the value associated with the largest sequence number (breaking ties by process id). (See~\cite[\S13.5]{Lynch1996} for a proof that this actually works.) This requires using a snapshot that doesn't use multi-writer registers, and turns out to be overkill in practice; there are simpler algorithms that give $O(n)$ cost for reads and writes based on timestamps (see~\cite[10.2.3]{AttiyaW2004}). With additional work, it is even possible to eliminate the requirement of multi-reader registers, and get a simulation of multi-writer multi-reader registers that goes all the way down to single-writer single-read registers, or even single-writer single-reader bits. See \cite[§\S10.2.1--10.2.2]{AttiyaW2004} or \cite[\S13.4]{Lynch1996} for details. \subsection{Counters} Given atomic snapshots, it's easy to build a counter (supporting increment, decrement, and read operations); or, in more generality, a generalized counter (supporting increments by arbitrary amounts); or, in even more generality, an object supporting any collection of commutative and associative update operations (as long as these operations don't return anything). The idea is that each process stores in its segment the total of all operations it has performed so far, and a read operation is implemented using a snapshot followed by summing the results. This is a case where it is reasonable to consider multi-writer registers in building the snapshot implementation, because there is not necessarily any circularity in doing so. \subsection{Resilient snapshot objects} The previous examples can be generalized to objects with operations that either read the current state of the object but don't update it or update the state but return nothing, provided the update operations either overwrite each other (so that $Cxy = Cy$ or $Cyx = Cx$) or commute (so that $Cxy = Cyx$). This was shown by Aspnes and Herlihy~\cite{AspnesH1990waitfree} and improved on by Anderson and Moir~\cite{AndersonM1993} by eliminating unbounded space usage. Anderson and Moir also defined the terms \index{object!snapshot}\indexConcept{snapshot object}{snapshot objects} for those with separate read and update operations and \index{object!resilient} \index{resilient object} \concept{resilience} for the property that all operations commute or overwrite. The basic idea underneath both of these papers is to use the multi-writer register construction given above, but break ties among operations with the same sequence numbers by first placing overwritten operations before overwriting operations and only then using process ids. This \emph{almost} shows that snapshots can implement any object with consensus number 1 where update operations return nothing, because an object that is not resilient violates the commute-or-overwrite condition in some configuration has consensus number at least 2 (see §\ref{section-wait-free-level-2})—in Herlihy's terminology, non-resilient objects have interfering operations. It doesn't quite work (as observed in the Anderson-Moir paper), because the tie-breaking procedure assumes a static ordering on which operations overwrite each other, so that given operations $x$ and $y$ where $y$ overwrites $x$, $y$ overwrites $x$ in any configuration. But there may be objects with a \emph{dynamic} ordering to how operations interfere, where $y$ overwrites $x$ in some configuration, $x$ overwrites $y$ in another, and perhaps even the two operations commute in yet another. This prevents us from achieving consensus, but also breaks the tie-breaking technique. So it may be possible that there are objects with consensus number 1 and no-return updates that we still can't implement using only registers. \myChapter{Lower bounds on perturbable objects}{2020}{} \label{chapter-JTT} Being able to do snapshots in linear time means that we can build linearizable counters, generalized counters, max registers, and so on, in linear time, by having each reader take a snapshot and combine the contributions of each updater using the appropriate commutative and associative operation. A natural question is whether we can do better by exploiting the particular features of these objects. Unfortunately, the Jayanti-Tan-Toueg~\cite{JayantiTT2000} lower bound for \concept{perturbable} objects says each of these objects requires $n-1$ space and $n-1$ steps for a read operation in the worst case, for any solo-terminating deterministic implementation from historyless objects. Like Burns-Lynch, this is a worst-case bound based on a covering argument, so it may be possible to evade it in some cases using either randomization or a restriction on the length of an execution (see Chapter~\ref{chapter-restricted-use}). \concept{Perturbable} means that the object has a particular property that makes the proof work, essentially that the outcome of certain special executions can be changed by stuffing lots of extra update operations in the middle (see below for details). \index{termination!solo} \index{solo termination} \indexConcept{solo-terminating}{Solo-terminating} means that a process finishes its current operation in a finite number of steps if no other process takes steps in between; it is a much weaker condition, for example, than wait-freedom. \index{object!historyless} \indexConcept{historyless object}{Historyless objects} are those for which any operation either never changes the state (like a read, but it could be weaker) or always sets the state to a value that depends only on the operation and not the previous value (like a write, but it may also return some information about the old state). The point of historyless objects is that covering arguments work for them: if there is a process with a pending update operations on some object, the adversary can use it at any time to wipe out the state of the object and hide any previous operations from any process except the updater (who, in a typical covering argument, is quietly killed to keep it from telling anybody what it saw). Atomic registers are a common example of a historyless object: the read never changes the state, and the write always replaces it. \index{object!swap} \indexConcept{swap object}{Swap objects} (with a swap operation that writes a new state while returning the old state) are the canonical example, since they can implement any other historyless object (and even have consensus number 2, showing that even extra consensus power doesn't necessarily help here). Test-and-sets (which are basically one-bit swap objects where you can only swap in $1$) are also historyless. In contrast, anything that looks like a counter or similar object where the new state is a combination of the old state and the operation is \emph{not} historyless. This is important because many of these objects turn out to be perturbable, and if they were also historyless, we'd get a contradiction. Below is a sketch of the proof. See the original paper~\cite{JayantiTT2000} for more details. The basic idea is to build a sequence of executions of the form $Λ_{k}Σ_{k}π$, where $Λ_{k}$ is a preamble consisting of various complete update operations and $k$ incomplete update operations by processes $p_1$ through $p_{n-1}$, $Σ_{k}$ delivers $k$ delayed writes from the incomplete operations in $Λ_{k},$ and $π$ is a read operation by $p_n$. To make our life easier, we'll assume that $π$ performs only read steps.\footnote{The idea is that if $π$ does anything else, then the return values of other steps can be simulated by doing a $\Read$ in place of the first step and using the property of being historyless to compute the return values of subsequent steps. There is still a possible objection that we might have some historyless objects that don't even provide $\Read$ steps. The easiest way to work around this is to assume that our objects do in fact provide a $\Read$ step, because taking the $\Read$ step away isn't going to make implementing the candidate perturbable object any easier.} We'll expand $Λ_k Σ_k$ to $Λ_{k+1} Σ_{k+1}$ by inserting new operations in between $Λ_k$ and $Σ_k$, and argue that because those operations can change the value returned by $π$, one of them must write an object not covered in $Σ_k$, which will (after some more work) allow us to cover yet another object. In order for these covered objects to keep accumulating, the reader has to keep looking at them. To a first approximation, this means that we want the first $k$ reads done by $π$ to be from objects written in $Σ_k$: since the values seen by the reader for these objects never change, the (deterministic) reader will continue to read them even as we add more operations before $Σ_k$. Unfortunately, this does not quite match all possible cases, because it may be that $π$ performs useless reads of objects that aren't covered in $Σ_k$ but that aren't written to by anybody anyway. So we have the more technical condition that $π$ has an initial prefix that only includes covered reads and useless reads: formally, there is a prefix $π'$ of $π$ that includes at least one read operation of every object covered by $Σ_k$, such that any other read operation in $π'$ reads an object whose state cannot be changed by any step that can be performed by any sequence of operations by processes $p_1$ through $p_{n-1}$ that can be inserted between $Λ_k$ and $Σ_k π$. The induction hypothesis is that an execution $Λ_k Σ_k$ with these properties exists for each $k ≤ n-1$. For the base case, $Λ_{0}Σ_{0} = \Tuple{}$. This covers $0$ reads by $π$. For the induction step, we start with $Λ_k Σ_k$, and look for a sequence of operations $γ$ that we can insert in between $Λ_k$ and $Σ_k$ that changes what $π$ returns in $Λ_k γ Σ_k π$ from what it returned in $Λ_k γ Σ_k$. This is where perturbability comes in: an object is defined to be \concept{perturbable} if such a sequence $γ$ always exists. Some examples of $γ$: \begin{itemize} \item For a snapshot object, let $γ$ write to a component that is not written to by any of the operations in $Σ_k$. \item For a max register, let $γ$ include a bigger write than all the others. \item For a counter, let $γ$ include at least $n$ increments. The same works for a mod-$m$ counter if $m$ is at least $2n$. (Why $n$ increments? With fewer increments, we can make $π$ return the same value by being sneaky about when the partial increments represented in $Σ_{k}$ are linearized.) \end{itemize} In contrast, historyless objects (including atomic registers) are not perturbable: if $Σ_{k}$ includes a write that sets the value of the object, no set of operations inserted before it will change this value. This is good, because we know that it only takes one atomic register to implement an atomic register. Assuming that our object is perturbable, now we want to use the existence of $γ$ to generate our bigger execution $Λ_{k+1} Σ_{k+1}$. As in the Burns-Lynch mutex bound~\cite{BurnsL1993}, we will be arguing that $γ$ must include a write to an object that is not covered by the $k$ delayed writes. Also as in Burns-Lynch, it turns out that it is not enough just to delay this particular write, because it might not cover the specific object we want. Instead, we look for an alternative $γ'$ that changes the value of the earliest object read by $π$ that can be changed. We know that some such $γ'$ exists, because $γ$ writes to some such object, so there must be a first place in the execution of $π$ where the output of an object can change, and there must be some $γ'$ that makes that change. Note however that $γ'$ that hits that earliest object need not be the same as the $γ$ used to demonstrate perturbability, and indeed it may be that $γ'$ is very different from $γ$—in particular, it may be much longer. So now we expand $γ' = αβδ$, where $β$ is the magic write to the uncovered object, and let $Λ_{k+1} = Λ_{k}αδ'$ and $Σ_{k+1} = β Σ_{k}$, where $δ'$ consists of running all incomplete operations in $α$ except the one that include $β$ to completion. We've now covered $k+1$ distinct objects in $Σ_k$. It remains only to show that the technical condition that any uncovered object that $π$ reads before reading all the covered objects can't have its value changed by inserting additional operations. Suppose that there is a sequence of operations $κ$ such that $Λ_{k+1} κ$ changes one of these forbidden uncovered objects. But $Λ_{k+1} κ = Λ_k α κ$, and so $γ'' = ακ$ changes an object that either (a) can't be changed because of the technical condition in the induction hypothesis for $k$, or (b) changes an object that $π$ reads before the object covered by $β$. In the second case, this $γ''$ changes an earlier object that $γ'$, contradicting the choice of $γ'$. It follows that we do in fact manage to cover $k+1$ objects while satisfying the technical condition, and the induction hypothesis holds for $k+1$. We can repeat this step until we've covered $n-1$ objects. This implies that there \emph{are} at least $n-1$ objects (the space lower bound), and in the worst case some reader reads all of them (the step complexity lower bound). \myChapter{Restricted-use objects}{2020}{} \label{chapter-restricted-use} The Jayanti-Tan-Toueg bound puts a hard floor under the worst-case complexity of almost anything interesting we'd like to do wait-free in a system that provides only historyless objects as primitives. As with the consensus hierarchy lower bounds, we could interpret this as a reason to demand stronger primivitives. Or we could look for ways to bypass the JTT bound. One approach is to modify our target objects so that they are no longer perturbable. This can be done by limiting their use: a counter or max register that can only change its value a limited number of times is not perturbable, because once we hit the limit, there is no perturbing sequence of operations that we can insert between $Λ_k$ and $Σ_k$ in the JTT execution that changes the value returned by the eventual reader. This observation motivated a line of work on restricted-use max registers~\cite{AspnesAC2012} and restricted-use snapshots~\cite{AspnesACHE2015} that have polylogarithmic worst-case individual step complexity assuming a polynomial limit on updates. While restricted-use objects might not be all that exciting on their own, they in turn have served as building blocks for implementations of snapshots with polylogarithmic expected individual step complexity~\cite{AspnesC2013} or polylogarithmic amortized individual step complexity~\cite{BaigHMT2020}. In this chapter, we will concentrate on the original restricted-use max register construction of Aspnes, Attiya, and Censor-Hillel~\cite{AspnesAC2012}, and its extension to give restricted-use snapshots by Aspnes~\etal~\cite{AspnesACHE2015}. \section{Max registers} \label{section-max-register-definition} We will start by implementing a restricted-use \index{register!max}\concept{max register}~\cite{AspnesAC2012}, for which read operation returns the largest value previously written, as opposed to the last value previously written. So after writes of 0, 3, 5, 2, 6, 11, 7, 1, 9, a read operation will return 11. In general, max registers are perturbable objects in the sense of the Jayanti-Tan-Toueg bound, so in the worst case a max-register read will have to read at least $n-1$ distinct atomic registers, giving an $n-1$ lower bound on both step complexity and space. But we can get around this by considering bounded max registers, which only hold values in some range $0\dots m-1$. These are not perturbable because once we hit the upper bound we can no longer insert new operations to change the value returned by a read. This allows for a much more efficient implementation (at least in terms of step complexity) when $m$ is not too big. \section{Implementing bounded max registers} \label{section-max-register-implementation} This implementation is from a paper by Aspnes, Attiya, and Censor-Hillel~\cite{AspnesAC2012}. The same paper shows that it is in a certain sense the only possible implementation of a wait-free restricted max register (see §\ref{section-max-register-lower-bound}). For $m=1$, the implementation is trivial: write does nothing and read always returns $0$. \newcommand{\DataSty{left}\xspace}{\DataSty{left}\xspace} \newcommand{\DataSty{right}\xspace}{\DataSty{right}\xspace} \newcommand{\DataSty{switch}\xspace}{\DataSty{switch}\xspace} For larger $m$, we'll show how to paste together two max registers \DataSty{left}\xspace and \DataSty{right}\xspace with $m_{0}$ and $m_{1}$ values together to get a max register $r$ with $m_{0}+m_{1}$ values. We'll think of each value stored in the max register as a bit-vector, with bit-vectors ordered lexicographically. In addition to \DataSty{left}\xspace and \DataSty{right}\xspace, we will need a 1-bit atomic register \DataSty{switch}\xspace used to choose between them. The read procedure is straightforward and is shown in Algorithm~\ref{alg-max-register-read}; essentially we just look at \DataSty{switch}\xspace, read the appropriate register, and prepend the value of \DataSty{switch}\xspace to what we get. \begin{algorithm} \Procedure{$\Read(r)$}{ \eIf{$\DataSty{switch}\xspace = 0$}{ \Return $0:\Read(\DataSty{left}\xspace)$\; }{ \Return $1:\Read(\DataSty{right}\xspace)$\; } } \caption{Max register read operation} \label{alg-max-register-read} \end{algorithm} For write operations, we have two somewhat asymmetrical cases depending on whether the value we are writing starts with a 0 bit or a 1 bit. These are shown in Algorithm~\ref{alg-max-register-write}. \begin{algorithm} \Procedure{$\Write(r, 0x)$}{ \If{$\DataSty{switch}\xspace = 0$}{ $\Write(\DataSty{left}\xspace, x)$\; } } \Procedure{$\Write(r, 1x)$}{ $\Write(\DataSty{right}\xspace, x)$ \; $\DataSty{switch}\xspace ← 1$\; } \caption{Max register write operations} \label{alg-max-register-write} \end{algorithm} The intuition is that the max register is really a big tree of switch variables, and we store a particular bit-vector in the max register by setting to 1 the switches needed to make $\Read$ follow the path corresponding to that bit-vector. The procedure for writing $0x$ tests \DataSty{switch}\xspace first, because once \DataSty{switch}\xspace gets set to $1$, any $0x$ values are smaller than the largest value, and we don't want them getting written to \DataSty{left}\xspace where they might confuse particularly slow readers into returning a value we can't linearize. The procedure for writing $1x$ sets \DataSty{switch}\xspace second, because (a) it doesn't need to test \DataSty{switch}\xspace, since $1x$ always beats $0x$, and (b) it's not safe to send a reader down into \DataSty{right}\xspace until some value has actually been written there. It's easy to see that $\Read$ and $\Write$ operations both require exactly one operation per bit of the value read or written. To show that we get linearizability, we give an explicit linearization ordering (see the paper for a full proof that this works): \begin{enumerate} \item All operations that read $0$ from \DataSty{switch}\xspace go in the first pile. \begin{enumerate} \item Within this pile, we sort operations using the linearization ordering for \DataSty{left}\xspace. \end{enumerate} \item All operations that read $1$ from \DataSty{switch}\xspace or write $1$ to \DataSty{switch}\xspace go in the second pile, which is ordered after the first pile. \begin{enumerate} \item Within this pile, operations that touch \DataSty{right}\xspace are ordered using the linearization ordering for \DataSty{right}\xspace. Operations that don't (which are the ``do nothing'' writes for $0x$ values) are placed consistently with the actual execution order. \end{enumerate} \end{enumerate} To show that this gives a valid linearization, we have to argue first that any $\Read$ operation returns the largest earlier $\Write$ argument and that we don't put any non-concurrent operations out of order. For the first part, any $\Read$ in the $0$ pile returns $0 : \Read(\DataSty{left}\xspace)$, and $\Read(\DataSty{left}\xspace)$ returns (assuming \DataSty{left}\xspace is a linearizable max register) the largest value previously written to left, which will be the largest value linearized before the \Read, or the all-0 vector if there is no such value. In either case we are happy. Any \Read in the 1 pile returns $1 : \Read(\DataSty{right}\xspace)$. Here we have to guard against the possibility of getting an all-0 vector from $\Read(\DataSty{right}\xspace)$ if no $\Write$ operations linearize before the $\Read$. But any $\Write$ operation that writes $1x$ doesn't set \DataSty{switch}\xspace to 1 until after it writes to \DataSty{right}\xspace, so no \Read operation ever starts $\Read(\DataSty{right}\xspace)$ until after at least one $\Write$ to \DataSty{right}\xspace has completed, implying that that $\Write$ to \DataSty{right}\xspace linearizes before the \Read from \DataSty{right}\xspace. So in all the second-pile operations linearize as well. \section{Encoding the set of values} \label{section-max-register-encoding} If we structure our max register as a balanced tree of depth $k$, we are essentially encoding the values $0\dots 2^{k}-1$ in binary, and the cost of performing a read or write operation on an $m$-valued register is exactly $k = \left\lceil\lg m\right\rceil$. But if we are willing to build an unbalanced tree, any \concept{prefix code} will work. The paper describes a method of building a max register where the cost of each operation that writes or reads a value $v$ is $O(\log v)$. The essential idea is to build a tree consisting of a rightward path with increasingly large left subtrees hanging off of it, where each of these left subtrees is twice as big as the previous. This means that after following a path encoded as $1^{k}0$, we hit a $2^{k}$-valued max register. The value returned after reading some $v'$ from this max register is $v' + (2^{k}-1)$, where the $2^{k}-1$ term takes into account all the values represented by earlier max registers in the chain. Formally, this is equivalent to encoding values using an \concept{Elias gamma code}, tweaked slightly by changing the prefixes from $0^{k}1$ to $1^{k}0$ to get the ordering right. \section{Unbounded max registers} \label{section-max-register-unbounded} While the unbalanced-tree construction could be used to get an unbounded max register, it is possible that read operations might not terminate (if enough writes keep setting 1 bits on the right path before the read gets to them) and for very large values the cost even of terminating reads becomes higher than what we can get out of a snapshot. Here is the snapshot-based method: if each process writes its own contribution to the max register to a single-writer register, then we can read the max register by taking a snapshot and returning the maximum value. (It is not hard to show that this is linearizable.) This gives an unbounded max register with read and write cost $O(n)$. So by choosing this in preference to the balanced tree when $m$ is large, the cost of either operation on a max register is $\min\left(\left\lceil\lg m\right\rceil, O(n)\right)$. We can combine this with the unbalanced tree by terminating the right path with a snapshot-based max register. This gives a cost for reads and writes of values $v$ of $O(\min(\log v, n))$. \section{Lower bound} \label{section-max-register-lower-bound} The $\min(\left\lceil\lg m\right\rceil, n-1)$ cost of a max register read turns out to be exactly optimal. Intuitively, we can show by a covering argument that once some process attempts to write to a particular atomic register, then any subsequent writes convey no additional information (because they can be overwritten by the first delayed write)—so in effect, no algorithm can use get more than one bit of information out of each atomic register. But as always, turning this intuition into an actual proof requires a bit more work. We will consider solo-terminating executions in which $n-1$ writers do any number of max-register writes in some initial prefix $Λ$, followed by a single max-register read $π$ by process $p_n$. Let $T(m,n)$ be the optimal reader cost for executions with this structure with $m$ values, and let $r$ be the first register read by process $p_n$, assuming it is running an algorithm optimized for this class of executions (we do not even require it to be correct for other executions). We are now going split up our set of values based on which will cause a write operation to write to $r$. Let $S_{k}$ be the set of all sequences of writes that only write values $≤ k$. Let $t$ be the smallest value such that some execution in $S_{t}$ writes to $r$ (there must be some such $t$, or our reader can omit reading $r$, which contradicts the assumption that it is optimal). \begin{description} \item[Case 1] Since $t$ is smallest, no execution in $S_{t-1}$ writes to $r$. If we restrict writes to values $≤ t-1$, we can omit reading $r$, giving $T(t,n) ≤ T(m,n) - 1$ or $T(m,n) ≥ T(t,n) + 1$. \item[Case 2] Let $α$ be some execution in $S_{t}$ that writes to $r$. \begin{itemize} \item Split $α$ as $α'δβ$ where $δ$ is the first write to $r$ by some process $p_{i}$. \item Construct a new execution $α'\eta$ by letting all the max-register writes except the one performing $δ$ finish. \item Now consider any execution $α'\eta\gammaδ$, where $\gamma$ is any sequence of max-register writes with values $≥ t$ that excludes $p_{i}$ and $p_{n}$. Then $p_{n}$ always sees the same value in $r$ following these executions, but otherwise (starting after $α'\eta$) we have an $(n-1)$-process max-register with values $t$ through $m-1$. \item Omit the read of $r$ again to get $T(m,n) ≥ T(m-t, n-1) + 1$. \end{itemize} \end{description} We've shown the recurrence $T(m,n) ≥ \min_{t}(\max(T(t,n), T(m-t,n))) + 1$, with base cases $T(1,n) = 0$ and $T(m,1) = 0$. The solution to this recurrence is exactly $\min(\left\lceil\lg m\right\rceil, n-1)$, which is the same, except for a constant factor on $n$, as the upper bound we got by choosing between a balanced tree for small $m$ and a snapshot for $m ≥ 2^{n-1}$. For small $m$, the recursive split we get is also the same as in the tree-based algorithm: call the $r$ register \DataSty{switch}\xspace and you can extract a tree from whatever algorithm somebody gives you. So this says that the tree-based algorithm is (up to choice of the tree) essentially the unique optimal bounded max register implementation for $m ≤ 2^{n-1}$. It is also possible to show lower bounds on randomized implementations of max registers and other restricted-use objects. See~\cite{AspnesAC2012,AspnesCAH2016,HendlerK2014} for examples. \section{Max-register snapshots} \label{section-max-register-snapshots} \newData{\MRhead}{head} \newData{\MRtail}{tail} With some tinkering, it's possible to extend the max-register construction to get an array of max registers that supports snapshots. The description in this section follows~\cite{AspnesACHE2015}, with some updates to fix a bug noted in the original paper in an erratum published by the authors~\cite{AspnesACHE2015erratum}. Formally, a \index{array!max}\concept{max array} is an object $a$ that supports an operation $\Write(a, i, v)$ that sets $a[i] ← \max(v, a[i])$, and an operation $\Read(a)$ that returns a snapshot of all components of the array. The first step in building this beast is to do it for two components. The resulting \index{array!max!2-component} \index{max array!2-component} \concept{$2$-component max array} can then be used as a building block for larger max arrays and for fast restricted-used snapshots in general. A $k \times \ell$ max array $a$ is one that permits values in the range $0 \dots k-1$ in $a[0]$ and $0 \dots \ell-1$ in $a[1]$. We think of $a[0]$ as the \MRhead of the max array and $a[1]$ as the \MRtail. We'll show how to construct such an object recursively from smaller objects of the same type, analogous to the construction of an $m$-valued max register (which we can think of as a $m \times 1$ max array). The idea is to split \MRhead into two pieces \DataSty{left}\xspace and \DataSty{right}\xspace as before, while representing \MRtail as a master copy stored in a max register at the top of the tree plus cached copies at every internal node. These cached copies are updated by readers at times carefully chosen to ensure linearizability. The base of the construction is an $\ell$-valued max register $r$, used directly as a $1 \times \ell$ max array; this is the case where the \MRhead component is trivial and we only need to store $a.\MRtail = r$. Here calling $\Write(a, 0, v)$ does nothing, while $\Write(a, 1, v)$ maps to $\Write(r, v)$, and $\Read(a)$ returns $\langle 0, \Read(r) \rangle$. For larger values of $k$, paste a $k_\DataSty{left}\xspace\times \ell$ max array \DataSty{left}\xspace and a $k_\DataSty{right}\xspace \times \ell$ max array \DataSty{right}\xspace together to get a $(k_\DataSty{left}\xspace+k_\DataSty{right}\xspace)\times \ell$ max array. This construction uses a \DataSty{switch}\xspace variable as in the basic construction, along with an $\ell$-valued max register $\MRtail$ that is used to store the value of $a[1]$. Calls to $\Write(a, 0, v)$ and $\Read(a)$ follow the structure of the corresponding operations for a simple max register, with some extra work in $\Read$ to make sure that the value in $\MRtail$ propagates into \DataSty{left}\xspace and \DataSty{right}\xspace as needed to ensure the correct value is returned. A call to $\Write(a, 1, v)$ operation writes $\MRtail$ directly, and then calls $\Read(a)$ to propagate the new value as well.\footnote{This call to $\Read(a)$ was omitted in the original published version of the algorithm~\cite{AspnesACHE2015}, but was added in an erratum by the authors~\cite{AspnesACHE2015erratum}. Without it, the implementation can violate linearizability in some executions.} Pseudocode is given in Algorithm~\ref{alg-max-array}. \begin{algorithm} \Procedure{$\Write(a, i, v)$}{ \eIf{$i = 0$} { \eIf{$v < k_\DataSty{left}\xspace$}{ \If{$a.\DataSty{switch}\xspace = 0$}{ $\Write(a.\DataSty{left}\xspace, 0, v)$\; } }{ $\Write(a.\DataSty{right}\xspace, 0, v-k_\DataSty{left}\xspace)$ \; $a.\DataSty{switch}\xspace ← 1$\; } }{ $\Write(a.\MRtail, v)$\; $\Read(a)$\; } } \bigskip \Procedure{$\Read(a)$}{ $x ← \Read(a.\MRtail)$ \; \eIf{$a.\DataSty{switch}\xspace = 0$}{ $\Write(a.\DataSty{left}\xspace, 1, x)$ \; \Return $\Read(a.\DataSty{left}\xspace)$\; }{ $x ← \Read(a.\MRtail)$ \; $\Write(a.\DataSty{right}\xspace, 1, x)$ \; \Return $\langle k_\DataSty{left}\xspace, 0 \rangle + \Read(a.\DataSty{right}\xspace)$\; } } \caption{Recursive construction of a $2$-component max array} \label{alg-max-array} \end{algorithm} The individual step complexity of each operation is easily computed. Assuming a balanced tree, $\Write(a, 0, v)$ takes exactly $\ceil{\lg k}$ steps, while $\Write(a, 1, v)$ costs exactly $\ceil{\lg \ell}$ steps plus the cost of $\Read(a)$. Read operations are more complicated. In the worst case, we have two reads of $a.\MRtail$ and a write to $a.\DataSty{right}\xspace[1]$ at each level, plus up to two operations on $a.\DataSty{switch}\xspace$, for a total cost of at most $(3 \ceil{\lg k} - 1) (\ceil{\lg \ell} + 2) = O(\log k \log \ell)$ steps. This dominates other costs in $\Write(a,1,v)$, so the asymptotic cost of both $\Write$ and $\Read$ operations is $O(\log k \log \ell)$. In the special case where $k = \ell$, both writes and reads have their step complexities squared compared to a single-component $k$-valued max register. \subsection{Linearizability} In broad outline, the proof of linearizability follows the proof for a simple max register. But as with snapshots, we have to show that the ordering of the head and tail components are consistent. The key observation is the following lemma. \begin{lemma} \label{lemma-max-array-consistency} Fix some execution of a max array $a$ implemented as in Algorithm~\ref{alg-max-array}. Suppose this execution contains a $\Read(a)$ operation $π_\DataSty{left}\xspace$ that returns $v_\DataSty{left}\xspace$ from $a.\DataSty{left}\xspace$ and a $\Read(a)$ operation $π_\DataSty{right}\xspace$ that returns $v_\DataSty{right}\xspace$ from $a.\DataSty{right}\xspace$. Then $v_\DataSty{left}\xspace[1] ≤ v_\DataSty{right}\xspace[1]$. \end{lemma} \begin{proof} Both $v_\DataSty{left}\xspace[1]$ and $v_\DataSty{right}\xspace[1]$ are values that were previously written to their respective max arrays by $\Read(a)$ operations (such writes necessarily exist because any process that reads $a.\DataSty{left}\xspace$ or $a.\DataSty{right}\xspace$ writes $a.\DataSty{left}\xspace[1]$ or $a.\DataSty{right}\xspace[1]$ first). From examining the code, we have that any value written to $a.\DataSty{left}\xspace[1]$ was read from $a.\MRtail$ before $a.\DataSty{switch}\xspace$ was set to $1$, while any value written to $a.\DataSty{right}\xspace[1]$ was read from $a.\MRtail$ after $a.\DataSty{switch}\xspace$ was set to $1$. Since max-register reads are non-decreasing, we have than any value written to $a.\DataSty{left}\xspace[1]$ is less than or equal to any value written to $a.\DataSty{right}\xspace[1]$, proving the claim. \end{proof} The rest of the proof is tedious but straightforward: we linearize the $\Read(a)$ and $\Write(a[0])$ operations as in the max-register proof, then fit the $\Write(a[1])$ operations in based on the \MRtail values of the reads. The full result is: \begin{theorem} \label{theorem-max-array} If $a.\DataSty{left}\xspace$ and $a.\DataSty{right}\xspace$ are linearizable max arrays, and $a.\MRtail$ is a linearizable max register, then Algorithm~\ref{alg-max-array} implements a linearizable max array. \end{theorem} It's worth noting that the same unbalanced-tree construction used in §§\ref{section-max-register-encoding} and~\ref{section-max-register-unbounded} can be used here as well. This makes the step complexity for $\Read(a)$ scale as $O(\log v[0] \log v[1])$, where $v$ is the value returned. For writes the step complexity may depend in a complicated way on what values are being written and to which side, but in the worst case, it is $O(\log v[0] \log v[1])$, where $v$ is the value in the register when the write finishes. (This is a consequence of the embedded $\Read(a)$ in $\Write(a,1,v)$.) \section{Restricted-use snapshots} To build an ordinary snapshot object from $2$-component max arrays, we construct a balanced binary tree in which each leaves holds a pointer to an individual snapshot element and each internal node holds a pointer to a partial snapshot containing all of the elements in the subtree of which it is the root. The pointers themselves are non-decreasing indices into arrays of values that consist of ordinary (although possibly very wide) atomic registers. When a process writes a new value to its component of the snapshot object, it increases the pointer value in its leaf and then propagates the new value up the tree by combining together partial snapshots at each step, using $2$-component max arrays to ensure linearizability. The resulting algorithm is similar in many ways to the lattice agreement procedure of Inoue~\etal~\cite{InoueMCT1994} (see §\ref{section-lattice-agreement-implementation}), except that it uses a more contention-tolerant snapshot algorithm than double collects and we allow processes to update their values more than once. It is also similar to the \concept{$f$-array} construction of Jayanti~\cite{Jayanti2002} for efficient computation of array aggregates (sum, min, max, etc.) using LL/SC, the main difference being that because the index values are non-decreasing, max arrays can substitute for LL/SC. Each node in the tree except the root is represented by one component of a $2$-component max array that we can think of as being owned by its parent, with the other component being the node's sibling in the tree. To propagate a value up the tree, at each level the process takes a snapshot of the two children of the node and writes the sum of the indices to the node's component in its parent's max array (or to an ordinary max register if we are at the root). Before doing this last write, a process will combine the partial snapshots from the two child nodes and write the result into a separate array indexed by the sum. In this way any process that reads the node's component can obtain the corresponding partial snapshot in a single register operation. At the root this means that the cost of obtaining a complete snapshot is dominated by the cost of the max-register read, at $O(\log v)$, where $v$ is the number of updates ever performed. A picture of this structure, adapted from the proceedings version of~\cite{AspnesACHE2015}, appears in Figure~\ref{figure-snapshot-tree}. The figure depicts an update in progress, with red values being the new values written as part of the update. Only some of the tables associated with the nodes are shown. \begin{figure} \centering \includegraphics[scale=0.5]{snapshot-tree} \caption{Snapshot from max arrays; see also~\protect{\cite[Fig.~2]{AspnesACHE2015}}} \label{figure-snapshot-tree} \end{figure} The cost of an update is dominated by the $O(\log n)$ max-array operations needed to propagate the new value to the root. This takes $O(\log^2 v \log n)$ steps. Here $v$ can be taken to be the number of update operations, which controls the maximum value on either side of the 2-component max arrays. The linearizability proof is trivial: linearize each update by the time at which a snapshot containing its value is written to the root (which necessarily occurs within the interval of the update, since we don't let an update finish until it has propagated its value to the top), and linearize reads by when they read the root. This immediately gives us an $O(\log^3 n)$ implementation—as long as we only want to use it polynomially many times—of anything we can build from snapshot, including counters, generalized counters, and (by~\cite{AspnesH1990waitfree,AndersonM1993}) any other object whose operations all commute with or overwrite each other in a static pattern. \subsection{Randomized and amortized snapshots} Randomization can eliminate the need to limit the number of times the snapshot is used. The JTT bound still applies, so there will be occasional expensive operations, but we can spread these out randomly so that any particular operation has low expected cost. This gives a cost of $O(\log^3 n)$ expected steps for an unrestricted snapshot. This result was claimed by Aspnes and Censor-Hillel~\cite{AspnesC2013}, although the construction given in the conference version of this paper (a) is based on the original, uncorrected version of the max array from~\cite{AspnesACHE2015}, (b) incorrectly computes the running time of the algorithm, and (c) has a rather rococo proof of linearizability that is suspect in various additional ways. A submitted journal version of the same paper~\cite{AspnesC2013journal} may be more convincing. Convincing or not, this result is largely dominated by a more recent result by Baig~\etal~\cite{BaigHMT2020} that gives a deterministic snapshot implementation with $O(\log n)$ amortized step complexity. Note that none of these algorithms contradict the JTT lower bound: in the worst case, each will have operations that take $Ω(n)$ steps. But the hope is that these operations are few, and in the amortized case, paid for by many cheap operations. Also, even though we may beat JTT most of the time, other lower bounds may still apply; see for example~\cite{AspnesCAH2016,HendlerK2014}. For some specific applications, further improvements are possible. The original max-registers paper~\cite{AspnesAC2012} gives an implementation of counters using a similar tree construction with only max registers that costs only $O(\log^2 n)$ for increments; here the trick is to observe that counters that can only be incremented by one are much easier to make linearizable, because there is no possibility of seeing an intermediate value that couldn't be present in a sequential execution. Whether it is possible to improve the cost of snapshot is an open problem. \myChapter{Common2}{2019}{} \label{chapter-common2} The \concept{common2} class, defined by Afek, Weisberger, and Weisman~\cite{AfekWW1992} consists of all read-modify-write objects where the modify functions either (a) all commute with each other or (b) all overwrite each other. We can think of it as the union of two simpler classes, the set of read-modify-write objects where all update operations commute, called \index{object!commuting} \indexConcept{commuting object}{commuting objects}~\cite{AfekW1999}; and the set of read-modify-write objects where all updates produce a value that doesn't depend on the previous state, called \index{object!historyless} \indexConcept{historyless object}{historyless objects}~\cite{FichHS1998}). From §\ref{section-wait-free-level-2}, we know that both commuting objects and historyless objects have consensus number at most 2, and that these objects have consensus number exactly 2 provided they supply at least one non-trivial update operation. The main result of Afek~\etal~\cite{AfekWW1992} is that commuting and historyless objects can all be implemented from any object with consensus number 2, even in systems with more than 2 processes. This gives a \concept{completeness} result analogous to completeness results in complexity theory: any non-trivial common2 object can be used to implement any other common2 object. The \concept{common2 conjecture} was that common2 objects could also implement any object with consensus number $2$, This is now known to be false~\cite{AfekEG2016}. The main result in the paper has two parts, reflecting the two parts of the common2 class: a proof that 2-process consensus plus registers is enough to implement all commuting objects (which essentially comes down to build a generalized fetch-and-add that returns an unordered list of all preceding operations); and a proof that 2-process consensus plus registers is enough to implement all overwriting objects (which is equivalent to showing that we can implement swap objects). The construction of the generalized fetch-and-add is pretty nasty, so we'll concentrate on the implementation of swap objects. We will also skip the swap implementation in~\cite{AfekWW1992}, and instead describe, in §§\ref{section-obstruction-free-swap} and~\ref{section-wait-free-swap}, a simpler (though possibly less efficient) algorithm from a later paper by Afek, Morrison, and Wertheim~\cite{AfekMW2011}. Before we do this, we'll start with some easier results from the older paper, including an implementation of $n$-process test-and-set from $2$-process consensus. This will show that anything we can do with test-and-set we can do with any common2 object. \section{Test-and-set and swap for two processes} \label{section-TAS-2-from-consensus-2} \newcommand{\FuncSty{TAS2}}{\FuncSty{TAS2}} \newcommand{\FuncSty{TAS}}{\FuncSty{TAS}} \newcommand{\FuncSty{Consensus2}}{\FuncSty{Consensus2}} The first step is to get test-and-set. Algorithm~\ref{alg-2TAS-from-2cons} shows how to turn $2$-process consensus into $2$-process test-and-set. The idea is that whoever wins the consensus protocol wins the test-and-set. This is linearizable, because if I run $\FuncSty{TAS2}$ before you do, I win the consensus protocol by validity. \begin{algorithm} \Procedure{$\FuncSty{TAS2}()$}{ \eIf{$\FuncSty{Consensus2}(\MyId) = \MyId$}{ \Return $0$\; }{ \Return $1$\; } } \caption{Building $2$-process TAS from $2$-process consensus} \label{alg-2TAS-from-2cons} \end{algorithm} Once we have test-and-set for two processes, we can easily get one-shot swap for two processes. The trick is that a one-shot swap object always returns $⊥$ to the first process to access it and returns the other process's value to the second process. We can distinguish these two roles using test-and-set and add a register to send the value across. Pseudocode is in Algorithm~\ref{alg-2swap-from-2TAS}. \begin{algorithm} \Procedure{$\Swap(v)$}{ $a[\MyId] = v$ \; \eIf{$\FuncSty{TAS2}() = 0$}{ \Return $⊥$\; }{ \Return $a[¬ \MyId]$\; } } \caption{Two-process one-shot swap from TAS} \label{alg-2swap-from-2TAS} \end{algorithm} \section{Building \texorpdfstring{$n$}{n}-process TAS from 2-process TAS} \label{section-test-and-set-from-two-process-consensus} \index{test-and-set} To turn the $\FuncSty{TAS2}$ into full-blown $n$-process $\FuncSty{TAS}$, start by staging a tournament along the lines of~\cite{PetersonF1977} (§\ref{section-mutex-tournament}). Each process walks up a tree of nodes, and at each node it attempts to beat every process from the other subtree using a $\FuncSty{TAS}_2$ object (we can't just have it fight one process, because we don't know which one process will have won the other subtree, and our $\FuncSty{TAS}_2$ objects may only work for two specific processes). A process drops out if it ever sees a $1$. We can easily show that at most one process leaves each subtree with all zeros, including the whole tree itself. \newData{\AWWgate}{gate} \newFunc{\AWWcompete}{compete} \newData{\AWWnode}{node} \newFunc{\AWWblock}{block} \newFunc{\AWWpass}{pass} \newFunc{\AWWpassAll}{passAll} \newFunc{\AWWfindValue}{findValue} Unfortunately, this process does not give a \emph{linearizable} test-and-set object. It is possible that $p_1$ loses early to $p_2$, but then $p_3$ starts (elsewhere in the tree) after $p_1$ finishes, and races to the top, beating out $p_2$. To avoid this, we can follow~\cite{AfekWW1992} and add a \AWWgate bit that locks out latecomers.\footnote{The original version of this trick is from an earlier paper~\cite{AfekGTV1992}, where the \AWWgate bit is implemented as an array of single-writer registers.} The resulting construction looks something like Algorithm~\ref{alg-n-TAS-from-2TAS}. This gives a slightly different interface from straight \FuncSty{TAS}; instead of returning $0$ for winning and $1$ for losing, the algorithm returns $⊥$ if you win and the \Id of some process that beats you if you lose.\footnote{Note that this process may also be a loser, just one that made it further up the tree than you did. We can't expect to learn the id of the ultimate winner, because that would solve $n$-process consensus.} It's not hard to see that this gives a linearizable test-and-set after translating the values back to $0$ and $1$ (the trick for linearizability is that any process that wins saw an empty gate, and so started before any other process finished). It also sorts the processes into a rooted tree, with each process linearizing after its parent (this latter claim is a little trickier, but basically comes down to a loser linearizing after the process that defeated it either on \AWWgate or on one of the $\FuncSty{TAS2}$ objects). \begin{algorithm} \Procedure{$\AWWcompete(i)$}{ \tcp{check the gate} \If{$\AWWgate \ne ⊥$}{ \Return \AWWgate\; } $\AWWgate ← i$ \; \tcp{Do tournament, returning $\Id$ of whoever I lose to} $\AWWnode ← $ leaf for $i$ \; \While{$\AWWnode \ne \DataSty{root}$}{ \Foreach{$j$ whose leaf is below sibling of $\AWWnode$}{ \If{$\FuncSty{TAS2}(t[i,j]) = 1$}{ \Return $j$\; } } $\AWWnode ← \AWWnode.\DataSty{parent}$\; } \tcp{I win!} \Return $⊥$\; } \caption{Tournament algorithm with gate} \label{alg-n-TAS-from-2TAS} \end{algorithm} This algorithm is kind of expensive: the losers that drop out early are relatively lucky, but the winning process has to win a $\FuncSty{TAS2}$ against everybody, for a total of $Θ(n)$ $\TestAndSet$ operations. We can reduce the cost to $O(\log n)$ if our $\FuncSty{TAS2}$ objects allow arbitrary processes to execute them. This is done, for example, in the RatRace test-and-set implementation of Alistarh~\etal~\cite{AlistarhAGGG2010}, using a randomized implementation of $\FuncSty{TAS2}$ due to Tromp and Vitányi~\cite{TrompV2002} (see §\ref{section-ratrace}). \section{Obstruction-free swap from test-and-set} \label{section-obstruction-free-swap} We'll start by describing the ``strawman algorithm'' from the AMW paper. This is presented by the authors as a stepping-stone to their real algorithm, which we will describe below in §\ref{section-wait-free-swap}. The code is given in Algorithm~\ref{alg-obstruction-free-swap}. This implements a swap object that is linearizable but not wait-free. \begin{algorithm} \Procedure{$\Swap(v)$}{ $i ← 0$\; \While{\True}{ \tcp{Look for a starting point} \While{$\TestAndSet(s_i) = 1$}{ \label{line-obstruction-free-swap-fetch-and-increment} $i ← i+1$\; } $v_i ← v$\; \tcp{Check if we've been blocked} \eIf{$\TestAndSet(t_i) = 0$}{ \label{line-obstruction-free-swap-grab-t} \tcp{We win, find our predecessor} \For{$j ← i-1$ \DownTo $0$}{ \If{$\TestAndSet(t_j) = 1$}{ \tcp{Use this value} \Return $v_j$\; } } \tcp{Didn't find anybody, we are first} \Return $⊥$\; }{ \tcp{Pick a new start and try again} } } } \caption{Obstruction-free swap from test-and-set} \label{alg-obstruction-free-swap} \end{algorithm} This algorithm uses two infinite arrays $s$ and $t$ of test-and-set objects and an infinite array $r$ of atomic registers. The $s_i$ objects are essentially being used to implement a fetch-and-increment, and if we have a fetch-and-increment lying around we can replace the loop at Line~\ref{line-obstruction-free-swap-fetch-and-increment} with an operation on that object instead. The $r_i$ registers record values to return. The $t_i$ registers implement a block/pass mechanism where a later process can force an earlier process to try again if it didn't record its value in time. This solves the problem of a process going to sleep after acquiring a particular slot $i$ from the fetch-and-increment but before writing down a value that somebody else can use. The algorithm is obstruction-free, because in any reachable configuration, only finitely many test-and-sets have been accessed, so there is some value $i$ with $s_j = t_j = 0$ for all $j ≥ i$. A process running in isolation will eventually hit one of these slots, win both test-and-sets, and return. For linearizability, the value of $i$ when each operation returns gives an obvious linearization ordering. This ordering is consistent with the observed history, because if I finish with value $i_1$ before you start, then at the time that I finish all $s_j$ for $j ≤ i_1$ have $s_j = 1$. So you can't win any of them, and get a slot $i_2 > i_1$. But we still have to show that the return values make sense. Consider some swap operation $π$. Suppose that $π$ starts at position $i$ and wins every $t_j$ down to position $k$, where it loses. Then no other operation wins any $t_j$ with $k < j < i$, so there is no process that leaves with any slot between $k$ and $i$. In addition, the operation $π'$that did win $t_k$ must have taken slot $k$ in Line~\ref{line-obstruction-free-swap-grab-t}, because any other process would have needed to win $t_{k+1}$ before attempting to win $t_k$. So $π'$ linearizes immediately before $π$, which is good, because $π$ returns the value $v_k$ that $π'$ wrote before it won $t_k$. Alternatively, suppose that $π$ never loses $t_j$ for any $j ≤ i$. Then no other operation takes a slot less than $i$, and $π$ linearizes first. In this case, it must return $⊥$, which it does. \section{Wait-free swap from test-and-set} \label{section-wait-free-swap} Now we want to make the strawman algorithm wait-free. The basic idea is similar: we will have an ordered collection of test-and-set objects, and a process will move right until it can capture one that determines its place in the linearization ordering, and then it will move left to block any other processes from taking an earlier place unless they have already written out their values. To avoid starvation, we assign a disjoint collection of test-and-set objects to each operation, so that every operation eventually wins one of its own test-and-sets. Unfortunately this only works if we make the ordering dense, so that between each pair of test-and-sets there are infinitely many other test-and-sets. \newData{\AMWmaxDepth}{maxDepth} \newData{\AMWaccessed}{accessed} \newData{\AMWdepth}{depth} \newData{\AMWwin}{win} \newData{\AMWcap}{cap} \newData{\AMWreg}{reg} \newData{\AMWtst}{tst} \newData{\AMWmaxPreviousDepth}{maxPreviousDepth} \newData{\AMWret}{ret} AMW do this in terms of a binary tree, but I find it easier to think of the test-and-sets as being indexed by dyadic rationals strictly between $0$ and $1$.\footnote{The two representations are isomorphic: make each value $k/2^q$ be the parent of $k/2^q ± 1/2^{q+1}$.} The idea is that the $i$-th operation to start executing the swap object will use test-and-sets $t_q$ where $q = k/2^i$ for all odd $k$ in the range $1\dots 2^i-1$. In order to avoid having to check the infinitely many possible values smaller than $q$, we will use two auxiliary objects: a readable fetch-and-increment $\AMWmaxDepth$ that hands out denominators and tracks the largest denominator used so far, and a max register $\AMWaccessed$ that keeps track of the largest position accessed so far. AMW implement $\AMWaccessed$ using a snapshot, which we will do as well to avoid complications from trying to build a max register out of an infinitely deep tree.\footnote{The issue is not so much that we can't store arbitrary dyadics, since we can encode them using an order-preserving prefix-free code, but that, without some sort of helping mechanism, a read running concurrently with endlessly increasing writes (e.g. $1/2, 3/4, 7/8, \dots$) might not be wait-free. Plus as soon as the denominator exceeds $2^n$, which happens after only $n$ calls to $\Swap$, $O(n)$-step snapshots are cheaper anyway.} Note that AMW don't call this data structure a max register, but we will, because we like max registers. Code for the swap procedure is given in Algorithm~\ref{alg-wait-free-swap}. \begin{algorithm} \Procedure{$\Swap(v)$}{ \tcp{Pick a new row just for me} $\AMWdepth ← \FuncSty{fetchAndIncrement}(\AMWmaxDepth)$\; \tcp{Capture phase} \Repeat{\AMWwin}{ \tcp{Pick leftmost node in my row greater than \AMWaccessed} $\AMWcap ← \min \SetWhere{x}{\text{$x = k/2^\AMWdepth$ for odd $k$}, x > \AMWaccessed}$\; \tcp{Post my value} $\AMWreg[\AMWcap] ← v$\; \tcp{Try to capture the test-and-set} $\AMWwin ← \TestAndSet(\AMWtst[\AMWcap]) = 0$\; $\FuncSty{writeMax}(\AMWaccessed, \AMWcap)$\; } \tcp{Return phase} \tcp{Max depth reached by anybody left of $\AMWcap$} $\AMWmaxPreviousDepth ← \Read(\AMWmaxDepth)$\; $\AMWret ← \AMWcap$\; \tcp{Block previous nodes until we find one we can take} \Repeat{$\TestAndSet(\AMWtst[\AMWret]) = 1$}{ $\AMWret ← \max \SetWhere{x = k/2^q}{q ≤ \AMWmaxPreviousDepth, \text{$k$ odd}, x < \AMWret}$\; \If{$\AMWret < 0$}{ \Return $⊥$\; } } \Return $\AMWreg[\AMWret]$\; } \caption{Wait-free swap from test-and-set~\cite{AfekMW2011}} \label{alg-wait-free-swap} \end{algorithm} To show Algorithm~\ref{alg-wait-free-swap} works, we need the following technical lemma, which, among other things, implies that node $1-2^{\AMWdepth}$ is always available to be captured by the process at depth $\AMWdepth$. This is essentially just a restatement of Lemma 1 from~\cite{AfekMW2011}. \begin{lemma} \label{lemma-alg-wait-free-swap-subtree} For any $x = k/2^q$, where $k$ is odd, no process attempts to capture any $y ∈ [x,x+1/2^q)$ before some process writes $x$ to $\AMWaccessed$. \end{lemma} \begin{proof} Suppose that the lemma fails, let $y = \ell/2^r$ be the first node captured in violation of the lemma, and let $x = k/2^q$ be such that $y ∈ [x,x+1/2^q)$ but $x$ has not been written to $\AMWaccessed$ when $y$ is captured. Let $p$ be the process that captures $y$. Now consider $y' = x-1/2^r$, the last node to the left of $x$ at the same depth as $y$. Why didn't $p$ capture $y'$? One possibility is that some other process $p'$ blocked $y'$ during its return phase. This $p'$ must have captured a node $z > y'$. If $z > y$, then $p'$ would have blocked $y$ first, preventing $p$ from capturing it. So $y' < z < y$. The other possibility is that $p$ never tried to capture $y'$, because some other process $p'$ wrote some value $z > y'$ to $\AMWaccessed$ first. This value $z$ must also be less than $y$ (or else $p$ would not have tried to capture $y$). In both cases, there is a process $p'$ that captures a value $z$ with $y' < z < y$, before $p$ captures $y$ and thus before anybody writes $x$ to $\AMWaccessed$. Since $y' < x$ and $y' < z$, either $y' < z < x$ or $y' < x < z$. In the first case, $z ∈ [y',y'+1/2^r)$ is captured before $y'$ is written to $\AMWaccessed$. In the second case $z ∈ [x,x+1/2^q)$ is captured before $x$ is written to $\AMWaccessed$. Either way, $y$ is not the first capture to violate the lemma, contradicting our initial assumption. \end{proof} Using Lemma~\ref{lemma-alg-wait-free-swap-subtree}, it is straightforward to show that Algorithm~\ref{alg-wait-free-swap} is wait-free. If I get $q$ for my value of $\AMWdepth$, then no process will attempt to capture any $y$ in $[1-2^q,1)$ before I write $1-2^q$ to $\AMWaccessed$. But this means that nobody can block me from capturing $1-2^q$, because processes can only block values smaller than the one they already captured. I also can't get stuck in the return phase, because there are only finitely many values with denominator less than $2^{\AMWmaxPreviousDepth}$. It remains to show that the implementation is linearizable. The obvious linearization ordering is given by sorting each operation $i$ by its captured node $\AMWcap$. Linearizability requires then that if we imagine a directed graph containing an edge $ij$ for each pair of operations $i$ and $j$ such that $i$ captures $\AMWcap_i$ and returns $\AMWreg[\AMWcap_j]$, then this graph forms a path that corresponds to this linearization ordering. Since each process only returns one value, it trivially holds that each node in the graph has out-degree at most $1$. For the in-degree, suppose that we have operations $i$, $j$, and $k$ with $\AMWcap_i < \AMWcap_j < \AMWcap_k$ such that $j$ and $k$ both return $\AMWreg[\AMWcap_i]$. Before $k$ reaches $\AMWtst[\AMWcap_i]$, it must first capture all the test-and-sets between $\AMWcap_i$ and $\AMWcap_k$ that have depth less than or equal to $\AMWmaxPreviousDepth_k$. This will include $\AMWtst[\AMWcap_j]$, because $j$ must write to $\AMWmaxDepth$ before doing anything, and this must occur before $k$ starts the return phase if $j$ sees a value of $\AMWaccessed$ that is less that $\AMWcap_k$. A similar argument show that there is at most one process that returns $⊥$; this implies that there is at most one process with out-degree $0$. So now we have a directed graph where every process has in-degree and out-degree at most one, which implies that each weakly-connected component will be a path. But each component will also have exactly one terminal node with out-degree $0$. Since there is only one such node, there is only one component, and the entire graph is a single path. This concludes the proof of linearizability. \section{Implementations using stronger base objects} \label{section-implementations-using-stronger-base-objects} The terrible step complexity of known wait-free implementations of Common2 objects like $\Swap$ or $\FetchAndIncrement$ from $2$-process consensus objects and registers has led to work on finding better implementations assuming stronger base objects. Using load-linked/store-conditional, Ellen and Woelfel~\cite{EllenW2013} provide implementations of several Common2 objects, including $\FetchAndIncrement$, $\FetchAndAdd$, and $\Swap$ that all have $O(\log n)$ individual step complexity.\footnote{What they actually implement is the ability to do fetch-and-$f$, where $f$ is any binary associative function, using an object they call an \concept{aggregator}. Each of these objects is obtained by choosing an appropriate $f$.} This is know to be optimal due to a lower bound of Jayanti~\cite{Jayanti1998}. The lower bound applies \emph{a fortiori} to the case where we don't have LL/SC or CAS and have to rely on 2-process consensus objects. But it's not out of the question that there is a matching upper bound in this case. \myChapter{Randomized consensus and test-and-set}{2020}{} \label{chapter-randomized-consensus} We've seen that we can't solve \concept{consensus} in an asynchronous system message-passing or shared-memory system with one crash failure~\cite{FischerLP1985,LouiA1987}, but that the problem becomes solvable using failure detectors~\cite{ChandraT1996}. An alternative that also allows us to solve consensus is to allow the processes to use randomization, by providing each process with a \concept{local coin} that can generate random values that are immediately visible only to that process. The resulting \index{consensus!randomized} \concept{randomized consensus} problem replaces the \concept{termination} requirement with \concept{probabilistic termination}: all processes terminate with probability $1$. The agreement and validity requirements remain the same. In this chapter, we will describe how randomization interacts with the adversary, give a bit of history of randomized consensus, and then concentrate on recent algorithms for randomized consensus and the closely-related problem of randomized test-and-set. Much of the material in this chapter is adapted from notes for a previous course on randomized algorithms~\cite{Aspnes2011randomizedNotes} and a few of my own papers~\cite{Aspnes2012modular,AspnesE2011,Aspnes2012}. \section{Role of the adversary in randomized algorithms} Because randomized processes are unpredictable, we need to become a little more sophisticated in our handling of the adversary. As in previous asynchronous protocols, we assume that the adversary has control over timing, which we model by allowing the adversary to choose at each step which process performs the next operation. But now the adversary may do so based on knowledge of the state of the protocol and its past evolution. How much knowledge we give the adversary affects its power. Several classes of adversaries have been considered in the literature; ranging from strongest to weakest, we have: \begin{enumerate} \item An \index{adversary!adaptive}\concept{adaptive adversary}. This adversary is a function from the state of the system to the set of processes; it can see everything that has happened so far (including coin-flips internal to processes that have not yet been revealed to anybody else), but can't predict the future. It's known that an adaptive adversary can force any randomized consensus protocol to take $Θ(n^2)$ total steps~\cite{AttiyaC2008jacm}. The adaptive adversary is also called a \index{adversary!strong} \concept{strong adversary} following a foundational paper of Abrahamson~\cite{Abrahamson1988}. \item An \index{adversary!intermediate} \concept{intermediate adversary} or \index{adversary!weak} \concept{weak adversary}~\cite{Abrahamson1988} is one that limits the adversary's ability to observe or control the system in some way, without completely eliminating it. For example, a \index{adversary!content-oblivious} \concept{content-oblivious adversary}~\cite{Chandra1996} or \index{adversary!value-oblivious} \concept{value-oblivious adversary}~\cite{Aumann1997} is restricted from seeing the values contained in registers or pending write operations and from observing the internal states of processes directly. A \index{adversary!location-oblivious} \concept{location-oblivious adversary}~\cite{Aspnes2012modular} can distinguish between values and the types of pending operations, but can't discriminate between pending operations based one which register they are operating on. These classes of adversaries are modeled by imposing an equivalence relation on partial executions and insisting that the adversary make the same choice of processes to go next in equivalent situations. Typically they arise because somebody invented a consensus protocol for the oblivious adversary (described below) and then looked for the next most powerful adversary that still let the protocol work. Weak adversaries often allow much faster consensus protocols than adaptive adversaries. Each of the above adversaries permits consensus to be achieved in $O(\log n)$ expected individual work using an appropriate algorithm. But from a mathematical standpoint, weak adversaries are a bit messy, and once you start combining algorithms designed for different weak adversaries, it's natural to move all the way down to the weakest reasonable adversary, the oblivious adversary. \item A \index{adversary!oblivious}\concept{oblivious adversary} has no ability to observe the system at all; instead, it fixes a sequence of process ids in advance, and at each step the next process in the sequence runs. We will describe below a protocol that guarantees $O(\log \log n)$ expected individual work for an oblivious adversary. It is not known whether this is optimal; in fact, is is consistent with the best known lower bound (due to Attiya and Censor~\cite{AttiyaC2008jacm}) that consensus can be solved in $O(1)$ expected individual steps against an oblivious adversary. \end{enumerate} Each of these adversaries is defined based on choosing steps of particular objects, with particular constraints on knowledge based on the states of those objects. This interacts badly with abstractions like linearizability: an adversary might be able to play games with the internals of an implementation of an object that allows it more power than it would have with an actual sequential version of the object. So even though linearizable implementations are indistinguishable from sequential objects for deterministic protocols, for randomized protocols they can give very different results for both adaptive and oblivious adversaries~\cite{GolabHW2011}; and in the specific case of consensus, it can be shown that there are randomized consensus protocols that terminate with probability $1$ against an adaptive adversary when implemented with atomic registers, but fail to terminate with nonzero probability when implemented using an arbitrary linearizable implementation~\cite{HadzilacosHT2020}. These results don't necessarily imply the failure of any specific consensus protocol implemented using a specific atomic register simulation, but they do justify suspicion. The easiest way to deal with this suspicion is to assume that our atomic registers are, in fact, atomic, so that's what we will do here. \section{History} The use of randomization to solve consensus in an asynchronous system with crash failures was proposed by Ben-Or~\cite{Ben-Or1983} for a message-passing model. Chor, Israeli, and Li~\cite{ChorIL1994} gave the first wait-free consensus protocol for a shared-memory system, which assumed a particular kind of weak adversary. Abrahamson~\cite{Abrahamson1988} defined strong and weak adversaries and gave the first wait-free consensus protocol for a strong adversary; its expected step complexity was $Θ\left(2^{n^2}\right)$. After failing to show that exponential time was necessary, Aspnes and Herlihy~\cite{AspnesH1990consensus} showed how to do consensus in $O(n^4)$ total step complexity, a value that was soon reduced to $O(n^2 \log n)$ by Bracha and Rachman~\cite{BrachaR1991}. This remained the best known bound for the strong-adversary model until Attiya and Censor~\cite{AttiyaC2008jacm} showed matching $Θ(n^2)$ upper and lower bounds on total step complexity. A later paper by Aspnes and Censor~\cite{AspnesC2009} showed that it was also possible to get an $O(n)$ bound on individual step complexity. For weak adversaries, the best known upper bound on individual step complexity was $O(\log n)$ for a long time~\cite{Chandra1996,Aumann1997,Aspnes2012modular}, with an $O(n)$ bound on total step complexity for some models~\cite{Aspnes2012modular}. More recent work has lowered the bound to $O(\log \log n)$, under the assumption of an oblivious adversary~\cite{Aspnes2012}. No non-trivial lower bound on expected individual step complexity is known, although there is a known lower bound on the distribution of of the individual step complexity~\cite{AttiyaC2010}. In the following sections, we will concentrate on the more recent weak-adversary algorithms. These have the advantage of being fast enough that one might reasonably consider using them in practice, assuming that the weak-adversary assumption does not create trouble, and they are also require less probabilistic machinery to analyze than the strong-adversary algorithms. \section{Reduction to simpler primitives} To show how to solve consensus using randomization, it helps to split the problem in two: we will first see how to detect \emph{when} we've achieved agreement, and then look at \emph{how} to achieve agreement. \subsection{Adopt-commit objects} \label{section-adopt-commit-objects} Most known randomized consensus protocols have a round-based structure that alternates between generating and detecting agreement. Gafni~\cite{Gafni1998} proposed \indexConcept{adopt-commit protocol}{adopt-commit protocols} as a tool for detecting agreement, and these protocols were later abstracted as \indexConcept{adopt-commit object}{adopt-commit objects}~\cite{MostefaouiRRT2008,AlistarhGGT2009}. The version described here is largely taken from~\cite{AspnesE2011}, which shows bounds on the complexity of adopt-commit objects. \newcommand{\FuncSty{AdoptCommit}\xspace}{\FuncSty{AdoptCommit}\xspace} \newcommand{\DataSty{adopt}\xspace}{\DataSty{adopt}\xspace} \newcommand{\DataSty{commit}\xspace}{\DataSty{commit}\xspace} An adopt-commit object supports a single operation, \FuncSty{AdoptCommit}\xspace($u$), where $u$ is an input from a set of $m$ \concept{values}. The result of this operation is an output of the form $(\DataSty{commit}\xspace,v)$ or $(\DataSty{adopt}\xspace,v)$, where the second component is a value from this set and the first component is a \concept{decision bit} that indicates whether the process should decide value $v$ immediately or adopt it as its preferred value in later rounds of the protocol. The requirements for an adopt-commit object are the usual requirements of validity and termination, plus: \begin{enumerate} \item \indexConcept{coherence}{Coherence.} If the output of some operation is $(\DataSty{commit}\xspace,v)$, then every output is either $(\DataSty{adopt}\xspace,v)$ or $(\DataSty{commit}\xspace,v)$. \item \indexConcept{convergence}{Convergence.} If all inputs are $v$, all outputs are $(\DataSty{commit}\xspace,v)$. \end{enumerate} These last two requirement replace the agreement property of consensus. They are also strictly weaker than consensus, which means that a consensus object (with all its output labeled \DataSty{commit}\xspace) is also an adopt-commit object. The reason we like adopt-commit objects is that they allow the simple consensus protocol shown in Algorithm~\ref{alg-consensus-from-adopt-commit}. \begin{algorithm} \newcommand{\DataSty{preference}\xspace}{\DataSty{preference}\xspace} $\DataSty{preference}\xspace ← \DataSty{input}$ \\ \For{$r ← 1 \dots \infty$}{ $(b, \DataSty{preference}\xspace) ← \FuncSty{AdoptCommit}\xspace(AC[r], \DataSty{preference}\xspace)$\; \eIf{$b = \DataSty{commit}\xspace$}{ \Return $\DataSty{preference}\xspace$\; }{ do something to generate a new \DataSty{preference}\xspace\; } } \caption{Consensus using adopt-commit} \label{alg-consensus-from-adopt-commit} \end{algorithm} The idea is that the adopt-commit takes care of ensuring that once somebody returns a value (after receiving \DataSty{commit}\xspace), everybody else who doesn't return adopts the same value (follows from coherence). Conversely, if everybody already has the same value, everybody returns it (follows from convergence). The only missing piece is the part where we try to shake all the processes into agreement. For this we need a separate object called a \emph{conciliator}. \subsection{Conciliators} \label{section-conciliators} Conciliators are a weakened version of randomized consensus that replace agreement with \index{agreement!probabilistic}\concept{probabilistic agreement}: the processes can disagree sometimes, but must agree with constant probability despite interference by the adversary. An algorithm that satisfies termination, validity, and probabilistic agreement is called a \concept{conciliator}.\footnote{Warning: This name has not really caught on in the general theory-of-distributed-computing community, and so far only appears in papers that have a particular researcher as a co-author~\cite{Aspnes2012,AspnesE2011,Aspnes2012modular,AfekACV2017}. Unfortunately, there doesn't seem to be a better name for the same object that has caught on. So we are stuck with it for now.} The important feature of conciliators is that if we plug a conciliator that guarantees agreement with probability at least $δ$ into Algorithm~\ref{alg-consensus-from-adopt-commit}, then on average we only have to execute the loop $1/δ$ times before every process agrees. This gives an expected cost equal to $1/δ$ times the total cost of \FuncSty{AdoptCommit}\xspace and the conciliator. Typically we will aim for constant $δ$. \section{Implementing an adopt-commit object} What's nice about adopt-commit objects is that they can be implemented deterministically. Here we'll give a simple adopt-commit object for two values, $0$ and $1$. Optimal (under certain assumptions) constructions of $m$-valued adopt-commits can be found in~\cite{AspnesE2011}. Pseudocode is given in Algorithm~\ref{alg-adopt-commit}. \newData{\ACproposal}{proposal} \begin{algorithm} \SharedData{$a[0]$, $a[1]$, initially $\False$; \ACproposal, initially $⊥$} \Procedure{$\FuncSty{AdoptCommit}\xspace(v)$}{ $a[v] ← 1$\; \eIf{$\ACproposal = ⊥$}{ $\ACproposal ← v$\; }{ $v ← \ACproposal$\; } \eIf{$a[¬ v] = \False$}{ \Return $(\DataSty{commit}\xspace, v)$\; }{ \Return $(\DataSty{adopt}\xspace, v)$\; } } \caption{A 2-valued adopt-commit object} \label{alg-adopt-commit} \end{algorithm} Structurally, this is pretty similar to a splitter (see §\ref{section-mutex-fast}), except that we use values instead of process ids. We now show correctness. Termination and validity are trivial. For coherence, observe that if I return $(\DataSty{commit}\xspace, v)$ I must have read $a[¬ v] = \False$ before any process with $¬ v$ writes $a[¬ v]$; it follows that all such processes will see $\ACproposal \ne ⊥$ and return $(\DataSty{adopt}\xspace, v)$. For convergence, observe that if all processes have the same input $v$, they all write it to $\ACproposal$ and all observe $a[¬ v] = \False$, causing them all to return $(\DataSty{commit}\xspace, v)$. \section{Conciliators and shared coins} \label{section-conciliator-shared-coin} For an adaptive adversary, the usual way to implement a conciliator is from a \index{coin!weak shared}\index{shared coin!weak}\concept{weak shared coin}~\cite{AspnesH1990consensus}, which is basically a non-cryptographic version of the \index{coin!common}\concept{common coin}~\cite{Rabin1983} found in many cryptographic Byzantine agreement protocols. Formally, a weak shared coin is an object that has no inputs and returns either $0$ or $1$ to all processes with some minimum probability $δ$. By itself this does not give validity, so converting a weak shared coin into a conciliator requires extra machinery to bypass the coin if the processes that have accessed the conciliator so far are all in agreement; see Algorithm~\ref{alg-conciliator-shared-coin}. The intuition is that having some processes (who all agree with each other) skip the shared coin is not a problem, because with probability $δ$ the remaining processes will agree with them as well. \newFunc{\CoinConciliator}{coinCoinciliator} \newFunc{\SharedCoin}{sharedCoin} \begin{algorithm} \SharedData{\\ \quad binary registers $r_0$ and $r_1$, initially 0;\\ \quad weak shared coin $\SharedCoin$} \Procedure{$\CoinConciliator()$}{ $r_v \leftarrow 1$\; \eIf{$r_{\neg v} = 1$}{ \Return $\SharedCoin()$ \; }{ \Return $v$ \; } } \caption{Shared coin conciliator from~\cite{Aspnes2012modular}} \label{alg-conciliator-shared-coin} \end{algorithm} This still leaves the problem of how to build a shared coin. In the message-passing literature, the usual approach is to use cryptography,\footnote{For example, Canetti and Rabin~\cite{CanettiR1993} solved Byzantine agreement in $O(1)$ time building a shared coin on top of secret sharing.} but because we are assuming an arbitrarily powerful adversary, we can't use cryptography. If we don't care how small $δ$ gets, we could just have each process flip its own local coin and hope that they all come up the same. (This is more or less what was done by Abrahamson~\cite{Abrahamson1988}.) But that might take a while. If we aren't willing to wait exponentially long, a better approach is to combine many individual local coins using some sort of voting. A version of this approach, based on a random walk, was used by Aspnes and Herlihy~\cite{AspnesH1990consensus} to get consensus in (bad) polynomial expected time against an adaptive adversary. A better version was developed by Bracha and Rachman~\cite{BrachaR1991}. In their version, each process repeatedly generates a random $±1$ vote and adds it to a common pool (which just means writing the sum and count of all its votes so far out to a single-writer register). Every $Θ(n / \log n)$ votes, the process does a collect (giving an overhead of $Θ(\log n)$ operations per vote) and checks to see if the total number of votes is greater than a $Θ(n^2)$ threshold. If it is, the process returns the sign of the total vote. Bracha and Rachman showed that despite processes seeing different combinations of votes (due to the collects running at possibly very different speeds), the difference between what each process sees and the actual sum of all votes ever generated is at most $O(n)$ with high probability. This means that if the total vote is more than $cn$ from $0$ for some $c$, which occurs with constant probability, then every processes is likely to return the same value. This gives a weak shared coin with constant bias, and thus also a consensus protocol, that runs in $O(n^2 \log n)$ expected total steps. This remained the best known protocol for many years, leaving an annoying gap between the upper bound and the best known lower bound of $Ω(n^2/\log^2 n)$~\cite{Aspnes1998coin}. Eventually, Attiya and Censor~\cite{AttiyaC2008jacm} produced an entirely new argument to bring the lower bound up to $Ω(n^2)$ and at the same time gave a simple tweak to the Bracha-Rachman protocol to bring the upper bound down to $O(n^2)$, completely settling (up to constant factors) the asymptotic expected total step complexity of strong-adversary consensus. But the question of how quickly one could solve weak-adversary adversary consensus remained (and still remains) open. \section{A one-register conciliator for an oblivious adversary} \label{section-conciliator-one-register} \begin{algorithm} \caption{Impatient first-mover conciliator from~\cite{Aspnes2012modular}} \label{algorithm-impatient-first-mover-conciliator} \SharedData{register $r$, initially $⊥$} $k \gets 0$\; \While{$r = ⊥$}{ \eWithProbability{$\frac{2^k}{2n}$}{ write $v$ to $r$\; }{ do a dummy operation\; } $k \gets k+1$\; } \Return $r$\; \end{algorithm} Algorithm~\ref{algorithm-impatient-first-mover-conciliator} implements a conciliator for an oblivious adversary\footnote{Or any adversary weak enough not to be able to block the write based on how the coin-flip turned out.} using a single register. This particular construction is taken from~\cite{Aspnes2012modular}, and is based on an earlier algorithm of Chor, Israeli, and Li~\cite{ChorIL1994}. The cost of this algorithm is expected $O(n)$ total work and $O(\log n)$ individual work. Later (§\ref{section-sifter-consensus}), we will see a different algorithm~\cite{Aspnes2012} that reduces the individual work to $O(\log \log n)$, although the total work for that algorithm may be $O(n \log \log n)$. The basic idea is that processes alternate between reading a register $r$ and (maybe) writing to the register; if a process reads a non-null value from the register, it returns it. Any other process that reads the same non-null value will agree with the first process; the only way that this can't happen is if some process writes a different value to the register before it notices the first write. The random choice of whether to write the register or not avoids this problem. The idea is that even though the adversary can schedule a write at a particular time, because it's oblivious, it won't be able to tell if the process wrote (or was about to write) or did a no-op instead. The basic version of this algorithm, due to Chor, Israeli, and Li~\cite{ChorIL1994}, uses a fixed $\frac{1}{2n}$ probability of writing to the register. So once some process writes to the register, the chance that any of the remaining $n-1$ processes write to it before noticing that it's non-null is at most $\frac{n-1}{2n} < 1/2$. It's also not hard to see that this algorithm uses $O(n)$ total operations, although it may be that one single process running by itself has to go through the loop $2n$ times before it finally writes the register and escapes. Using increasing probabilities avoids this problem, because any process that executes the main loop $\ceil{\lg n} + 1$ times will write the register. This establishes the $O(\log n)$ per-process bound on operations. At the same time, an $O(n)$ bound on total operations still holds, since each write has at least a $\frac{1}{2n}$ chance of succeeding. The price we pay for the improvement is that we increase the chance that an initial value written to the register gets overwritten by some high-probability write. But the intuition is that the probabilities can't grow too much, because the probability that I write on my next write is close to the sum of the probabilities that I wrote on my previous writes—suggesting that if I have a high probability of writing next time, I should have done a write already. Formalizing this intuition requires a little bit of work. Fix the schedule, and let $p_i$ be the probability that the $i$-th write operation in this schedule succeeds. Let $t$ be the least value for which $\sum_{i=1}^{t} p_i ≥ 1/4$. We're going to argue that with constant probability one of the first $t$ writes succeeds, and that the next $n-1$ writes by different processes all fail. The probability that none of the first $t$ writes succeed is \begin{align*} \prod_{i=1}^t (1-p_i) &≤ \prod_{i=1}^t e^{-p_i} \\&= \exp\left(\sum_{i=1}^t p_i\right) \\&≤ e^{-1/4}. \end{align*} Now observe that if some process $p$ writes at or before the $t$-th write, then any process $q$ with a pending write either did no writes previously, or its last write was among the first $t-1$ writes, whose probabilities sum to less than $1/4$. In either case, $q$ has a $\sum_{i\in S_q} p_i + \frac{1}{2n}$ chance of writing on its pending attempt, where $S_q$ is the set of indices in $1\dots t-1$ where $q$ previously attempted to write. Summing up these probabilities over all processes gives a total of $\frac{n-1}{2n} + \sum_q \sum_{i \in S_q} p_i ≤ 1/2 + 1/4 = 3/4$. So with probability at least $e^{-1/4}(1-3/4) = e^{-1/4}/4$, we get agreement. \section{Sifters} \label{section-sifters} A faster conciliator can be obtained using a \concept{sifter}, which is a mechanism for rapidly discarding processes using randomization~\cite{AlistarhA2011} while keeping at least one process around. The simplest sifter has each process either write a register (with low probability) or read it (with high probability); all writers and all readers that see $⊥$ continue to the next stage of the protocol, while all readers who see a non-null value drop out. If the probability of writing is tuned carefully, this will reduce $n$ processes to at most $2\sqrt{n}$ processes on average; by iterating this mechanism, the expected number of remaining processes can be reduced to $1+ε$ after $O(\log \log n + \log (1/ε))$ phases. As with previous implementations of test-and-set (see Algorithm~\ref{alg-n-TAS-from-2TAS}), it's often helpful to have a sifter return not only that a process lost but which process it lost to. This gives the implementation shown in Algorithm~\ref{alg-sifter}. \newFunc{\Sifter}{sifter} \begin{algorithm} \Procedure{$\Sifter(p,r)$}{ \eWithProbability{$p$}{ $r ← \Id$ \; \Return $⊥$\; }{ \Return $r$\; } } \caption{A sifter} \label{alg-sifter} \end{algorithm} To use a sifter effectively, $p$ should be tuned to match the number of processes that are likely to use it. This is because of the following lemma: \begin{lemma} \label{lemma-sifter} Fix $p$, and let $X$ processes executed a sifter with parameter $p$. Let $Y$ be the number of processes for which the sifter returns $⊥$. Then \begin{equation} \ExpCond{X}{Y} ≤ pX + \frac{1}{p}. \label{eq-lemma-sifter} \end{equation} \end{lemma} \begin{proof} In order to return $⊥$, a process must either (a) write to $r$, which occurs with probability $p$, or (b) read $r$ before any other process writes to it. The expected number of writers, conditioned on $X$, is exactly $pX$. The expected number of readers before the first write has a geometric distribution truncated by $X$. Removing the truncation gives exactly $\frac{1}{p}$ expected readers, which is an upper bound on the correct value. \end{proof} For $n$ initial processes, the choice of $p$ that minimizes the bound in \eqref{eq-lemma-sifter} is $\frac{1}{\sqrt{n}}$, giving at most $2\sqrt{n}$ expected survivors. Iterating this process with optimal $p$ at each step gives a sequence of at most $n$, $2\sqrt{n}$, $2\sqrt{2\sqrt{n}}$, etc., expected survivors after each sifter. The twos are a little annoying, but a straightforward induction bounds the expected survivors after $i$ rounds by $4⋅n^{2^{-i}}$. In particular, we get at most $8$ expected survivors after $\ceil{\lg \lg n}$ rounds. At this point it makes sense to switch to a fixed $p$ and a different analysis. For $p=1/2$, the first process to access $r$ always survives, and each subsequent process survives with probability at most $3/4$ (because it leaves if the first process writes and it reads). So the number of ``excess'' processes drops as $(3/4)^i$, and an additional $\ceil{\log_{4/3} (7/ε)}$ rounds are enough to reduce the expected number of survivors from $1+7$ to $1+ε$ for any fixed $ε$.\footnote{This argument essentially follows the proof of~\cite[Theorem 2]{Aspnes2012}, which, because of neglecting to subtract off a $1$ at one point, ends up with $8/ε$ instead of $7/ε$.} It follows that \begin{theorem} \label{theorem-sifter} An initial set of $n$ processes can be reduced to $1$ with probability at least $1-ε$ using $O(\log \log n + \log (1/ε))$ rounds of sifters. \end{theorem} \begin{proof} Let $X$ be the number of survivors after $\ceil{\lg \lg n} + \ceil{\log_{4/3}(7/ε)}$ rounds of sifters, with probabilities tuned as described above. We've shown that $\Exp{X} ≤ 1+ε$, so $\Exp{X-1} ≤ ε$. Since $X-1 ≥ 0$, from Markov's inequality we have $\Prob{X ≥ 2} = \Prob{X-1 ≥ 1} ≤ \Exp{X-1}/1 ≤ ε$. \end{proof} \subsection{Test-and-set using sifters} \label{section-sifter-TAS} Sifters were initially designed to be used for test-and-set. For this purpose, we treat a return value of $⊥$ as ``keep going'' and anything else as ``leave with value $1$.'' Using $O(\log \log n)$ rounds of sifters, we can get down to one process that hasn't left with probability at least $1-\log^{-c} n$ for any fixed constant $c$. We then need a fall-back TAS to handle the $\log^{-c} n$ chance that we get more than one such survivor. Alistarh and Aspnes~\cite{AlistarhA2011} used the \FuncSty{RatRace} algorithm of Alistarh~\etal~\cite{AlistarhAGGG2010} for this purpose. This is an adaptive randomized test-and-set built from splitters and two-process consensus objects that runs in $O(\log k)$ expected time, where $k$ is the number of processes that access the test-and-set; a sketch of this algorithm is given in §\ref{section-ratrace-and-reshuffle}. If we want to avoid appealing to this algorithm, a somewhat simpler approach is to use an approach similar to the Lamport's fast-path mutual exclusion algorithm (described in §\ref{section-mutex-fast}): any process that survives the sifters tries to rush to a two-process TAS at the top of a tree of two-processes TASes by winning a splitter, and if it doesn't win the splitter, it enters at a leaf and pays $O(\log n)$ expected steps. By setting $\epsilon = 1/\log n$, the overall expected cost of this final stage is $O(1)$. This algorithm does not guarantee linearizability. I might lose a sifter early on only to have a later process win all the sifters (say, by writing to each one) and return $0$. A $\AWWgate$ bit as in Algorithm~\ref{alg-n-TAS-from-2TAS} solves this problem. The full code is given in Algorithm~\ref{alg-log-log-TAS}. \begin{algorithm} \eIf{$\AWWgate ≠ ⊥$}{ \Return $1$ \; }{ $\AWWgate ← \MyId$ \; \For{$i \leftarrow 1 \dots \ceil{\log \log n} + \ceil{\log_{4/3} (7 \log n)}$}{ \eWithProbability{$\min\left(1/2, 2^{1-2^{-i+1}}\right)$}{ $r_i ← \MyId$\; }{ $w ← r_i$ \; \If{$w ≠ ⊥$}{ \Return $1$\; } } } } \eIf{$\Splitter() = \SplitterStop$}{ \Return $0$\; }{ \Return $\FuncSty{AWWTAS()}$ } \caption{Test-and-set in $O(\log \log n)$ expected time} \label{alg-log-log-TAS} \end{algorithm} \subsection{Consensus using sifters} \label{section-sifter-consensus} \newData{\ChooseWrite}{chooseWrite} \newFunc{\Conciliator}{conciliator} \newData{\Persona}{persona} With some trickery, the sifter mechanism can be adapted to solve consensus, still in $O(\log \log n)$ expected individual work~\cite{Aspnes2012}. The main difficulty is that a process can no longer drop out as soon as it knows that it lost: it still needs to figure out who won, and possible help that winner over the finish line. The basic idea is that when a process $p$ loses a sifter to some other process $q$, $p$ will act like a clone of $q$ from that point on. In order to make this work, each process writes down at the start of the protocol all of the coin-flips it intends to use to decide whether to read or write at each round of sifting. Together with its input, these coin-flips make up the process's \concept{persona}. In analyzing the progress of the sifter, we count surviving personae (with multiple copies of the same persona counting as one) instead of surviving processes. Pseudocode for this algorithm is given in Algorithm~\ref{alg-conciliator-sifter}. Note that the loop body is essentially the same as the code in Algorithm~\ref{alg-sifter}, except that the random choice is replaced by a lookup in $\Persona.\ChooseWrite$. \begin{algorithm} \Procedure{$\Conciliator(\Input)$}{ Let $R = \ceil{\log \log n} + \ceil{\log_{4/3} (7/\epsilon)}$\; Let $\ChooseWrite$ be a vector of $R$ independent random Boolean variables with $\Pr[\ChooseWrite[i] = 1] = p_i$, where $p_i = 2^{1-2^{-i+1}} (n)^{-2^{-i}}$ for $i \le \ceil{\log \log n}$ and $p_i = 1/2$ for larger $i$. \; $\Persona \leftarrow \langle \Input, \ChooseWrite, \MyId\rangle$ \label{line-initial-persona} \; \For{$i \leftarrow 1 \dots R$ }{ \eIf{$\Persona.\ChooseWrite[i] = 1$}{ \label{line-conciliator-sifter-if-start} $r_i \leftarrow \Persona$\; }{ $v \leftarrow r_i$\; \If{$v \ne \bot$}{ $\Persona \leftarrow v$ \label{line-conciliator-sifter-if-end}\; } } } \Return $\Persona.\Input$\; } \caption{Sifting conciliator (from~\protect{\cite{Aspnes2012}})} \label{alg-conciliator-sifter} \end{algorithm} To show that this works, we need to argue that having multiple copies of a persona around doesn't change the behavior of the sifter. In each round, we will call the first process with a given persona $p$ to access $r_i$ the \concept{representative} of $p$, and argue that a persona survives round $i$ in this algorithm precisely when its representative would survive round $i$ in a corresponding test-and-set sifter with the schedule restricted only to the representatives. There are three cases: \begin{enumerate} \item The representative of $p$ writes. Then at least one copy of $p$ survives. \item The representative of $p$ reads a null value. Again at least one copy of $p$ survives. \item The representative of $p$ reads a non-null value. Then no copy of $p$ survives: all subsequent reads by processes carrying $p$ also read a non-null value and discard $p$, and since no process with $p$ writes, no other process adopts $p$. \end{enumerate} From the preceding analysis for test-and-set, we have that after $O(\log \log n + \log 1/ε)$ rounds with appropriate probabilities of writing, at most $1+ε$ values survive on average. This gives a probability of at most $ε$ of disagreement. By alternating these conciliators with adopt-commit objects, we get agreement in $O(\log \log n + \log m / \log \log m)$ expected time, where $m$ is the number of possible input values. I don't think the $O(\log \log n)$ part of this expression is optimal, but I don't know how to do better. \subsection{A better sifter for test-and-set} A more sophisticated sifter due to Giakkoupis and Woelfel~\cite{GiakkoupisW2012} removes all but $O(\log n)$ processes, on average, using two operations for each process. Iterating this sifter reduces the expected survivors to $O(1)$ in $O(\log^* n)$ rounds. A particularly nice feature of the Giakkoupis-Woelfel algorithm is that (if you don't care about space) it doesn't have any parameters that require tuning to $n$: this means that exactly the same structure can be used in each round. An unfortunate feature is that it's not possible to guarantee that every process that leaves learns the identity of a process that stays: this means that it can't adapted into a consensus protocol using the persona trick described in §\ref{section-sifter-consensus}. Pseudocode is given in Algorithm~\ref{alg-log-star-sifter}. In this simplified version, we assume an infinitely long array $A[1\dots]$, so that we don't need to worry about $n$. Truncating the array at $\log n$ also works, but the analysis requires handling the last position as a special case, which I am too lazy to do here. \begin{algorithm} Choose $r∈ℤ^{+}$ such that $\Prob{r=i} = 2^{-i}$\; $A[r] ← 1$\; \eIf{$A[r+1] = 0$}{ stay\; }{ leave\; } \caption{Giakkoupis-Woelfel sifter~\protect{\cite{GiakkoupisW2012}}} \label{alg-log-star-sifter} \end{algorithm} \begin{lemma} \label{lemma-GW} In any execution of Algorithm~\ref{alg-log-star-sifter} with an oblivious adversary and $n$ processes, at least one process stays, and the expected number of processes that stay is $O(\log n)$. \end{lemma} \begin{proof} For the first part, observe that any process that picks the largest value of $r$ among all processes will survive; since the number of processes is finite, there is at least one such survivor. For the second part, let $X_i$ be the number of survivors with $r=i$. Then $\Exp{X_i}$ is bounded by $n⋅2^{-i}$, since no process survives with $r=i$ without first choosing $r=i$. But we can also argue that $\Exp{X_i} ≤ 3$ for any value of $n$, by considering the sequence of write operations in the execution. Because the adversary is oblivious, the location of these writes is uncorrelated with their ordering. If we assume that the adversary is trying to maximize the number of survivors, its best strategy is to allow each process to read immediately after writing, as delaying this read can only increase the probability that $A[r+1]$ is nonzero. So in computing $X_i$, we are counting the number of writes to $A[i]$ before the first write to $A[i+1]$. Let's ignore all writes to other registers; then the $j$-th write to either of $A[i]$ or $A[i+1]$ has a conditional probability of $2/3$ of landing on $A[i]$ and $1/3$ on $A[i+1]$. We are thus looking at a geometric distribution with parameter $1/3$, which has expectation $3$. Combining these two bounds gives $\Exp{X_i} ≤ \min(3, 2^{-i})$. So then \begin{align*} \Exp{\mbox{survivors}} &≤ ∑_{i=1}^{∞} \min(3, n⋅2^{-i}) \\ &= 3 \lg n + O(1), \end{align*} because once $n⋅2^{-i}$ drops below $3$, the remaining terms form a geometric series. \end{proof} Like square root, logarithm is concave, so Jensen's inequality applies here as well. So $O(\log^* n)$ rounds of Algorithm~\ref{alg-log-star-sifter} reduces us to an expected constant number of survivors, which can then be fed to RatRace. With an adaptive adversary, all of the sifter-based test-and-sets fail badly: in this particular case, an adaptive adversary can sort the processes in order of increasing write location so that every process survives. The best known $n$-process test-and-set for an adaptive adversary is still a tree of $2$-process randomized test-and-sets, as in the Afek~\etal~\cite{AfekWW1992} algorithm described in §\ref{section-test-and-set-from-two-process-consensus}. Whether $O(\log n)$ expected steps is in fact necessary is still open (as is the exact complexity of test-and-set with an oblivious adversary). \section{Space bounds} A classic result of Fich, Herlihy, and Shavit~\cite{FichHS1998} showed that $Ω(\sqrt{n})$ registers are needed to solve consensus even under the very weak requirement of \concept{nondeterministic solo termination}, which says that for every reachable configuration and every process $p$, there exists some continuation of the execution in which the protocol terminates with only $p$ running. The best known upper bound is the trivial bound of $n$—one single-writer register per process—since any algorithm that uses multi-writer registers can be translated into one that uses only single-writer registers, and (assuming wide enough registers) multiple registers of a single process can be combined into one. For many years, there was very little progress in closing the gap between these two bounds. In 2013, we got a hint that FHS might be tight when Giakkoupis~\etal~\cite{GiakkoupisHHW2013} gave a surprising $O(\sqrt{n})$-space algorithm for the closely related problem of obstruction-free one-shot test-and-set. But then Gelashvili~\cite{Gelashvili2015} showed an $n/20$ space lower bound for consensus for anonymous processes, and Zhu quickly followed this with a lower bound for non-anonymous processes~\cite{Zhu2016}, showing that at least $n-1$ registers are required, using a clever combination of bivalence and covering arguments. Around the same time, Giakkoupis~\etal~\cite{GiakkoupisHHW2015} further improved the space complexity of obstruction-free test-and-set to $O(\log n)$, using a deterministic obstruction-free implementation of a sifter. So the brief coincidence of the $Ω(\sqrt{n})$ lower bound on consensus and the $O(\sqrt{n})$ upper bound on test-and-set turned out to be an accident. For consensus, there is still a gap, but it's a very small gap. Whether the actual space needed is $n-1$ or $n$ remains open. \myChapter{Renaming}{2020}{} \label{chapter-renaming} We will start by following the presentation in \cite[§{}16.3]{AttiyaW2004}. This mostly describes results of the original paper of Attiya~\etal~\cite{AttiyaBDPR1990} that defined the renaming problem and gave a solution for message-passing; however, it's now more common to treat renaming in the context of shared-memory, so we will follow Attiya and Welch's translation of these results to a shared-memory setting. \section{Renaming} \label{section-renaming-definition} In the \concept{renaming} problem, we have $n$ processes, each starts with a name from some huge namespace, and we'd like to assign them each unique names from a much smaller namespace. The main application is allowing us to run algorithms that assume that the processes are given contiguous numbers, e.g., the various collect or atomic snapshot algorithms in which each process is assigned a unique register and we have to read all of the registers. With renaming, instead of reading a huge pile of registers in order to find the few that are actually used, we can map the processes down to a much smaller set. Formally, we have a decision problem where each process has input $x_{i}$ (its original name) and output $y_{i}$, with the requirements: \begin{description} \item[Termination] Every nonfaulty process eventually decides. \item[Uniqueness] If $p_{i} \ne p_{j}$, then $y_{i} \ne y_{j}$. \item[Anonymity] The code executed by any process depends only on its input $x_{i}$: for any execution of processes $p_{1}\dots p_{n}$ with inputs $x_{1}\dots x_{n}$, and any permutation $π$ of $[1\dots n]$, there is a corresponding execution of processes $p_{π(1)}\dots p_{π(n)}$ with inputs $x_{1}\dots x_{n}$ in which $p_{π(i)}$ performs exactly the same operations as $p_{i}$ and obtains the same output $y_{i}$. \end{description} The last condition is like non-triviality for consensus: it excludes algorithms where $p_{i}$ just returns $i$ in all executions. Typically we do not have to do much to prove anonymity other than observing that all processes are running the same code. We will be considering renaming in a shared-memory system, where we only have atomic registers to work with. \section{Performance} \label{section-renaming-performance} Conventions on counting processes: \begin{itemize} \item $N$ = number of possible original names. \item $n$ = maximum number of processes. \item $k$ = number of processes that actually execute the algorithm. \end{itemize} Ideally, we'd like any performance measures we get to depend on $k$ alone if possible (giving an \concept{adaptive} algorithm). Next best would be something polynomial in $n$ and $k$. Anything involving $N$ is bad. We'd also like to minimize the size of the output namespace. How well we can do this depends on what assumptions we make. For deterministic algorithms using only read-write registers, a lower bound due to Herlihy and Shavit~\cite{HerlihyS1999} shows that we can't get fewer than $2n-1$ names for general $n$.\footnote{This lower bound was further refined by Castañeda and Rajsbaum~\cite{CastanedaR2008}, who show that $2n-2$ (but no less!) is possible for certain special values of $n$; all of these lower bounds make extensive use of combinatorial topology, so we won't try to present them here.} Our target thus will be exactly $2n-1$ output names if possible, or $2k-1$ if we are trying to be adaptive. For randomized algorithms, it is possible to solve \index{renaming!strong} \indexConcept{strong renaming}{strong} or \index{renaming!tight} \indexConcept{tight renaming}{tight} renaming, where the size of the namespace is exactly $k$; we'll see how to do this in §\ref{section-randomized-renaming}. A small note on bounds: There is a lot of variation in the literature on how bounds on the size of the output namespace are stated. The original Herlihy-Shavit lower bound~\cite{HerlihyS1999} says that there is no general renaming algorithm that uses $2n$ names for $n+1$ processes; in other words, any $n$-process algorithm uses at least $2n-1$ names. Many subsequent papers discussing lower bounds on the namespace follow the approach of Herlihy and Shavit and quote lower bounds that are generally $2$ higher than the minimum number of names needed for $n$ processes. This requires a certain amount of translation when comparing these lower bounds with upper bounds, which use the more natural convention. \section{Order-preserving renaming} Before we jump into upper bounds, let's do an easy lower bound from the Attiya~\etal{} paper~\cite{AttiyaBDPR1990}. This bound works on a variant of renaming called \index{renaming!order-preserving} \concept{order-preserving renaming}, where we require that $y_{i} < y_{j}$ whenever $x_{i} < x_{j}$. Unfortunately, this requires a very large output namespace: with $t$ failures, any asynchronous algorithm for order-preserving renaming requires $2^t(n-t+1)-1$ possible output names. This lower bound applies regardless of the model, as long as some processes may start after other processes have already been assigned names. For the wait-free case, we have $t = n-1$, and the bound becomes just $2^{n}-1$. This is a simpler case than the general $t$-failure case, but the essential idea is the same: if I've only seen a few of the processes, I need to leave room for the others. \begin{theorem} \label{theorem-order-preserving-renaming-lower-bound} There is no order-preserving renaming algorithm for $n$ processes using fewer than $2^{n}-1$ names. \end{theorem} \begin{proof} By induction on $n$. For $n=1$, we use $2^{1}-1=1$ names; this is the base case. For larger $n$, suppose we use $m$ names, and consider an execution in which one process $p_{n}$ runs to completion first. This consumes one name $y_{n}$ and leaves $k$ names less than $y_{n}$ and $m-k-1$ names greater than $y_{n}$. By setting all the inputs $x_{i}$ for $i < n$ either less than $x_{n}$ or greater than $x_{n}$, we can force the remaining processes to choose from the remaining $k$ or $m-k-1$ names. Applying the induction hypothesis, this gives $k ≥ 2^{n-1}-1$ and $m-k-1 ≥ 2^{n-1}-1$, so $m = k+(m-k-1)+1 ≥ 2(2^{n-1}-1)+1 = 2^{n}-1$. \end{proof} \section{Deterministic renaming} \label{section-deterministic-renaming} In \index{renaming!deterministic} \concept{deterministic renaming}, we can't use randomization, and may or may not have any primitives stronger than atomic registers. With just atomic registers, we can only solve loose renaming; with test-and-set, we can solve tight renaming. In this section, we describe some basic algorithms for deterministic renaming. \subsection{Wait-free renaming with \texorpdfstring{$2n-1$}{2n-1} names} \label{section-renaming-snapshots} Here we use Algorithm 55 from~\cite{AttiyaW2004}, which is an adaptation to shared memory of the message-passing renaming algorithm of~\cite{AttiyaBDPR1990}. One odd feature of the algorithm is that, as written, it is not anonymous: processes communicate using an atomic snapshot object and use their process ids to select which component of the snapshot array to write to. But if we think of the process ids used in the algorithm as the inputs $x_{i}$ rather than the actual process ids $i$, then everything works. The version given in Algorithm~\ref{alg-snapshot-renaming} makes this substitution explicit, by treating the original name $i$ as the input. \newData{\WFRview}{view} \newFunc{\getName}{getName} \newFunc{\releaseName}{releaseName} \begin{algorithm} \Procedure{$\getName()$}{ $s ← 1$ \; \While{\True}{ $a[i] ← s$ \; $\WFRview ← \Snapshot(a)$ \; \eIf{$\WFRview[j] = s$ for some $j$}{ $r ← \card*{ \{ j : \WFRview[j] \ne ⊥ ∧ j ≤ i \} }$ \; $s ← r$-th positive integer not in $\{ \WFRview[j] : j \ne i ∧ \WFRview[j] = ⊥ \}$\; }{ \Return $s$\; } } } \caption{Wait-free deterministic renaming} \label{alg-snapshot-renaming} \end{algorithm} The array $a$ holds proposed names for each process (indexed by the original names), or $⊥$ for processes that have not proposed a name yet. If a process proposes a name and finds that no other process has proposed the same name, it takes it; otherwise it chooses a new name by first computing its rank $r$ among the active processes and then choosing the $r$-th smallest name that hasn't been proposed by another process. Because the rank is at most $n$ and there are at most $n-1$ names proposed by the other processes, this always gives proposed names in the range $[1\dots 2n-1]$. But it remains to show that the algorithm satisfies uniqueness and termination. For uniqueness, consider two process with original names $i$ and $j$. Suppose that $i$ and $j$ both decide on $s$. Then $i$ sees a view in which $a[i] = s$ and $a[j] \ne s$, after which it no longer updates $a[i]$. Similarly, $j$ sees a view in which $a[j] = s$ and $a[i] \ne s$, after which it no longer updates $a[j]$. If $i$'s view is obtained first, then $j$ can't see $a[i] \ne s$, but the same holds if $j$'s view is obtained first. So in either case we get a contradiction, proving uniqueness. Termination is a bit trickier. Here we argue that no process can run forever without picking a name, by showing that if we have a set of processes that are doing this, the one with smallest original name eventually picks a name. More formally, call a process \emph{trying} if it runs for infinitely many steps without choosing a name. Then in any execution with at least one trying process, eventually we reach a configuration where all processes have either finished or are trying. In some subsequent configuration, all the processes have written to the $a$ array at least once; from this point on, the set of non-null positions in $a$—and thus the rank each process computes for itself—is stable. Starting from some such stable configuration, look at the trying process $i$ with the smallest original name, and suppose it has rank $r$. Let $F = \{ z_{1} < z_{2} \dots{} \}$ be the set of ``free names'' that are not proposed in $a$ by any of the finished processes. Observe that no trying process $j \ne i$ ever proposes a name in $\{ z_{1} \dots{} z_{r} \}$, because any such process has rank greater than $r$. This leaves $z_{r}$ open for $i$ to claim, provided the other names in $\{ z_{1} \dots{} z_{r} \}$ eventually become free. But this will happen, because only trying processes may have proposed these names (early on in the execution, when the finished processes hadn't finished yet), and the trying processes eventually propose new names that are not in this range. So eventually process $i$ proposes $z_{r}$, sees no conflict, and finishes, contradicting the assumption that it is trying. Note that we haven't proved any complexity bounds on this algorithm at all, but we know that the snapshot alone takes at least $\Omega(N)$ time and space. Brodksy~\etal~\cite{BrodskyEW2011} cite a paper of Bar-Noy and Dolev~\cite{Bar-NoyD1989} as giving a shared-memory version of~\cite{AttiyaBDPR1990} with complexity $O(n ⋅ 4^n)$; they also give algorithms and pointers to algorithms with much better complexity. \subsection{Long-lived renaming} In \index{renaming!long-lived} \concept{long-lived renaming} a process can release a name for later use by other processes (or the same process, if it happens to run choose-name again). Now the bound on the number of names needed is $2k-1$, where $k$ is the maximum number of concurrently active processes. Algorithm~\ref{alg-snapshot-renaming} can be converted to a long-lived renaming algorithm by adding the \releaseName procedure given in Algorithm~\ref{alg-snapshot-renaming-release-name}. This just erases the process's proposed name, so that some other process can claim it. \begin{algorithm} \Procedure{$\releaseName()$}{ $a[i] ← ⊥$\; } \caption{Releasing a name} \label{alg-snapshot-renaming-release-name} \end{algorithm} Here the termination requirement is weakened slightly, to say that some process always makes progress in \getName. It may be, however, that there is some process that never successfully obtains a name, because it keeps getting stepped on by other processes zipping in and out of \getName and \releaseName. \subsection{Renaming without snapshots} \label{section-moir-anderson} Moir and Anderson~\cite{MoirA1995} give a renaming protocol that is somewhat easier to understand and doesn't require taking snapshots over huge arrays. A downside is that the basic version requires $k(k+1)/2$ names to handle $k$ active processes. \subsubsection{Splitters} \label{section-splitters} The Moir-Anderson renaming protocol uses a network of \concept{splitters}, which we last saw providing a fast path for mutual exclusion in §\ref{section-mutex-fast}. Each splitter is a widget, built from a pair of atomic registers, that assigns to each processes that arrives at it the value \SplitterRight, \SplitterDown, or \SplitterStop. As discussed previously, the useful properties of splitters are that if at least one process arrives at a splitter, then (a) at least one process returns \SplitterRight or \SplitterStop; and (b) at least one process returns \SplitterDown or \SplitterStop; (c) at most one process returns \SplitterStop; and (d) any process that runs by itself returns \SplitterStop. We proved the last two properties in §\ref{section-mutex-fast}; we'll prove the first two here. Another way of describing these properties is that of all the processes that arrive at a splitter, some process doesn't go down and some process doesn't go right. By arranging splitters in a grid, this property guarantees that every row or column that gets at least one process gets to keep it—which means that with $k$ processes, no process reaches row $k+1$ or column $k+1$. Algorithm~\ref{alg-splitter-again} gives the implementation of a splitter (it's identical to Algorithm~\ref{alg-splitter}, but it will be convenient to have another copy here). \begin{algorithm} \AlgSplitterBody{alg-splitter-again} \caption{Implementation of a splitter} \label{alg-splitter-again} \end{algorithm} \begin{lemma} \label{lemma-splitter-right} If at least one process completes the splitter, at least one process returns $\SplitterStop$ or $\SplitterRight$. \end{lemma} \begin{proof} Suppose no process returns \SplitterRight; then every process sees \SplitterOpen in \SplitterDoor, which means that every process writes its id to \SplitterRace before any process closes the door. Some process writes its id last: this process will see its own id in \SplitterRace and return \SplitterStop. \end{proof} \begin{lemma} \label{lemma-splitter-down} If at least one process completes the splitter, at least one process returns $\SplitterStop$ or $\SplitterDown$. \end{lemma} \begin{proof} First observe that if no process ever writes to \SplitterDoor, then no process completes the splitter, because the only way a process can finish the splitter without writing to \SplitterDoor is if it sees \SplitterClosed when it reads \SplitterDoor (which must have been written by some other process). So if at least one process finishes, at least one process writes to \SplitterDoor. Let $p$ be any such process. From the code, having written \SplitterDoor, it has already passed up the chance to return \SplitterRight; thus it either returns \SplitterStop or \SplitterDown. \end{proof} \subsubsection{Splitters in a grid} \label{section-splitters-grid} Now build an $m$-by-$m$ triangular grid of splitters, arranged as rows $0\dots m-1$ and columns $0\dots m-1$, where a splitter appears in each position $(r,c)$ with $r+c ≤ m-1$ (see Figure~\ref{figure-moir-anderson} for an example; this figure is taken from~\cite{Aspnes2010splitters}). Assign a distinct name to each of the $\binom{m}{2}$ splitters in this grid. To obtain a name, a process starts at $(r,c) = (0,0)$, and repeatedly executes the splitter at its current position $(r,c)$. If the splitter returns \SplitterRight, it moves to $(r,c+1)$; if \SplitterDown, it moves to $(r+1,c)$; if \SplitterStop, it stops, and returns the name of its current splitter. This gives each name to at most one process (by Lemma~\ref{lemma-splitter-mutex}); we also have to show that if at most $m$ processes enter the grid, every process stops at some splitter. \begin{figure} \centering \includegraphics[scale=0.4]{moir-anderson} \caption{A $6 \times 6$ Moir-Anderson grid} \label{figure-moir-anderson} \end{figure} The argument for this is simple. Suppose some process $p$ leaves the grid on one of the $2m$ output wires. Look at the path it takes to get there (see Figure~\ref{figure-disjoint-paths}, also taken from~\cite{Aspnes2010splitters}). Each splitter on this path must handle at least two processes (or $p$ would have stopped at that splitter, by Lemma~\ref{lemma-splitter-solo-wins}). So some other process leaves on the other output wire, either $\SplitterRight$ or $\SplitterDown$. If we draw a path from each of these wires that continues $\SplitterRight$ or $\SplitterDown$ to the end of the grid, then along each of these $m$ disjoint paths either some splitter stops a process, or some process reaches a final output wire, each of which is at a distinct splitter. But this gives $m$ processes in addition to $p$, for a total of $m+1$ processes. It follows that: \begin{theorem} \label{theorem-moir-anderson} An $m\times m$ Moir-Anderson grid solves renaming for up to $m$ processes. \end{theorem} \begin{figure} \centering \includegraphics[scale=0.4]{disjoint-paths} \caption[Path through a Moir-Anderson grid]{Path taken by a single process through a $6 \times 6$ Moir-Anderson grid (heavy path), and the 6 disjoint paths it spawns (dashed paths). (From~\cite{Aspnes2010splitters}.)} \label{figure-disjoint-paths} \end{figure} The time complexity of the algorithm is $O(m)$: Each process spends at most 4 operations on each splitter, and no process goes through more than $2m$ splitters. In general, any splitter network will take at least $n$ steps to stop $n$ processes, because the adversary can run them all together in a horde that drops only one process at each splitter. If we don't know $k$ in advance, we can still guarantee names of size $O(k^{2})$ by carefully arranging them so that each $k$-by-$k$ subgrid contains the first $\binom{k}{2}$ names. This gives an adaptive renaming algorithm (although the namespace size is pretty high). We still have to choose our grid to be large enough for the largest $k$ we might actually encounter; the resulting space complexity is $O(n^2)$. With a slightly more clever arrangement of the splitters, it is possible to reduce the space complexity to $O(n^{3/2})$~\cite{Aspnes2010splitters}. Whether further reductions are possible is an open problem. Note however that linear time complexity makes splitter networks uncompetitive with much faster randomized algorithms (as we'll see in §\ref{section-randomized-renaming}), so this may not be a very important open problem. \subsection{Getting to \texorpdfstring{$2n-1$}{2n-1} names in polynomial space} \label{section-renaming-space} From before, we have an algorithm that will get $2n-1$ names for $n$ processes out of $N$ possible processes when run using $O(N)$ space (for the enormous snapshots). To turn this into a bounded-space algorithm, run Moir-Anderson first to get down to $Θ(k^{2})$ names, then run the previous algorithm (in $Θ(n^{2})$ space) using these new names as the original names. Since we didn't prove anything about time complexity of the humongous-snapshot algorithm, we can't say much about the time complexity of this combined one. Moir and Anderson suggest instead using an $O(Nk^{2})$ algorithm of Borowsky and Gafni to get $O(k^{4})$ time for the combined algorithm. This is close to the best known: a later paper by Afek and Merritt~\cite{AfekM1999} holds the current record for deterministic adaptive renaming into $2k-1$ names at $O(k^2)$ individual steps. On the lower bound side, it is known that $\Omega(k)$ is a lower bound on the individual steps of any renaming protocol with a polynomial output namespace~\cite{AlistarhAGG2011}. \subsection{Renaming with test-and-set} \label{section-renaming-with-test-and-set} Moir and Anderson give a simple renaming algorithm based on test-and-set that is \index{renaming!strong} \indexConcept{strong renaming}{strong} ($k$ processes are assigned exactly the names $1 \dots k$), \concept{adaptive} (the time complexity to acquire a name is $O(k)$), and \indexConcept{long-lived renaming}{long-lived}, which means that a process can release its name and the name will be available to processes that arrive later. In fact, the resulting algorithm gives \index{renaming!long-lived strong} \concept{long-lived strong renaming}, meaning that the set of names in use will always be no larger than the set of processes that have started to acquire a name and not yet finished releasing one; this is a little stronger than just saying that the algorithm is strong and that it is long-lived separately. The algorithm is simple: we have a line of test-and-set bits $T[1] \dots T[n]$. To acquire a name, a process starts at $T[1]$ and attempts to win each test-and-set until it succeeds; whichever $T[i]$ it wins gives it name $i$. To release a name, a process releases the test-and-set. Without the releases, the same mechanism gives fetch-and-increment~\cite{AfekWW1992}. Fetch-and-increment by itself solves tight renaming (although not long-lived renaming, since there is no way to release a name). \section{Randomized renaming} \label{section-randomized-renaming} With randomization, we can beat both the $2k-1$ lower bound on the size of the output namespace from~\cite{HerlihyS1999} and the $\Omega(k)$ lower bound on individual work from~\cite{AlistarhAGG2011}, achieving strong renaming with $O(\log k)$ expected individual work~\cite{AlistarhACHGZ2011}. The basic idea is that we can use randomization for \concept{load balancing}, where we avoid the problem of having an army of processes marching together with only a few peeling off at a time (as in splitter networks) by having the processes split up based on random choices. For example, if each process generates a random name consisting of $2 \ceil{\lg n}$ bits, then it is reasonably likely that every process gets a unique name in a namespace of size $O(n^2)$ (we can't hope for less than $O(n^2)$ because of the \concept{birthday paradox}). But we want all processes to be guaranteed to have unique names, so we need some more machinery. We also need the processes to have initial names; if they don't, there is always some nonzero probability that two identical processes will flip their coins in exactly the same way and end up with the same name. This observation was formalized by Buhrman, Panconesi, Silvestri, and Vitányi~\cite{BuhrmanPSV2006}. \subsection{Randomized splitters} Attiya~\etal~\cite{AttiyaKPWW2006} suggested the use of \index{splitter!randomized} \indexConcept{randomized splitter}{randomized splitters} in the context of another problem (\index{collect!adaptive}\concept{adaptive collect}) that is closely related to renaming. A randomized splitter is just like a regular splitter, except that if a process doesn't stop it flips a coin to decide whether to go right or down. Randomized splitters are nice because they usually split better than deterministic splitters: if $k$ processes reach a randomized splitter, with high probability no more than $k/2 + O(\sqrt{k \log k})$ will leave on either output wire. It's not hard to show that a binary tree of these things of depth $2 \ceil{\lg n}$ stops all but a constant expected number of processes on average;\footnote{The proof is to consider the expected number of pairs of processes that flip their coins the same way for all $2 \ceil{\lg n}$ steps. This is at most $\binom{n}{2} n^{-2} < 1/2$, so on average at most 1 process escapes the tree, giving (by symmetry) at most a $1/n$ chance that any particular process escapes. Making the tree deeper can give any polynomial fraction of escapees while still keeping $O(\log n)$ layers.} processes that don't stop can be dropped into a backup renaming algorithm (Moir-Anderson, for example) with only a constant increase in expected individual work. Furthermore, the binary tree of randomized splitters is adaptive; if only $k$ processes show up, we only need $O(\log k)$ levels levels on average to split them up. This gives renaming into a namespace with expected size $O(k^2)$ in $O(\log k)$ expected individual steps. \subsection{Randomized test-and-set plus sampling} \label{section-ratrace} \label{section-ratrace-and-reshuffle} Subsequent work by Alistarh~\etal~\cite{AlistarhAGGG2010} showed how some of the same ideas could be used to get strong renaming, where the output namespace has size exactly $n$ (note this is not adaptive; another result in the same paper gives adaptive renaming, but it's not strong). There are two pieces to this result: an implementation of randomized test-and-set called \FuncSty{RatRace}, and a sampling procedure for getting names called \FuncSty{ReShuffle}. The \index{RatRace}\FuncSty{RatRace} protocol implements a randomized test-and-set with $O(\log k)$ expected individual work. The essential idea is to use a tree of randomized splitters to assign names, then have processes walk back up the same tree attempting to win a $3$-process randomized test-and-set at each node (there are 3 processes, because in addition to the winners of each subtree, we may also have a process that stopped on that node in the renaming step); this test-and-set is just a very small binary tree of 2-process test-and-sets implemented using the algorithm of Tromp and Vitányi~\cite{TrompV2002}. A \AWWgate bit is added at the top as in the test-and-set protocol of Afek~\etal~\cite{AfekGTV1992} to get linearizability. Once we have test-and-set, we could get strong renaming using a linear array of test-and-sets as suggested by Moir and Anderson~\cite{MoirA1995}, but it's more efficient to use the randomization to spread the processes out. In the \index{ReShuffle}\FuncSty{ReShuffle} protocol, each process chooses a name in the range $[1 \dots n]$ uniformly at random, and attempts to win a test-and-set guarding that name. If it doesn't work, it tries again. Alistarh~\etal{} show that this method produces unique names for everybody in $O(n \log^4 n)$ total steps with high probability. The individual step complexity of this algorithm, however, is not very good: there is likely to be some unlucky process that needs $\Omega(n)$ probes (at an expected cost of $Θ(\log n)$ steps each) to find an empty slot. \subsection{Renaming with sorting networks} A later paper by Alistarh~\etal~\cite{AlistarhACHGZ2011} reduces the cost of renaming still further, getting $O(\log k)$ expected individual step complexity for acquiring a name. The resulting algorithm is both adaptive and strong: with $k$ processes, only names $1$ through $k$ are used. We'll describe the non-adaptive version here. The basic idea is to build a \index{network!sorting}\concept{sorting network} out of test-and-sets; the resulting structure, called a \index{network!renaming}\concept{renaming network}, routes each process through a sequence of test-and-sets to a unique output wire. Unlike a splitter network, a renaming network uses the stronger properties of test-and-set to guarantee that (once the dust settles) only the lowest-numbered output wires are chosen; this gives strong renaming. \subsubsection{Sorting networks} A sorting network is a kind of parallel sorting algorithm that proceeds in synchronous rounds, where in each round the elements of an array at certain fixed positions are paired off and swapped if they are out of order. The difference between a sorting network and a standard comparison-based sort is that the choice of which positions to compare at each step is static, and doesn't depend on the outcome of previous comparisons; also, the only effect of a comparison is possibly swapping the two values that were compared. Sorting networks are drawn as in Figure~\ref{figure-sorting-network}. Each horizontal line or \concept{wire} corresponds to a position in the array. The vertical lines are \concept{comparators} that compare two values coming in from the left and swap the larger value to the bottom. A network of comparators is a sorting network if the sequences of output values is always sorted no matter what the order of values on the inputs is. \begin{figure} \centering \includegraphics[scale=0.8]{sorting-network.pdf} \caption{A sorting network} \label{figure-sorting-network} \end{figure} The \indexConcept{depth!sorting network}{depth} of a sorting network is the maximum number of comparators on any path from an input to an output. The \indexConcept{width!sorting network}{width} is the number of wires; equivalently, the number of values the network can sort. The sorting network in Figure~\ref{figure-sorting-network} has depth 3 and width 4. Explicit constructions of sorting networks with width $n$ and depth $O(\log^2 n)$ are known~\cite{Batcher1968}. It is also known that sorting networks with depth $O(\log n)$ exist~\cite{AjtaiKS1983}, but no explicit construction of such a network is known. \subsubsection{Renaming networks} To turn a sorting network into a renaming network, we replace the comparators with test-and-set bits, and allow processes to walk through the network asynchronously. This is similar to an earlier mechanism called a \index{network!counting} \concept{counting network}~\cite{AspnesHS1994}, which used certain special classes of sorting networks as counters, but here any sorting network works. Each process starts on a separate input wire, and we maintain the invariant that at most one process ever traverses a wire. It follows that each test-and-set bit is only used by two processes. The first process to reach the test-and-set bit is sent out the lower output, while the second is sent out the upper output. If we imagine each process that participates in the protocol as a one and each process that doesn't as a zero, the test-and-set bit acts as a comparator: if no processes show up on either input (two zeros), no processes leave (two zeros again); if processes show up on both inputs (two ones), processes leave on both (two ones again); and if only one process ever shows up (a zero and a one), it leaves on the bottom output (zero and one, sorted). Because the original sorting network sorts all the ones to the bottom output wires, the corresponding renaming network sorts all the processes that arrive to the bottom outputs. Label these outputs starting at $1$ at the bottom to get renaming. Since each test-and-set involves at most two processes, we can carry them out in $O(1)$ expected register operations using, for example, the protocol of Tromp and Vitányi~\cite{TrompV2002}. The expected cost for a process to acquire a name is then $O(\log n)$ (using an AKS~\cite{AjtaiKS1983} sorting network). A more complicated construction in the Alistarh~\etal{} paper shows how to make this adaptive, giving an expected cost of $O(\log k)$ instead. The problem with using an AKS network is that the AKS result is non-constructive: what Ajtai, Komlós, and Szemerédi show is that there is a particular randomized construction of candidate sorting networks that succeeds in producing a correct sorting network with nonzero (but very small) probability. Other disturbing features of this result are that we have no efficient way to test candidate sorting networks (determining if a network of comparators is in fact a sorting network is co-\classNP-hard), and the constant in the big-O for AKS is quite spectacularly huge. So it probably makes more sense to think of renaming networks as giving renaming in $O(\log^2 n)$ time, since this is the most efficient practical sorting network we currently know about. This has led to efforts to produce $O(\log k)$-work tight renaming algorithms that don't depend on AKS. So far this has not worked out in the standard shared-memory model, even allowing test-and-sets.\footnote{The closest to this so far is an algorithm of Berenbrink~\etal~\cite{BerenbrinkBEFN2015}, who use an extended model that incorporates an extra primitive called a \concept{$τ$-register}, which is basically a collection of $2 \log n$ test-and-set objects that are restricted so that at most $τ < 2 \log n$ of them can be set at a time. Adding this primitive to the model is not entirely cheating, as the authors make a case that it could be plausibly implemented in hardware. But it does mean that we don't know what happens if we don't have this additional primitive.} The use of test-and-sets to route processes to particular names is similar to the line of test-and-sets proposed by Moir and Anderson~\cite{MoirA1995} as described in §\ref{section-renaming-with-test-and-set}. Some differences between that protocol and renaming networks is that renaming networks do not by themselves give fetch-and-increment (although Alistarh~\etal{} show how to build fetch-and-increment on top of renaming networks at a small additional cost), and renaming networks do not provide any mechanism for releasing names. The question of whether it is possible to get cheap long-lived strong renaming is still open. \subsection{Randomized loose renaming} Loose renaming should be easier than strong renaming, and using a randomized algorithm it essentially reduces to randomized load balancing. A basic approach is to use $2n$ names, and guard each with a test-and-set; because less than half of the names are taken at any given time, each process gets a name after $O(1)$ tries and the most expensive renaming operation over all $n$ processes takes $O(\log n)$ expected steps. A more sophisticated version of this strategy, which appears in~\cite{AlistarhAGW2013}, uses $n(1+ε)$ output names to get $O(\log \log n)$ maximum steps. The intuition for why this works is if $n$ processes independently choose one of $cn$ names uniformly at random, then the expected number of collisions—pairs of processes that choose the same name—is $\binom{n}{2}/cn$, or about $n/2c$. This may seem like only a constant-factor improvement, but if we instead look at the ratio between the survivors $n/2c$ and the number of allocated names $cn$, we have now moved from $1/c$ to $1/2c^2$. The $2$ gives us some room to reduce the number of names in the next round, to $cn/2$, say, while still keeping a $1/c^2$ ratio of survivors to names. So the actual renaming algorithm consists of allocating $cn/2^i$ names to round $i$, and squaring the ratio of survivors to names in each rounds. It only takes $O(\log \log n)$ rounds to knock the ratio of survivors to names below $1/n$, so at this point it is likely that all processes will have finished. At the same time, the sum over all rounds of the allocated names forms a geometric series, so only $O(n)$ names are needed altogether. Swept under the carpet here is a lot of careful analysis of the probabilities. Unlike what happens with sifters (see~§\ref{section-sifters}), Jensen's inequality goes the wrong way here, so some additional technical tricks are needed (see the paper for details). But the result is that only $O(\log \log n)$ rounds are to assign every process a name with high probability, which is the best value currently known. There is a rather weak lower bound in the Alistarh~\etal{} paper that shows that $Ω(\log \log n)$ steps are needed for some process in the worst case, under the assumption that the renaming algorithm uses only test-and-set objects and that a process acquires a name as soon as it wins some test-and-set object. This does not give a lower bound on the problem in general, and indeed the renaming-network based algorithms discussed previously do not have this property. So the question of the exact complexity of randomized loose renaming is still open. \myChapter{Software transactional memory}{2011}{If you are interested in software transactional memory from a theoretical perspective, there is a more recent survey on this material by Attiya~\cite{Attiya2014}, available at \url{http://www.eatcs.org/images/bulletin/beatcs112.pdf}.} \label{chapter-STM} \index{transactional memory!software} \indexConcept{software transactional memory}{Software transactional memory}, or \concept{STM} for short, goes back to Shavit and Touitou~\cite{ShavitT1997} based on earlier proposals for hardware support for transactions by Herlihy and Moss~\cite{HerlihyM1993}. Recently very popular in programming language circles. We'll give a high-level description of the Shavit and Touitou results; for full details see the actual paper. We start with the basic idea of a \concept{transaction}. In a transaction, I read a bunch of registers and update their values, and all of these operations appear to be \concept{atomic}, in the sense that the transaction either happens completely or not at all, and serializes with other transactions as if each occurred instantaneously. Our goal is to implement this with minimal hardware support, and use it for everything. Generally we only consider \index{transaction!static} \indexConcept{static transaction}{static transactions} where the set of memory locations accessed is known in advance, as opposed to \index{transaction!dynamic} \indexConcept{dynamic transaction}{dynamic transactions} where it may vary depending on what we read (for example, maybe we have to follow pointers through some data structure). Static transactions are easier because we can treat them as multi-word read-modify-write. Implementations are usually \concept{non-blocking}: some infinite stream of transactions succeed, but not necessarily yours. This excludes the simplest method based on acquiring locks, since we have to keep going even if a lock-holder crashes, but is weaker than wait-freedom since we can have starvation. \section{Motivation} Some selling points for software transactional memory: \begin{enumerate} \item We get atomic operations without having to use our brains much. Unlike hand-coded atomic snapshots, counters, queues, etc., we have a universal construction that converts any sequential data structure built on top of ordinary memory into a concurrent data structure. This is useful since most programmers don't have very big brains. We also avoid burdening the programmer with having to remember to lock things. \item We can build large shared data structures with the possibility of concurrent access. For example, we can implement atomic snapshots so that concurrent updates don't interfere with each other, or an atomic queue where enqueues and dequeues can happen concurrently so long as the queue always has a few elements in it to separate the enqueuers and dequeuers. \item We can execute atomic operations that span multiple data structures, even if the data structures weren't originally designed to work together, provided they are all implemented using the STM mechanism. This is handy in classic database-like settings, as when we want to take \$5 from my bank account and put it in yours. \end{enumerate} On the other hand, we now have to deal with the possibility that operations may fail. There is a price to everything. \section{Basic approaches} \begin{itemize} \item Locking (not non-blocking). Acquire either a single lock for all of memory (doesn't allow much concurrency) or a separate lock for each memory location accessed. The second approach can lead to deadlock if we aren't careful, but we can prove that if every transaction acquires locks in the same order (e.g., by increasing memory address), then we never get stuck: we can order the processes by the highest lock acquired, and somebody comes out on top. Note that acquiring locks in increasing order means that I have to know which locks I want before I acquire any of them, which may rule out dynamic transactions. \item Single-pointer compare-and-swap (called ''Herlihy's method'' in~\cite{ShavitT1997}, because of its earlier use for constructing concurrent data structures by Herlihy~\cite{Herlihy1993}). All access to the data structure goes through a pointer in a CAS. To execute a transaction, I make my own copy of the data structure, update it, and then attempt to redirect the pointer. Advantages: trivial to prove that the result is linearizable (the pointer swing is an atomic action) and non-blocking (somebody wins the CAS); also, the method allows dynamic transactions (since you can do anything you want to your copy). Disadvantages: There's a high overhead of the many copies,\footnote{This overhead can be reduced in many cases by sharing components, a subject that has seen much work in the functional programming literature. See for example~\cite{Okasaki1999}.} and the single-pointer bottleneck limits concurrency even when two transactions use disjoint parts of memory. \item Multiword RMW: This is the approach suggested by Shavit and Touitou, which most subsequent work follows. As usually implemented, it only works for static transactions. The idea is that I write down what registers I plan to update and what I plan to do to them. I then attempt to acquire all the registers. If I succeed, I update all the values, store the old values, and go home. If I fail, it's because somebody else already acquired one of the registers. Since I need to make sure that somebody makes progress (I may be the only process left alive), I'll help that other process finish its transaction if possible. Advantages: allows concurrency between disjoint transactions. Disadvantages: requires implementing multi-word RMW—in particular, requires that any process be able to understand and simulate any other process's transactions. Subsequent work often simplifies this to implementing multi-word CAS, which is sufficient to do non-blocking multi-word RMW since I can read all the registers I need (without any locking) and then do a CAS to update them (which fails only if somebody else succeeded). \end{itemize} \section{Implementing multi-word RMW} We'll give a sketchy description of Shavit and Touitou's method~\cite{ShavitT1997}, which essentially follows the locking approach but allows other processes to help dead ones so that locks are always released. The synchronization primitive used is \index{load-linked/store-conditional} \concept{LL/SC}: LL (\concept{load-linked}) reads a register and leaves our id attached to it, SC (\concept{store-conditional}) writes a register only if our id is still attached, and clears any other id's that might also be attached. It's easy to build a 1-register CAS (CAS1) out of this, though Shavit and Touitou exploit some additional power of LL/SC. \newData{\STMstatus}{status} \newData{\STMrec}{rec} \newData{\STMversion}{version} \newData{\STMfailure}{failure} \newData{\STMsuccess}{success} \newFunc{\LL}{LL} \newFunc{\SC}{SC} \subsection{Overlapping LL/SC} \label{section-overlapping-LL/SC} The particular trick that gets used in the Shavit-Touitou protocol is to use two overlapping LL/SC pairs to do a CAS-like update on one memory location while checking that another memory location hasn't changed. The purpose of this is to allow multiple processes to work on the same transaction (which requires the first CAS to avoid conflicts with other transactions) while making sure that slow processes don't cause trouble by trying to complete transactions that have already finished (the second check). To see this in action, suppose we have a register $r$ that we want to do a CAS on, while checking that a second register $\STMstatus$ is $⊥$ (as opposed to $\STMsuccess$ or $\STMfailure$). If we execute the code fragment in Algorithm~\ref{alg-overlapping-LL/SC}, it will succeed only if nobody writes to $\STMstatus$ between its \LL and \SC and similarly for $r$; if this occurs, then at the time of $\LL(r)$, we know that $\STMstatus = ⊥$, and we can linearize the write to $r$ at this time if we restrict all access to $r$ to go through LL/SC. \begin{algorithm} \If{$\LL(\STMstatus) = ⊥$}{ \If{$\LL(r) = \DataSty{oldValue}$}{ \If{$\SC(\STMstatus, ⊥) = \True$}{ $\SC(r, \DataSty{newValue})$\; } } } \caption{Overlapping LL/SC} \label{alg-overlapping-LL/SC} \end{algorithm} \subsection{Representing a transaction} \newData{\STMaddresses}{addresses} \newData{\STMoldValues}{oldValues} \newData{\STMowner}{owner} Transactions are represented by records $\STMrec$. Each such record consists of a \STMstatus component that describes how far the transaction has gotten (needed to coordinate cooperating processes), a \STMversion component that distinguishes between versions that may reuse the same space (and that is used to shut down the transaction when complete), a \DataSty{stable} component that indicates when the initialization is complete, an \DataSty{Op} component that describes the RMW to be performance, an array $\STMaddresses[]$ of pointers to the arguments to the RMW, and an array $\STMoldValues[]$ of old values at these addresses (for the R part of the RMW). These are all initialized by the initiator of the transaction, who will be the only process working on the transaction until it starts acquiring locks. \subsection{Executing a transaction} Here we give an overview of a transaction execution: \begin{enumerate} \item Initialize the record \STMrec for the transaction. (Only the initiator does this.) \item Attempt to acquire ownership of registers in $\STMaddresses[]$. See the \FuncSty{AcquireOwnerships} code in the paper for details. The essential idea is that we want to set the field $\STMowner[r]$ for each memory location $r$ that we need to lock; this is done using an overlapping LL/SC as described above so that we only set $\STMowner[r]$ if (a) $r$ is currently unowned, and (b) nothing has happened to $\STMrec.\STMstatus$ or $\STMrec.\STMversion$. Ownership is acquired in order of increasing memory address; if we fail to acquire ownership for some $r$, our transaction fails. In case of failure, we set $\STMrec.\STMstatus$ to \STMfailure and release all the locks we've acquired (checking $\STMrec.\STMversion$ in the middle of each LL/SC so we don't release locks for a later version using the same record). If we are the initiator of this transaction, we will also go on to attempt to complete the transaction that got in our way. \item Do a \LL on $\STMrec.\STMstatus$ to see if \FuncSty{AcquireOwnerships} succeeded. If so, update the memory, store the old results in \STMoldValues, and release the ownerships. If it failed, release ownership and help the next transaction as described above. \end{enumerate} Note that only an initiator helps; this avoids a long chain of helping and limits the cost of each attempted transaction to the cost of doing two full transactions, while (as shown below) still allowing some transaction to finish. \subsection{Proof of linearizability} Intuition is: \begin{itemize} \item Linearizability follows from the linearizability of the locking protocol: acquiring ownership is equivalent to grabbing a lock, and updates occur only when all registers are locked. \item Complications come from (a) two or more processes trying to complete the same transaction and (b) some process trying to complete an old transaction that has already terminated. For the first part we just make sure that the processes don't interfere with each other, e.g. I am happy when trying to acquire a location if somebody else acquires it for the same transaction. For the second part we have to check $\STMrec.\STMstatus$ and $\STMrec.\STMversion$ before doing just about anything. See the pseudocode in the paper for details on how this is done. \end{itemize} \subsection{Proof of non-blockingness} To show that the protocol is non-blocking we must show that if an unbounded number of transactions are attempted, one eventually succeeds. First observe that in order to fail, a transaction must be blocked by another transaction that acquired ownership of a higher-address location than it did; eventually we run out of higher-address locations, so there is some transaction that doesn't fail. Of course, this transaction may not succeed (e.g., if its initiator dies), but either (a) it blocks some other transaction, and that transaction's initiator will complete it or die trying, or (b) it blocks no future transactions. In the second case we can repeat the argument for the $n-1$ surviving processes to show that some of them complete transactions, ignoring the stalled transaction from case (b). \section{Improvements} One downside of the Shavit and Touitou protocol is that it uses LL/SC very aggressively (e.g., with overlapping LL/SC operations) and uses non-trivial (though bounded, if you ignore the ever-increasing version numbers) amounts of extra space. Subsequent work has aimed at knocking these down; for example a paper by Harris, Fraser, and Pratt~\cite{HarrisFP2002} builds multi-register CAS out of single-register CAS with $O(1)$ extra bits per register. The proof of these later results can be quite involved; Harris~\etal , for example, base their algorithm on an implementation of 2-register CAS whose correctness has been verified only by machine (which may be a plus in some views). \section{Limitations} There has been a lot of practical work on STM designed to reduce overhead on real hardware, but there's still a fair bit of overhead. On the theory side, a lower bound of Attiya, Hillel, and Milani~\cite{AttiyaHM2009} shows that any STM system that guarantees non-interference between non-overlapping RMW transactions has the undesirable property of making read-only transactions as expensive as RMW transactions: this conflicts with the stated goals of many practical STM implementations, where it is assumed that most transactions will be read-only (and hopefully cheap). So there is quite a bit of continuing research on finding the right trade-offs. \myChapter{Obstruction-freedom}{2011}{In particular: §\ref{section-boosting-obstruction-freedom-to-wait-freedom} has not been updated to include some more recent results~\cite{AlistarhCS2013,GiakkoupisHHW2013}; and §\ref{section-lock-free-lower-bounds} mostly follows the conference version~\cite{FichHS2005} of the Ellen-Hendler-Shavit paper and omits stronger results from the journal version~\cite{EllenHS2012}.} \label{chapter-obstruction-freedom} The gold standard for shared-memory objects is \index{wait-free}\concept{wait-freedom}: I can finish my operation in a bounded number of steps no matter what anybody else does. Like the gold standard in real life, this can be overly constraining. So researchers have developed several weaker progress guarantees that are nonetheless useful. The main ones are: \begin{description} \item[Lock-freedom] An implementation is \concept{lock-free} if infinitely many operations finish in any infinite execution. In simpler terms, somebody always makes progress, but maybe not you. (Also called \concept{non-blocking}.) \item[Obstruction-freedom] An implementation is \concept{obstruction-free} if, starting from any reachable configuration, any process can finish in a bounded number of steps if all of the other processes stop. This definition was proposed in 2003 by Herlihy, Luchangco, and Moir~\cite{HerlihyLM2003}. In lower bounds (e.g., the Jayanti-Tan-Toueg bound described in Chapter~\ref{chapter-JTT}) essentially the same property is often called \concept{solo-terminating}. \end{description} Both of these properties exclude traditional lock-based algorithms, where some process grabs a lock, updates the data structure, and then release the lock; if this process halts, no more operations finish. Both properties are also weaker than wait-freedom. It is not hard to show that lock-freedom is a stronger condition that obstruction-freedom: given a lock-free implementation, if we can keep some single process running forever in isolation, we get an infinite execution with only finitely many completed operations. So we have a hierarchy: wait-free $>$ lock-free $>$ obstruction-free $>$ locking. \section{Why build obstruction-free algorithms?} The pitch is similar to the pitch for building locking algorithms: an obstruction-free algorithm might be simpler to design, implement, and reason about than a more sophisticated algorithm with stronger properties. Unlike locking algorithms, an obstruction-free algorithm won't fail because some process dies holding the lock; instead, it fails if more than one process runs the algorithm at the same time. This possibility may be something we can avoid by building a \concept{contention manager}, a high-level protocol that detects contention and delays some processes to avoid it (say, using randomized exponential back-off). \section{Examples} \subsection{Lock-free implementations} Pretty much anything built using compare-and-swap or LL/SC ends up being lock-free. A simple example would be a counter, where an increment operation does \begin{algorithm}[h] $x ← \LL(C)$ \; $\SC(C, x+1)$ \; \end{algorithm} This is lock-free (the only way to prevent a store-conditional from succeeding is if some other store-conditional succeeds, giving infinitely many successful increments) but not wait-free (I can starve). It's also obstruction-free, but since it's already lock-free we don't care about that. \subsection{Double-collect snapshots} Similarly, suppose we are doing atomic snapshots. We know that there exist wait-free implementations of atomic snapshots, but they are subtle and confusing. So we want to do something simpler, and hope that we at least get obstruction-freedom. If we do double-collects, that is, we have updates just write to a register and have snapshots repeatedly collect until they get two collects in a row with the same values, then any snapshot that finishes is correct (assuming no updaters ever write the same value twice, which we can enforce with nonces). This isn't wait-free, because we can keep a snapshot going forever by doing a lot of updates. It \emph{is} lock-free, because we have to keep doing updates to make this happen. We can make this merely obstruction-free if we work hard (there is no reason to do this, but it illustrates the difference between lock-freedom—good—and obstruction-freedom—not so good). Suppose that every process keeps a count of how many collects it has done in a register that is included in other process's collects (but not its own). Then two concurrent scans can stall each other forever (the implementation is not lock-free), but if only one is running it completes two collects in $O(n)$ operations without seeing any changes (it is obstruction-free). \subsection{Software transactional memory} Similar things happen with software transactional memory (see Chapter~\ref{chapter-STM}). Suppose that I have an implementation of multiword compare-and-swap, and I want to carry out a transaction. I read all the values I need, then execute an MCAS operation that only updates if these values have not changed. The resulting algorithm is lock-free (if my transaction fails, it's because some update succeeded). If however I am not very clever and allow some values to get written outside of transactions, then I might only be obstruction-free. \subsection{Obstruction-free test-and-set} \label{section-obstruction-free-test-and-set} Algorithm~\ref{alg-obstruction-free-TAS} gives an implementation of $2$-process test-and-set from atomic registers that is obstruction-free; this demonstrates that obstruction-freedom lets us evade the wait-free impossibility results implied by the consensus hierarchy (\cite{Herlihy1991waitfree}, discussed in Chapter~\ref{chapter-wait-free-hierarchy}). The basic idea goes back to the \concept{racing counters} technique used in consensus protocols starting with Chor, Israeli, and Li~\cite{ChorIL1994}, and there is some similarity to a classic randomized wait-free test-and-set due to Tromp and Vitányi~\cite{TrompV2002}. Each process keeps a position $x$ in memory that it also stores from time to time in its register $a[i]$. If a process gets $2$ steps ahead of the other process (as observed by comparing $x$ to $a[i-1]$, it wins the test-and-set; if a process falls one or more steps behind, it (eventually) loses. To keep space down and guarantee termination in bounded time, all values are tracked modulo $5$. \begin{algorithm} $x ← 0$ \\ \While{\True}{ $δ ← x - a[1-i]$\; \uIf{$δ = 2 \pmod{5}$}{ \Return $0$\; } \uElseIf{$δ = -1 \pmod{5}$}{ \Return $1$\; } \Else{ $x ← (x+1) \bmod{5}$ \; $a[i] ← x$\; } } \caption{Obstruction-free $2$-process test-and-set} \label{alg-obstruction-free-TAS} \end{algorithm} Why this works: observe that whenever a process computes $δ$, $x$ is equal to $a[i]$; so $δ$ is always an instantaneous snapshot of $a[i] - a[1-i]$. If I observe $δ = 2$ and return $0$, your next read will either show you $δ = -2$ or $δ = -1$ (depending on whether you increment $a[1-i]$ after my read). In the latter case, you return $1$ immediately; in the former, you return after one more increment (and more importantly, you can't return $0$). Alternatively, if I ever observe $δ = -1$, your next read will show you either $δ = 1$ or $δ = 2$; in either case, you will eventually return $0$. (We chose $5$ as a modulus because this is the smallest value that makes the cases $δ = 2$ and $δ = -2$ distinguishable.) We can even show that this is linearizable, by considering a solo execution in which the lone process takes two steps and returns $0$ (with two processes, solo executions are the only interesting case for linearizability). However, Algorithm~\ref{alg-obstruction-free-TAS} is not wait-free or even lock-free: if both processes run in lockstep, they will see $δ = 0$ forever. But it is obstruction-free. If I run by myself, then whatever value of $δ$ I start with, I will see $-1$ or $2$ after at most $6$ operations.\footnote{The worst case is where an increment by my fellow process leaves $δ = -1$ just before my increment.} This gives an \index{complexity!obstruction-free step} \index{step complexity!obstruction-free} \concept{obstruction-free step complexity} of $6$, where the obstruction-free step complexity is defined as the maximum number of operations any process can take after all other processes stop. Note that our usual wait-free measures of step complexity don't make a lot of sense for obstruction-free algorithms, as we can expect a sufficiently cruel adversary to be able to run them up to whatever value he likes. Building a tree of these objects as in §\ref{section-test-and-set-from-two-process-consensus} gives $n$-process test-and-set with obstruction-free step complexity $O(\log n)$. \subsection{An obstruction-free deque} (We probably aren't going to do this in class.) So far we don't have any good examples of why we would want to be obstruction-free if our algorithm is based on CAS. So let's describe the case Herlihy~\etal{} suggested. \newFunc{\OFrightPush}{rightPush} \newFunc{\OFrightPop}{rightPop} \newFunc{\OFleftPush}{leftPush} \newFunc{\OFleftPop}{leftPop} \newFunc{\OForacle}{oracle} \newData{\OFtop}{top} \newData{\OFright}{right} \newData{\OFprev}{prev} \newData{\OFcur}{cur} \newData{\OFnext}{next} \newData{\OFvalue}{value} \newData{\OFversion}{version} \newData{\OFRN}{RN} \newData{\OFLN}{LN} \newData{\CAS}{CAS} A \concept{deque} is a generalized queue that supports push and pop at both ends (thus it can be used as either a queue or a stack, or both). A classic problem in shared-memory objects is to build a deque where operations at one end of the deque don't interfere with operations at the other end. While there exist lock-free implementation with this property, there is a particularly simple implementation using CAS that is only obstruction-free. Here's the idea: we represent the deque as an infinitely-long array of compare-and-swap registers (this is a simplification from the paper, which gives a bounded implementation of a bounded deque). The middle of the deque holds the actual contents. To the right of this region is an infinite sequence of \index{null!right}\concept{right null} (\OFRN) values, which are assumed never to appear as a pushed value. To the left is a similar infinite sequence of \index{null!left}\concept{left null} (\OFLN) values. Some magical external mechanism (called an \concept{oracle} in the paper) allows processes to quickly find the first null value at either end of the non-null region; the correctness of the protocol does not depend on the properties of the oracle, except that it has to point to the right place at least some of the time in a solo execution. We also assume that each cell holds a version number whose only purpose is to detect when somebody has fiddled with the cell while we aren't looking (if we use LL/SC, we can drop this). Code for \OFrightPush and \OFrightPop is given in Algorithm~\ref{alg-obstruction-free-deque} (the code for \OFleftPush and \OFleftPop is symmetric). \begin{algorithm} \Procedure{$\OFrightPush(v)$}{ \While{\True}{ $k ← \OForacle(\OFright)$ \; $\OFprev ← a[k-1]$ \; $\OFnext ← a[k]$ \; \If{$\OFprev.\OFvalue \ne \OFRN$ \KwAnd $\OFnext.\OFvalue = \OFRN$}{ \If{$\CAS(a[k-1], \OFprev, [\OFprev.\OFvalue, \OFprev.\OFversion+1])$}{ \If{$\CAS(a[k], \OFnext, [v, \OFnext.\OFversion+1])$}{ we win, go home\; } } } } } \bigskip \Procedure{$\OFrightPop()$}{ \While{\True}{ $k ← \OForacle(\OFright)$ \; $\OFcur ← a[k-1]$ \; $\OFnext ← a[k]$ \; \If{$\OFcur.\OFvalue \ne \OFRN$ \KwAnd $\OFnext.\OFvalue = \OFRN$}{ \uIf{$\OFcur.\OFvalue = \OFLN$ \KwAnd $A[k-1] = \OFcur$}{ \Return \DataSty{empty}\; } \ElseIf{$\CAS(a[k], \OFnext, [\OFRN, \OFnext.\OFversion+1])$}{ \If{$\CAS(a[k-1], \OFcur, [\OFRN, \OFcur.\OFversion+1])$}{ \Return $\OFcur.\OFvalue$\; } } } } } \caption{Obstruction-free deque} \label{alg-obstruction-free-deque} \end{algorithm} It's easy to see that in a solo execution, if the oracle doesn't lie, either operation finishes and returns a plausible value after $O(1)$ operations. So the implementation is obstruction-free. But is it also correct? To show that it is, we need to show that any execution leaves the deque in a sane state, in particular that it preserves the invariant that the deque consists of left-nulls followed by zero or more values followed by right-nulls, and that the sequence of values in the queue is what it should be. This requires a detailed case analysis of which operations interfere with each other, which can be found in the original paper. But we can give some intuition here. The two CAS operations in \OFrightPush or \OFrightPop succeed only if neither register was modified between the preceding read and the CAS. If both registers are unmodified at the time of the second CAS, then the two CAS operations act like a single two-word CAS, which replaces the previous values $(\OFtop, \OFRN)$ with $(\OFtop, \OFvalue)$ in \OFrightPush or $(\OFtop, \OFvalue)$ with $(\OFtop, \OFRN)$ in \OFrightPop; in either case the operation preserves the invariant. So the only way we get into trouble is if, for example, a \OFrightPush does a CAS on $a[k-1]$ (verifying that it is unmodified and incrementing the version number), but then some other operation changes $a[k-1]$ before the CAS on $a[k]$. If this other operation is also a \OFrightPush, we are happy, because it must have the same value for $k$ (otherwise it would have failed when it saw a non-null in $a[k-1])$, and only one of the two right-pushes will succeed in applying the CAS to $a[k]$. If the other operation is a \OFrightPop, then it can only change $a[k-1]$ after updating $a[k]$; but in this case the update to $a[k]$ prevents the original right-push from changing $a[k]$. With some more tedious effort we can similarly show that any interference from \OFleftPush or \OFleftPop either causes the interfering operation or the original operation to fail. This covers 4 of the 16 cases we need to consider. The remaining cases will be brushed under the carpet to avoid further suffering. \section{Boosting obstruction-freedom to wait-freedom} \label{section-boosting-obstruction-freedom-to-wait-freedom} Naturally, having an obstruction-free implementation of some object is not very helpful if we can't guarantee that some process eventually gets its unobstructed solo execution. In general, we can't expect to be able to do this without additional assumptions; for example, if we could, we could solve consensus using a long sequence of adopt-commit objects with no randomization at all.\footnote{This fact was observed by Herlihy~\etal~\cite{HerlihyLM2003} in their original obstruction-free paper; it also implies that there exists a universal obstruction-free implementation of anything based on Herlihy's universal construction.} So we need to make some sort of assumption about timing, or find somebody else who has already figured out the right assumption to make. Those somebodies turn out to be Faith Ellen Fich, Victor Luchangco, Mark Moir, and Nir Shavit, who give an algorithm for boosting obstruction-freedom to wait-freedom~\cite{FichLMS2005}. The timing assumption is \index{semisynchrony!unknown-bound}\concept{unknown-bound semisynchrony}, which means that in any execution there is some maximum ratio $R$ between the shortest and longest time interval between any two consecutive steps of the same non-faulty process, but the processes don't know what this ratio is.\footnote{This is a much older model, which goes back to a famous paper of Dwork, Lynch, and Stockmeyer~\cite{DworkLS1988}.} In particular, if I can execute more than $R$ steps without you doing anything, I can reasonably conclude that you are dead—the semisynchrony assumption thus acts as a failure detector. The fact that $R$ is unknown might seem to be an impediment to using this failure detector, but we can get around this. The idea is to start with a small guess for $R$; if a process is suspected but then wakes up again, we increment the guess. Eventually, the guessed value is larger than the correct value, so no live process will be falsely suspected after this point. Formally, this gives an eventually perfect ($\Diamond P$) failure detector, although the algorithm does not specifically use the failure detector abstraction. To arrange for a solo execution, when a process detects a conflict (because its operation didn't finish quickly), it enters into a ``panic mode'' where processes take turns trying to finish unmolested. A fetch-and-increment register is used as a timestamp generator, and only the process with the smallest timestamp gets to proceed. However, if this process is too sluggish, other processes may give up and overwrite its low timestamp with $\infty{}$, temporarily ending its turn. If the sluggish process is in fact alive, it can restore its low timestamp and kill everybody else, allowing it to make progress until some other process declares it dead again. The simulation works because eventually the mechanism for detecting dead processes stops suspecting live ones (using the technique described above), so the live process with the winning timestamp finishes its operation without interference. This allows the next process to proceed, and eventually all live processes complete any operation they start, giving the wait-free property. The actual code is in Algorithm~\ref{alg-obstruction-free-boosting}. It's a rather long algorithm but most of the details are just bookkeeping. \newData{\OFop}{op} \newData{\OFpanic}{PANIC} \newData{\OFmyTimestamp}{myTimestamp} \newData{\OFminTimestamp}{minTimestamp} \newData{\OFotherTimestamp}{otherTimestamp} \newData{\OFwinnerTimestamp}{winnerTimestamp} \newData{\OFwinner}{winner} \begin{algorithm} \If{$¬ \OFpanic$}{ execute up to $B$ steps of the underlying algorithm \; \lIf{we are done}{ \Return } } $\OFpanic ← \True$ \tcp{enter panic mode} $\OFmyTimestamp ← \FuncSty{fetchAndIncrement}()$ \; $A[i] ← 1$ \tcp{reset my activity counter} \While{\True}{ $T[i] ← \OFmyTimestamp$ \; $\OFminTimestamp ← \OFmyTimestamp$; $\OFwinner ← i$ \; \For{$j ← 1 \dots n, j≠i$}{ $\OFotherTimestamp ← T[j]$ \; \uIf{$\OFotherTimestamp < \OFminTimestamp$}{ $T[\OFwinner] ← \infty$ \tcp{not looking so winning any more} $\OFminTimestamp ← \OFotherTimestamp$; $\OFwinner ← j$\; } \ElseIf{$\OFotherTimestamp < \infty$}{ $T[j] ← \infty$\; } } \If{$i = \OFwinner$}{ \Repeat{$T[i] = \infty{}$}{ execute up to $B$ steps of the underlying algorithm \; \eIf{we are done}{ $T[i] ← \infty{}$ \; $\OFpanic ← \False$ \; \Return\; }{ $A[i] ← A[i] + 1$ \; $\OFpanic ← \True$\; } } }{ \Repeat{$a = A[\OFwinner]$ \KwOr $\OFwinnerTimestamp \ne \OFminTimestamp$}{ $a ← A[\OFwinner]$\; wait $a$ steps \; $\OFwinnerTimestamp ← T[\OFwinner]$\; } \If{\OFwinnerTimestamp = \OFminTimestamp}{ $T[\OFwinner] ← \infty{}$ \tcp{kill winner for inactivity} } } } \caption{Obstruction-freedom booster from~\cite{FichLMS2005}} \label{alg-obstruction-free-boosting} \end{algorithm} The preamble before entering \OFpanic mode is a fast-path computation that allows a process that actually is running in isolation to skip testing any timestamps or doing any extra work (except for the one register read of \OFpanic). The assumption is that the constant $B$ is set high enough that any process generally will finish its operation in $B$ steps without interference. If there is interference, then the timestamp-based mechanism kicks in: we grab a timestamp out of the convenient fetch-and-add register and start slugging it out with the other processes. (A side note: while the algorithm as presented in the paper assumes a fetch-and-add register, any timestamp generator that delivers increasing values over time will work. So if we want to limit ourselves to atomic registers, we could generate timestamps by taking snapshots of previous timestamps, adding 1, and appending process ids for tie-breaking.) Once I have a timestamp, I try to knock all the higher-timestamp processes out of the way (by writing $\infty{}$ to their timestamp registers). If I see a smaller timestamp than my own, I'll drop out myself ($T[i] ← \infty{}$), and fight on behalf of its owner instead. At the end of the $j$ loop, either I've decided I am the winner, in which case I try to finish my operation (periodically checking $T[i]$ to see if I've been booted), or I've decided somebody else is the winner, in which case I watch them closely and try to shut them down if they are too slow ($T[\OFwinner] ← \infty{}$). I detect slow processes by inactivity in $A[\OFwinner]$; similarly, I signal my own activity by incrementing $A[i]$. The value in $A[i]$ is also used as an increasing guess for the time between increments of $A[i]$; eventually this exceeds the $R(B+O(1))$ operations that I execute between incrementing it. We still need to prove that this all works. The essential idea is to show that whatever process has the lowest timestamp finishes in a bounded number of steps. To do so, we need to show that other processes won't be fighting it in the underlying algorithm. Call a process \emph{active} if it is in the loop guarded by the ``if $i = \OFwinner$'' statement. Lemma 1 from the paper states: \begin{lemma}[\protect{\cite[Lemma 1]{FichLMS2005}}] If processes $i$ and $j$ are both active, then $T[i] = \infty{}$ or $T[j] = \infty{}$. \end{lemma} \begin{proof} Assume without loss of generality that $i$ last set $T[i]$ to \OFmyTimestamp in the main loop after $j$ last set $T[j]$. In order to reach the active loop, $i$ must read $T[j]$. Either $T[j] = \infty{}$ at this time (and we are done, since only $j$ can set $T[j] < \infty{}$), or $T[j]$ is greater than $i$'s timestamp (or else $i$ wouldn't think it's the winner). In the second case, $i$ sets $T[j] = \infty{}$ before entering the active loop, and again the claim holds. \end{proof} The next step is to show that if there is some process $i$ with a minimum timestamp that executes infinitely many operations, it increments $A[i]$ infinitely often (thus eventually making the failure detector stop suspecting it). This gives us Lemma 2 from the paper: \begin{lemma}[\protect{\cite[Lemma 2]{FichLMS2005}}] \label{lemma-OF-booster-2} Consider the set of all processes that execute infinitely many operations without completing an operation. Suppose this set is non-empty, and let $i$ hold the minimum timestamp of all these processes. Then $i$ is not active infinitely often. \end{lemma} \begin{proof} Suppose that from some time on, $i$ is active forever, i.e., it never leaves the active loop. Then $T[i] < \infty$ throughout this interval (or else $i$ leaves the loop), so for any active $j$, $T[j] = \infty$ by the preceding lemma. It follows that any active $T[j]$ leaves the active loop after $B+O(1)$ steps of $j$ (and thus at most $R(B+O(1))$ steps of $i$). Can $j$ re-enter? If $j$'s timestamp is less than $i$'s, then $j$ will set $T[i] = \infty$, contradicting our assumption. But if $j$'s timestamp is greater than $i$'s, $j$ will not decide it's the winner and will not re-enter the active loop. So now we have $i$ alone in the active loop. It may still be fighting with processes in the initial fast path, but since $i$ sets \OFpanic every time it goes through the loop, and no other process resets \OFpanic (since no other process is active), no process enters the fast path after some bounded number of $i$'s steps, and every process in the fast path leaves after at most $R(B+O(1))$ of $i$'s steps. So eventually $i$ is in the loop alone forever—and obstruction-freedom means that it finishes its operation and leaves. This contradicts our initial assumption that $i$ is active forever. \end{proof} So now we want to argue that our previous assumption that there exists a bad process that runs forever without winning leads to a contradiction, by showing that the particular $i$ from Lemma~\ref{lemma-OF-booster-2} actually finishes (note that Lemma~\ref{lemma-OF-booster-2} doesn't quite do this—we only show that $i$ finishes if it stays active long enough, but maybe it doesn't stay active). Suppose $i$ is as in Lemma~\ref{lemma-OF-booster-2}. Then $i$ leaves the active loop infinitely often. So in particular it increments $A[i]$ infinitely often. After some finite number of steps, $A[i]$ exceeds the limit $R(B+O(1))$ on how many steps some other process can take between increments of $A[i]$. For each other process $j$, either $j$ has a lower timestamp than $i$, and thus finishes in a finite number of steps (from the premise of the choice of $i$), or $j$ has a higher timestamp than $i$. Once we have cleared out all the lower-timestamp processes, we follow the same logic as in the proof of Lemma~\ref{lemma-OF-booster-2} to show that eventually (a) $i$ sets $T[i] < \infty$ and \OFpanic = true, (b) each remaining $j$ observes $T[i] < \infty$ and \OFpanic = true and reaches the waiting loop, (c) all such $j$ wait long enough (since $A[i]$ is now very big) that $i$ can finish its operation. This contradicts the assumption that $i$ never finishes the operation and completes the proof. \subsection{Cost} If the parameters are badly tuned, the potential cost of this construction is quite bad. For example, the slow increment process for $A[i]$ means that the time a process spends in the active loop even after it has defeated all other processes can be as much as the square of the time it would normally take to complete an operation alone—and every other process may pay $R$ times this cost waiting. This can be mitigated to some extent by setting $B$ high enough that a winning process is likely to finish in its first unmolested pass through the loop (recall that it doesn't detect that the other processes have reset $T[i]$ until after it makes its attempt to finish). An alternative might be to double $A[i]$ instead of incrementing it at each pass through the loop. However, it is worth noting (as the authors do in the paper) that nothing prevents the underlying algorithm from incorporating its own \concept{contention management} scheme to ensure that most operations complete in $B$ steps and \OFpanic mode is rarely entered. So we can think of the real function of the construction as serving as a backstop to some more efficient heuristic approach that doesn't necessarily guarantee wait-free behavior in the worst case. \section{Lower bounds for lock-free protocols} \label{section-lock-free-lower-bounds} So far we have seen that obstruction-freedom buys us an escape from the impossibility results that plague wait-free constructions, while still allowing practical implementations of useful objects under plausible timing assumptions. Yet all is not perfect: it is still possible to show non-trivial lower bounds on the costs of these implementations in the right model. We will present one of these lower bounds, the linear-contention lower bound of Ellen, Hendler, and Shavit~\cite{EllenHS2012}.\footnote{The result first appeared in FOCS in 2005~\cite{FichHS2005}, with a small but easily fixed bug in the definition of the class of objects the proof applies to. We'll use the corrected definition from the journal version.} First we have to define what is meant by contention. \subsection{Contention} A limitation of real shared-memory systems is that physics generally won't permit more than one process to do something useful to a shared object at a time. This limitation is often ignored in computing the complexity of a shared-memory distributed algorithm (and one can make arguments for ignoring it in systems where communication costs dominate update costs in the shared-memory implementation), but it is useful to recognize it if we can't prove lower bounds otherwise. Complexity measures that take the cost of simultaneous access into account go by the name of \concept{contention}. The particular notion of contention used in the Ellen~\etal{} paper is an adaptation of the contention measure of Dwork, Herlihy, and Waarts~\cite{DworkHW1997}. The idea is that if I access some shared object, I pay a price in \index{stall}\indexConcept{memory stall}{memory stalls} for all the other processes that are trying to access it at the same time but got in first. In the original definition, given an execution of the form $A\phi_{1}\phi_{2}\dots{}\phi_{k}\phi{}A'$, where all operations $\phi_{i}$ are applied to the same object as $\phi{}$, and the last operation in $A$ is not, then $\phi_{k}$ incurs $k$ memory stalls. Ellen~\etal{} modify this to only count sequences of \emph{non-trivial} operations, where an operation is non-trivial if it changes the state of the object in some states (e.g., writes, increments, compare-and-swap—but not reads). Note that this change only strengthens the bound they eventually prove, which shows that in the worst case, obstruction-free implementations of operations on objects in a certain class incur a linear number of memory stalls (possibly spread across multiple base objects). \subsection{The class \texorpdfstring{$G$}{G}} The Ellen~\etal{} bound is designed to be as general as possible, so the authors define a class $G$ of objects to which it applies. As is often the case in mathematics, the underlying meaning of $G$ is ``a reasonably large class of objects for which this particular proof works,'' but the formal definition is given in terms of when certain operations of the implemented object are affected by the presence or absence of other operations—or in other words, when those other operations need to act on some base object in order to let later operations know they occurred. \newData{\FHSop}{Op} An object is in \concept{class $G$} if it has some operation \FHSop and initial state $s$ such that for any two processes $p$ and $q$ and every sequence of operations $A\phi{}A'$, where \begin{enumerate} \item $\phi{}$ is an instance of \FHSop executed by $p$, \item no operation in $A$ or $A'$ is executed by $p$, \item no operation in $A'$ is executed by $q$, and \item no two operations in $A'$ are executed by the same process; \end{enumerate} then there exists a sequence of operations $Q$ by $q$ such that for every sequence $H\phi{}H'$ where \begin{enumerate} \item $HH'$ is an interleaving of $Q$ and the sequences $AA'|r$ for each process $r$, \item $H'$ contains no operations of $q$, and \item no two operations in $H'$ are executed by the same process; \end{enumerate} then the return value of $\phi$ to $p$ changes depending on whether it occurs after $A\phi$ or $H\phi$. This is where ``makes the proof work'' starts looking like a much simpler definition. The intuition is that deep in the guts of the proof, we are going to be injecting some operations of $q$ into an existing execution (hence adding $Q$), and we want to do it in a way that forces $q$ to operate on some object that $p$ is looking at (hence the need for $A\phi{}$ to return a different value from $H\phi{})$, without breaking anything else that is going on (all the rest of the conditions). The reason for pulling all of these conditions out of the proof into a separate definition is that we also want to be able to show that particular classes of real objects satisfy the conditions required by the proof, without having to put a lot of special cases into the proof itself. \begin{lemma} A mod-$m$ fetch-and-increment object, with $m ≥ n$, is in $G$. \end{lemma} \begin{proof} This is a classic proof-by-unpacking-the-definition. Pick some execution $A\phi{}A'$ satisfying all the conditions, and let $a$ be the number of fetch-and-increments in $A$ and $a'$ the number in $A'$. Note $a' ≤ n-2$, since all operations in $A'$ are by different processes. Now let $Q$ be a sequence of $n-a'-1$ fetch-and-increments by $q$, and let $HH'$ be an interleaving of $Q$ and the sequences $AA'|r$ for each $r$, where $H'$ includes no two operation of the same process and no operations at all of $q$. Let $h$, $h'$ be the number of fetch-and-increments in $H$, $H'$, respectively. Then $h+h' = a+a'+(n-a'-1) = n+a-1$ and $h' ≤ n-2$ (since $H'$ contains at most one fetch-and-increment for each process other than $p$ and $q$). This gives $h ≥ (n+a+1)-(n-2) = a+1$ and $h ≤ n+a-1$, and the return value of $\phi{}$ after $H\phi{}$ is somewhere in this range mod $m$. But none of these values is equal to $a$ mod $m$ (that's why we specified $m ≥ n$, although as it turns out $m ≥ n-1$ would have been enough), so we get a different return value from $H\phi{}$ than from $A\phi{}$. \end{proof} As a corollary, we also get stock fetch-and-increment registers, since we can build mod-$m$ registers from them by taking the results mod $m$. A second class of class-$G$ objects is obtained from snapshot: \begin{lemma} Single-writer snapshot objects are in $G$.\footnote{For the purposes of this lemma, ``single-writer'' means that each segment can be written to by only one process, not that there is only one process that can execute update operations.} \end{lemma} \begin{proof} Let $A\phi{}A'$ be as in the definition, where $\phi{}$ is a scan operation. Let $Q$ consist of a single update operation by $q$ that changes its segment. Then in the interleaved sequence $HH'$, this update doesn't appear in $H'$ (it's forbidden), so it must be in $H$. Nobody can overwrite the result of the update (single-writer!), so it follows that $H\phi$ returns a different snapshot from $A\phi$. \end{proof} \subsection{The lower bound proof} \begin{theorem}[\protect{\cite[Theorem 5.2]{EllenHS2012}}] For any obstruction-free implementation of some object in class $G$ from RMW base objects, there is an execution in which some operation incurs $n-1$ stalls. \end{theorem} We can't do better than $n-1$, because it is easy to come up with implementations of counters (for example) that incur at most $n-1$ stalls. Curiously, we can even spread the stalls out in a fairly arbitrary way over multiple objects, while still incurring at most $n-1$ stalls. For example, a counter implemented using a single counter (which is a RMW object) gets exactly $n-1$ stalls if $n-1$ processes try to increment it at the same time, delaying the remaining process. At the other extreme, a counter implemented by doing a collect over $n-1$ single-writer registers (also RMW objects) gets at least $n-1$ stalls—distributed as one per register—if each register has a write delivered to it while the reader waiting to read it during its collect. So we have to allow for the possibility that stalls are concentrated or scattered or something in between, as long as the total number adds up at least $n-1$. The proof supposes that the theorem is not true and then shows how to boost an execution with a maximum number $k < n-1$ stalls to an execution with $k+1$ stalls, giving a contradiction. (Alternatively, we can read the proof as giving a mechanism for generating an $(n-1)$-stall execution by repeated boosting, starting from the empty execution.) This is pretty much the usual trick: we assume that there is a class of bad executions, then look for an extreme member of this class, and show that it isn't as extreme as we thought. In doing so, we can restrict our attention to particularly convenient bad executions, so long as the existence of some bad execution implies the existence of a convenient bad execution. \newcommand{\mathcal{O}}{\mathcal{O}} Formally, the authors define a \emph{$k$-stall execution} for process $p$ as an execution $Eσ_{1}\dots{}σ_{i}$ where $E$ and $σ_{i}$ are sequence of operations such that: \begin{enumerate} \item $p$ does nothing in $E$, \item Sets of processes $S_{j}$, $j = 1\dots i$, whose union $S=\bigcup_{j=1}^{i} S_{j}$ has size $k$, are each covering objects $\mathcal{O}_{j}$ after $E$ with pending non-trivial operations, \item Each $σ_{j}$ consists of $p$ applying events by itself until it is about to apply an event to $\mathcal{O}_{j}$, after which each process in $S_{j}$ accesses $\mathcal{O}_{j}$, after which $p$ accesses $\mathcal{O}_{j}$. \item All processes not in $S$ are idle after $E$, \item $p$ starts at most one operation of the implemented object in $σ_{1}\dots{}σ_{i}$, and \item In every extension of $E$ in which $p$ and the processes in $S$ don't take steps, no process applies a non-trivial event to any base object accessed in $σ_{1}\dots{}σ_{i}$. (We will call this the \concept{weird condition} below.) \end{enumerate} So this definition includes both the fact that $p$ incurs $k$ stalls and some other technical details that make the proof go through. The fact that $p$ incurs $k$ stalls follows from observing that it incurs $\card*{S_{j}}$ stalls in each segment $σ_{j}$, since all processes in $S_{j}$ access $\mathcal{O}_{j}$ just before $p$ does. Note that the empty execution is a $0$-stall execution (with $i=0$) by the definition. This shows that a $k$-stall execution exists for some $k$. Note also that the weird condition is pretty strong: it claims not only that there are no non-trivial operation on $\mathcal{O}{1} \dots \mathcal{O}{i}$ in $\tau$, but also that there are no non-trivial operations on \emph{any} objects accessed in $σ_1\dots σ_{i}$, which may include many more objects accessed by $p$.\footnote{\label{footnote-screwup-2011-11-14}And here is where I screwed up in class on 2011-11-14, by writing the condition as the weaker requirement that nobody touches $\mathcal{O}_1 \dots \mathcal{O}_i$.} We'll now show that if a $k$-stall execution exists, for $k ≤ n-2$, then a $(k+k')$-stall execution exists for some $k' > 0$. Iterating this process eventually produces an $(n-1)$-stall execution. Start with some $k$-stall execution $Eσ_{1}\dots{}σ_{i}$. Extend this execution by a sequence of operations $σ{}$ in which $p$ runs in isolation until it finishes its operation $\phi{}$ (which it may start in $σ{}$ if it hasn't done so already), then each process in $S$ runs in isolation until it completes its operation. Now linearize the high-level operations completed in $Eσ_{1}\dots{}σ_{i}σ{}$ and factor them as $A\phi{}A'$ as in the definition of class $G$. Let $q$ be some process not equal to $p$ or contained in any $S_{j}$ (this is where we use the assumption $k ≤ n-2$). Then there is some sequence of high-level operations $Q$ of $q$ such that $H\phi{}$ does not return the same value as $A\phi{}$ for any interleaving $HH'$ of $Q$ with the sequences of operations in $AA'$ satisfying the conditions in the definition. We want to use this fact to shove at least one more memory stall into $Eσ_{1}\dots{}σ_{i}σ{}$, without breaking any of the other conditions that would make the resulting execution a $(k+k')$-stall execution. Consider the extension $\tau{}$ of $E$ where $q$ runs alone until it finishes every operation in $Q$. Then $\tau{}$ applies no nontrivial events to any base object accessed in $σ_{1}\dots{}σ_{k}$, (from the weird condition on $k$-stall executions) and the value of each of these base objects is the same after $E$ and $E\tau{}$, and thus is also the same after $Eσ_{1}\dots{}σ_{k}$ and $E\tau{}σ_{1}\dots{}σ_{k}$. Now let $σ'$ be the extension of $E\tau{}σ_{1}\dots{}σ_{k}$ defined analogously to $σ{}$: $p$ finishes, then each process in each $S_{j}$ finishes. Let $H\phi{}H'$ factor the linearization of $E\tau{}σ_{1}\dots{}σ_{i}σ'$. Observe that $HH'$ is an interleaving of $Q$ and the high-level operations in $AA'$, that $H'$ contains no operations by $q$ (they all finished in $\tau{}$, before $\phi{}$ started), and that $H'$ contains no two operations by the same process (no new high-level operations start after $\phi{}$ finishes, so there is at most one pending operation per process in $S$ that can be linearized after $\phi$). Now observe that $q$ does some non-trivial operation in $\tau$ to some base object accessed by $p$ in $σ$. If not, then $p$ sees the same responses in $σ'$ and in $σ$, and returns the same value, contradicting the definition of class $G$. So does $q$'s operation in $\tau$ cause a stall in $σ$? Not necessarily: there may be other operations in between. Instead, we'll use the existence of $q$'s operation to demonstrate the existence of at least one operation, possibly by some other process we haven't even encountered yet, that does cause a stall. We do this by considering the set $F$ of all finite extensions of $E$ that are free of $p$ and $S$ operations, and look for an operation that stalls $p$ somewhere in this infinitely large haystack. Let $\mathcal{O}_{i+1}$ be the first base object accessed by $p$ in $σ{}$ that is also accessed by some non-trivial event in some sequence in $F$. We will show two things: first, that $\mathcal{O}_{i+1}$ exists, and second, that $\mathcal{O}_{i+1}$ is distinct from the objects $\mathcal{O}_{1}\dots{}\mathcal{O}_{i}$. The first part follows from the fact that $\tau{}$ is in $F$, and we have just shown that $\tau{}$ contains a non-trivial operation (by $q$) on a base object accessed by $p$ in $σ$. For the second part, we use the weird condition on $k$-stall executions again: since every extension of $E$ in $F$ is $(\{p\}\cup S)$-free, no process applies a non-trivial event to any base object accessed in $σ_{1}\dotsσ_{i}$, which includes all the objects $\mathcal{O}_{1}\dots \mathcal{O}_{i}$. You've probably guessed that we are going to put our stalls in on $\mathcal{O}_{i+1}$. We choose some extension $X$ from $F$ that maximizes the number of processes with simultaneous pending non-trivial operations on $\mathcal{O}_{i+1}$ (we'll call this set of processes $S_{i+1}$ and let $\card*{S_{i+1}}$ be the number $k'>0$ we've been waiting for), and let $E'$ be the minimum prefix of $X$ such that these pending operations are still pending after $EE'$. We now look at the properties of $EE'$. We have: \begin{itemize} \item $EE'$ is $p$-free (follows from $E$ being $p$-free and $E'\in{}F$, since everything in $F$ is $p$-free). \item Each process in $S_{j}$ has a pending operation on $\mathcal{O}_{j}$ after $EE'$ (it did after $E$, and didn't do anything in $E'$). \end{itemize} This means that we can construct an execution $EE'σ_{1}\dots{}σ_{i}σ_{i+1}$ that includes $k+k'$ memory stalls, by sending in the same sequences $σ_{1}\dots{}σ_{i}$ as before, then appending a new sequence of events where (a) $p$ does all of its operations in $σ{}$ up to its first operation on $\mathcal{O}_{i+1}$; then (b) all the processes in the set $S_{i+1}$ of processes with pending events on $\mathcal{O}_{i+1}$ execute their pending events on $\mathcal{O}_{i+1}$; then (c) $p$ does its first access to $\mathcal{O}_{i+1}$ from $σ{}$. Note that in addition to giving us $k+k'$ memory stalls, $σ_{i+1}$ also has the right structure for a $(k+k')$-stall execution. But there is one thing missing: we have to show that the weird condition on further extensions still holds. Specifically, letting $S' = S\cup{}S_{i+1}$, we need to show that any $(\{p\}\cup{}S')$-free extension $α$ of $EE'$ includes a non-trivial access to a base object accessed in $σ_{1}\dots{}σ_{i+1}$. Observe first that since $α{}$ is $(\{p\}\cup{}S')$-free, then $E'α{}$ is $(\{p\}\cup{}S)$-free, and so it's in $F$: so by the weird condition on $Eσ_{1}\dots{}σ_{i}$, $E'α{}$ doesn't have any non-trivial accesses to any object with a non-trivial access in $σ_{1}\dots{}σ_{i}$. So we only need to squint very closely at $σ_{i+1}$ to make sure it doesn't get any objects in there either. Recall that $σ_{i+1}$ consists of (a) a sequence of accesses by $p$ to objects already accessed in $σ_1 \dots σ_i$ (already excluded); (b) an access of $p$ to $\mathcal{O}_{i+1}$; and (c) a bunch of accesses by processes in $S_{i+1}$ to $\mathcal{O}_{i+1}$. So we only need to show that $α$ includes no non-trivial accesses to $\mathcal{O}_{i+1}$. Suppose that it does: then there is some process that eventually has a pending non-trivial operation on $\mathcal{O}_{i+1}$ somewhere in $α$. If we stop after this initial prefix $α'$ of $α$, we get $k'+1$ processes with pending operations on $\mathcal{O}_{i+1}$ in $EE'α'$. But then $E'α'$ is an extension of $E$ with $k'+1$ processes with a simultaneous pending operation on $\mathcal{O}_{i+1}$. This contradicts the choice of $X$ to maximize $k'$. So if our previous choice was in fact maximal, the weird condition still holds, and we have just constructed a $(k+k')$-stall execution. This concludes the proof. \subsection{Consequences} We've just shown that counters and snapshots have $(n-1)$-stall executions, because they are in the class $G$. A further, rather messy argument (given in the Ellen~\etal{} paper) extends the result to stacks and queues, obtaining a slightly weaker bound of $n$ total stalls and operations for some process in the worst case.\footnote{This is out of date: Theorem 6.2 of \cite{EllenHS2012} gives a stronger result than what's in \cite{FichHS2005}.} In both cases, we can't expect to get a sublinear worst-case bound on time under the reasonable assumption that both a memory stall and an actual operation takes at least one time unit. This puts an inherent bound on how well we can handle hot spots for many practical objects, and means that in an asynchronous system, we can't solve contention at the object level in the worst case (though we may be able to avoid it in our applications). But there might be a way out for some restricted classes of objects. We saw in Chapter~\ref{chapter-restricted-use} that we could escape from the Jayanti-Tan-Toueg~\cite{JayantiTT2000} lower bound by considering bounded objects. Something similar may happen here: the Fich-Herlihy-Shavit bound on fetch-and-increments requires executions with $n(n-1)^{d}+n$ increments to show $n-1$ stalls for some fetch-and-increment if each fetch-and-increment only touches $d$ objects, and even for $d = \log n$ this is already superpolynomial. The max-register construction of a counter~\cite{AspnesAC2012} doesn't help here, since everybody hits the switch bit at the top of the max register, giving $n-1$ stalls if they all hit it at the same time. But there might be some better construction that avoids this. \subsection{More lower bounds} There are many more lower bounds one can prove on lock-free implementations, many of which are based on previous lower bounds for stronger models. We won't present these in class, but if you are interested, a good place to start is~\cite{AttiyaGHK2006}. \section{Practical considerations} Also beyond the scope of what we can do, there is a paper by Fraser and Harris~\cite{FraserH2007} that gives some nice examples of the practical trade-offs in choosing between multi-register CAS and various forms of software transactional memory in implementing lock-free data structures. \myChapter{BG simulation}{2020}{} \label{chapter-BG-simulation} The \concept{Borowsky-Gafni simulation}~\cite{BorowskyG1993}, or \concept{BG simulation} for short, is a deterministic, wait-free algorithm that allows $t+1$ processes to collectively construct a simulated execution of a system of $n > t$ processes of which $t$ may crash. For both the simulating and simulated system, the underlying shared-memory primitives are atomic snapshots; these can be replaced by atomic registers using any standard snapshot algorithm. The main consequence of the BG simulation is that the question of what decision tasks can be computed deterministically by an asynchronous shared-memory system that tolerates $t$ crash failures reduces to the question of what can be computed by a wait-free system with exactly $t+1$ processes. This is an easier problem, and in principle can be solved exactly using the topological approach described in Chapter~\ref{chapter-topological-methods}. The intuition for how this works is that the $t+1$ simulating processes solve a sequence of agreement problems to decide what the $n$ simulated processes are doing; these agreement problems are structured so that the failure of a simulator stops at most one agreement. So if at most $t$ of the simulating processes can fail, only $t$ simulated processes get stuck as well. We'll describe here a version of the BG simulation that appears in a follow-up paper by Borowsky, Gafni, Lynch, and Rajsbaum~\cite{BorowskyGLR2001}. This gives a more rigorous presentation of the mechanisms of the original Borowsky-Gafni paper, and includes a few simplifications. \section{High-level strategy} To avoid having to simulate specific choices of operations, the BG simulation assumes that all simulated processes alternate between taking snapshots and doing updates. This assumption is not very restrictive, because two snapshots with no intervening update are equivalent to two snapshots separated by an update that doesn't change anything, and two updates with no intervening snapshot can be replaced by just the second update, since the adversary could choose to schedule them back-to-back anyway. This approach means that we can determine the actions of some simulated process by determining the sequence of snapshots that it receives. So the goal will be to allow any of the real processes to take a snapshot on behalf of any of the simulated processes, and then coordinate these snapshots via weak consensus objects to enforce consistency if more than one real process tries to simulate a step of the same simulated process. The key tool for doing this is a \concept{safe agreement}\index{agreement!safe} object, described in §\ref{section-safe-agreement}. \section{Safe agreement} \label{section-safe-agreement} \newFunc{\SApropose}{propose} \newFunc{\SAsafe}{safe} \newFunc{\SAagree}{agree} A naive approach to simulate $n$ processes using $f+1$ processes would be to lock each simulated process behind a mutex, and have the real processes take turns grabbing a lock, simulating a step, and releasing the lock. If we could somehow guarantee that processes never get stuck waiting for a particular mutex just because some process died holding the lock, then we could treat any blocked simulated process as dead, and charge its death to the dead process holding the lock. This would give the mapping of at most $f$ simulated failures to $f$ real failures we are hoping for. But this depends on a lot of subtleties in how we implement the mutexes, so the standard BG simulation goes through a weakening of consensus instead. The \index{agreement!safe}\concept{safe agreement} mechanism performs agreement without running into the FLP bound, by providing a weaker termination condition. It is guaranteed to terminate only if there are no failures by any process during an initial, bounded, \concept{unsafe} section of its execution, but if a process fails later, it can prevent termination. Processes can detect when they leave the unsafe section and have to wait for other processes only in the safe section. This means that they can dovetail spinning in the safe sections of multiple safe agreement objects without getting stuck entirely, even if dead processes in the unsafe sections are blocking some of the objects. Each process $i$ starts the agreement protocol with a $\SApropose_i(v)$ event for its input value $v$. At some point during the execution of the protocol, the process receives a notification $\SAsafe_i$, followed later (if the protocol finishes) by a second notification $\SAagree_i(v')$ for some output value $v'$. It is guaranteed that the protocol terminates as long as all processes continue to take steps until they receive the $\SAsafe$ notification, and that the usual validity (all outputs equal some input) and agreement (all outputs equal each other) conditions hold. There is also a wait-free progress condition that the $\SAsafe_i$ notices do eventually arrive for any process that doesn't fail, no matter what the other processes do (so nobody gets stuck in their unsafe section). \newData{\SAvalue}{value} \newData{\SAlevel}{level} Pseudocode for a safe agreement object is given in Algorithm~\ref{alg-safe-agreement}. This is a translation of the description of the algorithm in~\cite{BorowskyGLR2001}, which is specified at a lower level using I/O automata.\footnote{The I/O automaton model is described in Appendix~\ref{appendix-IO-automata}.} \begin{algorithm} \tcp{$\SApropose_i(v)$} $A[i] ← \Tuple{v,1}$\; \eIf{$\Snapshot(A)$ contains $\Tuple{j,2}$ for some $j≠i$}{ \tcp{Back off} $A[i] ← \Tuple{v,0}$\; }{ \tcp{Advance} $A[i] ← \Tuple{v,2}$\; } \tcp{$\SAsafe_i$} \Repeat{$s$ does not contain $\Tuple{j,1}$ for any $j$}{ $s ← \Snapshot(A)$\; } \tcp{$\SAagree_i$} \Return $s[j].\SAvalue$ where $j$ is smallest index with $s[j].\SAlevel = 2$\; \caption{Safe agreement (adapted from~\protect{\cite{BorowskyGLR2001}})} \label{alg-safe-agreement} \end{algorithm} The communication mechanism is a snapshot object containing a pair $A[i] = \Tuple{\SAvalue_i,\SAlevel_i}$ for each process $i$, initially $\Tuple{⊥,0}$. When a process carries out $\SApropose_i(v)$, it sets $A[i]$ to $\Tuple{v,1}$, advancing to level 1. It then looks around to see if anybody else is at level 2; if so, it backs off to $0$, and if not, it advances to $2$. In either case it then spins until it sees a snapshot with nobody at level 1, and agrees on the level-2 value with the smallest index $i$. The $\SAsafe_i$ transition occurs when the process leaves level $1$ (no matter which way it goes). This satisfies the progress condition, since there is no loop before this, and guarantees termination if all processes leave their unsafe interval, because no process can then wait forever for the last $1$ to disappear. To show agreement, observe that at least one process advances to level $2$ (because the only way a process doesn't is if some other process has already advanced to level $2$), so any process $i$ that terminates observes a snapshot $s$ that contains at least one level-$2$ tuple and no level-$1$ tuples. This means that any process $j$ whose value is not already at level $2$ in $s$ can at worst reach level $1$ after $s$ is taken. But then $j$ sees a level-$2$ tuples and backs off. It follows that any other process $i'$ that takes a later snapshot $s'$ that includes no level-$1$ tuples sees the same level-$2$ tuples as $i$, and computes the same return value. (Validity also holds, for the usual trivial reasons.) \section{The basic simulation algorithm} The basic BG simulation uses a single snapshot object $A$ with $t+1$ components and an infinite array of safe agreement objects $S_{jr}$. Each component $A[i]$ of $A$ belongs to one of the $t+1$ simulating processes, and is a vector of values $A[i][j]$ that process $i$ believes process $j$ will have written at some point during the simulated execution. These values are tagged with round numbers: each $A[i][j]$ holds a tuple $\Tuple{v,r}$ representing the value $v$ that process $i$ determines process $j$ would have written after taking $r$ snapshots. The contents of these snapshots are obtained from the $S_{jr}$ objects. The inputs to $S_{jr}$ are simulated snapshots, and the output $s_{jr}$ of $S_{jr}$ represents the value of the $r$-th snapshot performed by simulated process $j$. Each simulating process $i$ cycles through all simulated processes $j$. Simulating one round of a particular process $j$ involves four phases: \begin{enumerate} \item Make an initial guess for $s_{jr}$ by taking a snapshot of $A$ and taking the value with the largest round number for each component $A[-][k]$. \item Initiate the safe agreement protocol $S_{jr}$ using this guess. It continues to run $S_{jr}$ until it leaves the unsafe interval. \item Attempt to finish $S_{jr}$, by performing one iteration of the loop from Algorithm~\ref{alg-safe-agreement}. If this iteration doesn't succeed, move on to simulating $j+1$ (but come back to this phase for $j$ eventually). \item If $S_{jr}$ terminates, compute a new value $v_{jr}$ for $j$ to write based on the simulated snapshot returned by $S_{jr}$, and update $A[i][j]$ with $\Tuple{v_{jr}, r}$. \end{enumerate} Actually implementing this while maintaining an abstraction barrier around safe agreement is tricky. One approach might be to have each process $i$ manage a separate thread for each simulated process $j$, and wrap the unsafe part of the safe agreement protocol inside a mutex just for threads of $i$. This guarantees that $i$ enters the unsafe part of any safe agreement object on behalf of only one simulated $j$ at a time, while preventing delays in the safe part of $S_{jr}$ from blocking it from finishing some other $S_{j'r'}$. \section{Effect of failures} So now what happens if a simulating process $i$ fails? This won't stop any other process $i'$ from taking snapshots on behalf of $j$, or from generating its own values to put in $A[i'][j]$. What it may do is prevent some safe agreement object $S_{jr}$ from terminating. The termination property of $S_{jr}$ means that this can only occur if the failure occurs while $i$ is in the unsafe interval for $S_{jr}$—but since $i$ is only in the unsafe interval for at most one $S_{jr}$ at a time, this stalls only one simulated process $j$. It doesn't block any $i'$, because any other $i'$ is guaranteed to leave its own unsafe interval for $S_{jr}$ after finitely many steps, and though it may waste some effort waiting for $S_{jr}$ to finish, once it is in the safe interval it doesn't actually wait for it before moving on to other simulated $j'$. It follows that each failure of a simulating process knocks out at most one simulated process. So a wait-free system with $t+1$ processes—and thus at most $t$ failures in the executions we care about—will produces at most $t$ failures inside the simulation. \section{Inputs and outputs} Two details not specified in the description above are how $i$ determines $j$'s initial input and how $i$ determines its own outputs from the outputs of the simulated processes. For the basic BG simulation, this is pretty straightforward: we use the safe agreement objects $S_{j0}$ to agree on $j$'s input, after each $i$ proposes its own input vector for all $j$ based on its own input to the simulator protocol. For outputs, $i$ waits for at least $n-t$ of the simulated processes to finish, and computes its own output based on what it sees. One issue that arises here is that we can only use the simulation to solve \index{task!colorless}\indexConcept{colorless task}{colorless tasks}, which are decision problems where any process can return the output of any other process without causing trouble.\footnote{The term ``colorless'' here comes from use of colors to represent process ids in the topological approach described in Chapter~\ref{chapter-topological-methods}. These colors aren't really colors, but topologists like coloring nodes better than assigning them ids.} This works for consensus or $k$-set agreement, but fails pretty badly for renaming. The \index{BG simulation!extended}\concept{extended BG simulation}, due to Gafni~\cite{Gafni2009}, solves this problem by mapping each simulating process $p$ to a specific simulated process $q_p$, and using a more sophisticated simulation algorithm to guarantee that $q_p$ doesn't crash unless $p$ does; details can be found in Gafni's paper. There is also a later paper by Imbs and Raynal~\cite{ImbsR2009} that simplifies some details of the construction. Here, we will limit ourselves to the basic BG simulation. \section{Correctness of the simulation} To show that the simulation works, observe that we can extract a simulated execution by applying the following rules: \begin{enumerate} \item The round-$r$ write operation of $j$ is represented by the first write tagged with round $r$ performed for $j$. \item The round-$r$ snapshot operation of $j$ is represented by whichever snapshot operation wins $S_{jr}$. \end{enumerate} The simulated execution then consists of a sequence of write and snapshot operations, with order of the operations determined by the order of their representatives in the simulating execution, and the return values of the snapshots determined by the return values of their representatives. Because all processes that simulate a write for $j$ in round $r$ use the same snapshots to compute the state of $j$, they all write the same value. So the only way we get into trouble is if the writes included in our simulated snapshots are inconsistent with the ordering of the simulated operations defined above. Here the fact that each simulated snapshot corresponds to a real snapshot makes everything work: when a process performs a snapshot for $S_{jr}$, then it includes all the simulated write operations that happen before this snapshot, since the $s$-th write operation by $k$ will be represented in the snapshot if and only if the first instance of the $s$-th write operation by $k$ occurs before it. The only tricky bit is that process $i$'s snapshot for $S_{jr}$ might include some operations that can't possibly be included in $S_{jr}$, like $j$'s round-$r$ write or some other operation that depends on it. But this can only occur if some other process finished $S_{jr}$ before process $i$ takes its snapshot, in which case $i$'s snapshot will not win $S_{jr}$ and will be discarded. \section{BG simulation and consensus} BG simulation was originally developed to attack $k$-set agreement, but (as pointed out by Gafni~\cite{Gafni2009}) it gives a particularly simple proof of the impossibility of consensus with one faulty process. Suppose that we had a consensus protocol that solved consensus for $n > 1$ processes with one crash failure, using only atomic registers. Then we could use BG simulation to get a wait-free consensus protocol for two processes. But it's easy to show that atomic registers can't solve wait-free consensus, because (following~\cite{LouiA1987}), we only need to do the last step of FLP that gets a contradiction when moving from a bivalent $C$ to $0$-valent $Cx$ or $1$-valent $Cy$. We thus avoid the complications that arise in the original FLP proof from having to deal with fairness. More generally, BG simulation means that increasing the number of processes while keeping the same number of crash failures doesn't let us compute anything we couldn't before. This gives a formal justification for the slogan that the difference between distributed computing and parallel computing is that in a distributed system, more processes can only make things worse. \myChapter{Topological methods}{2020}{} \label{chapter-topological-methods} Here we'll describe some results applying topology to distributed computing, mostly following a classic paper of Herlihy and Shavit~\cite{HerlihyS1999}. This was one of several papers~\cite{BorowskyG1993,SaksZ2000} that independently proved lower bounds on \index{agreement!$k$-set} \concept{$k$-set agreement}~\cite{Chaudhuri1993}, which is a relaxation of consensus where we require only that there are at most $k$ distinct output values (consensus is $1$-set agreement). These lower bounds had failed to succumb to simpler techniques. \section{Basic idea} The basic idea is to use tools from combinatorial topology to represent indistinguishability proofs. We've seen a lot of indistinguishability proofs that involving showing that particular pairs of executions are indistinguishable to some process, which means that that process produces the same output in both executions. In a typical proof of this kind, we then construct a chain of executions $Ξ_1,\dots,Ξ_k$ such that for each $i$, there is some $p$ with $Ξ_i|p = Ξ_{i+1}|p$. We've generally been drawing these with the executions as points and the indistinguishability relation as an edge between two executions. In the topological method, we use the dual of this picture: each process's view (the restriction of some execution to events visible to that process) is represented as a point, and an execution $Ξ$ is represented as a \concept{simplex} connecting all of the points corresponding to views of $Ξ$ by particular processes. A simplex is a generalization to arbitrary dimension of the sequence that starts with a point (a $0$-simplex), an edge (a $1$-simplex), a triangle (a $2$-simplex), or a tetrahedron (a $3$-simplex). In general, an $n$-simplex is a solid $n$-dimensional object with $n+1$ vertices and $n+1$ faces that are $(n-1)$-simplexes. As a combinatorial object, this is a fancy way of depicting the power set of the set of vertices: each subset corresponds to a facet of the original simplex. A simplicial complex consists of a bunch of simplexes pasted together by identifying vertices: this is similar to the technique in graphics of representing the surface of a three-dimensional object by decomposing it into triangles. Topologists use these to model continuous surfaces, and have many tools for deriving interesting properties of those surfaces from a description of the simplicial complex. For distributed computing, the idea is that some of these topological properties, when computed for the simplicial complex resulting from some protocol or problem specification may sometimes useful to determine properties of the underlying protocol or problem. \section{\texorpdfstring{$k$}{k}-set agreement} \label{section-k-set-agreement} The motivating problem for much of this work was getting impossibility results for \index{agreement!$k$-set} \concept{$k$-set agreement}, proposed by Chaudhuri~\cite{Chaudhuri1993}. The $k$-set agreement problem is similar to consensus, where each process starts with an input and eventually returns a decision value that must be equal to some process's input, but the agreement condition is relaxed to require only that the set of decision values include at most $k$ values. With $k-1$ crash failures, it's easy to build a $k$-set agreement algorithm: wait until you have seen $n-k+1$ input values, then choose the smallest one you see. This works because any value a process returns is necessarily among the $k$ smallest input values (including the $k-1$ it didn't see). Chaudhuri conjectured that $k$-set agreement was not solvable with $k$ failures, and gave a proof of a partial result (analogous to the existence of an initial bivalent configuration for consensus) based on \index{Sperner's Lemma} Sperner's Lemma~\cite{Sperner1928}. This is a classic result in topology that says that certain colorings of the vertices of a graph in the form of a triangle that has been divided into smaller triangles necessarily contain a small triangle with three different colors on its corners. This connection between $k$-set renaming and Sperner's Lemma became the basic idea behind each the three independent proofs of the conjecture that appeared shortly thereafter~\cite{HerlihyS1999,BorowskyG1993,SaksZ2000}. Our plan is to give a sufficient high-level description of the topological approach that the connection between $k$-set agreement and Sperner's Lemma becomes obvious. It is possible to avoid this by approaching the problem purely combinatorially, as is done, for example, in Section 16.3 of~\cite{AttiyaW2004}. The presentation there is obtained by starting with a topological argument and getting rid of the topology (in fact, the proof in~\cite{AttiyaW2004} contains a proof of Sperner's Lemma with the serial numbers filed off). The disadvantage of this approach is that it obscures what is really going in and makes it harder to obtain insight into how topological techniques might help for other problems. The advantage is that (unlike these notes) the resulting text includes actual proofs instead of handwaving. \section{Representing distributed computations using topology} \label{section-topological-representations} Topology is the study of properties of shapes that are preserved by continuous functions between their points that have continuous inverses, which get the rather fancy name of \indexConcept{homeomorphism}{homeomorphisms}. A continuous function\footnote{Strictly speaking, this is the definition a continuous function between metric spaces, which are spaces that have a consistent notion of distance. There is an even more general definition of continuity that holds for spaces that are too strange for this.} is one that maps nearby points to nearby points. A homeomorphism is continuous in both directions: this basically means that you can stretch and twist and otherwise deform your object however you like, as long as you don't tear it (which would map nearby points on opposite sides of the tear to distant points) or glue bits of it together (which turns into tearing when we look at the inverse function). Topologists are particularly interested in showing when there is no homeomorphism between two objects; the classic example is that you can't turn a sphere into a donut without damaging it, but you can turn a donut into a coffee mug (with a handle). Working with arbitrary objects embedded in umpteen-dimensional spaces is messy, so topologists invented a finite way of describing certain well-behaved objects combinatorially, by replacing ugly continuous objects like spheres and coffee mugs with simpler objects pasted together in complex ways. The simpler objects are \indexConcept{simplex}{simplexes}, and the more complicated pasted-together objects are called \indexConcept{simplicial complex}{simplicial complexes}. The nifty thing about simplicial complexes is that they give a convenient tool for describing what states or outputs of processes in a distributed algorithm are ``compatible'' in some sense, and because topologists know a lot about simplicial complexes, we can steal their tools to describe distributed algorithms. \subsection{Simplicial complexes and process states} \label{section-topological-representation-of-process-states} The formal definition of a $k$-dimensional \concept{simplex} is the convex closure of $(k+1)$ points $\{ x_{1}\dots{}x_{k+1} \}$ in general position; the convex closure part means the set of all points $\sum{} a_{i}x_{i}$ where $\sum{} a_{i} = 1$ and each $a_{i} ≥ 0$, and the general position part means that the $x_{i}$ are not all contained in some subspace of dimension $(k-1)$ or smaller (so that the simplex isn't squashed flat somehow). What this gives us is a body with $(k+1)$ corners and $(k+1)$ faces, each of which is a $(k-1)$-dimensional simplex (the base case is that a $0$-dimensional simplex is a point). Each face includes all but one of the corners, and each corner is on all but one of the faces. So we have: \begin{itemize} \item 0-dimensional simplex: point.\footnote{For consistency, it's sometimes convenient to define a point as having a single $(-1)$-dimensional face defined to be the empty set. We won't need to bother with this, since $0$-dimensional simplicial complexes correspond to $1$-process distributed systems, which are amply covered in almost every other Computer Science class you have ever taken.} \item 1-dimensional simplex: line segment with 2 endpoints (which are both corners and faces). \item 2-dimensional simplex: triangle (3 corners with 3 1-dimensional simplexes for sides). \item 3-dimensional simplex: tetrahedron (4 corners, 4 triangular faces). \item 4-dimensional simplex: 5 corners, 5 tetrahedral faces. It's probably best not to try to visualize this. \end{itemize} A simplicial complex is a bunch of simplexes stuck together; formally, this means that we pretend that some of the corners (and any faces that include them) of different simplexes are identical points. There are ways to do this right using equivalence relations. But it's easier to abstract out the actual geometry and go straight to a combinatorial structure. An \index{simplicial complex!abstract} \index{abstract simplicial complex} (abstract) simplicial complex is just a collection of sets with the property that if $A$ is a subset of $B$, and $B$ is in the complex, then $A$ is also in the complex (this means that if some simplex is included, so are all of its faces, their faces, etc.). This combinatorial version is nice for reasoning about simplicial complexes, but is not so good for drawing pictures. The trick to using this for distributed computing problems is that we are going to build simplicial complexes by letting points be process states (or sometimes process inputs or outputs), each labeled with a process id, and letting the sets that appear in the complex be those collections of states/inputs/outputs that are compatible with each other in some sense. For states, this means that they all appear in some global configuration in some admissible execution of some system; for inputs and outputs, this means that they are permitted combinations of inputs or outputs in the specification of some problem. Example: For 2-process binary consensus with processes 0 and 1, the \index{complex!input} \concept{input complex}, which describes all possible combinations of inputs, consists of the sets \begin{displaymath} \left\{ \{\}, \{p0\}, \{q0\}, \{p1\}, \{q1\}, \{p0,q0\}, \{p0,q1\}, \{p1,q0\}, \{p1,q1\} \right\}, \end{displaymath} which we might draw like this: \begin{center} \begin{tikzpicture}[auto,node distance=2cm] \node (p0) {$p0$}; \node (q0) [right of=p0] {$q0$}; \node (q1) [below of=p0] {$q1$}; \node (p1) [right of=q1] {$p1$}; \path (p0) edge (q0) edge (q1) (p1) edge (q0) edge (q1) ; \end{tikzpicture} \end{center} Note that there are no edges from $p0$ to $p1$ or $q0$ to $q1$: we can't have two different states of the same process in the same global configuration. The \index{complex!output} \concept{output complex}, which describes the permitted outputs, is \begin{displaymath} \left\{ \{\}, \{p0\}, \{q0\}, \{p1\}, \{q1\}, \{p0,q0\}, \{p1,q1\} \right\}. \end{displaymath} As a picture, this omits two of the edges (1-dimensional simplexes) from the input complex: \begin{center} \begin{tikzpicture}[auto,node distance=2cm] \node (p0) {$p0$}; \node (q0) [right of=p0] {$q0$}; \node (q1) [below of=p0] {$q1$}; \node (p1) [right of=q1] {$p1$}; \path (p0) edge (q0) (p1) edge (q1) ; \end{tikzpicture} \end{center} One thing to notice about this output complex is that it is not \concept{connected}: there is no path from the $p0$--$q0$ component to the $q1$--$p1$ component. Here is a simplicial complex describing the possible states of two processes $p$ and $q$, after each writes 1 to its own bit then reads the other process's bit. Each node in the picture is labeled by a sequence of process ids. The first id in the sequence is the process whose view this node represents; any other process ids are processes this first process sees (by seeing a $1$ in the other process's register). So $p$ is the view of process $p$ running by itself, while $pq$ is the view of process $p$ running in an execution where it reads $q$'s register after $q$ writes it. \begin{center} \begin{tikzpicture}[auto,node distance=2cm] \node (p) {$p$}; \node (qp) [right of=p] {$qp$}; \node (pq) [right of=qp] {$pq$}; \node (q) [right of=pq] {$q$}; \path (p) edge (qp) (qp) edge (pq) (pq) edge (q) ; \end{tikzpicture} \end{center} The edges express the constraint that if we both write before we read, then if I don't see your value you must see mine (which is why there is no $p$--$q$ edge), but all other combinations are possible. Note that this complex \emph{is} connected: there is a path between any two points. Here's a fancier version in which each process writes its input (and remembers it), then reads the other process's register (i.e., a one-round full-information protocol). We now have final states that include the process's own id and input first, then the other process's id and input if it is visible. For example, $p1$ means $p$ starts with $1$ but sees a null and $q0p1$ means $q$ starts with $0$ but sees $p$'s $1$. The general rule is that two states are compatible if $p$ either sees nothing or $q$'s actual input and similarly for $q$, and that at least one of $p$ or $q$ must see the other's input. This gives the following simplicial complex: \begin{center} \begin{tikzpicture}[auto,node distance=1.5cm] \node (p0) {$p0$}; \node (q0p0) [right of=p0] {$q0p0$}; \node (p0q0) [right of=q0p0] {$p0q0$}; \node (q0) [right of=p0q0] {$q0$}; \node (q1p0) [below of=p0] {$q1p0$}; \node (p0q1) [below of=q1p0] {$p0q1$}; \node (q1) [below of=p0q1] {$q1$}; \node (p1q0) [below of=q0] {$p1q0$}; \node (q0p1) [below of=p1q0] {$q0p1$}; \node (p1q1) [right of=q1] {$p1q1$}; \node (q1p1) [right of=p1q1] {$q1p1$}; \node (p1) [right of=q1p1] {$p1$}; \path (p0) edge (q0p0) (q0p0) edge (p0q0) (p0q0) edge (q0) (q0) edge (p1q0) (p1q0) edge (q0p1) (q0p1) edge (p1) (p1) edge (q1p1) (q1p1) edge (p1q1) (p1q1) edge (q1) (q1) edge (p0q1) (p0q1) edge (q1p0) (q1p0) edge (p0) ; \end{tikzpicture} \end{center} Again, the complex is connected. The fact that this looks like four copies of the $p$--$qp$--$pq$--$q$ complex pasted into each edge of the input complex is not an accident: if we fix a pair of inputs $i$ and $j$, we get $pi$--$qjpi$--$piqj$--$qj$, and the corners are pasted together because if $p$ sees only $p0$ (say), it can't tell if it's in the $p0/q0$ execution or the $p0/q1$ execution. The same process occurs if we run a two-round protocol of this form, where the input in the second round is the output from the first round. Each round subdivides one edge from the previous round into three edges: \begin{align*} &p-q \\ \\ &p-qp-pq-q \\ \\ &p-(qp)p-p(qp)-qp-(pq)(qp)-(qp)(pq)-pq-q(pq)-(pq)q-q \\ \end{align*} Here $(pq)(qp)$ is the view of $p$ after seeing $pq$ in the first round and seeing that $q$ saw $qp$ in the first round. \subsection{Subdivisions} In the simple write-then-read protocol above, we saw a single input edge turn into 3 edges. Topologically, this is an example of a \concept{subdivision}, where we represent a simplex using several new simplexes pasted together that cover exactly the same points. Certain classes of protocols naturally yield subdivisions of the input complex. The \concept{iterated immediate snapshot} (\index{IIS}IIS) model, defined by Borowsky and Gafni~\cite{BorowskyG1997}, considers executions made up of a sequence of rounds (the iterated part) where each round is made up of one or more mini-rounds in which some subset of the processes all write out their current views to their own registers and then take snapshots of all the registers (the immediate snapshot part). The two-process protocols of the previous section are special cases of this model. Within each round, each process $p$ obtains a view $v_p$ that contains the previous-round views of some subset of the processes. We can represent the views as a subset of the processes, which we will abbreviate in pictures by putting the view owner first: $pqr$ will be the view $\{p, q, r\}$ as seen by $p$, while $qpr$ will be the same view as seen by $q$. The requirements on these views are that (a) every process sees its own previous view: $p \in v_p$ for all $p$; (b) all views are comparable: $v_p \subseteq v_q$ or $v_q \subseteq v_p$; and (c) if I see you, then I see everything you see: $q \in v_p$ implies $v_q \subseteq v_p$. This last requirement is called \concept{immediacy} and follows from the assumption that writes and snapshots are done in the same mini-round: if I see your write, then I see all the values you do, because your snapshot is either in an earlier mini-round than mine or in the same mini-round. Note this depends on the peculiar structure of the mini-rounds, where all the writes precede all the snapshots. The IIS model does not correspond exactly to a standard shared-memory model (or even a standard shared-memory model augmented with cheap snapshots). There are two reasons for this: standard snapshots don't provide immediacy, and standard snapshots allow processes to go back and perform more than one snapshot on the same object. The first issue goes away if we are looking at impossibility proofs, because the adversary can restrict itself only to those executions that satisfy immediacy; alternatively, we can get immediacy from the \concept{participating set} protocol of~\cite{BorowskyG1997}, which we will describe in §\ref{section-participating-set}. The second issue is more delicate, but Borowsky and Gafni demonstrate that any decision protocol that runs in the standard model can be simulated in the IIS model, using a variant of the BG simulation algorithm described in Chapter~\ref{chapter-BG-simulation}. For three processes, one round of immediate snapshots gives rise to the simplicial complex depicted in Figure~\ref{figure-immediate-snapshot}. The corners of the big triangle are the solo views of processes that do their snapshots before anybody else shows up. Along the edges of the big triangle are views corresponding to 2-process executions, while in the middle are complete views of processes that run late enough to see everything. Each little triangle corresponds to some execution. For example, the triangle with corners $p$, $qp$, $rpq$ corresponds to a sequential execution where $p$ sees nobody, $q$ sees $p$, and $r$ sees both $p$ and $q$. The triangle with corners $pqr$, $qpr$, and $rpq$ is the maximally-concurrent execution where all three processes write before all doing their snapshots: here everybody sees everybody. It is not terribly hard to enumerate all possible executions and verify that the picture includes all of them. In higher dimension, the picture is more complicated, but we still get a subdivision that preserves the original topological structure~\cite{BorowskyG1997}. \begin{figure} \centering \includegraphics[scale=0.8]{triangulation.pdf} \caption{Subdivision corresponding to one round of immediate snapshot} \label{figure-immediate-snapshot} \end{figure} Figure~\ref{figure-immediate-snapshot-2} shows (part of) the next step of this process: here we have done two iterations of immediate snapshot, and filled in the second-round subdivisions for the $p$--$qpr$--$rpq$ and $pqr$--$qpr$--$rpq$ triangles. (Please imagine similar subdivisions of all the other triangles that I was too lazy to fill in by hand.) The structure is recursive, with each first-level triangle mapping to an image of the entire first-level complex. As in the two-process case, adjacent triangles overlap because the relevant processes don't have enough information; for example, the points on the $qpr$--$rpq$ edge correspond to views of $q$ or $r$ that don't include $p$ in round 2 and so can't tell whether $p$ saw $p$ or $pqr$ in round 1. \begin{figure} \centering \includegraphics[scale=0.8]{triangulation2.pdf} \caption{Subdivision corresponding to two rounds of immediate snapshot} \label{figure-immediate-snapshot-2} \end{figure} The important feature of the round-2 complex (and the round-$k$ complex in general) is that it's a \concept{triangulation} of the original outer triangle: a partition into little triangles where each corner aligns with corners of other little triangles. (Better pictures of this process in action can be found in Figures 25 and 26 of~\cite{HerlihyS1999}.) \section{Impossibility of \texorpdfstring{$k$}{k}-set agreement} \label{section-k-set-agreement-impossible} Now let's show that there is no way to do $k$-set agreement with $n=k+1$ processes in the IIS model. Suppose that after some fixed number of rounds, each process chooses an output value. This output can only depend on the view of the process, so is fixed for each vertex in the subdivision. Also, the validity condition means that a process can only choose an output that it can see among the inputs in its view. This means that at the corners of the outer triangle (corresponding to views where the process thinks it's alone), a process must return its input, while along the outer edges (corresponding to views where two processes may see each other but not the third), a process must return one of the two inputs that appear in the corners incident to the edge. Internal corners correspond to views that include—directly or indirectly—the inputs of all processes, so these can be labeled arbitrarily. An example is given in Figure~\ref{figure-immediate-snapshot-outputs}, for a one-round protocol with three processes. \begin{figure} \centering \includegraphics[scale=0.8]{triangulation-outputs.pdf} \caption{An attempt at $2$-set agreement} \label{figure-immediate-snapshot-outputs} \end{figure} We now run into Sperner's Lemma~\cite{Sperner1928}, which says that, for any subdivision of a simplex into smaller simplexes, if each corner of the original simplex has a different color, and each corner that appears on some face of the original simplex has a color equal to the color of one of the corners of that face, then within the subdivision there are an odd number of simplexes whose corners are all colored differently.\footnote{The proof of Sperner's Lemma is not hard, and is done by induction on the dimension $k$. For $k=0$, any subdivision consists of exactly one zero-dimensional simplex whose single corner covers all $k+1=1$ colors. For $k+1$, suppose that the colors are $\Set{1, \dots, k+1}$, and construct a graph with a vertex for each little simplex in the subdivision and an extra vertex for the region outside the big simplex. Put an edge in this graph between each pair of regions that share a $k$-dimensional face with colors $\Set{1, \dots, k}$. The induction hypothesis tells us that there are an odd number of edges between the outer-region vertex and simplexes on the $\Set{1,\dots,k}$-colored face of the big simplex. The Handshaking Lemma from graph theory says that the sum of the degrees of all the nodes in the graph is even. But this can only happen if there are an even number of nodes with odd degree, implying that the are are an odd number of simplexes in the subdivision with an odd number of faces colored $\Set{1,\dots,k}$, because the extra node for the outside region has exactly one face colored $\Set{1,\dots,k}$. Since zero is even, this means there is at least one simplex in the subdivision with an odd number of faces colored $\Set{1,\dots,k}$. Now suppose we have a simplex with an odd number of faces colored $\Set{1,\dots,k}$. Let $f$ be one such face. If the corner $v$ not contained in $f$ is colored $c \ne k+1$, then our simplex has exactly two faces colored $\Set{1,\dots,k}$: $f$, and the face that replaces $f$'s $c$-colored corner with $v$. So the only way to get an odd number of $\Set{1,\dots,k}$-colored faces is to have all $k+1$ colors. It follows that there are an odd number of $(k+1)$-colored simplexes.} How this applies to $k$-set agreement: Suppose we have $n = k+1$ processes in a wait-free system (corresponding to allowing up to $k$ failures). With the cooperation of the adversary, we can restrict ourselves to executions consisting of $\ell$ rounds of iterated immediate snapshot for some $\ell$ (termination comes in here to show that $\ell$ is finite). This gives a subdivision of a simplex, where each little simplex corresponds to some particular execution and each corner some process's view. Color all the corners of the little simplexes in this subdivision with the output of the process holding the corresponding view. Validity means that these colors satisfy the requirements of Sperner's Lemma. Sperner's Lemma then says that some little simplex has all $k+1$ colors, giving us a bad execution with more than $k$ distinct output values. The general result says that we can't do $k$-set agreement with $k$ failures for any $n > k$. This follows immediately from the $n=k+1$ version using BG simulation (Chapter~\ref{chapter-BG-simulation}). \section{Simplicial maps and specifications} Let's step back and look at consensus again. One thing we could conclude from the fact that the output complex for consensus was not connected but the ones describing our simple protocols were was that we can't solve consensus (non-trivially) using these protocols. The reason is that to solve consensus using such a protocol, we would need to have a mapping from states to outputs (this is just whatever rule tells each process what to decide in each state) with the property that if some collection of states are consistent, then the outputs they are mapped to are consistent. In simplicial complex terms, this means that the mapping from states to outputs is a \index{map!simplicial} \concept{simplicial map}, a function $f$ from points in one simplicial complex $C$ to points in another simplicial complex $D$ such that for any simplex $A \in C$, $f(A) = \{ f(x) | x \in{} A \}$ gives a simplex in $D$. (Recall that consistency is represented by including a simplex, in both the state complex and the output complex.) A mapping from states to outputs that satisfies the consistency requirements encoded in the output complex $s$ always a simplicial map, with the additional requirement that it preserves process ids (we don't want process $p$ to decide the output for process $q$). Conversely, any id-preserving simplicial map gives an output function that satisfies the consistency requirements. Simplicial maps are examples of \index{function!continuous} \indexConcept{continuous function}{continuous functions}, which have all sorts of nice topological properties. One nice property is that a continuous function can't separate a path-connected space ( one in which there is a path between any two points) into path-disconnected components. We can prove this directly for simplicial maps: if there is a path of 1-simplexes $\{x_{1},x_{2}\}, \{x_{2},x_{3}\}, \dots{} \{x_{k-1},x_{k}\}$ from $x_1$ to $x_k$ in $C$, and $f:C\rightarrow{}D$ is a simplicial map, then there is a path of 1-simplexes $\{f(x_{1}),f(x_{2})\}, \dots{}$ from $f(x_{1})$ to $f(x_{k})$. Since being path-connected just means that there is a path between any two points, if $C$ is connected we've just shown that $f(C)$ is as well. Getting back to our consensus example, it doesn't matter what simplicial map $f$ you pick to map process states to outputs; since the state complex $C$ is connected, so is $f(C)$, so it lies entirely within one of the two connected components of the output complex. This means in particular that everybody always outputs $0$ or $1$: the protocol is trivial. \subsection{Mapping inputs to outputs} For general decision tasks, it's not enough for the outputs to be consistent with each other. They also have to be consistent with the inputs. This can be expressed by a relation $Δ$ between input simplexes and output simplexes. Formally, a decision task is modeled by a triple $(I, O, Δ)$, where $I$ is the input complex, $O$ is the output complex, and $(A,B) \in{} Δ$ if and only if $B$ is a permissible output given input $I$. Here there are no particular restrictions on $Δ$ (for example, it doesn't have to be a simplicial map or even a function), but it probably doesn't make sense to look at decision tasks unless there is at least one permitted output simplex for each input simplex. \section{The asynchronous computability theorem} Given a decision task specified in this way, there is a topological characterization of when it has a wait-free solution. This is given by the \concept{Asynchronous Computability Theorem} (Theorem 3.1 in~\cite{HerlihyS1999}), which says: \begin{theorem} A decision task $(I,O,Δ{})$ has a wait-free protocol using shared memory if and only if there exists a chromatic subdivision $σ$ of $I$ and a color-preserving simplicial map $\mu{}: σ{}(I) \rightarrow{} O$ such that for each simplex $s$ in $σ{}(I)$, $\mu{}(S) \in{} Δ{}(\carrier(S, I))$. \end{theorem} To unpack this slightly, a \index{subdivision!chromatic} \concept{chromatic subdivision} is a subdivision where each vertex is labeled by a process id (a color), and no simplex has two vertices with the same color. A color-preserving simplicial map is a simplicial map that preserves ids. The carrier of a simplex in a subdivision is whatever original simplex it is part of. So the theorem says that I can only solve a task if I can find a simplicial map from a subdivision of the input complex to the output complex that doesn't do anything strange to process ids and that is consistent with $Δ$. Looking just at the theorem, one might imagine that the proof consists of showing that the \index{complex!protocol} \concept{protocol complex} defined by the state complex after running the protocol to completion is a subdivision of the input complex, followed by the same argument we've seen already about mapping the state complex to the output complex. This is almost right, but it's complicated by two inconvenient facts: (a) the state complex generally isn't a subdivision of the input complex, and (b) if we have a map from an arbitrary subdivision of the input complex, it is not clear that there is a corresponding protocol that produces this particular subdivision. So instead the proof works like this: \begin{description} \item[Protocol implies map] Even though we don't get a subdivision with the full protocol, there is a restricted set of executions that does give a subdivision. So if the protocol works on this restricted set of executions, an appropriate map exists. There are two ways to prove this: Herlihy and Shavit do so directly, by showing that this restricted set of executions exists, and Borowksy and Gafni~\cite{BorowskyG1997} do so indirectly, by showing that the IIS model (which produces exactly the standard chromatic subdivision used in the ACT proof) can simulate an ordinary snapshot model. Both methods are a bit involved, so we will skip over this part. \item[Map implies protocol] This requires an algorithm. The idea here is that that \concept{participating set} algorithm, originally developed to solve $k$-set agreement~\cite{BorowskyG1993}, produces precisely the standard chromatic subdivision used in the ACT proof. In particular, it can be used to solve the problem of \index{agreement!simplex} \concept{simplex agreement}, the problem of getting the processes to agree on a particular simplex contained within the subdivision of their original common input simplex. This is a little easier to explain, so we'll do it. \end{description} \subsection{The participating set protocol} \label{section-participating-set} \newData{\PSlevel}{level} Algorithm~\ref{alg-participating-set} depicts the participating set protocol; this first appeared in~\cite{BorowskyG1993}, although the presentation here is heavily influenced by the version in Elizabeth Borowsky's dissertation~\cite{Borowsky1995}. The shared data consists of a snapshot object $\PSlevel$, and processes start at a high level and float down until they reach a level $i$ such that there are already $i$ processes at this level or below. The set returned by a process consists of all processes it sees at its own level or below, and it can be shown that this in fact implements a one-shot immediate snapshot. Since immediate snapshots yield a standard subdivision, this gives us what we want for converting a color-preserving simplicial map to an actual protocol. \begin{algorithm} Initially, $\PSlevel[i] = n+2$ for all $i$.\; \Repeat{$\card*{S} ≥ \PSlevel[i]$}{ $\PSlevel[i] ← \PSlevel[i] - 1$\; $v ← \Snapshot(\PSlevel)$\; $S ← \SetWhere{j}{v[j] ≤ \PSlevel[i]}$\; } \Return $S$\; \caption{Participating set} \label{alg-participating-set} \end{algorithm} The following theorem shows that the return values from participating set have all the properties we want for iterated immediate snapshot: \begin{theorem} \label{theorem-participating-set} Let $S_i$ be the output of the participating set algorithm for process $i$. Then all of the following conditions hold: \begin{enumerate} \item For all $i$, $i ∈ S_i$. (Self-containment.) \item For all $i,j$, $S_i ⊆ S_j$ or $S_j ⊆ S_i$. (Atomic snapshot.) \item For all $i,j$, if $i ∈ S_j$, then $S_i ⊆ S_j$. (Immediacy.) \end{enumerate} \end{theorem} \begin{proof} Self-inclusion is trivial, but we will have to do some work for the other two properties. The first step is to show that Algorithm~\ref{alg-participating-set} neatly sorts the processes out into levels, where each process that returns at level $\ell$ returns precisely the set of processes at level $\ell$ and below. For each process $i$, let $S_i$ be the set of process ids that $i$ returns, let $\ell_i$ be the final value of $\PSlevel[i]$ when $i$ returns, and let $S'_i = \SetWhere{j}{\ell_j ≤ \ell_i}$. Our goal is to show that $S'_i = S_i$, justifying the above claim. Because no process ever increases its level, if process $i$ observes $\PSlevel[j] ≤ \ell_i$ in its last snapshot, then $\ell_j ≤ \PSlevel[j] ≤ \ell_i$. So $S'_i$ is a superset of $S_i$. We thus need to show only that no extra processes sneak in; in particular, we will to show that $\card*{S_i} = \card*{S'_i}$, by showing that both equal $\ell_i$. The first step is to show that $\card*{S'_i} ≥ \card*{S_i} ≥ \ell_i$. The first inequality follows from the fact that $S'_i ⊇ S_i$; the second follows from the code (if not, $i$ would have stayed in the loop). The second step is to show that $\card*{S'_i} ≤ \ell_i$. Suppose not; that is, suppose that $\card*{S'_i} > \ell_i$. Then there are at least $\ell_i+1$ processes with level $\ell_i$ or less, all of which take a snapshot on level $\ell_i+1$. Let $i'$ be the last of these processes to take a snapshot while on level $\ell_i+1$. Then $i'$ sees at least $\ell_i+1$ processes at level $\ell_i+1$ or less and exits, contradicting the assumption that it reaches level $\ell_i$. So $\card*{S'_i} ≤ \ell_i$. The atomic snapshot property follows immediately from the fact that if $\ell_i ≤ \ell_j$, then $\ell_k ≤ \ell_i$ implies $\ell_k ≤ \ell_j$, giving $S_i = S'_i ⊆ S'_j = S_j$. Similarly, for immediacy we have that if $i ∈ S_j$, then $\ell_i ≤ \ell_j$, giving $S_i ≤ S_j$ by the same argument. \end{proof} The missing piece for turning this into IIS is that in Algorithm~\ref{alg-participating-set}, I only learn the identities of the processes I am supposed to include but not their input values. This is easily dealt with by the usual trick of adding an extra register for each process, to which it writes its input before executing participating set. \section{Proving impossibility results} To show something is impossible using the ACT, we need to show that there is no color-preserving simplicial map from a subdivision of $I$ to $O$ satisfying the conditions in $Δ$. This turns out to be equivalent to showing that there is no continuous function from $I$ to $O$ with the same properties, because any such simplicial map can be turned into a continuous function (on the geometric version of $I$, which includes the intermediate points in addition to the corners). Fortunately, topologists have many tools for proving non-existence of continuous functions. \subsection{\texorpdfstring{$k$-connectivity}{k-connectivity}} Define the $m$-dimensional \concept{disk} to be the set of all points at most 1 unit away from the origin in $\mathbb{R}^{m}$, and the $m$-dimensional \concept{sphere} to be the surface of the $(m+1)$-dimensional disk (i.e., all points exactly 1 unit away from the origin in $\mathbb{R}^{m+1}$). Note that what we usually think of as a sphere (a solid body), topologists call a disk, leaving the term sphere for just the outside part. An object is \indexConcept{$k$-connectivity}{$k$-connected} if any continuous image of an $m$-dimensional sphere can be extended to a continuous image of an $(m+1)$-dimensional disk, for all $m ≤ k$.\footnote{This definition is for the topological version of $k$-connectivity. It is not related in any way to the definition of $k$-connectivity in graph theory, where a graph is $k$-connected if there are $k$ disjoint paths between any two points.} This is a roundabout way of saying that if we can draw something that looks like a deformed sphere inside our object, we can always include the inside as well: there are no holes that get in the way. The punch line is that continuous functions preserve $k$-connectivity: if we want to map an object with no holes continuously into some other object, the image had better not have any holes either. Ordinary path-connectivity is the special case when $k = 0$; here, the $0$-sphere consists of two points and the $1$-disk is the path between them. So $0$-connectivity says that for any two points, there is a path between them. For $1$-connectivity, if we draw a loop (a path that returns to its origin), we can include the interior of the loop somewhere. One way to thinking about this is to say that we can shrink the loop to a point without leaving the object (the technical term for this is that the path is \concept{null-homotopic}, where a \concept{homotopy} is a way to transform one thing continuously into another thing over time and the \index{path!null}\concept{null path} sits on a single point). An object that is $1$-connected is also called \index{connected!simply} \concept{simply connected}. For 2-connectivity, we can't contract a sphere (or box, or the surface of a 2-simplex, or anything else that looks like a sphere) to a point. The important thing about $k$-connectivity is that it is possible to prove that any subdivision of a $k$-connected simplicial complex is also $k$-connected (sort of obvious if you think about the pictures, but it can also be proved formally), and that $k$-connectivity is preserved by simplicial maps (if not, somewhere in the middle of all the $k$-simplexes representing our surface is a $(k+1)$-simplex in the domain that maps to a hole in the range, violating the rule that simplicial maps map simplexes to simplexes). So a quick way to show that the Asynchronous Computability Theorem implies that something is not asynchronously computable is to show that the input complex is $k$-connected and the output complex isn't. \subsection{Impossibility proofs for specific problems} Here are some applications of the Asynchronous Computability Theorem and $k$-connectivity: \begin{description} \item[Consensus] There is no nontrivial wait-free consensus protocol for $n ≥ 2$ processes. Proof: The input complex is 1-connected, but the output complex is not, and we need a map that covers the entire output complex (by nontriviality). \item[$k$-set agreement] There is no wait-free $k$-set agreement for $n ≥ k+1$ processes. Proof: The output complex for $k$-set agreement is not $k$-connected, because buried inside it are lots of $(k+1)$-dimensional holes corresponding to missing simplexes where all $k+1$ processes choose different values. But these holes aren't present in the input complex—it's OK if everybody starts with different inputs—and the validity requirements for $k$-set agreement force us to map the surfaces of these non-holes around holes in the output complex. (This proof actually turns into the Sperner's Lemma proof if we fully expand the claim about having to map the input complex around the hole.) \item[Renaming] There is no wait-free renaming protocol with less than $2n-1$ output names for all $n$. The general proof of this requires showing that with fewer names we get holes that are too big (and ultimately reduces to Sperner's Lemma); for the special case of $n=3$ and $m=4$, see Figure~\ref{fig-renaming-output-complex}, which shows how the output complex of renaming folds up into the surface of a torus. This means that renaming for $n=3$ and $m=4$ is \emph{exactly the same} as trying to stretch a basketball into an inner tube. \end{description} \begin{figure} \centering \begin{tikzpicture}[auto,node distance=1.5cm] \node (a1) {$a1$}; \node (b2) [right of=a1] {$b2$}; \node (c3) [above right of=a1] {$c3$}; \node (a4) [right of=c3] {$a4$}; \node (c1) [right of=b2] {$c1$}; \node (b1') [above right of=c3] {$b1$}; \node (c2') [right of=b1'] {$c2$}; \node (b3) [right of=a4] {$b3$}; \node (a2) [right of=c1] {$a2$}; \node (c4) [right of=b3] {$c4$}; \node (b1) [right of=a2] {$b1$}; \node (a1') [right of=c2'] {$a1$}; \node (a3) [right of=c4] {$a3$}; \node (b2') [right of=a1'] {$b2$}; \node (c2) [right of=b1] {$c2$}; \node (c1') [right of=b2'] {$c1$}; \node (b4) [right of=a3] {$b4$}; \node (a1'') [right of=c2] {$a1$}; \node (a2') [right of=c1'] {$a2$}; \node (c3') [right of=b4] {$c3$}; \node (b1'') [right of=a2'] {$b1$}; \newcommand{\s}[3]{\filldraw[fill=red!30,draw=black!30] (#1.center) -- (#2.center) -- (#3.center) -- (#1.center); } \begin{pgfonlayer}{background} \s{a1}{b2}{c3} \s{a1'}{b2'}{c4} \s{a1'}{b3}{c2'} \s{a1'}{b3}{c4} \s{a1''}{b4}{c2} \s{a1''}{b4}{c3'} \s{a2'}{b1''}{c3'} \s{a2}{b1}{c4} \s{a2}{b3}{c1} \s{a2}{b3}{c4} \s{a2'}{b4}{c1'} \s{a2'}{b4}{c3'} \s{a3}{b1}{c2} \s{a3}{b1}{c4} \s{a3}{b2'}{c1'} \s{a3}{b2'}{c4} \s{a3}{b4}{c1'} \s{a3}{b4}{c2} \s{a4}{b1'}{c2'} \s{a4}{b1'}{c3} \s{a4}{b2}{c1} \s{a4}{b2}{c3} \s{a4}{b3}{c1} \s{a4}{b3}{c2'} \end{pgfonlayer} \end{tikzpicture} \caption[Output complex for renaming with $n=3$, $m=4$]{Output complex for renaming with $n=3$, $m=4$. Each vertex is labeled by a process id $(a,b,c)$ and a name $(1,2,3,4)$. Observe that the left and right edges of the complex have the same sequence of labels, as do the top and bottom edges; the complex thus folds up into a (twisted) torus. (This is a poor imitation of part of \cite[Figure 9]{HerlihyS1999}.)} \label{fig-renaming-output-complex} \end{figure} \myChapter{Approximate agreement}{2011}{} \label{chapter-approximate-agreement} The \index{agreement!approximate} \concept{approximate agreement}~\cite{DolevLPSW1986} or \index{agreement!$ε$-} \concept{$ε$-agreement} problem is another relaxation of consensus where input and output values are real numbers, and a protocol is required to satisfy modified validity and agreement conditions. Let $x_i$ be the input of process $i$ and $y_i$ its output. Then a protocol satisfies approximate agreement if it satisfies: \begin{description} \item[Termination] Every nonfaulty process eventually decides. \item[Validity] Every process returns an output within the range of inputs. Formally, for all $i$, it holds that $(\min_j x_j) ≤ y_i ≤ (\max_j x_j)$. \item[$ε$-agreement] For all $i$ and $j$, $\abs*{i-j} ≤ ε$. \end{description} Unlike consensus, approximate agreement has wait-free algorithms for asynchronous shared memory, which we'll see in §\ref{section-approximate-agreement-upper-bounds}). But a curious property of approximate agreement is that it has no \index{wait-free!bounded} \concept{bounded wait-free} algorithms, even for two processes (see §\ref{section-approximate-agreement-lower-bound}) \section{Algorithms for approximate agreement} \label{section-approximate-agreement-upper-bounds} Not only is approximate agreement solvable, it's actually easily solvable, to the point that there are many known algorithms for solving it. \newFunc{\AAsnapshot}{snapshot} \newcommand{r_{\max}}{r_{\max}} We'll use the algorithm of Moran~\cite{Moran1995}, mostly as presented in~\cite[Algorithm 54]{AttiyaW2004} but with a slight bug fix;\footnote{The original algorithm from~\cite{AttiyaW2004} does not include the test $r_{\max} ≥ 2$. This allows for bad executions in which process $1$ writes its input of $0$ in round $1$ and takes a snapshot that includes only its own input, after which process $2$ runs the algorithm to completion with input $1$. Here process $2$ will see $0$ and $1$ in round $1$, and will write $(1/2, 2, 1)$ to $A[2]$; on subsequent iterations, it will see only the value $1/2$ in the maximum round, and after $\ceil{\log_2(1/ε)}$ rounds it will decide on $1/2$. But if we now wake process $1$ up, it will decided $0$ immediately based on its snapshot, which includes only its own input and gives $\spread(x) = 0$. Adding the extra test prevents this from happening, as new values that arrive after somebody writes round $2$ will be ignored.} pseudocode appears in Algorithm~\ref{alg-approximate-agreement}.\footnote{Showing that this particular algorithm works takes a lot of effort. If I were to do this over, I'd probably go with a different algorithm due to Schenk~\cite{Schenk1995}.} The algorithm carries out a sequence of asynchronous rounds in which processes adopt new values, such that the \concept{spread} of the vector of all values $V_r$ in round $r$, defined as $\spread V_r = \max V_r - \min V_r$, drops by a factor of $2$ per round. This is done by having each process choose a new value in each round by taking the midpoint (average of min and max) of all the values it sees in the previous round. Slow processes will jump to the maximum round they see rather than propagating old values up from ancient rounds; this is enough to guarantee that latecomer values that arrive after some process writes in round $2$ are ignored. The algorithm uses a single snapshot object $A$ to communicate, and each process stores its initial input and a round number along with its current preference. We assume that the initial values in this object all have round number $0$, and that $\log_2 0 = -\infty$ (which avoids a special case in the termination test). \begin{algorithm} $A[i] ← \langle x_i, 1, x_i \rangle$ \; \Repeat{$r_{\max} ≥ 2$ \KwAnd $r_{\max} ≥ \log_2(\spread(\{x'_j\})/ε)$}{ $\langle x'_1, r_1, v_1 \rangle \dots \langle x'_n, r_n, v_n \rangle ← \AAsnapshot(A)$ \; $r_{\max} ← \max_j r_j$ \; $v ← \midpoint \{ v_j \,|\, r_j = r_{\max} \}$ \; $A[i] ← \langle x_i, r_{\max} + 1, v \rangle$\; } \Return $v$\; \caption{Approximate agreement} \label{alg-approximate-agreement} \end{algorithm} To show this works, we want to show that the midpoint operation guarantees that the spread shrinks by a factor of $2$ in each round. Let $V_r$ be the set of all values $v$ that are ever written to the snapshot object with round number $r$. Let $U_r \subseteq V_r$ be the set of values that are ever written to the snapshot object with round number $r$ before some process writes a value with round number $r+1$ or greater; the intuition here is that $U_r$ includes only those values that might contribute to the computation of some round-$(r+1)$ value. \begin{lemma} \label{lemma-approximate-agreement-spread} For all $r$ for which $V_{r+1}$ is nonempty, \begin{align*} \spread(V_{r+1}) &≤ \spread(U_r)/2. \end{align*} \end{lemma} \begin{proof} Let $U_r^i$ be the set of round-$r$ values observed by a process $i$ in the iteration in which it sees $r_{\max} = r$ in some iteration, if such an iteration exists. Note that $U_r^i \subseteq U_r$, because if some value with round $r+1$ or greater is written before $i$'s snapshot, then $i$ will compute a larger value for $r_{\max}$. Given two processes $i$ and $j$, we can argue from the properties of snapshot that either $U_r^i \subseteq U_r^j$ or $U_r^j \subseteq U_r^i$. The reason is that if $i$'s snapshot comes first, then $j$ sees at least as many round-$r$ values as $i$ does, because the only way for a round-$r$ value to disappear is if it is replaced by a value in a later round. But in this case, process $j$ will compute a larger value for $r_{\max}$ and will not get a view for round $r$. The same holds in reverse if $j$'s snapshot comes first. Observe that if $U_r^i \subseteq U_r^j$, then \begin{align*} \abs*{\,\midpoint(U_r^i) - \midpoint(U_r^j)} &≤ \spread(U_r^j)/2. \end{align*} This holds because $\midpoint(U_r^i)$ lies within the interval $\left[\min U_r^j, \max U_r^j\right]$, and every point in this interval is within $\spread(U_r^j)/2$ of $\midpoint(U_r^j)$. The same holds if $U_r^j \subseteq U_r^i$. So any two values written in round $r+1$ are within $\spread(U_r)/2$ of each other. In particular, the minimum and maximum values in $V_{r+1}$ are within $\spread(U_r)/2$ of each other, so $\spread(V_{r+1}) ≤ \spread(U_r)/2$. \end{proof} \begin{corollary} \label{corollary-approximate-agreement} For all $r ≥ 2$ for which $V_{r}$ is nonempty, \begin{align*} \spread(V_{r}) &≤ \spread(U_1)/2^{r-1}. \end{align*} \end{corollary} \begin{proof} By induction on $r$. For $r=2$, this is just Lemma~\ref{lemma-approximate-agreement-spread}. For larger $r$, use the fact that $U_{r-1} \subseteq V_{r-1}$ and thus $\spread(U_{r-1}) ≤ \spread(V_{r-1})$ to compute \begin{align*} \spread(V_{r}) &≤ \spread(U_{r-1})/2 \\ &≤ \spread(V_{r-1})/2 \\ &≤ (\spread(U_1)/2^{r-2})/2 \\ &= \spread(U_1)/2^{r-1}. \end{align*} \end{proof} Let $i$ be some process that finishes in the fewest number of rounds. Process $i$ can't finish until it reaches round $r_{\max}+1$, where $r_{\max} ≥ \log_2(\spread(\{x'_j\})/ε)$ for a vector of input values $x'$ that it reads after some process writes round $2$ or greater. We have $\spread(\{x'_j\}) ≥ \spread(U_1)$, because every value in $U_1$ is included in $x'$. So $r_{\max} ≥ \log_2\left(\spread(U_1)/ε\right)$ and $\spread(V_{r_{\max}+1}) ≤ \spread(U_1)/2^{r_{\max}} ≤ \spread(U_1)/(\spread(U_1)/ε) = ε$. Since any value returned is either included in $V_{r_{\max}+1}$ or some later $V_{r'} \subseteq V_{r_{\max}+1}$, this gives us that the spread of all the outputs is less than $ε$: Algorithm~\ref{alg-approximate-agreement} solves approximate agreement. The cost of Algorithm~\ref{alg-approximate-agreement} depends on the cost of the snapshot operations, on $ε$, and on the initial input spread $D$. For linear-cost snapshots, this works out to $O(n \log (D/ε))$. \section{Lower bound on step complexity} \label{section-approximate-agreement-lower-bound} The dependence on $D/ε$ is necessary, at least for deterministic algorithms. Here we give a lower bound due to Herlihy~\cite{Herlihy1991pram}, which shows that any deterministic approximate agreement algorithm takes at least $\log_3 (D/ε)$ total steps even with just two processes. Define the \concept{preference} of a process in some configuration as the value it will choose if it runs alone starting from this configuration. The preference of a process $p$ is well-defined because the process is deterministic; it also can only change as a result of a write operation by another process $q$ (because no other operations are visible to $p$, and $p$'s own operations can't change its preference). The validity condition means that in an initial state, each process's preference is equal to its input. Consider an execution with two processes $p$ and $q$, where $p$ starts with preference $p_0$ and $q$ starts with preference $q_0$. Run $p$ until it is about to perform a write that would change $q$'s preference. Now run $q$ until it is about to change $p$'s preference. If $p$'s write no longer changes $q$'s preference, start $p$ again and repeat until both $p$ and $q$ have pending writes that will change the other process's preference. Let $p_1$ and $q_1$ be the new preferences that result from these operations. The adversary can now choose between running $P$ only and getting to a configuration with preferences $p_0$ and $q_1$, $Q$ only and getting $p_1$ and $q_0$, or both and getting $p_1$ and $q_1$; each of these choices incurs at least one step. By the triangle inequality, $\abs*{p_0 - q_0} ≤ \abs*{p_0 - q_1} + \abs*{q_1 - p_1} + \abs*{p_1 - q_0}$, so at least on of these configurations has a spread between preferences that is at least $1/3$ of the initial spread. It follows that after $k$ steps the best spread we can get is $D/3^k$, requiring $k ≥ \log_3 (D/ε)$ steps to get $ε$-agreement. Herlihy uses this result to show that there are decisions problems that have wait-free but not bounded wait-free deterministic solutions using registers. Curiously, the lower bound says nothing about the dependence on the number of processes; it is conceivable that there is an approximate agreement protocol with running time that depends only on $D/ε$ and not $n$. \part{Other communication models} \label{part-other-models} \myChapter{Overview}{2020}{} In this part, we consider models that don't fit well into the standard message-passing or shared-memory models. These includes models where processes can directly observe the states of nearby processes (Chapter~\ref{chapter-self-stabilization}); where computation is inherently local and the emphasis is on computing information about the communication graph (Chapter~\ref{chapter-distributed-graph-algorithms}); where processes wander about and exchange information only with processes they physically encounter (Chapter~\ref{chapter-population-protocols}); where processes (in the form of robots) communicate only by observing each others' locations and movements (Chapter~\ref{chapter-mobile-robots}); and where processes can transmit only beeps, and are able to observe only whether at least one nearby process beeped (Chapter~\ref{chapter-beeping}). Despite the varying communication mechanisms, these models all share the usual features of distributed systems, where processes must contend with nondeterminism and incomplete local information. \myChapter{Self-stabilization}{2020}{} \label{chapter-self-stabilization} A \index{self-stabilization}\concept{self-stabilizing} algorithm has the property that, starting from any arbitrary configuration, it eventually reaches a \concept{legal} configuration, and this property is \concept{stable} in the sense that it remains in a legal configuration thereafter. The notion of which configurations are legal depends on what problem we are trying to solve, but the overall intuition is that an algorithm is self-stabilizing if it can recover from arbitrarily horrible errors, and will stay recovered as long as no new errors occur. It's generally not possible to detect whether the algorithm is in a legal configuration from the inside: if a process has a bit that says that everything is OK, the adversary can set that bit in the initial configuration, even if everything is in fact broken. So self-stabilizing algorithms don't actually terminate: at best, they eventually converge to a configuration where the necessary ongoing paranoid consistency checks produce no further changes to the configuration (a property called \index{self-stabilization!silent}\concept{silent self-stabilization}. The idea of self-stabilization first appeared in a paper by Edsger Dijkstra~\cite{Dijkstra1974}, where he considered the problem of building robust token-ring networks. In a token-ring network, there are $n$ nodes arranged in a directed cycle, and we want a single token to circulate through the nodes, as a mechanism for enforcing mutual exclusion: only the node currently possessing the token can access the shared resource. The problem is: how do you get the token started? Dijkstra worried both about the possibility of starting with no tokens or with more than one token, and he wanted an algorithm that would guarantee that, from any starting state, eventually we would end up with exactly one token that would circulate as desired. He called such an algorithm \concept{self-stabilizing}, and gave three examples, the simplest of which we will discuss in §\ref{section-self-stabilizing-token-ring} below. These became the foundation for the huge field of self-stabilization, which spans thousands of papers, at least one textbook~\cite{Dolev2000}, a specialized conference (SSS, the \emph{International Symposium on Stabilization, Safety, and Security in Distributed Systems)}, and its own domain name \url{http://www.selfstabilization.org/}. We won't attempt to summarize all of this, but will highlight a few results to give a sampling of what self-stabilizing algorithms look like. \section{Model} Much of the work in this area, dating back to Dijkstra's original paper, does not fit well in either the message-passing or shared-memory models that we have been considering in this class, both of which were standardized much later. Instead, Dijkstra assumed that processes could, in effect, directly observe the states of their neighbors. A self-stabilizing program would consist of a collection of what he later called \index{command!guarded}\indexConcept{guarded command}{guarded commands}~\cite{Dijkstra1975}, statements of the form ``if [some condition is true] then [update my state in this way].'' In any configuration of the system, one or more of these guarded commands might have the if part (the \concept{guard}) be true; these commands are said to be \concept{enabled}. A step consists of one or more of these enabled commands being executed simultaneously, as chosen by an adversary scheduler, called the \index{daemon!distributed}{distributed daemon}. The usual fairness condition applies: any process that has an enabled command eventually gets to execute it. If no commands are enabled, nothing happens. With the \index{daemon!central}\concept{central daemon} variant of the model, only one step can happen at a time. With the \index{daemon!synchronous}\concept{synchronous daemon}, every enabled step happens at each time. Note that both the central and synchronous daemons are special cases of the distributed daemon. More recent work has tended to assume a distinction between the part of a process's state that is visible to its neighbors and the part that isn't. This usually takes the form of explicit \index{register!communication} \indexConcept{communication register}{communication registers} or \index{register!link} \indexConcept{link register}{link registers}, which allow a process to write a specific message for a specific neighbor. This is still not quite the same as standard message-passing or shared-memory, because a process is often allowed to read and write multiple link registers atomically. \section{Token ring circulation} \label{section-self-stabilizing-token-ring} For example, let us consider Dijkstra's token ring circulation algorithm. There are several versions of this in Dijkstra's paper~\cite{Dijkstra1974}. We will do the unidirectional $(n+1)$-state version, which is the simplest to describe and analyze. For this algorithm, the processes are numbered as elements $0 \dots n-1$ of $ℤ_n$, with all arithmetic on process ids being done modulo $n$.\footnote{In Dijkstra's paper, there are $n+1$ processes numbered $0\dots n$, but this doesn't really make any difference.} Each process $i$ can observe both its own state that that of its left neighbor at $(i-1) \bmod m$. Process $0$ has a special role and has different code from the others, but the rest of the processes are symmetric. Each process $i$ has a variable $\ell_i$ that takes on values in the range $0\dots m-1$, interpreted as elements of $ℤ_m$. The algorithm is given in Algorithm~\ref{alg-dijkstra-token-ring}. \begin{algorithm} Code for process 0:\\ \lIf{$\ell_{0} = \ell_{n-1}$}{$\ell'_0 ← (\ell_{n-1} + 1) \bmod (n+1)$} Code for process $i≠0$:\\ \lIf{$\ell_{i} ≠ \ell_{i-1}$}{$\ell'_i ← \ell_{i-1}$} \caption{Dijkstra's large-state token ring algorithm~\cite{Dijkstra1974}} \label{alg-dijkstra-token-ring} \end{algorithm} In this algorithm, the nonzero processes just copy the state of the process to their left. The zero process increments its state if it sees the same state to its left. Note that the nonzero processes have guards on their commands that might appear useless at first glance, but these are there ensure that the adversary can't waste steps getting nonzero processes to carry out operations that have no effect. What does this have to with tokens? The algorithm includes an additional interpretation of the state, which says that: \begin{enumerate} \item If $\ell_0 = \ell_{n-1}$, then $0$ has a token, and \item If $\ell_i ≠ \ell_{i-1}$, for $i≠0$, then $i$ has a token. \end{enumerate} This instantly guarantees that there is at least one token: if none of the nonzero processes have a token, then all the $\ell_i$ variables are equal. But then $0$ has a token. It remains though to show that we eventually converge to a configuration where at most one process has a token. Define a configuration $\ell$ as legal if there is some value $j$ such that $\ell_i = \ell_j$ for all $i≤j$ and $\ell_i = \ell_j - 1 \pmod{n+1}$ for all $i > j$. When $j = n-1$, this makes all $\ell_i$ equal, and $0$ has the only token. When $j < n-1$, then $\ell_0 ≠ \ell_{n-1}$ (so $0$ does not have a token), $\ell_j ≠ \ell_{j+1}$ (so $j+1$ has a token), and $\ell_i = \ell_{i+1}$ for all $i∉{j,n-1}$ (so nobody else has a token). That each legal configuration has exactly one token partially justifies our definition of legal configurations. If a configuration $\ell$ is legal, then when $j = n-1$, the only enabled step is $\ell'_0 ← (\ell_{n-1} + 1) \bmod (n+1)$; when $j < n-1$, the only enabled step is $\ell'_{j+1} ← \ell_j$. In either case, we get a new legal configuration $\ell'$. So the property of being a legal configuration is stable, which is the other half of justifying our definition. Now we want to show that we eventually converge to a legal configuration. Fix some initial configuration $\ell^0$, and let $c$ be some value such that $\ell^0_i ≠ c$ for all $i$. (There is at least one such $c$ by the Pigeonhole Principle.) We will argue that there is a sequence of configurations with $c$ as a prefix of the values that forms a bottleneck forcing us into a legal configuration: \begin{lemma} \label{lemma-Dijkstra-bottleneck} Let $\ell^0,\ell^1,\dots$ be the sequence of configurations in some execution of Dijkstra's token ring circulation algorithm. Let $0≤c≤n$ be such that $\ell^0_i ≠ c$ for all $i$. Then for any configuration $\ell^t$, either $t$ is legal, or there is some $0≤j<n$ such that $\ell^t_i = c$ if and only if $i < j$. \end{lemma} \begin{proof} By induction on $t$. For the base case, $\ell^0$ satisfies $\ell^0_i = c$ if and only if $i < j$ when $j = 0$. If $\ell^t$ is legal, $\ell^{t+1}$ is also legal. So the interesting case is when $\ell^t$ is not legal. In this case, there is some $0≤j<n$ such that $\ell^t_i = c$ if and only if $i < j$. If $j = 0$, then $\ell^t_i ≠ c$ for all $i$. Then the only way to get $\ell^{t+1}_i = c$ is if $i = 0$. But then $\ell^{t+1}$ satisfies the condition with $j'=1$. If $0 < j < n$, then $\ell^t_i = c$ for at least one $i < j$, and $\ell^t_{n-1} ≠ c$ since $n-1 \not< j$. So we may get a transition that sets $\ell^{t+1}_j = \ell^t_{j-1} = c$, giving a new configuration $\ell^{t+1}$ that satisfies the induction hypothesis with $j' = j+1$, or we may get a transition that does not create or remove any copies of $c$. In either case the induction goes through. \end{proof} To show that we eventually hit this bottleneck, we use a potential function. Starting in some initial configuration $\ell^0$, let $c$ be some missing value in $\ell^0$ as defined above. For any configuration $\ell$, define $g(\ell) = (c-\ell_0) \bmod (n+1)$ to be the gap between $\ell_0$ and $c$. For each $i ∈ \Set{0,\dots,n-2}$, define $u_i(\ell) = [\ell_i ≠ \ell_{i+1}]$ to be the indicator variable for whether $i$ is \emph{unhappy} with its successor, because its successor has not yet agreed to adopt its value.\footnote{The notation $[P]$, where $P$ is some logical predicate, is called an \concept{Iverson bracket} and means the function that is $1$ when $P$ is true and $0$ when $P$ is false.} The idea is that unhappiness moves right when some $i ≠ 0$ copies its predecessor and that the gap drops when $0$ increments its value. By weighting these values appropriately, we can arrange for a function that always drops. Let \begin{equation} \label{eq-dijkstra-potential} Φ(\ell) = ng(\ell) + ∑_{i=0}^{n-2} (n-1-i) u_i(\ell). \end{equation} Most of the work here is being done by the first two terms. The $g$ term tracks the gap between $\ell_0$ and $c$, weighted by $n$. The sum tracks unhappiness, weighted by distance to position $n-1$. In the initial configuration $\ell^0$, $g$ is at most $n$, and each $u_i$ is at most $1$, so $Φ(\ell^0) = O(n^2)$. We also have that $Φ≥0$ always; if $Φ=0$, then $g=0$ and $u_i=0$ for all $i$ implies we are in an all-$c$ configuration, which is legal. So we'd like to argue that every step of the algorithm in a non-legal configuration reachable from $\ell^0$ reduces $Φ$ by at least $1$, forcing us into a legal configuration after $O(n^2)$ steps. Consider any step of the algorithm starting from a non-legal configuration $\ell^t$ with $Φ(\ell^t) >0$ that satisfies the condition in Lemma~\ref{lemma-Dijkstra-bottleneck}: \begin{itemize} \item If it is a step by $i≠0$, then $u_{i-1}$ changes from $1$ to $0$, reducing $Φ$ by $(n-1-(i-1)) = n-i$. It may be that $u_i$ changes from $0$ to $1$, increasing $Φ$ by $n-i-1$, but the sum of these changes is at most $-1$. \item If it is a step by $0$, then $u_0$ may increase from $0$ to $1$, increasing $Φ$ by $n-1$. But $g$ drops by $1$ as long as $\ell^t_0 ≠ c$, reducing $Φ$ by $n$, for a total change of at most $-1$. The case $\ell^t = c$ is excluded by the assumption that $\ell^t$ is non-legal and satisfies the conditions of Lemma~\ref{lemma-Dijkstra-bottleneck}, as the only way for $0$ to change its value away from $c$ is if $\ell^t_{n-1}$ is also $c$. \end{itemize} Since the condition of Lemma~\ref{lemma-Dijkstra-bottleneck} holds for any reachable $\ell^t$, as long as we are in a non-legal configuration, $Φ$ drops by at least $1$ per step. If we do not reach a legal configuration otherwise, $Φ$ can only drop $O(n^2)$ times before hitting $0$, giving us a legal configuration. Either way, the configuration stabilizes in $O(n^2)$ steps. \section{Synchronizers} Self-stabilization has a curious relationship with failures: the arbitrary initial state corresponds to an arbitrarily bad initial disruption of the system, but once we get past this there are no further failures. So it is not surprising that many of the things we can do in a failure-free distributed system we can also do in a self-stabilizing system. One of these is to implement a synchronizer, which will allow us to pretend that our system is synchronous even if it isn't. The synchronizer we will describe here, due to Awerbuch~\etal~\cite{AwerbuchKMPV1993,AwerbuchKMPV1997}, is a variant of the alpha synchronizer. It assumes that each process can observe the states of its neighbors and that we have a central daemon (meaning that one process takes a step at a time). To implement this synchronizer in a self-stabilizing system, each process $v$ has a variable $P(v)$, its current pulse. We also give each process a rule for adjusting $P(v)$ when it takes a step. Our goal is to arrange for every $v$ to increment its pulse infinitely often while staying at most one ahead of its neighbors $N(v)$. Awerbuch~\etal{} give several possible rules for achieving this goal, and consider the effectiveness of each. The simplest rule is taken directly from the alpha synchronizer. When activated, $v$ sets \begin{equation*} P(v) ← \min_{u∈N(v)} (P(u)+1) \end{equation*} This rule works find as long as every process starts synchronized. But it's not self-stabilizing. A counterexample, given in the paper, assumes we have $10$ processes organized in a ring. By carefully choosing which processes are activated at each step, we can go through the following sequence of configurations, where in each configuration the updated node is shown in boldface: \begin{center} 1234312343\\ 1234\textbf{2}12343\\ 12342\textbf{3}2343\\ 123423\textbf{4}343\\ 1234234\textbf{5}43\\ 123423454\textbf{2}\\ \textbf{3}234234542\\ 3\textbf{4}34234542\\ 34\textbf{5}4234542 \end{center} Here the final configuration is identical to the original if we increment each value by one and shift the values to the left one position. So we can continue this process indefinitely. But at the same time, each configuration has at least one pair of adjacent nodes whose values differ by more than one. The problem that arises in the counterexample is that sometimes values can go backwards. A second rule proposed by Awerbuch~\etal{} avoids this problem by preventing this, using the rule: \begin{equation*} P(v) ← \max\parens*{P(v), \min_{u∈N(v)} (P(u) + 1)} \end{equation*} This turns out to be self-stabilizing, but the time to stabilize is unbounded even in small networks. One counterexample is a network consisting of just three nodes: \begin{center} \begin{tikzpicture} \node[labeled] (a) at(0,0) {$1$}; \node[labeled] (b) at(1.5,0) {$1$}; \node[labeled] (c) at(3,0) {$10^{50}$}; \path (a) edge (b) (b) edge (c) ; \end{tikzpicture} \end{center} If we run the nodes in round-robin order, the left two nodes will eventually catch up to the rightmost, but it will take a while. After some further tinkering, the authors present their optimal rule, which they call \concept{max minus one}: \begin{equation*} P(v) ← \begin{cases} \min_{u ∈ N(v)} (P(u)+1) & \text{if $P(v)$ looks legal,} \\ \max_{u ∈ N(v)} (P(u)-1) & \text{otherwise.} \end{cases} \end{equation*} Here $P(v)$ looks legal if it is within $±1$ of all of its neighbors. The intuition for why this works is that the most backward node pulls the rest down to its level in $O(D)$ time using the max-minus-one rule, after which we just get the alpha synchronizer since everybody's local values look legal. The actual proof uses a potential function at each node $v$ given by \begin{equation*} \label{eq-max-minus-one-potential} φ(v) = \max_u \parens*{P(u) - P(v) - d(u,v)}, \end{equation*} where $d(u,v)$ is the distance between $u$ and $v$ in the graph. This is zero if the skew between any pair of nodes is equal to the distance, which is the most we can expect from a synchronizer. The proof shows that applying the max-minus-one rule never increases $φ(v)$, and decreases it by at least $1$ whenever a node $v$ with positive $φ(v)$ changes $P(v)$. Because this only gives a bound of $∑ φ(v)$, the rest of the proof using a second potential function \begin{equation*} Φ(v) = \min_u \SetWhere{ d(u,v) }{P(u)-P(v)-d(u,v) = φ(v)}, \end{equation*} which measures the distance from $v$ to the nearest node $u$ that supplies the maximum in $φ(v)$. It is shown that $Φ(v)$ drops by $1$ per time unit. When it reaches $0$, then $φ(v) = P(v) - P(v) - d(v,v) = 0$. We'll skip over the details of the argument here. If you are interested, the presentation in the paper is not too hard to follow. The important part is that once we have a synchronizer, we can effectively assume synchrony in other self-stabilizing algorithms. We just run the synchronizer underneath our main protocol, and when the synchronizer stabilizes, that gives us the initial starting point for the main protocol. Because the main protocol itself should stabilize starting from an arbitrary configuration, any insanity produced while waiting for the synchronizer to converge is eventually overcome. \section{Spanning trees} \newData{\BFroot}{root} \newData{\BFdist}{dist} The straightforward way to construct a spanning tree in a graph is to use Bellman-Ford~\cite{Bellman1958,Ford1956} to compute a breadth-first search tree rooted at the node with lowest id. This has a natural implementation in the self-stabilizing model: each process maintains $\BFroot$ and $\BFdist$, and when a process takes a step, it sets $\BFroot$ to the minimum of its own id and the minimum $\BFroot$ among its neighbors, and sets $\BFdist$ to $0$ if it has the minimum id, or to one plus the minimum distance to the root among its neighbors otherwise. It is not hard to show that in the absence of errors, this converges to a configuration where every node knows the id of the root and its distance to the root in $O(D)$ time, where $D$ is the diameter of the network. A spanning tree can then be extracted by the usual trick of having each node select as parent some neighbor closer to the root. But it fails badly if the system starts in an arbitrary state, because of the \index{root!ghost}\concept{ghost root} problem. Suppose that some process wakes up believing in the existence of a distant, fake root with lower id than any real process. This fake root will rapidly propagate through the other nodes, with distances increasing without bound over time. For most graphs, the algorithm will never converge to a single spanning tree. Awerbuch~\etal~\cite{AwerbuchKMPV1993} solve this problem by assuming a known upper bound on the maximum diameter of the graph. Because the distance to a ghost root will steadily increase over time, eventually only real roots will remain, and the system will converge to a correct BFS tree. It's easiest to show this if we assume synchrony, or at least some sort of asynchronous round structure. Define a round as the minimum time for every node to update at least once. Then the minimum distance for any ghost root rises by at least one per round, since any node with the minimum distance either has no neighbor with the ghost root (in which case it picks a different root), or any neighbor that has the ghost root has at least the same distance (in which case it increases its distance) Once the minimum distance exceeds the upper bound $D'$, all the ghost roots will have been eliminated, and only real distances will remain. This gives a stabilization time (in rounds) linear in the upper bound on the diameter. \section{Self-stabilization and local algorithms} In Chapter~\ref{chapter-distributed-graph-algorithms}, we will look at algorithms in the \concept{LOCAL} model, where named processes in a synchronous network, organized as an unknown graph, can send a polynomial-sized message to each neighbor in each round and perform arbitrary computation locally. The goal is usually to compute some property of the graph quickly, often in significantly fewer rounds than the diameter of the graph. There is a close connection between self-stabilizing algorithms and the LOCAL model. The idea is that if we have a local algorithm that runs in $f(n)$ rounds, each process can propagate its information in a self-stabilizing way to all nodes at distance at most $f(n)$, and we can reconstruct the output of the local algorithm whenever this information changes. For each node $u$, let $x_u$ be its input value; we assume that this is fixed once the system stabilizes. The state of $u$ will be a table $T_u$, where $T_u$ is a partial function from sequences of nodes of length at most $f(n)$ to input values. We can represent this partial function as a set of ordered pairs $T_u = \Tuple{w,x}$, where we write $T_u(w) = x$ if $x$ is the unique value such that $\Tuple{w,x} ∈ T_u$, or $T_u(w) = ⊥$ if there is no such value. We have one rule at each node $u$, which we can imagine is guarded so that it fires only if it changes $T_u$: \begin{equation} T_u \gets \Set{\Tuple{u, x_u}} ∪ \bigcup_{v∈δ(u)} \SetWhere{ \Tuple{uw,x} }{ \card{uw} \le f(n), T_v(w) = x} \label{eq-self-stabilizing-local} \end{equation} We can now argue that, after stabilization, this process eventually converges to $T_u$ consisting precisely of the set of all pairs $\Tuple{w,x_v}$ where $w$ is a $u$–$v$ path of length at most $f(n)$ and $x_v$ is the input to $v$. Indeed, this works under almost any reasonable assumption about scheduling. The relevant lemma: \begin{lemma} \label{lemma-self-stabilizing-local} Starting from any initial configuration, for any sequence $w$ of at most $f(n)$ vertices starting at $u$ and ending at $v$, \eqref{eq-self-stabilizing-local} fires for each node in $w$ in reverse order, then $T_u(w) = x_v$ if $w$ is a $u$–$v$ path, and $T_u(w) = ⊥$ otherwise. \end{lemma} \begin{proof} The proof is by induction on the length of $w$. The base case is when $\card{w} = 1$, implying $w = u = v$. Here rule \eqref{eq-self-stabilizing-local} writes $\Tuple{u,x_u}$ to $T_u$, giving $T_u(u) = x_u$ as claimed. For a sequence $w = uw'$ where $w'$ is a nonempty path from some node $u'$ to $v$, if $u'$ is a neighbor of $u$, then firing rule \eqref{eq-self-stabilizing-local} at $u$ after firing the rule for each node in $w'$ has $T_u(uw') \gets T_{u'}(w) = x_v$ by the induction hypothesis. If $uw'$ is not a path from $u$ to $v$, then either $u'$ is not a neighbor of $u$, or $w'$ is not a path from $u'$ to $v$ and $T_{u'}(w') = ⊥$ by the induction hypothesis. In either case, $T_u(uw') \gets ⊥$. \end{proof} What does this buy us? Suppose we have a deterministic synchronous algorithm that runs in $f(n)$ rounds. Starting from a stable configuration, Lemma~\ref{lemma-self-stabilizing-local} tells us that any fair daemon will eventually leave us in a configuration where each node $u$ stores in $T_u$ both the inputs of all nodes within distance $f(n)$ and enough information to reconstruct how they are connected. So $u$ can simulate the execution of any node at distance $d$ for up to $f(n)-d$ rounds. In particular, it can simulate its own execution for $f(n)$ rounds, computing the same output as it would produce in the LOCAL model. \myChapter{Distributed graph algorithms}{2020}{} \label{chapter-distributed-graph-algorithms} In Chapter~\ref{chapter-self-stabilization}, we saw that certain classes of ``local'' algorithms have a straightforward conversion to self-stabilizing algorithms. In this chapter, we'll look more closely at what kinds of problems can be solved with this kind of locality. \section{The LOCAL and CONGEST models} The LOCAL and CONGEST models were defined by Peleg~\cite{Peleg2000} to formalize the idea of local distributed computation. Similar models had been considered previously without being specifically named~\cite{Linial1992}, but these names are now standard. The LOCAL model is a synchronous message-passing model where the processes are organized into a graph, all run the same code, and can communicate only with their neighbors in the graph. To break symmetry, each process starts with a unique id that is polynomial in the number of processes $n$. The processes may also start with local inputs, but often we are interested simply in computing some property of the graph itself. There is no bound on the size of messages. The CONGEST model is like the local model, but messages are limited to $O(\log n)$ bits. More generally, the $\text{CONGEST}(b)$ model allows messages of size $b$, making $\text{LOCAL} = \text{CONGEST}(∞)$ and $\text{CONGEST} = \text{CONGEST}(O(\log n))$. In both models, we usually assume that the processes do \emph{not} know the structure of the graph or their place in it. But for specific problems, we might require the graph to be from some restricted class (e.g., rings, trees, cliques). \section{Local graph coloring} One of the first problems studied in local distributed graph algorithms is graph coloring~\cite{Linial1992}, where we wish to assign each node in the graph a small label distinct from its neighbors. Because the nodes initially start with large distinct labels, graph coloring in the LOCAL model shares some similarities with renaming, since we will use the unique ids as a starting point for generating the colors. \subsection{Coloring graphs with out-degree 1} \label{section-Cole-Vishkin} Let us start by describing a classic local algorithm for $3$-coloring a directed graph with maximum out-degree 1, a class of graphs that includes both cycles and rooted trees. The algorithm we will use is ultimately due to Cole and Vishkin~\cite{ColeV1986}, although the application to local graph coloring was given by Linial~\cite{Linial1992}, and the version given here incorporates some additional features from Peleg's textbook~\cite{Peleg2000}. The idea from the Cole and Vishkin algorithm is to treat each identity $x$ as a long bit-string $x_{k} x_{k-1} \dots x_0$, where $k = \floor{\lg N}$ and $x = ∑ 2^i x_i$ and repeatedly apply an operation that to shorten these ids while maintaining the property that neighbors have distinct ids. At each synchronous round, each process adopts a new identity based on its old identity $x$ and the identity $x'$ of its successor. We look for the smallest index $i$ for which $x_i ≠ x'_i$. We then generate a new identity $2i + x_i$; this is the same as taking the bit-vector representation of $i$ and tacking $x_i$ on to the end of it. In the case of a node with no successor, we pretend that it has a successor with $x'_0 ≠ x_0$. This effectively knocks $x$ down to its last bit $x_0$. We now argue that this never produces two adjacent identities that are the same. Let $i'$ be the smallest index for which my successor's $x'_{i'}$ differs from their successor's $x''_{i'}$. If $i' ≠ i$, then my successor's new identity $2i' + x_{i'}$ will not equal my new identity $2i + x_i$, because the initial bits will be different. But if $i' = i$, then my successor's new identity is $2i+x'_i ≠ 2i+x_i$ because $x'_i ≠ x_i$. Assuming that the largest initial color is $N$, the largest possible value for $i$ is $\floor{\lg N}$, and so the largest possible value for $2i+1$ is $2\floor{\lg N}+1$. This converges to at most $5$ after $O(\log^* N)$ rounds, which gives us $6$ colors: $0,\dots,5$, where no two adjacent processes have the same color. To reduce this to three colors, add a phase for each $c∈\Set{3,4,5}$ to eliminate $c$. In each phase, we carry out a two-stage process: first, we shift all colors down, by having each node switch its color to that of its successor (or some new color chosen from $\Set{0,1,2}$ if it doesn't have a successor). The reason for doing this is that it guarantees that each node's predecessors will all share the same color, meaning that that node now has at most two colors represented among its predecessors and successor. At the same time, it doesn't create any new pair of adjacent nodes with the same color. So for the second stage, each node $v$ that currently has color $c$ can choose a new color from $\Set{0,1,2}$ that is the smallest color that doesn't appear in its neighborhood. Since none of $v$'s neighbors change color (they don't have color $c$), this replaces all instances of $c$ with a color form $\Set{0,1,2}$ while keeping all edges two-colored. After doing this for all $c∈\Set{3,4,5}$, the only colors left are in $\Set{0,1,2}$. Doing the $6$ to $3$ reduction in the obvious way takes an additional $6$ rounds, which is dominated by the $O(\log^* n)$ of reducing from $N$ initial ids. \subsection{Lower bound for rings} Using a Ramsey-theoretic argument, Linial~\cite{Linial1992} showed that $Ω(\log^* n)$ is a lower bound on the time to color a directed ring with $n$ nodes in the LOCAL model, which implies that the algorithm of the previous section is optimal up to constants, since a directed ring is a special case of a graph with out-degree $1$. We'll describe here a simplified version of Linial's original proof given by Laurinharju and Suomela~\cite{LaurinharjuS2014}. (The Laurinharju and Suomela paper is only two pages long, so it may be worth skipping the rest of this section and just reading it in the original.) The idea is that any coloring algorithm in the local model that runs in time $T$ assigns a color to each node based only on the initial ids of the $2T+1$ within $T$ hops of the node. So we can represent any possible deterministic coloring algorithm by specifying the mapping from these $2T+1$ ids to colors. Define a \concept{$k$-ary $c$-coloring function}\index{function!$k$-ary $c$-coloring}\index{coloring function!$k$-ary $c$-} as a function $A: [n]^k → [c]$ where $[n] = \Set{1,dots,n}$ is the id space and $[c] = \Set{1,dots,c}$ is a set of $c$ colors, with the property that \begin{equation} \label{eq-coloring-function} A(x_1,x_2,\dots,x_k) ≠ A(x_2,\dots,x_k,x_{k+1}) \end{equation} for any \emph{increasing sequence} $1 ≤ x_1 < x_2 < \dots < x_{k+1} ≤ n$. The restriction to increasing sequences and values in $[n]$ rather than $[N]$ is more restrictive that a general $c$-coloring algorithm, but if we have a successful $3$-coloring algorithm that runs in time $T$, we can extract from it a $(2T+1)$-ary $3$-coloring function, and condition \eqref{eq-coloring-function} will hold given that the original algorithm never assigns the same color to adjacent nodes. Conversely, if condition \eqref{eq-coloring-function} fails for some sequence $(x_1,x_2, \dots x_{k+1})$, then we can supply this sequence as the ids for the first $k+1$ nodes in the ring and show the algorithm fails. This implies that a $3$-coloring algorithm that runs in time $T$ can exist only if there is a $(2T+1)$-ary $3$-coloring function. The lower bound proof works by showing that $T$ needs to be $Ω(\log^* n)$ for this to be possible. It holds trivially that any $1$-ary $c$-coloring function requires $c≥n$. The proof works by showing how to transform any $k$-ary $c$-coloring function into a $(k-1)$-ary $2^c$-coloring function, which hits the trivial bound after $k-1$ steps. \begin{lemma}[\protect{\cite[Lemma 2]{LaurinharjuS2014}}] \label{lemma-coloring-function-amplification} For $k>1$, given a $k$-ary $c$-coloring function $A$, it is possible to construct a $(k-1)$-ary $2^c$-coloring function $B$. \end{lemma} \begin{proof} Let $B'(x_1,\dots,x_{k-1}) = \SetWhere{ A(x_1,x_2,\dots,x_{k-1},x_k) }{x_k > x_{k-1}}$. In other words, we fill in the missing parameter $x_k$ with all possible values $x_k > x_{k-1}$, and return the set of colors that we obtain from $A$. Since there are exactly $2^c$ possible sets, we can obtain $B: [N]^{k-1} → [2^c]$ by encoding each set as a distinct number in $[2^c] = \Set{1,\dots,2^c}$. We will now prove that $B$ satisfies \eqref{eq-coloring-function} whenever $A$ does, by showing the contraposition that if $B$ does not satisfy \eqref{eq-coloring-function}, then $A$ doesn't either. Suppose now that \eqref{eq-coloring-function} does not hold for $B$, that is, there is some increasing sequence $(x_1,\dots,x_k)$ such that $B(x_1,\dots,x_{k-1} = B(x_2,\dots,x_k)$, or equivalently $B'(x_1,\dots,x_{k-1} = B'(x_2,\dots,x_k)$. We will feed this bad sequence to $A$ and see what happens. Let $α = A(x_1,\dots,x_k)$. Since $x_k$ is one of the possible extensions of $(x_1,\dots,x_{k-1})$ used to generate $B'(x_1,\dots,x_{k-1})$, we get $α ∈ B'(x_1,\dots,x_{k-1})$. But then $α$ is also contained in $B'(x_2\dots,x_k) = B'(x_1,\dots,x_{k-1})$. From the definition of $B'(x_2,\dots,x_k)$, this implies that there is some $x_{k+1} > x_k$ such that $α = A(x_2,\dots,x_k,x_{k+1}) = A(x_1,x_2,\dots,x_k)$. But then $A$ is not a $k$-ary $c$-coloring function. \end{proof} To get the $Ω(\log^* n)$ lower bound, start with a $k$-ary $3$-coloring function and iterate Lemma~\ref{lemma-coloring-function-amplification} to get a $1$-ary $f(k-1)$-coloring function where $f(k)$ is the result of applying the function $2^x$ to $3$ $k-1$ times. Then $f(k-1) ≥ n$, which implies $k = Ω(\log^* n)$. \subsection{Coloring bounded-degree graphs} The $O(\log^* n)$-time $3$-coloring algorithm for out-degree $1$ digraphs can be used to get a simple $O(Δ^2 + \log^* n)$ time for $(Δ+1)$-coloring any graph with maximum degree $Δ$, using an algorithm of Panconesi and Rizzi~\cite{PanconesiR2001}. This algorithm has three steps: \begin{enumerate} \item First, partition the original graph $G$ into $Δ$ directed graphs $G_1,\dots,G_Δ$, each with maximum out-degree $1$. We can do this in $O(1)$ rounds: each process collects the ids of its neighbors, and assigns each a \concept{port number}\index{number!port} in $\Set{1,\dots,Δ}$ in increasing order of id, while also orienting each edge to point to the neighbor with larger id. Each directed graph $G_i$ then consists of all edges for which the source node assigns port number $1$. \item Next, use Cole-Vishkin (§\ref{section-Cole-Vishkin}) to $3$-color each $G_i$. \item To color the original graph $G$, start with $G'_1 = G_1$ and repeatedly merge each $G'_i$ with the next unmerged $G_{i+1}$ to get $G'_{i+1}$. The merging process consists of assigning each node a color in $[3(Δ+1)]$ by taking an ordered pair of its color in $G_{i+1}$ and its color in $G'_i$. Then for each $c ∈ \Set{Δ+2,\dots,3(Δ+1)}$, have each node with color $c$ choose the smallest color not represented among its neighbors. (This is the same color-reduction scheme used to go from six to three colors in §\ref{section-Cole-Vishkin}, except without the shifting.) This costs $O(Δ)$ rounds per merge, with $O(Δ)$ total merges, giving $Δ+1$ colors after $O(Δ^2)$ rounds. \end{enumerate} This algorithm has the advantage of simplicity, but there are faster algorithms. An algorithm of Ghaffari and Kuhn~\cite{GhaffariK2020} obtains a $(Δ+1)$-coloring of a graph with maximum degree $Δ$ in $O(\log^2 Δ \log n)$ rounds. \myChapter{Population protocols}{2020}{} \label{chapter-population-protocols} Here are four mostly-equivalent models: \begin{description} \item[Population protocols] A \index{protocol!population}\concept{population protocol}~\cite{AngluinADFP2006} consists of a collection of agents with states in some state space $Q$. At each step, the adversary picks two of the agents to interact, and both get to update their state according to a joint transition function $δ:Q×Q→Q×Q$. A \index{fairness!global}\concept{global fairness} condition requires that if some global configuration $C$ of the system occurs infinitely often, and there is a step that transforms $C$ to $C'$, then this step eventually occurs. Computation by population protocols usually consists of computing some function of the initial states of the population and propagating the output of this function to all agents. As in a self-stabilizing system, termination is not detected; instead, we hope to converge to the correct answer eventually. In some versions of the model, interactions between agents are limited by an \index{graph!interaction}{interaction graph} (only adjacent agents can interact), or are assumed to be chosen randomly instead of adversarially. These assumptions may in some cases increase the power of the model. \item[Chemical reaction networks] In a \index{network!chemical reaction} \index{reaction network!chemical} \index{chemical reaction network} (\concept{CRN} for short), we have a collection of molecules representing different \concept{species}. These molecules may undergo chemical reactions that transform one or more inputs into one or more outputs, as in this bit of classic rocketry: \begin{equation*} H_2 + O_2 → H_2 O + O \end{equation*} Computation by a chemical reaction network consists of putting some appropriate mix of molecules into a test tube, stirring it up, and hoping to learn something from the final product. Unlike population protocols, chemical reaction networks do not necessarily conserve the number of molecules in each interaction, and (in reality at least) require some source of energy to keep the reactions going. \item[Petri nets] A \index{net!Petri}\concept{Petri net}~\cite{Petri1962} is a collection of of \indexConcept{place}{places} and \indexConcept{transition (Petri net)}{transitions}, in the form of a bipartite graph, with \indexConcept{token (Petri net)}{tokens} wandering around through the places. A transition \indexConcept{fire (Petri net)}{fires} by consuming one token from each place in its in-neighborhood and adding one token to each place in its out-neighborhood, assuming there is at least one token on each place in its in-neighborhood. Various conditions are assumed on which transitions fire in which order. Petri nets were invented to model chemical reaction networks, so it's not surprising that they do so. Pretty much any result in population protocols or CRNs can be translated to Petri nets or vice versa, by the mapping: {\centering \begin{tabular}{ccc} agent & molecule & token \\ state & species & place \\ transition & reaction & transition \end{tabular} } Following a long-standing and probably unjustified American prejudice, we will not talk much about Petri nets, but there has been a fair bit of cross-pollenization between the population protocol, CRN, and Petri net literature. \item[Vector addition systems] You have a non-negative integer vector $x$. There is a set of rules $-a+b$, where $a$ and $b$ are both non-negative integer vectors, and you are allowed to replace $x$ by $x-a+b$ if $x-a≥0$. These are basically Petri nets without jargon. \end{description} Of these models, population protocols are currently the most popular in the theory of distributed computing community, with chemical reaction networks moving up fast. So we'll talk about population protocols. \section{Definition of a population protocol} Let us begin by giving a formal definition of a population protocol, following the original definition of Angluin~\etal~\cite{AngluinADFP2006}. A \index{protocol!population}\concept{population protocol} is a tuple $\Tuple{X,Y,Q,I,O,δ}$, where $X$ is the input alphabet, $Y$ is the output alphabet, $Q$ is the state space, $I:X→Q$ maps inputs to initial states, $O:Q→Y$ maps states to outputs, and $δ:Q×Q→Q×Q$ is the transition function. A \concept{population} consists of $n$ agents, taken to be the vertices of a directed graph called the \index{graph!interaction}{interaction graph}. Most of the time we will assume the interaction graph is a complete graph, but the model allows for more restrictive assumptions. A \concept{configuration} is a mapping $C$ from agents to $Q$. A \concept{transition} involves choosing two agents $x$ and $y$ such that $xy$ is an edge in the interaction graph, and updating the configuration $C$ to a new configuration $C'$ with $\Tuple{C'_x,C'_y} = δ(\Tuple{C_x,C_y})$ and $C'_z = C_z$ for all $z ∉ \Set{x,y}$. The first agent in an interaction is called the \concept{initiator} and the second agent the \concept{responder}. Note that this means that the model breaks symmetry for us. With a complete interaction graph, we can will often not bother with the identities of specific agents and just treat the configuration $C$ as a multiset of states. The main difference between population protocols and similar models is the input and output mappings, and the notion of stable computation, which gets its own section. \section{Stably computable predicates} A predicate $P$ on a vector of initial inputs is \concept{stably computable} if there exists a population protocol such that it eventually holds forever that every agent correctly outputs whether $P$ is true or false. Stably computable functions are defined similarly. One of the big early results on population protocols was an exact characterization of stably computable predicates for the complete interaction graph. We will give a sketch of this result below, after giving some examples of protocols that compute particular predicates. \subsection{Time complexity} The original population protocol did not define a notion of time, since the fairness condition allows arbitrarily many junk transitions before the system makes progress. More recent work has tended to compute time complexity by assuming random scheduling, where the pair of agents to interact is determined by choosing an edge uniformly from the interaction graph (which means uniformly from all possible pairs when the interaction graph is complete). Assuming random scheduling (and allowing for a small probability of error) greatly increases the power of population protocols. So when using this time measure we have to be careful to mention whether we are also assuming random scheduling to improve our capabilities. Most of the protocols in this section are designed to work as long as the scheduling satisfies global fairness—they don't exploit random scheduling—but we will discuss running time in the random-scheduling case as well. \subsection{Examples} These examples are mostly taken from the original paper of Angluin~\etal~\cite{AngluinADFP2006}. \subsubsection{Leader election} \label{section-population-protocol-leader-election} Most stably computable predicates can be computed as a side-effect of \indexConcept{leader election!for population protocols}{leader election}, so we'll start with a leader election protocol. The state space consists of $L$ (leader) and $F$ (follower); the input map makes every process a leader initially. Omitting transitions that have no effect, the transition relation is given by \begin{align*} L,L &→ L,F. \end{align*} It is easy to see that in any configuration with more than one leader, there exists a transition that eventually reduces the number of leaders. So global fairness says this happens eventually, which causes us to converge to a single leader after some finite number of interactions. If we assume random scheduling, the expected number of transitions to get down to one leader is exactly \begin{align*} ∑_{k=2}^{n} \frac{n(n-1)}{k(k-1)} &= n(n-1) ∑_{k=2}^{n} \frac{1}{k(k-1)} \\&= n(n-1) ∑_{k=2}^{n} \parens*{\frac{1}{k-1} - \frac{1}{k}} \\&= n(n-1) \parens*{1 - \frac{1}{n}} \\&= n^2. \end{align*} \subsubsection{Distributing the output} The usual convention in a population protocol is that we want every process to report the output. It turns out that this is equivalent to the leader reporting the output. Given a protocol $A$ with states of the form $\Tuple{\ell,x}$ where $\ell ∈ \Set{L,F}$ is the leader bit and $x$ is whatever the protocol is computing, define a new protocol $A'$ with states $\Tuple{\ell,x,y}$ where $y = O(x)$ when $\ell = L$ and $y$ is the output of the last leader the agent met when $\ell = F$. Now as soon as the leader has converged on an output, it only needs to meet each other agent once to spread it to them. This takes an additional $n H_{n-1} / 2 = O(n^2 \log n)$ interactions on average. \subsubsection{Remainder mod \texorpdfstring{$m$}{m}} \label{section-population-protocol-remainder} We can now give an example of a protocol that stably computes a function: we will count the number of agents in some special initial state $A$, modulo a constant $m$. (We can't count the exact total because the agents are finite-state.) Each agent has a state $\Tuple{\ell,x}$, where $\ell ∈ \Set{L,F}$ as in the leader election protocol, and $x ∈ ℤ_m$. The input mapping sends $A$ to $\Tuple{L,1}$ and everything else to $\Tuple{L,0}$. The non-trivial transitions are given by \begin{align*} \Tuple{L,x}, \Tuple{L,y} &→ \Tuple{L,(x + y) \bmod m}, \Tuple{F,0} \end{align*} This protocol satisfies the invariant that the sum over all agents of the second component, mod $m$, is unchanged by any transition. Since the components for any is follower is zero, this means that when we converge to a unique leader, it will contain the count of initial $A$'s mod $m$. \subsubsection{Linear threshold functions} \label{section-population-protocol-linear-threshold} Remainder mod $m$ was one of two tools in~\cite{AngluinADFP2006} that form the foundation for computing all stably computable predicates. The second computes linear threshold predicates, of the form \begin{equation} ∑ a_i x_i ≥ b, \label{eq-linear-threshold} \end{equation} where the $x_i$ are the counts of various possible inputs and the $a_i$ and $b$ are integer constants. This includes comparisons like $x_1 > x_2$ as a special case. The idea is to compute a truncated version of the left-hand side of~\eqref{eq-linear-threshold} as a side-effect of leader election. Fix some $k > \max\parens*{\abs{b}, \max_i \abs{a_i}}$. In addition to the leader bit, each agent stores an integer in the range $-k$ through $k$. The input map sends each $x_i$ to the corresponding coefficient $a_i$, and the transition rules cancel out positive and negative $a_i$, and push any remaining weight to the leader as much as possible subject to the limitation that values lie within $[-k,k]$. Formally, define a truncation function $t(x) = \max(-k, \min(k, r))$, and a remainder function $r(x) = x - t(x)$. These have the property that if $\abs{x} ≤ 2k$, then $t(x)$ and $r(x)$ both have their absolute value bounded by $k$. If we have the stronger condition $\abs{x} ≤ k$, then $t(x) = x$ and $r(x) = 0$. We can now define the transition rules: \begin{align*} \Tuple{L,x}, \Tuple{-,y} &→ \Tuple{L, t(x+y)}, \Tuple{F, r(x+y)}\\ \Tuple{F,x}, \Tuple{F,y} &→ \Tuple{F, t(x+y)}, \Tuple{F, r(x+y)} \end{align*} These have the property that the sum of the second components is preserved by all transitions. Formally, if we write $y_i$ for the second component of agent $i$, then $∑ y_i$ does not change through the execution of the protocol. When agents with positive and negative values meet, we get cancellation. This reduces the quantity $∑ \abs{y_i}$. Global fairness implies that this quantity will continue to drop until eventually all nonzero $y_i$ have the same sign. Once this occurs, and there is a unique leader, then the leader will eventually absorb as much of the total as it can. This will leave the leader with $y = \min\parens*{k, \max\parens*{-k, ∑ y_i}}$. By comparing this quantity with $b$, the leader can compute the threshold predicate. \subsection{Presburger arithmetic and semilinear sets} \index{arithmetic!Presburger} \concept{Presburger arithmetic}~\cite{Presburger1929} is the first-order theory (in the logic sense) of the natural numbers with addition, equality, $0$, and $1$. This allows expressing ideas like ``$x$ is even:'' \begin{align*} ∃y: x = y+y \intertext{or ``$x$ is greater than $y$'':} ∃z: x = y+z+1 \end{align*} but not ``$x$ is prime'' or even $x = y⋅z$.'' Presburger arithmetic has various amazing properties, including \concept{decidability}–there is an algorithm that will tell you if any statement in Presburger arithmetic is true or not (in doubly-exponential time~\cite{FischerR1998})—and \concept{quantifier elimination}—a formula using any combination of $∀$ and $∃$ quantifiers can be converted to a formula with no quantifiers, using the predicates $<$ and $≡_k$ for constant values of $k$. There is also a one-to-one correspondence between predicates in Presburger arithmetic and \index{set!semilinear} \indexConcept{semilinear set}{semilinear sets}, which are finite unions of \index{set!linear}\indexConcept{linear set}{linear sets} of the form $\Set{b + ∑ a_i x_i}$ where $b$ is a non-negative integer vector, the $a_i$ are non-negative integer coefficients, and the $x_i$ are non-negative integer vectors, and there are only finitely many terms. (We will not attempt to prove any of this.) It turns out that Presburger arithmetic (alternatively, semilinear sets) captures exactly what can and can't be stably computed by a population protocol. For example, no semilinear set contains all and only primes (because any infinite semilinear set on one variable is an arithmetic progression), and primes aren't recognizable by a population protocol. An intuitive and not entirely incorrect explanation is that in both cases we can't do multiplication because we can't do nested loops. In population protocols this is because even though we can do a single addition that turns exactly $A$ many blank tokens into $B$'s, using the rule \begin{align*} A,- &→ A',B \end{align*} we can't multiply by repeated addition, because we can't detect that the first addition step addition has ended to start the next iteration of the outer loop. Below we'll describe the correspondence between semilinear sets and stably-computable predicates. For full details see~\cite{AngluinADFP2006,AngluinAE2006semilinear}. \subsubsection{Semilinear predicates are stably computable} This part is easy. We have that any Presburger formula can be represented as a logical combination of $<$, $+$, and $≡_k$ operators. We can implement any formula of the form $∑ a_i x_i < b$, where $a_i$ and $b$ are integer constants, using the linear threshold function from §\ref{section-population-protocol-linear-threshold}. We can implement any formula of the form $∑ a_i x_i ≡_k b$ using a straightforward extension of the mod-$k$ counter from §\ref{section-population-protocol-remainder}. If we run these in parallel for each predicate in our formula, we can then apply any logical connectives to the result. For example, if we want to express the statement that ``$x$ is an odd number greater than $5$'', we have out agents compute separately $x ≡_2 1$ and $x > 5$; if the leader computes true for both of these, it assigns true to its real output. \subsubsection{Stably computable predicates are semilinear} This is the hard direction, because we have to exclude any possible algorithm for computing a non-semilinear set. The full proof is pretty involved, and can be found in~\cite{AngluinAE2006semilinear}. A survey paper of Aspnes and Ruppert~\cite{AspnesR2009} gives a simplified proof of the weaker result (modeled on an introductory argument in~\cite{AngluinAE2006semilinear}) that any stably-computable set is a finite union of \indexConcept{monoid}{monoids}. Like linear sets, monoids are of the form $\Set{b + ∑ a_i x_i}$, but the number of terms in the sum might be infinite. We won't do either of these proofs. \section{Random interactions} An alternative to assuming worst-case scheduling is to assume random scheduling: at each step, a pair of distinct agents is chosen uniformly at random to interact. This gives the population protocol substantially more power, and (with some tweaks to allow for different reactions to occur at different rates) is the standard assumption in chemical reaction networks. An example of an algorithm that exploits the assumption of random scheduling is the \concept{approximate majority} protocol of Angluin, Aspnes, and Eisenstat~\cite{AngluinAE2008majority}. This protocol starts with a mix of agents in states $x$ and $y$, and uses a third state $b$ (for blank) to allow the initial majority value to quickly take over the entire population. The non-trivial transition rules are: \begin{align*} xy &→ xb\\ yx &→ yb\\ xb &→ xx\\ bx &→ xx\\ yb &→ yy\\ by &→ yy \end{align*} If two opposite agents meet, one becomes blank, depending on which initiates the reaction (this is equivalent to flipping a coin under the random-scheduling assumption). These reactions produce a supply of blank agents, drawing equally from both sides. But when a blank agent meets a non-blank agent, it adopts the non-blank agent's state. This is more likely to be the majority state, since there are more agents to meet in the majority state. So if we consider only transitions that change the net number of $x$ agents minus $y$ agents, we get a random walk biased toward the majority value with an absorbing barrier in the state where all agents are equal. However, the rate at which these special transitions occur depends on how quickly blank agents are created, which in turn depends on the relative numbers of $x$ and $y$ agents. Analysis of the full process is difficult, but Angluin~\etal~show that with high probability all agents end up in the initial majority state in $O(n \log n)$ interactions, provided the initial majority is large enough ($Ω(\sqrt{n} \log n)$, later improved to $Ω(\sqrt{n \log n}$ by Condon~\etal~\cite{CondonHKM2019}). Curiously, a later paper by Cardelli and Csikász-Nagy~\cite{CardelliC2012} showed that the cell cycle controlling mitosis in all living organisms uses a chemical switch that looks suspiciously like the approximate majority algorithm, making this algorithm roughly three billion years old. But we can do better than this. With random scheduling, we have much more control over how a computation evolves, and this can be used to simulate (with high probability) a register machine, which in turn can be used to simulate a Turing machine. The catch is that the state of a population protocol with $n$ agents can be described using $O(\log n)$ bits, by counting the number of agents in each state. So the most we can simulate is a machine that has $O(\log n)$ space. The original population protocol paper included a simulation of an $O(\log n)$-space Turing machine, but the time overhead per operation was very bad, since most operations involved a controller agent personally adjusting the state of some other agent, which requires at least $O(n)$ interactions before the controller meets its target. A better construction was given by Angluin~\etal~\cite{AngluinAE2008fast}, under the assumption that the population starts with a single agent in a special leader state. The main technique used in this paper it to propagate a message $m$ using an epidemic protocol $mb → mm$. The time for an epidemic to spread through a population of $n$ individuals through random pairwise interactions is well-understood, and has the property that (a) the time to infect everybody is $Θ(\log n)$ with high probability, and (b) it's still $Θ(\log n)$ with high probability if we just want to infect a polynomial fraction $n^ε$ of the agents. So now the idea is that if the leader, for example, wants to test if there is a particular state $x$ in the population, it can spread a message $x?$ using an epidemic, and any agent with $x$ can respond by starting a counter-epidemic $x!$. So if there is an $x$, the leader finds out about it in $O(\log n)$ time, the time for the first epidemic to go out plus the time for the second epidemic to come back. What if there is no $x$ agent? Then the query goes out but nothing comes back. If the leader can count off $Θ(n)$ time units (with an appropriate constant, it can detect this. But it does not have enough states by itself to count to $Θ(\log n)$. The solution is to take advantage of the known spreading time for epidemics to build a \index{clock!phase}\concept{phase clock} out of epidemics. The idea here is that the leader will always be in some \concept{phase} $0\dots m-1$. Non-leader agents try to catch up with the leader by picking up on the latest rumor of the leader's phase, which is implemented formally by transitions of the form $\Tuple{x,i} \Tuple{F,j} → \Tuple{x,i} \Tuple{F,i}$ when $0 < i-j < m/2 \pmod{m}$. The leader on the other hand is a hipster and doesn't like it when everybody catches up; if it sees a follower in the same phase, it advances to the next phase to maintain its uniqueness: $\Tuple{L,i}\Tuple{F,i} → \Tuple{L,i+1} \Tuple{F,i}$. Because the current phase spreads like an epidemic, when the leader advances to $i+1$, every agent catches up in $a \log n$ time w.h.p. This means both that the leader doesn't spend too much time in $i+1$ before meeting a same-phase follower and that followers don't get too far behind. (In particular, followers don't get so far behind that they start pulling other followers forward.) But we also have that it takes at least $b \log n$ time w.h.p.~before more than $n^ε$ followers catch up. This gives at most an $n^{ε-1} \ll 1$ probability that the leader advances twice in $b \log n$ time. By making $m$ large enough, the chances that this happens enough to get all the way around the clock in less than, say $b (m/2) \log n)$ time can be made at most $n^{-c}$ for any fixed $c$. So the leader can now count of $Θ(\log n)$ time w.h.p., and in particular can use this to time any other epidemics that are propagating around in parallel with the phase clock. Angluin~\etal~use these techniques to implement various basic arithmetic operations such as addition, multiplication, division, etc., on the counts of agents in various states, which gives the register machine simulation. The simulation can fail with nonzero probability, which is necessary because otherwise it would allow implementing non-semilinear operations in the adversarial scheduling model. The assumption of an initial leader can be replaced by a leader election algorithm, but at the time of the Angluin~\etal{} paper, no leader election algorithm better than the $Θ(n)$-time fratricide protocol described §\ref{section-population-protocol-leader-election} was known, and even using this protocol requires an additional polynomial-time cleaning step before we can run the main algorithm, to be sure that there are no leftover phase clock remnants from deposed leaders to cause trouble. So the question of whether this could be done faster remained open. Hopes of finding a better leader election protocol without changing the model ended when Doty and Soloveichek~\cite{DotyS2015} proved a matching $Ω(n)$ lower bound on the expected time to convergence for any leader election algorithm in the more general model of chemical reaction networks. This results holds assuming constant states and a \concept{dense} initial population where any state that appears is represented by a constant fraction of the agents. Because of this and related lower bounds, recent work on fast population protocols has tended to assume more states. This is a fast-moving area of research, so I will omit trying to summarize the current state of the art here. There are good recent surveys of this work in~\cite{AlistarhG2018,ElsasserR2018}. \myChapter{Mobile robots}{2016}{} \label{chapter-mobile-robots} Mobile robots are a model of distributed computation where the agents (robots) are located in a plane, and have no ability to communicate except by observing each others' positions. Typical problems are to get a group of robots to gather on a single point, or more generally to arrange themselves in some specified pattern. This is complicated by the usual issues of asynchrony and failures. \section{Model} \label{section-mobile-robots-model} We will start by describing the \concept{Suzuki-Yamashita model}~\cite{SuzukiY1999}, the \concept{CORDA} model~\cite{Prencipe2001}, and some variants. We'll follow the naming conventions used by Agmon and Peleg~\cite{AgmonP2006}. Basic idea: \begin{itemize} \item We have a bunch of robots represented by points in the plane $ℝ^2$. \item Each robot executes a \concept{look-compute-move} cycle: \begin{itemize} \item Look phase: obtain snapshot of relative positions of all the other robots. \item Compute phase: pick a new point to move to. \item Move phase: move to that point. \end{itemize} \item Robots are dumb. Various possible limitations that might apply: \begin{itemize} \item \indexConcept{anonymity}{Anonymity}: any two robots that see the same view take the same action. \item \indexConcept{oblivious!mobile robots}{Oblivious}: The output of the compute phase is base \emph{only} on results of last look phase, and not on any previous observations. Robots have no memory! \item No \concept{absolute coordinates}: Translations of the space don't change the behavior of the robots. \item No \indexConcept{sense of direction!mobile robots}{sense of direction}: robots don't know which way is north. More formally, if view $v$ can be rotated to get view $v'$, then a robot that sees $v'$ will make the same move as in $v$, subject to the same rotation. \item No \indexConcept{sense of scale!mobile robots}{sense of scale}: robots don't have a consistent linear measure. If view $v$ can be scaled to get view $v'$, then a robot that sees $v'$ will move to the same point as in $v$, after applying the scaling. \item No \indexConcept{chirality}{sense of chirality}: robots can't tell counter-clockwise from clockwise. Flipping a view flips the chosen move but has no other effect. \item No ability to detect \indexConcept{multiplicity!mobile robots}{multiplicities}: the view of other robots is a set of points (rather than a multiset), so if two robots are on the same point, they look like one robot. \item \index{robot!fat}\indexConcept{fat robot}{Fat robots}: robots block the view of the robots behind them. \end{itemize} \item Adversary can interfere in various ways: \begin{itemize} \item During move phase, robot is guaranteed to either move some minimum distance $δ > 0$ or reach its target, but adversary can stop a robot after it has moved $δ$. \item Look-compute-move phases are asynchronous, and adversary can schedule robots subject to various constraints. \begin{itemize} \item \indexConcept{asynchronous!mobile robots}{Asynchronous} model (\concept{ASYNC}): The adversary can delay a robot between look and move phases, so that robots might be moving based on out-of-date information. \item \indexConcept{semi-synchronous!mobile robots}{Semi-synchronous} model (\concept{SSYNC}): Each look-compute-move cycle is an atomic action, so moves are always based on current information. The adversary may schedule more one or more robots to do their look-compute-move in each round. Also known as the \concept{ATOM} model. This was the model given by Suzuki and Yamashita~\cite{SuzukiY1999}. \item \indexConcept{fully synchronous!mobile robots}{Fully synchronous} model (\concept{FSYNC}): Like SSYNC, but every robot is active in every round. \end{itemize} \item But we do have fairness: the adversary must activate each (non-faulty) robot infinitely often. \end{itemize} \item We may also have faults: \begin{itemize} \item \indexConcept{Byzantine fault!mobile robots}{Byzantine faults}: Byzantine robots can move anywhere they like. \item \indexConcept{Crash fault!mobile robots}{Crash faults}: crashed robots don't move even when they are supposed to. \end{itemize} \end{itemize} The simplest goal is to gather the non-faulty robots together on a single point despite all these possible disasters. Other goals might be formation of particular shapes. An additional source of variation here is whether we want exact gathering (every robot eventually gets to exactly where it should be) or just convergence (over time, robots get closer and closer to where they should be). Below, we will mostly be looking at the semi-synchronous model, with the assumption that robots are anonymous and oblivious, and have no absolute coordinates, sense of direction, or sense of scale. However, we will generally let robots detect multiplicity. Depending on the results we are describing, we may or may not assume chirality. \section{Two robots, no faults} Suzuki and Yamashita~\cite{SuzukiY1999} showed that it's impossible to get two deterministic, oblivious robots to the same point in the semi-synchronous model assuming no absolute coordinates and no sense of direction, although they can converge. The convergence algorithm is simple: have each robot move to the midpoint of the two robots whenever it is activated. This always reduces the distance between the robots by $\min(δ, d/2)$. But it doesn't solve gathering if only one robot moves at a time. This turns out to be true in general~\cite[Theorem 3.1]{SuzukiY1999}. The idea is this: Suppose we have an oblivious algorithm for gathering. Consider two robots at distinct points $p$ and $q$, and suppose that after one round they both move to $r$. There are two cases: \begin{enumerate} \item Both robots move. By symmetry, $r = (p+q)/2$. So now construct a different execution in which only one robot moves (say, the one that moved least recently, to avoid running into fairness). \item Only one robot moves. Without loss of generality, suppose the robot at $p$ moves to $q$. Then there is a different execution where $q$ also moves to $p$ and the robots switch places. \end{enumerate} In either case the distance between the two robots in the modified execution is at least half the original distance. In particular, it's not zero. Note that this works even if the adversary can't stop a robot in mid-move. Both obliviousness and the lack of coordinates and sense of direction are necessary. If the robots are not oblivious, then they can try moving to the midpoint, and if only one of them moves then it stays put until the other one catches up. If the robots have absolute coordinates or a sense of direction, then we can deterministically choose one of the two initial positions as the ultimate gathering point (say, the northmost position, or the westmost position if both are equally far north). But if we don't have any of this we are in trouble. Like the 3-process impossibility result for Byzantine agreement, the 2-process impossibility result for robot gathering extends to any even number of robots where half of them are on one point and half on the other. Anonymity then means that each group of robots acts the same way a single robot would if we activate them all together. Later work (e.g.,~\cite{BouzidDT2012}) refers to this as \indexConcept{bivalent!mobile robots}{bivalent} configuration, and it turns out to be the only initial configuration for which it is not possible to solve gathering absent Byzantine faults. \section{Three robots} Agmon and Peleg~\cite{AgmonP2006} show that with three robots, it is possible to solve gathering in the SSYNC model with one crash fault but not with one Byzantine fault. We'll start with the crash-fault algorithm. Given a view $v = \Set{p_1,p_2,p_3}$, this sends each robot to the ``goal'' point $p_G$ determined according to the following rules: \begin{enumerate} \item If $v$ has a point $p$ with more than one robot, set $p_G = p$. \item If $p_1,p_2,$ and $p_3$ are collinear, set $p_G$ to the middle point. \item If $p_1,p_2,$ and $p_3$ form an obtuse triangle (one with a corner whose angle is $≥π/2$, set $p_G$ to the obtuse corner. \item If $p_1,p_2,$ and $p_3$ form an acute triangle (one with no angles $≥π/2$), set $p_G$ to the intersection of the angle bisectors. \end{enumerate} Here is a sketch of why this works. For the real proof see~\cite{AgmonP2006}. \begin{enumerate} \item If we are in a configuration with multiplicity $>1$, any non-faulty robot not on the multiplicity point eventually gets there. \item If we are in a collinear configuration, we stay collinear until eventually one of the outer robots gets to the middle point, giving a configuration with multiplicity $>1$. \item If we are in an obtuse-triangle configuration, we stay in an obtuse-triangle configuration until eventually one of the acute-corner robots gets to the obtuse corner, again giving a configuration with multiplicity $>1$. \item If we are in an acute-triangle configuration, then a somewhat messy geometric argument shows that if at least one robot moves at least $δ$ toward the intersection of the angle bisectors, then the circumference of the triangle drops by $cδ$ for some constant $c>0$. This eventually leads either to the obtuse-triangle case (if we happen to open up one of the angles enough) or the multiplicity $>1$ case (if the circumference drops to zero). \end{enumerate} However, once we have a Byzantine fault, this blows up. This is shown by considering a lot of cases, and giving a strategy for the adversary and the Byzantine robot to cooperate to prevent the other two robots from gathering in each case. This applies to both algorithms for gathering and convergence: the bad guys can arrange so that the algorithm eventually makes no progress at all. The first trick is to observe that any working algorithm for the $n=3,f=1$ case must be \concept{hyperactive}: every robot attempts to move in every configuration with multiplicity $1$. If not, the adversary can (a) activate the non-moving robot (which has no effect); (b) stall the moving non-faulty robot if any, and (c) move the Byzantine robot to a symmetric position relative to the first two so that the non-moving robot become the moving robot in the next round and vice versa. This gives an infinite execution with no progress. The second trick is to observe that if we can ever reach a configuration where two robots move in a way that places them further away from each other (a \concept{diverging} configuration), then we can keep those two robots at the same or greater distance forever. This depends on the adversary being able to stop a robot in the middle of its move, which in turn depends on the robot moving at least $δ$ before the adversary stops it. But if the robots have no sense of scale, then we can scale the initial configuration so that this is not a problem. Here is the actual argument: Suppose that from positions $p_0$ and $q_0$ there is a step in which the non-faulty robots move to $p_1$ and $q_1$ with $d(p_1,q_1) > d(p,q)$. Starting from $p_1$ and $q_1$, run both robots until they are heading for states $p_2$ and $q_2$ with $d(p_2,q_2) ≤ d(p_0,q_0)$. By continuity, somewhere along the paths $p_1 p_2$ and $q_1 q_2$ there are intermediate points $p'_2$ and $q'_2$ with $d(p'_2,q'_2) = d(p_0,q_0)$. Stop the robots at these points, move the Byzantine robot $r$ to the appropriate location to make everything look like the initial $p_0,q_0$ configuration, and we are back where we started. So now we know that (a) we have to move every robot, and (b) we can't move any two robots away from each other. In the full version of the proof, this is used to show by an extensive case analysis that as long as we start with no two robots on the same point, this always either makes no progress or reaches three distinct points on the same line. We'll skip over this part and just argue that once we have three hyperactive collinear robots, that two of them are diverging. This will show that in the worst case we can't win, because the adversary could start everybody out on the same line, but it is not quite as general as the full result of Agmon and Peleg. Suppose the robots are at positions $p_1 < p_2 < p_3$. Then $p_2$ has to move either left or right, which means moving away from either $p_3$ or $p_1$. In either case we have a diverging pair (because the adversary can elect not to move the robots on the end). So now the divergence argument goes through, and we are done. \section{Many robots, with crash failures} It turns out that we can solve the gathering problem even if we have many robots and some of them can crash, as long as the robots do not start on the same line. The reason for this is that any set of non-collinear points $x_1, \dots, x_n$ in $ℝ^2$ has a unique \index{median!geometric}\concept{geometric median}, defined as the point $m$ that minimizes $∑_{i=1}^n d(m,x_i)$, and the geometric median is unchanged if we move any of the points towards it. So the algorithm is for all the robots to walk toward this point. It doesn't matter if some of the robots don't move, or don't move at the same speed, because the median doesn't change. Eventually, all the non-faulty processes will reach it. There is one drawback to this approach, which is that even though very good approximation algorithms exist~\cite{CohenLMPS2016}, the geometric median appears to be difficult to compute exactly. We could declare that we are willing to assume that our robots have infinite computational power, but this is not an easy assumption to justify in this case. An alternative is to build an algorithm that marches toward the geometric median in certain cases where it is straightforward to compute, and does something more sophisticated otherwise. This approach was taken by Bramas and Tixeuil~\cite{BramasT2015}, who also supplied the idea of using the geometric median in the first place. We will not go into detail about their algorithm. \myChapter{Beeping}{2016}{} \label{chapter-beeping} The (discrete) \index{model!beeping}\concept{beeping model} was introduced by Cornejo and Kuhn~\cite{CornejoK2010} to study what can be computed in a wireless network where communication is limited to nothing but carrier sensing. According to the authors, the model is inspired in part by some earlier work on specific algorithms based on carrier sensing due to Scheideler~\etal~\cite{ScheidelerRS2008} and Flury and Wattenhofer~\cite{FluryW2010}. It has in turn spawned a significant literature, not only in its original domain of wireless networking, but also in analysis of biological systems, which often rely on very limited signaling mechanisms. Some of this work extends or adjusts the capabilities of the processes in various ways, but the essential idea of tightly limited communication remains. In its simplest form, the model consists of synchronous processes organized in an undirected graph. Processes wake up at arbitrary rounds chosen by the adversary, and do not know which round they are in except by counting the number of rounds since they woke. Once awake, a process chooses in each round to either send (beep) or listen. A process that sends learns nothing in that round. A process that listens learns whether any of its neighbors sends, but not how many or which one(s). From a practical perspective, the justification for the model is that carrier sensing is cheap and widely available in radio networks. From a theoretical perspective, the idea is to make the communication mechanism as restrictive as possible while still allowing some sort of distributed computing. The assumption of synchrony both adds to and limits the power of the model. With no synchrony at all, it's difficult to see how to communicate anything with beeps, since each process will just see either a finite or infinite sequence of beeps with not much correlation to its own actions. With continuous time, subtle changes in timing can be used to transmit arbitrarily detailed information. So the assumption of a small number of synchronous rounds is a compromise between these two extremes. The assumption that processes wake at different times and have no common sense of time prevents synchronization on rounds, for example by reserving certain rounds for beeps by processes with particular ids. It is up to the protocol to work around these limitations. \section{Interval coloring} \label{section-interval-coloring} One way to get around the problem of not having a common global clock is to solve \index{coloring!interval} \concept{interval coloring}, the main problem considered by Cornejo and Kuhn. This is related to TDMA multiplexing in cell phone networks, and involves partitioning a repeating interval of $T$ rounds in a network with maximum degree $Δ$ into subintervals of length $Ω(T/Δ)$ such that each process is assigned a subinterval and no two adjacent processes are assigned overlapping subintervals. The idea is that these intervals can then be used to decide when each process is allowed to use its main radio to communicate.\footnote{We may really want \index{coloring!2-hop} \concept{2-hop coloring} here, where no two of my neighbors get the same color, because this is what (a) allows me to tell my neighbors apart, and (b) allows my neighbors not to interfere with each other, but that is a subject for later papers (see, for example, \cite{MetivierRZ2015}.} Cornejo and Kuhn give an algorithm for interval coloring that assigned a subinterval of length $Ω(T/Δ)$ to each process assuming that the size of the interval $T$ is known to all processes and that $T$ is at least a constant multiple of $Δ$. However, the processes do not know anything about the structure of the graph, and in particular do not know $Δ$. This requires each process to get an estimate of the size of its neighborhood (so that it knows how large a subinterval to try to acquire) and to have a mechanism for collision detection that keeps it from grabbing an interval that overlaps with a neighbor's interval. The process is complicated by the fact that my length-$T$ intervals and your length-$T$ intervals may be offset from each other, and that I can't detect that you are beeping if you and I are beeping at the same time. To simplify things a bit, the presentation below will assume that the graph is regular, so that $d(v)$ equals the maximum degree $Δ$ for all nodes in the graph. The paper~\cite{CornejoK2010} gives an analysis that does not need this assumption. We'll also wave our hands around a lot instead of doing actual algebra in many places. \subsection{Estimating the degree} The basic idea is to have each process beep once in every $T$ consecutive slots. Each process divides time into \indexConcept{period}{periods} of length $T$, starting when it wakes up. Because processes wake up at different times, my period might overlap with up to two of yours. This means that if $S$ is the set of times during my period where I hear beeps, then $S$ includes at most two beeps per process, so $\card{S}$ is at most twice my actual degree. This gives an upper bound on $d(v)$, and indeed each process will just use the maximum number of beeps it heard in the last period as the basis for its estimate of $d(v)$. For the lower bound side, we want to argue that if processes choose slots at random in a way that is more likely to avoid collisions than create them, and there are enough slots, then we expect to get few enough collisions that $\card{S}$ is also $Ω(Δ)$. The details of this depend on the mechanism for choosing slots, but if we imagine slots are chosen uniformly, then $\Exp{\card{S}} ≥ Δ(1-Δ/T)$, which is $Ω(Δ)$ under our assumption that $T ≥ cΔ$ for some sufficiently large $c$. We can compensate by the error by inserting a fudge factor $η$, chosen so that $(1/η) \card{S}$ is very likely to be an upper bound on the degree. \subsection{Picking slots} Each process will try to grab a subinterval of size $b = η \frac{T}{\card{S} + 1}$, where $η$ is the fudge factor mentioned above. If it has not already picked a position $p$, then it chooses one uniformly at random from the set of all positions $p$ such that $S[p-b-2, p+b+1]$ from the most recent period includes no beeps. Because this selection criterion knocks out up to $(2b+4) \card{S}$ possible choices, it does tend to concentrate uncolored processes on a smaller range of positions than a uniform pick from the entire interval, increasing the likelihood of collisions. But we can choose $η$ to make $2(b+4) \card{S} = 2ηT \frac{\card{S}}{\card{S}+1}$ a small enough fraction of $T$ that this is not a problem. \subsection{Detecting collisions} The basic idea for detecting a collision is that I will abandon my color $p$ if I hear any beeps in $[p-b-2,p+b+1]$ during the next period. This works great as long as nobody chooses exactly the same $p$ as me. To avoid this, each process flips a coin and beeps at either $p$ or $p+1$. So even if I choose the same slot as one or more of my neighbors, there is a $1/2$ chance per period that I detect this and pick a new color next time around. What this means is that in each round (a) I have a constant probability of getting a good estimate of my degree (which means I set $b$ correctly); (b) I have a constant probability of detecting a collision with a neighbor if there is one (which means I pick a new position if I have to); and (c) I have a constant probability that if I pick a new position it is a good one. If we repeat all these constant-probability wins for $O(\log n)$ periods, then all $n$ processes win, and we are done. \section{Maximal independent set} A high-impact early result in the beeping model was a paper by Afek~\etal.~\cite{AfekABHBB2011} that showed that a biological mechanism used in fruit-fly sensory organ development to choose a subset of cells that are not too close to each other can be viewed as an implementation of maximal independent set using beeps. As a distributed algorithm, this algorithm is not so good, so instead we will talk about a follow-up paper~\cite{AfekABCHK2011} by some of the same authors on more effective beeping algorithms for MIS. Recall that a subset of the vertices of a graph is \index{independent set} \indexConcept{set!indepedent}{indepedent} if no two vertices in the set are adjacent. A \index{independent set!maximal} \index{set!maximal indepedent} \concept{maximal independent set} (\concept{MIS}) is an independent set of vertices that can't be increased without including adjacent vertices. Equivalently, it's an independent set where every non-member is adjacent to some member. Afek~\etal{} give a couple of algorithms for beeping MIS that require either special knowledge of the graph or extensions to the beeping model. The justification for this is a lower bound, which they also give, that shows that without any knowledge of the graph, computing an MIS in the standard beeping model takes $Ω(\sqrt{n/\log n})$ time with constant probaiblity. We'll describe the lower bound and then show how to compute MIS in $O(\log^3 n)$ time given a polynomial upper bound on $n$. \subsection{Lower bound} \label{section-beeping-MIS-lower-bound} For the lower bound, the idea is to exploit the fact that the adversary can wake up nodes over time. To avoid allowing the adversary to delay the algorithm from finishing indefinitely by just not waking up some nodes for a while, the running time is computed as the maximum time from when any particular node $p$ wakes up to when $p$ converges to being in the MIS or not. The cornerstone of the proof is the observation that if a process doesn't know the size of the graph, then it has to decide whether to beep or not within a constant number of rounds. Specifically, for any fixed sequence of beeps $b_0, b_1, \dots$, where $b_i$ is an indicator variable for whether the process hears a beep in round $i$ after it wakes up, either the process never beeps or there are constant $\ell$ and $p$ such that the process beeps in round $\ell$ with probability $p$. This follows because if the process is ever going to beep, there is some first round $\ell$ where it might beep, and the probability that it does so is constant because it depends only on the algorithm and the sequence $b$, and not on $n$. If an algorithm that hears only silence remains silent, then nobody ever beeps, and nobody learns anything about the graph. Without knowing anything, it's impossible to correctly compute an MIS (consider a graph with only two nodes that might or might not have an edge between them). This means that in any working algorithm, there is some round $\ell$ and probability $p$ such that each process beeps with probability $p$ after $\ell$ rounds of silence. We can now beep the heck out of everybody by assembling groups of $Θ(\frac{1}{p}\log n)$ processes and waking up each one $\ell$ rounds before we want them to deliver their beeps. But we need to be a little bit careful to keep the graph from being so connected that the algorithm finds an MIS despite this. There are two cases, depending on what a process that hears only beeps does: \begin{enumerate} \item If a process that hears only beeps stays silent forever, then we build a graph with $k-1$ cliques $C_1,\dots,C_{k-1}$ of size $Θ(\frac{k}{p} \log n)$ each, and a set of $k$ cliques $U_1,\dots,U_k$ of size $Θ(\log n)$ each. Here $k \gg \ell$ is a placeholder that will be filled in later (foreshadowing: it's the biggest value that doesn't give us more than $n$ processes). Each $C_i$ clique is further partitioned into subcliques $C_{i1},\dots,C_{ik}$ of size $Θ(\frac{1}{p}\log n)$ each. Each $C_{ij}$ is attached to $U_j$ by a complete bipartite graph. We wake up each clique $C_i$ in round $i$, and wake up all the $U$ cliques in round $\ell$. We can prove by induction on rounds that with high probability, at least one process in each $C_{ij}$ beeps in round $i+\ell$, which means that every process in every $U_i$ hears a beep in the first $k-1$ rounds that it is awake, and remains silent, causing the later $C$ cliques to continue to beep. Because each $C_i$ is a clique, each contains at most one element of the $MIS$, and so between them they contain at most $k-1$ elements of the MIS. But there are $k$ $U$ cliques, so one of them is not adjacent to any MIS element in a $C$ clique. This means that one of the $U_j$ must contain an MIS element. So now we ask when this extra $U_j$ picks an MIS element. If it's in the first $k-1$ rounds after it wakes up, then all elements have seen the same history, so if any of them attempt to join the MIS then all of them do with independent constant probability each. This implies that we can't converge to the MIS until at least $k$ rounds. Now we pick $k$ to be as large as possible so that the total number of processes $Θ(k^2 \log n) = n$. This gives $k=Ω(\sqrt{n/\log n})$ as claimed. \item If a process starts beeping with probability $p'$ after hearing beeps for $m$ rounds, then we can't apply the silent-beeper strategy because the $C$ cliques will stop hearing silence. Instead, we replace the $C$ cliques with new cliques $S_1,\dots,S_{m-1}$ of size $Θ(\frac{1}{p} \log n)$ each. We start the process by having the $S$ cliques shout at the $U$ cliques for the first $m-1$ rounds. After this, we can start having the $U$ cliques shout at each other: each clique $U_j$ is connected to $q$ earlier cliques, consisting of up to $q$ $U_{j'}$ for $j < j$ and enough $S_i$ to fill out the remainder. We now argue that if a process that hears only beeps chooses to join the MIS with constant probability after $q$ rounds, then every $U$ clique gets at least two processes joining with high probability, which is trouble. Alternatively, if no process in a $U$ clique tries to join the MIS for at least $q$ rounds, then for $q = O(n / \log n)$, there are $U$ cliques that are connected only to other $U$ cliques, which again means we don't get an MIS. So in this case we get a lower bound of $Ω(n/\log n)$ on the time for each node to converge. \end{enumerate} The lower bound in the paper is actually a bit stronger than this, since it allows the processes to send more detailed messages than beeps as long as there are no collisions. Reducing this back to beeping means tuning the constants so we get at least two messages out of every clique. \subsection{Upper bound with known bound on \texorpdfstring{$n$}{n}} \label{section-beeping-MIS-upper-bound} Algorithm~\ref{alg-beeping-MIS}~\cite{AfekABCHK2011} converges to a maximal independent set in $O(\log^2 N \log n)$ rounds, from any initial state, given an upper bound $N$ on the number of processes $n$. \begin{algorithm} Leave MIS and restart the algorithm here upon hearing a beep\; \For{$c \lg^2 N$ rounds}{listen\;} \For{$i ← 1$ \KwTo $\lg N$}{ \For{$c \lg N$ rounds}{ \eWithProbability{$\frac{2^i}{8N}$}{ beep\; }{ listen\; } } } Join MIS\; \While{I don't hear any beeps}{ \eWithProbability{$\frac{1}{2}$}{ beep\; listen\; }{ listen\; beep; } } \caption{Beeping a maximal independent set (from \cite{AfekABCHK2011}} \label{alg-beeping-MIS} \end{algorithm} The proof that this works is a bit involved, so if you want to see all the details, you should look at the paper. The intuition runs like this: \begin{enumerate} \item At least one of any two adjacent processes that both think they are in the MIS will eventually notice the other during the final phase, causing it to restart. \item If I start at the beginning of the protocol, and I have a neighbor already in the MIS, then I will hear them during my initial listening phase and restart. \item If two adjacent nodes both execute the middle phase of increasing-probability beeps, then one of them will go through a phase where it listens with probability at least $1/2$ while the other beeps with probability at least $1/2$ (note that this might not be the same phase for both, because the nodes might not start at the same time). This gives at least a $1/4$ chance per round that the likely listener drops out, for at least a $1-n^{-c/2}$ chance that it drops out during the $c \lg n$ rounds that it listens with this probability, assuming its neighbor does not drop out. This means that by tuning $c$ large enough, we can make it highly improbable that any pair of neighbors both enter the MIS (and if they do, eventually at least one drops out). So we eventually get a set that is independent, but maybe not maximal. \item The hard part: After $O(\log^2 N \log n)$ rounds, it holds with high probability that every node is either in the MIS or has a neighbor in the MIS. This will give us that the alleged MIS is in fact maximal. The bad case for termination is when some node $u$ hears a neighbor $v$ that is then knocked out by one of its neighbors $w$. So now $u$ is not in the MIS, but neither is its (possibly only) neighbor $v$. The paper gives a rather detailed argument that this can't happen too often, which we will not attempt to reproduce here. The basic idea is that if one of $v$'s neighbors were going to knock $v$ shortly after $v$ first beeps, then the sum of the probabilities of those neighbors beeping must be pretty high (because at least one of them has to be beeping instead of listening when $v$ beeps). But they don't increase their beeping probabilities very fast, so if this is the case, then with high probability one of them would have beeped in the previous $c \log N$ rounds before $v$ does. So the most likely scenario is that $v$ knocks out $u$ and knocks out the rest of its neighbors at the same time, causing it to enter the MIS and remain there forever. This doesn't happen always, so we might have to have some processes go through the whole $O(\log^2 N)$ initial rounds of the algorithm more than once before the MIS converges. But $O(\log n)$ attempts turn out to be enough to make it work in the end. \end{enumerate} \part*{Appendix} \phantomsection \addcontentsline{toc}{part}{Appendix}
\section{Introduction} In this communication, we propose an algorithm that enables us to analytically construct the infinite sequence of transitions between phyllotactic states of repulsive particles confined to the {\em surface} of a cylinder. We build upon research on the close-packing of spheres {\em inside} cylindrical tubes \cite{lohr2010,mughal2011,mughal2017,erickson1973} and disks in narrow channels \cite{godfrey2014,kofke1993}, minimum energy structures of nano-particles in carbon nanotubes \cite{khlobystov2004,liang2014,yamazaki2008}, and the arrangement of some areoles on cacti. All of these systems share the common mathematical description of phyllotaxis. \begin{figure} \centering \includegraphics[width=8.6cm]{3dcylinder.eps}\\ \vspace{0.15cm} \includegraphics[width=8.6cm]{2dcylinder.eps} \caption{(Color online) (a) Three-dimensional rendering of a \([3,2,1]\) ground state on a cylindrical segment when \(c=3\) and \(\rho_1=3\). (b) The same state is projected into two dimensions where we see the origin of the phyllotactic notation. The periodicity vector, \(\mathbf{V}=\mathbf{\hat{y}}c=m\mathbf{a}+n\mathbf{b}\), has a length equal to the circumference and is a combination of lattice vectors \cite{mughal2013}. The thick horizontal lines represent the periodic boundary condition. In this example, \(\mathbf{V}=3\mathbf{a}+2\mathbf{b}\).} \label{fig:examples} \end{figure} Phyllotaxis is a biological classification used to described the pattern formation of leaves on plant stems \cite{airy1872}. The phyllotactic notation treats the cylindrical stem as an ``unravelled'' two-dimensional structure with a triangular lattice (formed by two lattice vectors) with node sites corresponding to petiole (stalk) locations \cite{mughal2013}. This can then be described as a set of N chains formed by following \(m\) and \(n\) multiples of the two lattice vectors to wrap once round the cylinder to the original node. The notation is expressed as \([m+n,m,n]\) or \([m,n,m-n]\), where \(m,n\in\mathbb{N}\). We distinguish these two representations because \(m\) and \(n\) generate one of the two phyllotactic structures depending on the system geometry and density of particles. Optimal packing of spheres in cylinders and hard disks in periodic geometries are purely geometric problems. In three dimensions, shell-like structures of surface or core spheres form and are well described by phyllotaxis \cite{fu2016}. Similarly, hard disks form phyllotactic structures because of the periodicity vector defined in Fig. \ref{fig:examples}. The ground states of these systems can include helical grain boundaries (line-slips) \cite{nelson2016}. Line-slips can appear due to geometrical constraints which are not present in our soft-matter-type potential. Related work \cite{piacente2004} on parabolic confinement demonstrates the number of rows of repulsive particles that form become dependent on the background potential and interparticle interactions. Transitions between the number of rows of parabolically confined particles follow similar trends to the helical row transitions that we report despite the differing boundary conditions. Interactions may be a function of the three-dimensional distance between particles \cite{oguz2011}. Alternatively, enforcing periodic boundary conditions in one direction causes interactions to depend on the arc lengths on the surface of the cylinder. Our study is the latter choice, although our results show qualitative similarity for both interaction distances. We begin by numerically determining the energetics of the ground state lattices close to the structural transition points. The analysis leads to the conjecture of a scale invariant, \(\alpha=c^2\rho_2\), where \(c\) is the circumference of the cylinder and \(\rho_2\) is two-dimensional particle density. The ground state is exclusively determined by \(\alpha\) - and this is verified by our numerical results. \section{System} We model the cylinder as a two-dimensional planar system of repulsive particles with a periodic boundary condition imposed in the circumferential (\(y\)) direction. This model has been used previously for studying particle interactions on cylinders \cite{amir2013}. In the numerical simulations, the length of the cylinder is set to be much greater than the circumference, \(c\), to approximate an infinitely long cylinder by imposing an additional periodic boundary condition in the axial (\(x\)) direction, modelling the cylinder as a torus. We study the bulk behaviour of the numerical system to make phenomenological inferences in our analytical model which assumes an infinitely long cylinder. Structural ground states that form in the bulk when \(L\gtrsim10c\) are well-explained in the analysis. This is a zero temperature system. To establish that the behaviour is not special to a particular interaction potential, we have worked with both a modified Bessel-function of the second kind, \(K_0(r/\lambda)\), and the Yukawa-potential, \(\exp(-\kappa r)/r\), where \(r\) denotes particle separation. These potentials are representative of two-dimensional soft matter system namely vortices in superconductors and Wigner Crystals. Qualitative similarities imply a generality to our results. Numerical results in this letter set \(\kappa=1\) and \(\lambda=1\) (arbitrary units). \section{Initial numerical results} We use a Metropolis Prescription of the Monte Carlo algorithm to anneal the system to zero temperature. Circumference and linear density, \(\rho_1\) (number of particles per horizontal length along the cylinder), are varied and an initial phase diagram is generated. The linear density is appropriate since the two-dimensional density can be scaled out using \(\rho_2=\rho_1/c\). Figure \ref{fig:examples} is a typical observed state. Initial results indicate that the bulk of the system forms an isosceles (or equilateral in special cases) triangular lattice structure. The lattice is regular and unit cell sizes remain constant. Because the system is numerically finite, commensurability effects can cause highly localised grain boundaries or lattice defects to form. This is due to helically defined states being unable to align correctly with themselves, so a discontinuity forms. However, the bulk of the system remains homogeneous which is where we derive our phenomenology. Simulating between \(0.5\le c\le 5\) and \(0.5 \le \rho_1\le5\) with a resolution of \(0.1\times0.1\) shows that transition lines between states take the form \(c=\alpha_T/\rho_1\), where \(\alpha_T\) is a number to be determined for each transition. Figure \ref{fig:phasespace} shows the phase diagram generated by our subsequent analysis, which is qualitatively similar to these initial results. \begin{figure} \centering \includegraphics[width=8.6cm]{sampling.eps} \caption{(Color online) Energy curves for the Bessel function potential. Transitions are indicated by thick vertical lines for clarity. Each state is labelled in accordance to the phyllotactic notation (above) and the indices from the system model (below). When compared with the Yukawa potential, most transitions lines are nearly identical (the energy values are different, but appear to map to one another). The major differences with the Yukawa potential are shown in thick dashed red for the transitions: \([3,2,1]\) \((m=2,n=1)\rightarrow [3,2,1]\) \((m=3,n=2)\) and \([4,3,1]\) \((m=3,n=1) \rightarrow [4,3,1]\) \((m=4,n=3)\). The thin gray lines show the energies of candidate states not in the ground state. The dotted transition line at \(\alpha=2\) shows a `relabelling' transition which is discussed later.} \label{fig:sampling} \end{figure} \section{Phenomenological model} The three key observations from the numerical results we can build a phenomenological model with are: \(\bullet\) constant unit cell size, \(\bullet\) the periodicity of the lattice in the vertical direction, \(\bullet\) and an isosceles lattice.\\ We combine these features to create a phenomenological model in terms of the lattice vectors. TABLE I. For a regular isosceles lattice under periodic confinement in the \(y\) direction, the lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) are constrained as below, \begin{center} \begin{tabular}{|c|c|} \hline \textbf{Constraint} & \textbf{Physical Reason}\\ \hline \(\mathbf{\hat{z}}\cdot(\mathbf{b}\times\mathbf{a})=c/\rho_1\) & Constant unit cell size\\ \hline \(m\mathbf{a}+n\mathbf{b}=\mathbf{\hat{y}}c\) & Periodicity vector\\ \hline \(|\mathbf{a}|=|\mathbf{b}|\) & Isosceles triangular lattice\\ \hline \end{tabular} \end{center} Without loss of generality, the \(z-\)components of vectors \(\mathbf{a}\) and \(\mathbf{b}\) are set to zero. The constant unit cell size is defined using the linear density (usually \(1/\rho_2\)). The periodicity means an integer (\(m\) and \(n\)) vector sum of \(\mathbf{a}\) and \(\mathbf{b}\) must arrive at the periodicity vector, \(\mathbf{\hat{y}}c\), defined in Fig. \ref{fig:examples}. Having two vector lengths equal forms an isosceles lattice. Solving for \(\mathbf{a}\) and \(\mathbf{b}\): \begin{align} \mathbf{a}&=\frac{1}{\rho_1}\left(\begin{array}{c} -n \\ \frac{mc\rho_1-n\sqrt{c^2\rho_1^2-p^2}}{p}\end{array} \right)\\ \mathbf{b}&=\frac{1}{\rho_1}\left(\begin{array}{c} m \\ \frac{-nc\rho_1+m\sqrt{c^2\rho_1^2-p^2}}{p}\end{array} \right), \end{align} where \(p=m^2-n^2\). Although there are multiple solutions, they generate the lattices which are reflected on the \(x\) axis which correspond to degenerate energies and are not considered further. Note the factor of \(1/\rho_1\) and \(c\rho_1=\alpha\), where \(\alpha\) is a continuous variable. For any given value of \(\alpha\), the angles between lattice vectors are conserved, since \(\mathbf{a}\cdot\mathbf{b}/|\mathbf{a}||\mathbf{b}|\) only depends on \(\alpha\), and the absolute scale of the lattice is thus set by \(1/\rho_1\). Furthermore, the numerical transitions are consistent with \(\alpha_T=c\rho_1\) (specific values of \(\alpha\) that match up to transition curves). For example, at the \((m=2,n=2)\rightarrow (m=2,n=1)\) transition, we construct a nonlinear model of the form \(\rho_1 = \alpha/c\) which fits with \(\alpha = 6.197\) with an R-squared value of \(0.999998\). Note for this transition, the exact value of \(\alpha=8\sqrt{3/5}\simeq 6.19677\). Fitting the curves as inverse functions, we search along the line \(c=\rho_1\) and cross each transition point once (we set \(c=\rho_1=\sqrt{\alpha}\), with dimensional constants absorbed by \(\lambda\) or \(\kappa\)). At more extreme scalings, one would expect this method to break down as the details of the interactions will cause higher order effects. We then express the lattice vectors as: \begin{align} \mathbf{a}&=\frac{1}{\sqrt{\alpha}}\left(\begin{array}{c} -n \\ \frac{m\alpha-n\sqrt{\alpha^2-p^2}}{p}\end{array} \right)\\ \mathbf{b}&=\frac{1}{\sqrt{\alpha}}\left(\begin{array}{c} m \\ \frac{-n\alpha+m\sqrt{\alpha^2-p^2}}{p}\end{array} \right). \end{align} For \(\lim_{m\rightarrow n}\): \begin{align} \mathbf{a}=\left(\begin{array}{c} -m/\sqrt{\alpha} \\ \sqrt{\alpha}/2m\end{array} \right) \qquad \mathbf{b}=\left(\begin{array}{c} m/\sqrt{\alpha} \\ \ \sqrt{\alpha}/2m\end{array} \right). \end{align} Three primitive lattice vectors are needed for phyllotactic notation. Vectors \(\mathbf{a}\) and \(\mathbf{b}\) are primitive, the third is \(\mathbf{c^-}=\mathbf{a}-\mathbf{b}\) or \(\mathbf{c^+}=\mathbf{a}+\mathbf{b}\). \(|\mathbf{c^-}|=|\mathbf{c^+}|\) corresponds to a square lattice. This is only ever the ground state when \((m=1,n=1)\) for \(\alpha=2\), or \(\alpha_\square=m^2+n^2\). When \(\alpha<\alpha_\square\), \(\mathbf{c^+}\) is primitive and when \(\alpha>\alpha_\square\), \(\mathbf{c^-}\) is primitive. Given the primitive vectors, the accompanying phyllotactic description is \([m+n,m,n]\) when \(\alpha>\alpha_\square\) and \([m,n,m-n]\) when \(\alpha<\alpha_\square\). We use this notation alongside \((m,n)\) for clarity between our original constraints and the phyllotactic nature of the problem. We calculate the energies generated by a set of \(m\) and \(n\) for a particular value of \(\alpha\) to find the ground state. In Appendix \ref{sec:appA}, we show the maximum value of \(m\) needed to capture the lowest energy behaviour is \(\lfloor\sqrt{2\alpha_\text{max}}/\sqrt[4]{3}\rfloor\). Where \(\alpha_\text{max}\) is the maximum value of \(\alpha\) we search with. Figure \ref{fig:sampling} shows the ground states found for \(0<\alpha<25\). By numerically searching for ground states and transitions, we are able to categorise transitions and locate degenerate points. \section{Analysis of the phenomenological model} To explore the qualitative generality of our results we compare the numerical results for the Bessel-function and the Yukawa-potential highlighted in Fig. \ref{fig:sampling}. The largest difference occurs when the gradients of the transitioning energies are similar. This is due to the energy difference of each state being small over a larger region than the average. We will see that these transitions have a slight dependence on the interaction potential which can cause small discrepancies in transition values. Both potentials show instantaneous degenerate ground states where two states are equivalent for a critical value of \(\alpha\) but no associated structural transition is observed. Degenerate ground states form when, for a given value of \(\alpha(=\alpha_\triangle)\), two states both form an equilateral triangular lattice. States can be found exactly by setting \(|\mathbf{a}|=|\mathbf{a\pm b}|\). In the two-dimensional phase diagram, this corresponds to lines of \(c=\alpha_\triangle/\rho_1\) where the energy is instantaneously degenerate. We find: \begin{align} \alpha_\triangle=\frac{2}{\sqrt{3}}(m^2\pm mn +n^2). \end{align} The lower value of \(\alpha_\triangle\) only exists if \(m^2-4mn+n^2<0\). We find no transitions at \(\alpha=\alpha_\triangle\), only instantaneous degeneracies where multiple states can exist if multiple values of \(m\) and \(n\) yield the same value of \(\alpha_\triangle\). Two types of structural transition exist: \(\bullet\) two states sharing the exact same structure up to a global rotation or \(\bullet\) two states with different structures that exist on opposite sides of an energetic parabola. \begin{figure} \centering \includegraphics[width=8.6cm]{transitiongrid.eps} \caption{(Color online) Renderings of states at two different transition points. Dashed lines show the repeated unit. Lattice vectors are highlighted in red. (a) and (b) \([2,2,0] (m=2, n=2)\) and \([3,2,1] (m=2, n=1)\) states at \(\alpha_T=8\sqrt{3/5}\). The states are geometrically identical aside from a global rotation. Here, \(\alpha_T\) is independent of potential. (c) and (d) \([3,2,1] (m=2, n=1)\) and \([3,2,1] (m=3, n=2)\) states at \(\alpha_T=8.704\). These states are geometrically distinct and are labelled as type \(1\) and \(5\) respectively. The circles of radius \(|\mathbf{a}|\) indicate which type of state is present, as shown in Fig. \ref{fig:generic}.} \label{fig:statetypes} \end{figure} \begin{figure} \centering \includegraphics[width=8.6cm]{parabolicEnergy.eps} \caption{(Color online) Plot of the energy of the generic model with respect to scaled vector length, where \(L_0=\sqrt{2/\sqrt{3}}\) is the vector length that yields the minimum energy. The numbers correspond to the region or point on the curve where certain types of lattice form. State types \(2\) and \(6\) are the perfect lattice, \(4\) is the square lattice, and \(1\), \(3\), \(5\), and \(6\) are variations that describe the relative proximity of the next-nearest neighbour to the circular radius equal to the lattice vector length. Any lattice can be categorised by checking which of the following inequalities holds for the numbered state types: \(1\): \(|\mathbf{a}|<|\mathbf{a}-\mathbf{b}|\), \(2\): \(|\mathbf{a}|=|\mathbf{a}-\mathbf{b}|\), \(3\): \(|\mathbf{a}-\mathbf{b}|<|\mathbf{a}|<|\mathbf{a}+\mathbf{b}|\), \(4\): \(|\mathbf{a}+\mathbf{b}|=|\mathbf{a}-\mathbf{b}|\), \(5\): \(|\mathbf{a}+\mathbf{b}|<|\mathbf{a}|<|\mathbf{a}-\mathbf{b}|\) \(6\): \(|\mathbf{a}|=|\mathbf{a}+\mathbf{b}|\), \(7\): \(|\mathbf{a}|>|\mathbf{a}+\mathbf{b}|\). The parabolic fit is accurate in the region near to the minimum of the curve. Supplementary video S1 shows the structure as a function of \(\gamma\) and \(L\) in enhanced clarity.} \label{fig:generic} \end{figure} \begin{figure} \includegraphics[width=8.6cm]{phasespace.eps} \caption{(Color online) Rendering of the phase diagram obtained by sampling energies with the Bessel-function and Yukawa potential. Each state is labelled in accordance to the phyllotactic notation \([k+l,k,l]\) (left) and the indices from the system model, \((m,n)\) (right). The dashed line \((c=2/\rho_1)\) is where the phyllotactic notation for the \((m=1, n=1)\) state relabels itself via a unique ``relabelling'' transition. The only resolvable difference between the numerics and theoretical predictions is the position of the \([3,2,1]\) \((2, 1)\rightarrow[3,2,1]\) \((3, 2)\) transition line, with the numerical value shown in red.} \label{fig:phasespace} \end{figure} \section{Calculating transition points} Figure \ref{fig:statetypes} (a) and (b) shows transitioning states when the lattices are `global rotations' of each other. The transition point where one state can be rotated into another is straightforward to describe: since all lattice vectors must be equal in length, there is an equation for \(\alpha\) given indices \(m\) and \(n\) for each state. Figure \ref{fig:statetypes} (c) and (d) shows the more complex transition where the two lattices have different distortions. Since our analysis is along the line \(c=\rho_1\), the unit cell size is \(1\) and \(|\mathbf{a}|=|\mathbf{b}|\) still holds. Using these constraints without the periodicity needing to be satisfied, we generate a simpler description of the lattice, without any loss of generality, which is arbitrarily rotated so the chains are parallel to the horizontal axis. We parametrise this simpler lattice with \(\gamma\): \begin{align} \mathbf{a}=\left(\begin{array}{c} -\gamma \\1/(2\gamma) \end{array} \right) \qquad \mathbf{b}=\left(\begin{array}{c} \gamma \\ 1/(2\gamma)\end{array} \right) \label{eq:gamma}. \end{align} This can be directly mapped to represent any of the full set of states via rotation and scaling. Figure \ref{fig:generic} illustrates the variety of lattices generated. By varying \(\gamma\) and numerically calculating ground state energies, we find a double-minima curve where the minima correspond to values of \(\alpha_\triangle\). Alternatively, if the energy is plotted against the vector length, \(L=|\mathbf{a}|=\sqrt{4\gamma^4+1}/(2\gamma)\), a parabola is found where the variation of \(\gamma\) traces out a trajectory that doubles back on itself (Supplementary Video 1 demonstrates this in detail). We can then classify the structure of each state based on its position on this parabola and lattice vector length. Figure \ref{fig:generic} shows the energy using Bessel function interactions, which is parabolic to leading order. Translating the curve by plotting as a function of \((L-L_0)/L_0\), where \(L_0=\sqrt{2/\sqrt{3}}\), causes it to be symmetric at the origin. \(L_0\) is the vector length corresponding to the perfect equilateral triangular lattice when \(\gamma_\triangle=1/\sqrt{2\sqrt{3}}\) or \(\gamma_\triangle=\sqrt{\sqrt{3}/2}\). The Yukawa potential similarly yields a parabolic curve but a different minimum energy value when \(L=L_0\), further indicating the qualitative consistency for different potentials. When two equal energies are on opposite sides of the origin, we define a separation distance between points meaning the lengths of the vectors at a transition point differ by \(2d\). This leads to (\ref{eq:LTrans}) being true at the transition point. When two equal energies are on the same side of the origin, both states are the same distance away from the minimum meaning the vector lengths are equal and are expressed as (\ref{eq:LExact}). Solving either equation to calculates \(\alpha_T\) between states with indices \((k,l)\) and \((m,n)\). \begin{align} L(\alpha,k,l)=\sqrt{\frac{2}{\sqrt{3}}}\pm d \qquad L(\alpha,m,n)=\sqrt{\frac{2}{\sqrt{3}}}\mp d. \label{eq:LTrans} \end{align} \begin{align} L(\alpha,k,l)=L(\alpha,m,n). \label{eq:LExact} \end{align} For (\ref{eq:LTrans}), Fig. \ref{fig:generic} indicates the signs that should be used to find \(\alpha_T\). Using the incorrect signs will yield \(d\) with the opposite sign, but the correct vector length. These equations are transcendental and can be numerically solved. It should be noted that the weak potential dependence means that these values are inexact so it is appropriate to truncate the values to a few significant figures. Figure \ref{fig:sampling} shows a slight variation in the location of some of these points as the potential is changed. We recover the statement of equal vector lengths with (\ref{eq:LExact}), which is a special case of the parabola model. We calculate all of the exact values of \(\alpha_T\) for this case in Appendix \ref{sec:appB}. The two-dimensional phase diagram can be numerically generated by performing the previous routine of sampling the energies of the lattice parametrised by \(c\) and \(\rho_1\). Results show that transition lines behave as expected: \(c=\alpha_T/\rho_1\). These results are then checked by finding the transition lines with the developed model. Figure \ref{fig:phasespace} shows the phase diagram for \(0<c<5\) and \(0<\rho_1<5\). Initial Monte Carlo simulations, sampling energies, and analytic methods all conform to the same picture of the phase diagram being symmetric under interchange of circumference and density.\\ TABLE II. ground states and corresponding values of \(\alpha\), capturing all transitions up to \(\alpha=25\). These results are also shown on the two-dimensional phase diagram in Fig. \ref{fig:phasespace}. Numerical values of \(\alpha_T\) are given to 2 decimal places, otherwise they are exact. \begin{center} \begin{tabular}{|c|c|c|} \hline \((m,n)\) & \([k+l,k,l]\) & \(\alpha\) \\ \hline \((1,1)\) & \([1,1,0]\) & \(0<\alpha<2\) \\ \hline \((1,1)\) & \([2,1,1]\) & \(2<\alpha<4\) \\ \hline \((2,2)\) & \([2,2,0]\) & \(4<\alpha<8\sqrt{3/5}\) \\ \hline \((2,1)\) & \([3,2,1]\) & \(8\sqrt{3/5}<\alpha<8.70\) \\ \hline \((3,2)\) & \([3,2,1]\) & \(8.70<\alpha<9.19\) \\ \hline \((3,3)\) & \([3,3,0]\) & \(9.19<\alpha<12\) \\ \hline \((2,2)\) & \([4,2,2]\) & \(12<\alpha<14.45\) \\ \hline \((3,1)\) & \([4,3,1]\) & \(14.45<\alpha<14.68\) \\ \hline \((4,3)\) & \([4,3,1]\) & \(14.68<\alpha<16.73\) \\ \hline \((4,4)\) & \([4,4,0]\) & \(16.73<\alpha<160/3\sqrt{7}\) \\ \hline \((3,2)\) & \([5,3,2]\) & \(160/3\sqrt{7}<\alpha<23.10\) \\ \hline \((5,4)\) & \([5,4,1]\) & \(23.10<\alpha<26.56\)\\ \hline \end{tabular} \end{center} \section{Remarks} Since at any value of \(\alpha_\triangle\), the corresponding state must be the ground state, we can link together these minima by searching for the transition point that must occur between them. Multiple transitions can be found between minima, so all relevant states near the minima must be considered. This can be done with confidence computationally. We initially found ground states up to \(\alpha=25\) and \textit{correctly predicted} ground states and transitions up to \(\alpha=50\). Similar helical structures are observed \cite{fu2017,mughal2012} in cylindrically confined systems with a general trend of increasing row numbers as one moves along the phase diagram. We note that row transitions are a general property of confined particles. Since this system is not thermal at zero temperature, we cannot state the true order of the structural transitions. By calculating the energetic derivatives and searching for discontinuities, we find that all the transitions we observe `appear' first-order. This is typical of confined systems \cite{piacente2004}, with the only second-order transition being the zig-zag transition between one and two chains, \cite{piacente2010,straube2013}, which is absent in our system since the single chain is always unstable due to lack of global confinement. In conclusion, we have developed a model which predicts the zero temperature ground states of identical repulsive particles confined to a cylindrical system as a function of geometry and density. Lead by a geometrical picture which emerges from the initial data, we infer an idealised description of the system and search for ground state transitions. The parabolic behaviour of the per-particle energy when measured in the reference frame of the lattice vector length allows us to write down a pair of simultaneous equations that solve for \(\alpha_T\). We find the number of rows of particles generally increases with circumference or density. The occurrences of the perfect equilateral triangular lattice divides the phase diagram into sectors that we search between in order to find transitions. The analysis relies on the scale invariant \(\alpha\) which alone determines the ground state structure on the cylinder. This result is robust and successfully predicts the lattice structure for parameters originally out of scope of the initial phase space used to inform it. More generally, we can determine the \emph{entire} phase space for ground states in this system. Although our analysis takes \(\alpha\) to be a global invariant, since we found these lattices forming on finite size cylinders, we predict that these structures can also form in localised regions. Taking a local value of \(\alpha\) to depend on local density and circumference, where the system could have varying circumference and density, local ground state structures might form. This result would then have a much wider application into more general systems, such as conical geometries. The authors would like to thank J. M. F. Gunn, J. S. Watkins, J. Gartlan, R. Stanyon, H. Ansell, and C. Wilkin for their valuable insight and discussions. This work was originally presented in \cite{aatphd} and all figures are adapted from the same work. All results presented were calculated and visualised using Wolfram Mathematica. This research is funded by the EPSRC, award reference \(1366111\).
\section{introduction} The discovery of neutrino oscillations~\cite{Fukuda:1998mi,Ahmad:2002jz} indicates that neutrinos should have tiny but non-zero masses, which can not be explained in the framework of the Standard Model (SM). One of the compelling solutions to neutrino mass problem is to introduce three right-handed neutrinos which directly couple to the SM sector through Yukawa interactions. At the same time, the gauge sector can be extended with an additional anomaly free $U(1)_{B-L}$. Another fact demanding the presence of new physics is the existence of dark matter (DM) which constitutes about 27\% of the global energy budget in the universe. Therefore, it is intriguing to explain these phenomena in a same framework \footnote{In Ref.~\cite{Krauss:2002px,Asaka2005,Ma:2006km,Boehm:2006mi,Kubo:2006yx,Aoki:2008av,Farzan:2010mr,Canetti:2012kh,Bonilla:2016diq,Batell:2017rol,Baumholzer:2018sfb,Blennow:2019fhy,FileviezPerez:2019cyn, Nanda:2019nqy, Cox:2017rgn, Kaneta:2016vkq}, a connection between the DM candidate and the origin of neutrino masses has been explored in detail.}. In this article, we investigate a Dirac fermionic dark matter in a $B-L$ gauge extension of the SM where the new gauge boson $Z'$ obtains mass via the Stueckelberg mechanism. Such a model is first proposed by ~\cite{FileviezPerez:2019cyn} and here we will give a more comprehensive study. In this model the neutrinos are Dirac fermions and a vector-like Dirac particle $\chi$ charged under $U(1)_{B-L}$ is assumed to be a WIMP dark matter candidate. In the early universe, DM is in thermal equilibrium with the SM plasma by exchanging the $Z'$ boson and then freezes out when the expansion rate of the universe excesses its annihilation rate. Finally, the current DM relic abundance needs to be consistent with the Planck data~\cite{Aghanim:2018eyx}. On the other hand, since the right-handed neutrinos interact with the new gauge boson, they are also in the thermal equilibrium with the SM sector in the early universe. When the temperature goes much below the gauge boson mass, they decouple and become the hot relic. Similar to the neutrinos and photons, they contribute to the radiation energy density which is usually described as the effective number of neutrino species $N_{eff}$, which is predicted to be 3.043 in the SM~\cite{Mangano:2005cc,Grohs:2015tfy,deSalas:2016ztq,Gariazzo:2019gyi,Bennett:2019ewm}. The radiation density can be probed by the observation of the anisotropies in the cosmic microwave background (CMB), which was proposed long time ago~\cite{Jungman:1995bz}. The recent result from the Planck satellite shows $N_{eff}=2.99_{-0.33}^{+0.34}$, providing a strong constraint on the extensions of SM where the massless or light particles are present. We will show that this value already gives a very strong limit on our scenario. Particularly, it is pointed out in a recent article~\cite{Abazajian:2019oqj} that the projected CMB-S4 experiment will provide serious constraints for almost all Dirac-neutrino models, especially those addressing the origin of small neutrino masses. This paper is organized as follows. In Section~\ref{section2}, we introduce the $U(1)_{B-L}$ Stueckelberg extension of the SM. Next, in Section ~\ref{section3}, the calculation of the shift in the effective number of neutrino species, $\Delta N_{eff}$, and the current and future experimental bounds are discussed. In Section ~\ref{section4}, we examine various constraints on the parameter space of the model. At last, we draw our conclusions in Section~\ref{section5}. \section{The Model}\label{section2} The gauge group of the model is \begin{equation}\label{gauge group} SU(3)_C \bigotimes SU(2)_L \bigotimes U(1)_Y \bigotimes U(1)_{B-L}. \end{equation} The Stueckelberg mechanism as an alternative to the Higgs mechanism can give mass to abelian vector bosons without breaking gauge invariance~\cite{Stueckelberg:1900zz, Kalb:1974yc, Allen:1990gb, Kors:2004dx, Kors:2004ri, Kors:2005uz, Ruegg:2003ps,Feldman:2011ms,Feldman:2006wb}. The Lagrangian related to the Stueckelberg mechanism is given by \begin{equation}\label{Lst} {\cal L}_{St} = -\frac{1}{4} Z'^{\mu\nu} Z'_{\mu\nu} - \frac{1}{2} (M_{Z'}Z'_\mu + \partial_\mu \sigma)^2 \end{equation} which is invariant under the following transformation \begin{equation}\label{Trans} \delta Z'_\mu = \partial_\mu \epsilon(x),\ \delta \sigma = -M_{Z'} \epsilon(x). \end{equation} In the quantum theory, a gauge fixing term \begin{equation}\label{gauge fixing} {\cal L}_{gf} = -\frac{1}{2\xi}(\partial_\mu Z'^\mu + \xi M_{Z'}\sigma)^2 \end{equation} should be added to the total Lagrangian so that the new gauge boson becomes massive while the field $\sigma$ decouples. Note that the scalar field $\sigma$ can have Stueckelberg couplings to all abelian gauge bosons, including the hypercharge vector boson B in the SM~\cite{Feldman:2006wd,Feldman:2007wj,Abel:2008ai,Zhang:2009zzt,Burgess:2008ri}. However, in this work, we only focus on the pure Stueckelberg sector in the absence of the mass mixing of the gauge boson B with the $U(1)_{B-L}$ gauge boson $Z'$ for simplicity. Then the $B-L$ vector current $J'$ coupling to the gauge boson $Z'$ is given as \begin{equation}\label{inreraction lagrangian} {\cal L}^{int}_{St} = -g'Z'_\mu J'^\mu \end{equation} where $g'$ is the $B-L$ gauge coupling and $J'$ comes from quarks, leptons and DM. In the Stueckelberg scenario, neutrinos are Dirac-type and their masses can be generated by Yukawa interactions via the Higgs mechanism, \begin{equation}\label{neutrino yukawa} {\cal L}_{\nu} = -Y_\nu \bar{l}_L i \sigma_2 H^* \nu_R + h.c. \end{equation} For a sub-eV neutrino mass, the coupling $Y_\nu$ should be generally smaller than $10^{-12}$. We can add a Dirac fermion $\chi$ which only takes the $B-L$ charge and can be a dark matter candidate (its stability can be guaranteed if its $B-L$ charge $Q_\chi$ is not equal to $\pm 1$, otherwise it will mix with the right-handed neutrino and decay). The relevant Lagrangian for the DM is then written as \begin{equation}\label{L dark matter} {\cal L}_{DM} = i\bar{\chi}\gamma^\mu D_\mu \chi - M_\chi \bar{\chi}\chi . \end{equation} The total Lagrangian in the model can be summarized as \begin{equation}\label{total lagrangian} {\cal L}_{tot} = {\cal L}_{SM} + {\cal L}_{St} + {\cal L}_{gf} + {\cal L}^{int}_{St} + {\cal L}_{\nu} + {\cal L}_{DM}. \end{equation} Based on the above Lagrangian, for $M_\chi \gg m_f$, DM can annihilate into $e^+_i e^-_i,\bar{\nu}_i \nu_i,\bar{u}_i u_i, \bar{d}_i d_i$ ($i$ denotes three families of quarks and leptons) via the gauge boson $Z'$. The non-relativistic form for these annihilation cross sections is \begin{eqnarray}\label{ann channel} \sigma\upsilon(\chi\bar{\chi}\rightarrow f\bar{f}) &=& \frac{N_f^C Q^2_\chi Q^2_f g'^4}{2\pi}\sqrt{1-\frac{m^2_f}{M^2_\chi}}\frac{2M^2_\chi+m^2_f}{(4M^2_\chi-M^2_{Z'})^2+M^2_{Z'}\Gamma^2_{Z'}} \nonumber \\ \label{ann channel2}&\approx& \frac{N_f^C Q^2_\chi Q^2_f g'^4 M^2_\chi}{\pi[(4M^2_\chi-M^2_{Z'})^2+M^2_{Z'}\Gamma^2_{Z'}]} \end{eqnarray} where $\upsilon$ is the relative velocity of the annihilating DM pair, $N_f^C$ is the number of colors of the final state SM fermions, $Q_\chi$ and $Q_f$ represent the $B-L$ charges of DM and SM fermions, and $\Gamma_{Z'}$ is the decay width of $Z'$ boson given by \begin{eqnarray}\label{Z' decay width} \Gamma_{Z'} &= &\sum_f \theta(M_{Z'}-2m_f) \frac{N_f^C Q^2_f g'^2 M_{Z'}}{12\pi}\sqrt{1-\frac{4m^2_f}{M^2_{Z'}}} \left(1+\frac{2m^2_f}{M^2_{Z'}}\right) \nonumber \\ && + \theta(M_{Z'}-2m_\chi)\frac{ Q^2_\chi g'^2 M_{Z'}}{12\pi}\sqrt{1-\frac{4m^2_\chi}{M^2_{Z'}}} \left(1+\frac{2m^2_\chi}{M^2_{Z'}}\right). \end{eqnarray} From Eq.(\ref{ann channel}) it can be seen that the ratio of the contribution of a quark to the total DM annihilation cross section and the contribution of a lepton is about 1 : 3. Besides, DM is also able to annihilate into two $Z'$ bosons when DM is heavier than $Z'$. The annihilation cross section of this channel is \begin{eqnarray}\label{Z'Z'} \sigma\upsilon(\chi\bar{\chi}\rightarrow Z' Z') = \frac{Q^4_\chi g'^4}{16\pi M^2_\chi}\left(1-\frac{M^2_{Z'}}{M^2_\chi}\right)^{3/2}\left(1-\frac{M^2_{Z'}}{2M^2_\chi}\right)^{-2} . \end{eqnarray} \section{The effective number of neutrino species in cosmology} \label{section3} Three additional right-handed neutrinos can be in thermal equilibrium with the SM plasma via the exchange of $Z'$ boson in the early universe so that they can contribute to the expansion rate of the universe. However, due to their weak interactions\footnote{For a dark matter mass around TeV, the dark matter relic abundance generally requires the gauge boson mass not much beyond that.}, such particles decouple earlier from the plasma than the left-handed neutrinos and therefore their contribution to the energy density of the universe is suppressed compared to that of the left-handed neutrinos. The extra radiation energy density is usually expressed in terms of an effective number of neutrinos, $N_{eff}=(8/7)(11/4)^{4/3}\rho_\nu/\rho_\gamma$. The SM prediction of this value is 3.043. In this scenario, the extra contribution of the right-handed neutrinos to the effective number of neutrino species is given as \begin{eqnarray}\label{deltaNeff} \Delta N_{eff}=N_{\nu_R}\left(\frac{T_{\nu_R}}{T_{\nu_L}}\right)^4=N_{\nu_R}\left(\frac{g_{\ast}(T_{\nu_R}^{dec})}{g_{\ast}(T_{\nu_L}^{dec})}\right)^{-\frac{4}{3}} \end{eqnarray} where $N_{\nu_R}$ represents the number of relativistic right-handed neutrinos, $g_{\ast}(T)=g_B(T)+\frac{7}{8}g_F(T)$ with $g_{B,F}(T)$ being the number of bosonic and fermionic relativistic degrees of freedom in equilibrium at the temperature T. The second equality is obtained from taking into account of the isentropic heating of the rest of the plasma between $T_{\nu_R}^{dec}$ and $T_{\nu_L}^{dec}$ decoupling temperatures. Taking three active neutrinos, $e^{\pm}$ and photon into account, we have $g_{\ast}(T_{\nu_L}^{dec})=43/4$ at $T_{\nu_L}^{dec}\approx 2.3$ MeV~\cite{Enqvist:1991gx}. The effective number of neutrino species has a strong relation with the temperature at which the right-handed neutrinos decouple from the SM plasma, which can be decided by \begin{eqnarray} H(T_{\nu_R}^{dec}) \simeq \Gamma(T_{\nu_R}^{dec}). \end{eqnarray} Here $H(T)$ is the Hubble expansion parameter which is estimated by $1.66 g^{1/2}_*(T) \frac{T^2}{M_{Pl}}$ where $g_*(T)$ is the effective degree of freedom~\cite{Bazavov:2011nk,Borsanyi:2016ksw} including the contribution of right-handed neutrinos. $\Gamma_{\nu_R}(T)$ is the right-handed neutrino interaction rate which can be calculated by $ \sum_f n_{\nu_R}(T)\langle\sigma(\bar{\nu}_R \nu_R \rightarrow \bar{f}f)\upsilon\rangle$. In our paper we examine the bounds on the parameters of the model by using present and prospective experimental data. The current Planck CMB measurement gives the result $N_{eff}=2.99_{-0.33}^{+0.34}$ including baryon acoustic oscillation (BAO) data~\cite{Aghanim:2018eyx}. Combining with the data given above, $N_{eff}^{SM}=3.043$, we adopt a conservative limit $\Delta N_{eff} < 0.283$ and then the bound with respect to the $B-L$ gauge coupling $g'$ and $Z'$ boson mass $M_{Z'}$ is given as $M_{Z'}/g' > 10.4 ~{\rm TeV}$. It gives a very strong limit on the parameter space, as we will show later. Besides, there are several experiments with better sensitivities which are underway or projected. The South Pole Telescope (SPT-3G), which is a ground-based telescope in operation at present, will have a sensitivity of $\sigma(\Delta N_{eff})=0.058$~\cite{Benson:2014qhw}. The CMB Simons Observatory (SO), which will see first light in 2021 and start a five-year survey in 2022, is expected to reach a similar sensitivity in the range of $\sigma(\Delta N_{eff})=0.05 - 0.07$~\cite{Abitbol:2019nhf}. The CMB Stage IV (CMB-S4) experiment will have the potential to constrain $\Delta N_{eff}=0.06$ at $95\%$ C.L. as a single parameter extension to $\Lambda$CDM~\cite{Abazajian:2019eic}. Importantly, according to Eq.(\ref{deltaNeff}), the minimal shift in the effective number of neutrino species in our scenario can be evaluated to acquire $\Delta N_{eff} \geq 0.141$ when $T_{\nu_R}^{dec}$ is high enough. Hence, the future CMB-S4 experiment will be able to probe this scenario for arbitrary decoupling temperatures conclusively as long as the right-handed neutrinos have a thermalization with the SM plasma in the early universe. \section{Numerical results and discussions}\label{section4} According to the Lagrangian in Eq.(\ref{total lagrangian}), in the dark matter sector there are only four relevant parameters: the $U(1)_{B-L}$ gauge boson mass $M_{Z'}$, the DM mass $M_{\chi}$, the $B-L$ charge of the DM $Q_{\chi}$ and the gauge coupling $g'$. By definition the $B-L$ charges of quarks and leptons in SM are +1/3 and -1 respectively and DM could have arbitrary charge except for $\pm 1$. The gauge coupling should satisfy $g'<2\sqrt{\pi}$ to ensure the perturbativity of the theory. In this work, we consider the constraints from the DM relic density $\Omega_{\chi}h^2$, the shift in the effective number of neutrino species $\Delta N_{eff}$, the dark matter direct detection limits as well as the collider search limits for the $Z'$. We also require the gauge coupling to keep perturbativity up to the Planck scale $M_{pl}$. The one-loop $\beta$ function of the $U(1)_{B-L}$ gauge coupling is given by \begin{eqnarray}\label{beta function} \beta(g')=\frac{{g'}^3}{16\pi^2}\sum_i Q_i^2 = \frac{(60+9Q_{\chi}^2){g'}^3}{144\pi^2} = \beta_0 {g'}^3 \end{eqnarray} where $i$ sums over all particles that carry $B-L$ charge and $\beta_0$ is a function of $Q_{\chi}$. Assuming that the Landau pole does not occur below the Planck scale, then we get \begin{eqnarray}\label{landau pole} g'(\mu) \lesssim \left(2\beta_0\ln\frac{M_{pl}}{\mu}\right)^{-\frac{1}{2}} \end{eqnarray} with the renormalization scale $\mu=M_{Z'}$. \begin{figure}[htp] \centering \includegraphics[width=3.2in,height=3in]{final13.png} \includegraphics[width=3.2in,height=3in]{final43.png} \vspace*{-1.5cm} \caption{Various constraints on the parameter space of $M_{\chi}$ versus $M_{Z'}$ for $Q_{\chi}=1/3$ (left) and $4/3$ (right). All the regions, except for the grey region which overproduces DM, satisfy the DM relic density, $\Omega_{\chi} h^2 = 0.12$. The solid black curve represents different $g'$s that are tuned to get the correct DM relic density. The green, pink, blue and orange regions are exluded by the Xenon 1T~\cite{Aprile:2017iyp}, LHC+LEP~\cite{Aaboud:2017buh,Alioli:2017nzr}, $\Delta N_{eff}$~\cite{Aghanim:2018eyx} and Landau pole, respectively. Black points satisfy the DM relic abundance but their gauge couplings are larger than $2\sqrt{\pi}$. The remained blank region survives all these constraints.} \label{mxandmz} \end{figure} In our numerical calculation, we use LanHEP 3.2.0~\cite{Semenov:2014rea} to generate the Feynman rules of the model and apply MicrOMEGAs 5.0.9~\cite{Belanger:2018mqt} to compute the DM relic abundance and DM-nucleon scattering cross-section. In Fig.~\ref{mxandmz}, we show all the relevant constraints on the plane of $M_{Z'}$ versus $M_{\chi}$ for $Q_{\chi}=1/3$ (left) and $4/3$ (right). In the grey region in the upper left corner the dark matter is overabundant because the dark matter annihilation cross section is too small. It also shows that the direct detections and collider experiments can exclude some regions where the gauge boson mass or dark matter mass is relatively light. However, $\Delta N_{eff}$ gives a stronger constraint than LHC+LEP and Xenon 1T. For $Q_{\chi}=1/3$, the cosmological constraint can give an upper bound on $Z'$ boson mass and DM mass: $M_{Z'}\leq 22$ TeV and $M_{\chi}\leq 13$ TeV, which is consistent with the result in Ref.~\cite{FileviezPerez:2019cyn}. For a larger $Q_{\chi}$, this constraint can be weakened because a smaller $g'$ can still achieve the correct DM relic abundance. Assuming the gauge coupling perturbative up to the Planck mass scale which generally requires $g' \lesssim 0.5$ for $Q_{\chi} =1/3$ or $4/3$, the survival region is restricted to the blank area where the DM annihilation cross-section is enlarged significantly via the resonance $M_{Z'} \simeq 2M_{\chi}$. From this figure, we conclude that the gauge boson mass is in general of tens of TeV after we impose the Landau pole constraint and hence the gauge boson might be possibly accessible at the future 100 TeV hadron collider. Besides, the small bulge which can be observed at about $M_{\chi}\approx 11.5(39)$ TeV in the left (right) panel originates from the contribution of the $\chi \bar{\chi}\rightarrow Z' Z'$ channel to the relic density. \begin{figure}[htp] \centering \includegraphics[width=4.2in,height=3.5in]{finalnx111.png} \vspace{-.5cm} \caption{Same as Fig.\ref{mxandmz}, but showing $M_{\chi}$ versus $Q_{\chi}$ in the resonant region $M_{Z'}=2M_{\chi}$.} \label{mxandnx} \end{figure} In Fig.\ref{mxandnx} we show the parameter space of $M_\chi$ versus $Q_\chi$ by setting $M_{Z'}=2M_{\chi}$ and changing $g^\prime$ to meet the condition $\Omega_{\chi} h^2 = 0.12$(note that we only scanned the positive $Q_{\chi}$). It shows that the Xenon-1T experiment has a weaker constraint than others and collider experiments mainly restrict the lower bound on DM mass while $\Delta N_{eff}$ and the Landau pole primarily restrict the upper bound. As $Q_{\chi}$ increases, the restrictions of collider experiments and $\Delta N_{eff}$ get weakened due to the decrease of $g'$. From this plot, we can see that the $B-L$ charge of DM must be larger than 0.11 to evade all the constraints. For $Q_{\chi}=1/3$, $M_{\chi}$ should heavier than 1 TeV. For the region $Q_{\chi}>0.5$, the current experimental data does not give limits on the parameter space due to a small $g'$. Nevertheless, the future CMB-S4 experiment could be able to cover almost all the parameter space of this scenario even in the resonant region. \section{Conclusion}\label{section5} In this work, we studied dark matter in a $U(1)_{B-L}$ gauge extension of the Standard Model where the $B-L$ gauge boson gains mass via the Stueckelberg mechanism. Three right-handed neutrinos are added to cancel the gauge anomaly and the neutrino masses can be thus explained. A new Dirac fermion plays the role of WIMP dark matter while its interaction with Standard Model sector is mediated by the new gauge boson. Assuming the perturbativity of the gauge coupling up to the Planck scale, we found that only the resonance region is available for the dark matter abundance. After applying the $\Delta N_{eff}$ constraints from the current Planck experiment, the collider search constraints as well as the dark matter direct detection limits, we observed that the $B-L$ charge of dark matter satisfies $|Q_{\chi}|>0.11$. The projected CMB-S4 experiment might be able to probe this scenario conclusively, assuming the right-handed neutrinos are thermalized with the Standard Model sector in the early universe. \section*{Acknowledgement} This work was supported by the National Natural Science Foundation of China (NNSFC) under grant Nos.11675242, 11821505, and 11851303, by Peng-Huan-Wu Theoretical Physics Innovation Center (11947302), by the CAS Center for Excellence in Particle Physics (CCEPP), by the CAS Key Research Program of Frontier Sciences and by a Key R\&D Program of Ministry of Science and Technology under number 2017YFA0402204.
\section{Introduction} \label{sec:introduction} Modern board games are a rich source of interesting and new challenges for combinatorial problems. The game Nmbr9 is a solitaire style puzzle game using polyominoes. The rules of the game are simple to explain, but modelling the game effectively using constraint programming is hard. This abstract presents the game, contributes new generalized variants of the game suitable for benchmarking and testing, and describes a model for the presented variants. The question of the top possible score in the standard game is an open challenge. \section{Nmbr9} \label{sec:nmbr9} Nmbr9~\cite{game:nmbr9} is a solitaire puzzle game using polyominoes that can be played by multiple people at the same time. The goal of the game is to build layers of the polyominoes in Figure~\ref{fig:parts} according to a pre-defined but unknown shuffle, and to place polyominoes representing larger numbers higher up to score points. \subsection{Rules} \label{sec:nmbr9:rules} The game consists of polyominoes representing the numbers 0 to 9, two copies per number for each player. A common deck of 20 cards with the polyominoes are shuffled. When a card is drawn, each player takes the corresponding part and places it in their own area. Placements are done in levels, where the first level (level $1$) is directly on the table, and level $n$ is on top of level $n-1$. Placement must always be done fully supported (level $1$ is always fully supported, level $n$ is supported by previously placed parts in level $n-1$). Each level must be fully 4-connected (i.e., not diagonally) after placement. The final requirement on placements is that when placing a part on top of other parts, it must be on top of at least two different parts. For example, if a 9-part is in level $n$, then an 8-part can not be placed in level $n+1$ resting solely on the 9-part. When all cards have been drawn, the score is computed as the the sum of the value for parts times their level minus one. For example, an 8-part on level 3 is worth 16, while it is worth 0 on level 1. \begin{figure} \centering \begin{tikzpicture}[even odd rule,scale=0.32] \drawzero{0cm,6cm} \drawone{4cm,6cm} \drawtwo{8cm,6cm} \drawthree{12cm,6cm} \drawfour{16cm,6cm} \drawfive{0cm,0cm} \drawsix{4cm,0cm} \drawseven{8cm,0cm} \draweight{12cm,0cm} \drawnine{16cm,0cm} \end{tikzpicture} \caption{Parts to place representing the numbers 0-9.} \label{fig:parts} \end{figure} \subsection{Variants} \label{sec:nmbr9:variants} We define variants of Nmbr9 to get a larger sampling of problems to solve, from small trivial problems to larger intractable problems. Let $T{-}m{-}c{-}n$ be the scheme, where \begin{description} \item[$T\in{U,F,K}$] Whether the draft is \emph{unknown}, \emph{free} to choose, or \emph{known}. The first corresponds to a quantified problem, where the draft is $\forall$-quantified. The second models the question of the max possible score, while the last models the max possible score given a specific known shuffle. \item[$m$] The maximum value to use, from 0-9. \item[$c$] The number of available copies of each polyomino. \item[$k$] The number of cards in the deck to use, $k\leq m\cdot c$ must hold. \end{description} With this taxonomy of variants, the standard game is $U{-}9{-}2{-}20$, where all available parts are used. Reducing $m$, $c$, or $k$ are all effective ways to make the model smaller. $F$ variants are interesting for answering the question of the top-score possible. $K$ variants are interesting computationally because they represent a much simpler but still hard problem, and are also interesting recreationally given a finished game, where participants wonder how they compare to the best possible result for that particular shuffle. At Board Game Geek, a forum thread on solving the standard $F{-}9{-}2{-}20$ instance has a top score of 229 points, using a total of 7 layers~\cite{Kuenzler2018}. \section{Constraint programming model} \label{sec:model} In this section, a constraint programming model is described for Nmbr9 in the $F$ and $K$ variants; a quantified model for the $U$ variant could be built as an extension on top of this. The model is based on the models in~\cite{Lagerkvist2008,Lagerkvist2019}, where \cons{regular} constraints are used for placement of polyominoes in grids. Nmbr9 is played on a conceptually infinite grid, with as many layers as needed available. The model used here requires a fixed grid. In practice, placements very seldom surpass 20 squares wide, and more than 7 layers is unlikely. The width/height size $s$ and the number of layers $l_\top$ are parameters for the model. A core problem is keeping levels connected. This is accomplished using the technique of defining an area around parts, here as a new value. Also, parts may not be placed, which is controlled using reification of the regular expression. As an example, the regular expression for part 0 (called $R_0$) in its two rotations, where the value 0 is an empty square, 1 is a square occupied by the part, and 2 is an area surrounding the part becomes (including initial control variable for reified placement) \begin{align*} 10^*(&2^30^{s-4}21^320^{s-5}(210120^{s-5})^221^320^{s-4}2^3\,|\\ &2^40^{s-5}21^420^{s-6}210^2120^{s-6}21^420^{s-5}2^4)0^*\,|\,00^* \end{align*} Let $P=\{p_1,\ldots,p_n\}$ ($n=m\cdot c$) be the set of parts, and $v(p)\in P\to {0..m}$ the value of each part. Variables $D=\langle d_1,\ldots,d_k\rangle\in P$ represent the deck of polyominoes, and $O=\langle o_1,\ldots,o_n\rangle\in\{1..n\}$ the order of the polyominoes as they occur in the deck, with values above $k$ representing not used. The matrix $G_l$ is the grid for level $l$ for all parts on that level (of size $s\times s$, domain $0..n$, border is 0), and $G_{lp}$ the grid for a part $p$ on level $l$ (of similar size, domain $0..2$). Variables $G_{lp}^1$ and $G_{lp}^2$ are Boolean matrices representing when $G_{lp}$ is 1 and 2 respectively. Boolean variables $L_{pl}$ represent $p$ being placed on level $l$, integer variable $L_p\in {0..l_ \top}$ the level of $p$ (if any, 0 if not), and $Y_p$ a Boolean variable representing that $p$ is placed with $N_p$ the inverse. The following defines the constraints of the model, where $p, p'$ is implicitly assumed to range over $P$ with $p\neq p'$, $l$ over $1..l_\top$, $l'$ over $2..l_\top$, and $i,j$ over $1..s$. Operators $\dot{\lor}$ and $\dot{\land}$ are used for point-wise logical operations. The notation $[M]$ is used to indicate true iff any element in the matrix M is true. \begin{gather} \cons{global\_cardinality}(D, \langle Y_1,\ldots,Y_n\rangle) \label{cons:gcc}\\ \cons{regular}(R_p, L_{pl}G_{lp})\label{cons:placement}\\ % \cons{inverse}(O, \langle D_1,\ldots,D_k,E_{k+1},\ldots,E_n\rangle), E\in P\label{cons:orderchannel}\\ % B(p,p') \leftrightarrow O(p) < O(p'),\, O(p)\leq k\leftrightarrow Y_p \label{cons:orderchannel2}\\ % \cons{int\_to\_bool}(L_p, \langle N_p, L_{p1},\ldots,L_{pl_\top}\rangle), \label{cons:levelchannel}\\ % Y_p = 1 - N_p, \label{cons:minorchannel}\\ % G_{lp}(i,j)=1\leftrightarrow G_{lp}^1(i,j), G_{lp}(i,j)=2\leftrightarrow G_{lp}^2(i,j) \label{cons:aspectchannel}\\ % G_l(i,j) = p \leftrightarrow G_{lp}(i,j) = 1 \label{cons:gridchannel}\\ % \left(L_{pl}\land\exists_{p''|B(p'', p)}L_{p''l}\right)\rightarrow \left[G_{lp}^2 \dot{\land} \left(\dot{\lor}_{p'|B(p',p)} G_{lp'}^1\right)\right] \label{cons:connected}\\ % G_{l'p}^1(i,j) \rightarrow \lor_{p'|B(p',p)} G_{l'-1p'}^1(i,j) \label{cons:ontop}\\ % L_{pl'}\rightarrow\left(2\leq\textstyle \sum_{p'|B(p',p)} [G_{lp}^1 \dot{\land} G_{l-1p'}^1]\right) \label{cons:atleasttwo}\\ % S = \textstyle \sum_{p\in P} (L_p-Y_p)\cdot v(p)\label{cons:score} \end{gather} Constraint~\ref{cons:gcc} checks that the deck is a shuffle of parts. Constraint~\ref{cons:placement} is the core placement constraints, with $l_\top\cdot n$ regular constraints in total. Constraints~\ref{cons:orderchannel} to~\ref{cons:gridchannel} channel information between variables. Constraints~\ref{cons:connected} to~\ref{cons:atleasttwo} implement the requirements for connectedness and being placed supported and on top of at least two different parts. When $k=n$, then constraint~\ref{cons:gcc} is equivalent to an \cons{alldifferent}, and in constraint~\ref{cons:orderchannel} there are no extra $E$ variables representing fake deck placement for non-used parts. Finally, constraint~\ref{cons:score} sums up the score of the solution, where $L_p-Y_p$ is 0 for non-used parts ($L_p=0$ and $Y_p=0$), and also for parts in the first layer ($L_p=1$ and $Y_p=1$). \section{Implementation} \label{sec:implementation} The described model has been implemented using Gecode~\cite{gecode} version 6.2.0 and C++17, and can be accessed at \url{github.com/zayenz/cp-2019-nmbr9}. Choices are made on the deck, then the levels of parts, then the placements. A static variable order is used spiralling out from the centre to keep placement centered in the grid for as long as possible. Extra implied constraints that the first card is on the first level, and that the area for each level is at most the area for the level above are added. The latter improves performance significantly. It is intractable to find a max score for the standard game approaching the score found manually using this model and search strategy; the model has more than 2.5 million propagators, and setting up the root node takes 5 seconds. A small problem like $F{-}6{-}1{-}5$ with 3 levels and grid size 8 takes more than 30 seconds and 80k failures to solve. \section{Conclusions} \label{sec:conclusions} As seen, modelling Nmbr9 is surprisingly complex, mainly due to the connectedness and support requirements. This leads to a large model with not much propagation. Finding the maximum score for the standard game is a computationally hard open challenge. Future work include: exploring how large problems can be solved with the current model; investigating better models for stronger propagation; and finding effective heuristics for the search. For search heuristics, the \emph{propagation guided global regret} in~\cite{Lagerkvist2019} might be very interesting. \paragraph*{ Acknowledgments} Thanks to Magnus Gedda, Magnus Rattfeldt, and Martin Butler for interesting and informative discussions on games and search methods. \bibliographystyle{aaai} \fontsize{9.0pt}{10.0pt}
\section{Introduction} Common knowledge, or `commonly knowing that', as the strongest concept among group epistemic notions, has been studied extensively in various areas such as artificial intelligence, epistemic logic, epistemology, philosophy of language, epistemic game theory, see e.g.~\cite{parikh1992levels,meyer2004epistemic,fagin2004reasoning,Lewis1969Convention,Clark1981Definite,aumann1995epistemic}. Intuitively, a proposition is common knowledge among a group of agents, if the proposition is true, everyone (in the group) knows it, everyone knows everyone knows it, everyone knows everyone knows everyone knows it, and so on ad infinitum.\footnote{This so-called `iterate approach', attributed to~\cite{Lewis1969Convention}, is the most common and orthodox view of common knowledge. There are also approaches called `the fixed-point approach' and `the shared-environment approach', see~\cite{barwise2016three} for the comparisons among the three approaches and also for related references.} common knowledge is defined based on the notion of `knowing that'. Beyond `knowing that', recent years have witnessed a growing interest in other types of knowledge, such as `knowing whether', `knowing what', `knowing how', `knowing why', `knowing who', see~\cite{Wang:2018} for an excellent overview. Among these notions, `knowing whether' is the closest friend of `knowing that'. The notion of `Knowing whether' is used frequently to specify knowledge goals and preconditions for actions, see e.g.~\cite{McCarthy79,Reiter01,petrick2004extending}. Besides, `knowing whether' corresponds to an important notion of philosophy, that is, non-contingency, the negation of contingency, which dates back to Aristotle~\cite{Brogan67}. An agent {\em knows whether} a proposition $\phi$ holds, if the agents knows that $\phi$ is true, or the agent knows that $\phi$ is false; otherwise, the agent is ignorant about $\phi$. A proposition $\phi$ is {\em non-contingent}, if it is necessary that $\phi$, or it is impossible that $\phi$; otherwise, $\phi$ is contingent. Just as `knowing that' is the epistemic counterpart of necessity, `knowing whether' is the epistemic counterpart of non-contingency. For an overview of contingency and `knowing whether', we recommend~\cite{Fan2015CONTINGENCY}. It is therefore natural to ask what the notion of `commonly knowing whether' is in contrast to the notion of common knowledge based on `knowing that'. `Commonly knowing whether' is not equivalent to common knowledge. For instance, suppose you see two people chatting beside a window but you cannot look outside yourself. Then you know that they {\em commonly know whether} it is sunny outside, but you do not know that they {\em commonly know that} it is sunny outside since you do not see the weather. There has been no unanimous agreement yet on the formal definition of `commonly knowing whether'. As we will show, there are at least five definitions for this notion, which are not logically equivalent over various frame classes. There has been no unanimous agreement yet on the formal definition of `commonly knowing whether'. As we will show, there are at least five definitions for this notion, which are not logically equivalent over various frame classes. Also, we will demonstrate that one of the definitions is {\em not} expressible with common knowledge. The remainder of the paper is organized as follows. Section~\ref{sec.definitions} gives five definitions for the notion of `commonly knowing whether', which are based on distinct intuitions. Section~\ref{sec.implicationrelations} compares their implicational powers in the single-agent and also multi-agent cases. Section~\ref{sec.axiomatization} gives an axiomatization and demonstrates its soundness and completeness. Section~\ref{sec.expressivity} explores the relative expressivity of one of the five definitions, via a strategy of modal comparison games. Moreover, we explore some special properties of $Cw_5$ over binary trees in Section~\ref{sec.binarytrees}. Finally, we conclude with some future work in Section~\ref{sec.conclusions}. \section{Definitions of `Commonly Knowing Whether' ($Cw$)}\label{sec.definitions} This section presents some definitions for the notion of `commonly knowing whether'. To begin with, we fix a denumerable set of propositional variables $\textsf{P}$ and a nonempty finite set of agents $\textsf{G}$. We use $\textsf{G}^+$ to refer to the set of finite and nonempty sequences only consisting of agents from $\textsf{G}$, and $|\textsf{G}|$ to refer to the number of agents in $\textsf{G}$. The languages involved in this paper are defined recursively as follows: \[ \begin{array}{ll} \textbf{PLKwCw}&\phi::= p \mid \neg \phi \mid (\phi\land\phi)\mid \textit{Kw}_i\phi\mid \textit{Ew}\phi \mid \textit{Cw}\phi\\ \ensuremath{\textbf{PLKC}}&\phi::= p \mid \neg \phi \mid (\phi\land\phi)\mid \ensuremath {\textit{K}}_i\phi\mid \ensuremath {\textit{E}}\phi \mid \textit{C}\phi\\ \end{array} \] where $p\in \textsf{P}$, and $i\in \textsf{G}$. In this paper, for the sake of simplicity, we only concern $\textsf{G}$ but not any of its proper subsets. Intuitively, $\textit{Kw}_i\phi$ is read ``agent $i$ knows whether $\phi$'', $\textit{Ew}\phi$ is read ``everyone knows whether $\phi$'', $\textit{Cw}\phi$ is read ``a set of agents commonly knows whether $\phi$'', and $\ensuremath {\textit{K}}_i, \ensuremath {\textit{E}},\textit{C}$ are more familiar operators of individual knowledge, general knowledge, and common knowledge, respectively. As noted in the introduction, according to the iterate approach, common knowledge is defined as infinite iteration of general knowledge (namely `everyone knows'). Similarly, we can give an iterate approach to commonly knowing whether, according to which commonly knowing whether amounts to infinite iteration of `everyone knows whether'. For this, we need to define the notion of `everyone knowing whether'. One definition for `everyone knowing whether' is similar to the notion of `everyone knows', that is, to say everyone in a group knows whether $\phi$, if every agent in the group knows whether $\phi$~(Def.~\ref{def.ew2}). This is seemingly the most natural notion of `everyone knowing whether'. Another definition for `everyone knowing whether' is similar to (individual) knowing whether; namely, everyone in a group knows whether $\phi$, if everyone in the group knows that $\phi$ is true, or everyone in the group knows that $\phi$ is false~(Def.~\ref{def.ew1}). \begin{definition}\label{def.ew1} $\textit{Ew}_1\phi:=\ensuremath {\textit{E}}\phi\vee \ensuremath {\textit{E}}\neg\phi$ \end{definition} \begin{definition}\label{def.ew2} $\textit{Ew}_2\phi:=\bigwedge_{i\in\textsf{G}} \textit{Kw}_i\phi$ \end{definition} It should be easy to check that $\textit{Ew}_1$ is stronger than $\textit{Ew}_2$. This can be informally explained as follows: for any agent, if (s)he knows $\phi$ or knows $\neg\phi$, then (s)he knows whether $\phi$ is true; however, the other direction fails, because it is possible that some agents know that $\phi$ is true but others know that $\phi$ is false. Based on the above definitions of `everyone knowing whether' and common knowledge, we propose the following possible definitions for `commonly knowing whether'. \begin{definition}\label{def.cw1} $\textit{Cw}_1\phi:= \textit{C}\phi\vee \textit{C}\neg\phi$ \end{definition} The definition of $\textit{Cw}_1$ is structurally similar to that of $\textit{Ew}_1$. Intuitively, it says that a group {\em commonly knows whether} $\phi$, if the group has either common knowledge of $\phi$ or has common knowledge of the negation of $\phi$. $\textit{Cw}_1$ corresponds to the notion of `commonly knowing whether' in the sunny weather example in the introduction. Besides, this definition may also find applications in question-answer contexts. suppose that Sue is attending a conference and asking the speaker a question: ``Is $q$ true or false?'' No matter whether the speaker says `Yes' or `No', all attendees will {\em commonly know whether} $p$. Since if the speaker says `Yes', then the attendees will commonly know that $p$ is true; otherwise, the attendees will commonly know that $p$ is false. The answer of the speaker amounts to an announcement whether $p$~\cite{van2016propositional} (depending on the truth value of $p$), which leads to the common knowledge as to the truth value of $p$. \begin{definition}\label{def.cw2} $\textit{Cw}_2\phi:= \textit{C}\textit{Ew}\phi$ \end{definition} According to this definition, a group {\em commonly knows whether} $\phi$, if it is common knowledge that everyone knows whether $\phi$. Since there are two different definitions of $\textit{Ew}$, we have also two different definitions of $\textit{Cw}_2$, that is, $\textit{Cw}_{21}\phi:=\textit{C}\textit{Ew}_1\phi$ and $\textit{Cw}_{22}\phi:=\textit{C}\textit{Ew}_2\phi$. \begin{definition}\label{def.cw3} $\textit{Cw}_3\phi:= \bigwedge_{k\geq 1}(\textit{Ew})^k\phi$ \end{definition} This is the iterated approach to commonly knowing whether: a group {\em commonly knows whether} $\phi$, if everyone (in the group) knows whether $\phi$, everyone knows whether everyone knows whether $\phi$, everyone knows whether everyone knows whether everyone knows whether $\phi$, and so on ad infinitum. $\textit{Cw}_{3}$ corresponds to the notion of `commonly knowing whether' in the muddy children example in the introduction. As indicated in that example, {\em neither} $q$ {\em nor} $\neg q$ is common knowledge among the single-agent set of the mud child, thus $\textit{Cw}_{3}$ is not stronger than $\textit{Cw}_1$. Again, because there are two different definitions of $\textit{Ew}$, we have also two different definitions of $\textit{Cw}_3$, that is, $\textit{Cw}_{31}\phi:=\bigwedge_{k\geq 1}(\textit{Ew}_1)^k\phi$ and $\textit{Cw}_{32}\phi:=\bigwedge_{k\geq 1}(\textit{Ew}_2)^k\phi$. \begin{definition}\label{def.cw4} $\textit{Cw}_4\phi:= \bigwedge_{i\in \textsf{G}}\textit{Cw}_1\textit{Kw}_i\phi$, that is, $\textit{Cw}_4\phi:= \bigwedge_{i\in \textsf{G}}(\textit{C}\textit{Kw}_i\phi\vee \textit{C}\neg \textit{Kw}_i\phi)$ \end{definition} According to this definition, a group {\em commonly knows whether} $\phi$, if for every member (in the group), it is common knowledge that (s)he knows whether $\phi$ or it is common knowledge that (s)he does not know whether $\phi$. \begin{definition}\label{def.cw5} $\textit{Cw}_5\phi := \bigwedge_{s\in \textsf{G}^+}\textit{Kw}_s\phi$, where $\textit{Kw}_s\phi:= \textit{Kw}_{s_1} \dots \textit{Kw}_{s_n}\phi$ if $s=s_1\dots s_n$ is a nonempty sequence of agents. \end{definition} This definition is inspired by the hierarchy of inter-knowledge of a group given in \cite{parikh1992levels}. According to this definition, `commonly knowing whether' amounts to listing all the possible inter-`knowing whether' states among every nonempty subset of the group. . \section{Implication Relations among the definitions of $Cw$}\label{sec.implicationrelations} This section explores the implication relations among the above five definitions of `commonly knowing whether'. The semantics of $\textbf{PLKwCw}$ and $\ensuremath{\textbf{PLKC}}$ are interpreted over Kripke models. A {\em (Kripke) model} is a tuple $\mathcal{M}=\lr{W,\{R_i\mid i\in\textsf{G}\},V}$, where $W$ is a nonempty set of (possible) worlds (also called `states'), $R_i$ is an accessibility relation for each agent $i$, and $V$ is a valuation function assigning a set of possible worlds to each propositional variable in $\textsf{P}$. We say that $(\mathcal{M},s)$ is a {\em pointed model}, if $\mathcal{M}$ is a model and $s$ is a world in $\mathcal{M}$. We use $\to$ to denote the union of all $R_i$ for $i\in\textsf{G}$, and $\twoheadrightarrow$ to denote the reflexive-transitive closure of $\to$, that is, $\twoheadrightarrow=\bigcup_{n\in\mathbb{N}}\to^n$. A {\em (Kripke) frame} is a model without valuations. Moreover, we use $\mathcal{K}$, $\mathcal{T}$, $\mathcal{KD}45$, and $\mathcal{S}5$ to denote the class of all Kripke frames, the class of reflexive frames, the class of serial, transitive and Euclidean frames, and the class of reflexive and Euclidean frames, respectively. Given a model $\mathcal{M}=\lr{W,\{R_i\mid i\in\textsf{G}\},V}$ and a world $w\in W$, the semantics of $\textbf{PLKwCw}$ and $\ensuremath{\textbf{PLKC}}$ are defined inductively as follows (we do not list the semantics of $\textit{Ew}$ and $\textit{Cw}$ due to their alternative definitions). \begin{definition} The truth conditions for the formulas in $\textbf{PLKwCw}$ and $\ensuremath{\textbf{PLKC}}$ are shown as follows: \begin{itemize} \item $\mathcal{M},w\vDash p \Leftrightarrow w\in V(p)$ \item $\mathcal{M},w\vDash\neg\phi\Leftrightarrow \mathcal{M},w\nvDash\phi$ \item $\mathcal{M},w\vDash\phi\land\psi\Leftrightarrow \mathcal{M},w\vDash\phi\ and\ \mathcal{M},w\vDash\psi$ \item $\mathcal{M},w\vDash\textit{Kw}_i\phi\Leftrightarrow for\ all\ u,v\in W,\ if\ wR_iu\ and\ wR_iv,\ then\ (\mathcal{M},u\vDash\phi\iff \mathcal{M},v\vDash\phi)$ \item $\mathcal{M},w\vDash\ensuremath {\textit{K}}_i\phi\Leftrightarrow for\ all\ u\in W, if\ wR_iu,\ then\ \mathcal{M},u\vDash\phi$ \item $\mathcal{M},w\vDash\ensuremath {\textit{E}}\phi\Leftrightarrow for\ all\ u\in W,\ if\ w\to u,\ then\ \mathcal{M},u\vDash\phi$ \item $\mathcal{M},w\vDash\textit{C}\phi\Leftrightarrow for\ all\ u\in W,\ if\ w\twoheadrightarrow u,\ then\ \mathcal{M},u\vDash\phi$ \end{itemize} \end{definition} Notions of satisfiability and validity are defined as normal. For instance, we say that $\phi$ is {\em valid over the class of frames $\mathcal{C}$}, written $\mathcal{C}\vDash\phi$, if for all frames $\mathcal{F}$ in $\mathcal{C}$, for all models $\mathcal{M}$ based on $\mathcal{F}$, for all worlds $w$ in $\mathcal{M}$, we have $\mathcal{M},s\vDash\phi$; we say that $\phi$ is {\em valid}, if $\phi$ is valid over the class of all frames $\mathcal{K}$. The following result will simplify the later proofs. We omit the proof details due to the space limitation. \begin{proposition} \begin{enumerate} \item $\vDash \textit{C}\phi\to \textit{C}\ensuremath {\textit{E}}\phi$ \item $\vDash \phi\to\psi$ implies $\vDash \textit{C}\phi\to \textit{C}\psi$. \end{enumerate} \end{proposition} \subsection{Single-agent Case} This part investigates the implication relations among definitions of `commonly knowing whether'. First, we explore the implication relations between the two definitions of `everyone knowing whether'. It turns out that $\textit{Ew}_1$ and $\textit{Ew}_2$ are equivalent in the single-agent case. \begin{proposition}\label{prop.single-agent-equiv} If $|\textsf{G}|=1$, then for any $\phi$, $\vDash\textit{Ew}_1\phi\leftrightarrow\textit{Ew}_2\phi$. \end{proposition} \begin{proof} Let $|\textsf{G}|=1$, say $\textsf{G}=\{i\}$. In this case, $\textit{Ew}_2\phi$ is just $\textit{Kw}_i\phi$. Also, $\vDash \ensuremath {\textit{E}}\phi\leftrightarrow \ensuremath {\textit{K}}_i\phi$, and $\vDash\ensuremath {\textit{E}}\neg\phi\leftrightarrow \ensuremath {\textit{K}}_i\neg\phi$, and thus $\vDash\ensuremath {\textit{E}}\phi\vee\ensuremath {\textit{E}}\neg\phi\leftrightarrow \ensuremath {\textit{K}}_i\phi\vee\ensuremath {\textit{K}}_i\neg\phi$, that is, $\vDash\textit{Ew}_1\phi\leftrightarrow\textit{Ew}_2\phi$. \end{proof} This tells us that in the single-agent case, we do not need to distinguish between $\textit{Cw}_{21}$ and $\textit{Cw}_{22}$, and between $\textit{Cw}_{31}$ and $\textit{Cw}_{32}$, and thus we only talk about $\textit{Cw}_2$ and $\textit{Cw}_3$, respectively, when only one agent is involved. In the reminder of this subsection, we assume $\textsf{G}$ to be a single-agent set $\{i\}$. \begin{proposition}\label{prop.Cw1toCw2} $\vDash \textit{Cw}_1\phi\to\textit{Cw}_{2}\phi$, $\vDash \textit{Cw}_{2}\phi\to\textit{Cw}_{3}\phi$, and therefore, $\vDash \textit{Cw}_1\phi\to\textit{Cw}_{3}\phi$. \end{proposition} \begin{proof} Since $\vDash \textit{C}\phi\to\textit{C}\ensuremath {\textit{E}}\phi$, and $\vDash\textit{C}\ensuremath {\textit{E}}\phi\to\textit{C}\textit{Ew}\phi$ (because $\vDash\ensuremath {\textit{E}}\phi\to\textit{Ew}\phi$), we have $\vDash\textit{C}\phi\to\textit{C}\textit{Ew}\phi$. Similarly, we obtain $\vDash\textit{C}\neg\phi\to\textit{C}\textit{Ew}\neg\phi$. It is easy to see that $\vDash\textit{Ew}\phi\leftrightarrow\textit{Ew}\neg\phi$. Therefore, $\vDash\textit{C}\phi\vee\textit{C}\neg\phi\to\textit{C}\textit{Ew}\phi$, i.e., $\vDash\textit{Cw}_1\phi\to\textit{Cw}_2\phi$. Moreover, since $\textit{C}\textit{Ew}\phi=\textit{Ew}\phi\land\ensuremath {\textit{E}}\textit{Ew}\phi\land\cdots$, and $\vDash \ensuremath {\textit{E}}\phi\to\textit{Ew}\phi$, we can show that $\vDash\textit{C}\textit{Ew}\phi\to\textit{Ew}\phi\land\textit{Ew}\Ew\phi\land\cdots$, that is, $\vDash\textit{Cw}_2\phi\to\textit{Cw}_3\phi$. \end{proof} \begin{proposition}\label{prop.Cw2ntoCw1} $\nvDash\textit{Cw}_{2}\phi\to\textit{Cw}_1\phi$. \end{proposition} \begin{proof} Consider the following model $\mathcal{M}$: \[ \xymatrix{s:\neg p\ar[rr]|i&&t: p} \] Clearly, $\mathcal{M},s\vDash\ensuremath {\textit{K}}_i p$ and $\mathcal{M},t\vDash\ensuremath {\textit{K}}_i p$. Then $\mathcal{M},s\vDash\ensuremath {\textit{E}} p$ and $\mathcal{M},t\vDash \ensuremath {\textit{E}} p$. We can obtain that $\mathcal{M},s\vDash\textit{C}\textit{Ew} p$. However, $\mathcal{M},s\nvDash\textit{C} p\vee\textit{C}\neg p$: Since $\mathcal{M},s\nvDash p$, we have $\mathcal{M},s\nvDash\textit{C} p$; since $\mathcal{M},t\nvDash\neg p$, we have $\mathcal{M},s\nvDash\textit{C}\neg p$. Therefore, $\nvDash\textit{Cw}_{2} p\to\textit{Cw}_1p$. \end{proof} \begin{proposition}\label{prop.cw3ntocw2} $\nvDash\textit{Cw}_{3}\phi\to\textit{Cw}_{2}\phi$, and thus $\nvDash\textit{Cw}_3\phi\to\textit{Cw}_1\phi$. \end{proposition} \begin{proof} Consider the following model $\mathcal{N}$: \[ \xymatrix{s:p\ar[rr]|i&&t:\neg p\ar[ll]|i\ar@(ur,ul)|i} \] Since $s$ has only one successor, $\mathcal{N},s\vDash\textit{Kw}_i\phi$ for all $\phi$, thus $\mathcal{N},s\vDash\textit{Ew}\phi$ for all $\phi$, and hence $\mathcal{N},s\vDash \textit{Cw}_3\phi$. In particular, $\mathcal{N},s\vDash\textit{Cw}_3p$. However, $\mathcal{N},t\nvDash\textit{Kw}_ip$, thus $\mathcal{N},t\nvDash\textit{Ew} p$, and then $\mathcal{N},s\nvDash\textit{C}\textit{Ew} p$, that is, $\mathcal{N},s\nvDash\textit{Cw}_2p$. Therefore, $\nvDash\textit{Cw}_{3}p\to\textit{Cw}_{2}p$. \end{proof} \begin{proposition}\label{prop.cw2tocw4} $\vDash \textit{Cw}_2\phi\to \textit{Cw}_4\phi$. As a corollary, $\vDash\textit{Cw}_1\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} Since $\vDash\textit{C}\textit{Ew}\phi\leftrightarrow\textit{C}\textit{Kw}_i\phi$, whereas $\vDash\textit{Cw}_1\textit{Kw}_i\phi\leftrightarrow (\textit{C}\textit{Kw}_i\phi\vee\textit{C}\neg\textit{Kw}_i\phi)$, therefore $\vDash\textit{C}\textit{Ew}\phi\to(\textit{C}\textit{Kw}_i\phi\vee\textit{C}\neg\textit{Kw}_i\phi)$, that is, $\vDash \textit{Cw}_2\phi\to \textit{Cw}_4\phi$. \end{proof} \begin{proposition}\label{prop.cw3ntocw4} $\nvDash\textit{Cw}_3\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} Consider the model $\mathcal{N}$ in the proof of Prop.~\ref{prop.cw3ntocw2} again. On the one hand, we have shown that $\mathcal{N},s\vDash\textit{Cw}_3 p$. On the other hand, since $\mathcal{N},t\nvDash\textit{Kw}_i p$, we have that $\mathcal{N},s\nvDash\textit{C}\textit{Kw}_ip$; moreover, because $\mathcal{N},s\nvDash\neg\textit{Kw}_ip$, we infer that $\mathcal{N},s\nvDash\textit{C}\neg\textit{Kw}_ip$, which implies that $\mathcal{N},s\nvDash\textit{Cw}_4p$. Therefore, $\nvDash\textit{Cw}_3p\to \textit{Cw}_4p$. \end{proof} \begin{proposition}\label{prop.cw4ntocw3} $\nvDash\textit{Cw}_4\phi\to\textit{Cw}_3\phi$. As a corollary, $\nvDash\textit{Cw}_4\phi\to\textit{Cw}_2\phi$ and $\nvDash\textit{Cw}_4\phi\to\textit{Cw}_1\phi$. \end{proposition} \begin{proof} Consider the following model: \[ \xymatrix{s:p\ar@(ul,ur)|i\ar[rr]|i&&t:\neg p\ar@(ur,ul)|i\ar[ll]|i} \] It is easy to check that $s\vDash\neg\textit{Kw}_i p$ and $t\vDash\neg\textit{Kw}_i p$, from which we can obtain $s\vDash\textit{C}\neg\textit{Kw}_i p$. Then $s\vDash\textit{Cw}_4 p$. However, since $s\nvDash\textit{Kw}_ip$, we have $s\nvDash\textit{Ew} p$, i.e. $s\nvDash\textit{Cw}_3 p$. Therefore, $\nvDash \textit{Cw}_4p\to \textit{Cw}_3p$. \end{proof} From the proofs of the Props.~\ref{prop.cw2tocw4} and~\ref{prop.cw4ntocw3}, it follows that even on $\mathcal{S}5$-models, $\textit{Cw}_4$ is not logically equivalent to $\textit{Cw}_1$, $\textit{Cw}_2$ and $\textit{Cw}_3$. \begin{proposition} $\vDash\textit{Cw}_3\phi\leftrightarrow \textit{Cw}_5\phi$. \end{proposition} \begin{proof} Since in the case that $\textsf{G}=\{i\}$, $\vDash\textit{Ew}\phi\leftrightarrow\textit{Kw}_i\phi$, we have $\vDash \textit{Cw}_3\phi\leftrightarrow \bigwedge_{k\geq 1}(\textit{Kw}_i)^k\phi$. Moreover, $\vDash \textit{Cw}_5\phi\leftrightarrow (\textit{Kw}_i\phi\land\textit{Kw}_i\textit{Kw}_i\phi\land\cdots)$. So, $\vDash\textit{Cw}_3\phi\leftrightarrow \textit{Cw}_5\phi$. \end{proof} Summarize the main results of this subsection as follows. \begin{theorem}\label{th.12345k} In the single-agent case, the logical relationships among $\textit{Cw}_1$, $\textit{Cw}_2$, $\textit{Cw}_3$, $\textit{Cw}_4$ and $\textit{Cw}_5$ are shown in Fig.~\ref{fig.single}, where an arrow from one operator $O$ to another $O'$ means that for all $\phi$, $O\phi\to O'\phi$ is valid over the class of frames in question, and the arrows are transitive. \end{theorem} \begin{figure} \[ \xymatrix@R-10pt{\textit{Cw}_1\ar[r]&\textit{Cw}_2\ar[r]\ar[d]&\textit{Cw}_3\ar[d]\\ &\textit{Cw}_4&\textit{Cw}_5\ar[u]\\} \] \caption{Logical relationships in the single-agent case}~\label{fig.single} \end{figure} \subsection{Multi-agent Cases} Now we move on to the multi-agent cases, that is, the cases when $|\textsf{G}|>1$. As explained before, it is possible that some agents knows that $\phi$ is true but others know that $\phi$ is false, thus $\textit{Ew}_1$ is stronger than $\textit{Ew}_2$. \begin{proposition}\label{prop.ew1toew2} The following statements hold: \begin{itemize} \item[(a)]$\vDash \textit{Ew}_1\phi\to \textit{Ew}_2\phi$; \item[(b)]$\nvDash \textit{Ew}_2\phi\to \textit{Ew}_1\phi$. \end{itemize} \end{proposition} \begin{proof} (a) is straightforward by definitions of $\textit{Ew}_1$ and $\textit{Ew}_2$ and the semantics. For (b), consider the following model $\mathcal{M}$: \[\xymatrix{s:p\ar@(ul,ur)|{i}\ar[rr]|j&& t:\neg p}\] It is clear that $\mathcal{M},s\vDash \textit{Kw}_ip\land\textit{Kw}_jp$, thus $\mathcal{M},s\vDash\textit{Ew}_2p$. However, $\mathcal{M},s\nvDash\ensuremath {\textit{E}} p$ and $\mathcal{M},s\nvDash\ensuremath {\textit{E}} \neg p$, thus $\mathcal{M},s\nvDash\textit{Ew}_1p$. Therefore, $\nvDash\textit{Ew}_2 p\to\textit{Ew}_1p$. \end{proof} Due to Prop.~\ref{prop.ew1toew2}, in the multi-agent cases, we need to distinguish between $\textit{Ew}_1$ and $\textit{Ew}_2$, and thus need to distinguish between $\textit{Cw}_{21}$ and $\textit{Cw}_{22}$, and also between $\textit{Cw}_{31}$ and $\textit{Cw}_{32}$. The following is the main result in this part. \begin{theorem}\label{th.12345km} In the multi-agent cases, the logical relationships among $\textit{Cw}_1$, $\textit{Cw}_{21}$, $\textit{Cw}_{22}$, $Cw_{31}$, $\textit{Cw}_{32}$, $\textit{Cw}_4$ and $\textit{Cw}_5$ are shown in Fig.~\ref{fig.one} \end{theorem} \begin{figure} \[ \xymatrix@R-10pt{ &&& \textit{Cw}_5\\ \textit{Cw}_1 \ar[r] & \textit{Cw}_{21}\ar[r]\ar[dr] & \textit{Cw}_{22} \ar[ur] \ar[dr] \ar[r] & \textit{Cw}_4 \\ && \textit{Cw}_{31} & \textit{Cw}_{32}} \] \caption{Logical relationships in the multi-agent cases}~\label{fig.one} \end{figure} \begin{proposition}\label{prop.Cw-implies} $\vDash \textit{Cw}_1\phi\to\textit{Cw}_{21}\phi$, $\vDash\textit{Cw}_{21}\phi\to\textit{Cw}_{22}\phi$. Consequently, $\vDash \textit{Cw}_1\phi\to\textit{Cw}_{22}\phi$. \end{proposition} \begin{proof} The first part is immediate from Prop.~\ref{prop.Cw1toCw2}. Moreover, as $\vDash \textit{Ew}_1\phi\to\textit{Ew}_2\phi$ (by Prop.~\ref{prop.ew1toew2} (a)), thus $\vDash \textit{C}\textit{Ew}_1\phi\to\textit{C}\textit{Ew}_2\phi$, that is, $\vDash \textit{Cw}_{21}\phi\to\textit{Cw}_{22}\phi$. \end{proof} \begin{proposition} $\vDash \textit{Cw}_{21}\phi\to\textit{Cw}_{31}\phi$, $\vDash \textit{Cw}_{22}\phi\to\textit{Cw}_{32}\phi$. As a consequence, $\vDash\textit{Cw}_{21}\phi\to\textit{Cw}_{32}\phi$. \end{proposition} \begin{proof} Similar to the proof in Prop.~\ref{prop.Cw1toCw2}. \end{proof} \begin{proposition} $\nvDash\textit{Cw}_{22}\phi\to\textit{Cw}_{31}\phi$. As a consequence, $\nvDash\textit{Cw}_{22}\phi\to\textit{Cw}_{21}\phi$. \end{proposition} \begin{proof} Consider the model $\mathcal{M}$ in the proof of Prop.~\ref{prop.ew1toew2} (b). We have seen that $\mathcal{M},s\vDash\textit{Ew}_2p$. Moreover, it is obvious that $\mathcal{M},t\vDash\textit{Ew}_2p$, and thus $\mathcal{M},s\vDash \textit{C}\textit{Ew}_2p$. However, $\mathcal{M},s\nvDash\ensuremath {\textit{E}} p$ and $\mathcal{M},s\nvDash\ensuremath {\textit{E}} \neg p$, thus $\mathcal{M},s\nvDash\textit{Ew}_1p$, and hence $\mathcal{M},s\nvDash\textit{Cw}_{31}p$. Therefore, $\nvDash\textit{Cw}_{22}p\to\textit{Cw}_{31}p$. \end{proof} \begin{proposition}\label{prop.cw31ntocw32} $\nvDash\textit{Cw}_{31}\phi\to\textit{Cw}_{32}\phi$. As a result, $\nvDash\textit{Cw}_{31}\phi\to\textit{Cw}_{22}\phi$. \end{proposition} \begin{proof} Consider the following model: \[ \xymatrix{t_3: p&&t_4:\neg p\\ t_1:p\ar[u]|i\ar@/^12pt/[urr]|i&s:p\ar[l]|i\ar[r]|i&t_2:p\ar[u]|i\ar@/_12pt/[ull]|j\\} \] Firstly, $s\vDash\textit{Cw}_{31}p$. To see this, notice that $s\vDash\textit{Ew}_1p$. Since $\mathcal{M},t_1\nvDash\textit{Ew}_1p$ and $\mathcal{M},t_2\nvDash\textit{Ew}_1p$, we infer that $\mathcal{M},s\vDash\textit{Ew}_1\textit{Ew}_1p$. Moreover, as $t_3$ and $t_4$ both have no successors, $t_3\vDash\textit{Ew}_1\phi$ and $t_4\vDash\textit{Ew}_1\phi$ for all $\phi$, then $t_1\vDash\textit{Ew}_1\textit{Ew}_1\phi$ and $t_2\vDash\textit{Ew}_1\textit{Ew}_1\phi$, and therefore $s\vDash\textit{Ew}_1\textit{Ew}_1\textit{Ew}_1\phi$ for all $\phi$. This implies that $s\vDash\textit{Cw}_{31}p$. Secondly, $s\nvDash\textit{Cw}_{32}p$. To see this, note that $t_1\nvDash\textit{Ew}_2p$ and $t_2\vDash\textit{Ew}_2p$. This implies that $s\nvDash\textit{Ew}_2\textit{Ew}_2p$, and therefore $s\nvDash\textit{Cw}_{32}p$. Now we conclude that $\nvDash\textit{Cw}_{31}p\to\textit{Cw}_{32}p$. \end{proof} \begin{proposition}\label{prop.cw32ntocw31} $\nvDash\textit{Cw}_{32}\phi\to\textit{Cw}_{31}\phi$. \end{proposition} \begin{proof} Use the model $\mathcal{M}$ in the proof of Prop.~\ref{prop.ew1toew2} (b). We have seen there that $\mathcal{M},s\nvDash\textit{Ew}_1p$, and thus $\mathcal{M},s\nvDash\textit{Cw}_{31}p$. Moreover, as $s$ has only one $i$-successor and only one $j$-successor, we have $\mathcal{M},s\vDash\textit{Kw}_i\phi\land\textit{Kw}_j\phi$ for all $\phi$, that is, $\mathcal{M},s\vDash\textit{Ew}_2\phi$ for all $\phi$, and thus $\mathcal{M},s\vDash\textit{Cw}_{32}\phi$ for all $\phi$, hence $\mathcal{M},s\vDash\textit{Cw}_{32}p$. Therefore, $\nvDash\textit{Cw}_{32}p\to \textit{Cw}_{31}p$. \end{proof} \begin{proposition}\label{prop.notequal} $\nvDash\textit{Cw}_{21}\phi\to\textit{Cw}_1\phi$, and thus $\nvDash\textit{Cw}_{22}\phi\to\textit{Cw}_1\phi$. \end{proposition} \begin{proof} Similar to the proof of Prop.~\ref{prop.Cw2ntoCw1}. \weg{For the first one, consider the following model $\mathcal{M}$, where $i$ is a sole agent: \[ \xymatrix{s:\neg p\ar[rr]|i&&t: p} \] Clearly, $\mathcal{M},s\vDash\ensuremath {\textit{K}}_i p$ and $\mathcal{M},t\vDash\ensuremath {\textit{K}}_i p$. Then $\mathcal{M},s\vDash\ensuremath {\textit{E}} p$ and $\mathcal{M},t\vDash \ensuremath {\textit{E}} p$. We can obtain that $\mathcal{M},s\vDash\textit{C}\textit{Ew}_1 p$. However, $\mathcal{M},s\nvDash\textit{C} p\vee\textit{C}\neg p$: Since $\mathcal{M},s\nvDash p$, we have $\mathcal{M},s\nvDash\textit{C} p$; since $\mathcal{M},t\nvDash\neg p$, we have $\mathcal{M},s\nvDash\textit{C}\neg p$. Therefore, $\nvDash\textit{Cw}_{21} p\to\textit{Cw}_1p$.} \end{proof} \begin{proposition} $\nvDash\textit{Cw}_{31}\phi\to\textit{Cw}_{21}\phi$, and $\nvDash\textit{Cw}_{32}\phi\to\textit{Cw}_{22}\phi$. \end{proposition} \begin{proof} Similar to the proof of Prop.~\ref{prop.cw3ntocw2}. \weg{Consider the following model $\mathcal{N}$, where $i$ is a sole agent: \[ \xymatrix{s:p\ar[rr]|i&&t:\neg p\ar[ll]|i\ar@(ur,ul)|i} \] Since $s$ has only one successor, $s\vDash\textit{Kw}_i\phi$ for all $\phi$, thus $s\vDash\textit{Ew}\phi$ for all $\phi$, and hence $s\vDash \textit{Cw}_3\phi$. In particular, $s\vDash\textit{Cw}_3p$. However, $t\nvDash\textit{Kw}_ip$, thus $t\nvDash\textit{Ew} p$, and then $s\nvDash\ensuremath {\textit{K}}_i\textit{Ew} p$, and hence $s\nvDash\ensuremath {\textit{E}}\textit{Ew} p$. Therefore $s\nvDash\textit{Cw}_2p$.} \end{proof} \begin{proposition} $\vDash\textit{Cw}_{22}\phi\to \textit{Cw}_4\phi$, and thus $\vDash\textit{Cw}_{21}\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} By definition of $\textit{Ew}_2$, we have $\vDash\textit{Ew}_2\phi\leftrightarrow \bigwedge_{i\in\textsf{G}}\textit{Kw}_i\phi$, then $\vDash\textit{C}\textit{Ew}_2\phi\leftrightarrow \textit{C}\bigwedge_{i\in\textsf{G}}\textit{Kw}_i\phi$, that is, $\vDash \textit{C}\textit{Ew}_2\phi\leftrightarrow \bigwedge_{i\in\textsf{G}}\textit{C}\textit{Kw}_i\phi$, and thus $\vDash \textit{Cw}_{22}\phi\to \textit{Cw}_4\phi$. \end{proof} \begin{proposition} $\nvDash\textit{Cw}_4\phi\to \textit{Cw}_{32}\phi$ and $\nvDash\textit{Cw}_4\phi\to \textit{Cw}_{31}\phi$. Consequently, $\nvDash\textit{Cw}_4\phi\to \textit{Cw}_{22}\phi$, $\nvDash\textit{Cw}_4\phi\to\textit{Cw}_{21}\phi$, $\nvDash\textit{Cw}_4\phi\to \textit{Cw}_1\phi$. \end{proposition} \begin{proof} Consider the model in the proof of Prop.~\ref{prop.cw4ntocw3}. We have already seen that $s\vDash\textit{Cw}_4p$. However, since $s\nvDash\textit{Kw}_ip$, thus $s\nvDash\textit{Ew}_2p$, which implies that $s\nvDash\textit{Ew}_1p$ due to Prop.~\ref{prop.ew1toew2} (a). It follows that $s\nvDash\textit{Cw}_{32}p$ and $s\nvDash\textit{Cw}_{31}p$. Therefore, $\nvDash\textit{Cw}_4p\to\textit{Cw}_{32}p$ and $\nvDash\textit{Cw}_4p\to\textit{Cw}_{31}p$. \end{proof} \begin{proposition} $\vDash \textit{Cw}_{22}\phi\to \textit{Cw}_5\phi$. \end{proposition} \begin{proof} Let $\mathcal{M}=\lr{W,\{R_i\mid i\in\textsf{G}\},V}$ be a model and $w\in W$. Suppose that $\mathcal{M},w\vDash\textit{Cw}_{22}\phi$, to show that $\mathcal{M},w\vDash\textit{Cw}_5\phi$, that is, $\mathcal{M},w\vDash\bigwedge_{s\in G^+}\textit{Kw}_s\phi$. Let $s\in G^+$ be arbitrary. It suffices to prove that $\mathcal{M},w\vDash\textit{Kw}_s\phi$. For this, we show a stronger result: $(\ast)$ for any $u$ such that $w\twoheadrightarrow u$, we have that $\mathcal{M},u\vDash Kw_s\phi$. From this it follows immediately that $\mathcal{M},w\vDash\textit{Kw}_s\phi$ due to the fact that $w\twoheadrightarrow w$. We proceed by induction on the length of $s$, denoted by $|s|$. By supposition, for all $u$ such that $w\twoheadrightarrow u$, we have $\mathcal{M},u\vDash\bigwedge_{i\in \textsf{G}}\textit{Kw}_i\phi$. Base step: $|s|=1$. We may assume that $s=i_1$, where $i_1\in\textsf{G}$. For any $u$ with $w\twoheadrightarrow u$, as $\mathcal{M},u\vDash\bigwedge_{i\in \textsf{G}}\textit{Kw}_i\phi$, we have obviously that $\mathcal{M},u\vDash \textit{Kw}_{i_1}\phi$. Therefore, $(\ast)$ holds. Induction step: hypothesize that $(\ast)$ holds for $|s|=k$ (IH), we prove that $(\ast)$ also holds for $|s|=k+1$. For this, we may assume that $s=i_1i_2\cdots i_{k+1}$, where $i_m\in\textsf{G}$ for $m\in[1,k+1]$. For all $u$ such that $w\twoheadrightarrow u$, for all $v$ such that $uR_{i_1}v$, we have $w\twoheadrightarrow v$. Note that $|i_2\cdots i_{k+1}|=k$. Then by IH, we derive that $\mathcal{M},v\vDash\textit{Kw}_{i_2\cdots i_{k+1}}\phi$, and therefore, $\mathcal{M},u\vDash\textit{Kw}_{i_1i_2\cdots i_{k+1}}\phi$, that is, $\mathcal{M},u\vDash\textit{Kw}_s\phi$. We have now shown $(\ast)$, as desired. \end{proof} \begin{proposition}\label{prop.cw32ntocw5} $\nvDash\textit{Cw}_{32}\phi\to\textit{Cw}_5\phi$. As a consequence, $\nvDash\textit{Cw}_{32}\phi\to\textit{Cw}_{22}\phi$. \end{proposition} \begin{proof} Consider the following model: \[ \xymatrix{ s:p\ar[rr]|i\ar[drr]|i&&t:p\ar[rr]|{i,j}\ar@/^5pt/[drr]|j&&v:p\\ &&u:p\ar[rr]|{i,j}\ar@/_5pt/[urr]|i&&w:\neg p\\} \] In this model, on one hand, $s\vDash\textit{Cw}_{32}p$: note that $s\vDash\textit{Ew}_2p$ is easily verified; since $t\nvDash\textit{Kw}_jp$, thus $t\nvDash\textit{Ew}_2 p$, similarly, since $u\nvDash\textit{Kw}_ip$, thus $u\nvDash\textit{Ew}_2p$, from which it follows that $s\vDash\textit{Ew}_2\textit{Ew}_2p$. Moreover, since both $v$ and $w$ have no successors, $\textit{Ew}_2 p\land\textit{Ew}_2\textit{Ew}_2 p\land\cdots$ holds at both $v$ and $w$, then $\textit{Ew}_2\textit{Ew}_2p\land\textit{Ew}_2\textit{Ew}_2\textit{Ew}_2p\land\cdots$ holds at both $t$ and $u$. Therefore, $s\vDash\textit{Ew}_2\textit{Ew}_2\textit{Ew}_2p\land\textit{Ew}_2\textit{Ew}_2\textit{Ew}_2\textit{Ew}_2p\land\cdots$, as desired. On the other hand, $t\vDash\textit{Kw}_ip$ but $u\nvDash\textit{Kw}_ip$, and hence $s\nvDash\textit{Kw}_i\textit{Kw}_ip$. This entails that $s\nvDash\textit{Cw}_5p$, as desired. \end{proof} \begin{proposition}\label{prop.cw5ntocw32} $\nvDash\textit{Cw}_5\phi\to\textit{Cw}_{32}\phi$. \end{proposition} \begin{proof} Consider the following model: \[ \xymatrix{v_1:p&v_2:\neg p&&v_3:p&v_4:\neg p\\ u_1:p\ar[u]|i\ar@/_10pt/[ur]|i&u_2:p\ar[u]|j\ar@/^10pt/[ul]|j&&u_3:p&u_4:p\ar[ul]|{i,j}\ar[u]|{i,j}\\ &t_1:p\ar[ul]|i\ar[u]|i&&t_2:p\ar[u]|i\ar[ur]|i&&\\ &&s:p\ar[ul]|i\ar[ur]|i&&\\} \] We now show that $\mathcal{M},s\vDash\textit{Cw}_5p$ but $\mathcal{M},s\nvDash\textit{Cw}_{32}p$. One may easily see that $\mathcal{M},s\vDash\textit{Kw}_j\phi$ for all $\phi$, and $s\vDash \textit{Kw}_ip$, thus $s\vDash\textit{Kw}_ip\land\textit{Kw}_jp$. Moreover, $t_1$ and $t_2$ both satisfy $\textit{Kw}_j\phi$ for all $\phi$ and $\textit{Kw}_ip$, and then $s\vDash\textit{Kw}_i\textit{Kw}_ip\land\textit{Kw}_i\textit{Kw}_jp$. Besides, $u_1\vDash\neg\textit{Kw}_ip\land\textit{Kw}_jp$ and $u_2\vDash\textit{Kw}_ip\land\neg\textit{Kw}_jp$, which implies that $t_1\vDash\neg\textit{Kw}_i\textit{Kw}_ip\land\neg\textit{Kw}_i\textit{Kw}_jp$; $u_3\vDash\textit{Kw}_i\phi\land\textit{Kw}_j\phi$ for any $\phi$, $u_4\vDash\neg\textit{Kw}_ip\land\neg\textit{Kw}_jp$, thus $t_2\vDash\neg\textit{Kw}_i\textit{Kw}_ip\land\neg\textit{Kw}_i\textit{Kw}_jp$, and hence $s\vDash\textit{Kw}_i\textit{Kw}_i\textit{Kw}_ip\land\textit{Kw}_i\textit{Kw}_i\textit{Kw}_jp$. Of course $s\vDash\textit{Kw}_i\textit{Kw}_j\phi$ for all $\phi$, thus $s\vDash\textit{Kw}_i\textit{Kw}_j\textit{Kw}_ip\land\textit{Kw}_i\textit{Kw}_j\textit{Kw}_jp$. Because $v_1,v_2,v_3,v_4$ all satisfy $\textit{Kw}_a\phi$ for all $\phi$ and $a$, we can obtain that $s\vDash\textit{Kw}_a\textit{Kw}_b\textit{Kw}_c\textit{Kw}_d\phi$ for all $a,b,c,d\in\textsf{G}$. Therefore, $\mathcal{M},s\vDash\textit{Cw}_5p$. Since $u_k\nvDash\textit{Kw}_ip\land\textit{Kw}_jp$ for $k=1,2$, thus $t_1\vDash\textit{Kw}_i\textit{Ew}_2 p$, and then $t_1\vDash\textit{Kw}_i\textit{Ew}_2 p\land\textit{Kw}_j\textit{Ew}_2p$, i.e. $t_1\vDash\textit{Ew}_2\textit{Ew}_2p$. However, $u_3\vDash\textit{Ew}_2p$ and $u_4\nvDash\textit{Ew}_2p$, which entails that $t_2\nvDash\textit{Kw}_1\textit{Ew}_2p$, and thus $t_2\nvDash\textit{Ew}_2\textit{Ew}_2p$. Therefore, $s\nvDash\textit{Kw}_i\textit{Ew}_2\textit{Ew}_2p$, and thus $s\nvDash\textit{Ew}_2\textit{Ew}_2\textit{Ew}_2p$. This leads to $\mathcal{M},s\nvDash\textit{Cw}_{32}p$. \end{proof} \begin{proposition}\label{prop.cw31ntocw5} $\nvDash\textit{Cw}_{31}\phi\to\textit{Cw}_5\phi$. \end{proposition} \begin{proof} Consider the model in the proof of Prop.~\ref{prop.cw32ntocw5}. It has been shown there that $s\nvDash\textit{Cw}_5p$. It then suffices to prove that $s\vDash\textit{Cw}_{31}p$. As $s\vDash \ensuremath {\textit{K}}_ip$ and $s\vDash\ensuremath {\textit{K}}_j\phi$ for all $\phi$, we obtain $s\vDash \ensuremath {\textit{E}} p$, and thus $s\vDash\textit{Ew}_1p$. Since $t\nvDash\ensuremath {\textit{E}} p\vee\ensuremath {\textit{E}}\neg p$ and $u\nvDash \ensuremath {\textit{E}} p\vee\ensuremath {\textit{E}}\neg p$, we can show that $s\vDash\ensuremath {\textit{E}}\neg \textit{Ew}_1 p$, and then $s\vDash\textit{Ew}_1\textit{Ew}_1 p$. Moreover, because $v$ and $w$ both have no successors, $v\vDash\textit{Ew}_1\phi$ and $w\vDash\textit{Ew}_1\phi$ for all $\phi$, thus $t\vDash\textit{Ew}_1\textit{Ew}_1\phi$ and $u\vDash\textit{Ew}_1\textit{Ew}_1\phi$, and hence $s\vDash\textit{Ew}_1\textit{Ew}_1\textit{Ew}_1\phi$ for all $\phi$. This together gives us $s\vDash\textit{Cw}_{31}p$. \end{proof} \begin{proposition} $\nvDash\textit{Cw}_5\phi\to\textit{Cw}_{31}\phi$. \end{proposition} \begin{proof} Consider the model in the proof of Prop.~\ref{prop.cw5ntocw32}. It has been shown there that $s\vDash\textit{Cw}_5p$. The remainder is to show that $s\nvDash\textit{Cw}_{31}p$. The proof is as follows. One may check that $\textit{Ew}_1p$ is true at $u_3$ but false at $u_1,u_2,u_4$. It then follows that $t_1\vDash\textit{Ew}_1\textit{Ew}_1p$ but $t_2\nvDash\textit{Ew}_1\textit{Ew}_1p$, and therefore $s\nvDash\textit{Ew}_1\textit{Ew}_1\textit{Ew}_1p$, which implies that $s\nvDash\textit{Cw}_{31}p$, as desired. \end{proof} \weg{\begin{proof} Prove by induction. Consider $C_3w\phi$ in two cases: The first case is $C_2w\phi:=C_{22}w\phi$. Let $(M,r)$ be an arbitrary pointed model, such that $M=\langle W,R_i,R_j,...,R_m,V \rangle$ and $M,r\models C_2w\phi$. Then, for any node $t$ with $r\twoheadrightarrow t$, we have $M,t\models \bigwedge_{i\in G}Kw_i\phi$. For arbitrary $s\in G^+$, let $s= \langle i_1,i_2,...,i_k \rangle$, where $\{i_n\mid 1\leq n\leq k\}\subseteq G$. We show a stronger result: $M,r\models Kw_s\phi$ and for any $t$ such that $r\twoheadrightarrow t$, we have that $M,t\models Kw_s\phi$. By induction on the length $n=|s|$ of $s$: When $n=1$, $s=\langle i_1 \rangle$, where $i_1$ is an arbitrary agent. By $M,r\models C_2w\phi$, we have $M,r\models Kw_{i_1}\phi$. And since for any $t$ with $r\twoheadrightarrow t$, there is $M,t\models E_2w\phi$. Thus there is $M,t\models Kw_{i_1}\phi$. Induction hypothesis: when $n=k$, $s=\langle i_1,i_2,...,i_k \rangle$, there is $M,r\models Kw_s\phi$ and for any $t$ with $r\twoheadrightarrow t$, there is $M,t\models Kw_s\phi$. When $n=k+1$, $s= \langle i_1,i_2,...,i_k,i_{k+1}\rangle$. By induction hypothesis, for any $t$ such that $r\to t$, for any $|s_k|=k$, there is $M,t\models Kw_{s_k}\phi$. Thus, for any $i\in G$, there is $M,r\models Kw_iKw_{s_k}\phi$, saying, for any $|s_{k+1}|=k+1$, we have $M,r\models Kw_{s_{k+1}}\phi$. Now considering any $u$ with $r\twoheadrightarrow u$, let $u\to v$. By the definition of $\to$, $r\twoheadrightarrow v$. By induction hypothesis, we get $M,v\models Kw_{s_k}\phi$. And since $v$ is an arbitrary node such that $u\to v$, we have for any $i\in G$, $M,u\models Kw_iKw_{s_k}\phi$. That means, for any $|s_{k+1}|=k+1$, there is $M,u\models Kw_{s_{k+1}}\phi$. Therefore, we proved that, for arbitrary $s\in G^+$ and arbitrary $t$ with $r\twoheadrightarrow t$, there are $M,r\models Kw_s\phi$ and $M,t\models Kw_s\phi$, which means $M,r\models \bigwedge_{s\in G^+}Kw_s\phi$. Thus, we have $M,r\models C_5w\phi$. Above all, we obtain $\mathcal{K}\models C_{22}w\phi\to C_5w\phi$. For the second case where $C_2w\phi:=C_{21}w\phi$, since $\mathcal{K}\models C_{21}w\phi\to C_{22}w\phi$, we have $\mathcal{K}\models C_{21}w\phi\to C_5w\phi$. Therefore, we proved $\mathcal{K}\models C_2w\phi\to C_5w\phi$. \end{proof}} \begin{proposition}\label{prop.cw32ntocw4} $\nvDash\textit{Cw}_{32}\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} Use the model in the proof of Prop.~\ref{prop.cw32ntocw5}. It has been shown there that $s\vDash\textit{Cw}_{32}p$. Moreover, $s\nvDash\textit{Cw}_4p$. To see this, note that $t\nvDash\neg\textit{Kw}_ip$ and $u\nvDash\textit{Kw}_ip$. This entails that $s\nvDash\textit{C}\textit{Kw}_ip\vee\textit{C}\neg\textit{Kw}_ip$. Therefore, $s\nvDash\textit{Cw}_4p$. \end{proof} \begin{proposition}\label{prop.cw31ntocw4} $\nvDash\textit{Cw}_{31}\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} Use the model in the proof of Prop.~\ref{prop.cw32ntocw5}. By Prop.~\ref{prop.cw32ntocw4}, we have $s\nvDash\textit{Cw}_4p$. By Prop.~\ref{prop.cw31ntocw5}, we obtain $s\vDash\textit{Cw}_{31}p$. Therefore, $\nvDash\textit{Cw}_{31}p\to\textit{Cw}_4p$. \end{proof} \begin{proposition}\label{th.n45k} $\nvDash \textit{Cw}_4\phi\to \textit{Cw}_5\phi$. \end{proposition} \begin{proof} Consider the model in the proof of Prop.~\ref{prop.cw4ntocw3}. We have seen that $M,s\models Cw_4p$. However, as $M,s\vDash \neg Kw_ip$, we can obtain that $M,s\nvDash \textit{Cw}_5p$. So, $\nvDash \textit{Cw}_4 p\to \textit{Cw}_5p$. \end{proof} \begin{proposition}\label{prop.cw5ntocw4} $\nvDash\textit{Cw}_5\phi\to\textit{Cw}_4\phi$. \end{proposition} \begin{proof} Use the model in the proof of Prop.~\ref{prop.cw5ntocw32}. There, we have shown that $\mathcal{M},s\vDash\textit{Cw}_5p$. It is now sufficient to prove that $\mathcal{M},s\nvDash\textit{Cw}_4p$. Note that $u_1\nvDash\textit{Kw}_ip$ and $u_3\nvDash\neg\textit{Kw}_ip$. This gives us $s\nvDash\textit{C}\textit{Kw}_ip\vee\textit{C}\neg\textit{Kw}_ip$, and therefore $s\nvDash\textit{Cw}_4p$. \end{proof} \weg{\begin{proposition}\label{th.n45k} $\nvDash \textit{Cw}_4\phi\to \textit{Cw}_5\phi$. \end{proposition} \begin{proof} Consider the following model: \[ \xymatrix@R-10pt{ t_3:p\ar[r]|i\ar@(ur,ul)|i&t_4:\neg p\ar[l]|i\ar@(ur,ul)|i&&t_5:p\ar[r]|i\ar@(ur,ul)|i&t_6:\neg p\ar[l]|i\ar@(ur,ul)|i\\ &t_1:p\ar[ul]|i\ar[u]|i&&t_2:\neg p\ar[u]|i\ar[ur]|i&&\\ &&s:p\ar[ul]|i\ar[ur]|i&&\\} \] In this model, $Kw_ip$ is false on every world, thus $M,s\models Cw_4p$. However, as $M,s\models \neg Kw_ip$, we can obtain that $M,s\not\models \textit{Cw}_5p$. Therefore, $\nvDash \textit{Cw}_4 p\to \textit{Cw}_5p$. \end{proof}} \weg{\subsection{Single-agent Case} The results above concern the multi-agent case. Considering the single-agent case, observe that $\mathcal{K}\models E_1w\phi\leftrightarrow E_2w\phi$, which implies that $C_{21}w$ is equivalent to $C_{22}w$ and that $C_{31}w$ is equivalent to $C_{32}w$. Moreover, since only one agent is involved, it is trivial to find that $C_3w$ is equivalent to $C_5w$. In terms of logical relationships, the five definitions share the same relations with the multi-agent case over $\mathcal{K}$, $\mathcal{KD}45$, $\mathcal{T}$ and $\mathcal{S}5$, respectively.} We have thus completed the proof of Thm.~\ref{th.12345k}. Note that all proofs involved are based on $\mathcal{K}$. In fact, we can also explore the implication relations of $\textit{Cw}_1-\textit{Cw}_5$ over $\mathcal{KD}45$, over $\mathcal{T}$, and also over $\mathcal{S}5$. It turns out that the implication relations over $\mathcal{KD}45$ is the same as those over $\mathcal{K}$ (see Fig.~\ref{fig.one}), and the implication relations over $\mathcal{T}$ and $\mathcal{S}5$ is figured as follows (see Fig.~\ref{fig.s5}). We omit the proof details due to the space limitation. \begin{figure} \[ \scriptsize \xymatrix@C-10pt{\textit{Cw}_1 \ar[r] \ar[d] &\textit{Cw}_{21} \ar[r] \ar[l] &\textit{Cw}_{22} \ar[l] \ar[r] &\textit{Cw}_{31} \ar[r] \ar[l] &\textit{Cw}_{32} \ar[r] \ar[l] &\textit{Cw}_5 \ar[l] \\ \textit{Cw}_4 } \] \caption{Logical relationships over $\mathcal{T}$ and $\mathcal{S}5$ (multi-agent).}\label{fig.s5} \end{figure} Therefore, $\textit{Cw}_1$, $\textit{Cw}_2$, $\textit{Cw}_3$ and $\textit{Cw}_5$ boil down to the same thing once the frame is reflexive, which can be attributed to agents' agreements on the values of $\phi$. For example, if there is $\mathcal{M},s\models \textit{Kw}_i\phi\wedge \textit{Kw}_j\phi$ where $\mathcal{M}$ is reflexive, the values of $\phi$ on all $i$-successors must agree with those on all $j$-successors since they share a common successor $s$. Comparatively, if $\mathcal{M}$ is not reflexive, the case of $\mathcal{M},s\models \ensuremath {\textit{K}}_i\phi\wedge \ensuremath {\textit{K}}_j\neg \phi$ is possible. \weg{\subsection{Over $\mathcal{T}$ and $\mathcal{S}5$} The model of knowledge is generally defined over $\mathcal{S}5$ \cite{van2007dynamic,fagin2004reasoning}, which commits knowledge must be true via axiom $T$. The implication relations among the five definitions of Section 2 over $\mathcal{T}$ or $\mathcal{S}5$ are given in the following theorem. \begin{theorem}\label{th.12345t} Over $\mathcal{T}$ and $\mathcal{S}5$, the implication relations between $Cw_{1,2,3,4,5}$ are as in Fig ~\ref{fig.s5}. \end{theorem} \begin{figure} \[ \scriptsize \xymatrix@C-10pt{Cw_1\phi \ar[r] \ar[d] &Cw_{21}\phi \ar[r] \ar[l] &Cw_{22}\phi \ar[l] \ar[r] &Cw_{31}\phi \ar[r] \ar[l] &Cw_{32}\phi \ar[r] \ar[l] &Cw_5\phi \ar[l] \\textit{Cw}_4\phi } \] \caption{Logical relationships over $\mathcal{T}$ and $\mathcal{S}5$ (multi-agent).}\label{fig.s5} \end{figure} $Cw_1\phi$, $Cw_2\phi$, $Cw_3\phi$ and $Cw_5\phi$ boil down to the same thing once the frame is reflexive, which should be attributed to agents' agreements on the values of $\phi$. For example, if there is $M,s\models Kw_i\phi\wedge Kw_j\phi$ where $M$ is reflexive, the values of $\phi$ on all $i$-successors must agree with those on all $j$-successors since they share a common successor $s$. Comparatively, if $M$ is not reflexive, the case of $M,s\models K_i\phi\wedge K_j\neg \phi$ is possible. \subsection{Over $\mathcal{KD}45$} $\mathcal{KD}45$ is considered to be the usual class of frames for doxastic (belief) logic \cite{kraus1988knowledge,van2007dynamic}. The implication relations over $\mathcal{KD}45$ among these five definitions are shown in the following theorem. \begin{theorem}\label{th.12345kd45} Over $\mathcal{KD}45$, the implication relations are as in Figure \ref{fig.one}. \end{theorem}} \weg{\begin{figure}\label{fig.irk} \[ \xymatrix@R-10pt{ &&& C_5w\phi\\ C_1w\phi \ar[r] & C_{21}w\phi\ar[r] & C_{22}w\phi \ar[ur] \ar[dr] \ar[d] \ar[r] & C_4w\phi \\ && C_{32}w\phi & C_{31}w\phi} \] \caption{Logical relationships over $\mathcal{KD}45$ and $\mathcal{K}$}~\label{fig.one} \end{figure}} \section{Axiomatization}\label{sec.axiomatization} $\mathcal{S}5$ is the class of frames specifically for knowledge or epistemic description. As mentioned above, over $\mathcal{S}5$, the five definitions of `commonly knowing whether' are logically equivalent except $\textit{Cw}_4$. Also, one may verify that $\textit{Ew}_1$ and $\textit{Ew}_2$ are logically equivalent over $\mathcal{S}5$. In this section, we axiomatize $\textbf{PLKwCw}$ over $\mathcal{S}5$. The language $\textbf{PLKwCw}$ can now be defined recursively as follows: \[ \begin{array}{l} \phi::= p \mid \neg \phi \mid (\phi\land\phi)\mid \textit{Kw}_i\phi \mid \textit{Cw}\phi,\\ \end{array} \] where $\textit{Cw}$ means $\textit{Cw}_1$, and $\textit{Ew}\phi$ abbreviates $\bigwedge_{i\in\textsf{G}}\textit{Kw}_i\phi$. The semantics of $\textbf{PLKwCw}$ is defined as before in addition to the semantics of $\textit{Cw}$ as follows. \begin{definition} $\mathcal{M},w\vDash \textit{Cw}\phi \Leftrightarrow for\ all\ u,v,\ if\ w\twoheadrightarrow u\ and\ w\twoheadrightarrow v,\ then\ (\mathcal{M},u\vDash\phi\iff \mathcal{M},v\vDash\phi).$ \end{definition} \subsection{Proof system and Soundness} The proof system $\mathbb{PLCKW}5$ is an extension of the axiom system of the logic of `knowing whether' $\mathbb{CLS}5$ in \cite{Fan2015CONTINGENCY} plus the axioms and rules concerning $\textit{Cw}$. \begin{definition} The axiomatization of $\mathbb{PLCKWS}5$ consists of the following axiom schemas and inference rules: \begin{center} \begin{tabular}{c c c c} All instances of tautologies & (TAUT) \\ $\textit{Kw}_i(\chi\to\phi)\wedge \textit{Kw}_i(\neg\chi\to\phi)\to \textit{Kw}_i\phi$ & (Kw-CON)\\ $\textit{Kw}_i\phi\to \textit{Kw}_i(\phi\to\psi)\vee \textit{Kw}_i(\neg\phi\to\chi)$ & (Kw-DIS)\\ $\textit{Kw}_i\phi\wedge \textit{Kw}_i(\phi\to \psi)\wedge \phi\to \textit{Kw}_i\psi$ & (Kw-T)\\ $\neg \textit{Kw}_i\phi\to\textit{Kw}_i\neg \textit{Kw}_i\phi$ & (wKw-5)\\ $\textit{Kw}_i\varphi \leftrightarrow \textit{Kw}_i \neg\varphi$ & (Kw-$\leftrightarrow$)\\ $\textit{Cw}(\chi\to\phi)\wedge \textit{Cw}(\neg\chi\to\phi)\to \textit{Cw}\phi$ & (Cw-CON)\\ $\textit{Cw}\phi\to \textit{Cw}(\phi\to\psi)\vee \textit{Cw}(\neg\phi\to\chi)$ & (Cw-DIS)\\ $\textit{Cw}\phi\wedge \textit{Cw}(\phi\to \psi)\wedge \phi\to \textit{Cw}\psi$ & (Cw-T)\\ $\textit{Cw}\phi\to (\textit{Ew}\phi\wedge \textit{Ew}\textit{Cw}\phi)$ & (Cw-Mix)\\ $\textit{Cw}(\phi\to \textit{Ew}\phi)\to (\phi\to \textit{Cw}\phi)$ & (Cw-Ind)\\ from $\phi$ infer $\textit{Kw}_i\phi$ & (Kw-NEC)\\ from $\phi$ infer $\textit{Cw}\phi$ & (Cw-NEC)\\ from $\phi\leftrightarrow\psi$ infer $ \textit{Kw}_i\phi\leftrightarrow \textit{Kw}_i\psi$ & (Kw-RE)\\ from $\phi\leftrightarrow\psi$ infer $\textit{Cw}\phi\leftrightarrow \textit{Cw}\psi$ & (Cw-RE)\\ from $\phi$ and $\phi\to\psi$ infer $\psi$ & (MP) \end{tabular} \end{center} \end{definition} \begin{proposition} $\mathbb{PLCKWS}5$ is sound with respect to $\mathcal{S}5$. \end{proposition} \begin{proof} The soundness of the axioms (Kw-CON), (Kw-DIS), (Kw-T), (wKw-5) and the soundness of the rules (Kw-NEC), (Kw-RE), (MP) are already proved in \cite{Fan2015CONTINGENCY}. Moreover, the soundness of (Cw-CON), (Cw-DIS), (Cw-T), (Cw-NEC) and (Cw-RE) can be shown as their Kw-counterparts. It suffices to show the soundness of (Cw-Mix) and (Cw-Ind). Let $\mathcal{M}=\lr{W,\{R_i\mid i\in\textsf{G}\},V}$ be an arbitrary $\mathcal{S}5$-model and $w\in W$. \medskip For (Cw-Mix): Suppose that $\mathcal{M},w\vDash\textit{Cw}\phi$, to show that $\mathcal{M},w\vDash \textit{Ew}\phi\land\textit{Ew}\textit{Cw}\phi$. We only show that $\mathcal{M},w\vDash\textit{Ew}\textit{Cw}\phi$, since $\mathcal{M},w\vDash\textit{Ew}\phi$ is straightforward. If $\mathcal{M},w\nvDash\textit{Ew}\textit{Cw}\phi$, then for some $i\in\textsf{G}$ and some $u,v$ such that $wR_iu$ and $wR_iv$ we have $\mathcal{M},u\vDash\textit{Cw}\phi$ and $\mathcal{M},v\nvDash\textit{Cw}\phi$. Then there exist $v_1,v_2$ such that $v\twoheadrightarrow v_1$ and $v\twoheadrightarrow v_2$ and $\mathcal{M},v_1\vDash\phi$ and $\mathcal{M},v_2\nvDash\phi$. Then $w\twoheadrightarrow v_1$ and $w\twoheadrightarrow v_2$, and therefore $\mathcal{M},w\nvDash\textit{Cw}\phi$, which is contrary to the supposition. \medskip For (Cw-Ind): Suppose that $\mathcal{M},w\vDash \textit{Cw}(\phi\to \textit{Ew}\phi)\wedge\phi$. We show a stronger result: $(\ast)$: for all $u$ such that $w\twoheadrightarrow u$, we have $\mathcal{M},u\vDash\phi$; equivalently, for all $n\in\mathbb{N}$, for all $u$ such that $w\to^nu$, we have $\mathcal{M},u\vDash\phi$ (Recall that $\twoheadrightarrow=\bigcup_{n\in\mathbb{N}}\to^n$). From $\mathcal{M},w\vDash\textit{Cw}(\phi\to\textit{Ew}\phi)$, it follows that {\em either} (1) for all $u$ such that $w\twoheadrightarrow u$ we have $\mathcal{M},u\vDash\phi\to\textit{Ew}\phi$ {\em or} (2) for all $u$ such that $w\twoheadrightarrow u$ we have $\mathcal{M},u\vDash\phi\land\neg\textit{Ew}\phi$. The case (2) immediately gives us $(\ast)$. In the remainder, it suffices to consider the case (1). We proceed with induction on $n$. Base step (i.e. $n=0$). In this case, we need to show that $\mathcal{M},w\vDash\phi$. This follows directly from the supposition. Inductive step. Assume by induction hypothesis (IH) that $(\ast)$ holds for $n=k$. We show that $(\ast)$ also holds for $n=k+1$. Hypothesize that $w\to^{k+1}u$, then there exists $v$ such that $w\to^kv\to u$. By IH, $\mathcal{M},v\vDash\phi$. Obviously, $w\twoheadrightarrow v$, then using (1) we infer that $\mathcal{M},v\vDash\phi\to\textit{Ew}\phi$, thus $\mathcal{M},v\vDash\textit{Ew}\phi$. Together with the fact that $\mathcal{M},v\vDash\phi$ and the reflexivity of $\to$ (since $R_i$ is reflexive for all $i\in\textsf{G}$), this would implies that for all $x$ such that $v\to x$ we have $\mathcal{M},x\vDash\phi$, and therefore $\mathcal{M},u\vDash\phi$, as desired. \end{proof} \subsection{Completeness of $\mathbb{PLCKWS}5$} We follow the basic idea on proving completeness of the logic of common knowledge to prove the completeness of $\mathbb{PLCKWS}5$. \begin{definition} The {\em closure} of $\phi$, denoted as $cl(\phi)$, is the smallest set satisfying following conditions: \begin{enumerate} \item $\phi\in cl(\phi)$. \item if $\psi\in cl(\phi)$, then $sub(\psi)\subseteq cl(\phi)$. \item if $\psi\in cl(\phi)$ and $\psi$ is not itself of the form $\neg\chi$, then $\neg\psi\in cl(\phi)$. \item if $\textit{Kw}_i\psi\in cl(\phi)$ and $\textit{Kw}_i\chi\in cl(\phi)$, and $\chi$ and $\psi$ are not themselves conditionals, then $\textit{Kw}_i(\chi\to\psi)\in cl(\phi)$. \item if $\textit{Cw}\psi\in cl(\phi)$, then $\{\textit{Kw}_i\textit{Cw}\psi \mid i\in \textsf{G}\}\subseteq cl(\phi)$. \item If $\textit{Cw}\psi\in cl(\phi)$, then $\{\textit{Kw}_i\psi\mid i\in\textsf{G}\}\subseteq cl(\phi)$. \item If $\neg \textit{Kw}_i\psi_1\in cl(\phi)$, $\psi_1$ is not a negation and $\textit{Cw}\psi_2\in cl(\phi)$, then $\textit{Kw}_i\neg(\psi_1\wedge\neg\psi_2)\in cl(\phi)$. \end{enumerate} \end{definition} The definition of the canonical model for $\mathbb{PLCKWS}5$ is inspired by the canonical models of $\mathbb{CLS}5$ in \cite{Fan2015CONTINGENCY}, where the definition of the canonical relation is inspired by an almost schema. \begin{definition} $\Phi$ is a closure of some formula. We define {\em the canonical model} based on $\Phi$ as $\mathcal{M}^c=\langle W^c, \{R_i^T\mid i\in\textsf{G}\}, V^c \rangle$ where: \begin{enumerate} \item $W^c=\{\Sigma\mid\Sigma\ is\ maximal\ consistent\ in\ \Phi\}$. \item For each $i\in \textsf{G}$, let $R_i^T$ be the reflexive closure of $R_i^c$, where $\Sigma R_i^c \Delta$ iff there exists an $\chi$ which is not a conditionals, such that: \begin{enumerate} \item $\neg \textit{Kw}_i\chi\in \Sigma$ and \item for all $\phi\in\Phi$: ($\textit{Kw}_i\phi\in\Sigma$ and $\textit{Kw}_i\neg(\phi\wedge\neg\chi)\in \Sigma$) implies $\phi\in\Delta$. \end{enumerate} \item $V^c(p)=\{\Sigma\in W^c\mid p\in\Sigma\}$. \end{enumerate} \end{definition} Here, it should be noticed that it has already been proved that $R_i^T$ is an equivalence relation in \cite{Fan2015CONTINGENCY}, which means we no longer need the transitive and symmetric closure. A useful proposition should also be given in advance. \begin{proposition}\label{prop.bigwedge} For all $n>1$: \begin{enumerate} \item $\vdash (Kw_i(\bigwedge_{k=1}^n\phi_k\to\neg\psi)\wedge \bigwedge_{k=1}^n Kw_i\phi_k\wedge \bigwedge_{k=1}^n Kw_i(\psi\to\phi_k))\to Kw_i\psi$ \item $\vdash (Kw_i(\bigwedge_{k=1}^n\phi_k\to\psi)\wedge \bigwedge_{k=1}^n Kw_i\phi_k\wedge \bigwedge_{k=1}^n Kw_i(\neg\psi\to\phi_k))\to Kw_i\psi$ \end{enumerate} \end{proposition} The proof of Proposition \ref{prop.bigwedge}.1 is given in \cite{Fan2015CONTINGENCY} and Proposition \ref{prop.bigwedge}.2 can thereby be directly derived. \begin{lemma}\label{le.lindenbaum} (Lindenbaum's Lemma) Let $\Phi$ be the closure of some formula. Every consistent subset of $\Phi$ is a subset of a maximal consistent set in $\Phi$. \end{lemma} The proof of Lemma \ref{le.lindenbaum} is standard. In order to prove the completeness of $\mathbb{PLCKWS}5$, we refer to the basic idea of the completeness of classical common knowledge in \cite{van2007dynamic} and \cite{fagin2004reasoning} and Lemma \ref{le.Cwtruthlemma} should be proved in advance. \begin{definition}\label{def.path} ($\alpha$-path) In the canonical model $M^c$, if $\Sigma\twoheadrightarrow\Delta$, then the sequence of maximal-consistent sets $l=\langle \Gamma_0,\Gamma_1,\cdots,\Gamma_n \rangle$ satisfying following two conditions:\footnote{Here we abuse the notation and use $\twoheadrightarrow$ to denote the reflexive-transitive closure of the union of the canonical relations.} \begin{enumerate} \item $\Sigma=\Gamma_0$, $\Delta=\Gamma_n$; \item for any $k$ ($0\leq k<n$), there is an agent $i\in G$ such that $\Gamma_k R^T_i\Gamma_{k+1}$; \item for any $m$ ($0\leq m \leq n$), $\alpha\in\Gamma_m$. \end{enumerate} is an {\em $\alpha$-path} from $\Sigma$ to $\Delta$. \end{definition} \begin{lemma}\label{le.Cwtruthlemma} If $\textit{Cw}\phi\in\Phi$, then $\textit{Cw}\phi\in\Sigma$ iff every path from $\Sigma$ is a $\phi$-path or every path from $\Sigma$ is a $\neg\phi$-path. \end{lemma} \begin{proof} ($\Rightarrow$) Proof by induction on the length $n$ of the path. We have to prove a stronger lemma: if $\textit{Cw}\phi\in\Sigma$, then every path from $\Sigma$ is a $\phi$-path and a $\textit{Cw}\phi$-path or every path from $\Sigma$ is a $\neg\phi$-path and $\textit{Cw}$-path. When $n=0$, $l=\langle\Sigma\rangle$. Since $\Sigma$ is maximal consistent and $\phi\in\Phi$, $\phi\in\Sigma$ or $\neg\phi\in\Sigma$. And $\textit{Cw}\phi\in\Sigma$ is our premise. Induction hypothesis: If $\textit{Cw}\phi\in\Sigma$, then every path of length $n$ is a $\phi$-path and a $\textit{Cw}\phi$-path or every path of length $n$ is a $\neg\phi$-path and a $\textit{Cw}\phi$-path. Induction Step: Assume $l_n=\langle \Sigma_0,\Sigma_1,...,\Sigma_n \rangle$ is a $\phi$-path and $\textit{Cw}\phi$-path. Take a path of length $(n+1)$ from $\Sigma$. By induction hypothesis, $\textit{Cw}\phi\in\Sigma_n$. Let $i$ be the agent such that $\Sigma_n R_i^T \Sigma_{n+1}$. Since $\mathbb{PLCKWS}5\vdash \textit{Cw}\phi\to \textit{Kw}_i\phi$ and $\textit{Kw}_i\phi\in\Phi$, it must be the case that $\textit{Kw}_i\phi\in \Sigma_n$. Suppose $\phi\not\in \Sigma_{n+1}$. By the definition of $R_i^T$, there exists a $\chi$ which is not conditionals such that $\neg\textit{Kw}_i\phi\in\Sigma_n$, and $\textit{Kw}_i\phi\not\in\Sigma_n$ or $\textit{Kw}_i(\chi\in\phi)$. By $\textit{Kw}_i\phi\in\Sigma_n$, we can infer that $\textit{Kw}_i(\chi\to\phi)\not\in\Sigma_n$. Since $\textit{Cw}\phi\in\Phi$, we know that $\phi$ is itself not a conditionals. So $\textit{Kw}_i(\chi\to\phi)\in\Phi$. Thus, $\neg\textit{Kw}_i(\chi\to\phi)\in\Sigma_n$. By (Kw-Dis) and (Kw-T), we have $\{\textit{Kw}_i\phi,\neg\textit{Kw}_i(\chi\to\phi),\phi\}\vdash\textit{Kw}_i\chi$, which implies that $\textit{Kw}_i\chi\in\Sigma_n$. It contradicts to $\neg\textit{Kw}_i\chi\in\Sigma_n$. Therefore, $\phi\in\Sigma_{n+1}$. Since $\mathbb{PLCKWS}5\vdash \textit{Cw}\phi\to \textit{Ew}\textit{Cw}\phi$ and $\mathbb{PLCKWS}5\vdash \textit{Ew}\textit{Cw}\phi\to \textit{Kw}_i\textit{Cw}\phi$, it must be the case that $\textit{Kw}_i\textit{Cw}\phi\in \Sigma_n$. Similarly, we can prove that $\textit{Cw}\phi\in\Sigma_{n+1}$. Thus, for any path with (n+1) length, it is a $\phi$-path and $\textit{Cw}\phi$-path. Assume $l_n=\langle \Sigma_0,\Sigma_1,...,\Sigma_n \rangle$ is a $\neg\phi$-path and $\textit{Cw}\phi$-path. We can also prove that for any path with (n+1) length, it is a $\neg\phi$-path and $\textit{Cw}\phi$-path. ($\Leftarrow$) Suppose that every path from $\Sigma$ is a $\phi$-path or every path from $\Sigma$ is a $\neg\phi$-path. We want to prove that $\vdash\bigwedge\Sigma\to \textit{Ew}\phi$. Assume, to reach a contradiction, that $\bigwedge\Sigma\wedge\neg\textit{Ew}\phi$ is consistent. It implies that there exists $i\in\textsf{G}$ such that $\bigwedge\Sigma\wedge\neg\textit{Kw}_i\phi$ is consistent. By $\textit{Cw}\phi\in\Phi$, $\neg\textit{Kw}_i\phi\in\Phi$. So $\neg\textit{Kw}_i\phi\in\Sigma$. And we know that $\phi$ is not a conditionals. Now we are to construct two maximal consistent sets in $\Phi$, $\Gamma_1$ and $\Gamma_2$ such that $\Sigma R_i^T\Gamma_1$ and $\Sigma R_i^T\Gamma_2$ and $\phi\in\Gamma_1$ and $\neg\phi\in\Gamma_2$. Firstly, we will show the following two items: \begin{enumerate} \item\label{enumerate.1} $\{\theta\mid \theta\ \rm{is\ not\ conditionals\ and}\ \textit{Kw}_i\theta\in\Sigma\ \rm{and}\ \textit{Kw}_i(\phi\to\theta)\in\Sigma \}\cup\{\phi\}$ is consistent. \item\label{enumerate.2} $\{\theta\mid \theta\ \rm{is\ not\ conditionals\ and}\ \textit{Kw}_i\theta\in\Sigma\ \rm{and}\ \textit{Kw}_i(\neg\phi\to\theta)\in\Sigma \}\cup\{\neg\phi\}$ is consistent. \end{enumerate} As for~\ref{enumerate.1}, assume that it is not consistent. It implies that there exist $\theta_1,\cdots,\theta_n$ in it such that $\vdash(\theta_1\wedge\cdots\wedge\theta_n)\to\neg\phi$ and $\textit{Kw}_i\theta_k\in\Sigma$ and $\textit{Kw}_i(\phi\to\theta_k)\in\Sigma$ for all $1\leq k\leq n$. By (Kw-NEC), $\vdash\textit{Kw}_i((\theta_1\wedge\cdots\theta_n)\to\neg\phi)$. By Proposition \ref{prop.bigwedge}.1, we infer that $\textit{Kw}_i\phi\in\Sigma$. Contradiction. As for~\ref{enumerate.2}, assume that it is not consistent. It implies that there exist $\theta_1,\cdots,\theta_n$ in it such that $\vdash(\theta_1\wedge\cdots\wedge\theta_n)\to\phi$ and $\textit{Kw}_i\theta_k\in\Sigma$ and $\textit{Kw}_i(\neg\phi\to\theta_k)\in\Sigma$ for all $1\leq k\leq n$. By (Kw-NEC), $\vdash\textit{Kw}_i((\theta_1\wedge\cdots\theta_n)\to\phi)$. By Proposition \ref{prop.bigwedge}.2, we infer that $\textit{Kw}_i\phi\in\Sigma$. Contradiction. Thus, these two consistent sets can be extended to two maximal consistent sets $\Gamma_1$ and $\Gamma_2$, according to Lindenbaum lemma. Accroding to the definition of $R_i^T$, $\Sigma R_i^T\Gamma_1$ and $\Sigma R_i^T\Gamma_2$ and $\phi\in\Gamma_1$ and $\neg\phi\in\Gamma_2$. It contradicts to our supposition that every path from $\Sigma$ is a $\phi$-path or every path from $\Sigma$ is a $\neg\phi$-path. So we have $\vdash\bigwedge\Sigma\to\textit{Ew}\phi$. By (Cw-NEC) and (Cw-Ind), $\vdash\bigwedge\Sigma\to\textit{Cw}\phi$. Therefore, $\textit{Cw}\phi\in\Sigma$. \end{proof} \begin{lemma}\label{le.truthlemma} (Finite Truth Lemma) For any $\textbf{PLKwCw}$-formula $\psi$, for all $\Sigma\in W^c$, we have $\mathcal{M}^c,\Sigma\models\psi$ iff $\psi\in\Sigma$. \end{lemma} \begin{proof} By induction on $\psi$: $\bullet$ When $\psi$ is a Boolean formula or is $\textit{Kw}_i\phi$, the proof can be shown as in \cite{Fan2015CONTINGENCY}. $\bullet$ When $\psi=\textit{Cw}\phi$: `Only if': Suppose that $\textit{Cw}\phi\not\in\Sigma$. By Lemma $\ref{le.Cwtruthlemma}$, there exist two paths $l_1$ and $l_2$ such that $l_1$ is not a $\phi$-path and $l_2$ is not a $\neg\phi$-path. Thus, there must be a $\Delta_1\in l_1$ such that $\neg\phi\in\Delta_1$ and a $\Delta_2\in l_2$ such that $\phi\in\Delta_2$. By induction hypothesis, we have $M^c,\Delta_1\vDash\neg\phi$ and $M^c,\Delta_2\vDash\phi$. By the definition \ref{def.path}, $\Sigma\twoheadrightarrow\Delta_1$ and $\Sigma\twoheadrightarrow\Delta_2$. Thus, $M^c,\Sigma \nvDash \textit{Cw}\phi$. `If': Assume $\mathcal{M}^c,\Sigma\not\models \textit{Cw}\phi$. By the semantics of $\textit{Cw}\phi$, there exist $\Delta_1$, $\Delta_2\in W^c$ with $\Sigma\twoheadrightarrow\Delta_1$, $\Sigma\twoheadrightarrow\Delta_2$, such that $\mathcal{M}^c,\Delta_1\models\phi$ and $\mathcal{M}^c,\Delta_2\models \neg\phi$. By induction hypothesis, $\phi\in\Delta_1$ and $\neg\phi\in\Delta_2$. Thus, there exists a path $l_1$ where $\Delta_1\in l_1$ such that $l_1$ us not a $\neg\phi$-path and there also exists a path $l_2$ where $\Delta_2\in l_2$ such that $l_2$ is not a $\phi$-path. By Lemma \ref{le.Cwtruthlemma}, $\textit{Cw}\phi\not\in\Sigma$. \end{proof} By Lemma \ref{le.truthlemma}, we obtain the completeness of $\mathbb{PLCKWS}5$. \begin{theorem}\label{th.completeness} The logic $\mathbb{PLCKWS}5$ is weakly complete with respect to $\mathcal{S}5$. \end{theorem} \section{Expressivity}\label{sec.expressivity} In this section, we will compare the expressivity of $\textit{Cw}_5$ with that of common knowledge, since both notions are inspired by the hierarchy of inter-knowledge of a group given in \cite{parikh1992levels}. The two languages are: \[ \begin{array}{l l} \textbf{PLKwCw}_5 & \phi ::= p \mid \neg \phi \mid (\phi \land \phi)\mid \textit{Kw}_i\phi \mid \textit{Cw}_5\phi \\ \ensuremath{\textbf{PLKC}} & \phi::= p\mid \neg\phi\mid (\phi\wedge\phi)\mid K_i\phi \mid C\phi \nonumber \end{array} \] \subsection{$\textbf{PLKwCw}_5$ is Bisimulation Invariant} \begin{definition} Let $M=\langle W,R,V\rangle$ and $M'=\langle W',R',V'\rangle$ be two Kripke models. A non-empty binary relation $Z\subseteq W\times W'$ is called bisimulation between $M$ and $M'$, written as $M\cong M'$, if the following conditions are satisfied: (i) If $wZ'w'$, then $w$ and $w'$ satisfy the same proposition letters. (ii) if $wZ'w'$ and $wRv$, then there is a $v'\in W'$ such that $vZv'$ and $w'R'v'$. (iii) If $wZ'w'$ and $w'R'v'$, then there exists $v\in W$ such that $vZv'$ and $wRv$. When $Z$ is a bisimulation linking two states $w$ in $M$ and $w'$ in $M'$, we say that two pointed models are bisimilar and write $Z: (M,w)\cong(M',w')$. If a language $L$ cannot distinguish any pair of bisimilar models, $L$ is bisimulation invariant. \end{definition} \begin{theorem} $\textbf{PLKwCw}_5$ is bisimulation invariant. \end{theorem} \begin{proof} By induction on formulas $\phi$ of $\textbf{PLKwCw}_5$. When $\phi$ is a Boolean formula, the proof is classical. When $\phi=Kw_i\psi$, we prove it in three cases. For arbitrary two bisimilar models $(M,r)$ and $(N,t)$, we have: \begin{itemize} \item if $M,r\models Kw_i\psi$ and for all $r_n$ with $r\to_Mr_n$, $M,r_n\models\psi$. Since $M,r\cong N,t$, for any $t_n$ with $t\to_Nt_n$, there is an $r_n$ such that $r\to_Mr_n$ and $M,r_n\cong N,t_n$. By induction hypothesis, $\psi$ is bisimulation invariant. Thus $N,t_n\models\psi$. So $N,t\models K_i\psi$. \item if $M,r\models Kw_i\psi$ and for all $r_n$ with $r\to_Mr_n$, $M,r_n\models\neg\psi$, similar to above case. \item if $M,r\models\neg Kw_i\psi$, that means there are $r_1$ with $r\to_Mr_1$ and $r_2$ with $r\to_Mr_2$, such that $M,r_1\models\psi$ and $M,r_2\models\neg\psi$. Since $M,r\cong N,t$, there are $t_1$ with $t\to_N t_1$ and $t_2$ with $t\to_N t_2$, such that $M,r_1\cong N,t_1$ and $M,r_2\cong N,t_2$. By induction hypothesis, $\psi$ is bisimulation invariant. Thus $N,t_1\models\psi$ and $N,t_2\models\neg\psi$. Thus $N,t\models \neg Kw_i\psi$. Thus, $Kw_i\psi$ is bisimulation invariant. \end{itemize} When $\phi=Cw_5\psi$, assume two bisimular models $(M,r)$ and $(N,t)$, such that $M,r\models Cw_5\psi$ and $N,t\models \neg Cw_5\psi$. That means there exists a sequence of agents $s$, such that $M,r\models Kw_s\psi$ and $N,t\models \neg Kw_s\psi$. Let $s=\langle i_1,i_2,...,i_n \rangle$. So $M,r\models Kw_{i_1}\gamma$ and $N,t\models\neg Kw_{i_1}\gamma$, where $\gamma=Kw_{\langle i_2,i_3,...,i_n\rangle}\psi$. However, we have proved that for any formula of the form $Kw_{i_1}\gamma$, they are bisimulation invariant. Thus, if $M,r\models Kw_{i_1}\gamma$, there must be $N,t\models Kw_{i_1}\gamma$. Contradiction. \smallskip Therefore, we proved that $\textbf{PLKwCw}_5$ is bisimulation invariant. \end{proof} \subsection{$\ensuremath{\textbf{PLKC}}$ and $\textbf{PLKwCw}_5$} Although $\textit{Cw}_5$ is formed merely with $\textit{Kw}$, which can be defined by classical operator $\ensuremath {\textit{K}}$, surprisingly, $\textit{Cw}_5$ is not expressible in $\ensuremath{\textbf{PLKC}}$. We prove it by constructing two classes of models, which {\em no} $\ensuremath{\textbf{PLKC}}$-formula can distinguish whereas some $\textbf{PLKwCw}_5$-formula can. The following definitions and lemmas facilitate our proofs. \begin{definition}{(Modal Depth)} The modal depth of a $\ensuremath{\textbf{PLKC}}$-formula is defined by: \[ \begin{array}{ll} d(p)=1; & d(\neg\phi)=d(\phi);\\ d(\phi\wedge\psi)=max\{d(\phi),d(\psi)\};& d(\ensuremath {\textit{K}}\phi)=d(\phi)+1;\\ d(\textit{C}\phi)=d(\phi)+1. \end{array}\] \end{definition} To construct two classes of models, we first define two kinds of sets of possible worlds. \begin{definition} For every $n\geq 1$, we inductively define two sets of possible worlds $T_n$ and $Z_n$: \begin{itemize} \item $T_0=\{t_{00}\}$ and $Z_0=\{ z_0 \}$; \item If $t_i\in T_n$, then $t_{i0}\in T_{n+1}$ and $t_{i1}\in T_{n+1}$; if $z_i\in Z_n$, then $z_{i0}\in Z_{n+1}$ and $z_{i1}\in Z_{n+1}$; \item $T_n$ and $Z_n$ have no other possible worlds. \end{itemize} where $|j|$ denotes the length of the subscript sequence $j$ in each $t_j$ and $z_j$. \end{definition} Then we define two classes of models mentioned above. \begin{definition} Define the class of models $\mathcal{M}=\{\mathcal{M}_n=\lr{W_n,R_n,V_n}\mid n\in\mathbb{N}^+\}$, where \begin{itemize} \item $W_n=T_n\cup\{r,t_0\}$, \item $R_n=\{(t_i,t_{i0}),(t_i,t_{i1})\mid t_i\in T_n\}\cup\{(r,t_0),(t_0,t_{00})\}$, \item $V_n(p)=W_n-\{t_{0i}\}$, where $|i|=n+1$ and $i$ is a finite sequence of $0$s. \end{itemize} The class of models $\ensuremath{\mathcal{N}}=\{\ensuremath{\mathcal{N}}_n=\lr{W'_n,R'_n,V'_n}\mid n\in\mathbb{N}^+\}$, where \begin{itemize} \item $W_n'=W_n\cup Z_n$ \item $R'_n=R_n\cup\{(z_i,z_{i0}),(z_i,z_{i1})\mid z_i\in Z_n\}\cup\{(r,z_0)\}$ \item $V_n'(p)=V_n(p)\cup Z_n-\{z_{0i}\}$, where $|i|=1$ and $i$ is a finite sequence of $0$s. \end{itemize} \end{definition} It is easy to see that for any $n\in\mathbb{N}^+$, $M_n$ is a submodel of $N_n$. We will prove that {\em no} $\ensuremath{\textbf{PLKC}}$-formula can distinguish $\mathcal{M}$ and $\ensuremath{\mathcal{N}}$ with the $CL$-game, which is defined below. \weg{\begin{definition} For every $n\geq 1$, define two sets of possible worlds $T_n$ and $Z_n$ with induction: \begin{itemize} \item $t_{00}\in T_n$; $z_0\in Z_n$ \item If $t_i\in T_n$, then $t_{i0}\in T_n$ and $t_{i1}\in T_n$; if $z_i\in Z_n$, then $z_{i0}\in Z_n$ and $z_{i1}\in Z_n$ \item For every $t_j\in T_n$, $|j|\leq n+2$; for every $z_j\in Z_n$, $|j|\leq n+1$ \item Besides $t_i$ defined above, $T_n$ has no more possible worlds; besides $z_i$ defined above, $Z_n$ has no more possible worlds. \end{itemize} Then define the class of models $M=\{M_n=\langle W_n,R_n,V_n\rangle\mid n\in \mathbb{N}\}$ as follows: for every $n\geq 1$, \begin{itemize} \item $W_n=\{r\}\cup T_n\cup \{t_0\}$ \item $R_n=\{\langle t_i,t_{i0}\rangle,\langle t_i,t_{i1}\rangle \mid t_i\in T_n, t_{i0}\in T_n\}\cup \{\langle r,t_0\rangle,\langle t_0,t_{00}\rangle\}$ \item $V_n(p)=W_n-\{t_{0i}\}$, where $|i|=n+1$, $i\in\{0\}^+$。 \end{itemize} Define the class of models $N=\{N_n=\langle W'_n,R'_n,V'_n\rangle\mid n\in \mathbb{N}\}$ with $M$: for every $n\geq 1$: \begin{itemize} \item $W'_n=W_n\cup Z_n$ \item $R'_n=R_n\cup \{\langle z_i,z_{i0}\rangle,\langle z_i,z_{i1}\rangle\mid z_i\in Z_n, z_{i0}\in Z_n \}$ \item $V'_n(p)=V_n(p)\cup Z_n-\{z_{0i}\}$, where $|i|=n$, $i\in\{0\}^+$ \end{itemize} \end{definition} The first models $M_1$ and $N_1$ in $M$ and $N$ are shown as Figure 3. \begin{figure}[htb]\label{fig.m1n1} \centering \begin{minipage}[c]{0.5\textwidth} \centering \xymatrix@C-20pt@R-10pt{&&r:p\ar[dr]&&& \\ &&&t_0:p\ar[d] && \\ &&&t_{00}:p\ar[dl]\ar[d]&& \\ &&t_{000}:\neg p&t_{001}:p&& } \end{minipage} \centering \begin{minipage}[c]{0.5\textwidth} \centering \xymatrix@C-20pt@R-10pt{&&&&r:p\ar[dr]\ar[dl]&&& \\ &&&z_0:p\ar[dl]\ar[d]&&t_0:p\ar[d] && \\ & &z_{00}:\neg p&z_{01}:p&&t_{00}:p\ar[dl]\ar[d]&& \\ &&&&t_{000}:\neg p&t_{001}:p&& } \end{minipage} \caption{$M_1$(top) and $N_1$(bottom)} \end{figure} The model $N_n$ is constructed by adding a new subtree rooted with $z_0$ to the root $r$ and just make $p$ unsatisfied on the leaf node whose index only consists of $0$. } \begin{definition}\label{df.clgame} A $CL$-game is a game with two players, duplicator and spoiler, playing on a Kripke-model. Given two Kripke models $M=\langle W,R,V\rangle$ and $M'=\langle W',R',V'\rangle$, from an arbitrary node $w$ in $W$ and an arbitrary node $w'$ in $W'$, play games in $n$ rounds between duplicator and spoiler as following rules: \begin{itemize} \item When $n=0$, if the sets of satisfied formulas on node $w$ and $w'$ are the same, then duplicator wins; otherwise, spoiler wins. \item When $n\not=0$, \begin{itemize} \item $K$-move: If spoiler starting from node $w$ does $K$-move to node $x$ which can be reached by $R$, then duplicator starting from $w'$ does $K$-move to a node $y$ in $W'$ with the same set of satisfied propositional variables as $x$. If spoiler starts from $w'$, then duplicator starts from $w$ with similar way to move. \item $C$-move: If spoiler starting from node $w$ does $C$-move to node $x$ which can be reached by $\twoheadrightarrow$, then duplicator starting from $w'$ does $C$-move to a node $y$ in $W'$ with same set of satisfied propositional variables to $x$. If spoiler starts from $w'$, then duplicator starts from $w$ with similar way to move. \end{itemize} In the game, for arbitrary $x\in W$ and $y\in W'$, we say $(x,y)$ or $(y,x)$ is a state of $CL$-game. \end{itemize} \end{definition} If there is a winning strategy for duplicator in $n$-round games, $(M_n,r)$ and $(N_n,r)$ agree on all $KCL$-formulas whose modal depth is $n$. \begin{lemma}\label{th.nwscl} For arbitrary $n\in \mathbb{N}$, duplicator has a winning strategy in the $CL$-game on $(M_n,r)$ and $(N_n,r)$ in $n$ rounds. \end{lemma} \begin{proof} We describe duplicator’s winning strategy case by case. Starting with the initial state $(r,r)$, we mainly concerns the case where spoiler does a $K$-move. Otherwise, duplicator can move to a isomorphic sub-model such that there must be a winning strategy in following rounds. Thus, the cases below exhaust all possibilities. \begin{itemize} \item The initial state is $(r,r)$: \begin{itemize} \item If spoiler does a $K$-move or a $C$-move on $M_n$ reaching $t_i$, then duplicator does a $K$-move or a $C$-move on $N_n$ to reach the corresponding $t_i$. Since $(M_n,t_i)\cong (N_n,t_i)$, there is a winning strategy after this move. \item If spoiler does a $K$-move or a $C$-move on $N_n$ reaching $t_i$, then duplicator does a $K$-move or a $C$-move on $M_n$ to reach the corresponding $t_i$. Since $(M_n,t_i)\cong (N_n,t_i)$, there is a winning strategy after this move. \item If spoiler does a $K$-move on $N_n$ reaching $z_0$, duplicator moves to $t_0$. \item If spoiler does a $C$-move on $N_n$ reaching an arbitrary node $z_{i(i\not=0)}$ in $Z_n$, then duplicator does a $C$-move to reach $t_{0i}$. Since $(M_n,t_{0i})\cong (N_n,z_i)$, there is a winning strategy after this move. \end{itemize} \item The current state is $(z_0,t_0)$: \begin{itemize} \item If spoiler does a $K$-move reaching $z_{00}$ or $z_{01}$, then duplicator moves on $M_n$ to reach $t_{00}$. \item If spoiler does a $K$-move reaching $t_{00}$ on $M_n$, then duplicator moves to $z_{00}$ on $N_n$. \item If spoiler does a $C$-move reaching $z_{i(i\not=0)}$, then duplicator moves to $t_{0i}$. Since $(M_n,t_{0i})\cong (N_n,z_i)$, there is a winning strategy after this move. \item If spoiler does a $C$-move reaching $t_{00}$ on $M_n$, then duplicator moves to $z_{00}$ on $N_n$. \item If spoiler does a $C$-move reaching $t_{0i(i\not=0)}$\footnote{The notation $t_{0i}$ is correct since the index for every node in $T_n$ begins with $0$.}, then duplicator moves to $z_i$ on $N_n$. Since $(M_n,t_{0i})\cong (N_n,z_i)$, there is a winning strategy after this move. \end{itemize} \item The current state is $(z_i,t_i)$ and $i\not=0$: this means before the game gets to this state, both players have only done $K$-moves. In the current state, there have been at most $(n-1)$ rounds. Thus, $i\leq (n-1)$ and players can do next round as follows: \begin{itemize} \item If spoiler does a $K$-move reaching $z_{i0}$ or $z_{i1}$, then duplicator does a $K$-move to reach $t_{i0}$ where $M_n,t_{i0}\models p$ since $|i0|=|i1|=(i+1)\leq n$ and there are $N_n,z_{i0}\models p$ and $N_n,z_{i1}\models p$. \item If spoiler does a $K$-move or a $C$-move reaching $t_{i0}$ or $t_{i1}$, then duplicator does a $K$-move or a $C$-move to reach $z_{i0}$ where $M_n, z_{i0}\models p$ since $|i0|=|i1|=(i+1)\leq n$ and there are $N_n,t_{i0}\models p$ and $N_n,t_{i1}\models p$. \item If spoiler does a $C$-move reaching $z_{j(|j|>|i|)}$, then duplicator does a $C$-move to reach $t_{0j}$. Since $(M_n,t_{0j})\cong (N_n,z_j)$, there is a winning strategy after this move. \item If spoiler does a $C$-move reaching $t_{0i(i\not=0)}$, duplicator moves to $z_i$ on $N_n$. Since $(M_n,t_{0i})\cong (N_n,z_i)$, there is a winning strategy after this move. \end{itemize} \end{itemize} Therefore, for arbitrary $n\in \mathbb{N}$, there is a winning strategy for duplicator in the $n$-round $CL$-game over $(M_n,r)$ and $(N_n, r)$. \end{proof} For an arbitrary $\ensuremath{\textbf{PLKC}}$-formula $\phi$, $\phi$ has finite modal depth $n$. By Lemma \ref{th.nwscl}, $\phi$ is satisfied both on $(M_n,r)$ and $(N_n,r)$, which means $\phi$ cannot distinguish $(M_n,r)$ and $(N_n,r)$. This implies that we can never find a $\ensuremath{\textbf{PLKC}}$-formula $\phi$ to distinguish the class of models $M$ and $N$. But we can find a $\textbf{PLKwCw}_5$-formula $\textit{Kw}_i\textit{Cw}^5 p$ to distinguish them since for every $(M_n,r)\in M$, $M_n,r\models \textit{Kw}_i\textit{Cw}_5 p$ and for every $(N_n,r)\in N$, $N_n,r\models \neg\textit{Kw}_i\textit{Cw}_5 p$. Therefore, following Theorem \ref{th.nkwcwlwtkcl} can be proved. \begin{theorem}\label{th.nkwcwlwtkcl} Over $\mathcal{K}$, $\textbf{PLKwCw}_5$ is not expressivity weaker than $\ensuremath{\textbf{PLKC}}$. \end{theorem} This will follow that over $\mathcal{K}$, $\textbf{PLKwCw}_5$ and $\ensuremath{\textbf{PLKC}}$ are incomparable in expressivity. This is because $\ensuremath{\textbf{PLKC}}$ is also not expressively weaker than $\textbf{PLKwCw}_5$. To see this, consider two models $\mathcal{M}_1$ and $\mathcal{M}_2$, where in $\mathcal{M}_1$, $s_1$ can only see a $p$-world, and in $\mathcal{M}_2$, $s_2$ can only see a $\neg p$-world. It is straightforward to check that $\mathcal{M}_1,s_1\vDash\ensuremath {\textit{K}} p$ but $\mathcal{M}_2,s_2\nvDash\ensuremath {\textit{K}} p$, thus $\ensuremath{\textbf{PLKC}}$ can distinguish between these pointed models. However, one can show that these two pointed models cannot be distinguished by $\textbf{PLKwCw}_5$-formulas. \section{$\textbf{PLKwCw}_5$ over Binary Trees}\label{sec.binarytrees} Because of the invalidity of the formula $ (Cw_5\phi\wedge Cw_5\psi)\to Cw_5(\phi\wedge \psi)$, the operator $Cw_5$ is not normal, in the sense that it cannot be defined with some closures of accessibility relations standardly. However, an interesting observation over binary-tree models can be proved. \begin{definition} $(M,r)$ is a binary-tree model with root $r$ if $(M,r)$ is a tree model with root $r$ and for any node $t$ in $M$, $t$ has precisely two successors. \end{definition} \begin{theorem}\label{th.bt} Consider the single-agent case. If $M,r\models Cw_5\phi$ where $(M,r)$ is a binary tree with root $r$, then on every layer of $(M,r)$, the number of the nodes where $\phi$ is satisfied is even. \end{theorem} In order to prove Theorem~\ref{th.bt}, we need to prove a stronger theorem: \begin{theorem}\label{th.bts} For an arbitrary formula $\phi$, if $M$ is a binary-tree model, then $M,v_m\models Kw_i^n\phi \ (1\leq n)$ iff the number of the $\phi$-satisfied nodes on the $(|m|+n)$th layer that $v_m$ can reach via relation $\twoheadrightarrow$ is even. \end{theorem} \begin{proof} Given a binary tree $(M,v_0)$, where $v_0$ is the root, we firstly define the index of $M$ as follows: if there are nodes $v_m$, $t$, $r$ in $M$ and $v_m\to_it$, $v_m\to_ir$, then define the index of $t$ as $v_{m0}$ and the index of $r$ as $v_{m1}$. Let $v_m$ be an arbitrary node in $M$. Do induction on $n$: \begin{itemize} \item When $n=1$, \begin{itemize} \item Assume $M,v_m\models Kw_i\phi$. Since $M$ is a binary tree, there must be two nodes, $v_{m0}$ and $v_{m1}$ such that $v_m\to_iv_{m0}$ and $v_m\to_iv_{m1}$. Since $M,v_m\models Kw_i^n\phi$, we have ($M,v_{m0}\models\phi$ and $M,v_{m1}\models\phi$) or ($M,v_{m0}\models\neg\phi$ or $M,v_{m1}\models\neg\phi$). Thus, on the $(|m|+1)$th layer, the number of nodes where $\phi$ is satisfied is 2 or 0, both of which are even. \item Assume the number of the nodes on the $(|m|+1)$th layer that $v_m$ can reach is even. That means there are only two possible cases: ($M,v_{m0}\models\phi$ and $M,v_{m1}\models\phi$) or ($M,v_{m0}\models\neg\phi$ or $M,v_{m1}\models\neg\phi$). Thus, we have $M,v_m\models Kw_i\phi$. \end{itemize} \item Induction hypothesis: when $n=k$, $M,v_m\models Kw_i^k\phi (1\leq n)$ $\Leftrightarrow$ the number of the $\phi$-satisfied nodes on the $(|m|+k)$th layer that $v_m$ can reach via relation $\twoheadrightarrow$ is even. \item When $n=k+1$, \begin{itemize} \item Assume $M,v_m\models Kw_i^{k+1}\phi$, which is equivalent to $M,v_m\models Kw_i^k Kw_i\phi$. Let $T$ be the set of nodes exactly consisting of all $Kw_i\phi$-satisfied nodes on the $(|m|+k)$th layer that $v_m$ can reach via relation $\twoheadrightarrow$. By induction hypothesis, $|T|$ is even. let $|T|=2a$. Thus, among all the successors of $T$, the number of $\phi$-satisfied nodes is $2x+0y$, where $x+y=2a$. $2x+0y$ is surely an even number. Let $S$ be a set of nodes only consisting of $\neg Kw_i\phi$-satisfied nodes on the $(|m|+k)$th layer that $v_m$ can reach via relation $\twoheadrightarrow$. Since $M$ is a binary tree, let $|S|=2b$. For every node in $S$ has only one $\phi$-satisfied successor, among all the successors of $S$, the number of $\phi$-satisfied nodes is $2b$. Thus, the number of $\phi$-satisfied nodes on the $(|m|+k+1)$th layer is $2x+2b=2(x+b)$ which must be even. \item Assume $M,v_m\not\models Kw_i^{k+1}\phi$, which means $M,v_{m0}\models Kw_i^k\phi$ and $M,v_{m1}\models \neg Kw_i^k\phi$. By induction hypothesis, the number of the $\phi$-satisfied nodes on the $(|m|+k+1)$th layer that $v_{m0}$ can reach via relation $\twoheadrightarrow$ is even. And the number of the $\phi$-satisfied nodes on the $(|m|+k+1)$th layer that $v_{m1}$ can reach via relation $\twoheadrightarrow$ is odd. That means that the $\phi$-satisfied nodes on the $(|m|+k+1)$th layer that $v_m$ can reach via relation $\twoheadrightarrow$ is an even number plus an odd number, which equals to an odd number. \end{itemize} \end{itemize} \end{proof} \begin{remark} Theorem \ref{th.bt} can be extended into a more general conclusion considering the multi-agent case: on any $G$-binary-tree model\footnote{A $G$-binary-tree model is a tree model where every node exactly has two $R_i$-successors for every $i\in G$.} $(M,r)$ where $r$ is the root, $M,r\models Cw_5\phi$ iff for any sequence of agents $s$ in $G$, on every layer of the subtree (of $(M,r)$) generated with $s$\footnote{A subtree (of some tree model $(M,r)$) generated with a sequence of agents $s$ is a subtree rooted with $r$ which only consists of all $s$-paths starting with $r$ in $(M,r)$.}, the number of the $\phi$-satisfied nodes is even. \end{remark} \section{Conclusion and Future work}\label{sec.conclusions} This is a preliminary report on `commonly knowing whether'. We defined five possible notions of `commonly knowing whether' and studied how they are related to one another. On $\mathcal{S}5$-frames four of the five notions collapse. We prove the soundness and weak completeness of a `commonly knowing whether' logic on that class of frames. Finally, we study the expressivity of one of the proposed languages with respect to the standard common knowledge modal language on $\mathcal{K}$-frames. There are a lot of future work to be done. For instance, the axiomatizations of $\textit{Cw}_1$ over $\mathcal{K}$ and over the class of other various frame classes, the axiomatizations and relative expressivity of other definitions for `commonly knowing whether'. \section*{Acknowledgement} The authors are greatly indebted to Yanjing Wang for many insightful discussions on the topics of this work and helpful comments on earlier versions of the paper. Jie Fan acknowledges the support of the project 17CZX053 of National Social Science Fundation of China. Xingchi Su was financially supported by Chinese Scholarship Council (CSC) and we wish to thank CSC for its fundings. \bibliographystyle{plain}
\section{Introduction} As it is familiar for the scalar and Dirac propagators, the propagator of the vector boson $V$ between two space-time locations $x$ and $y$ can be considered as a two-point correlator, i.e.\ as the vacuum expectation value of the time ordered product of the vector potential at these two locations, \begin{equation}\label{vacexp} D_V^{\mu\nu}(x-y)=\langle 0|{\cal T}\{V^\mu(x)V^\nu(y)\}|0\rangle. \end{equation} However, in order to get to the momentum space representation of this propagator, one needs to use the completeness relation for the polarisation four-vectors. This is not an easy task, as this completeness relation is not given uniquely for a complete set of four polarisation states. As it is well known, a massless vector boson like the photon has two polarisation states. For a massive vector boson ($W^\pm$ or $Z$), in addition there is a longitudinal polarisation state. However, the addition of a time-like polarisation state is not unique and depends on the gauge we use, as we will show in this paper. In order to get to this point, we construct the propagator of the vector boson in a semi-classical way as Green's function obeying the canonical equation of motion, derived as Euler--Lagrange equation from the Lagrange density containing a gauge fixing term, \begin{equation} {\cal L}=-\frac12\partial_\mu V_\nu(\partial^\mu V^\nu-\partial^\nu V^\mu) +\frac12m_V^2 V_\mu V^\mu-\frac1{2\xi_V}(\partial_\mu V^\mu)^2, \end{equation} a result which will be derived in Sec.~5. $\xi_V$ is the gauge parameter in general $R_\xi$ gauge. The solution of the Euler--Lagrange equation leads to a propagator \begin{equation}\label{greens} D_V^{\mu\nu}(x-y)=\int\frac{d^4k}{(2\pi)^4} \frac{-iP^{\mu\nu}(k)e^{-ik(x-y)}}{k^2-m_V^2+i\epsilon},\qquad P_V^{\mu\nu}(k):=\eta^{\mu\nu}-(1-\xi_V)\frac{k^\mu k^\nu}{k^2-\xi_Vm_V^2} \end{equation} with a definite second rank tensor structure $P_V^{\mu\nu}$ which we call the gauge boson projector. $(\eta^{\mu\nu})=\mbox{diag}(1;-1,-1,-1)$ is the Minkowski metric. The paper is organised as follows. In Sec.~2 we introduce the gauge boson projector. As a naive extension of the completeness relation for the polarisation vectors fails, we offer a pragmatic solution which will be explained in the following. In Sec.~3 we start with the Lagrange density of the photon and explain why the solution of the corresponding Euler--Lagrange equation needs a gauge fixing term. For a general $R_\xi$ gauge we solve the equation for the Green's function. A recourse to historical approaches is needed to understand the occurence of primary and secondary constraints. In Sec.~4 the quantisation of the photon field is continued in a covariant manner. In Sec.~5 we explain the appearance of a mass term via the Higgs mechanism and the restriction of the gauge degrees of freedom in this case, leading to the unitary gauge as the default setting for massive vector bosons. In Sec.~6 we explain and give an example for the gauge independence of physical processes. Our conclusions and outlook are found in Section~7. For the basics we refer to Refs.~\cite{Jackson,LandauLifshitz,Greiner,PeskinSchroeder,BohmDennerJoos}. \section{The gauge boson projector} The gauge boson projector as central tensorial object $P_V^{\mu\nu}(k)$ in Eq.~(\ref{greens}) takes the simplest form $P_V^{\mu\nu}(k)=\eta^{\mu\nu}$ for the Feynman gauge ($\xi_V=1$). For Landau gauge $\xi_V=0$ one obtains a purely transverse projector $P_V^{\mu\nu}(k)=\eta^{\mu\nu}-k^\mu k^\nu/k^2$, and for the unitary gauge $\xi_V\to\infty$ one has $P_V^{\mu\nu}(k)=\eta^{\mu\nu}-k^\mu k^\nu/m_V^2$ which is transverse only on the mass shell $k^2=m_V^2$. But why do we talk about a projector at all? A comparison with the construction of the fermion propagator can help to explain the conceptual approach employed in this paper. \subsection{Construction of the fermion propagator} As for the gauge boson propagator, there are in principle two ways to construct the fermion propagator. As a Green's function the fermion propagator has to solve the equation \begin{equation} (i\gamma^\mu\partial_\mu-m)S(x-y)=i\delta^{(4)}(x-y) \end{equation} equivalent to the Dirac equation $(i\gamma^\mu\partial_\mu-m)\psi(x)=0$ as the corresponding Euler--Lagrange equation. In momentum space this equation reads $(p\kern-5pt/-m)\tilde S(p)=i$ (with $p\kern-5pt/:=\gamma^\mu p_\mu$) which can be solved by $\tilde S(p)=i/(p\kern-5pt/-m)$. Note that the inverse of the matrix $(p\kern-5pt/-m)$ is well defined, since $(p\kern-5pt/-m)(p\kern-5pt/+m)=p^2-m^2$. Back to configuration space one has \begin{equation} S(x-y)=\int\frac{d^4p}{(2\pi)^4}\frac{ie^{-ip(x-y)}}{p^2-m^2+i\epsilon}(p\kern-5pt/+m), \end{equation} where we have added an infinite imaginary shift $+i\epsilon$ to obtain a Feynman propagator. On the other hand, the fermion propagator is defined again as two-point correlator, i.e.\ as the vacuum expectation value of the time-ordered product of the spinor and the adjoint spinor, \begin{eqnarray} S_{ab}(x-y)&=&\langle 0|{\cal T}\{\psi_a(x)\bar\psi_b(y)\}|0\rangle\nonumber\\ &=&\sum_{i=1}^2\int\frac{d^3p}{(2\pi)^3}\frac1{2E(\vec p\,)}\left[ u_i(\vec p\,)\bar u_i(\vec p\,)e^{-ip(x-y)} +v_i(\vec p\,)\bar v_i(\vec p\,)e^{ip(x-y)}\right]_{ab}\nonumber\\ &=&\int\frac{d^3p}{(2\pi)^3}\frac1{2E(\vec p\,)}\left[ (\gamma^\mu p_\mu+m)e^{-ip(x-y)}+(\gamma^\mu p_\mu-m)e^{ip(x-y)}\right]_{ab} \nonumber\\ &=&(i\gamma^\mu\partial_\mu+m)_{ab}\int\frac{d^3p}{(2\pi)^3} \frac1{2E(\vec p\,)}\left[e^{-ip(x-y)}-e^{ip(x-y)}\right]\nonumber\\ &=&(i\gamma^\mu\partial_\mu+m)_{ab}\int\frac{d^3p}{(2\pi)^3} \int\frac{dp^0}{2\pi i}\frac{-e^{-ip(x-y)}}{p^2-m^2+i\epsilon}\nonumber\\ &=&(i\gamma^\mu\partial_\mu+m)_{ab}\int\frac{d^4p}{(2\pi)^4} \frac{ie^{-ip(x-y)}}{p^2-m^2+i\epsilon}\nonumber\\ &=&\int\frac{d^4p}{(2\pi)^4}(p\kern-5pt/+m)_{ab} \frac{ie^{-ip(x-y)}}{p^2-m^2+i\epsilon}, \end{eqnarray} where we have started with the field operators \begin{equation} \psi(x)=\sum_{i=1}^2\int\frac{d^3p}{(2\pi)^3}\frac1{\sqrt{2E(\vec p\,)}} \left(b_i(\vec p\,)u_i(\vec p\,)e^{-ipx}+\tilde b_i^\dagger(\vec p\,) v_i(\vec p\,)e^{ipx}\right) \end{equation} and $\bar\psi(x)=\psi^\dagger(x)\gamma^0$ with the only non-vanishing antimutators \begin{equation} \{b_i(\vec p\,),b_j^\dagger(\vec p')\}=(2\pi)^3\delta_{ij}\delta^{(3)} (\vec p-\vec p'),\qquad\{\tilde b_i(\vec p\,),\tilde b_j^\dagger(\vec p')\} =(2\pi)^3\delta_{ij}\delta^{(3)}(\vec p-\vec p'), \end{equation} where we have used the completeness relations \begin{equation} \sum_{i=1}^2u_i(\vec p\,)\bar u_i(\vec p\,)=\gamma^\mu p_\mu+m,\qquad \sum_{i=1}^2v_i(\vec p\,)\bar v_i(\vec p\,)=\gamma^\mu p_\mu-m, \end{equation} and, finally, where we have used Cauchy's theorem to write the integral in a compact four-dimensional form. The result is quite obviously the same as the one obtained via the Green's function. Still, one might become aware of the central link, given by the completeness relations. A similar construction should work also for the gauge boson propagator. \subsection{Construction of the gauge boson propagator} As for the quantisation of the fermion field operator we summed over the spin polarisation states $i=1,2$ (corresponding to up and down spin), it is natural to assume that for quantisation of the gauge boson field operator we have to sum over the polarisations $\lambda$. Still, the (silent) assumption that the summation runs over {\em all\/} possible (four) polarisation states will have to be looked over again, as it will turn out. Up to that point, we use the summation sign indexed by $\lambda$ without specifying the set of polarisations it runs over. Therefore, starting with \begin{equation}\label{Vquant} V^\mu(x)=\sum_\lambda\int\frac{d^3k}{(2\pi)^3}\frac1{\sqrt{2\omega(\vec k\,)}} \left[\varepsilon^\mu(\vec k,\lambda)a(\vec k,\lambda)e^{-ikx} +\varepsilon^{\mu*}(\vec k,\lambda)a^\dagger(\vec k,\lambda)e^{ikx}\right] \end{equation} with $[a(\vec k,\lambda),a^\dagger(\vec k',\lambda')]=(2\pi)^3 \delta_{\lambda\lambda'}\delta^{(3)}(\vec k-\vec k')$ and $\omega^2(\vec k\,)=\vec k^2+m_V^2$, the calculation of the two-point correlator leads to \begin{eqnarray} \lefteqn{D_V^{\mu\nu}(x-y)\ =\ \langle 0|{\cal T}\{V^\mu(x)V^\nu(y)\} |0\rangle}\nonumber\\ &=&\sum_\lambda\int\frac{d^3k}{(2\pi)^3}\frac1{2\omega(\vec k\,)}\left[ \varepsilon^\mu(\vec k,\lambda)\varepsilon^{\nu*}(\vec k,\lambda)e^{-ik(x-y)} -\varepsilon^\nu(\vec k,\lambda)\varepsilon^{\mu*}(\vec k,\lambda)e^{ik(x-y)}\right]. \end{eqnarray} However, what kind of completeness relation we can use in this case? We know that there are at least two physical polarisation directions which are orthogonal to each other and at the same time orthogonal to the wave vector $\vec k$, \begin{equation} \vec k\cdot\vec\varepsilon(\vec k,\lambda)=0,\qquad \vec\varepsilon(\vec k,\lambda)\cdot\vec\varepsilon(\vec k,\lambda')=\delta_{\lambda\lambda'} \end{equation} ($\lambda,\lambda'=1,2$). $\vec\varepsilon(\vec k,1)$, $\vec\varepsilon(\vec k,2)$ and $\vec k/|\vec k\,|$ span an orthonormal frame. Therefore, in particular the usual three-dimensional basis $\vec e^i$ can be expressed in this frame, \begin{equation} \vec e^i=\sum_{\lambda=1}^2\left(\vec e^i\cdot\vec\varepsilon(\vec k,\lambda)\right) \vec\varepsilon(\vec k,\lambda)+\frac{(\vec e^i\cdot\vec k)\vec k}{\vec k^2} =\sum_{\lambda=1}^2\varepsilon^i(\vec k,\lambda)\vec\varepsilon(\vec k,\lambda) +\frac{k^i\vec k}{\vec k^2}. \end{equation} As the usual basis is orthonormal, we conclude that \begin{equation} \delta^{ij}=\vec e^i\cdot\vec e^j=\sum_{\lambda=1}^2\varepsilon^i(\vec k,\lambda) \varepsilon^j(\vec k,\lambda)+\frac{k^ik^j}{\vec k^2}, \end{equation} which can be rewritten as a first (three-dimensional) completeness relation, \begin{equation}\label{sum2} P_{V2}^{ij}(\vec k\,)=\sum_{\lambda=1}^2\varepsilon^i(\vec k,\lambda) \varepsilon^{j*}(\vec k,\lambda)=\delta^{ij}-\frac{k^ik^j}{\vec k^2}. \end{equation} Finally, considering $\vec\varepsilon(\vec k,3):=\vec k/|\vec k\,|$ as a third orthonomal polarisation vector, one obtains \begin{equation} P_{V3}^{ij}(\vec k\,)=\sum_{\lambda=1}^3\varepsilon^i(\vec k,\lambda) \varepsilon^{j*}(\vec k,\lambda)=\delta^{ij}, \end{equation} where the complex conjugate has no effect on a real-valued basis but allows for the generalisation for instance to a chiral basis.\footnote{We will not make the chiral basis explicit though as we reserve $\lambda=\pm$ for something else.} A generalisation of this completeness relation to four-vectors (with time component set to zero) is straightforward and leads to \begin{equation} P_{V3}^{\mu\nu}(k)=\sum_{\lambda=1}^3\varepsilon^\mu(k,\lambda) \varepsilon^{\nu*}(k,\lambda)=\eta^\mu\eta^\nu-\eta^{\mu\nu} \end{equation} with $\eta^\mu=\eta^{\mu0}$. As before, an attempt can be done to switch the non-covariant part of the right hand side to the left hand side by defining a fourth (time-like) polarisation. However, in this simple form this attempt fails. $\varepsilon(k,0)=(\eta^\mu)=(1;0,0,0)$ does not give the correct sign, and the more involved trial $\varepsilon(k,0)=(i;0,0,0)$ is of no help here as the product with the conjugate will remove the effect of the imaginary unit. \subsection{The issue of dispersion} The canonical field quantisation in Eq.~(\ref{Vquant}) is based on plane waves. This issue becomes problematic if we consider a vector field complemented by a gauge fixing term, leading to a nontrivial dispersion of the solution in the case of a massive vector boson~\cite{Pavel:1997pi}. As we will see in Sec.~5, the Proca equation can no longer be considered as a vector extension of the Klein--Gordon equation. Instead, the mass of the vector boson depends on the gauge parameter $\xi_V$. Accordingly, the canonical quantisation based on a particle with fixed mass cannot be applied. However, in our approach we are able to circumvent the problem related to the canonical quantisation by using Green's functions. Note that Green's functions are classical and, therefore, independent of the quantisation scheme. \subsection{A pragmatic solution} At this point we offer a pragmatic solution. As we know the explicit form of the gauge boson propagator from the Green's function approach employed before, we conclude that \begin{equation} P_{V4}^{\mu\nu}(k)=\sum_\lambda\varepsilon^\mu(k,\lambda)\varepsilon^{\nu*}(k,\lambda) =\eta^{\mu\nu}-(1-\xi_V)\frac{k^\mu k^\nu}{k^2-\xi_Vm_V^2}=P_V^{\mu\nu}(k). \end{equation} Therefore, the completeness relation depends on the gauge. The pragmatic solution tells us that for Feynman gauge $\xi_V=1$ for instance one obtains $\sum_\lambda\varepsilon^\mu(k,\lambda)\varepsilon^{\nu*}(k,\lambda)=\eta^{\mu\nu}$, independent of whether we know which polarisations are summed over and how the explicit polarisation vectors look like. However, we can speculate about how these two are related to each other. We can assure ourselves that a gauge boson on the mass shell has only vector components. In this case we obtain the Landau projector ($\xi_V=0$)~\cite{Korner:2014bca,Berge:2015jra,Czarnecki:2018vwh} \begin{equation}\label{sum3} -\sum_{\lambda=1}^3\varepsilon^\mu(k,\lambda)\varepsilon^{\nu*}(k,\lambda) =\eta^{\mu\nu}-\frac{k^\mu k^\nu}{k^2}=P^{\mu\nu}_{\mathbf{1}}(k) \end{equation} containing only the vector component of the polarisation. Eq.~(\ref{sum3}) can be explicitly seen in the rest frame of the massive vector boson. For $k=(m_V;\vec 0)$ one obtains \begin{equation} \eta^{\mu\nu}-\frac{k^\mu k^\nu}{m_V^2} =-\pmatrix{0&0&0&0\cr 0&1&0&0\cr 0&0&1&0\cr 0&0&0&1\cr} =-\sum_{\lambda=1}^3\varepsilon^\mu(\vec k,\lambda)\varepsilon^{\nu*}(\vec k,\lambda) \end{equation} with $\varepsilon(\vec k,1)=(0;1,0,0)$, $\varepsilon(\vec k,2)=(0;0,1,0)$ and $\varepsilon(\vec k,3)=(0;0,0,1)$. If the gauge boson is offshell, it is described by the unitary projector ($\xi_V\to\infty$), containing also a scalar component~\cite{Berge:2015jra}, \begin{equation}\label{sum4} \sum_{\lambda,\lambda'=0}^3\eta_{\lambda,\lambda'}\varepsilon^\mu(k,\lambda) \varepsilon^{\nu*}(k,\lambda')=\eta^{\mu\nu}-\frac{k^\mu k^\nu}{m_V^2} =P^{\mu\nu}_{\mathbf{1}}+\frac{k^\mu k^\nu}{k^2}F_S(k^2) =P^{\mu\nu}_{\mathbf{1\oplus0}} \end{equation} with $F_S(k^2)=1-k^2/m_V^2$ as the offshellness dominating the scalar component. The appearance of the components $\eta_{\lambda\lambda'}$ of the metric tensor $\eta$ in polarisation space seems to suggest that the summation over $\lambda$ can be understood as the contraction of covariant with contravariant components in polarisation spacetime, reserving for the polarisation vectors the role of a tetrad between ordinary spacetime and polarisation spacetime. This will be worked out in more detail in Sec.~4 in case of the photon (cf.\ Eq.~(\ref{tetrad})). \section{Green's function of the photon} In order to investigate the relation between completeness relation and propagator in detail, we start with the Lagrange density of the photon, \begin{equation}\label{calLA} {\cal L}_A=\frac12(\vec E^2-\vec B^2)=-\frac14F_{\mu\nu}F^{\mu\nu},\qquad F_{\mu\nu}=\partial_\mu A_\nu-\partial_\nu A_\mu \end{equation} Containing only the self energy of the photon, the Euler--Lagrange equations can be obtained by variation of the action integral $S_A=\int{\cal L}_Ad^4x$. One obtains \begin{eqnarray} \delta S_A&=&-\frac14\int\delta F_{\mu\nu}F^{\mu\nu}d^4x \ =\ -\frac12\int(\partial_\mu\delta A_\nu-\partial_\nu\delta A_\mu) (\partial^\mu A^\nu-\partial^\nu A^\mu)d^4x\nonumber\\ &=&-\int\partial_\mu\delta A_\nu(\partial^\mu A^\nu-\partial^\nu A^\mu)d^4x \ =\ \int\delta A_\nu\partial_\mu(\partial^\mu A^\nu-\partial^\nu A^\mu)d^4x, \end{eqnarray} where for the last step we have used integration by parts. In order to vanish for an arbitrary variation $\delta A_\nu$ of the gauge field, one has to claim that \begin{equation} \partial_\mu(\partial^\mu A^\nu-\partial^\nu A^\mu) =\partial^2A^\nu-\partial^\mu\partial^\nu A_\mu =(\partial^2\eta^{\mu\nu}-\partial^\mu\partial^\nu)A_\mu=0. \end{equation} However, the corresponding equation (a factor $i$ for later convenience) \begin{equation} (\partial^2\eta_{\mu\nu}-\partial_\mu\partial_\nu)D_A^{\mu\rho}(x) =i\eta^\nu_\rho\delta^{(4)}(x) \end{equation} for the Green's function $D_A^{\mu\rho}(x)$ cannot be solved, as the operator $(\partial^2\eta^{\mu\nu}-\partial^\mu\partial^\nu)$ is not invertible. As found by Faddeev and Popov in 1967, this problem turns out to be deeply related to the gauge degree of freedom~\cite{Faddeev:1967fc}. The solution for this problem is given by amending the Lagrange density by a gauge fixing term, \begin{equation}\label{calLAp} {\cal L}_{A+}=-\frac14F_{\mu\nu}F^{\mu\nu} -\frac1{2\xi_A}(\partial_\mu A^\mu)^2, \end{equation} the introduction of which can be understood on elementary level also as the addition of a Lagrange multiplier times the square of $\partial_\mu A^\mu$, restricting the solutions to those which satisfy the Lorenz gauge condition $\partial_\mu A^\mu=0$ proposed exactly a century earlier~\cite{Lorenz:1867xq}. This condition does not fix completely the gauge but eliminates the redundant spin-$0$ component in the representation $(1/2,1/2)$ of the Lorentz group, leaving a gauge degree of freedom $A^\mu\to A^\mu+\partial^\mu f$ with $\partial^2f=0$. However, as the gauge field is not constrained {\it a priori\/} but via a Lagrange multiplier, instead of a single gauge condition one obtains a whole class of gauge conditions subsumed under the name of $R_\xi$ gauges. For $\xi_A\to 0$ one obtains the Landau gauge classically equivalent to the Lorenz gauge, for $\xi_A=1$ one obtains the Feynman gauge, and for $\xi_A\to\infty$ one ends up with the unitary gauge, to name a few. \subsection{Solution for the Green's function of the photon} Varying the amended action functional with respect to the gauge field, in this case one obtains $(\partial^2\eta^{\mu\nu}-(1-\xi_A^{-1})\partial^\mu\partial^\nu)A_\mu=0$ and, therefore, \begin{equation} \left(\partial^2\eta_{\mu\nu}-\left(1-\frac1{\xi_A}\right)\partial_\mu \partial_\nu\right)D_A^{\mu\rho}(x)=i\eta_\nu^\rho\delta^{(4)}(x) \end{equation} for the Green's function. This equation can be solved. In momentum space the equation reads \begin{equation} -\left(k^2\eta_{\mu\nu}-\left(1-\frac1{\xi_A}\right)k_\mu k_\nu\right) \tilde D_A^{\mu\rho}(k)=i\eta_\nu^\rho, \end{equation} and by using the ansatz $\tilde D_A^{\mu\nu}(k)=\tilde D^g\eta^{\mu\nu}+\tilde D^kk^\mu k^\nu$ one obtains $(\xi_A-1)\tilde D^g-k^2\tilde D^k=0$ and $-k^2\tilde D^g=i$, i.e.\ \begin{equation}\label{propA} D_A^{\mu\nu}(x)=\int\frac{d^4k}{(2\pi)^4}e^{-ikx}(\tilde D^g\eta^{\mu\nu} +\tilde D^kk^\mu k^\nu)=\int\frac{d^4k}{(2\pi)^4} \frac{-ie^{-ikx}}{k^2}\left(\eta^{\mu\nu} -(1-\xi_A)\frac{k^\mu k^\nu}{k^2}\right). \end{equation} Depending on how the convention for the poles at $k^2=0$ (i.e.\ at $k^0=\pm\omega(\vec k)=\pm|\vec k\,|$) is set, one obtains a retarded, advanced, or Feynman propagator (the latter not to be mixed up with the Feynman gauge). In the following we restrict our attention to the Feynman propagator, adding an infinitesimal imaginary shift $+i\epsilon$ to the denominator. \subsection{Going back to historical approaches} Even though the solution of Faddeev and Popov allows to deal with the calculation in a quite straightforward manner, in order to understand the situation more deeply it is worth to have a look at older approaches. A very valuable reference for this is the handbook of Kleinert~\cite{Kleinert:2016} which will be used for the following argumentation. Starting again with the free Lagrange density~(\ref{calLA}), for a canonical field quantisation we have to obtain the Hamilton density by performing a Legendre transformation. However, while the spatial components of the canonical momentum are given by the components of the electric field, the time component vanishes, \begin{equation} \pi^i(x)=\frac{\partial{\cal L}_A(x)}{\partial\dot A_i(x)}=-F^{0i}(x) =E^i(x),\qquad \pi^0(x)=\frac{\partial{\cal L}_A(x)}{\partial\dot A_0(x)}=0. \end{equation} According to Dirac's classification~\cite{Dirac:1947}, the property $\pi^0(x)=0$ is a primary constraint on the canonical momentum. Using the Euler--Lagrange equations, we get to the secondary constraint $\nabla\vec E(\vec x,t)=0$ which is Coulomb's law for free fields.\footnote{In case of an electric source the right hand side is replaced by $\rho(\vec x,t)$.} The secondary constraint leads to an incompatibility for the canonical same-time commutator \begin{equation} [\pi^i(\vec x,t),A^j(\vec x',t)]=i\delta^{ij}\delta^{(3)}(\vec x-\vec x'). \end{equation} This problem can be solved by introducing a transverse modification of the delta distribution~\cite{Kleinert:2016}. For the canonical quantisation, $A^0(\vec x,t)$ and (via Coulomb's law) also $\nabla\vec A(\vec x,t)$ cannot be considered as operators. Using Coulomb gauge $\nabla\vec A(\vec x,t)=0$, one has $A^0(\vec x,t)=0$ as well, a relation between the Coulomb and axial gauges as two examples for noncovariant gauges~\cite{Leibbrandt:1987qv} established by Coulomb's law for free fields. One obtains \begin{equation} A^\mu(x)=\int\frac{d^3k}{(2\pi)^3}\frac1{\sqrt{2\omega(\vec k\,)}} \sum_{\lambda=1}^2\left(\varepsilon^\mu(\vec k,\lambda)a(\vec k,\lambda)e^{-ikx} +\varepsilon^{\mu*}(\vec k,\lambda)a^\dagger(\vec k,\lambda)e^{ikx}\right), \end{equation} where the polarisation sum runs over the two physical polarisation states ($\lambda=1,2$) only. However, it is far from being convenient to impose noncovariant constraints to a Lorentz-covariant quantity like the electromagnetic potential $A^\mu(x)$. A much better choice would be the Lorenz gauge $\partial_\mu A^\mu=0$. By using the gauge transformation of the first kind $A^\mu\to A^\mu+\partial^\mu\lambda$, a scalar function $\lambda(x)$ can be found so that after this transformation $\partial_\mu A^\mu=0$ is satisfied. Still, the Lorenz gauge does not fix the gauge degree of freedom completely. Indeed, a gauge transformation of the second kind $A^\mu\to A^\mu+\partial^\mu f$ with $\partial^2f=0$, also called restricted or on-shell gauge transformation, will change the vector potential in a way that it still satisfies the Lorenz gauge constraint. The covariant quantisation method is established by introducing a first type of gauge-fixing term~\cite{Fermi:1932xva}, \begin{equation} {\cal L}_{AF}={\cal L}_A+{\cal L}_{GF},\qquad {\cal L}_{GF}=-G(x)\partial_\mu A^\mu(x)+\frac\xi2G^2(x),\qquad\xi\ge 0. \end{equation} In this case there is no canonical momentum for $G(x)$, and the Euler--Lagrange equation will lead to the (secondary) constraint $\xi G(x)=\partial_\mu A^\mu(x)$. The Euler--Lagrange equations for the vector potential read $\partial^\mu F_{\mu\nu}(x)=\partial^2A_\nu(x) -\partial^\mu\partial_\nu A_\mu(x)=-\partial_\nu G(x)$, and applying the constraint one obtains \begin{equation} \partial^2A_\nu(x)-\left(1-\frac1\xi\right)\partial_\nu\partial_\mu A^\mu(x)=0. \end{equation} This is the same equation we obtain in case of the Faddeev--Popov approach. Applying once more $\partial_\nu$, one obtains $\partial^2G(x)=0$, i.e.\ $G(x)$ is a massless Klein--Gordon field. \section{The photon propagator} We continue with the quantisation procedure for the photon field in covariant form. The manifestly covariant expression for the quantised photon field is given by \begin{equation} A^\mu(x)=\int\frac{d^3k}{(2\pi)^3}\frac1{\sqrt{2\omega(\vec k)}} \sum_{\lambda=0}^3\left(\varepsilon^\mu(\vec k,\lambda)a(\vec k,\lambda)e^{-ikx} +\varepsilon^{\mu*}(\vec k,\lambda)a^\dagger(\vec k,\lambda)e^{ikx}\right). \end{equation} For $\xi=1$ (Feynman gauge) we can choose momentum-independent polarisation vectors $\varepsilon^\mu(\lambda)=\eta^{\mu\lambda}$. Accordingly, these vectors obey the orthogonality and completeness relations \begin{equation}\label{orthcomp} \eta^{\mu\nu}\varepsilon_\mu^*(\lambda)\varepsilon_\nu(\lambda')=\eta_{\lambda\lambda'}, \qquad\sum_{\lambda,\lambda'}\eta_{\lambda\lambda'}\varepsilon^\mu(\lambda) \varepsilon^{\nu*}(\lambda')=\eta^{\mu\nu}. \end{equation} Employing the apparatus of canonical quantisation, we are left with the canonical same-time commutators $[A^\mu(\vec x,t),A^\nu(\vec x',t)] =[\dot A^\mu(\vec x,t),\dot A^\nu(\vec x',t)]=0$ and \begin{equation} [\dot A^\mu(\vec x,t),A^\nu(\vec x',t)] =i\eta^{\mu\nu}\delta^{(3)}(\vec x-\vec x') \end{equation} which are the same as if the components are independent massless Klein--Gordon fields. However, the sign between the temporal components is opposite to the spatial sector, resulting also in $[a(\vec k,\lambda),a(\vec k',\lambda')]= [a^\dagger(\vec k,\lambda),a^\dagger(\vec k',\lambda')]=0$ and \begin{equation} [a(\vec k,\lambda),a^\dagger(\vec k',\lambda')]=-\eta_{\lambda\lambda'} (2\pi)^3\delta^{(3)}(\vec k-\vec k'). \end{equation} As a consequence, states generated by applying $a^\dagger(\vec k,0)$ have a negative norm, \begin{equation} \langle0|a(\vec k,0)a^\dagger(\vec k',0)|0\rangle=\langle0|[a(\vec k,0), a^\dagger(\vec k',0)]|0\rangle=-(2\pi)^3\delta^{(3)}(\vec k-\vec k'). \end{equation} The only possibility to escape this problem is to amend the temporal creation operator by one of the spatial ones. For instance, the states $a^\dagger(\vec k,\pm)|0\rangle$ have both zero norm, as $a^\dagger(\vec k,\pm)|0\rangle:= \left(a^\dagger(\vec k,0)\pm a^\dagger(\vec k,3)\right)/\sqrt2$ commutes with its Hermitian conjugate. Obviously, it is too strong to demand $D(\vec x,t)=0$ as an operator condition, as this is in contradiction with the canonical commutation rules. In order to guarantee the validity of the Lorenz condition $D(\vec x,t)=0$ at any time, one instead defines a physical state imposing Fermi--Dirac subsidiary conditions~\cite{Fermi:1932xva,Dirac:1966,Heisenberg:1930xk} \begin{equation} D(\vec x,t)|\psi_{\rm phys}\rangle=0,\qquad \dot D(\vec x,t)|\psi_{\rm phys}\rangle=0. \end{equation} resulting in $a(\vec k,-)|\psi_{\rm phys}\rangle=0$ and $a^\dagger(\vec k,-)|\psi_{\rm phys}\rangle=0$, i.e.\ both creation and annihilation operator annihilate the physical state. Using $[a(\vec k,\pm),a^\dagger(\vec k',\mp)]=-(2\pi)^3\delta^{(3)}(\vec k-\vec k')$, for the Hamilton operator one obtains \begin{eqnarray} H&=&-\int\frac{d^3k}{(2\pi)^3}\frac{k_0}2\sum_{\lambda,\lambda'=0}^3 \eta_{\lambda\lambda'}{\cal N}\left\{a^\dagger(\vec k,\lambda) a(\vec k,\lambda')+a(\vec k,\lambda)a^\dagger(\vec k,\lambda')\right\} \nonumber\\ &=&\int\frac{d^3k}{(2\pi)^3}k^0\left(\sum_{\lambda=1}^2 a^\dagger(\vec k,\lambda)a(\vec k,\lambda) -a(\vec k,+)a^\dagger(\vec k,-)-a^\dagger(\vec k,+)a(\vec k,-)\right),\qquad \end{eqnarray} where ${\cal N}\{\cdots\}$ indicates normal ordering with respect to the physical vacuum.\footnote{Note that in contrast to Ref.~\cite{Kleinert:2016} we integrate over the wave vector instead of summing it. According to the usual agreement for normal ordering, there is no contribution to the vacuum energy soever.} Hence the subsidiary condition makes the last two terms vanish for all physical states. For general $R_\xi$ gauges the orthogonality and completeness relations~(\ref{orthcomp}) have to be replaced by~\cite{Kleinert:2016} \begin{equation}\label{tetrad} P^{\mu\nu}(k)\varepsilon_\mu^*(k,\lambda)\varepsilon_\nu(k,\lambda')=\eta_{\lambda\lambda'}, \qquad\sum_{\lambda,\lambda'}\eta_{\lambda\lambda'}\varepsilon^\mu(k,\lambda) \varepsilon^{\nu*}(k,\lambda')=P^{\mu\nu}(k). \end{equation} \subsection{The Gupta--Bleuler quantisation} Even though the application of both subsidiary conditions leads to the correct physical result, the treatment of (infinite) normalisations of the states dealt with in detail in Sec.~5.4.2 of Ref.~\cite{Kleinert:2016} is exhausting. For processes with at least one particle it is sufficient to impose only the first subsidiary condition \begin{equation}\label{gupta} a(\vec k,-)|\psi_{\rm``phys''}\rangle=0, \end{equation} leading to a pseudophysical state. This condition is the basis of the Gupta--Bleuler approach to Quantum Electrodynamics~\cite{Bleuler:1950cy,% Gupta:1949rh}. Note, however, that for a vacuum energy (for instance in cavities) the nonphysical degrees of freedom are not completely eliminated. In the Faddeev--Popov approach, this vacuum energy contribution will be removed by the negative vacuum energy contribution of the Faddeev--Popov ghosts. As the operator in the Gupta--Bleuler subsidiary condition~(\ref{gupta}) contains only the positive-frequency part, the operator $G(x)$ is necessarily a nonlocal operator. On the other hand side, the vacuum state $|0_{\rm``phys''}\rangle$ has a unit norm which is an important advantage of the Gupta--Bleuler formalism. However, the main virtue of the Gupta--Bleuler quantisation scheme is that the photon propagator is much simpler than the one obtained with the help of a four-dimensional (noncovariant) generalisation of~(\ref{sum2}), namely~(\ref{propA}). \subsection{The photon projector on the light cone} Employing again the Green's function approach, we can get still to another result. As in Eq.~(\ref{vacexp}), the free photon propagator is given by the vacuum expectation value of time-ordered product of the field operators at spacetime points $x$ and $y$, \begin{equation} D_A^{\mu\nu}(x-y)=\langle0|{\cal T}\{A^\mu(x)A^\nu(y)\}|0\rangle. \end{equation} Using the invariance of physical quantities under gauge transformations \begin{equation}\label{gaugetra} A^\mu(x)\to A^\mu(x)+\partial^\mu\lambda(x) \end{equation} with some arbitrary scalar function $\lambda(x)$, for the propagator one obtains \begin{eqnarray} \lefteqn{D_A^{\mu\nu}(x-y)\ =\ \langle0|{\cal T}\{A^\mu(x)A^\nu(y)\}0\rangle \to}\nonumber\\[7pt] &=&\langle0|{\cal T}\{A^\mu(x)A^\nu(y)\}|0\rangle +\partial_x^\mu\langle0|{\cal T}\{\lambda(x)A^\nu(y)\}|0\rangle \strut\nonumber\\&&\strut\qquad +\partial_y^\nu\langle0|{\cal T}\{A^\mu(x)\lambda(y)\}|0\rangle +\partial_x^\mu\partial_y^\nu\langle0|\{\lambda(x)\lambda(y)\}|0\rangle \nonumber\\[7pt] &=&D_A^{\mu\nu}(x-y)+\partial_x^\mu D_A^\nu(x-y)+\partial_y^\nu D_A^\mu(y-x) +\partial_x^\mu\partial_y^\nu D_A(x-y), \end{eqnarray} where $D_A^\mu(x-y)=\langle0|{\cal T}\{\lambda(x)A^\nu(y)\}|0\rangle$ and $D_A(x-y)=\langle0|{\cal T}\{\lambda(x)\lambda(y)\}0\rangle$ are mixed and scalar propagators. Fourier transformed to momentum space, one obtains \begin{eqnarray} \tilde D_A^{\mu\nu}(k)&\to&\tilde D_A^{\mu\nu}(k)+k^\mu\tilde D_A^\nu(k) +\tilde D_A^\mu(k) k^\nu+k^\mu k^\nu\tilde D_A(k)\nonumber\\ &=&\tilde D_A^{\mu\nu}(k) +k^\mu\Big(\tilde D_A^\nu(k)+\frac12k^\nu\tilde D_A(k)\Big) +\Big(\tilde D_A^\mu(k)+\frac12\tilde D_A(k)k^\mu\Big)k^\nu. \end{eqnarray} In a similar way as the gauge field is added in the Lagrange density, replacing the partial derivative by a covariant derivative in order to be able to absorb contributions from local phase transformations of the field operators in transforming according to Eq.~(\ref{gaugetra}), the propagator has to be extended in order to comply with the same transformations~(\ref{gaugetra}). The appropriate form of the propagator to comply with this is \begin{equation}\label{proplight} D_A^{\mu\nu}(x-y)=\int\frac{d^4k}{(2\pi)^4}\frac{-iP^{\mu\nu}(k) e^{-ikx}}{k^2+i\epsilon},\qquad P^{\mu\nu}=\eta^{\mu\nu}-\frac12\left(k^\mu l^\nu(k)+l^\mu(k)k^\nu\right), \end{equation} where $l^\mu(k)$ is a four-component function of the wave vector $k$, the explicit form of which turns out again to depend on the gauge. Taking for instance $l^\mu(k)=k^\mu/k^2$, one ends up again with the Landau gauge, and for $l^\mu(k)=0$ one reaches Feynman gauge. A third possibility is given by the light cone mirror of the four-vector $k_+=(k^0;\vec k)=k$, $l(k)=k_-/|\vec k\,|^2$ with $k_-=(k^0;-\vec k)$. Note that the four-component object $k_-$ is {\em not\/} a covariant four-vector, called antiscalar in Ref.~\cite{Kleinert:2016}. We call it light cone mirror of $k$. For the ``light-cone form'' of the photon projector $P^{\mu\nu}$ extracted from Eq.~(\ref{proplight}) in this case, the two nonphysical polarisation directions are eliminated. This can be seen with a simple calculation for $\varepsilon(\vec k,1)=(0;1,0,0)$, $\varepsilon(\vec k,2)=(0;0,1,0)$ and $k_\pm=|\vec k|(1;0,0,\pm 1)$, \begin{equation} \eta^{\mu\nu}-\frac1{2|\vec k\,|^2}(k_+^\mu k_-^\nu+k_-^\mu k_+^\nu) =-\pmatrix{0&0&0&0\cr 0&1&0&0\cr 0&0&1&0\cr 0&0&0&0\cr} =-\sum_{\lambda=1}^2\varepsilon^\mu(\vec k,\lambda)\varepsilon^{\nu*}(\vec k,\lambda). \end{equation} Identifying $\varepsilon(\vec k,\pm)=k_\pm/\sqrt2|\vec k|$, one gets back to the Fermi--Dirac (or Gupta--Bleuler) nonphysical modes, concluding that the given combination of momentum vector $k_+$ and light cone mirror $k_-$ will eliminate the nonphysical modes from the photon projector. \section{The gauge boson propagator} As for the photon field, the vanishing of the temporal component of the canonical momentum of the massive gauge boson is a primary constraint. However, there is no secondary constraint. Replacing $V^\mu(x)\to V^\mu(x)+\partial^\mu\lambda(x)$ and inserting this in the Euler--Lagrange equation of the Lagrange density without gauge fixing ${\cal L}_V=-\frac14F_{\mu\nu}F^{\mu\nu}+\frac12m_V^2V_\mu V^\mu$, \begin{equation}\label{ELmass} \partial_\mu F^{\mu\nu}+m_V^2V^\nu=\left((\partial^2+m_V^2)\eta_{\mu\nu} -\partial_\mu\partial_\nu\right)V^\mu=0, \end{equation} one obtains $m_V^2\partial^\mu\lambda(x)=0$ which admits only the constant solution $\lambda(x)=\lambda_0$. At the same time, the application of $\partial_\nu$ to Eq.~(\ref{ELmass}) leads to $m_V^2\partial_\nu V^\nu=0$, i.e.\ the Lorenz gauge by default. These two results are closely related to each other as well as to the nonvanishing mass of the gauge boson. The gauge degree of freedom is reduced by one, leaving three independent components for the polarisation vector. Actually, for the massive gauge boson itself the gauge fixing term is not necessary at all, as the operator in the second expression in Eq.~(\ref{ELmass}) is invertible. This is the reason why the gauge boson projector for the on-shell gauge boson field is given by default by the projector in unitary gauge. As it is convenient to consider the photon as the massless limit of a vector boson, one has to add a gauge fixing term to the Lagrange density to allow for a proper limit. Therefore, with the following consideration we are back to the Faddeev--Popov method with a gauge fixing term allowing for a general $R_\xi$ gauge. \subsection{Goldstone bosons and mass terms} Usually, the gauge bosons (except for the photon) obtain a mass via the spontaneous symmetry breaking of the scalar Higgs field $\phi$ in the framework of the electroweak Glashow--Weinberg--Salam (GWS) theory. At the same time one obtains Goldstone bosons as ``scalar partners'' of the gauge bosons. The masslessness of the photon is established due to the fact that the corresponding scalar partner is the Higgs boson which ``sets the stage'' and keeps the photon from gaining a mass. A detailed outline of the Higgs mechanism can be found e.g.\ in Refs.~\cite{PeskinSchroeder,BohmDennerJoos}. Here we only briefly sketch the appearance of the Goldstone bosons and the occurence of mass terms. Given the spontaneously broken Higgs field by \begin{equation} \psi=\frac1{\sqrt2}\pmatrix{h_1(x)+ih_2(x)\cr h_0+h_3(x)+ih_4(x)\cr}, \end{equation} the scalar part of the Lagrange density can be expanded in the fields $h_i(x)$ to obtain \begin{eqnarray} {\cal L}_\phi&=&\left(D_\mu\phi(x)\right)^\dagger(D^\mu\phi(x))+\lambda h_0^2 \phi^\dagger(x)\phi(x)-\lambda\left(\phi^\dagger(x)\phi(x)\right)^2 \nonumber\\ &=&\frac12\sum_{i=1}^4\left(D_\mu h_i(x)\right)\left(D^\mu h_i(x)\right) -\lambda h_0^2h_3(x)^2+O(h_i(x)^3). \end{eqnarray} The second term in this expansion gives a mass $m_H=h_0\sqrt{2\lambda}$ to the Higgs boson field $h_3(x)$, while the masses of the gauge bosons are obtained from the action of the covariant derivative \begin{equation} D_\mu=\partial_\mu-\frac{ig_1}2B_\mu-\frac{ig_2}2\vec W_\mu\vec\sigma \end{equation} at the constant part (proportional to $h_0$) of the Higgs field. One obtains \begin{equation} (D_\mu\phi)^\dagger(D^\mu\phi)=\frac{h_0^2}8\left[(g_1^2+g_2^2)Z_\mu Z^\mu +g_2^2(W^+_\mu W^{-\mu}+W^-_\mu W^{+\mu})\right]. \end{equation} This has to be compared with the kinetic contributions \begin{eqnarray} {\cal L}_{WW}&=&-\frac14F_{\mu\nu}\left(U(1)\right)F^{\mu\nu}\left(U(1)\right) -\frac14\sum_{i=1}^3F^i_{\mu\nu}\left(SU(2)\right) F^{i\mu\nu}\left(SU(2)\right)\nonumber\\ &=&-\frac12\partial_\mu B_\nu(\partial^\mu B^\nu-\partial^\nu B^\mu) -\frac12\sum_{i=1}^3\partial_\mu W^i_\nu(\partial^\mu W^{i\nu} -\partial^\nu W^{i\mu}). \end{eqnarray} With \begin{equation} W_\mu^\pm=\frac1{\sqrt2}(W_\mu^1\mp iW_\mu^2),\qquad W_\mu^3=\frac{g_1A_\mu+g_2Z_\mu}{\sqrt{g_1^2+g_2^2}},\qquad B_\mu=\frac{g_2A_\mu-g_1Z_\mu}{\sqrt{g_1^2+g_2^2}} \end{equation} one identifies the masses $m_A=0$, $m_Z=h_0\sqrt{g_1^2+g_2^2}/2$ and $m_W=h_0g_2/2$. In addition to the masses of the gauge bosons, the term $(D_\mu\phi(x))^\dagger(D^\mu\phi(x))$ gives rise also to a mixing of vector and scalar bosons, \begin{eqnarray} \lefteqn{\frac{ih_0g_2}{2\sqrt2}\partial_\mu(h_1+ih_2)W^{-\mu} -\frac{ih_0g_2}{2\sqrt2}\partial_\mu(h_1-ih_2)W^{+\mu} +\frac{h_0\sqrt{g_1^2+g_2^2}}2\partial_\mu h_4Z^\mu}\nonumber\\ &=&im_W(\partial_\mu h_W^+)W^{-\mu}-im_W(\partial_\mu h_W^-)W^{+\mu} +m_Z(\partial_\mu h_Z)Z^\mu, \end{eqnarray} where it was logical to define $h_W^\pm:=(h_1\pm ih_2)/\sqrt2$ and $h_Z:=h_4$. Using the property that the Lagrange density is determined only up to a total derivative, these nonphysical mixing contributions will finally be cancelled by appropriate additions to the gauge fixings in the gauge fixing terms \begin{equation} -\frac1{2\xi_A}G_A^2-\frac1{2\xi_Z}G_Z^2-\frac1{2\xi_W}G_W^\pm G_W^\mp, \end{equation} where \begin{equation}\label{gaugefix} G_A=\partial_\mu A^\mu,\qquad G_Z=\partial_\mu Z^\mu-\xi_Zm_Zh_Z,\qquad G_W^\pm=\partial_\mu W^{\pm\mu}\mp i\xi_Wm_Wh_W^\pm. \end{equation} In addition to the gauge fixing and the cancellation of the boson mixings, we finally obtain mass terms also for the Goldstone bosons. The stage is now set for calculating the propagators both for massive vector gauge bosons and the corresponding scalar Goldstone bosons. As an example we deal with the $Z$ boson and the Goldstone boson field $h_Z$. \subsection{Green's functions of massive gauge bosons} For the $Z$ boson one obtains a contribution \begin{equation} {\cal L}_Z=-\frac12\partial_\mu Z_\nu(\partial^\mu Z^\nu-\partial^\nu Z^\mu) +\frac12m_Z^2Z_\mu Z^\mu-\frac1{2\xi_Z}(\partial_\mu Z^\mu)^2 \end{equation} to the Lagrange density. The corresponding equation for the Green's function reads \begin{equation} \left(\partial^2\eta_{\mu\nu}-\left(1-\frac1{\xi_Z}\right)\partial_\mu \partial_\nu+m_Z^2\eta_{\mu\nu}\right)D_Z^{\mu\rho}(x) =i\eta_\nu^\rho\delta^{(4)}(x), \end{equation} and this Proca equation is solved by \begin{equation} D_Z^{\mu\nu}(x)=\int\frac{d^4k}{(2\pi)^4}\frac{-ie^{-ikx}}{k^2-m_Z^2} \left(\eta^{\mu\nu}-(1-\xi_Z)\frac{k^\mu k^\nu}{k^2-\xi_Zm_Z^2}\right). \end{equation} For the Goldstone boson field $h_Z$ one obtains \begin{equation} {\cal L}_{h_Z}=\frac12(\partial_\mu h_Z)(\partial^\mu h_Z) -\frac1{2\xi_Z}\xi_Z^2m_Z^2h_Z^2, \end{equation} leading to the equation $-(\partial^2+\xi_Zm_Z^2)D^{h_Z}(x)=i\delta^{(4)}(x)$ for the Green's function solved by \begin{equation} D^{h_Z}(x)=\int\frac{d^4k}{(2\pi)^4}\frac{ie^{-ikx}}{k^2-\xi_Zm_Z^2}. \end{equation} Note the $\xi_Z$ dependence of the latter Green's function, also found in the longitudinal part of the corresponding vector boson Green's function. For the Landau gauge $\xi_Z=0$ for instance the mass dependence vanishes in these parts. In this context it is worth noting that the classical equivalence to the Lorenz gauge is directly seen from Eqs.~(\ref{gaugefix}). On the other hand, while for Feynman gauge ($\xi_Z=1$) both vector and Goldstone bosons carry a mass $m_Z$ and the propagators are quite similar, for the unitary gauge ($\xi_Z\to\infty$) the Goldstone propagator vanishes, and for the vector boson propagator one obtains \begin{equation} D_Z^{\mu\nu}(x)\Big|_{\xi_Z\to\infty}=\int\frac{d^4k}{(2\pi)^4} \frac{-ie^{-ikx}}{k^2-m_Z^2}\left(\eta^{\mu\nu}-\frac{k^\mu k^\nu}{m_Z^2} \right). \end{equation} This means that for unitary gauge the Higgs boson is the only scalar boson that is propagated. This fact makes calculations using the unitary gauge particularly attractive, as the scalar sector is mainly absent. Finally, we obtain the same results also for the $W^\pm$ boson and collect our results in Eq.~(\ref{greens}) in the Introduction. \section{Gauge independence of processes} Even though the gauge boson propagator depends on the $R_\xi$ gauge via the gauge parameter $\xi$, this has no influence on particle processes. In order to understand this, note that massive vector bosons (like $W^\pm$ and $Z$) have to decay into pairs of fermions. Therefore, in exclusive processes the vector boson line is terminated by a fermion line. To continue with the $Z$ boson, as the simplest example we can calculate a $Z$ boson propagator, terminated ``on the left'' by a fermion line $f_1$ and ``on the right'' by a fermion line $f_2$. For our considerations it does not matter whether for the particular process the fermion lines constitute a fermion--antifermion pair generated by (or annihilated to) the $Z$ boson, or whether it is a fermion (or antifermion) which emits (or absorbs) the gauge boson. The gauge independence of the process can be shown in each of these cases. In momentum space the $Z$ boson propagator reads \begin{equation}\label{Zprop} \tilde D_Z^{\mu\nu}(k)=\frac{-i}{k^2-m_Z^2}\left(\eta^{\mu\nu} -(1-\xi_Z)\frac{k^\mu k^\nu}{k^2-\xi_Zm_Z^2}\right). \end{equation} It can be easily seen that this propagator can be decomposed into two parts~\cite{Korner:2014bca}, \begin{equation} \tilde D_Z^{\mu\nu}(k)=\frac{-i}{k^2-m_Z^2}\left(\eta^{\mu\nu} -\frac{k^\mu k^\nu}{m_Z^2}\right)-\frac{k^\mu k^\nu}{m_Z^2} \frac{i}{k^2-\xi_Zm_Z^2}. \end{equation} While the first part is the propagator in unitary gauge, the second part is cancelled by the propagator of the neutral Goldstone boson field $h_Z$. In order to show this, we replace the full (gauge-dependent) propagator by the second term only, for this part of the matrix element obtaining (using the Feynman rules from Appendix~A2 of Ref.~\cite{BohmDennerJoos}) \begin{eqnarray}\label{contr} \lefteqn{\bar u(p'_2)ie\gamma^\mu\left(g_{f2}^-\Lambda_-+g_{f2}^+\Lambda_+ \right)u(p_2)\left(-\frac{k_\mu k_\nu}{m_Z^2}\frac{i}{k^2-\xi_Zm_Z^2}\right) \bar u(p'_1)ie\gamma^\nu\left(g_{f1}^-\Lambda_-+g_{f1}^+\Lambda_+\right) u(p_1)}\nonumber\\ &=&\frac{e^2}{m_Z^2}\bar u(p'_2)/\kern-6pt k\left(g_{f2}^-\Lambda_- +g_{f2}^+\Lambda_+\right)u(p_2)\frac{i}{k^2-\xi_Zm_Z^2}\bar u(p'_1) /\kern-6pt k\left(g_{f1}^-\Lambda_-+g_{f1}^+\Lambda_+\right)u(p_1)\qquad\quad \end{eqnarray} with $k=p_1-p'_1=p'_2-p_2$ and $\Lambda_\pm=(1\pm\gamma_5)/2$. The propagator part is now reduced to the propagator of the neutral Goldstone boson. Inserting the corresponding outer momentum differences for $k$ and using the Dirac equations, one obtains \begin{eqnarray} \frac{e}{m_Z}\bar u(p'_2)/\kern-6pt k\left(g_{f2}^-\Lambda_- +g_{f2}^+\Lambda_+\right)u(p_2) &=&\frac{em_{f2}}{m_Z}(g_{f2}^--g_{f2}^+)\bar u(p'_2)\gamma_5u(p_2), \nonumber\\ \frac{e}{m_Z}\bar u(p'_1)/\kern-6pt k\left(g_{f1}^-\Lambda_- +g_{f1}^+\Lambda_+\right)u(p_1) &=&-\frac{em_{f1}}{m_Z}(g_{f1}^--g_{f1}^+)\bar u(p'_1)\gamma_5u(p_1). \end{eqnarray} Taking into account that \begin{equation} g_f^-=\frac{I_f^3-s_W^2Q_f}{s_Wc_W},\quad g_f^+=\frac{s_WQ_f}{c_W}\quad\Rightarrow\quad g_f^--g_f^+=\frac{I_f^3}{s_Wc_W} \end{equation} with $s_W=\sin\theta_W$, $c_W=\cos\theta_W$ the sine and cosine of the Weinberg angle, $Q_f$ the electric charge (in units of the elementary charge $e$) and $I_f^3$ the weak isospin of the fermion, the contribution~(\ref{contr}) is indeed cancelled by the process with the $Z$ boson replaced by the neutral Goldstone boson, leaving us with the gauge boson propagator in unitary gauge. Note that in the 1960s and 1970s, the independence of physical processes under gauge transformations were discussed as an equivalence theorem for point transformations of the $S$ matrix~\cite{Chisholm:1961tha,Kamefuchi:1961sb,% Salam:1971sp,Keck:1971ju,Kallosh:1972ap}. Also recently there are controversies about whether physical processes including vector bosons are gauge invariant (see e.g.\ Refs.~\cite{Wu:2017rxt,Gegelia:2018pjz}). \begin{figure}[t]\begin{center} \epsfig{figure=selfta1.eps,scale=0.4}\\ (a1)\\[12pt] \epsfig{figure=selfta2.eps,scale=0.4}\quad \epsfig{figure=selfta3.eps,scale=0.4}\\ (a2)\kern142pt(a3)\\[12pt] \epsfig{figure=selftb2.eps,scale=0.4}\quad \epsfig{figure=selftb3.eps,scale=0.4}\\ (b2)\kern142pt(b3) \caption{\label{selft}top quark self energy diagrams} \end{center}\end{figure} \subsection{Fermion self energy contribution} As an example for how this cancellation of the gauge dependence works out, we calculate first order electroweak corrections to the self energy of a fermion. As particular case we deal with the first order electroweak self energy to the top quark. The first corrections which we denote as baseline corrections are shown in Fig.~\ref{selft}. For the correction (a1) by a photon one obtains \begin{eqnarray} i\Pi^t_{a1}&=&\int\frac{d^Dk}{(2\pi)^D}(-ieQ_t\gamma^\nu)\frac{i(q\kern-5.5pt/+/\kern-6pt k+m_t)}{(q+k)^2-m_t^2} (-ieQ_t\gamma^\mu)\frac{-i}{k^2}\left(\eta^{\mu\nu}-(1-\xi_A)\frac{k^\mu k^\nu}{k^2}\right)\nonumber\\ &=&-e^2Q_t^2\int\frac{d^Dk}{(2\pi)^D}\left(\frac{\gamma^\mu(q\kern-5.5pt/+/\kern-6pt k+m_t) \gamma^\mu}{((q+k)^2-m_t^2)k^2}-(1-\xi_A) \frac{/\kern-6pt k(q\kern-5.5pt/+/\kern-6pt k+m_t)/\kern-6pt k}{((q+k)^2-m_t^2)(k^2)^2}\right).\qquad \end{eqnarray} Considering this correction between onshell Dirac states $\bar u(q)$ and $u(q)$, for the second part one obtains \begin{equation}\bar u(q)/\kern-6pt k(q\kern-5.5pt/+/\kern-6pt k+m_t)/\kern-6pt k u(q) =(2qk+k^2)\bar u(q)/\kern-6pt k u(q). \end{equation} However, using principles of dimensional regularisation, one obtains \begin{eqnarray} \int\frac{d^Dk}{(2\pi)^D}\frac{(2qk+k^2)/\kern-6pt k}{((q+k)^2-m_t^2)(k^2)^2} &=&\int\frac{d^Dk}{(2\pi)^D}\frac{\left((q+k)^2-m_t^2-q^2+m_t^2\right)/\kern-6pt k}{((q+k)^2-m_t^2) (k^2)^2}\nonumber\\ &=&(-q^2+m_t^2)\int\frac{d^Dk}{(2\pi)^D}\frac/\kern-6pt k{((q+k)^2-m_t^2)(k^2)^2}\ =\ 0.\qquad \end{eqnarray} Therefore, for the correction (a1) the gauge dependence drops out, and one obtains \begin{equation} i\Pi^t_{a1}=-\frac{e^2Q_t^2}{2m_t} \left((D-2)A(m_t)+4m_t^2B(m_t^2;m_t,m_A)\right), \end{equation} where $A(m)$ and $B(q^2;m_1,m_2)$ are the one- and two-point functions, \begin{equation} A(m)=\int\frac{d^Dk}{(2\pi)^D}\frac1{k^2-m^2},\qquad B(q^2;m_1,m_2)=\int\frac{d^Dk}{(2\pi)^D}\frac1{\left((q+k)^2-m_1^2\right)(k^2-m_2^2)}, \end{equation} and the photon mass $m_A$ is used as regularisator. For the correction (a2) by the $Z$ boson the occurence of a vector boson mass does not allow for the same conclusion. However, a first naive approach can be tried in which the gauge dependence drops out in the sum of the corrections by the $Z$ boson and by the corresponding Goldstone boson $\chi^Z$. In Feynman gauge one obtains \begin{eqnarray} i\Pi^t_{a2}&=&\int\frac{d^Dk}{(2\pi)^D} ie\gamma^\nu\left(g_t^-\frac{1-\gamma_5}2 +g_t^+\frac{1+\gamma_5}2\right)\frac{i(q\kern-5.5pt/+/\kern-6pt k+m_t)}{(q+k)^2-m_t^2} \times\strut\nonumber\\&&\strut ie\gamma^\mu\left(g_t^-\frac{1-\gamma_5}2+g_t^+\frac{1+\gamma_5}2\right) \frac{-ig_{\mu\nu}}{k^2-m_Z^2},\nonumber\\ i\Pi^t_{b2}&=&\int\frac{d^Dk}{(2\pi)^D}\frac{em_t}{2s_Wm_W}\gamma_5 \frac{i(q\kern-5.5pt/+/\kern-6pt k+m_t)}{k^2-m_t^2}\frac{em_t}{2s_Wm_W}\gamma_5 \frac{i}{k^2-m_Z^2}. \end{eqnarray} On the other hand, for unitary gauge there is no Goldstone contribution and one stays with the correction by the $Z$ boson, \begin{eqnarray} i\Pi^{t\prime}_{a2}&=&\int\frac{d^Dk}{(2\pi)^D} ie\gamma^\nu \left(g_t^-\frac{1-\gamma_5}2+g_t^+\frac{1+\gamma_5}2\right) \frac{i(q\kern-5.5pt/+/\kern-6pt k+m_t)}{(q+k)^2-m_t^2}\times\strut\nonumber\\&&\strut ie\gamma^\mu\left(g_t^-\frac{1-\gamma_5}2+g_t^+\frac{1+\gamma_5}2\right) \frac{-i}{k^2-m_Z^2}\left(g_{\mu\nu}-\frac{k_\mu k_\nu}{m_Z^2} \right).\qquad \end{eqnarray} Looking at the difference \begin{equation}\label{anatab2p} i\Pi^t_{a2}+i\Pi^t_{b2}-i\Pi^{t\prime}_{a2}=\frac{e^2m_t}{8m_W^2s_W^2}A(m_Z) \end{equation} one realises that the difference does not vanish. However, as the difference is proportional to the one-point function $A(m_Z)$, one might think of tadpole contributions to be taken into account. Tadpole corrections by vector and Goldstone bosons are shown in Fig.~\ref{selftt}. \begin{figure}[t]\begin{center} \epsfig{figure=selftc2.eps,scale=0.4}\quad \epsfig{figure=selftc3.eps,scale=0.4}\\ (c2)\kern72pt(c3)\\[12pt] \epsfig{figure=selftd2.eps,scale=0.4}\quad \epsfig{figure=selftd3.eps,scale=0.4}\\ (d2)\kern72pt(d3) \caption{\label{selftt} top quark self energy tadpole diagrams} \end{center}\end{figure} For Feynman gauge one obtains \begin{eqnarray} i\Pi^t_{c2}&=&\frac12\pfrac{-iem_t}{2s_Wm_W}\frac{i}{-m_H^2}\int\frac{d^Dk}{(2\pi)^D} \pfrac{iem_Wg^{\mu\nu}}{c_W^2s_W}\frac{-ig_{\mu\nu}}{k^2-m_Z^2} \ =\ \frac{-De^2m_t}{4c_W^2s_W^2m_H^2}\int\frac{d^Dk}{(2\pi)^D}\frac1{k^2-m_Z^2}, \kern-28pt\nonumber\\ i\Pi^t_{d2}&=&\frac12\pfrac{-iem_t}{2s_Wm_W}\frac{i}{-m_H^2}\int\frac{d^Dk}{(2\pi)^D} \pfrac{-iem_H^2}{2s_Wm_W}\frac{i}{k^2-m_Z^2} \ =\ \frac{-e^2m_t}{8s_W^2m_W^2}\int\frac{d^Dk}{(2\pi)^D}\frac1{k^2-m_Z^2}. \kern-8pt\nonumber\\ \end{eqnarray} Note the vanishing momentum square for the tadpole tail (Higgs boson). The factor $1/2$ is a combinatorical factor due to the fact that the $Z$ boson is its own antiparticle. As the Goldstone boson is absent for unitary gauge (i.e.\ does not propagate), the contribution (d2) is obviously the one which compensates the difference on the side of the Feynman gauge. However, once again the contribution (c2) will be different for unitary gauge where one obtains \begin{equation} i\Pi^{t\prime}_{c2}=\frac{-e^2m_t}{4c_W^2s_W^2m_H^2}\int\frac{d^Dk}{(2\pi)^D}\frac1{k^2-m_Z^2} \left(D-\frac{k^2}{m_Z^2}\right)=\frac{-(D-1)e^2m_t}{4c_W^2s_W^2m_H^2}A(m_Z). \end{equation} \begin{figure}[t]\begin{center} \epsfig{figure=selfte2.eps,scale=0.4}\quad \epsfig{figure=selfte3.eps,scale=0.4}\\ (e2)\kern72pt(e3) \caption{\label{selfth} top quark self energy tadpole ghost diagrams} \end{center}\end{figure} Finally, this difference will be compensated by the corresponding ghost contribution shown in Fig.~\ref{selfth}. For the tadpole with ghost loop $u_Z$ one obtains \begin{equation} i\Pi^t_{e2}=-\pfrac{-iem_t}{2s_Wm_W}\frac{i}{-m_H^2}\int\frac{d^Dk}{(2\pi)^D} \pfrac{-iem_W\xi_Z}{2c_W^2s_W}\frac{i}{k^2-\xi_Zm_Z^2}, \end{equation} where the minus sign comes from the closed ghost loop. For unitary gauge ($\xi_Z\to\infty$) the contribution remains finite. However, the dependence on the inner momentum $k$ disappears and, therefore, there is no ghost contribution either. On the other hand, for Feynman gauge ($\xi_Z=1$) one obtains \begin{equation} i\Pi^t_{e2}=\frac{e^2m_t}{4c_W^2s_W^2m_H^2}A(m_Z). \end{equation} Therefore, taking into account baseline vector and Goldstone corrections as well as tadpole vector, Goldstone and ghost corrections we obtain that the result for Feynman gauge is the same as the one for unitary gauge. The situation is similar in case of the corrections by $W^\pm$, $\chi^\pm$ and $u^\pm$. However, note that in this case \begin{equation} i\Pi^t_{a3}+i\Pi^t_{b3}-i\Pi^{t\prime}_{a3}=\frac{e^2m_t |V_{tb}|^2}{4m_W^2s_W^2}A(m_W). \end{equation} Even though we take into account only the bottom quark in the loop, the sum in the loop has to run over all down-type quarks. Because of this fact and the unitarity of the Cabibbo--Kobayashi--Maskawa matrix, the factor $|V_{tb}|^2$ will not appear in the final result. \subsection{The role of unitarity} As the parts related the two massive vector bosons $Z$ and $W^\pm$ to the self energy of the fermion show, for the choice of unitary gauge one needs only two instead of five contributions, namely the two contributions related to the vector boson itself. Unitary gauge means $1/\xi=0$, i.e.\ the absence of the gauge fixing term. Indeed, the gauge fixing term is not necessary at all if the gauge boson carries a mass. The equation \begin{equation} \left(-\eta_{\mu\nu}(k^2-m_V^2)+k_\mu k_\nu\right)\tilde D_V^{\mu\rho}(k) =i\eta_\nu^\rho \end{equation} can be solved again by the ansatz $\tilde D_V^{\mu\nu}(k)=\tilde D^g\eta^{\mu\nu}+\tilde D^kk^\mu k^\nu$, in this case with the solution $\tilde D^g=-i/(k^2-m_V^2)$ and $\tilde D^k=-\tilde D^g/m_V^2$, leading to the propoagator in unitary gauge, \begin{equation} \tilde D_V^{\mu\nu}(k)=\frac{-i}{k^2-m_V^2}\left(\eta^{\mu\nu} -\frac{k^\mu k^\nu}{m_V^2}\right). \end{equation} \section{Conclusions and Outlook} The gauge boson projector as the central tensorial object in the propagator of the vector gauge boson is closely related to the completeness relation for the polarisation vectors. A generalisation of the completeness relation to four-dimensional spacetime is proposed in a pragmatic way. Using this approach, we could identify the polarisation vectors as tetrad fields relating ordinary spacetime to polarisation spacetime (see Eq.~(\ref{tetrad}). While the photon projector could be expressed by mirrors on the light cone (cf.\ Eq.~(\ref{proplight})), the projector for massive gauge bosons turned out to be expressed in unitary gauge by default. In particular, using the example of first order fermion self energy corrections we could show that physical processes do not depend on the gauge degree of freedom. From the different treatment of the massless photon and the massive vector bosons we can draw the conclusion that the photon might not be considered as mass zero limit of the vector boson. Indeed, at least the degree of freedoms in this limit is not continuous. This behaviour is seen also for observables related to the spin of particles, known as spin-flip effect (see e.g.\ Refs.~\cite{Lee:1964is,Kleiss:1986ct,Jadach:1987ws,Contopanagos:1989ga,% Contopanagos:1992fm,Smilga:1990uq,Falk:1993tf,Korner:1993dy,Groote:1996nc,% Groote:1997su,Dittmaier:2002nd,Groote:2009zk}). Fundamentally different Lie group structures for massive and massless particles were investigated in Ref.~\cite{Saar:2016jbx}, and the considerations in Ref.~\cite{Choi:2018mdd} allow for a relation of mass and spin. Interesting enough, in combining Refs.~\cite{Saar:2016jbx,Choi:2018mdd} a massive particle is constitued by two massless chiral non-unitary states based on the (massless) momentum vector and the light cone mirror of this, relating back to the light cone representation of the photon projector. These roughly sketched relations will be analysed in detail in a forthcoming publication. \subsection*{Acknowledgements} We thank J.~G.~K\"orner for useful discussions on the subject of this paper. The research was supported by the European Regional Development Fund under Grant No.~TK133, and by the Estonian Research Council under Grant No.~PRG356.
\subsection*{\centering Abstract} \textit{ This paper presents a one shot analysis of the lossy compression problem under average distortion constraints. We calculate the exact expected distortion of a random code. The result is given as an integral formula using a newly defined functional $\tilde{D}(z,Q_Y)$ where $Q_Y$ is the random coding distribution and $z\in [0,1]$. When we plug in the code distribution as $Q_Y$, this functional produces the average distortion of the code, thus provide a converse result utilizing the same functional. Two alternative formulas are provided for $\tilde{D}(z,Q_Y)$, the first involves a supremum over some auxiliary distribution $Q_X$ which has resemblance to the channel coding meta-converse and the other involves an infimum over channels which resemble the well known Shannon distortion-rate function. } \section{Introduction} The single shot approach aims to find informational quantities that govern the optimal performance of an operational problems of interest, \eg, channel coding and lossy compression. In both cases, the problem settings pose a random object that we want to control. In the channel coding problem this is the random channel which abstracts the medium we want to use to enable a reliable communication. In the lossy compression this is the source we want to ``compress'' to a minimum number of bits subject to a distortion constraint. The single shot approach tries to solve the problem by providing achievable and converse bounds without any assumption on the random object. A ``good'' solution should have the following properties: \begin{enumerate} \item \textbf{Tightness}: The relation between the achievable and converse bounds should be clarifies and quantified. Preferably, the gap between the bounds should be ``small''. \item \textbf{Computation}: The bounds should be computable. Since we generally deal with a high dimensional problem space for which the exact description might not even be feasible, we relax the computability to convexity, \ie, the bounds should be presented as a minimization of some convex function on some convex domain. For such a problems, symmetries might solve the problem entirely or substantially reduce the effective size, see \eg \cite[Theorem 20]{polyanskiy2013saddle}. \item \textbf{Generalization}: The bounds can be relaxed to other known bounds. \end{enumerate} In this paper we deal with the lossy source coding problem. In \cite{ElkayamITW2015} we presented a general approach to the one-shot coding problem. In this paper we borrow and extends ideas from \cite{ElkayamITW2015} and provide a novel analysis of the lossy compression problem. We derive an achievable bound using random coding and a corresponding converse bound. Both bounds are given in term of a newly defined functional $\tilde{D}(z,Q_Y)$ where $z \in [0,1]$ and $Q_Y$ denote a distribution over the reproduction space $\cY$. The functional $\tilde{D}(z,Q_Y)$ is shown to be convex and has similarity to the channel coding meta-converse \cite[Theorem 27]{polyanskiy2010channel}. \subsection{Notation} \label{sec:nota} Throughout this paper, scalar random variables are denoted by capital letters (e.g. $X$), sample values are denoted by lower case letters (e.g. $x$) and their alphabets are denoted by their respective calligraphic letters, (e.g. $\cX$). The set of all distributions (probability mass functions) supported on alphabet $\cY$ is denoted as $\scP(\cY)$. The set of all conditional distributions (i.e., channels) with the input alphabet $\cX$ and the output alphabet $\cY$ is denoted by $\scP(\cY|\cX )$. If $X$ has distribution $P_X$, we write this as $X\sim P_X$. The uniform probability distribution over $[0, 1]$ is denoted throughout by $\cU$. The probability (expectation) of an event (random variable) $\cA$ under the distribution $P_X$ is denoted by $\PRs{P_X}{\cA}$ ($\Es{P_X}{\cA}$) respectively, \eg\ $\PRs{P_X}{X \geq \alpha}$ and $\Es{P_X}{f(X)}$. In some cases, we abbreviate the notation and write $P_X\BRAs{\cA}$ instead of $\PRs{P_X}{\cA}$, \eg\ $P_X\BRA{X \geq \alpha}=\PRs{P_X}{X \geq \alpha}$. In some cases, we write $\Es{\mu}{f(X)}$ where $\mu$ is $\sigma-$finite measure and not a probability measure. \section{Problem setting} Let $X$ denote the random variable on $\cX$, representing the source we want to compress. The elements of $\cX$ are the input symbols. Denote by $P_X$ the distribution of $X$. Let $\cY$ denote the set of reproduction symbols. Let $d:\cX\times\cY\rightarrow \mathbb{R}^+$ denote the distortion function. Any subset $\cC \subset \cY$ is a \textbf{code} and the \textit{average distortion} associated with this code is: \begin{equation}\label{rate_distortion:average_distortion_definition} D(P_X, \cC) \triangleq \Es{P_X}{\MIN{y \in \cC}\BRAs{d(X,y)}} \end{equation} Let: \begin{equation}\label{rate_distortion:optimal_average_distortion_definition} D(P_X, R) \triangleq \MIN{\cC \subset \cY: \abs{\cC}=e^R}D(P_X,\cC) \end{equation} denote the optimal distortion-rate function. The goal is to find upper and lower bounds on $D(P_X, R)$. Throughout this paper we assume that both $\cX$ and $\cY$ are finite sets. Thus the distribution $P_X$ is discrete and the distortion is bounded by some $d_{max}$. The results in this paper can be extended quite straight forwardly to rather general alphabets $\cX$, $\cY$ and appropriate $\sigma$-algebras, as long as the probability distribution $P_X$ is well defined. The boundedness of the distortion can be relaxed to the following: There exist a ``small'' finite set $\cR \subset \cY$ such that $\Es{P_X}{\MIN{y\in\cR}d(X,y)} = d_{max} < \infty$. \section{Achievability bound} For the achievable argument we use the random coding approach. Let $Q_Y\in\scP(\cY)$ denote a given distribution on $\cY$. A random code of rate $R$ with $M=e^R+1$ codewords is $C=\BRAs{Y_0, \dots, Y_{e^R}}$ where each $Y_i$ is drawn from $Q_Y$ independently of the other code words. The average distortion of the random code is: \begin{equation} D(P_X, Q_Y, R)\triangleq \Es{C}{D(P_X, C)} \end{equation} \subsection{pairwise correct probability} In \cite{ElkayamITW2015} the pairwise error probability was defined as the random variable representing the probability of error given the sent and received symbols. Here, we define the \textit{pairwise correct probability}, which represent the probability of drawing a reproduction symbol that is better than a given reproduction symbol. \begin{definition} For $x\in \cX$, $y\in\cY$ and $u\in [0,1]$ Let: \begin{align} p_{c,x,y,u}&\triangleq Q_Y\BRAs{d(x,Y) < d(x,y)} \notag \\ & +u\cdot Q_Y\BRAs{d(x,Y) = d(x,y)} \end{align} The pairwise correct decoding probability is the random variable: $p_{c,x,y,U}$ where $U\sim \cU$ is uniform over $[0,1]$. \end{definition} The following proposition summaries the properties we need about the pairwise correct decoding $p_{c,x,y,u}$: \begin{proposition} \label{proposition:pairwise_correct} \mynewline \begin{enumerate} \item For any $w\in[0,1]$ and $x$ there exist $y$ and $\tau$ such that: $$w=p_{c,x,y,\tau}.$$ \item $d(x,y_1) < d(x,y_2) \Rightarrow p_{c,x,y_1, U_1} \leq p_{c,x,y_2, U_2}$. If $Q_Y(y_1)>0$ or $Q_Y(y_2)>0$ then $p_{c,x,y_1, U_1} < p_{c,x,y_2, U_2}$ with probability 1. \item $p_{c,x,Y,U} \sim W$ where $Y \sim Q_Y$ and $U,W$ are uniform over $[0,1]$. \end{enumerate} \end{proposition} \ifFullProofs \begin{proof} To prove (1) note that there must exist a $y$ such that: \begin{align*} Q_Y\BRAs{d(x,Y) < d(x,y)} \leq w &\leq Q_Y\BRAs{d(x,Y) \leq d(x,y)} \end{align*} If $Q_Y\BRAs{d(x,Y) = d(x,y)}=0$ then we are done with any $\tau$. If $Q_Y\BRAs{d(x,Y) = d(x,y)}\neq 0$ then $$\tau = \frac{w-Q_Y\BRAs{d(x,Y) < d(x,y)}}{Q_Y\BRAs{d(x,Y) = d(x,y)}}\leq 1$$ satisfies the requirement. To prove (2): \begin{align*} p_{c,x,y_1, U_1} &= Q_Y\BRAs{d(x,Y) < d(x,y_1)}\\&+U_1\cdot Q_Y\BRAs{d(x,Y) = d(x,y_1)} \\ &\overset{(a)}{\leq} Q_Y\BRAs{d(x,Y) \leq d(x,y_1)} \\ &\leq Q_Y\BRAs{d(x,Y) < d(x,y_2)} \\ &\overset{(b)}{\leq} Q_Y\BRAs{d(x,Y) < d(x,y_2)}\\&+U_2\cdot Q_Y\BRAs{d(x,Y) = d(x,y_2)} \\ &= p_{c,x,y_2, U_2} \end{align*} If $Q_Y(y_1) > 0$ then $Q_Y\BRAs{d(x,Y) = d(x,y_1)} > 0$ thus we have strict inequality in (a). If $Q_Y(y_2) > 0$ we have strict inequality in (b). To prove (3) let $y_w$ and $\tau_w$ be such that: \begin{align*} w &= Q_Y\BRAs{d(x,Y) < d(x,y_w)}\\ &+\tau_w\cdot Q_Y\BRAs{d(x,Y) = d(x,y_w)} \end{align*} Then: \begin{align*} &\PRs{Q_Y}{p_{c,x,Y,U} < w} \\ &= \sum_{y: d(x,y) < d(x,y_w)}Q_Y(y)\PRs{Q_Y}{p_{c,x,y,U} < w} \\ &+ \sum_{y: d(x,y) = d(x,y_w)}Q_Y(y)\PRs{Q_Y}{p_{c,x,y,U} < w} \\ &+ \sum_{y: d(x,y) > d(x,y_w)}Q_Y(y)\PRs{Q_Y}{p_{c,x,y,U} < w} \end{align*} If $d(x,y) \lessgtr d(x,y_w)$ and $Q_Y(y) > 0$ then: $$p_{c,x,y,U} \lessgtr w=p_{c,x,y_w,\tau}$$ according to (2). Thus the first sum gives $Q_Y\BRAs{d(x,Y) < d(x,y_w)}$ and the last sum vanishes. If $d(x,y) = d(x,y_w)$ and $Q_Y(y)>0$ then: \begin{align*} \PRs{Q_Y}{p_{c,x,y,U} < w} &= \PRs{Q_Y}{p_{c,x,y_w,U} < p_{c,x,y_w,\tau_w}}\\&=\PR{U < \tau_w}=\tau_w \end{align*} hence the middle sum gives $\tau_w\cdot Q_Y\BRAs{d(x,Y) = d(x,y_w)}$. Combined: \begin{align*} \PRs{Q_Y}{p_{c,x,Y,U} < w} &= Q_Y\BRAs{d(x,Y) < d(x,y_w)}\\&+\tau_w\cdot Q_Y\BRAs{d(x,Y) = d(x,y_w)} \\ &=w \end{align*} \end{proof} \else The proof is omitted due to space limitation and appears in the full paper available online: \cite{elkayam2019oneshot_rate_distortion_full}. \fi \subsection{Random coding performance} Proposition \ref{proposition:pairwise_correct} suggests that for any fixed $x$ we have a correspondence between the elements of $\cY$ and the sub interval $$[Q_Y\BRAs{d(x,Y)<d(x,y)}, Q_Y\BRAs{d(x,Y)\leq d(x,y)}]\subset [0,1]$$ given by $y \iff p_{c,x,y,U}$. We define the distortion function $d$ on $\cX\times [0,1]$ according to: \begin{equation}\label{distortion_extansion_to_unit_interval} \tilde{d}(x,u)\triangleq d(x,y),\ \ u=p_{c,x,y,\tau} \end{equation} This correspondence is well defined almost everywhere with respect to the pair $\BRA{Q_Y,U}$ since if $d(x,y_1)\neq d(x,y_2)$, and $Q_Y(y_1) > 0$ or $Q_Y(y_2) > 0$ the support of $p_{c,x,y_1,U_1}$ and $p_{c,x,y_2,U_2}$ do not overlap with probability 1. Moreover, this mapping is order preserving, \ie, \begin{equation}\label{corresponednce_order_preserving} d(x,y_1)<d(x,y_2) \Rightarrow p_{c,x,y_1,U_1}\leq p_{c,x,y_2,U_2} \end{equation} The following result provides an exact formula for the average distortion of random code. \begin{theorem}[Exact performance of random coding]\label{theorem:exact_performance_one_shot_rate_distortion} The average distortion of random code with $M=e^R+1$ codewords $\BRAs{Y_i}$ drawn from $Q_Y$ is given by: \begin{equation} \Es{P_X,\BRAs{Y_i}}{\min d(X,Y_i)} = \int_{0}^{1}\tilde{D}(w,Q_Y)G_M'(w) dw \end{equation} where: $\tilde{D}(w,Q_Y)=w^{-1}\cdot \Es{P_X\times Q_Y}{d(X,Y)\cdot\Ind{p_{c,X,Y,U}\leq w}}$ and $G_M(w)=-(1-w)^{M-1}((M-1)w+1)$. \end{theorem} \begin{corollary}\label{distortion_rate_upper_bound} For any $\lambda<R$: \begin{align*} &\E{\min d(X,Y_i)} \leq \tilde{D}\BRA{e^{-(R-\lambda)},Q_Y}\\&+\BRA{\tilde{D}\BRA{1,Q_Y}-\tilde{D}\BRA{e^{-(R-\lambda)},Q_Y}}\cdot e^{-e^{\lambda}}(e^{\lambda}+1) \\ &\leq \tilde{D}\BRA{e^{-(R-\lambda)},Q_Y}+d_{max}\cdot e^{-e^{\lambda}}(e^{\lambda}+1) \end{align*} \end{corollary} For $z \in [\tilde{D}(0,Q_Y), \tilde{D}(1,Q_Y)]$ let: $$\tilde{D}^{-1}(z,Q_Y) \triangleq \inf\BRAs{w \in [0,1]: \tilde{D}(w,Q_Y) \geq z}$$ and: \begin{equation}\label{rate_distortion_formula} \tilde{R}(z,Q_Y) \triangleq -\log \tilde{D}^{-1}(z,Q_Y) \end{equation} $\tilde{R}(z,Q_Y)$ is the ``rate distortion'' function associated with the prior distribution $Q_Y$. \begin{corollary}\label{distortion_rate_distortion_solution} For any $Q_Y$, let $d_{req}\in(\tilde{D}(0,Q_Y), \tilde{D}(1,Q_Y))$ denote a desired distortion level. There exist a code with distortion level $d_{req}$ and rate $R$ such that: \begin{align*} R &\leq \MIN{z < d_{req}} \tilde{R}(z,Q_Y) + f^{-1}\BRA{\frac{d_{req}-z}{\tilde{D}(1,Q_Y)-z}} \\ &\leq \MIN{z < d_{req}} \tilde{R}(z,Q_Y) + g\BRA{\frac{\tilde{D}(1,Q_Y)-z}{d_{req}-z}} \end{align*} where $f(t)=e^{-e^t}(e^t+1)$ and $g(x)=\log\log(x)+\log\BRA{\frac 23}+\log\BRA{1 + \sqrt{1+9\BRA{2\log(x)}^{-1} } }$ \end{corollary} \begin{proof}[Proof of theorem \ref{theorem:exact_performance_one_shot_rate_distortion}:] To calculate the average distortion of a random code with $M$ codewords we proceed as follow: \begin{align*} \E{\min d(X,Y_i)} &\overset{(a)}{=} \Es{P_X}{\E{\min d(X,Y_i) | X}} \\ &\overset{(b)}{=} \Es{P_X}{\E{\MIN{i}\BRAs{ \tilde{d}(X,p_{c,X,Y_i, U_i})|X}}} \\ &\overset{(c)}{=} \Es{P_X}{\E{\tilde{d}(X, \MIN{i}\BRAs{ p_{c,X,Y_i, U_i}})}| X} \\ &\overset{(d)}{=} \Es{P_X}{\Es{W_M}{\tilde{d}(X,W_M)|X}} \\ &\overset{(e)}{=} \Es{W_M}{\Es{P_X}{\tilde{d}(X,W_M)|W_M}} \\ &\overset{(f)}{=} \int_{0}^{1}\Es{P_X}{\tilde{d}(X,w)}f_M(w)dw \\ &\overset{(g)}{=} f_M(1)\tilde{D}_1(1)-f_M(0)\tilde{D}_1(0)\\&-\int_{0}^{1}\tilde{D}_1(w)f_M'(w)dw \\ &\overset{(h)}{=} M\cdot(M-1)\int_{0}^{1}\tilde{D}_2(w)w(1-w)^{M-2} dw \\ &\overset{(i)}{=} \int_{0}^{1}\tilde{D}_2(w)G_M'(w) dw \end{align*} where $W_M$ is the minimum of $M$ independent uniform random variables, $\tilde{D}_1(w)=\int_{0}^{w}\Es{X}{\tilde{d}(X,z)}dz$ and $\tilde{D}_2(w)=w^{-1}\cdot \tilde{D}_1(w)$. \begin{itemize} \item (a) is the law of total expectation with respect to $X$. \item (b) follow since $d(x,y)=\tilde{d}(x,p_{c,x,y,U})$ according to \eqref{distortion_extansion_to_unit_interval}. \item (c) follow since $p_{c,x,y,U}$ preserve the order induce by $\tilde{d}$ according to \eqref{corresponednce_order_preserving}. \item (d) follow since $p_{c,x,Y_i,U_i}$ are all independent and uniform over $[0,1]$. \item (e) is again the law of total expectation with respect to $X$ and $W_M$. \item (f) is the expectation according to the p.d.f $f_M$\footnote{The p.d.f of $W_M$ is $f_M(w)=M\cdot(1-u)^{M-1} $}. \ifFullProofs (see \eqref{cdf_of_min} in the appendix). \else (see \cite{elkayam2019oneshot_rate_distortion_full} for the proof) \fi \item (g) is integration by parts. \item (h) follow since $\tilde{D}_1(0)=f(1)=0$ and: $$f_M'(w)=-M\cdot(M-1)(1-w)^{M-2}$$ \item (i) follow since $G_M'(w)=M(M-1)w(1-w)^{M-2}$. \end{itemize} Finlay: \begin{align*} \tilde{D}_1(w)&=\int_{0}^{w}\Es{P_X}{\tilde{d}(X,z)}dz \\ &\overset{(a)}{=} \Es{P_X,W}{\tilde{d}(X,W)\cdot\Ind{W \leq w}} \\ &\overset{(b)}{=} \Es{P_X\times Q_Y}{\tilde{d}(X,p_{c,X,Y,U})\cdot\Ind{p_{c,X,Y,U} \leq w}} \\ &\overset{(c)}{=} \Es{P_X\times Q_Y}{d(X,Y)\cdot\Ind{p_{c,X,Y,U}\leq w}} \\ &=w\cdot\tilde{D}(w,Q_Y) \end{align*} where (a) follow since $W$ is uniform over $[0,1]$. (b) follow since for each $x$, $p_{c,x,Y,U}$ is uniform over $[0,1]$ and (c) is \eqref{distortion_extansion_to_unit_interval}. \end{proof} \begin{proof}[Proof of corollary \ref{distortion_rate_upper_bound}:] $\tilde{D}(w,Q_Y)$ is an increasing function, Thus: \begin{align*} \E{\min d(X,Y_i)} &= \int_{0}^{1}\tilde{D}(w,Q_Y)G_M'(w) dw\\ &\leq \tilde{D}(u,Q_Y)\int_{0}^{u}G_M'(w) dw \\&+ \tilde{D}(1,Q_Y)\int_{u}^{1}G_M'(w)dw \\ &= \tilde{D}(u,Q_Y) \\&- \BRA{\tilde{D}(1,Q_Y)-\tilde{D}(u,Q_Y)}G_M(u) \end{align*} since $G_M(0)=-1$, $G_M(1)=0$ and: \begin{align*} -G_M(u) &= (1-u)^{M-1}((M-1)u+1) \\ &\leq e^{-u\cdot e^R}(u\cdot e^R+1) = e^{-e^{\lambda}}(e^{\lambda}+1) \end{align*} where $u\cdot e^R=e^{\lambda}$. The second bound follow since $\tilde{D}(1,Q_Y) \leq d_{max}$. \end{proof} \begin{proof}[Proof of corollary \ref{distortion_rate_distortion_solution}:] Using $d_{req}=\E{\min d(X,Y_i)}$ and $z=\tilde{D}\BRA{e^{-(R-\lambda)},Q_Y}$ in corollary \ref{distortion_rate_upper_bound} we have: $$ d_{req} \leq z + (\tilde{D}(1,Q_Y)-z)\cdot f(\lambda)$$ Hence: $$ \lambda \leq f^{-1}\BRA{\frac{d_{req}-z}{\tilde{D}(1,Q_Y)-z}}$$ since $f$ is decreasing. The result follow from: $$ \tilde{R}(z,Q_Y) = R-\lambda$$ The second bound follow from the technical lemma \ifFullProofs \ref{solutionToFunction}, given in the appendix. \else given in the full paper \cite{elkayam2019oneshot_rate_distortion_full}. \fi \end{proof} The standard rate distortion analysis usually employ a ``test'' channel $W_{Y|X}$ that is used for change of measure during the achievability proof and also serves as the encoding function when the converse is proved. The following Proposition suggest such a channel to be used in our achievability theorem. \begin{proposition}\label{proposition_def_rd_channel} Let $W_{Y|X=x}^w\triangleq w^{-1}\cdot Q_Y\cdot\Ind{p_{c,x,Y,U}\leq w}$, \ie $$ W_{Y|X=x}^w(y) = w^{-1}\cdot Q_Y(y)\cdot\PRs{U}{p_{c,x,y,U}\leq w}$$ Then $W_{Y|X=x}^w$ is a probability distribution over $\cY$ and: $$ \tilde{D}(w,Q_Y)=\Es{P_X\times W_{Y|X}^w}{d(X,Y)}$$ \end{proposition} \ifFullProofs \begin{proof} $W_{Y|X=x}^w$ is a distribution since: \begin{align*} w &= \PRs{Q_Y,U}{p_{c,x,Y,U}\leq w} \\ &= \Es{Q_Y, U}{\Ind{p_{c,x,Y,U}\leq w}} \end{align*} and: \begin{align*} \tilde{D}(w,Q_Y)&=\Es{P_X\times Q_Y}{d(X,Y)\cdot w^{-1}\cdot\Ind{p_{c,x,Y,U}\leq w}} \\ &= \Es{P_X\times W_{Y|X}^w}{d(X,Y)} \end{align*} \end{proof} \else The proof is omitted due to space limitation and appears in the full paper available online: \cite{elkayam2019oneshot_rate_distortion_full}. \fi \section{Converse bound} The channel $W_{Y|X}^w$ that was suggested in proposition \ref{proposition_def_rd_channel} with the proper distribution $Q_Y$ and parameter $w=M^{-1}$ can serve as the encoding function as the next proposition show. \begin{proposition} Let $\cC\subset\cY$ be a code with $M$ codewords. Let $\tilde{W}_{Y|X}$ denote the optimal encoding of the $\cX$ to $\cC$, \ie $$\tilde{W}_{Y|X} = \argmin_{c\in \cC}\BRA{d(X,c)}$$ where ties are broken arbitrary. Let $Q_Y^{\cC}$ distribute uniformly over the codewords, \ie\ $Q_Y^{\cC}(y)=M^{-1}$ if $y\in \cC$ and $Q_Y^{\cC}(y)=0$ otherwise. Then: $$\tilde{W}_{Y|X=x}=W_{Y|X=x}^{M^{-1}}$$ \end{proposition} \ifFullProofs \begin{proof} Recall that $$p_{c,x,y,U}=Q_Y^{\cC}\BRA{d(x,Y)<d(x,y)}+U\cdot Q_Y^{\cC}\BRA{d(x,Y)=d(x,y)}.$$ \underline{Case I: $Q_Y^{\cC}\BRA{d(x,Y)<d(x,y)}>0$}: In this case there exist $y' \neq y$ such that $d(x,y')<d(x,y)$. Thus: $\tilde{W}_{Y|X=x}(y|x)=0$ since $x$ cannot encode to $y$ ($y'$ produce lower distortion). From $Q_Y^{\cC}\BRA{d(x,Y)<d(x,y)}\geq M^{-1}$ it follow that $p_{c,x,y,U} > M^{-1}$ with probability 1 and $W_{Y|X=x}^{M^{-1}}(y|x)=0$ as well. \underline{Case II: $Q_Y^{\cC}\BRA{d(x,Y)<d(x,y)}=0$}: Let: $$Q_Y^{\cC}\BRA{d(x,Y)=d(x,y)}=k\cdot M^{-1}$$ where $k$ is integer greater than 0. There are $k$ different symbols $y_1=y,\dots, y_k \in \cY$ such that $d(x,y_i)=d(x,y)$ and $\tilde{W}_{Y|X=x}(\cdot|x)$ encode $x$ to one of these symbols randomly. Thus: $$\tilde{W}_{Y|X=x}(y_1|x)=\dots=\tilde{W}_{Y|X=x}(y_k|x)=k^{-1}$$ in particular, $\tilde{W}_{Y|X=x}(y|x)=k^{-1}$. Since: $$p_{c,x,y,U}=U\cdot Q_Y^{\cC}\BRA{d(x,Y)=d(x,y)}=U\cdot k\cdot M^{-1}$$ we have: \begin{align*} \PRs{U}{p_{c,x,y,U} \leq M^{-1}}&=\PRs{U}{U\cdot k\cdot M^{-1} \leq M^{-1}} \\ &=k^{-1} \end{align*} thus: $$W_{Y|X=x}^{M^{-1}}(y) = M\cdot Q_Y^{\cC}(y)\cdot\PRs{U}{p_{c,x,y,U}\leq M^{-1}}=k^{-1}$$ as required. \end{proof} \else The proof is omitted due to space limitation and appears in the full paper available online: \cite{elkayam2019oneshot_rate_distortion_full}. \fi \begin{theorem} For any code $\cC$: $$ D(P_X, \cC) =\tilde{D}(M^{-1},Q_Y^{\cC})$$ in particular: $$ D(P_X, R) \geq \inf_{Q_Y\in\scP(\cY)} \tilde{D}(e^{-R},Q_Y)$$ \end{theorem} \begin{proof} \begin{align*} D(P_X, \cC) &= \Es{P_X\times \tilde{W}_{Y|X}}{d(X,Y)} \\ &=\Es{P_X\times W_{Y|X}^{M^{-1}}}{d(X,Y)} \\ &=\tilde{D}(M^{-1},Q_Y^{\cC}) \end{align*} \end{proof} Let: $$ \hat{D}(z) \triangleq \INF{Q_Y}\tilde{D}(e^{-z},Q_Y) $$ Writing the achievable and converse results in terms of $\hat{D}(z)$, we have: \begin{align} \hat{D}(R) &\leq D(P_X,R) \\&\leq \INF{\lambda < R}\BRAs{\hat{D}(R-\lambda)+d_{max}\cdot e^{-e^{\lambda}}(e^{\lambda}+1) } \end{align} This equation exemplify the tightness of our bounds. \section{Variational forms of $\tilde{D}(z,Q_Y)$} In this section we present two alternative presentations of $\tilde{D}(z,Q_Y)$. We first recall some definition. The definition of $\beta_{\alpha}\BRA{P,Q}$ which represent the optimal performance of a binary hypothesis testing between two $\sigma-$finite measures $P$ and $Q$ over a set $W$: \begin{equation}\label{binary_hypothsis:beta} \beta_{\alpha}\BRA{P,Q} = \MIN{\substack{P_{Z|W} :\\ \sum_{w\in W}P(w)P_{Z|W}(1|w) \geq \alpha} } \sum_{w\in W}Q(w)P_{Z|W}(1|w), \end{equation} $P_{Z|W}:W \rightarrow \BRAs{0,1}$ is any randomized test between $P$ and $Q$. The minimum is guaranteed to be achieved by the Neyman--Pearson lemma. The functional $\beta_{\alpha}\BRA{P,Q}$ has been proved useful for converse results in channel coding and lossy compression, \eg\ \cite[Theorem 26]{polyanskiy2010channel}, \cite[Theorem 8]{DBLP:journals/tit/KostinaV13}. The $\infty$-order divergences between $P$ and $Q$ is: \begin{equation} D_{\infty}(P||Q)\triangleq \log\inf\BRAs{\lambda : P(x)\leq \lambda Q(x), \forall x} \end{equation} \begin{theorem}[Variational forms of $\tilde{D}(z,Q_Y)$]\label{theorem:variational_form} Let $w=e^{-R}$. Then: \begin{align} &\tilde{D}(z,Q_Y) \notag\\&= \SUP{Q_X}\mbox{ }\beta_{w}\BRA{Q_X\times Q_Y, P_X\times Q_Y\times d(X,Y)} \label{variational_formula:sup}\\ &= \INF{W_{Y|X}: D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y) \leq R}\Es{P_X\times W_{Y|X}}{d(X,Y)} \label{variational_formula:inf} \end{align} \end{theorem} \begin{corollary} The convexity of $\tilde{D}(z,Q_Y)$ with respect to $Q_Y$ readily follows from \eqref{variational_formula:sup}. Since $\beta_{w}\BRA{Q_X\times Q_Y, P_X\times Q_Y\times d(X,Y)}$ is convex with respect to $Q_Y$ according to \cite[Theorem 6]{polyanskiy2013saddle} and supremum of convex function is convex as well. \end{corollary} \ifFullProofs \begin{proof} To prove \eqref{variational_formula:sup}, let $\Ind{p_{c,X,Y,U}\leq w}$ denote a (not necessarily optimal) test between $Q_X\times Q_Y$ and $P_X\times Q_Y\times d(X,Y)$. Since $\PRs{Q_Y}{p_{c,x,Y,U}\leq w}=w$ for any $x$, it follow that for any $Q_X$ we have: $\PRs{Q_X\times Q_Y}{p_{c,X,Y,U}\leq w}=w$: \begin{align*} &\beta_{w}\BRA{Q_X\times Q_Y, P_X\times Q_Y\times d(X,Y)} \\&\leq \Es{P_X\times Q_Y\times d(X,Y)}{\Ind{p_{c,X,Y,U}\leq w}} \\ &= \Es{P_X\times Q_Y}{d(X,Y)\cdot \Ind{p_{c,X,Y,U}\leq w}} \end{align*} Thus: \begin{align*} &\sup_{Q_X}\beta_{u}\BRA{Q_X\times Q_Y, P_X\times Q_Y\times d(X,Y)} \\&\leq \Es{P_X\times Q_Y}{d(X,Y)\cdot \Ind{p_{c,X,Y,U}\leq u}} \end{align*} To show the reverse inequality, we show that there exist $Q_X^c$ such that: \begin{align*} &\beta_{w}\BRA{Q_X^c\times Q_Y, P_X\times Q_Y\times d(X,Y)} \\&= \Es{P_X\times Q_Y}{d(X,Y)\cdot \Ind{p_{c,X,Y,U}\leq w}} \end{align*} which will complete the proof. We will construct such a $Q_X^c$ and show that the optimal likelihood test between $Q_X^c\times Q_Y$ and $P_X\times Q_Y\times d(X,Y)$ matches the test $\Ind{p_{c,X,Y,U}\leq w}$. The likelihood ratio is: $$L(x,y)=\frac{P_X(x)\times Q_Y(y)\cdot d(x,y)}{Q_X^c(x)\times Q_Y(y)}=\frac{P_X(x)}{Q_X^c(x)}\times d(x,y)$$ and the likelihood ratio test is: $$P(z|x,y)=\Ind{L(x,y) < \lambda} + \sum_{x'} \tau_{x'} \Ind{L(x,y) = \lambda, x=x'}$$ where $\lambda$ and $\tau_{x'}$ are tuned so that: $$ \PRs{Q_X^c\times Q_Y}{P(z|X,Y) = 1}=w$$ For any $x$ there exist $y_x$ and $\tau_x$ such that: $$ w = Q_Y(d(x,Y)< d(x,y_x)) +\tau_x\cdot Q_Y(d(x,Y)= d(x,y_x))$$ Define $\lambda$ and $Q_X^c$: \begin{align*} \lambda &= \sum_x P_X(x)\cdot d(x,y_x) \\ Q_X^c(x) &= \lambda^{-1}\cdot P_X(x)\cdot d(x,y_x) \end{align*} Note that $Q_X^c$ is probability distribution and: \begin{align*} L(x,y_x) = \frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y_x) &= \lambda \end{align*} To show that the tests matches we have to prove: \begin{align*} \PR{p_{c,x,y,U} \leq w} &= \PR{P(z|x,y) = 1} \end{align*} for any $x$ and $y$. There are 3 cases to consider: \begin{enumerate} \item $d(x,y) < d(x,y_x)$: In this case: \begin{align*} p_{c,x,y,U} &\leq Q_Y(d(x,Y)\leq d(x,y)) \\&\leq Q_Y(d(x,Y)< d(x,y_x)) \\&\leq w \end{align*} thus: $\PR{p_{c,x,y,U} \leq w}=1$. On the other hand, since: \begin{align*} L(x,y)&=\frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y) \\&< \frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y_x) \\&= \lambda \end{align*} we also have: $\PR{P(z|x,y) = 1}=1$. \item $d(x,y) > d(x,y_x)$: In this case: \begin{align*} p_{c,x,y,U} &\geq Q_Y(d(x,Y)< d(x,y)) \\&\geq Q_Y(d(x,Y)\leq d(x,y_x)) \\&\geq w \end{align*} thus: $\PR{p_{c,x,y,U} \leq w}=0$. On the other hand, since \begin{align*} L(x,y)&=\frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y) \\&> \frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y_x) \\&= \lambda \end{align*} we also have: $\PR{P(z|x,y) = 1}=0$. \item $d(x,y) = d(x,y_x)$: In this case \begin{align*} \PR{p_{c,x,y,U}\leq w} &=\PR{p_{c,x,y_x,U}\leq w}\\ &=\tau_x \end{align*} On the other hand, since \begin{align*} L(x,y)&=\frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y) \\&= \frac{P_X(x)}{Q_X^c(x)}\cdot d(x,y_x) \\&= \lambda \end{align*} we also have: $\PR{P(z|x,y) = 1}=\tau_x$. \end{enumerate} Thus, the test $\Ind{p_{c,x,y,U}\leq w}$ matches the likelihood ratio test and is, in fact, optimal. To prove \eqref{variational_formula:inf}, recall the channel: $$W_{Y|X=x}^{e^{-R}}=e^{R}\cdot Q_Y \cdot \Ind{p_{c,x,Y,U}\leq e^{-R}}$$ For any $y$ such that $Q_Y(y)>0$ $$\log\frac{e^{R}\cdot Q_Y(y) \cdot \PR{p_{c,x,Y,U}\leq e^{-R}}}{Q_Y(y)}\leq R$$ Thus: $D_{\infty}(P_X\times W_{Y|X}^{e^{-R}}||P_X\times Q_Y) \leq R$ and: \begin{align*} &\tilde{D}(e^{-R}, Q_Y)\\&\geq\MIN{W_{Y|X}: D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y) \leq R}\Es{P_X\times W_{Y|X}}{d(X,Y)} \end{align*} On the other hand, if $W_{Y|X}$ satisfy: $$D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y) \leq R$$ we have $W_{Y|X}(y|x)P_X(x)\leq e^R\cdot Q_Y(y)P_X(x)$ for each $x$ and $y$. Thus, to get the minimal $\Es{P_X\times W_{Y|X}}{d(X,Y)}$ we will have to assign the maximal probability to the minimal distortion, \ie\ $Q_Y(y)\cdot e^R$. This is exactly what the assignment $Q_Y\cdot\Ind{p_{c,X,Y,U}\leq e^{-R}}\cdot e^R$ does which assign $Q_Y(y)\cdot e^R$ for the smallest distortion values until it exhaust the probability to one. \end{proof} \else The proof is omitted due to space limitation and appears in the full paper available online: \cite{elkayam2019oneshot_rate_distortion_full} \fi Let $W_{Y|X}$ denote any channel and let $Q_Y$ denote the marginal distribution of $W_{Y|X}\times P_X$. Let $i(x;y)=\frac{W_{Y|X}(y|x)}{Q_Y(y)}$ denote the information density. Note that in theorem \ref{theorem:variational_form} we did not require that $Q_Y$ is the marginal distribution. We might have relaxed the requirement $D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y) \leq R$ which amounts to $i(x;y)\leq R$ for each $x$ and $y$ when $Q_Y$ is the marginal distribution to the requirement that $\PRs{P_X\times W_{Y|X}}{i(X,Y)\leq R-\delta}$ is close to 1. \begin{theorem}\label{relation_Dr_classic} Let $W_{Y|X}$ such that: $$\PRs{P_X\times W_{Y|X}}{i(X,Y)\leq R-\delta}=e^{-\lambda}$$ Then: \begin{align*} \tilde{D}(e^{-(R-\delta)-\lambda}, Q_Y) &\leq \Es{P_X\times W_{Y|X}}{d(X,Y)}\cdot e^{\lambda} \end{align*} \end{theorem} \ifFullProofs \begin{proof} \begin{align*} \Es{P_X\times W_{Y|X}}{d(X,Y)} &\geq \Es{P_X\times W_{Y|X}}{d(X,Y)\Ind{i(x,y)\leq R-\delta}} \\ &\geq \Es{P_X\times W_{Y|X}'}{d(X,Y)}e^{-\lambda} \\ &\overset{(a)}{\geq} \tilde{D}(e^{-(R-\delta)-\lambda}, Q_Y)\cdot e^{-\lambda} \end{align*} where $W_{Y|X}'=e^{\lambda}\cdot W_{Y|X}\Ind{i(x,y)\leq R-\delta}$ is a probability distribution. Note that: $$\frac{W_{Y|X}'(y|x)}{Q_Y(y)} = \frac{e^{\lambda}\cdot W_{Y|X}(y|x)\Ind{i(x,y)\leq R-\delta}}{Q_Y(y)}\leq e^{R-\delta}\cdot e^{\lambda}$$ Thus $D_{\infty}(P_X\times W_{Y|X}'||P_X\times Q_Y) \leq R-\delta+\lambda$ and (a) follow from \eqref{variational_formula:inf}. \end{proof} \else The proof is omitted due to space limitation and appears in the full paper available online: \cite{elkayam2019oneshot_rate_distortion_full}. \fi \section{Excess distortion} The excess distortion is a spacial case of the average distortion that we have analyzed. Let $d_{th}$ denote the target distortion level, replacing $d(x,y)$ with $\Ind{d(x,y)>d_{th}}$. Let: \begin{align} \tilde{D}(R,d_{th},Q_Y) &= \Es{P_X\times Q_Y}{\Ind{d(X,Y)>d_{th}}\Ind{p_{c,X,Y,U}<e^{-R}}} \end{align} Note that $p_{c,x,y,u}$ is also defined with respect to the ``new'' distortion: \begin{align*} p_{c,x,y,u} &= Q_Y\BRA{\Ind{d(x,Y)>d_{th}}<\Ind{d(x,y)>d_{th}}}\\&+u\cdot Q_Y\BRA{\Ind{d(x,Y)>d_{th}}<\Ind{d(x,y)>d_{th}}} \end{align*} equation \eqref{variational_formula:inf} translates in this case to: \begin{align*} &\tilde{D}(R,d_{th},Q_Y) \\ &=\inf_{\substack{W_{Y|X}: \\D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y)\leq R}}\PRs{P_X\times W_{Y|X}}{d(X,Y)>d_{th}} \end{align*} and \eqref{rate_distortion_formula} is: \begin{align*} &\tilde{R}(\delta,z,Q_Y) \\ &=\inf_{\substack{W_{Y|X}: \\\PRs{P_X\times W_{Y|X}}{d(X,Y)>z} \leq \delta}}D_{\infty}(P_X\times W_{Y|X}||P_X\times Q_Y) \end{align*} \section{Relation to known bounds} The information spectrum approach \cite[Theorem 5.5.1]{koga2002information} provides a general formula for the rate distortion function. The general formula takes any channel $W_{Y|X}$ and with slight abuse of notation, say that the distortion $\Es{P_X\times W_{Y|X}}{d(X,Y)}$ is achievable for a code with rate $R$ such that $\PRs{P_X\times W_{Y|X}}{i(x;y)\leq R}$ approach 1 where $i(x;y)$ is the information density. The achievability is proved by the random coding argument where the distribution used to draw the codewords is the marginal distribution of $P_X\times W_{Y|X}$ on $\cY$. In this paper (see also \cite{matsuta2015non}) we started with any distribution $Q_Y$ and analyzed the random code performance with no channel in mind. For the achievable part, theorem \ref{relation_Dr_classic} provides the link between the functional $\tilde{D}(z,Q_Y)$ and the elements in the information spectrum formula. The converse follow since a code $\cC$ with rate $R$ satisfies $$D_{\infty}\BRA{P_X\times \tilde{W}_{Y|X}||P_X\times Q_Y^{\cC}}=R$$ where $\tilde{W}_{Y|X}$ and $Q_Y^{\cC}$ were defined in the text. Much attention has been given to the problem of lossy compression with the excess distortion constraint. The tightest results (to the best of our knowledge) appeared in \cite{matsuta2015non}. The converse bound \cite[Theorem 2]{matsuta2015non} was shown to be tighter than \cite[Theorem 8]{kostina2012fixed}. In \cite{palzer2016converse} the author demonstrated how the bound \cite[Theorem 8]{kostina2012fixed} can be relaxed to all other bounds presented there. The approach in \cite{matsuta2015non} for the achievability was to analyze the random coding for a given prior distribution $Q_Y$ and bound the performance from above using a change of measure from $P_X\times Q_Y$ to $P_X\times W_{Y|X}$ where the marginal distribution of $P_X\times W_{Y|X}$ with respect to $\cY$ does not necessarily matches $Q_Y$. Later they optimize for a given channel $W_{Y|X}$ the best prior distribution. Thus, their bounds are given as an optimization over the a set of channels. In \cite[Theorem 2]{matsuta2015non} the author defined: $$M(P_{XY})\triangleq \sum_{y\in\cY}\SUP{x\in\cX: P_{XY}(x,y)>0}P_{Y|X}(y|x)$$ and \cite[Lemma 4]{matsuta2015non} reads: $$\INF{Q_Y\in\scP(\cY)}D_{\infty}(P_{XY}||P_X\times Q_Y) = \log M(P_{XY})$$ Hence: \begin{align*} &\inf_{Q_Y\in\scP(\cY)}\tilde{R}(\delta,d_{th},Q_Y) \\ &=\inf_{\substack{W_{Y|X}: \\\PRs{P_X\times W_{Y|X}}{d(X,Y)>d_{th}} \leq \delta}}\log M(P_X\times W_{Y|X}) \end{align*} and our converse bound matches theirs. Their achievability bound (Theorem 2) is slightly tighter than the bound in corollary \ref{distortion_rate_distortion_solution}. While their bound reads: \begin{align*} R &\leq \MIN{\delta < \epsilon } \tilde{R}(\delta, d_{th}) + \log\log \BRA{\frac{1-\delta}{\epsilon-\delta}} \end{align*} our bound is: \begin{align*} R &\leq \MIN{\delta < \epsilon } \tilde{R}(\delta, d_{th}) + g\BRA{\frac{1-\delta}{\epsilon-\delta}} \end{align*} where: $$g(x)=\log\log(x)+\log\BRA{\frac 23}+\log\BRA{1 + \sqrt{1+9\BRA{2\log(x)}^{-1} } }.$$ The difference smaller than 1 $nat$ for all practical cases. Note that, our bound follow from bounding $$\tilde{D}(z,Q_Y) \leq \tilde{D}(u,Q_Y)\Ind{z\leq u}+\tilde{D}(1,Q_Y)\Ind{z> u}$$ and evaluating the exact formula with this bound. Using the exact formula directly or bound $\tilde{D}(z,Q_Y)$ using more points would gives tighter bound. Since their achievability also follow from the random coding, obviously the exact formula is tighter. \section{Prior optimization} The prior optimization problem is the main drawback of our approach. While the optimization problem is convex, we do not have a close form solution to the important case of memoryless source (and channel in the channel coding case) and this should be further investigated. In the channel coding case, the prior optimization problem for memoryless channel is ``solved'' by \cite[Theorem 10]{DBLP:journals/tit/VerduH94} which shows that for memoryless channel, we can resort to memoryless priors. For our functional $\tilde{D}(z,Q_Y)$ (and the one used in the channel coding problem) we do not have such a theorem. Moreover, simulation results show that this is not even true, and sometimes, prior with memory are better than the memoryless priors. \section{Concluding remarks} In this paper we presented a novel analysis for the lossy compression problem. We have analyzed the general case of average distortion constraints. We presented tight achievable and converse bounds. Both bounds are given in terms of the functional $\tilde{D}(z,Q_Y)$ which has resemblance to the meta-converse in channel coding. The problem of finding distribution minimizing $\tilde{D}(z,Q_Y)$ is still open in general although the $\tilde{D}(z,Q_Y)$ is convex with respect to $Q_Y$. \ifFullProofs
\section{Introduction} \IEEEPARstart{M}{icrogrid} has proved to be effective in ensuring electricity resiliency for customers. A most important and indispensable foundation for microgrid operation and management is the power flow analysis~\cite{8309382}. However, power flow of islanded microgrid has yet to be addressed because: 1) a swing bus no longer exists, rather 2) distributed energy resources (DERs) are operated by hierarchical controls, and 3) microgrid is subject to frequently changes in structure and operating modes~\cite{8636509}. Although modified backward/forward sweep methods~\cite{8309382,8636509,7283640} and Newton method~\cite{7350239} are developed to consider droops in DERs, they fail to handle either meshed microgrids or secondary controllers equipped for frequency and voltage recovery. This letter devises an enhanced Newton-type microgrid power flow (EMPF) which fully adapts to both meshed and radial structures. The main contributions of EMPF lie in : 1) an augmented Newton type formulation of microgrid power flow which supports plug-and-play and allows future extensions into networked microgrids power flow as well as 2) a new Jacobian matrix formulation which is able to incorporate hierarchical control effects and thus precisely considers power sharing and voltage regulation in a modular fashion. \section{Enhanced Microgrid Power Flow} In EMPF, in addition to the traditional PV and PQ buses, we introduce a bus type called \emph{DER buses} to which those DERs equipped with droop and/or secondary control are connected. Generally, a slack bus no longer exists because none of the DERs in the droop-based microgrids is able to provide constant voltage and frequency. We can pick an arbitrary DER bus and use its voltage angle as the reference for the rest of the buses. \vspace{-10pt} \subsection{EMPF Formulation} For an ${N}$-bus microgrid with $\zeta$ DER buses , the power injections from DERs are determined by a two-layer hierarchical control syste ~\cite{7112129}. Considering PV, PQ and DER buses, we can derive the EMPF power flow equations as follows \begin{equation}\label{E1} \begin{aligned} \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})&=\begin{bmatrix} \mathbf {S}(\mathbf V,f)^\mathbf{G} - \mathbf {S}^\mathbf{L}-\mathbf{\Bar{Y}(\boldsymbol{\theta})} \cdot \mathbf{V} \circ \mathbf{V} \\[0.3em] \mathbf{P}(f)^\mathbf{Gs} - \mathbf {P}^\mathbf{sum} \end{bmatrix} \end{aligned} \end{equation} \noindent where $\mathbf {S}(\mathbf V,f)^\mathbf{G}=[\mathbf{{P}}(f)^\mathbf{G} ,\mathbf{{Q}(V)^\mathbf{G}}]^T\in \mathbb{R}^{(2N-1)\times 1}$ and $\mathbf{{S}^L}=[\mathbf{{P}^L} ,\mathbf{{Q}^L}]^T\in \mathbb{R}^{(2N-1)\times 1}$ are the generation and load matrices, respectively, $\mathbf{P}(f)^\mathbf{Gs}$ is the total real power from generators, $\circ$ means Hadamard product, $\mathbf {P}^\mathbf{sum}$ is the sum of real power consumption including load and losses. Different from traditional power flow, frequency $f$ is a variable in the EMPF formulation. $ \mathbf{\Bar{Y}(\boldsymbol{\theta})}\in \mathbb{R}^{(2N-1)\times N}$ is the extended admittance matrix defined as \begin{equation}\label{E2} \begin{aligned} \mathbf{\Bar Y}(\boldsymbol{\theta})&=\begin{bmatrix} \begin{vmatrix} \mathbf{Y}_{ij} \end{vmatrix} cos(\theta_i - \theta_j - \alpha_{ij}) \\[0.5em] \begin{vmatrix} \mathbf{Y}_{ij} \end{vmatrix} sin(\theta_i - \theta_j - \alpha_{ij}) \end{bmatrix} & i,j\in N \end{aligned} \end{equation} \noindent where $\boldsymbol{\theta} \in \mathbb{R}^{(N-1)\times 1}$ is a voltage angle matrix, $\boldsymbol{\alpha_{ij}}$ is the admittance angle of branch $i-j$, \vspace{-10pt} \subsection{Modified Jacobian Matrix} The modified Jacobian matrix $\mathbf{J}\in \mathbb{R}^{2N\times 2N}$ that incorporates DER behaviors under hierarchical control can be derived from Equation (\ref{E1}), as follow \vspace{-5pt} \begin{equation}\label{E3} \begin{aligned} \mathbf{J}&=\begin{bmatrix} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \boldsymbol{\theta}} ,\frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \mathbf{V}}, \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial {f}} \end{bmatrix} \end{aligned} \end{equation} where \begin{equation}\label{E4} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \boldsymbol{\theta}}&=\begin{bmatrix} -\frac{\partial{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \mathbf{V}\circ \mathbf{V}}{\partial \boldsymbol{\theta}} , \mathbf{0} \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} \begin{equation}\label{E5} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \mathbf{V}}&=\begin{bmatrix}\frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}- \frac{{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \partial \mathbf{V}\circ \mathbf{V}}{\partial \mathbf{V}}-\frac{{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \mathbf{V}\circ\partial \mathbf{V}}{\partial\mathbf{V}} , \mathbf{0} \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} \begin{equation}\label{E6} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial {f}}&=\begin{bmatrix} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}} {\partial {f}} ,\frac{\partial\mathbf{P}(f)^\mathbf{Gs}} {\partial {f}} \end{bmatrix}^T \end{aligned} \end{equation} Here, the elements in $\mathbf{J}$ matrix are functions of different control modes. For the droop control mode, the P/F and Q/V droop coefficients are defined as $\mathbf{m}\in \mathbb{R}^{\zeta\times 1} $, $ \mathbf{n}\in \mathbb{R}^{\zeta\times 1} $ respectively. Real power sharing among DERs are achieved through the P/F droop control, as shown in Equation(\ref{E7}-\ref{E8}). \begin{equation}\label{E7} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial {f}}= \begin{cases} -\frac{1}{ m_i}, & \mbox{for DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation} \vspace{-5pt} \begin{equation}\label{E8} \begin{aligned} \frac{\partial\mathbf{P}(f)^\mathbf{Gs}} {\partial {f}}=\sum_{i=1}^\zeta -\frac{1}{ m_i} \end{aligned} \end{equation} \vspace{-5pt} The DER behaviors and corresponding J elements under three typical secondary control modes ~\cite{7112129} are expressed below: \subsubsection {Reactive Power Sharing Mode (RPS)} RPS aims to realize proportional reactive power sharing, where the var injection from a leader bus $ Q_1 $ is updated through Q/V droop control and the rest of DER buses follow. Mathematically, the var outputs of DER buses and the corresponding $\mathbf{J}$ elements are \vspace{-2pt} \begin{equation}\label{E9} \begin{aligned} \mathbf{Q_{DER}}= \begin{bmatrix} {Q_{1}( V_{1})}, \rho \cdot \mathbf{Q_F}^* \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} { \begin{equation}\label{E10} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}= \begin{cases} -\frac{1}{ n_1}, & \mbox{for leader DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation}} \vspace{-10pt} \noindent where, $\rho$ is the reactive power ratio defined by $ {Q}_{1}/Q_1^*$, and $\mathbf {Q_F}^*$ denotes the rated var outputs of follower buses. \subsubsection{Voltage Regulation Mode (VR)} {VR mode aims to recover the DER bus voltages to their rated values by adjusting the DER reactive power injections. Thus, }the var outputs of DER buses and the corresponding $\mathbf{J}$ elements are updated by \begin{equation}\label{E11} \begin{aligned} \mathbf{Q_{DER}}= diag(\mathbf{V})\cdot diag(\mathbf{Z}_d^{-1})\cdot (\mathbf{V}_d+\mathbf{V}^*-2\mathbf{V}) +\mathbf{Q}_0 \end{aligned} \end{equation} \vspace{-10pt} { \begin{equation}\label{E12} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}= \begin{cases} ({Z}_d^{-1})({V}_d+{V}^*-4{V}), & \mbox{for DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation}} \vspace{-10pt} Similar to~\cite{8309382}, a dummy bus vector with voltages $ \mathbf{V}_d $ is created for DER buses associated with a { sensitivity} vector $ \mathbf{Z}_d $ representing the reactive power differences with respect to the voltage differences between dummy buses and the corresponding DER buses. { Here,} $ \mathbf{V}^* $ denotes rated voltages, and the detailed procedure to update $ \mathbf{V}_d $ can be found in~\cite{8309382}, { $\xi_{\Delta V_d}$ is voltage magnitude error between DER buses and its rated value}. \subsubsection{Smart Tuning Mode (ST)} { The leader DER bus follows the VR mode to recover back to its rated value, while other DER buses are adjusted for proportional reactive power sharing. Therefore, in this mode, the leader DER bus var output and corresponding $\mathbf{J}$ elements follow Equations (11-12) whereas the rest of DER buses follow Equations (9-10).} Once $\mathbf{J}$ and $\Delta \mathbf{F}$ are evaluated at the end of each iteration, the microgrid variables $\boldsymbol{\theta}$,$\mathbf{V}$, ${f}$ can be updated for the next iteration by solving the following equation \begin{equation}\label{E13} \begin{aligned} \Delta \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f}) &=\mathbf{J} \cdot \begin{bmatrix} \Delta\boldsymbol{\theta},\Delta\mathbf{V},\Delta{f} \end{bmatrix}^T \end{aligned} \end{equation} The EMPF iterations continue until the errors in those variables reaches the tolerance $\xi$. See Algorithm~\ref{EMPF} for the EMPF pseudo code The Newton-type power flow is sensitive to the starting point and relies on {high-quality} initial values for a fast convergence. To ensure the robustness of EMPF incorporating the hierarchical control, it is initialized by the values obtained by running a power flow with droop controls only. Once the convergence criterion is satisfied, all the voltages and branch power flows can be obtained. Because no assumption of microgrid architectures is utilized in EMPF, it can be used to solve power flows for { arbitrary types of microgrids such as radial, meshed, or honeycomb configurations. \vspace{-6pt} \begin{algorithm \SetAlgoLined \textbf{{In}itialize:} $\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$, $\xi$, $\rho$(RPS/ST), $\mathbf{V}_d$(VR/ST), $\mathbf{Z}_d$(VR/ST)\; \While{$\Delta\boldsymbol{\theta}$, $\Delta\mathbf{V}$,$\Delta{\rho}$,$\Delta{V_d}$, $\Delta{f}$\(\geq\)$\xi $ } { \eIf{DER bus}{ Update: $\mathbf{S}(\mathbf V,f)^\mathbf{G}$, $\mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})$ \textbf{Eq.}(\ref{E1},\ref{E2},\ref{E9},11)\; }{ Update: $\mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})$ \textbf{Eq.}~(\ref{E1},\ref{E2})\; } Update: $\mathbf{J}$, $\Delta\boldsymbol{\theta}$, $\Delta\mathbf{V}$, $\Delta{f}$, $\mathbf{P}(f)^\mathbf{Gs}$, $\mathbf {P}^\mathbf{sum}$, $\rho$(RPS/ST), $\mathbf{V}_d$(VR/ST) \textbf{Eq.}(\ref{E3}-\ref{E6},7,\ref{E8},\ref{E10},12)\; Update: $\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$\; } \KwResult{$\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$ and the branch power flow. } \caption{EMPF Algorithm} \label{EMPF} \end{algorithm} \vspace{-10pt} \section{Case Study} The effectiveness of EMPF is verified on a 33-bus microgrid with 5 DERs (see Fig.~\ref{F1}). For comparison purposes, all system parameters are adopted from~\cite{8309382} except that $\mathbf{Z}_{d} $ = 0.001. By flipping the five normally-open switches, the microgrid configuration can be toggled from radial to meshed one. EMPF calculations are then performed on the radial microgrid (Test I) and the meshed microgrid (Test II). EMPF is implemented in Matlab on a 64-bit, 2.50 GHz PC. \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.43\textwidth, height=0.28\textwidth]{case.pdf} \caption{The 33-bus islanded microgrid with 5 DERs} \label{F1} \vspace{-0.5cm} \end{figure} \vspace{-6pt} \subsection{EMPF Results for Different Microgrid Configurations} Voltages obtained from Tests I and II are shown in Figs.~\ref{F2} and~\ref{F3}, respectively. It can be observed that \begin{itemize}[leftmargin=*] \item Results in Test I (radial microgrid) are identical to those in~\cite{8309382}, which validates the correctness of EMPF. \item Generally, voltages in the meshed microgrid are smoother than those in the radial system. For instance, in the droop mode (EMPF\_DP), the voltage at bus 30 in the meshed system is 0.41\% higher than that in the radial system. This is because DER 25, once the switch 25-29 is closed, will help boost the voltages at neighboring buses including buses 26-33. \item Under EMPF\_DP, however, the voltage at DER 13 in the meshed microgrid is lower than that in its radial counterpart because DER 13 has to supply heavy loads at buses 7 and 8 after the switches between 22--12 and 9--15 are closed. \end{itemize} \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.39\textwidth]{radial.pdf} \vspace{-0.2cm} \caption{Test I: Voltage magnitudes of radial microgrid } \label{F2} \end{figure} \vspace{-6pt} \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.39\textwidth]{meshed.pdf} \vspace{-0.2cm} \caption{Test II: Voltage magnitudes of meshed microgrid } \label{F3} \end{figure} \vspace{-15pt} \begin{table} \caption{Power Injections from DERs ({\MakeLowercase{p.u.} })} \vspace{-5pt} \centering \begin{tabular}{c c c c c c } \toprul Test & DER\# & DP & RPS & VR & ST\\ \midrule \multirow{5}*{I} & 1 & 2.50+0.97$i$ & 2.50+0.93$i$ & 2.50-0.90$i$ & 2.50+0.93$i$ \\ &6 & 0.98+0.91$i$ & 0.98+0.93$i$ & 0.98+2.99$i$ & 0.98+0.93$i$ \\ & 13 & 1.70+0.89$i$ & 1.70+0.93$i$ & 1.70+0.01$i$ & 1.70+0.93$i$ \\ &25 & 0.98+0.91$i$ & 0.98+0.93$i$ & 0.98+1.55$i$ & 0.98+0.93$i$ \\ & 33 & 1.30+0.95$i$ & 1.30+0.93$i$ & 1.30+0.99$i$ & 1.30+0.93$i$ \\ \midrul \multirow{5}*{II} & 1 & 2.50+0.96$i$ & 2.50+0.92$i$ & 2.50-1.18$i$ & 2.50+0.92$i$\\ & 6 & 0.98+0.91$i$ & 0.98+0.92$i$ & 0.98+2.13$i$ & 0.98+0.92$i$\\ & 13 & 1.70+0.91$i$ & 1.70+0.92$i$ & 1.70-0.22$i$ & 1.70+0.92$i$\\ & 25 & 0.98+0.91$i$ & 0.98+0.92$i$ & 0.98+3.08$i$ & 0.98+0.92$i$\\ & 33 & 1.30+0.94$i$ & 1.30+0.92$i$ & 1.30+0.93$i$ & 1.30+0.92$i$\\ \bottomrul \end{tabular} \label{TableDER} \vspace{-7pt} \end{table} \begin{table}[] \centering \caption{CPU time and iteration numbers} \label{table2} \vspace{-5pt} \begin{tabular}{@{}ccccc@{}} \toprule Parameter & DP(I)/(II)& RPS(I)/(II) & VR(I)/(II) & ST(I)/(II)\\ \midrule CPU Time(s)& 0.50/0.48 & 0.55/0.54 & 0.82/0.87 & 0.80/0.83 \\ Iteration & 5/4 & 10/10 & 16/16 & 15/15 \\\bottomrule \end{tabular} \end{table} \subsection{EMPF Results under Various Control Modes} Table~\ref{TableDER} summarizes DER power injections for both the radial and meshed microgrids under the four control modes. The following insights can be obtained \begin{itemize}[leftmargin=*] \item In generally, microgrid voltage profiles are improved by applying the secondary control, compared with those with droop control only. {For instance, bus 27 voltage under the VR control is 0.9981 which is close to its rated value and is 1.44\% better than that under DP mode only. \item {In the RPS mode, the var injections from all DERs are equal because the follower buses share the same reactive power ratio with the leader bus. For instance, in Test I, the var injections of follower DERs 6, 13, 25 and 33 are 0.93 p.u. (base power: 500 kVA) which are equal to the var contribution from the leader bus 1. Therefore, EMPF can realize the proportional reactive power sharing.} \item { In the ST mode, the leader bus is controlled to fully restore its voltage, as shown in Figures 2 and 3. Meanwhile, the var contribution of each DERs is 0.93 p.u. and 0.92 p.u. for the radial and meshed microgrids, respectively, because in this mode the follower buses still follow the RPS mode.} \item {In the VR mode, the voltages at DER buses can be recovered to the nominal values. However, compared with the RPS and ST modes, it often leads to irregular power sharing among DERs. Therefore, it indicates that the VR mode is only feasible when DERs have adequate reactive power capacity. \end{itemize} {Please note that EMPF is different from the microgrid power flow approach in paper [1] which is based on the modified backward/forward sweep and thus limited to dealing with a radially structured microgrid. Our method, instead, is based on an augmented, plug-and-play Newton approach that can handle all possible microgrid configurations effectively. Even for the radial system analysis, our method has also shown some better performance. For instance, in VR mode, EMPF iterates only 16 times ($\xi_{\Delta f,~\Delta \rho}=10 ^{-3}$, $\xi_{\Delta V_d}=10 ^{-4}$, $\xi_{\Delta V,~\Delta \theta}=10 ^{-5}$), whereas it takes the method in [1] 173 iterations ($\epsilon_1=10 ^{-3}$, $\epsilon_2=10 ^{-3}$, $\epsilon_3=10 ^{-4}$) to converge. Another desirable feature of EMPF is that there is no limit in selecting the sensitivity $\mathbf{Z}_{d} $ as the value of $\mathbf{Z}_{d} $ does not affect the convergence performance. } \section{Conclusion} EMPF is developed to accurately calculate power flow in microgrids equipped with hierarchical control. { Test results exhibit that EMPF can be used for both radial and meshed microgrids. Excellent convergence performance of EMPF demonstrates its efficacy and scalability.} EMPF can be implemented as an essential functionality in microgrid energy management systems and can also be used to provide accurate initial values for microgrid stability and security studies. Next, it will be generalized for { power flow calculations} in networked microgrids \bibliographystyle{IEEEtran} \section{Introduction} \IEEEPARstart{M}{icrogrid} has proved to be effective in ensuring electricity resiliency for customers. A most important and indispensable foundation for microgrid operation and management is the power flow analysis~\cite{8309382}. However, power flow of islanded microgrid has yet to be addressed because: 1) a swing bus no longer exists, rather 2) distributed energy resources (DERs) are operated by hierarchical controls, and 3) microgrid is subject to frequently changes in structure and operating modes~\cite{8636509}. Although modified backward/forward sweep methods~\cite{8309382,8636509,7283640} and Newton method~\cite{7350239} are developed to consider droops in DERs, they fail to handle either meshed microgrids or secondary controllers equipped for frequency and voltage recovery. This letter devises an enhanced Newton-type microgrid power flow (EMPF) which fully adapts to both meshed and radial structures. The main contributions of EMPF lie in : 1) an augmented Newton type formulation of microgrid power flow which supports plug-and-play and allows future extensions into networked microgrids power flow as well as 2) a new Jacobian matrix formulation which is able to incorporate hierarchical control effects and thus precisely considers power sharing and voltage regulation in a modular fashion. \section{Enhanced Microgrid Power Flow} In EMPF, in addition to the traditional PV and PQ buses, we introduce a bus type called \emph{DER buses} to which those DERs equipped with droop and/or secondary control are connected. Generally, a slack bus no longer exists because none of the DERs in the droop-based microgrids is able to provide constant voltage and frequency. We can pick an arbitrary DER bus and use its voltage angle as the reference for the rest of the buses. \vspace{-10pt} \subsection{EMPF Formulation} For an ${N}$-bus microgrid with $\zeta$ DER buses , the power injections from DERs are determined by a two-layer hierarchical control syste ~\cite{7112129}. Considering PV, PQ and DER buses, we can derive the EMPF power flow equations as follows \begin{equation}\label{E1} \begin{aligned} \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})&=\begin{bmatrix} \mathbf {S}(\mathbf V,f)^\mathbf{G} - \mathbf {S}^\mathbf{L}-\mathbf{\Bar{Y}(\boldsymbol{\theta})} \cdot \mathbf{V} \circ \mathbf{V} \\[0.3em] \mathbf{P}(f)^\mathbf{Gs} - \mathbf {P}^\mathbf{sum} \end{bmatrix} \end{aligned} \end{equation} \noindent where $\mathbf {S}(\mathbf V,f)^\mathbf{G}=[\mathbf{{P}}(f)^\mathbf{G} ,\mathbf{{Q}(V)^\mathbf{G}}]^T\in \mathbb{R}^{(2N-1)\times 1}$ and $\mathbf{{S}^L}=[\mathbf{{P}^L} ,\mathbf{{Q}^L}]^T\in \mathbb{R}^{(2N-1)\times 1}$ are the generation and load matrices, respectively, $\mathbf{P}(f)^\mathbf{Gs}$ is the total real power from generators, $\circ$ means Hadamard product, $\mathbf {P}^\mathbf{sum}$ is the sum of real power consumption including load and losses. Different from traditional power flow, frequency $f$ is a variable in the EMPF formulation. $ \mathbf{\Bar{Y}(\boldsymbol{\theta})}\in \mathbb{R}^{(2N-1)\times N}$ is the extended admittance matrix defined as \begin{equation}\label{E2} \begin{aligned} \mathbf{\Bar Y}(\boldsymbol{\theta})&=\begin{bmatrix} \begin{vmatrix} \mathbf{Y}_{ij} \end{vmatrix} cos(\theta_i - \theta_j - \alpha_{ij}) \\[0.5em] \begin{vmatrix} \mathbf{Y}_{ij} \end{vmatrix} sin(\theta_i - \theta_j - \alpha_{ij}) \end{bmatrix} & i,j\in N \end{aligned} \end{equation} \noindent where $\boldsymbol{\theta} \in \mathbb{R}^{(N-1)\times 1}$ is a voltage angle matrix, $\boldsymbol{\alpha_{ij}}$ is the admittance angle of branch $i-j$, \vspace{-10pt} \subsection{Modified Jacobian Matrix} The modified Jacobian matrix $\mathbf{J}\in \mathbb{R}^{2N\times 2N}$ that incorporates DER behaviors under hierarchical control can be derived from Equation (\ref{E1}), as follow \vspace{-5pt} \begin{equation}\label{E3} \begin{aligned} \mathbf{J}&=\begin{bmatrix} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \boldsymbol{\theta}} ,\frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \mathbf{V}}, \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial {f}} \end{bmatrix} \end{aligned} \end{equation} where \begin{equation}\label{E4} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \boldsymbol{\theta}}&=\begin{bmatrix} -\frac{\partial{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \mathbf{V}\circ \mathbf{V}}{\partial \boldsymbol{\theta}} , \mathbf{0} \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} \begin{equation}\label{E5} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial \mathbf{V}}&=\begin{bmatrix}\frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}- \frac{{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \partial \mathbf{V}\circ \mathbf{V}}{\partial \mathbf{V}}-\frac{{\mathbf{\Bar Y}(\boldsymbol{\theta})} \cdot \mathbf{V}\circ\partial \mathbf{V}}{\partial\mathbf{V}} , \mathbf{0} \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} \begin{equation}\label{E6} \begin{aligned} \frac{\partial \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})}{\partial {f}}&=\begin{bmatrix} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}} {\partial {f}} ,\frac{\partial\mathbf{P}(f)^\mathbf{Gs}} {\partial {f}} \end{bmatrix}^T \end{aligned} \end{equation} Here, the elements in $\mathbf{J}$ matrix are functions of different control modes. For the droop control mode, the P/F and Q/V droop coefficients are defined as $\mathbf{m}\in \mathbb{R}^{\zeta\times 1} $, $ \mathbf{n}\in \mathbb{R}^{\zeta\times 1} $ respectively. Real power sharing among DERs are achieved through the P/F droop control, as shown in Equation(\ref{E7}-\ref{E8}). \begin{equation}\label{E7} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial {f}}= \begin{cases} -\frac{1}{ m_i}, & \mbox{for DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation} \vspace{-5pt} \begin{equation}\label{E8} \begin{aligned} \frac{\partial\mathbf{P}(f)^\mathbf{Gs}} {\partial {f}}=\sum_{i=1}^\zeta -\frac{1}{ m_i} \end{aligned} \end{equation} \vspace{-5pt} The DER behaviors and corresponding J elements under three typical secondary control modes ~\cite{7112129} are expressed below: \subsubsection {Reactive Power Sharing Mode (RPS)} RPS aims to realize proportional reactive power sharing, where the var injection from a leader bus $ Q_1 $ is updated through Q/V droop control and the rest of DER buses follow. Mathematically, the var outputs of DER buses and the corresponding $\mathbf{J}$ elements are \vspace{-2pt} \begin{equation}\label{E9} \begin{aligned} \mathbf{Q_{DER}}= \begin{bmatrix} {Q_{1}( V_{1})}, \rho \cdot \mathbf{Q_F}^* \end{bmatrix}^T \end{aligned} \end{equation} \vspace{-10pt} { \begin{equation}\label{E10} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}= \begin{cases} -\frac{1}{ n_1}, & \mbox{for leader DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation}} \vspace{-10pt} \noindent where, $\rho$ is the reactive power ratio defined by $ {Q}_{1}/Q_1^*$, and $\mathbf {Q_F}^*$ denotes the rated var outputs of follower buses. \subsubsection{Voltage Regulation Mode (VR)} {VR mode aims to recover the DER bus voltages to their rated values by adjusting the DER reactive power injections. Thus, }the var outputs of DER buses and the corresponding $\mathbf{J}$ elements are updated by \begin{equation}\label{E11} \begin{aligned} \mathbf{Q_{DER}}= diag(\mathbf{V})\cdot diag(\mathbf{Z}_d^{-1})\cdot (\mathbf{V}_d+\mathbf{V}^*-2\mathbf{V}) +\mathbf{Q}_0 \end{aligned} \end{equation} \vspace{-10pt} { \begin{equation}\label{E12} \begin{aligned} \frac{\partial\mathbf {S}(\mathbf V,f)^\mathbf{G}}{\partial \mathbf{V}}= \begin{cases} ({Z}_d^{-1})({V}_d+{V}^*-4{V}), & \mbox{for DER bus} \\ 0, & \mbox{otherwise} \end{cases} \end{aligned} \end{equation}} \vspace{-10pt} Similar to~\cite{8309382}, a dummy bus vector with voltages $ \mathbf{V}_d $ is created for DER buses associated with a { sensitivity} vector $ \mathbf{Z}_d $ representing the reactive power differences with respect to the voltage differences between dummy buses and the corresponding DER buses. { Here,} $ \mathbf{V}^* $ denotes rated voltages, and the detailed procedure to update $ \mathbf{V}_d $ can be found in~\cite{8309382}, { $\xi_{\Delta V_d}$ is voltage magnitude error between DER buses and its rated value}. \subsubsection{Smart Tuning Mode (ST)} { The leader DER bus follows the VR mode to recover back to its rated value, while other DER buses are adjusted for proportional reactive power sharing. Therefore, in this mode, the leader DER bus var output and corresponding $\mathbf{J}$ elements follow Equations (11-12) whereas the rest of DER buses follow Equations (9-10).} Once $\mathbf{J}$ and $\Delta \mathbf{F}$ are evaluated at the end of each iteration, the microgrid variables $\boldsymbol{\theta}$,$\mathbf{V}$, ${f}$ can be updated for the next iteration by solving the following equation \begin{equation}\label{E13} \begin{aligned} \Delta \mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f}) &=\mathbf{J} \cdot \begin{bmatrix} \Delta\boldsymbol{\theta},\Delta\mathbf{V},\Delta{f} \end{bmatrix}^T \end{aligned} \end{equation} The EMPF iterations continue until the errors in those variables reaches the tolerance $\xi$. See Algorithm~\ref{EMPF} for the EMPF pseudo code The Newton-type power flow is sensitive to the starting point and relies on {high-quality} initial values for a fast convergence. To ensure the robustness of EMPF incorporating the hierarchical control, it is initialized by the values obtained by running a power flow with droop controls only. Once the convergence criterion is satisfied, all the voltages and branch power flows can be obtained. Because no assumption of microgrid architectures is utilized in EMPF, it can be used to solve power flows for { arbitrary types of microgrids such as radial, meshed, or honeycomb configurations. \vspace{-6pt} \begin{algorithm \SetAlgoLined \textbf{{In}itialize:} $\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$, $\xi$, $\rho$(RPS/ST), $\mathbf{V}_d$(VR/ST), $\mathbf{Z}_d$(VR/ST)\; \While{$\Delta\boldsymbol{\theta}$, $\Delta\mathbf{V}$,$\Delta{\rho}$,$\Delta{V_d}$, $\Delta{f}$\(\geq\)$\xi $ } { \eIf{DER bus}{ Update: $\mathbf{S}(\mathbf V,f)^\mathbf{G}$, $\mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})$ \textbf{Eq.}(\ref{E1},\ref{E2},\ref{E9},11)\; }{ Update: $\mathbf{F}(\boldsymbol{\theta},\mathbf{V},{f})$ \textbf{Eq.}~(\ref{E1},\ref{E2})\; } Update: $\mathbf{J}$, $\Delta\boldsymbol{\theta}$, $\Delta\mathbf{V}$, $\Delta{f}$, $\mathbf{P}(f)^\mathbf{Gs}$, $\mathbf {P}^\mathbf{sum}$, $\rho$(RPS/ST), $\mathbf{V}_d$(VR/ST) \textbf{Eq.}(\ref{E3}-\ref{E6},7,\ref{E8},\ref{E10},12)\; Update: $\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$\; } \KwResult{$\boldsymbol{\theta}$, $\mathbf{V}$, ${f}$ and the branch power flow. } \caption{EMPF Algorithm} \label{EMPF} \end{algorithm} \vspace{-10pt} \section{Case Study} The effectiveness of EMPF is verified on a 33-bus microgrid with 5 DERs (see Fig.~\ref{F1}). For comparison purposes, all system parameters are adopted from~\cite{8309382} except that $\mathbf{Z}_{d} $ = 0.001. By flipping the five normally-open switches, the microgrid configuration can be toggled from radial to meshed one. EMPF calculations are then performed on the radial microgrid (Test I) and the meshed microgrid (Test II). EMPF is implemented in Matlab on a 64-bit, 2.50 GHz PC. \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.43\textwidth, height=0.28\textwidth]{case.pdf} \caption{The 33-bus islanded microgrid with 5 DERs} \label{F1} \vspace{-0.5cm} \end{figure} \vspace{-6pt} \subsection{EMPF Results for Different Microgrid Configurations} Voltages obtained from Tests I and II are shown in Figs.~\ref{F2} and~\ref{F3}, respectively. It can be observed that \begin{itemize}[leftmargin=*] \item Results in Test I (radial microgrid) are identical to those in~\cite{8309382}, which validates the correctness of EMPF. \item Generally, voltages in the meshed microgrid are smoother than those in the radial system. For instance, in the droop mode (EMPF\_DP), the voltage at bus 30 in the meshed system is 0.41\% higher than that in the radial system. This is because DER 25, once the switch 25-29 is closed, will help boost the voltages at neighboring buses including buses 26-33. \item Under EMPF\_DP, however, the voltage at DER 13 in the meshed microgrid is lower than that in its radial counterpart because DER 13 has to supply heavy loads at buses 7 and 8 after the switches between 22--12 and 9--15 are closed. \end{itemize} \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.39\textwidth]{radial.pdf} \vspace{-0.2cm} \caption{Test I: Voltage magnitudes of radial microgrid } \label{F2} \end{figure} \vspace{-6pt} \vspace{-6pt} \begin{figure}[ht] \centering \includegraphics[width=0.39\textwidth]{meshed.pdf} \vspace{-0.2cm} \caption{Test II: Voltage magnitudes of meshed microgrid } \label{F3} \end{figure} \vspace{-15pt} \begin{table} \caption{Power Injections from DERs ({\MakeLowercase{p.u.} })} \vspace{-5pt} \centering \begin{tabular}{c c c c c c } \toprul Test & DER\# & DP & RPS & VR & ST\\ \midrule \multirow{5}*{I} & 1 & 2.50+0.97$i$ & 2.50+0.93$i$ & 2.50-0.90$i$ & 2.50+0.93$i$ \\ &6 & 0.98+0.91$i$ & 0.98+0.93$i$ & 0.98+2.99$i$ & 0.98+0.93$i$ \\ & 13 & 1.70+0.89$i$ & 1.70+0.93$i$ & 1.70+0.01$i$ & 1.70+0.93$i$ \\ &25 & 0.98+0.91$i$ & 0.98+0.93$i$ & 0.98+1.55$i$ & 0.98+0.93$i$ \\ & 33 & 1.30+0.95$i$ & 1.30+0.93$i$ & 1.30+0.99$i$ & 1.30+0.93$i$ \\ \midrul \multirow{5}*{II} & 1 & 2.50+0.96$i$ & 2.50+0.92$i$ & 2.50-1.18$i$ & 2.50+0.92$i$\\ & 6 & 0.98+0.91$i$ & 0.98+0.92$i$ & 0.98+2.13$i$ & 0.98+0.92$i$\\ & 13 & 1.70+0.91$i$ & 1.70+0.92$i$ & 1.70-0.22$i$ & 1.70+0.92$i$\\ & 25 & 0.98+0.91$i$ & 0.98+0.92$i$ & 0.98+3.08$i$ & 0.98+0.92$i$\\ & 33 & 1.30+0.94$i$ & 1.30+0.92$i$ & 1.30+0.93$i$ & 1.30+0.92$i$\\ \bottomrul \end{tabular} \label{TableDER} \vspace{-7pt} \end{table} \begin{table}[] \centering \caption{CPU time and iteration numbers} \label{table2} \vspace{-5pt} \begin{tabular}{@{}ccccc@{}} \toprule Parameter & DP(I)/(II)& RPS(I)/(II) & VR(I)/(II) & ST(I)/(II)\\ \midrule CPU Time(s)& 0.50/0.48 & 0.55/0.54 & 0.82/0.87 & 0.80/0.83 \\ Iteration & 5/4 & 10/10 & 16/16 & 15/15 \\\bottomrule \end{tabular} \end{table} \subsection{EMPF Results under Various Control Modes} Table~\ref{TableDER} summarizes DER power injections for both the radial and meshed microgrids under the four control modes. The following insights can be obtained \begin{itemize}[leftmargin=*] \item In generally, microgrid voltage profiles are improved by applying the secondary control, compared with those with droop control only. {For instance, bus 27 voltage under the VR control is 0.9981 which is close to its rated value and is 1.44\% better than that under DP mode only. \item {In the RPS mode, the var injections from all DERs are equal because the follower buses share the same reactive power ratio with the leader bus. For instance, in Test I, the var injections of follower DERs 6, 13, 25 and 33 are 0.93 p.u. (base power: 500 kVA) which are equal to the var contribution from the leader bus 1. Therefore, EMPF can realize the proportional reactive power sharing.} \item { In the ST mode, the leader bus is controlled to fully restore its voltage, as shown in Figures 2 and 3. Meanwhile, the var contribution of each DERs is 0.93 p.u. and 0.92 p.u. for the radial and meshed microgrids, respectively, because in this mode the follower buses still follow the RPS mode.} \item {In the VR mode, the voltages at DER buses can be recovered to the nominal values. However, compared with the RPS and ST modes, it often leads to irregular power sharing among DERs. Therefore, it indicates that the VR mode is only feasible when DERs have adequate reactive power capacity. \end{itemize} {Please note that EMPF is different from the microgrid power flow approach in paper [1] which is based on the modified backward/forward sweep and thus limited to dealing with a radially structured microgrid. Our method, instead, is based on an augmented, plug-and-play Newton approach that can handle all possible microgrid configurations effectively. Even for the radial system analysis, our method has also shown some better performance. For instance, in VR mode, EMPF iterates only 16 times ($\xi_{\Delta f,~\Delta \rho}=10 ^{-3}$, $\xi_{\Delta V_d}=10 ^{-4}$, $\xi_{\Delta V,~\Delta \theta}=10 ^{-5}$), whereas it takes the method in [1] 173 iterations ($\epsilon_1=10 ^{-3}$, $\epsilon_2=10 ^{-3}$, $\epsilon_3=10 ^{-4}$) to converge. Another desirable feature of EMPF is that there is no limit in selecting the sensitivity $\mathbf{Z}_{d} $ as the value of $\mathbf{Z}_{d} $ does not affect the convergence performance. } \section{Conclusion} EMPF is developed to accurately calculate power flow in microgrids equipped with hierarchical control. { Test results exhibit that EMPF can be used for both radial and meshed microgrids. Excellent convergence performance of EMPF demonstrates its efficacy and scalability.} EMPF can be implemented as an essential functionality in microgrid energy management systems and can also be used to provide accurate initial values for microgrid stability and security studies. Next, it will be generalized for { power flow calculations} in networked microgrids \bibliographystyle{IEEEtran}
\section{Two-dimensional Implementation} In this section, we will consider the two-dimensional problem \begin{align} \label{eq:2D} u_t =& (A_{11}(u,x,y,t)u_x)_x + (A_{22}(u,x,y,y)u_y)_y + (A_{12}(u,x,y,t)u_x)_y + (A_{21}(u,x,y,t)u_y)_x \notag\\ & + B_{1}(u,x,y,t) u_x + B_{2}(u,x,y,t) u_y + C(u,x,y,t). \end{align} Let $(x_i, y_j)$ be the node of a 2D orthogonal grid. Here, we use uniform grid in each direction, with mesh sizes $\Delta x=x_{i}-x_{i-1}$ and $\Delta y=y_{j}-y_{j-1}$. Each terms in \eqref{eq:2D} can be directly approximated by the proposed 1D formulation in a dimension-by-dimension fashion, namely, approximating $\partial_{x}$ for fixed $y_j$ and approximating $\partial_{y}$ for fixed $x_i$. More specifically, for the transport parts, \begin{equation} \begin{aligned} & B_1 u_x|_{(x_i,y_j)} \approx \frac{1}{2}B_1(u,x,y,t) \left( u^{-}_x + u_x^{+} \right) + \frac{1}{2}r_{x} \left( u^{+}_x - u_x^{-} \right), \\ & B_2 u_y|_{(x_i,y_j)} \approx \frac{1}{2}B_2(u,x,y,t) \left( u^{-}_y + u_y^{+} \right) + \frac{1}{2}r_{y} \left( u^{+}_y - u_y^{-} \right), \end{aligned} \end{equation} where, \begin{align*} & u^{-}_x|_{(x_i,y_j)} = \alpha_{L,x} \sum_{p=1}^{k} \mathcal{D}_{L,x}^{p} [ u(\cdot, y_j), \alpha_{L,x}] (x_i), \quad u^{+}_x|_{(x_i,y_j)} = -\alpha_{R,x} \sum_{p=1}^{k} \mathcal{D}_{R,x}^{p} [ u(\cdot,y_j),\alpha_{R,x}] (x_i), \\ & u^{-}_y|_{(x_i,y_j)} = \alpha_{L,y} \sum_{p=1}^{k} \mathcal{D}_{L,y}^{p} [ u(x_i, \cdot), \alpha_{L,y}] (y_j), \quad u^{+}_y|_{(x_i,y_j)} = -\alpha_{R,y} \sum_{p=1}^{k} \mathcal{D}_{R,y}^{p} [ u(x_i, \cdot),\alpha_{R,y}] (y_j), \end{align*} or with a modified term for $k = 3$, and parameters \begin{align*} \alpha_{L,x}=\alpha_{R,x}=\beta_1/(r_{x}\Delta t), \quad r_{x}=\max_{u,x,y} |B_1(u,x,y,t)| \\ \alpha_{L,y}=\alpha_{R,y}=\beta_1/(r_{y}\Delta t), \quad r_{y}=\max_{u,x,y} |B_2(u,x,y,t)|. \end{align*} And for the diffusion terms, \begin{equation} \label{eq:uxx} \begin{aligned} & (A_{11}u_x)_x\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,x}}{2} \sum\limits_{p=1}^k \mathcal{D}_{0,x}^{p-1} (\mathcal{D}_{L,x}-\mathcal{D}_{R,x}) [A_{11}(u(\cdot,y_j,t),\cdot,y_j,t) \, w_1(\cdot, y_j,t), \alpha_{0,x}] (x_i), \\ & (A_{22} u_y)_y\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,y}}{2} \sum\limits_{p=1}^k \mathcal{D}_{0,y}^{p-1} (\mathcal{D}_{L,y}-\mathcal{D}_{R,y}) [A_{22}(u(x_i,\cdot,t),x_i,\cdot,t) \, w_2(x_i,\cdot,t),\alpha_{0,y}](y_i), \\ & (A_{12}u_x)_y\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,y}}{2} \sum\limits_{p=1}^k \mathcal{D}_{0,y}^{p-1} (\mathcal{D}_{L,y}-\mathcal{D}_{R,y}) [A_{12}(u(x_i, \cdot,t),x_i, \cdot, t) \, w_1( x_i, \cdot, t), \alpha_{0,y}] (y_j), \\ & (A_{21}u_y)_x\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,x}}{2} \sum\limits_{p=1}^k \mathcal{D}_{0,x}^{p-1} (\mathcal{D}_{L,x}-\mathcal{D}_{R,x}) [A_{21}(u(\cdot,y_j,t),\cdot,y_j,t) \, w_2(\cdot, y_j,t), \alpha_{0,x}] (x_i) , \\ & w_1\vert_{(x_i,y_j)} = u_x\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,x}}{2} \sum\limits_{p=1}^k \mathcal{D}_{0,x}^{p-1} (\mathcal{D}_{L,x}-\mathcal{D}_{R,x}) [ u(\cdot,y_j,t), \alpha_{0,x}](x_i) \\ & w_2\vert_{(x_i,y_j)} = u_y\vert_{(x_i,y_j)} \approx \frac{\alpha_{0,y}}{2} \sum\limits_{q=1}^k \mathcal{D}_{0,y}^{q-1} (\mathcal{D}_{L,y}-\mathcal{D}_{R,y}) [u(x_i,\cdot,t),\alpha_{0,y}] (y_i). \end{aligned} \end{equation} where \begin{align*} & \alpha_{0,x}=\sqrt{\beta_2/(c_x\Delta t)}, \quad c_x=\max\limits_{u,x,y}\vert A_{11}(u,x,y)\vert, \\ & \alpha_{0,y}=\sqrt{\beta_2/(c_y\Delta t)}, \quad c_y=\max\limits_{u,x,y}\vert A_{22}(u,x,y)\vert. \end{align*} Similarly, in the two-dimensional case, we can choose the parameters $\beta_1$ and $\beta_2$ carefully such that the scheme is A-stable. In particular, considering the diffusion terms only, we have the following theorem. \begin{thm} \label{th:erruxy} Consider the linear parabolic equation with periodic boundary \begin{align} u_t=A_{11} u_{xx}+ (A_{12}+A_{21}) u_{xy} + A_{22} u_{yy}, \quad (x,y)\in [0,2\pi]^2, \end{align} where the coefficients $A_{ij}$ are constants. Suppose the scheme is constructed by the partial sums \eqref{eq:uxx} with $k$ terms and combined with the Euler forward. \begin{enumerate} \item If $A_{12}=A_{21}=0$, the scheme is A-stable when we take $0< \beta \leq \beta_{k,\max} = \frac{1}{2}\beta_{2,k\max}$. \item Otherwise, the scheme is A-stable if we take $0< \beta \leq \beta_{k,\max} = \frac{1}{4}\beta_{2,k\max}$. \end{enumerate} \end{thm} \begin{proof} Here, we only give the proof of the second case, which is more general. Suppose $u$ is smooth enough that can be written as $u(x,y,t)=\hat{u}(t)e^{i\xi x+i\eta y}$. Similar to the proof of Theorem \ref{th:stb1}, we can use the Von Neumann analysis and obtain the amplification factor $\hat{Q}$ \begin{align*} \hat{Q} =& 1-A_{11} \alpha_{0,x}^2\Delta t \left(\sum\limits_{p=1}^{k}\frac{z_1^{2p-1}}{(1+z_1^2)^p}\right)^2 -A_{22} \alpha_{0,y}^2 \Delta t \left(\sum\limits_{q=1}^{k}\frac{z_2^{2q-1}}{(1+z_2^2)^q}\right)^2 \\ & - (A_{12}+A_{21}) \alpha_{0,x} \alpha_{0,y} \Delta t \left(\sum\limits_{p=1}^{k}\frac{z_1^{2p-1}}{(1+z_1^2)^p}\right)\left(\sum\limits_{q=1}^{k}\frac{z_2^{2q-1}}{(1+z_2^2)^q}\right), \end{align*} where $z_1=\xi/\alpha_{0,x}$ and $z_2=\eta/\alpha_{0,y}$. Let $R_x=\sum\limits_{p=1}^{k}\frac{z_1^{2p-1}}{(1+z_1^2)^p}$ and $R_y=\sum\limits_{q=1}^{k}\frac{z_2^{2q-1}}{(1+z_2^2)^q}$. Note that the function is parabolic if there exists a constant $\theta>0$ such that $$ \begin{pmatrix}\xi_{1} & \xi_{2}\end{pmatrix} \begin{pmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \\\end{pmatrix} \begin{pmatrix}\xi_{1} \\ \xi_{2}\end{pmatrix} \geq \theta (\xi_{1}^2 + \xi_2^2), \quad \forall (\xi_1, \xi_2). $$ This means $A_{11}>0$, $A_{22}>0$ and $\frac{ |A_{12}+A_{21}| }{\sqrt{A_{11} A_{22}}} \leq 2$. Then, we have \begin{align*} \hat{Q}=& 1-A_{11}\alpha_{0,x}^2\Delta t R_x^2 -A_{22} \alpha_{0,y}^2\Delta t R_y^2 - (A_{12}+A_{21}) \alpha_{0,x} \alpha_{0,y} \Delta t R_x R_y\\ =& 1 - \beta R_{x}^2 -\beta R_{y}^2 - \frac{A_{12}+A_{21}}{\sqrt{A_{11} A_{22}}} \beta R_x R_y \end{align*} \noindent Note that $$\hat{Q}\leq 1-\beta\min\left((R_x-R_y)^2,(R_x+R_y)^2\right)\leq 1.$$ Hence, the scheme is A-stable if $ \hat{Q}\geq-1$. Since $R_x^2\leq M_k$ and $R_{y}^2\leq M_k$. We take $\beta\leq \frac{1}{4} \beta_{2,k,\max}$, then \begin{align*} \hat{Q} \geq& 1-\beta\max\left((R_x-R_y)^2,(R_x+R_y)^2\right) \geq 1- \beta (4 M_k) \\ \geq& 1-\frac{1}{4} \beta_{2,k,\max} 4 M_{k} = 1-\beta_{2,k,\max} M_{k} = -1. \end{align*} Namely, the scheme is A-stable. \end{proof} \begin{rem} We want to remark that, the methods \eqref{eq:newmth1} and \eqref{eq:method2} can also be used to solve the 2D problem based on a dimension-by-dimension approach. However, we cannot prove the A-stable property of either method when $A_{12}\neq0$ or $A_{21}\neq0$. The provable A-stable property is one main advantage of this proposed scheme. \end{rem} \begin{rem} Consider the function \eqref{eq:2D} with both diffusion terms and transport terms. Suppose the scheme employs the $k$-th order SSP RK method and the $k$-th partial sum. Then, the scheme is unconditional stability if $0< \beta_1 \leq \frac{1}{4} \beta_{1,k,\max}$ and $0< \beta_2\leq \frac{1}{8} \beta_{2,k,\max}$. \end{rem} \section{Coefficients in quadrature} \label{appen1} Here, we list the coefficients in quadrature with fifth order accuracy \eqref{eq:quar}. Denote $\nu=\alpha\Delta x$. Then, we have \begin{align*} C_{j-3}&=-\frac{60-15\nu^2+2\nu^4-(60+60\nu+15\nu^2-5\nu^3-3\nu^4)e^{-\nu}}{60\nu^5}, \\ C_{j-2}&=\frac{120+24\nu-42\nu^2-2\nu^3+6\nu^4-(120+144\nu+42\nu^2-12\nu^3-8\nu^4)e^{-\nu}}{24\nu^5}, \\ C_{j-1}&=-\frac{120+48\nu-42\nu^2-16\nu^3+12\nu^4-(120+168\nu+66\nu^2-14\nu^3-12\nu^4) e^{-\nu}}{12\nu^5}, \\ C_{j}&=\frac{120\nu+132\nu^2+26\nu^3}{12\nu^5}, \\ C_{j+1}&=-\frac{120+96\nu+6\nu^2-32\nu^3-12\nu^4-(120+216\nu+150\nu^2+30\nu^3-26\nu^4+24\nu^5)e^{-\nu}}{24\nu^5}, \\ C_{j+2}&=\frac{60+60\nu+15\nu^2-5\nu^3-3\nu^4-(60+120\nu+105\nu^2+50\nu^3+12\nu^4)e^{-\nu}}{60\nu^5}. \end{align*} \section{Conclusion} In this paper, we proposed a novel numerical scheme to solve the nonlinear parabolic equations with variable coefficients. The development of the schemes was based on our previous work \cite{christlieb2017kernel}, in which the spatial derivatives of a function were represented as a special kernel-based formulation. Here, we designed a new kernel-based approach of the spatial derivatives, which can maintain the good properties of the original one, such as the high order accuracy and unconditionally stable for one-dimensional problems when coupling with the high order explicit strong-stability-preserving Runge-Kutta method in time. Hence, it allowed much larger time step evolution compared with other explicit schemes. In additional, without extra computational cost comparing with the old methods, the available interval of the special parameter $\beta$ in the formula is much larger, resulting in less errors and higher efficiency. Moreover, theoretical investigations indicated that the proposed scheme is unconditionally stable for multi-dimensional problems, which cannot be established with the previous methods. A collection of numerical tests verified the performance of the proposed scheme, demonstrating both its designed high order accuracy and efficiency. In the future, we plan to extend our schemes to solve the time-dependent problems with general boundary conditions. And other time discretization would be considered as well. \section{Introduction} In this work, we want to solve the nonlinear parabolic equations \begin{align} \label{eq:equation} \partial_t u(\mathbf{x},t) = \nabla \cdot \left( \textbf{A}(u, \textbf{x}, t) \nabla u\right) + \textbf{B}(u, \textbf{x}, t)^T \nabla u + C(u, \textbf{x}, t), \end{align} on the domain $\mathbf{x}\in \Omega\subset \mathbb{R}^n$ with initial and boundary conditions. Here, $\textbf{A}(u, \textbf{x}, t)=\left( A_{ij}(u, \textbf{x}, t) \right) \in \mathbb{R}^{n\times n}$ and $\textbf{B}(u, \textbf{x}, t) = \left( B_{i}(u, \textbf{x}, t) \right) \in \mathbb{R}^{n}$. In particular, the equation \eqref{eq:equation} is parabolic if there exists a constant $\theta>0$ such that $$\allowdisplaybreaks \sum_{i,j=1}^{n} A_{ij}\xi_{i}\xi_{j} \geq \theta \sum_{i=1}^{n} \xi_{i}^{2}, \qquad \forall \, (\xi_{1},\cdots,\xi_{n})\in \mathbb{R}^{n}. $$ For such a time-dependent partial differential equation (PDE) \eqref{eq:equation}, one common method is splitting the equation into a system with an auxiliary variable $\mathbf{w}\in \mathbb{R}^{n}$ at first, \begin{align} \label{eq:system} \left\{\begin{array}{l} \partial_t u(\mathbf{x},t) = \nabla \cdot \left( \mathbf{A}(u, \textbf{x}, t) \mathbf{w} \right) + \mathbf{B}(u, \textbf{x}, t)^T \nabla u + C(u, \textbf{x}, t),\\ \mathbf{w} = \nabla u. \\ \end{array}\right. \end{align} And then solve the two equations at the same time level. There is a large amount of numerical methods for this problem. Most of these schemes discretize the spatial variables at first with finite volume / difference methods, finite element methods, or spectral methods, generating a large coupled system of ordinary differential equations (ODEs). And then apply an initial value ODE solver in time. This approach is commonly referred to as the Method of Lines (MOL) and interested readers are referred to \cite{schiesser2012numerical} for further discussions. Classical methods for this time evolution include multi-step, multi-stage, or multi-derivative methods, as well as a combination of these approaches. For instance, the Runge-Kutta method and the Taylor series methods. Note that efficiency is a main concern of these schemes. For example, the explicit methods solving \eqref{eq:system} does restrict the time step $\Delta t\varpropto \Delta x^2$ due to the stability requirement, where $\Delta x$ is the spatial mesh size. Using Implicit-Explicit (IMEX) or fully implicit time discretization techniques \cite{ruuth1993implicit, kennedy2003additive} can allow larger time step, but usually we need to solve a system of (nonlinear) equations for each step. The algorithm would be expensive when the system size becomes bigger. Besides the classical ones, other high order time discretization techniques were also developed, e.g., the spectral deferred correction (SDC) method \cite{dutt2000spectral, minion2003semi, huang2007arbitrary}, the exponential time differencing method \cite{cox2002exponential, kassam2005fourth}, the integration factor methods \cite{beylkin1998new, cox2002exponential, ju2015fast, maday1990operator, nie2006efficient}, and the hybrid methods of SDC and high order Runge-Kutta schemes \cite{christlieb2010integral}. Another framework named the Method of Lines Transpose (MOL$^T$) has been exploited in the literature for solving the linear time-dependent PDEs. In such a framework, the temporal variable is first discretized, resulting in a set of linear boundary value problems (BVPs) at discrete time levels. Furthermore, each BVP can be inverted analytically in an integral formulation based on a kernel function and then the numerical solution is updated accordingly. As a notable advantage, the MOL$^T$ approach is able to use an implicit method but avoid solving linear systems at each time step, see \cite{causley2014method}. Moreover, a fast convolution algorithm is developed to ensure the computational complexity of the scheme is $\mathcal{O}(N)$ \cite{causley2013method, greengard1987fast, barnes1986hierarchical}, where $N$ is the number of discrete mesh points. Over the past several years, the MOL$^T$ methods have been developed for solving the heat equation \cite{causley2017method, causley2016method, kropinski2011fast, jia2008krylov}, Maxwell's equations \cite{cheng2017asymptotic}, the advection equation and Vlasov equation \cite{christlieb2016weno}, among others. This methodology can be generalized to solving some nonlinear problems, such as the Cahn-Hilliard equation \cite{causley2017method}. However, it rarely applied to general nonlinear problems, mainly because efficient fast algorithms of inverting nonlinear BVPs are lacking and hence the advantage of the MOL$^T$ is compromised. More recently, following the MOL$^T$ philosophy, authors found that the first order and second order derivatives can be represented as infinite series of the kernel based integral \cite{christlieb2017kernel}. Therefore, in numerical simulations, we can truncate the series and use the corresponding partial sum to approximate the spatial derivatives. This method was presented to solve the nonlinear degenerate parabolic equations in \cite{christlieb2017kernel}, \begin{align} \label{eq:original} u_t+f(u)_x=g(u)_{xx}, \end{align} which is a special case of \eqref{eq:equation} with $A(u,x,t)=g'(u)$. The major distinction between the kernel based scheme and the MOL$^T$ works is that this scheme is still in the MOL framework with an the classic explicit strong-stability-preserving Runge-Kutta (SSP RK) scheme in time discretization \cite{gottlieb2001strong, shu2002survey, gottlieb2005high}, which is stable, efficient and accurate. Even though the scheme is explicit, it was proved to be unconditionally stable up to third order accuracy, with the help of the careful choice of a parameter $\beta$ in it. After that, the scheme has been extended to the Hamilton-Jacobi equations \cite{christlieb2019kernel}, and applied on the ideal magnetohydrodynamics equations \cite{cakir2019kernel}. We have tried to employ the scheme to solve \eqref{eq:system} directly. Unfortunately, the numerical scheme is less efficient, because the available interval for $\beta$ is pretty small, which would result larger errors. Even worse, for the two-dimensional problems, the unconditional stability is absent. Details would be shown later. In this paper, we will propose a numerical scheme to discretize \eqref{eq:equation} or \eqref{eq:system}, with a novel kernel-based representation of the spatial derivatives. Again, the scheme is in the MOL framework, coupled with the classic SSP RK method in time discretization. We want the scheme can maintain the good properties of unconditional stability and high order accuracy. In additional, comparing with the the original method \cite{christlieb2017kernel}, the novel scheme can enlarge the available interval for $\beta$, enhancing greater efficiency. Moreover, the unconditionally stable property for high dimensional problems can be proved theoretically. For ease of use in the following parts, we list the formulation of the SSP RK scheme here, up to third order accuracy. To advance the solution of the ODE $u_t=\mathcal{H}[u]$ at time level $t^n$, denoted by $u^n$, to next time level $t^{n+1}=t^n+\Delta t$, the first order scheme is the forward Euler scheme, \begin{align} \label{eq:rk1} u^{n+1}=u^{n}+\Delta t \mathcal{H}[u^{n}]. \end{align} The second order scheme is \begin{equation} \label{eq:rk2} \begin{aligned} & u^{(1)}=u^{n}+\Delta t \mathcal{H}[u^{n}], \\ & u^{n+1}=\frac{1}{2}u^{n}+\frac{1}{2} \left( u^{(1)}+\Delta t \mathcal{H}[u^{(1)}] \right). \end{aligned} \end{equation} And the third order scheme is \begin{equation} \label{eq:rk3} \begin{aligned} & u^{(1)}=u^{n}+\Delta t \mathcal{H}[u^{n}], \\ & u^{(2)}=\frac{1}{4}u^{n}+\frac{3}{4} \left( u^{(1)}+\Delta t \mathcal{H}[u^{(1)}] \right), \\ & u^{n+1}=\frac{2}{3}u^{n}+\frac{1}{3} \left( u^{(2)}+\Delta t \mathcal{H}[u^{(2)}] \right). \end{aligned} \end{equation} The rest of this paper is organized as follows. In Section 2, we will review how the original kernel based formula works on \eqref{eq:original}. Then we will fix the method and discuss the properties of the new one, including accuracy and stability, in Section 3. Section 4 will introduce the two-dimensional approach. After that, we will present some numerical tests in Section 5 to verify the performance of our scheme, and finally, draw conclusions in Section 6. \section{New Representation of Differential Operators} In this section, we will introduce a new representation of the first order differential operator $\partial_{x}$, and further use it in \eqref{eq:system2}. We require that the proposed scheme can maintain the high order accuracy and the A-stable property. Moreover, it can overcome the disadvantages of the schemes \eqref{eq:newmth1} and \eqref{eq:method2}, so that the error converges uniformly for $\alpha$, and the A-stable interval is relatively larger. \subsection{Construction of A New Representation} We have showed in last section that the scheme \eqref{eq:method2} with $2k=2$ has a truncation error $\mathcal{O}(1/\alpha^2)$. In fact, based on Theorem \ref{thm1}, we can obtain that \begin{align} \label{eq:dxx1} \frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R)[v,\alpha](x) =& \sum\limits_{p=1}^m\left(\frac{1}{\alpha}\right)^{2p-2}\partial_x^{2p-1}v(x) - \frac{1}{2}\left(\frac{1}{\alpha}\right)^{2m}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2m+1}v,\alpha](x) \notag \\ =& \partial_{x} v(x) + \left(\frac{1}{\alpha}\right)^{2}\partial_x^{3}v(x) - \frac{1}{2}\left(\frac{1}{\alpha}\right)^{4}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{5}v,\alpha](x). \end{align} This demonstrates that the operator $\frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R)$, i.e., \eqref{eq:method2} with $2k=1$, approximates the first order derivative with error $\mathcal{O}(1/\alpha^2)$ as well. Therefore, we can achieve the same order of accuracy with less computational cost. If we define $\mathcal{H}^1_3[u,A,\alpha](x)$ as \begin{align} \mathcal{H}^1_3[u,A,\alpha](x) =\frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R)[Aw,\alpha](x), \quad \text{and} \quad w=\frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R)[u,\alpha](x). \end{align} Then, the error $\Vert (\sin x)_{xx}-\mathcal{H}^1_3[\sin x,1,\alpha] \Vert_\infty$ is a monotone decreasing function of $\alpha$, see Figure \ref{fig:err3_k1}. Hence, we will start from \eqref{eq:dxx1} and construct new higher order approximations of $\partial_x$, by ``removing" the higher order derivatives. To eliminate the main error term in \eqref{eq:dxx1}, i.e., $(1/\alpha)^2 \partial_x^3 v(x)$, we introduce another operation $\mathcal{D}_0$ here, \begin{align} \label{eq:D0} \mathcal{D}_0[v,\alpha](x) :=& \frac{1}{2} \left( \mathcal{D}_{L} + \mathcal{D}_{R} \right)[v,\alpha](x) = (\mathcal{I} -\mathcal{L}_{0}^{-1})[v,\alpha](x) \notag\\ =& -\sum\limits_{p=1}^k \left(\frac{1}{\alpha}\right)^{2p} \partial_x^{2p}v(x) -\left( \frac{1}{\alpha} \right)^{2k+2} \mathcal{L}_0^{-1}[\partial_x^{2k+2}v,\alpha](x), \end{align} where, \begin{align*} \mathcal{L}_{0}^{-1}[v,\alpha](x) = \frac{\alpha}{2} \int_a^b e^{-\alpha |x-y|}v(y)dy + A_0 e^{-\alpha(x-a)} + B_0 e^{-\alpha(b-x)} \end{align*} and the coefficients $A_0=\frac{I^0[v,\alpha](b)}{1-\mu}$ and $B_0=\frac{I^0[v,\alpha](a)}{1-\mu}$ for periodic boundary conditions. The last equality in \eqref{eq:D0} is given in \cite{christlieb2017kernel}. Consequently, we can easily prove that \begin{align*} \mathcal{D}_0 \left[ \frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R) \right] + \frac{\alpha}{2}(\mathcal{D}_L-\mathcal{D}_R) = \frac{\alpha}{2} \left( \mathcal{I} + \mathcal{D}_{0} \right) \left( \mathcal{D}_{L} -\mathcal{D}_{R} \right) = \partial_x - \left(\frac{1}{\alpha}\right)^4\partial_x^5 + \mathcal{O} \left( \frac{1}{\alpha^6} \right), \end{align*} reducing error from $\mathcal{O}(1/\alpha^2)$ to $\mathcal{O}(1/\alpha^4)$. Repeat this process to eliminate the higher order derivatives in turn, and we can have a general form of the scheme with error $\mathcal{O}(1/\alpha^{2k})$, which is showed in the following theorem. \begin{thm} \label{th:errd0dldr} Suppose $v(x)\in C^{2k+1}([a,b])$ is a periodic function. Consider the operators $\mathcal{D}_{*}$ with the periodic boundary treatment $\mathcal{D}_{*}(a) = \mathcal{D}_{*}(b)$, where $*$ can be 0, L or R. Then, we have \begin{align} \Vert \partial_xv(x) - \frac{\alpha}{2} \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R)[v,\alpha](x) \Vert_\infty \leq C \left( \frac{1}{\alpha} \right)^{2k} \Vert\partial_x^{2k+1}v\Vert_\infty, \end{align} where $C$ is a constant only depending on k. \end{thm} \begin{proof} Using the definition of $\mathcal{L}^{-1}_{L}$, it is easy to deduce that \begin{align*} \partial_x\mathcal{L}^{-1}_L[v,\alpha](x) &=\alpha v(x)-\alpha^2\int_a^x v(y) e^{-\alpha(x-y)}dy-\alpha e^{-\alpha(x-a)} A_L[v,\alpha]\\ &=\alpha v(x)-\alpha\mathcal{L}^{-1}_L[v,\alpha](x)=\alpha\mathcal{D}_L[v,\alpha](x). \end{align*} Hence, \begin{align*} \partial_x\mathcal{D}_L[v,\alpha](x) =\partial_x v(x)-\alpha\mathcal{D}_L[v,\alpha](x). \end{align*} On the other hand, using integration by parts, we can obtain that \begin{align*} \mathcal{D}_L[v,\alpha](x) &= v(x) - \alpha \int_{a}^{x} e^{-\alpha(x-y)} v (y) dy - \frac{I^L[v,\alpha](b)}{1-\mu} e^{-\alpha(x-a)} \\ &= v(x) - e^{-\alpha(x-y)} v(y) |_{y=a} ^{y=x} + \int_{a}^{x} e^{-\alpha(x-y)} v'(y) dy -\frac{v(b)-\mu v(a) -\frac{1}{\alpha} I^{L}[v',\alpha](b)}{1-\mu}e^{-\alpha(x-a)} \\ &=\frac{1}{\alpha}\mathcal{L}^{-1}_L[\partial_x v,\alpha](x) =\frac{1}{\alpha}\partial_xv(x)-\frac{1}{\alpha}\mathcal{D}_L[\partial_xv,\alpha](x), \end{align*} or equivalently, \begin{align*} \mathcal{D}_L[\partial_x v,\alpha]=\partial_x v(x)-\alpha \mathcal{D}_L[v,\alpha](x). \end{align*} Therefore, $$\partial_x\mathcal{D}_L[v,\alpha]=\mathcal{D}_L[\partial_x v,\alpha].$$ Similarly, $\partial_x\mathcal{D}_R[v,\alpha]=\mathcal{D}_R[\partial_x v,\alpha]$ and $\partial_{xx}\mathcal{D}_0[v,\alpha]=\mathcal{D}_0[\partial_{xx} v,\alpha]$. Next, let we consider operator $\frac{1}{2}\mathcal{D}_0(\mathcal{D}_L-\mathcal{D}_R)$. Note that there is a general form of \eqref{eq:D0} for $0\leq p<k$: \begin{align*} \mathcal{D}_0[\partial_x^{2p-1}v,\alpha](x)&=-\sum\limits_{m=p+1}^{k}\left(\frac{1}{\alpha}\right)^{2(m-p)}\partial_x^{2m-1}v(x)-\left(\frac{1}{\alpha}\right)^{2(k-p+1)}\mathcal{L}_0^{-1}[\partial_x^{2k+1}v,\alpha](x). \end{align*} Hence, we can obtain that \begin{align*} \frac{1}{2}\mathcal{D}_0(\mathcal{D}_L-\mathcal{D}_R)=&\sum\limits_{p=1}^{k-1}\left(\frac{1}{\alpha}\right)^{2p-1}\mathcal{D}_0[\partial_x^{2p-1}v,\alpha](x)-\frac{1}{2}\left(\frac{1}{\alpha}\right)^{2k-1}\mathcal{D}_0[(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k-1}v,\alpha],\alpha](x)\\ =&\sum\limits_{p=1}^{k-1}\left(\frac{1}{\alpha}\right)^{2p-1}\left(-\sum\limits_{m=p+1}^{k}\left(\frac{1}{\alpha}\right)^{2(m-p)}\partial_x^{2m-1}v(x)-\left(\frac{1}{\alpha}\right)^{2(k-p+1)}\mathcal{L}_0^{-1}[\partial_x^{2k+1}v,\alpha](x)\right)\\ &+\frac{1}{2}\left(\frac{1}{\alpha}\right)^{2k+1}\mathcal{L}_0^{-1}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k+1}v,\alpha](x)\\ =-&\sum\limits_{p=2}^k(p-1)\left(\frac{1}{\alpha}\right)^{2p-1}\partial_x^{2p-1}v(x)-\frac{k-1}{2}\left(\frac{1}{\alpha}\right)^{2k+1}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k+1}v,\alpha](x)\\ &+\frac{1}{2}\left(\frac{1}{\alpha}\right)^{2k+1}\mathcal{L}_0^{-1}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k+1}v,\alpha](x). \end{align*} Therefore, $$ \frac{1}{2}(\mathcal{D}_L-\mathcal{D}_R)+\frac{1}{2}\mathcal{D}_0(\mathcal{D}_L-\mathcal{D}_R)=\frac{1}{\alpha}v_x(x)-\sum\limits_{p=3}^k(p-2)\left(\frac{1}{\alpha}\right)^{2p-1}\partial^{2p-1}_xv(x)-\left(\frac{1}{\alpha}\right)^{2k+1}Q_2[v,\alpha](x), $$ where $Q_2[v,\alpha](x)=\frac{k-1}{2}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k-1}v,\alpha](x)-\frac{1}{2}\mathcal{L}_0^{-1}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k+1}v,\alpha](x)]$. Repeat the process, and we finally obtain $$ \frac{1}{2}\sum\limits_{p=1}^k\mathcal{D}_0^{p-1}(\mathcal{D}_L-\mathcal{D}_R)[v,\alpha](x)=\frac{1}{\alpha}\partial_xv(x)+\frac{(-1)^k}{2}\left(\frac{1}{\alpha}\right)^{2k+1}(\mathcal{L}_0^{-1})^{k-1}(\mathcal{L}_L^{-1}-\mathcal{L}_R^{-1})[\partial_x^{2k+1}v,\alpha](x). $$ Note that for any $w(x)\in C([a,b])$, we can find a constant $\bar{C}$ independent of $w$ and $\alpha$, such that $\|\mathcal{L}_{*}^{-1}[w,\alpha](x)\|_\infty\leq \bar{C}\|w\|_\infty$, where $*$ can be $0$, $L$ and $R$. Hence, there is a constant $C$ that only depends on $k$ satisfying $$ \left \Vert \frac{1}{\alpha} \partial_xv(x) - \frac{1}{2} \sum\limits_{p=1}^k \mathcal{D}_0^{p-1}(\mathcal{D}_L-\mathcal{D}_R)[v,\alpha](x) \right\Vert_\infty \leq C \left( \frac{1}{\alpha} \right)^{2k+1}\Vert\partial_x^{2k+1}v\Vert_\infty. $$ And the theorem is proved. \end{proof} Then we get the novel approximation of $(A(u,x) u_{x})_{x}$, \begin{equation} \label{eq:1D} \begin{aligned} & (A(u,x)u_x)_x \approx \frac{\alpha}{2} \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R)[Aw,\alpha](x) =: \mathcal{H}_{3}^{k}[u,A, \alpha](x), \\ & w=u_x \approx \frac{\alpha}{2} \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R)[v,\alpha](x), \end{aligned} \end{equation} \noindent and the $L_\infty$ error has the order of $(1/\alpha)^{2k}$. Again, we test this operation $\mathcal{H}_{3}^{k}$ with the specific case that $u=\sin x$, $A=1$ and $[a,b]=[0,2\pi]$, and concern about the monotonicity of the $L_\infty$ errors with respect to $\alpha$. Figure \ref{figerr3} indicates the monotonicity and uniform convergence of the novel scheme. And for the function $u=\sin(2x)$, we have the similar conclusion, which will not be presented any more. \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.3\textwidth]{figure/err3k1-eps-converted-to.pdf}\label{fig:err3_k1}} \subfigure[$k=2$]{\includegraphics[width=.3\textwidth]{figure/err3k2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.3\textwidth]{figure/err3k3-eps-converted-to.pdf}} \caption{$\Vert (\sin x)_{xx}-\mathcal{H}^k_3[\sin x,1,\alpha] \Vert_\infty$, with $\mathcal{H}^k_3$ given in \eqref{eq:1D}.} \label{figerr3} \end{figure} On the other hand, we want to remark that computational complexity of $\mathcal{H}^k_3$ \eqref{eq:1D} is the same as $\mathcal{H}^k_1$ \eqref{eq:newmth1}, and only half of that of $\mathcal{H}^k_2$ \eqref{eq:method2}, when they have the same order of accuracy. This is another advantage of this novel scheme. Therefore, in this work, we will employ $\mathcal{H}^k_3$ to approach the diffusion term. Moreover, we choose the parameter \begin{align} \alpha=\sqrt{ \frac{\beta}{ c\Delta t}}, \qquad \text{with} \quad c=\max_{u,x} |A(u,x,t)|. \end{align} Therefore, \begin{align} \label{eq:H3} \mathcal{H}^k_3[u,A](x) =& \frac{\beta}{4c\Delta t} \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R) \left[ A \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R) [ u,\sqrt{\frac{\beta}{c\Delta t}} ], \sqrt{\frac{\beta}{c\Delta t}} \right](x) \notag\\ =& (A(u,x) u_x)_x + \mathcal{O}(\Delta t^k). \end{align} \subsection{Stability} In this section, we will analyze the linear stability for the 1D equation \eqref{eq:equation2}, using $\mathcal{H}^k_3$ \eqref{eq:H3} for spatial derivative and the classic explicit SSP RK methods to advance $u^n$ to $u^{n+1}$. Even though the explicit method is used for time integration, we will show that the semi-discrete schemes can be A-stable and hence allowing for large time step evolution if $\beta$ in \eqref{eq:H3} is appropriately chosen. To achieve $k$-th order accuracy in time, we should employ the $k$-th order SSP RK method as well as the $k$-th partial sum in $\mathcal{H}^k_3$. Note that high order SSP RK method \eqref{eq:rk2} and \eqref{eq:rk3} are linear combination of the first order Euler forward \eqref{eq:rk1}. Hence, here we only establish linear stability of the schemes $\mathcal{H}^k_3$ with first order Euler forward, which is given in the following theorem. \begin{thm} \label{th:stb1} Consider the linear equation $u_t=A u_{xx}$, $A>0$, with periodic boundary conditions. When the Euler forward time discretization coupling with the partial sum $\mathcal{H}^k_3$ in \eqref{eq:H3}, the scheme can be A-stable if $\beta$ satisfies $0<\beta \leq \beta_{2,k,max}$. Here, $\beta_{2,k,max}$ is a positive constant which only depends on $k$. The constant $\beta_{2,k,max}$ for $k = 1, 2, 3$ are summarized in Table \ref{tab1}. \end{thm} \begin{proof} Suppose the solution is enough smooth, then $$ u(x,t)=\hat{u}(t) e^{i\eta x}. $$ We can obtain the amplification factor $\hat{Q}$ using Von Neumann analysis. Plugging the above formula in the definition of $\mathcal{L}_L$ and $\mathcal{D}_L$, we have \begin{align*} \mathcal{L}_L[u,\alpha] =(\mathcal{I}+\frac{1}{\alpha}\partial_x)u =(1+\frac{i\eta}{\alpha})u,\quad \text{and} \quad \mathcal{D}_L[u,\alpha]=(\mathcal{I}-\mathcal{L}^{-1}_L)[u,\alpha =\frac{\frac{i\eta}{\alpha}}{1+\frac{i\eta}{\alpha}}u. \end{align*} For brevity, let $z=\frac{\eta}{\alpha}$, and then we have $\mathcal{D}_L[u,\alpha]=\frac{iz}{1+iz}u$. Similarly, we can obtain that \begin{align*} \mathcal{D}_R[u,\alpha]=-\frac{iz}{1-iz}u, \qquad \frac{1}{2}(\mathcal{D}_L-\mathcal{D}_R)[u,\alpha]=\frac{iz}{1+z^2}u,\qquad \mathcal{D}_0[u,\alpha] = \frac{z^2}{1+z^2}u. \end{align*} Note that the scheme is given as \begin{align*} u^{n+1}=u^n + \Delta t A \frac{\alpha^2}{4} \left( \sum\limits_{p=1}^{k}\mathcal{D}_{0}^{p-1} (\mathcal{D}_L-\mathcal{D}_R) \right)^2[u^n,\alpha](x). \end{align*} Hence, with the sum formula of infinite sequence, the amplification factor can be written as \begin{align*} \hat{Q} &= 1+ A \alpha^2\Delta t \left( \sum\limits_{p=1}^{k} \left(\frac{z^2}{1+z^2}\right)^{p-1} \frac{iz}{1+z^2} \right)^2\\ &=1+\beta \left(iz\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)\right)^2\\ &=1-\beta z^2\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)^2. \end{align*} Define $S_k(z)=z^2\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)^2$, so that $\hat{Q}=1-\beta S_k(z)$. The scheme is stable when $\vert\hat{Q}\vert\leq 1$, which means $\beta S_k(z) \leq 2$ for any $z\in\mathbb{R}$. It is easy to find that $S_k(z)$ is an even function with respect to $z$. So we only need to consider $z\geq0$. We divide $S_k$ into two terms, $z^2\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)$ and $\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)$. Then, study the monotonicity or upper bound of those two factors, respectively. Note that \begin{align*} z^2\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)=\sum\limits_{p=1}^k\left(\frac{z^2}{1+z^2}\right)^p, \end{align*} and $$ \frac{{\rm d}}{{\rm d}z}\left(\frac{z^2}{1+z^2}\right)^p=\frac{2pz}{(1+z^2)^2}\left(\frac{z^2}{1+z^2}\right)^{p-1}\geq 0, \quad \text{for} \, z\geq 0. $$ Hence, we have that $z^2\left(1-\left(\frac{z^2}{1+z^2}\right)^k\right)$ is nonnegative and monotonous increasing of $z$, and the upper bound is $$ \lim\limits_{z\rightarrow+\infty}\sum\limits_{p=1}^k\left(\frac{z^2}{1+z^2}\right)^p=\sum\limits_{p=1}^k\lim\limits_{z\rightarrow+\infty}\left(\frac{z^2}{1+z^2}\right)^p=k. $$ On the other hand, it is obviously that $1-\left(\frac{z^2}{1+z^2}\right)^k$ is monotone decreasing of $z$ and tending to zero. Therefore we have $0\leq S_k\leq M_k$ where $M_k$ is a positive constant which only depends on $k$. Consequently, the scheme is A-stable if $\beta\leq\frac{2}{M_k}=:\beta_{2,k,max}$. \end{proof} \begin{table}[htb] \caption{\label{tab1} $\beta_{2,k,max}$ in Theorem \ref{th:stb1} for $k=1,2,3$} \bigskip \centering \begin{tabular}{cccc}\hline $k$ & 1 & 2 & 3 \\\hline $\beta_{2,k,max}$ & 8 & 3.2275 & 1.9800 \\\hline \end{tabular} \end{table} \begin{rem} We want to remark that in \cite{christlieb2017kernel}, we found that the second order derivative $\partial_{xx}$ can be represented by the infinity series of $\mathcal{D}_{0}$, and the heat equation $u_t=A u_{xx}$ can be simulated as \begin{align} \label{eq:uxx_old} A u_{xx} = - \left(\sqrt{\frac{\beta}{A\Delta t}}\right)^2 \sum_{p=1}^{k} \mathcal{D}_{0}^p [Au, \sqrt{\frac{\beta}{A\Delta t}}] + \mathcal{O}(\Delta t^k). \end{align} It was proved that the scheme is A-stable when employing the $k$-th order SSP RK method and the $k$-th partial sum with $\beta$ in a given interval. However, the upper bounds of $\beta$ are much smaller than those in Table \ref{tab1}. For instance, when $k=1$, $\beta_{\max}=2$, which is only quarter of that of the new scheme. Hence, the proposed scheme has smaller errors and is more efficient. The comparison will be showed in numerical simulation. \end{rem} \begin{rem} Consider the parabolic problem $u_t=(A(u,x,t) u_{x})_{x}+ B(u,x,t) u_{x}$, where $A(x,t)>0$. Then, we approximate the spatial derivatives by scheme \begin{align} \label{eq:H} \mathcal{H}^{k}[u](x) =& \frac{\alpha_{0}^2}{4} \sum\limits_{p=1}^k\mathcal{D}_0^{p-1} (\mathcal{D}_L-\mathcal{D}_R) \left[ A(u,x,t) \sum\limits_{q=1}^k\mathcal{D}_0^{q-1} (\mathcal{D}_L-\mathcal{D}_R) [ u,\alpha_0 ],\alpha_0 \right](x) \notag\\ & + \frac{1}{2}B(u,x,t) \left( u^{-}_x + u_x^{+} \right) + \frac{1}{2}r \left( u^{+}_x - u_x^{-} \right), \end{align} with $u^{\pm}_{x}$ are given in \eqref{eq:ux_pn} and the parameters \begin{equation} \begin{aligned} & \alpha_{L}=\alpha_{R}= \frac{\beta_1}{r\Delta t}, \quad r=\max|B(u,x,t)|, \\ & \alpha_{0}=\sqrt{\frac{\beta_2}{c\Delta t}}, \quad c=\max |A(u,x,t)|. \end{aligned} \end{equation} Then, $\mathcal{H}^{k}[u](x) =(A(u,x,t) u_{x})_{x}+ B(u,x,t) u_{x} +\mathcal{O}(\Delta t^k)$. Moreover, consider the linear function, where $A$ and $B$ are both constants. The scheme is A-stable if we employs the $k$-th order SSP RK method and the $k$-th partial sum with $\beta_1\leq \frac{1}{2} \beta_{1,k,\max}$ and $ \beta_2\leq\frac{1}{2}\beta_{2,k,\max}$, for $k = 1, 2, 3$. \end{rem} \subsection{Space Discretization} In the previous sections, we always consider the partial sum with exact integration. Here, we present the details about the spatial discretization of $\mathcal{H}^k[u]$ in \eqref{eq:H}. Suppose the domain $[a,b]$ is divided by $N+1$ uniformly distributed grid points $$a=x_0<x_1<\cdots<x_{N-1}<x_N=b,$$ with mesh size $\Delta x=\frac{b-a}{N}$. Denote $u^n_i$ as the numerical solution at spatial location $x_{i}$ at time level $t^{n}$. On each grid point $x_{i}$, we further denote $L^{*}[v,\alpha](x_{i})$ as $L^{*}_{i}$, where $*$ can be $0$, $L$ and $R$. Note that the convolution integrals $I^{L}_{i}$ and $I^{R}_{i}$ satisfy a recursive relation \begin{equation} \label{eq:recursive} \begin{aligned} & I^L_i = I^L_{i-1}e^{-\alpha\Delta x} + J^L_i,\quad i=1,\ldots,N, \quad I^L_0 = 0, \\ & I^R_i = I^R_{i+1}e^{-\alpha\Delta x} + J^R_i,\quad i=0,\ldots,N-1, \quad I^R_N = 0, \end{aligned} \end{equation} respectively, where \begin{align} \label{eq:JLR} J^L_{i} = \alpha \int_{x_{i-1}}^{x_{i}} v(y)e^{-\alpha (x_{i}-y)}dy,\ \ \ \ J^R_{i} = \alpha \int_{x_{i}}^{x_{i+1}} v(y)e^{-\alpha (y-x_{i})}dy. \end{align} Therefore, once we have computed $J^{L}_{i}$ and $J^{R}_{i}$ for all $i$, we then can obtain $I^{L}_{i}$ and $I^{R}_{i}$ via the recursive relation. In addition, note that the convolution integral $I^{0}[v,\alpha](x)$ can be split into $I^{L}[v,\alpha](x)$ and $I^{R}[v,\alpha](x)$, $$ I^0_i =\frac{1}{2}( I^L_i + I^R_i ), \quad i=0,\ldots,N.$$ Thus, $I^0_i$ can be evaluated in the same way as $I^L_i$ and $I^R_i $. For the parabolic equation, the solution is smooth in space. Hence, here we only need the quadrature based on the interpolation. We take the quadrature rule for $J^{L}_{i}$ with six points as an example. Suppose $p(x)$ is the unique polynomial of degree at most five which interpolates $v$ at $\{x_{i-3}, \ldots, x_{i+2}\}$. Then, \begin{subequations} \label{eq:quar} \begin{align} \label{eq:quar1} J^{L}_{i} \approx \alpha \int_{x_{i-1}}^{x_{i}} p(y) e^{-\alpha(x_i-y)} dy =\sum\limits_{j=0}^{5} C_{-3+j} v_{i-3+j}, \end{align} where the coefficients $C_{-3+j}$ depend on $\alpha$ and the cell size $\Delta x$, but not on $v$. These coefficients would be given out in Appendix \ref{appen1}. The process to obtain $J^{R}_{i}$ is mirror-symmetric to that of $J^{L}_{i}$ with respect to point $x_{i}$ \begin{align} \label{eq:quar2} J^{R}_{i} \approx \sum\limits_{j=0}^{5} C_{-3+j} v_{i+3-j}, \end{align} \end{subequations} We want to remark that when the solution has discontinuities or sharp fronts, for instance, the solution of degenerate parabolic equations, the weighted essentially non-oscillatory (WENO) integration and a nonlinear filter can be used to control the numerical oscillation near shock and achieve high order accuracy in smooth regions. Details can be found in \cite{christlieb2017kernel, christlieb2019kernel}. Consider the fully discrete scheme \eqref{eq:H} with $k$-th order SSP RK scheme and the quadrature rule \eqref{eq:quar}, the linear stability property can be obtained by the Fourier analysis under the assumption that $u^n_j=\hat{u}^n e^{i\kappa x_j}$. Again, we only consider the linear diffusion equation $u_t=u_{xx}$, since the analysis for linear advection equation $u_t=u_x$ is given in \cite{christlieb2017kernel}. It is straightforward to check that the amplification factor $\lambda$ for the linear diffusion equation depends on $\beta$, $\kappa\Delta x$ and $\Delta t/\Delta x^2$. Moreover, we can verify that, if $0<\beta\leq \beta_{2,k,max}$, for $k = 1, 2, 3$, then $|\lambda|\leq1$ for any $\kappa \Delta x\in[0, 2\pi]$, $\Delta t$ and $\Delta x$, indicating the fully discrete scheme is unconditionally stable. \section{Representation of Differential Operators} In this section, we will review the representations of the first spatial derivative $\partial_{x}$ given in \cite{christlieb2017kernel}. Such representations serve as the key building block of the proposed schemes. Below, we will introduce operator $\mathcal{L}$ and the corresponding operator $\mathcal{D}$ at first. Then, the differential operator $\partial_x$ can be represented by an infinite series of $\mathcal{D}$. We will also investigate the approximation accuracy when the infinite series is truncated by a partial sum. \begin{comment} \subsection{The second derivative $\partial_{xx}$} \label{sec:der_xx} We define the following differential operators \begin{align} \label{eq:operL0} \mathcal{L}_{0}=\mathcal{I}-\frac{1}{\alpha^2}\partial_{xx}, \quad x \in[a,b], \end{align} where $\mathcal{I}$ is the identity operator and $\alpha>0$ is a constant. Then, we can invert the operate analytically \begin{align} \label{eq:L0inverse} \mathcal{L}_{0}^{-1}[v,\alpha](x) = I^{0}[v,\alpha](x) + A_{0} e^{-\alpha (x-a)} + B_{0} e^{- \alpha (b-x)}, \end{align} where, \begin{align} \label{eq:I0} I^{0}[v,\alpha](x)=\frac{\alpha}{2} \int_a^b e^{-\alpha |x-y|}v(y)dy, \end{align} and $A_{0}$ and $B_{0}$ are constants determined by the boundary conditions. For example, when $\mathcal{L}_{0}^{-1}$ is periodic, i.e. $\mathcal{L}_{0}^{-1}[v,\alpha](a)=\mathcal{L}_{0}^{-1}[v,\alpha](b)$, then we have $A_0=\frac{I^0[v,\alpha](b)}{1-\mu}$ and $B_0=\frac{I^0[v,\alpha](a)}{1-\mu}$ with $\mu=e^{-\alpha(b-a)}$. Moreover, define another operator \begin{align} \label{eq:D0} \mathcal{D}_{0}=\mathcal{I}-\mathcal{L}_{0}^{-1}. \end{align} Then, with the definition \eqref{eq:operL0}, the second derivative $\partial_{xx}$ can be represented as \begin{align} \label{eq:g_xx} \partial_{xx} =\alpha^2(\mathcal{I} -\mathcal{L}_0)=\alpha^2\mathcal{L}_0( \mathcal{L}_0^{-1}-\mathcal{I})=-\alpha^2(\mathcal{I}-\mathcal{D}_0)^{-1}\mathcal{D}_0= -\alpha^2 \sum_{p=1}^{\infty} \mathcal{D}^{p}_{0}, \end{align} where $\mathcal{D}_{0}^{p}$ is recursively defined as $\mathcal{D}_{0}^{p}=\mathcal{D}_{0}[\mathcal{D}_{0}^{p-1}]$. \end{comment} \subsection{The first derivative $\partial_{x}$} In order to represent the first order derivative $\partial_{x}$, we start with two operators defined on a closed interval $x\in[a,b]$, \begin{align} \mathcal{L}_{L} := \mathcal{I}+\frac{1}{\alpha}\partial_{x} \quad \text{and} \quad \mathcal{L}_{R} := \mathcal{I}-\frac{1}{\alpha}\partial_{x}, \end{align} where $\mathcal{I}$ is the identity operator and $\alpha>0$ is a constant. Then, we can invert the operators analytically \begin{align} \mathcal{L}_{L}^{-1} =I^{L}[v,\alpha](x) + A_{L}e^{-\alpha (x-a)},\qquad \mathcal{L}_{R}^{-1}=I^{R}[v,\alpha](x) + B_{R}e^{-\alpha (b-x)} \end{align} where, \begin{align} \label{eq:I_LR} I^{L}[v,\alpha](x)=\alpha \int_a^x e^{-\alpha (x-y)}v(y)dy,\qquad I^{R}[v,\alpha](x)=\alpha \int_x^b e^{-\alpha (y-x)}v(y)dy \end{align} are the left/right biased integral, respectively. And $A_{L}$ and $B_{R}$ are constants determined by the boundary conditions. For instance, if $\mathcal{L}_{L}^{-1}$ and $\mathcal{L}_{R}^{-1}$ are periodic, that is $\mathcal{L}_{L}^{-1}(a)=\mathcal{L}_{L}^{-1}(b)$ and $\mathcal{L}_{R}^{-1}(a)=\mathcal{L}_{R}^{-1}(b)$, then $A_L=\frac{I^L[v,\alpha](b)}{1-\mu}$ and $B_R=\frac{I^R[v,\alpha](a)}{1-\mu}$ with $\mu=e^{-\alpha(b-a)}$. Furthermore, the first order derivative $\partial_{x}$ can be represented as \begin{align*} & \partial_x = \alpha ( \mathcal{L}_L - \mathcal{I}) = \alpha \mathcal{L}_L ( \mathcal{I} - \mathcal{L}_L^{-1} ) = \alpha (\mathcal{I}-\mathcal{D}_L)^{-1} \mathcal{D}_L = \alpha \sum_{p=1}^{\infty} \mathcal{D}^{p}_{L},\\ & \partial_x = -\alpha ( \mathcal{L}_R - \mathcal{I}) = -\alpha \mathcal{L}_R ( \mathcal{I} - \mathcal{L}_R^{-1} ) = -\alpha (\mathcal{I}-\mathcal{D}_R)^{-1} \mathcal{D}_R =-\alpha\sum\limits_{p=1}^{\infty}\mathcal{D}_R^p, \end{align*} with \begin{align} \label{eq:DLR} \mathcal{D}_L=\mathcal{I}-\mathcal{L}_L^{-1}, \quad\text{and}\quad \mathcal{D}_R=\mathcal{I}-\mathcal{L}_R^{-1}. \end{align} \noindent In numerical simulations, we have to truncate the series and only compute the corresponding partial sums: \begin{align} \label{eq:partial_sum} \partial_{x} v \approx \alpha \sum_{p=1}^{k} \mathcal{D}_L^p[v,\alpha], \quad\text{or}\quad \partial_{x} v \approx -\alpha \sum_{p=1}^{k}\mathcal{D}_R^p[v,\alpha]. \end{align} In particular, in the case of periodic boundary condition considered in this work, it is natural to require the boundary treatment $\mathcal{D}^p_L(a)=\mathcal{D}^p_L(b)$ and $\mathcal{D}^p_R(a)=\mathcal{D}^p_R(b)$ for $p\geq1$. Furthermore, \cite{christlieb2017kernel} showed the following theorem, which provided the expressions of the operators $\mathcal{D}_{*}$ and the error estimates of the corresponding $k$-th partial sums. The proof relies on integration by parts, and details can be found in \cite{christlieb2017kernel}. \begin{thm} \label{thm1} Suppose $v(x)\in\mathit{C}^{k+1}([a,b])$ is a periodic function. If we employ the operator $\mathcal{D}_{*}$ with $\mathcal{D}_{*}(a)=\mathcal{D}_{*}(b)$, where $*$ can be L and R. \begin{enumerate} \item The operator $\mathcal{D}_{*}$ have the following expressions, \begin{subequations} \begin{align} \mathcal{D}_L[v,\alpha](x)=& -\sum\limits_{p=1}^k \left(-\frac{1}{\alpha}\right)^p\partial_x^p v(x) + \left(-\frac{1}{\alpha}\right)^{k+1} \mathcal{L}^{-1}_L[\partial_x^{k+1}v,\alpha](x),\\ \mathcal{D}_R[v,\alpha](x)=& -\sum\limits_{p=1}^k \left(\frac{1}{\alpha}\right)^p\partial_x^p v(x) - \left(\frac{1}{\alpha}\right)^{k+1} \mathcal{L}^{-1}_R[\partial_x^{k+1}v,\alpha](x). \end{align} \end{subequations} \item Error between the partial sum and the first derivative can be bounded, \begin{subequations} \begin{align} \| \partial_{x}v - \alpha \sum_{p=1}^{k}\mathcal{D}_{L}^{p}[v,\alpha] \|_{\infty} \leq C \left(\frac{1}{\alpha}\right)^{k} \|\partial^{k+1}_{x}v\|_{\infty},\\ \| \partial_{x}v + \alpha \sum_{p=1}^{k}\mathcal{D}_{R}^{p}[v,\alpha] \|_{\infty} \leq C \left(\frac{1}{\alpha}\right)^{k} \|\partial^{k+1}_{x}v\|_{\infty}, \end{align} \end{subequations} where, the constant $C$ only depends on $k$. \end{enumerate} \end{thm} Next, we look at the convergence performance of the partial sums \eqref{eq:partial_sum}. Here, we test with a special choice that $u=\sin x$, and plot the $L_\infty$ norm of errors in Figure \ref{figadd1}. It is obvious that the errors are always decreasing monotonely with $\alpha$, indicating the unform convergence of the partial sum \eqref{eq:partial_sum}. \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/dl1k1-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/dl1k2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/dl1k3-eps-converted-to.pdf}}\\ \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/dr1k1-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/dr1k2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/dr1k3-eps-converted-to.pdf}} \caption{Errors between the first derivative and the partial sum \eqref{eq:partial_sum} with $u=\sin x$. Top: $\| \partial_{x}u - \alpha \sum_{p=1}^{k}\mathcal{D}_{L}^{p}[u,\alpha] \|_{\infty}$; bottom: $ \| \partial_{x}u + \alpha \sum_{p=1}^{k}\mathcal{D}_{R}^{p}[u,\alpha] \|_{\infty}$. } \label{figadd1} \end{figure} Hence, we can use the partial sum \eqref{eq:partial_sum} to approximate the transport term $B(u,x,t) u_x$, \begin{align} \label{eq:scheme_transport} B(u,x,t) \, u_x \approx \frac{1}{2}B(u,x,t) \left( u^{-}_x + u_x^{+} \right) + \frac{1}{2}r \left( u^{+}_x - u_x^{-} \right), \end{align} with $r=\max |B(u,x,t)|$ in the relevant range, and $u_{x}^{\pm}$ are the approximations to the derivative $u_x$ obtained by left-biased and right-biased methods, respectively, \begin{align} \label{eq:ux_pn} u^{-}_x = \alpha_{L} \sum_{p=1}^{k} \mathcal{D}_{L}^{p} [u, \alpha_{L}] (x), \quad \text{and}\quad u^{+}_x = -\alpha_{R} \sum_{p=1}^{k} \mathcal{D}_{R}^{p} [u,\alpha_{R}] (x). \end{align} In particular, we take $\alpha_{L} = \alpha_{R} =\beta/(q\Delta t)$, where $\Delta t$ denotes the time step and $\beta$ is a prescribed constant independent of $\Delta t$. Hence, the scheme \eqref{eq:scheme_transport} has an error $\mathcal{O}(\Delta t^k)$. Moreover, \cite{christlieb2017kernel} studied the stability of the semi-discrete scheme for scalar linear function $u_t=B u_x$, coupling \eqref{eq:scheme_transport} with exact integral and the classic explicit $k$-th order SSP RK methods in time. The scheme can be proved to be A-stable and hence allows large time step if $\beta$ in \eqref{eq:ux_pn} is appropriately chosen. \begin{thm}\label{thm2} For linear function $u_t=B\,u_x$ with periodic boundary conditions, we use the classic explicit $k$-th order SSP RK methods for time evolution. \begin{enumerate} \item For $k=1, 2$, if we use \eqref{eq:scheme_transport} and \eqref{eq:ux_pn} to approximate the spacial derivative $u_{x}^{\pm}$, then the scheme is $k$-th order in time. Moreover, there exists constant $\beta_{1,k,max} > 0$, such that the scheme is A-stable provided $0<\beta\leq\beta_{1,k,max}$. \item For $k=3$, we use \eqref{eq:scheme_transport} and a modified approximation to $u_x^{\pm}$, \begin{subequations} \label{eq:ux_pn_mod} \begin{align} & u^{-}_x = \alpha \sum_{p=1}^{3} \mathcal{D}_{L}^{p} [u, \alpha] (x) - \frac{1}{2} (\mathcal{D}_{L} +\mathcal{D}_{R}) \star \mathcal{D}_{L}^{2} [u, \alpha](x), \\ & u^{+}_x = -\alpha \sum_{p=1}^{3} \mathcal{D}_{R}^{p} [u,\alpha] (x) + \frac{1}{2} (\mathcal{D}_{L} +\mathcal{D}_{R}) \star \mathcal{D}_{R}^{2} [u, \alpha](x). \end{align} \end{subequations} Then the scheme is third order in time. Moreover, there exists constant $\beta_{1,3,max} > 0$, such that the scheme is A-stable provided $0<\beta\leq\beta_{1,3,max}$. \end{enumerate} And the constant $\beta_{1,k,\max}$ for $k = 1, 2, 3$ are summarized in Table \ref{tab0}. \end{thm} \begin{table}[h] \caption{\label{tab0} $\beta_{1,k,\max}$ in Theorem \ref{thm2} for $k=1,\,2,\,3$.} \bigskip \centering \begin{tabular}{cccc} \hline k & 1 & 2 & 3 \\\hline $\beta_{1,k,\max}$ & 2 & 1 & 1.243 \\\hline \end{tabular} \end{table} Moreover, \cite{christlieb2017kernel} showed that combining the semi-discrete scheme \eqref{eq:scheme_transport} with suitable spatial approximation to the integral \eqref{eq:I_LR}, the fully discrete scheme can be uncoditionally stable, even though the scheme is in MOL framework with explicit time discretization. Before going further, let us give a brief intuition for why this can be achieved. If we simply apply Forward Euler in time and the first difference in space (FTBS scheme) on linear advection equation $u_t+c u_x=0, c>0$, we have \begin{align} \label{eq:FTBS} \frac{u_j^{n+1}-u_j^n}{\Delta t} + c \frac{u_j^n-u_{j-1}^n}{\Delta x}=0, \end{align} where $\Delta t$ is the time step, $\Delta x$ is the spatial step and $u_j^n$ is the numerical approximation to $u(x_j,t^n)$. Figurer \ref{figadd2.1} and \ref{figadd2.2} are the stencils for this method when $c\Delta t< \Delta x$ and $c\Delta t >\Delta x$, respectively. The loss of stability in almost all explicit methods can be thought of as a lack of information to carry out the reconstruction, which is depicted in Figure \ref{figadd2.2} where the green dashed lines show the footprint of the stencil. However, different from the local method \eqref{eq:FTBS}, the kernel based approach, when combined with Forward Euler in time, is a ``global" method and has a stencil as depicted in Figurer \ref{figadd2.3}, where the green dashed lines indicate the spatial points used in the update. That is to say, for any size time step of the explicit method using the kernel based approximation to the derivative, the method has access to sufficient information. With a few careful choices, this is validated in the analysis latter part of this paper and in our previous work. \begin{figure}[h] \centering \subfigure[FTBS, $c\Delta t<\Delta x$] {\label{figadd2.1} \includegraphics[width=.32\textwidth]{figure/Fig_a_unstable.jpg}} \subfigure[FTBS, $c\Delta t>\Delta x$] {\label{figadd2.2} \includegraphics[width=.32\textwidth]{figure/Fig_b_unstable.jpg}} \subfigure[Kernal based mathod.]{\label{figadd2.3} \includegraphics[width=.32\textwidth]{figure/con_derivative_stencie_fig_c.jpg}} \caption{Stencil used for the linear advection equation $u_t+c u_x=0$, $c>0$, with Euler forward in time.} \label{figadd2} \end{figure} Thanks to the well designed scheme for the transport part, in the following parts, we will focus on the function \eqref{eq:equation} with diffusion term only, that is \begin{align} \label{eq:equation2} \partial_t u(\mathbf{x},t) = \nabla \cdot \left( A(u, \textbf{x}, t) \nabla u\right). \end{align} Consequently, the system \eqref{eq:system} in one dimension turns to \begin{align} \label{eq:system2} \left\{\begin{array}{l} u_t = \partial_{x} \left( A(u, x, t) w \right) ,\\ w = \partial_{x} u. \\ \end{array}\right. \end{align} \subsection{Insufficiency of the original method} Considering the 1D system \eqref{eq:system2}, it is straightforward that we can use the partial sums \eqref{eq:partial_sum} to approach $\partial_x$. For instance, \begin{equation} \label{eq:newmth1} \begin{aligned} & (A w)_x \approx \alpha \sum\limits_{p=1}^{2k}\mathcal{D}_L^p[Aw,\alpha] =:\mathcal{H}^k_1[u,A,\alpha], \\ & w=u_{x} \approx -\alpha\sum\limits_{q=1}^{2k}\mathcal{D}_R^q[u,\alpha]. \end{aligned} \end{equation} \noindent The operator $\mathcal{H}^k_1[u,A,\alpha]$ has a truncation error $\mathcal{O}(1/\alpha^{2k})$. Considering the linear function $u_t=A u_{xx}$ with $A>0$, the scheme that employs \eqref{eq:newmth1} and $k$-th order SSP RK method can be proved to be A-stable, if we take $\alpha=\sqrt{\beta/(A\Delta t)}$ and $0<\beta\leq \beta_{k}$. However, we found that the A-stable interval $(0, \beta_{k})$ was pretty narrow, e.g., $\beta_{3}=2/9$. As a consequence, schemes general large error $1/\alpha^{2k} = (A\Delta t / \beta)^k \geq (A\Delta t/\beta_k)^k$. Besides that, the schemes show another disadvantage. As an example, we look at a special case that $u=\sin x$, $A(u,x)=1$ and the interval $[a,b]=[0,2\pi]$. Then approximation \eqref{eq:newmth1} would be $$\mathcal{H}^k_1[u,A,\alpha](x) = - \left( \alpha \sum\limits_{p=1}^{2k} \mathcal{D}_L^p \right) \star \left( \alpha\sum\limits_{q=1}^{2k}\mathcal{D}_R^q\right)[\sin x, \alpha]. $$ In Figure \ref{figerr1}, we plot the error $\Vert (\sin x)_{xx} - \mathcal{H}^k_1[\sin x,1,\alpha] \Vert_\infty$ for $k=1,2,3$. It is observed that the error is not a monotone decreasing function of $\alpha$, indicating that the scheme cannot converge uniformly. Consequently, refining meshes, or increasing $\alpha$ equivalently, could result in larger error. Furthermore, changing the function to $u=\sin(2x)$, the error lines in Figure \ref{figerr1ex} tell us that the monotone decrasing interval of each scheme would change at the same time. This means for each scheme we can not find a uniform monotone interval for all smooth functions. {\color{red}} \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/err1k1-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/err1k2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/err1k3-eps-converted-to.pdf}} \caption{$\Vert (\sin x)_{xx}-\mathcal{H}^k_1[\sin x,1,\alpha] \Vert_\infty$, with $\mathcal{H}^k_1$ given in \eqref{eq:newmth1}.} \label{figerr1} \end{figure} \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/err1k1ex-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/err1k2ex-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/err1k3ex-eps-converted-to.pdf}} \caption{$\Vert (\sin 2x)_{xx}-\mathcal{H}^k_1[\sin 2x,1,\alpha] \Vert_\infty$, with $\mathcal{H}^k_1$ given in \eqref{eq:newmth1}.} \label{figerr1ex} \end{figure} Alternatively, it is naturally to use the average $\frac{1}{2} \alpha \sum\limits_{p=1}^{2k} (\mathcal{D}_L^p-\mathcal{D}_R^p)$ to approach $\partial_x$ in \eqref{eq:system2}, that is \begin{equation} \label{eq:method2} \begin{aligned} & (A w)_x \approx \frac{\alpha}{2} \sum\limits_{p=1}^{2k} \left( \mathcal{D}_L^p[Aw,\alpha] -\mathcal{D}_R^p[Aw,\alpha] \right) =:\mathcal{H}^k_2[u,A,\alpha] \\ & w=u_{x} \approx \frac{\alpha}{2} \sum\limits_{q=1}^{2k}\left( \mathcal{D}_L^q[u,\alpha] - \mathcal{D}_R^q[u,\alpha] \right). \end{aligned} \end{equation} The scheme has a truncation error $\mathcal{O}(1/\alpha^{2k})$ and the same problem as scheme \eqref{eq:newmth1}, learning from Figure \ref{figerr2} with $$\mathcal{H}^k_2[ \sin x,1,\alpha](x) = \left(\frac{\alpha}{2} \sum\limits_{p=1}^{2k} \left( \mathcal{D}_L^p -\mathcal{D}_R^p \right)\right) \star \left(\frac{\alpha}{2} \sum\limits_{q=1}^{2k}\left( \mathcal{D}_L^q - \mathcal{D}_R^q \right)\right)[\sin x, \alpha]. $$ \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/err2k1-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/err2k2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/err2k3-eps-converted-to.pdf}} \caption{$\Vert (\sin x)_{xx}-\mathcal{H}^k_2[\sin x,1,\alpha] \Vert_\infty$, with $\mathcal{H}^k_2$ given in \eqref{eq:method2}.} \label{figerr2} \end{figure} \begin{figure}[htb] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/err2k1ex-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/err2k2ex-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/err2k3ex-eps-converted-to.pdf}} \caption{$\Vert (\sin 2x)_{xx}-\mathcal{H}^k_2[\sin 2x,1,\alpha] \Vert_\infty$, with $\mathcal{H}^k_2$ given in \eqref{eq:method2}.} \label{figerr2ex} \end{figure} \section{Numerical Results} In this section, we show the results of our numerical experiments for the schemes to demonstrate their efficiency and efficacy. We take the time step as \begin{align*} \Delta t=\text{CFL} \cdot \Delta x, \end{align*} for one-dimensional problems, and \begin{align*} \Delta t= \text{CFL} \cdot \min(\Delta x, \Delta y). \end{align*} for two-dimensional problems. Note that time step $\Delta t$ is chosen in a form similar to a standard MOL type method. It will enable us to conveniently test accuracy and compare the scheme with other methods. We remark that the CFL number can be chosen arbitrarily large due to the unconditional stability. Becasue all solutions are smooth here, the six points quadrature formula \eqref{eq:quar} without WENO is used to compute $J^{L}_{i}$ and $J^{R}_{i}$. And we always choose $\beta=\beta_{k,\max}$ for each scheme in numerical simulations. \begin{exa}\label{ex1} Firstly, we consider the one-dimensional heat equation \begin{align} \left\{ \begin{array}{ll} u_t=u_{xx}, \quad 0\leq x\leq 2\pi, \\ u(x,0)=\sin x, \end{array} \right. \end{align} with the $2\pi$-periodic boundary condition. This problem has the exact solution is $u(x,t)=e^{-t}\sin x$. Here, we want to compare the efficiency of the new proposed scheme (denoted as ``new") and the original scheme \eqref{eq:uxx_old} in \cite{christlieb2017kernel} (denoted as ``old"), that is \begin{align} \label{equxxold} u_{xx} \approx -\alpha^2 \sum_{p=0}^{k} \mathcal{D}_{0}^{p}[u,\alpha], \quad \text{with} \quad \alpha=\sqrt{\beta_{old,k}/(c\Delta t)}. \end{align} $\beta_{k,max}$ for the ``new'' scheme are taken from Table \ref{tab1}, while those of the ``old'' scheme are given in Table \ref{tabold}. In Figure \ref{fig1D}, we plot the CPU cost versus $L_{\infty}$ errors at time $T=1$, and provide such a comparison for $k=1, 2, 3$. $CFL=1$ is used for all schemes. It is obvious that to achieve the same error, the new scheme always cost less CPU time, which indicates the efficient of our new method. This is caused by the larger $\beta$ used in the proposed scheme. \begin{table}[htb] \caption{\label{tabold} $\beta_{old,k,max}$ in \eqref{equxxold} for $k=1,2,3$} \bigskip \centering \begin{tabular}{|c|c|c|c|}\hline $k$ & 1 & 2 & 3 \\\hline $\beta_{old,k,max}$ & 2 & 1 & 0.8375 \\\hline \end{tabular} \end{table} \begin{figure}[htbp] \centering \subfigure[$k=1$]{\includegraphics[width=.32\textwidth]{figure/1dk1-eps-converted-to.pdf}} \subfigure[$k=2$]{\includegraphics[width=.32\textwidth]{figure/1dk2-eps-converted-to.pdf}} \subfigure[$k=3$]{\includegraphics[width=.32\textwidth]{figure/1dk3-eps-converted-to.pdf}} \caption{Example \ref{ex1}: Comparison of CPU time against $L_\infty$ error for one-dimensional heat equation between our scheme and the scheme in \cite{christlieb2017kernel}.} \label{fig1D} \end{figure} \end{exa} \begin{exa}\label{ex2} Then we consider the parabolic equation with the $2\pi$-periodic boundary condition, \begin{align} \left\{\begin{array}{l} u_t=(uu_x)_x-u_x+u-1-0.25\cos(2x-2t),\quad 0\leq x\leq 2\pi\\ u(x,0)=1+0.5\sin x.\\ \end{array}\right. \end{align} And the exact solution is $u(x,t)=1+0.5\sin(x-t)$. In Table \ref{tabexm2}, we list the errors of schemes and the associated orders of accuracy at $T=1$, with $k=1, 2, 3$. Three CFLs including 0.5, 1 and 2 are used to demonstrate the performance. It is observed that the scheme can achieve the designed order. In particular, the scheme allows for large CFL numbers due to its unconditionally stability. \begin{table}[htbp] \caption{Example 2: $L_\infty$ errors and orders of accuracy at $T=1$} \centering \bigskip \label{tabexm2} \begin{tabular}{|c|c|cc|cc|cc|} \hline \multirow{2}*{CFL}&\multirow{2}*{$N_x$}&\multicolumn{2}{c|}{$k=1$}&\multicolumn{2}{c|}{$k=2$}&\multicolumn{2}{c|}{$k=3$}\\ \cline{3-8} ~&~&error&order&error&order&error&order\\\hline \multirow{6}*{0.5}&20 & 0.76E-01& -& 0.40E-01& -& 0.77E-02& -\\\cline{2-8} ~& 40 & 0.38E-01& 0.99& 0.13E-01& 1.63& 0.21E-02& 1.90\\\cline{2-8} ~& 80 & 0.19E-01& 1.00& 0.37E-02& 1.80& 0.43E-03& 2.29\\\cline{2-8} ~& 160 & 0.95E-02& 1.00& 0.10E-02& 1.84& 0.72E-04& 2.56\\\cline{2-8} ~& 320 & 0.47E-02& 1.00& 0.27E-03& 1.93& 0.10E-04& 2.79\\\cline{2-8} ~& 640 & 0.24E-02& 1.00& 0.70E-04& 1.96& 0.14E-05& 2.89\\\hline \multirow{6}*{1}&20& 0.14E+00&-& 0.95E-01&-& 0.30E-01& -\\\cline{2-8} ~&40& 0.76E-01& 0.88& 0.40E-01& 1.25& 0.77E-02& 1.98\\\cline{2-8} ~&80& 0.38E-01& 0.98& 0.13E-01& 1.63& 0.21E-02& 1.89\\\cline{2-8} ~&160& 0.19E-01& 1.01& 0.37E-02& 1.80& 0.43E-03& 2.29\\\cline{2-8} ~&320& 0.95E-02& 1.00& 0.10E-02& 1.84& 0.72E-04& 2.56\\\cline{2-8} ~&640& 0.47E-02& 1.00& 0.27E-03& 1.93& 0.10E-04& 2.79\\\hline \multirow{5}*{2}&40& 0.14E+00& - & 0.97E-01& - & 0.30E-01& - \\\cline{2-8} ~&80& 0.76E-01& 0.88& 0.40E-01& 1.28& 0.78E-02& 1.97\\\cline{2-8} ~&160& 0.38E-01& 0.98& 0.13E-01& 1.63& 0.21E-02& 1.89\\\cline{2-8} ~&320& 0.19E-01& 1.01& 0.37E-02& 1.80& 0.43E-03& 2.30\\\cline{2-8} ~&640& 0.95E-02& 1.00& 0.10E-02& 1.84& 0.72E-04& 2.56\\\hline \end{tabular} \end{table} \end{exa} \begin{comment} \vspace{0.5cm} \begin{exa}\label{ex3} We now compare the efficiency of old and new schemes for two-dimensional heat equation \begin{align} \left\{ \begin{array}{ll} u_t= u_{xx}+u_{yy}\quad (x,y)\in[0,2\pi]^2 ,\\ u(x,y,0) = \sin(x+y) \\ \end{array} \right. \end{align} with $2\pi$-periodic boundary conditions in each direction and the exact solution is $u(x,y,t)=e^{-t}\sin (x+y)$. Plots of the CPU cost versus errors are given in Figure \ref{fig2D}. We can see that the new scheme's efficiency is lower than the old one for 2D problem when the order is $k=1$ but higher when $k=2, 3$. {\color{red} why?} \end{exa} \end{comment} \begin{exa}\label{ex4} We use the following 2D nonlinear parabolic equation on $(x,y)\in[0,2\pi]^2$ \begin{align*} \left\{ \begin{array}{ll} u_t=(uu_x)_x+(uu_y)_y-uu_x-uu_y-u^2+f(x,y,t), \\ u(x,y,0)=1+0.5\sin(x+y), \\ \end{array} \right. \end{align*} with $$f(x,y,t)=1.125-0.625\cos(2x+2y-2t)+0.25\sin(2x+2y-2t)+0.5\cos(x+y-t)+2\sin(x+y-t).$$ The $2\pi$-periodic boundary is considered in each direction. It is easy to verify that $u(x,y,t)=1+0.5\sin(x+y-t)$ is the exact solution. We show the $L_{\infty}$ errors and the orders of accuracy with $k=3$ in Table \ref{tabexm4}. Again, the scheme can achieve the designed order of accuracy, even with pretty large time step. \end{exa} \begin{table}[htb] \caption{Example \ref{ex4}: $L_\infty$ errors and orders of $k=3$ at $T=1$} \centering \bigskip \label{tabexm4} \begin{tabular}{|c|cc|cc|cc|} \hline \multirow{2}*{$N_x \& N_y$} & \multicolumn{2}{c|}{$CFL=0.5$} & \multicolumn{2}{c|}{$CFL=1$} & \multicolumn{2}{c|}{$CFL=2$}\\ \cline{2-7} ~&error&order&error&order&error&order\\\hline 80 & 0.59E-02& -&0.47E-01& -&0.11E+00& -\\\hline 160 & 0.12E-03& 5.64&0.80E-03& 5.87&0.46E-01& 1.24\\\hline 320 & 0.17E-04& 2.83&0.12E-03& 2.77&0.80E-03& 5.84\\\hline 640 & 0.22E-05& 2.88&0.17E-04& 2.83&0.12E-03& 2.77\\\hline 1280 & 0.30E-06& 2.92&0.22E-05& 2.88&0.17E-04& 2.83\\\hline \end{tabular} \end{table} \vspace{0.5cm} \begin{exa}\label{ex5} \textbf{(Schnakenberg model)} In this example, we want to show that the scheme can also be used to solve system. The Schnakenberg system \cite{Andrew2015high} has been used to model the spatial distribution of a morphogen, which has the following form \begin{align} \left\{\begin{array}{l} \displaystyle\frac{\partial C_a}{\partial t}=D_1\nabla^2 C_a+\kappa(a-C_a+C_a^2 C_i),\\ \displaystyle\frac{\partial C_i}{\partial t}=D_2\nabla^2 C_i+\kappa(b-C_a^2 C_i). \end{array}\right. \end{align} Here, $C_a$ and $C_i$ represent the concentrations of activator and inhibitor, with $D_1$ and $D_2$ as the diffusion coefficients respectively. $\kappa$, $a$ and $b$ are rate constants of biochemical reactions. Following the setup in \cite{Andrew2015high}, we take the initial conditions as \begin{align*} C_a(x,y,0)&=a+b+10^{-3}e^{-100((x-\frac{1}{3})^2+(y-\frac{1}{2})^2)},\\ C_i(x,y,0)&=\frac{b}{(a+b)^2}. \end{align*} And the parameters are $$\kappa=100,\quad a = 0.1305, \quad b = 0.7695, \quad D_1 = 0.05, \quad \text{and} \quad D_2 = 1.$$ We test the problem with $k=3$ and $300\times 300$ grid points. $CFL=1$ is taken here. $C_a$ at different times are showed in Figure \ref{figsys}, which have the similar patterns as those in \cite{Andrew2015high}. \begin{figure}[htb] \centering \subfigure[$T=0.5$]{\includegraphics[width=.32\textwidth]{figure/syst05-eps-converted-to.pdf}} \subfigure[$T=1$]{\includegraphics[width=.32\textwidth]{figure/syst10-eps-converted-to.pdf}} \subfigure[$T=1.5$]{\includegraphics[width=.32\textwidth]{figure/syst15-eps-converted-to.pdf}} \caption{Example \ref{ex5}: $C_a$ figure at different time.} \label{figsys} \end{figure} \end{exa} \begin{exa} \label{ex6} Finally, we show the result for equation with cross derivative terms \begin{align*} \left\{\begin{array}{ll} u_t=u_{xx}+u_{yy}+u_{xy}, \quad (x,y) \in(0,2\pi)^2, \\ u(x,y,0)=\sin (x+y), \\ \end{array} \right. \end{align*} and exact solution is $u(x,y,t)=e^{-3t}\sin (x+y)$. $L_{\infty}$ errors and orders of accuracy with $k=3$ are showed in Table \ref{tabexm6}, indicating the high order of accuracy and the unconditionally stable property of our scheme. \begin{table}[htb] \caption{Example \ref{ex6}: $L_\infty$ errors and orders at $T=1$, with $k=3$ and $\beta=0.49$.} \centering \bigskip \label{tabexm6} \begin{tabular}{|c|cc|cc|cc|} \hline \multirow{2}*{$N_x\&N_y$}&\multicolumn{2}{c|}{$CFL=0.5$}&\multicolumn{2}{c|}{$CFL=1$}&\multicolumn{2}{c|}{$CFL=2$}\\ \cline{2-7} ~&error&order&error&order&error&order\\\hline 40 & 0.67E-03& -&0.29E-02& -&0.73E-02& -\\\hline 80 & 0.11E-03& 2.65&0.67E-03& 2.11&0.29E-02& 1.34\\\hline 160 & 0.16E-04& 2.76&0.11E-03& 2.65&0.67E-03& 2.11\\\hline 320 & 0.21E-05& 2.91&0.16E-04& 2.76&0.11E-03& 2.65\\\hline 640 & 0.27E-06& 2.95&0.21E-05& 2.91&0.16E-04& 2.76\\\hline 1280 & 0.34E-07& 2.98&0.27E-06& 2.95&0.21E-05& 2.91\\\hline \end{tabular} \end{table} \end{exa}
\section{Introduction} Oceanic refractive-index spectrum (ORIS) plays a key role in oceanic optics \cite{Hill78OSA, Hill2, Nikishov:2000,OK:2019}. Unlike the atmospheric spectrum governed by temperature and humidity \cite{Obukhov:1962, Hill78RC,Hill:78,Andrews:1992}, ORIS is a 2nd order statistical description affected by the fluctuations of temperature, salinity, and their co-operation \cite{Hill78OSA,Nikishov:2000, Leandri:2011}. ORIS is well-modified in many cases that based on H1 and H4 \cite{ Nikishov:2000,Yao:2017,Li:2019,Yi:2018}, but oceanic outer scale, as a potentially important parameter of ORIS, has not been discussed widely. Indeed, the outer scale is a narrow restriction of the range with energy injection \cite{Coulman:1988}, which is defined as the highest degree of anisotropy \cite{Toselli:2014}. And it affects the properties of light beam obviously, like low-frequency behavior \cite{Reinhardt:1972}, beam spread \cite{Yura:1973}, adaptive optics \cite{ V.V95,Ziad:2004}, scintillation index \cite{Andrews:1999,Yi:2012}, and angle of arrival fluctuations\cite{Cui:2014}. Moreover, the outer scale is directly measured by using the temperature structure function \cite{Clifford:1971}, and it is also directly obtained for water turbulence in laboratory conditions \cite{ MD:1997}. The recent works proposed that using back-reflected light can be considered as a new technique for estimation of atmospheric turbulence outer scale \cite{Kulikov:2019}. Compared with great significance of the outer scale in atmosphere optics, there are a few reports about oceanic optics \cite{Li:2019}. The outer scale has been introduced into H1-based oceanic spectra, which shows a lower beam wander \cite{Yue:2019}, and a lower off-axis scintillation index \cite{Li:2019} for Gaussian beams. However, as stated in Ref.\cite{Hill2}, H4-based spectra are more accurate than H1-based spectra in high wavenumbers. Motivated by this, an H4-based oceanic refractive-index spectrum was given, which shows a good precision for wide-range Prandtl/Schmidt number \cite{Yao:2019}. And an application of the spectrum in a bi-LIDAR system elucidated that the underwater optical turbulence degenerates the spectral density and the degree of coherence \cite{OK:2019bi}. Consequently, considering the significance of outer scale and the advantage of recently proposed H4-based spectrum, we introduce an outer-scale parameter into the H4-based spectrum, and use it to calculate the light propagation in ocean. This paper is arranged as follows. In section 2.1 we develop an outer-scaled oceanic spectrum based on the approximate H4-based spectrum; Section 2.2 gives the analytical expression of beam wander with the outer-scaled oceanic spectrum. Section 3 shows a further numerical calculation and discussion. Finally, Section 4 makes a summary. \section{Theory} Power spectrum of oceanic refractive-index fluctuations is generally given by a linear combination of temperature spectrum, salinity spectrum and their co-spectrum. Each of the spectra is based on H1 \cite{Nikishov:2000} or H4\cite{Yao:2019}. The H4-based ORIS can denote the complex oceanic environment affected by seasonal or extreme average temperature, salinity and/or other factors. In this section, we will introduce the outer scale into H4-based spectrum, and derive the beam wander based on it. \subsection{The modification of ORIS about outer scale} Generally, outer scale can be described in three forms\cite{V.Vouter:1995}: Exponential form, $\kappa^{-11 / 3}\left[1-\exp \left(-\kappa^{2} / \kappa_{0}^{2}\right)\right]$; von K\'arm\'an form, ${\left( {{\kappa ^2} + \kappa _0^2} \right)^{ - 11/6}}$; and Greenwood form, ${\left( {{\kappa ^2} + \kappa {\kappa _{0}}} \right)^{ - 11/6}}$, where $\kappa$ is spatial frequency, ${\kappa _0}$ includes the outer scale. Here we choose the exponential form for its mathematical simplicity and physical reasonability. The 3D oceanic spectrum ${\Phi _{n}}(\kappa )$ is given by \cite{Yao:2019}: \begin{align} \label{eq1} {\Phi _{n}}(\kappa ) = {A^2}{\Phi _{\rm{T}}}(\kappa ) + {B^2}{\Phi _{\rm{S}}}(\kappa ) - 2AB{\Phi _{{\rm{TS}}}}(\kappa ), \end{align} where $A$ is the thermal expansion coefficient; $B$ is saline contraction coefficient, and we express the three spectra on the right of Eq.(1) with outer-scaled H4-based model: \begin{align} \label{eq2} \nonumber {\Phi _i}(\kappa ) =& \frac{1}{{4\pi }}\beta {\varepsilon ^{ - \frac{1}{3}}}{\kappa ^{{\rm{ - 11/3}}}}\left[{{\rm{1 - exp( - }}\frac{{{\kappa ^2}}}{{\kappa _0^2}}{\rm{)}}} \right]{\chi _i}{g_i}\left( {\kappa \eta } \right),\\ \quad & i \in \{ {\rm{T}},{\rm{S}},{\rm{TS}}\} , \end{align} with \begin{align} \label{eq3} \nonumber {g_i}\left( {\kappa \eta } \right) =& \left[ {1 + 21.61{{(\kappa \eta )}^{0.61}}c_i^{0.02} - 18.18{{(\kappa \eta )}^{0.55}}c_i^{0.04}} \right]{\rm{ }} \\ &\times \exp \left[ { - 174.90{{(\kappa \eta )}^2}c_i^{0.96}} \right]{\rm{ }},\\ {c_i} = {0.07}&{2^{4/3}}\beta Pr_i^{ - 1},\\ \kappa_0 = \frac{C_0}{L_0}, \end{align} where $\beta = 0.72 $ is the Obukhov–Corrsin constant; $\varepsilon $ is the dissipation rate of turbulent kinetic energy pur unit mass of fluid , which varies in the range of $[{10^{ - 10}},{10^{ - 4}}]$ $\rm{m^2}{s^{-3}}$; $\eta $ is the Kolmogorov microscale length that varies in the range of $[{10^{ - 4}},{10^{ - 2}}]$ $\rm{m}$; $\chi _i$ is the ensemble-averaged variance dissipation rate; $P{r_{\rm{S}}} , P{r_{\rm{TS}}} $ are the temperature Prandtl number and salinity Schmidt number, respectively; the temperature-salinity Prandtl-Schmidt number $P{r_{{\rm{TS}}}} = 2P{r_{\rm{T}}}P{r_{\rm{S}}}{\left( {P{r_{\rm{T}}} + P{r_{\rm{S}}}} \right)^{ - 1}}$; $L_0$ is the outer scale; ${C_0} \in [2\pi ,8\pi ]$ is the scaling constant, its value depends on the application, and we choose ${C_0} = 4\pi$ here. \subsection{Theoretical derivation of beam wander} According to the outer-scaled H4-based ORIS given in the last section, we derive the beam wander as follows. Beam wander of Gaussian beam is generally expressed as \cite{BOOK1}: \begin{align} \label{eq4} \nonumber \left\langle {r_c^2} \right\rangle = &\frac{4{\pi ^2}{k^2}{W^2}L}{{n}_{0}^{2}}\int_0^1 {\int_0^\infty \kappa } {{\Phi_n}(\kappa )}{H_{\rm{LS}}}(\kappa ,\xi ) \\ & \times \left[ {1 - \exp \left( { - \Lambda L{\kappa ^2}{\xi ^2}/k} \right)} \right]{\rm{d}}\xi {\rm{d}}\kappa, \end{align} where $k = 2\pi {n_0}/\lambda $ is wavenumber, which contains refractive index of seawater ${n_0}$ and incident wavelength $\lambda$; Beam radius, $W = {W_0}\sqrt {\Theta _0^2 + \Lambda _0^2} $, is associated with the waist of input Gaussian beam ${W_0}$, ${\Theta _0} = 1 - {\bar \Theta _0}$ is the beam curvature parameter at the input plane, ${\bar \Theta _0}$ is the complementary parameter; $\Lambda = 2L/(k{W^2})$ and ${\Lambda _0} = 2L/(k{W_0}^2)$ are respectively the Fresnel ratio of beam at the receiver and transmitter; $\xi = 1 - z/L$ is normalized wide-range that carries transmission distance information $L$ and $z$; ${H_{\rm{LS}}}(\kappa ,\xi )$ is the Gaussian filter function. To capture the influence of outer scale, let filter function hold the components of beam wander, which is generally given by \cite{BOOK1}: \begin{align} \label{eq5} {H_{\rm{LS}}}(\kappa ,\xi ) = \exp \left\{ { - {\kappa ^2}W_0^2\left[ {{{\left( {{\Theta _0} + {{\bar \Theta }_0}\xi } \right)}^2} + \Lambda _0^2{{(1 - \xi )}^2}} \right]} \right\}. \end{align} The diffraction effects and small-scale effects are neglected \cite{BOOK1}, so we drop the last term and consider the following approximation \begin{align} \label{eq6} 1 - \exp \left( { - \Lambda L{\kappa ^2}{\xi ^2}/k} \right) \approx \Lambda L{\kappa ^2}{\xi ^2}/k,\quad L{\kappa ^2}/k \ll 1. \end{align} In cooperating with Eqs.(\ref{eq4}) -(\ref{eq6}), we have \begin{align} \label{eq7} \left\langle {r_c^2} \right\rangle = \frac{8{\pi ^2}{L^3}}{{n}_{0}^{2}}\int_0^1 {\int_0^\infty {{\kappa ^3}} {\xi ^2}} {{\Phi_n}(\kappa )}\exp \left[ { - {\kappa ^2}W_0^2{{({\Theta _0} + {{\bar \Theta }_0}\xi )}^2}} \right]{\rm{d}}\xi {\rm{ d}}\kappa, \end{align} where ${\Theta _0} \ge 0$ implies the collimated, focused and divergent beam cases of optical transmission respectively. Here, we adopt the outer-scaled H4-based ORIS in Eq.(\ref{eq2}) and substitute it into Eq.(7), \begin{align} \label{eq8} \left\langle {r_c^2} \right\rangle = \frac{2 \pi {L^3}\beta {\varepsilon ^{ - \frac {1} {3}}}{A^2}{\chi _{\rm{T}}}}{{n}_{0}^{2}}\sum\limits_{} {{Y_{i,j}}}. \end{align} and \begin{align} \label{eq9} \nonumber {Y_{i,j}} = &\int_0^1 {\int_0^\infty {{\kappa ^{{d_{i,j}} - \frac {2} {3}}}} \left[ {{\rm{1 - exp( - }}\frac{{{\kappa ^2}}}{{\kappa _0^2}}{\rm{)}}} \right]{\xi ^2}} {b_{i,j}} \\ &\exp \left[ { - {\kappa ^2}({a_{i,j}} + W_0^2{{({\Theta _0} + {{\bar \Theta }_0}\xi )}^2})} \right]{\rm{d}}\xi {\rm{ d}}\kappa. \end{align} It can be obtained directly from the Eq.(\ref{eq8}) where the beam wander is proportional to ${\varepsilon ^{ - \frac {1} {3}}}$ and $\chi _{\rm{T}}$. ${Y_{i,j}}$ is a third-order matrix with three submatrixes ${a_{i,j}}$,${b_{i,j}}$ and ${d_{i, j}}$. \begin{flushleft} Further, for the case of a collimated beam ( $\Theta_{0}=1$), \end{flushleft} \newpage \begin{strip} \begin{align} \label{eq10} \nonumber{Y_{i,j}} &= \int_0^1 {\int_0^\infty {{\kappa ^{d_{i,j} - \frac {2} {3}}}} \left[ {{\rm{1 - exp( - }}\frac{{{\kappa ^2}}}{{\kappa _0^2}}{\rm{)}}} \right]{\xi ^2}} b_{i,j}\exp \left[ { - {\kappa ^2}(a_{i,j} + W_0^2)} \right]{\rm{d}}\xi {\rm{ d}}\kappa\\ &=\frac{1}{6}\left[ {\frac{1}{{{{\left( {{a_{{i,j}}} + W_0 } \right)}^{\frac{1}{6} + \frac{{{d_{{{i,j}}}}}}{2}}}}}{-}\frac{1}{{{{\left( {{a_{{i,j}}} + W_0 + {\kappa_{0} ^{ - 2}}} \right)}^{\frac{1}{6} + \frac{{{d_{{i,j}}}}}{2}}}}}} \right]{b_{{i,j}}}\Gamma \left[ {\frac{1}{6} + \frac{{{d_{{i,j}}}}}{2}} \right]. \end{align} \end{strip} \begin{strip} \begin{align} \label{eq11} \left\{ {{a_{i,j}}} \right\} = 174.9{\eta ^2}\left[ {\begin{array}{*{20}{c}} {c_{\rm{T}}^{0.96}}&{c_{\rm{T}}^{0.96}}&{c_{\rm{T}}^{0.96}}\\ {c_{\rm{S}}^{0.96}}&{c_{\rm{S}}^{0.96}}&{c_{\rm{S}}^{0.96}}\\ {c_{\rm{TS}}^{0.96}}&{c_{\rm{TS}}^{0.96}}&{c_{\rm{TS}}^{0.96}} \end{array}} \right], \left\{ {{d_{i,j}}} \right\} = \left[ {\begin{array}{*{20}{c}} {\rm{0}}&{0.61}&{0.55}\\ {\rm{0}}&{0.61}&{0.55}\\ {\rm{0}}&{0.61}&{0.55} \end{array}} \right] \end{align} \begin{align} \label{eq12} \left\{b_{i, j}\right\} = A^{2} \chi_{\rm{T}} \left[ \begin{array}{ccc}{1} & {21.61 \eta^{0.61} c_{\rm{T}}^{0.02}} & {-18.18 \eta^{0.55} c_{\rm{T}}^{0.04}} \\ {\frac{1}{\omega^{2}} d r} & {21.61 \eta^{0.61} c_{\rm{S}}^{0.02} \frac{1}{\omega^{2}} d r} & {-18.18 \eta^{0.55} c_{\rm{S}}^{0.04} \frac{1}{\omega^{2}} d r} \\ {-\frac{1}{\omega}(1+d r)} & {-21.61 \eta^{0.61} c_{\rm{TS}}^{0.02} \frac{1}{\omega}(1+d r) }& {18.18 \eta^{0.55} c_{\rm{TS}}^{0.04} \frac{1}{\omega}(1+d r)}\end{array}\right]; \end{align} \end{strip} \noindent where, $\omega \in \left[ {{\rm{ - 5}}\left. ,{\rm{0}} \right]} \right.$ is the dominant ratio of temperature and salinity. On substituting from Eqs.(\ref{eq9})-(\ref{eq12}) into Eq.(\ref{eq8}), beam wander contains a complex dependence of $\omega $, $L_{0}$ and $c_{i}$. Besides, $\chi _{\rm{T}}$, $\chi_{\rm{S}}$ and $\chi _{\rm{TS}}$ follow the expressions \cite{Elamassie:17}: \begin{align} \label{eq13} {\chi _{\rm{S}}} = \frac{{{A^2}}}{{{\omega ^2}{B^2}}}{\chi _{\rm{T}}}{d_r},\quad {\chi _{\rm{TS}}} = \frac{A}{{2\omega B}}{\chi _{\rm{T}}}\left( {1 + {d_r}} \right). \end{align} and \begin{align} \label{eq14} {d_r} \approx \left\{ {\begin{array}{*{20}{l}} {|\omega {|} + \sqrt{|\omega {|}{{(|\omega | - 1)}}},}&{|\omega | \ge 1}\\ {1.85|\omega | - 0.85,}&{0.5 \le |\omega | < 1}\\ {0.15|\omega |,}&{|\omega | < 0.5} \end{array}} \right., Pr \in [3,3000]. \end{align} From the mentioned above, a outer-scaled ORIS has been given. We apply it for the transmission of laser beam, especially, an analytical expression of beam wander is derived. Now then, it will be made a discussion about its factors. \section{Numerical results and analyses } In this section, by using the proposed outer-scaled ORIS Eq.(\ref{eq2}) and expression of beam wander in Eq.(\ref{eq9}), we compare and discuss the beam wander and its proportions influencedc by temperature, salinity and their coupling term. In what follows, we set ${n_0} = 1.34$, $ A = 2.56 \times {10^{ - 4}}{\deg ^{ - 1}}{\rm{l}}$, $\chi _{\rm{T}} = {10^{ - 5}}{\rm{K}^2}{\rm{s}^{ - 1}}$, $\varepsilon = 1 \times {10^{ - 2}}{\rm{m}^2}{\rm{s}^{ - 3}}$, $L = 15\rm{m}$, ${W_0} = 0.1\rm{m}$. With the varying of $\langle T\rangle$, we will achieve the different $P{r_{\rm{T}}}$, $P{r_{\rm{S}}}$ and ${\eta }$ in the table 3 \cite{Yao:2019}. In Fig.\ref{fig1} we illustrate the influence of outer scale on beam wander when $\langle T\rangle =15^{\circ} \rm C$. As the outer scale increases, beam wander gradually increases, but the extent of impact gradually slows down. Apparently, $\left\langle {r_c^2} \right\rangle_{\omega=-0.25} \geq \left\langle {r_c^2} \right\rangle_{\omega=-2.5} \geq \left\langle {r_c^2} \right\rangle_{\omega=-0.5}$, there is a nonlinear relationship between $\omega$ and beam wander. We present details of such a nonlinear relationship in Fig.\ref{fig2}. There are three regions: $\omega \in[-5, -1]$ , $[-1, -0.5]$ and $[-0.5, 0]$. In first region, the curve increases slowly, then decreases near $\omega = -1$; But in second region, it remains stable, then begins to fall near $\omega = -0.5$; Since then, the curve rises rapidly, and the influence of outer scale converge gradually.. As can be seen from Eq.(\ref{eq14}) , the 'jump phenomenon' mainly comes from the modulation of $d_{r}$ given by $\omega $. Figure \ref{fig3} shows the influence of $\langle T\rangle$ and $L_{0}$ on beam wander. The beam wander influenced by outer scale $L _{0}$ is stronger than that influenced by average temperature, although we set $L _{0}$ varying from $10 \rm m$ to $100 \rm m$, and $\langle T\rangle$ ranging from $0^{\circ} \rm C$ to $30^{\circ} \rm C$. From a physical aspect, we can understand it as that the outer scale affects the low frequency inertial region of power spectrum more seriously than average temperature. In addition, it can be seen from Eq.(\ref{eq1}) and Eq.(\ref{eq7}) that the beam wander consists of temperature, salinity, and coupling terms. The proportions of the three parts varying with $\omega$ are illustrated in Fig.\ref{fig4}(a)(b)(c)(d) for further discussion, and we vary the value of $\langle T\rangle$ and $L_{0}$. The proportion caused by the coupling term is beyond the others. It is a slow drop in the first region; For the second region, it remains at the same level; In the third region, a considerable increase occurs. This can be interpreted as modulating of the $\chi _i$ in Eq.(\ref{eq13}) due to the relation between $\omega$ and $d_r$, results in the larger proportion of the coupling term. And there are almost no changes by relative change between temperature and outer scale, i.e. the difference in outer scale and temperature doesn't affect the proportion of beam wander caused by individual terms to the total beam wander obviously. From the view of proportion caused by individual terms, the proportion of temperature term is decreasing slowly, slowly rising, and sharply falling in the three regions, respectively. Although the proportion of salinity term accounts for a relative small part, its trend is more complex than others. For the first region,it slowly rises, then falls a little. In the second region,it rises first, then falls sharply. In the third region, it rises slowly again. Particularly, The first region can be considered as the temperature dominated, and the effect of salinity is not very obvious. In the second region, the proportion of temperature term rises, the proportion of salinity term decreases, so the proportion of coupling term is caused to decrease slowly. In the third region, the proportion of temperature term drops sharply, and the proportion of salinity term rises slowly, but their contributions makes the proportion of coupling term rise sharply. So we should pay more attention to the change of salinity. \begin{figure} \centering \includegraphics[width = 0.35\textwidth]{fg1.eps} \caption{$\langle T\rangle = 15^{\circ} \rm C$, Beam wander versus $ L_0$ with various $\omega$.} \label{fig1} \end{figure} \begin{figure} \centering \includegraphics[width = 0.35\textwidth]{fg2.eps} \caption{$\langle T\rangle = 15^{\circ} \rm C$, Beam wander versus $\omega$ with various $ L_0$.} \label{fig2} \end{figure} \begin{figure} \centering \includegraphics[width = 0.35\textwidth]{fg3.eps} \caption{Beam wander versus $\omega$ with various $L_0$ and various $\langle T\rangle$. (a) is local enlarged drawing when ${L_0} = 100\rm{m}$, (b) is local enlarged drawing when ${L_0} = 10\rm{m}$.} \label{fig3} \end{figure} \begin{figure*} \centering \subfigure { \includegraphics[width = 0.35\textwidth]{OMG_P_1.eps} \label{a}} \subfigure { \includegraphics[width = 0.35\textwidth]{OMG_P_11.eps} \label{b}} \subfigure { \includegraphics[width = 0.35\textwidth]{OMG_P_2.eps} \label{c}} \subfigure { \includegraphics[width =0.35\textwidth]{OMG_P_22.eps} \label{d}} \caption{Proportion of the beam wander caused by the temperature term, salinity term and the coupling term, for several different values of $T$ and ${L_0}$: (a) $\langle T\rangle = 0^{\circ} \rm C$, ${L_0} = 10 \rm{m}$, (b) $\langle T\rangle = 30^{\circ} \rm C$, ${L_0} = 10\rm{m}$, (c) $\langle T\rangle = 0^{\circ} \rm C$, ${L_0} = 100\rm{m}$, (d) $\langle T\rangle = 30^{\circ} \rm C$, ${L_0} = 100\rm{m}$.} \label{fig4} \end{figure*} \section{Conclusion} In conclusion, outer scale is introduced into the H4-based oceanic refractive-index spectrum, which describes the boundary effect in low frequency region. Through the outer-scaled H4-based spectrum, we derived the analytical expression of beam wander and plotted the numerical curves of the beam wander varying with several parameters. Similar with previous report \cite{Yang:2017}, the beam wander rises rapidly with increased outer scale at beginning and then tends to be flat. When the salinity prevails, the influence of average temperature and outer scale will converge gradually. We also find that the beam wander varied with contributed by outer scale is lager than that varied with averaged temperature. Moreover, for the influence proportion on beam wander, temperature-salinity coupling term is the largest part. Although influence of salinity fluctuation on beam wander is relatively small, its trend is more complex obviously. Overall, The choice of appropriate outer scale influences the information of oceanic optics significantly such as beam wander in communication, detection and sensing. It is an important extension with the present theoretical significance of outer scale, but of course the experiments in future could extend into parameter regions dependent on outer scale. we look forward to offering a realistic means to measure results of the fascinating ocean. \bibliographystyle{unsrt}
\section{Introduction} Prospects of quantum information technologies have motivated an intense search for systems which intertwine topology and electronic correlations \cite{FQHE_82,qi_topological_2011,sato_topo_SC_review_2017,Rachel_2018}. Strongly interacting and spin-orbit coupled electrons on the honeycomb lattice, as theoretically described by the Kane-Mele-Hubbard model \cite{hohenadler_correlation_2013}, feature quantum spin Hall (QSH), Mott-Hubbard, collective magnetic and chiral superconducting states. While several weakly interacting QSH systems are now well-studied experimentally \cite{qi_topological_2011,wehling_dirac_2014}, material realizations of honeycomb Kane-Mele-Hubbard fermions with strong correlations and spin-orbit coupling are rare \cite{marrazzo_prediction_2018, wu_unconventional_2019}. Here, we introduce a new 'van der Waals engineering' platform to serve this purpose. We show that stacking of 1T-TaSe$_2$ into bilayers can deconfine electrons from a deep Mott insulating state realized in the monolayer to a system of correlated Dirac fermions subject to sizable spin-orbit coupling. Central to this transition is the possibility of van der Waals materials to stack in different configurations. For a specific honeycomb arrangement (Fig. \ref{fig1:structures}), the kinetic energy associated with the electronic hopping $t$ turns out to be of the same order of magnitude as the effective local Coulomb repulsion $U$. The system features therefore electronic correlations, which turn out to put the system right on the verge between QSH and correlated antiferromagnetic insulating states at charge neutrality and support chiral superconductivity under doping. We finally demonstrate that tuning the system via electric fields and twisting of the layers relative to each other sensitively affects the low-energy electronic structure in terms of emerging Dirac mass and spin-orbit coupling terms and leads to completely unexplored regimes of correlated electrons. \begin{figure*}[h] \includegraphics[width=0.85\textwidth]{fig1_structures.pdf} \caption{\textbf{Crystal structures of 1T-TaSe$_2$ mono- and bilayers in the CCDW phase.} \textbf{a}, Monolayer 1T-TaSe$_2$ in the CCDW phase. Only Ta atoms are shown. The Ta atoms are distorted into a SoD pattern, where the central Ta atoms (red) are surrounded by two rings of in total twelve Ta atoms (black). The SoDs are marked with red lines as guide to the eyes. \textbf{b}, Top and three-dimensional side view of honeycomb stacked CCDW 1T-TaSe$_2$ bilayer. Only the Ta atoms in the SoD centers are shown, with blue spheres and shaded regions marking the bottom layer atoms, and red spheres and shaded regions for the top layer. The inset illustrates the leading terms of the effective low-energy Hamiltonian, i.e. the nearest-neighbor hopping $t=-34$~meV and the local interaction $U\approx 130$~meV. \textbf{c}, Side view of 1T-TaSe$_2$ bilayers embedded in field effect transistor structures for the application of vertical electric fields. A non-twisted and a 180$^\circ$ twisted bilayer are shown with Ta atoms (red and blue) and Se atoms (yellow). } \label{fig1:structures}% \end{figure*} \section{Results and Discussion} \subsection{From a correlated insulator to emergent Dirac fermions} Layered group-V transition metal dichalcogenides (TMDCs) such as 1T-TaSe$_2$ or 1T-TaS$_2$ feature a low-temperature commensurate charge density wave (CCDW) where Ta-atoms are displaced into Star-of-David (SoD) patterns (Fig. \ref{fig1:structures}a) \cite{wilson_charge-density_1975, rossnagel_origin_2011}. In this phase, the SoDs form a triangular $\sqrt{13}\times\sqrt{13}$ superlattice in every layer and host correlated electrons: 1T-TaS$_2$ shows a metal-to-insulator transition when entering the CCDW phase \cite{rossnagel_origin_2011}. In 1T-TaSe$_2$, the bulk remains conductive till lowest temperatures, while the surface exhibits a Mott transition around 250~K \cite{perfetti_spectroscopic_2003,colonna_mott_2005}. Recently, 1T-TaSe$_2$ has been fabricated down to monolayer thickness \cite{nakata_selective_2018,borner_observation_2018,chen2019visualizing} and a pronounced thickness dependence of the electronic structure has been reported \cite{chen2019visualizing}. As bonds between the layers are mainly of van der Waals type, different stacking configurations are observed in experiments \cite{Rosenauer_TEM_2018, Kourkoutis_TEM_2016} and have a strong impact on the electronic structure \cite{freericks_pruschke_2009,marianetti_2014,ritschel_stacking-driven_2018}. We compare the CCDW state in the monolayer to a bilayer with honeycomb stacking, where the SoD centers form a buckled honeycomb lattice (Fig. \ref{fig1:structures}b). The bottom layer SoD centers form sublattice A and the top layer sublattice B. This stacking is one of many possible configurations, which can generally differ, both, by the local atomic stacking and by the stacking of the SoD centers. The local stacking considered here, has the Ta atoms of the bottom layer approximately beneath the lower Se atoms of the top layer (Fig. \ref{fig1:structures}c). While this kind of local stacking is not the most commonly observed one of the T-phase TMDCs \cite{Kourkoutis_TEM_2016,chen2019visualizing}, a corresponding stacking sequence has been found in transmission electron microscopy studies of 1T-TaS$_2$ \cite{Kourkoutis_TEM_2016} and turns out to be metastable in density functional theory (DFT) simulations of 1T-TaSe$_2$ \cite{PhysRevB.92.224104}. Regarding the stacking of the SoD centers further van der Waals DFT total energy calculations (see Supplementary Information) show that the particular honeycomb arrangement studied here, is metastable and energetically on the order of 10~meV per formula unit above the lowest energy configuration. This is similar to the configuration observed experimentally in Ref. \cite{chen2019visualizing} and it is thus plausible that also the honeycomb configuration considered here, is within reach of experiments. Experimental approaches including tear-and-stack \cite{weston_atomic_2020} and STM voltage pulse based manipulation schemes \cite{ma_metallic_2016} can present possible avenues to control and switch metastable stacking configurations and to reach the honeycomb configurations discussed in our paper. At small twist angles all different kinds of configurations can be realized locally in the moiré including likely those honeycomb cases discussed here. To study the electronic structure of such engineered stackings, we combine \textit{ab-initio} calculations in the frameworks of DFT and the random phase approximation (RPA) with effective low-energy models, which we investigate with dynamical mean-field theory (DMFT) and two-particle self-consistent (TPSC) many-body approaches, see Methods section. \begin{figure*} \includegraphics[width=0.85 \linewidth]{fig2_nontwisted.pdf} \caption{\textbf{Electronic structure and phase diagram of CCDW 1T-TaSe$_2$ systems.} \textbf{a}, Band structures of CCDW 1T-TaSe$_2$ monolayer (left) in comparison to honeycomb stacked non-twisted CCDW 1T-TaSe$_2$ bilayer (right). Bottom panels show a zoom around the Fermi level $E_F$. The red and dashed blue lines mark the DFT low-energy bands without and with SOC included, respectively. From the flat band near $E_F$ in the monolayer (red solid line, bandwidth $\approx 14$~meV) two dispersive bands with a bandwidth $\approx 200$~meV emerge in the bilayer case. The bilayer bands exhibit Dirac points in the Brillouin zone corners, K and K'. \textbf{b}, Influence of extrinsic Semenoff mass terms $\Delta M$ on the low-energy band structure. The sublattice character is color coded. The system changes from QSH to trivial band insulator at $\Delta M=0.82$~meV, which corresponds to a vertical electric field of $E_{\rm z} \approx 0.5$~mV~\AA$^{-1}$. \textbf{c}, Quasi-particle weight $Z$ for non-twisted CCDW 1T-TaSe$_2$ bilayer calculated with DMFT and TPSC. Both approaches place the system consistently in the moderately correlated regime $Z\approx 0.75$ at all calculated temperatures. \textbf{d}, Temperature-dependent antiferromagnetic correlation length $\xi_{\rm AFM}$ and inverse static spin susceptibilities of non-twisted CCDW 1T-TaSe$_2$ bilayer at wave vector $\mathbf{q}=\mathbf{0}$ as calculated with TPSC. The intra-sublattice ($1/\chi_{AA}=1/\chi_{BB}$) and inter-sublattice ($1/\chi_{AB}$) elements of the inverse susceptibility at wave number $\mathbf{q}=\mathbf{0}$ are shown. \textbf{e}, Schematic phase diagram of honeycomb stacked non-twisted CCDW 1T-TaSe$_2$ bilayer as a function of extrinsic Semenoff mass $\Delta M$ and interaction strength $U$. The region accessible for non-twisted CCDW 1T-TaSe$_2$ bilayer through tuning with external electric fields is highlighted. The transition from QSH to band insulator is a continuous transition at small $U$ (dashed line) and a first order transition at larger $U$ (solid line). The red area in the quantum spin Hall region indicates the increasing many-body character of this phase. } \label{fig2:bands} \vspace{-0.3cm} \end{figure*} In the CCDW phase, the band structure of monolayer 1T-TaSe$_2$ obtained with non-spin-polarized DFT is characterized by a single (Ta) flat band at the Fermi level \cite{rossnagel_origin_2011,freericks_pruschke_2009,marianetti_2014,ritschel_stacking-driven_2018}, which has a bandwidth of less than 20~meV (Fig. \ref{fig2:bands}a, left). Hence, the CCDW formation largely quenches in-plane hopping of the electrons. In the honeycomb stacked bilayer (with no twist), two dispersive bands with a bandwidth of the order of 200~meV emerge from the low-energy flat band of the monolayer (Fig. \ref{fig2:bands}a, right). Comparison of the mono- and bilayer bandwidths shows that interlayer hopping effects must dominate over intralayer hoppings by approximately an order of magnitude. In this sense, CCDW TaSe$_2$ bilayers are the exact opposite of graphene bilayer systems, since in the latter out-of-plane coupling is an order of magnitude weaker than in-plane hopping \cite{castro_neto_RMP_2009,katsnelson_2012}. For the 1T-TaSe$_2$ honeycomb bilayer, the upper and lower low-energy bands touch as Dirac points at the Brillouin zone corners K and K'. In the undoped system, these Dirac points are exactly at the Fermi level. We next construct a Wannier Hamiltonian to describe the Dirac bands with one Wannier function for each SoD center, i.e. two Wannier orbitals per bilayer CCDW superlattice unit cell (Supplemental Figure 2). The resulting nearest-neighbor hopping between a sublattice A site in the bottom and a neighboring sublattice B site in the top layer amounts to $t=-34$~meV and is the leading term of the Wannier Hamiltonian. There are further terms in the Wannier Hamiltonian, which are, however, at least an order of magnitude smaller than $t$. The effective Hubbard interaction $U$ for the SoD Wannier orbitals of CCDW TaSe$_2$ calculated in RPA is $U\approx130$~meV, which is also in line with the experimental estimates in Ref. \cite{chen2019visualizing} and calculations for TaS$_2$ \cite{marianetti_2014}. The ratio of hopping to Coulomb interaction is decisive in determining the strength and kind of electronic correlation phenomena taking place. Our calculations yield $U/|t|\approx 3.8$. To study the resulting electronic correlations, we performed simulations of the Hubbard model for the non-twisted CCDW 1T-TaSe$_2$ bilayer in the framework of DMFT and the TPSC approach \cite{Zantout2018,zantout_effect_2019}. The quasi-particle weight $Z$ shown in Fig. \ref{fig2:bands}c is a measure of the electronic correlation strength. In the temperature range $T=60-230$~K, both DMFT and TPSC consistently yield essentially constant $Z\approx 0.75$. Our system is thus at intermediate local correlation strength and far away from the paramagnetic Mott-Hubbard transition taking place above $U_{\rm Mott}/t\approx 8.2$. The DMFT and TPSC studies of the full Hubbard model for the non-twisted CCDW 1T-TaSe$_2$ bilayer are, thus, in line with studies of the idealized Hubbard model on the honeycomb lattice \cite{Kuroki_DMFT_2009}. The TPSC calculations give insight to spin-fluctuations taking place in the system (Supplemental Figure 4). The inverse intra- and inter-sublattice terms of the static magnetic susceptibility at wave number $\mathbf{q}=\mathbf{0}$ as well as the antiferromagnetic correlation length $\xi_{\text{AFM}}$ are shown in Fig. \ref{fig2:bands}d. We observe that antiferromagnetic fluctuations with alternating spin orientation between the two sublattices (A, B) are dominant and strongly enhanced at temperatures $T\lesssim 100$~K. These fluctuations indicate that the non-twisted CCDW 1T-TaSe$_2$ bilayer is close to a quantum phase transition from a Dirac semimetal to an antiferromagnetic insulator, which occurs for ideal Hubbard honeycomb systems exactly in the range of $U_{\rm c}/t\approx 3.6-3.8$ \cite{wehling_dirac_2014,tremblay_TPSC_honeycomb_2015,HoneckerAssaad_2019}. \subsection{Spin-orbit coupling} The aforementioned magnetic correlation phenomena are sensitive to details of the low-energy electronic structure and spin-orbit coupling (SOC), which we discuss in the following based on a symmetry analysis. The space group of non-twisted CCDW 1T-TaSe$_2$ bilayer in the honeycomb structure is $P\bar{3}$ (\#147), comprising inversion symmetry and three-fold rotations $C_3$ around an axis perpendicular to the bilayer. Imposing also time-reversal symmetry, every band must be two-fold degenerate. Therefore, SOC-induced qualitative changes of the band structures can occur near the Dirac points at K and K'. A corresponding $\mathbf{k} \cdot \mathbf{p}$ expansion (see Supplementary Information) reads \begin{equation} \begin{aligned} H_{\rm 0} &= \hbar v_{\rm F} (\tau k_{\rm x}S_{\rm x} + k_{\rm y}S_{\rm y}) + \lambda_{\rm SOC} \tau \sigma_{\rm z} S_{\rm z} \\ &+ \alpha_{\rm{R2}}(k_{\rm x}\sigma_{\rm y} - k_{\rm y}\sigma_{\rm x})S_{\rm z}, \end{aligned} \label{eq:Dirac_honeycomb} \end{equation} where the pseudospin $\mathbf{S}$ describes the sublattice degree of freedom, $\mathbf{\sigma}$ acts on the electron spin, and $\tau=\pm 1$ labels the valley (K, K') degree of freedom. This Hamiltonian comprises three contributions; the first contribution is a two-dimensional massless Dirac term, with the sublattice-pseudospin playing the role of the spin inherent to the Dirac equation. This term is analogous to the massless Dirac term in graphene \cite{wehling_dirac_2014,castro_neto_RMP_2009,katsnelson_2012}. SOC is responsible for the second and third contributions to $H_{\rm 0}$: a valley-spin-sublattice coupling $\lambda_{\rm SOC}=0.74$~meV, which is often called Kane-Mele spin-orbit term \cite{kanemele.prl95.2005,PhysRevLett.109.055502}, and a sublattice-staggered Rashba term $\alpha_{\rm{R2}}$, which belongs to the R2 class according to the classification form Ref. \cite{zhang_hidden_2014}. A finite Kane-Mele term $\lambda_{\rm SOC}$ opens a gap and turns the system described by $H_{\rm 0}$ into a QSH insulator \cite{kanemele.prl95.2005,PhysRevLett.109.055502}. Importantly, the Kane-Mele term here is enhanced in comparison to its counterpart in graphene by two orders of magnitude \cite{castro_neto_RMP_2009,katsnelson_2012,Kochan2017}, and corresponds to a temperature $T\approx 10$~K, which is well accessible in experiments. Given that $U/|t|\approx 3.8$, the non-twisted CCDW 1T-TaSe$_2$ bilayer implements a material realization of the Kane-Mele-Hubbard model in a regime very close to the topological quantum phase transition from a QSH insulator to an antiferromagnetic insulator (Fig. \ref{fig2:bands}e). Dirac fermions and their topology are affected by different kinds of mass fields. An energy difference between electrons localized in sublattice A and B leads to a so-called Semenoff mass term $M$, which would enter the Hamiltonian $H_{\rm 0}$ of equation (\ref{eq:Dirac_honeycomb}) in the form $M S_{\rm z}$. This term breaks sublattice invariance and thereby inversion symmetry and leads to a transition from a QSH to a band insulator at $|M|=|\lambda_{\rm SOC}|$ \cite{kanemele.prl95.2005, di_sante_towards_2019}. In the non-twisted CCDW 1T-TaSe$_2$ bilayer, the intrinsic Semenoff mass $M_{\rm 0}=0$ is required to vanish by symmetry. Our Wannier construction yields $M_{\rm 0}=0.14$~meV, which is small as compared to all other relevant terms in the system. Possible origins of this small symmetry breaking can be the Wannier constructions and also faint asymmetries accumulated during self-consistency iterations in the DFT calculations. Vertical electric fields $E_{\rm z}$, as realizable in field effect transistor geometries (Fig. \ref{fig1:structures}c), break inversion symmetry, translate into staggered sublattice potentials, and therefore corresponding extrinsic Semenoff mass contributions $\Delta M$ (Fig. \ref{fig2:bands}b). DFT calculations (Supplementary Figure 3) yield the approximate relation $\Delta M\approx e E_{\rm z} d/\epsilon_{\rm \perp}$, where $d=6.4$~\AA{} is the interlayer distance, $e$ is the elementary charge, and $\epsilon_{\rm \perp}=3.72$ plays the role of an effective dielectric constant. The QSH to band insulator transition is reached for $E_{\rm z} \approx 0.5$~mV~\AA$^{-1}$$=50$~kV~cm$^{-1}$ (Fig. \ref{fig2:bands}b), which is well within reach of experiments \cite{klein_electric-field_2017} Taken together, our calculations show that the honeycomb-stacked non-twisted CCDW 1T-TaSe$_2$ bilayer is located in a region of the phase diagram (Fig. \ref{fig2:bands}e) with three different phases (QSH insulator, band insulator and antiferromagnetic insulator) coming together. Electron correlation is known to change the order of the QSH-band insulator transition from second to first order \cite{Griogio_first-order_2015}. Contrary to the standard non-interacting QSH to band insulator transition, where the gap closes and reopens continuously with vanishing gap at the transition point, the QSH gap remains finite and the system changes discontinuously to a band insulating state at the transition point. Application of vertical electric fields in the system at hand represents hence a possibility to realize this exotic interaction-induced first order transition. \subsection{Twisted CCDW 1T-$\mathbf{TaSe}_2$ bilayers} \begin{figure*}% \includegraphics[width=0.85 \linewidth]{fig3_180twist.pdf} \caption{\textbf{Influence of $\mathbf{180^{\circ}}$ twisting and electric fields on band structure and topology.} \textbf{a}, Band structure for $180^{\circ}$ twisted CCDW 1T-TaSe$_2$ bilayer without (solid red) and with (dashed blue) SOC included. The degeneracy of the bands is lifted due to the absence of the inversion symmetry after twisting. \textbf{b}, Influence of vertical electric fields on the low-energy band structure for $180^{\circ}$ twisted CCDW 1T-TaSe$_2$ bilayer. The gap at K closes and a band touching point occurs when the Semenoff mass term is $|M|=|M_{\rm 0}+\Delta M| = 1.87$~meV at $E_{\rm z}=-4.2$~mV~\AA$^{-1}$. \textbf{c}, Non-interacting $\lambda_{\rm R}$ vs $\Delta M$ topological phase diagrams for non-twisted, $180^{\circ}$ twisted CCDW bilayer and two cases in between, where the spin valley coupling $B$ of the non-twisted CCDW 1T-TaSe$_2$ bilayer is varied. For $B=0$ the system shows the symmetric onion-like shape similar to Ref. \cite{kanemele.prl95.2005}. When $B$ increases, the QSH region shrinks and disappears when $B=\lambda_{\rm SOC}$. For $B>\lambda_{\rm SOC}$, the system behaves as a trivial band insulator. The yellow arrows in the leftmost and rightmost panels indicate the path in phase space accessible by varying the vertical electric field $E_{\rm z}$. }% \label{fig3:manipulating}% \end{figure*} Layered van der Waals systems allow to realize different stacking configurations via twisting, i.e. relative rotations between the layers. General twist angles $\theta$ lead to incommensurate moir\'e patterns superimposed to the CCDW lattice. Arguably the simplest case of twisting is a rotation angle of $\theta=180^\circ$, which leads to a system with identical Bravais lattice but different symmetry of the supercell basis (Fig. \ref{fig1:structures}c): in case of honeycomb stacking of the CCDW, the space group of the $180^\circ$ twisted structure of CCDW TaSe$_2$ bilayer is reduced to P3, meaning that inversion symmetry is lost with respect to the non-twisted case. The resulting band structure (Fig. \ref{fig3:manipulating}a) is qualitatively similar to the non-twisted honeycomb case regarding the overall shape and width of the low-energy bands. Thus, also the $180^\circ$ twisted case will be far away from the paramagnetic Mott transition. However, the low-energy band structure is markedly different in the $180^\circ$ twisted case. First, the conduction band is almost flat between $K$ and $M$. Second, inversion symmetry breaking lifts band degeneracies: our DFT calculations reveal a staggered potential and an associated intrinsic Semenoff mass term of $M_{\rm 0}=8.55$~meV, which opens a gap at the K and K' points already without SOC and without external electric fields. Furthermore, additional SOC terms are now allowed by symmetry (see Supplementary Information) and completely lift the remaining band degeneracies except for the time-reversal symmetric points $\Gamma$ and M. Based on a symmetry analysis, we obtain the following low-energy model in the vicinity of K and K': \begin{equation} \begin{aligned} H_{\rm{180^\circ}} &= H_{\rm 0} + M_{\rm 0} S_{\rm z}+B \tau \sigma_{\rm z} \\ &+\lambda_{\rm R} (\tau\sigma_{\rm y} S_{\rm x}-\sigma_{\rm x} S_{\rm y})+\alpha_{\rm{R1}} (k_{\rm x}\sigma_{\rm y}-k_{\rm y}\sigma_{\rm x})\\ &+\lambda_{\rm D} (\tau S_{\rm y} k_{\rm x}-S_{\rm x} k_{\rm y})\sigma_{\rm z}. \end{aligned} \label{eq:H180} \end{equation} The additional terms with respect to the non-twisted honeycomb structure equation (\ref{eq:Dirac_honeycomb}) are the intrinsic Semenoff mass ($M_{\rm 0}$), the spin-valley coupling term ($B$), the Kane-Mele-Rashba interaction ($\lambda_{\rm R}$), and a Rashba interaction belonging to the R1 class \cite{zhang_hidden_2014} giving rise to pure Rashba spin-polarization patterns ($\alpha_{\rm{R1}}$). The last term (with coupling constant $\lambda_{\rm D}$) can also be seen as an effective $k-$dependent magnetic field parallel to the $z$ axis. Our DFT calculations yield $M_{\rm 0}=8.55$~meV, $B=-1.85$~meV, $|\lambda_{\rm SOC}|\lesssim 0.05$~meV and $\lambda_{\rm R}=3.21$~meV. These terms affect the dispersion and imprint an intricate sublattice and spin structure to the low-energy bands, which can be manipulated by vertical electric fields as shown in Fig. \ref{fig3:manipulating}b. Except for $E_{\rm z}=-4.2$~meV~\AA$^{-1}$ ($\Delta M=-6.68$meV and $M=M_{\rm 0}+\Delta M=1.87$meV), the system is always gapped. We calculated the $Z_2$ topological invariant for the non-interacting 180$^\circ$ twisted bilayer in comparison to the non-twisted bilayer case as well as for two cases in between where the ratio $B/\lambda_{\rm SOC}$ is varied (Fig. \ref{fig3:manipulating}c, and Supplemental Information). In the non-twisted bilayer, the system is in a QSH state unless an extrinsic sufficiently large Semenoff mass term or an additional Rashba SOC term $\lambda_{\rm R}$ are added. In the 180$^\circ$ twisted case, the situation is very different regardless whether or not the intrinsic Semenoff mass term is compensated by an external electric field and regardless of $\lambda_{\rm SOC}$. Indeed, many changes in the SOC terms suppress the QSH state in the 180$^\circ$ twisted bilayer: The comparably large Rashba $\lambda_{\rm R}$ and the spin-valley coupling terms $B$ and a strong reduction in $\lambda_{\rm SOC}$. Each of these alone is sufficient to suppress the QSH state. At vertical electric field $E_{\rm z}=-4.2$~mV~\AA$^{-1}$ the gaps at K and K' close, and a band touching point emerges. While it is clear that there will be tendencies towards interaction-induced (quasi)ordered phases as well, here, the kind of ordering is likely different from the non-twisted case but largely unexplored. The band touching at $E_{\rm z}=-4.2$~mV~\AA$^{-1}$ implements a situation similar to saddle points in a two-dimensional dispersion, where already arbitrarily weak interactions would trigger different kinds of magnetic or excitonic instabilities \cite{kotov_RMP_2012}. How these instabilities translate into the intermediately correlated and strongly spin-orbit coupled case of 180$^\circ$ twisted TaSe$_2$ is a completely open question. \subsection{Conclusions and outlook} The field of twistronics with materials like bilayer graphene is based on the idea that weak interlayer coupling can flatten highly dispersive bands and thereby boost electronic correlations \cite{bistritzer_macd_pnas_2011,cao_unconventional_2018,cao_correlated_2018}. The system introduced here takes the opposite route of deconfining formerly Mott localized electrons. This approach should be generally applicable to interfaces of Mott localized electrons under two conditions: the interlayer coupling should substantially exceed the in-plane one and at the same time define a connected graph linking all sites of the system. Possible example systems range from stacking faults in the bulk of CCDW layered Mott materials \cite{Kourkoutis_TEM_2016} to molecular systems \cite{tsukahara_evolution_2011}. Especially the twisting degree of freedom opens new directions to experiments. Since interlayer hopping is the dominant kinetic term in deconfined Mott systems like bilayers of CCDW 1T-TaSe$_2$, we expect incommensurability effects to be much more pronounced than in twisted graphene systems \cite{bistritzer_macd_pnas_2011}. $\theta=30^\circ$ twisted CCDW 1T-TaSe$_2$ bilayer should realize a quasicrystal with twelvefold rotation symmetry and provide an experimental route to correlated electrons and emerging collective states in a quasicrystalline environment. The prototypical case of CCDW 1T-TaSe$_2$ bilayer demonstrates how deconfinement of Mott electrons leads to exotic states of quantum matter: the non-twisted bilayer approaches a quantum tricritical region of competing QSH, trivial band insulating, and antiferromagnetic insulating states. At 180$^\circ$ twist angle different kinds of electrically controllable band degeneracies with associated many-body instabilities, hypothetically of excitonic type, emerge. Clearly, the phase space for manipulating deconfined Mott electrons is high dimensional. We here identified the combination of twist angle and perpendicular electric field as decisive for TaSe$_2$ bilayers. Further means to control emerging electronic states include dielectric engineering \cite{pizarro_internal_2019} and charge doping. Our calculations showed that the non-twisted CCDW 1T-TaSe$_2$ bilayer in honeycomb stacking approximates the (Kane-Mele) Hubbard model on the honeycomb lattice with $U/|t|\approx 3.8$ very well. In this regime, doping the system away from the Dirac point towards the van Hove singularity is expected to lead to chiral superconductivity \cite{black-schaffer_resonating_2007,nandkishore_chiral_2012,kiesel_competing_2012,black-schaffer_chirald-wave_2014}, most likely of $d+id$-type. \beginmethods \textbf{DFT calculations.} We perform DFT \cite{PhysRev.136.B864,PhysRev.140.A1133} calculations by using the Vienna \textit{ab-initio} simulation package (VASP) \cite{Kresse_1994,PhysRevB.59.1758} with the generalized gradient approximation of Perdew, Burke, and Ernzerhof (GGA-PBE) for the exchange-correlation functional \cite{PhysRevLett.77.3865,PhysRevLett.78.1396}. We obtain the total energies, relaxed structures and electronic structure of mono- and bilayer 1T-TaSe$_2$ systems. We calculate the total energies for various possible stackings in undistorted and CCDW bilayer 1T-TaSe$_2$ using $\Gamma$-centered \textbf{k}-meshes of 15$\times$15$\times$1 and 9$\times$9$\times$1, respectively and taking into account van der Waals (vdW) corrections within DFT-D2 and cross-checking with DFT-D3 \cite{doi:10.1002/jcc.20495,grimmedftd3}, see Supplemental Figure 1. The ionic relaxation is done using the conjugate gradient algorithm until all force components are smaller than $0.02$~eV~\AA$^{-1}$. Since the DFT-D2 corrections yield correct interlayer distances but do not correctly capture the CCDW distortions, we adopted the following relaxation procedure to calculate the commensurate $\sqrt{13} \times \sqrt{13}$ CCDW bilayer structures: \begin{enumerate} \item We perform relaxations for a $\sqrt{13} \times \sqrt{13}$ supercell of the monolayer (without vdW corrections), using a superlattice constant of $a=12.63$~$\text{\AA}$ according to Ref. \cite{chen2019visualizing}. We fix the vertical positions of the Ta atoms, while allowing for Ta in-plane displacements. The Se atoms are allowed to freely relax in all three directions. \item We include then a second layer and optimize the interlayer distance, $d$, while keeping all relative intralayer distances fixed. We find $d=6.4$ $\text{\AA}$ for the ideal honeycomb stacking in CCDW bilayer 1T-TaSe$_2$. \item We relax the CCDW bilayer following the same procedure described for the monolayer, i.e. without vdW corrections and vertical positions of the Ta atoms according to the optimized interlayer distance $d$ fixed, while allowing for in-plane displacements. The Se atoms are allowed to freely relax in all three directions. \end{enumerate} We cross check the results obtained by this procedure against calculations with vdW corrections according to the DFT-D3 method. \cite{grimmedftd3}. In contrast to DFT-D2, the CCDW distortions are well described in the DFT-D3. Thus, full relaxations of all atomic positions have been performed in the DFT-D3 framework for the mono- and bilayer. Both our step-by-step procedure using DFT-D2 method, and the full relaxation using DFT-D3 give equivalent results for the total energies (see Supplemental Figure 1b), for the crystal and band structures. For the non-collinear magnetic calculation, i.e. when SOC is included, we set the net magnetic moment to zero in all atoms of the unit cell, and use a $\Gamma$-centered \textbf{k}-mesh of 6$\times$6$\times$1. \textbf{Estimation of the screened Hubbard interaction $\mathbf{U}$ via RPA.} We estimate the local Hubbard interaction $U$ for the flat bands around the Fermi level in the CCDW 1T-TaSe$_2$ bilayer from the \textit{ab-initio} calculation of the screened Coulomb interaction, using RPA for the undistorted bilayer. We follow a similar procedure as in Ref. \cite{Kamil_2018}, which we summarize below: \begin{itemize} \item We initially calculate the \textsc{Wannier90} tight-binding model for the three low-energy Ta bands $\mathcal{C}$, whose orbital character is mostly $\{d_{z^2},d_{x^2-y^2},d_{xy}\}$ (see Fig. 2(a) in Ref. \cite{Kamil_2018}) in the undistorted monolayer 1T-TaSe$_2$. \item The static RPA-screened Coulomb interaction tensor $W_{\alpha \beta \gamma \delta}(\textbf{q},\omega \rightarrow 0)$ is calculated for undistorted monolayer 1T-TaSe$_2$, where $\textbf{q}$ is a reciprocal wave vector on a $\Gamma$-centered mesh of 18$\times$18$\times$1, and $\alpha,\beta,\gamma,\delta \in \mathcal{C}$. We neglect $\textbf{q}=\textbf{0}$ terms in our RPA analysis in order to avoid unphysical effects. \item In the CCDW 1T-TaSe$_2$ bilayer, the $d_{z^2}$ orbitals from Ta atoms in the SoD centers have the largest contribution for the bands around the Fermi level. Thus, for each $\textbf{q}$, we consider only the tensor element $W(\textbf{q}) \equiv W_{\alpha\alpha\alpha\alpha}(\textbf{q})$ with $\alpha=d_{z^2}$. \item Then, the local Hubbard interaction $U$ in a single star of David is calculated by averaging over the $d_{z^2}$ orbital weight from each Ta atom (labeled by $w_{d_{z^2}}(\textbf{R})$) in the star of David: \begin{equation} U=\sum_{\bold{R},\bold{R}' \in \davidsstar} w_{d_{z^2}}(\textbf{R}) U(\textbf{R}-\textbf{R}') w_{d_{z^2}}(\textbf{R}') \end{equation} where $U(\textbf{R})$ is the discrete Fourier transform of $W(\textbf{q})$. \end{itemize} \textbf{DMFT and TPSC many-body calculations.} For non-twisted CCDW 1T-TaSe$_2$ bilayer, we construct tight-binding-Hubbard Hamiltonians of the type \begin{equation} H_\mathrm{TBH} = \sum_{\langle i, j\rangle, \sigma,\sigma^\prime} t_{ij}^{\sigma\sigma^\prime} c_{i\sigma}^\dagger c_{j\sigma^\prime} + U \sum_i n_{i\uparrow} n_{i\downarrow} \end{equation} from a Wannierization of the \emph{ab-initio} DFT band structure (Supplementary Information), and estimate the on-site repulsion $U$ to be about 130\,meV by means of RPA calculations. We study these effective low-energy models from a many-body perspective to judge the type of correlations in the system. In DMFT the lattice Hamiltonian is mapped onto a self-consistently determined single impurity problem, solved -- in our case -- within numerical exact quantum Monte Carlo in the hybridization expansion flavour (CT-HYB) (for a review, see \cite{Gull}). The resulting sublattice-resolved self-energy, $\Sigma$, is local (${\bf k}$-independent) but it contains frequency-dependent non-perturbative corrections beyond Hartree-Fock to all orders and can account for Mott-Hubbard metal-to-insulator transitions. All DMFT calculations are performed using w2dynamics \cite{w2dynamics}. The double counting is accounted for using the fully-localized limit. For two-dimensional systems it is important to estimate non-local effects at the level of the self-energy, not included in DMFT. To this goal, we apply the TPSC method \cite{Vilk_1997}, which produces accurate results in the weak-to-intermediate coupling regime, if compared to lattice quantum Monte Carlo calculations in the single band Hubbard model. For non-twisted CCDW 1T-TaSe$_2$ bilayer, which is modelled by a multi-band system we use the multi-site formulation of TPSC~\cite{Zantout2018} while neglecting the Hartree term to avoid double counting of correlation effects already accounted for in DFT. Moreover, to be able to apply TPSC to this system we project out spin off-diagonal terms and take only the diagonal spin-up contributions from DFT while still assuming a paramagnetic state. The combination of TPSC accounting for the ${\bf k}$-dependence of $\Sigma$ and DMFT, in which we can include all off-diagonal terms between spin-orbitals and access antiferromagnetic ordering at strong coupling consitutes a powerful tool to determine the many-body nature of 1T-TaSe$_{2}$. \begindatav The data that support the findings of this study is available from the corresponding author upon reasonable request. \beginacknowd We thank D. Di Sante, P. Eck, E. van Loon, M. Sch\"uler, and C. Steinke for useful conversations. JMP and TW acknowledge funding from DFG-RTG 2247 (QM$^3$) and the European Graphene Flagship. SA and GS are supported by DFG-SFB 1170 Tocotronics, and further acknowledges financial support from the DFG through the W\"urzburg-Dresden Cluster of Excellence on Complexity and Topology in Quantum Matter -- \textit{ct.qmat} (EXC 2147, project-id 390858490). TM, KZ and RV acknowledge funding from the DFG through grant VA117/15-1. PB acknowledges financial support from the Italian Ministry for Research and Education through PRIN-2017 project ``Tuning and understanding Quantum phases in 2D materials - Quantum 2D'' (IT-MIUR Grant No. 2017Z8TS5B). This research was supported in part by the National Science Foundation under Grant No. NSF PHY-1748958. We gratefully acknowledge the Gauss Centre for Supercomputing e.V. (www.gauss-centre.eu) for funding this project by providing computing time on the GCS Supercomputer SuperMUC at Leibniz Supercomputing Centre (www.lrz.de). Computing time at HLRN (Berlin and G\"ottingen) is acknowledged. \begincompint The authors declare no competing interests. \beginauthorcont J.M.P. performed the DFT and RPA calculations. S.A. calculated the topological invariant diagrams. S.A., K.Z. and T.M. performed the DMFT and TPSC calculations. P.B. derived the $k \cdot p$ model. R.V., G.S. and T.W. supervised the project. J.M.P., S.A., G.S. and T.W. analyzed the results. All authors contributed to write the paper.
\section{Introduction} After the pioneer work of Zadeh \cite{zadeh_fuzzy}, the applications of fuzzy set theory and fuzzy logic in a number of diverse fields are well known by now. Also, in Mathematics, group theory has always been in the forefront and has found its practical applications in various fields of science and technology. As a result of natural progression, in 1971, A. Rosenfeld \cite{rosenfeld_fuzzy} applied the notion of fuzzy sets to subgroupoids and groups which instigated the studies of fuzzy algebraic structures. On the other hand, lattice theory has been effectively applied to various branches of science and technology. In information sciences various branches such as computational intelligence, neural networks, pattern recognition, mathematical morphology can be unified with an application of lattice theory. In fact, diverse concepts can be studied under the purview of lattice theory. Hopefully, such an amalgamation of lattices and fuzzy subgroups will open doors for new applications while revealing deeper structure of fuzzy subgroups. A study of fuzzy algebraic structures and lattices came into the existence, in the year 1981, when Liu \cite{liu_op} introduced the lattice valued fuzzy subgroups. In \cite{mordeson_comm, malik_pri}, Mordeson and Malik have developed $L$-ring theory (lattice valued fuzzy ring theory) in a systematic way like its classical counterpart. It is worthwile to mention here that in \cite{mordeson_comm} the parent structure is an ordinary ring rather than a latice valued fuzzy ring ($L$-ring). This setting has its own limitations and does not even allow the formulation of various concepts of classical algebra in fuzzy or $L$-(lattice valued fuzzy) setting. This drawback can be removed easily if the parent structure considered in the definition of an $L$(fuzzy)-algebraic concept is an $L$(fuzzy)-algebraic structure rather than an ordinary algebraic structure \cite{ajmal_char}. In fact, very few researchers such as Martinez \cite{martinez_fuzzy} have studied the properties of a $L$-subring of an $L$-ring.In \cite{prajapati_max1, prajapati_max2}, Ajmal and Prajapati have introduced the notion of maximal $L$-ideals of an $L$-ring with an essence similar to classical ring theory. In fact, such a definition of maximal $L$-ideal could be formulated as the parent structure considered in this definition is an $L$-ring rather than an ordinary ring. However, in the studies of fuzzy groups such an effort is lacking. Recently, a systematic study of $L$-subgroups (lattice valued fuzzy subgroups) of an $L$-group has been carried out in a series of papers \cite{ajmal_char, ajmal_nc, ajmal_nil, ajmal_nor, ajmal_sol} wherein a number of concepts of classical group theory have been extended to $L$-setting specially keeping in view their compatibility. The present paper is an endeavour to develop and study the maximal $L$-subgroup of an $L$-group along with its application to the notion of Frattini subgroups. In Section 3, the concept of maximal subgroups has been extended to the $L$-setting. The maximal $L$-subgroup of an $L$-group $\mu$ is defined to be a proper $L$-subgroup that is not properly contained in any other $L$-subgroup of $\mu$. Then, a level subset characterization of maximal $L$-subgroup of an $L$-group $\mu$ has been provided, provided that $\eta$ and $\mu$ are jointly supstar and both $\eta$ and $\mu$ have the same tips. This characterization has been effectively applied to develop the notion of Frattini $L$-subgroup of $\mu$ in Section 4. A sufficient condition for an $L$-subgroup of $\mu$ to be a maximal $L$-subgroup has also been established. Section 4 explores the concept of Frattini subgroup in $L$-setting. The Frattini subgroup of a group is a significant concept in classical group theory. It is defined as the intersection of all maximal subgroups of a group and in case a group has no maximal subgroups, the Frattini subgroup is defined to be the group itself. Thus it is comparable to the concept of Jacobson radical in ring theory. Another important property of Frattini subgroup is that it coincides with the subgroup of non-generators of a group. Therefore it is considered as the subgroup of "small elements". Section 4 starts with the definition of the Frattini $L$-subgroup $\Phi(\mu)$ of an $L$-group $\mu$. It is defined as the intersection of all maximal $L$-subgroups of $\mu$. In case $\mu$ has no maximal $L$-subgroups, $\Phi(\mu)$ is defined to be $\mu$ like its classical counterpart. Next, the notion of non-generators of an $L$-group has been introduced. Then, in upper well ordered lattices, it has been established that the Frattini $L$-subgroup of $\mu$ is same as the $L$-subgroup generated by the union of non-generators of $\mu$. Further, it has been shown that if $\mu$ is a normal $L$-subgroup of a group $G$, then the Frattini $L$-subgroup $\Phi(\mu)$ is a normal $L$-subgroup of $\mu$. The paper ends with an investigation of the images and pre-images of the Frattini $L$-subgroup under group homomorphisms. \section{Preliminaries} Throughout this paper, the system $\langle L, \leq,\vee,\wedge\rangle $ denotes a completely distributive lattice where $\leq $ denotes the partial ordering of $L$, the join (sup) and the meet (inf) of the elements of $L$ are denoted by $‘\vee’$ and $’\wedge’$, respectively. Also, we write 1 and 0 for the maximal and the minimal elements of $L$, respectively. Moreover, our work is carried out by using the definition of $L$-subsets as formulated by Goguen \cite{goguen_sets}. The definition of a completely distributive lattice is well known in the literature and can be found in any standard text on the subject \cite{gratzer_lattices}. \ \vspace{.3 cm} \noindent Let $\{J_i:i\in I\}$ be any family of subsets of a complete lattice $L$ and $F$ denotes the set of choice functions for $J_i$, that is, functions $f:I\to\prod\limits_{i\in I}J_i$ such that $f(i)\in J_i$ for each $i\in I$.\ Then, we say that $L$ is a completely distributive lattice, if \[ \begin{array}{l} \bigwedge\left\{\bigvee_{i\in I}J_i\right\} =\bigvee_{f\in F}\left\{\bigwedge_{i\in I}f(i)\right\}. \end{array} \] \noindent The above law is known as the complete distributive law. Moreover, a lattice $L$ is said to be infinitely meet distributive if for every subset $\{b_\beta:\beta\in B\}$ of $L$, we have \begin{center} $a\bigwedge\lbrace\bigvee\limits_{\beta\in B}b_\beta\rbrace=\bigvee\limits_{\beta\in B}\lbrace a\bigwedge b_\beta\rbrace$, \end{center} \noindent provided $L$ is join complete. The above law is known as the infinitely meet distributive law. The definition of infinitely join distributive lattice is dual to the above definition, that is, a lattice $L$ is said to be infinitely join distributive if for every subset $ \{b_\beta : \beta \in B \}$ of $L$, we have \begin{center} $a\bigvee\lbrace\bigwedge\limits_{\beta\in B}b_\beta\rbrace=\bigwedge\limits_{\beta\in B}\lbrace a \vee b_ \beta\rbrace,$ \end{center} provided $L$ is meet complete. The above law is known as the infinitely join distributive law. Clearly, both these laws follow from the definition of a completely distributive lattice. Here we also mention that the dual of completely distributive law is valid in a completely distributive lattice whereas the infinitely meet and join distributive laws are independent from each other. Next, we recall the following from \cite{ajmal_sup, ajmal_gen, ajmal_nil, goguen_sets, mordeson_comm, wu_normal}:\\ An $L$-subset of a non-empty set $X$ is a function from $X$ into $L$. The set of $L$-subsets of $X$ is called the $L$-power set of $X$ and is denoted by $L^X$. For $\mu \in L^X, $ the set $ \lbrace\mu(x) \mid x \in X \rbrace$ is called the image of $\mu$ and is denoted by Im $\mu $ and the tip of $ \mu $ is defined as $\bigvee \limits_{x \in X}\mu(x). $ Moreover, the tail of $\mu$ is defined as $\bigwedge \limits_{x \in X}\mu(x). $ We say that an $L$-subset $\mu$ of $X$ is contained in an $L$-subset $\eta$ of $X$ if $\mu(x)\leq \eta (x)$ for all $x \in X$. This is denoted by $\mu \subseteq \eta $. For a family $\lbrace\mu_{i} \mid i \in I \rbrace$ of $L$-subsets in $X$, where $I$ is a non-empty index set, the union $\bigcup\limits_{i \in I} \mu_{i} $ and the intersection $\bigcap\limits_{i \in I} \mu_{i} $ of $\lbrace\mu_{i} \mid i \in I \rbrace$ are, respectively, defined by: \begin{center} $\bigcup\limits_{i \in I} \mu_{i}(x)= \bigvee\limits_{i \in I} \mu(x) $ and $\bigcap\limits_{i \in I} \mu_{i} (x)= \bigwedge\limits_{i \in I} \mu(x), $ \end{center} for each $x \in X $. If $\mu \in L^X $ and $a \in L $, then the notion of level subset $\mu_{a}$ of $\mu$ is defined as: \begin{center} $\mu_{a}= \lbrace x \in X \mid \mu (x) \geq a\rbrace.$ \end{center} For $\mu, \nu \in L^{X} $, it can be verified easily that if $\mu\subseteq \nu$, then $\mu_{a} \subseteq \nu_{a} $ for each $a\in L $. Also, the following result is well known in the literature:\\ \begin{proposition} \label{int_lev} Let $\{\eta_{i}\}_{i \in I}$ be a family of $L$-subsets of $X$. Then, $$\left\{\bigcap_{i\in I}\eta_{i}\right\}_{a}=\bigcap_{i\in I}\{\eta_{i}\}_{a}.$$ \end{proposition} If $a\in L$ and $x \in X$, then we define $a_{x} \in L^{X} $ as follows: \[ a_{x} ( y ) = \begin{cases} a &\text{if} \ y = x,\\ 0 &\text{if} \ y\ne x. \end{cases} \] $a_{x} $ is referred to as an $L$-point or $L$-singleton. We say that $a_{x} $ is an $L$-point of $\mu$ if and only if $\mu( x )\ge a$ and we write $a_{x} \in \mu$. The set product $\mu \circ \eta $ of $\mu, \eta \in L^S$, where $S$ is a groupoid, is an $L$-subset of $S$ defined by \begin{center} $\mu \circ \eta (x) = \bigvee \limits_{x=yz}\lbrace\mu (y) \wedge \eta (z) \rbrace.$ \end{center} \noindent Here we point out that if $x$ cannot be factored as $x=yz$ in $S$, then $\mu \circ \eta (x)$, being the least upper bound of the empty set, is zero. It can be verified easily that the set product is associative in $L^S$ if $S$ is a semigroup.\\ Let $f$ be a mapping from a set $X$ to a set $Y$. If $\mu \in L ^{X}$ and $\nu \in L^{Y}$, then the image $f(\mu )$ of $\mu $ under $f$ and the preimage $f^{-1} (\nu )$ of $\nu $ under $f$ are $L$-subsets of $Y$ and $X$ respectively, defined by \[ f(\mu )(y)=\bigvee\limits_{x\in f^{-1} (y)} \{\mu (x)\}\quad\text{and}\quad f^{-1} (\nu )(x)=\nu (f(x)). \] Again, recall that if $f^{-1} (y)=\phi $, then $f(\mu )(y),$ being the least upper bound of the empty set, is zero. \begin{proposition} \label{hom} Let $f : X \rightarrow Y$ be a mapping. \begin{enumerate} \item[{(i)}] Let $\{ \mu_i \}_{i \in I}$ be a family of $L$-subsets of $X$. Then, $f(\mathop{\cup}\limits_{i \in I} \mu_i) = \mathop{\cup}\limits_{i \in I} f(\mu_i)$ and $f(\mathop{\cap}\limits_{i \in I} \mu_i) \subseteq \mathop{\cap}\limits_{i \in I}f(\mu_i)$. \item[{(ii)}] Let $\mu \in L^X$. Then, $f^{-1}(f(\mu)) \supseteq \mu$. The equality holds if $f$ is injective. \item[{(iii)}] Let $\nu \in L^Y$. Then, $f(f^{-1}(\nu)) \subseteq \nu$. The equality holds if $f$ is surjective. \item[{(iv)}] Let $\mu \in L^X$ and $\nu \in L^Y$. Then, $f(\mu) \subseteq \nu$ if and only if $\mu \subseteq f^{-1}(\nu)$. Moreover, if $f$ is injective, then $f^{-1}(\nu) \subseteq \mu$ if and only if $\nu \subseteq f(\mu)$. \end{enumerate} \end{proposition} Throughout this paper $G$ denotes an ordinary group with the identity element `$e$' and $I$ denotes a non-empty indexing set. Also, $1_A$ denotes the characteristic function of a non-empty set $A$. \begin{definition} Let $\mu \in L ^G $. Then, $\mu $ is called an $L$-subgroup of $G$ if for each $x, y\in G$, \begin{enumerate} \item[({i})] $\mu (xy)\ge \mu (x)\wedge \mu (y)$, \item[({ii})] $\mu (x^{-1} )=\mu (x)$. \end{enumerate} The set of $L$-subgroups of $G$ is denoted by $L(G)$. Clearly, the tip of an $L$-subgroup is attained at the identity element of $G$. \end{definition} \begin{theorem} \label{lev_gp} Let $\mu \in L ^G $. Then, $\mu $ is an $L$-subgroup of $G$ if and only if each non-empty level subset $\mu_{a} $ is a subgroup of $G$. \end{theorem} It is well known in literature that the intersection of an arbitrary family of $L$-subgroups of a group is an $L$-subgroup of the given group. \begin{definition} Let $\mu \in L ^G $. Then, the $L$-subgroup of $G$ generated by $\mu $ is defined as the smallest $L$-subgroup of $G$ which contains $\mu $. It is denoted by $\langle \mu \rangle $, that is, \[ \langle \mu \rangle =\cap\{\mu _{{i}} \in L(G) \mid \mu \subseteq \mu _{i}\}. \] \end{definition} \begin{definition} Let $\mu\in L(G)$. Then, $\mu $ is called a normal $L$-subgroup of $G$ if for all $x, y \in G$, $\mu ( xy ) = \mu ( yx )$. \end{definition} \noindent The set of normal $L$-subgroups $G$ is denoted by $NL(G)$. \begin{theorem} \label{lev_norgp} Let $\mu \in L{(G)}$. Then, $\mu \in NL(G)$ \text{if and only if each non-empty level subset~} $\mu_a$ \text {~is a normal subgroup of~} $G$. \end{theorem} \begin{definition} Let $\eta, \mu\in L^{{G}}$ such that $\eta\subseteq\mu$. Then, $\eta$ is said to be an $L$-subset of $\mu$. The set of all $L$-subsets of $\mu$ is denoted by $L^{\mu}.$ Moreover, if $\eta,\mu\in L(G)$ such that $\eta\subseteq \mu$, then $\eta$ is said to be an $L$-subgroup of $\mu$. The set of all $L$-subgroups of $\mu$ is denoted by $L(\mu)$. \end{definition} \begin{definition} Let $\eta\in L(\mu)$ such that $\eta$ is non-constant and $\eta\ne\mu$. Then, $\eta$ is said to be a proper $L$-subgroup of $\mu$. \end{definition} \noindent Clearly, $\eta$ is a proper $L$-subgroup of $\mu$ if and only if $\eta$ has distinct tip and tail and $\eta\ne\mu$. \vspace{.1cm} \begin{theorem} \label{lev_sgp} Let $\eta \in L^\mu$. Then, $\eta\in L(\mu)$ if and only if each non-empty level subset $\eta_a$ is a subgroup of $\mu_a$. \end{theorem} \begin{theorem} \label{hom_gp} Let $f : G \rightarrow H$ be a group homomorphism. Let $\mu \in L(G)$ and $\nu \in L(H)$. Then, $f(\mu) \in L(H)$ and $f^{-1}(\nu) \in L(G)$. \end{theorem} We shall have an $L$-group as our parent group which will be denoted by $\mu$ throughout our work. We recall the definition of a normal $L$-subgroup of an $L$-group and some results which are used in the development of this paper. \begin{definition}\label{2.5} Let $\eta \in L(\mu)$. Then, we say that $\eta$ is a normal $L$-subgroup of $\mu$ if \begin{center} $\eta(yxy^{-1}) \geq \eta(x)\wedge \mu(y)$ for all $x,y \in G.$ \end{center} \end{definition} \noindent The set of normal $L$-subgroups of $\mu$ is denoted by $NL(\mu)$. If $\eta \in NL(\mu)$, then we write\vspace{.2cm} $ \eta \triangleleft \mu$. Here we mention that the arbitrary intersection of a family of normal $L$-subgroups of an $L$-group $\mu$ is again a normal $L$-subgroup of $\mu$.\\\\ \text{REMARK.} It is important to note that $\mu$ is a normal $L$-subgroup of $G$ if and only if $\mu\in NL(1_G)$ \vspace{.2cm} \begin{theorem} \label{lev_norsgp} Let $\eta \in L(\mu)$. Then, $\eta\in NL(\mu) \text{~if and only if each non-empty level subset~} \eta_a \\ \text {is a normal subgroup of~} \mu_a$. \end{theorem} \begin{definition} Let $\mu \in L^X$. Then, $\mu$ is to have sup-propery if for each $A \subseteq X$, there exists $a_0 \in A$ such that $ \mathop \vee \limits_{a \in A} {\mu(a) } = \mu(a_0)$. \end{definition} Lastly, recall the following from \cite{ajmal_gen, ajmal_sol}: \begin{theorem} \label{gen} Let $\eta\in L^{^{\mu}}.$ Let $a_{0}=\mathop {\vee}\limits_{x\in G}{\left\{\eta\left(x\right)\right\}}$ and define an $L$-subset $\hat{\eta}$ of $G$ by \begin{center} $\hat{\eta}\left(x\right)=\mathop{\vee}\limits_{a \leq a_{0}}{\left\{a \mid x\in\left\langle \eta_{a}\right\rangle\right\}}$. \end{center} \noindent Then, $\hat{\eta}\in L(\mu)$ and $\hat{\eta} =\left\langle \eta \right\rangle$. \end{theorem} \begin{theorem} \label{gen_sup} Let $\eta \in L^{\mu}$ and possesses the sup-property. If $a_0 = \mathop{\vee}\limits_{x \in G}\{\eta(x)\}$, then for all $b \leq a_0$, $\langle \eta_b \rangle = \langle \eta \rangle_b$. \end{theorem} \begin{theorem} \label{gen_hom1} Let $f : G \rightarrow H$ be a group homomorphism and let $\mu \in L(G)$. Then, for all $\eta \in L^{\mu}$, $\langle f(\eta) \rangle = f(\langle \eta \rangle).$ \end{theorem} \begin{theorem} \label{gen_hom2} Let $f : G \rightarrow H$ be a group homomorphism and let $\nu \in L(H)$. Then, for all $\theta \in L^{\nu}$, $\langle f^{-1}(\theta) \rangle = f^{-1}(\langle \theta \rangle).$ \end{theorem} \section{Maximal $L$-subgroups of an $L$-group} Prajapati and Ajmal \cite{prajapati_max1, prajapati_max2} have developed the notion of maximal $L$-ideals of an $L$-ring in the spirit similar to that of maximal ideals in classical ring theory. However, in the studies of $L$-subgroups such an effort is lacking. This provided us sufficient motivation for the development of maximal $L$-subgroups of an $L$-group. Here we formulate the maximal $L$-subgroup of an $L$-group. \begin{definition} Let $\mu \in L(G)$. A proper $L$-subgroup $\eta$ of $\mu$ is said to be a maximal $L$-subgroup of $\mu$ if whenever $\eta \subseteq \theta \subseteq \mu$ for some $\theta \in L(\mu)$, then either $\theta = \eta$ or $\theta = \mu$. \end{definition} The following result describes a relation of the tip of a maximal $L$-subgroup of an $L$-group $\mu$ with that of the tip of parent $L$-group $\mu$. \begin{proposition} Let $\eta \in L(\mu)$ be a maximal $L$-subgroup. Then, $\eta(e) = \mu(e)$ or $\eta(e)$ is a cover of $\mu(e)$. \end{proposition} \begin{proof} Let $\eta(e) \neq \mu(e)$ and suppose there exists $a_{1} \in L$ such that $\eta(e) < a_1 < \mu(e)$. Define $\theta : G \rightarrow L$ as follows: \[ \theta (x) = \begin{cases} a_1 & \text{if } x = e, \\ \eta(x) & \text{if } x \neq e. \end{cases} \] Now, the following is easy to verify: \begin{center} $\theta_a = \{ e \}$ if $a = a_1$ and $\theta_a =\eta_a $ if $a \neq a_1$. \end{center} \noindent Thus each non-empty level subset $\theta_a$ is a subgroup of $\mu_a$. Hence by Theorem \ref{lev_sgp}, $\theta \in L(\mu)$. Clearly, $\eta \subsetneq \theta$. Also, $\theta(e) < \mu(e)$ and hence $ \theta \subsetneq \mu$. This contradicts the maximality of $\eta$ in $\mu$. Hence $\mu(e)$ must be a cover of $\eta(e)$. \end{proof} The notion of maximal $L$-subgroup of an $L$-group has been illustrated in the following example: \begin{example} Let G be the quaternian group $Q_8$ given by : \begin{center} $Q_8=\{ \pm 1,\pm i, \pm j, \pm k \},$ \end{center} where $\ i^2=j^2=k^2=-1, ij=k, jk=i, kj=i$. Let $C=\{1,-1\}$ be the center of $G$ and $H=\{\pm 1, \pm i\}$. Let the evaluation lattice $L$ be the chain given by : $$ L: 0 < a < b < c < 1. $$ Define $L$-subsets $\mu$ and $\eta$ of $G$ as follows: \[ \mu (x)=\begin{cases} 1 & \text{if } x \in C, \\ b & \text{if } x \in H \setminus C,\\ a & \text{if } x \in G \setminus H. \end{cases} \] and \[ \eta (x)= \begin{cases} 1 & \text{if } x = 1,\\ c & \text{if } x \in C \setminus \{1\}, \\ b & \text{if } x\in H \setminus C,\\ a & \text{if } x\in G \setminus H. \end{cases} \] \noindent Since the non-empty level subsets of $\eta$ and $\mu$ are subgroups of $G$, $\eta$ and $\mu$ are $L$-subgroups of $G$. As $\eta \subseteq \mu$, $\eta$ is an $L$-subgroup of $\mu.$ We show that $\eta$ is a maximal $L$-subgroup of $\mu$. Suppose there exists $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subseteq \mu$. Then, since $\eta(x) = \mu(x)$ for all $x \neq -1$, we must have $\theta(-1) > c = \eta(-1)$ and $\theta(x) = \eta(x)$ for all $x \neq -1$. But then, we must have $\theta(-1) = 1 =\mu(e)$ and hence $\theta =\mu$. Thus there does not exist any $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subsetneq \mu$. We conclude that $\eta$ is a maximal $L$-subgroup of $\mu$. \end{example} \begin{remark} In order to study the level subsets of maximal $L$-subgroups of an $L$-group, we recall the notion of jointly supstar $L$-subsets from \cite{ajmal_nil}. It is worthwile to mention here that this notion is a generalization of the noion of sup-property and lends itself easily for applications \end{remark} \begin{proposition} \label{supchar} Let $\eta \in L^{\mu}$. Then, $\eta$ possesses the sup-property if and only if every subset of $\text{Im}~\eta$ is closed under arbitrary supremums. \end{proposition} \begin{definition} A non-empty subset $X$ of a lattice $L$ is said to be a supstar subset of $L$ if every non-empty subset $A$ of $X$ contains its supremum. \end{definition} \begin{definition} Let $\{ \eta_i \}_{i \in I}$ be a family of $L$-subsets of $\mu$. Then, $\{\eta_i\}_{i \in I}$ is said to be a supstar family if $\bigcup\limits_{i \in I}^{} \text{Im}~\eta_i$ is a supstar subset of $L$. As a particular case, we say that two $L$-subsets $\eta$ and $\theta$ are jointly supstar if $\text{Im}~\eta \cup \text{Im}~\theta$ is a supstar subset of $L$. \end{definition} In the following theorem, we describe level subsets of maximal $L$-subgroups of an $L$-group: \begin{theorem} \label{max_sup1} Let $\eta \in L(\mu)$ be such that $\mu$ and $\eta$ are jointly supstar. Let $\eta$ be a maximal $L$-subgroup of $\mu$. Then, there exists exactly one $a_0 \in \text{Im}~\mu$ such that $\eta_{a_0} \subsetneq \mu_{a_0}$ and for all other $a \in \text{Im}~\mu \cup \text{Im}~\eta$, $\eta_a = \mu_a$. \end{theorem} \begin{proof} Since $\eta$ is a maximal $L$-subgroup of $\mu$, $\eta \subsetneq \mu$. Hence there exists $x \in G$ such that $\eta(x) < \mu(x)$. Let $a_0 = \mu(x)$. Then, $a_0 \in \text{Im}~\mu$ and $x \in \mu_{a_0} \setminus \eta_{a_0}$. Hence $\eta_{a_0} \subsetneq \mu_{a_0}$. Now, let $a_1 \in \text{Im}~\mu\cup \text{Im}~\eta$ such that $a_1 \neq a_0$ and $\eta_{a_1} \subsetneq \mu_{a_1}$. Since $\{ a_0, a_1 \} \subseteq \text{Im}~\mu \cup \text{Im}~\eta$ and by the hypothesis $\eta$ and $\mu$ are jointly supstar, it follows that \[ a_0 \vee a_1 = a_0 \text{ or } a_1. \] Without loss of generality, we may assume that \[ a_0 \vee a_1 = a_1, \] that is, $a_0 < a_1$. Define $\theta : G \rightarrow L$ as follows : \[ \theta(x) = \{\eta(x) \vee a_0\} \wedge \mu(x) \text{~~~for all~} x \in G.\] Firstly, we show that $\theta \in L(G)$. Let $x$, $y \in G$. Then, \begin{equation*} \begin{split} \theta(xy) & = \{\eta(xy) \vee a_0\} \wedge \mu(xy) \\ & \geq \{(\eta(x) \wedge \eta(y)) \vee a_0 \} \wedge \{ \mu(x) \wedge \mu(y) \} \\ & = \{ (\eta(x) \vee a_0) \wedge (\eta(y) \vee a_0) \} \wedge \{ \mu(x) \wedge \mu(y) \} \\ & = \{ (\eta(x) \vee a_0) \wedge \mu(x) \} \wedge \{ (\eta(y) \vee a_0) \wedge \mu(y) \} \\ & = \theta(x) \wedge \theta(y). \end{split} \end{equation*} Also, \[ \theta(x^{-1}) = \{\eta(x^{-1}) \vee a_0\} \wedge \mu(x^{-1}) =\{\eta(x) \vee a_0\} \wedge \mu(x) = \theta(x). \] Hence $\theta \in L(G)$. Now, \[ \eta(x) \leq \eta(x) \vee a_0 \text{~ and ~} \eta(x) \leq \mu(x) ~~~~~\text{~for all~} x \in G. \] Therefore \[ \eta(x) \leq (\eta(x) \vee a_0) \wedge \mu(x) = \theta(x) \leq \mu(x) \text{~~~for all~} x \in G, \] that is, $\eta \subseteq \theta \subseteq \mu$. Now, since $\eta_{a_0} \subsetneq \mu_{a_0}$, there exists $x_0 \in \mu_{a_0}$ such that $x_0 \notin \eta_{a_0}$. As $\eta$ and $\mu$ are jointly supstar and $\{ \eta(x_0), a_0 \} \subseteq \text{Im}~\mu \cup \text{Im}~\eta$, it follows that \[ \eta(x_0) \vee a_0 = \eta(x_0) \text{ or } a_0. \] However, $\eta(x_0) \vee a_0 \neq \eta(x_0)$. For, if $\eta(x_0) \geq a_0$, then $x_0 \in \eta_{a_0}$, which is contrary to our assumption that $x_0 \notin \eta_{a_0}$. Therefore $\eta(x_0) \vee a_0 = a_0$. Hence \begin{equation*} \begin{split} \theta(x_0) & = (\eta(x_0) \vee a_0) \wedge \mu(x_0) \\ & = a_0 \wedge \mu(x_0) \\ & = a_0 > \eta(x_0). \end{split} \end{equation*} Similarly, there exists $x_1 \in G$ such that $x_1 \in \mu_{a_1} \setminus \eta_{a_1}$. According to our assumption, $a_1 > a_0$. Also, since $\{\eta(x_1), a_1 \} \subseteq \text{Im}~\mu \cup \text{Im}~\eta$, by similar reasoning as above, $\eta(x_1) < a_1$. Therefore \[ \theta(x_1) = (\eta(x_1) \vee a_0) \wedge \mu(x_1) = \eta(x_1) \vee a_0. \] Again, as $\eta$ and $\mu$ are jointly supstar, $\eta(x_1) \vee a_0 = \eta(x_1)$ or $a_0$. In either case, $\eta(x_1) \vee a_0 < a_1$. Hence \[ \theta(x_1) = \eta(x_1) \vee a_0 < a_1 \leq \mu(x_1), \] which implies that $\theta \subsetneq \mu$. Consequently, there exists $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subsetneq \mu$. But this contradicts the maximality of $\eta$. Therefore there exists exactly one $a_0 \in \text{Im}~\mu$ such that $\eta_{a_0} \subsetneq \mu_{a_0}$ and for all other $a \in \text{Im}~\mu \cup \text{Im}~\eta $, $\eta_a = \mu_a$. \end{proof} \begin{theorem} \label{max_sup2} Let $\eta \in L(\mu)$ be such that $\mu$ and $\eta$ are jointly supstar. Let $\eta$ be a maximal $L$-subgroup of $\mu$ and $\eta(e) = \mu(e)$. Then, there exists exactly one $a_0 \in \text{Im}~\mu$ such that $\eta_{a_0}$ is a maximal subgroup of $\mu_{a_0}$ and for all other $a \in \text{Im}~\mu \cup \text{Im}~\eta $, $\eta_a = \mu_a$. \end{theorem} \begin{proof} By theorem \ref{max_sup1}, there exists exactly one $ a_0 \in \text{Im}~\mu$ such that $\eta_{a_0} \subsetneq \mu_{a_0}$ and for all other $a \in \text{Im}~\mu \cup \text{Im}~\eta$, $\eta_a = \mu_a$. Clearly, $\mu_{a_0}$ is non-empty. As $ a_0 \leq \mu(e) = \eta(e)$, $\eta_{a_0}$ is also non-empty. Suppose, if possible, that $\eta_{a_0}$ is not a maximal $L$-subgroup of $\mu_{a_0}$. Then, there exists a subgroup $A$ of $G$ such that $\eta_{a_0} \subsetneq A \subsetneq \mu_{a_0}$. Define $\theta : G \rightarrow L$ as follows: \[ \theta(x) = \begin{cases} \eta(x) & \text{if } x \in \eta_{a_0} \cup (G \setminus A), \\ a_0 & \text{if } x \in (A \setminus \eta_{a_0}) \end{cases} \] for all $x \in G$. Firstly, we show that $\eta \subsetneq \theta \subsetneq \mu$. Let $x \in G$. If $x \in \eta_{a_0} \cup (G \setminus A)$, then $\theta(x) = \eta(x)$. If $x \in A \setminus \eta_{a_0}$, then $\theta(x) = a_0$. Note that $\{\eta(x), a_0 \} \subseteq \text{Im}~\eta \cup \text{Im}~\mu$. Since $\eta$ and $\mu$ are jointly supstar, $\eta(x) \vee a_0 = \eta(x) \text{~or~} a_0$. Since, $x \notin \eta_{a_0}$, it follows that \[\theta(x) = a_0 > \eta(x).\] \noindent Therefore $\eta \subsetneq \theta$. For $x \in G$, if $x \in \eta_{a_0} \cup (G \setminus A)$, then $\theta(x) = \eta(x) \leq \mu(x)$. If $x \in A \setminus \eta_{a_0} \subsetneq \mu_{a_0} \setminus \eta_{a_0}$, then $\theta(x) = a_0 \leq \mu(x)$. Therefore $\theta \subseteq \mu$. Now, for $x \in \mu_{a_0} \setminus A$, \[\theta(x) = \eta(x) < a_0 \leq \mu(x).\] \noindent Hence $\theta \subsetneq \mu$. Thus we have established that \[\eta \subsetneq \theta \subsetneq \mu.\] Now, we show that $\theta \in L(\mu)$. In view of Theorem \ref{lev_sgp}, it is sufficient to show that each non-empty level subset $\theta_a$ is a subgroup of $\mu_{a}$. Hence let $\theta_{a}$ be non-empty level subset of $\mu_{a}$. We have the following cases: \begin{case} $a = a_0$. We show that \[ \theta_{a_0} = A. \] \noindent Let $x \in \theta_{a_0}$. Then, $\theta(x) \geq a_0$. By definition of $\theta$, either $\theta(x) = \eta(x)$ or $\theta(x) = a_0$. This implies that \[ x \in \eta_{a_0} \cup (A \setminus \eta_{a_0}) = A.\] \noindent Therefore $\theta_a \subseteq A$. For the reverse inclusion, let $x \in A$. Then, $x \in \eta_{a_0}$ or $x \in (A \setminus \eta_{a_0})$. In either case, $\theta(x) \geq a_0$, that is, $x \in \theta_a$. Thus $ A \subseteq \theta_a$. \end{case} \begin{case}$a > a_0$. We show that \[\theta_a = \eta_a.\] \noindent Since $\eta \subseteq \theta$, $\eta_a \subseteq \theta_a$. For the reverse inclusion, let $x \in \theta_a$. Then, $\theta(x) \geq a > a_0$. By definition of $\theta$, $\eta(x) = \theta(x) > a$, that is, $x \in \eta_a$. Thus $\theta_a = \eta_a$. \end{case} \begin{case} $a < a_0$ and there exists no $a_1 \in \text{Im}~\eta$ such that $a \leq a_1 < a_0$. We show that \[\theta_a = A.\] \noindent Let $x \in \theta_a$. Then, $\theta(x) \geq a $. This implies either $\theta(x) \geq a_0$ or $ a \leq \theta(x) < a_0$. If $\theta(x) \geq a_0$, then by the definition of $\theta$, \[x \in \eta_{a_0} \cup (A \setminus \eta_{a_0}) = A. \] \noindent On the other hand, if $a \leq \theta(x) < a_0$, then $\theta(x) = \eta(x)$ and we have $a \leq \eta(x) < a_0$. However, this contradicts the assumption that there is no $a_1 \in \text{Im}~\eta$ such that $a \leq a_1 <a_0$. Consequently, $\theta(x) \geq a_0$ so that $x \in \theta_{a_0} $. But by Case 1, $\theta_{a_0} = A$. This esablishes that \[\theta_a \subseteq A.\] \noindent For the reverse inclusion, let $x \in A$. Then, $x \in \eta_{a_0} \cup (A \setminus \eta_{a_0})$. If $x \in \eta_{a_0}$, then $\theta(x) = \eta(x) \geq a_0 > a$. If $x \in A \setminus \eta_{a_0}$, then $\theta(x) = a_0 > a$. Thus \begin{center} $x \in \theta_a$ for all $x \in A$. \end{center} Hence $A \subseteq \theta_a$. \end{case} \begin{case} $a < a_0$ and there exists $a_1 \in \text{Im}~\eta$ such that $a \leq a_1 < a_0$. We show that \[\theta_a = \eta_a.\] \noindent Since $\eta \subsetneq \theta$, $\eta_a \subseteq \theta_a$. For the reverse inclusion, let $x \in \theta_a$, that is, $\theta(x) \geq a$. Then, either $\theta(x) \geq a_0$ or $a \leq \theta(x) < a_0$. If $\theta(x) \geq a_0$, then $x \in \theta_{a_0} = A$ (in view of Case 1). Since $a_1 \in \text{Im}~\eta$ and $a_1 < a_0$, $\eta_{a_0} \subsetneq \eta_{a_1} \subseteq \mu_{a_1}$. By theorem \ref{max_sup1}, $\eta_{a_1} = \mu_{a_1}$. Thus \[A \subsetneq \mu_{a_0} \subseteq \mu_{a_1} = \eta_{a_1} \subseteq \eta_a,\] \noindent and hence $x \in \eta_a$. On the other hand, if $\theta(x) < a_0$, then, by the definition of $\theta$, $\eta(x) = \theta(x) \geq a$ and hence $x \in \eta_a$. Therefore in either case, $x \in \eta_a$, so that $\theta_a \subseteq \eta_a.$ \end{case} \begin{case} $a$ is incomparable to $a_0$. We show that \[\theta_a = \eta_a.\] \noindent Since $\eta \subsetneq \theta$, hence $\eta_a \subseteq \theta_a$. For reverse inclusion, let $x \in \theta_a$. Since $a$ is incomparable with $a_0$, $\theta(x) \neq a_0$. Hence by definition of $\theta$, \[\eta(x) = \theta(x) \geq a.\] \noindent Thus $x \in \eta_a$, so that $\theta_a \subseteq \eta_a$. \end{case} \noindent In all the cases, $\theta_a = \eta_a$ or $\theta_a = A$. Hence $\theta_a$ is a subgroup of $\mu_{a}$. Therefore by Theorem \ref{lev_sgp}, $\theta \in L(\mu)$. Consequently, there exists $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subsetneq \mu$. However, this contradicts the maximality of $\eta$ in $\mu$. Hence the result. \end{proof} The converse of Theorem \ref{max_sup2} does not hold. This is illustrated in the following example: \begin{example} Let G be the quaternian group $Q_8$. Let $C=\{1,-1\}$ be the center of $G$ and $H=\{\pm 1, \pm i\}$. Let the evaluation lattice $L$ be the chain given by : $$ L: 0 < a < b < c < 1. $$ Define $L$-subsets $\mu$ and $\eta$ of $G$ as follows: $$ \mu (x)=\left \{ \begin{array}{ll} 1 & {\rm if } \ x\in C,\\ c & {\rm if } \ x\in H\setminus C,\\ a & {\rm if} \ x\in G\setminus H; \end{array} \right. $$ and $$ \eta (x)=\left \{ \begin{array}{ll} 1 & {\rm if } \ x \in C,\\ a & {\rm if } \ x\in G\setminus C.\\ \end{array} \right. $$ \noindent Since the non-empty level subsets of $\eta$ and $\mu$ are subgroups of $G$, $\eta$ and $\mu$ are $L$-subgroups of $G$. As $\eta \subseteq \mu$, $\eta$ is an $L$-subgroup of $\mu.$ Note that $\text{Im}~\mu \cup \text{Im}~\eta = \{1,a,c\}$. Next, we observe that \begin{align*} \eta_{a} &= ~G~ = \mu_{a},\\ \eta_{1} &= ~C ~=\mu_{1}; \end{align*} and, $\eta_{c} = C \subsetneq \mu_{c} = H$ is maximal. Thus there exists exactly one $t_0 \in \text{Im}~\mu$ such that $\eta_{t_0}$ is a maximal subgroup of $\mu_{t_0}$ and for all other $ t \in \text{Im}~\mu \cup \text{Im}~\eta $, $\eta_t = \mu_t$. However, $\eta$ is not a maximal $L$-subgroup of $\mu$. For, define an $L$-subset $\theta$ of $G$ as follows: $$ \theta (x)=\left \{ \begin{array}{ll} 1 & {\rm if } \ x\in C,\\ b & {\rm if } \ x\in H\setminus C,\\ a & {\rm if} \ x\in G\setminus H. \end{array} \right. $$ \noindent Then, $\theta \in L(\mu)$ and $\eta \subsetneq \theta \subsetneq \mu$. \end{example} Below, we provide a sufficient condition for an $L$-subgroup to be maximal. \begin{theorem} \label{max_suff} Let $\eta \in L(\mu)$ such that $\eta(e) = \mu(e)$ and there exists exactly one $a_0 \leq \mu(e)$ satisfying $\eta_{a_0}$ is a maximal subgroup of $\mu_{a_0}$ and for all other $a \leq \mu(e)$, $\eta_{a} = \mu_{a}$. Then, $\eta$ is a maximal $L$-subgroup of $\mu$. \end{theorem} \begin{proof} Suppose there exists $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subseteq \mu$. Then, there exists $x_0 \in G$ such that $\eta(x_0) < \theta(x_0)$. Let $\theta(x_0) = b$. Then, $\eta_b \subsetneq \theta_b \subseteq \mu_b$. Since $\eta_a = \mu_a$ for all $a \neq a_0$, we must have $b = a_0$. Hence $\eta_{a_0} \subsetneq \theta_{a_0} \subseteq \mu_{a_0}$. By hypothesis, $\eta_{a_0}$ is a maximal subgroup of $\mu_{a_0}$. Hence $\theta_{a_0} = \mu_{a_0}$. Thus $\theta_a = \mu_a$ for all $a \leq \mu(e)$ and we conclude that $\theta = \mu$. \end{proof} The following theorem extends a well known result of classical group theory to the $L$-setting. Here we note that for $\eta \in L^{\mu}$ and $a_x \in \mu$, $\langle \eta, a_x \rangle$ is defined as the $L$-subgroup generated by $\eta \cup a_x$. \begin{theorem} \label{max_lpt} Let $\eta\in L(\mu)$. Then, $\eta$ is maximal in $\mu$ if and only if $\langle \eta, a_x \rangle = \mu$ for all $L$-points $a_x\in\mu$ such that $a_x\notin\eta$. \end{theorem} \begin{proof} Let $\eta$ be a maximal $L$-subgroup of $\mu$ and let $a_x\in\mu$ such that $a_x\notin\eta$. Then, for all $y \in G$, \[ (\eta \cup a_x) (y) = \begin{cases} \eta(x) \vee a & \text{if }y=x,\\ \eta(y) & \text{if }y \neq x.\\ \end{cases} \] Hence $\eta \subsetneq \langle \eta, a_x \rangle$. Since $\eta$ is maximal in $\mu$, we must have $\langle \eta, a_x \rangle = \mu$. \noindent Conversely, let $\langle \eta, a_x\rangle = \mu$ for all $L$-points $a_x \in \mu$ such that $a_x \notin \eta$. Let $\theta \in L(\mu)$ such that $\eta \subsetneq \theta \subseteq \mu$. Then, for some $x_0 \in G$, $\eta(x_0)<\theta(x_0)\leq\mu(x_0)$. Let $a=\theta(x_0)$. Then, $a_{x_0}\in \mu$ and $a_{x_0}\notin\eta$. By the hypothesis, $\langle \eta, a_{x_0} \rangle = \mu$. Since, $\eta \subsetneq \theta$ and $a_{x_0} \in \theta$, we get $\eta\cup a_{x_0} \subseteq \theta$. Hence $\langle \eta, a_{x_0} \rangle \subseteq \theta$. Thus \[ \mu = \langle \eta, a_{x_0} \rangle \subseteq \theta \subset \mu. \] \end{proof} \begin{theorem} \label{max_hom} Let $f : G \rightarrow H$ be a group isomorphism. Let $\mu \in L(G)$ and $\nu \in L(H)$. \begin{enumerate} \item[{(i)}] If $\eta$ is a maximal $L$-subgroup of $\mu$, then $f(\eta)$ is a maximal $L$-subgroup of $f(\mu)$. \item[{(ii)}] If $\theta$ is a maximal $L$ subgroup of $\nu$, then $f^{-1}(\theta)$ is a maximal $L$-subgroup of $f^{-1}(\nu)$. \end{enumerate} \end{theorem} \begin{proof} \begin{enumerate} \item[{(i)}] Suppose there exists $\sigma \in L(f(\mu))$ such that $f(\eta) \subseteq \sigma \subseteq f(\mu)$. By Proposition \ref{hom}, $\eta \subseteq f^{-1}(\sigma)$ and $f^{-1}(\sigma) \subseteq \mu$. Thus \[ \eta \subseteq f^{-1}(\sigma) \subseteq \mu. \] By Theorem \ref{hom_gp}, $f^{-1}(\sigma) \in L(\mu)$. Since $\eta$ is a maximal $L$-subgroup of $\mu$, either $f^{-1}(\sigma) = \eta$ or $f^{-1}(\sigma) = \mu$. Since $f$ is a surjection, $\sigma = f(f^{-1}(\sigma))$. Thus either $\sigma = f(\eta)$ or $\sigma = f(\mu)$. \item[{(ii)}] Suppose there exists $\tau \in L(\mu)$ such that $f^{-1}(\theta) \subseteq \tau \subseteq f^{-1}(\nu)$. By Proposition \ref{hom}, $\theta \subseteq f(\tau)$ and $f(\tau) \subseteq \nu$. Thus \[ \theta \subseteq f(\tau) \subseteq \nu. \] By Theorem \ref{hom_gp}, $f(\tau) \in L(\nu)$. Since $\theta$ is a maximal $L$-subgroup of $\nu$, either $f(\tau) = \theta$ or $f(\tau) = \nu$. Since $f$ is injective, $\tau = f^{-1}(f(\tau))$. Thus either $\tau = f^{-1}(\theta)$ or $\tau = f^{-1}(\nu)$. Hence the result. \end{enumerate} \end{proof} \section{Frattini $L$-subgroup of an $L$-group} In this section, we apply the notion of maximal $L$-subgroups to develop the notion of Frattini $L$-subgroups like their classical counterparts. \begin{definition} Let $\mu \in L(G)$. The Frattini $L$-subgroup $\Phi(\mu)$ of $\mu$ is defined to be the intersection of all maximal $L$-subgroups of $\mu$. If $\mu$ has no maximal $L$-subgroups, then we set $\Phi(\mu)=\mu$. \end{definition} \begin{example} \label{eg1} Let $G=D_8$, where $D_8$ denotes the dihedral group of order 8, that is, \[D_8= \langle r,s~|~r^4=s^2=e,~rs=sr^{-1} \rangle. \] Let the evaluation lattice $L$ be the chain of five elements given by \[ L : 0<a<b<c<1. \] \noindent Let $C=\{e, r^2\}$ be the center of $D_8$ and $K=\{e, r^{2}, s, sr^{2} \}$ be the Klein-4 subgroup of $D_8$. Define $\mu : G \rightarrow L$ as follows: \[ \mu(x) = \begin{cases} 1 & \text{if } x=e,\\ c & \text{if } x \in C \setminus \{e\},\\ b & \text{if } x \in K \setminus C,\\ a & \text{if } x \in G \setminus K.\\ \end{cases} \] Since each non-empty level subset $\mu_t$ is a subgroup of $G$, by Theorem \ref{lev_gp}, $\mu \in L(G)$. We determine the Frattini $L$-subgroup of $\mu$. For this, we firstly determine all the maximal $L$-subgroups of $\mu$. Now, define the following $L$-subsets of $D_{8}$ : \[ \eta_{1}(x) = \begin{cases} 1 & \text{if } x=e,\\ b & \text{if } x \in K \setminus \{e\}, \\ a & \text{if } x \in G \setminus K; \end{cases} \] \[ \eta_{2}(x) = \begin{cases} 1 & \text{if } x=e,\\ c & \text{if } x \in C \setminus \{e\},\\ a & \text{if } x \in G \setminus C;\\ \end{cases} \] \[ \eta_{3}(x) = \begin{cases} 1 & \text{if } x=e,\\ c & \text{if } x \in C \setminus \{e\},\\ b & \text{if } x \in K \setminus C,\\ 0 & \text{if } x \in G \setminus K. \end{cases} \] \noindent Clearly, $\eta_{i}\subseteq \mu$ for each $i$. Moreover, each non-empty level subset $(\eta_{i})_{t}$ is a subgroup of $\mu_{t}$, so by Theorem \ref{lev_sgp}, $\eta_{i} \in L(\mu)$ for each $i$. Further, observe that $\eta_{i}(e)=\mu(e)$ for each $i$ and \begin{align*} (\eta_{1})_{c} \text{ is a maximal subgroup of } \mu_{c} \text{~~and~~} (\eta_{1})_{t} &= \mu_{t} \text{~~for all~~} t \in L \setminus \{c\},\\ (\eta_{2})_{b} \text{ is a maximal subgroup of } \mu_{b} \text{~~and~~} (\eta_{2})_{t} &= \mu_{t} \text{~~for all~~} t \in L \setminus \{b\},\\ (\eta_{3})_{a} \text{ is a maximal subgroup of } \mu_{a} \text{~~and~~} (\eta_{3})_{t} &= \mu_{t} \text{~~for all~~} t \in L \setminus \{a\}. \end{align*} By Theorem \ref{max_suff}, each $\eta_i$ is a maximal $L$-subgroup of $\mu$. Next, we show that $\eta_i$ are the only maximal $L$-subgroups of $\mu$ satisfying $\eta_i(e) = \mu(e)$. Suppose $\theta$ is a maximal $L$-subgroup of $\mu$ with $\theta(e) = \mu(e)$. Clearly, $\theta$ and $\mu$ are jointly supstar. Hence by theorem \ref{max_sup2}, there exists exactly one $t_0 \in \text{Im}~\mu$ such that $\theta_{t_0}$ is a maximal $L$-subgroup of $\mu_{t_0}$ and for all other $t \in \text{Im}~\theta \cup \text{Im}~\mu$, $\theta_t = \mu_t$. Note that $\text{Im}~\mu = \{a, b, c, 1\}.$ Firstly, observe $t_0\neq 1$, for if $t_0 = 1$, then $\mu_1 = \{e\}$ and $\mu_{t_0}$ has no maximal subgroups. Now, the following can be easily verified: \begin{align*} \text{if } t_0 &= c, \text{ then } \theta = \eta_1;\\ \text{if } t_0 &= b, \text{ then } \theta = \eta_2;\\ \text{if } t_0 &= a, \text{ then } \theta = \eta_3. \end{align*} Consequently, $\eta_1, \eta_2$ and $\eta_3$ are the only maximal $L$-subgroups of $\mu$ such that $\eta_i(e) =\mu(e)$. \noindent Finally, define $\eta_4 : G \rightarrow L$ by \[ \eta_4(x) = \begin{cases} c & \text{if } x \in C, \\ b & \text{if } x \in K \setminus C,\\ a & \text{if } x \in G \setminus K.\\ \end{cases} \] Then, $\eta_4(e) \neq \mu(e)$ and by the definition of $\eta_4$ and $\mu$, it is evident that $\eta_4$ is a maximal $L$-subgroup of $\mu$. Thus we have determined all the maximal $L$-subgroups of $\mu$. Consequently, the Frattini $L$-subgroup of $\mu$ is given by: \[ \Phi(\mu) = \begin{cases} c & \text{if } x=e,\\ b & \text{if } x \in C \setminus \{e\},\\ a & \text{if } x \in K \setminus C,\\ 0 & \text{if } x \in G \setminus K. \end{cases} \] \end{example} In classical group theory, the Frattini subgroup has an interesting relation to the concept of non-generators. In fact, the Frattini subgroup $\Phi(G)$ of a group $G$ turns out to be the subgroup of all non-generators of $G$. Here, we introduce the definition of a non-generator of an $L$-group $\mu$ and establish its above mentioned relation with the Frattini $L$-subgroup like their classical counterparts. \begin{definition} An $L$-point $a_x\in\mu$ is said to be a non-generator of $\mu$ if, whenever $\langle \eta, a_x \rangle = \mu$ for $\eta\in L^{\mu}$, then $\langle \eta \rangle = \mu$. \end{definition} Below, we prove that the set of all non-generators of $\mu$ is an $L$-subgroup of $\mu$: \begin{theorem} Let $\mu \in L(G)$. Then, \[ \bigcup \{ a_x \mid a_x \text{ is a non generator of } \mu \} \] is an $L$-subgroup of $\mu$. \end{theorem} \begin{proof} Let $\lambda = \bigcup\{a_x \mid a_x \text{ is a non-generator of } \mu\}$. Firstly, we show \begin{center}if $a_x$ and $b_y$ are non-generators of $\mu$, then $a_x \circ b_y $ is also a non-generator of $\mu$.\end{center} So, let $a_x$ and $b_y \in \mu$ be non-generators and suppose $\eta \in L^{\mu}$ such that \[\langle \eta, a_x \circ b_y \rangle = \mu. \] Then, as $a_x, b_y \in \langle \eta,a_x,b_y \rangle$, we have \[ \langle \eta,a_x,b_y \rangle (xy) \geq \langle \eta,a_x,b_y \rangle (x) \wedge \langle \eta,a_x,b_y \rangle (y) \geq a \wedge b. \] This implies \[ a_x \circ b_y =(a \wedge b)_{xy} \in \langle \eta,a_x,b_y \rangle. \] Therefore \[ \eta \cup a_x \circ b_y \subseteq \langle \eta,a_x,b_y \rangle. \] Hence it follows that \[ \mu = \langle \eta,a_x \circ b_y \rangle \subseteq \langle \eta,a_x,b_y \rangle =\mu. \] In view of the fact that $a_x$ and $b_y$ are non-generators of $\mu$, it follows that \[ \mu = \langle \eta,a_x \circ b_y \rangle = \langle \eta,a_x,b_y \rangle = \langle \eta,a_x \rangle = \langle \eta \rangle. \] This proves the claim. Next, to show that $\lambda$ is an $L$-subgroup of $\mu$, consider \begin{equation*} \begin{split} \lambda(xy) & = \vee \{c \mid c_{xy} \text{ is a non-generator of } \mu \} \\ & \geq \vee \{ a \wedge b \mid a_x \text{ and } b_y \text{ are non-generators of } \mu \} \\ & \geq \{ \vee \{ a \mid a_x \text{ is a non-generator of }\mu\} \} \wedge \{ \vee \{ b \mid b_y \text{ is a non-generator of }\mu\} \} \\ &~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (\text{as $L$ is a completely distributive lattice})\\ & = \lambda(x) \wedge \lambda(y) \end{split} \end{equation*} Next, we show that \[ \langle \eta,a_{x^{-1}} \rangle = \langle \eta,a_x \rangle. \] Note that $a_x \in \langle \eta, a_x \rangle$. Hence \[ \langle \eta, a_x \rangle (x^{-1}) = \langle \eta, a_x \rangle (x) \geq a. \] This implies $a_{x^{-1}} \in \langle \eta, a_x \rangle$ so that $\langle \eta, a_{x^{-1}} \rangle \subseteq \langle \eta, a_x \rangle$. Similarly, $\langle \eta, a_x \rangle \subseteq \langle \eta, a_{x^{-1}} \rangle$. Thus \[ \langle \eta, a_{x^{-1}} \rangle = \langle \eta, a_x \rangle. \] Hence $ \lambda(x^{-1}) = \lambda(x)$ for all $x \in G$. Consequently, $\lambda \in L(\mu)$. \end{proof} Recall that a chain is said to be upper well ordered if every non-empty subset of the given chain has a supremum. Clearly, every subset of an upper well ordered chain is a supstar subset. Consequently, by Proposition \ref{supchar}, each $L$-subset $\eta$ of an upper well ordered chain $L$ satisfies sup-property. In fact, we have the following : \label{new} \begin{proposition} Let $L$ be an upper well ordered chain. Then, any family $\{\eta_{i}\}_{i \in I} \subseteq L^\mu$ is a supstar family. \end{proposition} \begin{lemma} \label{zrn} Let $L$ be an upper well-ordered chain and let $\mu$ be an $L$-subgroup of $G$. Suppose that $\theta \in L(\mu)$ and let $a_x$ be an $L$-point of $\mu$ such that $a_x \notin \theta$. Then, there exists $\eta \in L(\mu)$ such that $\eta$ is maximal with respect to the conditions $\theta \subseteq \eta$ and $a_x \notin \eta$. \end{lemma} \begin{proof} Consider the set $S = \{ \nu \in L(\mu) \mid \theta \subseteq \nu \text{ and } a_x \notin \nu \}$. Then, $S$ is non-empty since $\theta \in S$. Also, $S$ is partially ordered by the $L$-set inclusion $\subseteq$. Let $C = \{ \theta_i \}_{i \in I}$ be a chain in $S$. Then, we claim that \[\bigcup_{i \in I} \theta_i \in S. \] Firstly, we show that $\bigcup_{i \in I} \theta_i \in L(\mu)$. For this, let $x, y \in G$ and consider \begin{align*} \bigcup_{ {i \in I}} \theta_{i}~(xy) &= \bigvee_{i\in I} \theta_{i}(xy)\\ &\geq \bigvee_{i\in I} \{\theta_{i}(x) \wedge \theta_{i}(y)\}\\ &= \bigvee_{i\in I} \theta_{i}(x) \text{~or~} \bigvee_{i\in I} \theta_{i}(y) \end{align*}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \text{(as $L$ is a chain, $\theta_{i}(x) \wedge \theta_{i}(y) = \theta_{i}(x) $ or $\theta_{i}(y) $)} \begin{align*} ~~~~~~~~~~~~~~~~~~~~~~~ &\geq \left\{ \bigvee_{i\in I} \{\theta_{i}(x)\} \right\} \bigwedge \left\{\bigvee_{i\in I} \{\theta_{i}(y)\}\right\}\\ &= \bigcup_{{i \in I}}\theta_i(x) \bigwedge \bigcup_{{i \in I}}\theta_i(y). \end{align*} As $\theta_{i} \in L(\mu)$, it follows that $$\bigcup_{ {i \in I}} \theta_{i}~(x^{-1})=\bigcup_{ {i \in I}} \theta_{i}~(x).$$ \noindent Now, it is clear that $\theta \subseteq \bigcup_{i \in I} \theta_i$. Also, since $L$ is upper well-ordered and $a_x \notin \theta_i$ for all $i \in I$, $a_x \notin \bigcup_{i \in I} \theta_i$. Hence $\bigcup_{i \in I} \theta_i \in S$ so that every chain in $S$ has an upper bound. Therefore by Zorn's lemma, $S$ has a maximal element $\eta$. This proves the result. \end{proof} \begin{theorem} \label{fra_lpt} Let $\mu \in L(G)$ and let $\lambda$ be the $L$-subgroup of non-generators of $\mu$. Then, \[ \lambda \subseteq \Phi(\mu). \] The equality holds if $L$ is an upper well ordered chain. \end{theorem} \begin{proof} Let $a_x \in \mu$ be a non-generator of $\mu$ and let $\eta$ be a maximal subgroup of $\mu$. Suppose, if possible, that $a_x \notin \eta$. Then, by Theorem \ref{max_lpt}, $\langle \eta,a_x \rangle =\mu$. However, since $a_x$ is a non-generator of $\mu$, we get \[ \mu = \langle \eta,a_x \rangle = \langle \eta \rangle = \eta = \mu, \] which contradicts the assumption that $\eta$ is a maximal $L$-subgroup of $\mu$. Thus $a_x \in \eta$ for all maximal subroups of $\mu$. It follows that \[ \lambda(x) = \bigcup\{a_x \mid a_x \text{ is a non-generator of } \mu\} \subseteq \Phi(\mu). \] Next, suppose that $L$ is an upper well ordered chain and let $x \in G$. Let $b = \Phi(\mu)(x)$. Then, $b_x \in \Phi(\mu)$. We show that $b_x$ is a non-generator of $\mu$. Suppose, if possible, that there exists $\eta \in L^{\mu}$ such that $\mu = \langle \eta, b_x \rangle$ and $\mu \neq \langle \eta \rangle$. Then, $b_x \notin \langle \eta \rangle$ and hence by Lemma \ref{zrn}, there exists an $L$-subgroup $\theta$ of $\mu$ which is maximal subject to the conditions $\langle \eta \rangle \subseteq \theta$ and $b_x \notin \theta$. We show that $\theta$ is a maximal $L$-subgroup of $\mu$. \noindent If $\theta \subsetneq \nu \subseteq \mu$ for some $\nu \in L(\mu)$, then $\eta \subseteq \langle \eta \rangle \subseteq \nu$. Since $\theta$ is maximal with respect to the conditions that $\langle \eta \rangle \subseteq \theta$ and $b_x \notin \theta$, we must have $b_x \in \nu$. This implies that $\mu = \langle \eta, b_x \rangle \subseteq \nu$ and hence $ \nu = \mu$. Consequently, $\theta$ is a maximal $L$-subgroup of $\mu$. But by the maximality of $\theta$, it follows that \[ b_x \in \Phi(\mu) = \bigcap \{ \eta_i \mid \eta_i \text{ is a maximal $L$ -subgroup of } \mu \} \subseteq \theta, \] contradicting the assumption that $b_x \notin \theta$. Hence $b_x$ is a non-generator of $\mu$. Therefore \[ \lambda(x) = \bigvee\{a \mid a_x \text{ is a non-generator of } \mu\} \geq b = \Phi(\mu)(x). \] \end{proof} In the following example, we construct the Frattini $L$-subgroup $\Phi(\mu)$ of an $L$-group $\mu$ by using the concept of non-generators: \begin{example} \label{eg2} Consider $\mu \in L(G)$ as given in Example \ref{eg1}. Firstly, we note that $L$ being a finite chain is upper well-ordered. We determine the $L$-subgroup of non-generators $\lambda$ of $\mu$. \noindent We show that $\lambda(r^2) = b$. For this, we claim that $b_{r^2}$ is a non-generator of $\mu$. Let $\theta \in L^{\mu}$ such that $\langle \theta, b_{r^2} \rangle = \mu$. Since $L$ is a finite chain, $\theta \cup b_{r^2}$ possesses the sup-property. Hence by Theorem \ref{gen_sup}, \[ \langle (\theta \cup b_{r^2})_c \rangle = \langle \theta, b_{r^2} \rangle_c = \langle \mu \rangle_c = \mu_c = \{ e, r^2 \} = \langle r^2 \rangle. \] This implies that $r^2 \in (\theta \cup b_{r^2})_c$. Now, \[ (\theta \cup b_{r^2})(r^2) = \theta(r^2) \vee b \geq c > b. \] Hence we must have $\theta(r^2) \geq c$, that is, $c_{r^2} \in \theta$, which implies that $\theta \cup b_{r^2} = \theta$. Thus $\langle \theta \rangle = \mu$. We conclude that $b_{r^2}$ is a non-generator of $\mu$. Hence \begin{equation} \lambda(r^2) \geq b. \end{equation} \noindent Next, we show that $c_{r^2}$ is not a non-generator of $\mu$. It can be easily seen that $\theta : G \rightarrow L$ given by \[ \theta(x) = \begin{cases} 1 & \text{if } x=e,\\ b & \text{if } x \in K \setminus \{e\},\\ a & \text{if } x \in G \setminus K\\ \end{cases} \] is an $L$-subgroup of $\mu$ such that $\langle \theta,c_{r^2} \rangle = \mu$ but $\langle \theta \rangle = \theta \neq \mu$. Hence $c_{r^2}$ is not a non-generator of $\mu$. Thus \begin{equation} \lambda(r^2) < c. \end{equation} From (1) and (2), we conclude that $\lambda(r^2) = b$. By similar calculations, all the non-generators of $\mu$ can be determined, and we get \begin{equation*} \begin{split} \lambda(\mu) &= \begin{cases} c & \text{if } x=e, \\ b & \text{if } x \in C \setminus \{e\},\\ a & \text{if } x \in K \setminus C, \\ 0 & \text{if } x \in G \setminus K \end{cases}\\ &= \Phi(\mu), \end{split} \end{equation*} as determined in Example \ref{eg1}. \end{example} \begin{proposition} Let $L$ be an upper well ordered chain and let $\mu \in L(G)$ such that $\Phi(\mu)(e) = \mu(e)$. Then, $\Phi(\mu_b) \subseteq (\Phi(\mu))_b$ for all $b \in \text{Im}~\mu$. \end{proposition} \begin{proof} Let $b \in \text{Im}~\mu$ and let $\eta$ be a maximal $L$-subgroup of $\mu$. Since $L$ is upper well ordered, $\eta$ and $\mu$ are jointly supstar. Moreover, $\Phi(\mu)(e) = \mu(e)$ implies that $\eta(e) = \mu(e)$. By theorem \ref{max_sup2}, there exists exactly one $a_0 \in \text{Im}~\mu$ such that $\eta_{a_0}$ is a maximal subgroup of $\mu_{a_0}$ and for all other $a \in \text{Im}~\mu \cup \text{Im}~\eta$, $\eta_a = \mu_a$. Hence either $\eta_b$ is a maximal subgroup of $\mu_b$ or $\eta_b = \mu_b$. In both the cases, $\Phi(\mu_b) \subseteq \eta_b$. Since $\eta$ is any arbitrary maximal $L$-subgroup of $\mu$, we get \[ \begin{split} \Phi(\mu_b) & \subseteq \bigcap \{ \eta_b \mid \eta \text{ is a maximal $L$-subgroup of } \mu \}\\ &= \left( \bigcap \{ \eta \mid \eta \text{ is a maximal $L$-subgroup of } \mu \} \right)_b ~~~~~ \text{(by Proposition \ref{int_lev})}\\ &= (\Phi(\mu))_b. \end{split} \] \end{proof} \begin{example} Consider the $L$-group $\mu$ of example \ref{eg1}. Then, $\Phi(\mu)$ is given by \[ \Phi(\mu) = \begin{cases} c & \text{if } x=e,\\ b & \text{if } x \in C \setminus \{e\},\\ a & \text{if } x \in K \setminus C,\\ 0 & \text{if } x \in G \setminus K. \end{cases} \] Hence we see that $(\Phi(\mu))_b = \{ e, r^2 \}$. However, $\mu_b = K$ and thus $\Phi(\mu_b) = \{ e \}$. This shows that $(\Phi(\mu))_b \nsubseteq \Phi(\mu_b)$. \end{example} \begin{lemma} \label{lpt_con} Let $\mu$ be a normal $L$-subgroup of $G$. If $a_x$ is a non-generator of $\mu$, then $a_{gxg^{-1}}$ is a non-generator of $\mu$ for all $g \in G$. \end{lemma} \begin{proof} Let $a_x$ be a non-generator of $\mu$ and let $g \in G$. Suppose, if possible, that $a_{gxg^{-1}}$ is not a non-generator of $\mu$. Then, there exists an $L$-subset $\eta$ of $\mu$ such that $\langle \eta, a_{gxg^{-1}} \rangle = \mu$ but $\langle \eta \rangle \neq \mu$. \noindent Define $\theta : G \rightarrow L$ as follows: \[ \theta(z) = \eta(gzg^{-1}) ~~~~~ \text{for all $z \in G$.} \] Then, $\theta \in L^{\mu}$, for if $\theta(z) > \mu(z)$ for some $z \in G$, then $\eta(gzg^{-1}) > \mu(z) = \mu(gzg^{-1})$, which contradicts $\eta \in L^{\mu}$. Also, \[ \text{tip }\theta = \bigvee_{z \in G}\theta(z) = \bigvee_{z \in G}\eta(gzg^{-1}) = \text{tip }\eta. \] We claim that whenever $y \in \langle (\eta \cup a_{gxg^{-1}})_c \rangle$ for some $c \in L$, then $g^{-1}yg \in \langle (\theta \cup a_x)_c \rangle$. \noindent Let $c \in L$ and let $y \in \langle (\eta \cup a_{gxg^{-1}})_c \rangle$. Then, \[ y = y_1y_2\ldots y_n, \text{ where } y_i \text{ or } {y_i}^{-1} \in (\eta \cup a_{gxg^{-1}})_c. \] Then, \[ g^{-1}yg = (g^{-1}y_1g)(g^{-1}y_2g)\ldots(g^{-1}y_ng). \] Note that for all $1 \leq i \leq n$, \[ (\eta \cup a_{gxg^{-1}})(y_i) = \begin{cases} \eta(y_i) & \text{if } y_i \neq gxg^{-1},\\ \eta(y_i) \vee a & \text{if } y_i = gxg^{-1} \end{cases} \] and in view of the definition of $\theta$, we obtain \begin{align*} (\theta \cup a_x)(g^{-1}y_ig) &= \begin{cases} \theta(g^{-1}y_ig) & \text{if }g^{-1}y_ig \neq x, \\ \theta(g^{-1}y_ig) \vee a & \text{if } g^{-1}y_ig =x \end{cases} \\ &= \begin{cases} \eta(y_i) & \text{if } y_i \neq gxg^{-1}, \\ \eta(y_i) \vee a & \text{if } y_i = gxg^{-1}. \end{cases} \\ \end{align*} Hence \[ (\eta \cup a_{gxg^{-1}})(y_i) = (\theta \cup a_x)(g^{-1}y_ig) ~~~~~ \text{ for all } 1 \leq i \leq n. \] This implies that $y \in \langle (\eta \cup a_{gxg^{-1}})_c \rangle$ if and only if $g^{-1}yg \in \langle (\theta \cup a_x)_c \rangle$ for all $c \in L$. By theorem \ref{gen}, for $z \in G$, \[ \langle \eta, a_{gxg^{-1}} \rangle (z)= \bigvee_{c \leq a_0} \{ c \mid z \in \langle (\eta \cup a_{gxg^{-1}})_c \rangle \}, \] where $a_0 = \text{tip}(\eta \cup a_{gxg^{-1}}) = \text{tip}(\theta \cup a_x)$. Therefore $\langle \eta, a_{gxg^{-1}} \rangle (y) = \langle \theta, a_x \rangle (g^{-1}yg).$ Similarly, $u \in \langle \eta_c \rangle $ for some $c \in L$ if and only if \[ u = u_1u_2 \ldots u_m \text{ where } u_i \text{ or } {u_i}^{-1} \in \eta_c, \] if and only if \[ g^{-1}ug = (g^{-1}u_1g)(g^{-1}u_2g) \ldots (g^{-1}u_mg). \] By using similar arguments as above, it can be verified that $u_i \in \eta_c$ if and only if $g^{-1}u_ig \in \theta_c$, and we get $y \in \langle \eta_c \rangle$ if and only if $g^{-1}yg \in \langle \theta_c \rangle$. Thus $\langle \eta \rangle (y) = \langle \theta \rangle (g^{-1}yg)$. \noindent Now, we show that $ \langle \theta, a_x \rangle = \mu.$ Let $y \in G$ and let $b = \mu(y)$. Since $\mu$ is a normal $L$-subgroup of $G$, $\mu(gyg^{-1}) = \mu(y) = b$, which gives $b_{gyg^{-1}} \in \mu$. Since $ \langle \eta, a_{gxg^{-1}} \rangle = \mu$, $b_{gyg^{-1}} \in \langle \eta, a_{gxg^{-1}} \rangle$. Thus $\langle \eta, a_{gxg^{-1}} \rangle (gyg^{-1}) \geq b$, which implies that $\langle \theta, a_x \rangle(y) \geq b = \mu(y)$. Hence we conclude that $\langle \theta, a_x \rangle = \mu$. \noindent Next, since $ \langle \eta \rangle \neq \mu$, there exists an $y \in G$ such that $\mu(y) > \langle \eta \rangle (y)$. Then, $\langle \theta \rangle (g^{-1}yg) = \langle \eta \rangle (y)$, which implies that $\langle \theta \rangle (g^{-1}yg) < \mu(y) = \mu(g^{-1}yg)$. Thus $\langle \theta \rangle \neq \mu$. Hence there exists $\theta \in L^{\mu}$ such that $\langle \theta, a_x \rangle = \mu$ but $\langle \theta \rangle \neq \mu$. This contradicts the assumption that $a_x$ is a non-generator of $\mu$. Hence the result. \end{proof} \begin{theorem} \label{fra_nor} Let $L$ be an upper well ordered chain and let $\mu$ be a normal $L$-subgroup of $G$. Then, $\Phi(\mu)$ is a normal $L$-subgroup of $\mu$. \end{theorem} \begin{proof} Let $x, g \in G$. Then, $(\Phi(\mu)(x))_x \in \Phi(\mu)$. By Theorem \ref{fra_lpt}, $(\Phi(\mu)(x))_x$ is a non-generator of $\mu$. By Lemma \ref{lpt_con}, $(\Phi(\mu)(x))_{gxg^{-1}}$ is a non-generator of $\mu$. Hence $(\Phi(\mu)(x))_{gxg^{-1}} \in \Phi(\mu)$. Therefore we get \[ \Phi(\mu)(gxg^{-1}) \geq \Phi(\mu)(x) \geq \Phi(\mu)(x) \wedge \mu(g). \] Thus we conclude that $\Phi(\mu)$ is a normal $L$-subgroup of $\mu$. \end{proof} The following example illustrates the above theorem: \begin{example} Consider the $L$-group $\mu$ given in Example \ref{eg1}. Then, since $L$ is a finite chain, it is upper well ordered. Also, since every non-empty level subset of $\mu$ is a normal subgroup of $G$, by Theorem \ref{lev_norgp}, $\mu$ is a normal $L$-subgroup of $G$. In the Example \ref{eg1}, $\Phi(\mu)$ is defined to be \[ \Phi(\mu) = \begin{cases} c & \text{if } x=e,\\ b & \text{if } x \in C \setminus \{e\},\\ a & \text{if } x \in K \setminus C,\\ 0 & \text{if } x \in G \setminus K. \end{cases} \] Note that $(\Phi(\mu))_t$ is a normal subgroup of $\mu_t$ for all non-empty level subsets. Hence by Theorem \ref{lev_norsgp}, $\Phi(\mu)$ is a normal $L$-subgroup of $\mu$. \end{example} \begin{theorem} Let $f : G \rightarrow H$ be a group isomorphism and let $\mu \in L(G)$. Then, \[ f(\Phi(\mu)) \subseteq \Phi(f(\mu)). \] \end{theorem} \begin{proof} By Theorem \ref{max_hom}, $\eta$ is a maximal $L$-subgroup of $\mu$ if and only $f(\eta)$ is a maximal $L$-subgroup of $f(\mu)$. Thus \begin{align*} \begin{split} f(\Phi(\mu)) &= f \left( \bigcap \left\{ \eta_i \mid \eta_i \text{ is a maximal $L$-subgroup of } \mu \right\} \right) \\ & \subseteq \bigcap \left\{ f(\eta_i) \mid \eta_i \text{ is a maximal $L$-subgroup of } \mu \right\} ~~~~~ \text{(By Proposition \ref{hom})} \\ &= \Phi(f(\mu)). \end{split} \end{align*} \end{proof} \section{Conclusion} After the concept of fuzzy subgroups was introduced by Rosenfeld, so far the researchers have studied the fuzzy subgroups and fuzzy subrings of a classical group and a classical ring, respectively. In our studies, we have shifted to the $L$-(fuzzy) subgroups where the parent structure is a $L$-(fuzzy) group instead of an ordinary group. This has resulted in the examination of various concepts such as nilpotent $L$-subgroup of an $L$-group, solvable $L$-subgroup of an $L$-group, normalizer of an $L$-group, etc. This paper carries forward this approach further by defining the concepts of maximal $L$-subgroups of an $L$-group, Frattini $L$-subgroup of an $L$-group and non-generators of an $L$-group. The research in the discipline of fuzzy algebraic structures came to a standstill after Tom Head's metatheorem and subdirect product theorem. This is because most of the concepts and results in the studies of fuzzy algebra could be established through simple applications of the metatheorem and the subdirect product theorem. However, the metatheorem and the subdirect product theorems are not applicable in the $L$-setting. Hence we suggest the researchers pursuing studies in these areas to investigate the properties of $L$-subalgebras of an $L$-algebra rather than $L$-subalgebras of classical algebra. As an application and motivation here we mention that if we replace the lattice $L$ in our work by the closed unit interval $[0,1]$, then we retrieve the corresponding version of fuzzy group theory. Moreover, as an application of this theory we also mention that if we replace the lattice $L$ by the two elements set $\{0, 1\}$, then the results of classical group theory follow as simple corollaries of the corresponding results of $L$-group theory. This way, the $L$-group theory provides us a new language and a new tool for the study of the classical group theory. The classical group theory has been founded on abstract sets and therefore the language used for its development is formal set theory. On the other hand, $L$-group theory expresses itself through the language of (lattice valued) functions. This shift of study from the language of sets to the language of functions gives rise to new insights that are the main focus of our work. \section*{Acknowledgements} The second author of this paper was supported by the Junior Research Fellowship joinly funded by CSIR and UGC, India during the course of development of this paper.
\section{Introduction} In first-passage percolation the edges of the ${\mathbb Z}^d$ nearest neighbour lattice, for some $d\ge2$, are equipped with non-negative i.i.d.\ random weights $\omega_e$, inducing a random metric $T$ on ${\mathbb Z}^2$ as follows: For $x,y\in{\mathbb Z}^d$, let \begin{equation}\label{eq:Tdef} \textstyle{T(x,y):=\inf\big\{\sum_{e\in\pi}\omega_e:\pi\text{ is a self-avoiding path from $x$ to $y$}\big\}.} \end{equation} Since its introduction in the 1960s, by Hammersley and Welsh~\cite{hamwel65}, a vast body of literature has been generated seeking to understand the large scale behaviour of distances, balls and geodesics in this random metric space. The state of the art has been summarized in various volumes over the years, including~\cite{aufdamhan17,howard04,kesten86,smywie78}. We will here address questions related to geodesics, and shall for this reason make the common assumption that the edge weights are sampled from a continuous distribution. Since many of the results we shall rely on require a moment condition for their conclusions to hold, we shall assume in what follows that $\E[Y^d]<\infty$, where $Y$ denotes the minimum weight among the $2d$ edges connected to the origin. In the 1960s, the study of first-passage percolation led to the development of an ergodic theory for subadditive ergodic sequences, culminating with the ergodic theorem due to Kingman~\cite{kingman68}. As a consequence thereof, one obtains the existence of a norm $\mu:{\mathbb R}^d\to[0,\infty)$, simply referred to as the \emph{time constant}, such that for every $z\in{\mathbb Z}^d$, almost surely, $$ \lim_{n\to\infty}\frac1nT(0,nz)=\mu(z). $$ Richardson~\cite{richardson73}, and later work of Cox and Durrett~\cite{coxdur81}, extended the above \emph{radial} convergence to \emph{simultaneous} convergence in all directions. Their results show that the ball $\{z\in{\mathbb Z}^d:T(0,z)\le t\}$ in the metric $T$ once rescaled by $1/t$ approaches the unit ball in the norm $\mu$. The unit ball in $\mu$, henceforth denoted by ${\rm Ball}:=\{x\in{\mathbb R}^d:\mu(x)\le1\}$, is therefore commonly referred to as the \emph{asymptotic shape}, and known to be compact and convex with non-empty interior. In addition, the shape retains the symmetries of ${\mathbb Z}^d$. However, little else is known regarding the properties of the shape in general. This, we shall see, is a major obstacle for our understanding of several other features of the model. Although questions regarding geodesics were considered in the early work of Hammersley and Welsh, it took until the mid 1990s before Newman~\cite{newman95} together with his co-authors~\cite{licnew96,licnewpiz96,newpiz95} initiated a systematic study of the geometry of geodesics in first-passage percolation. Under the assumption of continuous weights there is almost surely a unique path attaining the minimum in~\eqref{eq:Tdef}; we shall denote this path ${\rm geo}(x,y)$ and refer to it as the \emph{geodesic} between $x$ and $y$. The graph consisting of all edges on ${\rm geo}(0,y)$ for some $y\in{\mathbb Z}^d$ is a tree spanning the lattice. Understanding the properties of this object, such as the number of topological ends, leads one to the study of \emph{infinite} geodesics, i.e.\ infinite paths $g=(v_1,v_2,\ldots)$ of which every finite segment is a geodesic. We shall write ${\mathscr T}_0$ for the collection of infinite geodesics starting at the origin. A simple compactness argument shows that the cardinality $|{\mathscr T}_0|$ of ${\mathscr T}_0$ is always at least one.\footnote{Consider the sequence of finite geodesics between the origin and $n{\bf e}_1$, where ${\bf e}_1$ denotes the first coordinate vector. Since the number of edges that connect to the origin is finite, one of them must be traversed for infinitely many $n$. Repeating the argument results in an infinite path which by construction is a geodesic.} In two dimensions, Newman~\cite{newman95} predicted that $|{\mathscr T}_0|=\infty$ almost surely, and proved this under an additional assumption of uniform curvature of the asymptotic shape, which remains unverified to this day. As a means to make rigorous progress on Newman's prediction, H\"aggstr\"om and Pemantle~\cite{hagpem98} introduced a model for competing growth on ${\mathbb Z}^d$, for $d\ge2$, known as the \emph{two-type Richardson model}. In this model, two sites $x$ and $y$ are initially coloured red and blue respectively. As time evolves an uncoloured site turns red at rate $1$ times the number of red neighbours, and blue at rate $\lambda$ times the number or blue neighbours. A central question of interest is for which values of $\lambda$ there is positive probability for both colours to coexist, in the sense that they both are responsible for the colouring of infinitely many sites. There is an intimate relation between the existence of infinite geodesics and coexistence in the Richardson model that we shall pay special interest in. In the case of equal strength competitors ($\lambda=1$), one way to construct the two-type Richardson model is to equip the edges of the ${\mathbb Z}^d$ lattice with independent exponential weights, thus exhibiting a direct connection to first-passage percolation. The set of sites eventually coloured red in the two-type Richardson model is then equivalent to the set of sites closer to $x$ than $y$ in the first-passage metric. That is, an analogous way to phrase the question of coexistence is whether there are infinitely many points closer to $x$ than $y$ as well as infinitely many points closer to $y$ than $x$ in the first-passage metric. As before, a compactness argument will show that on the event of coexistence there are disjoint infinite geodesics $g$ and $g'$ that respectively originate from $x$ and $y$. H\"aggstr\"om and Pemantle~\cite{hagpem98} showed that, for $d=2$, coexistence of the two types occurs with positive probability, and deduced as a corollary that $$ {\mathbb P}(|{\mathscr T}_0|\ge2)>0. $$ Their results were later extended to higher dimensions and more general edge weight distributions in parallel by Garet and Marchand~\cite{garmar05} and Hoffman~\cite{hoffman05}. In a later paper, Hoffman~\cite{hoffman08} showed that in two dimensions coexistence of four different types has positive probability, and that ${\mathbb P}(|{\mathscr T}_0|\ge4)>0$. The best currently known general lower bound on the number of geodesics is a strengthening of Hoffman's result due to Damron and Hanson~\cite{damhan14}, showing that $$ {\mathbb P}(|{\mathscr T}_0|\ge4)=1. $$ In this paper we shall take a closer look at the relation between existence of infinite geodesics and coexistence in competing first-passage percolation. We saw above that on the event of coexistence of various types, a compactness argument gives the existence of equally many infinite geodesics. It is furthermore conceivable that it is possible to locally modify the edge weight in such a way that these geodesics are re-routed through the origin. Conversely, interpreting infinite geodesics as `highways to infinity', along which the different types should be able to escape their competitors, it seems that the existence of a given number of geodesics should accommodate an equal number of surviving types. These heuristic arguments suggest a duality between existence and coexistence, and it is this dual relation we shall make precise. Given sites $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^d$, we let ${\rm Coex}(x_1,x_2,\ldots,x_k)$ denote the event that for every $i=1,2,\ldots,k$ there are infinitely many sites $z\in{\mathbb Z}^d$ for which the distance $T(x_j,z)$ is minimized by $j=i$. (The continuous weight distribution assures that there are almost surely no ties.) In two dimensions the duality between existence and coexistence that we prove takes the form: \begin{equation}\label{eq:duality} \exists\, x_1,x_2,\ldots,x_k\text{ such that }{\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>0\quad\Leftrightarrow\quad{\mathbb P}(|{\mathscr T}_0|\ge k)>0. \end{equation} Turning the above heuristic into a proof is more demanding that it may seem. In order to derive the relation in~\eqref{eq:duality} we shall rely on the recently developed ergodic theory for infinite geodesics. This theory has its origins in the work of Hoffman~\cite{hoffman05,hoffman08}, and was developed further by Damron and Hanson~\cite{damhan14,damhan17}, before it reached its current status in work of Ahlberg and Hoffman~\cite{ahlhof}. The full force of this theory is currently restricted to two dimensions, which prevents us from obtaining an analogue to~\eqref{eq:duality} in higher dimensions. In higher dimensions we deduce a partial result based on results of Damron and Hanson~\cite{damhan14} and Nakajima~\cite{nakajima}. \subsection{The dual relation} Before we state our results formally, we remind the reader that $Y$ denotes the minimum weight among the $2d$ edges connected to the origin. We recall (from~\cite{coxdur81}) that $\E[Y^d]<\infty$ is both necessary and sufficient in order for the shape theorem to hold in dimension $d\ge2$. \begin{thm}\label{thm:duality} Consider first-passage percolation on the square lattice with continuous edge weights satisfying $\E[Y^2]<\infty$. For any $k\ge1$, including $k=\infty$, and $\varepsilon>0$ we have: \begin{enumerate}[\quad (i)] \item If ${\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>0$ for some $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^2$, then ${\mathbb P}(|{\mathscr T}_0|\ge k)=1$. \item If ${\mathbb P}(|{\mathscr T}_0|\ge k)>0$, then ${\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>1-\varepsilon$ for some $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^2$. \end{enumerate} \end{thm} In dimensions higher than two we shall establish parts of the above dual relation, and recall next some basic geometric concepts in order to state this result precisely. A hyperplane in the $d$-dimensional Euclidean space divides ${\mathbb R}^d$ into two open half-spaces. A \emph{supporting hyperplane} to a convex set $S\subset{\mathbb R}^d$ is a hyperplane that contains some boundary point of $S$ and contains all interior points of $S$ in one of the two half-spaces associated to the hyperplane. It is well-known that for every boundary point of a convex set $S$ there exists a supporting hyperplane that contains that point. A supporting hyperplane to $S$ is called a \emph{tangent hyperplane} if it is the unique supporting hyperplane containing some boundary point of $S$. Finally, we define the number of \emph{sides} of a compact convex set $S$ as the number of (distinct) tangent hyperplanes to $S$. Hence, the number of sides is finite if and only if $S$ is a (finite) convex polygon ($d=2$) or convex polytope ($d\ge3$). A deeper account on convex analysis can be found in~\cite{rockafellar70}. \begin{thm}\label{thm:highdim} Consider first-passage percolation on the $d$-dimensional cubic lattice, for $d\ge2$, with continuous edge weights. For any $k\ge1$, including $k=\infty$, and $\varepsilon>0$ we have \begin{enumerate}[\quad (i)] \item If $\E[\exp(\alpha\omega_e)]<\infty$ and ${\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>0$ for some $\alpha>0$ and $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^d$, then ${\mathbb P}(|{\mathscr T}_0|\ge k)=1$. \item If $\E[Y^d]<\infty$ and ${\rm Ball}$ has at least $k$ sides, then ${\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>1-\varepsilon$ for some $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^d$. \end{enumerate} \end{thm} In Section~\ref{sec:geodesics} we shall review the recent development in the study of infinite geodesics that will be essential for the deduction, in Section~\ref{sec:duality}, of the announced dual result. Finally, in Section~\ref{sec:highdim}, we prove the partial result in higher dimensions. \subsection{A mention of our methods} One aspect of the connection between existence and coexistence is an easy observation, and was hinted at already above. Namely, if ${\rm Geos}(x_1,x_2,\ldots,x_k)$ denotes the event that there exist $k$ pairwise disjoint infinite geodesics, each originating from one of the points $x_1,x_2,\ldots,x_k$, then \begin{equation}\label{eq:inclusion} {\rm Coex}(x_1,x_2,\ldots,x_k)\subseteq{\rm Geos}(x_1,x_2,\ldots,x_k). \end{equation} To see this, let $V_i$ denote the set of sites closer to $x_i$ than to any other $x_j$, for $j\neq i$, in the first-passage metric. (Note that $T(x,y)\neq T(z,y)$ for all $x,y,z\in{\mathbb Z}^2$ almost surely, due to the assumptions of continuous weights.\footnote{This will be referred to as having \emph{unique passage times}.}) On the event ${\rm Coex}(x_1,x_2,\ldots,x_k)$ each set $V_i$ is infinite, and for each $i$ a compactness argument gives the existence of an infinite path contained in $V_i$, which by construction is a geodesic. Since $V_1,V_2,\ldots,V_k$ are pairwise disjoint, due to uniqueness of geodesics, so are the resulting infinite geodesics. Let $\mathscr{N}$ denote the maximal number of pairwise disjoint infinite geodesics. Since $\mathscr{N}$ is invariant with respect to translations (and measurable) it follows from the ergodic theorem that $\mathscr{N}$ is almost surely constant. Hence, positive probability for coexistence of $k$ types implies the almost sure existence of $k$ pairwise disjoint geodesics. That $|{\mathscr T}_0|\le\mathscr{N}$ is trivial, given the tree structure of ${\mathscr T}_0$. The inequality is in fact an equality, which was established by different means in~\cite{ahlhof,nakajima}. Together with~\eqref{eq:inclusion}, this resolves the first part of Theorems~\ref{thm:duality} and~\ref{thm:highdim}. Above it was suggested that infinite geodesics should, at least heuristically, be thought of as `highways to infinity' along which the different types may escape the competition. The concept of Busemann functions, and their properties, will be central in order to make this heuristic precise. These functions have their origin in the work of Herbert Busemann~\cite{busemann55} on metric spaces. In first-passage percolation, Busemann-related limits first appeared in the work of Newman~\cite{newman95} as a means to describe the microscopic structure of the boundary (or surface) of a growing ball $\{z\in{\mathbb Z}^2:T(0,z)\le t\}$ in the first-passage metric. Later work of Hoffman~\cite{hoffman05,hoffman08} developed a method to describe asymptotic properties of geodesics via the study of Busemann functions. Hoffman's approach has since become indispensable in the study of various models for spatial growth, including first-passage percolation~\cite{damhan14,damhan17,ahlhof}, the corner growth model~\cite{georassep17a,georassep17b} and random polymers~\cite{georassep16,albrassim20}. In a tangential direction, Bakhtin, Cator and Khanin~\cite{bakcatkha14} used Busemann functions to construct stationary space-time solutions to the one-dimensional Burgers equation, inspired by earlier work of Cator and Pimentel~\cite{catpim12}. Finally, we remark that (for $d=2$) it is widely believed that the asymptotic shape is not a polygon, in which case it follows from~\cite{hoffman08} that both ${\mathbb P}(|{\mathscr T}_0|=\infty)=1$ and that for every $k\ge1$ there are $x_1,x_2,\ldots,x_k$ such that ${\mathbb P}({\rm Coex}(x_1,x_2,\ldots,x_k))>0$. The latter was extended to infinite coexistence by Damron and Hochman~\cite{damhoc13}. Thus, proving that the asymptotic shape is non-polygonal would make our main theorem obsolete. However, understanding the asymptotic shape is a notoriously hard problem, which is the reason an approach sidestepping Newman's curvature assumption has been developed in the first place. \section{Geodesics and Busemann functions}\label{sec:geodesics} In this section we review the recent developments in the study of infinite geodesics in first-passage percolation. We shall focus on the two-dimensional setting, and remark on higher dimensions only at the end. We make no claim in providing a complete account of previous work, and instead prefer to focus on the results that will be of significance for the purposes of this paper. A more complete description of these results, save those reported in the more recent studies~\cite{ahlhof,nakajima}, can be found in~\cite{aufdamhan17}. \subsection{Geodesics in Newman's contribution to the 1994 ICM proceedings} The study of geodesics in first-passage percoalation was pioneered by Newman and co-authors~\cite{licnew96,licnewpiz96,newman95,newpiz95} in the mid 1990s. Their work gave rise to a precise set of predictions for the structure of infinite geodesics. In order to describe these predictions we shall need some notation. First, we say that an infinite geodesic $g=(v_1,v_2,\ldots)$ has \emph{asymptotic direction} $\theta$, in the unit circle $S^1:=\{x\in{\mathbb R}^2:|x|=1\}$, if the limit $\lim_{k\to\infty}v_k/|v_k|$ exists and equals $\theta$. Second, two infinite geodesics $g$ and $g'$ are said to \emph{coalesce} if their symmetrical difference $g\Delta g'$ is finite. The predictions originating from the work of Newman and his collaborators can be summarized as, under mild conditions on the weight distribution, the following should hold: \begin{enumerate}[\quad\em (a)] \item with probability one, every infinite geodesic has an asymptotic direction; \item for every direction $\theta$, there is an almost surely unique geodesic in ${\mathscr T}_0$ with direction $\theta$; \item for every direction $\theta$, any two geodesics with direction $\theta$ coalesce almost surely. \end{enumerate} In particular, these statements would imply that $|{\mathscr T}_0|=\infty$ almost surely. Licea and Newman~\cite{newman95,licnew96} proved conditional versions of these statements under an additional curvature assumption of the asymptotic shape. While this assumption seems plausible for a large family of edge weight distributions, there is no known example for which it has been verified. Rigorous proofs of the corresponding statements for a rotation invariant first-passage-like model, where the asymptotic shape is known to be a Euclidean disc, has been obtained by Howard and Newman~\cite{hownew01}. Since proving properties like strict convexity and differentiability of the boundary of the asymptotic shape in standard first-passage percolation appears to be a major challenge, later work has focused on obtaining results without assumptions on the shape. \subsection{Busemann functions} Limits reminiscent of Busemann functions first appeared in the first-passage literature in the work of Newman~\cite{newman95}, as a means of describing the microscopic structure of the boundary of a growing ball in the first passage metric. The method for describing properties of geodesics via Busemann functions developed in later work of Hoffman~\cite{hoffman05,hoffman08}. Given an infinite geodesic $g=(v_1,v_2,\ldots)$ in ${\mathscr T}_0$ the \emph{Busemann function} $B_g:{\mathbb Z}^2\times{\mathbb Z}^2\to{\mathbb R}$ of $g$ is defined as the limit \begin{equation}\label{eq:Busemann} B_g(x,y):=\lim_{k\to\infty}\big[T(x,v_k)-T(y,v_k)\big]. \end{equation} As observed by Hoffman~\cite{hoffman05}, with probability one the limit in~\eqref{eq:Busemann} exists for every $g\in{\mathscr T}_0$ and all $x,y\in{\mathbb Z}^2$, and satisfies the following properties: \begin{itemize} \item $B_g(x,y)=B_g(x,z)+B_g(z,y)$ for all $x,y,z\in{\mathbb Z}^2$; \item $|B_g(x,y)|\le T(x,y)$; \item $B_g(x,y)=T(x,y)$ for all $x,y\in g$ such that $x\in{\rm geo}(0,y)$. \end{itemize} In~\cite{hoffman05} Hoffman used Busemann functions to establish that there are at least two disjoint infinte geodesics almost surely. In~\cite{hoffman08} he used Busemann functions to associate certain infinite geodesics with sides (tangent lines) of the asymptotic shape. The approach involving Busemann functions in order to study infinite geodesics was later developed further in work by Damron and Hanson~\cite{damhan14,damhan17} and Ahlberg and Hoffman~\cite{ahlhof}. Studying Busemann functions of geodesics, as opposed to the geodesics themselves, has allowed these authors to establish rigorous versions of Newman's predictions regarding the structure of geodesics. Describing parts of these results in detail will be essential in order to understand the duality between existence of geodesics and coexistence in competing first-passage percolation. \subsection{Linearity of Busemann functions} We shall call a linear functional $\rho:{\mathbb R}^2\to{\mathbb R}$ \emph{supporting} if the line $\{x\in{\mathbb R}^2:\rho(x)=1\}$ is a supporting line to $\partial{\rm Ball}$ through some point, and \emph{tangent} if $\{x\in{\mathbb R}^2:\rho(x)=1\}$ is the unique supporting line (i.e.\ the tangent line) through some point of $\partial{\rm Ball}$. Given a supporting functional $\rho$ and a geodesic $g\in{\mathscr T}_0$ we say that the Busemann function of $g$ is \emph{asymptotically linear} to $\rho$ if \begin{equation}\label{eq:linearity} \limsup_{|y|\to\infty}\frac{1}{|y|}\big|B_g(0,y)-\rho(y)\big|=0. \end{equation} Asymptotic linearity of Busemann functions is closely related to asymptotic directions of geodesics in the sense that~\eqref{eq:linearity}, together with the third of the properties of Busemann functions exhibited by Hoffman, provides information on the direction of $g=(v_1,v_2,\ldots)$: The set of limit points of the sequence $(v_k/|v_k|)_{k\ge1}$ is contained in the arc $\{x\in S^1:\mu(x)=\rho(x)\}$, corresponding to a point or a flat edge of $\partial{\rm Ball}$. Building on the work of Hoffman~\cite{hoffman08}, Damron and Hanson~\cite{damhan14} showed that for every tangent line of the asymptotic shape there exists a geodesic whose Busemann function is described by the corresponding linear functional. In a simplified form their result reads as follows: \begin{thm}\label{thm:DH} For every tangent functional $\rho:{\mathbb R}^2\to{\mathbb R}^2$ there exists, almost surely, a geodesic in ${\mathscr T}_0$ whose Busemann function is asymptotically linear to $\rho$. \end{thm} While the work of Damron and Hanson proves \emph{existence} of geodesics with linear Busemann functions, later work of Ahlberg and Hoffman~\cite{ahlhof} has established that \emph{every} geodesic has a linear Busemann function, and that the associated linear functionals are \emph{unique}. We summarize these results in the next couple of theorems. \begin{thm}\label{thm:linearity} With probability one, for every geodesic $g\in{\mathscr T}_0$ there exists a supporting functional $\rho:{\mathbb R}^2\to{\mathbb R}$ such that the Busemann function of $g$ is asymptotically linear to $\rho$. \end{thm} To address uniqueness, note that the set of supporting functionals is naturally parametrized by the direction of their gradients. Due to convexity of the shape, these functionals stand in 1-1 correspondence with the unit circle $S^1$. We shall from now on identify the set of supporting functionals with $S^1$. \begin{thm}\label{thm:ergodicity} There exists a closed (deterministic) set $\mathscr{C}\subseteq S^1$ such that, with probability one, the (random) set of supporting functionals $\rho$ for which there exists a geodesic in ${\mathscr T}_0$ with Busemann function asymptotically linear to $\rho$ equals $\mathscr{C}$. Moreover, for every $\rho\in\mathscr{C}$ we have $$ {\mathbb P}\big(\exists\text{ two geodesics in ${\mathscr T}_0$ with Busemann function linear to }\rho\big)=0. $$ \end{thm} From Theorem~\ref{thm:DH} it follows that $\mathscr{C}$ contains all tangent functionals. As a consequence, if ${\rm Ball}$ has at least $k$ sides (i.e.\ tangent lines), then we have $|{\mathscr T}_0|\ge k$ almost surely. On the other hand, it follows from Theorem~\ref{thm:linearity} that every geodesic has a linear Busemann function, and by Theorem~\ref{thm:ergodicity} that the set of linear functionals describing these Busemann functions is deterministic. Consequently, if with positive probability ${\mathscr T}_0$ has size at least $k$, then by the uniqueness part of Theorem~\ref{thm:ergodicity} the set $\mathscr{C}$ has cardinality at least $k$, so that there exist $k$ geodesics described by distinct linear functionals almost surely. All these observations will be essential in proving part~\emph{(ii)} of Theorem~\ref{thm:duality}. Due to the connection between asymptotic directions and linearity of Busemann functions mentioned above, Theorems~\ref{thm:DH}-\ref{thm:ergodicity} may be seen as rigorous, although somewhat weaker, versions of Newman's predictions~\emph{(a)-(b)}. The rigorous results are weaker in the sense that we do not know whether $\mathscr{C}$ equals $S^1$ or not. Note, however, that Theorem~\ref{thm:ergodicity} provides an `ergodic theorem' in this direction. As we shall describe next, the cited papers provide a rigorous version also of~\emph{(c)}. \subsection{Coalescence} An aspect of the above development that we have ignored so far is that of coalescence. For instance, Theorem~\ref{thm:DH} is a simplified version of a stronger statement proved in~\cite{damhan14}, namely that for every tangent functional $\rho:{\mathbb R}^2\to{\mathbb R}$ there exists, almost surely, a family of geodesics $\Gamma=\{\gamma_z:z\in{\mathbb Z}^2\}$, where $\gamma_z\in{\mathscr T}_z$, such that any one geodesic in $\Gamma$ has Busemann function linear to $\rho$ and any two geodesics in $\Gamma$ coalesce. (The latter of course implies that the Busemann functions of all geodesics in $\Gamma$ coincide.) In a similar spirit, we have the following from~\cite{ahlhof}: \begin{thm}\label{thm:coalescence} For every supporting functional $\rho\in\mathscr{C}$, with probability one, any two geodesics $g\in{\mathscr T}_y$ and $g'\in{\mathscr T}_z$ with Busemann function asymptotically linear to $\rho$ coalesce. \end{thm} We remark that coalescence was irrelevant for the proof of Theorem~\ref{thm:DH} in~\cite{damhan14}, but instrumental for the deduction of Theorems~\ref{thm:linearity} and~\ref{thm:ergodicity} in~\cite{ahlhof}. In short, the importance of coalescence lies in the possibility to apply the ergodic theorem to asymptotic properties of shift invariant families of coalescing geodesics, resulting in the ergodic properties of Theorem~\ref{thm:ergodicity}. The results described above together address the cardinality of the set ${\mathscr T}_0$. Recall that $\mathscr{N}$ denotes the maximal number of pairwise disjoint infinite geodesics and is almost surely constant. The following was first established in~\cite{ahlhof}, and can be derived as a corollary to Theorems~\ref{thm:linearity}-\ref{thm:coalescence}. A more direct argument, assuming a stronger moment condition, was later given by Nakajima~\cite{nakajima}. \begin{cor}\label{cor:cardinality} With probability one $|{\mathscr T}_0|$ is constant and equal to $\mathscr{N}$. \end{cor} To see how the corollary follows, first note that clearly $|{\mathscr T}_0|\le\mathscr{N}$. In addition, $|\mathscr{C}|\le|{\mathscr T}_0|$ almost surely due to the ergodic part of Theorem~\ref{thm:ergodicity}, and in the case that $\mathscr{C}$ is finite, equality follows from Theorem~\ref{thm:linearity} and the uniqueness part of Theorem~\ref{thm:ergodicity}. Consequently, also $|{\mathscr T}_0|$ is almost surely constant. Finally, it follows from the coalescence property in Theorem~\ref{thm:coalescence} that either $|{\mathscr T}_0|$ (and therefore also $\mathscr{N}$) is almost surely infinite, or $|{\mathscr T}_0|=\mathscr{N}=k$ holds almost surely for some finite $k$, leading to the claimed result. \subsection{Geodesics in higher dimensions} Whether the description of geodesics detailed above remains correct also in higher dimensions is at this point unknown. Although it has been suggested that coalescence should fail for large $d$, it seems plausible that results analogous to Theorems~\ref{thm:DH}-\ref{thm:ergodicity} should hold for all $d\ge2$, and that an analogue to Theorem~\ref{thm:coalescence} could hold for small $d$. See recent work of Alexander~\cite{alexander} for a further discussion of these claims. Indeed, establishing the existence of coalescing families of geodesics in the spirit of~\cite{damhan14} also in three dimensions should be considered a major open problem. What is known is that the argument behind Theorem~\ref{thm:DH} can be extended to all dimensions $d\ge2$ under minor adjustments; see~\cite{bridamhan}. However, the proofs of Theorems~\ref{thm:linearity}-\ref{thm:coalescence} exploit planarity in a much more fundamental way, and are not known to extend to higher dimensions. On the other hand, an argument of Nakajima~\cite{nakajima} shows that Corollary~\ref{cor:cardinality} remains valid in all dimensions under the additional condition that $\E[\exp(\alpha\omega_e)]<\infty$ for some $\alpha>0$. These properties will be sufficient in order to prove Theorem~\ref{thm:highdim}. \section{The dual relation in two dimensions}\label{sec:duality} With the background outlined in the previous section we are now ready to prove Theorem~\ref{thm:duality}. We recall that, with probability one, by Theorem~\ref{thm:linearity} every geodesic has an asymptotically linear Busemann function, and by Theorem~\ref{thm:ergodicity} there is a deterministic set $\mathscr{C}$ of linear functionals that correspond to these Busemann functions. Moreover, for each $\rho\in\mathscr{C}$, by Theorem~\ref{thm:ergodicity} there is for every $z\in{\mathbb Z}^2$ an almost surely unique geodesic in ${\mathscr T}_z$ with Busemann function asymptotically linear to $\rho$, and by Theorem~\ref{thm:coalescence} these geodesics coalesce almost surely. In particular $|{\mathscr T}_0|=|\mathscr{C}|$ almost surely, and we shall in the sequel write $B_\rho$ for the Busemann function of the almost surely unique geodesic (in ${\mathscr T}_0$) corresponding to $\rho$. \subsection{Part~\emph{(i)}: Coexistence implies existence} The short proof of part~\emph{(i)} is an easy consequence of Corollary~\ref{cor:cardinality}. Suppose that for some choice of $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^2$ we have ${\mathbb P}({\rm Coex}(x_1,x_2,\ldots,x_k))>0$. By~\eqref{eq:inclusion} we have ${\mathbb P}(\mathscr{N}\ge k)>0$, and since $\mathscr{N}$ is almost surely constant it follows from Corollary~\ref{cor:cardinality} that $$ {\mathbb P}(|{\mathscr T}_0|\ge k)=1. $$ While the above argument is short, it hides much of the intuition for why the implication holds. We shall therefore give a second argument based on coalescence that may be more instructive, even if no more elementary. This argument will make explicit the heuristic that geodesics are `highways to infinity' along which the different types will have to move in order to escape the competition. Before attending to the proof, we claim that for any $\rho\in\mathscr{C}$ we have \begin{equation}\label{eq:nonzero} {\mathbb P}\big(B_\rho(x,y)\neq0\text{ for all }x\neq y\big)=1. \end{equation} To see this, let $A_\rho$ denote the event that for each $z$ in ${\mathbb Z}^2$ there is a unique geodesic $g_z$ in ${\mathscr T}_z$ corresponding to $\rho$, and that all these geodesics coalesce, so that $A_\rho$ has measure one. We note that on the event $A_\rho$ coalescence of the geodesics $\{g_z:z\in{\mathbb Z}^2\}$ implies that for any $x,y\in{\mathbb Z}^2$ the limit $B_\rho(x,y)$ (which is defined through~\eqref{eq:Busemann} for $g=g_0$) is attained after a finite number of steps. More precisely, on the event $A_\rho$, for any $x,y\in{\mathbb Z}^2$ and $v$ contained in $g_x\cap g_y$ we have $$ B_\rho(x,y)=T(x,v)-T(y,v). $$ Hence,~\eqref{eq:nonzero} follows due to unique passage times. We now proceed with the second proof. Again by Corollary~\ref{cor:cardinality}, either ${\mathscr T}_0$ is almost surely infinite, in which case there is nothing to prove, or ${\mathbb P}(|{\mathscr T}_0|=k)=1$ for some integer $k\ge1$. We shall suppose the latter, and argue that for any choice of $x_1,x_2,\ldots,x_{k+1}$ in ${\mathbb Z}^2$ we have ${\mathbb P}({\rm Coex}(x_1,x_2,\ldots,x_{k+1}))=0$. On the event that ${\mathscr T}_0$ is almost surely finite, $\mathscr{C}$ is in one-to-one correspondence with the elements of ${\mathscr T}_0$. It follows from~\eqref{eq:nonzero} that for any $g\in{\mathscr T}_0$ the Busemann function $B_g(0,x)$ has a unique minimizer over finite subsets of ${\mathbb Z}^2$ almost surely. The last statement can be rephrased in terms of competition between a finite number of types as follows: For each geodesic $g$ in ${\mathscr T}_0$ there will be precisely one type that reaches infinitely many sites along $g$ almost surely; it is the one whose starting position minimizes $B_g(0,x_i)$. Hence, if $|{\mathscr T}_0|=k$ almost surely, but there are $k+1$ competing types, then at least one of them will not reach infinitely many sites along any geodesic in ${\mathscr T}_0$. Suppose that the type left out starts at a site $x$. Since for each geodesic in ${\mathscr T}_x$ there is a geodesic in ${\mathscr T}_0$ with which it coalesces (as of Theorem~\ref{thm:coalescence}), it follows that for each geodesic $g\in{\mathscr T}_x$ the type starting at $x$ will be closer than the other types to at most finitely many sites along $g$. Choose $n$ so that these sites are all within distance $n$ from $x$. Finally, note that for at most finitely many sites $z$ in ${\mathbb Z}^2$ the (finite) geodesic from $x$ to $z$ will diverge from all geodesics in ${\mathscr T}_x$ within distance $n$ from $x$. Consequently, all but finitely many sites in ${\mathbb Z}^2$ will lie closer to the starting point of some other type, implying that the $k+1$ types do not coexist. \subsection{Part~\emph{(ii)}: Existence implies coexistence} Central in the proof of part~\emph{(ii)} is the linearity of Busemann functions. The argument that follows is a modern take on an argument originally due to Hoffman~\cite{hoffman08}. Let $k$ be an integer and suppose that $|{\mathscr T}_0|\ge k$ with positive probability. Then, indeed, $|{\mathscr T}_0|=|\mathscr{C}|\ge k$ almost surely. Fix $\varepsilon>0$ and let $\rho_1,\rho_2,\ldots,\rho_k$ be distinct elements of $\mathscr{C}$. In order to show that ${\mathbb P}({\rm Coex}(x_1,x_2,\ldots,x_k))>1-\varepsilon$ for some choice of $x_1,x_2,\ldots,x_k$, we shall choose these points so that with probability $1-\varepsilon$ we have $B_{\rho_i}(x_i,x_j)<0$ for all $i=1,2,\ldots,k$ and $j\neq i$. On this event, for each $i$, the site $x_i$ is closer to all points along the geodesic in ${\mathscr T}_{x_i}$ corresponding to $\rho_i$ than any of the $x_j$ for $j\neq i$, implying that ${\rm Coex}(x_1,x_2,\ldots,x_k)$ occurs. Given $\rho\in\mathscr{C}$, $z\in{\mathbb Z}^2$, $\delta>0$ and $M\ge1$ we let $A_\rho(z,\delta,M)$ denote the event that $$ \big|B_\rho(z,y)-\rho(y-z)\big|<\delta|y-z|\quad\text{for all }|y-z|\ge M. $$ Due to linearity of Busemann functions (Theorems~\ref{thm:linearity} and~\ref{thm:ergodicity}) there exists for every $\rho\in\mathscr{C}$ and $\delta,\gamma>0$ an $M<\infty$ such that \begin{equation}\label{eq:B_bound} {\mathbb P}\big(A_\rho(z,\delta,M)\big)>1-\gamma\quad\text{for every }z\in{\mathbb Z}^2. \end{equation} We further introduce the following notation for plane regions related to $\rho$: \begin{equation*} \begin{aligned} H_\rho(z,\delta)&:=\big\{y\in{\mathbb R}^2:\rho(y-z)\le-\delta|y-z|\big\};\\ C_\rho(z,\delta)&:=\big\{y\in{\mathbb R}^2:|\rho(y-z)|\le\delta|y-z|\big\}. \end{aligned} \end{equation*} Note that on the event $A_\rho(z,\delta,M)$ we have for all $y\in H_\rho(z,\delta)$ such that $|y-z|\ge M$ that $B_\rho(z,y)<0$. Hence, $H_\rho(z,\delta)$ corresponds to sites that are likely to be at a further distance to far out vertices along the geodesic corresponding to $\rho$ as compared to $z$. Given $\rho_1,\rho_2,\ldots,\rho_k$ we now choose $\delta>0$ so that the cones $C_{\rho_i}(0,\delta)$, for $i=1,2,\ldots,k$, intersect only at the origin. Next, we choose $M$ large so that for all $i$ $$ {\mathbb P}\big(A_{\rho_i}(z,\delta,M)\big)>1-\varepsilon/k. $$ Finally, due to the choice of $\delta$ we may choose $x_1,x_2,\ldots,x_k$ so that $|x_i-x_j|\ge M$ for all $i\neq j$ and such that for each $i$ the set $H_{\rho_i}(x_i,\delta)$ contains $x_j$ for all $j\neq i$. (For instance, position the sites on a circle of large radius, in positions roughly corresponding to the directions of $\rho_1,\rho_2,\ldots,\rho_k$.) Due to these choices we will on the event $\bigcap_{i=1,2,\ldots,k}A_{\rho_i}(x_i,\delta,M)$, which occurs with probability at least $1-\varepsilon$, have for all $i=1,2,\ldots,k$ that $B_{\rho_i}(x_i,x_j)<0$ for all $j\neq i$, as required. It remains to show that if $|{\mathscr T}_0|=\infty$ with positive probability, then it is possible to find a sequence $(x_i)_{i\ge1}$ for which ${\rm Coex}(x_1,x_2,\ldots)$ occurs with probability close to one. If $|{\mathscr T}_0|=\infty$ with positive probability, then it does with probability one, and $|\mathscr{C}|=\infty$ almost surely. Let $(\rho_i)_{i\ge1}$ be an increasing sequence in $\mathscr{C}$ (considered as a sequence in $[0,2\pi)$). By symmetry of ${\mathbb Z}^2$ we may assume that each $\rho_i$ corresponds to an angle in $(0,\pi/2)$. Fix $\varepsilon>0$ and set $\varepsilon_i=\varepsilon/2^i$. We choose $\delta_1$ so that $C_{\rho_1}(0,\delta_1)$ intersect each of the lines $C_{\rho_j}(0,0)$, for $j\ge2$, only at the origin, and $M_1$ so that ${\mathbb P}(A_{\rho_1}(z,\delta_1,M_1))>1-\varepsilon_1$. Inductively we choose $\delta_i$ so that $C_{\rho_i}(0,\delta_i)$ intersects each cone $C_{\rho_j}(0,\delta_j)$ for $j<i$ and each line $C_{\rho_j}(0,0)$ for $j>i$ only at the origin, and $M_i$ so that ${\mathbb P}(A_{\rho_i}(z,\delta_i,M_i))>1-\varepsilon_i$. For any sequence $(x_i)_{i\ge1}$ we have $$ {\mathbb P}\Big(\bigcap_{i\ge1}A_{\rho_i}(x_i,\delta_i,M_i)\Big)>1-\varepsilon. $$ It remains only to verify that we may choose the sequence $(x_i)_{i\ge1}$ so that for each $i\ge1$ we have $|x_i-x_j|\ge M_i$ and $x_j\in H_{\rho_i}(x_i,\delta_i)$ for all $j\neq i$. For $i\ge1$ we take $v_{i+1}\in{\mathbb Z}^2$ such that $|v_{i+1}|>\max\{M_1,M_2,\ldots,M_{i+1}\}$, $\rho_{i+1}(v_{i+1})>\delta_{i+1}|v_{i+1}|$ and $\rho_j(v_{i+1})<-\delta_j|v_{i+1}|$ for all $j\le i$. We note that this is possible since the sequence $(\rho_i)_{i\ge1}$ is increasing and the cone-shaped regions $C_{\rho_i}(0,\delta_i)$ and $C_{\rho_j}(0,\delta_j)$ for $i\neq j$ intersect only at the origin. Finally, take $x_1=(0,0)$, and for $i\ge1$ set $x_{i+1}=x_i+v_{i+1}$. \section{Partial duality in higher dimensions}\label{sec:highdim} The proof of Theorem~\ref{thm:highdim} is similar to that of Theorem~\ref{thm:duality}. So, instead of repeating all details we shall only outline the proof and indicate at what instances our current understanding of the higher dimensional case inhibits us from deriving the full duality. In the sequel we assume $d\ge2$. The proof of the first part of the theorem is completely analogous. Suppose that $$ {\mathbb P}\big({\rm Coex}(x_1,x_2,\ldots,x_k)\big)>0 $$ for some choice of $x_1,x_2,\ldots,x_k$ in ${\mathbb Z}^d$, possibly infinitely many. Then $\mathscr{N}\ge k$ almost surely, and by (Nakajima's version, which requires an exponential moment assumption, of) Corollary~\ref{cor:cardinality} we have $|{\mathscr T}_0|\ge k$ almost surely. For the second part of the argument we will need to modify slightly the approach from the two dimensional case. In the general case we do not know that every geodesic has an asymptotically linear Busemann function. However, from (the higher dimensional version of) Theorem~\ref{thm:DH} we know that if the shape has at least $k$ sides (that is, tangent hyperplanes), then, almost surely, there are $k$ geodesics in ${\mathscr T}_0$ which all have asymptotically linear Busemann functions described by different linear functionals. Based on this we may repeat the proof of part~\emph{(ii)} of Theorem~\ref{thm:duality} to obtain coexistence of $k$ types with probability arbitrarily close to one. In the case the shape has infinitely many sides, then with probability one there are infinitely many geodesics in ${\mathscr T}_0$ with asymptotically linear Busemann functions, all described by different linear functionals. Let $(\rho_i)_{i\ge1}$ be a sequence of such linear functionals. Denote by $L_i$ the intersection of the hyperplane $\{x\in{\mathbb R}^d:\rho_i(x)=0\}$ and the $x_1x_2$-plane, i.e., the plane spanned by the first two coordinate vectors. Each $L_i$ has dimension zero, one or two, and by exploiting the symmetries of ${\mathbb Z}^d$ we may assume that sequence $(\rho_i)_{i\ge1}$ is chosen so that they all have dimension one. Each $L_i$ is then a line through the origin in the $x_1x_2$-plane, and by restricting to a subsequence we may assume that the sequence $(\nu_i)_{i\ge1}$ of normal vectors of these lines is monotone (considered as elements in $[0,2\pi)$). We may now proceed and select a sequence of points $(x_i)_{i\ge1}$ in the $x_1x_2$-plane in an analogous manner as in the two-dimensional case, leading to coexistence of infinitely many types with probability arbitrarily close to one. \section*{Acknowledgements} The author would like to express his gratitude for the years of encouragement and support received from Vladas Sidoravicius, to whom the volume in which this text will appear is dedicated to. The author is also grateful for the detailed comments received from an anonymous referee. This work was supported by the Swedish Research Council (VR) through grant 2016-04442.
\section{Introduction} Over the past few years, deep neural networks have been widely adopted in various computer vision tasks such as image classification, object detection, and semantic segmentation. Many deep learning models in various fields have been developed using a wide variety of data. These data often contain privately sensitive information such as medical records, personal photos, personal profiles, and financial information. If designed without considering adversarial threats, the model can leak sensitive information of the dataset it has trained. In \cite{shokri}, it was demonstrated that even with black-box access, an adversary can conduct a membership inference attack that determines whether a data record is a part of the training set. Early studies on membership inference attacks have focused on classification tasks \cite{ml-leaks}. Several other adversarial attacks against the object detection model have been studied, the results of which indicate the potential leakage of the model\cite{xie2017adversarial,wei2018transferable}. Through this study, we have begun extending the membership inference attack to object detection tasks. Datasets used in an object detection model can also be subject to privacy leaks. Examples of such data include outdoor pedestrian data, photos with sensitive text, and video data for autonomous driving. The membership inference of detection models can be helpful to assess whether data are collected illegally for training purposes, and attack vulnerability can be viewed as a gateway to further attacks. Compared to classifiers, there are difficulties in attack detection models: 1) In classification tasks, only the last logit of the same size is regarded, whereas in object detection tasks, all predictions based on the location of the objects are of concern. 2) Object detection tasks may have multiple objects in a single image, whereas a usual image classification task has a single object. To address these issues, we propose the canvas method for attacking an object detection model and tracing the differences in the views among the trained and test data. In summary, this paper makes the following contributions: \begin{itemize} \item We first propose a new membership inference attack on object detection models with black-box access. We describe the proposed canvas method, which draws a predicted bounding box distribution on an empty canvas for convolutional neural network (CNN) classification networks. Using this method, we can achieve a higher performance than conventional machine learning methods on the PASCAL VOC dataset. \item We found experimentally that our attack method is robust to various types of object detection models. In addition, we showed that membership inference attacks are also successful on privately sensitive data with seemingly little difference between accuracy of the training and test datasets. We also conducted a transfer attack between different models and datasets. \item We suggest the use of defense methods applying a differentially private algorithm. Experiment results show that the differentially private (DP) algorithm can defend against a membership inference with a calculated amount of privacy loss. \end{itemize} \section{Background and Related Work} \subsection{Membership Inference Attack} The end of a membership inference attack is to determine whether the given data record is in the training dataset of the target model. A membership inference attack is based upon the assumption that the target model has a different view of the training data than that of test data that was not seen before. Although overfitting is considered to be a root cause of this membership disclosure, it cannot be the only cause \cite{long2018understanding}. The attack model may have black-box and white-box access to the target model. Under the white-box access scenario, the attack model has access to certain versions of input data or intermediate layers as well as trained parameters of the target model. White-box knowledge is powerful but not realistic because the target model may not provide detailed information. In a black-box setting, the attacker does not have direct access to the target model parameters. The attack model can only access the input data and the model output predictions. The attack model should identify the difference between the inferred predictions of the training and test samples of the target model. To achieve this aim, shadow models trained using the same algorithm are built on shadow datasets sampled from a similar distribution as the target datasets but do not contain the target training data. The attack model queries the shadow model and learns to distinguish whether the shadow model output comes from the training set. Shokri et al. \shortcite{shokri} first presented the first membership inference attack against machine learning models. Ahmed et al. \shortcite{ml-leaks} enhanced an attack by relaxing some of the assumptions. Hayes et al. \shortcite{hayes2019logan} describes a membership inference attack against generative models. To mitigate the risk of a membership inference, Rahman et al. \shortcite{rahman2018membership} and Nasr et al. \shortcite{nasr2018machine} designed differentially private models and devised an adversarial regularization, respectively. \subsection{Object Detection} Object detection is a widely used computer vision task that deals with detecting an instance of a semantic objects in images or videos. There are mainly two types of methods for object detection using deep learning, namely, one-stage and two-stage detection. \vspace{5pt} \noindent {\bf One-Stage Detection} \hspace{5pt} One-stage detectors such as YOLO \cite{redmon2016you} or SSD \cite{liu2016ssd} treat an object detection problem as an end-to-end simple regression problem. The one-stage model directly predicts the class scores and bounding box coordinates concurrently. \vspace{5pt} \noindent {\bf Two-Stage Detection} \hspace{5pt} A two-stage detection model such as Faster R-CNN \cite{ren2015faster} is divided into two stages. The model first generates region proposals by narrowing down the number of possible object locations by filtering out most of the background samples on a region proposal network (RPN). The model then passes the proposals through the CNN head to classify the labels and regress the bounding boxes. \subsection{Datasets} \vspace{5pt} \noindent {\bf PASCAL VOC Dataset (2007,2012) \cite{everingham2010pascal}} \hspace{5pt} PASCAL VOC datasets have been widely adopted as benchmark datasets in basic object detection tasks. The PASCAL VOC datasets consist of VOC2007 and VOC2012. The datasets contain 20 object categories including people, bicycles, birds, bottles, dogs, etc. \vspace{5pt} \noindent {\bf INRIA Pedestrian Dataset \cite{dalal2005histograms} } \hspace{5pt} The INRIA Pedestrian dataset is popular for pedestrian detection, which consists of 614 images for training and 288 images for testing. \vspace{5pt} \noindent {\bf SynthText \cite{gupta2016synthetic} } \hspace{5pt} The SynthText dataset is a synthetically generated text dataset in which several words are placed in imgaes of natural scenes. The dataset consists of approximately 800 thousand images and 8 million synthetic word instances in various languages. \begin{figure*}[t] \begin{center} \includegraphics[width=0.9\linewidth,height=0.35\linewidth]{images/mia_overview.png} \end{center} \caption{Overview of membership inference attack on object detection model. The target and shadow datasets are sampled from the same dataset space. The target model trains using its target dataset and the shadow model, which has a similar structure as the target model, trains using its shadow dataset. The predicted values of the target and shadow models are expressed as bounding boxes and their prediction scores along with their membership status labels ("in" for the training set "out" for the test set). Finally, the attack model which trains using the shadow model's prediction and membership status, attacks the target model by passing the target records, and estimates their membership status probabilities for each target example.} \label{fig:overview} \end{figure*} \section{Attack Methodology} In this section, we propose a membership inference attack for object detection models. An overview of the membership inference attack is illustrated in Figure \ref{fig:overview}. The setting of our membership inference attack is as followes: \vspace{5pt} \noindent {\bf Assumption} \hspace{5pt} We assume that the adversary has black-box access to the target model. The adversary can obtain final logit values but no other specific intermediate layer weight information of the target models. For the given target object detection model $f_{target}$ and input image sample $x_{i}$ the target model returns the proposed bounding boxes $bbox_{j}= ((x_{j}^{0},y_{j}^{0}),(x_{j}^{1},y_{j}^{1}) )$ and prediction scores $s_{j},(j=1,2,...,N_{b})$ where $ (x_{j},y_{j})$ and $N_{b}$ denote the corner of the bounding box and the number of proposed boxes, respectively. In addition, the adversary can set a score threshold $\theta_{score}$ and non-maximum suppression (NMS) thresholds( $\theta_{nms}$ for one-stage, \{ $\theta_{nms}^{rpn}, \theta_{nms}^{head}$ \} for two-stage detectors) to customize the personal preference of the attacker. In addition, it is assumed that the target and shadow data do not overlap, i.e., $D^{train}_{shadow} \cap D^{train}_{target} = \varnothing $ \begin{figure}[t] \begin{center} \includegraphics[width=0.9\linewidth]{{images/fig2.png}} \end{center} \caption{ Predicted bounding boxes in training and test examples. The first row shows the training examples and their predicted boxes. Below are test examples and their predicted boxes. } \label{fig:predicted_box_comparison} \end{figure} \subsection{Motivation} The basic idea of a membership inference attack is that the model has a different view on the trained data and unseen data. For a classification task, the model tends to achieve a high prediction score on the training samples over the test samples. Therefore, the attack model is able to classify the membership status using the last posterior logit value of a given sample. Similarly, as shown in Figure \ref{fig:predicted_box_comparison}, the object detection model tends to achieve consistent box predictions on the training samples while showing an uncertainty regarding the test samples. \subsection{Gradient Tree Boosting} Gradient tree boosting is a widely used classification algorithm for numerous applications. Specifically, we use XG-BOOST \cite{chen2016xgboost}, a popular algorithm applied feature classification, to distinguish whether a given example is in the training sample. For the predicted bounding box coordinates and prediction scores $({ bbox_{j},s_{j}} )$, we concatenate them in a long 1-D vector: $(x_{1}^{0},y_{1}^{0},x_{1}^{1},y_{1}^{1},s_{1} , ... , x_{N_{b}}^{0},y_{N_{b}}^{0},x_{N_{b}}^{1},y_{N_{b}}^{1},s_{N_{b}}) $, and pad them with zero values to allow all vectors to have the same length. Using these vectors, we proceed with the membership classification using XG-BOOST. \subsection{Convolutional Neural Network Based Method} The next method applied to the attack model is CNN based approach. An object detection task differs from a classification because the model predicts 1) the box location information and 2) the bulk of the bounding boxes, most of which may be unhelpful. Therefore, we propose a new approach, called the canvas Method, to adequately process a predicted array for a CNN-based attack model. \begin{figure}[t] \begin{center} \includegraphics[width=0.9\linewidth,height=0.4\linewidth]{{images/fig4.png}} \end{center} \caption{ Examples of bounding box drawn canvas images using the proposed canvas method. The first row is the training data and the second and third-row images are the test data. } \label{fig:canvas_example} \end{figure} \vspace{5pt} \noindent {\bf Canvas Method} \hspace{5pt} In the object detection model, the model extracts numerous candidate boxes. Even for only a single object, the model predicts many predicted boxes. The NMS algorithm used in an object detection task is designed to filter out messy boxes that are predicted for a single object and predict them as a single proposed box. Using NMS, the box with the highest score is first chosen and boxes that overlap above the threshold are filtered out. To see the clear distribution of predicted boxes before the NMS, the threshold of the NMS is set to be a high value during the prediction. Because the detection model shows a different positional variance in predicting the training and test samples, this location information is important in a CNN-based attack model. In addition, similar to a classification model, the model also shows a high prediction score in the trained samples, which is crucial to a membership inference. To facilitate this information, we propose the use of the canvas method, which draws a predicted bounding box distribution on an empty canvas for a CNN classification network. The canvas is initially set to an image of 300$\times$300 pixels in size, where every pixel has a value of zero and the boxes drawn on the canvas have the same center as the predicted boxes and the same intensity as the prediction scores. Regarding the size of the boxes drawn on the canvas, we applied two design approaches. The first one is drawing a box equal in size as the predicted box, and the other is to draw all boxes with an identical size on the canvas regardless of the original size of the predicted box. We call the first approach the original box size, and the second the uniform box size. We use the uniform box size to make objects of all sizes detected achieve the same effect on the canvas. We set the size of a uniform box at 10\% of the canvas size. Figure \ref{fig:canvas_example} shows the examples of the canvas methods. \vspace{5pt} \noindent {\bf Augmentation} \hspace{5pt} Because a bounding box distribution in a canvas image should be robust to rotations and flipping, we adopt rotation and flipping when training the attack model. We do not apply other augmentation methods such as random cropping or perspective transformation because these augmentations generate transformed bounding box distribution which might distract the target model's view on the training or test samples. \vspace{5pt} \noindent {\bf Score Rescaling} \hspace{5pt} The prediction score of the detection model's predicted bounding box refers to how confident the model is with the objectness of bounding boxes. Because the score values are calculated after the softmax layer, the values are between zero and one. With the canvas method, bounding boxes are drawn on the canvas at the same intensity as the prediction score, and the confidence of the model might not be fully represented. For example, if the model predicts two bounding boxes with scores of 0.9 and 0.9999 respectively, it indicates that the model is much more certain that the latter is an object. However, these values do not themselves represent a significant difference on the canvas. To emphasize the model's prediction scores of the model, we utilize a score rescaling function. \begin{equation}\label{eq:squash_variant} s_{rescale} = - \log(1-s) \end{equation} In a Taylor expansion, this function is represented as $-log(1-s) = s + \frac{s^2}{2} + \frac{s^3}{3} + ... $. Therefore in the case of an extremely small $s$, a rescale function is an approximate identity function, which means the rescaling has little effect on small scores. Using this function, the minuscule difference between the two scores (i.e. 0.0999 from 0.9 and 0.9999) is changed to 6.91 (from 2.30 and 9.21), which can be seen as significant. \subsection{Transfer Attack} We mitigate the assumption that the distribution of the target training data is similar to that of the shadow training data. In a realistic situation, it could be difficult or even impossible to secure a sufficient number of shadow data having the same distribution as the target data. Under this scenario, in \cite{ml-leaks}, a transfer attack was proposed, which composes a shadow model with relatively common and similar object detection dataset. Although a shadow model has difficulty mimicking the target model's behavior owing to different statistics and appearances between two data distributions, the attack model is still expected to be able to capture the membership status of the given data. On the other hand, the target model structure may be different. We also conducted another style of transfer attack, the shadow model structure of which differs from that of the target model. \section{Defense} To mitigate a membership inference against machine learning models, we propose several defense techniques. \subsection{Dropout} Because overfitting is a dominant reason why the target models leak their training data information, generalization techniques that prevent overfitting can help defend models against membership inferences. We adopt Dropout \cite{Dropout}, to obtain a well-generalized model. \subsection{Differentially Private Algorithm} Differential privacy \cite{dwork2011firm} offers a strong standard of privacy guarantees for computations involving aggregate datasets. It requires that any change to a single data point should reveal statistically indistinguishable differences from the model's output. A formal definition of differential privacy is described below: \begin{definition}[$(\epsilon , \delta) $ - Differential Privacy]\hfill Given two neighboring datasets $D$ and $D'$, differing by only one record, a randomized mechanism $\mathcal{A}$ provides $(\epsilon , \delta) $ - Differential Privacy if for $\forall S \subseteq Range(\mathcal{A})$ , \begin{equation} \Pr[\mathcal{A}(D) \in S] \le e^\epsilon \Pr[\mathcal{A}(D') \in S] + \delta \end{equation} \end{definition} We call this $(\epsilon , \delta) $-DP for short. If $\delta$ = $0$ , $\mathcal{A}$ provides a stricter $\epsilon$-DP. $\epsilon$ is called a privacy loss. To create a differentially private deep learning model, a differentially private stochastic gradient descent (DP-SGD) \cite{abadi2016deep,mcmahan2017learning,song2013stochastic} is adopted to optimize the model. Compared to a conventional SGD optimizer, DP-SGD optimizer has two main changes to achieve the required privacy guarantee: adding Gaussian noise to gradient and gradient clipping for each minibatch sample. The specific algorithm is presented in Algorithm \ref{alg:dpsgd}. Abadi el al. \shortcite{abadi2016deep} showed a way to track a tight differential privacy bound of DP-SGD using moments accountant (MA). According to Yu et al. \shortcite{dp-publish}, however, MA assumes random sampling with replacement which is impractical and is outperformed by random reshuffling \cite{gurbuzbalaban2015random}. Assuming sampling batches by random reshuffling, Yu et al. \shortcite{dp-publish} showed that realistic privacy loss bound for DP-SGD is $( \rho + \sqrt{\rho \log(1/\delta)} , \delta)$-DP for $\rho$ = $\frac{k}{2 \sigma^{2}}$ where $\sigma$ is noise scale and $k$ is the number of epochs. \begin{algorithm}[t] \small \caption{Differentially Private SGD} \label{alg:dpsgd} \KwIn{Training examples $\{x_1,\ldots,x_N\}$, loss function $\mathcal{L}(\theta) = \frac{1}{N}\Sigma_{i} \mathcal{L}(\theta,x_{i}) $, learning rate $\eta_t$, group size $L$, noise scale $\sigma_{t}$ gradient norm bound $C$ } \textbf{Initialize} $\theta_{0}$ randomly \; \For {$t=1~:~T$} { \textbf{data batching}:\\ Take a random batch of data samples $\mathbb{B}_t$ from the training dataset\; $B=|\mathbb{B}_t|$\; \textbf{Compute gradient}:\\ For each $i\in \mathbb{B}_t$, $\mathbf{g}_t(x_i) \leftarrow \bigtriangledown_{\theta_t} \mathcal{L}(\theta_t,x_i)$\; \textbf{Clip gradient}:\\ $\hat{\mathbf{g}}_t(x_i) \leftarrow \mathbf{g}_t(x_i)/max\left(1,\frac{||\mathbf{g}_t(x_i)||_2}{C}\right)$\; \textbf{Add noise}:\\ $\widetilde{\mathbf{g}}_t \leftarrow \frac{1}{B} \big(\sum_{i}\hat{\mathbf{g}}_t(x_i)+\mathcal{N}(0,\sigma_t^2C^2\mathbb{I})\big)$\; \textbf{Descent}:\\ $\theta_{t+1} \leftarrow \theta_{t}- \eta_t \widetilde{\mathbf{g}}_t$ \; } \textbf{Output} : $\theta_T$ \; \end{algorithm} \section{Experiments} In this section, we describe the application of our method to several object detection tasks. To reduce confusion, we call the training dataset and test dataset of target and shadow models "in" and "out" data respectively. We used the Chainer framework for the object detection modules and Pytorch for the membership attack modules. \subsection{Target and Shadow Model Setup} \vspace{5pt} \noindent {\bf Models} \hspace{5pt} To build target models, we train several object detection models including SSD and Faster R-CNN. For one-stage detection, the base SSD300-VGG16 and SSD512-VGG16 models use the VGG16 network as a backbone and have 300$\times$300 images and 512$\times$512 images as the inputs, respectively. The SSD300-Res50 model uses ResNet50 network as a backbone. For two-stage detection, the Faster R-CNN model uses the VGG16 network as a backbone and receives images with a scale of between 600 and 800. \vspace{5pt} \noindent {\bf Datasets} \hspace{5pt} During the experiments, we used the datasets described earlier, i.e., VOC dataset, INRIA Pedestrian Dataset, and SynthText. According to Ahmed et al. \shortcite{ml-leaks}, one shadow dataset is sufficient. For each dataset, $D$=$(D^{train},D^{test})$, we split them by half into $(D_{target}^{in},D_{target}^{out})$ and $(D_{shadow}^{in},D_{shadow}^{out})$ to separate the target and shadow datasets. For SynthText dataset, we use the first 5,000 images with Latin characters for the target dataset and next 5,000 images for the shadow dataset. \vspace{5pt} \noindent {\bf Training} \hspace{5pt} To train the SSD model, we used an SGD optimizer with an initial learning rate $10^{-3}$, $0.9$ momentum, 0.0005 weight decay and batch size 8. We trained the model 500k iterations and dropped the learning rate by $0.1$ in the 200kth, 400kth iterations. During training, we used data augmentation including horizontal flipping, color distortion, random expansion and cropping. To compare the effect of the augmentation, we also trained models that only applied flipping. To train the Faster R-CNN model, we used the same optimizer and learning rate as in the SSD and batch size 1. \vspace{5pt} \noindent {\bf Prediction} \hspace{5pt} In the case of a one-stage model, to see the overall distribution of the predicted bounding boxes, NMS threshold was set to 1.0. In the case of a two-stage model with two NMS layers, the RPN-NMS and the head-NMS thresholds were set to 0.7 and 1.0 respectively, because the high threshold value of RPN-NMS can cause a huge number of box proposals. The score threshold was set to 0.01. \subsection{Attack Model Setup} To perform a black-box membership inference attack, we built several attack models as presented above. For XG-Boost model, we used Python XG-Boost package\footnote{https://github.com/dmlc/xgboost}. XG-Boost classifier takes vectorized bounding boxes and scores as inputs and has 5 maximum depth of a tree and 450 estimators as model parameters. For CNN-based classifiers with canvas method, we built two CNN models, a simple shallow CNN model and AlexNet \cite{AlexNet}. For Shallow CNN model, we used two convolutional networks having 64 and 128 channels and two fully connected networks having 128 and 2 units. CNN based attack model takes drawn canvas images with predicted boxes as input. For balanced training, the attack model uses the almost same number of predicted results of "in" data and "out" data of the shadow model. We applied vertical and horizontal flipping for augmentation and score rescaling presented above. We compared various canvas methods to find the most optimal attack model. \begin{table}[] \begin{tabular}{p{1.1cm}|p{0.4cm}p{0.4cm}p{0.4cm}|rrrr} \hline Attack & \multicolumn{3}{c|}{Attack Method} & \multicolumn{2}{c|}{SSD} & \multicolumn{2}{c}{FR} \\ \cline{2-8} Model&Aug&BT&SR&Acc& \multicolumn{1}{l|}{AR}& Acc&AR\\ \hline XGB & & & & 66.09 & 67.64 & 60.47 & 60.48 \\ shallow& & (O) & & 62.62 & 62.66 & 58.72 & 58.67 \\ AlexNet & & (O) & & 64.28 & 64.26 & 62.74 & 62.62 \\ AlexNet & $\checkmark$ & (O) & &67.55 & 67.55& 64.30 & 64.22 \\ AlexNet & $\checkmark$ & (O) & $\checkmark$ & 68.30 & 68.24 & 66.59 & 66.49 \\ AlexNet & $\checkmark$ & (U) & & 69.34 & 69.31 & 66.69 & 66.59 \\ AlexNet & $\checkmark$ & (U) & $\checkmark$ & \textbf{71.07} & \textbf{71.02} & \textbf{67.42} & \textbf{67.34} \\ \hline \end{tabular} \caption{ Comparison of various attack methods. FR and XGB denote Faster R-CNN and XG-Boost. Aug, BT, SR and AR denote augmentation, box style of canvas method, score rescaling and average recall, respectively. (O) and (U) denote original and uniform box size, respectively. } \label{table:attack_comparison} \end{table} \begin{table*}[t] \begin{center} \begin{tabular}{l|c|c|r|r|r|r|r} \multicolumn{3}{c|}{} &\multicolumn{2}{c|}{ Target Model } &\multicolumn{3}{c}{ Attack Model } \\ \hline Model & Dataset & iters& test mAP & train mAP & Attack Acc &Average Recall & Val Acc \\ \hline SSD300-VGG16(Little Aug.)& VOC & 400k & 59.27 & 92.27 & 89.92 & 89.90 & 91.16 \\ SSD300-VGG16 & VOC & 250k & 73.88 & 89.30 & 67.88 & 67.92 & 72.20 \\ SSD300-VGG16 & VOC & 500k & 74.25 & 90.27 & 71.07 & 71.02 & 72.20 \\ SSD512-VGG16 & VOC & 500k & 76.53 & 91.09 & 71.03 & 70.10 & 73.04 \\ SSD300-Res50 & VOC & 700k & 66.04 & 85.43 & 73.86 & 73.82 & 75.97 \\ Faster R-CNN & VOC & 200k & 72.71 & 88.00 & 62.50 & 62.44 & 64.44 \\ Faster R-CNN & VOC & 400k & 71.80 & 90.20 & 67.42 & 67.34 & 64.44 \\ SSD300-VGG16 & INRIA & 100k & 88.20 & 90.90 & 71.40 & 62.95 & 73.21 \\ SSD300-VGG16 & SynthText & 400k & 88.45 & 90.84 & 66.90 & 66.90 & 68.49 \\ \hline \end{tabular} \end{center} \caption{ Attack performance on various models and datasets. Little Aug. refers training with only horizontal flipping. Attack Acc and Average recall refer attack accuracy and average recall on target models. Val Acc refers attack accuracy on shadow models. } \label{table:attack_result} \end{table*} \begin{figure} \begin{center} \subfloat{}\includegraphics[width=0.3\linewidth,height=0.25\linewidth]{images/result_ssd300.png} \subfloat{}\includegraphics[width=0.3\linewidth,height=0.25\linewidth]{images/result_ssd512.png} \subfloat{}\includegraphics[width=0.3\linewidth,height=0.25\linewidth]{images/result_fasterRcnn.png} \end{center} \caption{Membership inference attack results on various target models.} \label{fig:attack_graph} \end{figure} \subsection{Experiment Results} \label{Results_attack} Table \ref{table:attack_comparison} depicts the results of the comparisons of various attack methods. In general, AlexNet with augmentation, score rescaling and the uniform canvas method is successful on both the SSD and Faster R-CNN models. Therefore, we adopted the best performing method as the attack method in the next experiments. To demonstrate the relationship between the membership inference and overfitting, we conducted experiments using different numbers of iterations in the model. Figure \ref{fig:attack_graph} shows that the overall attack performance increases with an increases in the number of iterations. Table \ref{table:attack_result} shows the results of the membership inference attacks of various object detection models and datasets. The attack model is the best performing model in table \ref{table:attack_comparison}. The mAP scores of the detection models are slightly smaller than their original performance because they train only half of the dataset. The evaluation metrics for the attack model are the accuracy and average recall of "in" and "out" labels. The attack model achieves a similar attack performance against the target and shadow models because the distributions of dataset and model structure are similar. Overall, the attack models achieve a high accuracy for most detection of the models and datasets. In general, large generalized errors are related to the high performance of the attack models. In the case of target models trained using the INRIA and SynthText datasets, test mAP is relatively high because the tasks are easy, although the attack models still obtain a high attack accuracy. \begin{table}[t] \centering \begin{tabular}{p{1cm}p{1cm}p{1cm}p{1cm}} \hline Model &SSD300&SSD512&FR\\ \hline SSD300 & 74.25 & 68.84 & 61.73 \\ SSD512 & 66.87 & 71.03 & 62.94 \\ FR & 60.19 & 57.28 & 67.42 \\ \hline \end{tabular} \label{table:transfer_models} \end{table} \begin{table}[t] \centering \begin{tabular}{p{1.1cm}p{1cm}p{1cm}p{1.3cm}} \hline Dataset &VOC&INRIA&SynthText\\ \hline VOC & 74.25 & 68.36 & 48.72 \\ INRIA & 74.28 & 71.40 & 50.85 \\ SynthText & 53.92 & 51.91 & 66.90 \\ \hline \end{tabular} \caption{Results of transfer attack over various object detection models and datasets. The x-axis represents the structure and dataset of the target models attacked and the y-axis represents that of shadow models for transfer attacks respectively. FR denotes Faster R-CNN.} \label{table:transfer_dataset} \end{table} \begin{table}[t] \centering \begin{tabular}{p{1.6cm}p{1.3cm}p{1.5cm}p{1cm}p{1.7cm}} \hline Defense &test mAP&train mAP&A-acc.&p-loss\\ \hline Base & 74.25 & 90.27 & 71.07 & $\infty$ \\ Dropout & 74.20 & 89.84 & 70.94 & $\infty$ \\ DP($\sigma$=$10^{-4}$) & 74.32 & 88.15 & 68.68 & 2.42$\times$ $10^{10}$\\ DP($\sigma$=$10^{-3}$) & 67.30 & 78.45 & 50.45 & 3.87$\times$ $10^{8}$ \\ \hline \end{tabular} \caption{Comparison of various defense methods. A-acc and p-loss denote the attack model accuracy and privacy loss respectively. } \label{table:defense} \end{table} \subsection{Transfer Attacks} \label{transe} \noindent {\bf Setup} \hspace{5pt} During the transfer attack, we used the same setup as mentioned in Section \ref{Results_attack}. We conducted a transfer attack over the SSD300, SSD512 and Faster R-CNN models and VOC dataset. We also conducted transfer attacks over VOC, INRIA, and SynthText datasets and SSD300 model. \vspace{5pt} \noindent {\bf Results} \hspace{5pt} Tables \ref{table:transfer_dataset} list the results of the model and dataset transfer attacks. The attack model trained using the same model structure or distribution dataset showed the highest accuracy. Transfer attacks on different detection models seemed to work well. The usage of the VOC dataset to attack the INRIA dataset and vice versa achieved a good performance. This might be because these two datasets have the same common label("person") and had a few objects per image. However, a transfer attack between SynthText and the other datasets did not perform well. This could be because SynthText had little in common with VOC and INRIA and had many objects per image. Transfer attacks tend to be successful when the datasets or models are similar to each other. \subsection{Defense} \noindent {\bf Setup} \hspace{5pt} We tested the proposed defense methods against membership attacks. For the dropout, we added two dropout layers with a ratio of 0.5 before the two layers of the model. For the differentially private algorithm, we set noise scale $\sigma$=$10^{-3}$ , $10^{-4}$, gradient bound $C=50$, and minibatch size 2. We set up a relatively small noise because the object detection model has a large number of parameters \cite{general-dp}.We trained the SSD300 model 800k iterations for $\sigma$=$10^{-3}$, and 500k iterations for the others. We obtained the privacy loss with fixed $\delta$=$10^{-5}$. \vspace{5pt} \noindent {\bf Results} \hspace{5pt} Table \ref{table:defense} shows the results of the defense methods. Dropout shows a slight drop in the attack accuracy, but it does not show a large difference. The DP($\sigma$=$10^{-4}$) shows little difference from the original model with mAP, but it lowers attack accuracy meaningfully. The larger noise scale DP($\sigma$=$10^{-3}$) shows some loss in accuracy, but its good defense against the attack model compensates for this. \section{Conclusion} In this study, we introduced new membership inference attacks against object detection models. Our proposed CNN-based attack model using the canvas method performed better than a traditional machine learning regression method. We showed that sufficiently overfitted object detection models are vulnerable to privacy leakage. A generalization error is not a guarantee of safety against an inference attack. Transfer attacks are also efficient when the models or datasets are similar. To mitigate the privacy risks, we proposed defense mechanisms that are able to reduce such risks. We showed that membership inference risks in object detection models need to be considered. \bibliographystyle{named}
\section{Introduction}\label{introduction} In classical mechanics there is a strong link between ergodicity and thermalization. However, the situation is different in quantum mechanics. The conjecture by Bohigas, Giannoni and Schmit (BGS) \cite{bgs} establishes that the spectral fluctuations of quantum systems with an ergodic classical analogue exactly follow random matrix theory (RMT) \cite{rmt,Haake2010}. Hence, deviations from ergodicity are usually identified via spectral statistics. Alternatively, quantum thermalization is justified by the eigenstate thermalization hypothesis (ETH) \cite{Nandkishore2015,rigol2016,Tasaki1998,Rigol2008,Reimann2015,Reimann2018,Deutsch2018}, which refers to the properties of expected values of physical observables in the eigenstates of the Hamiltonian. It is normally accepted that a quantum system thermalizes if the diagonal fluctuations of these expected values decrease fast enough with the system size \cite{rigol2016}. This statement is believed to be a consequence of quantum chaos and, ultimately, of RMT. Notwithstanding, RMT is more strict regarding the behavior of these diagonal fluctuations: they must constitute an uncorrelated random sequence, a request only present in the most rigurous view of ETH \cite{erh}. Hence, the link between quantum chaos and thermalization is by no means established yet, as a complete connection between these two theories is still missing. Unfortunately, simulating large quantum systems is not feasible, so it is not clear whether ergodicity in the sense of BGS is mandatory for thermalization, or a less rigurous definition for the term is sufficient. In this Article we deal with this issue by investigating one of the most striking exceptions to thermal behavior in many-body quantum systems: the transition to many-body localization (MBL) \cite{Altman2018, Basko2006,Nandkishore2015,Alet2018,Abanin2019,Schreiber2015,Lukin2019,Choi2016,Smith2016,Roushan2017,Xu2018,Suntajs2019,Sierant2019,Altshuler1997,Luitz2015,Facoetti2016,Pino2016,Luitz2017,Mace2019,Filippone2016,Abanin2019,Sierant2019PRB,Lev2016,Suntajs2020}. The MBL phase is an insulating quantum phase of matter that emerges in some disordered interacting many-body systems, like the paradigmatic one-dimensional spin chain, when the disorder is large enough \cite{Basko2006,Nandkishore2015,Alet2018,Abanin2019}. Several experiments in one-dimensional lattice fermions and bosons \cite{Schreiber2015,Lukin2019}, two-dimensional interacting bosons \cite{Choi2016}, trapped ultracold ions \cite{Smith2016}, and superconducting qubits \cite{Roushan2017,Xu2018} have found its signatures. Notwithstanding, its relevance in the thermodynamic limit (TL) is still under active discussion \cite{Suntajs2019,Sierant2019}. Its counterpart, the ergodic phase, in which thermalization is normally expected, is usually not under such scrutiny. However, the transition between the MBL phase and the ergodic phase is not well understood yet. Griffiths effects where anomalously different disorder regions dominate the behavior are supposed to be very relevant close to the transition \cite{Agarwal2015,Gopalakrishnan2016}, although recent studies deny that relevance \cite{Weiner2019}. The possibility of the existence of a non-ergodic but extended phase (a so-called \textit{bad metal}) between the ergodic and the MBL phases has been proposed but whether it survives in the TL is in doubt \cite{Altshuler1997,Luitz2015,Facoetti2016,Pino2016}. Numerical studies of the ergodic phase in spin models showing transitions to a MBL phase for large disorder have found that the ergodic phase shows subdiffusive dynamics and other non-trivial behavior \cite{Luitz2017,Mace2019,Filippone2016}. Yet, it is not clear if these properties are generic or system dependent and they are probably very much affected by intrinsic limitations of the numerical size scaling due to the exponential growth of Hilbert space dimensions. Overall, MBL and the associated transition continue to receive a great deal of attention from different viewpoints and approaches \cite{Kjall,Devakul,Luitz2016,Yu2016,Modak2015,Serbyn2015,Serbyn2017,Kokalj,Ros2015,Vosk2015,Potter2015}. Here, we deal with the disordered Heisenberg chain, where a transition from ergodic to MBL phases is expected to occur. We focus on the deviations from RMT that happen within the usually identified as ergodic region \cite{Altshuler1986,Altshuler1988,stockmann,Jensen1985,Srednicki1994,Deutsch1991}, and we study their consequences in ETH and thermalization. We report a neat connection between the Thouless energy, $E_{\textrm{Th}}$ \cite{Edwards1972,Shapiro1993}, the energy scale beyond which spectral statistics deviate from RMT universal results, and the diagonal fluctuations of relevant observables. We find that these fluctuations cease to constitute an uncorrelated random signal beyond the scale set out by the Thouless energy, giving rise to another deviation from RMT. For small spin chains, this scale determines up to what extent the system thermalizes ---the smaller the Thouless energy, the more probable is to find a non-thermalizing initial condition. Furthermore, the transition from the more chaotic to the MBL region is triggered by an extended region in which the distribution of deviations from thermal equilibrium is very long-tailed, a region which is also characterized by a very small Thouless energy. This fact is compatible with other features associated to Griffith effects \cite{Griffiths1969,Luschen2017,Agarwal2015,Gopalakrishnan2016,Weiner2019, Luitz2016}. Finite-size scaling available to current computational capabilities suggests that this region does not shrink as the system size is increased, but its fate in the thermodynamic limit is still not clear. Hence, the following picture is compatible with our results: $(i)$ an integrable limit when the chain is disorder-free; $(ii)$ a narrow (almost) ergodic region, at small disorder; $(iii)$ an anomalous region, within the apparent ergodic phase, with a significant probability of finding non-thermalizing initial conditions; and $(iv)$ the MBL phase, in which generic initial conditions are expected not to thermalize. The remainder of this paper is organized as follows. In Sec. \ref{thermalizationmechanism} we review the concept of quantum thermalization, governed by ETH, and comment on its connection with RMT. We argue that the deviations from RMT in many-body ergodic systems, identified by the Thouless energy, must have measurable consequences in the thermalization process. In Sec. \ref{secmodel} we introduce the model that we use: the Heisenberg chain, which has become the standard model to test many-body localization. Sec. \ref{thoulesseth} is devoted to a large part of our main results. We devise a novel approach to treat the diagonal fluctuations of the ETH so that they can be easily put in comparison with results that involve long-range spectral statistics. We find that there exists a characteristic scale well-within the ergodic phase that can be identified in both measures. It behaves non-monotically and very approximately coincide for spectral statistics and the diagonal flucutations of observables. We then study thermalization by a quench protocol in this region, and find that it shows vast differences even within the ergodic phase, so deviations from RMT represent an important role, at least in finite systems. In Sec. \ref{secanomalous} we investigate the transition from the ergodic to the many-body localized phase. Our results suggest that the emerging structure is a precursor of the transition, heavily influenced by Griffiths effects. We find anomalously long-tailed distributions that do not show any scaling with the system size which, strictly, is incompatible with thermalization. Our results suggest that the ergodic region of the model is actually not as wide as put forward by some previous works. Finally, in Sec. \ref{secconclusions} we gather the main results of our work. \section{Thermalization and its mechanism}\label{thermalizationmechanism} Let us consider an initial condition, $\ket{\psi(0)}$, evolving in an isolated quantum system with Hamiltonian $H$, $\ket{\psi(t)}=\exp\left(i H t/\hbar \right) \ket{\psi(0)}$. The key element to determine if this particular initial condition thermalizes is the behavior of long-time averages of expected values of physical observables, \begin{equation} \label{longtimeaverages} \begin{split} \langle \hat{O}\rangle_{t} &:= \lim_{\tau\rightarrow \infty}\frac{1}{\tau} \int_0^{\tau} \textrm{d}t \, \bra{\psi(t)}\hat{O}\ket{\psi(t)} \\ &=\sum_n \left| C_n \right|^2 \bra{E_{n}}\hat{O}\ket{E_{n}}, \end{split} \end{equation} where $\ket{E_n}$ represents the eigenstate with energy $E_n$, $H \ket{E_n} = E_n \ket{E_n}$, and $\left|C_n\right|^2 := \left|\left< \psi(0) \right| \left. E_n \right>\right|^2$ is the probability of finding the system in the eigenstate $\ket{E_n}$. For simplicity, we have assumed that the energy spectrum is not degenerate. Thermalization occurs if Eq. \eqref{longtimeaverages} is equal to the microcanonical average, \begin{equation}\label{mea} \langle \hat{O}\rangle_{\textrm{ME}}:=\frac{1}{\mathcal{N}}\sum_{E_n\in[E-\Delta E,E+\Delta E]}\bra{E_n}\hat{O}\ket{E_n}, \end{equation} where $E$ is the (macroscopic) energy of the system, and $\Delta E$ a small energy window, $\Delta E/E \ll 1$, containing a large number of levels, ${\mathcal N} \gg 1$. It is well known that long-time averages like Eq. \eqref{longtimeaverages} remain close to an equilibrium value under very generic circumstances \cite{Reimann2008,Linden2009}, although some questions remain open \cite{Hamazaki2018}. However, this equilibrium value is not necessarily equal to Eq. \eqref{mea}. In classical mechanics, the link between the equivalent results is well supported by chaos. If the system is ergodic and mixing, any trajectory erratically explores the whole region of the phase space with energy $E$, and therefore long-time averages become equivalent to phase space averages restricted to the right value of the energy $E$ \cite{Pathria}. In quantum mechanics, the situation is rather different. The equivalence between microcanonical and long-time averages lies in the ETH \cite{Jensen1985,Deutsch1991,Srednicki1994,Tasaki1998,Rigol2008,Reimann2015}. In a few words, this theory states that a system is expected to thermalize for an observable $\hat{O}$ if the diagonal terms $O_{nn}:=\bra{E_{n}}\hat{O}\ket{E_{n}}$, $n\in\{1,\ldots,N\}$ change with energy smoothly enough. To get a more detailed picture \cite{Deutsch2018}, let us consider that, regardless of whether the system thermalizes or not, one has \begin{equation}\label{diagonalterms} O_{nn}=\langle \hat{O}\rangle_{\textrm{ME}}+\Delta_{n},\,\,n\in\{1,\ldots,N\}, \end{equation} where $N$ denotes the size of the Hilbert space, and the quantity $\Delta_{n}$ represents how close the diagonal element $O_{nn}$ is to the microcanonical average, $\left< \cdot \right>_{\textrm{ME}}$; we will call it \textit{ diagonal fluctuations}. The ETH requires that $\Delta_{n}$ decreases fast with the system size for thermalizing systems \cite{Deutsch2018}. In its strong version, it demands that all the values of $\Delta_{n}$ be negligible; for its weak version, it suffices that most $\Delta_{n}$ fulfill this condition \cite{Reimann2018,Hamazaki2018}. These facts do establish a link between quantum thermalization and chaos, but not so strong as in classical mechanics. The quantum analogs of mixing classical systems give rise to energy spectra whose statistical properties coincide with those of RMT \cite{bgs}. Regarding the diagonal fluctuations, $\Delta_n$, RMT gives rise to an uncorrelated random signal with exponentially decaying width with the system size \cite{Deutsch2018}. This constitutes a stronger condition for $\Delta_n$ than the one demanded by the ETH, and it is only considered under certain circumstances \cite{erh}. Contrarily, $\Delta_{n}$ can show some structure in integrable systems, due to the presence of additional quantum numbers \cite{Peres1984,Lobez2016}. Deviations from RMT are well known, even within regions identified as ergodic. In disordered many-body systems these deviations can be identified via the so-called Thouless energy \cite{Edwards1972,Shapiro1993}. In noninteracting disordered metals, this is an energy scale related to the typical time that a particle takes to diffuse across the sample. However, for interacting systems, the meaning of this quantity is still under active discussion, although there is some convincing evidence that it might be related to a complex anomalous diffusion process \cite{Bertrand2016}. As expected in the noninteracting limit, level statistics of interacting systems were shown to be well described by RMT universal results for eigenvalues separated by less than this quantity, but deviate towards the typical behavior for integrable systems at larger scales \cite{Bertrand2016}. However, the dynamical consequences of this fact are not clear at all. The emergence of a finite Thouless energy has been argued to be connected with Griffiths effects and the subdiffusive phase appearing on the ergodic phase, but this is still a subject that deserves further investigation as some questions remain open to this day. At the same time, ergodicity has been assumed if the Thouless energy grows fast-enough with the system size \cite{Suntajs2019,Suntajs2020}, but no stringent test regarding thermalization has been done to support this claim. The main aim of this paper is to study the role played by this energy scale in the thermalization process, a topic in which, we believe, there has been little to no research. \section{Model}\label{secmodel} We work with the standard model for MBL: a one-dimensional chain with two-body nearest-neighbor couplings, $L$ sites, and onsite magnetic fields, the Heisenberg model \cite{Serbyn16,Bertrand2016,Torres2017,lfsantos,Buijsman2019}, \begin{equation} \label{model} \begin{split} \mathcal{H}&=\sum_{\ell=1}^{L}\omega_{\ell}\hat{S}_{\ell}^{z}\\&+J\sum_{\ell=1}^{L-1}\left(\hat{S}_{\ell}^{x}\hat{S}_{\ell+1}^{x}+\hat{S}_{\ell}^{y}\hat{S}_{\ell+1}^{y}+\lambda \hat{S}_{\ell}^{z}\hat{S}_{\ell+1}^{z}\right), \end{split}\end{equation} where $\hat{S}_{\ell}^{x,y,z}$ are the total spin operators at site $\ell\in\{1,\ldots,L\}$. We choose $J=1$, $\hbar:= 1$. Periodic boundary conditions are applied, which minimize finite-size effects. For our simulations, we let $\lambda$ vary to study quenched dynamics, while we fix $\lambda=1$ to analyze eigenlevel statistics. Disorder is implemented by the uniformly, randomly distributed magnetic fields $\omega_{\ell}\in[-\omega,\omega]$. For $\omega=0$, the chain is disorder-free and it gives rise to fully integrable dynamics that can be described by means of the Bethe-ansatz \cite{Nandkishore2015,rigol2016}. For intermediate values of $\omega$, the chain is believed to exhibit an ergodic phase where most initial conditions are expected to thermalize. The spectral statistics of this region are complex: they show a behavior close to the Gaussian orthogonal ensemble (GOE), following RMT, but with long-range deviations due to the Thouless energy. Overall, this metallic region is by no means a common one as a number of anomalous phenomena have been previously diagnosed. Close to the transition, a Griffith-like phase \cite{Lev2014,Lev2015,Luitz2015,Luitz2016,Agarwal2015,Znidaric2016,Ros2015,Gopalakrishnan2016} is responsible for slow subdiffusion and sublinear power-law growth of the entanglement entropy. For $\omega$ larger than a critical value which depends on the system size $L$, the model enters the many-body localized phase where (generic) initial conditions do not thermalize at all. Both the Bethe-ansatz and the MBL phases show Poissonian spectral statistics, which means energy levels are here essentially uncorrelated. As commonly done in the literature, in this work we consider the the eigenvalues associated to the eigenstates of $\hat{S}^{z}:=\sum_{i}\hat{S}_{i}^{z}$. Since this operator commutes with the Hamiltonian, $[\mathcal{H},\hat{S}^{z}]=0$, we restrict ourselves to the sector $S^{z}=0$, where $S^{z}$ is the eigenvalue of the operator $\hat{S}^{z}$. Thus the dimension of the Hilbert space is $d=\binom{L}{L/2}$, but we will only consider the central $N=\binom{L}{L/2}/3$ eigenstates $\{\ket{E_{n}}\}_{n=1}^{N}$ to avoid border effects. Main results are shown for $L=16$, which gives $N=4290$, but for finite-size scaling considerations some results will also be shown for other values of $L$. \section{ Thouless energy and Eigenstate Thermalization Hypothesis}\label{thoulesseth} \subsection{Short-range spectral statistics} By far, the most common indicator in the literature to identify the $\omega$ range for which systems show ergodic or integrable dynamics is short-range spectral statistics \cite{stockmann}. To this end, the distribution of the ratio of two-level spacings \cite{ratios,Oganesyan2007}, $P(r)$, has been employed to a great extent. This is just the distribution of $r$: the random variable taking on values \begin{equation}r_{n}:= \frac{E_{n+1}-E_{n}}{E_{n}-E_{n-1}},\,\,\,\,\forall n\in\{2,\ldots,N-1\}.\end{equation} The set of energies is supposed to be in ascending order, $\{E_{1}\leq\ldots\leq E_{N}\}$. This spectral statistic captures short-range spectral correlations only and is not to be trusted when long-range correlations are to be investigated. Specifically, only the spectral properties of energies separated by level distances less than or equal to 2 can be described by this statistic. In particular, we make use of the equivalent measure $\langle \widetilde{r}\rangle$ where $\widetilde{r}$ is the random variable \begin{equation}\label{minratios}\widetilde{r}_{n}:= \min\Bigg\{r_{n},\frac{1}{r_{n}}\Bigg\}\in[0,1],\,\,\,\forall n\in\{2,\ldots,N-1\}.\end{equation} The quantity $\langle\widetilde{r}\rangle$ is always defined, as opposed to $\langle r\rangle$, which diverges for a spectrum with Poissonian statistics. For the chaotic GOE, $\langle \widetilde{r}\rangle_{\textrm{GOE}}\approx 0.5307(1)$, while for the integrable (Poissonian) limit this is $\langle \widetilde{r}\rangle_{\textrm{P}}=2\ln 2-1$. This information is complemented with the interpolating distribution of the ratios suggested in \cite{Corps2020}, \begin{equation}\label{distribution} P_{\gamma\beta}(r):= C_{\beta}\frac{(r+r^{2})^{\beta}}{\left[(1+r)^{2}-\gamma(\beta)r\right]^{1+3\beta/2}}. \end{equation} The generalized Dyson index $\beta\in[0,1]$ indicates the degree of chaos: $\beta=0$ is for Poisson whereas $\beta=1$ is for GOE. The ansatz for $\gamma=\gamma(\beta)$ in the Poisson-GOE transition proposed in \cite{Corps2020} has been used, and $\beta$ is obtained by fitting \eqref{distribution} to the numerical histograms for each value of the disorder parameter, $\omega$. Finally, $C_{\beta}$ are normalization constants implicitly verifying $\int _{0}^{\infty}\textrm{d}r\,P_{\gamma\beta}(r)=1$. To easily compare both estimates, the results for $\langle \widetilde{r}\rangle$ are shown after the rescaling $ \eta:=\frac{\langle\widetilde{r}\rangle_{\textrm{P}}-\langle\widetilde{r}\rangle}{\langle \widetilde{r}\rangle_{\textrm{P}}-\langle\widetilde{r}\rangle_{\textrm{GOE}}}$, which is such that $\eta=0$ for Poisson and $\eta=1$ for GOE. These quantities are shown in Fig. \ref{ratios}. For all three values of $L$, there is a strong plateau that shrinks as $L$ is decreased. Conversely, short-range measures provided by the ratios suggest that as $L$ is increased the plateau that determines the size of the ergodic region should stretch in the directions of both large and small $\omega$. This is the region usually identified as ergodic in the literature \cite{Serbyn16,Sierant2019PRB,Alet2018,Bertrand2016}. The transition to the many-body localized phase is initiated at a certain value of the disorder strength that strongly depends on the system size, $L$. For $L=16$, this ergodic region covers about $0.2\lesssim\omega\lesssim1.8$, although the exact boundaries have not been completely delimited. However, the ratios only afford information about the distribution of eigenlevels separated by \textit{small distances}, and cannot capture in any way long-range spectral correlations, i.e., the statistical properties of eigenlevels further apart. We will see in the next subsection that this leads to important consequences. \begin{figure}[h] \begin{tabular}{c} \hspace{-1.4cm}\includegraphics[width=0.36\textwidth]{fig1a.eps} \\ \includegraphics[width=0.36\textwidth]{fig1b.eps} \end{tabular} \caption{Panel $(a)$: $\eta$ and Dyson index $\beta$ for $L=16$ as a function of the disorder parameter $\omega$. Panel $(b)$: $\eta$ for $L\in\{12,14,16\}$ as a function of $\omega$. } \label{ratios} \end{figure} \subsection{Time series approach to the diagonal fluctuations} The results of the previous section are not sensitive to the existence of the Thouless energy, $E_{\textrm{Th}}$. Its value is commonly obtained from long-range spectral statistics. For disordered spin-chains, the number variance $\Sigma^2(L)$ \cite{Bertrand2016} and the spectral form-factor $\mathcal{K}(\tau)$ \cite{Suntajs2019, Sierant2019} have been used. A simpler and convenient alternative is given by the $\delta_n$ spectral statistic \cite{conjetura,demo}. It measures the distance between the $n$-th unfolded energy level, a dimensionless quantity obtained from the smooth part of the cumulative level density $\varepsilon_n := \overline{N}(E_n)$, being $E_n$ the $n$-th energy level \cite{misleadingsign}, and its average value in an equiespaced spectrum, $\langle\varepsilon_{n}\rangle=n$, i.e., \begin{equation}\label{delta} \delta_n := \varepsilon_n - n,\,\,\,\,\,n\in\{1,\ldots,N\}. \end{equation} Formally, $\delta_{n}$ can be seen as a time series signal where the discrete time is represented by the level order index $n$. Its power spectrum, $\langle P_{k}^{\delta}\rangle$, was shown to provide a neat characterization of fully chaotic and integrable systems in terms of the power-law decay $\langle P_{k}^{\delta}\rangle\simeq 1/k^{\alpha}$, where the exponent depends on level correlations and takes the value $\alpha=2$ for uncorrelated (i.e., integrable) spectra and $\alpha=1$ for quantum chaotic systems \cite{conjetura,Pachon2018,Gomez2005}, without making explicit reference to any random matrix ensemble. As mentioned above, to calculate $\delta_{n}$ knowledge of the cumulative spectral function is required. This function essentially gives the number of levels with energy less than or equal to a certain energy value $E$, and can be written $N(E)=\sum_{n=1}^{N}\Theta(E-E_{n})$, where $\Theta$ is the Heaviside step function. This function can be split into a smooth part $\overline{N}$ and a fluctuating part $\widetilde{N}$, i.e., $N(E)=\overline{N}(E)+\widetilde{N}(E)$. Separating the smooth cumulative level function from the fluctuations and then mapping the original energies $\{E_{n}\}_{n=1}^{N}$ onto new, dimensionless ones $\{\varepsilon_{n}\}_{n=1}^{N}=\{\overline{N}(E_{n})\}_{n=1}^{N}$ is called \textit{unfolding procedure} \cite{misleadingsign}, and it sets the mean level density to unity. It is under these circumstances that RMT universal predictions hold \cite{rmt,stockmann}. Different methods can be used to this end. When there is no theoretical underlying statistical theory that provides $\overline{N}(E)$, as in this case, it must be obtained by numerically fitting an staircase function with a polynomial of a certain degree. Note that $\delta_{n}$ is a dimensionless quantity because on the unfolded scale the transformed energies are simply numbers without units. The similarities between Eqs. \eqref{diagonalterms} and \eqref{delta} suggest a remarkable \textit{link between spectral statistics and the ETH}. We note that $\Delta_n$ has the physical dimensions of the observable to which it refers. Thus, to make it dimensionless, as $\delta_n$ is, we normalize by the standard deviation $\sigma_{\Delta_{n}}=\langle \Delta_{n}^{2}\rangle$, \begin{equation}\label{bardelta} \widetilde{\Delta}_{n}:= \frac{\Delta_{n}}{\sigma_{\Delta_{n}}}=\frac{O_{nn}}{\sigma_{\Delta_{n}}}-\frac{\langle \hat{O} \rangle_{\textrm{ME}}}{\sigma_{\Delta_{n}}},\,\,n\in\{1,\ldots,N\}. \end{equation} The first result of this section comes from analyzing $\delta_n$ and $\widetilde{\Delta}_n$ with the same tools. In short, we extend the time series analysis approach that was initially conceived for the $\delta_{n}$ statistic to the diagonal fluctuations, and treat them both equivalently. It is the formal similarity between the two quantities that compels us to carry on such a procedure: while $\delta_{n}$ represents the deviation of the $n$-th excited level with respect to its value in an equiespaced spectrum, $\widetilde{\Delta}_{n}$ is a measure of the (normalized) deviation of the $n$-th diagonal fluctuation of quantum observables with respect to its microcanonical equilibrium value. As observables $\hat{O}$, we choose the full momentum distribution on a one-dimensional lattice with lattice constant set to unity, i.e., \begin{equation} \hat{n}_{q}:= \frac{1}{L} \sum_{m,n=1}^L \text{e}^{2 \pi i (m-n) q/L}\hat{s}^+_m \hat{s}^-_n, \,\,q\in\{0,\ldots,L-1\}, \label{observable} \end{equation} where $\hbar:= 1$ and $\hat{s}^{\pm}$ are the usual ladder spin operators. In Fig. \ref{diagonal} we show a number of diagrams corresponding to a particular realization of the observable $\hat{n}_0$. Left panels display the raw diagonal averages $O_{nn}=\bra{E_{n}}\hat{n}_{0}\ket{E_{n}}$ for $\omega\in\{0,0.6,1,1.4,2.2,10\}$ (see caption for details). Right panels display $\widetilde{\Delta}_n$ for the same cases. The first remarkable fact is that both integrable limits, $\omega=0$ and $\omega=10$, behave in a very different way. $\hat{n}_0$ is constant of motion for $\omega=0$, and hence both $O_{nn}$ and $\widetilde{\Delta}_n$ show a clear structure of the kind of a Peres lattice, as expected for integrable dynamics \cite{Peres1984}. On the contrary, no such structure is seen in the MBL phase, represented in panels $(f)$ and $(l)$. Therefore, we expect observables $\hat{n}_q$ to show different features in the transition from ergodicity to both integrable limits. Besides this fact, it is difficult to extract conclusions from the rest of the panels, as they cannot be statistically told apart in an easy way and are very noisy. If we fix our attention in $\widetilde{\Delta}_n$, panels corresponding to $\omega=0.6$, $\omega=1$ and $\omega=10$ look very similar: the majority of the points are distributed over, roughly, $\widetilde{\Delta}_n \in (-2,2)$. Panel $(k)$, corresponding to $\omega=2.2$, shows a quite large set of extreme points outside this interval; and panel $(j)$, corresponding to $\omega=1.4$ seems to be in an intermediate situation. Notwithstanding, as these results constitute just one realization of the noise, no safe conclusions can be inferred. We will come back to this result later on. \begin{figure}[h] \includegraphics[width=0.48\textwidth]{fig2.eps} \caption{Particular realization of the diagonal averages $O_{nn}$ (red symbols) and $\widetilde{\Delta}_n$ (green symbols) for the observable $\hat{n}_{0}$ as a function of $n\in\{1,\dots,4290\}$ for $L=16$. Panel $(a)$ and $(g)$ display $\omega=0$; panels $(b)$ and $(h)$, $\omega=0.6$; panels $(c)$ and $(i)$, $\omega=1$; panels $(d)$ and $(j)$, $\omega=1.4$; panels $(e)$ and $(k)$, $\omega=2.2$, and panels $(f)$ and $(l)$, $\omega=10$.} \label{diagonal} \end{figure} Besides the qualitative interpretation sketched above, relevant information can be obtained from analyzing the power spectrum $\langle P_{k}^{\widetilde{\Delta}}\rangle$ of $\widetilde{\Delta}_{n}$. To obtain this quantity, the following steps need to be taken: \begin{itemize} \item Fix the disorder strength $\omega$. \item Fix $q\in\{0,\ldots,L-1\}$ and a particular realization of $\omega$. Let $W$ be the total number of realizations of each value of $\omega$. \item Calculate the main trend of $O_{nn}$, Fig. \ref{diagonal}, which accounts for $\langle \hat{O}\rangle_{\textrm{ME}}$. Then, $\Delta_{n}=O_{nn}-\langle \hat{O}\rangle_{\textrm{ME}}$, $n\in\{1,\ldots,N\}$. \item Find $\widetilde{\Delta}_{n}$ from its definition in Eq. \eqref{bardelta}. \item Apply discrete Fourier transform to $\widetilde{\Delta}_{n}$, \begin{equation} \mathcal{F}(\widetilde{\Delta}_{n}):= \frac{1}{\sqrt{N}}\sum_{n=1}^{N}\widetilde{\Delta}_{n}\exp\left(\frac{-2\pi ikn}{N}\right), \end{equation} where $k\in\{1,2,\ldots,N-1\}$, and then take squared modulus, $P_{k}^{\widetilde{\Delta}}:=|\mathcal{F}(\widetilde{\Delta}_{n})|^{2}.$ This yields the power spectrum. \item Repeat for each of the $L$ values of $q$ and the $W$ values of $\omega$. \item Average over these $M=L\times W$ power spectra to obtain the mean estimator $\langle P_{k}^{\widetilde{\Delta}}\rangle$ in the usual way, \begin{equation}\langle P_{k}^{\widetilde{\Delta}}\rangle=\frac{1}{M}\sum_{i=1}^{M}\left(P_{k}^{\widetilde{\Delta}}\right)_{i},\,\,\,k\in\{1,\ldots,N-1\},\end{equation} where $\left(P_{k}^{\widetilde{\Delta}}\right)_{i}$ denotes the $i$th power spectrum. This yields the averaged power spectrum for the disorder value $\omega$ initially fixed. \end{itemize} The microcanonical average is accounted for by fitting $O_{nn}$ to a polynomial of degree 4, which allows us to obtain the smooth part of diagonal terms as those in Fig. \ref{diagonal} by removing the fluctuations. As a consequence, the quantity $\Delta_{n}$ keeps track of the fluctuations of expected values of physical observables in the Hamiltonian eigenbasis instead, and it strongly oscillates around zero, i.e., its mean value, $\langle \Delta_{n}\rangle =0$ (see Fig. \ref{diagonal}). We remark that a fit to the main trend of $O_{nn}$ is replacing the actual $\langle\hat{O}\rangle_{\textrm{ME}}$, which would suffer from spurious effects that originate when averaging over a finite energy window \cite{misleadingsign}. We average over $W=40$ realizations of the magnetic field and $L=16$ observables given by Eq. \eqref{observable} in each case, so $M=640$. As mentioned in Sec. \ref{secmodel}, we work with the $N=\binom{16}{8}/3=4290$ central eigenstates. Results in Fig. \ref{peth} focus on the power-spectra of the signals $\delta_{n}$ and $\widetilde{\Delta}_{n}$ on the expected ergodic region. For $L=16$, it covers $0.2\lesssim \omega \lesssim 1.8$ \cite{Sierant2019PRB,Serbyn16,lfsantos} (also see Fig. \ref{ratios}). The power-spectrum of $\widetilde{\Delta}_{n}$, $\langle P_{k}^{\widetilde{\Delta}}\rangle:=\langle|\mathcal{F}(\widetilde{\Delta}_{n})|^{2}\rangle$, is shown in Fig. \ref{peth}$(a)$. We find that, for each $\omega$, large frequencies beyond a minimum value $k>k_{\min}$ exhibit, all, an equivalent weight, which corresponds to white, featureless (uncorrelated) noise. Conversely, small frequencies below such a minimum value $k<k_{\min}$ show an increasingly larger weight as $k$ is smaller, which immediately leads to a colored noise. This means that there is structure in the modes of the Fourier transform corresponding to large periods, i.e., to eigenstates very far apart from each other. Hence, $k_{\min}$ determines a characteristic scale. As RMT demands that diagonal fluctuations behave like an uncorrelated white noise, only Fourier modes shorter than the corresponding to $k_{\min}$ behave as expected for an ergodic region; larger scales show some structure. The lesser deviations from the ergodic expected value, zero, happen for intermediate values of the disorder close to $\omega_c=0.5$. \begin{figure}[h] \begin{center} \hspace{-1cm} \includegraphics[width=0.45\textwidth]{fig3.eps} \end{center} \caption{ $(a)$: power-spectrum $\langle P_{k}^{\widetilde{\Delta}}\rangle$ of the diagonal fluctuations, Eq. \eqref{bardelta} as a function of $k\in\{1,\dots,N/2\}$. Results are averages over $640$ realizations of $N=4290$ expected values. $(b)$: power-spectrum $\langle P_{k}^{\delta}\rangle$ of the $\delta_{n}$ statistic, Eq. \eqref{delta}, for the system $\mathcal{H}(\lambda=1)$, Eq. \eqref{model}. Theoretical power-spectra for the ergodic, Eq. \eqref{powergoe}, and integrable cases \cite{demo}. Results are averages over $100$ spectra of $N=4290$ levels each. The number of sites is always $L=16$ in this figure.} \label{peth} \end{figure} This behavior resembles that of $E_{\textrm{Th}}$ within the ergodic region and across the transition to MBL \cite{Suntajs2019,Sierant2019,Bertrand2016}. To delve into this coincidence, we invoke the $\delta_n$ statistic, Eq. \eqref{delta}. We follow the same procedure as before but now unfold with a polynomial of degree 6 to obtain the smooth cumulative level density and, therefore, the unfolded energies $\varepsilon_{n}=\overline{N}(E_{n})$, which is essentially the only requisite to calculate $\delta_{n}$. We have discarded 10\% of the energies closest to both spectrum edges before and after unfolding (that is, we discard a total of 20\% of the original levels), as these usually show anomalously large fluctuations and are not representative of the sample \cite{misleadingsign}. Within the spectral form-factor approximation the reference GOE theoretical curve for this power-spectrum is given \cite{demo} by the free-parameter expression \begin{equation}\label{powergoe} \begin{split} \langle P_{k}^{\delta}\rangle_{\textrm{GOE}}&=\frac{N^{2}}{4\pi^{2}}\left[\frac{\mathcal{K}\left(\frac{k}{N}\right)-1}{k^{2}}+\frac{\mathcal{K}\left(1-\frac{k}{N}\right)-1}{(N-k)^{2}}\right]\\& +\frac{1}{4\sin^{2}\left(\frac{\pi k}{N}\right)}-\frac{1}{12}, \end{split} \end{equation} where $k\in\{1,2,\dots,N-1\}$, $N$ denotes the size of each spectrum in the ensemble over which the average has been performed, and $\mathcal{K}$ is the spectral form-factor \cite{rmt}, which for GOE can be written \begin{equation} \mathcal{K}(\tau)_{\textrm{GOE}}=\begin{cases} {\displaystyle 2\tau-\tau\log(1+2\tau)},\,\,\,&\tau\leq1\\[0.2cm] {\displaystyle 2-\tau\log\left(\frac{2\tau+1}{2\tau-1}\right)},\,\,\,&\tau\geq1 \end{cases} \end{equation} In Fig. \ref{peth}$(b)$ we show the power spectrum of $\delta_{n}$, \begin{equation}\langle P_{k}^{\delta}\rangle:=\langle |\mathcal{F}(\delta_{n})|^{2}\rangle=\left\langle\left|\frac{1}{\sqrt{N}}\sum_{n=1}^{N}\delta_{n}\exp\left(\frac{-2\pi i k n}{N}\right)\right|^{2} \right\rangle,\end{equation} $k\in\{1,2,\ldots,N-1\},$ calculated again by applying a discrete Fourier transform to the signal. It deviates from RMT universal behavior given in Eq. \eqref{powergoe} at roughly the same value as $\widetilde{\Delta}_{n}$, $k_{\textrm{min}}$. That is, \textit{ the characteristic scale given by the Thouless energy is directly transferred to the diagonal fluctuations}. Furthermore, this scale can be interpreted for the $\delta_n$ statistic in the same terms that for $\widetilde{\Delta}_n$: large frequencies beyond a minimum value $k>k_{\min}$ all lie on the theoretical GOE curve \eqref{powergoe}, i.e., eigenlevels separated by large distances corresponding to those frequencies $k$ follow universal chaotic behavior in the context of RMT. Conversely, small frequencies below a minimum value $k<k_{\min}$ show a clear deviation towards the integrable result for the power spectrum, indicating that the correlation between these energy levels only holds up to small energy distances associated to those frequencies $k$. Remarkably, the transition from GOE to integrable statistics as the value of $\omega$ is increased within the ergodic phase is characterized by an increasing value of $k_{\min}$, but for sufficiently large values of $k$ the power spectrum always lies on the theoretical ergodic curve, regardless of $\omega$ (unless of course $\omega$ is large enough for the system to be well within the localized phase). \textit{ Exactly the same interpretation can be done with the diagonal fluctuations}. It is worth to point out that this is not the only possible shape for this kind of transition in terms of long-range spectral statistics. A number of systems show intermediate values for the power-law exponent, meaning that the power spectrum of $\delta_n$ statistic separates from the theoretical GOE curve at all frequencies, drifting towards the integrable result \cite{Gomez2005,Pachon2018,Santhanam2005,Relano2008}. In other systems, the deviation from RMT happens for high frequencies first \cite{Relano2008b}. As we have pointed out before, this means that the particular features of the transition from GOE to integrability in the $\delta_n$ statistics of the Heisenberg spin chain are directly transferred to the diagonal fluctuations. Both magnitudes preserve the typical properties of an ergodic system up to a characteristic scale, and deviate from the RMT behavior beyond this scale. To interpret these results, we link the frequency $k$ to the scaled (dimensionless) time $\tau$ of the spectral form-factor, $\tau=k/N$ \cite{demo}. Then, we define a Thouless frequency, $k_{\textrm{Th}}:= N\tau_{\textrm{Th}}$, where $\tau_{\textrm{Th}}$ is the Thouless time. The Thouless time is the time scale associated to the Thouless energy. Thouless time and Thouless energy have been shown to be essentially inverse quantities not only in noninteracting but also in interacting systems (i.e., $E_{\textrm{Th}}\propto 1/\tau_{\textrm{Th}}$) \cite{Altshuler1986,Altshuler1988,Schiulaz2019}. From it we obtain the inverse of the Thouless time $\ell_{\textrm{Th}}:= 1/\tau_{\textrm{Th}}=N/k_{\textrm{Th}}$, which represents a limiting scale for RMT-like behavior: energy levels within less than $\ell_{\textrm{Th}}$ are correlated like RMT spectra; those separated by more than $\ell_{\textrm{Th}}$ deviate from this behavior towards integrable-like correlations. Note that this scale is dimensionless and represents how many energy levels are between two whose correlation is being calculated. A good estimate of the Thouless Energy is then $E_{\textrm{Th}}=\tau_{\textrm{Th}}^{-1}=\ell_{\textrm{Th}}/g(\epsilon)\propto \ell_{\textrm{Th}}$, where $\epsilon$ is the average energy, and $g(\epsilon)$, the density of states at such energy. As the frequency of Fig. \ref{peth}$(a)$ has the same physical meaning, a similar reasoning can be applied to this last case as well. To determine $k_{\textrm{min}} \approx k_{\textrm{Th}}$ we choose the first $k$ for which the power-spectra fluctuate below ergodic expectations: the chaotic curve for $\langle P_{k}^{\delta}\rangle$ \cite{demo}, and zero for $\langle P_{k}^{\widetilde{\Delta}}\rangle$ (see discussion above in this section). Next, we calculate the characteristic length $\ell_{\textrm{max}}:= N/k_{\textrm{min}}\approx\ell_{\textrm{Th}}$. \begin{figure}[h] \begin{center} \includegraphics[width=0.46\textwidth]{fig4.eps} \end{center} \caption{ $(a)$: Value of the characteristic scale $\ell_{\textrm{max}}$ as a function of $\omega$ in the ergodic region for $\langle P_{k}^{\delta}\rangle$ and $\langle P_{k}^{\widetilde{\Delta}}\rangle$ and $L=16$. $(b)$: Normalized $\ell_{\textrm{max}}/N=k_{\textrm{min}}^{-1}$ as a function of $\omega$ for $\langle P_{k}^{\delta}\rangle$ and $L\in\{12,14,16,18\}$. } \label{lmax} \end{figure} Results are shown in Fig. \ref{lmax}$(a)$. We find good not only qualitative but also quantitative agreement between these results for both power-spectra. The value of $\ell_{\max}$ obtained from $\delta_{n}$, which measures the long-range statistic of eigenlevels, and $\widetilde{\Delta}_{n}$, which refers to the fluctuations of expected values of physical observables around the standard microcanonical average, are very approximately the same. This reinforces our previous conclusion: there exists a certain structure that manifests in both these two very different measures. Putting together Figs. \ref{diagonal} and \ref{lmax}, we can conjecture, for now, that the smaller $k_{\min}$, the more presence of anomalous points in $\widetilde{\Delta}_n$. In Fig. \ref{lmax}$(b)$, we show $\ell_{\textrm{max}}/N$, representing such a \textit{ critical} scale. As $L$ is increased, fluctuations get gradually smoothed out, but the general structure remains very similar. This shows that the region $0.2 \lesssim \omega \lesssim 1.8$ is \textit{not ergodic in the sense of BGS}. It is characterized by a clear structure (usually associated with integrable-like, i.e., non-ergodic phenomena in the sense of BGS) which remains approximately unchanged irrespective of $L$: $\ell_{\max}/N$ has a maximum for $0.5\lesssim\omega\lesssim0.6$ (at which RMT behavior only holds within a scale equivalent to the $10 \%$ of the studied levels), and decreases for both larger and smaller values of disorder. These results need to be put in comparison with those afforded by the more common ratios (see Fig. \ref{ratios}). For the Heisenberg spin chain, as exemplified by the $\delta_{n}$ spectral statistic, short-range results can be quite misleading, as the Thouless energy behaves non-monotically and shows complex, strongly disorder-dependent behavior that is \textit{absolutely} absent from the homogeneous picture provided by the ratios. What the $\delta_{n}$ statistic tells us, as opposed to the ratios (or any other measure of short-range spectral statistics), is that even in the supposedly fully ergodic region there is an emergent structure that appears \textit{only between eigenlevels separated by more than a critical distance}, precisely $\ell_{\max}$, so these effects can in no way be diagnosed with measures that \textit{only afford information about eigenlevels separated by two levels or less}. Additionally, finite-size scalings have revealed in the past \cite{Santos2010,Torres-Herrera2014,Torres2017} that in the thermodynamic limit the influence of the Bethe-ansatz region \textit{may} shrink to a single point $\omega=0$ (i.e., an arbitrarily small $\omega>0$ would immediately take the system into the chaotic regime) and that the opposite side, the localized phase, could also be reduced to a single critical point, located at very high disorder. However, Fig. \ref{lmax}$(b)$ shows no trace of such a scaling behavior: the `most ergodic' point seems to be fixed around $0.5\lesssim \omega\lesssim 0.6$, irrespective of $L$, i.e., there does not seem to be any clear scaling whatsoever. Thus, it does not seem very reasonable to expect the emerging structure in $\ell_{\max}$ to be a finite-size effect arising from the fact that there are two limiting integrable regions. Although we lack the evidence to state that this situation might be representative for very large values of $L$, we do have proof indicating that, at least for the finite values of $L$ usually considered, the structure in the characteristic scale is robust. \subsection{Quenched dynamics on the expected ergodic phase} From the previous results, the following question arises: do these (small) deviations from the RMT behavior entail measurable consequences in equilibrium states? In other words, how do these spectral properties manifest dynamically in terms of equilibration? The variance $\sigma_{\Delta_{n}}^{2}=\langle\Delta^2_n \rangle$ indicates whether typical states thermalize or not, and previous results suggest that it is small enough within the apparent ergodic region \cite{Nandkishore2015}. However, if one understands that ergodicity means that (almost) any initial condition thermalizes (as in the BGS result in RMT), this may still be insufficient. We investigate here the probability of finding non-thermalizing initial conditions on the ergodic side. The analysis will be later extended to a greater region. We conjecture that \textit{ the key to this probability is the number of significantly populated eigenstates, $\mathcal{N}$}. If $\mathcal{N} < \ell_{\textrm{Th}}$, diagonal fluctuations behave as an uncorrelated white noise at all scales within the populated window, and no anomalous effects may be expected. Otherwise, the emerging structure of diagonal fluctuations can impede thermalization for certain initial conditions: the larger the ratio $\mathcal{N}/\ell_{\textrm{Th}}$, the more likely to find a non-thermalizing one. The consequence is an \textit{anomalous region with a significantly large ratio of non-thermalizing initial conditions}. \begin{figure}[h!] \begin{center} \includegraphics[width=0.46\textwidth]{fig5.eps} \end{center} \caption{$(a)$: probability that the relative difference between $\langle \hat{n}_{q}\rangle_{\textrm{ME}}$ and $\langle \hat{n}_{q}\rangle_{t}$ be greater than $5\%$ (see text for details). The errorbars represent the standard deviation of the mean. $(b)$: average of the eigenstate populations for the five quench sizes, obtained from $20$ disorder realizations for each $\omega$, and $\Delta \lambda\in\{0.1,0.2,0.3,0.4,0.8\}$. The $x$ axis represents the ratio of populated levels with respect to $N$, with $\Delta n=0$ being the centre of the populated window. } \label{termo} \end{figure} To test this conjecture, we start from the central state of a certain initial value for $\lambda$ in Eq. \eqref{model}, $\lambda_{\textrm{i}} > 1$, and quench it onto $\lambda_\textrm{f}=1$, with the same values for the random magnetic field, $\omega_n$. The size of this quench, $\Delta \lambda := |\lambda_\textrm{i} - \lambda_\textrm{f}|$, determines the width, $\mathcal{N}$, of the resulting state. We work with five different values of $\omega$ and five different quench sizes. In Fig. \ref{termo}$(a)$ we plot the probability that the relative error of the difference between the long-time, $\left< \hat{n}_{q} \right>_t$, and the microcanonical, $\left< \hat{n}_{q} \right>_{\textrm{ME}}$ averages be greater than $5\%$, for different values of the disorder within the ergodic region, and different quench sizes. We have averaged over all $16$ observables and $40$ realizations of the random magnetic field. The microcanonical average is obtained with $41$ eigenstates around the expected energy of the initial state. We gather the following conclusions from this figure. First, the probability of finding a non-thermalizing initial condition increases as $\ell_{\textrm{max}}$ decreases. The case with $\omega=1.5$ is very significative. Although it is still within the ergodic region, the probability of finding an initial condition which deviates more than a 5$\%$ of the microcanonical prediction fluctuates around $30\%$. Second, this probability is generally higher for larger quenches, which populate larger number of levels. In Fig. \ref{termo}$(b)$, a disorder average of the eigenstate populations for the five quench sizes is shown. We display the probability of finding the system in the eigenstate $\ket{E_n}$, $P_n$, versus the position of the eigenstate with respect to the central level, $\Delta n$ (that is, $\Delta n/N=0$ for the central level, and, for example, there are $n=0.1N$ levels between the one labelled with $\Delta n/N=0.1$ and the central one, where $N=4290$ is the total number of considered levels). This panel shows that the distribution of populated levels is quite wide in all the cases. Under many circumstances, the populated window resulting from the quench can be wider than $\ell_{\textrm{max}}$, and it is clearly seen that, the larger the quench, the wider the populated energy window. The case with the greatest $\ell_{\textrm{max}}$, $\omega=0.6$, is the least sensible to $\Delta\lambda$, and the one showing the smallest probability of such anomalous events. The cases $\omega\in\{0.3,0.9\}$ show a neat increase of this probability with $\Delta\lambda$. For $\omega\in\{1.2,1.5\}$, the behavior is more erratic, probably because the initial condition is wider than $\ell_{\textrm{max}}$ for all quench sizes. \begin{figure}[h!] \begin{center} \includegraphics[width=0.44\textwidth]{fig6.eps} \end{center} \caption{$\mathcal{N}/N$ for $\Gamma\in\{0.063,0.095,0.126,0.159,0.194\}$ from eigenlevels of Eq. \eqref{model} with $\omega=0.6$. Averages are taken over 1000 ($L=10,12,14$), 100 ($L=16$), and 20 ($L=18$) realizations. } \label{termo2} \end{figure} These results are compatible with our previous statement. \textit{ The probability of non-thermalizing initial conditions decreases with increasing values of} $\ell_{\textrm{max}}$. Fig. \ref{termo2} provides a hint about the consequences of this fact in the thermodynamic limit. We show how the number of populated eigenstates after a typical quench changes with $L$. We assume that the width of the corresponding initial state grows as expected for a canonical equilibrium state \cite{Pathria}, $\sigma_{E}\propto\sqrt{L}$. Then, we study the number of levels, $\mathcal{N}$, populated in an energy window of width $\sigma_{E}=\Gamma\sqrt{L}$, being $\Gamma$ representative of the quench size. The ratio $\mathcal{N}/N$ remains approximately constant, suggesting that typical quenches may be wider than $E_{\textrm{Th}}$ even in the thermodynamic limit. We cannot extrapolate our results to much larger (macroscopic) systems, but they suffice to conclude that investigating quenched-dynamics requires a huge number of energy levels, a number that seems to grow linearly with the size of the system's Hilbert space, $\mathcal{N}\propto N$. Therefore, spectral statistics from a very small number of levels around the central one, like those afforded by, e.g., the shift-invert method \cite{shiftinvert}, are not enough to capture all the features associated to quenched dynamics. \section{Anomalous phenomena around the transition point}\label{secanomalous} The picture emerging from these results is the following. The expected ergodic region has a subregion, $0.5 \lesssim \omega \lesssim 1$, in which the probability of non-thermalizing events is quite low. However, there exists another subregion, $1 \lesssim \omega \lesssim 1.8$, in which non-thermalizing events are high-probable enough to suspect that thermalization is not guaranteed for any initial condition. This is compatible with the much-debated Griffiths effects, appearing in some systems that display a transition to MBL from the ergodic side \cite{Griffiths1969,Luschen2017,Agarwal2015,Gopalakrishnan2016,Weiner2019}. To deepen into this matter, we have performed a stringent numerical test involving quenches of width $\Delta \lambda=0.4$ for different values of the system size $L\in\{10,12,14,16\}$. For the first case, $1000$ different realizations of the random magnetic field have been performed; for $L=12$, the number of realizations is $500$, and for $L=14$ and $L=16$, we have performed $240$ different realizations. As the corresponding total Hilbert space sizes are very different (from $d=252$ for $L=10$ to $d=12870$ for $L=16$), we have used different microcanonical windows: $\Delta E = 21$ for $L=10$; $\Delta E=31$ for $L=12$, and $\Delta E=41$ for $L=14$ and $L=16$. We have checked that small changes in these windows do not alter the results. In this numerical experiment, we consider not only the ergodic phase of the chain but also the many-body localization edge, where the transition is supposed to take place. \begin{figure}[h!] \hspace*{-0.4cm} \begin{center} \includegraphics[width=0.50\textwidth]{fig7.eps} \end{center} \caption{$(a)$: Comparison of $k_{\min}$, obtained from $\langle P_{k}^{\widetilde{\Delta}}\rangle$, and $P(5\sigma)$ and $P(7\sigma)$ for $L=16$. $(b)$: $P(7\sigma)$ as a function of the disorder strength $\omega$ for $L\in\{10,12,14,16\}$. Results correspond to expected values of the the full momentum distribution, $\hat{n}_{q}$, $q\in\{0,\ldots,L-1\}$ in the eigenstates of Eq. \eqref{model}. } \label{fig4nueva} \end{figure} The link between these facts and the presence of correlations in $\widetilde{\Delta}_n$ is further explored in Fig. \ref{fig4nueva}. In Fig. \ref{fig4nueva}$(a)$ we show a comparison between the probabilities of anomalous events and the value of $k_{\min}$ obtained from the power spectrum of the diagonal fluctuations around the microcanonical average. The procedure to calculate $k_{\min}$ is the same as before. To obtain the probabilities of anomalous events, we have fitted a Gaussian distribution to the histograms of the relative differences between $\langle \hat{n}_{q}\rangle_{\textrm{ME}}$ and $\langle \hat{n}_{q}\rangle_{t}$, obtaining the standard deviation $\sigma$. From this result, we have calculated the probabilities of events whose relative deviation from $\langle \hat{n}_{q}\rangle_{\textrm{ME}}$ is larger than $5\sigma$ and $7\sigma$. For $\omega\approx 0.5$, the value of $k_{\min}$ is minimal, corresponding to very large values of $\ell_{\max}$. This means that the signal $\widetilde{\Delta}_{n}$ gives here basically an uncorrelated white noise. As $\omega$ is increased, the emerging structure extends to all scales throughout the entire range of disorder values, until it reaches it maximum at $\omega\approx 2.2$ (corresponding to minimal values of $\ell_{\max}$ instead). As $\omega$ is further increased into the depths of the localized phase, the structure in $k_{\min}$ gradually disappears, leaving behind quite a symmetric pattern around $\omega\approx 2.2$. As the MBL phase is approached, $\widetilde{\Delta}_n$ turns back into an uncorrelated white noise (which gives minimal values of $k_{\min}$), but with much larger width, explaining why thermalization is not expected in this phase for any initial condition \cite{Nandkishore2015,Altman2018}. It is interesting to observe that these characteristic scales are also mimicked by the probability of anomalous events beyond $5\sigma$, $P(5\sigma)$ and $7\sigma$, $P(7\sigma)$, as obtained from a Gaussian distribution. This result shows that there exists quite a wide region, $1.5 \lesssim \omega \lesssim 3$, i.e. centered around the transition region from the ergodic to the MBL phase for $L=16$, with \textit{a very large probability of anomalous events}. Furthermore, these facts provide a quantitative explanation for the picture gathered from Fig. \ref{diagonal}. From panels $(h)$ to $(l)$ of that figure, we concluded that the probability of finding a large value for $|\widetilde{\Delta}_n|$ is larger for intermediate values of $\omega$, $\omega=2.2$, than for values representing both the more chaotic region, $\omega=0.6$, and the MBL phase, $\omega=10$. Results displayed in panel $(a)$ of Fig. \ref{fig4nueva} corroborate this idea. The probability of anomalous events beyond $7\sigma$ as a function of the disorder for different values of $L$ is shown in Fig. \ref{fig4nueva}$(b)$. The probability of such events is similar for all values of $L$ (except for $L=10$, which may be not be representative as the size is too small) and, in any case, it shows no sign of a scaling behavior, i.e., these anomalies do not seem to decrease for larger chains. This leads us to the following conjecture, stating that this structure formation is a precursor of the transition: \textit{ the transition onto the MBL phase from the ergodic phase is initiated by an increase of the probability of anomalous, non-thermalizing, initial conditions, within the apparent ergodic region and driven by the Thouless energy}. This is directly linked to heavily long-tailed distributions near the MBL edge that have been diagnosed in the past as well \cite{Luitz2016} and several other anomalies characterizing the transition \cite{Devakul,Filippone2016,Luitz2015,Agarwal2015,Bertrand2016,Mace2019,Luschen2017}, notably including, but not limited to, manifestations of Griffiths effects and the presence of slow dynamics. The consequences in the thermalization process are explored in Fig. \ref{scalingsigma}. Fig. \ref{scalingsigma}$(a)$ shows a scaling of the value of $\sigma$ obtained as explained above. Even though it is quite daring to extrapolate these results to much larger (macroscopic) systems, the usual conclusion gathered from them is that they seem compatible with a fully ergodic region in the entire parameter space $0.6<\omega<3$ in the thermodynamic limit, as it displays a power-law decay when the system size is increased. Clearly the exponent of this power-law decay depends on the disorder strength as it is greater for $\omega\in\{0.6,1\}$, well-within the ergodic phase, than it is for very large values of $\omega$. Notwithstanding, it is recommendable to study more phenomena before accepting this conclusion. Fig. \ref{scalingsigma}$(b)-(c)$ shows a scaling of the probability of anomalous events $P(5\sigma)$ and $P(7\sigma)$ with the system size $L$. Here, we find two main results. First, the probability of such events is \textit{much larger than expected from a Gaussian distribution}, throughout the entire region $\omega\in[0.6,3]$, as the Gaussian probabilities of occurrence beyond $5\sigma$ and $7\sigma$ are, respectively, $P(5\sigma)_{\textrm{Gaussian}}\approx 5.7\cdot 10^{-7}$ and $P(7\sigma)_{\textrm{Gaussian}}\approx 2.6\cdot 10^{-12}$. These theoretical values are obviously a lot smaller than those obtained numerically for both cases, by several orders of magnitude. Second, the power-law decay that is present in panel $(a)$ is absent from panels $(b)$ and $(c)$. For large values of the system size a decrease of the probability of anomalous events can only be found for small values of $\omega$, in particular those closest to the point where the characteristic distance $\ell_{\max}$ is largest, whereas for others there is no evidence of such (the probability of anomalies is approximately the same for large $L$ or even increases). This is again a manifestation of very long-tailed distributions around the transition \cite{Luitz2016}. And it seems enough to call into question the na\"{i}ve extrapolation inferred from panel $(a)$ of Fig. \ref{scalingsigma}. Results shown in panels $(b)$ and $(c)$ of the same figure show that the analysis of thermalization is much more involved, since anomalous non-thermalizing events are highly probable before the MBL phase is reached, i.e., they are not rare at all. \begin{figure}[h!] \begin{center} \hspace*{-0.8cm} \includegraphics[width=0.59\textwidth]{fig8.eps} \end{center} \caption{$(a)$: Scaling of the standard deviation $\sigma$ obtained from fitting the relative difference between time $\langle \hat{n}_{q}\rangle_{t}$ and microcanonical $\langle\hat{n}_{q}\rangle_{\textrm{ME}}$ averages to a Gaussian distribution as a function of the system size. $(b)-(c)$: Scaling of the probability of anomalous events beyond $5\sigma$, $P(5\sigma)$, and $7\sigma$, $P(7\sigma)$, as a function of the system size (log-log scale is used for all three panels). Results correspond to expected values of the the full momentum distribution, $\hat{n}_{q}$, $q\in\{0,\ldots,L-1\}$ in the eigenstates of Eq. \eqref{model}. Colors/point types represent disorder strengths $\omega\in\{0.6,1,1.4,1.8,2.2,2.6,3\}$ from bottom to top in panel $(a)$. Double logarithmic scale is used in all panels. } \label{scalingsigma} \end{figure} \begin{figure}[h!] \begin{center} \hspace*{-0.7cm} \includegraphics[width=0.46\textwidth]{fig9.eps} \end{center} \caption{ Scaling of the probability of initial conditions further than $10\%$, $20\%$ and $40\%$ from the equilibrium microcanonical average as a function of the system size for $\omega=2.2$. Solid lines with filled points represent the numerical value of $P_{\textrm{error}}$, while dotted lines with empty points show the corresponding value as obtained from a Gaussian distribution. Results correspond to expected values of the the full momentum distribution, $\hat{n}_{q}$, $q\in\{0,\ldots,L-1\}$ in the eigenstates of Eq. \eqref{model}. Double logarithmic scale is used. } \label{scaling_w22} \end{figure} Finally, in Fig. \ref{scaling_w22} we plot a scaling of the probability of finding initial conditions further away than 10\%, 20\% and 40\% from its microcanonical equilibrium value in a fully ergodic region. The disorder value is here fixed at $\omega=2.2$, corresponding to the maximum of $k_{\min}$ and the probability of anomalous non-thermalizing events as seen in Fig. \ref{fig4nueva} and Fig. \ref{scalingsigma}. We compare here the expected result for a Gaussian distribution with the width, $\sigma$, obtained from Fig. \ref{scalingsigma}$(a)$ (dotted line and empty symbols), with the one obtained from numerics (solid line and full symbols); in all the cases, the shadowed region highlights the difference between the expectation and the numerical result. These results reinforce our previous conclusion. The probability of non-thermalizing events decrease much slower than expected from the Gaussian distributions underlying the ETH. And it is not clear at all how to extrapolate to very large (macroscopic) systems. This entails that, at least for finite systems, thermalization should in principle not be expected for every initial condition within a wide region covering part of the apparent ergodic phase. Further investigation is needed to even conjecture what happens in the thermodynamic limit. \section{Conclusions}\label{secconclusions} We have provided a numerical, stringent study of the interplay between long-range spectral statistics and the diagonal fluctuations of physical observables around the microcanonical equilibrium value in the paradigmatic model for many-body localization, the Heisenberg spin-1/2 chain. There is a strong link between these two indicators of the dynamics of a quantum system. We have studied the power spectrum of the $\delta_{n}$ statistics to compare spectral correlations with the results coming from Random Matrix Theory, while analogously we have studied the power spectrum of the diagonal fluctuations of representative observables $\Delta_n$ to analyze the eigenstate thermalization hypothesis, which underlies the ability of a quantum system to thermalize. The power spectrum of these two quantities are quantitatively characterized by the same characteristic scale $\ell_{\max}$. In the case of spectral correlations, the $\delta_n$, the value of $\ell_{\max}$ indicates that Random Matrix Theory-like correlations between levels hold up to this scale. Dividing $\ell_{\max}$ by the density of states gives the famous Thouless energy scale, $E_{\textrm{Th}}$. In the case of $\Delta_{n}$, $\ell_{\max}$ indicates that the signal is essentially a white noise with little to no structure up to this scale, which is in turn associated with the Gaussian distribution of thermalizing events. Thus, the Thouless energy, the scale below which RMT universality breaks down, behaves non-monotically on the ergodic phase and its maximum is fixed constant at $0.5\lesssim\omega\lesssim0.6$ regardless of the system size (i.e., it does not scale). This puts under scrutiny the existence of a full ergodic region below a certain critical value of the disorder. Contrary to what is usually inferred from short-range spectral statistics, like the distribution of ratios of consecutive level spacings, in finite systems there exists no ergodic plateau between the integrable limit, $\omega=0$, and the MBL phase, but a region with a complex structure, with its most chaotic part around $\omega \sim 0.5$. Then, we have presented numerical evidence implying that non-thermalizing events are significantly probable even within the apparent ergodic region of the Heisenberg chain, as a consequence of the previous structure. We have shown that ergodic RMT-like behavior only holds for quite short energy scales. The small value of the Thouless energy favours the existence of these anomalous initial conditions. The distribution of thermalizing events from the ETH acquires very long tails as we have shown by studying the probability of error between the microcanonical and time averages by a quench protocol. Studying these quantities as a function of disorder paints a very complex picture of the transition between the ergodic and the MBL phase. The minimum of $\ell_{\max}$ is found around $\omega\approx 2.2$ where we also find the largest probabilities of extreme values. At $\omega\gtrsim 3.6$ the system has completely entered the localized phase where the width of the distribution is much larger implying that generic initial conditions do not thermalize in this phase. These results give rise to the following picture. First, a more or less ergodic region, with small width for this distribution, and a small probability of anomalous events. Then, an intermediate extended phase, in which the width is still small, but the probability of anomalous events is largely increased. And finally, the MBL phase, characterized by a more Gaussian but wider distribution of relative deviations from thermal equilibrium. This complex picture does not change significantly when we increase the size of the system, although a lot of caution is needed when trying to extrapolate to larger sizes in spin models of this kind. Our results seem incompatible with a fully ergodic region emerging in the thermodynamic limit in the \textit{entire} parameter range $0<\omega\lesssim 3.6$ (for $L=16$). They also suggest that ergodicity in the sense of the BGS conjecture may be a necessary condition to guarantee thermalization for (almost) any initial condition. In this sense, studying short-range spectral correlations alone is not enough to understand chaos and thermalization in many-body quantum systems. It is important to fully grasp the complexity that emerges in the structure of long-range spectral statistics and the diagonal fluctuations of observables. Another important conclusion is that a large number of energy levels and eigenstates are necessary to study the consequences of non-equilibrium dynamics and thermalization. Sudden quenches, the usual procedure to track the relaxation to equilibrium in small quantum systems, do significatively populate large number of energy levels. The results in this paper show that the structure of long-range spectral statistics and diagonal fluctuations of representative observables becomes highly complex within this range. \acknowledgements This work has been supported by the Spanish Grants Nos. FIS2015-63770-P (MINECO/ FEDER) and PGC2018-094180-B-I00 (MCIU/AEI/FEDER, EU), CAM/FEDER Project No. S2018/TCS-4342 (QUITEMAD-CM) and CSIC Research Platform PTI-001.
\section{Introduction} \label{intro} Policymakers had traditionally focused on ensuring the financial soundness of individual financial institutions, especially deposit-taking institutions. Such an approach is known as the microprudential policy. However, the global financial crisis made it clear that keeping individual financial institutions sound was not enough. Based on the experience of the crisis, policymakers of many countries understood that it was very important to analyze and assess risks in the entire financial system and to take adequate measures to limit systemic risk. This is the background of the emergence of the macroprudential policy \cite{BOJ2011a} \cite{IMF-FSB-BIS2016} \cite{Sato2014}. Since the global financial crisis, many countries are expanding their toolkits for more systemic approaches to financial regulation and supervision based on the macroprudential framework. From the understandings of the necessity of the macroprudential policy, we studied channels of distress propagation from the financial sector to the real economy through the supply chain network in Japan from 1980 to 2015, using a spin dynamics model \cite{Ikeda2018}. This study was conducted based on the related econophysics studies \cite{Ikeda2014}, \cite{Ikeda2015}, \cite{Ikeda2016}, \cite{Aoyama2017}. However, the interbank network was not considered in this paper because data of interbank transactions are not available to the public. In the macroprudential policy framework, particular attention is paid to the consequences of the interconnectedness among financial institutions, financial markets, and other components of the financial system. Also, feedback loops between real economies and financial systems are checked carefully. The goal of this paper is to reconstruct the adjacency matrix of the interbank network. We develop a network reconstruction model based on entropy maximization considering the sparsity of the network. Here the reconstruction is to estimate the network's adjacency matrix from the node's local information. We reconstruct the interbank network in Japan from financial data in individual banks' balance sheets using the developed reconstruction model. Here the interbank money market works for short-term lending and borrowing between banks. We examine the validity of the reconstructed interbank network by analyzing the interbank network's characteristics. This paper is organized as follows. In section \ref{sec:2}, preceding studies for interbank market and network reconstruction are explained. In section \ref{sec:3}, the ridge entropy maximization model is proposed as a reconstruction model considering the sparsity of the real-world networks. In section \ref{sec:4}, data used to reconstruct the interbank network is explained. In section \ref{sec:5}, the reconstruction results are shown, and the accuracy and characteristics of the reconstructed interbank network are discussed. Finally, section \ref{sec:6} concludes the paper. \section{Literature Survey} \label{sec:2} \subsection{Interbank Market} \label{sec:2-1} Interbank markets are a type of money markets in which only financial institutions, such as banks, securities companies, and money dealers, participate and lend/borrow funds maturing within a year. Many central banks have set the overnight interbank interest rate as a target rate (policy interest rate). Therefore, interbank markets are very important for central bank operations for their monetary policy. The global financial crisis had serious impacts on interbank markets. The environment surrounding interbank markets has changed significantly since the crisis, but interbank markets continue to play important roles as a center for fund transactions among financial institutions. Many countries work to make their interbank markets functional, for example, by providing settlement services through market participants’ current deposit accounts at central banks and launching computer systems for funds transfers/settlements as market infrastructures. The following explains the mechanisms for facilitating the functions of interbank markets. \paragraph{Current Deposit Accounts at Central Banks} Central banks provide safe and convenient settlement assets in the form of deposits in current accounts that financial institutions hold at central banks. Current account deposits at central banks serve three significant roles: (1) Payment instrument for transactions among financial institutions, the Bank, and the government; (2) Cash reserves for financial institutions to pay individuals and firms; and (3) Reserves of financial institutions subject to the reserve requirement system. Most central banks - more than 90 \% according to Gray \cite{Gray2011} - have adopted reserve requirement systems (RRS). Under the RRS, deposit-taking institutions are required to put at least a particular portion of their deposits received from their depositors at their central Bank current accounts. The portion is determined by the Central Bank of the country. The minimum amount that deposit-taking institutions must have in their current account at central banks is the “minimum reserve requirements”. Gray \cite{Gray2011} states three primary purposes of the RRS: prudential, monetary control, and liquidity management. First, the RRS serves as a means of prudential by ensuring that banks hold a certain proportion of high-quality, liquid assets. Second, the RRS serves as a means of monetary control. The uses of reserve requirements are usually described in terms of two channels: the money multiplier and the impact of reserve requirement on interest rate spreads. Last, the RRS serves as a means of liquidity management through averaging reserve balances, decreasing surplus reserve balances. The RRS was initially introduced for prudential purposes. Later, in the 1930s, changes in reserve requirement ratios began to be used as a means of monetary policy \cite{Monnet2019}. Currently, central banks of developed countries with advanced financial markets conduct their monetary policies through operations in their short-term financial markets, and reserve requirement ratios are not used as a means of monetary policy. For instance, the Bank of Japan has not changed the reserve requirement ratio since October 1991. \paragraph{Unconventional Monetary Policy and Reserves} In the 2000s (especially after the global financial crisis), central banks of developed countries have implemented so-called unconventional monetary policies and have greatly expanded their balance sheets. As a result, these central banks now have huge excess reserve balances (reserves that exceed the required level). Under such a circumstance, by paying interest on excess reserve balances as a practical lower bound on the interbank market interest rate, the central banks started making use of such reserve balances as a tool for market operations and also for keeping market functions \cite{FRB2016}, \cite{BOJ2008}. \paragraph{Fund Settlement System for Interbank Transactions} Many central banks provide online fund settlement services as infrastructures for efficient and secure fund settlements among financial institutions. Such services are provided through large computer systems, such as Bank of Japan Financial Network System (BoJ Net), Fedwire Funds (US), and TARGET2 (Euro area). Transactions in interbank markets are settled by fund transfer between two accounts held at the central bank. The smooth operation of these funds settlement systems is a prerequisite for the full functioning of the interbank markets. Fund settlement services provided by central banks have common features. For instance, the fund settlements through their settlement systems are final. Also, transactions are settled based on the “Real Time Gross Settlement (RTGS)” method to reduce settlement risk. The introduction of the RTGS system comes from considerations to limit systemic risk. In the deferred net settlement (DNS) system that had been common in the past, a fail of settlement at the designated time by a participant may trigger consecutive fails in settlements. This comes from the fact that a participant often makes use of the funds to be received from other participants for their own payments. Thus, there was a risk that failure of payment by a participant might stop whole settlements among many financial institutions. This would be a form of the materialization of systemic risk. For this reason, many countries switched from the DNS system to the RTGS system. With the RTGS method, funds are settled immediately for each order based on instructions from the financial institution. Therefore, the direct impact of default is limited to its instructed counterparty \cite{BOJ2011b}. According to a World Bank survey, as of 2016, 103 out of 113 countries (91\%) have adopted the RTGS fund settlement system \cite{WorldBank2018}. \subsection{Network Reconstruction} \label{sec:2-2} The network reconstruction has been an actively studied topic in network science and a large number of works have been published during the year \cite{Anand2018}, \cite{Anand2014}, \cite{Wilson1967}, \cite{Duenas2013}, \cite{Drehmann2013}, \cite{Mastrandrea2014}, \cite{Cimini2015a}, \cite{Cimini2015b}, \cite{Ikeda2017}, \cite{Squartini2018}, \cite{Ramadiah2020}. The following is a brief desciption of models closely related to the model described in section \ref{sec:3}. \paragraph{MaxEnt model} The MaxEnt model maximizes the entropy $S(t_{ij})=-\sum t_{ij} \ln t_{ij}$ by changing the amount of outstanding loans made by bank $i$ to bank $j$, $t_{ij}$ under the following constraints \cite{Wells2004}, \cite{Upper2011}: \begin{equation} s_{i}^{out} = \sum_j t_{ij}, \label{Const1} \end{equation} \begin{equation} s_{j}^{in} = \sum_i t_{ij}, \label{Const2} \end{equation} \begin{equation} G = \sum_i s_{i}^{out} = \sum_j s_{j}^{in}, \label{Const3} \end{equation} where the amount of aggregated loans owned by bank $i$, $s_{i}^{out}$ and the amount of aggregated borrowing of bank $j$, $s_{j}^{in}$ are assumed to be given. The analytical solution is easily obtained as \begin{equation} t_{ij}^{ME} = \frac{s_{i}^{out} s_{j}^{in}}{G}. \label{MaxEnt4} \end{equation} It is, however, noted that the solution in Eq. (\ref{MaxEnt4}) gives a fully connected network, although the real-world networks are often known as sparse networks. We note that $t_{ij}^{ME}$ in Eq. (\ref{MaxEnt4}) is used as the null model in the definition of modularity $M$ used in the community analysis of networks \cite{Newman2004}. \paragraph{Other major models} The other significant models were systematically surveyed in Appendix B of the literature \cite{Anand2018}. Here, only a summary of the selected models is given. The Minimum Density model produces networks preserving the characteristic of interbank networks \cite{Anand2014}. The authors note that interbank activity is based on sparse relationships in interbank networks. This model is formulated as a constrained optimization problem. The objective function is the total cost of interbank transactions. As constraints, aggregated interbank assets and aggregated liabilities of each bank are given. This problem, however, is computationally expensive to solve. The authors proposed a heuristic to solve this problem. A fitness model postulates that the probability of a bank acquiring links is proportional to its fitness \cite{Musmeci2013}. The probability for a link between two banks i and j is formulated using the fitness $f_i$ $(j)$ of bank $i$ $(j)$ with parameter z. First, the parameter z is estimated from the aggregate lending and borrowing constraints of banks. Second, a series of adjacency matrices are sampled using the probabilities for the link. Finally, the exposures are determined using the standard maximum entropy method. Another fitness model is presented related to Musmeci's model but with some critical differences \cite{Cimini2015a} \cite{Cimini2015b}. First, both methods generate adjacency matrices from so-called fitness models. However, in Musmeci's model, the matrices are undirected, while Cimini's model is directed. Second, for assigning the exposures, Musmeci's model utilizes the maximum entropy method. While in Cimini's model, the exposure assignment also follows a fitness model. The aggregate exposure constraints are satisfied only in an average over a large number of reconstructed networks. \section{Ridge Entropy Maximization Model} \label{sec:3} \paragraph{Convex Optimization} \label{Convex} Configuration entropy $S$ is written using bilateral transaction $t_{ij}$ between banks $i$ and $j$ as follows, \begin{equation} S = \log \frac{ \left( \sum_{ij} t_{ij} \right) ! }{ \prod_{ij} t_{ij} ! } \approx \left( \sum_{ij} t_{ij} \right) \log \left( \sum_{ij} t_{ij} \right) - \sum_{ij} t_{ij} \log t_{ij}. \label{entropy1} \end{equation} Here an approximation is applied to factorial $!$ using Stirling's formula. The first term of R.H.S. of Eq.(\ref{entropy1}) does not change the value of $S$ by changing $t_{ij}$ because $\sum_{ij} t_{ij}$ is constant. Consequently, we have a convex objective function: \begin{equation} S = - \sum_{ij} t_{ij} \log t_{ij}. \label{entropy2} \end{equation} Entropy $S$ is to be maximized under the constraints given by Eqs. (\ref{Const1}) - (\ref{Const3}), where $s_{i}^{out}$ and $s_{j}^{in}$ correspond to the local information given for each node. \paragraph{Sparsity of Network} \label{Sparse} The accuracy of the reconstruction will be improved using the sparsity of the interbank network. The sparsity is characterized by the skewness of the observed in-degree and out-degree distributions. This means that a limited fraction of nodes have a large number of links and most nodes have a small number of links and consequently the adjacency matrix of international trade is sparse. To take into account the sparsity, the objective function in Eq. (\ref{entropy2}) is modified by applying the concept of Lasso (least absolute shrinkage and selection operator) or ridge regularization \cite{Tibshirani1996} \cite{Breiman1995} \cite{Hastie2008} to our convex optimization problem. \paragraph{Lasso or Ridge Regularizations} In the case of Lasso or L1 regularization, our problem is formulated as the maximization of objective function $z$: \begin{equation} z(t_{ij}) = S - \sum_{ij} \left| t_{ij} \right| = - \sum_{ij} t_{ij} \log t_{ij} - \beta \sum_{ij} \left| t_{ij} \right| \label{Lasso} \end{equation} with local constraints. Here the second term of R.H.S. of Eq. (\ref{Lasso}) is L1 regularization. $\beta$ is a control parameter. However the L1 regularization term $\sum_{ij} \left| t_{ij} \right|$ is constant in our problem. Therefore, we need a variant of the Lasso concept, e.g. ridge or L2 regularization. By considering this fact, our problem is reformulated as the maximization of objective function $z$: \begin{equation} z(t_{ij}) = S - \sum_{ij} t_{ij}^2 = - \sum_{ij} t_{ij} \log t_{ij} - \beta \sum_{ij} t_{ij}^2 \label{Ridge} \end{equation} with local constraints. Here the second term of R.H.S. of Eq. (\ref{Ridge}) is L2 regularization. In the Lasso regularization, many transaction $t_{ij}$ become zero and only small number of variables are finite values. For this reason, Lasso regression is called sparse modeling. On the other hand, in the ridge regularization, relatively small values are obtained for many transaction $t_{ij}$. \begin{figure*} \includegraphics[width=0.35\textwidth]{Ridge.pdf} \includegraphics[width=0.35\textwidth]{Lasso.pdf} \caption{The Ridge regression yields small overall values for the variables $t_{ij}$, except for significant explanatory variables. On the other hand, Lasso regression yields many variables $t_{ij}$ that are zero and only some variables that are different from zero. For this reason, Lasso regression is called sparse modeling.} \label{fig:1} \end{figure*} \paragraph{Reconstruction Model considering Sparsity} In the theory of thermodynamics, the equilibrium of a system is obtained by minimizing thermodynamic potential $F$: \begin{equation} F = E - TS \label{FreeEnergy} \end{equation} where $E$, $T$, and $S$ are internal energy, temperature, and entropy, respectively. Eq. (\ref{FreeEnergy}) is rewritten as a maximization problem as follows, \begin{equation} z \equiv -\frac{1}{T} F = S - \frac{1}{T} E. \label{ObjtFcun} \end{equation} We note that Eq. (\ref{ObjtFcun}) has the same structure to Eq. (\ref{Ridge}). Thus we interpret the meaning of control parameter $\beta$ and L2 regularization term as inverse temperature $1/T$ and internal energy $E$, respectively. We obtain the ridge entropy maximization model by replacing interbank transaction $t_{ij}$ by $p_{ij}={t_{ij}}/{\sum_{ij} t_{ij}}$ \cite{Ikeda2018b}: \begin{equation} \renewcommand{\arraystretch}{2.3} \begin{array}{ll} \mbox{maximize } & z (p_{ij}) = - \sum_{ij} p_{ij} \log p_{ij} - \beta \sum_{ij} p_{ij}^2 \\ \mbox{subject to } & \sum_{ij} p_{ij} = 1 \\ & p_{ij} \geq 0 \\ & \frac{s_{i}^{out}}{G} = \sum_j p_{ij} \\ & \frac{s_{j}^{in}}{G} = \sum_i p_{ij} \\ & G = \sum_{ij} t_{ij} \\ \end{array} \label{ConvexFormulation} \end{equation} Based on the ridge entropy maximization model formulated in Eqs. (\ref{ConvexFormulation}), this paper proposes the following new constraints that can be applied to a variety of real-world problems. First, let us consider a network reconstruction among banks that form a subset of all financial institutions. In this case, the amount of aggregate loan owned by the banks $\sum_i s_{i}^{out}$ is not equal to the amount of aggregate borrwoing of the banks $\sum_j s_{j}^{in}$. Therefore, node ``other'' is needto be added as a slack variable in the ridge entropy maximization model formulated in Eqs. (\ref{ConvexFormulation}) to satisfy $\sum_{ij} p_{ij} = 1$. In addition, consider the case where the banks to be analyzed can be divided into several categories and the total amount of transactions among a particular set of categories is known. This includes cases where the total amount of transactions within a particular category is known. In these cases, we can add the following constraints, \begin{equation} \sum_{i \in g_l} \sum_{j \in g_l'}p_{ij} =\frac{Q_{ll'}}{G}, \label{GroupC} \end{equation} where $g_l$ is the $l \mathchar`-{\text{th}}$ group and $Q_{ll'}$ is the total amount of transactions between the the $l\mathchar`-{\text{th}}$ category and the $l'\mathchar`-{\text{th}}$ category. As a special case of Eq. (\ref{GroupC}), if no transaction among a particular set of categories is made $Q_{ll'}=0$, we impose a constraint the following conditions, \begin{equation} p_{ij} =0 \; \; \; \; \; \; (i \in g_l, j \in g_l'). \label{GroupC2} \end{equation} \section{Financial and Economic Data} \label{sec:4} The Japanese banks are categorized as the major commercial bank, the trust bank, the leading regional bank, and the second-tier regional bank. The major commercial banks are financial institutions that provide financial intermediary services such as underwriting government bonds through international financial markets. They are represented by Mitsubishi UFJ Bank, Sumitomo Mitsui Banking Corporation, Mizuho Bank, and Resona Bank. The trust banks are financial institutions mainly engaged in the trust business. They include Mitsubishi UFJ Trust and Banking Corporation and Norinchukin Trust and Banking Corporation. The leading regional banks are the largest financial institutions in each prefecture and greatly influence the local economy. Approximately, Sixty banks fall under this category. The second-tier regional banks are financial institutions in each prefecture, but they are smaller than the leading regional banks, and some of them are unlisted. More than thirty banks fall under this category. In this section, we explain the data used in the reconstruction of the interbank network. \paragraph{Lending and Borrowing in Interbank Market} Imakubo and Soemjima studied the transaction in Japanese interbank market. The core parts of Table 4 in paper \cite{Imakubo2010} are reproduced in Table \ref{table:CallLoanMoney}. This study shows only a small amount of transaction is observed among the trust banks, the leading regional banks, and the second-tier regional banks at the end of December, 2005. (1) Lending from the trust banks to the trust banks, the regional banks, and the 2nd tier regional banks are $0.3 \times 10^{12}$, $0.6 \times 10^{12}$, and $0.0 \times 10^{12}$ in JPY, respectively. (2) Lending from the regional banks to the trust banks, the regional banks, and the 2nd tier regional banks are $1.4 \times 10^{12}$, $1.0 \times 10^{12}$, and $0.0 \times 10^{12}$ in JPY, respectively. (3) Lending from the 2nd-tier regional banks to the trust banks, the regional banks, and the 2nd tier regional banks are $0.1 \times 10^{12}$, $0.1 \times 10^{12}$, and $0.0 \times 10^{12}$ in JPY, respectively. Especially, market transactions within the same bank category are practically non-existent except for major commercial banks. We consider this sparsity to reconstruct the interbank network in Japan by imposing the constraints in Eq. (\ref{GroupC2}). \begin{table}[hbtp] \caption{Interbank Market in December 2005 ( $10^{12}$ JPY, Table 4 in paper \cite{Imakubo2010}) } \label{table:CallLoanMoney} \centering \begin{tabular}{lccccc} \hline Lender & Major & Rrust & Leading regional & 2nd tier regional & Total \\ \hline \hline Major bank & 7.0 & 2.2 & 2.4 & 0.0 & 11.6 \\ Trust bank & 4.2 & 0.3 & 0.6 & 0.0 & 5.1 \\ Leading regional & 7.4 & 1.4 & 1.0 & 0.0 & 9.8 \\ 2nd tier regional & 3.2 & 0.1 & 0.1 & 0.0 & 3.4 \\ Total & 21.8 & 4.0 & 4.1 & 0.0 & 29.9 \\ \hline \end{tabular} \end{table} \paragraph{Call Loan and Call Money in Balance Sheet} Call loan (lending) and call money (borrowing) of 98 banks are recorded in balance sheets. Temporal change of call loan and call money for each bank are shown in Fig. \ref{fig:TemporalChange}. The leading regional banks have a large amount of call loans, and the major commercial banks and the trust banks have large amount of call money. This implies that the leading regional banks lend money to the major commercial banks and the trust banks. It is, however, noted that the amount of both call loan and call money has decreased since the early 2000s. This coincides with the recent increase in purchasing government bonds. The distribution of log-transformed call loans in 2000 and 2016 are shown in Fig. \ref{fig:LogCallLoan}. The distributions are regarded as a unimodal distribution approximately. The distribution of log-transformed call money in 2000 and 2016 are shown in Fig.\ref{fig:LogCallMoney}. The distributions are considered as a unimodal distribution approximately. The amount of aggregate call loan is not equal to the amount of aggregate call money. Therefore, node ``other'' is needed as a slack variable in the ridge entropy maximization model formulated in Eqs. (\ref{ConvexFormulation}). \begin{figure*} \includegraphics[width=0.5\textwidth]{Callloan.pdf} \includegraphics[width=0.5\textwidth]{Callmoney.pdf} \caption{Temporal change of call loan (left panel) and call money (right panel) for each bank. The leading regional banks lent money to the major commercial banks and the trust banks. The amount of both call loan and call money has decreased since the early 2000s. This coincides with the recent increase of purchasing government bond. } \label{fig:TemporalChange} \end{figure*} \begin{figure*} \includegraphics[width=0.4\textwidth]{CallLoan_2000.pdf} \includegraphics[width=0.4\textwidth]{CallLoan_2016.pdf} \caption{Distribution of log-transformed call loan (lending) in 2000 (left panel) and 2016 (right panel). The aggregated call loan in balance sheet is consistent with the interbank market data, except for the transaction of the regional banks.} \label{fig:LogCallLoan} \end{figure*} \begin{figure*} \includegraphics[width=0.4\textwidth]{CallMoney_2000.pdf} \includegraphics[width=0.4\textwidth]{CallMoney_2016.pdf} \caption{Distribution of log-transformed call money (borrowing) in 2000 (left panel) and 2016 (right panel). The aggregated call money in balance sheet is consistent with the interbank market data, except for the transaction of the major banks.} \label{fig:LogCallMoney} \end{figure*} \paragraph{Comparison of Interbank Market and Balance Sheet} Aggregated call loan (lending) and call money (borrowing) of the major banks, the trust banks, the regional banks, and the 2nd-tier regional banks recorded in balance sheets in 2005 are shown in Table \ref{table:BSCallLoanMoney}. The aggregated call loan (lending) and the aggregated call money (borrowing) in the balance sheet are much smaller than the interbank market data. Since the call money and call loans on the balance sheet are the balances at the end of the year of the transaction, it can be understood as natural that they are much smaller than the amount of call market transactions made during the month of December 2005. The majority of transactions in the call market are overnight transactions, i.e., borrowing (or lending) on the same day and returning (or receiving repayment) the next day. It is quite natural that the amount of transactions expands daily, but the outstanding balance is considerably smaller than the amount of transactions. If the amount of transactions in the call market is large, the amount of call loans on the balance sheet can be considered significant. However, the picture changes when a financial crisis occurs or a policy change occurs in the period. For example, in FY2008 (the subprime mortgage crisis in September 2008), FY2010 (the Bank of Japan supplied a large amount of funds to the market in response to the Great East Japan Earthquake in March 2011), and FY2015 (the introduction of negative interest rates in February 2016), there may be a discrepancy between the characteristics of transactions during the entire period and the ending balance. In the absence of such special events, it is reasonable to say that the ending balance broadly reflects the characteristics of transactions during the period. Therefore, in this study, we assume that the call money and call loans in the end-of-period balance sheet retain the characteristics of call market transactions. \begin{table}[hbtp] \caption{Balance Sheet in 2005 ($10^{12}$ JPY) } \label{table:BSCallLoanMoney} \centering \begin{tabular}{lcc} \hline Category & Call Loan & Call Money \\ \hline \hline Major bank & 1.5 & 9.4 \\ Trust bank & 0.5 & 0.6 \\ Leading regional & 2.7 & 1.5 \\ 2nd tier regional & 0.4 & 0.1 \\ \hline \end{tabular} \end{table} \section{Results and Discussions} \label{sec:5} The interbank network in Japan was reconstructed using the ridge entropy maximization model in Eqs. (\ref{ConvexFormulation}). The number of banks in each category isis 5, 59, 3, and 31: the major commercial bank, the leading regional bank, the trust bank, and the second-tier regional bank, respectively. Call loan $s_{i}^{out}$ of bank $i$ and call money $s_{j}^{in}$ of bank $j$ are taken from the balance sheet of each bank and are given as constraints of the model. In addition to the banks, a slack variable is incorporated in the model to balance the aggregated call loan and the aggregated call money. The sparsity that is no transactions within the same bank category except for major commercial banks, observed in Table \ref{table:CallLoanMoney} is considered by imposing the constraints in Eq. (\ref{GroupC2}), i.e. $p_{ij} =0 \left( i \in g_l, j \in g_l \right)$, where $l$ denote the trust banks, the regional banks, and the 2nd-tier regional banks. In the objective function in Eqs. (\ref{ConvexFormulation}), we assumed $\beta = 100$. The optimization was done using package software for convex programming problem CVXR in R \cite{CVXR}. For the verification of the ridge entropy maximization model in Eqs. (\ref{ConvexFormulation}) by applying to the problem where the adjacent matrix and its weights are known, see Appendix A. \paragraph{Reconstruction of Interbank Network} The distributions of transaction $t_{ij}$ for the reconstructed interbank network in 2005 with the different value of $\beta$ are shown in Fig. \ref{fig:BankNet}. The leftmost peaks in the distributions are close to zero and therefore are regarded as spurious links. The left panel shows the distribution of weight $t_{ij}$ for the obtained interbank network with $\beta=25$. The right panel shows the distribution of weight $t_{ij}$ with $\beta=100$. The comparison confirmed that increasing $\beta$ resulted in a decrease in the links for small values and an increase in the large region. \begin{figure*} \includegraphics[width=0.4\textwidth]{linkweight_2005_beta25.pdf} \includegraphics[width=0.4\textwidth]{linkweight_2005_beta100.pdf} \caption{Reconstructed Interbank Network in 2005. The left panel shows the distribution of weight $t_{ij}$ for the obtained interbank network with $\beta=25$. The right panel shows the distribution of weight $t_{ij}$ with $\beta=100$. Increasing $\beta$ resulted in a decrease in the links for small values and an increase in the large region.} \label{fig:BankNet} \end{figure*} \paragraph{Binary Interbank Network by truncating Links} Binary interbank network $a_{ij}$ was obtained by truncated links whose weights $t_{ij}$ are smaller than the $80^{th}$ percentile of the distribution: \begin{equation} a_{ij} = \begin{cases} 1, & t_{ij} > \text{the } 80^{th} \text{ percentile} \\ 0, & t_{ij} \le \text{the } 80^{th} \text{ percentile}. \end{cases} \label{Truncation} \end{equation} The distributions of reconstructed transaction $t_{ij}$ are shown in Fig. \ref{fig:DistTrans}. The left panel is the distribution in 2000 and the right panel in 2016. The red vertical line shows the $80^{th}$ percentile of the distribution and therefore the links smaller than this threshold are ignored in the binary interbank network. By truncating the links below the threshold, the network density decreased from $54.1\%$ to $10.7\%$; this network density decrease is stable over the period 2000-2016. \begin{figure*} \includegraphics[width=0.45\textwidth]{ReconstTrans2000.pdf} \includegraphics[width=0.45\textwidth]{ReconstTrans2016.pdf} \caption{The distributions of reconstructed transaction $t_{ij}$ are shown for 2000 in the left panel and for 2016 in the right panel. The red vertical line shows the $80^{th}$ percentile of the distribution and therefore the links smaller than this threshold are ignored in the binary interbank network.} \label{fig:DistTrans} \end{figure*} \paragraph{Network Attributes and Community Structure} \begin{figure*} \includegraphics[width=0.45\textwidth]{pathlength_comparison.pdf} \includegraphics[width=0.45\textwidth]{transitivity_comparison.pdf} \includegraphics[width=0.45\textwidth]{assortativity_comparison.pdf} \includegraphics[width=0.45\textwidth]{modularity_comparison.pdf} \caption{The temporal change of the network attributes: The average shortest path length, the clustering coefficient, the assortativity, and modularity in degree-preserved randomized network are shown for the binary network reconstructed from 2000 to 2016. The results comfirmed that the reconstructed network is essentially random network. The comparison of the assortativity implies that the strong disassortativity emerged in the reconstructed interbank network. } \label{fig:RandNet} \end{figure*} Three centralities: the clustering coefficient, the path length, and the assortativity, were calculated for the reconstructed binary network from 2000 to 2016. The community structures were identified by maximizing the modularity for the binary networks. The temporal change of the network attributes: the modularity, the clustering coefficient (transitivity), the assortativity, and the shortest path length are shown in panels (a)-(c) of Fig. \ref{fig:RandNet} between 2000 and 2016. The observed average shortest path in panel (a) of Fig. \ref{fig:RandNet} is approximately $2$, which is consistent with the previous study \cite{Muller2006}. Panel (b) and (c) of Fig. \ref{fig:RandNet} also shows a small clustering coefficient and disassortative property, respectively. The strong disassortativity implies that a few large banks are linked to a large number of small banks. These are also consistent with the previous studies \cite{Iori2008}, and \cite{Soramaki2006}. Therefore, the reconstructed interbank network reproduced the stylized facts known for the interbank networks. Panel (d) of Fig. \ref{fig:RandNet} shows that the modularity is less than $0.1$ during the entire period. This means that the identified communities are not necessarily the most significant, but they can be helpful to understand the network structure. 1000 samples of degree-preserved randomized networks were generated and the clustering coefficient, the shortest path length, and the assortativity were calculated for the randomized networks. Comparison with the original reconstructed network for the clustering coefficient, the shortest path length, and the assortativity are shown in panels (a)-(c) of Fig. \ref{fig:RandNet}. The shortest path length and the clustering coefficient are equivalent during the entire period. The disassortativity becomes weaker in the randomized network during the entire period. The comparison of the disassortativity means that the strong disassortativity emerged in the reconstructed interbank network. The rest properties are similar to the random network as expected by the basic concept of the reconstruction model. \paragraph{Core and Peripheral Structure} The core and peripheral structures have been known in the interbank network \cite{Imakubo2010}. The network structure is depicted in Fig. \ref {fig:CorePeripheral} for the binary interbank network in 2007 and 2015. The area shaded by the red or blue region of Fig. \ref {fig:CorePeripheral} forms major communities. We note that many banks are surrounding the core part. In the core part, a few large banks are interlinked and linked to a large number of banks located in the peripheral region. We note that we did not introduce the mechanism to generate the core and peripheral structure, but we imposed the constraints $p_{ij} =0 \left( i \in g_l, j \in g_l \right)$ to consider the sparsity that is no transactions within the same bank category except for major commercial banks. Therefore, we can say that the core and peripheral structure is spontaneously emerged. Cumulative PageRank distribution and degree distribution in 2016 are shown in Figure \ref{fig:Heterogeniety}. These distributions imply that the heterogeneity of nodes is substantial, and thus major nodes could be identified using the value of PageRank and degree. \begin{figure*} \includegraphics[width=0.5\textwidth]{Plot_CommNetwork_2007.pdf} \includegraphics[width=0.5\textwidth]{Plot_CommNetwork_2015.pdf} \caption{Core and peripheral structure in 2007 (left) and 2015 (right). The area shaded by red or blue region forms major communities. In the core part, a few large banks are interlinked each other and are linked to a large number of banks located in the peripheral region.} \label{fig:CorePeripheral} \end{figure*} \begin{figure*} \includegraphics[width=0.45\textwidth]{Plot_PageRank_2016.pdf} \includegraphics[width=0.45\textwidth]{Plot_Degree_2016.pdf} \caption{Heterogeniety of nodes in PageRank distribution and degree distribution in 2016. The Complementary Cumulative Distribution Function (CCDF) imply that the heterogeniety of nodes is strong and thus major nodes could be identified using the value of PageRank and degree.} \label{fig:Heterogeniety} \end{figure*} \paragraph{Changing Role of Bank Categories} Two large communities were detected in 2000, 2007, and 2015, which showed relatively large values of modularity. In these communities, we listed the ten financial institutions with the highest PageRank as major nodes. The major nodes of the first and second communities are shown in Table \ref{table:MN2000Comm1} to Table \ref{table:MN2015Comm2} in Appendix B. From 2000 to 2015, Mizuho Bank, MUFG Bank, Aozora Bank, Snisei Bank, and Resona Bank belong to the major commercial bank category and are listed as major nodes. The number of in-degrees of these financial institutions is consistently much higher than the number of out-degrees, indicating that they are continuously raising funds through the call market. In the major node in 2000, the in-degree of Shizuoka Bank, Bank of Yokohama, Joyo Ban, Kagoshima Bank, Gunma Bank, which belong to the leading regional bank category, is higher than the out-degrees. In the major node of 2007, the number of in-degrees of Shimizu Bank, Nanto Bank, Daishi Bank, and Shonai Bank, which belong to the leading regional bank category, is higher than the out-degrees. However, these banks belonging to the leading regional bank category are not included in the major node in 2015, or even if they are included, the number of in-degree and out-degree are often at the same level. These results indicate a change in the position of the leading regional bank category. The average PageRank, average degrees in each bank category are summarized in Fig. \ref{fig:ChangingRole}. Since 2014, both PageRank and the degree of trust banks have increased significantly; the increase in degree may be mainly due to the increase in in-degree. In addition, the role of second-tier regional banks in providing funds appears to have increased in recent years. The observed changing role of banks is considered as a result of the quantitative and qualitative monetary easing policy started by the Bank of Japan in April of 2013. Although a more detailed study is needed, it can be said that the ridge entropy maximization model in Eqs. (\ref{ConvexFormulation}) captured the change of the interbank network caused by the quantitative and qualitative monetary easing policy. \begin{figure*} \includegraphics[width=0.45\textwidth]{pagerank_banktype.pdf} \includegraphics[width=0.45\textwidth]{degree_banktype.pdf} \includegraphics[width=0.45\textwidth]{indegree_banktype.pdf} \includegraphics[width=0.45\textwidth]{outdegree_banktype.pdf} \caption{Changing role of banks observed in PageRank, degree, in-degree, and out-degree. } \label{fig:ChangingRole} \end{figure*} \section{Conclusion} \label{sec:6} We developed a network reconstruction model based on entropy maximization considering the sparsity of networks. Here the reconstruction is to estimate the network's adjacency matrix from the node's local information. We reconstructed the interbank network in Japan from financial data in balance sheets of individual banks using the developed reconstruction model in the period from 2000 to 2016. The observed sparsity of the interbank network was successfully reproduced. We examined the characteristics of the reconstructed interbank network by calculating important network attributes. We obtained the following characteristics, which are consistent with the previously known stylized facts: the short path length \cite{Muller2006}, the small clustering coefficient \cite{Iori2008}, the disassortative property \cite{Soramaki2006}, and the core and peripheral structure \cite{Imakubo2010}. Although we did not introduce the mechanism to generate the core and peripheral structure, we imposed the constraints to consider the sparsity that is no transactions within the same bank category except for major commercial banks, the core and peripheral structure has spontaneously emerged. Community analysis showed that two large communities were detected in 2000, 2007, and 2015, which showed relatively large values of modularity. Major nodes in each community were identified using the value of PageRank and degree. This identified that the major commercial banks and the trust banks were the major nodes in each community. Since 2014, both PageRank and the degree of trust banks have increased significantly; the increase in degree may be mainly due to the increase in in-degree. In addition, the role of second-tier regional banks in providing funds appears to have increased in recent years. The observed changing role of banks is considered a result of the quantitative and qualitative monetary easing policy started by the Bank of Japan in April of 2013. \section*{Appendix A} \label{sec:7} In appendix A, we verify the ridge entropy maximization model in Eqs. (\ref{ConvexFormulation}) by applying it to the problem where the adjacent matrix and its weights are known. We aggregated World Input-Output Data \cite{Timmer2015} in 2014 into country-wise trade data, which are expressed in millions of US dollars. The aggregated data include 44 countries. We prepared two different data sets $t_{ij}^{(data)}$: one is the original aggregated country-wise trade data denoted by No-cut data, and the other is the aggregated country-wise trade data deleted below the second quantile point, denoted by 2Q-cut data. Each row corresponds to the amount of export from the country shown in the row to the countries shown in columns. Therefore, row-wise sum and column-wise sum correspond to the country's aggregated export $E_i$ and import $I_j$, respectively. We reconstruct the trade network by treating $E_i$ and $I_j$ as $s_i^{out}$ and $s_j^{in}$, respectively. First, we reconstruct the trade network $t_{ij}^{(reconst)}$ for No-cut data without the link constraints. Here, the link constraints mean the additional constraints taken from the adjacent matrix and its weights in the Ridge-Entropy maximization. We calculated the normalized root mean squared error between the trade data and the reconstructed trade, \begin{equation} \mathrm{RMSE} = \sqrt{ \frac{1}{n} \sum_{ij} \left( \frac {t_{ij}^{(reconst)}-t_{ij}^{(data)}} {t_{ij}^{(data)} } \right)^2 }. \label{RMSE} \end{equation} We also fitted the relationship between between the trade data and the reconstructed trade, \begin{equation} \log_{10} { t_{ij}^{(reconst)} } = a \log_{10} t_{ij}^{(data)} + b. \label{fitting} \end{equation} The parameter $\beta$ dependences of the reconstruction are shown in Fig. \ref{fig:nocut_wo_lc}. Fig. \ref{fig:nocut_wo_lc} (a) to (d) show that the objective function $z(p_{ij})$ in Eq. (\ref{ConvexFormulation}), $\mathrm{RMSE}$, the intercept parameter $b$ of the fitting between the trade data and the reconstructed trade, and the slope parameter $a$ of the fitting, respectively. As $\beta$ is increased, $\mathrm{RMSE}$ decreases, the intercept $b$ approaches $0.0$, and the slope $a$ approaches $1.0$, although the objective function decreases. Pure entropy maximization, without the second term of the objective function in Eq. (\ref{ConvexFormulation}), corresponds to $\beta=0$. In this case, under the given constraints, the link weights are relatively uniformly and randomly distributed. However, as $\beta$ is increased, the second term of the objective function increases the heterogeneity of the link weights. As a result, the slope parameter $a$ becomes larger; if the value of $\beta$ is too large, the slope parameter $a$ takes a value greater than one. Therefore, there is an optimal value of $\beta$ that best reproduces the heterogeneity of the link weights. \begin{figure*} \includegraphics[width=1.0\textwidth]{nocut_without_link_constraints.pdf} \caption{The parameter $\beta$ dependences of the reconstruction for No-cut data without link constraints} \label{fig:nocut_wo_lc} \end{figure*} Second, we reconstruct the trade network $t_{ij}^{(reconst)}$ with the link constraints. The parameter $\beta$ dependences of the reconstruction are shown in Fig. \ref{fig:nocut_with_lc}. The observed parameter $\beta$ dependences are similar to the reconstruction without the link constraints. Note that the intercept $b$ and the slope $a$ are approximately equal to 0 and 1, respectively, when $\beta$ is equal to $100$. Figure \ref{fig:Ridge5_nocut} shows the relationship between the trade data and the reconstructed trade for No-cut data with link constraints with $\beta=100$. \begin{figure*} \includegraphics[width=1.0\textwidth]{nocut_with_link_constraints.pdf} \caption{The parameter $\beta$ dependences of the reconstruction for No-cut data with link constraints} \label{fig:nocut_with_lc} \end{figure*} \begin{figure*} \includegraphics[width=0.5\textwidth]{EntropyModel_IT_2014_Ridge5_nocut.pdf} \caption{Relationship between the trade data and the reconstructed trade for No-cut data with link constraints with $\beta=100$} \label{fig:Ridge5_nocut} \end{figure*} Third, we reconstruct the trade network $t_{ij}^{(reconst)}$ without the link constraints for 2Q-cut data. The parameter $\beta$ dependences of the reconstruction are shown in Fig. \ref{fig:2Qcut_wo_lc}. The observed parameter $\beta$ dependences are similar to the reconstruction of No-cut data. We notice that the intercept $b$ and the slope $a$ are approximately equal to 0 and 1, respectively when $\beta$ is equal to $50$. \begin{figure*} \includegraphics[width=1.0\textwidth]{2Qcut_without_link_constraints.pdf} \caption{The parameter $\beta$ dependences of the reconstruction for 2Q-cut data without link constraints} \label{fig:2Qcut_wo_lc} \end{figure*} Fourth, we reconstruct the trade network $t_{ij}^{(reconst)}$ with the link constraints from 2Q-cut data. The parameter $\beta$ dependences of the reconstruction are shown in Fig. \ref{fig:2Qcut_with_lc}. The observed parameter $\beta$ dependences are similar to the reconstruction of 2Q-cut data without the link constraints. Note that the intercept $b$ and the slope $a$ are approximately equal to 0 and 1, respectively, when $\beta$ is equal to $100$. Figure \ref{fig:Ridge5_2Qcut} shows the relationship between the trade data and the reconstructed trade for 2Q-cut data with link constraints with $\beta=100$. Reproduction of the marginal distribution of the reconstruction for 2Q-cut data with link constraints is confirmed in Fig. \ref{fig:2Qcut_merginal_with_lc}. In panel (a), the horizontal and vertical axes indicate the aggregated import data of each country and the aggregated export calculated from the reconstructed network, respectively. Panel (b) is the same, but it is about aggregated exports. \begin{figure*} \includegraphics[width=1.0\textwidth]{2Qcut_with_link_constraints.pdf} \caption{The parameter $\beta$ dependences of the reconstruction for 2Q-cut data with link constraints} \label{fig:2Qcut_with_lc} \end{figure*} \begin{figure*} \includegraphics[width=0.5\textwidth]{EntropyModel_IT_2014_Ridge5_2Qcut.pdf} \caption{Relationship between the trade data and the reconstructed trade for 2Q-cut data with link constraints with $\beta=100$} \label{fig:Ridge5_2Qcut} \end{figure*} \begin{figure*} \includegraphics[width=0.5\textwidth]{CallMoney_2Qcut_k5_with_lc.pdf} \includegraphics[width=0.5\textwidth]{CallLoan_2Qcut_k5_with_lc.pdf} \caption{Merginal distribution of the reconstraction for 2Q-cut data with link constraints} \label{fig:2Qcut_merginal_with_lc} \end{figure*} The Network densities calculated for the four reconstructed networks are shown in Table \ref{table:density}. The Network densities of the trade data are $1.0$ and $0.488$ for No-cut data and 2Q-cut data, respectively. The reconstruction without the link constraints gave the network density equal to $1.0$ for both No-cut data and 2Q-cut data. On the other hand, when the link constraints are used, the reconstruction gave the accurate value $0.488$ for 2Q-cut data. This means that without using the link constraints, the Ridge Entropy Maximization does not reproduce the observed sparsity of the trade network. \begin{table}[hbtp] \caption{Network density} \label{table:density} \centering \begin{tabular}{lcc} \hline item & No-cut & 2Q-cut \\ \hline \hline trade data & 1.0 & 0.488 \\ reconstraction w/o link const. & 1.0 & 1.0 \\ reconstraction with link const.& 1.0 & 0.488 \\ \hline \end{tabular} \end{table} It is, however, possible to obtain the desired network density by truncating small weighted links of the network. For 2Q-cut data, if we truncate links, those weights are smaller than $0.24 \%$ of the maximum weighted link of the network, the network density is reproduced so that the density is equal to $0.488$. The marginal distribution of the reconstruction for 2Q-cut data with link constraints by truncating small weighted links of the network is shown in Fig. \ref{fig:2Qcut_merginal_wo_lc_with_trancation}. In panel (a), the horizontal and vertical axes indicate the aggregated import data of each country and the aggregated import calculated from the reconstructed network, respectively. Panel (b) is the same, but it is about aggregated exports. Note that the aggregated import and export calculated from the reconstructed network are slightly lower than the actual data in Fig. \ref{fig:2Qcut_merginal_wo_lc_with_trancation}. We can say that the deviation of the marginal distribution is small when the truncation of small weighted links is applied to obtain the observed sparsity of the network. \begin{figure*} \includegraphics[width=0.5\textwidth]{CallMoney_2Qcut_k5_with_lc_LinkTranc.pdf} \includegraphics[width=0.5\textwidth]{CallLoan_2Qcut_k5_with_lc_LinkTranc.pdf} \caption{Merginal distribution 2Q-cut without link constraints by trancating small weighted links. We notice that the aggregated import and export calculated from the reconstructed network are slightly lower than the actual data.} \label{fig:2Qcut_merginal_wo_lc_with_trancation} \end{figure*} \section*{Appendix B} \label{sec:8} Two large communities were detected in 2000, 2007, and 2015, which showed relatively large values of modularity. In these communities, we listed the 10 financial institutions with the highest PageRank as major nodes. The major nodes of the first and second communities in 2000 are shown in Table \ref{table:MN2000Comm1} and Table \ref{table:MN2000Comm2}; the major nodes of the first and second communities in 2007 are shown in Table \ref{table:MN2007Comm1} and Table \ref{table:MN2007Comm2}; the major nodes of the first and second communities in 2015 are shown in Table \ref{table:MN2015Comm1} and Table \ref{table:MN2015Comm2}. \begin{table}[hbtp] \caption{Major Nodes of Community 1 in 2000} \label{table:MN2000Comm1} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline Mizuho Bank & major commercial & 94 & 23 & 0.100005 \\ MUFG Bank & major commercial & 93 & 56 & 0.065976 \\ Aozora Bank & major commercial & 93 & 18 & 0.063958 \\ Snisei Bank & major commercial & 84 & 20 & 0.059184 \\ Kirayaka Holdings & second-tier regional & 63 & 21 & 0.055473 \\ Mizuho Trust and Banking & trust & 65 & 0 & 0.046078 \\ Sumitomo Mitsui Trust Bank & trust & 65 & 25 & 0.046078 \\ Nishi Nippon City Bank & second-tier regional & 52 & 1 & 0.043203 \\ Resona Bank & major commercial & 56 & 37 & 0.042650 \\ Bank of Fukuoka & leading regional & 7 & 9 & 0.014147 \\ \hline \end{tabular} \end{table} \begin{table}[hbtp] \caption{Major Nodes of Community 2 in 2000} \label{table:MN2000Comm2} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline Shizuoka Bank & leading regional & 34 & 9 & 0.024182 \\ Bank of Yokohama & leading regional & 33 & 9 & 0.023255 \\ Joyo Bank & leading regional & 30 & 10 & 0.021767 \\ Kagoshima Bank & leading regional & 22 & 9 & 0.019465 \\ Gunma Bank & leading regional & 20 & 5 & 0.019044 \\ San In Godo BANK & leading regional & 20 & 8 & 0.019044 \\ Chugoku Bank & leading regional & 20 & 9 & 0.019044 \\ Hachijuni Bank & leading regional & 14 & 9 & 0.017887 \\ Ogaki Kyoritsu Bank & leading regional & 14 & 9 & 0.017887 \\ Hyakujushi Bank & leading regional & 13 & 5 & 0.017782 \\ \hline \end{tabular} \end{table} \begin{table}[hbtp] \caption{Major Nodes of Community 1 in 2007} \label{table:MN2007Comm1} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline Shimizu Bank & leading regional & 39 & 8 & 0.052739 \\ Nanto Bank & leading regional & 39 & 10 & 0.052739 \\ Daishi Bank & leading regional & 32 & 11 & 0.048186 \\ Shonai Bank & leading regional & 32 & 10 & 0.048186 \\ MU Trust and Banking & trust & 6 & 14 & 0.008441 \\ Aozora Bank & major commercial & 6 & 15 & 0.008441 \\ Toho Bank & leading regional & 6 & 10 & 0.004501 \\ Sumitomo Mitsui Trust Bank & trust & 4 & 14 & 0.004176 \\ Bank of Kyoto & leading regional & 4 & 13 & 0.004176 \\ Tomato Bank & second-tier regional & 2 & 7 & 0.004118 \\ \hline \end{tabular} \end{table} \begin{table}[hbtp] \caption{Major Nodes of Community 2 in 2007} \label{table:MN2007Comm2} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline MUFG Bank & major commercial & 85 & 63 & 0.078086 \\ Resona Bank & major commercial & 85 & 43 & 0.077606 \\ Mizuho Bank & major commercial & 85 & 16 & 0.075147 \\ Kagawa Bank & second-tier regional & 67 & 7 & 0.054281 \\ Snisei Bank & major commercial & 57 & 13 & 0.046089 \\ Bank of Minami Nippon & second-tier regional & 62 & 8 & 0.044499 \\ Towa Bank & second-tier regional & 62 & 7 & 0.044499 \\ Momiji Bank & second-tier regional & 62 & 8 & 0.044499 \\ Taiko Bank & second-tier regional & 62 & 7 & 0.044499 \\ Kirayaka Holdings & second-tier regional & 46 & 8 & 0.034558 \\ \hline \end{tabular} \end{table} \begin{table}[hbtp] \caption{Major Nodes of Community 1 in 2015} \label{table:MN2015Comm1} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline Bank of Minami Nippon & second-tier regional & 67 & 1 & 0.071720 \\ Taiko Bank & second-tier regional & 67 & 1 & 0.071720 \\ Mizuho Bank & major commercial & 69 & 18 & 0.062541 \\ MUFG Bank & major commercial & 69 & 17 & 0.062376 \\ Resona Bank & major commercial & 69 & 10 & 0.060364 \\ Momiji Bank & second-tier regional & 51 & 8 & 0.054483 \\ Sumitomo Mitsui Trust Bank & trust & 67 & 15 & 0.053086 \\ MU Trust and Banking & trust & 67 & 12 & 0.053086 \\ Mizuho Trust and Banking & trust & 67 & 8 & 0.053086 \\ Kirayaka Holdings & second-tier regional & 16 & 9 & 0.018744 \\ \hline \end{tabular} \end{table} \begin{table}[hbtp] \caption{Major Nodes of Community 2 in 2015} \label{table:MN2015Comm2} \centering \begin{tabular}{lcccc} \hline bank name & bank category & in-degree & out-degree & PageRank \\ \hline \hline Fukui Bank & leading regional & 39 & 9 & 0.174540 \\ Bank of Yokohama & leading regional & 27 & 13 & 0.038477 \\ Snisei Bank & major commercial & 21 & 13 & 0.018963 \\ Chugoku Bank & leading regional & 17 & 9 & 0.018485 \\ Hokkoku Bank & leading regional & 14 & 2 & 0.016412 \\ Aozora Bank & major commercial & 16 & 11 & 0.014013 \\ Gunma Bank & leading regional & 7 & 11 & 0.010706 \\ Shizuoka Bank & leading regional & 5 & 13 & 0.004579 \\ Chukyo Bank & second-tier regional & 6 & 1 & 0.001916 \\ Tomato Bank & second-tier regional & 6 & 1 & 0.001916 \\ \hline \end{tabular} \end{table} \begin{comment} \end{comment} \begin{acknowledgements} This study was funded by the Ministry of Education, Science, Sports, and Culture (Grants-in-Aid for Scientific Research (B), Grant No. 17KT0034. \end{acknowledgements} \section*{Conflict of interest} On behalf of all authors, the corresponding author states that there is no conflict of interest.
\section{Introduction} The arrays of Josephson junctions, either in superconducting or nonlinear-optical systems, have been very successful in the development of technical applications. Three types of time periodic states have been studied in series arrays of Josephson Junctions: in-phase states (or locked-phase junctions), splay states (with the phases of the junctions evenly distributed), and incoherence states (with nonuniform distribution of junction phases) \cite{Watanabe1994}. Equivalent states have also been found in the related systems of globally coupled (discrete) Ginzburg-Landau equations \cite{Hakim1992}. As far as we know, only the first type of such stationary states, having locked-phase junctions, have been explored within the scope of bosonic Josephson junctions made by arrays of coupled Bose-Einstein condensates (BECs). This situation may derive from the fact that these systems lack in general the global-coupling arrangement of junctions used in superconductors or optics. Instead, BECs are usually connected by the next-neighbor coupling established through the barriers of optical-lattice potentials operating in a tight binding regime \cite{Morsch2006}. Ultimately, both configurations, next-neighbor and global coupling, can be considered as limit cases of linear coupling with different spatial ranges \cite{Zou2009}. The Josephson effect was soon realized in ultracold-gas experiments \cite{Smerzi2003,Albiez2005,Levy2007}, addressing mainly phenomena associated with single and short Josephson junctions. Regarding extended junctions, special theoretical attention has been paid to systems of two linearly coupled one-dimensional (1D) BECs, which configure a single long bosonic Josephson junction. Beyond the symmetric and anti-symmetric uniform states typical of the point-like junction in a double-well potential, many works have focused on the stationary nonlinear waves known as Josephson vortices \cite{Kaurov2005,Kaurov2006,Brand2009,Qadir2012a,Montgomery2013, Gallemi2016,Sophie2018}, which have been recently observed in experiments \cite{Schweigler2017}. Concerning the study of junction arrays, up to date only the arrays of point-like Josephson junctions have been experimentally realized \cite{Cataliotti2001}. Theoretically, particular features of the arrays of long Josephson junctions have been explored, ranging from the superfluid-insulator transition \cite{Cazalilla2006}, the motion of bright solitons \cite{Blit2012}, the exotic phases in the presence of gauge fields \cite{Budich2017}, the stabilization of sets of localized dark solitons and Josephson vortices \cite{Baals2018}, or the generation of transverse Josephson vortices \cite{Gil2019}. \begin{figure}[tb] \centering \includegraphics[width=0.9\linewidth]{schema.jpg} \caption{Array of five parallel, linearly coupled elongated BECs with order parameters $\Psi_j(x,t)=\sqrt{n_j(x,t)}\exp{[i\Theta_j(x,t)]}$, and $j=0,\,1,\,2,\,3,\,4$. The condensates form a ring configuration by means of a next-neighbor coupling (symbolically represented by the wired cylinder) of energy $\hbar\,\Omega/2$ along their whole axial length. The coupling expands azimuthally a discrete transverse dimension $y$ of effective distance $\delta y=\sqrt{\hbar/m\Omega}$ between condensates.} \label{fig:schema} \end{figure} In this work, we consider arrays of long-bosonic Josephson junctions that are brought about by the stack of linearly-coupled elongated BECs. The junctions are described through the relative phases of next-neighbor condensates, and their dynamics is studied within the Gross-Pitaevskii theory. Our center of interest is the existence and stability of array states whose junctions have no locked relative phases. On the one hand, we show that there exist a set of stationary states, living just at the middle of the discrete energy band, that, in spite of sharing energy and density profile with the Bloch waves, break their locked relative phase. Dynamically stable states of this type can be found at high coupling, hence they are relevant for experimental realization. Furthermore, we also find steady, stable configurations with striped density profiles and unlocked relative phases that break the translation symmetry of the equations of motion. On the other hand, we address the dynamics of maximally out-of-phase states that in this way mimic the splay states in globally coupled junctions. Although stationary states of this type cannot be found in next-neighbor coupling arrangements, we show how these states evolve through oscillations of the uniform density of the condensates that preserve the total density constant against noise at low coupling. Different decay scenarios of unlocked-relative-phase states that involve the emergence of dark and bright solitons, and localized Josephson currents, demonstrating the interplay of transverse and axial dynamics, are discussed. \section{Array of coupled elongated BECs} Figure ~\ref{fig:schema} shows the prototypical arrangement of the considered arrays. In this example, the system is made of $M=5$ elongated BECs linearly coupled along their common axial $x$-direction, forming a ring-shaped array. A linear coupling of energy $\hbar\Omega/2$ connects next-neighbor components and determines an effective transverse distance $\delta y =\sqrt{\hbar/m\Omega}$ between them. Along the axial direction, the interparticle interaction defines a healing length $\xi=\hbar/\sqrt{m\,g\,n}$, where $n$ is a characteristic axial atomic density of the BEC, $g>0$ is the contact-interaction strength, and $m$ is the atomic mass. The ratio $\nu\equiv(\xi/\delta y)^2 =\hbar\Omega/gn$ regulates the amount of particle tunneling across the condensate junctions. As it has been recently proposed \cite{Budich2017,Baals2018}, such a system is feasible to experimental realization with ultra-cold gases loaded in optical lattices. Within a mean field approximation at zero temperature, the dynamics of an $M$-condensate array follows the Gross-Pitaevskii (GP) equations \begin{align} i\hbar\frac{\partial\Psi_j}{\partial t} =\left( \frac{-\hbar^2}{2m}\partial_{x}^2 + g \left\vert \Psi_j\right\vert ^{2}\right)\Psi_j - \frac{\hbar\Omega}{2} \left( \Psi_{j-1}+\Psi_{j+1}\right) \,, \label{eq:gp} \end{align} for the complex order parameters $\Psi_j(x,t)=\sqrt{n_j(x,t)}\exp{[i\Theta_j(x,t)]}$, with density $n_j(x,t)$ and phase $\Theta_j(x,t)$, of the elongated BECs $j=0,1,\dots,M-1$. The transverse dynamics inside each BEC is assumed to be frozen by means of a tight transverse confinement. For the sake of analytical treatment, we further assume translational invariance along the $x$-direction, hence no external potential enters Eq.~(\ref{eq:gp}). The Josephson dynamics in the elongated junctions separating the BECs will be described through the relative phases $\varphi_j(x,t)=\Theta_{j+1}(x,t)-\Theta_j(x,t)$ and relative densities $\varrho_j(x,t)=n_{j+1}(x,t)-n_j(x,t)$. The periodic configuration along $y$ admits stationary states in the form of transverse Bloch waves with transverse quasimomentum $\hbar\mathcal{K}_k$, \begin{align} \Psi_{j,k}(x,t)=\psi(x)\,\exp{[i(\mathcal{K}_k y_j-\mu_{k} t/\hbar)]} \,, \label{eq:Bloch} \end{align} where $y_j=j\,\delta y$ represents the discrete transverse coordinate, and $\mu_k$ is the chemical potential. The quasimomentum can take only $M$ different integer values within the first Brillouin zone $\mathcal{K}_k={2\pi\,k}/{M \delta y}$ with $k\in\left\lbrace 0,\,\pm 1,\,\pm 2,\dots,\floor{{M}/{2}}\right\rbrace$, where $\floor{{M}/{2}}$ is the greatest integer less than or equal to $M/2$. As a result $\mu_k$ takes values within a discrete energy band of width $2\hbar\Omega$, limited by the minimum and maximum values of $k$. The axial wave function $\psi(x)$ entering Eq. (\ref{eq:Bloch}) can be whatever stationary solution of Eqs. (\ref{eq:gp}) at zero coupling $\Omega=0$ \cite{Carr2000}. The simplest case is the state with uniform density $n$ and definite axial momentum $\hbar \mathcal{K}_x$, as $\Psi_{j,k}(x,t)=\sqrt{n}\,\exp{[i(\mathbf{k\cdot r}_j-\mu_\mathbf{k} t/\hbar)]}$, where $\mathbf{k\cdot r}_j=\mathcal{K}_x \,x+\mathcal{K}_k y_j$ are the time-independent phases, and $\mu_\mathbf{k} = g n + {\hbar^2 \mathcal{K}_x^2}/{2m}- \hbar\Omega \cos(\mathcal{K}_k \delta y)$. All the Bloch states with constant density are dynamically stable if $k\leq M/4$, irrespective of the coupling $\Omega$ \cite{Gil2019}. \begin{figure}[tb] \centering \vspace{.5cm} \includegraphics[width=\linewidth]{M4phase.pdf} \caption{BEC phases $\Theta_j=\arg(\Psi_j)$ (circles) and relative phases $\varphi_j=\Theta_{j+1}-\Theta_j$ (triangles), at $t=0$ and $x=0$, of a $M=4$ array in a Bloch wave with $k=1$ (top panel), in an incoherent state (middle panel) and in an out-of-phase state (bottom panel), sharing the same chemical potential $\mu_1=g n+\hbar^2\mathcal{K}_x^2/2m$, independently of the value of the linear coupling $\Omega$. } \label{fig:M4Bphase} \end{figure} In a generic Bloch state, for a given time and a fixed axial position, the phases of the BEC components of quasimomentum $\mathcal{K}_k$ are uniformly separated $\Theta_j(x,t)=2\pi k j/M+\Theta(x,t)$, so that the relative phases $\varphi_j=2\pi k /M$, $\forall\, j$, are locked everywhere and for every time. The top panel of Fig.~\ref{fig:M4Bphase} shows schematically this fact for a $M=4$ array in a dynamically stable, uniform Bloch wave with $k=1$, just at the middle of the discrete energy band. The BEC phases of the array $\Theta_j(t=0)=[0,\frac{\pi}{2},\pi,\frac{3\pi}{2}]$ (circles in the left chart), and the relative phases $\varphi_j=[\frac{\pi}{2},\frac{\pi}{2},\frac{\pi}{2},\frac{\pi}{2}]$ (triangle in the right chart) are represented on the unit circle, in a phasor diagram. Interestingly, along with the Bloch waves, there exist alternative stationary states sharing axial wave function, but breaking the monotonic variation of the phase across the array. As we show below, they are degenerate with the corresponding Bloch wave living just at the middle of the energy band. These states exist by virtue of the discrete nature of the system, since equivalent states sharing energy and density profile with the Bloch waves can not exist in continuous periodic potentials. The middle and bottom panels of Fig.~\ref{fig:M4Bphase} depict stationary configurations of the array phases belonging to this set. We will generically refer to the states of this set as unlocked-relative-phase states, in contrast to the locked relative phases of the Bloch waves. \section{Locked- and unlocked-relative-phase states} \subsection{Stationary states} \label{sec:steady} The Bloch waves situated just at the middle of the energy band, that is with $k=M/4$ (as the case shown in Fig. \ref{fig:M4Bphase}), present $\frac{\pi}{2}$ relative phases that add to ${\pi}$ phase jumps between second-neighbor condensates. This fact cancels the coupling dependence in the GP Eq.~(\ref{eq:gp}), since $\Psi_{j+1}+\Psi_{j-1}=0$, and thus in the chemical potential, e.g. for uniform states $\mu_{M/4} = g n+\hbar^2\mathcal{K}_x^2/2m$. The resulting configuration resembles features of splay states in globally coupled oscillators \cite{Hakim1992}, which in turn model Josephson-junction arrays \cite{Watanabe1994}. There, the splay states are characterized by oscillator phases that add to neutralize the coupling. To do so, the phases are maximally out of phase, evenly distributed around the unit circle in a phasor diagram, and their existence is accompanied by a high degeneracy induced by the all-to-all coupling. Although in the setup considered here the nearest-neighbor connection imposes a more restricted scenario, the neutralization of the coupling term in GP equation (\ref{eq:gp}) leads also to new degenerate stationary states. In canceling the coupling, the condensate phases and the relative phases in a Bloch wave with $k=M/4$ fulfill \begin{align} \Theta_{j+1}(x)-\Theta_{j-1}(x)=\varphi_j+\varphi_{j-1}=\pi \,. \end{align} This precise configuration allows us to introduce an extra degree of freedom, a phase $\Delta \varphi$ that modifies neither the energy nor the chemical potential of the system when added to every second component, so that \begin{equation} \begin{aligned} \varphi_j=\frac{\pi}{2}+\Delta \varphi,\\ \varphi_{j-1}=\frac{\pi}{2}-\Delta \varphi. \end{aligned} \label{eq:deltaphi} \end{equation} The arbitrary phase $\Delta \varphi \in [-\frac{\pi}{2},\frac{\pi}{2}]$ can be added to and subtracted from the relative phases of consecutive junctions to get a new, degenerate stationary state. In this way the relative phases of the array, which are locked for the Bloch wave, become unlocked without energy cost. This degeneracy reflects the symmetry of the short range coupling between condensates. Simultaneously, the Josephson current $\mathcal{J}_j= \Omega \sqrt{n_j n_{j+1}}\,\sin \varphi_j$ flowing between components $j$ and $j+1$, which measures the particle tunneling through the junctions, is reduced by a factor $\cos(\Delta \varphi)$ with respect to the phase-locked configuration. Note that the condensate phases resulting from Eq.~ (\ref{eq:deltaphi}) are in general not uniformly distributed in a phasor diagram, which corresponds to a diagram of the so-called incoherent states \cite{Watanabe1994}. The set of stationary states generated by the operation given in Eq.~ (\ref{eq:deltaphi}) can only be found in arrays whose number of components $M$ is a multiple of four, where the Bloch wave with $k=M/4$ exists. The simplest state of this type appears in an system with $M=4$. For instance, from a uniform Bloch wave with $k=1$, new steady configurations can be chosen as $\Theta_j(x)=\mathcal{K}_x\,x+[0,\frac{\pi}{2}-\Delta \varphi,\pi,\frac{3\pi}{2}-\Delta \varphi]$, and the relative phases read $\varphi_j=[\frac{\pi}{2}-\Delta \varphi,\frac{\pi}{2}+\Delta\varphi,\frac{\pi}{2}-\Delta \varphi,\frac{\pi}{2}+\Delta\varphi]$. In particular, for $\Delta\varphi=\pi/2$ one gets a stationary configuration with $\Theta_j(x)= \mathcal{K}_x\,x+[0,0,\pi,\pi]$ and $\varphi_j=[0,\pi,0,\pi]$, which is represented in the bottom panel of Fig. \ref{fig:M4Bphase} and that we will refer to hereafter as out-of-phase state. In this limit case the Josephson current in the array cancels. This is the maximally out of phase, stationary pattern achievable in the relative phase diagram of a system with nearest-neighbor coupling. For higher-$M$ arrays, the same phase pattern can be found repeated in out-of-phase stationary states that are degenerate with the Bloch wave of $k=M/4$, that is $\Theta_j(x)=\mathcal{K}_x\,x+[0,0,\pi,\pi,0,0,\pi,\pi,\dots]$, and $\varphi_j=[0,\pi,0,\pi,0,\pi,0,\pi,\dots]$. These phase patterns reflect the configurations associated with the boundary of the Brillouin zone in a supercell structure with double period. They can also be seen as the phases induced by a train of transverse dark solitons whose nodes are located at every other junction of the array. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{oof_soliton3.pdf} \caption{Unlocked-relative-phase soliton train in an array of $M=4$ condensates. The BEC densities $n_j$ (top panel) and the Josephson currents $\mathcal{J}_j$ (middle panel) are given in arbitrary units. As for the BEC phases (bottom panel), they produce the position-independent set of relative phases $\varphi_j=[\frac{\pi}{2}-\Delta \varphi,\frac{\pi}{2}+\Delta\varphi,\frac{\pi}{2}-\Delta \varphi,\frac{\pi}{2}+\Delta\varphi]$, with $\Delta\varphi=-\pi/4$. The chemical potential $\mu=2.64\,gn$ (see text) is independent of the coupling. The length is measured in units of $0.45\,\xi$. } \label{fig:soliton3} \end{figure} The set of unlocked-relative-phase states includes also non-uniform configurations. As example, we present a family of states composed of trains of unlocked-relative-phase solitons that provide a periodic density profile or striped density. As in the uniform case, the soliton phases cancel the coupling terms in the equations of motion (\ref{eq:gp}), therefore the chemical potential is independent of $\Omega$. Figure \ref{fig:soliton3} depicts the steady configuration of these solitons in a finite system of axial length $L=12.5\,\xi$ (with periodic boundary conditions) and chemical potential $\mu=2.64 \,gn$, where we have defined an average density $n=N/L$ through the number of particles $N$ in each BEC. It corresponds to an analytical solution of the sine-Jacobi type \cite{Kanamoto2009}, $\Psi_j(x)\propto \mathrm{sn}({12K} x/L,0.629) \exp{(i\Theta_j)}$ with elliptic modulus $\mathrm{m}=0.629$ and $K$ being the complete elliptic integral of the first kind. The soliton trains of all the BECs present overlapping density profiles, whereas the relative phases have been unlocked by an angle $\Delta\varphi=-\pi/4$. \subsubsection{Linear stability of uniform states} The linear stability of unlocked-relative-phase states, with uniform density $n$ and generic stationary phases $\Theta_j(x)=\mathcal{K}_x\,x+[0,\frac{\pi}{2}-\Delta \varphi,\pi,\frac{3\pi}{2}-\Delta \varphi,\dots]$, can be found from the Bogoliubov equations for the linear excitations $[u_{j}(x), v_{j}(x)]$ of energy $\mu+\hbar\,\omega$ \cite{Pitaevskii2003}: \begin{equation} \begin{aligned} H \, u_j+ \, g \, n \, e^{i2\Theta_j } v_j -\frac{\hbar\Omega}{2} \left(u_{j-1}+u_{j+1}\right) & = \hbar \omega \, u_j \,, \\ -H \, v_j - \, g \, n \, e^{-i2\Theta_j} u_j +\frac{\hbar\Omega}{2} \left(v_{j-1}+v_{j+1}\right) &= \hbar \omega \, v_j \,, \end{aligned} \label{eq:bog} \end{equation} where $H = -(\hbar^2/2m)\partial_x^2+ 2 g n -\mu$, and $\mu=\mu_{M/4} = g n+\hbar^2\mathcal{K}_x^2/2m$. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{instabilities.pdf} \caption{Dispersion of unstable modes of out-of-phase states for arrays of $M=4$ condensates in two different dynamical regimes determined by the ratio $\nu=\hbar\Omega/gn$. The curve labeled $\nu=0$, which provides the phonon spectrum at $q_x\rightarrow 0$, is common to both regimes. The high $\nu$ regime includes a branch with minimum-energy excitations, and also unstable modes, at nonzero axial momentum $q_x$, resembling features of a roton spectrum.} \label{fig:unstable} \end{figure} In the limit cases $\Delta \varphi=\pm\frac{\pi}{2}$, Eqs.~(\ref{eq:bog}) can be readily solved by making use of the Fourier expansions $ u_j(x)=\sum_{\mathbf{q}} u_{\mathbf{q}}\exp\{i[ \mathcal{K}_x\,x +q_x\,x + q_p\, y_j]\}$ and $v_j(x)=\sum_{\mathbf{q}} v_{\mathbf{q}}\exp\{-i[ \mathcal{K}_x\,x -q_x\, x -q_p\, y_j]\}$, where $q_p=2\pi p/M\delta y$ is the transverse momentum of the excitation for integer $p=0,\,\pm 1,\,\pm 2,\dots \floor{M/2}$. The Bogoliubov equations get decoupled for each two-dimensional wave number $\mathbf{q}=(q_x,q_p)$, and the resulting dispersion is \begin{align} \label{eq:dispersion} \hbar \omega &= \frac{\hbar^2\mathcal{K}_x\,q_x}{m} + \\ \pm &\sqrt{\left(\zeta_x-\hbar\Omega \cos\left(\frac{2\pi p}{M}\right)\right)\left(\zeta_x-\hbar\Omega \cos\left(\frac{2\pi p}{M}\right)+2gn\right)}, \nonumber \end{align} where $\zeta_x=\hbar^2q_x^2/2m$. The energy branches with $p<M/2$ produce imaginary frequencies $\omega$ that are associated with unstable modes. Due to their plane wave character, these modes are not localized. The maximum imaginary frequency leading the decay of the out-of-phase states depends on the ratio $\hbar\Omega\cos({2\pi p}/{M})/gn=\nu \cos({2\pi p}/{M})$. The analysis is simpler for $\mathcal{K}_x=0$. In this case, if such ratio is less than one, the maximum imaginary frequency has Im$[\hbar\omega]<gn$ and corresponds to $q_x=0$, otherwise it reaches Im$[\hbar\omega]=gn$ and corresponds to quasimomenta $q_x=\pm\sqrt{2(\nu\cos({2\pi p}/{M})-1)}/\xi$; for high coupling $\nu\gg 1$ the range of unstable modes becomes localized around the maxima (see Fig. \ref{fig:unstable}). As we show next, different decay dynamics result from each case, and the mentioned localization of the unstable modes in momentum space suggests a way to find stable steady configurations of out-of-phase states in finite systems, where the axial momentum can only take discrete values. Stability is found when the set of these discrete momenta do not sample the small ranges of unstable modes. An interesting feature of the spectrum of linear excitations at high $\nu$ is the presence of roton-like excitations. Figure \ref{fig:unstable} shows this fact in the spectrum of a uniform, out-of-relative-phase state in an array of $M=4$ condensates and $\nu=10$. Among the four energy branches, two of them are degenerated (labeled with $\nu=0$), and only one (corresponding to excitations with $p=0$) gives rise to unstable modes with pure imaginary frequencies. As previously mentioned, these unstable modes appear at nonzero axial wavenumber $q_x\neq 0$. The resulting curve of real-frequency excitations (upper panel of Fig. \ref{fig:unstable}) closely resembles the dispersion of more complex systems containing roton modes, where the roton minimum reaches the zero energy axis and the roton modes become unstable (see, e.g., the discussion in Ref. \cite{Chomaz2018} on a dipolar quantum gas). The roton instability produces exponentially-growing standing waves made of the combination of the roton modes with opposite quasimomenta. As we show later, these modes cause density modulations of the uniform configuration and recurrences of soliton trains, and also reflect the existence of stationary states with a striped-density profile. It is worth noting that this instability, determined by Eq. (\ref{eq:dispersion}), is characteristic of the simpler system of two-linearly-coupled elongated condensates forming a $\pi$ junction. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{oof_dens_nu10.png}\\ \vspace*{-0.5cm} \includegraphics[width=\linewidth]{oof_phase_nu10.png} \caption{Time evolution of an out-of-phase state with $\nu=10$ in a array of $M=4$ components. Component densities $n_j=|\Psi_j|^2$ (top panels) and phases $\Theta_j=\arg(\Psi_j)$ (bottom panels) are shown. The density is given in arbitrary units, whereas the time and length are measured in units of $5.0\,\hbar/gn$ and $0.45\,\xi$, respectively. } \label{fig:oof_nu10} \end{figure} \subsubsection{Dynamics} We report on the typical dynamics of out-of-phase states by numerically solving the GP Eqs.~\ref{eq:gp} for an array of $M=4$ condensates. As has been shown in the linear analysis, the ratio $\nu=\hbar\Omega/gn$ determines the conditions for the stability of the system, and only the branch $p=0$ of Eq.~(\ref{eq:dispersion}) produces unstable modes. To demonstrate this fact, we have selected three case examples with $\nu=$ 0.5, 10, and 22, that represent respectively different dynamical regimes. In all of them, the system is constrained to evolve in an axially finite domain of length $L=17.9\, \xi$ and periodic boundary conditions. A white noise perturbation has been added to the initial stationary state in order to simulate a more realistic scenario. The out-of-phase state is dynamically stable for $\nu=22$ since the unstable frequencies predicted by Eq.~(\ref{eq:dispersion}) occur for axial momenta (around $q_x=\pm6.48/\xi$) that are not sampled by the momenta $k=2\pi/L\times n=0.35/\xi\times n$, for integers $n$, determined by the finite system. For the given axial length, there are in fact many other instances of coupling above $\nu\approx 17.8$ that provide stability, e.g., systems with $\nu=19.9,\, 22,\, 24.5$ or 27 are equally stable. Our results of the nonlinear time evolution of the array in the presence of initial noise (not shown here because of their flat, uniform density and phase profiles) confirm the linear analysis. In this way, the dynamical stability of these systems makes it possible their experimental realization. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{soliton12_t50.pdf} \caption{Transient staggered solitons during the emergence of the stripe phase in the evolution of the out-of-phase state presented in Fig. \ref{fig:oof_nu10}. At the junction between condensates $j=1$ and $j=2$, consecutive, counter-rotating loop currents are centered at the zeros of the Josephson current $\mathcal{J}_1$ and $\mathcal{J}_3$. The loops are closed by condensate axial currents, and their direction is reversed in the next soliton recurrence. Time, length and densities are given in the same units of Fig. \ref{fig:oof_nu10}, whereas current is given in arbitrary units. } \label{fig:current} \end{figure} However, for smaller coupling values, at $\nu=$10, and $\nu=$0.5, the instability cannot be prevented, and the out-of-phase configurations decay during the time evolution. An observable common feature, as can be seen in Figs. \ref{fig:oof_nu10} and \ref{fig:oof_nu05}, is the synchronous pattern shown by both densities and phases of different BECs. Interestingly, for initially in-phase components, they subsequently exhibit {\it in-phase} dynamics. The emergence of these synchronous patterns are due to the coupling in between BECs under highly symmetric arrangements of the arrays. The vanishing relative phases, apart from the perturbative noise, preclude significant Josephson currents that could break this synchronous pattern. Nevertheless, the system dynamics presents notable differences in both cases of coupling. For $\nu=$10, Fig. \ref{fig:oof_nu10} shows a quasi-periodic time evolution during which trains of solitons emerge in the axial direction of each component, breaking temporarily the uniformity of the $\pi$ relative phases and creating localized Josephson loop currents, and vanish, returning the array to its initial configuration. The number of solitons is given by the standing waves created with the wavenumbers $q_x=\pm 4.2/\xi$ of the only two unstable frequencies (for this coupling strength). The solitons are staggered in the condensates with $\pi$ relative phase, which form trains of dark-bright solitons when the condensates are combined (see Fig. \ref{fig:current}). As a result, the total density profile of the system shows stripes of high contrast. The dark-bright sequence and also the Josephson loop currents are reversed with each new recurrence. The time recurrences of the solitons, thus of the striped state, suggest that this configuration is also dynamically unstable for the parameters considered here, as it also happens in similar types of modulation instability \cite{Kuznetsov2017}. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{oof_dens_nu05.png}\\ \vspace*{-0.5cm} \includegraphics[width=\linewidth]{oof_phase_nu05.png} \caption{Same as Fig. \ref{fig:oof_nu10} for an out-of-phase state with $\nu=0.5$. } \label{fig:oof_nu05} \end{figure} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{unlock_dens_nu10.png}\\ \vspace*{-0.5cm} \includegraphics[width=\linewidth]{unlock_phase_nu10.png} \caption{Same as Fig. \ref{fig:oof_nu10} for an unlocked-phase state with $\Delta\varphi=\pi/4$ and $\nu=10$. } \label{fig:unlock_nu10} \end{figure} At low $\nu$ the decay of out-of-phase states is characterized by the presence of several unstable modes whereby a quasiperiodic behavior cannot not reached. The interaction of unstable modes produces complicated scenarios that can soon give rise to chaotic dynamics. An example is shown in Fig. \ref{fig:oof_nu05} for $\nu=0.5$, where a few moving solitons and unsteady localized Josephson currents can be seen to emerge and interact within the array components. After this, the axial and transverse dynamics of the array are strongly coupled and the evolution increases progressively in complexity. The dynamical regimes of generic unlocked-phase states with $\Delta\varphi<|\pi/2|$ do not present significant differences with respect to those shown for out-of-phase states. For detailed comparison, Fig. \ref{fig:unlock_nu10} shows the time evolution of an unlocked-relative-phase state with $\Delta\varphi=\pi/4$ and $\nu=10$, sharing the rest of parameters with the out-of-phase state of Fig. \ref{fig:oof_nu10}. In this case, the recurrences of the soliton trains present lower contrast and occurs at higher rate. Curiously, the synchronous pattern is only clearly observable between second-neighbor condensates with initial $\pi$ relative phases. This is partly due to the fact that for these second-neighbor condensates, their equations of motion Eqs. (\ref{eq:gp}) share the same coupling terms. In addition, consecutive solitons in the soliton trains of component $j=0$ and $j=2$ evolve through merging, or alternatively splitting, in order to produce new, reversed staggered configurations \begin{figure}[t] \centering \includegraphics[width=\linewidth]{soliton12.pdf} \caption{Stationary staggered solitons in an array of $M=4$ BECs with same parameters as the system of Fig. \ref{fig:oof_nu10}. Contrary to the transient configuration shown in Figs. \ref{fig:oof_nu10} and \ref{fig:current} there is no Josephson current here. } \label{fig:soliton12} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.85\linewidth]{M11phase.pdf}\\ \includegraphics[width=0.85\linewidth]{splay11_density.pdf}\\ \includegraphics[width=0.9\linewidth]{splayM11_d_nu1.png}\\ \vspace*{-0.5cm} \includegraphics[width=0.9\linewidth]{splayM11_p_nu1.png} \caption{Maximally-out-of-phase state in an array with $M=11$ and $\nu=1$. (a) Initial BEC phases (left) and relative phases (right). (b) Time evolution of the axial (total $n_T$ and component $n_j$) densities at two positions $x=0,\, 10$. (c) Time evolution of the densities (top) and phases (bottom) of all the components. Same units as in Fig. \ref{fig:oof_nu10} are used.} \label{fig:splay_nu1} \end{figure} \subsubsection{Striped-density states: stationary staggered solitons} The transient configurations that show striped density profiles at high coupling (see Figs. \ref{fig:oof_nu10} and \ref{fig:unlock_nu10}) suggest the existence of stationary configurations of this type. By seeding the uniform out-of-phase states with the unstable modes found in the Bogoliubov analysis, and by latter using a numerical Newton method to search for the solutions to Eqs.~(\ref{eq:gp}) with such ansatz, we have found the corresponding stationary striped-density states. They are made of out-of-phase bright solitons with staggered density profiles, in contrast to the overlapped-density dark-soliton trains presented in Sec. \ref{sec:steady}. Figure \ref{fig:soliton12} depicts an example for the same parameters and number of particles as the system evolved in Fig. \ref{fig:oof_nu10}. Note that there is no phase variation inside each condensate, and for this reason we have described the density profile as belonging to a bright-soliton train. This is a distinctive feature, since bright solitons do not appear in scalar BECs with repulsive interatomic interactions. Their appearance here can only be understood by the presence of the linear coupling arrangement, which, similarly to scalar condensates in periodic potentials, produces the change of sign in the effective mass of the particles \cite{Morsch2006}. The resulting scenario shows the emergence of a crystalline structure in the axial direction of the system without the presence of an external potential. As expected, our numerical results show (by observing the decay in a real time evolution) that this configuration is dynamically unstable for the selected coupling. However, we have also found stable configurations of this type at high coupling, which brings these states into line with the stability conditions of uniform out-of-phase states. The characteristic quantities of the stationary staggered solitons depend on the coupling. For given chemical potential, the contrast of the stripes decreases when the coupling increases, and eventually the uniform configuration of out-of-phase-states is reached. On the contrary, the density stripes get higher contrast by decreasing the coupling, which produces the generation of dark solitons. These structures finally transforms the staggered bright-soliton trains into a state of in-phase overlapped dark solitons, whose number doubles the initial number of staggered bright solitons in each condensate. \subsection{Non-stationary maximally out-of-phase junctions} For the sake of completeness, we also address the dynamics of array states whose relative phases are uniformly distributed on the phasor diagram (see Fig. \ref{fig:splay_nu1}a for an example with $M=11$). An stationary state of this type would be the analogue of the splay states in the array of globally coupled Josephson junctions \cite{Watanabe1994}. But differently to that situation, there is no such a stationary state in the array of next-neighbor-coupled BECs. Nevertheless, it is possible to statically prepare a splay state of relative phases in arrays with an odd number of BECs, and to use it as initial state in order to monitor its subsequent time evolution. To this end, one can choose among multiple settings of the BEC phases that produce static splay states in the relative phase. Although such an initial configuration generates unsteady Josephson currents in the array, the total density shows a quasi-stationary configuration in the absence of noise. This fact can be deduced from the hydrodynamical picture of Eqs. (\ref{eq:gp}), \begin{align} \frac{\partial n_j}{\partial t}+\frac{\partial n_j v_j}{\partial x}+\mathcal{J}_j-\mathcal{J}_{j-1}=0, \label{eq:mass} \\ \hbar\frac{\partial \Theta_j}{\partial t}= \frac{\hbar^2}{2m\sqrt{n_j}}\frac{\partial^2 \sqrt{n_j}}{\partial x^2}-\frac{m v_j^2}{2}-g n_j + \frac{\mathcal{E}_j + \mathcal{E}_{j-1}}{2} \,, \label{eq:momentum} \end{align} where $v_j=\hbar\partial_x \Theta_j/m$ and $\mathcal{E}_j=\hbar\Omega\sqrt{n_{j+1}/n_j}\cos\varphi_j$. Then, whenever $v_j=0$ or $\partial_x \sum n_j v_j=0$, the total density $n_T=\sum n_j$ fulfills $\partial_t n_T=0$. As a result, each array component presents an oscillatory density without axial variations while the total density is preserved. However, the presence of noise on the axial densities leads to axial currents that eventually produce the decay of the quasi-stationary configuration. As a case example, we present a maximally-out-of-phase state in an array with $M=11$ components and $\nu=1$. The relative phases are evenly separated $\varphi_{j+1}-\varphi_j= \,2\pi/11$. The panels (b) and (c) of Fig. \ref{fig:splay_nu1} shows the subsequent time evolution after adding perturbative noise to the initial configuration. Within a first stage, up to $t\approx75$, the evolution follows the same described behavior as in the absence of noise. During this stage, nonlinear density waves, carried by Josephson currents that are uniform along the axial coordinate of each component, can be seen to propagate across the array. From inspection of Eq.(\ref{eq:mass}), one can see that the velocity of propagation is proportional to $\sqrt{\hbar\Omega}$. Our results show that the duration of the quasi-stationary profile of the total density scales inversely with this velocity. In the present case, beyond $t\approx75$ the noise induces local variations of the Josephson currents between components that modify the flat density profiles. After this, the dynamics grows in complexity with time. It is worth noting that, despite the noise, the initially in-phase condensates keep synchronized density and phase profiles during a long time, of the order of the whole evolution. \section{Conclusions} The present work contributes to the characterization of the arrays of long-bosonic Josephson junctions built with linearly coupled Bose-Einstein condensates. In these systems, we have demonstrated the existence and stability conditions of extended (non-localized) states with unlocked relative phases. These states emerge from the effective cancellation of the coupling in the equations of motion of the array, which allows for a new energy degeneracy in the system (other than the usual of the Bloch waves with equal absolute value of the quasimomentum) that is conditioned by the next-neighbor coupling of the discrete array. Both uniform-density and dark-soliton-train states have been studied as prototypical examples. Regimes of stability, of quasiperiodic recurrence of striped density, and of complex, chaotic dynamics have been found depending on the ratio of coupling to interaction energy; and higher ratios favor stability. The typical decay dynamics of these states shares features with other modulation instabilities, proceeding through the condensate density variation according to the growth of standing waves created by unstable modes. Simultaneously, trains of counter-rotating Josephson loop currents centered at the junctions play equivalent role to that of regular vortex dipoles created at the nodal lines of dark solitons in continuous systems. The Bogoliubov analysis of linear excitations have allowed us to determine the unstable modes of uniform states, and use them in the search of new stationary configurations with a striped-density profile. In doing so, and despite the respulsive character of the interatomic interactions considered, we have demonstrated the existence of staggered, stationary out-of-phase trains of bright solitons. By varying the linear coupling at fixed chemical potential, the family of these states evolves either through the generation of dark solitons (for decreasing coupling) or through the reduction of the density stripes (for increasing coupling). Consequently, it provides a bridge connecting the family of in-phase, overlapped dark solitons with the family of uniform out-of-phase states. Finally, we have explored the preparation and dynamics of maximally out-of-phase states, which mimic the splay states in globally coupled junctions. Although the next-neighbor connection of the BECs do not allow for such stationary configurations, the prepared states evolve, in the absence of noise, in a quasi-stationary configuration that keeps constant the total density of the system, while the internal dynamics show large oscillations of the BEC densities. Our results show that low coupling regimes ($\nu\ll 1$) provide quasi-stationary states of this type which are robust against noise.
\section{Introduction} \paragraph{Motivation and problem} Commonsense knowledge (CSK) is a potentially important asset towards building versatile AI applications, such as visual understanding for describing images (e.g., \cite{DBLP:journals/ijcv/AgrawalLAMZPB17,DBLP:journals/pami/KarpathyF17,Shuster_2019_CVPR}) or conversational agents like chatbots (e.g., \cite{DBLP:conf/aaai/YoungCCZBH18,DBLP:conf/acl/RajaniMXS19,DBLP:conf/acl/YangLLLS19}). In delineation from encyclopedic knowledge on entities like Trump, Paris, or FC Liverpool, CSK refers to properties, traits and relations of everyday concepts, such as elephants, coffee mugs or school buses. For example, when seeing scenes of an elephant juggling a few coffee mugs with its trunk, or with school kids pushing an elephant into a bus, an AI agent with CSK should realize the absurdity of these scenes and should generate funny comments for image description or in a conversation. Encyclopedic knowledge bases (KBs) received much attention, with projects such as DBpedia~\cite{Auer:ISWC2007}, Wikidata~\cite{vrandevcic2014wikidata}, Yago~\cite{suchanek2007yago} or NELL~\cite{nell} and large knowledge graphs at Amazon, Baidu, Google, Microsoft etc. supporting entity-centric search and other services \cite{Noy:CACM2019}. In contrast, approaches to acquire CSK have been few and limited. Projects like ConceptNet~\cite{conceptnet}, WebChild~\cite{webchild}, TupleKB~\cite{TupleKB} and Quasimodo~\cite{quasimodo} have compiled millions of {\em concept: property} (or subject-predicate-object) statements, but still suffer from sparsity and noise. For instance, ConceptNet has only a single non-taxonomic/non-lexical statement about hyenas, namely, {\em hyenas: laugh a lot} \footnote{\url{http://conceptnet.io/c/en/hyena}}, and WebChild lists overly general and contradictory properties such as \emph{small, large, demonic} and \emph{fair} for hyenas\footnote{\url{https://gate.d5.mpi-inf.mpg.de/webchild2/?x=hyena\%23n\%231}}. The reason for these shortcomings is that such mundane properties that are obvious to every human are rarely expressed explicitly in text or speech, and visual content would require CSK first to extract these properties. Therefore, machine-learning methods for encyclopedic knowledge acquisition do not work robustly for CSK. Another limitation of existing CSK collections is that they organize statements in a flat, one-dimensional manner, and solely rank by confidence scores. There is no information about whether a property holds for all or for some of the instances of a concept, and there is no awareness of which properties are typical and which ones are salient from a human perspective. For example, the statement that hyenas drink milk (as all mammals when they are cubs) is valid, but it is not typical. Hyenas eating meat is typical, but it is not salient in the sense that humans would spontaneously name this as a key characteristic of hyenas. In contrast, hyenas eating carcasses is remarkable as it sets hyenas apart from other African predators (like lions or leopards), and many humans would list this as a salient property. Prior works on CSK missed out on these refined and expressive dimensions. \begin{comment} {\tt GW: example is good, but on touches on issues like degree that are never picked up later. Also, a simpler example would be better. Last but not least, the example concept should ideally be the same as the one used for illustration of our approach!!!}\\ To illustrate this, consider the statements \ex{grizzly bears eat meat} and \ex{grizzly bears eat plants} from various angles. From the \textit{degree to which these statements} apply, plants actually constitute a larger portion of Grizzly bear diet~\cite{mowat2006major}. From the \textit{salience of information}, grizzly bears hunting for meat is the much more known assertion, targeting a human fear response, and frequently portrayed in books and movies. From a third angle, \textit{remarkability}, grizzly bears eating plants is more surprising among major land carnivores. Existing single-metric scoring models cannot capture this diversity. \end{comment} The problem addressed in this work is to overcome these limitations and advance CSK collections to a more expressive stage of multi-faceted knowledge. \paragraph{Approach and contribution} This paper presents \textsc{Dice}{} (\underline{Di}verse \underline{C}ommonsense Knowl\underline{e}dge), a reasoning-based method for deriving refined and expressive commonsense knowledge from existing CSK collections. \textsc{Dice}{} is based on two novel ideas: \squishlist \item To capture the refined semantics of CSK statements, we introduce four facets of concept properties: \squishlist \item {\em Plausibility} indicates whether a statement makes sense at all (like the established but overloaded notion of confidence scores). \item {\em Typicality} indicates whether a property holds for most instances of a concept (e.g., not only for cubs). \item {\em Remarkability} expresses that a property stands out by distinguishing the concept from closely related concepts (like siblings in a taxonomy). \item {\em Saliency} reflects that a property is characteristic for the concept, in the sense that most humans would spontaneously list it in association with the concept. \end{list} \item We identify inter-related concepts by their neighborhoods in a concept hierarchy or via word-level embeddings, and devised a set of weighted soft constraints that allows us to jointly reason over the four dimensions for sets of candidate statements. We cast this approach into an integer linear program (ILP), and harness the theory of reduced cost (aka. opportunity cost) \cite{bertsimas1997introduction} for LP relaxations in order to compute quantitative rankings for each of the four facets. \end{list} As an example, consider the concepts {\em lions}, {\em leopards}, {\em cheetahs} and {\em hyenas}. The first three are coupled by being taxonomic siblings under their hypernym {\em big cats}, and the last one is highly related by being another predator in the African savannah with high relatedness in word-level embedding spaces (e.g., word2vec or Glove). Our constraint system includes logical clauses such as \squishlist \item[ ] $\text{Plausible}(s_1, p) \land \text{Related}(s_1, s_2) \land \lnot \text{Plausible}(s_2, p) \land \dots$ \item[ ] $\Rightarrow \text{Remarkable}(s_1, p)$ \end{list} where $\dots$ refers to enumerating all siblings of $s_1$, or highly related concepts. The constraint itself is weighted by the degree of relatedness; so it is a soft constraint that does allow exceptions. This way we can infer that remarkable (and also salient) statements include {\em lions: live in prides}, {\em leopards: climb trees}, {\em cheetahs: run fast} and {\em hyenas: eat carcasses}. The paper's salient contributions are: \squishlist \item We introduce a multi-faceted model for CSK statements, comprising the dimensions of plausibility, typicality, remarkability and saliency. \item We model the coupling of these dimensions by a soft constraint system, and devise effective and scalable techniques for joint reasoning over noisy candidate statements, \item Experiments, with inputs from large CSK collections, ConceptNet, TupleKB and Quasimodo, and with human judgements, show that \textsc{Dice}{} achieves high precision for its multi-faceted output. The resulting commonsense knowledge bases contain more than 1.6m statements about 74k concepts, and will be made publicly available. \end{list} \section{Related Work} \paragraph{Manually compiled CSK} In 1985, Douglas Lenat started the Cyc~\cite{lenat1995cyc} project, with the goal of compiling a comprehensive machine-readable collection of human knowledge into logical assertions. The project comprised both encyclopedic and commonsense knowledge. The parallel WordNet project \cite{wordnet} organized word senses into lexical relations like synonymy, antonymy, and hypernymy/hyponymy (i.e., subsumption). The latter can serve as a taxonomic backbone for CSK, but there are also more recent alternatives such as WebIsALOD \cite{HertlingPaulheim:ISWC2017} derived from Web contents. ConceptNet extended the Cyc and WordNet approaches by collecting CSK triples from crowdworkers, for about 20 high-level properties~\cite{conceptnet}. It is the state of the art for CSK. The most popular knowledge base today, Wikidata~\cite{vrandevcic2014wikidata}, contains both encyclopedic knowledge about notable entities and some CSK cast into RDF triples. However, the focus is on individual entities, and CSK is very sparse. Most recently, ATOMIC~\cite{atomic} is another crowdsourcing project compiling knowledge about human activities; relative to ConceptNet it is more refined but fairly sparse. \paragraph{Web-extracted CSK} Although handcrafted CSK collections have reached impressive sizes, the reliance on human inputs limits their scale and scope. Automatic information extraction (IE) from Web contents can potentially achieve much higher coverage. Compared to general IE, extracting CSK is still an underexplored field. The WebChild project \cite{webchild,Tandon:ACL2017} extracted more than 10 million statements of plausible object properties from books and image tags. However, its rationale was to capture each and every property that holds for some instances of a concept; consequently, it has a massive tail of noisy, puzzling or invalid statements. TupleKB~\cite{TupleKB} from the AI2 Lab's Mosaic project is a more focused approach to automatic CSK acquisition. It contains ca. 280k statements, specifically for 8th-grade elementary science to support work on a multiple-choice school exam challenge \cite{DBLP:journals/cacm/SchoenickCTTE17}. It builds on similar sources as WebChild, but prioritizes precision over recall by various cleaning steps incl. a supervised scoring model. Quasimodo~\cite{quasimodo} is a recent CSK collection, built by extraction from QA forums and web query logs, with about 4.6 million statements. Although it combines multiple cues into a regression-based corroboration model for ranking and aims to identify salient statements, the model merely learns a single-dimensional notion of confidence. Common to all these projects is that their quantitative assessment of CSK statements is focused on a single dimension of confidence or plausibility. There is no awareness of other facets like typicality, remarkability and saliency. \paragraph{Latent representations} Latent models have had great impact on natural language processing, with word embeddings like word2vec \cite{mikolov2013distributed}, GloVe~\cite{pennington2014glove} and BERT~\cite{devlin2019bert} capturing signals from huge text corpora. These embeddings implicitly contain some kind of CSK by the relatedness of word-level or phrase-level vectors or more advanced representation. For example, the typical habitats for camels can be predicted to be deserts, based on the latent representations. Embeddings have been leveraged for tasks like commonsense question answering \cite{commonsenseqa} and knowledge base completion (e.g., \cite{bosselut2019comet}). However, the latent nature of these models makes it difficult to interpret what specific knowledge is at work and explain this to the human user. Moreover, they typically involve a complete end-to-end training cycle for each and every use case. Explicit CSK collections are much better interpretable and more easily re-usable for new applications. \paragraph{Joint reasoning} Consolidating statements from automatic IE is an important part of KB construction, and several frameworks have been pursued for encyclopedic knowledge, including probabilistic graphical models of different kinds (e.g., \cite{DBLP:series/synthesis/2009Domingos,nell,DBLP:journals/pvldb/WickMM10,pujara2013knowledge,shin2015incremental}, constraint-based reasoning (e.g., \cite{suchanek2009sofie,DBLP:conf/emnlp/SrikumarR11}), and more. All these methods solve optimization problems to accept or reject uncertain candidate statements with specified or learned constraints so as maximize a combination of statistical evidence and satisfaction of soft constraints. \paragraph{Knowledge representation} Current CSKBs merely use a single score that represents the frequency of or confidence in a binary-relation statement. Beyond binary relations, epistemic logics would be able to express refined modalities such as possibly and necessarily. Temporal logics can model whether statements are valid always, eventually or sometimes \cite{ozaki2018happy}, and spatial data models can capture location information about entities and events~\cite{abraham1999survey}. The need to contextualize binary relations has been noted in encyclopedic KBs. Yago introduced the notion of SPOTLX tuples to capture time, location and textual dimensions~\cite{yago2,yahya2016relationship}, DBpedia used reification to store provenance information~\cite{hellmann2009dbpedia}, and Wikidata comes with a range of temporal, spatial, and other contextual qualifiers~\cite{patelcontextualization}. For CSKBs this level of refinement has not been considered yet. In KG embeddings, Chen et al.\ studied models for retaining graded truth values, termed confidence, instead of binary truth values, in inputs and outputs of embedding models~\cite{chen2019embedding}. However, this is limited to a single dimension, and does not capture the different facets addressed in this paper. \section{Multi-Faceted CSK Model} We consider simple CSK statements of the form $(s,p)$, where $s$ is a concept and $p$ is a property of this concept. To be in line with established terminology, we refer to $s$ as the subject of the statement. Typically, $s$ is a crisp noun, such as {\em hyenas}, while $p$ can take any multi-word verb or noun phrase, such as {\em laugh a lot} or {\em (are) African predators}. Unlike prior works, we do not adopt the usual subject-predicate-object triple model. We do not distinguish between predicates and objects for two reasons:\\ (i) The split between predicate and object is often arbitrary. For example, for $lions: live~in~prides$, we could either consider {\em live} or {\em live in} as predicate and the rest as object, or we could view {\em live in prides} as a predicate without any object. \\ (ii) Unlike encyclopedic KBs where a common set of predicates can be standardized (e.g., {\em date of birth}, {\em country of citizenship}, {\em award received}), CSK is so diverse that it is virtually impossible to agree on predicate names. For example, we may want to capture both {\em prey on antelopes} and {\em hunt and kill antelopes}, which are highly related but not quite the same. Projects like ConceptNet and WebChild have organized CSK with a fixed set of pre-specified predicates, but these are merely around 20, and, when discounting taxonomic (e.g., type of) and lexical (e.g., synonyms, related terms) relations, boil down to a few basic predicates: {\em used for}, {\em capable of}, {\em location} and {\em part of} (plus a generic kind of {\em has property}).\\ We summarize important notation in Table~\ref{tab:notation}. \begin{table} \centering \begin{tabular}{lp{5.5cm}} \toprule Term & Meaning \\ \midrule CSK statement & pair $(s,p)$ of subject $s$ (concept) and property $p$ (textual phrase)\\ CSK dimensions & plausibility, typicality, remarkability, saliency\\ Soft constraints & Relationships between dimensions of a statement and/or taxonomically related concepts\\ Taxonomy & Noisy \textit{is-a} organization of subject concepts\\ Clause & A grounding, i.e., concrete instantiation of a rule\\ $\omega_r,\omega_s,\omega_e$ & Parameters for weighing clauses\\ Cues & Input signals for estimating prior scores \\ Prior scores & Initial estimates of dimension values for a statement (i.e., before reasoning), denoted as $\pi, \tau, \rho, \sigma$ and computed from cues via regression \\ \bottomrule \end{tabular} \caption{Important notation.} \label{tab:notation} \end{table} \subsection{CSK Dimensions} We organize concept-property pairs along four dimensions: plausibility~\cite{webchild,mishra2017domain}, typicality~\cite{conceptnet}, remarkability (information theory) and saliency~\cite{quasimodo}. These are meta-properties; so each $(s,p)$ pair can have any of these labels and multiple labels are possible. For each statement and dimension label, we compute a score and can thus rank statements for a concept by their plausibility, typicality, remarkability or saliency. \squishlist \item \emph{Plausibility:} Is the property valid at least for some instances of the concept, for at least some spatial, temporal or socio-cultural contexts? For example, lions drink milk at some time in their lives, and some lions attack humans. \item \emph{Typicality:} Does the property hold for most (or ideally all) instances of the concept, for most contexts? For example, most lions eat meat, regardless of whether they live in Africa or in a zoo. \item \emph{Remarkability:} What are specific properties of a concept that sets the concept apart from highly related concepts, like taxonomic generalizations (hypernyms in a concept hierarchy)? For example, lions live in prides but not other big cats do this, and hyenas eat carcasses but hardly any other African predator does this. \item \emph{Saliency:} When humans are asked about a concept, such as {\em lions}, {\em bicycles} or {\em rap songs}, would a property be listed among the concept's most notable traits, by most people? For example, lions hunt in packs, bicycles have two wheels, rap songs have interesting lyrics and beat (but no real melody). \end{list} \paragraph{Examples} Refining CSK by the four dimensions is useful for various application areas, including language understanding for chatbots, as illustrated by the following examples: \begin{enumerate} \item Plausibility helps to avoid blunders by detecting absurd statements, or to trigger irony. For example, a user utterance such as ``When too many people shot selfies with him, the lion king in the zoo told them to go home'' should lead to a funny reply by the chatbot (as lions do not speak). \item Typicality helps a chatbot to infer missing context. For example, when the human talks about ``a documentary which showed the feeding frenzy of a pack of hyenas'', the chatbot could ask ``what kind of carcass did they feed on?'' \item Remarkability can be an important signal when the chatbot needs to infer which concept the human is talking about. For example, a user utterance ``In the zoo, the kids where fascinated by a spotted dog that was laughing at them'' could lead to chatbot response like ``So they like the hyenas. Did you see an entire pack?'' \item Saliency enables the chatbot to infer important properties when a certain concept is the topic of a conversation. For example, when talking about lions in the zoo, the bot could proactively ask ``Did you hear the lion roar?'', or ``How many lionesses were in the lion king's harem?'' \end{enumerate} \begin{comment} \paragraph{User view}\\ {\tt\color{red} GW: I see the good intention behind this part, but the message is not convincing IMO. I suggest dropping this.}\\ To gain insight on how well the four dimensions are human-interpretable, we performed a crowdsourced study, presenting workers with pairs of CSK statements and asking them for judgements on which of the two statements is more typical, more remarkable and more salient. The results, where among three judges, there was a clear preference for one of the two statements, are shown in Table~\ref{tab:agreement}. From a total of 650 assessed pairs, ..... ?????\\ {\tt\color{red} GW: are these numbers really good? they look not so compelling to me!? perhaps better leave this out!}\\ Based on these judgements, we computed the degree of correlation between typicality, remarkability and saliency. Table~\ref{tab:independence} shows the results: the relatively low values of rank correlation indicates that these three dimensions are somewhat orthogonal and thus are all useful to capture as CSK.\\ {\tt\color{red} GW: 0.5 or 0.6 are still fairly high, aren't they?????}\\ \begin{table} \centering \begin{tabular}{ll} \toprule Dimensions & Kendall's $\tau$ \\ \midrule Typical / Salient & 0.6507 \\ Typical / Remarkable & 0.5317 \\ Salient / Remarkable & 0.5600 \\ \bottomrule \end{tabular} \caption{Rank correlation between dimensions} \label{tab:independence} \end{table} \end{comment} \begin{comment} \begin{table} \centering \begin{tabular}{ll | lll} \toprule Set & Total & Typical & Salient & Remarkable \\ \midrule Validation & 520 & 296 (57\%) & 262 (50\%) & 234 (45\%) \\ Test & 130 & 84 (65\%) & 78 (60\%) & 72 (55\%) \\ \bottomrule \end{tabular} \caption{Number of pairs with high agreement among annotators by dimension \yc{TODO: perform experiments with more than 3 judgments}\\ {\tt\color{red} GW: no point here to distinguish between dev and test sets, this is just human judgements on 650 sample cases!!!!!}} \label{tab:agreement} \end{table} \end{comment} \begin{comment} One approach would be to extensively label assertions along each dimension, then build supervised models to predict scores. This approach was taken in~\cite{TupleKB}, where crowdsourcing was used to annotate 70k statements (15\% of the whole data) with precision scores. Yet this work considered only a limited domain (science), and despite this extensive annotation, precision in predicting statement correctness reached only 87\%. In this work we thus take a different approach, and instead build an unsupervised reasoning framework around five powerful components: reporting frequencies, text similarity, textual entailment, taxonomical relations, and dimension interrelations. More specifically, our \textsc{Dice}{} framework proceeds in four steps: \begin{enumerate} \item In the first step, \textit{score aggregation}, we lift frequency scores from existing CSKBs into similarity-expanded probabilistic indicators of (relative) statement support scores. \item In the second step, \textit{prior computation}, we use taxonomical relations and text entailment models to posit prior estimates for the four scoring dimensions in our model. \item In the third step, \textit{SAT-encoding}, we use carefully crafted entailment rules to formulate the joint scoring of statement sets as a Maxsat-problem. \item In the fourth step, \textit{approximate solving}, we use per-subject slicing and LP-encodings in order to compute approximate solutions to the Maxsat problem. \end{enumerate} We detail each step next. \end{comment} \section{Joint Reasoning} \paragraph{Overview} For reasoning over sets of CSK statements, we start with a CSK collection, like ConceptNet, TupleKB or Quasimodo. These are in triple form with crisp subjects but potentially noisy phrases as predicates and objects. We interpret each subject as a concept and concatenate the predicate and object into a property. Inter-related subsets of statements are identified by locating concepts in a large taxonomy and grouping siblings and their hypernymy parents together. These groups may overlap. For this purpose we use the WebIsALOD taxonomy \cite{HertlingPaulheim:ISWC2017}, as it has very good coverage of concepts and captures everyday vocabulary. Based on the taxonomy, we also generate additional candidate statements for sub- or super-concepts, as we assume that many properties are inherited between parent and child. We use rule-based templates for this expansion of the CSK collection (e.g., as lions are predators, big cats and also tigers, leopards etc. are predators as well). This mitigates the sparseness in the observation space. Note that, without the reasoning, this would be a high-risk step as it includes many invalid statements (e.g., lions live in prides, but big cats in general do not). Reasoning will prune out most of the invalid candidates, though. For joint reasoning over the statements for the concepts of a group, we interpret the rule-based templates as soft constraints, with appropriate weights. For setting weights in a meaningful way, we leverage prior scores that the initial CSK statements come with (e.g., confidence scores from ConceptNet), and additional statistics from large corpora, most notably word-level embeddings like word2vec. In this section, we develop the logical representation and the joint reasoning method, assuming that we have weights for statements and for the grounded instantiations of the constraints. Subsequently, Section \ref{sec:priorscores} presents techniques for obtaining statistical priors for setting the weights. \subsection{Coupling of CSK Dimensions} Let $\mathcal{S}$ denote the set of subjects and $\mathcal{P}$ the properties. The inter-dependencies between the four CSK dimensions are expressed by the following logical constraints. \noindent{\bf Concept-dimension dependencies:} $\forall (s, p)\in\mathcal{S}\times\mathcal{P}$ \begin{align} \text{Typical}(s, p) & \Rightarrow \text{Plausible}(s, p) \label{eq:typical_implies_plausible}\\ \text{Salient}(s, p) & \Rightarrow \text{Plausible}(s, p) \\ \text{Typical}(s, p) \wedge \text{Remarkable}(s, p) & \Rightarrow \text{Salient}(s, p) \end{align} These clauses capture the intuition behind the four facets. \noindent{\bf Parent-child dependencies:} $\forall (s_1, p)\in\mathcal{S}\times\mathcal{P}, \forall s_2\in \text{children}(s_1)$ \begin{align} \text{Plausible}(s_1, p) & \Rightarrow \text{Plausible}(s_2, p) \label{eq:plausibility_inheritance_constraint} \\ \text{Typical}(s_1, p) & \Rightarrow \text{Typical}(s_2, p) \\ \text{Typical}(s_2, p) & \Rightarrow \text{Plausible}(s_1, p) \label{eq:plausibility_inference_constraint}\\ \text{Remarkable}(s_1, p) & \Rightarrow \neg \text{Remarkable}(s_2, p) \\ \text{Typical}(s_1, p) & \Rightarrow \neg \text{Remarkable}(s_2, p) \label{eq:typical_prevents_remarkable_children} \\ \neg \text{Plausible}(s_1, p) \wedge \text{Plausible}(s_2, p) & \Rightarrow \text{Remarkable}(s_2, p) \\ \left(\forall s_2 \in \text{children}(s_1) \>\> \text{Typical}(s_2, p) \right) & \Rightarrow \text{Typical}(s_1, p) \end{align} These dependencies state how properties are inherited between a parent concept and its children in a taxonomic hierarchy. For example, if a property is typical for the parent and thus for all its children, it is not remarkable for any child as it does not set any child apart from its siblings. \noindent{\bf Sibling dependencies:} $\forall (s_1, p)\in\mathcal{S}\times\mathcal{P}, \forall s_2\in \text{siblings}(s_1)$ \begin{align} \text{Remarkable}(s_1, p) & \Rightarrow \neg \text{Remarkable}(s_2, p) \label{eq:remarkability_incompatibility_siblings_contraint} \\ \text{Typical}(s_1, p) & \Rightarrow \neg \text{Remarkable}(s_2, p) \label{eq:typical_siblings_constraint} \\ \neg \text{Plausible}(s_1, p) \wedge \text{Plausible}(s_2, p) & \Rightarrow \text{Remarkable}(s_2, p) \label{eq:not_plausible_siblings_contraints} \end{align} These dependencies state how properties of concepts under the same parent relate to each other. For example, a property being plausible for only one in a set of siblings makes this property remarkable for the one concept.\\ \subsection{Grounding of Dependencies} \label{sec:grounding} The specified first-order constraints need to be grounded with the candidate statements in a CSK collection, yielding a set of logical clauses (i.e., disjunctions of positive or negated atomic statements). To avoid producing a huge amount of clauses, we restrict the grounding to existing subject-property pairs and the high-confidence (>0.4) relationships of the WebIsALOD taxonomy (avoiding its noisy long tail). \paragraph{Expansion to similar properties} Following this specification, the clauses would apply only for the same property of inter-related concepts, for example, {\em eats meat} for {\em lions, leopards, hyenas} etc. However, the CSK candidates may express the same or very similar properties in different ways: {\em lions: eat meat}, {\em leopards: are carnivores}, {\em hyenas: eat carcasses} etc. Then the grounded formulas would never trigger any inference, as the $p$ values are different. We solve this issue by considering the similarity of different $p$ values based on word-level embeddings (see Section \ref{sec:priorscores}). For each property pair $(p_1, p_2)\in\mathcal{P}^2$, grounded clauses are generated if $\text{sim}(p_1, p_2)$ exceeds a threshold $t$. We consider such highly related property pairs also for each concept alone, so that we can deduce additional CSK statements by generating the following clauses: $\forall s\in\mathcal{S}, \forall (p, q)\in\mathcal{P}^2,$ \begin{subequations} \begin{align} \text{sim}(p, q) \geq t \Rightarrow &\left(\text{Plausible}(s, p) \Leftrightarrow \text{Plausible}(s, q)\right), \label{eq:similarity_plausible}\\ & \left(\text{Typical}(s, p) \Leftrightarrow \text{Typical}(s, q)\right),\\ & \left(\text{Remarkable}(s, p) \Leftrightarrow \text{Remarkable}(s, q)\right),\\ & \left(\text{Salient}(s, p) \Leftrightarrow \text{Salient}(s, q)\right) \end{align} \label{eq:similarity_contraints} \end{subequations} This expansion of the reasoning machinery allows us to deal with the noise and sparsity in the pre-existing CSK collections. \paragraph{Weighting clauses} Each of the atomic statements $\text{Plausible}(s,p)$, $\text{Typical}(s,p)$, $\text{Remarkable}(s,p)$ and $\text{Salient}(s,p)$ has a prior weight based on the confidence score from the underlying collection of CSK candidates (see Sec.~\ref{sec:priorscores}). These priors are denoted $\pi(s, p), \tau(s, p), \rho(s, p),$ and $\sigma(s, p)$. Each grounded clause $c$ has three different weights: \begin{enumerate} \item $\omega_r$, the weight of the logical dependency from which the clause is generated, a hyper-parameter for tuning the relative influence of different kinds of dependencies. \item $\omega_s$, the similarity weight, $\text{sim}(p_1, p_2)$ for clauses resulting from similarity expansion, or 1.0 if concerning only a single property. \item $\omega_e$, the evidence weight, computed by combining the statistical priors for the individual atoms of the clause, using basic probability calculations for logical operators: $1-u$ for negation and $u+v - uv$ for disjunction with weights $u,v$ for the atoms in a clause. \end{enumerate} The final weight of a clause $c$ is computed as: $$\omega^c = \omega_r\omega_s\omega_e$$ Table \ref{tab:clauses} shows a few illustrative examples. \begin{comment} \begin{table} \centering \begin{tabular}{ll} \toprule Formula & Weight \\ \midrule $\text{Dimension}(s, p)$ & $\tau(s, p)$, $\sigma(s, p)$, $\rho(s, p)$ or $\pi(s, p)$ \\ $\neg X$ & $1 - x$ \\ $X \vee Y$ & $x + y - xy $ \\ \bottomrule \end{tabular} \caption{Fuzzy logic operators} \label{tab:fuzzy_logic_operators} \end{table} \end{comment} \begin{table*} \centering \begin{tabular}{ll|ccc|c} \toprule \textbf{Rule} & \textbf{Clause} & $\omega_r$ & $\omega_s$ & $\omega_e$ & $\omega^c$ \\ \midrule \ref{eq:typical_implies_plausible} & Plausible(\textit{car}, \textit{hit wall}) $\vee$ $\neg$ Typical(\textit{car}, \textit{hit wall}) & 0.48 & 1 & 0.60 & 0.29\\ \ref{eq:similarity_plausible} & Plausible(\textit{bicycle}, \textit{be at city}) $\vee$ $\neg$ Plausible(\textit{bicycle}, \textit{be at town}) & 0.85 & 0.86 & 1 & 0.73 \\ \ref{eq:similarity_plausible} & Plausible(\textit{bicycle}, \textit{be at town}) $\vee$ $\neg$ Plausible(\textit{bicycle}, \textit{be at city}) & 0.85 & 0.86 & 1 & 0.73 \\ \ref{eq:typical_prevents_remarkable_children} & $\neg$ Remarkable (\textit{bicycle}, \textit{transport person and thing}) $\vee$ $\neg$ Typical(\textit{car}, \textit{move person}) & 0.51 & 0.78 & 0.96 & 0.38 \\ \bottomrule \end{tabular} \caption{Examples of grounded clauses with their weights (based on ConceptNet).} \label{tab:clauses} \end{table*} \subsection{Integer Linear Program} \paragraph{Notations} For reasoning over the validity of candidate statements, for each of the four facets, we view every candidate statement $\textit{Facet}(s, p)$ as a variable $v\in\mathcal{V}$, and its prior (either $\tau$, $\pi$, $\rho$ or $\sigma$, see Section \ref{sec:priorscores}) is denoted as $\omega^v$. Every grounded clause $c\in\mathcal{C}$, normalized into a disjunctive formula, can be split into variables with positive polarity, $c^+$, and variables with negative polarity, $c^-$. By viewing all $v$ as Boolean variables, we can now interpret the reasoning task as a weighted maximum satisfiability (Max-Sat) problem: find a truth-value assignment to the variables $v\in\mathcal{V}$ such that the sum of weights of satisfied clauses is maximized. This is a classical NP-hard problem, but the literature offers a wealth of approximation algorithms (see, e.g., \cite{manquinho2009algorithms}). Alternatively and preferably for our approach, we can re-cast the Max-Sat problem into a problem for integer linear programming (ILP) \cite{vazirani2013approximation} where the variables $v$ become 0-1 decision variables. Although ILP is more general and potentially more expensive than Max-Sat, there are highly optimized and excellently engineered methods available in software libraries like Gurobi \cite{gurobi}. Moreover, we are ultimately interested not just in computing accepted variables (set to 1) versus rejected ones (set to 0), but want to obtain an informative ranking of the candidate statements. To this end, we can relax an ILP into a fractional LP (linear program), based on principled foundations \cite{vazirani2013approximation}, as discussed below. Therefore, we adopt an ILP approach, with the following objective function and constraints: \begin{equation} \max \sum_{v\in\mathcal{V}}\omega^vv + \sum_{c\in\mathcal{C}}\omega^cc \end{equation} under the constraints: \begin{subequations} \begin{align} \forall c \in \mathcal{C} \>\> \forall v \in c^+ \>\> c - v & \geq 0 \label{constraint_pos}\\ \forall c \in \mathcal{C} \>\> \forall w \in c^- \>\> c + w -1 & \geq 0 \label{constraint_neg}\\ \forall c \in \mathcal{C} \>\> \sum_{v\in c^+} v + \sum_{w\in c^-} (1-w) - c & \geq 0 \label{constraint_imp}\\ \forall v \in \mathcal{V} \>\> v & \in [0, 1] \label{eq:constraint_v}\\ \forall c \in \mathcal{C} \>\> c & \in [0, 1] \label{eq:constraint_c} \end{align} \end{subequations} Each clause $c$ is represented as a triple of ILP constraints, where Boolean operations $\neg$ and $\vee$ are encoded via inequalities. \subsection{Ranking of CSK Statements} The ILP returns 0-1 values for the decision variables; so we can only accept or reject a candidate statement. Relaxing the ILP into an ordinary linear program (LP) drops the integrality constraints on the decision variables, and would then return fractional values for the variables. Solving an LP is typically faster than solving an ILP. The fractional values returned by the LP are not easily interpretable. We could employ the method of randomized rounding \cite{DBLP:journals/combinatorica/RaghavanT87}: for fractional value $x\in[0,1]$ we toss a coin that shows 1 with probability $x$ and 0 with probability $1-x$. This has been proven to be a constant-factor approximation (i.e., near-optimal solution) on expectation. However, we are actually interested in using the relaxed LP to compute principled and informative rankings for the candidate statements. To this end, we leverage the theory of {\em reduced costs}, aka. {\em opportunity costs} \cite{bertsimas1997introduction}. For an LP of the form {\em minimize $c^T x$ subject to $Ax \le b$ and $x \ge b$} with coefficient vectors $c,b$ and coefficient matrix $A$, the reduced cost of variable $x_i$ that is zero in the optimal solution is the amount by which the coefficient $c_i$ needs to be reduced in order to yield an optimal solution with $x_i > 0$. This can be computed for all $x$ as $c - A^Ty$. For maximization problems, the reduced cost is an increase of $c$. Modern optimization tools like Gurobi directly yield these measures of sensitivity as part of their LP solving. We use the reduced costs of the $x_i$ variables as a principled way of ranking them; lowest cost ranking highest (as their weights would have to be changed most to make them positive in the optimal solution).\\ As all variables with reduced cost zero would have the same rank, we use the actual variable values (as a cue for the corresponding statement or dependency being satisfied) as a tie-breaker. \subsection{Scalability} LP solvers are not straightforward to scale to cope with large amounts of input data. For reasoning over all candidate statements in one shot, we would have to solve an LP with millions of variables. We devised and utilized the following technique to overcome this bottleneck in our experiments. The key idea is to consider only limited-size neighborhoods in the taxonomic hierarchy in order to partition the input data. In our implementation, to reason about the facets for a candidate statement $(s,p)$, we identify the parents and siblings of $s$ in the taxonomy and then compile all candidate statements and grounded clauses where at least one of these concepts appears. This typically yields subsets of size in the hundreds or few thousands. Each of these forms a partition, and we generate and solve an LP for each partition separately. This way, we can run the LP solver on many partitions independently in parallel. The partitions overlap, but each $(s,p)$ is associated with a primary partition with the statement's specific neighborhood. \section{Prior Statistics} \label{sec:priorscores} So far, we assumed that prior scores -- $\pi(s,p), \tau(s,p), \rho(s,p), \sigma(s,p)$ -- are given, in order to compute weights for the ILP or LP. This section explains how we obtain these priors. In a nutshell, we obtain basic scores from the underlying CSK collections and their combination with embedding-based similarity, and from textual entailment and relatedness in the taxonomy (Subsection \ref{sec:priorscores-basic}). We then define aggregation functions to combine these various cues (Subsection \ref{sec:priorscores-aggr}). \subsection{Basic Scores} \label{sec:priorscores-basic} Basic statements like $(s,p)$ are taken from existing CSK collections, which often provide {\em confidence scores} based on observation frequencies or human assessment (of crowdsourced statements or samples). We combine these confidence measures, denoted $\text{score}(s,p)$ with embedding-based similarity between two properties, $\text{sim}(p,q)$. \begin{comment} Depending on the CSKB, this score has either of the following meanings: \begin{enumerate} \item \emph{Reporting frequency (ConceptNet, WebChild):} This score embodies how frequently humans, or human-written texts claim the statement, which corresponds to how salient the statement is. \item \emph{Precision (TupleKB, Quasimodo, ATOMIC):} This score captures the likelihood that a human would consider the statement as correct. While the annotation task format for TupleKB is unknown, the annotation tasks for Quasimodo and ATOMIC explicitly refer to typicality. \end{enumerate} Both scores suffer from noise and the lack of structure of properties. For instance, \ex{lion capableOf hunt zebras} has a weight of 3.46 in ConceptNet, while \ex{lion capableOf hunt a zebra} has a weight of 1. Similarly, \ex{elephant} comes with three near synonymous objects in the \ex{capableOf} relation, \ex{carry a trunk, lift logs from the ground,} and \ex{to lift the tree}. We therefore aggregate similar facts to unify their scores, using the pre-trained word2vec model published by Google trained on a part of the Google News dataset\footnote{The pre-trained model \href{https://code.google.com/archive/p/word2vec/}{GoogleNews-vectors-negative300.bin.gz} can be downloaded from \url{https://code.google.com/archive/p/word2vec/}.}. \end{comment} Each property $p$ is tokenized into a bag-of-words $\{w_1, \dots, w_n\}$ and encoded as the idf-weighted centroid of the embedding vectors $\vec{w_i}$ obtained from a pre-trained word2vec model\footnote{\small\url{https://code.google.com/archive/p/word2vec/}{GoogleNews-vectors-negative300.bin.gz}}: $\vec{p} = \sum_{i=1}^n \text{idf}(w_i) \> \vec{w}_i$. The similarity between two properties is the cosine between the vectors mapped into $[0,1]$: $\text{sim}(p, q) = \frac{1}{2}\left(\frac{\langle\vec{p}, \vec{q} \rangle}{\left\lVert \vec{p} \right\rVert \left\lVert \vec{q} \right\rVert}+1\right)$. Confidence scores and similarities are then combined and normalized into a quasi-probability: $$\mathbb{P}[s, p] = \frac{1}{Z} \sum_{\substack{q\in\mathcal{P} \\ \text{sim}(p, q)\geq t}} \text{score}(s, q) \times \text{sim}(q, p) $$ where $Z$ is a normalization factor and $t$ is a threshold (set to 0.75 in our implementation). The intuition for this measure is that it reflects the probability of $(s,p)$ being observed in the digital world, where evidence is accumulated over different phrases for inter-related properties such as {\em eat meat}, {\em are carnivores}, {\em are predators}, {\em prey on antelopes} etc.\\ We can now derive additional measures that serve as building blocks for the final priors: \begin{itemize} \item the marginals $\mathbb{P}[s]$ for subjects and $\mathbb{P}[p]$ for properties, \item the conditional probabilities of observing $p$ given $s$, or the reverse; $\mathbb{P}[p \mid s]$ can be thought of as the \emph{necessity} of the property $p$ for the subject $s$, while $\mathbb{P}[s \mid p]$ can be thought of as a \emph{sufficiency} measure, \item the probability that the observation of $s$ implies the observation of $p$, which can be expressed as: $$ \begin{array}{rcl} \mathbb{P}[s \Rightarrow p] & = & 1 - \mathbb{P}[s] + \mathbb{P}[s, p] \\ \end{array} $$ \end{itemize} \begin{comment} \setlength{\tabcolsep}{4pt} \begin{table} \centering \begin{tabular}{lcccc} \toprule Property $p$ & $\mathbb{P}[s,p]$ & $\mathbb{P}[s\mid p]$ & $\mathbb{P}[p\mid s]$ & $\mathbb{P}[s \Rightarrow p]$ \\ \midrule make their nest in tree & \bfseries 9.76e-3 & 0.889 & \bfseries 0.016 & \bfseries 0.402 \\ have many feathers & 4.66e-3 & \bfseries 1.0 & 7.67e-3 & 0.397 \\ are at zoo & 3.96e-4 & 0.219 & 6.52-4 & 0.393 \\ \bottomrule \end{tabular} \caption{Probability examples, where $s=$"\textit{bird}"} \label{tab:probability_examples} \end{table} \setlength{\tabcolsep}{6pt} \end{comment} Beyond aggregated frequency scores, priors rely on two more components, scores from textual entailment models and taxonomy-based information gain. \noindent{\bf Textual entailment:}\\ A variant of $P[s \Rightarrow p]$ is to tap into corpora and learned models for textual entailment: does a sentence such as ``Simba is a lion'' entail a sentence ``Simba lives in a pride''? We leverage the attention model from the AllenNLP project \cite{gardner-etal-2018-allennlp} learned from the SNLI corpus \cite{snli:emnlp2015} and other annotated text collections. This gives us scores for two measures: does $s$ entail $p$, $\text{entail}(s \rightarrow p)$, and does $p$ contradict $s$, $\text{con}(s, p)$. \begin{comment} {\tt\color{red} GW: move this part on the taxonomy to an earlier place, when we discuss WebIsALOD !!!!! and shorten it !!!!!}\\ \subsection{Taxonomy induction} The next cues we are using partly rely on the taxonomic relatedness between subjects. To this matter we inferred hypernymy links within the input knowledge base using the WebIsALOD \cite{hertling2017webisalod} database, from the Web Data Commons project. It has a high coverage of subjects, and provides numerous weighted edges between them. This fits our usage of taxonomic relatedness better than a stricter tree-shaped taxonomy. \paragraph{Filling the taxonomy} We use the longest prefix match algorithm to identify the subjects within WebIsALOD, forming a set of nodes. The weight of a node is the number of properties we know about it. We then introduce all WebIsALOD edges whose weight is above a threshold. We arbitrarily set its value to 0.4. \paragraph{Pruning the taxonomy} In an effort to balance the taxonomy, nodes with a low weight (lower than 10) are merged to their biggest direct predecessor. In the following, we will note $\text{hypernym}(s_1, s_2)$ if $s_2$ is a sub-concept of $s_1$. We will also use the notations $\text{parents}(s)$ to denote the set of hypernyms of $s$, $\text{children}(s)$ the reverse, and $\text{siblings}(s)$ to denote the set of concepts sharing at least one hypernym with $s$. \iffalse The next cues we are using partly rely on the taxonomic relatedness between subjects. To this matter we inferred hypernymy links within the input knowledge base using external resources such as WordNet, ConceptNet \cite{conceptnet} or WebIsALOD. \sr{ConceptNet actually used later on? If not remove here} \yc{WordNet and ConceptNet are possible sources for taxonomies, we could argue about which to use in an experiment/discussion section.} \subsubsection{Gathering seeds} Those external sources can provide hypernymy links between surface concepts (ConceptNet, WebIsALOD) or between senses (WordNet). We first disambiguate fact subjects into their representative in the taxonomy source, using:\begin{itemize} \item the longest prefix match algorithm for raw subjects, \item the Lesk algorithm \cite{banerjee2002adapted} for WordNet senses; \end{itemize} We thus have a set of seeds. Each seed is weighted by the number of facts it represents. \subsubsection{Filling the taxonomy} The taxonomy is initialized with all seeds as nodes, and no edge. While it has more than one root, we add edges according to the hypernymy links among existing nodes as provided by the external source. Sometimes the key stone of the taxonomy is not contained in the knowledge base, jeopardizing the taxonomy balance. To counter that, we artificially add hypernyms of existing nodes to the taxonomy. Those dummy nodes typically represent abstract concepts (e.g., \ex{living thing} or \ex{physical artifact}), and are added with the hope of making the taxonomy connected. The exploration depth is limited by the diameter of the taxonomic graph. \subsubsection{Pruning the taxonomy} We traverse the taxonomy breadth-first. When a dummy node is encountered, we locate its nearest and largest (in terms of weight) successor, and merge the two nodes. Will remain only salient node (i.e. that represent facts) forming a connected graph. Sources providing weighted edges (ConceptNet, WebIsALOD) allow some edge thresholding. This is mainly needed for noisy sources such as WebIsALOD. Also, we want to preserve connectivity, even if it implies keeping low weighted edges. Having no node to compare to would go against our efforts. \fi \end{comment} \vspace{0.2cm} \noindent{\bf Taxonomy-based information gain:}\\ For each $(s,p)$ we define a neighborhood of concepts, $N(s)$, by the parents and siblings of $s$, and consider all statements for $s$ versus all statements for $N(s)-\{s\}$ as a potential cue for remarkability. For each property $p$ and concept set $S$, the entropy of $p$ is $H(p|S) = \frac{1}{X_S} \log{X_S} + \frac{X_S-1}{X_S} \log{\frac{X_S}{X_S-1}}$ where $X_S = |\{q~|~\exists s\in S: (s,q)\}|$. Instead of merely count-based entropy, we could also incorporate relative weights of different properties, but the as a basic cue, the simple measure is sufficient. Then, the information gain of $(s,p)$ is $IG(s,p) = H(p\mid\{s\})$ $- H(p\mid S-\{s\})$. \begin{comment} From the subject $s$, we gather its taxonomic neighborhood $V$, which namely contains $s$, its parents and its siblings. We randomly select a subject from $V$. We consider two binary random variables: \begin{enumerate} \item $X_s$, whose success is to select $s$, \item $Y_p$, whose success is to select a subject with the property $p$. \end{enumerate} The entropy score is defined as the information gain of $X$ obtained from the observation of $Y$. $$\text{entr}(s,p) = H(X_s) - H(X_s|Y_p)$$ Observing $p$ filters out subjects; the remaining set is called $W$. Keeping in mind that we have to deal with sparsity, a subject $s^\prime$ is in $W$ if it observes the following condition: $$\max_{\substack{q\in\mathcal{P}\\\text{score}(s^\prime, q) > 0}} \text{sim}(p, q) \geq t$$ $X_s$ follows a Bernoulli distribution with a success probability of $\frac{1}{|V|}$. $X_s|Y_p=1$ follows a Bernoulli distribution with a success probability of $\frac{1}{|W|}$. Thus the information gain is expressed as: $$\text{entr}(s,p) = \dfrac{1}{|V|}\log\left(\dfrac{|V|^{|V|}\left(|W|-1\right)^{|W|-1}}{|W|^{|W|}\left(|V|-1\right)^{|V|-1}}\right)$$ Note that this quantity is not defined if $|V|=1$ or $|W|=1$. In those cases, we assume that remarkability is at its maximum and arbitrarily set the value to 1. \end{comment} \subsection{Score Aggregation} \label{sec:priorscores-aggr} All the basic scores -- $\mathbb{P}[s,p]$, $\mathbb{P}[s\mid p]$, $\mathbb{P}[p\mid s]$, $\mathbb{P}[s \Rightarrow p]$, $\text{entail}(s \rightarrow p)$, $\text{con}(s,p)$ and $IG(s,p)$ -- are fed into regression models that learn an aggregate score for each of the four facets: plausibility, typicality, remarkability and saliency. The regression parameters (i.e., weights for the different basic scores) are learned from small set of facet-annotated CSK statements, separately, for each of the four facets. We denote the aggregated scores, serving as priors for the reasoning step, as $\pi(s,p)$, $\tau(s,p)$, $\rho(s,p)$ and $\sigma(s,p)$. \begin{comment} Based on the above inputs, we define the prior weights for CSK statements as follows: \begin{enumerate} \item Salience $$\sigma(s, p) = \mathbb{P}[p\mid s] \text{ or } \alpha\cdot\tau(s,p)+(1-\alpha)\cdot\rho(s,p)$$ \item Remarkability $$\rho(s, p) = \alpha_\rho\mathbb{P}[s\mid p] + (1-\alpha_\rho)\>\text{entr}(p,s)$$ \item Plausibility $$\pi(s,p) = \alpha_\pi\mathbb{P}[s\Rightarrow p] + \beta_\pi\>\text{entl}(s, p)\> + (1-\alpha_\pi-\beta_\pi)\ \text{contr}(s, p)$$ \item Typicality $$\tau(s,p) = \alpha_\tau\mathbb{P}[s\Rightarrow p] + \beta_\tau\>\text{entl}(s, p)\> + (1-\alpha_\tau-\beta_\tau)\ \text{contr}(s, p)$$ \end{enumerate} {\tt\color{red} GW: do we need several variants and all these hybrid measures here????? it would be more elegant to have simpler measures !!!!!}\\ $\alpha_\pi$, $\beta_\pi$, $\alpha_\tau$, $\beta_\tau$ and $\alpha_\rho$ are hyper-parameters that we will tune on a validation set for experiments. \end{comment} \section{Experiments} We evaluate three aspects of the \textsc{Dice}{} framework: (i) accuracy in ranking statements along the four CSK facets, (ii) run-time and scalability, (iii) the ability to enrich CSK collections with newly inferred statements. The main hypothesis under test is how well \textsc{Dice}{} can rank statements for each of the four CSK facets. We evaluate this by obtaining crowdsourced judgements for a pool of sample statements. \subsection{Setup} \paragraph{Datasets} We use three CSK collections for evaluating the added value that \textsc{Dice}{} provides: (i) ConceptNet, a crowdsourced, sometimes wordy collection of general-world CSK. (ii) Tuple-KB, a CSK collection extracted from web sources with focus on the science domain, with comparably short and canonicalized SPO triples. (iii) Quasimodo, a web-extracted general-world CSK collection with focus on saliency. Statistics on these datasets are shown in Table~\ref{tab:input}. \begin{table} \centering \begin{tabular}{l|cc} \toprule \textbf{CSK collection} & \textbf{\#subjects} & \textbf{\#statements} \\ \midrule Quasimodo & 13,387 & 1,219,526 \\ ConceptNet & 45,603 & 223,013 \\ TupleKB & 28,078 & 282,594 \\ \bottomrule \end{tabular} \caption{Input CSK collections.} \label{tab:input} \end{table} \begin{table} \centering \scalebox{0.95}{ \begin{tabular}{l|ccc} \toprule \textbf{CSK collection} & \textbf{\#nodes} & \textbf{\#parents/node} & \textbf{\#siblings/node}\\ \midrule Quasimodo & 11148 & 15.33 & 3627.8 \\ ConceptNet & 41451 & 1.15 & 63.7 \\ TupleKB & 26100 & 2.14 & 105.1 \\ Music-manual & 8 & 1.68 & 3.4 \\ \bottomrule \end{tabular} } \caption{Taxonomy statistics.} \label{tab:taxonomies} \end{table} \begin{table*} \centering \scalebox{0.95}{ \begin{tabular}{r|c|cc|cc|cc|cc} \toprule \multirow{2}{*}{\textbf{Dimension}} & \multirow{2}{*}{\textbf{Random}} & \multicolumn{2}{c|}{\textbf{ConceptNet}} & \multicolumn{2}{c|}{\textbf{TupleKB}} & \multicolumn{2}{c|}{\textbf{Quasimodo}} & \multicolumn{2}{c}{\textbf{Music-manual}} \\ & & \textbf{Baseline~\cite{conceptnet}} & \textbf{\textsc{Dice}} & \textbf{Baseline~\cite{TupleKB}} & \textbf{\textsc{Dice}} & \textbf{Baseline~\cite{quasimodo}} & \textbf{\textsc{Dice}} & \textbf{Baseline~\cite{conceptnet}} & \textbf{\textsc{Dice}} \\ \midrule Plausible & 0.5 & 0.52 & 0.62 & 0.53 & 0.57 & 0.57 & 0.59 & 0.21 & \textbf{0.67} \\ Typical & 0.5 & 0.39 & \textbf{0.65} & 0.37 & 0.59 & 0.52 & \textbf{0.64} & 0.54 & \textbf{0.70} \\ Remarkable & 0.5 & 0.52 & \textbf{0.69} & 0.50 & 0.54 & 0.56 & 0.56 & 0.49 & \textbf{0.74} \\ Salient & 0.5 & 0.54 & 0.65 & 0.59 & 0.61 & 0.53 & 0.63 & 0.51 & 0.65 \\ \midrule Avg. & 0.5 & 0.50 & \textbf{0.66} & 0.50 & 0.58 & 0.54 & 0.61 & 0.52 & \textbf{0.69} \\ \bottomrule \end{tabular} } \caption{Precision of pairwise preference (ppref) of \textsc{Dice}{}\ versus original CSK collections. Significant gains over baselines ($\alpha=0.05)$ are boldfaced. } \label{tab:mainresults} \end{table*} To construct taxonomies for each of these collections, we utilized the WebIsALOD dataset~\cite{hertling2017webisalod}, a web-extracted noisy set of ranked subsumption pairs (e.g., {\tt{\small tiger isA big\_cat}} - 0.88, {\tt{\small tiger isA carnivore}} - 0.83). We prune out long-tail noise by setting a threshold of 0.4 for the confidence scores that WebIsALOD comes with. To evaluate the influence of taxonomy quality, we also hand-crafted a small high-quality taxonomy for the music domain, with 10 concepts and 9 subsumption pairs, such as \texttt{\small rapper} being a subclass of \texttt{\small singer}. Table \ref{tab:taxonomies} gives statistics on the taxonomies per CSK collection. Differences between \#nodes in Table \ref{tab:taxonomies} and \#subjects in Table~\ref{tab:input} are caused by merging nodes on hypernymy paths without branches (\#children=1). \paragraph{Annotation} To obtain labelled data for hyper-parameter tuning and as ground-truth for evaluation, we conducted a crowdsourcing project using Amazon Mechanical Turk. For saliency, typicality and remarkability, we sampled 200 subjects each with 2 properties from each of the CSK collections, and asked annotators for pairwise preference with regard to each of the three facets, using a 5-point Likert scale. That is, we show two statements for the same subject, and the annotator could slide on the scale between 1 and 5 to indicate the more salient/typical/remarkable statement. For the plausibility dimension, we sampled 200 subjects each with two properties, and asked annotators to assess the plausibility of individual statements on a 5-point scale. Then we paired up two statements for the same subject as a post-hoc preference pair. The rationale for this procedure is to avoid biasing the annotator in judging plausibility by showing two statements at once, whereas it is natural to compare pairs on the other three dimensions. In total, we had $4\times 4 \times200=3200$ tasks, each given to 3 annotators. The final scores for each statement and facet were the averages of the three numerical judgments. Regarding inter-annotator agreement, we observed a reasonably low standard deviation of 0.81/0.92/0.98/0.92 (over the scale from 1 to 5) for the dimensions plausibility/\-typicality/\-remarkability/\-saliency on ConceptNet, with similar values on the other CSK collections. Aggregate label distributions are shown in Fig.~\ref{fig:labeldistribution}. When removing indeterminate samples, with avg.\ score between 2.5 and 3.5, and interpreting annotator scores as binary preferences, inter-annotator agreement was fair to moderate, with Fleiss' Kappa values of 0.31, 0.30, 0.25 and 0.48 for plausibility, typicality, remarkability and saliency, respectively. \begin{figure} \centering \includegraphics[scale=.62]{annotation-distribution.png} \caption{Aggregate label distribution.} \label{fig:labeldistribution} \end{figure} \paragraph{Evaluation Metrics} In the actual evaluation, we used withheld pairwise annotations for statements along the dimensions plausibility, typicality, remarkability and saliency as ground truth, and compared, for each system score, for how many of these pairs its scores implicated the same ordering, i.e., measured the \emph{precision in pairwise preference} (ppref)~\cite{ppref}. \paragraph{Hyper-parameter tuning} The 800 labeled statements per CSK collection were split into 70\% for hyper-parameter optimization and 30\% for evaluation. We performed two hyper-parameter optimization steps. In step 1, we learned the weights for aggregating the basic scores by a regression model based on interpreting pairwise data as single labels (i.e., the preferred property is labelled as 1, the other one as 0). In step 2, we used Bayesian optimization to tune the weights of the constraints. As exhaustive search was not possible, we used the Tree-structured Parzen Estimator (TPE) algorithm from the Hyperopt \cite{bergstra2013making} library. We used the 0-1 loss function on the ordering of the pairs as metric, and explored the search space in two ways: \begin{enumerate} \item discrete exploration space $\{0, 0.1, 0.5, 1\}$, followed by \item continuous exploration space of radius 0.2 centered on the value selected in the previous step. \end{enumerate} For ConceptNet, constraints were assigned an average weight of 0.404, with the highest weights for: (\ref{eq:similarity_contraints}) Similarity constraints (weight 0.85), (\ref{eq:plausibility_inference_constraint}) Plausibility inference (weight 0.66) and (\ref{eq:not_plausible_siblings_contraints}) Sibling implausibility implying remarkability (weight 0.60). All constraints were assigned non-negligible positive weights; so they are all important for joint inference. \begin{table} \centering \scalebox{0.95}{ \begin{tabular}{@{}r|cc|c@{}} \toprule & \begin{tabular}[c]{@{}c@{}}\textbf{Priors}\\ \textbf{only}\end{tabular} & \multicolumn{1}{c|}{\begin{tabular}[c]{@{}c@{}}\textbf{Constraints} \\ \textbf{only}\end{tabular}} & \textbf{Both} \\ \midrule Plausible & 0.54 & 0.51 & 0.62 \\ Typical & 0.53 & 0.42 & 0.65 \\ Remarkable & 0.65 & 0.57 & 0.69 \\ Salient & 0.56 & 0.52 & 0.65 \\ \midrule Avg. & 0.58 & 0.51 & 0.66 \\ \bottomrule \end{tabular} } \caption{Ablation study using ConceptNet as input.} \label{tab:ablation} \end{table} \begin{table} \centering \scalebox{0.95}{ \begin{tabular}{@{}c|cccc@{}} \toprule \bfseries Ranking & \bfseries Existing & \multicolumn{3}{c}{\bfseries New statements} \\ \bfseries dimension & \bfseries statements & \bfseries 25\% & \bfseries 50\% & \bfseries 100\% \\ \midrule Plausible & \multirow{2}{*}{3.44} & 3.54 & 3.43 & 3.41 \\ Typical & & 3.27 & 3.31 & 3.26 \\ \bottomrule \end{tabular} } \caption{Plausibility of top-ranked newly inferred statements with ConceptNet as input.} \label{tab:enrichment} \end{table} \begin{table} \centering \begin{tabular}{@{}ll@{}} \toprule \textbf{Subject} & \textbf{Novel properties} \\ \midrule sculpture & be at art museum, be silver or gold in color \\ athlete & requires be good sport, be happy when they win \\ saddle & be used to ride horse, be set on table \\ \bottomrule \end{tabular} \caption{Examples of new statements inferred by \textsc{Dice}\ with ConceptNet as input.} \label{tab:anecdotalenrichment} \end{table} \begin{table*} \centering \scalebox{0.95}{ \begin{tabular}{@{}lllllll@{}} \toprule \multirow{2}{*}{\textbf{Subject}} & \multicolumn{1}{c}{\multirow{2}{*}{\textbf{Property}}} & \multicolumn{1}{c}{\textbf{Baseline}} & \multicolumn{4}{c}{\textbf{\textsc{Dice}}} \\ & \multicolumn{1}{c}{} & \textbf{CN-score} & \textbf{plausible} & \textbf{typical} & \textbf{remarkable} & \textbf{salient} \\ \midrule snake & be at shed & 0.46 & 0.29 & 0.71 & 0.29 & 0.18 \\ snake & be at pet zoo & 0.46 & 0.15 & 0.29 & 0.82 & 0.48 \\ snake & bite & 0.92 & 0.58 & 0.13 & 0.61 & 0.72 \\ lawyer & study legal precedent & 0.46 & 0.25 & 0.73 & 0.37 & 0.18 \\ lawyer & prove that person be guilty & 0.46 & 0.06 & 0.47 & 0.65 & 0.40 \\ lawyer & present case & 0.46 & 0.69 & 0.06 & 0.79 & 0.75 \\ bicycle & requires coordination & 0.67 & 0.62 & 0.40 & 0.36 & 0.35 \\ bicycle & be used to travel quite long distance & 0.46 & 0.30 & 0.20 & 0.77 & 0.64 \\ bicycle & be power by person & 0.67 & 0.19 & 0.33 & 0.66 & 0.55 \\ \bottomrule \end{tabular} } \caption{Anecdotal examples from \textsc{Dice}{} run on ConceptNet.} \label{tab:anecdotal_examples} \end{table*} \subsection{Results} \paragraph{Quality of rankings} Table~\ref{tab:mainresults} shows the main result of our experiments: the precision in pairwise preference (ppref) scores~\cite{ppref}, that is, the fraction of pairs where \textsc{Dice}\ or a baseline produced the same ordering as the crowdsourced ground-truth. As baseline, we rank all statements by the confidence scores from the original CSK collections, which implies that the ranking is identical for all four dimensions. As the table shows, \textsc{Dice}\ consistently outperforms the baselines by a large margin of 7 to 18 percentage points. It is also notable that scores in the original ConceptNet and TupleKB are negatively correlated with typicality (values lower than 0.5), pointing out a substantial fraction of valid but not exactly typical properties in these pre-existing CSK collections. \paragraph{Ablation study} To study the impact of statistical priors and constraint-based reasoning, we compare two variants of \textsc{Dice}{}: (i) using only priors without the reasoning stage, and (ii) using only the constraint-based reasoning with all priors set to 0.5. The resulting ppref scores are shown in Table~\ref{tab:ablation}. In isolation, priors and reasoning perform 8 and 15 percentage points worse than the combined \textsc{Dice}{} method. This clearly demonstrates the importance of both stages and the synergistic benefit from their interplay. \paragraph{Enrichment potential} All CSK collections are limited in their coverage of long-tail concepts. By exploiting the taxonomic and embedding-based relatedness between different concepts, we can generate candidate statements that were not observed before (e.g., because online contents rarely talk about generalized concepts like big cats, and mostly mention only properties of lions, leopards, tigers etc.). As mentioned in Section~\ref{sec:grounding}, simple templates can be used to generate candidates. These are fed into \textsc{Dice}{} reasoning together with the statements that are actually contained in the existing CSK collections. To evaluate the quality of the \textsc{Dice}{} output for such ``unobserved'' statements, we randomly sampled 10 ConceptNet subjects, and grounded the reasoning framework for these subjects for all properties observed in their taxonomic neighbourhood (i.e., parents and siblings). We then asked annotators to assess the plausibility of 100 sampled statements. To compute the quality of \textsc{Dice}{} scores, we consider the top-ranked statements by predicted plausibility and by typicality, where we vary the recall level: number of statements from the ranking in relation to the number of statements that ConceptNet contains for the sampled subjects. The results are shown in Table~\ref{tab:enrichment} for recall 25\%, 50\% and 100\%, that is up to doubling the size of ConceptNet for the given subjects. As one can see, \textsc{Dice}\ can expand the pre-existing CSK by 25\% without losing in quality, and even up to 100\% expansion the decrease in quality is negligible. Table~\ref{tab:anecdotalenrichment} presents anecdotal statements absent in ConceptNet. \paragraph{Run-Time} All experiments were run on a cluster with 40 cores and 500 GB memory. Hyper-parameter optimization took 10-14 hours for each of the three CSK inputs. Computing the four-dimen\-sional scores for all statements took about 3 hours, 3 hours and 24 hours for ConceptNet, TupleKB and Quasimodo, respectively. The computationally most expensive steps are the semantic similarity computation and the LP solving. For semantic similarity computation, a big handicap is the verbosity and hence diversity of the phrases for properties (e.g., ``live in the savannah'', ``roam in the savannah'', ``are seen in the African savannah'', ``can be found in Africa's grasslands'' etc.). We observed on average 1.55 statements per distinct property for ConceptNet, and 1.77 for Quasimodo. Therefore, building the input matrix for the LP is very time-consuming. For LP solving, the Gurobi algorithm has polynomial run-time in the number of variables. However, we do have a huge number of variables. Empirically, we need to cope with about \textit{\#constraints} $\times$ \textit{\#statements}$^{1.2}$ variables. \paragraph{Anecdotal examples} Table~\ref{tab:anecdotal_examples} gives a few anecdotal outputs with scores returned by \textsc{Dice}. Note that the scores produced do not represent probabilities, but global ranks (i.e., we percentile-normalized the scores produced by \textsc{Dice}, as they have no inherent semantics other than ranks). For instance, \texttt{\small be at shed} was found to be much more typical than \texttt{\small be at pet zoo} for \texttt{\small snake}, while salience was the other way around. Note also the low variation in ConceptNet scores, i.e., in addition to being unidimensional, this low variance makes any ranking difficult. \section{Discussion} \paragraph{Experimental results} The experiments showed that \textsc{Dice}{} can capture CSK along the four dimensions significantly better than the single-dimensional baselines. The ablation study highlighted that a combination of prior scoring and constraint-based joint reasoning is highly beneficial (0.66 average ppref vs.\ 0.58 and 0.51 of each step in isolation, see Table~\ref{tab:ablation}). Among the dimensions, we find that plausibility is the most difficult of the four dimensions (see Table~\ref{tab:mainresults}). The learning of hyper-parameters shows that all constraints are useful and contribute to the outcome of \textsc{Dice}{}, with similarity dependencies and plausibility inference having the strongest influence. Comparing the three CSK collections that we worked with, we observe that the crowdsourced ConceptNet is a priori cleaner and hence easier to process than Quasimodo and TupleKB. Also, manually designed taxonomies gave \textsc{Dice}{} a performance bost of 0.03-0.11 in ppref over the noisy web extracted WebIsALOD taxonomies. \paragraph{Task difficulty} Scoring commonsense statements by dimensions beyond confidence has never been attempted before, and a major challenge is to design appropriate and varied input signals towards specific dimensions. Our experiments showed that \textsc{Dice}{} can approximate the human-generated ground-truth rankings to a considerable degree (0.58-0.69 average ppref), although a gap remains (see Table~\ref{tab:mainresults}). We conjecture that in order to approximate human judgments even better, more and finer-grained input signals, for example about textual contexts of statements, are needed. \paragraph{Enriched CSK data} Along with this paper, we publish six datasets: the 3 CSK collections ConceptNet, TupleKB and Quasimodo enriched by \textsc{Dice}{} with score for the four CSK dimensions, and \pagebreak additional inferred statements that expand the original CSK data by about 50\%. The datasets can be downloaded from \url{https://tinyurl.com/y6hygoh8}. \paragraph{Web demonstrator} The results of running \textsc{Dice}{} on ConceptNet and Quasimodo are showcased in an interactive web-based demo. The interface shows original scores from these CSK collections as well as the per-dimension scores computed by \textsc{Dice}. Users can explore the values of individual cues, the priors, the taxonomic neighborhood of a subject, and the clauses generated by the rule grounding. The demo is available online at \url{https://dice.mpi-inf.mpg.de}, we also show screenshots in Figure~\ref{fig:demo}. From a landing page (Fig.~\ref{fig:demo}(a)), users can navigate to individual subjects like \emph{band} (Fig.~\ref{fig:demo}(b)). On pages for individual subjects, taxonomic parents and siblings are shown at the top, followed by commonsense statements from ConceptNet and Quasimodo. For each statement, its normalized score or percentile in its original CSK collection, along with scores and percentiles along the four dimensions as computed by \textsc{Dice}{}, are shown. Colors from green to red highlight to which quartile a percentile value belongs. On inspecting a specific statement, e.g., \emph{band: hold concert} (Fig.~\ref{fig:demo}(c)), one can see related statements used for computing basic scores, along with the values of the priors and evidence scores. Further down on the same page (Fig.~\ref{fig:demo}(d)), the corresponding materialized clauses from the ILP, along with their weight $\omega^c$, are shown. \begin{figure*} \centering \begin{subfigure}[b]{0.475\textwidth} \centering \fbox{\includegraphics[width=\textwidth]{demo-landing}} \caption[unclear]% {{\small Demo landing page.}} \end{subfigure} \hfill \begin{subfigure}[b]{0.475\textwidth} \centering \fbox{\includegraphics[width=\textwidth]{demo-bandoverview}} \caption{{\small List of statements for subject \textit{band}.}} \end{subfigure} \vskip\baselineskip \begin{subfigure}[b]{0.475\textwidth} \centering \fbox{\includegraphics[width=\textwidth]{factdetails-1}} \caption{{\small Scores and neighbourhood for statement \textit{band: hold concert}.}} \end{subfigure} \quad \begin{subfigure}[b]{0.475\textwidth} \centering \fbox{\includegraphics[width=\textwidth,trim={0 15.3cm 0 0},clip]{factdetails-2}} \caption[]% {{\small Materialized clauses for statement \textit{band: hold concert}.}} \label{fig:mean and std of net44} \end{subfigure} \caption{Screenshots from the web-based demonstration platform.} \label{fig:demo} \end{figure*} \section{Conclusion} This paper presented \textsc{Dice}, a joint reasoning framework for commonsense knowledge (CSK) that incorporates inter-dependencies between statements by taxonomic relatedness and other cues. This way we can capture more expressive meta-properties of concept-property statements along the four dimensions of plausibility, typicality, remarkability and saliency. This richer knowledge representation is a major advantage over prior works on CSK collections. In addition, we have devised techniques to compute informative rankings for all four dimensions, using the theory of reduced costs for LP relaxation. We believe that such multi-faceted rankings of CSK statements are crucial for next-generation AI, particularly towards more versatile and robust conversational bots. Our future work plans include leveraging this rich CSK for advanced question answering and human-machine dialogs. \clearpage \newpage \balance \bibliographystyle{myplain}
\section{Introduction} \label{sec:intro} The cooperative Jahn-Teller \cite{JT} (JT) effect is commonly ascribed to structural distortions caused by the coupling between electronically degenerate orbital states of transition metal ions and their normal modes of vibration. This coupling results in reduction of the symmetry of the bonding environment around the JT ion to lower the total energy. JT- active perovskite-type materials are at the center of intensive research within the material science community for their wide range of physical properties and structural diversity. Superconductivity, colossal magnetoresistance (CMR) and polaron confinement are known for these compounds, giving applications in information storage and spintronics \cite{AN1,AN2,AN3}. Perovskites have the chemical formula $ABX_3 $. JT-active ions such as $\mathrm{Mn^{3+}, Cr^{2+}}$ and $\mathrm{Cu^{2+}}$ (with electron configurations 3$d^4$, 3$d^4$ and 3$d^9$, respectively) can occupy the octahedral $B$-site (e.g., $[\mathrm{MnO}_6]$). The octahedra are linked by their vertices forming sets of $B$-$X$-$B$ bond angles $\xi^\circ$ (defined here as the perovskite angle). The electron-phonon coupling (ie., $E\otimes e$) causes octahedral distortion which favor the occupation of one of the originally degenerate orbital states. At the same time, the choice of orbital state induces an orbital ordering (OO). The best known JT-active oxide perovskite is lanthanum manganite $\mathrm{LaMnO_3}$, a parent compound for several derivative crystalline compounds exhibiting CMR. An essential feature of the manganites is the role played by the atom occupying the $A-$site in influencing deformations of the perovskite type structure, and thereby also the JT-structural distortions, leading to a rich diversity of spin, orbital and charge orderings. In fluorides JT-ions are well known for showing interesting phenomena under external stimuli. Alkali ternary manganese (III) fluorides with formula $A_x\mathrm{MnF}_{3+x}$ (with $A=$Na, K, Cs) show significant structural diversity, adopting 0-,1- and 2- dimensional vertex-sharing arrangements of the octahedral units depending on the value of $x$. \cite{JCP118,PRB76}. 3-dimensional vertex sharing high spin 3$d^4$ electronic configuration can form perovskite-type fluoride structures (fluoroperovskites). These include ternary chromium (II) fluoroperovskites with formula $A\mathrm{CrF_3}$ (where $A=$ alkali metals). $\mathrm{KCrF_3}$ has two structural-phase transitions at elevated temperatures: $I{112/m}\to I{4/mcm}$ at 250 K and $I{4/mcm}\to P{m3m}$ at 973 K \cite{JACS128,RSC17}, and theoretical studies have associated the metal to insulator transition with the onset of the tetragonal-to-cubic phase transition \cite{PRB84}. In addition, $\mathrm{KCrF_3}$ displays a rich magnetic phase diagram at low temperatures: an incommensurate antiferromagnetic ordering at 79.5 K, an incommensurate-to-commensurate antifferromagnetic transition at 45.8 K, and below 9.5 K a canted antiferromagnetic ordering with weak ferromagnetic interactions \cite{PRB82}. Further studies of the role played by the $A-$site in $A\mathrm{CrF_3}$ are currently lacking despite the interesting phase diagram of $\mathrm{KCrF_3}$. The main reason for this is the lack of proper synthetic protocols for the reactions of $\mathrm{Cr^{2+}}$compounds with fluorides. The synthesis of $\mathrm{NaCrF_3}$ has until now proved extremely problematic due to the sensitivity of $\mathrm{Cr^{2+}}$ to oxidation. None of the synthesis routes described by Deyrup and Earnshaw {\em et al.} resulted in $\mathrm{NaCrF_3}$\cite{DEYRUP,EARN}. To the best of our knowledge, the only evidence of the preparation of $\mathrm{NaCrF_3}$ was given by the work of Vollmer and UV-vis spectroscopy studies performed by Kruger \cite{VOLL,OELKRUG}. Our new reliable synthetic protocol for $\mathrm{NaCrF_3}$ opens up further possibilities for synthesizing analogous materials of interest for information storage technologies, with rich states of matter and novel physical phenomena to appear in stoichiometric and non-stoichiometric modifications of the $A$- and $B$ sites in the $A\mathrm{CrF_3}$ family. We report for the first time the crystal and magnetic structure of the elusive JT- active compound, $\mathrm{NaCrF_3}$ prepared by a novel wet-chemistry method. These results are complemented by magnetometry studies. \begin{table*}[th!] \centering \caption{Structural parameters from Rietveld refinement of HR-SPXRD dataset of $\mathrm{NaCrF_3}$ at ambient conditions. $l,m$ and $s$ are long, medium and short bond distances, respectively.} \label{tab:t1} \begin{tabular}{l c c c c c} &&&&&\\ \hline\hline &&&&&\\ \textbf{Space Group}: & $P\bar{1}$&&&&\\ $a$ &5.51515(2) \AA&&&&$\Delta d_{Cr1}=78.37\times 10^{-4}$ \AA \\ $b$ &5.68817(3) \AA&&\textbf{Octahedral distortions}:&&$\Delta d_{Cr2}=59.01\times 10^{-4}$ \AA \\ $c$ &8.18349(3) \AA&&&&$\Delta d_{Cr3}=72.35\times 10^{-4}$ \AA \\ $\alpha$ & 90.5039(3)$^\circ$&&&&$\Delta d_{Cr4}=76.86\times 10^{-4}$ \AA\\ $\beta$ & 92.2554(3)$^\circ$&&&\\ $\gamma$& 86.0599(2)$^\circ$&&&\\ $V$& 255.915(2) \AA$^3$&&&\\ &&&&\\ $R_{wp}, R_{wp-bkg}$&11.5162, 21.573 &&$R_{p}, R_{p-bkg}$&8.6967, 23.7006 &\\ $R_{exp}, R_{exp-bkg}$&5.5252, 10.3500 &&$\chi^2$ &2.08&\\ N$^\circ$ of independent parameters &53&&&\\ Restrains, constrains&0, 3&&&\\ Rigid bodies &0&&&\\ $Z$&4&&&\\ &\multicolumn{4}{c}{\textbf{Selected Bond Distances}}\\&\\ &&Cr1-F&Cr2-F&Cr3-F& Cr4-F\\ &&&\\ $l$ $\times$ 2&&2.383(6) \AA&2.289(5) \AA&2.346(5) \AA&2.371(5) \AA \\ $m$ $\times$ 2&&2.028(5) \AA&2.045(5) \AA&2.019(5) \AA&2.022(5) \AA \\ $s$ $\times$ 2&&1.987(5) \AA&1.976(5) \AA&1.986(5) \AA&1.986(5) \AA \\ &&&\\ \hline \end{tabular} \end{table*} \section{Experimental and computation section} \label{sec:exo} \subsection{Synthesis of $\mathrm{NaCrF_3}$} \label{sec:syn} Chromium (II) acetate dihydrate ($\mathrm{Cr_2 (CH_3 CO_2)_4 (H_2 O)_2}$) (0.5g 1.33 mmol) and 2 mL of degassed water is loaded into a 85 mL polycarbonate (PC) vial closed with a septum under a constant flow of Ar. $\mathrm{NaHF_2}$ (0.45 g 5.45 mmol) is dissolved in 10 mL deoxygenated water in a second PC vial under Ar by heating to above 50$^\circ$C. The hot-solution of $\mathrm{NaHF_2}$ is carefully and quickly injected into the vial containing $\mathrm{Cr_2 (CH_3 CO_2)_4 (H_2 O)_2}$ under vigorous stirring. $\mathrm{NaCrF_3}$ precipitates after few seconds. The supernatant is decanted off and the solid product is washed once with 2 mL 50:50 deoxygenated water and methanol solution, and subsequently with 5 mL deoxygenated methanol. Finally, the product is vacuum-dried overnight to yield air-stable $\mathrm{NaCrF_3}$. \subsection{Computational simulations} \label{sec:com} For the structural phase model of $\mathrm{NaCrF_3}$, density functional theory (DFT) was applied using the Vienna {\em Ab initio} Simulation Package (\cite{VA1,VA2}), with the PBE general gradient approximation (GGA) \cite{PBE}. The cutoff energy of the plane wave basis set expansion was set to at least 450 eV. The density of $k$ points was determined by a maximum of 0.25 \AA$^{-1}$. The structure was relaxed with remaining forces below 0.05 eV/\AA\ using a quasi Newton method. \subsection{Synchrotron X-ray diffraction} \label{sec:sc} High- resolution synchrotron powder X-ray diffraction (HR-SPXRD) experiments were conducted at ID22 beamline of the European Synchrotron (ESRF), Grenoble, France where the diffraction patterns were recorded using a wavelength of $\lambda=0.40013$~\AA\; at room temperature. The crystal structure of $\mathrm{NaCrF_3}$ has been refined using TOPAS v5 (Bruker AXS) \cite{TOPAS}. The initial model was obtained by DFT minimisation of a symmetry free (space group $P1$) triclinic model based on the crystal structure of $\mathrm{NaCuF_3}$ \cite{VOLL,KEISER} with Cr replacing Cu. This model was refined against the HR-PXRD data to obtain the correct lattice parameters and crystallite size peak broadening. The model was then processed using the ADDSYMM routine in PLATON \cite{PLATON} to determine the crystallographic symmetry. The new model, now in space group $P\bar{1}$, was refined against the HR-SPXRD data. Scale, lattice parameters, 13 term Chebyshev polynomial background function, Gaussian crystallite size and strain and Lorentzian strain broadening terms (fundamental parameters peak shape) and all Na and F atomic coordinates and isotropic displacement parameters were refined. Atoms of the same type (Na, Cr and F) were constrained to have identical isotropic thermal parameters. \subsection{Magnetic characterization} \label{sec:mc} Magnetometry experiments were performed on a Quantum Design 14 T Physical Property Measurement System (PPMS). Temperature dependent DC magnetic susceptibility $\chi (T)$ measurements were conducted during heating from 4 to 300~K in zero-field-cooled field-cooled mode (ZFC-FC). The magnetic susceptibility is calculated by $\chi =M/\mathrm{H}$ where $M$ is the magnetization given in emu $\mathrm{mol^{-1}}$ and the magnetic field $H=1$ T. Isothermal field dependent measurements ($M (H)$) were collected at 2~K, and half-loop isothermal measurements at 4, 12 and 23~K up to 14 T. \subsection{Neutron Powder Diffraction} \label{sec:npd} Neutron powder diffraction (NPD) patterns were collected at ISIS Neutron and Muon Source (UK) by using the WISH long-wavelength diffractometer \cite{WISH}. The sample was placed in thin wall vanadium container (7~mm in diameter) and cooled down to 1.5~K. The measurements were performed while heating from 1.5~K up to 127~K at several temperature steps. The raw data was integrated by using the Mantid suite \cite{MANTID} and analysed using the Jana2006 software \cite{JANA}. The structure refinement was performed using data from the four detector banks with highest resolution. The lowest resolution bank was discarded as the it contained no information not present in the other detector banks. The background (10 term Chebyshev polynomial), peak-shape, isotropic thermal displacement parameters for each element type, lattice parameters and angles, and scale parameters were refined. The superspace formalism for commensurate magnetic moment modulation was used for the magnetic structure description. The magnetic form factor of $\mathrm{Cr^{2+}}$ was employed in the refinements. Spherical coordinates were used to refine the magnetic moments. The four $\mathrm{Cr^{2+}}$ sites were constrained to have a single magnetic moment magnitude. Polar angles ($\varphi_1$ and $\varphi_3$) were refined for Cr1 and Cr3, with the polar angles of Cr2 and Cr4 constrained to values of 180+$\varphi_1$ and 180+$\varphi_3$ respectively. Independent azimuthal angles were refined for all Cr sites. These constraints are summarised in \tref{t2}. At 17 and 19 K, the azimuthal angle of Cr1 and Cr3, and Cr2 and Cr4 were constrained to be equal. Also at 19~K the polar angle for Cr1 and Cr3 was fixed at values obtained at 17~K. This is due to the low intensity of magnetic Bragg reflections near the N\'eel temperature and fit instability. \begin{table*}[t!] \centering \caption{Parameters used to describe the magnetic structure of $\mathrm{NaCrF_3}$ from Rietveld Refinements at 1.5 K in spherical coordinates with a modulation vector of $k=(1/2,1/2,0)$ in superspace group $P\bar{1}(\alpha \beta 0)$. The magnetic moment was constrained to be equal for all chromium atoms, while the polar $\varphi$ and azimuthal $\vartheta$ angles were given degrees of freedom. \\} \label{tab:t2} \begin{tabular}{c c c c c} \hline\hline &&&&\\ Atom Label & Atom position & Magnetic moment & Polar angle & Azimuthal angle\\ &&&&\\ Cr1 &(1/2 0 0) & M = 3.520(6) & $\varphi_1 = 223.04(70)$ & $\vartheta_1 = 38.3(1.2)$\\ Cr2 &(0 1/2 0) & M = 3.520(6) &$\varphi_1 + 180 = 43.04(70)$ &$\vartheta_2 = 128.9(1.0)$\\ Cr3 &(1/2 0 1/2) & M = 3.520(6) &$\varphi_3 = 223.04(70)$ &$\vartheta_3 = 55.5(1.0))$\\ Cr4 &(0 1/2 1/2) & M = 3.520(6) &$\varphi_3 + 180 = 43.04(70)$ &$\vartheta_4 = 135.9(1.1)$\\ &&&&\\ \hline \end{tabular} \end{table*} \begin{figure*}[t!] \centering \includegraphics[scale=.7]{FIG3-ART2} \caption{($a$) ZFC-FC temperature dependency of the magnetic susceptibility measured $\chi (T)$ at $H=1$ T (left axis), and their inverse $\chi^{-1}$ (right) with the linear regression at $\theta=-4$ K . ($b$) Isothermal half-loop magnetization curves magnetic field ($M (H)$) applied from 0 to 14 T and then back to 0 T at 2, 4, 12 and 23 K. The inset is the full $M (H)$ hysteresis loop at 2 K to show the symmetry at the negative quadrant.} \label{fig:f2} \end{figure*} \section{Results} \label{sec:results} \subsection{Crystal structure determination} \label{sec:sc} To the best of our knowledge, no reliable synthesis protocol for $\mathrm{NaCrF_3}$has previously been described, and the crystal structure of the compound has not been described in detail. The air-sensitivity of $\mathrm{Cr^{2+}}$ is intrinsically difficult to combine with fluorine chemistry. Conventional solid-state methods are therefore unsuitable, so we developed a novel own wet-chemistry protocol. Using this we can work under conditions where $\mathrm{Cr^{2+}}$ is stable and obtain pure, single phase $\mathrm{NaCrF_3}$ in large quantities. We expect that other fluorides can be prepared using the same approach. Results of the Rietveld refinement against HR-PXRD data are shown in Figure \ref{fig:f1} and Table \ref{tab:t1}. The plot, fitting statistics and bond lengths and angles obtained indicate that the model is an excellent representation of the real structure. \tref{t1} and \tref{s1} SI show the structural parameters and atomic coordinates, as obtained from Rietveld refinements. The $\mathrm{Cr^{2+}}$ cations occupy four non-equivalent crystallographic sites. Although the structure is triclinic, the cell edges and angles are close to those of a tetragonal unit cell. The corresponding approximated tetragonal distortion, $c/a=1.48$, corresponds to the (stretching) normal mode $Q_2$ of the octahedral units $\mathrm{CrF_6^{4-}}$. \fref{f1} ($b$) shows the crystal structure of $\mathrm{NaCrF_3}$ with vertex shared octahedral units (blue) with Na$^+$ ions (red) in interstices. We calculate the octahedral distortion according to the equation $\Delta_d= 1/6 \sum_{n=1}^6|l_i-l_{av}|/l_{av}$ where $l_i$ are the individual bond distances of the octahedral unit, and $l_{av}$ is the average bond distance. \fref{f1b} ($a$) shows the $l$ and $s$ bonds building a tilted $ls$-motif connected through the Cr-F-Cr angles $\xi_i^\circ$. \fref{f1b} ($b$) shows the $ls$- motif stacking along [110], with the bonding-motif rotated 90$^\circ$ (represented here as blue and red planes to indicate the 90$^\circ$ rotation), whereas the $m$ bonds propagate above and below the $(001)$-plane in the $[1\bar{1}0]$-direction. The four $\mathrm{CrF_6^{4-}}$ distortions can be found in \tref{t1}. The non-equivalent octahedra are sharply tilted, corresponding to the Glazer notation $a^-b^-c^-$ \cite{GLAZER}. \subsection{Magnetic characterization and Neutron diffraction studies} \label{sec:MG} DC temperature dependent magnetic susceptibility experiments on a polycrystalline sample of $\mathrm{NaCrF_3}$ between 4 and 300 K show a kink corresponding to the onset of long-range antiferromagnetic ordering on reaching the N\'eel temperature at $T_N=21.3$ K, \fref{f2} ($a$). Furthermore, an upswing at around 9~K reveals the emergence of a weak ferromagnetic component at lower temperature. The Curie - Weiss (CW) law is applicable for the temperature range 300 - 24 K. The fit to the inverse susceptibility curves 1$/\chi$ show a linear behaviour where the calculated paramagnetic moment of $\mu_{eff}=4.47 \mu_B$ is in good agreement with the theoretical value of the spin-only configuration $S=2$ for $\mathrm{Cr^{2+}}$. The Curie temperature is $\theta=-4$ K measured under 1 T indicates just weak antiferromagnetic interactions. This contrasts with $\mathrm{KCrF_3}$ which displays weak ferromagnetic interactions $\theta=2.7 (1)$ K at 1 T \cite{JACS128} This suggests that reduction of the ion size at the $A$-site is of paramount importance in finetuning the magnetic exchange interactions. \begin{figure}[t!] \flushleft \includegraphics[scale=.65]{FIG4-ART2} \caption{ First derivative $dM/dH$ of the isothermal half-loops at 2, 4, 12, and 23 K. The upswing is represented with connected line-guides. A metamagnetic transition occurs at 8 T in the half-loops at 2 and 4 K. Up and downswing data are emphasized by arrows for the 4 T data.} \label{fig:f2d} \end{figure} Magnetic field dependent isothermal $M (H)$ half-loops (forward and reverse field application) for $\mathrm{NaCrF_3}$ are presented in \fref{f2} ($b$). These loops were measured at 2, 4, 12 and 23 K in applied magnetic fields up to 14 T. At 23 K the half-loop shows almost linear behaviour, nevertheless with a small hysteresis indicating the presence of ferromagnetic interactions. The half-loop at 12 K retains the hysteresis with additional signatures of metamagnetic transitions identified by a clear S-shape occuring between 6 and 8 T. The metamagnetic transition becomes more pronounced with decreasing temperature as observed at 4 and 2 K. At 4 K the hysteresis is at its widest. However, as shown by complete isothermal loop in the inset to \fref{f2} ($b$), there is no longer any hysteresis at 2 K. This means that the ferromagnetic components are suppressed by lowering the temperature. In order to identify the point of metamagnetic transition we calculated the first derivative $d\mathrm{M}/d\mathrm{H}$ of the magnetization $M$ with respect to applied field $H$ as shown in \ref{fig:f2d}. An emergent peak at 8 T is observed below $T_N$ with well-defined singularities at 4 and 2 K. \begin{figure*}[t!] \centering \includegraphics[scale=.6]{FIG5-ART2} \caption{($a$) Rietveld refinements of NPD dataset of $\mathrm{NaCrF_3}$ at 1.5 K from detector bank 2 (lowest resolution bank used in refinements) showing the peak at 7.63 \AA $ $ with the inlet showing small peaks of the magnetic phase. The purple and green tics correspond to the crystal and magnetic phase, respectively. ($b$) Magnetic structure of $\mathrm{NaCrF_3}$ in the [1,-1,0]-direction. The anti-parallel alignment of the spins is represented by the blue-red sequence. Blue, cyan, purple and green atoms correspond to Cr1, Cr2, Cr3 and Cr4 respectively.} \label{fig:f3} \end{figure*} The derived synthesis protocol made it possible to prepare large scale samples with high purity and crystallinity, well suited for detailed neutron diffraction studies. We conducted powder neutron diffraction experiments between 1.5 and 127 K to study the structural and magnetic changes in $\mathrm{NaCrF_3}$ above and below the Néel temperature. Visual inspection of the neutron diffraction patterns reveals a transition originating from the ordering of magnetic moments in the proximity of the Néel temperature, e.g. a strong reflection due to magnetic ordering occurs at $d = 7.63$ \AA, \fref{f3} ($a$). The additional magnetic reflections were indexed in a supercell with doubled $a$- and $b$-unit cell parameters ($2a\times 2b \times c$), corresponding to a propagation vector of $k=(1/2,1/2,0)$ for modulation of the magnetic structure. To describe the magnetic structure in detail, we use magnetic superspace group formalism. The magnetic structure is described in the superspace group $P\bar{1}(\alpha \beta 0)$ with a commensurate modulation vector $(1/2,1/2,0)$. There are no symmetry driven restrictions on the magnetic moment components for any of the 4 positions occupied by Cr atoms. $\mathrm{NaCrF_3}$ adopts a canted $A$-type antiferromagnetic structure where chromium has an ordered magnetic moment of $\mu$ = 3.520(6) $\mu_B$ at 1.5 K, \fref{f3} ($b$). The magnetic moments of chromium atoms are ferromagnetically ordered in the $(1\bar{1}0)$-planes, i.e. along [110] and [001]. We observe canting in the $(1\bar{1}0)$-plane. This cancels out within the magnetic unit cell due to AFM stacking along $[1\bar{1}0]$, which are shown by red and blue colored planes in \fref{f3}. In the triclinic structure, the magnetic moments of chromium atoms point almost directly through the middle of the edge between the equatorial and axial fluorine atoms of the JT distorted $\mathrm{CrF_6}$ octahedra. Consequently, the magnetic moments forming chains in the $[11\bar{1}]$-direction. The canted A-type antiferromagnetic structure is in agreement with the structural $ls$-motif corresponding to ferromagnetic interactions in the $(1\bar{1}0)$-plane and antiferromagnetic interactions perpendicular to it. The $a^-b^-c^-$ tilts reduces the $3d – 2p$ overlap and weaken thereby the superexchange interactions in the presence of Na$^+$ ions. When the direction of the magnetic moments of the four chromium sites were constrained to be either parallel or anti-parallel, several weaker reflections originating from magnetic ordering at i.e. $ d = 5.64$ and $5.86 $ \AA $ $ were not correctly accounted for. Therefore, we applied a slightly more complex set of constraints to the magnetic moment components. \tref{t2} presents the minimal set of magnetic structure parameters and the constraints applied in the refinement. The presence of the two reflections (at $ d = 5.64$ and $5.86 $) clearly shows that the four chromium sites have slightly different canting of their magnetic moments. These subtle aspects of the magnetic structure could only be described due the high resolution and excellent signal to noise ratio of the neutron diffraction data obtained from the WISH instrument at ISIS (UK). The magnetic structure of $\mathrm{NaCrF_3}$ is accurately described at 1.5 K, and details are given in \tref{ST5}. \begin{figure}[t!] \flushleft \includegraphics[scale=.8]{FIG6-ART2} \caption{($a$) Magnetic moment of the chromium cations in $\mathrm{NaCrF_3}$ determined by neutron diffraction as a function of temperature. Temperature evolution of the ($b$) polar and ($c$) azimuthal angles. Constraints are described in \tref{t2}. } \label{fig:f6} \end{figure} The evolution of the magnetic structure was further studied below the N\'eel temperature ($T_N$ = 21.3~K). In accordance with the spin only approximation ($\mu_{eff}$ = 4.47~$\mu_B$ in the paramagnetic regime, see above), the ordered magnetic moment of chromium is 3.520(6)$\mu_B$ at 1.5 K. The slightly lower experimental value compared to the theoretical value (of 4~$\mu_B$) is attributed to hybridization in the chemical bonding which effectively reduces the number of electrons contributing to the magnetic moment. The ordered magnetic moment steadily decreases from $\mu$ = 3.520(6)~$\mu_B$ at 1.5~K with increasing temperature up to the Néel temperature at 21 K where the magnetic ordering disappears (see Fig. \ref{fig:f6}($a$)). The polar angle difference between the magnetic moments of Cr1 and Cr3 is fairly constant (see Fig. \ref{fig:f6}($b,c$)). The two pairs of azimuthal angles (Cr1, Cr3) and (Cr2, Cr4) show similar values, but cannot be constrained to become equal without worsening the fit. However, at 17 and 19 K the azimuthal angle $\vartheta$ of Cr1 and Cr3, and Cr2 and Cr4 could successfully be constrained. For the at 19~K data all angle values were frozen at values obtained at 17~K due to fit instability. The antiferromagnetic ordering at the Néel temperature is associated with a significant thermal contraction of the lattice upon cooling, \fref{f4}. At the ordering temperature, changes in the tilting of the octahedra is revealed by the analyzed changes in the perovskite bond angles. These observations indicate a clear magnetostructural coupling in $\mathrm{NaCrF_3}$. \begin{figure}[t!] \includegraphics[scale=.75]{FIG7-ART2} \caption{ ($a$) Temperature dependence of unit cells dimensions ($a, b, \gamma,$ V) and $\xi^\circ$ angles. ($b$) Temperature dependence of the unit cell lattice parameters ($c$) Perovskite angles composing the canted $ls$-motif $\mathrm{NaCrF_3}$ as function of temperature: $\xi^\circ_1=\mathrm{Cr1-F1-Cr2}$, $\xi^\circ_6=\mathrm{Cr2-F6-Cr4}$, $\xi^\circ_3=\mathrm{Cr4-F3-Cr3}$, $\xi^\circ_5=\mathrm{Cr3-F5-Cr1}$. Vertical dashed line at $T_N$ to emphasize the place where the magnetic long range order sets in.} \label{fig:f4} \end{figure} \section{Discussion} \label{sec:disc} The reliable new synthesis route for $\mathrm{NaCrF_3}$ allowed us to undertake a detailed study of its structure and magnetic properties for the first time. The JT-active ions $\mathrm{Cr^{2+}}$ of $\mathrm{NaCrF_3}$ occupy four non-identical crystallographic sites with different octahedral distortions. Our results demonstrate the importance of the ion size at the $A$-site in tuning the properties of the JT-active $B$-site ions. $A$-site dependent physical phenomena have previously been observed in the $\mathrm{d^{4}}$ isoelectronic low-dimensional manganese (III) fluoroperovskites, where variarions in the $A$-site ion size give rise to rich and interesting phase diagrams under external stimuli. A significant feature of $\mathrm{NaCrF_3}$ is its metamagnetic signatures below $T_N$ under field dependent measurements in addition to weak residual ferromagnetic interactions at 23 K. The presence of metamagnetism in $\mathrm{NaCrF_3}$ resembles in some aspects other known systems with exotic properties (See Ref. \cite{PRB100}, \cite{PRB96}, \cite{PRB98}). We believe that this behavior is related to correlations between the orbital structure and magnetic ordering as discussed by Kugel and Khomskii \cite{KK}. The temperature dependent NPD data reveals a smooth decrease in the unit cell volume and $\gamma$ angle above $T_N$, with a rapid collapse at lower temperatures \fref{f4} ($a$). One would expect that the $\xi^\circ$ angle would reduce for all four $\mathrm{Cr^{2+}}$ sites, however, they follow independent patterns as shown in \fref{f4} ($b$). $\xi^\circ_6$ displays a slight decrease upon cooling while $\xi^\circ_1$ increases. Perovskite angle reduction further decreases the orbital overlap, weakening the magnetic interactions while reinforcing Cr-to-Cr interactions. The refined magnetic moments of $\mathrm{Cr^{2+}}$ ions in $\mathrm{NaCrF_3}$ are in agreement with NPD studies on $\mathrm{KCrF_3}$ by Xiao \emph{et al.}\cite{PRB82}. Compared to other sodium transition metal fluoroperovskites, $\mathrm{NaCrF_3}$ deviates from the family trend by displaying a canted $A-$type magnetic ordering compared to the $G$-types found in $\mathrm{NaNiF_3}$ and $\mathrm{NaCoF_3}$ \cite{NNiF,NCoF}. To further investigate the role of the $A$-site in $A\mathrm{CrF_3}$ we report elsewhere the use of UV-vis spectroscopy along with magnetic characterization studies to compare the local electronic structure of the JT-systems $\mathrm{KCrF_3}$ and $\mathrm{NaCrF_3}$ as a function of temperature and magnetic field \cite{MyPRB}. Such experiments could provide more detailed information on the strength of the JT-distortions and be used to assess OO-melting points in JT-active fluorides. \section{Conclusions} \label{sec:con} This work provides compelling evidence of the existence of the JT-active compound $\mathrm{NaCrF_3}$, and describes its structural and magnetic properties. The successful development of a reliable and reproducible synthesis route, provided the required materials basis for shedding more light on the properties of the $A\mathrm{CrF_3}$ family, which previously proved elusive owing to the air-sensitive chemistry of $\mathrm{Cr^{2+}}$. The structural and magnetic phase diagram of $\mathrm{NaCrF_3}$ is much simpler than the diverse situation observed for $\mathrm{KCrF_3}$ at low temperature. This is due to the smaller $A$-ion size causing the $\mathrm{NaCrF_3}$ structure to adopt the low symmetry space group $P\bar{1}$ at relatively high temperature. The low symmetry structure is responsible for the unusual metamagnetic behavior of $\mathrm{NaCrF_3}$, which can be clearly linked to variations in both the crystal structure (perovskite angles and lattice parameters) and the magnetic structure (polar and azimuthal angles of the magnetic moments), observed in the variable temperature NPD data. The new synthesis protocol opens up the possibility of preparing numerous novel stoichiometric compounds by tuning the $A$ and $B$ sites in fluoroperovskites, which in turn may reveal new and interesting physical properties. \section{Aknowledgements} \label{sec:AK} We thank Serena Margadonna (Swansea University, Swansea, UK) for granted financing support by the Norwegian Research Council (Norges Forskningsr\aa d NFR) project 214260. The U.K. Science and Technology Facilities Council (STFC) is thanked for allocating beamtime at the ISIS Facility. We also thank Pascal Manuel for help during the experiment. We aknowldge CRISMAT laboratory (Caen France) for the magnetization measuraments up to 14 T and Fabien Veillon and Bruno Gonano for technical and analysis help. We thank Susmit Kumar for discussions. \bibliographystyle{apssamp}
\section{Introduction} Carleman estimates are important tools for proving the unique continuation property for partial differential equations. Additionally, Carleman estimates have been successfully applied to study inverse problems and controllability of partial differential equations. Most of Carleman estimates are proved under the assumption that the leading coefficients possess certain regularity. For example, for general second order elliptic operators, Carleman estimates were proved when the leading coefficients are at least Lipschitz \cite{ho3}. In general, the Lipschitz regularity assumption is the optimal condition for the unique continuation property to hold in $\mathbb R^n$ with $n\ge 3$ (see counterexamples constructed by Pli\'s \cite{pl} and Miller \cite{mi}). Therefore, Carleman estimates for second order elliptic operators with general discontinuous coefficients are most likely not valid. Nonetheless, recently, in the case of coefficients having jump discontinuities at an interface with homogeneous or non-homogeneous transmission conditions, one can still prove useful Carleman estimates, see, for example, Le Rousseau-Robbiano \cite{lr1}, \cite{lr2}, Le Rousseau-Lerner \cite{ll}, and \cite{dflvw}. Above mentioned results are proved for real coefficients. In many real world problems, the case of complex-valued coefficients arises naturally. The modeling of the current flows in biological tissues or the propagation of the electromagnetic waves in conductive media are typical examples. In these cases, the conductivities are complex-valued functions. On the other hand, in some situations, the conductivities are not continuous functions. For instance, in the human body, different organs have different conductivities. Therefore, to model the current flow in the human body, it is more reasonable to consider an anisotrotopic complex-valued conductivity with jump-type discontinuities \cite{mph06}. With potential applications in mind, our goal in this paper is to derive a Carleman estimate for the second order elliptic equations with complex-valued leading coefficients having jump-type discontinuities. Although such a Carleman estimate has been derived in \cite{BL}, we want to remark that the method used in \cite{BL}, also in \cite{lr1}, \cite{lr2}, and \cite{ll}, are based on the technique of pseudodifferential operators and hence requires $C^\infty$ coefficients and interface; while the method in \cite{dflvw} (and its parabolic counterpart, \cite{fv18}) relies on the Fourier transform and a version of partition of unity which requires only Lipschitz coefficients and $C^{1,1}$ interface. Hence, the main purpose of the paper is to extend the method in \cite{dflvw}, \cite{fv18} to second order elliptic operators with complex-valued coefficients. It is important to point out that even though second order elliptic operators with complex-valued coefficients can be written as a coupled second order elliptic system with real coefficients, neither the method in \cite{lr1}, \cite{lr2}, \cite{ll} nor that in \cite{dflvw} can be applied to coupled elliptic systems. Therefore, we need to work on operators with complex-valued coefficients directly. Our strategy to derive the Carleman estimate consists of two major steps. In the first step, we treat second order elliptic operators with constant complex coefficients. Based on \cite{BL}, by checking the strong pseudoconvexity and the transmission conditions in a neighborhood of a fixed point at the interface, we can derive a Carleman estimate for second order elliptic operators with constant complex coefficients from \cite[Theorem~1.6]{BL}. We would like to mention that the result in \cite{BL} is stated for quite general complex coefficients, but here we can only verify the transmission condition with our choice of weight functions for complex coefficients having small imaginary parts. So in this paper we will consider this case. In the second step, we extend the Carleman estimate to the operator with non-constant complex coefficients with small imaginary parts. This method in this step is taken from the argument in \cite[Section 4]{dflvw}. The key tool is a version of partition of unity. Furthermore, in the second step, we need an interior Carleman estimate for second order elliptic operators having Lipschitz leading coefficients and with the weight function $\psi_\varepsilon$. An interior Carleman estimate was proved in \cite[Theorem~8.3.1]{ho0}, but for operators with $C^1$ leading coefficients. Another interior estimate was established in \cite[Proposition~17.2.3]{ho3} for operators with Lipschitz leading coefficients, but with a different weight function. H\"ormander remarked in \cite{ho4} (page 703, line 7-8) that "Inspection of proof of Theorem~8.3.1 in \cite{ho0} shows that only Lipschitz continuity was actually used in the proof." But, as far as we can check, there is no formal proof of this statement in literature. To make the paper self contained, we would like give a detailed proof of interior Carleman estimate for second order elliptic operator with Lipschitz leading coefficients and with a rather general weight function, see Proposition~\ref{pr1}. This interior Carleman estimate may be useful on other occasions. In this paper, we present a detailed and elementary derivation of the Carleman estimate for the second order elliptic equations with complex-valued coefficients having jump-type discontinuities following our method in \cite{dflvw}. Having established the Carleman estimate, we then can apply the ideas in \cite{flvw} to prove a three-region inequality and those in \cite{CW} to prove a three-ball inequality across the interface. With the help of the three-ball inequality, we can study the size estimate problem for the complex conductivity equation following the ideas in \cite{CNW}. We will present these quantitative uniqueness results and the application to the size estimate in the forthcoming paper. The paper is organized as follows. In Section~\ref{pre}, we introduce notations that will be used in the paper and the statement of the theorem. In Section~\ref{sub-trans}, we derive a Carleman estimate for the operator having discontinuous piecewise constant coefficients. This Carleman estimate is a special case of \cite[Theorem 1.6]{BL}. Therefore, the main task of Section~\ref{sub-trans} is to check the transmission condition and the strong pseudoconvexity condition. Finally, the main Carleman estimate is proved in Section~\ref{sec4}. The key ingredient is a partition of unity introduced in \cite{dflvw}. \section{Notations and statement of the main theorem}\label{pre} We will state and prove the Carleman estimate for the case where the interface is flat. Since our Carleman estimate is local near any point at the interface, for general $C^{1,1}$ interface, it can be flatten by a suitable change of coordinates. Moreover, the transformed coefficients away from the interface remain Lipschitz. Define $H_{\pm}=\chi_{\mathbb{R}^n_{\pm}}$ where $\mathbb{R}^n_{\pm}=\{(x',x_n)\in \mathbb{R}^{n-1}\times\mathbb{R}|x_n\gtrless0\}$ and $\chi_{\mathbb{R}^n_{\pm}}$ is the characteristic function of $\mathbb{R}^n_{\pm}$. In places we will use equivalently the symbols $\partial$, $\nabla$ and $D=-i\nabla$ to denote the gradient of a function and we will add the index $x'$ or $x_n$ to denote gradient in $\mathbb R^{n-1}$ and the derivative with respect to $x_n$ respectively. We further denote $\partial_\ell=\partial/\partial x_\ell$, $D_\ell=-i\partial_\ell$, and $\partial_{\xi_\ell}=\partial/\partial {\xi_\ell}$. Let $u_\pm\in C^\infty(\mathbb R^n)$. We define \begin{equation*}\label{1.030} u=H_+u_++H_-u_-=\sum_\pm H_{\pm}u_{\pm}, \end{equation*} hereafter, we denote $\sum_\pm a_\pm=a_++a_-$, and \begin{equation}\label{7.1} \mathcal{L}(x,D)u:=\sum_{\pm}H_{\pm}{\rm div}(A_{\pm}(x)\nabla u_{\pm}), \end{equation} where \begin{equation}\label{7.2} A_{\pm}(x)=\{a^{\pm}_{\l j}(x)\}^n_{\l ,j=1}=\{a^{\pm}_{\l j}(x',x_n)\}^n_{\l ,j=1},\quad x'\in \mathbb{R}^{n-1},x_n\in \mathbb{R} \end{equation} is a Lipschitz symmetric matrix-valued function. Assume that \begin{equation}\label{symm0} a_{\l j}^{\pm}(x)=a_{j\l}^{\pm}(x),\quad\forall\;\;\l, j=1,\cdots,n, \end{equation} and furthermore \begin{equation}\label{complex0} a_{\l j}^{\pm}(x)=M_{\l j}^{\pm}(x)+i \gamma N_{\l j}^{\pm}(x), \end{equation} where $(M_{\l j}^{\pm})$ and $(N_{\l j}^{\pm})$ are real-valued matrices and $\gamma> 0$. We further assume that there exist $\lambda_0, \Lambda_0>0$ such that for all $\xi\in\mathbb R^n$ and $x\in \mathbb R^n$ we have \begin{equation}\label{elliptic10} \lambda_0|\xi|^2\le M^{\pm}(x)\xi\cdot\xi\le\Lambda_0|\xi|^2 \end{equation} and \begin{equation}\label{elliptic20} \lambda_0|\xi|^2\le N^{\pm}(x)\xi\cdot\xi\le\Lambda_0|\xi|^2. \end{equation} In the paper, we consider Lipschitz coefficients $A_{\pm}$, i.e., there exists a constant $M_0>0$ such that \begin{equation}\label{7.4} |A_{\pm}(x)-A_{\pm}(y)|\leq M_0|x-y|. \end{equation} To treat the transmission conditions, we write \begin{equation}\label{7.5} h_0(x'):=u_+(x',0)-u_-(x',0),\ \forall\,\; x'\in \mathbb{R}^{n-1}, \end{equation} \begin{equation}\label{7.6} h_1(x'):=A_+(x',0)\nabla u_+(x',0)\cdot \nu-A_-(x',0)\nabla u_-(x',0)\cdot \nu,\ \forall\,\; x'\in \mathbb{R}^{n-1}, \end{equation} where $\nu=e_n$. Let us now introduce the weight function. Let $\varphi$ be \begin{equation}\label{2.1} \varphi(x_n)= \begin{cases} \begin{array}{l} \varphi_+(x_n):=\alpha_+x_n+\beta x_n^2/2,\quad x_n\geq 0,\\ \varphi_-(x_n):=\alpha_-x_n+\beta x_n^2/2,\quad x_n< 0, \end{array} \end{cases} \end{equation} where $\alpha_+$, $\alpha_-$ and $\beta$ are positive numbers which will be determined later. In what follows we denote by $\varphi_{+}$ and $\varphi_{-}$ the restriction of the weight function $\varphi$ to $[0,+\infty)$ and to $(-\infty,0)$ respectively. We use similar notation for any other weight functions. For any $\varepsilon>0$ let \begin{equation}\label{psi} \psi_{\varepsilon}(x):=\varphi(x_n)-\frac{\varepsilon}{2}|x'|^2, \end{equation} and let \begin{equation}\label{wei} \phi_{\delta}(x):=\psi_{\delta}(\delta^{-1}x),\quad\delta>0. \end{equation} For a function $h\in L^2(\mathbb{R}^{n})$, we define \begin{equation* \hat{h}(\xi',x_n)=\int_{\mathbb{R}^{n-1}}h(x',x_n)e^{-ix'\cdot\xi}\,dx',\quad \xi'\in \mathbb{R}^{n-1}. \end{equation*} As usual we denote by $H^{1/2}(\mathbb{R}^{n-1})$ the space of the functions $f\in L^2(\mathbb{R}^{n-1})$ satisfying $$\int_{\mathbb{R}^{n-1}}|\xi'||\hat{f}(\xi')|^2d\xi'<\infty,$$ with the norm \begin{equation}\label{semR} \|f\|^2_{H^{1/2}(\mathbb{R}^{n-1})}=\int_{\mathbb{R}^{n-1}}(1+|\xi'|^2)^{1/2}|\hat{f}(\xi')|^2d\xi'. \end{equation} Moreover we define $$[f]_{1/2,\mathbb{R}^{n-1}}=\left[\int_{\mathbb{R}^{n-1}}\int_{\mathbb{R}^{n-1}}\frac{|f(x)-f(y)|^2}{|x-y|^n}dydx\right]^{1/2},$$ and recall that there is a positive constant $C$, depending only on $n$, such that \begin{equation* C^{-1}\int_{\mathbb{R}^{n-1}}|\xi'||\hat{f}(\xi')|^2d\xi'\leq[f]^2_{1/2,\mathbb{R}^{n-1}}\leq C\int_{\mathbb{R}^{n-1}}|\xi'||\hat{f}(\xi')|^2d\xi', \end{equation*} so that the norm \eqref{semR} is equivalent to the norm $\|f\|_{L^2(\mathbb{R}^{n-1})}+[f]_{1/2,\mathbb{R}^{n-1}}$. We use the letters $C, C_0, C_1, \cdots$ to denote constants. The value of the constants may change from line to line, but it is always greater than $1$. We will denote by $B'_r(x')$ the $(n-1)$-ball centered at $x'\in \mathbb{R}^{n-1}$ with radius $r>0$. Whenever $x'=0$ we denote $B'_r=B'_r(0)$. Likewise, we denote $B_r(x)$ be the $n$-ball centered at $x\in\mathbb R^n$ with radius $r>0$ and $B_r=B_r(0)$. \bigskip \begin{theorem}\label{thm8.2} Let $u$ and $A_{\pm}(x)$ satisfy \eqref{7.1}-\eqref{7.6}. There exist $\alpha_+,\alpha_-,\beta, \delta_0, r_0, \gamma_0$ and $C$ depending on $\lambda_0, \Lambda_0, M_0$ such that if $\gamma<\gamma_0$, $\delta\le\delta_0$ and $\tau\geq C$, then \begin{equation}\label{8.24} \begin{aligned} &\sum_{\pm}\sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n_{\pm}}|D^k{u}_{\pm}|^2e^{2\tau\phi_{\delta,\pm}(x',x_n)}dx'dx_n+\sum_{\pm}\sum_{k=0}^1\tau^{3-2k}\int_{\mathbb{R}^{n-1}}|D^k{u}_{\pm}(x',0)|^2e^{2\phi_\delta(x',0)}dx'\\ &+\sum_{\pm}\tau^2[e^{\tau\phi_{\delta}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\sum_{\pm}[D(e^{\tau\phi_{\delta,\pm}}u_{\pm})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}\\ \leq &C\left(\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|\mathcal{L}(x,D)(u_{\pm})|^2\,e^{2\tau\phi_{\delta,\pm}(x',x_n)}dx'dx_n+[e^{\tau\phi_\delta(\cdot,0)}h_1]^2_{1/2,\mathbb{R}^{n-1}}\right.\\ &\left.+[D_{x'}(e^{\tau\phi_\delta}h_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\tau^{3}\int_{\mathbb{R}^{n-1}}|h_0|^2e^{2\tau\phi_\delta(x',0)}dx'+\tau\int_{\mathbb{R}^{n-1}}|h_1|^2e^{2\tau\phi_\delta(x',0)}dx'\right). \end{aligned} \end{equation} where $u=H_+u_++H_-u_-$, $u_{\pm}\in C^\infty(\mathbb{R}^{n})$ and ${\rm supp}\, u\subset B'_{\delta r_0}\times[-\delta r_0,\delta r_0]$, and $\phi_\delta$ is given by \eqref{wei}. \end{theorem} \begin{remark} Estimate \eqref{8.24} is a local Carleman estimate near $x_n=0$. As mentioned above, by flattening the interface, we can derive a local Carleman estimate near a $C^{1,1}$ interface from \eqref{8.24}. Nonetheless, an estimate like \eqref{8.24} is sufficient for some applications such as the inverse problem of estimating the size of an inclusion by one pair of boundary measurement {\rm (}see, for example, {\rm\cite{flvw}}{\rm )}. \end{remark} \section{Carleman estimate for operators with constant coefficients}\label{sub-trans} The purpose of this section is to derive \eqref{8.24} for ${\mathcal L}(x,D)$ with discontinuous piecewise constant coefficients. More precisely, we derive \eqref{8.24} for ${\mathcal L}_0(D)$, where ${\mathcal L}_0(D)$ is obtained from ${\mathcal L}(x,D)$ by freezing the variable $x$ at $(x'_0,0)$. Without loss of generality, we take $(x'_0,0)=(0,0)=0$ and thus \[ {\mathcal L}_0(D)u=\mathcal{L}(0,D)u=\sum_{\pm}H_{\pm}{\rm div}(A_{\pm}(0)\nabla u_{\pm}). \] Since ${\mathcal L}_0$ has piecewise constant coefficients, to prove \eqref{8.24}, we will apply \cite[Theorem~1.6]{BL}. So the task here is to verify the strong pseudoconvexity and transmission conditions for operator ${\mathcal L}_0$ with the weight function given in \eqref{psi}. To streamline the presentation, we define $\Omega_1:=\{x_n<0\}, \Omega_2:=\{x_n>0\}$. On each side of the interface, we have complex second order elliptic operators. We denote \[ P_k=\sum_{1\le j,\l\le n}a_{\l j}^{(k)}D_\ell D_j,\quad k=1,2, \] where $a_{\l j}^{(1)}=a_{\l j}^-$ and $a_{\l j}^{(2)}=a_{\l j}^+$. Here we denote $a_{\l j}^{(k)}=a_{\l j}^{(k)}(0)$. Corresponding to \eqref{symm0}-\eqref{elliptic20}, we have \begin{equation}\label{symm} a_{\l j}^{(k)}=a_{j\l}^{(k)}, \end{equation} \begin{equation}\label{complex} a_{\l j}^{(k)}=M_{\l j}^{(k)}+i \gamma N_{\l j}^{(k)}, \end{equation} \begin{equation}\label{elliptic1} \lambda_0|\xi|^2\le M^{(k)}\xi\cdot\xi\le\Lambda_0|\xi|^2, \end{equation} \begin{equation}\label{elliptic2} \lambda_0|\xi|^2\le N^{(k)}\xi\cdot\xi\le\Lambda_0|\xi|^2. \end{equation} Since some computations in the verification of the transmission conditions are useful in proving the strong pseudoconvexity condition, we will begin with the discussion of the transmission conditions at the interface $\{x_n=0\}$. \subsection{Transmission conditions} We consider the natural transmission conditions that use the interface operators \[ T_k^1=(-1)^k,\quad T_k^2=(-1)^k\sum_{1\le j\le n}a_{nj}^{(k)}D_j \] that correspond to the continuity of the solution and of the normal flux, respectively. We now write the weight function \begin{equation}\label{psieps} \psi_\varepsilon(x)=\varphi(x_n)-\frac{\varepsilon}{2}|x'|^2, \end{equation} where \[ \varphi(x_n)=\left\{ \begin{aligned} &\varphi_1(x_n),\quad x_n< 0\\ &\varphi_2(x_n),\quad x_n\ge 0, \end{aligned}\right. \] and \[ \varphi_k(x_n)=\alpha_kx_n+\frac 12\beta x_n^2 \] with $\alpha_1, \alpha_2>0$ (corresponding to $\alpha_-$ and $\alpha_+$ in \eqref{2.1}, respectively) and $\beta>0$. Notice that $\varphi$ is smooth in $\Omega_1, \Omega_2$ and is continuous across the interface. Then we have \[ \nabla\psi_\varepsilon(0)=\left\{ \begin{aligned} &(0,\cdots,0,\alpha_1),\quad x_n< 0\\ &(0,\cdots,0,\alpha_2),\quad x_n\ge 0. \end{aligned}\right. \] Following the notations and the calculations in \cite[Section 1.7.1]{BL}, we have for $\omega:=(0,\xi',\nu,\tau)$ with $\xi'=(\xi_1,\cdots,\xi_{n-1})\ne 0, \nu=e_n$ and $\lambda\in{\mathbb C}$, \[ {\tilde t}_{k,\psi_\varepsilon}^1(\omega,\lambda)=(-1)^k \] and \[ \begin{aligned} {\tilde t}_{k,\psi_\varepsilon}^2(\omega,\lambda)&=(-1)^ka_{nn}^{(k)}((-1)^k\lambda+i\tau\partial_{x_n}\psi_\varepsilon(0))+(-1)^k\sum_{1\le j\le n-1}a_{nj}^{(k)}(\xi_j+i\tau\partial_{x_j}\psi_\varepsilon(0))\\ &=(-1)^ka_{nn}^{(k)}((-1)^k\lambda+i\tau\alpha_k)+(-1)^k\sum_{1\le j\le n-1}a_{nj}^{(k)}\xi_j. \end{aligned} \] The principal symbols of $P_k$, $k=1,2$, can be written as \begin{equation}\label{pk} p_k(\xi)=a_{nn}^{(k)}((\xi_n+\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j)^2+b_k(\xi')), \end{equation} where \begin{equation}\label{bk} b_k(\xi')=(a_{nn}^{(k)})^{-2}\sum_{1\le\l, j\le n-1}(a_{\l j}^{(k)}a_{nn}^{(k)}-a_{n\l}^{(k)}a_{nj}^{(k)})\xi_\l\xi_j. \end{equation} We also need to introduce the principal symbol of the conjugate operators \begin{equation}\label{tpk} \begin{aligned} \tilde p_{k,\psi_\varepsilon}(\omega,\lambda)&=a_{nn}^{(k)}\Big{[}\big{(}(-1)^k\lambda+i\tau\partial_{x_n}\psi_\varepsilon(0)+\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}(\xi_j+i\tau\partial_{x_j}\psi_\varepsilon(0))\big{)}^2\\ &\qquad +b_k(\xi'+i\tau\partial_{x'}\psi_\varepsilon(0))\Big{]}\\ &=a_{nn}^{(k)}\Big{[}\big{(}(-1)^k\lambda+i\tau\alpha_k+\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j\big{)}^2+b_k(\xi')\Big{]}. \end{aligned} \end{equation} Let us introduce $A^{(k)}, B^{(k)}\in\mathbb R$ for $k=1,2$ such that \begin{equation}\label{bk0} \begin{aligned} b_k(\xi')&=(a_{nn}^{(k)})^{-2}\sum_{1\le\l, j\le n-1}(a_{\l j}^{(k)}a_{nn}^{(k)}-a_{n\l}^{(k)}a_{nj}^{(k)})\xi_\l\xi_j\\ &=(A^{(k)}-iB^{(k)})^2, \end{aligned} \end{equation} where $A^{(k)}\ge 0$. We also denote \begin{equation}\label{efk} \sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j=E^{(k)}+iF^{(k)}, \end{equation} where $E^{(k)}, F^{(k)}\in\mathbb R$. Using \eqref{tpk}, \eqref{bk0}, and \eqref{efk}, we can write \[ \begin{aligned} \tilde p_{2,\psi_\varepsilon}&=a_{nn}^{(2)}[(\lambda+i\tau\alpha_2+E^{(2)}+iF^{(2)})^2+(A^{(2)}-iB^{(2)})^2]\\ &=a_{nn}^{(2)}[(\lambda+i\tau\alpha_2+E^{(2)}+iF^{(2)}+i(A^{(2)}-iB^{(2)}))\\ &\quad\cdot(\lambda+i\tau\alpha_2+E^{(2)}+iF^{(2)}-i(A^{(2)}-iB^{(2)}))]\\ &=a_{nn}^{(2)}(\lambda-\sigma_1^{(2)})(\lambda-\sigma_2^{(2)}), \end{aligned} \] where \[ \begin{aligned} \sigma_1^{(2)}&=-E^{(2)}-B^{(2)}-i(\tau\alpha_2+F^{(2)}+A^{(2)}),\\ \sigma_2^{(2)}&=-E^{(2)}+B^{(2)}-i(\tau\alpha_2+F^{(2)}-A^{(2)}). \end{aligned} \] On the other hand, we can write \[ \begin{aligned} \tilde p_{1,\psi_\varepsilon}&=a_{nn}^{(1)}[(-\lambda+i\tau\alpha_1+E^{(1)}+iF^{(1)})^2+(A^{(1)}-iB^{(1)})^2]\\ &=a_{nn}^{(1)}[(\lambda-i\tau\alpha_1-E^{(1)}-iF^{(1)}+i(A^{(1)}-iB^{(1)}))\\ &\quad\cdot(\lambda-i\tau\alpha_1-E^{(1)}-iF^{(1)}-i(A^{(1)}-iB^{(1)}))]\\ &=a_{nn}^{(1)}(\lambda-\sigma_1^{(1)})(\lambda-\sigma_2^{(1)}), \end{aligned} \] where \[ \begin{aligned} \sigma_1^{(1)}&=E^{(1)}+B^{(1)}+i(\tau\alpha_1+F^{(1)}+A^{(1)}),\\ \sigma_2^{(1)}&=E^{(1)}-B^{(1)}+i(\tau\alpha_1+F^{(1)}-A^{(1)}). \end{aligned} \] Let us introduce the polynomial \[ K_{k,\psi_\varepsilon}(\omega,\lambda):=\prod_{{\scriptsize{{\mbox{{\rm Im\,}}}}}\sigma_j^{(k)}\ge 0}(\lambda-\sigma_j^{(k)}). \] Now we state the definition of transmission conditions given in \cite[Definition~1.4]{BL}. \begin{definition}\label{def3.1} The pair $\{P_k,\psi_\varepsilon, T_k^j,\; k=1,2,\; j=1,2\}$ satisfies the transmission condition at $\omega$ if for any polynomials $q_1(\lambda), q_2(\lambda)$, there exist polynomials $U_1(\lambda), U_2(\lambda)$ and constant $c_1, c_2$ such that \[ \left\{ \begin{aligned} q_1(\lambda)&=c_1\tilde t^1_{1,\psi_\varepsilon}(\omega,\lambda)+c_2\tilde t^2_{1,\psi_\varepsilon}(\omega,\lambda)+U_1(\lambda)K_{1,\psi_\varepsilon}(\omega,\lambda),\\ q_2(\lambda)&=c_1\tilde t^1_{2,\psi_\varepsilon}(\omega,\lambda)+c_2\tilde t^2_{2,\psi_\varepsilon}(\omega,\lambda)+U_2(\lambda)K_{2,\psi_\varepsilon}(\omega,\lambda). \end{aligned}\right. \] \end{definition} In order to check the transmission conditions, we need to study the polynomial $K_{k,\psi_\varepsilon}(\omega,\lambda)$. For this reason, we need to determine the signs of the imaginary parts of the roots $\sigma_j^{(k)}$ defined above. Note that we can write \begin{equation}\label{0517} b_k(\xi')=\frac{1}{a_{nn}^{(k)}}\sum_{1\le\l, j\le n-1}a_{\l j}^{(k)}\xi_\l \xi_j-(E^{(k)}+iF^{(k)})^2. \end{equation} Since $b_k$ plays an essential role, we begin by working some calculations on the matrix $\frac{1}{a_{nn}^{(k)}}{\cal A}^{(k)}$, where ${\cal A}^{(k)}$ is the matrix $(a_{\l j}^{(k)})$. Let $a_{nn}^{(k)}=|a_{nn}^{(k)}|e^{i\theta}$. Choosing $\xi=e_n$, we have that \[ a_{nn}^{(k)}=\sum_{1\le\l, j\le n}a_{\l j}^{(k)}\xi_\l\xi_j=\sum_{1\le\l, j\le n}M_{\l j}^{(k)}\xi_\l\xi_j+i\gamma\sum_{1\le\l, j\le n}N_{\l j}^{(k)}\xi_\l\xi_j. \] Hence, from \eqref{elliptic1}, \eqref{elliptic2}, we have that \[ \lambda_0\le{\mbox{\rm Re\,}}(a_{nn}^{(k)})\le\Lambda_0\quad\mbox{and}\quad\lambda_0\le\frac{{\mbox{{\rm Im\,}}}(a_{nn}^{(k)})}{\gamma}\le\Lambda_0 \] and so that $\theta\in[0,\pi/2)$. Let us evaluate \begin{equation}\label{04-8} \begin{aligned} (a_{nn}^{(k)})^{-1}{\cal A}^{(k)}&=|a_{nn}^{(k)}|^{-1}(M^{(k)}+i\gamma N^{(k)})(\cos\theta-i\sin\theta)\\ &=|a_{nn}^{(k)}|^{-1}[\cos\theta M^{(k)}+\gamma \sin\theta N^{(k)}+i(-\sin\theta M^{(k)}+\gamma\cos\theta N^{(k)})]. \end{aligned} \end{equation} Using \eqref{elliptic1}, \eqref{elliptic2} again, we see that for $\xi\in\mathbb R^n$ \begin{equation}\label{55} \begin{aligned} {\mbox{\rm Re\,}}((a_{nn}^{(k)})^{-1}{\cal A}^{(k)}\xi\cdot\xi)&=|a_{nn}^{(k)}|^{-1}[\cos\theta M^{(k)}\xi\cdot\xi+\gamma \sin\theta N^{(k)}\xi\cdot\xi]\\ &\ge|a_{nn}^{(k)}|^{-1}\lambda_0(\cos\theta+\gamma\sin\theta)|\xi|^2. \end{aligned} \end{equation} In fact, since $\cos\theta=M_{nn}^{(k)}|a_{nn}^{(k)}|^{-1}$ and $\sin\theta=\gamma N_{nn}^{(k)}|a_{nn}^{(k)}|^{-1}$, while $|a_{nn}^{(k)}|^2=(M_{nn}^{(k)})^2+\gamma^2(N_{nn}^{(k)})^2$, we have \begin{equation}\label{66} |a_{nn}^{(k)}|^{-1}(\cos\theta+\gamma\sin\theta)=\frac{M_{nn}^{(k)}+\gamma^2N_{nn}^{(k)}}{(M_{nn}^{(k)})^2+\gamma^2(N_{nn}^{(k)})^2}\ge\frac{\lambda_0(1+\gamma^2)}{\Lambda_0^2(1+\gamma^2)}=\frac{\lambda_0}{\Lambda_0^2}. \end{equation} Combining \eqref{55} and \eqref{66} implies \begin{equation}\label{88} {\mbox{\rm Re\,}}((a_{nn}^{(k)})^{-1}{\cal A}^{(k)}\xi\cdot\xi)\ge\frac{\lambda_0^2}{\Lambda_0^2}|\xi|^2:=\tilde\lambda_1|\xi|^2. \end{equation} Now let us write \begin{equation}\label{20} \begin{aligned} &\tilde\lambda_1|\xi|^2\le{\mbox{\rm Re\,}}((a_{nn}^{(k)})^{-1}{\cal A}^{(k)}\xi\cdot\xi)\\ =&{\mbox{\rm Re\,}}[\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l\xi_j+2\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_n\xi_j+\xi_n^2]\\ =&\xi_n^2+2b_0^{(k)}(\xi')\xi_n+b_1^{(k)}(\xi'), \end{aligned} \end{equation} where \[ b_0^{(k)}(\xi')={\mbox{\rm Re\,}}(\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j)={\mbox{\rm Re\,}}(E^{(k)}+iF^{(k)})=E^{(k)} \] and \[ b_1^{(k)}(\xi')={\mbox{\rm Re\,}}(\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l\xi_j). \] Substituting $\tilde\xi_n=\xi_n=-b_0^{(k)}(\xi')$ into \eqref{20} gives \[ \tilde\lambda_1(|\xi'|^2+|\tilde\xi_n|^2)\le\tilde\xi_n^2-2b_0^{(k)}(\xi')\tilde\xi_n+b_1^{(k)}(\xi')=-(b_0^{(k)}(\xi')^2+b_1^{(k)}(\xi'), \] which implies \begin{equation}\label{50} \tilde\lambda_1|\xi'|^2\le{\mbox{\rm Re\,}}(\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l\xi_j)-E_k^2. \end{equation} Putting \eqref{0517} and \eqref{50} together gives \begin{equation}\label{501} \begin{aligned} {\mbox{\rm Re\,}}(b_k(x_0,\xi'))&={\mbox{\rm Re\,}}(\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l\xi_j)-(E^{(k)})^2+(F^{(k)})^2\\ &\ge\tilde\lambda_1|\xi'|^2+(F^{(k)})^2>0. \end{aligned} \end{equation} The following lemma guarantees the positivity of $A^{(k)}$. \begin{lemma}\label{ak} Assume that \eqref{elliptic1} and \eqref{elliptic2} hold. Then \begin{equation}\label{akk} A^{(k)}\ge\sqrt{\tilde\lambda_1|\xi'|^2+|F^{(k)}|^2}>|F^{(k)}|. \end{equation} \end{lemma} \noindent{\bf Proof} From \eqref{bk0}, it is easy to see that \[ A^{(k)}={\mbox{\rm Re\,}}\sqrt{b_k}=\sqrt{\frac{a+\sqrt{a^2+b^2}}{2}}, \] where $a={\mbox{\rm Re\,}} b_k$ and $b={\mbox{{\rm Im\,}}} b_k$. We have from \eqref{501} that $a>0$ and thus \[ A^{(k)}\ge\sqrt{a}\ge\sqrt{\tilde\lambda_1|\xi'|^2+(F^{(k)})^2}>|F^{(k)}|. \] \eproof Lemma~\ref{ak} implies \begin{equation}\label{001} \begin{aligned} {\mbox{{\rm Im\,}}}\sigma_1^{(2)}&=-(\tau\alpha_2+F^{(2)}+A^{(2)})=-\tau\alpha_2-F^{(2)}-A^{(2)}\\ &\le-\tau\alpha_2-|F^{(2)}|-F^{(2)}\le-\tau\alpha_2<0 \end{aligned} \end{equation} and \begin{equation}\label{002} {\mbox{{\rm Im\,}}}\sigma_1^{(1)}=\tau\alpha_1+F^{(1)}+A^{(1)}>\tau\alpha_1+F^{(1)}+|F^{(1)}|\ge\tau\alpha_1>0. \end{equation} We are now ready to check the transmission condition defined in Definition~\ref{def3.1}. Being able to satisfy this condition depends on the degree of $K_{1,\psi_\varepsilon}$ and $K_{2,\psi_\varepsilon}$, that is, on the number of roots with negative imaginary parts. \bigskip\noindent {\bf Case 1}. $\tilde p_{2,\psi_\varepsilon}$ has two roots in $\{{\mbox{{\rm Im\,}}} z<0\}$, i.e., $-\tau\alpha_2-F^{(2)}+A^{(2)}<0$ in view of \eqref{001}. In this case, we have that \[ K_{2,\psi_\varepsilon}=1,\;\;\mbox{\rm while}\;\; K_{1,\psi_\varepsilon}\;\;\mbox{\rm has degree}\; 1\;\mbox{or}\; 2\;\; (\mbox{note}\; \eqref{002}). \] Since ${\tilde t}_{2,\psi_\varepsilon}^1(\omega,\lambda)=1$ and \[ {\tilde t}_{2,\psi_\varepsilon}^2(\omega,\lambda)=a_{nn}^{(2)}(\lambda+i\tau\alpha_2+\sum_{1\le j\le n-1}\frac{a_{nj}^{(2)}}{a_{nn}^{(2)}}\xi_j), \] for any $q_2(\lambda)$, we simply choose \[ U_2(\lambda)=q_2(\lambda)-c_1\tilde t^1_{2,\psi_\varepsilon}-c_2\tilde t^2_{2,\psi_\varepsilon}. \] On the other hand, we have ${\tilde t}_{1,\psi_\varepsilon}^1(\omega,\lambda)=-1$ and \[ {\tilde t}_{1,\psi_\varepsilon}^2(\omega,\lambda)=a_{nn}^{(1)}(\lambda-i\tau\alpha_1-\sum_{1\le j\le n-1}\frac{a_{nj}^{(1)}}{a_{nn}^{(1)}}\xi_j). \] Then for any polynomial $q_1(\lambda)$, we choose $U_1(\lambda)$ to be the quotient of the division between $q_1$ and $K_{1,\psi_\varepsilon}$. The remainder term is equal to $c_1\tilde t_{1,\psi_\varepsilon}+c_2\tilde t_{2,\psi_\varepsilon}$ with suitable $c_1$, $c_2$. \bigskip\noindent {\bf Case 2}. Assume that ${\mbox{{\rm Im\,}}} \sigma_2^{(2)}\ge 0$ and ${\mbox{{\rm Im\,}}} \sigma_2^{(1)}\ge 0$, i.e., \[ -\tau\alpha_2-F^{(2)}+A^{(2)}\ge 0,\quad\tau\alpha_1+F^{(1)}-A^{(1)}\ge 0. \] Then $K_{1,\psi_\varepsilon}$ has degree $2$ and $K_{2,\psi_\varepsilon}$ has degree $1$. In order to avoid this case, we need to be sure that if $-\tau\alpha_2-F^{(2)}+A^{(2)}\ge 0$, then $\tau\alpha_1+F^{(1)}-A^{(1)}<0$, that is, \[ \tau\alpha_2+F^{(2)}-A^{(2)}\le 0\Rightarrow \tau\alpha_1+F^{(1)}-A^{(1)}<0. \] This can be achieved by assuming that \begin{equation}\label{tc20} \frac{\alpha_2}{\alpha_1}>\frac{A^{(2)}-F^{(2)}}{A^{(1)}-F^{(1)}},\;\;\forall\;\;\xi'\ne 0. \end{equation} Recall that $A^{(k)}-F^{(k)}>0$, $k=1,2$. We remark that all $A^{(k)}$ and $F^{(k)}$ are homogeneous of degree $1$ in $\xi'$. Hence \eqref{tc20} holds provided \begin{equation}\label{tc2} \frac{\alpha_2}{\alpha_1}=\max_{|\xi'|=1}\left\{\frac{A^{(2)}-F^{(2)}}{A^{(1)}-F^{(1)}}\right\}+1. \end{equation} Hence, if we assume \eqref{tc2}, then the transmission condition is satisfied. \bigskip\noindent {\bf Case 3}. Each symbol has exactly one root in $\{{\mbox{{\rm Im\,}}} z<0\}$, i.e., \[ \tau\alpha_1+F^{(1)}-A^{(1)}<0,\quad -\tau\alpha_2-F^{(2)}+A^{(2)}>0. \] In this case, we have \[ K_{1,\psi_\varepsilon}=(\lambda-\sigma_1^{(1)}),\quad K_{2,\psi_\varepsilon}=(\lambda-\sigma_2^{(2)}). \] Given polynomials $q_1(\lambda), q_2(\lambda)$, there exist $U_1(\lambda), U_2(\lambda)$ such that \[ \begin{aligned} q_1(\lambda)&=U_1(\lambda)K_{1,\psi_\varepsilon}+\tilde q_1,\\ q_2(\lambda)&=U_2(\lambda)K_{2,\psi_\varepsilon}+\tilde q_2, \end{aligned} \] where $\tilde q_1, \tilde q_2$ are constants in $\lambda$. The transmission condition is satisfied if there exists constants $\mu_1, \mu_2, c_1, c_2$ so that \[ \left\{\begin{aligned} \tilde q_1&=\mu_1K_{1,\psi_\varepsilon}+c_1\tilde t_{1,\psi_\varepsilon}^1+c_2\tilde t_{1,\psi_\varepsilon}^2,\\ \tilde q_2&=\mu_2K_{2,\psi_\varepsilon}+c_1\tilde t_{2,\psi_\varepsilon}^1+c_2\tilde t_{2,\psi_\varepsilon}^2, \end{aligned}\right. \] namely, \begin{equation}\label{tc0} \left\{\begin{aligned} \tilde q_1&=\mu_1(\lambda-\sigma_1^{(1)})-c_1+c_2a_{nn}^{(1)}(\lambda-i\tau\alpha_1-E^{(1)}-iF^{(1)})\\ \tilde q_2&=\mu_2(\lambda-\sigma_2^{(2)})+c_1+c_2a_{nn}^{(2)}(\lambda+i\tau\alpha_2+E^{(2)}+iF^{(2)}). \end{aligned}\right. \end{equation} System \eqref{tc0} is equivalent to \begin{equation}\label{tc1} \left\{ \begin{aligned} &\mu_1+c_2a_{nn}^{(1)}=0\\ &\mu_2+c_2a_{nn}^{(2)}=0\\ &\mu_1\sigma_1^{(1)}+c_1+c_2a_{nn}^{(1)}(i\tau\alpha_1+E^{(1)}+iF^{(1)})=-\tilde q_1\\ &-\mu_2\sigma_2^{(2)}+c_1+c_2a_{nn}^{(2)}(i\tau\alpha_2+E^{(2)}+iF^{(2)})=\tilde q_2. \end{aligned}\right. \end{equation} System \eqref{tc1} has a unique solution if and only if the matrix \[ T=\begin{pmatrix}1&0&0&a_{nn}^{(1)}\\0&1&0&a_{nn}^{(2)}\\\sigma_1^{(1)}&0&1&\zeta_1\\0&-\sigma_2^{(2)}&1&\zeta_2\end{pmatrix} \] with $\zeta_1=a_{nn}^{(1)}(i\tau\alpha_1+E^{(1)}+iF^{(1)})$, $\zeta_2=a_{nn}^{(2)}(i\tau\alpha_2+E^{(2)}+iF^{(2)})$, is nonsingular. We compute \[ \begin{aligned} \mbox{\rm det}T=&\mbox{\rm det}\begin{pmatrix}1&0&a_{nn}^{(1)}\\0&1&a_{nn}^{(2)}\\0&-\sigma_2^{(2)}&\zeta_2\end{pmatrix}-\mbox{\rm det}\begin{pmatrix}1&0&a_{nn}^{(1)}\\0&1&a_{nn}^{(2)}\\\sigma_1^{(1)}&0&\zeta_1\end{pmatrix}\\ =&\zeta_2+\sigma_2^{(2)}a_{nn}^{(2)}-\zeta_1+\sigma_1^{(1)}a_{nn}^{(1)}\\ =&a_{nn}^{(2)}(i\tau\alpha_2+E^{(2)}+iF^{(2)}-E^{(2)}+B^{(2)}-i\tau\alpha_2-iF^{(2)}+iA^{(2)})\\ &+a_{nn}^{(1)}(-i\tau\alpha_1-E^{(1)}-iF^{(1)}+E^{(1)}+B^{(1)}+i\tau\alpha_1+iF^{(1)}+iA^{(1)})\\ =&a_{nn}^{(2)}(B^{(2)}+iA^{(2)})+a_{nn}^{(1)}(B^{(1)}+iA^{(1)}). \end{aligned} \] Therefore, if \begin{equation}\label{ne0} a_{nn}^{(2)}(B^{(2)}+iA^{(2)})+a_{nn}^{(1)}(B^{(1)}+iA^{(1)})\ne 0, \end{equation} then the transmission condition holds. We now verify \eqref{ne0}. In the real case where $a_{nn}^{(2)}, a_{nn}^{(1)}$ are positive real numbers, it is easy to see that \[ a_{nn}^{(2)}A^{(2)}+a_{nn}^{(1)}A^{(1)}>0 \] and thus \eqref{ne0} holds. For the complex case, we want to show that there exists $\gamma_0>0$ such that if $\gamma<\gamma_0$, then \eqref{ne0} is satisfied. Let $u_k=A^{(k)}+i B^{(k)}$ and $v_k=iu_k=-B^{(k)}+iA^{(k)}$. We will consider $u_k$ and $v_k$ as vectors in $\mathbb R^2$, i.e., $u_k=(A^{(k)},B^{(k)})$, $v_k=u_k^\perp=(-B^{(k)},A^{(k)})$. Let $a_{nn}^{(k)}=\eta^{(k)}+i\gamma\delta^{(k)}$ for $\eta^{(k)}, \delta^{(k)}\in\mathbb R$. By the ellipticity conditions \eqref{elliptic1}, \eqref{elliptic2}, we have \[ \lambda_0\le\eta^{(k)}\le\Lambda_0,\quad\lambda_0\le\delta^{(k)}\le\Lambda_0. \] Notice that $\mbox{\rm det}T=0$ if and only if \[ (\eta^{(2)}+i\gamma\delta^{(2)})(B^{(2)}+iA^{(2)})+(\eta^{(1)}+i\gamma\delta^{(1)})(B^{(1)}+iA^{(1)})=0, \] i.e., \[ \begin{aligned} &(\eta^{(2)}B^{(2)}-\gamma\delta^{(2)}A^{(2)}+\eta^{(1)}B^{(1)}-\gamma\delta^{(1)}A^{(1)})\\ &\;\;+i(\eta^{(2)}A^{(2)}+\gamma\delta^{(2)}B^{(2)}+\eta^{(1)}A^{(1)}+\gamma\delta^{(1)}B^{(1)})=0, \end{aligned} \] which is equivalent to \begin{equation}\label{tc5} \eta^{(2)}\begin{pmatrix}A^{(2)}\\B^{(2)}\end{pmatrix}+\eta^{(1)}\begin{pmatrix}A^{(1)}\\B^{(1)}\end{pmatrix}=\gamma\delta^{(2)}\begin{pmatrix}-B^{(2)}\\A^{(2)}\end{pmatrix}+\gamma\delta^{(1)}\begin{pmatrix}-B^{(1)}\\A^{(1)}\end{pmatrix} \end{equation} or simply \begin{equation}\label{tc6} \eta^{(2)}u_2+\eta^{(1)}u_1=\gamma\delta^{(2)}v_2+\gamma\delta^{(1)}v_1. \end{equation} Recall that $A^{(k)}\ge |F^{(k)}|>0$. Therefore, in the real case $\gamma\delta^{(k)}=0$, then \eqref{tc5} will never be satisfied. If $B^{(1)}$ and $B^{(2)}$ have the same sign, that is, either $B^{(k)}\ge 0$ or $B^{(k)}\le 0$ for $k=1,2$, \eqref{tc6} can not hold. To see this, let us consider $B^{(k)}\ge 0$, $k=1,2$. Then $u_1, u_2$ are in the first quadrant of the plane and $v_1, v_2$ are in the second quadrant of the plane. The sets \[ C_u=\{\eta^{(2)}u_2+\eta^{(1)}u_1: \eta^{(k)}\ge 0\},\quad C_u=\{\gamma\delta^{(2)}v_2+\gamma\delta^{(1)}v_1: \gamma\delta^{(k)}\ge 0\} \] can only intersect at the original. Same thing happens if $B^{(k)}\le 0$ for $k=1,2$. The only case we need to investigate is when $B^{(1)}$ and $B^{(2)}$ have different signs. For example, let us assume \[ B^{(1)}>0,\quad B^{(2)}<0. \] Even in this case, the intersection between $C_u$ and $C_v$ is non-trivial if the angle $\phi$ between $u_1$ and $u_2$ is less than $\pi/2$. Note that $u_1$ is the first quadrant and $u_2$ is in the fourth quadrant. So the angle between $u_1$ and $u_2$ is less than $\pi$. We would like to show that \eqref{tc6} cannot hold for $\phi\in[\pi/2,\pi)$ if we choose $\gamma_0$ small enough. Note that in this case $\cos\phi\le 0$. To do so, we estimate $\|\eta^{(2)}u_2+\eta^{(1)}u_1\|$ from below and $\|\delta^{(2)}v_2+\delta^{(1)}v_1\|$ from above. We now discuss the estimate of $\|\delta^{(2)}v_2+\delta^{(1)}v_1\|$ from above. Compute \begin{equation}\label{a1} \begin{aligned} \|\delta^{(2)}v_2+\delta^{(1)}v_1\|^2&=(\delta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]+(\delta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]\\ &+2\delta^{(1)}\delta^{(2)}(-B^{(2)},A^{(2)})\cdot(-B^{(1)},A^{(1)})\\ &=(\delta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]+(\delta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]\\ &+2\delta^{(1)}\delta^{(2)}[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}\cos\phi\\ &\le (\delta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]+(\delta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]. \end{aligned} \end{equation} In view of \eqref{bk0} and \eqref{0517}, we have \begin{equation}\label{a2} \begin{aligned} (A^{(k)})^2+(B^{(k)})^2=|b_k|&=|\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l \xi_j-(E^{(k)}+iF^{(k)})^2|\\ &\le|\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l \xi_j|+|(E^{(k)}+iF^{(k)})^2|. \end{aligned} \end{equation} By \eqref{elliptic1}, \eqref{elliptic2}, and \eqref{04-8}, we can obtain \[ \begin{aligned} &|\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l \xi_j|^2=|\frac{1}{a_{nn}^{(k)}}{\cal A}^{(k)}\xi\cdot\xi|^2\;\;(\mbox{with}\;\xi=(\xi',0))\\ &=|a_{nn}^{(k)}|^{-2}|\cos\theta M^{(k)}\xi\cdot\xi+\gamma \sin\theta N^{(k)}\xi\cdot\xi+i(-\sin\theta M^{(k)}\xi\cdot\xi+\gamma\cos\theta N^{(k)}\xi\cdot\xi)|^2\\ &=|a_{nn}^{(k)}|^{-2}[(M^{(k)}\xi\cdot\xi)^2+\gamma^2(N^{(k)}\xi\cdot\xi)^2]\\ &\le\frac{\Lambda^2(1+\gamma^2)|\xi|^4}{\lambda_0^2(1+\gamma^2)}=\tilde\lambda_1^{-1}|\xi|^4, \end{aligned} \] where we have used the estimate \begin{equation}\label{ann} \lambda_0(1+\gamma^2)^{1/2}\le|a_{nn}^{(k)}|\le\Lambda_0(1+\gamma^2)^{1/2} \end{equation} in deriving the inequality above. We thus obtain \begin{equation}\label{annk} |\sum_{1\le\l, j\le n-1}\frac{a_{\l j}^{(k)}}{a_{nn}^{(k)}}\xi_\l \xi_j|\le\tilde\lambda_1^{-1/2}|\xi'|^2. \end{equation} Furthermore, we can estimate \begin{equation}\label{055} \begin{aligned} |(E^{(k)}+iF^{(k)})^2|&=|(\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j)^2|=|\sum_{1\le j\le n-1}\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}\xi_j|^2\\ &\le(\sum_{1\le j\le n-1}|\frac{a_{nj}^{(k)}}{a_{nn}^{(k)}}|^2)|\xi'|^2\le\frac{(n-1)\Lambda_0^2(1+\gamma^2)}{\lambda_0^2(1+\gamma^2)}|\xi'|^2\\ &=(n-1)\tilde\lambda_1^{-1}|\xi'|^2. \end{aligned} \end{equation} Substituting \eqref{annk}, \eqref{055} into \eqref{a2} gives \begin{equation}\label{0551} (A^{(k)})^2+(B^{(k)})^2\le(\tilde\lambda_1^{-1/2}+(n-1)\tilde\lambda_1^{-1})|\xi'|^2\le n\frac{\Lambda_0^2}{\lambda_0^2}|\xi'|^2. \end{equation} It follows from \eqref{a1} and \eqref{0551} that \begin{equation}\label{0552} \|\delta^{(2)}v_2+\delta^{(1)}v_1\|^2\le 2\Lambda_0^2n\frac{\Lambda_0^2}{\lambda_0^2}|\xi'|^2. \end{equation} Next, we want to estimate $\|\eta^{(2)}u_2+\eta^{(1)}u_1\|$ from below. As above, we have \begin{equation}\label{eta} \begin{aligned} \|\eta^{(2)}u_2+\eta^{(1)}u_1\|^2&=(\eta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]+(\eta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]\\ &+2\eta^{(1)}\eta^{(2)}[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}\cos\phi. \end{aligned} \end{equation} Recall that $B_1>0$, $B_2<0$. Thus, \[ \begin{aligned} \cos\phi&=\frac{A^{(1)}A^{(2)}+B^{(1)}B^{(2)}}{[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}}\\ &=\frac{A^{(1)}A^{(2)}-|B^{(1)}||B^{(2)}|}{[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}}\\ &=\frac{1-\frac{|B^{(1)}|}{A^{(1)}}\frac{|B^{(2)}|}{A^{(2)}}}{(1+(\frac{B^{(2)}}{A^{(2)}})^2)^{1/2}(1+(\frac{B^{(1)}}{A^{(1)}})^2)^{1/2}}. \end{aligned} \] Notice that by \eqref{akk} and \eqref{0552} \[ 0\le\frac{|B^{(k)}|}{A^{(k)}}\le \frac{\sqrt{(A^{(k)})^2+(B^{(k)})^2}}{A^{(k)}}\le\frac{\sqrt{n}\frac{\Lambda_0}{\lambda_0}|\xi'|}{\sqrt{\tilde\lambda_1}|\xi'|}=\frac{\sqrt{n}\Lambda_0^2}{\lambda_0^2}:=\tilde\lambda_2\ge 1. \] It is readily seen that the function \[ f(x,y)=\frac{1-xy}{\sqrt{1+x^2}\sqrt{1+y^2}} \] defined on $(x,y)\in[0,\tilde\lambda_2]\times[0,\tilde\lambda_2]$ attains its minimum at $x=y=\tilde\lambda_2$. Hence, we have \[ \cos\phi\ge\frac{1-\tilde\lambda_2^2}{1+\tilde\lambda_2^2}=-1+\frac{2}{1+\tilde\lambda_2^2}. \] Now \eqref{eta} gives \begin{equation}\label{eta2} \begin{aligned} &\|\eta^{(2)}u_2+\eta^{(1)}u_1\|^2\\ \ge&(\eta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]+(\eta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]\\ &+2\eta^{(1)}\eta^{(2)}[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}(-1+\frac{2}{1+\tilde\lambda_2^2})\\ =&\left((\eta^{(2)})^2[(A^{(2)})^2+(B^{(2)})^2]^{1/2}-(\eta^{(1)})^2[(A^{(1)})^2+(B^{(1)})^2]^{1/2}\right)^2\\ &+\frac{4}{1+\tilde\lambda_2^2}\eta^{(1)}\eta^{(2)}[(A^{(2)})^2+(B^{(2)})^2]^{1/2}[(A^{(1)})^2+(B^{(1)})^2]^{1/2}\\ &\ge\frac{4}{1+\tilde\lambda_2^2}A^{(1)}A^{(2)}\lambda_0^2\ge \frac{4}{1+\tilde\lambda_2^2}\tilde\lambda_1|\xi'|^2\lambda_0^2=\frac{4}{1+\tilde\lambda_2^2}\frac{\lambda_0^4}{\Lambda_0^2}|\xi'|^2. \end{aligned} \end{equation} Hence, in view of \eqref{0552}, \eqref{eta2}, if we choose \begin{equation}\label{gamma0} \gamma_0=\frac{\sqrt{2}\lambda_0^5}{\Lambda_0^3\sqrt{n\lambda_0^4+n^2\Lambda_0^4}}, \end{equation} then for $\gamma<\gamma_0$ we have \[ \|\eta^{(2)}u_2+\eta^{(1)}u_1\|^2>\gamma^2\|\delta^{(2)}v_2+\delta^{(1)}v_1\|^2. \] In other words, \eqref{tc6} cannot hold (i.e., $\mbox{\rm det}T\ne 0$), and equivalently, \eqref{ne0} is satisfied. In conclusion, we have shown that \begin{theorem}\label{transthm} Assume that $a_{\l j}^{(k)}$ have properties \eqref{symm}-\eqref{elliptic2}. Moreover, the number $\gamma$ in \eqref{complex} satisfies $\gamma<\gamma_0$, where $\gamma_0$ is defined in \eqref{gamma0}. Let $\psi_\varepsilon$ be given by \eqref{psieps} with $a_1, a_2$ satisfying \eqref{tc2}. The $\{P_k,\psi_\varepsilon, T_k^j,\; k=1,2,\; j=1,2\}$ satisfies the transmission condition at $0$. \end{theorem} \subsection{Strong pseudoconvexity}\label{stpseudo} Here we want to check the strong pseudoconvexity condition for the operator ${\mathcal L}_0$ and the weight function $\psi_\varepsilon(x)$ in $B_{\delta'}\cap\Omega_1$ and $B_{\delta'}\cap\Omega_2$ for some small $\delta'>0$. Even though ${\mathcal L}_0$ is represented by $P_k$ in $\Omega_k$, $k=1,2$, it is not necessary to discuss the strong pseudoconvexity condition for $P_1$ and $P_2$ separately. We suppress the index $k$ in notations and denote the symbol \[ p(\xi)=\sum_{1\le j,\l\le n}a_{\l j}\xi_\ell \xi_j \] with $a_{\l j}=M_{\l j}+i\gamma N_{\l j}$ and consider the weight function \[ \psi_\varepsilon(x)=\alpha x_n+\frac{\beta}{2}x_n^2-\frac{\varepsilon}{2}|x'|^2. \] In view of the definition of $\psi_\varepsilon(x)$ in \eqref{2.1}, $\alpha$ here represents either $\alpha_2=\alpha_+$ or $\alpha_1=\alpha_-$. Hence, we have that \[ (\partial_j\psi_\varepsilon(x))_{j=1}^n=\nabla\psi_\varepsilon(x)=(-\varepsilon x', \alpha+\beta x_n) \] and \begin{equation}\label{hessian} (\partial^2_{\l j}\psi_\varepsilon(x))_{\l, j=1}^n=\nabla^2\psi_\varepsilon(x)=\begin{pmatrix}-\varepsilon I_{n-1}&0\\0&\beta\end{pmatrix}. \end{equation} The strong pseudoconvexity condition reads that in $B_{\delta'}$, if \[ \left\{ \begin{aligned} &p(\xi+i\tau\nabla\psi_\varepsilon(x))=0,\\ &(\xi,\tau)\ne 0,\;\;\nabla\psi_\varepsilon(x)\ne 0,\;\; x\in\overline{B_{\delta'}}, \end{aligned}\right. \] then \begin{equation}\label{sp} \begin{aligned} Q(x,\xi,\tau):=&\sum_{\l, j=1}^n\partial^2_{\l j}\psi_\varepsilon(x)\partial_{\xi_j} p(\xi+i\tau\nabla\psi_\varepsilon(x))\overline{\partial_{\xi_\l}p(\xi+i\tau\nabla\psi_\varepsilon(x))}\\ &+\frac{1}{\tau}\mbox{\rm Im}\sum_{j=1}^n\partial_jp(\xi+i\tau\nabla\psi_\varepsilon(x))\overline{\partial_{\xi_j}p(\xi+i\tau\nabla\psi_\varepsilon(x))}\\ =&\sum_{\l, j=1}^n\partial^2_{\l j}\psi_\varepsilon(x)\partial_{\xi_j} p(\xi+i\tau\nabla\psi_\varepsilon(x))\overline{\partial_{\xi_\l}p(\xi+i\tau\nabla\psi_\varepsilon(x))}>0 \end{aligned} \end{equation} (see \cite{ho0}). We now write \[ \begin{aligned} &p(\xi+i\tau\nabla\psi_\varepsilon)\\ =&\sum_{1\le\l, j\le n}a_{\l j}(\xi_\l+i\tau\partial_\l\psi_\varepsilon)(\xi_\l+i\tau\partial_\l\psi_\varepsilon)\\ =&\sum_{1\le\l, j\le n}a_{\l j}\xi_\l\xi_j+2i\sum_{1\le\l, j\le n}a_{\l j}\xi_l(\tau\partial_j\psi_\varepsilon)-\sum_{1\le \l j\le n}a_{\l j}(\tau\partial_\l\psi_\varepsilon)(\tau\partial_j\psi_\varepsilon). \end{aligned} \] Hence $p(\xi+i\tau\nabla\psi_\varepsilon)=0$ implies \begin{equation}\label{11} \sum_{1\le \l j\le n}a_{\l j}(\tau\partial_\l\psi_\varepsilon)(\tau\partial_j\psi_\varepsilon)=\sum_{1\le\l, j\le n}a_{\l j}\xi_\l\xi_j+2i\sum_{1\le\l, j\le n}a_{\l j}\xi_l(\tau\partial_j\psi_\varepsilon) \end{equation} By \eqref{complex}-\eqref{elliptic2}, we have \begin{equation*} \Big{|}\sum_{1\le \l j\le n}a_{\l j}(\tau\partial_\l\psi_\varepsilon)(\tau\partial_j\psi_\varepsilon)\Big{|}\le\sqrt{1+\gamma^2}\Lambda_0|\tau\nabla\psi_\varepsilon|^2. \end{equation*} From this estimate, we obtain from \eqref{11} that \begin{equation}\label{112} \begin{aligned} \sqrt{1+\gamma^2}\Lambda_0|\tau\nabla\psi_\varepsilon|^2\ge &\Big{|}\sum_{1\le\l, j\le n}a_{\l j}\xi_\l\xi_j+2i\sum_{1\le\l, j\le n}a_{\l j}\xi_l(\tau\partial_j\psi_\varepsilon)\Big{|}\\ \ge &\sqrt{1+\gamma^2}\lambda_0|\xi|^2-2\sqrt{1+\gamma^2}\Lambda_0|\xi||\tau\nabla\psi_\varepsilon|\\ \ge&\sqrt{1+\gamma^2}\lambda_0|\xi|^2-\frac{\sqrt{1+\gamma^2}\lambda_0}{2}|\xi|^2-2\frac{\sqrt{1+\gamma^2}\Lambda^2_0}{\lambda_0}|\tau\nabla\psi_\varepsilon|^2, \end{aligned} \end{equation} which leads to \begin{equation}\label{22} \frac{\lambda_0}{2}|\xi|^2\le (\Lambda_0+\frac{2\Lambda_0^2}{\lambda_0})|\tau\nabla\psi_\varepsilon|^2. \end{equation} By \eqref{22} and exchanging the roles of $\xi$ and $\tau\nabla\psi_\varepsilon$ in \eqref{112}, we thus conclude that there exist positive constants $C_1, C_2$, depending on $\lambda_0, \Lambda_0$ such that \begin{equation}\label{222} C_1|\xi|\le|\tau\nabla\psi_\varepsilon|\le C_2|\xi| \end{equation} whenever $p(\xi+i\tau\nabla\psi_\varepsilon)=0$. As in \eqref{pk} and \eqref{bk}, we can write \[ p(\xi)=a_{nn}[(\xi_n+\sum_{1\le j\le n-1}\frac{a_{nj}}{a_{nn}}\xi_j)^2+b(\xi')], \] where \[ b(\xi')=\frac{1}{a_{nn}^{2}}\sum_{1\le\l, j\le n-1}(a_{\l j}a_{nn}-a_{n\l}a_{nj})\xi_\l\xi_j. \] Similar to \eqref{bk0} and \eqref{efk}, we further express \begin{equation}\label{4-1} b(\xi')=(A(\xi')-iB(\xi'))^2, \end{equation} with $A(\xi')\ge 0$ and \begin{equation}\label{4-2} \sum_{1\le j\le n-1}\frac{a_{nj}}{a_{nn}}\xi_j=E(\xi')+iF(\xi'), \end{equation} where $E(\xi'), F(\xi')\in\mathbb R$. To verify that \eqref{sp} for $x$ near $0$, we first derive an estimate of $Q(0,\xi,\tau)$. At $x=0$, we have $\partial_j\psi_\varepsilon(0)=0$, $1\le j\le n-1$ and $\partial_n\psi_\varepsilon(0)=\alpha$, i.e., \[ \xi+i\tau\nabla\psi_\varepsilon(0)=(\xi',\xi_n+i\tau\alpha). \] Thus, we can rewrite \begin{equation}\label{p0k} p(\xi+i\tau\nabla\psi_\varepsilon(0))=p(\xi+i\tau\alpha e_n)=a_{nn}(\xi_n-\sigma_1)(\xi_n-\sigma_2), \end{equation} where \begin{equation}\label{s12} \left\{ \begin{aligned} &\sigma_1=-E-B-i(\tau\alpha+F+A),\\ &\sigma_2=-E+B-i(\tau\alpha+F-A). \end{aligned}\right. \end{equation} From now on we suppress the dependence of coefficients at $0$ if there is no danger of causing confusion. By \eqref{hessian}, we have that \begin{equation*} Q(0,\xi,\tau)=-\varepsilon\sum_{1\le j\le n-1}|\partial_{\xi_j}p(\xi+i\tau\alpha e_n)|^2+\beta|\partial_{\xi_n}p(\xi+i\tau\alpha e_n)|^2, \end{equation*} where for $1\le j\le n-1$ \[ \partial_{\xi_j}p(\xi+i\tau\alpha e_n)=2\sum_{1\le\l\le n-1}a_{\l j}\xi_\l+a_{nj}(\xi_n+i\tau\alpha) \] and \[ \partial_{\xi_n}p(\xi+i\tau\alpha e_n)=2\sum_{1\le\l\le n-1}a_{\l n}\xi_\l+a_{nn}(\xi_n+i\tau\alpha). \] Therefore, we can write \begin{equation}\label{q1} \begin{aligned} Q(0,\xi,\tau)=&-4\varepsilon\sum_{1\le j\le n-1}\Big{|}\sum_{1\le\l\le n-1}a_{\l j}\xi_\l+a_{nj}(\xi_n+i\tau\alpha)\Big{|}^2\\ &+4\beta\Big{|}\sum_{1\le\l\le n-1}a_{\l n}\xi_\l+a_{nn}(\xi_n+i\tau\alpha)\Big{|}^2. \end{aligned} \end{equation} It follows from \eqref{p0k} and \eqref{s12} that $p(\xi+i\tau\alpha e_n)=0$ if and only if \begin{equation}\label{eqi} \xi_n+i\tau\alpha=-E-B-i(F+A) \end{equation} or \begin{equation}\label{eqii} \xi_n+i\tau\alpha=-E+B-i(F-A). \end{equation} Therefore, if $p(\xi+i\tau\alpha e_n)=0$, then the second term in \eqref{q1} can be further simplified as \begin{equation}\label{4beta} \begin{aligned} &\Big{|}\sum_{1\le\l\le n-1}a_{\l n}\xi_\l+a_{nn}(\xi_n+i\tau\alpha)\Big{|}^2 =|a_{nn}|^2\Big{|}\sum_{1\le\l\le n-1}\frac{a_{\l n}}{a_{nn}}\xi_\l+(\xi_n+i\tau\alpha)\Big{|}^2\\ &=|a_{nn}|^2|E+iF+(\xi_n+i\tau\alpha)|^2=|a_{nn}|^2(A^2+B^2), \end{aligned} \end{equation} where we have used \eqref{4-2}, \eqref{eqi} or \eqref{eqii}. Combining \eqref{4-1}, \eqref{4-2}, \eqref{eqi} or \eqref{eqii}, we have that \begin{equation}\label{ebfa} |\xi_n+i\tau\alpha|\le|E|+|B|+|F|+|A|\le C\Lambda_0|\xi'|, \end{equation} which implies \begin{equation}\label{2-20} \sum_{1\le j\le n-1}\Big{|}\sum_{1\le\l\le n-1}a_{\l j}\xi_\l+a_{nj}(\xi_n+i\tau\alpha)\Big{|}^2\le C\Lambda_0^2|\xi'|^2. \end{equation} Putting \eqref{q1}, \eqref{4beta}, and \eqref{2-20} together gives \begin{equation}\label{q11} Q(0,\xi,\tau)\ge 4\beta|a_{nn}|^2(A^2+B^2)-4\varepsilon C\Lambda_0|\xi'|^2. \end{equation} Recall the estimate \eqref{akk} in Lemma~\ref{ak} \[ A^2\ge\tilde\lambda_1|\xi'|^2+|F|^2\ge\tilde\lambda_1|\xi'|^2. \] Using this estimate in \eqref{q11} and choosing $\varepsilon$ sufficiently small leads to \begin{equation*} Q(0,\xi,\tau)\ge 4(\beta\tilde\lambda_1\lambda_0^2-\varepsilon C\Lambda_0)|\xi'|^2\ge 2\beta\tilde\lambda_1\lambda_0^2|\xi'|^2, \end{equation*} whenever $p(\xi+i\tau\alpha e_n)=0$. Furthermore, \eqref{ebfa} implies \[ |\xi+i\tau\alpha e_n|^2\le (1+C^2\Lambda_0^2)|\xi'|^2, \] and it follows that if $p(\xi+i\tau\alpha e_n)=0$ then \begin{equation}\label{XI-2} Q(0,\xi,\tau)\ge C\beta|\xi+i\tau\alpha e_n|^2. \end{equation} In conclusion, we have shown that \begin{equation}\label{14-2} (\xi,\tau)\in\{(\xi,\tau)\in S: p(\xi+i\tau\alpha e_n)=0\}\Rightarrow Q(0,\xi,\tau)>0, \end{equation} where $S:=\{(\xi,\tau)\in\mathbb R^{n+1}: |\xi|^2+\tau^2=1\}$. Now we recall the following elementary theorem. Let $X$ be a compact subset of $\mathbb R^N$ and $F, G: X\to\mathbb R$ be two continuous functions, then the following two statements are equivalent: \begin{description} \item[(i)] $F(x)=0,\;\forall\; x\in X\Rightarrow G(x)>0$. \item[(ii)] There exist positive constants $C_1, C_2$ such that $C_1G(x)+|F(x)|\ge C_2$, $\forall\; x\in X$. \end{description} With the help of this theorem, \eqref{14-2} is equivalent to \begin{equation}\label{14-3} C_1Q(0,\xi,\tau)+|p(\xi+i\tau\alpha e_n)|\ge C_2 \end{equation} for all $(\xi,\tau)\in S$. Thanks to \eqref{14-3}, we can estimate \[ \begin{aligned} C_1Q(x,\xi,\tau)+|p(\xi+i\tau\nabla\psi_\varepsilon(x))|&=C_1Q(0,\xi,\tau)+|p(\xi+i\tau\alpha e_n)|+R(x,\xi,\tau)\\ &\ge C_2+R(x,\xi,\tau), \end{aligned} \] where \[ R(x,\xi,\tau)=C_1[Q(x,\xi,\tau)-Q(0,\xi,\tau)]+|p(\xi+i\tau\nabla\psi_\varepsilon(x))|-|p(\xi+i\tau\alpha e_n)|. \] Observe that $R(0,\xi,\tau)=0$ for $(\xi,\tau)\in S$. Since $R$ is continuous, there exists a small number $\delta'>0$ such that \[ |R(x,\xi,\tau)|\le \frac{C_2}{2} \] for all $x$ with $|x|\le\delta'<\frac{\alpha}{2\beta}$ and $(\xi,\tau)\in S$. In other words, we have that \begin{equation}\label{14-5} C_1Q(x,\xi,\tau)+|p(\xi+i\tau\nabla\psi_\varepsilon(x))|\ge\frac{C_2}{2} \end{equation} in $\{|x|\le\delta'\}\times S$. By the elementary theorem stated above, \eqref{14-5} is equivalent to \[ \begin{aligned} &p(\xi+i\tau\nabla\psi_\varepsilon(x))=0,\;\forall\; x\in\overline{B_{\delta'}},\; (\xi,\tau)\in S\\ \Rightarrow&\; Q(x,\xi,\tau)>0,\;\forall\; x\in\overline{B_{\delta'}},\; (\xi,\tau)\in S, \end{aligned} \] which immediately implies the strong pseudoconvexity condition near $0$ in view of the homogeneity of $p$ and $Q$ in $(\xi,\tau)$. Having verified the strong psudoconvexity in a neighborhood of $0$ and the transmission conditions at $0$, we can derive a Carleman estimate with weight $\psi_{\varepsilon}(x)$ for the operator ${\mathcal{L}_0}$. \begin{theorem}{\rm\cite[Theorem 1.6]{BL}} \label{coeffcost} Assume that coefficients $A_{\pm}(0)$ satisfy conditions \eqref{symm}-\eqref{elliptic2}. There exist $\alpha_+,\alpha_-,\beta,\varepsilon_0, \gamma_0, r_0$ and $C$, depending on $\lambda_0, \Lambda_0$, such that if $\varepsilon\le\varepsilon_0$, $\gamma\le\gamma_0$, $\tau\geq C$, then \begin{eqnarray}\label{8.240} &&\sum_{\pm}\sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n_{\pm}}|D^k{u}_{\pm}|^2e^{2\tau\psi_{\varepsilon,\pm}(x)}dx+\sum_{\pm}\sum_{k=0}^1\tau^{3-2k}\int_{\mathbb{R}^{n-1}}|D^k{u}_{\pm}(x',0)|^2e^{2\psi_{\varepsilon}(x',0)}dx'\nonumber\\ &&+\sum_{\pm}\tau^2[e^{\tau\psi_{\varepsilon}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\sum_{\pm}[D(e^{\tau\psi_{\varepsilon,\pm}}u_{\pm})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}\nonumber\\ &&\leq C\left(\int_{\mathbb{R}_{\pm}^n}|\mathcal{L}_0(D)(u_{\pm})|^2\,e^{2\tau\psi_{\varepsilon,\pm}(x)}dx+[e^{\tau\psi_{\varepsilon}(\cdot,0)}h^{(0)}_1]^2_{1/2,\mathbb{R}^{n-1}}\right.\\ &&\left.+[D_{x'}(e^{\tau\psi_{\varepsilon}}h^{(0)}_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\tau^{3}\int_{\mathbb{R}^{n-1}}|h^{(0)}_0|^2e^{2\tau\psi_{\varepsilon}(x,0)}dx+\tau\int_{\mathbb{R}^{n-1}}|h^{(0)}_1|^2e^{2\tau\psi_{\varepsilon}(x,0)}dx\right).\nonumber \end{eqnarray} for $u=H_+u_++H_-u_-$, $u_{\pm}\in C^\infty(\mathbb{R}^{n})$ and ${\rm supp}\, u\subset B'_{r_0}\times[-r_0, r_0]$, and \begin{equation*} h^{(0)}_0(x'):=u_+(x',0)-u_-(x',0),\ \forall\, x'\in \mathbb{R}^{n-1}, \end{equation*} \begin{equation*} h^{(0)}_1(x'):=A_+(0)\nabla u_+(x',0)\cdot e_n-A_-(0)\nabla u_-(x',0)\cdot e_n,\ \forall\, x\in \mathbb{R}^{n-1}. \end{equation*} \end{theorem} \section{Derivation of the Carleman estimate}\label{sec4} This section is devoted to the derivation of the Carleman estimate \eqref{8.24} following the ideas used in \cite{dflvw}. We first introduce the partition of unity given in \cite{dflvw}. For any $r>0$ and $x'\in \mathbb R^{n-1}$, denote the $(n-1)$-cube $Q_{r}(x')=\{y'\in\mathbb{R}^{n-1}:|y'_j-x'_j|\leq r,\,j=1,2,\cdots ,n-1\}$. Let $\vartheta_0\in C^\infty_0(\mathbb{R})$ such that \begin{equation}\label{tetazero} 0\leq\vartheta_0\leq 1,\quad {\rm supp}\,\vartheta_0\subset (-3/2,3/2)\,\,\mbox{ and }\,\,\vartheta_0(t)=1\mbox{ for }t\in[-1,1]. \end{equation} Let $\vartheta(x')=\vartheta_0(x_1)\cdots\vartheta_0(x_{n-1})$, so that \begin{equation*} {\rm supp}\,\vartheta\subset \stackrel{\circ}{Q}_{3/2}(0)\,\,\mbox{ and }\,\,\vartheta(x')=1\mbox{ for }x'\in Q_1(0), \end{equation*} where $\stackrel{\circ}{Q}$ denotes the interior of the set $Q$. Given $\mu\geq 1$ and $g\in \mathbb{Z}^{n-1}$, we define $$x'_g=\frac{g}{\mu}$$ and $$\vartheta_{g,\mu}(x')=\vartheta(\mu(x'-x'_g)).$$ Thus, we can see that \begin{equation* {\rm supp}\,\vartheta_{g,\mu}\subset \stackrel{\circ}{Q}_{3/2\mu}(x'_g)\subset Q_{2/\mu}(x'_g) \end{equation*} and \begin{equation}\label{6.4} |D^k\vartheta_{g,\mu}|\leq C_1\mu^k(\chi_{ Q_{3/2\mu}(x'_g)}-\chi_{Q_{1/\mu}(x'_g)}),\quad k=0,1,2, \end{equation} where $C_1\geq 1$ depends only on $n$. Notice that, for any $g\in \mathbb{Z}^{n-1}$, \begin{equation}\label{cardAg} card\left(\{g'\in \mathbb{Z}^{n-1}\,:\,{\rm supp}\,\vartheta_{g',\mu}\cap{\rm supp}\,\vartheta_{g,\mu}\neq\emptyset\}\right)=5^{n-1}.\end{equation} Thus, we can define \begin{equation}\label{6.5} \bar{\vartheta}_{\mu}(x'):=\sum_{g\in \mathbb{Z}^{n-1}}\vartheta_{g,\mu}\geq 1,\quad x'\in \mathbb{R}^{n-1}. \end{equation} By \eqref{6.4}, we get that \begin{equation}\label{6.6} |D^k\bar{\vartheta}_{\mu}|\leq C_2\mu^k, \end{equation} where $C_2\geq 1$ depends on $n$. Define \begin{equation}\label{etagmu} \eta_{g,\mu}(x')=\vartheta_{g,\mu}(x')/\bar{\vartheta}_{\mu}(x'),\quad x'\in \mathbb{R}^{n-1},\end{equation} then we have that \begin{equation}\label{6.7} \begin{cases} \sum_{g\in \mathbb{Z}^{n-1}}\eta_{g,\mu}= 1,\quad x'\in \mathbb{R}^{n-1},\\ {\rm supp}\,\eta_{g,\mu}\subset Q_{3/2\mu}(x'_g)\subset Q_{2/\mu}(x'_g),\\ |D^k\eta_{g,\mu}|\leq C_3\mu^k\chi_{Q_{3/2\mu}(x'_g)},\quad k=0,1,2, \end{cases} \end{equation} where $C_3\geq 1$ depends on $n$. We will first extend \eqref{8.240} to operators with leading coefficients depending on the vertical variable $x_n$. To do so, we need to derive an interior Carleman estimate for second order elliptic operators having Lipschitz leading coefficients and with the weight function $\psi_\varepsilon$. To derive such Carleman estimate, we define the $n$-cube $K_R=\{x=(x_1,\cdots,x_n): |x_j|\le R, 1\le j\le n\}$ for $R>0$. Let us denote \[ P(x,D)=\sum_{1\le j, \l\le n}a_{j\l}(x)D_{j\l}^2 \] and its symbol $p(x,\xi)=\sum_{1\le j, \l\le n}a_{j\l}(x)\xi_j\xi_\l$. Assume that for all $1\le j, \l\le n$ and $x, y\in K_1$, \begin{equation}\label{cond4} \left\{\begin{aligned} &a_{j\l}(x)=a_{\l j}(x),\\ &|a_{j\l}(x)|\le\Lambda,\\ &|a_{j\l}(x)-a_{j\l}(y)|\le M_0|x-y|,\\ &|p(x,\xi)|\ge\lambda|\xi|^2,\;\;\forall\;\xi\in\mathbb R^n, \end{aligned}\right. \end{equation} where $\Lambda, \lambda>0$. Let $\varphi(x)\in C^2(K_1)$ be real-valued and satisfy $|\nabla\varphi(x)|\ne 0$ for all $x\in K_1$. We denote \[ S(x,y;\xi,\tau)=\sum_{\l, j=1}^n\partial^2_{\l j}\varphi(x)\partial_{\xi_j} p(y,\xi+i\tau\nabla\varphi(x))\overline{\partial_{\xi_\l}p(y,\xi+i\tau\nabla\varphi(x))} \] for $x, y\in K_1$, $\xi\in\mathbb R^n$, $\tau>0$. \begin{pr}\label{pr1} Assume that the following condition holds: \begin{equation}\label{stcon} \left.\begin{aligned} &p(0,\xi+i\tau\varphi(0))=0\\ &(\xi,\tau)\ne(0,0)\end{aligned}\right\}\Rightarrow S(0,0;\xi,\tau)>0. \end{equation} Then there exist $\bar{R}\in(0,1]$, $\delta_0\in(0,1]$, $C_0\ge 1$, $\tau_0\ge 1$, depending on $\lambda, \Lambda, M_0, \|\varphi\|_{C^2(Q_1)}$, such that \begin{equation}\label{car00} \sum_{|\alpha|\le 2}\tau^{3-2|\alpha|}\int|D^\alpha u|^2e^{2\tau\varphi(x)}dx\le C_0\int|P(\delta x,D)u|^2e^{2\tau\varphi(x)}dx, \end{equation} $\forall\, u\in C_0^\infty(\stackrel{\circ}{K}_{\bar R})$, $\tau\ge\tau_0$, $0<\delta\le\delta_0$. \end{pr} \noindent{\bf Proof}. In view of the homogeneity in $(\xi,\tau)$, \eqref{stcon} is equivalent to that there exist $C_1>0, C_2>0$ such that \begin{equation* C_2|p(0,\xi+i\tau\nabla\varphi(0)|^2+(|\xi|^2+\tau^2)S(0,0;\xi,\tau)\ge C_1(|\xi|^2+\tau^2)^2,\;\forall\;(\xi,\tau)\in \mathbb R^{n+1}. \end{equation*} From \eqref{cond4}, we can see that there exists $\bar R\in(0,1]$ such that \begin{equation}\label{stcon2} \tilde C_2|p(y,\xi+i\tau\nabla\varphi(x)|^2+(|\xi|^2+\tau^2)S(x,y;\xi,\tau)\ge \tilde C_1(|\xi|^2+\tau^2)^2,\;\forall\;x, y\in K_{\bar R},\,\forall\;(\xi,\tau)\in \mathbb R^{n+1}, \end{equation} where $\tilde C_1>0$, $\tilde C_2>0$ are independent of $x$, $y$. Thanks to \eqref{stcon2}, the Carleman derived in \cite[Theorem~8.3.1]{ho0} holds for \[ P(\delta y,D_x)u=\sum_{1\le\l, j\le n}a_{j\l}(\delta y)D^2_{x_jx_\l}u(x), \] that is, \begin{equation}\label{car22} \sum_{|\alpha|\le 2}\tau^{3-2|\alpha|}\int|D_x^\alpha u|^2e^{2\tau\varphi(x)}dx\le C_3\int|P(\delta y,D_x)u|^2e^{2\tau\varphi(x)}dx \end{equation} for all $u\in C_0^\infty(\overset{\circ}{K}_{\bar R})$, $0\le\delta\le 1$, and $\tau\ge\tau_1$, where $C_3$ and $\tau_1$ do not depend on $\delta$ and $y$. Note that for fixed $\delta$, $y$, $P(\delta y,D_x)$ is an operator having constant coefficients. Now we use the partition of unity introduced above, but with $n-1$ being replaced by $n$. In particular, for $h\in{\mathbb Z}^n$, we define \[ x_h=\frac{h}{\mu},\quad\mu=\sqrt{\varepsilon\tau}\;\;\mbox{with}\;\;\tau\ge\frac{1}{\varepsilon}, \] where $\varepsilon\in(0,1]$ will be chosen later. Let $u\in C_0^\infty(\stackrel{\circ}{K}_{\bar R})$, in view of the first relation in \eqref{6.7}, we have \[ u(x)=\sum_{h\in{\mathbb Z}^n}u(x)\eta_{h,\mu}(x), \] where $\eta_{h,\mu}(x)$ is defined similarly as in \eqref{etagmu} with $n-1, g$ being replaced by $n, h$, respectively. Applying \eqref{car22} with $y=x_h$ implies \begin{equation}\label{car33} \begin{aligned} &\sum_{|\alpha|\le 2}\tau^{3-2|\alpha|}\int|D^\alpha u|^2e^{2\tau\varphi(x)}dx\\ \le &c\sum_{h\in{\mathbb Z}^n}\sum_{|\alpha|\le 2}\tau^{3-2|\alpha|}\int|D^\alpha (u\eta_{h,\mu})|^2e^{2\tau\varphi(x)}dx\\ \le&cC_3\int|P(\delta x_h,D)(u\eta_{h,\mu})|^2e^{2\tau\varphi(x)}dx,\;\;\forall\;\tau\ge\tau_2=\min\{\tau_1,\frac{1}{\varepsilon}\}, \end{aligned} \end{equation} where $c=c(n)$. Now we write \begin{equation}\label{est1} |P(\delta x_h,D)(u\eta_{h,\mu})|\le|P(\delta x,D)(u\eta_{h,\mu})|+|(P(\delta x_h,D)-P(\delta x,D))(u\eta_{h,\mu})| \end{equation} and use \eqref{6.6}, the second inequality of \eqref{cond4}, to estimate \begin{equation}\label{est2} |P(\delta x,D)(u\eta_{h,\mu})|\le|P(\delta x,D)u|\eta_{h,\mu}+C_4\Lambda(\sqrt{\varepsilon\tau}|Du|+\varepsilon\tau|u|)\chi_{K_{2/\mu}(x_h)} \end{equation} and \begin{equation}\label{est3} \begin{aligned} &|(P(\delta x_h,D)-P(\delta x,D))(u\eta_{h,\mu})|=|\sum_{1\le j\l\le n}(a_{j\l}(\delta x_h)-a_{j\l}(\delta x))D^2_{j\l}(u\eta_{h,\mu})|\\ \le&\,\eta_{h,\mu}\sum_{1\le j\l\le n}|a_{j\l}(\delta x_h)-a_{j\l}(\delta x)||D^2_{j\l} u|+2C_4\Lambda(\sqrt{\varepsilon\tau}|Du|+\varepsilon\tau|u|)\chi_{K_{2/\mu}(x_h)}\\ \le &c\,\eta_{h,\mu}\frac{\delta M_0}{\mu}|D^2u|+2C_4\Lambda(\sqrt{\varepsilon\tau}|Du|+\varepsilon\tau|u|)\chi_{K_{2/\mu}(x_h)} \end{aligned} \end{equation} with $c=c(n)$. Here $K_{2/\mu}(x_h)$ denotes the $n$-cube centered at $x_h$ with length $4/\mu$ and $\chi_{K_{2/\mu}(x_h)}$ is the characteristic function of $K_{2/\mu}(x_h)$. Substituting \eqref{est1}-\eqref{est3} into \eqref{car33} gives \begin{equation}\label{car55} \begin{aligned} &\sum_{|\alpha|\le 2}\tau^{3-2|\alpha|}\int|D^\alpha u|^2e^{2\tau\varphi(x)}dx\\ \le&C_5\int|P(\delta x,D)u|^2e^{2\tau\varphi(x)}dx\\ &+C_5\left\{\frac{\delta^2M_0^2}{\varepsilon\tau}\int|D^2u|^2e^{2\tau\varphi(x)}dx+\varepsilon\tau\int|Du|^2e^{2\tau\varphi(x)}dx+(\varepsilon\tau)^2\int|u|^2e^{2\tau\varphi(x)}dx\right\} \end{aligned} \end{equation} for all $\tau\ge\tau_2$, where $C_5\ge 1$. Finally, by choosing $\varepsilon=1/(2C_5)$ and $\delta_0=\varepsilon$, all terms inside of the curved brace on the right hand side of \eqref{car55} can be absorbed by its left hand side and \eqref{car00} follows immediately. \eproof \subsection{Carleman estimate for operators depending on the vertical variable} Here we would like to prove a Carleman estimate for the operator that satisfies conditions \eqref{symm}-\eqref{elliptic2} but depending only on the $x_n$ variable. That is, we consider \begin{equation*} \mathcal{L}(x_n,D)u:=\sum_{\pm}H_{\pm}{\rm div}(A_{\pm}(x_n)\nabla u_{\pm}), \end{equation*} where $u_{\pm}\in C^\infty(\mathbb{R}^{n})$ and ${\rm supp}\, u\subset B'_{r_0}\times[-r_0, r_0]$, where $r_0$ is the number obtained in Theorem~\ref{coeffcost}. Introduce $\delta\in (0,1)$ that will be chosen later, define \begin{equation* \phi_{\delta}(x):=\psi_{\delta}(\delta^{-1}x)=\psi_{\delta}(\delta^{-1}x',\delta^{-1}x_n), \end{equation*} and consider the scaled operator $$\mathcal{L}(\delta x_n,D)u:= \sum_{\pm}H_{\pm}{\rm div}(A_{\pm}(\delta x_n)\nabla u_{\pm}).$$ Notice that $A_\pm(\delta x_n)$ satisfies assumptions \eqref{elliptic1}, \eqref{elliptic2} and also the Lipschitz condition \begin{equation}\label{lipdelta} |A_{\pm}(\delta \tilde x_n)-A_{\pm}(\delta x_n)|\leq M_0\delta|\tilde x_n-x_n|. \end{equation} Let $\vartheta_0\in C^\infty_0(\mathbb{R})$ be given as in \eqref{tetazero}. For $\mu\geq 1$ satisfying ${2}/{\mu}<r_0$, we define \begin{equation}\label{etamu} \eta_{\mu}(x_n)=\vartheta_0(\mu x_n), \end{equation} \begin{equation}\label{v-z} v_{\mu}(x',x_n)=\eta_{\mu}(x_n)u(x',x_n),\,\, \mbox{ and }\, z_{\mu}(x',x_n)=(1-\eta_{\mu}(x_n))u(x',x_n). \end{equation} Since $v_{\mu,\pm}(x',0)=u_{\pm}(x',0)$ and $\nabla v_{\mu,\pm}(x',0)=\nabla u_{\pm}(x',0)$, we have trivially \begin{equation}\label{7.5-v} v_{\mu,+}(x',0)-v_{\mu,-}(x',0)=u_+(x',0)-u_-(x',0)=h^{(0)}_0(x'),\ \forall\, x'\in \mathbb{R}^{n-1} \end{equation} and \begin{equation}\label{7.6-v} \begin{aligned} &A_+(0)\nabla v_{\mu,+}(x',0)\cdot e_n-A_-(0)\nabla v_{\mu,-}(x',0)\cdot e_n\\ =& A_+(0)\nabla u_{+}(x',0)\cdot e_n-A_-(0)\nabla u_{-}(x',0)\cdot e_n=h^{(0)}_1(x'),\; \forall\, x'\in \mathbb{R}^{n-1}. \end{aligned} \end{equation} The aim of this section is to prove a simple version of \eqref{8.24}: \begin{eqnarray}\label{8.241} &&\sum_{\pm}\sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n_{\pm}}|D^k{u}_{\pm}|^2e^{2\tau\psi_{\varepsilon,\pm}(x)}dx+\sum_{\pm}\sum_{k=0}^1\tau^{3-2k}\int_{\mathbb{R}^{n-1}}|D^k{u}_{\pm}(x',0)|^2e^{2\psi_{\varepsilon}(x',0)}dx'\nonumber\\ &&+\sum_{\pm}\tau^2[e^{\tau\psi_{\varepsilon}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\sum_{\pm}[D(e^{\tau\psi_{\varepsilon,\pm}}u_{\pm})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}\nonumber\\ &&\leq C\left(\int_{\mathbb{R}_{\pm}^n}|\mathcal{L}(\delta x_n,D)(u_{\pm})|^2\,e^{2\tau\psi_{\varepsilon,\pm}(x)}dx+[e^{\tau\psi_{\varepsilon}(\cdot,0)}h^{(0)}_1]^2_{1/2,\mathbb{R}^{n-1}}\right.\\ &&\left.+[D_{x'}(e^{\tau\psi_{\varepsilon}}h^{(0)}_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\tau^{3}\int_{\mathbb{R}^{n-1}}|h^{(0)}_0|^2e^{2\tau\psi_{\varepsilon}(x,0)}dx+\tau\int_{\mathbb{R}^{n-1}}|h^{(0)}_1|^2e^{2\tau\psi_{\varepsilon}(x,0)}dx\right).\nonumber \end{eqnarray} To proceed the proof of \eqref{8.241}, we first note that ${\rm supp}\, z_\mu\subset B'_{r_0}\times[-r_0, r_0]$ and vanishes in the strip $\mathbb{R}^{n-1}\times [-\frac{1}{\mu},\frac{1}{\mu}]$. It is clear that $A_\pm(\delta x_n)$ satisfies \eqref{elliptic1}, \eqref{elliptic2} and \eqref{7.4}. Moreover, estimate \eqref{14-3} implies that the condition \eqref{stcon} holds for $\sum_{1\le j, \l\le n}a^{\pm}_{j\l}(x)D_{j\l}^2$ with $\varphi=\psi_\varepsilon$. Observe that $z_\mu$ is supported away from $x_n=0$. Therefore, it follows from \eqref{car00} in Proposition~\ref{pr1} that there exist $\delta_0\in(0,1]$, $\tau_0>0$, and choose a small $r_0$ if necessary, such that \begin{equation}\label{8.24interno} \sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n}|D^kz_{\mu}|^2e^{2\tau\psi_{\varepsilon}(x)}d \leq C\int_{\mathbb{R}^n}|\mathcal{L}(\delta x_n,D)z_{\mu}|^2\,e^{2\tau\psi_{\varepsilon}(x)}dx \end{equation} for all $\tau\ge\tau_0$, $0<\delta\le\delta_0$, where $C$ depends on $\Lambda_0$, $\lambda_0$, and $M_0$. Let us denote by $LHS(u)$ the left hand side of inequality \eqref{8.241}. We have \begin{equation}\label{6-178c} \begin{aligned} LHS(u)&\leq 2\left(LHS(v_\mu)+LHS(z_\mu)\right)\\&=2\left(LHS(v_\mu)+\sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n}|D^kz_{\mu}|^2e^{2\tau\psi_{\varepsilon}(x)}dx\right). \end{aligned} \end{equation} Then applying \eqref{8.240} to $v_\mu$ and using \eqref{8.24interno} leads to \begin{equation}\label{6-178cdue} \begin{aligned} LHS(u)\leq &C\left(\int_{\mathbb{R}^n}|\mathcal{L}_0(D)v_\mu|^2\,e^{2\tau\psi_{\varepsilon}(x)}dx+[e^{\tau\psi_{\varepsilon}(\cdot,0)}h^{(0)}_1]^2_{1/2,\mathbb{R}^{n-1}}\right.\\ &+[D_{x'}(e^{\tau\psi_{\varepsilon}}h^{(0)}_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\tau^{3}\int_{\mathbb{R}^{n-1}}|h^{(0)}_0|^2e^{2\tau\psi_{\varepsilon}(x',0)}dx'\\&\left.+\tau\int_{\mathbb{R}^{n-1}}|h^{(0)}_1|^2e^{2\tau\psi_{\varepsilon}(x',0)}dx'+\int_{\mathbb{R}^n}|\mathcal{L}(\delta x_n,D)z_{\mu}|^2\,e^{2\tau\psi_{\varepsilon}(x)}dx\right). \end{aligned} \end{equation} By \eqref{elliptic1}, \eqref{elliptic2}, \eqref{lipdelta} and \eqref{etamu} and since $\mu>1$, we can estimate \begin{eqnarray}\label{1-179c} &&\left|\mathcal{L}_0(D)v_\mu\right|\nonumber\\ &\leq& \left|\mathcal{L}(\delta x_n,D)v_\mu\right|+\left|\mathcal{L}(\delta x_n,D)v_\mu-\mathcal{L}_0(D)v_\mu\right|\nonumber\\ &\leq&\left|\mathcal{L}(\delta x_n,D)u\right|\eta_\mu+\frac{2\delta M_0}{\mu}\sum_{\pm}\left|D^2u_\pm\right|\eta_\mu\nonumber\\&& +C(\delta M_0+\Lambda_0)\sum_\pm(\mu|D u_\pm|+\mu^2|u_\pm|)\chi_{\phantom{l}_{\mathbb{R}^{n-1}\times\left( \left[-\frac{2}{\mu},\frac{2}{\mu}\right]\setminus\left[-\frac{1}{\mu},\frac{1}{\mu}\right]\right)}}. \end{eqnarray} On the other hand, we have \begin{eqnarray}\label{1-180} &&\left|\mathcal{L}(\delta x_n,D)z_\mu\right|\nonumber\\ &\leq& \left|\mathcal{L}(\delta x_n,D)u\right|(1-\eta_\mu)\nonumber\\ &&+C(\delta M_0+\Lambda_0)\sum_\pm\left(\mu|D u_\pm|+\mu^2|u_\pm|\right)\chi_{\phantom{l}_{\mathbb{R}^{n-1}\times \left( \left[-\frac{2}{\mu},\frac{2}{\mu}\right]\setminus\left[-\frac{1}{\mu},\frac{1}{\mu}\right]\right)}}. \end{eqnarray} Putting \eqref{1-179c}, \eqref{1-180}, and \eqref{6-178cdue} together implies \begin{equation}\label{sn} LHS(u)\leq C_1\left(\int_{\mathbb{R}^{n}} \left|\mathcal{L}(\delta x_n,D)u\right|^2e^{2\tau\psi_{\varepsilon}(x)}dx+\mathcal{T}_R\right)+C_2\mathcal{R} \end{equation} where \begin{eqnarray*} \mathcal{T}_R&=&[e^{\tau\psi_{\varepsilon}(\cdot,0)}h^{(0)}_1]^2_{1/2,\mathbb{R}^{n-1}}+[D_{x'}(e^{\tau\psi_{\varepsilon}}h^{(0)}_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}\\&&+\tau^{3}\int_{\mathbb{R}^{n-1}}|h^{(0)}_0|^2e^{2\tau\psi_{\varepsilon}(x',0)}dx'+\tau\int_{\mathbb{R}^{n-1}}|h^{(0)}_1|^2e^{2\tau\psi_{\varepsilon}(x',0)}dx', \end{eqnarray*} \begin{equation*} \mathcal{R}=\frac{\delta^2}{\mu^2}\sum_\pm\int_{\mathbb{R}^n_{\pm}}|D^2{u}_{\pm}|^2dx+\mu^2\sum_\pm\int_{\mathbb{R}^n_{\pm}}|D u_\pm|^2dx+\mu^4\int_{\mathbb{R}^{n}}|u|^2dx, \end{equation*} $C_1$ depends only on $\Lambda_0$ and $\lambda_0$ and $C_2$ depends only on $\Lambda_0$, $\lambda_0$ and $M_0$. Now we choose $\mu=\sqrt{ \varepsilon\tau}$ and calculate \begin{eqnarray}\label{ass} LHS(u)-C_2\mathcal{R}&=&\frac{1}{\tau}\left(1-\frac{C_2\delta^2}{\varepsilon}\right)\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|D^2{u}_{\pm}|^2e^{2\tau\psi_{\varepsilon}}dx\nonumber\\ &&+\tau\left(1-C_2\varepsilon\right)\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|D{u}_{\pm}|^2e^{2\tau\psi_{\varepsilon}}dx\nonumber\\&&+\tau^3\left(1-\frac{C_2\varepsilon}{\tau}\right)\int_{\mathbb{R}^n}|u|^2e^{2\tau\psi_{\varepsilon}}dx+\mathcal{T}_L, \end{eqnarray} where \begin{eqnarray*} \mathcal{T}_L&=&\sum_{\pm}\sum_{k=0}^1\tau^{3-2k}\int_{\mathbb{R}^{n-1}}|D^k{u}_{\pm}(x',0)|^2e^{2\psi_{\varepsilon}(x',0)}dx'\nonumber\\ &&+\sum_{\pm}\tau^2[e^{\tau\psi_{\varepsilon}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\sum_{\pm}[D(e^{\tau\psi_{\varepsilon,\pm}}u_{\pm})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}. \end{eqnarray*} By choosing $\varepsilon$ and $\delta$ satisfying \begin{equation}\label{deltaep} \delta^2\leq \frac{\varepsilon}{2C_2}\quad\mbox{ and }\quad\varepsilon\leq \frac{1}{2C_2}, \end{equation} estimate \eqref{8.241} follows easily from \eqref{sn} and \eqref{ass}. \subsection{Carleman estimate for operators depending on all variables} We now want to extend the estimate \eqref{8.241} to operators with coefficients depending also on the variables $x'$. To treat this case we proceed exactly as in \cite[Section 4.2, pp.198-200]{dflvw}, that is, we approximate with coefficients depending only on $x_n$. We use the partition of unity introduced at the beginning of Section~\ref{sec4} and show that \begin{equation}\label{4.25} LHS(u)\leq C \sum_{g\in \mathbb{Z}^{n-1}} LHS\left(u\eta_{g,\mu}\right)+CR_1, \end{equation} where we define \[ \begin{aligned} LHS(u)=&\sum_{\pm}\sum_{k=0}^2\tau^{3-2k}\int_{\mathbb{R}^n_{\pm}}|D^k{u}_{\pm}|^2e^{2\tau\psi_{\varepsilon,\pm}(x',x_n)}dx'dx_n\\ &+\sum_{\pm}\sum_{k=0}^1\tau^{3-2k}\int_{\mathbb{R}^{n-1}}|D^k{u}_{\pm}(x',0)|^2e^{2\psi_\varepsilon(x',0)}dx'\\ &+\sum_{\pm}\tau^2[e^{\tau\psi_{\varepsilon}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\sum_{\pm}[D(e^{\tau\psi_{\varepsilon,\pm}}u_{\pm})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}} \end{aligned} \] and \begin{equation*} R_1:= (\varepsilon\tau)^{1/2}\sum_{\pm}\int_{\mathbb{R}^{n-1}}e^{2\tau\psi_{\varepsilon}(x',0)}(|D_{x_n}u_{\pm}(x',0)|^2+|D_{x'}u_{\pm}(x',0)|^2+\tau^2|u_{\pm}(x',0)|^2)dx'. \end{equation*} Remind that $\eta_{g,\mu}$ is defined in \eqref{etagmu}. Notice that $\Xi$ in (4.25) of \cite{dflvw} corresponds to $LHS$ here. As in \cite[Section 4.3]{dflvw}, we introduce some local differential operators that only depend on $x_n$, in such a way that we can apply estimate \eqref{8.241}. Let us define \begin{equation}\label{7.7} A^\delta_{\pm}(x',x_n):=A_{\pm}(\delta x',\delta x_n), \end{equation} \begin{equation}\label{7.8} \mathcal{L}_\delta(x',x_n,D)u:=\sum_{\pm}H_{\pm}{\rm div}(A^\delta_{\pm}(x',x_n)\nabla u_{\pm}), \end{equation} and the transmission conditions \begin{equation* \begin{cases} \theta_0(x')=u_+(x',0)-u_-(x',0),\\ \theta_1(x')=A^\delta_+(x',0)\nabla u_+(x',0)\cdot e_n-A^\delta_-(x',0)\nabla u_-(x',0)\cdot e_n. \end{cases} \end{equation*} Next, recalling that $x'_g=g/\mu$ and $g\in \mathbb{Z}^{n-1}$, we define \begin{equation* \begin{cases} A^{\delta,g}_{\pm}(x_n):=A^\delta_{\pm}(x'_g, x_n)=A_{\pm}(\delta x'_g,\delta x_n),\\ \mathcal{L}_{\delta,g}(x_n,D)u:=\sum_{\pm}H_{\pm}{\rm div}(A^{\delta,g}_{\pm}(x_n)\nabla u_{\pm}). \end{cases} \end{equation*} We notice that $A^{\delta,g}_{\pm}(x_n)$ satisfies assumptions \eqref{elliptic1}, \eqref{elliptic2} and also the Lipschitz condition \begin{equation* |A^{\delta,g}_{\pm}(\tilde x_n)-A^{\delta,g}_{\pm}(x_n)|\leq M_0\delta|\tilde x_n-x_n|. \end{equation*} We now apply \eqref{8.241} to each summand and add up with respect to $g\in\mathbb{Z}^{n-1}$ to obtain that \begin{equation}\label{8.1} \sum_{g\in \mathbb{Z}^{n-1}}LHS(u\eta_{g,\mu})\leq C \sum_{g\in \mathbb{Z}^{n-1}}(d^{(1)}_{g,\mu}+d^{(2)}_{g,\mu}+d^{(3)}_{g,\mu}), \end{equation} where \begin{equation*} \begin{aligned} d^{(1)}_{g,\mu}=& \int_{\mathbb{R}^n}|\mathcal{L}_{\delta,g}(x_n,D)(u\eta_{g,\mu})|^2e^{2\tau\psi_{\varepsilon}(x)}dx,\\ d^{(2)}_{g,\mu}=&\tau^{3}\int_{\mathbb{R}^{n-1}}|e^{\tau\psi_{\varepsilon}(x',0)}\theta_{0;g,\mu}(x')|^2dx'+[D_{x'}(e^{\tau\psi_{\varepsilon}}\theta_{0;g,\mu})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}},\\ d^{(3)}_{g,\mu}=&\tau\int_{\mathbb{R}^{n-1}}|e^{\tau\psi_{\varepsilon}(x',0)}\theta_{1;g,\mu}(x')|^2dx'+[e^{\tau\psi_{\varepsilon}(\cdot,0)}\theta_{1;g,\mu}(\cdot)]^2_{1/2,\mathbb{R}^{n-1}}, \end{aligned} \end{equation*} where we set \begin{equation*} \theta_{0;g,\mu}(x'):=u_+(x',0)\eta_{g,\mu}(x')-u_-(x',0)\eta_{g,\mu}(x')=\theta_0(x')\eta_{g,\mu}, \end{equation*} \begin{equation*} \theta_{1;g,\mu}(x'):=A^{\delta,g}_+(0)\nabla (u_+\eta_{g,\mu})\cdot e_n-A^{\delta,g}_-(0)\nabla (u_-\eta_{g,\mu})\cdot e_n. \end{equation*} We now proceed as in \cite[Section 4.3, pp.201-204]{dflvw} for the estimates of the terms $d^{(j)}_{g,\mu}$, $j=1,2,3$ in \eqref{8.1}. For the sake of clarity, we show here the estimate of the term $d^{(1)}_{g,\mu}$. By \eqref{elliptic1}, \eqref{elliptic2}, \eqref{7.4}, \eqref{6.7} and \eqref{7.7} we obtain that \begin{equation* \begin{aligned} &\;\;|\mathcal{L}_{\delta,g}(x_n,D)(u\eta_{g,\mu})|\\ &\leq |\mathcal{L}_\delta(x',x_n,D)(u\eta_{g,\mu})|+|\mathcal{L}_\delta(x',x_n,D)(u\eta_{g,\mu})-\mathcal{L}_{\delta,g}(x_n,D)(u\eta_{g,\mu})|\\ &\leq \eta_{g,\mu}|\mathcal{L}_\delta(x',x_n,D)u|+C\eta_{g,\mu}\sum_\pm|A^\delta_\pm(x',x_n)-A^\delta_\pm(x'_g,x_n)||D^2u_\pm|\\&+C\chi_{Q_{\frac{2}{\mu}}(x'_g)}\sum_\pm\left(\mu|Du_\pm|+\mu^2|u_\pm|\right) \\ &\leq \eta_{g,\mu}|\mathcal{L}_\delta(x',x_n,D)u|+C\chi_{Q_{\frac{2}{\mu}}(x'_g)}\sum_\pm\left(\delta\mu^{-1}|D^2u_\pm|+\mu|Du_\pm|\,+\mu^2|u_\pm|\right), \end{aligned} \end{equation*} which, together with \eqref{cardAg} and since $\mu=(\varepsilon\tau)^{1/2}>1$, implies \begin{equation}\label{8.3} \sum_{g\in \mathbb{Z}^{n-1}}d^{(1)}_{g,\mu}\leq C\int_{\mathbb{R}^n}|\mathcal{L}_\delta(x',x_n,D)u|^2\,e^{2\tau\psi_{\varepsilon}}dx+CR_2, \end{equation} where \begin{equation*} \begin{aligned} R_2=\frac{\delta^2}{\mu^{2}}\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|D^2u_{\pm}|^2\,e^{2\tau\psi_{\varepsilon,\pm}}dx+\mu^{2}\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|Du_{\pm}|^2\,e^{2\tau\psi_{\varepsilon,\pm}}d +\mu^{4}\int_{\mathbb{R}^n}|u|^2\,e^{2\tau\psi_{\varepsilon}}dx. \end{aligned} \end{equation*} With similar calculations, which are explicitly written in the above mentioned pages of \cite{dflvw}, we can estimate $d^{(2)}_{g,\mu}$, $d^{(3)}_{g,\mu}$ and get \begin{eqnarray}\label{4.52} LHS(u)&\leq &C\left(\int_{\mathbb{R}^n}|\mathcal{L}_\delta(x',x_n,D)u|^2\,e^{2\tau\psi_{\varepsilon}}dx+[e^{\tau\psi_{\varepsilon}(\cdot,0)}\theta_1]^2_{1/2,\mathbb{R}^{n-1}}\right.\nonumber\\ &&+[D_{x'}(e^{\tau\psi_{\varepsilon}}\theta_0)(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}+\tau^{3}\int_{\mathbb{R}^{n-1}}e^{2\tau\psi_{\varepsilon}(x',0)}|\theta_0(x')|^2dx'\nonumber\\ &&\left.+\tau\int_{\mathbb{R}^{n-1}}e^{2\tau\psi_{\varepsilon}(x',0)}|\theta_1(x')|^2dx'+R_3\right). \end{eqnarray} where \begin{eqnarray*} R_3&= & \frac{\delta^2}{\mu^{2}}\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|D^2u_{\pm}|^2\,e^{2\tau\psi_{\varepsilon,\pm}}dx+\mu^{2}\sum_{\pm}\int_{\mathbb{R}^n_{\pm}}|Du_{\pm}|^2\,e^{2\tau\psi_{\varepsilon,\pm}}dx\nonumber\\ &&+\mu^{4}\int_{\mathbb{R}^n}|u|^2\,e^{2\tau\psi_{\varepsilon}}dx+(\mu+\delta^2\varepsilon^{-1})\sum_{\pm}\int_{\mathbb{R}^{n-1}}|D{u}_{\pm}(x',0)|^2e^{2\tau\psi_{\varepsilon}(x,0)}dx\nonumber\\ &&+\mu\tau^2\sum_{\pm}\int_{\mathbb{R}^{n-1}}|u_{\pm}(x',0)|^2e^{2\tau\psi_{\varepsilon}(x',0)}dx'+(\mu^4+\delta^{2}\mu^{-2}\tau^2)\sum_{\pm}[e^{\tau\psi_{\varepsilon}(\cdot,0)}u_{\pm}(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}\nonumber\\ &&+\delta^{2}\mu^{-2}\sum_{\pm}[D(u_{\pm}e^{\tau\psi_{\varepsilon,\pm}})(\cdot,0)]^2_{1/2,\mathbb{R}^{n-1}}. \end{eqnarray*} We now set $\varepsilon=\delta$ and choose a sufficiently small $\delta_0$ and a sufficiently large $\tau_0$, both depending on $\lambda_0$, $\Lambda_0$, $M_0$, and $n$ such that if $\varepsilon=\delta\leq\delta_0$ inequalities \eqref{deltaep} are satisfied and if $\tau\geq\tau_0$, then $R_3$ on the right hand side of \eqref{4.52} can be absorbed by $LHS(u)$. We finally get the estimate \eqref{8.241} by the standard change of variable $u(\delta x',\delta x_n)$. \section*{Acknowledgement} Wang was partially supported by MOST 108-2115-M-002-002-MY3.
\section{Introduction} \begin{spacing}{2.0} \noindent\textbf{1\quad Introduction} \end{spacing} The bulk-boundary correspondence is a fundamental principle of topological phases of matter. Very recently, higher-order \red{topological insulators} (TIs) and \red{topological superconductors} (TSCs) have attracted broad interest owing to their unconventional bulk-boundary correspondence ~\cite{Benalcazar2017,Schindler2018,Song2017,Langbehn2017,Benalcazar2017a,Ezawa2018,Khalaf2018a,Geier2018,Franca2018,Trifunovic2019}. In comparison to their conventional counterparts, also known as first-order TIs and TSCs~\cite{Hasan2010,Qi2011}, the unconventionality is manifested through the codimension of their gapless boundary modes. Concretely, the boundary modes of $n$th\rred{-}order TIs or TSCs have codimension $n$, with $n=1$ and $n\geq2$ corresponding to the first-order and higher-order ones, respectively. Two- and three-dimensional higher-order TIs have already been experimentally realized in many platforms, including photonic crystals~\cite{noh2018topological,Chen2019photonic,Xie2108photonic,Hassan2019corner}, microwave resonators~\cite{peterson2018quantized}, electric circuits ~\cite{imhof2018corner,Bao2019octupole}, phononic metamaterials~\cite{serra2018observation,xue2019acoustic,zhang2019second,Xue2019octupole,Ni2019octupole}, and a few electronic materials~\cite{Schindler2018HOTI,Kempkes2019}. In \red{comparison}, higher-order TSCs have so far been little explored in experiments~\cite{Gray2019helical}, owing to the underlying difficulty in realizing this class of novel phases in real materials~\cite{Zhu2018,Yan2018,Wang2018hosc,Wang2018hosc2,Liu2018hosc,Hsu2018,Wu2019hosc,Zhang2019hinge, Volpez2019SOTSC,Zhu2019SOTSC,Franca2019SOTSC,Yang2019hinge,Ghorashi2019HOSC,Pan2018SOTSC,Zhang2019hoscb, Yan2019second,Wu2019hoscb,Hsu2019HOSC,Wu2019swave}. \red{Similar to the first-order topology, the higher-order topology is defined by the bulk momentum-space Hamiltonian. However, thus far the determination of higher-order topology in experiments has been indirect and relying on the detection of gapless modes at the theoretically predicted positions on the real-space boundary. Moreover, experimental works on higher-order topological phases have also mainly focused on the gapless boundary modes, novel physics directly related to the bulk, like topological phase transitions, has still been little explored in experiments~\cite{Serra2019quadrupole}. Particularly, while the higher-order topological phases bring new possibility to topological phase transitions, we notice that the novel class, which take place between higher-order and first-order topological phases within the same symmetry class, have yet to be investigated experimentally.} \red{Although the indirect boundary approach is simple in experiments and the bulk-boundary correspondence guarantees its reliability, a direct bulk approach, if possible, is highly desirable as it can directly determine the underlying topological invariants and thus can detect topological phase transitions much more precisely than the boundary approach. In real materials, it is obvious that the bulk approach is rather challenging because the complexity of band structures is high and the topological invariants depend on all occupied bands\cite{Chiu2016review}. Nevertheless, as the essential physics of various topological phases can also be realized in some simple Hamiltonians which only involve a minimal set of bands, the great reduction of complexity in such situations will make the bulk approach feasible. For instance, when the concerned system is described by a two-band Hamiltonian of the form $H(\mathbf{k})=\mathbf{d}(\mathbf{k})\cdot \boldsymbol{\sigma}$ with $\boldsymbol{\sigma}=(\sigma_{x},\sigma_{y},\sigma_{z})$ the Pauli matrices, its topological property can be simply determined by measuring the spin (or pseudo-spin in general) texture throughout the Brillouin zone (BZ)~\cite{Roushan2014,Schroer2014TPT,Flurin2017,Xu2018winding}. One celebrated example is the Qi-Wu-Zhang model~\cite{Qi2006model}, which describes a Chern insulator when the spin texture realizes a Skyrmion configuration in the BZ. } In this work, we carry out the simulation of \red{a two-dimensional two-band Hamiltonian which can realize both second-order and first-order topological phases} in a superconducting qubit. By mapping the momentum space of the simulated two-band Hamiltonian to the parameter space of the qubit Hamiltonian, we are able to determine the pseudo-spin texture in the whole BZ with a combinational use of quantum-quench dynamics and quantum state tomography (QST). Through the evolution of pseudo-spin texture with parameters, we not only observe the topological phase transitions between second-order \red{topological phases} and trivial \red{phases}, but also observe the ones between second-order and first-order \red{topological phases} within the same symmetry class for the first time. \begin{spacing}{2.0} \noindent\textbf{2\quad Results} \begin{spacing}{1.5} \noindent\it{2.1 Theoretical model.} \end{spacing} \end{spacing} \red{In terms of the Pauli matrices, an arbitrary two-band Hamiltonian can be written as $H=\sum_{\mathbf{k}}\psi_{\mathbf{k}}^{\dag}H(\mathbf{k})\psi_{\mathbf{k}}$, where $\psi_{\mathbf{k}}$ denotes a basis of two degrees of freedom, and \begin{eqnarray} H(\mathbf{k})=d_{0}(\mathbf{k})\mathbf{I}_{2\times2}+\sum_{i=x,y,z}d_{i}(\mathbf{k})\sigma_{i}.\label{BdG} \end{eqnarray} As the first term with two-by-two identity matrix $\mathbf{I}_{2\times2}$ plays no role in the band topology, we will let it vanish throughout this work. } In a recent work, one of us revealed that when the $\mathbf{d}=(d_{x},d_{y},d_{z})$ vector is constructed by a Hopf map, the resulting Hamiltonian provides a minimal-model realization of second-order \red{topological phases}~\cite{Yan2019HOTOPSC}. Concretely, the Hopf map is $d_{i}(\mathbf{k})=z^{\dag}(\mathbf{k})\sigma_{i}z(\mathbf{k})$, where the spinor $z(\mathbf{k})=(z_{1}(\mathbf{k}),z_{2}(\mathbf{k}))^{T}$, $z_{1}(\mathbf{k})=f_{1}(\mathbf{k})+if_{2}(\mathbf{k})$, and $z_{2}(\mathbf{k})=g_{1}(\mathbf{k})+ig_{2}(\mathbf{k})$, with $f_{1}(\mathbf{k})=(\cos k_{x}+\lambda_{1})$, $f_{2}(\mathbf{k})=(\cos k_{y}+\lambda_{2})$, $g_{1}(\mathbf{k})=\sin k_{x}$, $g_{2}(\mathbf{k})=\sin k_{y}$. Accordingly, $d_{x}=2(f_{1}g_{1}+f_{2}g_{2})$, $d_{y}=2(f_{1}g_{2}-f_{2}g_{1})$, and $d_{z}=f_{1}^{2}+f_{2}^{2}-g_{1}^{2}-g_{2}^{2}$. Remarkably, this model has a simple phase diagram resembling the one of the Benalcazar-Bernevig-Hughes model~\cite{Benalcazar2017}. That is, when $|\lambda_{1,2}|<1$, it realizes a second-order \red{topological phase}, otherwise it describes a \red{trivial phase}. However, a fundamental difference lies between this model and the Benalcazar-Bernevig-Hughes model. For the latter, it belongs to either the class BDI or the class AI (depending on whether an on-site potential is present or not) of the Altland-Zirnbauer classification~\cite{Schnyder2008,Kitaev2009,Ryu2010}. In two dimensions, it is known that both class BDI and class AI do not allow any first-order topological phases. In contrast, the model given in Ref.~\cite{Yan2019HOTOPSC} belongs to either the class D \red{or the class A (depending on whether the term $d_{0}(\mathbf{k})\mathbf{I}_{2\times2}$, which will break the particle-hole symmetry, is present or not)}. In two dimensions, it is known that both class D and class A allow first-order topological phases which are characterized by the first-class Chern number~\cite{qi2010chiral}. As second-order and first-order topological phases are both allowed in the class D \red{and class A, this raises the possibility to observe topological phase transitions between topological phases of different orders.} Based on the above recognition, we lift the strong constraint imposed by the Hopf map by introducing a new free parameter to the model given in Ref.~\cite{Yan2019HOTOPSC}. For concreteness, we write down $d_{x,y,z}$ explicitly, which read \begin{small} \begin{eqnarray} d_{x}(\mathbf{k})&=&2\lambda_1 \sin k_x + 2\lambda_2 \sin k_y + \sin 2k_x +\sin 2k_y,\nonumber\\ d_{y}(\mathbf{k})&=&2\lambda_1 \sin k_y - 2\lambda_2 \sin k_x + 2\sin (k_y-k_x),\nonumber\\ d_{z}(\mathbf{k})&=&2\lambda_1 \cos k_x + 2\lambda_2 \cos k_y + \cos 2k_x +\cos 2k_y\!-\!\mu,\label{expression} \end{eqnarray} \end{small} where $\mu$ is the newly-added free parameter. If we fix $\mu=-(\lambda_{1}^{2}+\lambda_{2}^{2})$, the above Hamiltonian reduces to the one in Ref.~\cite{Yan2019HOTOPSC}. As we will show shortly, this generalized Hamiltonian has a richer phase diagram, most importantly, it allows topological phase transitions between second-order and first-order topological phases. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.45\textwidth]{Fig1.pdf} \caption{Schematics of principle and experimental implementation. $\pm d_{z}(\mathbf{k})$, whose crossings correspond to the band inversion surfaces, for (a) pre-quench ($\lambda \!\rightarrow \! \infty$) and (b) post-quench ($\lambda\!=\!-0.5$) cases. (c) The energy diagram of an Xmon qubit. A microwave pulse is applied for simulation at each momentum via controlling its detuning frequency $\delta$, amplitude $\Omega$, and phase $\phi$. (d) corresponds to the moment right upon the application of the quench pulse that changes the initial Hamiltonian \rred{$H\rm_i$} to the final Hamiltonian \rred{$H\rm_f$}. (e) illustrates the temporal dynamics afterwards. (f) shows rotation pulses for the QST process. (g) Time line of experimental operations.} \label{Fig1} \end{center} \end{figure} \red{While the existence of particle-hole symmetry allows the above Hamiltonian to describe either an insulator or a spinless \rred{superconductor}, in this work we will not emphasize the interpretation of the Hamiltonian because the experiment is performed in a single superconducting qubit. Nevertheless, the bulk topology does not depend on the interpretation, so we can still follow the analysis in Ref.~\cite{Yan2019HOTOPSC}. That is, as the two-band Hamiltonian has inversion symmetry ($\mathcal{I}H(\mathbf{k})\mathcal{I}^{-1}=H(-\mathbf{k})$ with $\mathcal{I}=\sigma_{z}$), its topological property is simply determined by the relative configuration between $d_{z}(\mathbf{k})=0$ (here dubbed band inversion surface (BIS) \rred{\cite{Zhang2018DTPT}}) and $d_{x}(\mathbf{k}) = d_{y}(\mathbf{k}) = 0$ (dubbed Dirac points (DPs))}. As the $d_{z}(\mathbf{k})$ term consists of both the nearest-neighbor and the next-nearest-neighbor hoppings, the number of \red{BISs ($N_{\rm BIS}$)}, which counts the number of disconnected contours satisfying $d_{z}(\mathbf{k})=0$, can be $0$, $1$, and $2$. For the first-order topology, the parity of Chern number $C$ is directly tied to \red{$N_{\rm BIS}$, namely $(-1)^{C}=(-1)^{N_{\rm BIS}}$}~\cite{sato2010odd}, indicating that a gapped phase with an odd number of \red{BIS} must have nontrivial first-order topology. To realize second-order topological phases, it was revealed in Ref.~\cite{Yan2019HOTOPSC} that the number of \red{BIS} needs to be even and removable \red{DPs} (not pinned at any specific momentum) are required to be present between or within the disconnected \red{BISs} so that the resulting gapped phases cannot be continuously deformed to the trivial phase (no BIS) without the closure of bulk gap. \vspace{10pt} \begin{spacing}{1.5} \noindent\it{2.2 Quench dynamics} \end{spacing} In this work, we simulate the two-band Hamiltonian (\req{BdG}) in an Xmon type superconducting qubit (see Supplemental Information (SI) for details of samples and experimental setup) and adopt QST to determine the underlying pseudo-spin texture. Concretely, we first prepare the qubit to stay in \rred{$|\psi_\mathrm{i}(\mathbf{k},t)\rangle$}, the eigenstate of $\sigma_{z}$, i.e., \rred{$\sigma_{z}|\psi_\mathrm{i}(\mathbf{k},t)\rangle=-|\psi_\mathrm{i}(\mathbf{k},t)\rangle$}. Such a choice corresponds to the ground state of $H(\mathbf{k})$ in the limit $\lambda_{1,2}\!\rightarrow\!\infty$ for which the Hamiltonian is trivial in topology (see \rfig{Fig1}(a)). Next, we suddenly quench the system at $t=0$ by a microwave pulse $\Omega(t) = \Omega\cos((\omega_{01}+\delta)t+\phi)$, with amplitude $\Omega\!=\!\sqrt{d_x^2+d_y^2}$, phase $\phi\!=\!\arctan{(d_y/d_x)}$, and frequency detuning $\delta\!=\!d_z$ (see \rfig{Fig1}(c)(d)), then the state will follow a unitary time evolution, i.e., \rred{$|\psi_\mathrm{f}(\mathbf{k},t)\rangle=e^{i H_\mathrm{f}(\mathbf{k})t}|\psi_\mathrm{i}(\mathbf{k},0)\rangle$}, where $\rred{H\!\rm_{f}(\mathbf{k})}=\mathbf{d}(\mathbf{k})\cdot\boldsymbol{\sigma}$ takes the form we desire to simulate. \begin{figure}[htbp] \begin{center} \includegraphics[width=0.45\textwidth]{Fig2.pdf} \caption{Experiments demonstrating a second-order \red{topological phase} and the movement and annihilation of (anti)vortices. (a) $P_z$ measured across the BZ for a particular realization of the second-order \red{topological phase} ($\lambda=-0.5$). The two closed curves indicate the \red{BISs} in the first BZ where $P_z=0$. (b) ($P_x$, $P_y$) measured across the BZ for the same realization, shown as two dimensional vectors. For completeness, $P_z$ is also indicated by the color of the vectors. The circular arrows mark the four removable vortices and antivortices. (c)-(g) The movement, merging, and annihilation of a pair of vortex and antivortex manifested by evolution of the pseudo-spin texture ($P_x$, $P_y$) for $\lambda_2=-0.5$, $\lambda_1=-1+\delta$, with $\delta\in[0.15,0.05,0,-0.05,-0.15]$. } \label{Fig2} \end{center} \end{figure} After the quench, the pseudo-spin polarization, defined as \rred{$\mathbf{P}(\mathbf{k},t)=\langle \psi_{f}(\mathbf{k},t)|\boldsymbol{\sigma}|\psi_{f}(\mathbf{k},t)\rangle$}, will precess on the Bloch sphere (see illustration in \rfig{Fig1}) around the direction of $\mathbf{d}(\mathbf{k})$. In experiments, the evolution of $\mathbf{P}(\mathbf{k}, t)$ can be measured by QST. Interestingly, it was shown in Ref.~\cite{Zhang2018DTPT} that the time-averaged pseudo-spin polarization is directly related to $\mathbf{d}(\mathbf{k})$ and then the band topology of the Hamiltonian can be extracted from this quantity\cite{Zhang2018DTPT,Sun2018a,Wang2019b,Yi2019a,Zhang2019b,Hu2019}. To obtain this quantity, here we flatten the Hamiltonian as \rred{$H_\mathrm{f}(\mathbf{k})/E_\mathrm{f}(\mathbf{k})$} with \rred{$E_\mathrm{f}(\mathbf{k})$} the eigenenergy of \rred{$H_\mathrm{f}(\mathbf{k})$} (such a procedure does not change the underlying topological properties), so that the period of evolution is identical for each \red{$\mathbf{k}$}~\cite{Hu2019,Guo2019}. By doing so, we find that only two periods are sufficient to obtain a trustworthy value of the time-averaged pseudo-spin polarization (see SI for a detailed discussion). The result reads \begin{eqnarray}\label{Px} P_{i}(\mathbf{k})=-\frac{d_{i}(\mathbf{k})d_z(\mathbf{k})}{d_x^2(\mathbf{k})+d_y^2(\mathbf{k})+d_z^2(\mathbf{k})}, \end{eqnarray} where $P_{i}$ with $i=x,y,z$ represent the three components (as shown in Figs. \ref{Fig1}(d-f)). It is immediately seen that the \red{BISs} determined by $d_{z}\!=\!0$ correspond to $P_z\!=\!0$, and the \red{DPs} determined by $d_{x}\!=\!d_{y}\!=\!0$ can be extracted from $P_x\!=\!P_{y}\!=\!0$ after the contour $P_z\!=\!0$ is determined. \begin{figure*}[htbp] \begin{center} \includegraphics[width=0.8\textwidth]{Fig3.pdf} \caption{Phase transition from a second-order \red{topological phase} to a trivial \red{phase}. \red{Under a uniform discretization with $41$ discrete momentum points in $k\in[-\pi,\pi]$}, (a) and (b) respectively show the $P_x$ and $P_z$ measured along the $k_x=k_y$ line as $\lambda_1=\lambda_2=\lambda$ changes continually from $-2$ to $2$. (c) Left: $(d_{x},d_{z})$ versus $k$ for different $\lambda$ deduced from data in (a) and (b). On the right side the winding configuration of ($d_x$, $d_z$) around the origin (the stars) is shown, and the corresponding $\mathcal{W}_\text{n}$ is indicated. (d) $\lambda$-dependence of $\mathcal{W}_\text{n}$ obtained experimentally using \req{Wn} (blue circles) and the theoretical expectation (pink line). The insets show \red{$\pm d_{z}(\mathbf{k})$ (their crossings occur at $d_{z}(\mathbf{k})=0$, corresponding to the BISs)}, pseudo-spin texture ($P_x$, $P_z$), as well as the \red{BISs} ($P_z$ = 0), for different phases.} \label{Fig3} \end{center} \end{figure*} \begin{figure*}[htbp] \begin{center} \includegraphics[width=0.85\textwidth]{Fig4.pdf} \caption{Phase transitions between first- and second-order \red{topological phases} and trivial \red{phases}. (a) Phase diagram of the simulated Hamiltonian with $\lambda_1=\lambda_2=\lambda$. The blue dashed line is for $\lambda=-0.5$, which is experimentally demonstrated in (c), while the pink curve represents the experiment in \rfig{Fig3}. \red{Under a uniform discretization with $31$ discrete momentum points in $k\in[-\pi,\pi]$,} (b) shows the $(d_{x},d_{z})$ measured along the $k_{x}=k_{y}=k$ line for different $\mu$ with $\lambda$ fixed to $-0.5$. The right side shows the corresponding winding configurations ($d_z$, $d_x$). (c) $\mu$-dependence of $\mathcal{W}_\text{n}$ obtained experimentally using \req{Wn} (blue circles) and the theoretical expectation (pink line). The insets show \red{$\pm d_{z}(\mathbf{k})$}, pseudo-spin texture ($P_x$, $P_y$), as well as the \red{BISs} for different phases.} \label{Fig4} \end{center} \end{figure*} \vspace{10pt} \begin{spacing}{1.5} \noindent\it{2.3 Topological phase transitions between second-order topological phases and trivial phases} \end{spacing} We first show the experimental results for the case with $\mu$ fixed to $-(\lambda_1^2+\lambda_{2}^2)$, accordingly, the Hamiltonian hosts only two possible phases, a second-order \red{topological phase} and a trivial \red{phase}~\cite{Yan2019HOTOPSC}. Let us focus on some specific points in the parameter space at first. As shown in \rfig{Fig2}(a), when we set $\lambda_{1}\!=\!\lambda_{2}\! = \!-0.5$, there are two disconnected contours that satisfy $P_{z}=0$, indicating the presence of two disconnected \red{BISs} in the BZ. Figure \ref{Fig2}(b) shows the corresponding texture of $(P_{x},P_{y})$. It is readily seen that there are four vortices and four antivortices in the BZ whose cores correspond to $P_{x}=P_{y}=0$, with half of them located at time-reversal invariant momenta, and the other half located at some generic momenta between the two contours for $P_{z}=0$. As mentioned previously, these vortices and antivortices refer to \red{DPs}, and the four at generic momenta represent the removable ones which are crucial for the realization of the second-order topological phase~\cite{Yan2019HOTOPSC}. By fixing $\lambda_{2}=-0.5$ and decreasing $\lambda_{1}$, we find that the removable vortices and antivortices move toward each other in pair and then annihilate at $\lambda_{1}=-1$, as shown in Figs. \ref{Fig2}(c-g). After the annihilation, the two contours for $P_{z}=0$ can continuously move together and then annihilate without crossing any other vortices, indicating that the annihilation of removable vortices and antivortices corresponds to a topological phase transition from the second-order \red{topological phase} to the trivial \red{phase}. To further confirm the topological phase transition, we tune the parameter to satisfy $\lambda_{1}=\lambda_{2}=\lambda$. Under this condition, the topological property of the simulated Hamiltonian is fully characterized by the winding number defined on the line $k_{x}=k_{y}$ or $k_{x}=-k_{y}$ (they are equivalent)~\cite{Yan2019HOTOPSC}. Focusing on the line $k_{x}=k_{y}=k$ (see SI for the $k_x\!=\!-k_y$ case), the winding number is given by \begin{eqnarray} \mathcal{W}_\text{n} = \frac{1}{2\pi}\int_{-\pi}^{\pi} \frac{d_z\partial_{k} d_x - d_x \partial_{k} d_z}{d_x^2+d_z^2}\, dk. \label{Wn} \end{eqnarray} \red{It is noteworthy that the above formula is an integral, however, a continuous measurement of \rred{pseudo-}spin textures is apparently unrealistic in any real experiment. While an intensive discretization of the BZ can reduce the errors caused by the finite discretization as well as some random errors presented in the measurements of pseudo-spin polarization (see SI for more discussion), this needs to be balanced with a reasonable measurement time, otherwise it becomes difficult to explore as much of the parameter space as possible. Under a uniform discretization with $41$ discrete momentum points in $k\in[-\pi,\pi]$,} Figs. \ref{Fig3}(a) and (b) show the measured ($P_{x}$, $P_{z}$) through which the dependence of ($d_{x}$, $d_{z}$), and so $\mathcal{W}_\text{n}$, on $\lambda$, is extracted, as shown in \rfig{Fig3}(c). Geometrically, $\mathcal{W}_\text{n}$ corresponds to the number of cycles that the vector ($d_{x}$, $d_{z}$) winds around the origin ($d_{x}=0, d_{z}=0$) when $k$ varies from $-\pi$ to $\pi$~\cite{Ryu2002winding}. As the vector ($d_{x}$, $d_{z}$) is found to wind the origin twice when $|\lambda|<1$, the geometric interpretation suggests $\mathcal{W}_\text{n}=2$; in contrast, when $|\lambda|>1$, no complete cycle is observed, suggesting $\mathcal{W}_\text{n}=0$, as depicted on the right side of \rfig{Fig3}(c). We have also calculated $\mathcal{W}_\text{n}$ by following \req{Wn} and using the experimentally obtained values of $d_{x}$ and $d_{z}$, with the results presented in \rfig{Fig3}(d) (the blue circles). The experimental results, while displaying certain fluctuations \red{and smeared transitions} due to the finite discretization of the BZ \red{and some random errors presented in measurements}, are in good agreement with the theoretical expectation (the pink line). \red{In the Supplementary Information, we show that by using a finer \rred{and nonuniform} discretization of the k-space, much sharper transitions can be observed}. In \rfig{Fig3}(d), we also present the evolution of $(P_{x},P_{y})$ and the contours for $P_{z}=0$. As $\lambda_{1}=\lambda_{2}=\lambda$ is set, the four removable vortices and antivortices of $(P_{x},P_{y})$ move in a symmetrically all-inward or all-outward way with the variation of $\lambda$, and the change of $\mathcal{W}_\text{n}$, or say topological phase transition, matches well with the annihilation of them at $(0,0)$ for $\lambda=-1$ and $(\pi,\pi)$ for $\lambda=1$. \red{It is worth noting that while the region with $\mathcal{W}_\text{n}=2$ covers the whole second-order topological phase when $\lambda_{1}=\lambda_{2}=\lambda$, the number of zero-energy modes per corner in the resulting second-order topological phase is just $1$ rather than $2$~\cite{Yan2019HOTOPSC}. This may look counterintuitive, since it is known that the winding number is equivalent to the number of zero-energy modes per end in one dimension. However, here $\mathcal{W}_\text{n}$ is defined on a high symmetry line in two dimensions. Owing to the presence of an extra dimension, what can be inferred from $\mathcal{W}_\text{n}=2$ is the existence of gapless modes when the sample's edges are chosen along the $x=y$ or $x=-y$ direction~\cite{Yan2019HOTOPSC}. On the other hand, the number of zero-energy mode at one corner is determined by two intersecting edges, so there is no reason to expect that the simple relation between winding number and zero-energy mode in one dimension should also hold in two dimensions.} \vspace{10pt} \begin{spacing}{1.5} \noindent\it{2.4 Topological phase transitions between second-order and first-order topological phases} \end{spacing} When $\mu$ becomes variable, the number of BISs is no longer limited to be even, as a result, first-order topological phases become possible~\cite{sato2010odd} (see the phase diagram in \rfig{Fig4}(a)). The first-order topological phase in \rfig{Fig4}(a) has Chern number $C=1$ as it has only one BIS within which the numbers of vortices and antivortices differ by one. From \rfig{Fig4}(a), it is apparent that the desired topological phase transitions between second-order and first-order topological phases can be achieved by appropriately varying $\lambda$ or $\mu$. Without loss of generality, we fix $\lambda=-0.5$ and vary $\mu$ in a broad regime (see the blue dashed line in \rfig{Fig4}(a)). Accordingly, the configuration of vortices and antivortices is expected to be intact and only the \red{BIS} will change. As here the first-order topological phase with $C=1$ has a corresponding $\mathcal{W}_\text{n}=1$, in the experiment we keep using the observed pseudo-spin texture on the $k_{x}=k_{y}$ line to extract the topological invariants, as well as the topological phase transitions. \red{As a wide range of $\mu$ is to cover, here we choose a sparser discretization of the BZ. Concretely, we consider a uniform discretization with $31$ discrete momentum points in $k\in[-\pi,\pi]$.} Figure \ref{Fig4}(b) shows the pseudo-spin texture of $(d_{x},d_{z})$ extracted from the observed $(P_{x},P_{z})$. Also according to the number of cycles that the vector ($d_{x}$, $d_{z}$) winds around the origin, we find $\mathcal{W}_\text{n}=2$ for $-2<\mu<0$ (second-order \red{topological phase}), $\mathcal{W}_\text{n}=1$ for $0<\mu<4$ (first-order \red{topological phase}), and $\mathcal{W}_\text{n}=0$ otherwise (trivial \red{phase}). In \rfig{Fig4}(c), the $\mathcal{W}_\text{n}$ deduced experimentally using Eq. (\ref{Wn}) (the blue circles) is presented. \red{Because of a sparser discretization, it is readily seen that compared to the topological phase transitions shown in \rfig{Fig3}(d), the sharpness of the phase boundaries between topologically distinct phases is relatively reduced}. Nevertheless, the experimentally obtained topological invariants are still in good agreement with the theoretical expectation (the pink line). For the sake of completeness, we also show the pseudo-spin texture near the critical point ($\mu=0$) separating the second-order and first-order \red{topological phases} in \rfig{Fig4}(c). One can see from the insets of \rfig{Fig4}(c) that when $\mu=-0.1$, $P_{z}=0$ has two disconnected contours; at the critical point $\mu=0$, the smaller one contour shrinks to a point and coincides with the time-reversal invariant momentum $(0,0)$, which leads to the closure of bulk gap; when $\mu=0.1$, the smaller one contour completely disappears and only the larger one remains. Both the evolution of pseudo-spin texture and the change of topological invariant confirm the realization of topological phase transitions between second-order and first-order \red{topological phases}. \begin{spacing}{2.0} \noindent\textbf{3\quad Discussion and conclusion} \end{spacing} \red{Our experiment has demonstrated the feasibility of the bulk approach to determine the band topology. Although our experiment was performed in a single superconducting qubit of great controllability, the basic idea is general and can be applied to other platforms as long as there exist appropriate experimental methods to detect the underlying spin or pseudo-spin texture of the bulk bands~\cite{Ji2020simulation,Xin2020simulation}. For real materials, as aforementioned, the complexity of the band structures and the fact that the bulk topological invariants are determined by all occupied bands together raise great challenge for the bulk approach to determine the underlying bulk topological invariants. Nevertheless, it is justified to expect that even for real materials, the bulk approach is still feasible for the detection of topological phase transitions once powerful spin- and angle-resolved photoemission spectroscopy (similar tools for other metamaterials) is developed. This is because the topological phase transitions in general only involve a few bands near the Fermi energy. When the topological phase transitions belong to the $Z_{2}$ type, like the transition between a three-dimensional inversion symmetric strong topological insulator and a trivial insulator, the situation is further simplified since one only needs to focus on a few high symmetry momenta and detect the evolution of topological spin-texture configurations at their neighborhood. } \red{Another important message from our experiment is that flattening the Hamiltonian and a non-uniform sampling of the $k$-space can be very efficient techniques to extract the underlying pseudo-spin texture through the quantum-quench dynamics. As a precise determination of bulk topological invariants and phase boundaries generally requires dense measurements of the pseudo-spin texture throughout the \rred{BZ}, these techniques can considerably save the time and experimental resources, while still allowing us to explore a reasonably large parameter space. Such a merit will become more prominent when studying higher-dimensional topological phases, simply because the measurements required to determine the band topology will drastically increase as the dimension of \rred{BZ} increases. Therefore, we expect that these techniques would be widely adopted in the successive experimental studies of higher-dimensional topological phases and related topological phase transitions. } In summary, we have simulated a second-order \red{topological phase} in a controllable superconducting qubit and observed novel topological phase transitions between this phase and a trivial \red{phase}, as well as a first-order \red{topological phase} within the same symmetry class. Our work opens new opportunities for the experimental study of higher-order topological phases. A direction forward is to investigate higher-order topological phases in higher dimensions, \red{where the higher-order topology can be determined by detecting the spin-texture winding of the so-called nested BISs through the same approach as in our experiment~\rred{\cite{Yu2020BIS,Li2020HOTI}}}. In addition, the nonequilibrium properties of quenched or driven higher-order topological phases are also of great interest and worthy of in-depth studies. \begin{acknowledgements} This work was supported by the Key-Area Research and Development Program of Guang-Dong Province (Grant No. 2018B030326001), the National Natural Science Foundation of China (U1801661), the National Science Foundation of China (No.11904417), the Guangdong Innovative and Entrepreneurial Research Team Program (2016ZT06D348), the Guangdong Provincial Key Laboratory (Grant No.2019B121203002), the Natural Science Foundation of Guangdong Province (2017B030308003), and the Science, Technology and Innovation Commission of Shenzhen Municipality (JCYJ20170412152620376, KYTDPT20181011104202253), and the NSF of Beijing (Grants No. Z190012). \end{acknowledgements}
\section{Introduction} The communication in a network from a source node to a destination node may go through multiple hops, each of which introduces errors. In this paper, we are interested in the problem that when the intermediate nodes have buffer size constraints, how the communication rate scales with the number of hops. In particular, we consider a line network of $L$ hops formed by a sequence of nodes, where discrete memoryless channels (DMCs) exist only between two adjacent nodes. We call the first node \emph{source node} and the last node \emph{destination node}. Except for the source and destination nodes, all the other nodes, called \emph{intermediate nodes}, have one incoming channel and one outgoing channel. Each intermediate node has a buffer of $B$ bits to keep the content used between different intermediate processing steps. There are no other storage and computation constraints on the network nodes. For some cases of the problem, the answers are known. When the buffer size $B$ is allowed to increase with the block length at the source node, the min-cut capacity can be achieved using hop-by-hop decoding and re-encoding \cite{cover06}. When the zero-error capacity of each channel is nonzero, using a constant buffer size $B$ can achieve the zero-error capacity for any value of $L$~\cite{Niesen2007}. In this paper, we focus on the DMCs in the line network with \emph{finite input and output alphabets} and \emph{$0$ zero-error capacity}. Note that for most common channel models, e.g., binary symmetric channels and erasure channels, the zero-error capacities are zero. When all cascaded channels are identical, Niesen, Fragouli, and Tuninetti~\cite{Niesen2007} showed that a class of codes with a constant buffer size $B$ can achieve rates $\Omega(e^{-c L})$, where $c$ is a constant. They also showed that if the buffer size $B$ is of order $\ln L$, any rate below the capacity of the channel $Q$ can be achieved. Recently, Yang et al. \cite{yang17monograph,yang19isitline} showed that the end-to-end throughput can be lower bounded by $\Omega(1/\ln L)$ using an intermediate node buffer size $O(\ln\ln L)$. \footnote{In this paper, we say that $f(n)=\Omega(g(n))$ if there exists a real constant $c>0$ and there exists an integer constant $n_0\ge1$ such that $f(n)\ge c\cdot g(n)$ for every integer $n\ge n_0$; $f(n)=O(g(n))$ if there exists a real constant $c>0$ and there exists an integer constant $n_0\ge1$ such that $f(n)\le c\cdot g(n)$ for every integer $n\ge n_0$; and $f(n)=\Theta(g(n))$ if both $f(n)=\Omega(g(n))$ and $f(n)=O(g(n))$ are satisfied.} In contrast to these achievability results, min-cut is still the best upper bound. Characterizing a non-trivial, general upper bound for a line network with buffer size constraints could be difficult as hinted in \cite{vellambi11}. We relax the difficulty of the problem by asking the scalability of the upper bound with the network length $L$ for a class of codes, called \emph{batched codes}. Batched codes provide a general coding framework for line networks with buffer size constraints, and include the codes studied in the previous works \cite{Niesen2007,yang17monograph,yang19isitline} to show the achievability results as special cases. A batched code has an outer code and an inner code. The outer code encodes the information messages into \emph{batches}, each of which is a sequence of coded symbols, while the inner code performs a general network coding for the symbols belonging to the same batch. The inner code, comprising of \emph{recoding} at network nodes on each batch separately, should be designed for specific channels. Batched codes have been studied for designing efficient network coding for packet erasure channels~(see, for example, \cite{chou03,Silva2009}), and practical designs have been provided \cite{yang11ac,yang14bats}. The upper bound scalability on the achievable rates of batched codes provides important guidance for us to design batched codes for large networks. For example, we want to know whether the exponential decade of the achievable rate with $L$ is necessary for $B = O(1)$, and whether we can do better than $\Omega(1/\ln L)$ when $B=O(\ln\ln L)$. These questions are answered in this paper (see Table~\ref{tab:1}). In particular, we show that when $N=O(1)$, which implies $M, B = O(1)$, the achievable rates must be exponential decade with $L$. When $N=O(1/\ln L)$ and $M=O(1)$, which implies $B = O(1/\ln L)$, the achievable rate is $O(1/\ln L)$. These upper bounds have the same order of $L$ as the previous achievability results, and hence, together, provide tight capacity scalability results of batched codes for these parameter sets. Our results are proved in a general setting of line networks where the DMC channels in the line network can be arbitrarily different except for a mild technical condition. The main technique of our converse is to separate the end-to-end transition matrix induced by the inner code as the linear combination of two parts, where one part captures the communication bottleneck in the line network and the other part can be simply upper bounded. After introducing batched codes, we first use line networks of packet erasure channels to illustrate our main technique (Sec~\ref{sec:erasure}). We then generalize the results to a broad class of channels called \emph{canonical channels}, which include BSCs and BECs (Sec~\ref{sec:canonical}). Finally, we present a technique to solve line networks of general DMCs with zero-error capacity zero (Sec~\ref{sec:genc}). \begin{table}[tb] \centering \caption{Summarization of the achievable rate scalability for the channels with the zero-error capacity $0$ using batched codes. Here, $c$ and $c'$ have constant values that do not change with $L$.} \label{tab:1} \subfloat[][lower bound]{ \rowcolors{2}{white}{gray!30} \begin{tabular}{cccc} \toprule batch size $M$ & inner block-length $N$ & buffer size $B$ & lower bound \\ \midrule $O(1)$ & $O(1)$ & $O(1)$ & $\Omega(e^{-cL})$ \\ $O(1)$ & $O(\ln L)$ & $O(\ln\ln L)$ & $\Omega(1/\ln L)$ \\ $O(\ln L)$ & $O(\ln L)$ & $O(\ln L)$ & $\Omega(1)$ \\ \bottomrule \end{tabular} }\\ \subfloat[][upper bound]{ \rowcolors{2}{white}{gray!30} \begin{tabular}{ccccc} \toprule batch size $M$ & inner block-length $N$ & buffer size $B$ & upper bound \\ \midrule arbitrary & $O(1)$ & $O(1)$ & {$O(e^{-c'L})$} \\ $O(1)$ & $O(\ln L)$ & $O(\ln L)$ & {$O(1/\ln L)$} \\ $O(\ln L)$ & $O(\ln L)$ & $O(\ln L)$ & min-cut\\ \bottomrule \end{tabular} } \end{table} \section{Line Networks and Batched Codes} \label{sec:batched} In this section, we describe a general line network model and introduce batched codes, which form a general coding framework for line networks with buffer size constraints. \subsection{General Description} \label{sec:line} A line network of length $L$ is formed by a sequence of nodes $v_\ell$, $\ell=0,1,\ldots,L$, where communication links exist only between nodes $v_{\ell-1}$ and $v_\ell$ for $\ell=1,\ldots,L$. We assume that each link $(v_{\ell-1},v_\ell)$ is a discrete memoryless channel (DMC) with the transition matrix $Q_\ell$, where the input and output alphabets are $\mc Q_{\mathrm{in}}$ and $\mc Q_{\mathrm{out}}$, respectively, both finite. We study the communication from the source node $v_0$ to the destination node $v_L$, where all the intermediate nodes $v_1,\ldots, v_{L-1}$ can help with the communication. Let $K$, $n$ and $M$ be positive integers, and $\mc{A}$ and $\mc B$ be finite alphabets. A batched code has an outer code and an inner code described as follows. The message of the source node is formed by $K$ symbols from $\mathcal{A}$. The outer code of a batched code, performed at $v_0$, encodes the message and generates $n$ batches, each of which has $M$ symbols from $\mathcal{A}$. Here $M$ is called the \emph{batch size}, and $n$ is called the \emph{outer blocklength}. Let $N$ be a positive integer called the \emph{inner blocklength}. The inner code of a batched code is performed on different batches separately, and includes the recoding operations at nodes $v_0,\ldots, v_{L-1}$: \begin{itemize} \item At the source node $v_0$ that generates the batches, \emph{recoding} is performed on the original $M$ symbols of a batch to generate $N$ recoded symbols (in $\mc Q_{\mathrm{in}}$) to be transmitted on the outgoing links of the source node. \item At an intermediate network node $v$ that does not need to decode the input symbols, \emph{recoding} is performed on the received symbols (in $\mc Q_{\mathrm{out}}$) belonging to the same batch to generate $N$ recoded symbols (in $\mc Q_{\mathrm{in}}$) to be transmitted on the outgoing links of $v$. \end{itemize} In general, the number of recoded symbols transmitted by different nodes can be different. Here we assume that they are all the same for the simplicity of the discussion. \subsection{Recoding Formulations} Let us formulate recoding for a generic batch $\cv X$. We denote by $\cv X[k]$ ($1\leq k\leq M$) the $k$th symbol in $\cv X$. (Similar notations apply to other symbols of a sequence of entries.) The recoding at the source node is a function $f:\mc A^M \rightarrow \mc Q_{\mathrm{in}}^N$. For $\ell = 1,\ldots,L$, denote by $\cv U_{\ell}$ and $\cv Y_{\ell}$ the input and output of $N$ uses of the link $(v_{\ell-1},v_{\ell})$, where $\cv U_1 = f(\cv X)$. Due to the memoryless of the channel, \begin{equation}\label{eq:ch} \Pr\{\cv Y_{\ell}=\cv y|\cv U_{\ell}=\cv u\} = Q_\ell^{\otimes N}(\cv y | \cv u) \triangleq \prod_{i=1}^N Q_\ell(\cv y[i]|\cv u[i]). \end{equation} The channel inputs $\cv U_{\ell}$, $\ell = 2,3,\ldots L-1$ can be formulated recursively. Let $N'$ be an integer in $\{0,1,\ldots,N\}$ used to represent the input-output latency. For $i=0,1,\ldots,N+N'$, let $\cv B_{\ell}[i]$ be a random variable over the finite set $\mc B$ with $\cv B_{\ell}[0]$ a constant, which is used to represent the content in the buffer for the batch $\cv X$. The recoding at $v_\ell$ is the function $\phi_\ell$ such that for $i=1,\ldots,N+N'$ \begin{equation}\label{eq:re} \left(\cv B_{\ell}[i],\cv U_{\ell+1}[i-N']\right) = \phi_{\ell}\left(\cv B_{\ell}[i-1],\cv Y_{\ell}[i]\right), \end{equation} where $\cv U_{\ell+1}[i]$ and $\cv Y_{\ell}[i]$ with $i\notin\{1,\ldots,N\}$ are regarded as empty random variables. In other words, \begin{itemize} \item For the first $N'$ received symbols, the recoding only updates its buffer content, but does not generate any channel inputs. \item After receiving $N'$ symbols, the recoding generates $N$ channel inputs. \end{itemize} An inner code (or recoding) scheme is the specification of $f$, $N$, $N'$ and $\{\phi_\ell\}$. At the destination node, all received symbols (which may belong to different batches) are decoded jointly. The end-to-end transformation of a batch is given by the transition matrix from $\cv X$ to $\cv Y_{L}$, which can be derived using \eqref{eq:ch} and \eqref{eq:re} recursively. In general, the source recoding function $f$ and the intermediate recoding functions $\{\phi_\ell\}$ can be random. Let $F$ be the transition matrix from $\cv X$ to $\cv U_1$ and let $\Phi_\ell$ be the transition matrix from $\cv Y_\ell$ to $\cv U_{\ell+1}$. We have the Markov chain \begin{equation*} \cv X \rightarrow \cv U_1 \rightarrow \cv Y_1 \rightarrow \cdots \rightarrow \cv U_L \rightarrow \cv Y_L. \end{equation*} The end-to-end transition matrix from $\cv X$ to $\cv Y_{L}$ is \begin{equation}\label{eq:tran} W_L \triangleq FQ_1^{\otimes N}\Phi_1Q_2^{\otimes N}\Phi_2\cdots Q_{L-1}^{\otimes N}\Phi_{L-1}Q_{L}^{\otimes N}. \end{equation} \subsection{Design Considerations} The major parameters of a batched code include: i) batch size $M$, ii) inner blocklength $N$, and iii) buffer size $B$ at the intermediate nodes. The buffer size $B = \log |\mc B|$ when $N'=0$, and $B = 2\log|\mc B|$ when $N'>0$. For a given recoding scheme, the maximum achievable rate of the outer code is $\max_{p_{\cv X}} I(\cv X;\cv Y^{(L)})$ for $N$ channel uses. In other words, the design goal of a recoding scheme is to maximize \begin{equation}\label{eq:recoding} C_L \triangleq \frac{1}{N}\max_{p_{\cv X}} I(\cv X;\cv Y_{L}) = \frac{1}{N}\max_{p_{\cv X}} I(p_{\cv X}, W_L) \end{equation} under certain constraints of $M$, $N$ and $B$ to be discussed later. For a given recoding scheme, an outer code should be designed for the transition matrix $W_L$. The optimal value of~\eqref{eq:recoding} is called the capacity of the line network with batched codes (under a certain constraint of $M$, $N$ and $B$), denoted as $C_L$. By the convexity of mutual information for $W_L$ when $p_{\cv X}$ is fixed, we have the following proposition. \begin{proposition}\label{pro:deterministic} There exists a deterministic capacity achieving recoding scheme. \end{proposition} \subsection{Capacity Scalability} Under various constraints of $M$, $N$ and $B$, we study how the capacity of a line network with batched codes scales with the network length $L$. Denote by $C(Q_{\ell})$ and $C_0(Q_{\ell})$ the channel capacity and the zero-error capacity of $Q_{\ell}$, respectively. Note that if $C_0(Q_{\ell}) >0$ for any $\ell$, a constant rate can be achieved for any network length $L$ using fixed $M$, $N$ and $B$ (see also \cite{Niesen2007}). The same scalability result can be extended to a line network with only a fixed number of DMCs $Q_{\ell}$ with $C_0(Q_{\ell}) =0$. Henceforth in this paper, we consider the case that $C_0(Q_{\ell}) =0$ for all $\ell$. \subsubsection{$M=\Theta(N)$, $B=\Theta(N)$ and $N\rightarrow \infty$} \emph{Decode-and-forward} is an optimal recoding scheme and achieves the min-cut capacity $\min_{\ell=1}^L C(Q_{\ell})$ when i) $B$ is not limited and ii) $N$ is allowed to be arbitrarily large~\cite{cover06}. \subsubsection{$M=\Theta(N)$, $B=\Theta(N)$ and $N=O(\ln L)$} As $N$ does not tend to infinity, the error probability at each intermediate node does not tend to zero if decode and forward is applied. When $Q_{\ell}$, $\ell=1,\ldots,L$ are identical, any constant rate below the channel capacity $C(Q_{\ell})$ can be achieved using batched codes with $n\rightarrow \infty$ \cite{Niesen2007}. \subsubsection{$N=O(1)$} When $N$ is a fixed number that does not change with $L$, it is sufficient to consider a fixed $B$ and $M$. When $Q_{\ell}$, $\ell=1,\ldots,L$ are identical, $C_L$ tends to zero as $L\rightarrow\infty$ \cite{Niesen2007}. It was also shown that when $\Phi_{\ell}$, $\ell=1,\ldots,L-1$ are also identical, the maximum achievable rate converges to zero \emph{exponentially} fast. When $N=O(1)$, the scalability of $C_L$ for general cases is still open. For example, it is unknown whether this \emph{exponential convergence} of the achievable rate still holds when channels and recoding functions at intermediate nodes can be different. In this paper, we will answer this question by a general upper bound that decreases exponentially in $L$. \subsubsection{$M=O(1)$} We are also interested in the case that $M$ is a relatively small, fixed number that does not change with the network length $L$, so that the major parameters of the outer code do not depend on the network size. This may have certain advantages for the hardware implementation of the outer code. It was shown in \cite{yang19isitline} that when $N=O(\ln L)$ and $B = O(\ln\ln L)$, rate $\Omega(1/\ln L)$ can be achieved. Note that $B = O(\ln N)$ is necessary when a node needs at least to count how many packets of a batch has been received. In this paper, we will show that when $N=O(\ln L)$ and $B = O(N)$, $C_L$ is $O(1/\ln L)$. \section{Line Networks of Packet Erasure Channels} \label{sec:erasure} We first discuss a special case that the channels $\{Q_\ell\}$ are identical \emph{packet erasure channels} with transition matrix $Q_{\text{erasure}}$. Fix an alphabet $\mc Q^*$ with $|\mc Q^*|\geq 2$. Suppose that the input alphabet $\mc Q_{\mathrm{in}}$ and the output alphabet $\mc Q_{\mathrm{out}}$ are both $\mc Q^* \cup \{0\}$ where $0\notin \mc Q^*$ is called the erasure. For each $x \in \mc Q^*$, \begin{equation*} Q_{\text{erasure}}(y|x) = \begin{cases} 1 - \epsilon & \text{if } y = x, \\ \epsilon & \text{if } y = 0, \end{cases} \end{equation*} where $\epsilon$ is a constant value in $(0,1)$ called the erasure probability. The input $0$ can be used to model the input when the channel is not used for transmission and we define $Q(0|0) = 1$. The relation between the input $X$ and output $Y$ of a packet erasure channel can be written as a function $Y = XZ$, where $Z$ is a binary random variable independent of $X$ with $\Pr\{Z = 0\} = 1 - \Pr\{Z = 1\} = \epsilon$. In other words, $Z$ indicates whether the channel output is the erasure or not. With this formulation, we can write for $\ell=1,\ldots,L$ and $i=1,\ldots, N$, \begin{equation*} \cv Y_{\ell}[i] = \cv U_{\ell}[i] \cv Z_{\ell}[i] \end{equation*} where $\cv Z_{\ell}[i]$ are independent binary random variables with $\Pr\{\cv Z_{\ell}[i] = 0\} = \epsilon$. The main idea of our converse is that the worst link in a line network restricts the capacity. We define the event $E_0$ to capture the communication bottleneck \begin{equation*} E_0 = \cup_{\ell=1}^L \{\cv Z_{\ell} = 0\} = \left\{\lor_{\ell=1}^L(\cv Z_{\ell} = 0)\right\}, \end{equation*} where $\cv Z_{\ell}=0$ means $\cv Z_{\ell}[i]=0$ for all $i$. In other words, $E_0$ is the event that for at least one link, all the $N$ uses of the channel for a batch are erasures. Define $W_L^{(0)}$ and $W_L^{(1)}$ as the transition matrix from $\mc A^M$ to $\mc Q_{\mathrm{out}}^N$ such that \begin{IEEEeqnarray*}{rCl} W_L^{(0)}(\cv y|\cv x) & = & \Pr\{\cv Y_L=\cv y|\cv X=\cv x, E_0\}, \\ W_L^{(1)}(\cv y|\cv x) & = & \Pr\{\cv Y_L=\cv y|\cv X=\cv x, \overline{E_0}\}, \end{IEEEeqnarray*} where $\overline{E_0} = \left\{\land_{\ell=1}^L(\cv Z_{\ell} \neq 0)\right\}$. As $\cv X$ and $\cv Z_{\ell}$, $\ell=1,\ldots, L$ are independent, we have \begin{equation*} W_L = W_L^{(0)}p_0 + W_L^{(1)}p_1, \end{equation*} where $p_0 = \Pr\{E_0\}$ and $p_1 = 1-p_0$. As $I(p_{\cv X}, W_L)$ is a convex function of $W_L$ when $p_{\cv X}$ is fixed, we obtain \begin{equation*} I(p_{\cv X}, W_L) \leq p_0I(p_{\cv X}, W_L^{(0)}) + p_1I(p_{\cv X}, W_L^{(1)}). \end{equation*} \begin{lemma}\label{lemma:e} For a line network of identical packet erasure channels, $I(p_{\cv X}, W_L^{(0)}) = 0$. \end{lemma} \begin{proof Denote by $P$ the (joint) probability mass function of the random variables we have defined for the batch codes. To prove the lemma, we only need to show for all $\cv x \in \mc A^M$ and $\cv y_L \in \mc Q_{\mathrm{out}}^N$, \begin{equation}\label{eq:csd} P(\cv y_L, \cv x, E_0) = P(\cv x) P(\cv y_L, E_0), \end{equation} which implies $I(p_{\cv X}, W_L^{(0)}) = 0$. Define a sequence of events for $\ell = 1,\ldots, L$, \begin{equation*} \overline{E_0^{(\ell)}} = \{\cv Z_{\ell'} \neq 0, \ell'>\ell\}. \end{equation*} We have $\{\cv Z_{\ell}=0\} \cap \overline{E_{0}^{(\ell)}}$, $\ell=1,\ldots,L$ are disjoint and $E_0 = \cup_{\ell=1}^L \left[\{\cv Z_{\ell}=0\} \cap \overline{E_0^{(\ell)}}\right]$. Therefore, \begin{IEEEeqnarray*}{rCl} \IEEEeqnarraymulticol{3}{l}{P(\cv y_L, \cv x, E_0)} \\ & = & \sum_{\ell} P\left(\cv y_L, \cv x, \cv Z_{\ell}=0, \overline{E_0^{(\ell)}}\right) \\ & = & \sum_{\ell} \sum_{\cv y_{\ell}} \sum_{\cv u_{\ell}} P\left(\cv y_L, \cv x, \cv y_{\ell},\cv u_{\ell}, \cv Z_{\ell}=0, \overline{E_0^{(\ell)}}\right) \\ & = & \sum_{\ell} \sum_{\cv y_{\ell}} P(\cv y_L, \overline{E_0^{(\ell)}}\Big| \cv y_{\ell}) \sum_{\cv u_{\ell}} P(\cv x, \cv u_\ell, \cv y_{\ell},\cv Z_{\ell}=0). \end{IEEEeqnarray*} We have \begin{IEEEeqnarray*}{rCl} \IEEEeqnarraymulticol{3}{l}{\sum_{\cv u_{\ell}} P(\cv x, \cv u_\ell, \cv y_{\ell},\cv Z_{\ell}=0)} \\ & = & \sum_{\cv u_{\ell}} P(\cv x, \cv u_\ell) P(\cv Z_{\ell}=0) P(\cv y_{\ell}|\cv u_{\ell},\cv Z_{\ell}=0) \\ & = & \sum_{\cv u_{\ell}} P(\cv x, \cv u_\ell) P(\cv Z_{\ell}=0) P(\cv y_{\ell}|\cv Z_{\ell}=0) \\ & = & P(\cv x) P(\cv y_{\ell},\cv Z_{\ell}=0) \end{IEEEeqnarray*} where $P(\cv y_{\ell}|\cv u_{\ell},\cv Z_{\ell}=0) = P(\cv y_{\ell}|\cv Z_{\ell}=0)$ follows that $\cv Y_\ell = 0$ as $\cv Z_{\ell} = 0$. Hence, we obtain \begin{IEEEeqnarray*}{rCl} P(\cv y_L, \cv x, E_0) & = & P(\cv x) \sum_{\ell} \sum_{\cv y_{\ell}} P\left(\cv y_L, \overline{E_0^{(\ell)}}\Big | \cv y_{\ell}\right) P(\cv y_{\ell},\cv Z_{\ell}=0). \end{IEEEeqnarray*} Similarly, we have \begin{IEEEeqnarray*}{rCl} P(\cv y_L, E_0) & = & \sum_{\ell} \sum_{\cv y_{\ell}} P\left(\cv y_L, \overline{E_0^{(\ell)}}\Big| \cv y_{\ell}\right) P(\cv y_{\ell},\cv Z_{\ell}=0). \end{IEEEeqnarray*} Therefore, we show \eqref{eq:csd}. \end{proof} As $p_1 = (1-\epsilon^N)^L$ and \begin{equation*} I(p_{\cv X}, W_L^{(1)}) \leq \min\{ M \ln|\mc A|, N\ln |\mc Q_{\mathrm{out}}| \}, \end{equation*} we have \begin{equation}\label{eq:pec} C_L \leq \frac{(1-\epsilon^N)^L}{N} \min\{ M \ln|\mc A|, N\ln |\mc Q_{\mathrm{out}}| \}. \end{equation} \begin{theorem} For a line network of length $L$ of packet erasure channels with erasure probability $\epsilon$, \begin{enumerate} \item When $N=O(1)$, $C_L = O((1-\epsilon^N)^L)$. \item When $M=O(1)$ and $N=\Theta(\ln L)$, $C_L = O(1/\ln L)$. \item When $M=\Omega(\ln L)$ and $N=\Omega(\ln L)$, $C_L = O(1)$. \end{enumerate} \end{theorem} \begin{proof} The theorem can be proved by substituting $M$ and $N$ in each case into \eqref{eq:pec}. \end{proof} \section{Converse for General Channels} Consider a generic channel $Q:\mc Q_{\mathrm{in}} \to \mc Q_{\mathrm{out}}$. The relation between the input $X$ and output $Y$ of $Q$ can be modeled as a function $\alpha$ (see \cite[Section~7.1]{yeung08}): \begin{equation}\label{eq:ssd} Y = \alpha(X,Z=(Z_x, x\in \mc Q_{\mathrm{in}})) = \sum_{x\in\mc Q_{\mathrm{in}}}\bm 1\{X=x\}Z_x, \end{equation} where $\bm 1$ denotes the indicator function, and $Z_x, x\in \mc Q_{\mathrm{in}}$ are independent random variables with alphabet $\mc Q_{\mathrm{out}}$ define as \begin{equation}\label{eq:z} \Pr\{Z_x = y\} = Q(y|x). \end{equation} For $N$ uses of the channel $Q$, we can write \begin{equation}\label{eq:alphaN} \cv Y = \alpha^{(N)}(\cv U, \cv Z), \end{equation} where $\cv Y[i] = \alpha(\cv U[i],\cv Z[i])$. In this section, we consider general DMCs $Q_{\ell}$ for all $\ell$, which can be modeled as the function $\alpha_{\ell}$. With the above formulation, we can write for $\ell=1,\ldots,L$, \begin{equation}\label{eq:chz} \cv Y_{\ell} = \alpha_{\ell}^{(N)}(\cv U_{\ell}, \cv Z_{\ell}). \end{equation} \subsection{Canonical Channels} \label{sec:canonical} For $0<\varepsilon\leq 1$, we call a channel $Q:\mc Q_{\mathrm{in}} \to \mc Q_{\mathrm{out}}$ an \emph{$\varepsilon$-canonical channel} if there exists $y_0 \in \mc Q_{\mathrm{out}}$ such that for every $x \in \mc Q_{\mathrm{in}}$, $Q(y_0|x)\geq \varepsilon$. The packet erasure channel, BSC and BEC are all canonical channels. Note that a canonical $Q$ has $C_0(Q)=0$. We first consider the case that the channels $\{Q_{\ell}\}$ are all $\varepsilon$-canonical channels. Define the event \begin{equation*} E_0 = \left\{\lor_{\ell=1}^L(\cv Z_{\ell} = y_0)\right\}, \end{equation*} where $\cv Z_{\ell} = y_0$ means $(\cv Z_{\ell}[i])_x = y_0$ for all $i$ and $x$. The event $E_0$ means that there exists one link of the network such that all uses of the channel for transmitting a batch have the same output $y_0$. Similar to the discussion in Section~\ref{sec:erasure}, the transition matrix $W_L$ can be expressed as \begin{equation*} W_L=W_L^{(0)}p_0 + W_L^{(1)}p_1, \end{equation*} where $p_0=\text{Pr}\{E_0\}, p_1=\text{Pr}\{\overline{E_0}\}$, and \begin{align*} W_L^{(0)}(\cv y\mid\cv x)&=\text{Pr}\{\cv Y_L=\cv y\mid\cv X=\cv x, E_0\},\\ W_L^{(1)}(\cv y\mid\cv x)&=\text{Pr}\{\cv Y_L=\cv y\mid\cv X=\cv x, \overline{E_0}\}. \end{align*} Hence, \begin{equation*} I(p_{\cv X}, W_L) \leq p_0I(p_{\cv X}, W_L^{(0)}) + p_1I(p_{\cv X}, W_L^{(1)}). \end{equation*} \begin{lemma}\label{lemma:2} When $Q_{\ell}$, $\ell = 1,\ldots, L$ are all $\varepsilon$-canonical channels, $p_1 \leq (1-\varepsilon^{|\mc Q_{\mathrm{in}}| N})^L$. \end{lemma} \begin{proof} We write \begin{align*} p_1&= \prod_{\ell=1}^L\bigg[ 1 - \prod_{i\in\{1,\ldots,N\}} \prod_{x\in\mc Q_{\mathrm{in}}}\text{Pr}((\cv Z_{\ell}[i])_x=y_0) \bigg]\\ &= \prod_{\ell=1}^L\bigg[ 1 - \prod_{i\in\{1,\ldots,N\}}\prod_{x\in\mc Q_{\mathrm{in}}}Q_{\ell}(y_0| x) \bigg] \leq (1-\varepsilon^{|\mc Q_{\mathrm{in}}|N})^L, \end{align*} where the second equality follows from \eqref{eq:z}. \end{proof} \begin{lemma}\label{lemma:3} For a line network of length $L$ of $\varepsilon$-canonical channels, $I(p_{\cv X}, W_L^{(0)}) = 0$. \end{lemma} \begin{proof} Similar as the proof of Lemma~\ref{lemma:e}, we have \begin{IEEEeqnarray*}{rCl} P(\cv y_L,\cv x,E_0) & = & \sum_{\ell} \sum_{\cv y_{\ell}} P(\cv y_L, \overline{E_0^{(\ell)}}\Big| \cv y_{\ell}) \\ & & \sum_{\cv u_{\ell}} P(\cv x, \cv u_\ell) P(\cv Z_{\ell}=y_0) P(\cv y_{\ell}|\cv u_{\ell},\cv Z_{\ell}=y_0). \end{IEEEeqnarray*} By \eqref{eq:chz}, given $\cv Z_{\ell}=y_0$, \begin{IEEEeqnarray*}{rCl} \cv Y_{\ell} & = & \alpha^{(N)}(\cv U_{\ell}, \cv Z_{\ell}=y_0) = y_0, \end{IEEEeqnarray*} and hence $P(\cv y_{\ell}\mid\cv u_{\ell},\cv Z_{\ell}=y_0) = P(\cv y_{\ell}\mid\cv Z_{\ell}=y_0)$. Following the same argument as in Lemma~\ref{lemma:e}, \[ P(\cv y_L, \cv x, E_0) = P(\cv x) P(\cv y_L, E_0), \] which implies $I(p_{\cv X}, W_L^{(0)}) = 0$. \end{proof} Combining both Lemma~\ref{lemma:2} and Lemma~\ref{lemma:3}, we can assert that \[ C_L\leq \frac{(1-\varepsilon^{|\mc Q_{\mathrm{in}}| N})^L}{N} \min\{ M \ln|\mc A|, N\ln |\mc Q_{\mathrm{out}}| \}, \] which implies the following theorem: \begin{theorem} For a length-$L$ line network of $\varepsilon$-canonical channels with finite input and output alphabets, \begin{enumerate} \item When $N=O(1)$, $C_L = O((1-\varepsilon^{|\mc Q_{\mathrm{in}}| N})^L)$. \item When $M=O(1)$ and $N=\Theta(\ln L)$, $C_L = O(1/\ln L)$. \item When $M=\Omega(\ln L)$ and $N=\Omega(\ln L)$, $C_L = O(1)$. \end{enumerate} \end{theorem} \subsection{General Channels} \label{sec:genc} Consider a channel $Q:\mc Q_{\mathrm{in}} \to \mc Q_{\mathrm{out}}$ with $C_0(Q)=0$, modeled as in \eqref{eq:ssd}-\eqref{eq:alphaN}. Denote by $\varepsilon_Q$ the maximum value such that for any $x, x'\in \mc Q_{\mathrm{in}}$, there exists $y\in \mc Q_{\mathrm{out}}$ such that $Q(y|x)\geq \varepsilon_{Q}$ and $Q(y|x')\geq \varepsilon_{Q}$. Note that $C_0(Q)=0$ if and only if $\varepsilon_Q>0$. \begin{lemma}\label{zero-error} For a channel $Q:\mc Q_{\mathrm{in}} \to \mc Q_{\mathrm{out}}$ with $C_0(Q)=0$, and any non-empty $\mc A\subseteq\mc Q_{\mathrm{in}}^N$, there exist $\cv z=((\cv z[i])_x \in \mc Q_{\mathrm{out}}, x\in \mc Q_{\mathrm{in}}, i=1,\ldots,N)$ and a subset $\mc B\subseteq\mc Q_{\mathrm{out}}^N$ with $|\mc B|\le \lceil |\mc A|/2 \rceil$ such that $\alpha^{(N)}(\cv x,\cv z)\in \mc B$ for any $\cv x\in \mc A$ and $\Pr\{\cv Z = \cv z\} \geq \varepsilon_{Q}^{|\mc Q_{\mathrm{in}}|N}$. \end{lemma} \begin{proof} The sequences in $\mc A$ can be put into $\lceil |\mc A|/2 \rceil$ pairs. For each pair $\cv x$ and $\cv x'$, there exists $\cv y$ such that for each $i=1,\ldots,N$, $Q(\cv y[i]|\cv x[i])\geq \varepsilon_{Q}$ and $Q(\cv y[i]|\cv x'[i]) \geq \varepsilon_{Q}$. Let $(\cv z[i])_{\cv x[i]}=\cv y[i]$ and $(\cv z[i])_{\cv x'[i]}=\cv y[i]$. After going through all the $\lceil |\mc A|/2 \rceil$ pairs, let $\mc B$ be the collection of all $\cv y$, which satisfies $|\mc B|\le \lceil |\mc A|/2 \rceil$. For all $(\cv z[i])_x$ that have not been assigned, let $(\cv z[i])_x=y$ such that $Q(y|x)\geq \varepsilon_Q$. Hence $\Pr\{\cv Z = \cv z\} = \Pr\{(\cv Z[i])_x = (\cv z[i])_x, x\in \mc Q_{\mathrm{in}}, i=1,\ldots,N\} \geq \varepsilon_Q^{|\mc Q_{\mathrm{in}}|N}$. \end{proof} Assume that $L = L'K$, where $L'$ and $K$ are integers. As a result, the end-to-end transition matrix $W_L$ can be written as \begin{equation*} W_L = F G_1 \Phi_{K} G_2 \Phi_{2K}\cdots G_{L'}, \end{equation*} where for $i=1,\ldots,L'$, \begin{equation*} G_i = Q_{K(i-1)+1}^{\otimes N}\Phi_{K(i-1)+1} \cdots \Phi_{Ki-1}Q_{Ki}^{\otimes N}. \end{equation*} The length-$L$ network can be regarded as a length-$L'$ network of channels $G_i$, $i=1,\ldots, L'$. Because of proposition~\ref{pro:deterministic}, without loss of optimality, we assume a deterministic recoding scheme, i.e., $F, \Phi_{\ell}$ are deterministic transition matrices. The input $\cv X$ and output $\cv Y$ of $G_i$ can be written as a function \begin{equation*} \cv Y = \alpha_{G_i}(\cv X, \cv Z_{\ell}, \ell= K(i-1)+1, \ldots, Ki), \end{equation*} where $\alpha_{G_i}$ can be determined recursively by $F, \{\Phi_{\ell}\}$ and \eqref{eq:alphaN}. When $K \geq N \log_2|\mc Q_{\mathrm{in}}|$ and $\varepsilon_{Q_{\ell}} \geq \varepsilon$ for all $\ell$, applying Lemma~\ref{zero-error} inductively, we know that there exists $\cv y_i$ and $\{\cv z_{\ell}\}$ such that $\alpha_{G_i}(\cv x, \cv z_{\ell}, \ell= K(i-1)+1, \ldots, Ki)=\cv y_i$ for all $\cv x\in \mc Q_{\mathrm{in}}^N$, and \begin{equation*} \Pr\{\cv Z_{\ell} = \cv z_{\ell}, \ell= K(i-1)+1, \ldots, K\} \geq \varepsilon_Q^{|\mc Q_{\mathrm{in}}|NK}. \end{equation*} For $i = 1,\ldots, L'$, define events \begin{equation*} E_i = \{\cv Z_{\ell} = \cv z_{\ell}, \ell= K(i-1)+1, \ldots, K\}. \end{equation*} Define the event \begin{equation*} E_0 = \left\{\lor_{i=1}^{L'}E_i\right\}. \end{equation*} Performing the similar analysis as in Section~\ref{sec:canonical} for the length-$L'$ network of channels $G_i$, $i=1,\ldots, L'$ with $E_0$ defined above, we obtain \begin{IEEEeqnarray}{C}\label{eq:main} C_L\leq \frac{(1-\varepsilon^{NK|\mc Q_{\mathrm{in}}|})^{L/K}}{N} \min\{ M \ln|\mc A|, N\ln |\mc Q_{\mathrm{out}}| \},\IEEEeqnarraynumspace \end{IEEEeqnarray} and hence the following result holds: \begin{theorem} For a length-$L$ line network of channels $Q_{\ell}$ with finite input and output alphabets and $\varepsilon_{Q_{\ell}}\geq \varepsilon>0$ for all $\ell$, \begin{enumerate} \item When $N=O(1)$, $C_L = O((1-\varepsilon')^L)$ for certain $\varepsilon'\in (0,1)$. \item When $M=O(1)$ and $N=\Theta(\ln L)$, $C_L = O(1/\ln L)$. \item When $M=\Omega(\ln L)$ and $N=\Omega(\ln L)$, $C_L = O(1)$. \end{enumerate} \end{theorem} \section{Concluding Remarks} This paper characterized the tight capacity upper bound of batched codes for line networks when the channels have finite alphabets and $0$ zero-error capacities. Generalization of our analysis for channels with infinite alphabets and continuous channels is of research interests. The study of batched code design for a line network of channels like BSC is also desirable. Last, we are curious whether our outer bound holds without the batched code constraint. \bibliographystyle{IEEEtran}
\section{Introduction} Classical molecular dynamics (MD) simulations in principle allow us to describe biomolecular processes in atomistic detail\cite{Berendsen07}. Prime examples include the study of protein complex formation\cite{Pan19} and protein-ligand binding and unbinding\cite{Bruce18,Rico19}, which constitute key steps in biomolecular function. Apart from structural analysis, the prediction of kinetic properties has recently become of interest, since optimized ligand binding and unbinding kinetics have been linked to an improved drug efficacy\cite{Copeland06,Swinney12,Pan13,Klebe14,Copeland16}. Since these processes typically occur on timescales from milliseconds to hours, however, they are out of reach for unbiased all-atom MD simulations which currently reach microsecond timescales. To account for rare biomolecular processes, a number of enhanced sampling techniques\cite{Chipot07,Christ10,Mitsutake01,Torrie77, Isralewitz01,Sprik98,Grubmueller95,Barducci11,Comer15} have been proposed. These approaches all entail the application of a bias to the system in order to enforce motion along a usually one-dimensional reaction coordinate $x$, such as the protein-ligand distance. While the majority of the above methods focuses on the calculation of the stationary free energy profile $\Delta G(x)$, several approaches have recently been suggested that combine enhanced sampling with a reconstruction of the dynamics of the process\cite{Tiwary13,Wu16,Teo16}. In this vein, we recently proposed dissipation-corrected targeted MD (dcTMD), which exerts a pulling force on the system along reaction coordinate $x$ via a moving distance constraint\cite{Wolf18}. By combining a Langevin equation analysis with a cumulant expansion of Jarzynski's equality\cite{Jarzynski97}, dcTMD yields both $\Delta G(x)$ and the friction field $\Gamma(x)$. Reflecting interactions with degrees of freedom orthogonal to those which define the free energy, the friction accounts for the dynamical aspects of the considered process. In this work, we go one step further and use $\Delta G(x)$ and $\Gamma(x)$ to run Langevin simulations, which describe the coarse-grained dynamics along the reaction coordinate and reveal timescales and mechanisms of the considered process. Moreover, we introduce the concept of ''temperature boosting'' of the Langevin equation, which allows us to speed up the calculations by several orders of magnitude in order to reach biologically relevant timescales. \section*{Theory} \textbf{Dissipation-corrected targeted molecular dynamics.} To set the stage, we briefly review the working equations of dcTMD derived in Ref.\ \onlinecite{Wolf18}. TMD as developed by Schlitter et al. \cite{Schlitter94} uses a constraint force $f_{\rm c}$ that results in a moving distance constraint $x = x_0 + v_{\rm c} t$ with a constant velocity $v_{\rm c}$. The main assumption underlying dcTMD is that this nonequilibrium process can be described by a memory-free Langevin equation\cite{Berendsen07}, \begin{equation}\label{eq:LE} m \ddot x(t) = - \frac{\mathrm{d}G}{\mathrm{d}x} - \Gamma(x) \dot x + \sqrt{2 k_{\rm B}T \Gamma(x)}\, \xi (t) + f_{\rm c}(t) , \end{equation} which contains the Newtonian force $- dG/dx$, the friction force $-\Gamma(x)\dot x$, as well as a stochastic force with white noise $\xi (t)$, that is assumed to be of zero mean, $\langle \xi \rangle = 0$, delta-correlated, $\langle \xi (t) \xi (t') \rangle = \delta (t-t')$, and Gaussian distributed. Since the constraint force $f_{\rm c}$ imposes a constant velocity on the system ($\dot x = v_{\rm c}$), the total force $m \ddot x$ vanishes. Performing an ensemble average $\langle \ldots \rangle$ of Eq.\ (\ref{eq:LE}) over many TMD runs, we thus obtain the relation \cite{Wolf18} \begin{align}\label{eq:dG2} \Delta G(x) = \langle W(x) \rangle - v_{\rm c} \int_{x_0}^{x} \Gamma(x') \,\mathrm{d}x' . \end{align} Here the first term $\langle W(x) \rangle = \int_{x_0}^{x} \langle f_{\rm c}(x') \rangle \,\mathrm{d}x' $ represents the averaged external work performed on the system, and the second term corresponds to the dissipated work $W_{\rm diss}(x)$ of the process expressed in terms of the friction $\Gamma(x)$. While the friction in principle can be calculated in various ways\cite{Straub87, Hummer05}, it proves advantageous to invoke Jarzynski's identity\cite{Jarzynski97}, $e^{- \Delta G(x)/k_{\rm B}T}= \langle e^{- W(x)/k_{\rm B}T}\rangle$, which allows us to calculate $\Gamma(x)$ directly from TMD simulations. To circumvent convergence problems associated with the above exponential average \cite{Vaikuntanathan08}, we perform a second-order cumulant expansion which gives Eq.\ (\ref{eq:dG2}) with $W_{\rm diss}(x) = \mean{\delta W^2(x)}/k_{\rm B}T$. Expressing work fluctuations $\delta W$ in terms of the fluctuating force $\delta f_{\rm c}$, we obtain for the friction \cite{Wolf18} \begin{align} \label{eq:dcTMD} \Gamma (x) = \frac{1}{k_{\rm B}T} \int_{t_0}^{t(x)} \mean{\delta f_c(t) \delta f_c(t')} \diff{t'} , \end{align} which is readily evaluated directly from the TMD simulations. As discussed in Ref.\ \onlinecite{Wolf18}, the derivation of Langevin equation (\ref{eq:LE}) assumes that the pulling speed $v_{\rm c}$ is slow compared to the timescale of the bath fluctuations, such that the effect of $f_{\rm c}$ can be considered as a slow adiabatic change\cite{Servantie03}. This means that the free energy (\ref{eq:dG2}) and the friction (\ref{eq:dcTMD}) determined by the nonequilibrium TMD simulations correspond to their equilibrium results. As a consequence, we can use $\Delta G(x)$ and $\Gamma(x)$ to describe the unbiased motion of the system via Langevin equation (\ref{eq:LE}) for $f_{\rm c}=0$. Numerical propagation of the unbiased Langevin equation then accounts for the coarse grained dynamics of the system. In this way, calculations of $\Delta G(x)$ and $\Gamma(x)$ as well as dynamical calculations are based on the same theoretical footing (i.e., the Langevin equation), and are therefore expected to yield a consistent estimation of the timescales of the considered process. Moreover, the exact solution of the Langevin equation allows us to directly use the computed fields $\Delta G(x)$ and $\Gamma(x)$ and thus to avoid further approximations\cite{Haenggi90}. The theory developed above rests on two main assumptions. For one, we have assumed that the Langevin equation (\ref{eq:LE}) provides an appropriate description of nonequilibrium TMD simulations, and applies as well to the unbiased motion ($f_{\rm c}=0$) of the system. This means that, due to a timescale separation of slow pulling speed and fast bath fluctuations, the constraint force $f_{\rm c}$ enters this equation merely as an additive term. Secondly, to ensure rapid convergence of the Jarzynski equation, we have invoked a cumulant expansion to derive the friction coefficient in Eq.\ (\ref{eq:dcTMD}), which is valid under the assumption that the distribution of the work is Gaussian within the ensemble. While this assumption may break down if the system of interest follows multiple reaction paths, we have recently shown that we can systematically perform a separation of dcTMD trajectories according to pathways by a nonequilibrium principal component analysis of protein-ligand contacts\cite{Post19}. This approach bears similarities with the work of Tiwary et al.\ for the construction of path collective variables\cite{Tiwary15}. Alternatively, path separation can be based on geometric distances between individual trajectories, making use of the NeighborNet algorithm\cite{Bryant04}. Details on the convergence of the free energy and friction estimates, the path separation, and the choice of the pulling velocity are given in Supplementary Methods and in Supplementary Figs.\ \SIFEconvergence\ to \SIvelocity. \begin{figure*}[htb!] \centering \includegraphics[width=11.4cm]{.//Fig1_NaCl_dGfrict_v5_natchem.pdf} \caption{Dissociation of NaCl in water. (\textbf{a}) Free energy profiles $\Delta G(x)$ along the interionic distance $x$, obtained from a $1\,\upmu$s long unbiased MD trajectory at 293~K (orange line) and $1000 \times 1\,$ns TMD runs (blue line). Error bars are given in Supplementary Fig.\ \SIJackknife. Also shown is the average work $\langle W(x) \rangle$ calculated from the TMD simulations (dashed black line). (\textbf{b}) Friction profile $\Gamma(x)$ (red) obtained from dcTMD after Gaussian smoothing together with the average number of water molecules (black), that connect the Na$^+$ and Cl$^-$ ions in a common hydration shell \cite{Mullen14}.} \label{fig:NaCl} \end{figure*} \textbf{$T$-boosting.} The speed-up of Langevin equation (\ref{eq:LE}) compared to an unbiased all-atom MD simulation is due to the drastic coarse graining of the Langevin model (one instead of $3N$ degrees of freedom, $N$ being the number of all atoms). Since the numerical integration of the Langevin equation typically requires a time step of a few femtoseconds (see Supplementary Table \SITabTimestepNaCl), however, we still need to propagate Eq.\ (\ref{eq:LE}) for $ \gtrsim 100 \cdot 10^{15}$ steps to sufficiently sample a process occurring on a timescale of seconds, which is prohibitive for standard computing resources. As a further way to speed up calculations, we note that the temperature $T$ enters Eq.\ (\ref{eq:LE}) via the stochastic force, indicating that temperature is the driving force of the Langevin dynamics. That is, when we consider a process described by a transition rate $k$ and increase the temperature from $T_1$ to $T_2$, the corresponding rates $k_1$ and $k_2$ are related by the Kramers-type expression\cite{Haenggi90} \begin{equation} \label{eq:rates} k_2 = k_1 e^{- \Delta G^{\neq}(\beta_2 -\beta_1)} , \end{equation} where $\Delta G^{\neq}$ denotes the transition state energy and $\beta_i = 1/k_{\rm B}T_i$ is the inverse temperature. Hence, by increasing the temperature we also increase the number $n$ of observed transition events according to $n_2/n_1 = k_2/k_1$. To exploit this relationship for dcTMD, we proceed as follows. First we employ dcTMD to calculate the Langevin fields $\Delta G(x)$ and $\Gamma(x)$ at a temperature of interest $T_1$. Using these fields, we then run a Langevin simulation at some higher temperature $T_2$, which results in an increased transition rate $k_2$ and number of events $n_2$. In particular, we choose a temperature high enough to sample a sufficient number of events ($N \gtrsim 100$) for some given simulation length. In the final step, we use Eq.\ (\ref{eq:rates}) to calculate the transition rate $k_1$ at the desired temperature $T_1$. As Eq.\ (\ref{eq:rates}) arises as a consequence\cite{Haenggi90} of Langevin equation (\ref{eq:LE}), the above described procedure, henceforth termed ``$T$-boosting,'' involves no further approximations. It exploits the fact that we calculate fields $\Delta G(x)$ and $\Gamma(x)$ at the same temperature for which we eventually want to calculate the rate. We wish to stress that this virtue represents a crucial difference to temperature accelerated MD.\cite{Sorensen00} In the latter method the free energy $\Delta G(x)$ is first calculated at a high temperature and subsequently rescaled to a desired low temperature, whereupon $\Delta G(x)$ in general does change. $T$-boosting avoids this, because by using dcTMD we calculate $\Delta G(x)$ right away at the desired temperature. We note in passing that a Langevin simulation run at $T_2$ using fields obtained at $T_1$ in general does not reflect the coarse-grained dynamics of an MD simulation run at $T_2$, but can only be used to recover $k_1$ from $k_2$. In practice, we perform $T$-boosting calculations at several temperatures $T_2$ in increments of 25~K to 50~K and choose the smallest $T_2$ such that $N \gtrsim 100$ transitions occur. In the Supporting Information we derive an analytic expression of the extrapolation error as a function of boosting temperatures and achieved number of transitions, from which the necessary length of the individual Langevin simulations can be estimated, in order to achieve a desired extrapolation error. One-dimensional Langevin simulations require little computational effort (1~ms of simulation time at a 5~fs time step take $\sim$6 hours of wall-clock time on a single CPU) and are trivial to parallelize in the form of independent short runs. Hence the extrapolation error due to boosting can easily be pushed below 10\% and is thus negligible in comparison to systematic errors coming from the dcTMD field estimates. As shown in Supplementary Table \SITabTimestepNaCl, a further increase in efficiency can be achieved if the considered dynamics is overdamped, which is the case for both protein-ligand systems. Since overdamped dynamics neglects the inertia term $m \ddot x$ and therefore does not depend on the mass $m$, we may artificially enhance the mass in the Langevin simulations. For the protein-ligand systems, this allows us to increase the integration time step from 1 to 10 fs, i.e., a speed-up of an order of magnitude. \section*{Results and Discussion} \begin{figure*}[htb!] \centering \includegraphics[width=16.5cm]{.//Fig2_logtransits_v6_natchem.pdf} \caption{Mean binding (red) and unbinding (blue) times, drawn as a function of the inverse temperature, obtained from $T$-boosted Langevin simulations of (\textbf{a}) solvated NaCl, (\textbf{b}) the trypsin-benzamidine complex and (\textbf{c}) the Hsp90-inhibitor complex. Dashed lines represent fits (R$^2 = 0.90-0.99$) to Eq.\ (\ref{eq:rates}), crosses (binding in grey, unbinding in black) indicate reference results from \textbf{a} unbiased MD simulation\cite{Wolf18} and \textbf{b}, \textbf{c} experiment\cite{Guillain70,Amaral17}. Bars represent the standard error of the mean. Tables below comprise corresponding rates (with M being the molarity, i.e., mol/l) and reference values. Rate constants were fitted according to Eq.\ (\ref{eq:rates}) at $290$~K and $300$~K, respectively, with fit errors as indicated\cite{Hughes10}. Dissociation constants were calculated from rate constants.} \label{fig:accelerate} \end{figure*} \textbf{Ion dissociation of NaCl in water.} To illustrate the above developed theoretical concepts and test the validity of the underlying approximations, we first consider sodium chloride in water as a simple yet nontrivial model system. For this system, detailed dcTMD as well as long unbiased MD simulations are available\cite{Wolf18}, making it a suitable benchmark system for our approach. Fig.\ \ref{fig:NaCl}a shows the free energy profiles $\Delta G(x)$ along the interionic distance $x$, whose first maximum at $x \approx 0.4$~nm corresponds to the binding-unbinding transition of the two ions. The second smaller maximum at $x \approx 0.6$~nm reflects the transition from a common to two separate hydration shells\cite{Mullen14}. We find that results for $\Delta G(x)$ obtained from a $1\,\upmu$s long unbiased MD trajectory and from dcTMD simulations ($1000 \times 1\,$ns runs with $v_{\rm c}\!=\!1\,$m/s) match perfectly. Since the average work $\langle W(x) \rangle$ of the nonequilibrium simulations is seen to significantly overestimate the free energy at large distances, the dissipation correction $W_{\rm diss}$ in Eq.\ (\ref{eq:dG2}) is obviously of importance. Figure \ref{fig:NaCl}b shows the underlying friction profile $\Gamma(x)$ obtained from dcTMD, which in part deviates from the lineshape of the free energy. While we also find a maximum at $x \approx 0.4$~nm, the behavior of $\Gamma(x)$ is remarkably different for larger distances $0.5 \lesssim x \lesssim 0.7$~nm, where a region of elevated friction can be found before dropping to lower values. Interestingly, these features of $\Gamma(x)$ match well the changes of the average number of water molecules bridging both ions\cite{Mullen14}. This indicates that the increased friction in Eq.\ (\ref{eq:dcTMD}) is mainly caused by force fluctuations associated with the build-up of a hydration shell\cite{Wolf18}. For $x \gtrsim 0.8$~nm, the friction is constant within our signal-to-noise resolution. The dynamics of ion dissociation and association can be described by their mean waiting times and corresponding rates shown in Figure~\ref{fig:accelerate}a. For the chosen force field, ion concentration and resulting effective simulation box size, the unbiased MD simulation at 293 K yields mean dissociation and association times of $\tau_{\rm D}=1/k_{\rm D}=120\,$ps and $\tau_{\rm A}=1/\left( k_{\rm A} C \right)=850\,$ps, respectively, where $C$ denotes a reference concentration (see the Supplementary Methods for details). Using fields $\Delta G(x)$ and $\Gamma(x)$ obtained from TMD, the numerical integration of Langevin equation (\ref{eq:LE}) for 1 $\upmu$s results in $\tau_{\rm D}=420\,$ps and $\tau_{\rm A}=3040\,$ps. While the dissociation constants $K_{\rm D} = k_{\rm D} / k_{\rm A} = 1.5$~M from Langevin and MD simulations match perfectly, we find that the Langevin predictions overestimate the correct rates by a factor of $\sim$3.4. The latter may be caused by various issues. For one, to be of practical use, the Langevin model was deliberately kept quite simple. For example, it does not include an explicit solvent coordinate\cite{geissler99,Mullen14}, but accounts for the complex dynamics of the solvent merely through the friction field $\Gamma(x)$. Moreover, we note that the calculation of $\Gamma(x)$ via Eq.\ (\ref{eq:dcTMD}) uses constraints, which have the effect of increasing the effective friction\cite{Daldrop17}. This finding is supported by calculations using the data-driven Langevin approach\cite{Hegger09,Schaudinnus16}, which estimates friction coefficients based on unbiased MD simulations that are consistantly smaller than the ones obtained from dcTMD (Supplementary Fig.~\SIdLEfriction). Considering the simplicity of the Langevin model and the approximate calculation of the friction coefficient by dcTMD, overall we are content with a factor $\sim 3$ deviation of the predicted kinetics. To illustrate the validity of the $T$-boosting approach suggested above, we performed a series of Langevin simulations for eight temperatures ranging from 290 to 420~K and plotted the resulting dissociation and association times as a function of the inverse temperature (Fig.\ \ref{fig:accelerate}a). Checking the consistency of our approach, a fit to Eq.\ (\ref{eq:rates}) yields transition state free energies $\Delta G^{\neq}$ of $13$~kJ/mol and $12$~kJ/mol for ion dissociation and association, respectively, which agree well with barrier heights of the free energy profile in Fig.\ \ref{fig:NaCl}a. Moreover, dissociation and association times obtained from the extrapolated $T$-boosted Langevin simulations ($\tau_{\rm D}=370$~ps, $\tau_{\rm A}=3050$~ps) agree excellently with the directly calculated values. This indicates that high-temperature Langevin simulations can indeed be extrapolated to obtain low-temperature transition rates. \textbf{Trypsin-benzamidine.} Let us now consider the prediction of free energies, friction profiles and kinetics in protein-ligand systems. The first system we focus on is the inhibitor benzamidine bound to trypsin\cite{Guillain70,Marquart83,Schiebel18}, which represents a well-established model problem to test enhanced sampling techniques\cite{Buch11,Plattner15,Tiwary15, Teo16,Votapka17,Betz19}. The slowest dynamics in this system is found in the unbinding process, which occurs on a scale of milliseconds\cite{Guillain70}. To capture the kinetics of the unbinding process, so far Markov state models\cite{Buch11,Plattner15}, metadynamics\cite{Tiwary15}, Brownian dynamics\cite{Votapka17} and adaptive enhanced sampling methods\cite{Teo16,Betz19} have been employed. \begin{figure*}[htb] \centering \includegraphics[width=15.8cm]{{.//Fig3_Trypsin_dGfrictpath_natchem}.pdf} \caption{Unbinding of benzamidine from trypsin. (\textbf{a}) TMD snapshots of the structural evolution in trypsin along the dominant dissociation pathway, showing protein surface in gray, benzamidine as van der Waals spheres, Asp189 and water molecules as sticks. Benzamidine is bound to the protein in a cleft of the protein surface via a bidental salt bridge to Asp189. dcTMD calculations of (\textbf{b}) free energy $\Delta G(x)$ and (\textbf{c}) (Gaussian smoothed) friction $\Gamma(x)$ together with the mean number of hydrogen bonds between benzamidine and water. Highlighted are the bound state \textbf{1}, transition state \textbf{2}, the state with maximal friction \textbf{3} and the unbound state \textbf{4}. Error bars of free energy and friction estimates are given in Supplementary Fig.\ \SIJackknife.} \label{fig:Tryps} \end{figure*} Here we combined dcTMD simulations and a subsequent nonequilibrium principal component analysis\cite{Post19} to identify the dominant dissociation pathways of ligands during unbinding from their host proteins (see Supplementary Methods). Figure~\ref{fig:Tryps} shows TMD snapshots of the structural evolution along this pathway, its free energy profile $\Delta G(x)$, and the associated friction $\Gamma(x)$. Starting from the bound state ($x_1\!=\!0$~nm), $\Delta G(x)$ exhibits a single maximum at $x_2\approx 0.46$~nm, before it reaches the dissociated state for $x\gtrsim x_4= 0.75$~nm. In line with the findings of Tiwary et al.\cite{Tiwary15}, the maximum of $\Delta G(x)$ reflects the rupture of the Asp189-benzamidine salt bridge, which represents the most important contact of the bound ligand. Following right after, the friction profile $\Gamma(x)$ reaches its maximum at $x_3 \approx 0.54$~nm, where the charged side chain of benzamidine becomes hydrated with water molecules. Similarly to NaCl, the friction peak coincides with the increase in the average number of hydrogen bonds between benzamidine and bulk water. The peak in friction is slightly shifted to higher $x$, because the ligand acts as a ''plug'' for the binding site, and first needs to be (at least partially) removed in order to allow water flowing in. As for the dissociation of NaCl in water, enhanced friction during unbinding appears to be directly linked to a rearrangement of the protein-ligand hydration shell, which is in agreement with recent results from neutron crystallography\cite{Schiebel18}. To calculate rates $k_{\rm on}$ and $k_{\rm off}$ describing the binding and unbinding of benzamidine from trypsin, we performed 10~ms long Langevin simulations along the dominant pathways at thirteen temperatures ranging from 380--900 K. As shown in Fig.~\ref{fig:accelerate}b, the resulting rates are well fitted (R\textsuperscript{2} $\geq 0.90$) by the $T$-boosting expression in Eq.\ (\ref{eq:rates}). Representing the resulting number of transitions as a function of the inverse temperature, we find that at 380 K only $\sim 9$ events happen during a millisecond. That is, to obtain statistically converged rates at 290 K would require Langevin simulations at 290 K on a timescale of seconds. Using temperature boosting with Eq.\ (\ref{eq:rates}), on the other hand, our high-temperature millisecond Langevin simulations readily yield converged transition rates at 290 K (see Fig.\ \ref{fig:accelerate}b), that is, $k_{\rm on}= 8.7 \cdot 10^{6}$~s\textsuperscript{-1}M\textsuperscript{-1} and $k_{\rm off}= 2.7 \cdot 10^{2}$~s\textsuperscript{-1}, which underestimate the experimental values\cite{Guillain70} $k_{\rm on}= 2.9 \cdot 10^{7}$~s\textsuperscript{-1}M\textsuperscript{-1} and $k_{\rm off}= 6.0 \cdot 10^{2}$~s\textsuperscript{-1} by a factor of 2--3. Similarly, the calculated $K_{\rm D}$ overestimates the experimental result \cite{Guillain70} of $K_{\rm D} = 2.1 \cdot 10^{-5}$~M by a factor of $\sim$1.5. As indicated by a recent review\cite{Bruce18} comparing numerous computational methods to calculate (un)binding rates of trypsin-benzamidine, our approach compares quite favorably regarding accuracy and computational effort. As the extrapolation error due to $T$-boosting is negligible (see Supplementary Methods), the observed error is mainly caused by the approximate calculation of free energy and friction fields by dcTMD. In the case of NaCl, we have shown that reliable estimates of the fields (with errors $\lesssim 1\, k_{\rm B}T$) require an ensemble of at least 500 simulations (see Ref.~\onlinecite{Wolf18} and Supplementary Fig.\ \SIJackknife), although the means of $\Delta G$ and $\Gamma$ appear to converge already for $\sim$100 trajectories. In a similar vein, by performing a Jackknife ''leave-one-out'' analysis\cite{Efron81}, for trypsin-benzamidine we obtain an error of $\sim 2\, k_{\rm B}T$ for 150 trajectories (Supplementary Fig.\ \SIJackknife). Interestingly, the error of the main free energy barrier is typically comparatively small, because the friction and thus variance of $W$ increase directly after the barrier. As a consequence, the sampling error of $k_{\rm off}$ is small compared to that of $k_{\rm on}$ and the binding free energy. We note that if the experimental binding affinity $K_D$ is known, it can be used as a further constraint on the error of the free energy and friction fields. \textbf{Hsp90-inhibitor.} The second investigated protein complex is the N-terminal domain of heat shock protein 90 (Hsp90) bound to a resorcinol scaffold-based inhibitor (\textbf{1j} in Ref.~\onlinecite{Wolf19c}). This protein has recently been established as a test system for investigating the molecular effects influencing binding kinetics\cite{Amaral17,Kokh18,Schuetz18,Wolf19c}, and the selected inhibitor unbinds on a scale of half a minute. From the overall appearance of free energy and friction profiles (Fig.~\ref{fig:Hsp90}), we observe clear similarities to the case of trypsin-benzamidine. That is, the main transition barrier is also found at $x_2\approx 0.5$~nm, which stems from the ligand pushing between two helices at this point in order to escape the binding site. Moreover, the friction peaks at $x_2\approx 0.5$~nm, as well, but with an additional shoulder at $x_3\approx 0.8$~nm, which again coincides with changes of the ligand's hydration shell. The unbound state is reached after $x \gtrsim 1.0$~nm. We note that the ligand is again bound to the protein via a hydrogen bond to an aspartate (Asp93) and at a position that is open to the bulk water. \begin{figure*}[ht] \centering \includegraphics[width=15.8cm]{.//Fig4_Hsp90_dGfrictpath_natchem.pdf} \caption{Unbinding of an inhibitor from the N-terminal domain of Hsp90. (\textbf{a}) Structural evolution along the dissociation pathway in Hsp90, showing protein surface in gray, inhibitor as van der Waals spheres, Asp93 and water molecules as sticks. The inhibitor is bound to the protein in a cleft of the protein surface via a hydrogen bond to Asp93. dcTMD calculations of (\textbf{b}) free energy $\Delta G(x)$ and (\textbf{c}) (Gaussian-smoothed) friction $\Gamma(x)$ together with the mean number of hydrogen bonds between inhibitor and water. Highlighted are the bound state \textbf{1}, transition state and state with maximal friction \textbf{2}, an additional state with increased friction \textbf{3} and the unbound state \textbf{4}. Error bars of free energy and friction estimates are given in Supplementary Fig.\ \SIJackknife. Fluctuations of $\Gamma(x)$ for $x \gtrsim 1\,$nm are due to noise. Color code as in Fig.~\ref{fig:Tryps}.} \label{fig:Hsp90} \end{figure*} To calculate rates $k_{\rm on}$ and $k_{\rm off}$, we again performed 5~ms long Langevin simulations along the dissociation pathway at fourteen different temperatures ranging from 700--1350~K. Rate prediction yields $k_{\rm on}\!=\! 9.0\cdot 10^{4}$~s\textsuperscript{-1}M\textsuperscript{-1} and $k_{\rm off}\!=\! 1.6\cdot 10^{-3}$~s\textsuperscript{-1}, and underestimates the experimental\cite{Amaral17} values $k_{\rm on}= 4.8 \pm 0.2 \cdot 10^{5}$~s\textsuperscript{-1}M\textsuperscript{-1} and $k_{\rm off}= 3.4 \pm 0.2 \cdot 10^{-2}$~s\textsuperscript{-1} by a factor of 5--20. The resulting value for $K_{\rm D} = 1.8 \cdot 10^{-8}$~M underestimates the experimental value\cite{Amaral17} $7.1 \cdot 10^{-8}$~M by a factor of $\sim$4. Considering that we attempt to predict unbinding times on a time scale of half a minute from sub-$\upmu$s MD simulations, and that a factor 20 corresponds to a free energy difference of about 3 $k_B T$ (i.e., 15 \% of the barrier height in Hsp90), we find this agreement remarkable for a first principles approach which implies many uncertainties of the physical model\cite{Capelli20}. We attribute the larger deviation in comparison to trypsin to issues with the sampling of the correct unbinding pathways: especially unbinding rates in the range of minutes to hours fall into the same timescale as slow conformational dynamics of host proteins\cite{Amaral17}, requiring a sufficient sampling of the conformational space of the protein as a prerequisite for dcTMD pulling simulations. \section*{Conclusions} Using free energy and friction profiles obtained from dcTMD, we have shown that $T$-boosted Langevin simulations yield binding and unbinding rates which are well comparable to results from atomistic equilibrium MD and experiments. That is, rates are underestimated by an order of magnitude or less which, in comparison to other methods that have been applied to the trypsin-benzamidne and Hsp90 complexes (see Refs.\ \onlinecite{Bruce18,NunesAlves20} for recent reviews), is within the top accuracy currently achievable. At the same time, the few other methods that aim at predicting absolute rates (such as Markov state models\cite{Buch11,Plattner15} and infrequent metadynamics\cite{Tiwary15,Casasnovas17}) require substantial more MD simulation time, while dcTMD only requires sub-$\upmu$s MD runs, that is, at least an order of magnitude less computational time. As the extrapolation error due to $T$-boosting is negligible, the error is mainly caused by the approximate calculation of free energy and friction fields by dcTMD. We have shown that friction profiles, which correspond to the dynamical aspect of ligand binding and unbinding, may yield additional insight into molecular mechanisms of unbinding processes, which are not reflected in the free energies. Although the three investigated molecular systems differ significantly, in all cases friction was found to be governed by the dynamics of solvation shells. \section*{Methods} \textbf{MD simulations.} All simulations employed Gromacs v2018 (Ref. \onlinecite{Abraham15}) in a CPU/GPU hybrid implementation, using the Amber99SB* force field\cite{Hornak06,Best09} and the TIP3P water model\cite{Jorgensen83}. For each system, $10^2$-$10^3$ dcTMD calculations\cite{Wolf18} at pulling velocity $v_c = 1$~m/s were performed to calculate free energy $\Delta G(x)$ and friction $\Gamma (x)$. For the NaCl-water system, dcTMD as well as unbiased MD simulations were taken from Ref.~\onlinecite{Wolf18}. Trypsin-benzamidin complex simulations are based on the 1.7~\AA~X-ray crystal structure with PDB ID 3PTB (Ref. \onlinecite{Marquart83}). Simulation systems of the Hsp90-inhibitor complex were taken from Ref.~\onlinecite{Wolf19c}. Detailed information on system preparation, ligand parameterization, MD simulations and pathway separation can be found in the Supplementary Information. \textbf{Langevin simulations.} Langevin simulations employed the integration scheme by Bussi and Parrinello\cite{Bussi07b}. Details on the performance of this method with respect to the employed integration time step and system mass can be found in the Supplementary Information. \subsection*{Data availability} \vspace*{-4mm} Python scripts for dcTMD calculations, the fastpca program package for nonequilibrium principal component analysis, the data-driven Langevin package, the Langevin simulation code, and Jupyter notebooks for $T$-boosting analysis and sampling error estimation in Langevin simulations are available at our website \url{www.moldyn.uni-freiburg.de}. Further data is available from the authors upon request. \section*{References} \vspace*{-4mm}
\section{Introduction} The discovery of graphene \cite{graphene1,graphene2} has evoked tremendous research in two--dimensional (2D) layered materials. Apart from introducing new physics, 2D materials show promising applications in opto--photonic, nano--photonic, sensor devices etc \cite{graphene_book,graphene3}. However, the semi--metallic nature of graphene limits its wide application in electronic devices despite its very high carrier mobility \cite{graphene4}. Transition metal dichalcogenides \cite{mos21,mos22,mos24} are another important member of this 2D materials family. Unlike graphene, they have a finite band gap, but their low mobility \cite{mos23} constrains their applications. A few years ago, another 2D material, phosphorene, was exfoliated \cite{bP1,bP2,bP3,bP4} from bulk black phosphorus. Phosphorene, the single or few layer form of black phosphorus, has been drawing much attention since then. In a layer of phosphorene, a phosphorus atom is bonded to three other phosphorus atoms via $sp^3$ hybridization. This gives rise to a puckered honeycomb structure \cite{bP_struc}. The uniqueness of phosphorene is its structural anisotropy which manifests in anisotropic optical, thermal and transport properties \cite{bP_aniso1,bP_aniso2,bP_aniso3}. Phosphorene has a direct band gap at the center of the Brillouin zone which ranges from $\sim$ 0.3 eV (bulk) to $\sim$ 2.1 eV (monolayer) \cite{bP_expt2}. This change in the band gap with the number of layers is due to quantum confinement and non-linearity of exchange--correlation functional \cite{layer_dep}. Phosphorene based field--effect transistors have shown a hole mobility of 1000 $\mathrm{cm}^{\mathrm{2}}/\mathrm{Vs}$ and a high on/off current ratio up to $10^5$ \cite{bP1}. The tunability of band gap and mobility depending on the number of layers make the material suitable for electronic, opto--electronic, photo--electric, and FET device applications \cite{bP8,bP9}. Presence of defect affects the material properties in different ways. Depending on the charge state of the defect, it can induce free carriers or trap charge and act as scatterer in the system. Electronic, optical and magnetic properties can also be altered due to the presence of defects. Hence, an extensive study of defects and their possible charge states is required for defect engineering and proper understanding of material properties. The puckered structure of phosphorene facilitates the formation of various defects \cite{vac1}. Defects in phosphorene have low formation energy \cite{graphene_defect} in comparison to defects in graphene \cite{bP_defect0}. There is experimental evidence of vacancies \cite{bp_expt} in phosphorene. While defects can escalate the degradation process of devices \cite{bP_oxy2,bP_oxy3} such as vacancy can increase the oxidization of phosphorene, they can also enhance device performance by introducing desired properties; for example, emission of photons at new frequencies at room temperature \cite{bp_oxy}. Vacancy and self--interstitial are two low energy native point defects in phosphorene. In general, DFT works well for calculating ground state properties like structures of defects. However, the estimation of the correct charge transition level (CTL) requires the calculation of the energy associated with the change in the electron number at the defect site. This is an excited state property and is not expected to be estimated correctly with Kohn--Sham DFT. While Heyd--Scuseria--Ernzerhof (HSE) functional \cite{hse} is an improvement over the generalized gradient approximation \cite{pbe} and works well for bulk materials, it fails to capture the anisotropic screening in two dimensional materials properly \cite{hse_prl,hse_prb}. The combined formalism of many body perturbation theory within GW approximation \cite{gw_thry1,gw_thry2} and DFT has emerged as a reliable method for calculation of CTL \cite{gw_ctl,gw_ctl2}. Furthermore, previous DFT calculations have either been performed with a small supercell size \cite{bP_defect1} or have not taken into account the full anisotropic (not only out-of-plane but also in-plane) dielectric constant of phosphorene while correcting for spurious electrostatic interaction \cite{bP_defect2,bP_defect3,bP_defect4}. We study structural and electronic properties of vacancy and self--interstitial in mono-- and bi--layer phosphorene. We calculate the formation energies and CTLs of these defects using the DFT + GW formalism. Since we employ periodic boundary conditions in our calculations, the charged defect calculations suffer from spurious electrostatic interactions with their periodic neighbours. This problem is more prominent in a 2D material due to reduced screening along the out-of-plane direction. We correct for this spurious interaction systematically by properly modeling the anisotropic dielectric medium. Further, we validate our calculation of CTLs by evaluating CTL of interstitial in monolayer phosphorene following two different paths. With the electrostatic correction to defect levels, the two paths agree within $\pm$ 100 meV. We find that defects in phosphorene have low formation energies, in the range 0.9--1.6 eV, which is consistent with previous calculations \cite{vac1}. Our study also shows that vacancy can induce p-doping supporting the experimental finding of intrinsic p-type behaviour of phosphorene \cite{bP1, bP2, bP9}. In contrast, interstitial in mono-- and bi--layer can act as both p-type acceptor and n-type donor. Furthermore, we find that the unoccupied defect levels of neutral defect calculated with DFT and GW line up with respect to the vacuum level while the occupied defect levels shift downward in GW compared to DFT calculated levels. This manuscript is organized as follows. Section 2 describes our methods of calculation which include the details about DFT, GW and the corrections for charged defect calculations. Calculation and results of defects in mono-- and bi--layer phosphorene are presented in section 3 and 4 respectively. \section{Computational Details and Methodology:} All the DFT calculations in this study are performed using the Quantum Espresso package \cite{qe}. We use a norm--conserving pseudopotential \cite{norm_pseudo} and the exchange--correlation potential is approximated by the generalized gradient approximation proposed by Perdew, Burke and Ernzerhof (GGA--PBE) \cite{pbe}. The van der Waals interaction between layers is described by \textquotedblleft Grimme--D2\textquotedblright{} method \cite{vdw}. The wave functions are expanded in a plane wave basis, with plane waves up to energy of 60 Rydberg included in the basis. For unit cell calculations we adopt a 14 $\times$ 10 $\times$ 1 Monkhorst--Pack \cite{monk-pack} k-point sampling of the Brillouin zone. A vacuum space of 15.9 \AA{} is added to the unit cell in the out-of-plane direction to simulate an isolated mono-- or bi--layer. The in-plane lattice constants are found to be 3.30 \AA{} and 4.62 \AA{} for monolayer and 3.31 \AA{} and 4.51 \AA{} for bilayer unit cell respectively. For the calculation of defects, we construct a 7 $\times$ 5 $\times$ 1 supercell to accommodate the vacancy or the interstitial atom. This size of supercell is chosen to simulate an isolated defect and minimize the interaction between periodic images of defects. The Brillouin zone is sampled with a 2 $\times$ 2 $\times$ 1 k-point grid for supercell calculations. All atomic coordinates in supercell containing defect are relaxed using Broyden--Fletcher--Goldfarb--Shanno (BFGS) quasi--Newton algorithm until total energy and forces are converged to $10^{-3}$ eV and $0.025$ eV$/$\AA{} respectively. The GW \cite{gw_thry1,gw_thry2} calculations are performed using the BerkeleyGW package \cite{BGW}. The number of unoccupied bands are 100 and 125 for unit cell in monolayer and bilayer respectively. This choice ensures the convergence of the band gap to be better than 0.1 eV. The dielectric matrix is expanded in plane wave with energy up to 12 Ry and extended to finite frequencies using generalized plasmon pole (GPP) \cite{gpp} model. The Coulomb interaction along the out of-plane-direction is truncated to compute the dielectric matrix and self--energy \cite{cellslab}. The static remainder technique is used to accelerate the convergence of the calculation with the number of empty bands \cite{static_ch}. The Brillouin zone sampling used for GW calculations of unit cell is 21 $\times$ 15 $\times$ 1. We find the quasiparticle band gap for monolayer to be 2.07 eV which is in good agreement with previous theoretical \cite{bP5,bP6,bP7} and experimental (scanning tunneling spectroscopy \cite{bp_exp1} and photoluminescence excitation spectroscopy \cite{bp_exp2}) studies. The band gap for bilayer is 1.29 eV which is also consistent with previous calculations \cite{bP6,bP7}. For the defect calculations with 7 $\times$ 5 supercell in monolayer and bilayer, 3500 and 4300 unoccupied states are used respectively. We diagonalize the Hamiltonian using PRIMME software \cite{primme1,primme2} to generate the large number of unoccupied bands needed in the calculation. The Brillouin zone is sampled using a 3 $\times$ 3 $\times$ 1 k-point grid. The formation energy of an isolated defect is defined as: \begin{align} \mathrm{E}^{\mathrm{f}}_{\mathrm{q}}[\vec{\mathrm{R}}_\mathrm{q}](\mathrm{E}_{\mathrm{F}})=\mathrm{E}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{q}}]-\mathrm{E}_{\mathrm{pristine}}+\mathrm{N}_\mathrm{P}\mathrm{\mu}_{\mathrm{P}}+\mathrm{q}(\mathrm{E}_{\mathrm{F}}+\mathrm{\epsilon}_{\mathrm{VBM}})+\mathrm{E}_{\mathrm{corr}}(\mathrm{q}) \end{align} where $\mathrm{E}_{\mathrm{pristine}}$ is the total energy per supercell of pristine mono-- or bi--layer phosphorene, $\mathrm{E}_{\mathrm{q}}[\vec{\mathrm{R}}_\mathrm{q}]$ is the total energy of a supercell containing defect in charge state q at its relaxed coordinates $\vec{\mathrm{R}}_\mathrm{q}$, $\mathrm{N}_{\mathrm{P}}$ is the number of phosphorus atoms added to (or removed from) the supercell to create the defect, $\mathrm{\mu}_\mathrm{P}$ is the chemical potential of a phosphorus atom which is calculated from bulk black phosphorus, $\mathrm{\epsilon}_{\mathrm{VBM}}$ is the energy of the valence band maximum (VBM) of pristine cell, $\mathrm{E}_\mathrm{F}$ is the Fermi level with respect to $\mathrm{\epsilon}_{\mathrm{VBM}}$ and $\mathrm{E}_{\mathrm{corr}}(\mathrm{q})$ is the electrostatic correction term. As discussed previously, simulations of charged defects suffer from an erroneous electrostatic interaction between the defect cell and its images arising due to periodic boundary conditions. As a consequence, formation energies and eigenvalues of defect levels in charged defects are estimated incorrectly. The correction term $\mathrm{E}_{\mathrm{corr}}(\mathrm{q})$ in Eqn. (1) removes the spurious electrostatic interactions and includes the potential alignment in formation energy. $\mathrm{E}_{\mathrm{corr}}(\mathrm{q})$ is calculated using the Freysoldt-- Neugebauer-- Van de Walle (FNV) scheme \cite{FNV} as implemented in CoFFEE code \cite{coffee}. To calculate the correction term, mono-- and bi--layer phosphorene are modeled as a dielectric slab of width 5.22 \AA{} and 10.44 \AA{} respectively. The dielectric constants of the slab \cite{ecorr} are calculated using density functional perturbation theory of the Quantum Espresso package \cite{qe}. The in-plane dielectric constants for monolayer phosphorene are 12.5 and 18.0 along the zigzag direction and armchair direction, respectively. The out-of-plane dielectric constant is 1.9. These quantities for bilayer are 13.5, 27.4 and 1.9 respectively. The difference in the in-plane dielectric constants is due to the structural anisotropy of phosphorene. The charge is modeled as Gaussian distribution whose parameters are taken from DFT calculations. Using this model, the electrostatic energy is calculated for different cell sizes with a uniform scaling parameter, $\mathrm{\alpha}$, and extrapolated to infinite limit using 5th order polynomial to obtain the value for an isolated defect \cite{ecorr}. The difference between the isolated value and the value for a particular cell size gives the required correction in formation energy for the corresponding cell. To verify our model, we calculate the electrostatic energies of negatively charged interstitial defect in bilayer phosphorene with a model charge for several supercell sizes. Our starting cell is the 7 $\times$ 5 supercell ($\alpha=7$) for which the in-plane lattice parameters are almost equal. We uniformly scale the cell size along all the three directions and calculate the electrostatic energy (blue curve in Fig. 1(a)). Further, we perform a different set of scaling calculations starting from a supercell such that the vacuum scaling is different. The scaling factor in these cells along the out-of-plane direction is 1.5 times of those in the in-plane directions (red curve in Fig. 1(a)). We observe that the electrostatic correction does not change monotonically with the inverse of supercell length which necessitates the several calculations of large supercell to reach the infinite length limit. As a result, a simple 1/L extrapolation from a small supercell size can lead to incorrect isolated value \cite{komsa_corr1,komsa_corr2}. Fig. 1(b) shows the formation energies of negatively charged interstitial in bilayer phosphorene without and with correction for supercell sizes $7\times5, 10\times8$ and $14\times10$. The corrections have been obtained following the blue curve of Fig. 1(a). It can be clearly seen that the corrected formation energies are same for all the three supercells. For comparison we have further included the formation energies of neutral defect in bilayer phosphorene for the same supercell sizes as mentioned above. The formation energies of neutral defect also have no supercell size dependence. \begin{figure}[] \centering \includegraphics[scale=0.80]{figure1.pdf} \caption {\label{fig0} (a) shows the variation of electrostatic energy of bilayer phosphorene with different supercell sizes. $\alpha$ is the scaling factor. Blue and red curves represent the variation with scaling $\alpha \times \alpha \times \alpha$ and $\alpha \times \alpha \times 1.5\alpha$ respectively. In (b) the formation energies of negatively charged interstitial in bilayer phosphorene without and with correction for three different cell sizes are shown by blue circles and red diamonds and extrapolated to infinite limit. The formation energy of neutral interstitial are shown by green squares. } \end{figure} The defect CTL $\mathrm{\varepsilon}(\mathrm{q/q'})$ is defined as the Fermi--level position for which the formation energies of charge states $\mathrm{q}$ and $\mathrm{q'}$ are equal: \begin{align} \mathrm{\varepsilon}(\mathrm{q/q'}) =\frac{\mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{q}}](E_F=0) -\mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q'}}](E_F=0)}{\mathrm{q'-q}} \end{align} The CTL can be computed from formation energies within DFT. However, due to band gap underestimation within DFT and the fact that CTL involves change in electron number, significant error arises in the computed CTL. Within the combined DFT and GW approach, the CTL \cite{ctl} is written as: \begin{align} \mathrm{\varepsilon}(\mathrm{q/q'}) &= \frac{(\mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{q}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q}}]) + (\mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q'}}])}{\mathrm{q'-q}} \end{align} by adding and subtracting term $\mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_\mathrm{q}]$ in the numerator. If the charge states q and q' differ by $\pm 1$, the term $(\mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{q}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q}}])$ can be identified as the quasiparticle energy ($\mathrm{E}_{\mathrm{QP}}$) which is calculated using GW. This term accounts for an electron removal or addition to the system. The other term $(\mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q'}}])$ captures the relaxation energy ($\mathrm{E}_{\mathrm{relax}}$) of the structure due to the change in electron number and is calculated using DFT. Depending on the addition or removal of the electron (Eqn. 3), CTL can be calculated following different paths (Fig. 2). The parabolas in Fig. 2 represent the formation energies as a function of the generalized coordinates of the atoms in the cell. Along one path, we start with the defect in charge state q at its equilibrium coordinates , $\vec{\mathrm{R}}_\mathrm{q}$. The $\mathrm{E}_{\mathrm{QP}}$ is represented by the green vertical arrow, and $\mathrm{E}_{\mathrm{relax}}$ by the green curved arrow. The CTL can also be computed starting with the defect in charge state q', as shown by the red arrows. Since CTL is a thermodynamic quantity, the CTL computed using the two paths should be the same. Note that if the GW calculation is performed on charged defects the defect eigenvalues have to be corrected. We calculate the CTLs for interstitial in monolayer phosphorene following two paths \cite{gw_ctl} starting from neutral defect (q=0) and charged defect supercells (q'=+1 or --1). With the corrected quasiparticle values, the CTLs from different paths agree to within $\pm$ 100 meV. The details of the calculations are given in subsequent section. \begin{figure}[] \centering \includegraphics[scale=0.20]{figure2.pdf} \caption {The figure shows calculation of CTLs following different paths. The straight green and red arrows represent the quasiparticle energies calculated at the equilibrium structures of the defect with charge state q and q' respectively. The curved arrows account for relaxation energies. } \end{figure} \section{Defects in Monolayer Phosphorene} \subsection{Interstitial} \begin{figure} \centering \includegraphics[scale=0.9]{figure3.pdf} \caption {\label{fig2} (a) Top view and (b) side view of interstitial defect in monolayer phosphorene with defect wave function. The isosurface is plotted at the charge density value of 3.4$\times10^{-3}$ e/\AA{}$^{3}$. The insterstitial atom is shown in yellow color and the neighbor atoms are in red. (c) Spin polarized DOS of the interstitial in 3 charged states. VBM is set to zero and is shown in black dotted line. Fermi level is marked in maroon dashed line. Red and blue are for two spin states. (d) CTLs calculated within DFT and DFT+GW formalism. The dashed and solid lines represent the formation energies calculated with DFT and DFT+GW respectively and red, black and blue are used for +1, 0 and --1 charge states respectively. Formation energy of neutral defect remains same. The VBM and CBM are also marked in the figure. We have set the vacuum to zero in the plot. } \end{figure} The most stable structure of interstitial in monolayer phosphorene is when the interstitial atom forms two symmetric bonds with two phosphorus atoms in one of the sub-layer and resides above the layer (Fig. 3(a) and 3(b)). Formation of two bonds leaves the interstitial atom with a lone electron which can induce defect states. Spin--polarized calculations reveal two defect states in the band gap. The defect states are localized along one diagonal of the supercell centering the interstitial atom as is shown in the plot of wave function (Fig. 3(a) and 3(b)). One of the defect states is occupied in neutral state making interstitial to be stable in all three charge states (+1,0,--1). Fig 3(c) shows the density of states (DOS) for all the charge states. Due to the dispersion along the diagonal direction, the defect bands are broad. Upon accepting an electron, interstitial atom breaks the symmetry and the bonds become asymmetric. There is no significant relaxation when the defect is positively charged. In the negatively charged interstitial, the defect state appears flatter. This is due to the fact that the defect wave function is more localized. While the defect states are spin split in the neutral state, they become degenerate in both positively and negatively charged states as the electrons get paired in these states. The interstitial defect has low formation energy of 1.63 eV in neutral state. To obtain the formation energy in charged states, we evaluate the correction term ($E_{corr}$) using CoFFEE as detailed in section 2. The correction using model charge calculation is 0.295 eV. Taking the potential alignment into accout, $E_{corr}$ is calculated to be 0.30 eV and 0.26 eV for positively and negatively charged states respectively. The variation of formation energies of interstitial in charged states, as the Fermi energy is tuned, is shown in Fig. 3(d). Within DFT (red and blue dashed line), the defect changes its state from positive to neutral ($\varepsilon(+1/0)$) at 0.18 eV and from neutral to negative ($\varepsilon(0/-1)$) at 0.84 eV above VBM (Fig. 3(d)). As already mentioned, to get a better estimate of CTL we perform GW calculation on the neutral vacancy to obtain the quasiparticle energy and calculate formation energies within the combined formalism of DFT and GW. The solid red and blue line in Fig. 3(d) show the variation of formation energies of positively and negatively charged interstitial respectively within DFT + GW. The formation energy of neutral defect is same in DFT and DFT + GW. The DFT + GW CTLs $\varepsilon(+1/0)$ and $\varepsilon(0/-1)$ are at 0.96 eV and 1.48 eV above VBM respectively. In this DFT + GW calculation, the $E_{QP}$'s are calculated from the GW calculation of the ionization potential and electron affinity of neutral interstitial. CTLs can be also calculated starting from charged defects (Eqn. 3) \cite{gw_ctl} as described before. The CTLs from two paths and their constituent energies are reported in Table 1. To obtain $\varepsilon(+1/0)$, we calculate the electron affinity of positively charged interstitial within GW. In this case, the GW defect level also has to be corrected \cite{gw_ctl}. The correction for the defect levels is 0.59 eV \cite{coffee}. Following this path, $\varepsilon(+1/0)$ is calculated to be 1.00 eV. Similarly, starting from negatively charged interstitial and calculating ionization energy we obtain $\varepsilon(0/-1)$ to be 1.36 eV. The difference between the CTLs obtained from the neutral and charged cell calculations lie within the error of GW calculation (0.1 eV). As a result, the CTLs due to interstitial in monolayer phosphorene are deep in the gap. The presence of both $\varepsilon(+1/0)$ and $\varepsilon(0/-1)$ CTLs implies that interstitial in monolayer phosphorene can show both donor-- and acceptor--type behaviors. \begin{table}[] \caption{CTLs of interstitial along two different paths are reported. GW calculation on neutral defect is denoted by path 1 and path 2 represents calculations starting from charged defects. All the energies are reported in eV. E$_{QP}$ is quasiparticle energy and E$_{Relax}$ is the energy associated with relaxing the defect. The correction for the eigenvalue is given by $\epsilon_{corr}$.} \begin{tabular}{|c||c|c|c|c||c|c|c|c||c||c|} \hline & \multicolumn{4}{c||}{Path 1} & \multicolumn{4}{c||}{Path 2} & & \\ \hline & E$_{QP}$ & E$_{relax}$ & $\epsilon_{corr}$ & CTL & E$_{QP}$ & E$_{relax}$ & $\epsilon_{corr}$ & CTL & Avg. CTL & Difference \\ \hline +1/0 & 0.71 & 0.25 & 0.00 & 0.96 & 1.78 & -0.19 & -0.59& 1.00 & 0.98 & 0.04 \\ \hline 0/-1 & 1.75 & -0.27 & 0.00 & 1.48 & 0.46 & 0.31 & 0.59& 1.36 & 1.42 & 0.12 \\ \hline \end{tabular} \end{table} \subsection{Vacancy:} Upon removing one phosphorus atom from phosphorene, there are two possible mono--vacancy structures: MV-(55\textbar66) (Fig. 4(a) and 4(b)) and MV-(5\textbar9) (Fig. 4(c) and 4(d)) \cite{vac1}. MV-(55\textbar66) has a symmetric structure. In this structure, the atom closest to the vacancy is connected with 4 P atoms instead of the usual coordination of 3. In contrast, the closest atom to the vacancy in MV-(5\textbar9) moves and the system rearranges such that it bonds with 3 atoms. The formation energy of MV-(5\textbar9) is lower than that of MV-(55\textbar66) by 330 meV per defect. In order to estimate the barrier between the two structures, we perform a climbing image nudged elastic band (CI-NEB) calculation as implemented in PASTA package \cite{pasta}. Fig. 4(e) shows how the formation energy changes as MV-(55\textbar66) transforms to the more stable MV-(5\textbar9) structure. The energy barrier between the two structures is found to be only 5 meV. Due to this low barrier, we expect the defect to always be in the MV-(5\textbar9) structure. Hence, for all further calculations, we only consider the more stable structure, MV-(5\textbar9). \begin{figure} \centering \includegraphics[scale=0.8]{figure4.pdf} \caption {\label{fig1} (a) and (b) show the top and side view of MV-(55\textbar66) in 7$\times$5 supercell and defect wave function. (c) and (d) show MV-(5\textbar9) and the wave function localized at defect from top and side view respectively. The isosurface of wave functions is plotted at 3.4$\times10^{-3}$ e/\AA{}$^{3}$. The neighbour to the vacancy is shown in yellow and the other neighbour atoms are shown in red. (e) shows the variation of formation energy while the structure changes from MV-(55\textbar66) to MV-(5\textbar9). The reaction coordinate is the distance between two images in hyper-surface. (f) Spin--polarized DOS of vacancy in all 3 charge states. The red and blue lines denote two spin states. The VBM of the corresponding cells are set to zero and shown in black dotted lines. The maroon dashed lines are Fermi levels of the corresponding systems. (g) depicts the variation of formation energies with Fermi energy both within DFT and DFT+GW. The black line is for vacancy in neutral state and negatively charged vacancy is represented by the blue solid (DFT+GW) and dashed (DFT) lines. } \end{figure} We investigate the MV-(5\textbar9) vacancy in 3 charge states: neutral, positive and negative. We perform spin--polarized calculations. The neutral vacancy gives rise to an unoccupied flat band in the band gap. The DOS calculation (Fig. 4(f)) shows a state 0.23 eV above the VBM. We plot the corresponding wave function in Fig. 4(c) and 4(d). It is clear that the wave function of this site is localized around the vacancy along a diagonal of the supercell. We can understand the origin of this state as follows: a P atom neighbouring the vacancy forms two bonds and has a dangling bond which gives rise to the flat band in the gap. The filled defect state lies deep within the valence band and we found that the vacancy is not stable in positive charge state. The defect can accommodate an electron and change its state to negatively charged state. Upon accepting an electron, the system rearranges itself such that both the defect bands are in the band gap and they become degenerate (Fig. 4(f)). It is to be noted that MV-(55\textbar66) also induces defect states but those are within the valence band. These states hybridize with the valence band states making the defect always negatively charged. However, this configuration is always higher in energy than negatively charged MV-(5\textbar9). We calculate the formation energies of MV-(5\textbar9) in neutral and negatively charged states. In Fig. 4(g)) the black line represents the formation energy of neutral vacancy. The vacancy has a formation energy of 1.42 eV in the neutral state. Due to this low formation energy, vacancy defects are expected to be abundant in phosphorene \cite{bp_expt}. The variation of formation energy in negatively charged state with the Fermi energy is shown in Fig. 4(g) within DFT (blue dashed line) and DFT+GW (blue solid line). The CTL $\varepsilon(0/-1)$ is 0.62 eV above the VBM within DFT and 1.06 eV above the VBM within DFT + GW. This implies that vacancy in monolayer phosphorene behaves as deep acceptor. \section{Defects in Bilayer Phosphorene} \subsection{Interstitial} \begin{figure} \centering \includegraphics[scale=0.9]{figure5.pdf} \caption { \label{fig4} (a) and (b) are the top and side view of interstitial defect with the localized wave function in bilayer phosphorene. (c) Spin--polarized DOS of interstitial in bilayer phosphorene in positive, neutral and negative charged states. VBM are set to zero and the Fermi level are shown in maroon dashed line. Red and blue lines represent two spin states. (d) CTLs calculated within both DFT and DFT+GW. Solid lines denote the formation energies within DFT+GW and the dashed lines are used for DFT. Red, black and blue are for +1, 0 and --1 charge states. Vacuum is set to zero. } \end{figure} Interstitial in bilayer has a similar structure to that of interstitial in monolayer phosphorene (Fig. 5(a) and 5(b)). The interstitial atom prefers to bond with two atoms in the outer sub-layer of bilayer phosphorene facing vacuum. The configuration with the interstitial atom between the layers is higher in energy by 580 meV per defect. Like the monolayer, spin--polarized calculation on interstitial in bilayer shows that it also induces two defect states in the gap. One of the defect states is filled rendering interstitial to be possible in +1, 0, --1 charge states. DOS calculations on the three charge states reveal that while the defect states are non-degenerate in neutral state they become degenerate by accepting or donating an electron in charged states (Fig. 5(c)). In the neutral charge state, the formation energy is 1.45 eV which is lower than the corresponding defect in the monolayer. Fig. 5(d) shows the formation energies of interstitial in its three charge states +1, 0 and --1 within both DFT and DFT+GW. We find the +1 charged interstitial is always higher in energy when the Fermi energy is in band gap in DFT. In contrast, the interstitial is more stable in positively charged state within DFT+GW when Fermi level is below 0.43 eV with respect to VBM which marks the CTL $\varepsilon(+1/0)$. The CTL $\varepsilon(0/-1)$ is at 0.86 eV (0.33 eV) above VBM within DFT+GW (DFT). This suggests that the interstitial in bilayer can act as both donor-- and acceptor--type defect like the interstitial defect in monolayer. \subsection{Vacancy} \begin{figure}[h] \centering \includegraphics[scale=1.2]{figure6.pdf} \caption { \label{fig3} (a) and (b) show the top and side view of MV-(5\textbar9) in bilayer phosphorene. The defect wave function is plotted at isosurface value of 3.4$\times10^{-3}$ e/\AA{}$^{3}$. (c) and (d) show the band diagrams of the defect structure relaxed with PBE and HSE respectively. Red and blue lines denote two spin states. (e) is the formation energy plot of vacancy in neutral and negative state. } \end{figure} In bilayer phosphorene, the vacancy can reside in two inequivalent positions. In one configuration the vacancy faces the second layer while in the other it faces vacuum. We found the vacancy is most stable in MV-(5\textbar9) structure facing vacuum (Fig. 6(a) and 6(b)). Spin--polarized calculation within GGA-PBE on this structure does not show any distinct defect state in the band gap (Fig. 6(c)). This calculation suggests hybridization between defect state and states inside valence band edge. However, after a diagonal GW correction, a state emerges in the gap. This poses a problem to the diagonal GW approximation (Eqn. 4), in which the self--energy matrix element is computed using the DFT wave functions as: \begin{equation} \mathrm{E}^{\mathrm{QP}}_{\mathrm{i}} = \mathrm{E}^{\mathrm{DFT}}_{\mathrm{i}} + \langle\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\lvert\mathrm{\Sigma}_{\mathrm{GW}}(\{\mathrm{E}^{\mathrm{DFT}},\mathrm{\psi}^{\mathrm{DFT}}\};\mathrm{E}^{\mathrm{QP}})\lvert\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\rangle - \langle\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\lvert \mathrm{V}_{\mathrm{XC}}\lvert\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\rangle \end{equation} One way to overcome this problem is to perform self--consistent GW calculation. Another way is to choose a better mean--field. To address the issue we start with alternative mean--field. We use hybrid functional approximation (HSE) \cite{hse} for exchange--correlation which is an improvement over GGA. We relax the vacancy structure with HSE. For all further calculations, the total energies are calculated with HSE. The obtained band structure gives a distinct state in the band gap, however the state is very close to valence bands (Fig. 6(d)). Vacancy has a formation energy of 0.97 eV in neutral state. The calculated CTL $\varepsilon(0/-1)$ within HSE is at 0.34 above VBM (Fig. 6(e)). For GW calculation we choose a configuration such that the defect state is in the gap within HSE. As generating 4300 bands with HSE is computationally expensive and the quasiparticle energies depend weakly on the mean--field used, we generate the wave functions within PBE. The starting PBE defect wave function is localized at the defect site. While the defect state is also in the gap using PBE, because of its proximity to the VBM edge it is expected that the diagonal $G_0W_0$ approximation is not going to be adequate. We construct the GW Hamiltonian in the DFT wave function basis following Eqn. 5. \begin{equation} \mathrm{H}_{\mathrm{ij}} = \mathrm{E}^{\mathrm{DFT}}_{\mathrm{i}}\mathrm{\delta}_{\mathrm{ij}} + \langle\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\lvert\mathrm{\Sigma}_{\mathrm{GW}}(\{\mathrm{E}^{\mathrm{DFT}},\mathrm{\psi}^{\mathrm{DFT}}\};\mathrm{E}^{\mathrm{QP}})\lvert\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{j}\rangle - \langle\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{i}\lvert \mathrm{V}_{\mathrm{XC}}\lvert\mathrm{\psi}^{\mathrm{DFT}}_\mathrm{j}\rangle \end{equation} Due to computational cost, we restrict the construction of Hamiltonian matrix with wave functions with energy within $\pm$500 meV of the defect state as we are interested in the defect state and the states close to it. The self--energy matrix is evaluated within static--screening limit (static--COHSEX) \cite{gw_thry2} and we diagonalize the constructed Hamiltonian \cite{sc_gw}. The eigenfunctions of the Hamiltonian are the new wave functions with which we performed $G_1W_0$ calculation. It should be noted that in this way, the wave functions are iterated while the dielectric screening is still constructed from mean--field wave functions. The quasiparticle energies are obtained by evaluating the self--energy using the standard plasmon pole model. For the vacancy in bilayer, $G_0W_0$ calculation shows that there is mixing between the defect state and the valence bands close to it. After the first iteration with the updated wave functions, the quasiparticle energy of the defect state is 370 meV away from the VBM edge. Instead of calculating the CTL using the quasiparticle energy at the equilibrium structure, we can calculate that at any structure and adjust the relaxation energy accordingly (Fig. 7) \cite{gw_path}. We can denote an intermediate structure by $\vec{\mathrm{R}}_\mathrm{I}$ and rewrite the Eqn. (2) in following way: \begin{align} \mathrm{\varepsilon}(\mathrm{q/q'}) &= \frac{(\mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{q}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{I}}]) + (\mathrm{E}^\mathrm{f}_{\mathrm{q}}[\vec{\mathrm{R}}_{\mathrm{I}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{I}}]) + (\mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{I}}] - \mathrm{E}^\mathrm{f}_{\mathrm{q'}}[\vec{\mathrm{R}}_{\mathrm{q'}}])}{\mathrm{q'-q}} \\ &=\mathrm{E}_{\mathrm{relax,q}} + \mathrm{E}_{\mathrm{QP}} + \mathrm{E}_{\mathrm{relax,q'}} \end{align} \begin{figure}[] \centering \includegraphics[scale=0.20]{figure7.pdf} \caption {The figure shows calculation of CTL starting from an intermediate structure. The brown arrow represents the quasiparticle energy calculated at $\vec{\mathrm{R}}_\mathrm{I}$ and the curved blue arrows are the relaxation energy. } \end{figure} Fig. 7 shows two energy curves for two charge states of the defect. $\vec{\mathrm{R}}_\mathrm{I}$ is an intermediate structure at which the quasiparticle energy is calculated (brown straight arrow in Fig. 7). To obtain the CTL, the relaxation energies from the $\vec{\mathrm{R}}_\mathrm{I}$ to $\vec{\mathrm{R}}_\mathrm{q}$ and $\vec{\mathrm{R}}_\mathrm{q'}$ (blue curved arrows in Fig. 7) are taken into account. For the vacancy calculation in bilayer phosphorene, we adopt this scheme to calculate the CTL within DFT + GW. The intermediate structure is chosen as discussed above. We perform the GW calculation with the intermediate structure to get the quasiparticle energy ($\mathrm{E}_{\mathrm{QP}}$) and calculate the relaxation energy from that structure to equilibrium neutral and negatively charged structure as the vacancy is stable in neutral and negative state. Using this formalism (Eqn. (6)), the CTL $\varepsilon(0/-1)$ is found to be at 0.24 eV with respect to VBM within DFT + GW (Fig. 6(e)) which again implies that vacancy in bilayer phosphorene behaves like an acceptor. \section{Conclusion} We have extensively studied the formation and electronic properties of vacancy and self--interstitial defects in mono-- and bi--layer phosphorene. We have taken into account the spurious electrostatic correction while studying charged defects. The defects have formation energies between 0.9 eV -- 1.6 eV in neutral state. Depending on the charge state, these defects can further lower their formation energies. It has been also observed that the formation energy of defects in bilayer phosphorene is smaller than that in monolayer suggesting that with the increase of layer number formation energy decreases. We calculate the CTLs of the defects within DFT and DFT+GW formalism which suggest that while vacancy behaves as acceptor type defect, interstitial can act as both acceptor and donor type defect. \begin{acknowledgments} We thank the Supercomputer Education and Research Centre (SERC) at IISc for providing the computational resources. \end{acknowledgments}
\section{Introduction} Let $\Omega$ be a smooth bounded domain in ${\mathbb R}^n$, $n \geq 3$. For a positive $C^2$ function $u$ defined on an open subset of ${\mathbb R}^n$, let $A^u$ denote its conformal Hessian, namely \begin{equation}\label{conformal-Hessian} A^u = -\frac{2}{n-2} u^{-\frac{n+2}{n-2}}\,\nabla^2 u + \frac{2n}{(n-2)^2} u^{-\frac{2n}{n-2}} \nabla u \otimes \nabla u - \frac{2}{(n-2)^2}\,u^{-\frac{2n}{n-2}}\,|\nabla u|^2\,I, \end{equation} and let $\lambda(-A^u)$ denote the eigenvalues of $-A^u$. Note that $A^u$, considered as a $(0,2)$ tensor, is the Schouten curvature tensor of the metric $u^{\frac{4}{n-2}}\mathring{g}$ where $\mathring{g}$ is the Euclidean metric. For $1 \leq k \leq n$, let $\sigma_k: {\mathbb R}^n \rightarrow {\mathbb R}$ denote $k$-th elementary symmetric function \[ \sigma_k(\lambda)=\sum_{i_1<\ldots<i_k} \lambda_{i_1}\ldots\lambda_{i_k}, \] and let $\Gamma_k$ denote the cone $\Gamma_k=\{\lambda=(\lambda_1,\ldots,\lambda_n):\sigma_1(\lambda)>0,\ldots,\sigma_k(\lambda)>0\}$. In \cite[Theorem 1.1]{GonLiNg}, it was shown that the $\sigma_k$-Loewner-Nirenberg problem \begin{align} \sigma_k(\lambda(-A^u)) &= 2^{-k} \Big(\begin{array}{c}n\\k\end{array}\Big), \qquad \lambda(-A^u) \in \Gamma_k, \qquad u > 0 \qquad \text{ in } \Omega \label{Eq:X1},\\ u(x) &\rightarrow \infty \text{ as } \textrm{dist}(x,\partial\Omega) \rightarrow 0. \label{Eq:X1BC} \end{align} has a unique continuous viscosity solution $u$ and such $u$ belongs to $C^{0,1}_{\rm loc}(\Omega)$. Furthermore, $u$ satisfies \begin{equation} \lim_{d(x,\partial\Omega) \rightarrow 0} u(x) d(x,\partial\Omega)^{-\frac{n-2}{2}}= C(n,k) \in (0,\infty). \label{Eq:08IV20-E1} \end{equation} Equation \eqref{Eq:X1} is a fully nonlinear elliptic equation of the kind considered by Caffarelli, Nirenberg and Spruck \cite{C-N-S-Acta}. We recall the following definition of viscosity solutions which follows Li \cite[Definitions 1.1 and 1.1']{Li09-CPAM} (see also \cite{Li06-Arxivv2}) where viscosity solutions were first considered in the study of nonlinear Yamabe problems. Let \begin{align} \overline{S}_k &:= \Big\{\lambda \in\Gamma_k \big| \sigma_k(\lambda) \geq 2^{-k} \Big(\begin{array}{c}n\\k\end{array}\Big)\Big\}, \label{Eq:oSkDef}\\ \underline{S}_k &:= {\mathbb R}^n \setminus \Big\{\lambda \in \Gamma_k\Big| \sigma_k(\lambda) > 2^{-k} \Big(\begin{array}{c}n\\k\end{array}\Big)\Big\}. \label{Eq:uSkDef} \end{align} \begin{Def}\label{Def:ViscositySolution} Let $\Omega\subset\mathbb{R}^{n}$ be an open set and $1 \leq k \leq n$. We say that an upper semi-continuous (a lower semi-continuous) function $u: \Omega \rightarrow (0,\infty)$ is a sub-solution (super-solution) to \eqref{Eq:X1} in the viscosity sense, if for any $x_{0}\in\Omega$, $\varphi\in C^{2}(\Omega)$ satisfying $(u-\varphi)(x_{0})=0$ and $u-\varphi\leq0$ $(u-\varphi\geq0)$ near $x_{0}$, there holds \[ \lambda\big(-A^\varphi(x_{0})\big)\in \overline{S}_k \qquad \left(\lambda\big(-A^\varphi(x_{0})\big) \in \underline{S}_k, \text{respectively}\right). \] We say that a positive function $u \in C^0(\Omega)$ satisfies \eqref{Eq:X1} in the viscosity sense if it is both a sub- and a super-solution to \eqref{Eq:X1} in the viscosity sense. \end{Def} Equation \eqref{Eq:X1} satisfies the following comparison principle, which is a consequence of the principle of propagation of touching points \cite[Theorem 3.2]{LiNgWang}: If $v$ and $w$ are viscosity sub-solution and super-solution of \eqref{Eq:X1} and if $v \leq w$ near $\partial\Omega$, then $v \leq w$ in $\Omega$; see \cite[Proposition 2.2]{GonLiNg}. The above mentioned uniqueness result for \eqref{Eq:X1}-\eqref{Eq:X1BC} is a consequence of this comparison principle and the boundary estimate \eqref{Eq:08IV20-E1}. In the rest of this introduction, we assume that $\Omega$ is an annulus $\{a < |x|< b\} \subset {\mathbb R}^n$ with $0 < a < b < \infty$, unless otherwise stated. $C^2$ radially symmetric solutions to \eqref{Eq:X1} were classified by Chang, Han and Yang \cite[Theorems 1 and 2]{C-H-Y}. As a consequence, when $2 \leq k \leq n$, there is no $C^2$ radially symmetric function satisfying \eqref{Eq:X1}-\eqref{Eq:X1BC}. On the other hand, the aforementioned uniqueness result from \cite{GonLiNg, LiNgWang} implies that the solution $u$ to \eqref{Eq:X1}-\eqref{Eq:X1BC} is radially symmetric (since $u(R \cdot)$ is also a solution for any orthogonal matrix $R$). Therefore, \eqref{Eq:X1}-\eqref{Eq:X1BC} has no $C^2$ solutions. Our first result improves on the above non-existence of $C^2$ solutions to \eqref{Eq:X1}-\eqref{Eq:X1BC}. \begin{thm}\label{Thm:AnnularNoSub} Suppose that $n \geq 3$ and $\Omega$ is a non-empty open subset of ${\mathbb R}^n$. Then there exists no positive function $\underline{u} \in C^2(\Omega)$ such that $\lambda(-A^{\underline{u}}) \in \bar\Gamma_2$ in $\Omega$ and that $(\Omega, u^{\frac{4}{n-2}}\mathring{g})$ admits a smooth minimal immersion $f: \Sigma^{n-1} \rightarrow \Omega$ for some smooth compact manifold $\Sigma^{n-1}$. \end{thm} Theorem \ref{Thm:AnnularNoSub} bears some resemblance to a result of Schoen and Yau \cite{SchoenYau-AnnM79} on a relation between positive scalar curvature and stable minimal surfaces. Noting that when $u$ is radially symmetric, $\partial B_{r_0}$ is minimal with respect to $u^{\frac{4}{n-2}}\mathring{g}$ if and only if $\frac{d}{dr}\big|_{r = r_0} (r^{\frac{n-2}{2}} u(r)) = 0$, we obtain the following corollary with $r_0$ being a minimum point of $r^{\frac{n-2}{2}} u(r)$. \begin{cor} Suppose that $n \geq 3$. Let $\Omega = \{a < |x| < b\} \subset {\mathbb R}^n$ with $0 < a < b < \infty$ be an annulus. Then there exists no radially symmetric positive function $\underline{u} \in C^2(\Omega)$ such that $\lambda(-A^{\underline{u}}) \in \bar\Gamma_2$ in $\Omega$ and $u(x) \rightarrow \infty$ as $x \rightarrow \partial \Omega$. \end{cor} Our next result shows that the locally Lipschitz solution $u$ is not $C^1$. \begin{thm}\label{thm:MainLipNeg} Suppose that $n \geq 3$ and $2 \leq k \leq n$. Let $\Omega = \{a < |x| < b\} \subset {\mathbb R}^n$ with $0 < a < b < \infty$ be an annulus and $u$ be the unique locally Lipschitz viscosity solution to \eqref{Eq:X1}-\eqref{Eq:X1BC}. Then $u$ is radially symmetric, i.e. $u(x) = u(|x|)$, \begin{enumerate}[(i)] \item $u$ is smooth in each of $\{a < |x| < \sqrt{ab}\}$ and $\{\sqrt{ab} < |x| < b\}$, \item $u$ is $C^{1,\frac{1}{k}}$ but not $C^{1,\gamma}$ with $\gamma > \frac{1}{k}$ in each of $\{a < |x| \le \sqrt{ab}\}$ and $\{\sqrt{ab} \leq |x| < b\}$, \item and the first radial derivative $\partial_r u$ jumps across $\{|x| = \sqrt{ab}\}$: \[ \partial_r \ln u\big|_{r = \sqrt{ab}^-} = -\frac{n-2}{\sqrt{ab}} \text{ and } \partial_r \ln u\big|_{r = \sqrt{ab}^+} = 0. \] \end{enumerate} \end{thm} A related problem in manifold settings is to solve on a given closed Riemannian manifold $(M,g)$ the equation \begin{equation} \sigma_k\Big(\lambda\Big(-A_{u^{\frac{4}{n-2}}g}\Big)\Big) = 2^{-k} \Big(\begin{array}{c}n\\k\end{array}\Big), \quad \lambda\Big(-A_{u^{\frac{4}{n-2}}g}\Big) \in \Gamma_k, \quad u > 0 \quad \text{ in } M, \label{Eq:X1Mnfd} \end{equation} where $A_{u^{\frac{4}{n-2}}g}$ is the so-called Schouten tensor of the metric $u^{\frac{4}{n-2}}g$, \[ A_{u^{\frac{4}{n-2}}g} = -\frac{2}{n-2} u^{-1}\,\nabla_g^2 u + \frac{2n}{(n-2)^2} u^{-2} d u \otimes d u - \frac{2}{(n-2)^2}\,u^{-\frac{2n}{n-2}}\,|\nabla_g u|_g^2\,g + A_g, \] and where $\lambda\big(-A_{u^{\frac{4}{n-2}}g}\big)$ is the eigenvalue of $-A_{u^{\frac{4}{n-2}}g}$ with respect to the metric $u^{\frac{4}{n-2}}g$. Equations \eqref{Eq:X1} and \eqref{Eq:X1Mnfd} are fully non-linear and non-uniformly elliptic equations of Hessian type, usually referred to as the $\sigma_k$-Yamabe equation in the `negative case', which is a generalization of the Loewner-Nirenberg problem \cite{LoewnerNirenberg}. This equation and its variants have been studied in Chang, Han and Yang \cite{C-H-Y}, Gonzalez, Li and Nguyen \cite{GonLiNg}, Gurksy and Viaclovsky \cite{Gursky-Viaclovsky:negative-curvature}, Li and Sheng \cite{Li-Sheng:flow}, Guan \cite{Guan:negative-Ricci}, Gursky, Streets and Warren \cite{Gursky-Streets-Warren}, and Sui \cite{Sui}. For further studies on the counterpart of \eqref{Eq:X1} in the positive case, see \cite{CGY02-AnnM, GeWang06, GW03-IMRN, GV07, LiLi03,LiLi05, Li09-CPAM, LiNgPoorMan, STW07, TW09, Viac00-Duke} and the references therein. We observe the following result, which is essentially due to Gursky and Viaclovsky \cite{Gursky-Viaclovsky:negative-curvature}. We provide in the appendix the detail for the piece which is not directly available from \cite{Gursky-Viaclovsky:negative-curvature}. \begin{thm} \label{Thm:GV} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $(M^n,g)$ is a compact Riemannian manifold. If $\lambda(-A_g) \in \Gamma_k$ on $M$, then \eqref{Eq:X1Mnfd} has a Lipschitz viscosity solution. \end{thm} Here viscosity solution is defined analogously as in Definition \ref{Def:ViscositySolution}. \begin{Def}\label{Def:ViscositySolutionMnfd} Let $(M^n,g)$ be a Riemannian manifold, $1 \leq k \leq n$, and $\overline{S}_k$ and $\underline{S}_k$ be given by \eqref{Eq:oSkDef} and \eqref{Eq:uSkDef}. We say that an upper semi-continuous (a lower semi-continuous) function $u: M \rightarrow (0,\infty)$ is a sub-solution (super-solution) to \eqref{Eq:X1Mnfd} in the viscosity sense, if for any $x_{0}\in M$, $\varphi\in C^{2}(M)$ satisfying $(u-\varphi)(x_{0})=0$ and $u-\varphi\leq0$ $(u-\varphi\geq0)$ near $x_{0}$, there holds \[ \lambda\Big(-A_{\varphi^{\frac{4}{n-2}}g}(x_{0})\Big)\in \overline{S}_k \qquad \left(\lambda\Big(-A_{\varphi^{\frac{4}{n-2}}g}(x_{0})\Big) \in \underline{S}_k, \text{respectively}\right). \] We say that a positive function $u \in C^0(M)$ satisfies \eqref{Eq:X1Mnfd} in the viscosity sense if it is both a sub- and a super-solution to \eqref{Eq:X1Mnfd} in the viscosity sense. \end{Def} In both contexts, it is an interesting open problem to understand relevant conditions on $\Omega$, or on $(M,g)$, which would ensure that \eqref{Eq:X1}-\eqref{Eq:X1BC}, or \eqref{Eq:X1Mnfd} respectively, admits a smooth solution. We make the following conjecture. \begin{conj}\label{C:11IV20-C1} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $\Omega \subset {\mathbb R}^n$ is a bounded smooth domain. Then the locally Lipschitz viscosity solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} is smooth near $\partial\Omega$. \end{conj} Some further questions are in order. \begin{question}\label{Q:7IV20-QA} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $\Omega \subset {\mathbb R}^n$ is a bounded smooth domain. If \eqref{Eq:X1}-\eqref{Eq:X1BC} has a smooth sub-solution, must \eqref{Eq:X1}-\eqref{Eq:X1BC} have a smooth solution? \end{question} \begin{question} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $\Omega \subset {\mathbb R}^n$ is a smooth strictly convex (non-empty) domain. Is the locally Lipschitz viscosity solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} smooth? \end{question} If $\Omega$ is a ball, then the solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} is smooth and corresponds to the Poincar\'e metric. \begin{question}\label{Q:09IVQ1.9} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $\Omega = \Omega_2 \setminus \bar \Omega_1 \neq \emptyset$ where $\Omega_1 \Subset \Omega_2 \subset {\mathbb R}^n$ are smooth bounded strictly convex domains. Is the locally Lipschitz viscosity solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} $C^2$? \end{question} In the case $\Omega_1$ and $\Omega_2$ are balls, $\Omega = \Omega_2 \setminus \Omega_1$ is conformally equivalent to an annulus, and so, by Theorem \ref{thm:MainLipNeg}, the solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} is not $C^2$. We believe that the answer to the above question is negative. We indicate here how such statement may be proved. In view of Theorem \ref{Thm:AnnularNoSub}, it suffices to show that if $u$ is a $C^2$ solution to \eqref{Eq:X1}-\eqref{Eq:X1BC}, then $(\Omega, u^{\frac{4}{n-2}}\mathring{g})$ admits a smooth (immersed) minimal hypersurface. It is reasonable to expect, in view of known results in the case $k = 1$ (cf. \cite{Andersson-Chrusciel-Friedrich, Mazzeo:singular-Yamabe}) and estimate \eqref{Eq:08IV20-E1}, that \[ d(x,\partial\Omega)\Big|\nabla \big(u(x) d(x,\partial\Omega)^{\frac{n-2}{2}}\big)\Big| \rightarrow 0 \text{ as } d(x,\partial\Omega) \rightarrow 0. \] If the above estimate holds for $k \geq 2$, one has that, for small $\delta > 0$, the hypersurfaces $X_\delta = \{x \in \Omega: d(x,\partial\Omega) = \delta\}$ are strictly mean-convex with respect to $u^{\frac{4}{n-2}}\mathring{g}$ and the normal pointing toward the region enclosed between these two hypersurfaces. These hypersurfaces can be used as barriers to construct a desired minimal hypersurface, at least for $n \leq 7$. For example, in dimension $n = 3$, a result of Meeks and Yau \cite[Theorem 7]{Meeks-Yau-AnnM80} (see also \cite[Theorem 4.2]{Hass-Scott-TrAMS88}) implies that there exists a conformal map $f: {\mathbb S}^2 \rightarrow \Omega_\delta = \{x \in \Omega: d(x,\partial\Omega) > \delta\}$ which minimizes area among all homotopically nontrivial maps from ${\mathbb S}^2$ into $\Omega_\delta$ and either $f$ is a conformal embedding or a double covering map whose image is an embedded projective plane. Since all compact surfaces in ${\mathbb R}^3$ are orientable (see e.g. \cite{Samelson-ProcAMS69} or \cite[Corollary 3.46]{Hatcher}), $f$ is a conformal embedding and so $f({\mathbb S}^2)$ is an embedded minimal sphere in $(\Omega_\delta, u^4 \mathring{g})$. This will be followed up in a subsequent joint work with Jingang Xiong. \begin{question} Suppose that $n \geq 3$, $2 \leq k \leq n$, and $(M^n,g)$ is a Riemannian manifold such that $\lambda(-A_g) \in \Gamma_k$ on $M$. Does \eqref{Eq:X1Mnfd} have a unique Lipschitz viscosity solution? \end{question} It is clear that \eqref{Eq:X1Mnfd} has at most one $C^2$ solution by the maximum principle. In fact, if \eqref{Eq:X1Mnfd} has a $C^2$ solution, then that solution is also the unique continuous viscosity solution in view of the strong maximum principle \cite[Theorem 3.1]{CafLiNir11}. Equivalently, if \eqref{Eq:X1Mnfd} has two viscosity solutions, then it has no $C^2$ solution. \begin{question}\label{Q:1IV20-Q1} Suppose that $n \geq 3$ and $2 \leq k \leq n$. Does there exist a Riemannian manifold $(M^n,g)$ such that $\lambda(-A_g) \in \Gamma_k$ on $M$ and \eqref{Eq:X1Mnfd} has a Lipschitz viscosity solution which is not $C^2$? \end{question} Finally, we discuss the case where \eqref{Eq:X1BC} is replaced by finite constant boundary conditions \begin{equation} u|_{\{|x| = a\}} = {c_1} \text{ and }u|_{\{|x| = b\}} = {c_2}. \label{Eq:X1FiniteBC} \end{equation} We completely determine in the following theorem the regularity of the solution to \eqref{Eq:X1} and \eqref{Eq:X1FiniteBC} depending on whether $\ln \frac{b}{a}$ is larger, equal to, or smaller than $2T(a,b,{c_1},{c_2})$ where \begin{equation} T(a,b,{c_1},{c_2}) := \frac{1}{2}\int_{-|p_b - p_a|}^{0} \Big\{1 + e^{-2\eta - 2\max(p_a,p_b)}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta, \label{Eq:Tabcab} \end{equation} $p_a =- \frac{2}{n-2}\ln {c_1} - \ln a$ and $p_b =- \frac{2}{n-2}\ln {c_2} - \ln b$. \begin{thm}\label{thm:MainLipNegCab} Suppose that $n \geq 3$ and $2 \leq k \leq n$. Let $\Omega = \{a < |x| < b\} \subset {\mathbb R}^n$ with $0 < a < b < \infty$ be an annulus, and ${c_1}, {c_2}$ be two positive constants and let $T(a,b,{c_1},{c_2})$ be given by \eqref{Eq:Tabcab}. Then there exists a unique continuous viscosity solution to \eqref{Eq:X1} and \eqref{Eq:X1FiniteBC}. Furthermore, $u$ is radially symmetric, i.e. $u(x) = u(|x|)$, and exactly one of the following four alternatives holds. \begin{enumerate}[{Case} 1:] \item $\ln \frac{b}{a} < 2T(a,b,{c_1},{c_2})$, and $u$ is smooth in $\{a \leq |x| \leq b\}$, \item $\ln \frac{b}{a} = 2T(a,b,{c_1},{c_2})$, $b^{\frac{n-2}{2}}{c_2} < a^{\frac{n-2}{2}}{c_1}$, and $u$ is smooth in $\{a \leq |x| < b\}$, is $C^{1,\frac{1}{k}}$ but not $C^{1,\gamma}$ with $\gamma > \frac{1}{k}$ in $\{a \leq |x| \le b\}$, \item $\ln \frac{b}{a} = 2T(a,b,{c_1},{c_2})$, $b^{\frac{n-2}{2}}{c_2} > a^{\frac{n-2}{2}}{c_1}$, and $u$ is smooth in $\{a < |x| \leq b\}$, is $C^{1,\frac{1}{k}}$ but not $C^{1,\gamma}$ with $\gamma > \frac{1}{k}$ in $\{a \leq |x| \le b\}$, \item $\ln \frac{b}{a} > 2T(a,b,{c_1},{c_2})$, and there is some $m \in (a,b)$ such that \begin{enumerate}[(i)] \item $u$ is smooth in each of $\{a \leq |x| < m\}$ and $\{m < |x| \leq b\}$, \item $u$ is $C^{1,\frac{1}{k}}$ but not $C^{1,\gamma}$ with $\gamma > \frac{1}{k}$ in each of $\{a \leq |x| \le m\}$ and $\{m \leq |x| \leq b\}$, \item and the first radial derivative $\partial_r u$ jumps across $\{|x| = m\}$: \[ \partial_r \ln u\big|_{r = m^-} = -\frac{n-2}{m} \text{ and } \partial_r \ln u\big|_{r = m^+} = 0. \] \end{enumerate} \end{enumerate} \end{thm} Note that when $\ln \frac{b}{a} = 2T(a,b,{c_1},{c_2})$, we have in view of the definition of $T(a,b,{c_1},{c_2})$, $p_a$ and $p_b$ that $b^{\frac{n-2}{2}}{c_2} \neq a^{\frac{n-2}{2}}{c_1}$. \begin{rem}\label{Rmk:C1=>Smooth} It is clear from Theorem \ref{thm:MainLipNegCab} (in Cases 1--3) that if $u$ is a $C^1$ and radially symmetric solution to \eqref{Eq:X1} in the viscosity sense in some open annulus $\Omega$ then $u \in C^\infty(\Omega)$. \end{rem} \begin{rem} In Case 4, the exact value of $m$ is \[ m = \sqrt{ab} \exp\Big(\frac{1}{2}\int_{p_b- p}^{p_a - p} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta\Big) \] where $p$ is the solution to \begin{align*} \ln\frac{b}{a} &= \int_{p_b- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta\\ &\quad + \int_{p_a- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta. \end{align*} \end{rem} The following question is related to Question \ref{Q:7IV20-QA}. \begin{question} Suppose that $n \geq 3$, $2 \leq k \leq n$ and $\Omega = \{a < |x| < b\} \subset {\mathbb R}^n$ with $0 < a < b < \infty$. Does there exist constants ${c_1}, {c_2}$ with $\ln \frac{b}{a} > 2T(a,b,{c_1},{c_2})$ such that the problem \eqref{Eq:X1} and \eqref{Eq:X1FiniteBC} has a smooth sub-solution? \end{question} Recall that by Theorem \ref{thm:MainLipNegCab}, when $\ln \frac{b}{a} > 2T(a,b,{c_1},{c_2})$, the problem \eqref{Eq:X1} and \eqref{Eq:X1FiniteBC} has no smooth solution. For comparison, we recall here a result of Bo Guan \cite{Guan07-AJM} on the Dirichlet $\sigma_k$-Yamabe problem in the so-called positive case which states that the existence of a smooth sub-solution implies the existence of a smooth solution. We conclude the introduction with one more question. \begin{question} Let $n \geq 3$, $2 \leq k \leq n$ and $m \neq n-1$. Does there exist a smooth domain $\Omega \subset {\mathbb R}^n$ such that the locally Lipschitz solution to \eqref{Eq:X1}-\eqref{Eq:X1BC} is $C^2$ away from a set $\Sigma$ which has Hausdorff dimension $m$? \end{question} In Section \ref{Sec:Proofs}, we prove all the results above except Theorem \ref{Thm:GV}, whose proof is done in the appendix. Theorem \ref{Thm:AnnularNoSub} is proved first in Subsection \ref{ssec:ANS}. We then prove a lemma on the existence and uniqueness a non-standard boundary value problem for the ODE related to \eqref{Eq:X1} in Subsection \ref{ssec:lemma} and use it to prove Theorem \ref{thm:MainLipNeg} in Subsection \ref{ssec:Main} and Theorem \ref{thm:MainLipNegCab} in Subsection \ref{ssec:Cab}. \subsection*{Acknowledgment} The authors would like to thank Matt Gursky and Zheng-Chao Han for stimulating discussions. The authors are grateful to the referees for their very careful reading and useful comments. \section{Proofs}\label{Sec:Proofs} \subsection{Proof of Theorem \ref{Thm:AnnularNoSub}} \label{ssec:ANS} We will use the following lemma. \begin{lem}\label{Lem:08IV20-L1} For every symmetric $n \times n$ matrix $M$ with $\lambda(M) \in \bar\Gamma_2$ and every unit vector $m \in {\mathbb R}^n$, it holds \[ M_{ij}(\delta_{ij} - m_i m_j) \geq 0. \] \end{lem} \begin{proof} Using an orthogonal transformation, we may assume without loss of generality that $M$ is diagonal with diagonal entries $\lambda_1 \leq \lambda_2 \leq \ldots \leq \lambda_n$. Then $(\lambda_1, \ldots, \lambda_n) \in \bar\Gamma_2$. It is well known that this implies $\lambda_1 + \ldots + \lambda_{n-1} \geq 0$. Now as \[ M_{ij}(\delta_{ij} - m_i m_j) = \sum_{\ell = 1}^n \lambda_\ell - \sum_{\ell = 1}^n \lambda_\ell m_\ell^2 \geq \sum_{\ell = 1}^n \lambda_\ell - \lambda_n \sum_{\ell = 1}^n m_\ell^2 = \sum_{\ell = 1}^{n-1} \lambda_\ell, \] the conclusion follows. \end{proof} We will use the following result on the mean curvatures of an immersed hypersurface with respect to two conformal metrics. Let $\Omega \subset {\mathbb R}^n$ be an open set. Equip $\Omega$ with the Euclidean metric $\mathring{g}$ and a conformal metric $\mathring{g}_u := u^{\frac{4}{n-2}}\mathring{g}$ where $u$ is $C^2$. Let $f: \Sigma^{n-1} \rightarrow \Omega$ be a smooth immersion of a compact manifold $\Sigma^{n-1}$ into $\Omega$. Let $\tilde u = u \circ f$, $\tilde g = f^* \mathring{g}$. For every point $p \in \Sigma$, let $H_{\Sigma}(p)$ and $H_{\Sigma,u}(p)$ denote the mean curvature vectors associated to $f$ at $f(p)$ and with respect to $\mathring{g}$ and $\mathring{g}_u$, respectively. To dispel confusion, we note that, in our notation, the mean curvature is the trace of the second fundamental form. Note that if $\nu$ is a unit vector at $f(p)$ normal to the image of a small neighborhood of $p$, then \begin{equation} \partial_\nu u(f(p)) + \frac{n-2}{2(n-1)} \mathring{g}(H_\Sigma(p),\nu) u(f(p)) = \frac{n-2}{2(n-1)} \mathring{g}_u(H_{\Sigma,u}(p), u^{-\frac{2}{n-2}} \nu) u^{\frac{n}{n-2}}. \label{Eq:06IV20-X1} \end{equation} \begin{lem}\label{Lem:08IV20-L2} Let $\Omega$ be an open subset of ${\mathbb R}^n$, $n \geq 3$, and $f:\Sigma^{n-1} \rightarrow \Omega$ be a smooth immersion. If $u \in C^2(\Omega)$ satisfies $\lambda(-A^u) \in \bar\Gamma_2$ in $\Omega$, then \[ \Delta_{\tilde g} \tilde u + \frac{n-2}{4(n-1)} |H_{\Sigma,u}|_{\mathring{g}_u}^2 \tilde u^{\frac{n+2}{n-2}} - \frac{n-2}{4(n-1)} |H_\Sigma|_{\mathring{g}}^2 \tilde u - \frac{1}{(n-2) \tilde u}\,|\nabla_{\tilde g} \tilde u|^2 \geq 0 \text{ on } \Sigma. \] \end{lem} \begin{proof} Fix some $p \in \Sigma^{n-1}$ and let $\nu$ be a unit vector at $f(p)$ normal to the image of a small neighborhood of $p$,. Recall that \[ A^u = -\frac{2}{n-2} u^{-\frac{n+2}{n-2}}\Big[\nabla^2 u - \frac{n}{(n-2)u} \nabla u \otimes \nabla u + \frac{1}{n-2} |\nabla u|^2\,I\Big]. \] Applying Lemma \ref{Lem:08IV20-L1} with $M = - \frac{n-2}{2} u^{\frac{n+2}{n-2}}A^u(f(p))$ and $m = \nu$ yields \[ 0 \leq \nabla_i\,\nabla_j u\,\big(\delta_{ji} - \nu_i \nu_j\big) - \frac{1}{(n-2)u} \,|\nabla u|^2 + \frac{n}{(n-2)u} \,|\partial_\nu u|^2. \] This means \[ 0 \leq \Delta_{\tilde g} \tilde u + \mathring{g}(H_\Sigma, \nu) \partial_\nu u \circ f + \frac{n-1}{(n-2)\tilde u} \,|\partial_\nu u \circ f|^2 - \frac{1}{(n-2)\tilde u}\,|\nabla_{\tilde g} \tilde u|^2 \text{ on } \Sigma. \] Using \eqref{Eq:06IV20-X1} yields the conclusion. \end{proof} \begin{proof}[Proof of Theorem \ref{Thm:AnnularNoSub}] Suppose by contradiction that $u \in C^2(\Omega)$ is such that $\lambda(-A^u) \in \bar\Gamma_2$ in $\Omega$ and $(\Omega, u^{\frac{4}{n-2}} \mathring{g})$ admits a smooth minimal immersion $f: \Sigma^{n-1} \rightarrow \Omega$ for some smooth compact manifold $\Sigma^{n-1}$. Here we have renamed $\underline{u}$ in the statement of the theorem as $u$ for notational convenience. Let $\nu$ denote a continuous unit normal along $\Sigma$. By Lemma \ref{Lem:08IV20-L2}, we have \begin{align*} \Delta_{\tilde g} \tilde u - \frac{n-2}{4(n-1)} |H_\Sigma|_{\mathring{g}}^2 \tilde u - \frac{1}{(n-2) \tilde u}\,|\nabla_{\tilde g} \tilde u|^2 \geq 0 \text{ on } \Sigma. \end{align*} Integrating over $\Sigma$, we thus have that $H_\Sigma \equiv 0$ and $\tilde u \equiv \textrm{const}$ on $\Sigma$. In particular, $f: \Sigma^{n-1} \rightarrow \Omega$ is a minimal immersion with respect to $\mathring{g}$. This is impossible as there is no smooth minimal immersion in ${\mathbb R}^n$ with codimension one. \end{proof} \subsection{Preliminary ODE analysis} By the uniqueness result in \cite{GonLiNg, LiNgWang}, the solutions $u$ in Theorems \ref{thm:MainLipNeg} and \ref{thm:MainLipNegCab} are radially symmetric, $u(x) = u(r)$ where $r = |x|$. As in \cite{C-H-Y, Viac00-Duke}, we work on a round cylinder instead of ${\mathbb R}^n$. Namely, let \[ t = \ln r - \frac{1}{2} \ln(ab), \qquad \xi(t) = -\frac{2}{n-2}\ln u(r) - \ln r \] so that $u^{\frac{4}{n-2}}\mathring{g} = e^{-2\xi} (dt^2 + g_{\mathbb{S}^{n-1}})$. A direct computation gives that, at points where $u$ is twice differentiable, \begin{equation} \sigma_k(\lambda(-A^u)) = \frac{(-1)^k}{2^{k-1}}\,\Big(\begin{array}{c} n-1\\ k-1\end{array}\Big)\,e^{2k\xi}(1 - |\xi'|^2)^{k-1}[\xi'' + \frac{n-2k}{2k}(1-|\xi'|^2)], \label{Eq:sigmakExpr} \end{equation} where here and below $'$ denotes differentiation with respect to $t$. Note that, for $k \geq 2$, at points where $u$ is twice differentiable, $\lambda(-A^u) \in \Gamma_k$ if and only if $\sigma_k(\lambda(-A^u)) > 0$ and $|\xi'| > 1$. Indeed, if $\sigma_k(\lambda(-A^u)) > 0$ and $|\xi'| > 1$, then \eqref{Eq:sigmakExpr} implies $\sigma_i(\lambda(-A^u)) > 0$ for $1 \leq i \leq k$ and so $\lambda(-A^u) \in \Gamma_k$. Conversely, if $\lambda(-A^u) \in \Gamma_k$ for some $k \geq 2$, then $\sigma_1(\lambda(-A^u)) > 0$, $\sigma_2(\lambda(-A^u)) > 0$ and $\sigma_k(\lambda(-A^u)) > 0$. Using \eqref{Eq:sigmakExpr}, we see that the first two inequalities imply $|\xi'| > 1$. By the same reasoning, we have, at points where $u$ is twice differentiable, if $\lambda(-A^u) \in \bar\Gamma_2$, then $|\xi'| \geq 1$. We are thus led to study the differential equation \begin{equation} e^{2k\xi}(1 - |\xi'|^2)^{k-1}[\xi'' + \frac{n-2k}{2k}(1-|\xi'|^2)] = \frac{(-1)^k n}{2k}. \label{Eq:xieq1} \end{equation} under the constraint that $|\xi'| > 1$. It is well known (see \cite{C-H-Y, Viac00-Duke}) that \eqref{Eq:xieq1} has a first integral, namely \[ H(\xi,\xi') := e^{(2k-n)\xi}(1 - |\xi'|^2)^k - (-1)^k e^{-n\xi} \text{ is (locally) constant along $C^2$ solutions.} \] A plot of the contours of $H$ for $k = 2, n = 7$ is provided in Figure \ref{Fig1}. See \cite{C-H-Y} for a more complete catalog. \begin{figure}[h] \begin{center} \includegraphics[scale=0.4]{PhasePortrait.eps} \end{center} \caption{The contours of $H$ for $k = 2$, $n = 7$. Each radially symmetric viscosity solution to \eqref{Eq:X1} lies on a single contour of $H$ but avoid the shaded region, i.e. the dotted parts of the contours of $H$ are excluded. Every smooth solution stays on one side of the shaded region. Every non-smooth solution jumps (on one contour) from the part below the shaded region to the part above the shaded region at a single non-differentiable point.} \label{Fig1} \end{figure} Before moving on with the proofs of our results, we note the following statement. \begin{rem} As a consequence of Theorem \ref{thm:MainLipNegCab}, we have in fact that $H(\xi,\xi')$ is (locally) constant along viscosity solutions. \end{rem} \begin{proof} Fix $\tilde a < \tilde b$ in the domain of $u$ and apply Theorem \ref{thm:MainLipNegCab} relative to the interval $[\tilde a,\tilde b]$ with $c_1 = u(\tilde a)$ and $c_2 = u(\tilde b)$. If we are in cases 1--3, $u$ is $C^2(\tilde a,\tilde b)$ and so $H(\xi,\xi')$ is constant in $\{\tilde a < r < \tilde b\}$. Suppose we are in case 4. We have that $u$ is $C^2$ in $(\tilde a,m) \cup (m,\tilde b)$ for some $m$ and so $H(\xi,\xi')$ is constant in each of $\{\tilde a < r < m\}$ and $\{m < r < \tilde b\}$. Also, as $u$ is $C^1$ in each of $(\tilde a,m]$ and $[m,\tilde b)$, we have by assertion (iii) in case 4 that \[ \lim_{r \rightarrow m^-} H(\xi(t),\xi'(t)) = H(\xi(t(m)),1) = H(\xi(t(m)),-1) = \lim_{r \rightarrow m^+} H(\xi(t),\xi'(t)). \] Hence $H(\xi,\xi')$ is also constant in $\{\tilde a < r < \tilde b\}$. \end{proof} \subsection{A lemma} \label{ssec:lemma} \begin{lem}\label{Lem:KeyLem} For any $T > 0$, there exists a unique classical solution $\xi \in C^\infty(0,T) \cap C^{1,\frac{1}{k}}_{\rm loc}([0,T))$ to \eqref{Eq:xieq1} in $(0,T)$ such that \begin{align} &\lim_{t \rightarrow T^-} \xi(t) = -\infty, \label{Eq:xieq2}\\ &\xi'(0) = -1,\quad \xi'(t) < -1 \text{ in } (0,T). \label{Eq:xieq3} \end{align} Furthermore, for every $\gamma \in (\frac{1}{k}, 1]$, $\xi \notin C^{1,\gamma}_{\rm loc}([0,T))$. \end{lem} \begin{proof} We use ideas from \cite{C-H-Y}. \medskip \noindent {\it Step 1:} We start by collecting relevant facts from \cite{C-H-Y} about the classical solution $\xi_{p,q}$ to \eqref{Eq:xieq1} satisfying the initial condition $\xi_{p,q}(0) = p$ and $\xi_{p,q}'(0) = q$ for $p \in {\mathbb R},q \in (-\infty,-1)$ on its maximal interval of unique existence $I_{p,q} = (\underline{T}_{p,q}, \overline{T}_{p,q}) \subset {\mathbb R}$. Note that, since $\xi_{p,q}'(0) = q < -1$, it follows from \eqref{Eq:xieq1} that, for as long as $\xi_{p,q}$ remains $C^2$, $\xi_{p,q}' < -1$. Thus, as $H(\xi_{p,q}, \xi_{p,q}') = H(p,q)$, we have in $I_{p,q}$ that \begin{equation} \xi_{p,q}' = -\Big\{1 + e^{-2\xi_{p,q}}\big[1 + (-1)^k H(p,q)e^{n\xi_{p,q}}\big]^{1/k}\Big\}^{1/2}. \label{Eq:xipq'} \end{equation} By \cite{C-H-Y}(Theorem 1, Cases II.2 and II.3 for even $k$ and Theorem 2, Cases II.2 and II.3 for odd $k$), we have that $\overline{T}_{p,q}$ is finite (corresponding to $r_+$ being finite in the notation of \cite{C-H-Y}). Furthermore, \begin{equation} \lim_{t \rightarrow \overline{T}_{p,q}^-} \xi_{p,q}(t) = -\infty. \label{Eq:oTend} \end{equation} By \eqref{Eq:xipq'} we thus have \begin{equation} \overline{T}_{p,q} = \int_{-\infty}^{p} \Big\{1 + e^{-2\xi}\big[1 - |H(p,q)| e^{n\xi}\big]^{1/k}\Big\}^{-1/2}\,d\xi. \label{Eq:oTpqExpr} \end{equation} In this proof, we will only need to consider the case that $(-1)^k H(p,q) < 0$. Then by \cite{C-H-Y}(Theorem 1, Case II.2 for even $k$ and Theorem 2, Case II.2 for odd $k$), we have that $\underline{T}_{p,q}$ is also finite (corresponding to $r_-$ being finite in the notation of \cite{C-H-Y}) and \begin{equation} \lim_{t \rightarrow \underline{T}_{p,q}^+} \xi_{p,q}(t) \text{ is finite}, \quad \lim_{t \rightarrow \underline{T}_{p,q}^+} \xi_{p,q}'(t) = -1, \text{ and } \lim_{t \rightarrow \underline{T}_{p,q}^+} \xi_{p,q}''(t) = -\infty. \label{Eq:lTend} \end{equation} Using \eqref{Eq:lTend} as well as the fact that $H(\xi_{p,q}, \xi_{p,q}') = H(p,q)$ and $\xi_{p,q}$ is decreasing, we have in $I_{p,q}$ that \begin{equation} \xi_{p,q} < \lim_{t \rightarrow \underline{T}_{p,q}^+} \xi_{p,q}(t) = -\frac{1}{n} \ln |H(p,q)| . \label{Eq:09I20-LVal} \end{equation} Differentiating \eqref{Eq:xipq'}, we see that, as $t \rightarrow \underline{T}_{p,q}^+$, \[ \lim_{t \rightarrow \underline{T}_{p,q}^+} (t - \underline{T}_{p,q})^{\frac{k-1}{k}}\xi_{p,q}''(t) \text{ exists and belongs to } (-\infty,0). \] Thus $\xi_{p,q}$ extends to a $C^{1,\frac{1}{k}}$ function in a neighborhood of $\underline{T}_{p,q}$ and $\xi_{p,q}$ does not extend to a $C^{1,\gamma}$ function in any neighborhood of $\underline{T}_{p,q}$. Before moving on to the next stage, we note that, in view of \eqref{Eq:xipq'}, \begin{align} \overline{T}_{p,q} - \underline{T}_{p,q} &= \int_{-\infty}^{-\frac{1}{n} \ln |H(p,q)| } \Big\{1 + e^{-2\xi}\big[1 - |H(p,q)| e^{n\xi}\big]^{1/k}\Big\}^{-1/2}\,d\xi\nonumber\\ &= \int_{-\infty}^{0} \Big\{1 + |H(p,q)|^{\frac{2}{n}} e^{-2\eta }\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta. \label{Eq:LengthIpq} \end{align} In particular, then length of $I_{p,q}$ depends only on $n$, $k$ and the value of $H(p,q)$, rather than $p$ and $q$ themselves. \bigskip \noindent{\it Step 2:} We now define for each given $p \in {\mathbb R}$ a unique classical solution $\xi_p$ to \eqref{Eq:xieq1} in some maximal interval $(0,T_p)$ satisfying $\xi_p(0) = p, \xi_p'(0) = -1$ and $\xi_p' < -1$ in $(0,T_p)$. It is clear that $(-1)^k H(p,-1) = -e^{-np} < 0$, and as $\partial_p H(p,-1) = (-1)^k n e^{-np} \neq 0$. By the implicit function theorem, there exist $\tilde p$ and $\tilde q < -1$ such that $H(\tilde p, \tilde q) = H(p,-1)$. Note that this implies \[ -e^{-np} = (-1)^k H(\tilde p, \tilde q) > -e^{-n\tilde p} \text{ and so } \tilde p < p. \] Let \[ \xi_p(t) = \xi_{\tilde p, \tilde q}(t + \underline{T}_{\tilde p, \tilde q}) \text{ and } T_p = \overline{T}_{\tilde p, \tilde q} - \underline{T}_{\tilde p, \tilde q}. \] By Step 1, it is readily seen that $\xi_p$ is smooth in $(0,T_p)$, belongs to $C^{1,\frac{1}{k}}_{\rm loc}([0,T_p))$ and no $C^{1,\gamma}_{\rm loc}([0,T_p))$ with $\gamma > \frac{1}{k}$, satisfies \eqref{Eq:xieq1} and $\xi_p' < -1$ in $(0,T_p)$, \begin{align} &\lim_{t \rightarrow T_p^-} \xi_{p}(t) = -\infty, \label{Eq:Tpend}\\ &\xi_p(0) = -\frac{1}{n}\ln|H(\tilde p, \tilde q)| = p, \quad \xi_p'(0) = -1, \label{Eq:0enda}\\ &0 > \xi_{p,q}''(t) = O(t^{-\frac{k-1}{k}}) \text{ as } t \rightarrow 0^+, \label{Eq:0endb}\\ &\text{ and } T_p = \int_{-\infty}^{0} \Big\{1 + e^{-2\eta - 2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta. \label{Eq:TpInt} \end{align} We claim that $\xi_p$ is unique in the sense that if $\hat \xi_p \in C^2(0,\hat T_p) \cap C^1([0,\hat T_p))$ is a solution to \eqref{Eq:xieq1} in some maximal interval $(0,\hat T_p)$ satisfying $\hat\xi_p(0) = p, \hat\xi_p'(0) = -1$ and $\hat\xi_p' < -1$ in $(0,\hat T_p)$, then $T_p = \hat T_p$ and $\xi_p \equiv \hat \xi_p$. To see this, note that, $\hat \xi_p(t) = \xi_{\hat \xi_p(s),\hat\xi_p'(s)}(t - s)$ for all $t, s \in (0,\hat T_p)$, since they both satisfy the same ODE in $t$ and agree up to first derivatives at $t = s$. By Step 1, $\hat\xi_p(t) \rightarrow -\infty$ as $t \rightarrow \hat T_p^{-}$, and so, as $\tilde p < p$ and $\hat \xi_p(0) = p$, there exists $t_0 \in (0,\hat T_p)$ such that $\hat \xi_p(t_0) = \tilde p$. This implies that $H(\tilde p, \hat\xi_p'(t_0)) = H(\hat\xi_p,\hat\xi_p') = H(p,-1) = H(\tilde p, \tilde q)$ and so $\hat \xi_p'(t_0) = \tilde q$. We deduce that $t_0 = - \underline{T}_{\tilde p, \tilde q}$, $\hat T_p = T_p$ and $\hat \xi_p \equiv \xi_{\tilde p,\tilde q}(\cdot - t_0) \equiv \xi_p$, as claimed. \bigskip \noindent{\it Step 3:} From \eqref{Eq:TpInt}, we see that, as a function of $p$, $T_p$ is continuous and increasing and satisfies \[ \lim_{p \rightarrow - \infty} T_p = 0 \text{ and } \lim_{p \rightarrow \infty} T_p = \infty. \] Thus, for any given $T > 0$, there is a unique $p(T)$ such that $T_{p(T)} = T$. The solution $\xi_{p(T)}$ to \eqref{Eq:xieq1} gives the desired solution. \end{proof} \subsection{Proof of Theorem \ref{thm:MainLipNeg}} \label{ssec:Main} Let $T = \frac{1}{2}\ln \frac{b}{a}$ and $t = \ln r - \frac{1}{2}\ln(ab)$. We need to exhibit a function $\xi: (-T, T) \rightarrow {\mathbb R}$ such that $\xi$ is smooth in each of $(0,T)$ and $(-T, 0)$, is $C^{1,\frac{1}{k}}_{\rm loc}$ but not $C^{1,\gamma}_{\rm loc}$ for any $\gamma > \frac{1}{k}$ in each of $[0,T)$ and $(-T,0]$, the function $u$ defined by \[ u(r) = \exp\Big[-\frac{n-2}{2}\Big(\xi(t) + \ln r\Big)\Big] \] solves \eqref{Eq:X1}-\eqref{Eq:X1BC} in $\{a < r = |x| < b\}$ in the viscosity sense, and \begin{enumerate}[(i)] \item $\lim_{t \rightarrow \pm T} \xi(t) = -\infty$, \item $\xi'(0^-) = 1$, $\xi'(0^+) = -1$, \item and $|\xi'| > 1$ in $(-T,0) \cup (0,T)$. \end{enumerate} Indeed, let $\xi^T:[0,T) \rightarrow {\mathbb R}$ be the solution obtained in Lemma \ref{Lem:KeyLem}, and define \[ \xi(t) = \left\{\begin{array}{ll} \xi^T(t) & \text{ if } 0 \leq t < T,\\ \xi^T(-t) & \text{ if } -T < t < 0. \end{array}\right. \] It is clear that $\xi$ satisfies all the listed requirements except for the statement that $u$ satisfies \eqref{Eq:X1} in the viscosity sense at $r = \sqrt{ab}$. It remains to demonstrate, for any given $x_0$ with $|x_0| = \sqrt{ab}$, that \begin{enumerate}[(a)] \item if $\varphi$ is $C^2$ near $x_0$ and satisfies $\varphi \geq u$ near $x_0$ and $\varphi(x_0) = u(x_0)$, then $\lambda(-A^\varphi(x_0)) \in \Gamma_k$ and $\sigma_k(\lambda(-A^\varphi(x_0))) \geq 2^{-k} \big(\begin{array}{c}n\\k\end{array}\big)$, \item and if $\varphi$ is $C^2$ near $x_0$ and satisfies $\varphi \leq u$ near $x_0$ and $\varphi(x_0) = u(x_0)$, then either $\lambda(-A^\varphi(x_0)) \notin \Gamma_k$ or $\lambda(-A^\varphi(x_0)) \in \Gamma_k$ but $\sigma_k(\lambda(-A^\varphi(x_0))) \leq 2^{-k} \big(\begin{array}{c}n\\k\end{array}\big)$. \end{enumerate} Without loss of generality, we may assume that $x_0 = (\sqrt{ab}, 0, \ldots, 0)$. Since $\partial_r \ln u|_{r = \sqrt{ab}^-} = -\frac{n-2}{\sqrt{ab}}< 0= \partial_r \ln u|_{r = \sqrt{ab}^+}$, there is no $C^2$ function $\varphi$ such that $\varphi \geq u$ near $x_0$ and $\varphi(x_0) = u(x_0)$. Therefore (a) holds. Suppose now that $\varphi$ is a $C^2$ function such that $\varphi \leq u$ near $x_0$ and $\varphi(x_0) = u(x_0)$. As $u$ is radial, this implies that \begin{align} -\frac{n-2}{\sqrt{ab}} &= \partial_{x_1} \ln u|_{r = \sqrt{ab}^-} \leq \partial_{x_1} \ln \varphi (x_0) \leq \partial_{x_1} \ln u|_{r = \sqrt{ab}^+} = 0, \label{Eq:Y1}\\ \partial_{x_2} \ln \varphi (x_0) &= \ldots = \partial_{x_n} \ln \varphi (x_0) = 0, \label{Eq:Y2}\\ \Big(\partial_{x_i}\partial_{x_j} \varphi(x_0) &- \frac{1}{\sqrt{ab}} \partial_{x_1}\varphi(x_0) \delta_{ij}\Big)_{2 \leq i,j \leq n} \leq 0. \label{Eq:Y3} \end{align} (For \eqref{Eq:Y3}, note that the matrix on the left hand side is the Hessian of $\varphi|_{\partial B_{\sqrt{ab}}}$ with respect to the metric induced on $\partial B_{\sqrt{ab}}$ by the Euclidean metric.) Now define $\bar \varphi(x) = \bar \varphi(|x|) = \varphi(|x|,0, \ldots, 0)$, $t = \ln r - \frac{1}{2} \ln(ab)$ and $\bar \xi(t) = -\frac{2}{n-2}\ln \bar\varphi(r) - \ln r$. By \eqref{Eq:Y1}, we have that $|\frac{d\bar\xi}{dt}(0)|\leq 1$ and so $\lambda(-A^{\bar\varphi}(x_0)) \notin \Gamma_k$. Let $O$ denote the diagonal matrix with diagonal entries $1, -1, \ldots, -1$. Note that, in block form, \[ \nabla^2 \varphi(x_0) + O^t \nabla^2 \varphi(x_0)O = 2\left(\begin{array}{c|c} \partial_{x_1}^2 \varphi(x_0) & 0\\ \hline 0& \big(\partial_{x_i}\partial_{x_j} \varphi(x_0) \big)_{2 \leq i,j \leq n} \end{array}\right). \] Thus, by \eqref{Eq:Y3}, \[ \nabla^2 \varphi(x_0) + O^t \nabla^2 \varphi(x_0)O \leq 2\left(\begin{array}{c|c} \partial_{x_1}^2 \varphi(x_0) & 0\\ \hline 0& \frac{1}{\sqrt{ab}} \partial_{x_1} \varphi(x_0) (\delta_{ij})_{2 \leq i,j \leq n} \end{array}\right) = 2\nabla^2 \bar\varphi(x_0). \] Also, $\varphi(x_0) = \bar\varphi(x_0)$ and, in view of \eqref{Eq:Y2}, $\nabla\varphi(x_0) = \nabla\bar\varphi(x_0)$. Hence \[ -A^{\varphi}(x_0) - O^tA^{\varphi}(x_0)O \leq - 2A^{\bar\varphi}(x_0). \] As $\lambda(-A^{\bar\varphi}(x_0)) \notin \Gamma_k$, it follows that $\lambda(-A^{\varphi}(x_0)- O^tA^{\varphi}(x_0)O) \notin\Gamma_k$. Since the set of matrices with eigenvalues belonging to $\Gamma_k$ is a convex cone (see e.g. \cite[Lemma B.1]{LiNgGreen}), we thus have that $\lambda(-A^{\varphi}(x_0)) \notin\Gamma_k$ or $\lambda(- O^tA^{\varphi}(x_0)O) \notin\Gamma_k$. Since $O$ is orthogonal, we deduce that $\lambda(-A^{\varphi}(x_0)) \notin\Gamma_k$. We have verified (b) and thus completed the proof.\hfill$\Box$ \subsection{Proof of Theorem \ref{thm:MainLipNegCab}} \label{ssec:Cab} As mentioned before, the uniqueness of solution follows from \cite{GonLiNg, LiNgWang}. We proceed to construct a radially symmetric solution with the indicated properties. Let $T = \frac{1}{2}\ln \frac{b}{a}$, $p_a = -\frac{2}{n-2}\ln {c_1} - \ln a$ and $p_b = -\frac{2}{n-2}\ln {c_2} - \ln b$. We will only consider the case that $p_a \geq p_b$ (which is equivalent to $b^{\frac{n-2}{2}}{c_2} \geq a^{\frac{n-2}{2}}{c_1}$). (The case $p_a < p_b$ can be treated using an inversion about $|x| = \sqrt{ab}$.) We then have \begin{align*} T(a,b,{c_1},{c_2}) &=\frac{1}{2}\int_{p_b- p_a}^{0} \Big\{1 + e^{-2\eta-2p_a}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta\\ &=\frac{1}{2}\int_{p_b}^{p_a} \Big\{1 + e^{-2\xi}\big[1 - e^{n(\xi - p_a)}\big]^{1/k}\Big\}^{-1/2}\,d\xi \end{align*} \noindent(i) Suppose that $T < T(a,b,{c_1},{c_2})$. We show that Case 1 holds. \medskip Note that $H(p_a,-1) = -(-1)^k e^{-np_a}$. Thus as $T < T(a,b,{c_1},{c_2})$ and $(-1)^kH(p_a,\cdot)$ is decreasing in $(-\infty,-1)$, we can find $q_a < -1$ such that \begin{equation} T = \frac{1}{2}\int_{p_b}^{p_a} \Big\{1 + e^{-2\xi}\big[1 + (-1)^k H(p_a,q_a) e^{n\xi}\big]^{1/k}\Big\}^{-1/2}\,d\xi. \label{Eq:qaDef} \end{equation} Recall the solution $\xi_{p_a,q_a}$ to \eqref{Eq:xieq1} considered in the proof of Lemma \ref{Lem:KeyLem}. By \eqref{Eq:oTpqExpr}, we have that $2T < \overline{T}_{p_a,q_a}$. We then deduce from \eqref{Eq:xipq'} and \eqref{Eq:qaDef} that \[ \xi_{p_a,q_a}(2T) = p_b. \] It thus follows that $\xi(t) = \xi_{p_a,q_a}(t + T)$ is smooth in $[-T,T]$, satisfies \eqref{Eq:xieq1} and $\xi' < -1$ in $(-T,T)$, as well as $\xi(-T) = p_a$ and $\xi(T) = p_b$. Returning to $u = \exp\big(-\frac{n-2}{2}\big(\xi(\ln r - \frac{1}{2}\ln(ab)) + \ln r\big)$ we obtain the conclusion. \medskip \noindent(ii) Suppose that $T = T(a,b,{c_1},{c_2})$. We show that Case 3 holds. \medskip Recalling the definition of $T(a,b,{c_1},{c_2})$, we see that as $T > 0$, we have $p_a \neq p_b$. As $p_a \geq p_b$, we have $p_a > p_b$. We can now follow the argument in (i) with $\xi_{p_a, q_a}$ replaced by $\xi_{p_a}$ (defined in the proof of Lemma \ref{Lem:KeyLem}) to reach the conclusion. We omit the details. \medskip \noindent(iii) Suppose that $T > T(a,b,{c_1},{c_2})$. We show that Case 4 holds. \medskip In this case, we select $p \geq p_a (\geq p_b)$ such that \begin{align*} T &= \frac{1}{2}\int_{p_b- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta\\ &\quad + \frac{1}{2}\int_{p_a- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta \end{align*} Such $p$ exists as the right hand side tends to $T(a,b,{c_1},{c_2})$ when $p \rightarrow p_a$ and diverges to $\infty$ as $p \rightarrow \infty$. Recall the solution $\xi_p$ defined in the proof of Lemma \ref{Lem:KeyLem}. Let \[ T_+ = \frac{1}{2}\int_{p_b- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta \] and \[ T_- = \frac{1}{2}\int_{p_a- p}^{0} \Big\{1 + e^{-2\eta-2p}\big[1 - e^{n\eta}\big]^{1/k}\Big\}^{-1/2}\,d\eta. \] Then $2T_\pm < T_p$ and the function $\xi_p$ satisfies $\xi_p(2T_+) = p_b$ and $\xi_p(2T_-) = p_a$. We then let \[ \xi(t) = \left\{\begin{array}{ll} \xi_p(T_+ - T_- + t ) & \text{ if } - T_+ + T_- \leq t < T,\\ \xi_p(-T_+ + T_- - t) & \text{ if } -T < t < - T_+ + T_- . \end{array}\right. \] We can then proceed as in the proof of Theorem \ref{thm:MainLipNeg} to show that $\xi$ is the desired solution.\hfill$\Box$
\section{Introduction} \label{sec:1} The existence of dark matter is inferred from various observations through gravity over the past decades such as rotational curves of spiral galaxies~\cite{Corbelli:1999af, Sofue:2000jx}, gravitational lensing~\cite{Massey:2010hh}, cosmic microwave background~\cite{Aghanim:2018eyx} and collision of Bullet Cluster~\cite{Randall:2007ph}. However, the nature of dark matter is still unknown. Identification of dark matter is important not only for cosmology but also for particle physics because any standard model particles cannot play a role of dark matter. Many kinds of dark matter candidates have been proposed so far. One of the prominent candidates is so-called Weakly Interacting Massive Particle (WIMP). The attractive feature of WIMPs is that the relic abundance is thermally determined in the early universe. The WIMP mass whose interaction is close the electroweak interaction is predicted in the range of $10$ GeV -- $100$ TeV. Such WIMPs are basically detectable through non-gravitational interactions. Although WIMPs are being searched through direct detection, indirect detection and collider production, no clear signals of WIMPs have been confirmed yet. As a result, these experiments severely constrain WIMP mass and interactions. In particular, recent direct detection experiments provide the strong upper bounds on the elastic scattering cross section between dark matter and nucleon~\cite{Akerib:2017kat,Cui:2017nnn,Aprile:2018dbl}. In order to pursue WIMPs further in the current situation, we have to consider mechanisms to avoid the severe constraint from the direct detection experiments. One way is to consider a fermionic dark matter with pseudo-scalar interactions \cite{Freytsis:2010ne}. In this case, since the scattering amplitude at tree level is suppressed by the momentum transfer in non-relativistic limit due to the spin structure, the leading contribution to the amplitude appears at loop level~\cite{Ipek:2014gua,Arcadi:2017wqi,Sanderson:2018lmj,Abe:2018emu,Abe:2019wjw}. Another option is to consider a pseudo-Nambu-Goldstone boson (pNGB) as dark matter~\cite{Barger:2010yn,Gross:2017dan}. Since all the interactions are written by derivative couplings in non-linear representation, the scattering amplitude for direct detection vanishes in non-relativistic limit.\footnote{A pNGB dark matter also appears in the composite Higgs models. In this context, the suppression of the elastic scattering amplitude has been studied in Ref.~\cite{Fonseca:2015gva, Brivio:2015kia, Barducci:2016fue, Balkin:2017aep, Balkin:2018tma, Ruhdorfer:2019utl, Ramos:2019qqa}.} The leading contribution comes from one-loop level, and the order of the elastic cross section has been evaluated as $\mathcal{O}(10^{-48}) \ \mathrm{cm}^2$ at most~\cite{Azevedo:2018exj,Ishiwata:2018sdi}. Since this magnitude of the elastic cross section is considerably small, probing pNGB dark matter by future direct detection experiments may be difficult. However, indirect detection and collider searches are more promising, and there are some works in this direction~\cite{Huitu:2018gbc,Cline:2019okt}. In addition, global fitting of the pNGB dark matter with comprehensive analysis has been done in Ref.~\cite{Arina:2019tib}. In this paper, we propose a model of the pNGB dark matter from a {\it gauged} $U(1)_{B-L}$ symmetry.\footnote{ Gauge symmetries are also motivated by the conjecture that there is no global symmetry in quantum gravity~\cite{Banks:1988yz,Banks:2010zn}.} We introduce two complex scalars with $Q_{B-L}=+1$ and $+2$, and three right-handed neutrinos for gauge anomaly cancellation. The pNGB dark matter scenario in Ref.~\cite{Gross:2017dan} is realized in the decoupling limit, where the $U(1)_{B-L}$ symmetry breaking scale is taken to be infinity. In contrast to the original pNGB dark matter scenario, the pNGB decays due to the new interactions through the heavy particles. The stability of the pNGB is determined by the breaking scale of the $U(1)_{B-L}$ symmetry. We show that the pNGB can be long-lived over the current upper bound of the lifetime from the cosmic-ray observations. We also study the consistencies with the relic abundance of dark matter, and low energy phenomenology. The rest of this paper is organized as follows. In Sec.~2, a pNGB is introduced from the $U(1)_{B-L}$ symmetry breaking. In Sec.~3, the longevity of the pNGB as dark matter is investigated. We also study the relevant constraints on our pNGB dark matter such as the relic abundance of dark matter, the perturbative unitarity, and the Higgs invisible decay and signal strength. Sec.~4 is devoted to our conclusion. \section{The Model} \label{sec:2} \begin{table}[t] \centering \begin{tabular}{|c||c|c|c|c|c|c||c|c|c|}\hline & $Q_L$ & $u_{R}^{c}$ & $d_{R}^{c}$ & $L$ & $e_{R}^{c}$ & $H$ & $\nu_{R}^c$ & $S$ & $\Phi$ \\ \hhline{|=#=|=|=|=|=|=#=|=|=|} $SU(3)_{c}$ & $\bm{3}$ & $\bar{\bm{3}}$ & $\bar{\bm{3}}$ & $\bm{1}$ & $\bm{1}$ & $\bm{1}$ & $\bm{1}$ & $\bm{1}$ & $\bm{1}$ \\ \hline $SU(2)_{L}$ & $\bm{2}$ & $\bm{1}$ & $\bm{1}$ & $\bm{2}$ & $\bm{1}$ & $\bm{2}$ & $\bm{1}$ & $\bm{1}$ & $\bm{1}$ \\ \hline $U(1)_{Y}$ & $+1/6$ & $-2/3$ & $+1/3$ & $-1/2$ & $+1$ & $+1/2$ & $0$ & $0$ & $0$ \\\hline $U(1)_{B-L}$ & $+1/3$ & $-1/3$ & $-1/3$ & $-1$ & $+1$ & $0$ & $+1$ & $+1$ & $+2$ \\\hline \end{tabular} \caption{Particle contents and quantum charges.} \label{tab:1} \end{table} The particle contents and the charge assignments under the gauge group $SU(3)_{c} \times SU(2)_{L} \times U(1)_{Y} \times U(1)_{B-L}$ are shown in Tab.~\ref{tab:1}. We note that the model is consist of particles in the ordinary $U(1)_{B-L}$ model and an additional scalar singlet $S$ with $Q_{B-L}=+1$. The gauge kinetic terms of the new particles charged under $U(1)_{B-L}$ are written as \begin{align} \mathcal{L}_{K}= (D_\mu S)^\dagger (D^\mu S) + (D_\mu \Phi)^\dagger (D^\mu \Phi) + \bar{\nu_{R}} i \Slash{D} \nu_{R} -\frac{1}{4}X_{\mu\nu}X^{\mu\nu} -\frac{\sin \epsilon}{2}X_{\mu\nu}B^{\mu\nu}, \end{align} where $D_\mu \equiv \partial_\mu +i g_{B-L} Q_{B-L}X_\mu$ is the covariant derivative with the new gauge boson $X_\mu$ associated with the $U(1)_{B-L}$ symmetry. The field strengths for $U(1)_{B-L}$ and $U(1)_{Y}$ are denoted by $X_{\mu\nu}$ and $B_{\mu\nu}$, respectively. The last term is the gauge kinetic mixing between $X_\mu$ and $B_\mu$. An extra mass eigenstate $Z^\prime$ of neutral gauge bosons is mainly composed by the new gauge boson $X_{\mu}$. The detailed calculations of diagonalization of the kinetic mixing and mass matrix is summarized in Appendix~\ref{sec:Gauge kinetic mixing}. \medskip The scalar potential is written as \begin{align} V(H,S,\Phi) =& -\frac{\mu_{H}^2}{2}|H|^2 -\frac{\mu_{S}^2}{2} |S|^2 -\frac{\mu_{\Phi}^2}{2}|\Phi|^2 +\frac{\lambda_{H}}{2} |H|^4 +\frac{\lambda_{S}}{2}|S|^4 + \frac{\lambda_{\Phi}}{2}|\Phi|^4 \nonumber\\ &+\lambda_{HS} |H|^2 |S|^2 + \lambda_{H\Phi}|H|^2|\Phi|^2 +\lambda_{S\Phi}|S|^2|\Phi|^2 -\biggl( \frac{\mu_{\mathrm{c}}}{\sqrt{2}} \Phi^* S^2 + \mathrm{c.c.}\biggr). \label{eq:potential} \end{align} The CP phase of the cubic term is eliminated by the field redefinition of $\Phi$. All the scalar fields develop vacuum expectation values (VEVs), and they are parametrized by \begin{align} H= \left( \begin{array}{c} 0 \\ (v+h)/\sqrt{2} \end{array}\right), \hspace{1em} S=\frac{v_{s} + s+ i \eta_{s}}{\sqrt{2}}, \hspace{1em} \Phi= \frac{v_\phi + \phi + i\eta_{\phi}}{\sqrt{2}}. \end{align} In the limit $\mu_\mathrm{c}\to0$, the scalar potential has two independent global $U(1)$ symmetries associated with the phase rotation of $S$ and $\Phi$, respectively. When $\mu_{\mathrm{c}} \ne 0$, these $U(1)$ symmetries are merged to the $U(1)_{B-L}$ symmetry. Therefore, one of NGBs is absorbed by $X_\mu$, while the other appears as a physical pNGB with the mass proportional to $\mu_{\mathrm{c}}$. We note that $\mu_\mathrm{c}$ is naturally small in 't Hooft sense because of the enhanced symmetry argument. One can intuitively understand that if the scalar $\Phi$ gets the VEV $v_{\phi}$ , the last term gives effective mass term $\mu_{\mathrm{c}} v_{\phi} S^2 /2 $ for the NGB. By solving stationary conditions for $\mu_{H}^2, \mu_{S}^2, \mu_{\Phi}^2$, the mass matrix for the CP-even scalars in the $(h, s, \phi)$ basis is \begin{align} M_{\mathrm{even}}^2 =& \left( \begin{array}{ccc} \lambda_H v^2 & \lambda_{HS} v v_{s} & \lambda_{H\Phi}v v_{\phi} \\ \lambda_{HS} v v_{s} & \lambda_S v_{s}^2 & \lambda_{S\Phi}v_{s} v_{\phi}-\mu_{\mathrm{c}} v_{s} \\ \lambda_{H\Phi} v v_{\phi} & \lambda_{S\Phi} v_{s} v_{\phi} -\mu_{\mathrm{c}} v_{s} & \lambda_{\Phi} v_{\phi}^2 +\frac{\mu_{\mathrm{c}} v_{s}^2}{2v_{\phi}} \end{array}\right). \end{align} This mass matrix is approximately diagonalized by the matrix \begin{align} U \approx \left( \begin{array}{ccc} 1 & 0 & \frac{\lambda_{H\Phi}v}{\lambda_{\Phi} v_{\phi}} \\ 0 & 1 & \frac{\lambda_{S\Phi}v_{s}}{\lambda_{\Phi} v_{\phi}} \\ -\frac{\lambda_{H\Phi}v}{\lambda_{\Phi} v_{\phi}} & -\frac{\lambda_{S\Phi}v_s}{\lambda_{\Phi}v_{\phi}}& 1 \end{array}\right) \left( \begin{array}{ccc} \cos \theta & \sin \theta & 0 \\ - \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{array}\right), \label{eq:Umix} \end{align} where $U(1)_{B-L}$ symmetry breaking is assumed mainly by $v_\phi$. The gauge eigenstates $(h, s, \phi)$ are expressed by the mass eigenstates $(h_1, h_2, h_3)$ as \begin{align} \left( \begin{array}{c} h \\ s \\ \phi \end{array}\right) = U \left( \begin{array}{c} h_1 \\ h_2 \\ h_3 \end{array}\right), \end{align} where the mixing angle $\theta$ is given by \begin{align} \tan 2 \theta ~ \approx ~\frac{2 v v_{s} (\lambda_{HS} \lambda_{\Phi} -\lambda_{H\Phi} \lambda_{S\Phi})}{ v^2 ( \lambda_{H\Phi}^2 -\lambda_{H} \lambda_{\Phi}) -v_{s}^2 (\lambda_{S\Phi}^2 -\lambda_{S} \lambda_{\Phi})}. \end{align} The corresponding mass eigenvalues for $h_i$ are approximately evaluated as \begin{align} m_{h_1}^2 \approx &~ \lambda_{H} v^2 - \frac{ \lambda_{H\Phi}^2 \lambda_{S} -2 \lambda_{HS} \lambda_{H\Phi} \lambda_{S\Phi} + \lambda_{\Phi} \lambda_{HS}^2}{\lambda_{S} \lambda_{\Phi} -\lambda_{S\Phi}^2 } v^2, \label{eq:massh1} \\ m_{h_2}^2 \approx &~ \frac{\lambda_{S}\lambda_{\Phi} -\lambda_{S\Phi}^2}{\lambda_{\Phi}} v_{s}^2 +\frac{(\lambda_{\Phi} \lambda_{HS}-\lambda_{H\Phi} \lambda_{S\Phi})^2}{\lambda_{\Phi}(\lambda_{S} \lambda_{\Phi} -\lambda_{S\Phi}^2)} v^2, \label{eq:massh2} \\ m_{h_3}^2 \approx &~ \lambda_{\Phi} v_{\phi}^2. \end{align} We identify $h_1$ as the SM-like Higgs boson with the mass $m_{h_1}=125\ \mathrm{GeV}$. The mass matrix of the CP-odd scalars in the gauge eigenstates $(\eta_{s}, \eta_{\phi})$ is written as \begin{align} M_{\mathrm{odd}}^2 = \frac{\mu_{\mathrm{c}}}{2v_{\phi}} \left( \begin{array}{cc} 4v_{\phi}^2 & -2 v_{s} v_{\phi} \\ -2 v_{s} v_{\phi} & v_{s}^2 \end{array}\right). \end{align} This mass matrix can be diagonalized as \begin{align} V^{\mathrm{T}} M_{\mathrm{odd}}^2 V = \left( \begin{array}{cc} m_{\chi}^2 & 0 \\ 0 & 0 \end{array}\right), \hspace{1em} m_{\chi}^2 = \frac{(v_{s}^2 + 4 v_{\phi}^2 ) \mu_{\mathrm{c}} }{4 v_{\phi}}, \end{align} where the unitary matrix $V$ is given by \begin{align} V= \frac{ 1 }{ \sqrt{ v_{s}^2 + 4 v_{\phi}^2 }} \left( \begin{array}{cc} 2 v_{\phi} & v_s \\ -v_{s} & 2 v_{\phi} \end{array}\right). \end{align} The gauge eigenstates $( \eta_{s} , \eta_{\phi} )$ are rewritten by the mass eigenstates $( \chi , \tilde{\chi} )$ as \begin{align} \left( \begin{array}{c} \eta_{s} \\ \eta_{\phi} \\ \end{array}\right) = \frac{1}{\sqrt{ v_{s}^2 + 4 v_{\phi}^2 }} \left( \begin{array}{cc} 2 v_{\phi} & v_{s} \\ -v_{s} & 2 v_{\phi} \end{array}\right) \left( \begin{array}{c} \chi \\ \tilde{\chi} \end{array}\right), \label{eq:Vmix} \end{align} where $\tilde{\chi}$ is the NGB absorbed by $X_\mu$, and $\chi$ corresponds to the pNGB which will be identified as dark matter. \medskip The following Yukawa interactions are also invariant under the imposed symmetry \begin{align} \mathcal{L}_{Y}= - (y_{\nu})_{ij} \tilde{H}^\dagger \bar{\nu_{Ri}} L_j -\frac{(y_{\Phi})_{ij}}{2} \Phi \bar{\nu_{Ri}^c} \nu_{Rj} + \mathrm{h.c.} \end{align} After the $U(1)_{B-L}$ symmetry breaking, the right-handed neutrinos obtain the Majorana mass $M\equiv y_{\Phi} v_{\phi} /\sqrt{2}$. Thus, the small masses for active neutrinos are generated by the type-I seesaw mechanism as $m_{\nu} \approx - m_{D} M^{-1} m_{D}^{\mathrm{T}}$ with the Dirac mass $m_{D} \equiv y_{\nu} v /\sqrt{2}$. Since the heaviest neutrino mass is roughly fixed by the neutrino oscillation data as $m_{\nu} \sim 0.1\ \mathrm{eV}$, the required scale of the VEV $v_{\phi}$ is estimated as \begin{align} m_{\nu} \sim \frac{y_{\nu}^2 v^2}{\sqrt{2} y_{\Phi} v_{\phi}} \sim 0.1 \ \mathrm{GeV} \hspace{1em} \to \hspace{1em} v_{\phi} \sim 4.3 \times 10^{14}\, \mathrm{GeV} \biggl( \frac{y_{\nu}^2}{y_{\Phi}}\biggr). \end{align} The scale $v_\phi$ is large enough as compared to the electroweak scale unless the Dirac Yukawa coupling $y_{\nu}$ is considerably small. \if0 The feature of the pNGB dark matter is similar to the Majoron dark matter with electroweak scale mass, as it has been discussed in ref.~\cite{Gu:2010ys,Queiroz:2014yna,Garcia-Cely:2017oco}. In these works, the soft breaking term giving the mass of the pNGB dark matter is simply assumed and the $U(1)_{B-L}$ symmetry is not gauged. Therefore our model is intrinsically different from the previous works. There is another attempt to obtain a scalar dark matter from the gauged $U(1)_{B-L}$ symmetry~\cite{Rodejohann:2015lca}. In their model, the complex scalar which can be dark matter is assumed not to develop the VEV and is stabilized by a $\mathbb{Z}_2$ residual symmetry unlike our model. \fi \section{Long-lived Dark Matter} First of all, we check the cancellation of the scattering amplitude for direct detection in this model. When $v_\phi$ is much larger than $v$ and $v_s$, the three-point interactions among the pNGB and CP-even scalars are expressed as \begin{align} \mathcal{L}_{\chi\chi h_i} = -\sum_{i =1,2,3} \frac{\kappa_{\chi\chi h_i}}{2} \chi^2 h_i, \end{align} where each coupling coefficient $\kappa_{\chi \chi h_i}$ is given by \begin{align} &\kappa_{\chi \chi h_1} \approx -\frac{m_{h_1}^2\sin \theta}{v_s}, \hspace{1em} \kappa_{\chi \chi h_2} \approx + \frac{m_{h_2}^2 \cos \theta}{v_s}, \hspace{1em} \kappa_{\chi \chi h_3} \approx + \frac{m_{h_3}^2}{v_s} \frac{\lambda_{S\Phi}v_s}{\lambda_\Phi v_\phi}. \end{align} We note that these couplings are proportional to the corresponding scalar masses. The CP-even scalar exchanging scattering amplitudes of the pNGB and SM particles are expressed as \begin{align} i \mathcal{M} \propto \frac{\sin \theta \cos \theta}{v_s} \biggl( - \frac{m_{h_1}^2}{q^2 -m_{h_1}^2} + \frac{m_{h_2}^2}{q^2 -m_{h_2}^2} \biggr) +{\mathcal O}(1/v_\phi), \end{align} where $q$ is the momentum transfer. Due to this structure, the elastic scattering cross section of dark matter and nucleon is suppressed in the non-relativistic limit. This is nothing less than the same cancellation mechanism of the pNGB dark matter for the direct detection\cite{Gross:2017dan}.\footnote{ This cancellation mechanism works if and only if the $U(1)_{B-L}$ charge of $S$ is unity. } Therefore, the pNGB derived from the gauged $U(1)_{B-L}$ model can be a good candidate for dark matter. \medskip It is necessary to examine the longevity of the pNGB to be dark matter, because our pNGB is unstable. The SM particles are produced by the decays of the pNGB dark matter candidate, and these particles further decay into the stable particles such as $e^{\pm}$, $\gamma$, $\nu$, $p$, $\bar{p}$. These cosmic-rays can be signals of dark matter or constrained by observations. In this paper, following the analysis of gamma rays coming from dwarf spheroidal galaxies using Fermi-LAT data~\cite{Baring:2015sza}, we study constraints of our model from a conservative limit of the dark matter lifetime $\tau_{\mathrm{DM}} \gtrsim 10^{27}\ \mathrm{s}$, or equivalently $\Gamma_{\mathrm{DM}} \lesssim 6.6 \times 10^{-52}\ \mathrm{GeV}$ in terms of decay width. \medskip One of possible two body decay channels is $\chi \to \nu \nu$ through the scalar mixing and the neutrino heavy-light mixing. The partial decay width is roughly estimated as $\Gamma_{\chi \to \nu \nu} \lesssim 10^{-67} \ \mathrm{GeV}$. This is small enough to guarantee the dark matter (meta-)stability thanks to the strong suppression by the small neutrino masses. In addition, the current experimental upper bound for this channel is much weaker than our estimate, since the observation of the produced neutrino cosmic-rays is much more difficult than those of charged particles such as $e^{\pm}$, $p$, $\bar{p}$. Thus, this decay channel can be safely ignored. Another two body decay mode $\chi \to h_i Z$, depicted in the left panel of Fig.~\ref{fig:decay}, becomes important if it is kinematically allowed for $m_{\chi} > m_{h_i}+m_Z$. The total decay width for this channel is computed as \begin{align} \Gamma_{\text{2-body}}=&~ \sum_{i} \Gamma_{\chi \to h_i Z} \approx \frac{g_{B-L}^2}{16 \pi m_{Z'}^4 } m_{Z}^2 m_{\chi}^3 \sin^2 \theta_{W} \sin^2 \epsilon \nonumber\\ =&~ 5.8 \times 10^{-52}\ \mathrm{GeV} \biggl( \frac{m_{\chi}}{0.5 \ \mathrm{TeV}} \biggr)^3 \biggl( \frac{10^{15}\ \mathrm{GeV}}{m_{Z'}} \biggr)^2 \biggl( \frac{10^{15}\ \mathrm{GeV}}{v_\phi} \biggr)^2 \biggl( \frac{\sin \epsilon}{1/\sqrt{2}} \biggr)^2, \label{eq:two} \end{align} where the mass hierarchy $m_{h_1},m_{h_2}, m_{Z} \ll m_{\chi}\ll m_{h_3},m_{Z^\prime}$ is applied for this approximated formula. This two body decay becomes important if there is a large gauge kinetic mixing $\sin \epsilon$,\footnote{ A bound on the kinetic mixing $\sin\epsilon$ is obtained from the perturbative unitarity if the new gauge boson mass is lighter than TeV scale~\cite{Bandyopadhyay:2018cwu}. However this bound is irrelevant to our case since the new gauge mass is assumed to be much heavier than TeV scale. } and is irrelevant for the vanishing gauge-kinetic mixing. Since $\chi$ is $\eta_s$-like, the main contribution to this decay channel comes from $\chi \to h_2 Z$ where $h_2$ is $s$-like. Further suppression due to the scalar mixing is expected for other decay channels, e.g., $\chi \to h_1 Z$. A decay process emitting a photon such as $\chi \to h_{i} \gamma$ is forbidden due to the helicity conservation. \begin{figure}[t] \centering \includegraphics[scale=0.9]{two_body.eps} \hspace{1cm} \includegraphics[scale=0.9]{three_body.eps} \caption{Feynman diagrams of the dark matter decay.} \label{fig:decay} \end{figure} One can naively expect that three body decay processes are subdominant if the above two body decay processes are kinematically allowed. However, three body decays could be dominant depending on parameters, in particular when the gauge kinetic mixing is small. There are two possible three body decay processes $\chi \to Z f \bar{f}$ and $\chi \to h_i f \bar{f}$. The former is mediated by the heavy CP-even scalar $h_3$, and is possible only when the gauge kinetic mixing is non-zero as same as the above two body decay process. The decay width is extremely suppressed by the heavy $h_3$ mass and small scalar mixing, thus this is ignored. The latter process is mediated by the heavy $Z^\prime$ gauge boson as depicted in the right panel of Fig.~\ref{fig:decay}. In the case that $m_{f} \ll m_{h_i}, m_{\chi} \ll m_{Z'}$, the decay width is computed as \begin{align} \Gamma_{\chi \to h_i f \bar{f}} = \frac{g_{B-L}^2 U_{si}^2 m_{\chi}^5}{768 \pi^3 m_{Z'}^4} \frac{\cos^2 \zeta}{\cos^2 \epsilon} \Bigl( {g^{f}_{V}}^2 + {g^{f}_{A}}^2 \Bigr) \Bigl[ 1 - 8\xi_i + 8 \xi_i^3 -\xi_i^4 -12 \xi_i^2 \log \xi_i\Bigr], \end{align} where $\xi_i \equiv m_{h_i}^2 / m_{\chi}^2$ and $U_{si}~(i=1,2)$ is the element of the CP-even scalar mixing matrix in Eq.~(\ref{eq:Umix}). The mixing matrix elements are explicitly given by $U_{s1} \approx -\sin \theta$, $U_{s2} \approx \cos \theta$. The coefficients $g^{f}_{V/A}$ are the coupling constants between the heavy gauge boson $Z'$ and vector or axial vector current, which are defined by \begin{align} \mathcal{L}_{Z' \bar{f} f}= -Z'_\mu \bar{f} \gamma^\mu \Bigl[ g^f_V +g^f_A \gamma_5 \Bigr] f. \end{align} Their expressions in $m_{Z} \ll m_{Z'}$ limit are given by \begin{align} g^f_V \approx &-g_1 (Q^f_{\mathrm{em}} -T^f_3 ) \tan \epsilon + \frac{g_{B-L}}{\cos \epsilon} Q^f_{B-L}, \\ g^f_A \approx & ~ 0, \end{align} where $Q^f_{\mathrm{em}}$, $T^f_{3}$ and $Q^f_{B-L}$ correspond to electromagnetic charge, the third component of weak isospin and $B-L$ charge of the fermion $f$, respectively. The mixing angle $\zeta$ is introduced to diagonalize the gauge boson mass matrix as summarized in Appendix~\ref{sec:Gauge kinetic mixing}. It is useful to take some specific values of the parameters to understand the behavior of the three body decay width. Here, we consider the two cases, $\sin \epsilon=0$ and $1/\sqrt{2}$. First, when there is vanishing gauge kinetic mixing ($\sin\epsilon=0$), the total three body decay width can simply be computed as \begin{align} \Gamma_{\text{3-body}} \Bigr|_{\sin \epsilon \to 0 } = & \sum_{i} \sum_{f} \Gamma_{\chi \to h_i f \bar{f}} \approx \frac{13}{16} \frac{g_{B-L}^4}{1536 \pi^3} \frac{m_{\chi}^5}{m_{Z'}^4} \nonumber\\ \approx & ~ 5.3 \times 10^{-52} \ \mathrm{GeV} \biggl( \frac{m_{\chi}}{0.5\ \mathrm{TeV}} \biggr)^5 \biggl( \frac{10^{15} \ \mathrm{GeV}}{v_\phi} \biggr)^4, \label{eq:threeno} \end{align} where we used the relation $m_{Z'}^2 \approx 4 g_{B-L}^2 v_{\phi}^2$. The second case is a typical value of non-zero gauge kinetic mixing ($\sin \epsilon = 1/\sqrt{2}$). Then, the total decay width can be evaluated as \begin{align} \Gamma_{\text{3-body}} \Bigl|_{\sin \epsilon \to 1/\sqrt{2}} =& \sum_{i} \sum_{f} \Gamma_{\chi \to h_i f \bar{f}} \approx \frac{g_{B-L}^2}{768 \pi^3} \frac{m_{\chi}^5}{m_{Z'}^4} \bigl( 10 g_{1}^{2} - 8\sqrt{2} g_{1} g_{B-L} + 26 g_{B-L}^2 \bigr) \nonumber\\ =& ~ 4.1 \times 10^{-52} \ \mathrm{GeV} \biggl( \frac{m_{\chi}}{0.5\ \mathrm{TeV}} \biggr)^5 \biggl( \frac{10^{15} \ \mathrm{GeV}}{m_{Z'}} \biggr)^2 \biggl( \frac{10^{15}\ \mathrm{GeV}}{v_\phi} \biggr)^2 \nonumber\\ &\times \biggl[ 1- \frac{2\sqrt{2}}{5} \frac{m_{Z'}}{g_1 v_\phi} + \frac{13}{20} \frac{m_{Z'}^2}{g_1^2 v_\phi^2}\biggr]. \label{eq:threemax} \end{align} From the above calculations, one can find that the two body decay width in Eq.~(\ref{eq:two}) is proportional to $m_{\chi}^3$, while the three body decay widths in Eq.~(\ref{eq:threeno}), (\ref{eq:threemax}) are proportional to $m_{\chi}^5$. Therefore the three body decay width tends to be dominant when the dark matter mass $m_{\chi}$ is large. Another important point is that the two body decay width vanishes when there is no gauge kinetic mixing while the three body decay occurs even in the case. \begin{figure}[t] \centering \includegraphics[scale=0.66]{mx_vev_0300_mzp_1e14.eps} \includegraphics[scale=0.66]{mx_vev_1000_mzp_1e14.eps} \\ \includegraphics[scale=0.66]{mx_vev_0300_mzp_1e15.eps} \includegraphics[scale=0.66]{mx_vev_1000_mzp_1e15.eps} \caption{ Allowed regions in the $(m_{\chi}, v_{\phi} )$ plane. The scalar mass is fixed as $m_{h_2} =300\ \mathrm{GeV}$ for the left panels and $m_{h_2} = 1000 \ \mathrm{GeV}$ for the right panels. The new gauge boson mass is fixed as $m_{Z'} = 10^{14}\ \mathrm{GeV}$ in the upper panels and $m_{Z'} = 10^{15} \ \mathrm{GeV}$ in the lower panels. The orange regions are excluded by the conservative bound of the dark matter lifetime ($\tau_\mathrm{DM}\gtrsim10^{27}~\mathrm{s}$). The gray region is disfavored by the perturbative unitarity bound of the gauge coupling $g_{B-L}$. The upper light blue region denotes the parameter space that the VEV $v_\phi$ becomes larger than the Planck mass $M_P$. % } \label{fig:mx_vev_mzp} \end{figure} \medskip In our model, there are $10$ independent parameters in total, which are relevant to the decaying pNGB dark matter. These may be chosen to as $m_{\chi},m_{h_2},m_{h_3},m_{Z^\prime},\sin\theta$, $v_s$, $v_\phi$, $\lambda_{H\Phi}$ ,$\lambda_{S\Phi}$ and $\sin\epsilon$. The Yukawa couplings $y_{\nu}$ and $y_{\Phi}$ are irrelevant for the pNGB sector, and one can always take appropriate Yukawa couplings and right-handed neutrino masses consistently with the neutrino oscillation data. Only $4$ parameters ($m_{\chi},\sin\theta,v_s,m_{h_2}$) are important for the phenomena of the stable dark matter, which are used in the discussion in the next section. The other parameters are relevant to the dark matter decay. In our numerical calculations, we choose the following parameter sets as examples: \begin{align} m_{h_2} = 300~\text{or}~1000\ \mathrm{GeV},\quad m_{h_3} = 10^{13}\ \mathrm{GeV},\quad m_{Z^\prime}=10^{14}~\text{or}~10^{15}~\mathrm{GeV}, \nonumber\\ \sin\theta=0.1,\quad \lambda_{H\Phi} =\lambda_{S\Phi} = 10^{-6},\quad \sin\epsilon=0~\text{or}~\frac{1}{\sqrt{2}}. \hspace{1.5cm} \label{eq:param_set} \end{align} The gauge coupling $g_{B-L}$ and the quartic coupling $\lambda_\Phi$ are fixed by $g_{B-L}\approx m_{Z^\prime}^2/(4v_\phi^2)$ and $\lambda_\phi\approx m_{h_3}^2/v_\phi^2$ for a given VEV $v_\phi$. The mixing angle $\sin\theta$ is constrained as $\sin\theta\lesssim0.3$ for $m_{h_2}\gtrsim100~\mathrm{GeV}$ by the electroweak precision measurements and the direct search of the second Higgs boson~\cite{Martin-Lozano:2015dja, Falkowski:2015iwa}. This constraint can also be applied for our model. The quartic couplings $\lambda_{H\Phi}$ and $\lambda_{S\Phi}$ are taken small such that the approximate formulae Eq.~(\ref{eq:massh1}) and (\ref{eq:massh2}) are valid. If these couplings are large, the negative contributions to the CP-even scalar masses in Eq.~(\ref{eq:massh1}) and (\ref{eq:massh2}) become significant and make them tachyonic. Note that one can take these quartic couplings larger than Eq.~(\ref{eq:param_set}) for smaller VEV $v_\phi$. However, we choose as Eq.~(\ref{eq:param_set}) for simplicity so that the quartic couplings retain constant in our numerical calculations. In Fig.~\ref{fig:mx_vev_mzp}, we show the allowed parameter region from the (meta-)stability constraint of dark matter in the plane $(m_{\chi}, v_{\phi} )$. The orange region is ruled out by the cosmic-ray observation. The perturbative unitarity bound of the $U(1)_{B-L}$ gauge coupling exclude the lower gray region. The VEV $v_{\phi}$ becomes larger than the Planck scale $M_{P}=1.2\times10^{19}~\mathrm{GeV}$ in the upper light blue region.\footnote If we consider a cosmic string creation after the inflation, the VEV breaking $U(1)_{B-L}$ symmetry is restricted as $v_{\phi} < 4 \times 10^{15}\ \mathrm{GeV}$ from the CMB observation, which is discussed in Ref.~\cite{Charnock:2016nzm}. } One can find from the plots that when the dark matter mass $m_{\chi}$ becomes larger than the threshold of the decay channel $\chi \to h_2 f \bar{f}$ ($m_{\chi}\gtrsim m_{h_2}$), the total decay width is enhanced and the bound of the cosmic-ray observations becomes stronger. The scaling behavior of the orange region is observed as $v_{\phi} \propto m_{\chi}^{5/4}$ for no kinetic mixing and $v_{\phi} \propto m_{\chi}^{5/2}$ for a large kinetic mixing in heavier dark matter mass region. This follows from the analytic formulae of the total three body decay width in Eqs.~(\ref{eq:threeno}) and (\ref{eq:threemax}). Characteristic threshold behaviors are also seen at $m_\chi \sim m_{h_2}+m_Z$, where $m_{h_2}=300\ (1000)$ GeV is taken in the left (right) panels. We here comment on the possible four body decay channel. If the dark matter mass is too small to decay through the above two or three body decay process, the four body decay process $\chi \to h_{i}^{*} Z^{*} \to f \bar{f} f^\prime \bar{f^\prime}$ would be the main decay channel of dark matter. However, the decay width is too small to be constrained or be signals of dark matter at present. \medskip \begin{figure}[t] \centering \includegraphics[scale=0.66]{relic_0300_kine_0.eps} \includegraphics[scale=0.66]{relic_1000_kine_0.eps} \\ \includegraphics[scale=0.66]{relic_0300_kine_0.707.eps} \includegraphics[scale=0.66]{relic_1000_kine_0.707.eps} \caption{ Allowed regions in the $(m_{\chi}, v /v_{s} )$ plane. The scalar mass is fixed as $m_{h_2} = 300\ \mathrm{GeV}$ for the left panels and $m_{h_2} = 1000\ \mathrm{GeV}$ for the right panels. The gauge kinetic mixing is chosen as $\sin \epsilon = 0$ (no kinetic mixing) in the upper panels and $\sin \epsilon = 1/\sqrt{2}$ (maximal mixing) in the lower panels. The red line corresponds to the thermal dark matter relic abundance consistent with the PLANCK Collaboration~\cite{Aghanim:2018eyx}. The purple, gray, orange and green regions are excluded by the constraints of the Higgs invisible decays~\cite{Sirunyan:2018owy, Aaboud:2019rtt} and the Higgs signal strength~\cite{Khachatryan:2016vau}, the perturbative unitarity bound on $\lambda_S$~\cite{Chen:2014ask}, the cosmic-ray constraint $( \tau_\mathrm{DM} \gtrsim 10^{27}\ \mathrm{s})$~\cite{Baring:2015sza} and the gamma-ray observation~\cite{Fermi-LAT:2016uux}, respectively. } \label{fig:relic} \end{figure} Finally, we confirm the consistency of our model with the observed dark matter relic abundance. For calculations of the dark matter relic abundance, the model is implemented in CalcHEP~\cite{Belyaev:2012qa} by using LanHEP~\cite{Semenov:2014rea}. The physical quantities relevant to dark matter such as thermal relic abundance, all the decay widths, spin-independent cross section for direct detection are computed by using micrOMEGAs~\cite{Belanger:2018mqt}. In Fig.~\ref{fig:relic}, we show the consistency of our pNGB dark matter model with the observed relic abundance in the plane $(m_{\chi}, v/v_{s})$. The red line represents the parameter space reproducing the observed thermal relic abundance within $3\sigma$ range of the PLANCK data $\Omega_{\mathrm{DM}} h^2 = 0.120 \pm 0.001$~\cite{Aghanim:2018eyx}. One can see the two resonances in Fig.~\ref{fig:relic} due to the two Higgs bosons $h_1$ and $h_2$. The purple region is excluded by the measurements of the Higgs invisible decay~\cite{Sirunyan:2018owy, Aaboud:2019rtt} and the signal strength~\cite{Khachatryan:2016vau} and the upper gray region is ruled out by the perturbative unitarity bound of the quartic coupling $\lambda_S < 8\pi /3$~\cite{Chen:2014ask}. The green region is excluded by the gamma-ray observation coming from dwarf spheroidal galaxies where the effective annihilation cross section into $b\overline{b}$ defined by $\langle\sigma_\mathrm{eff}{v}_{\mathrm{rel}}\rangle\equiv\langle\sigma_{b\bar{b}} v_{\mathrm{rel}}\rangle \left(\Omega_\mathrm{DM}h^2/0.120\right)^2$ with the dark matter relative velocity $v_{\mathrm{rel}}$ becomes larger than the current upper bound given by Fermi-LAT~\cite{Fermi-LAT:2016uux}.\footnote Note that the parameter space excluded by the gamma-ray observation shown in Fig.~\ref{fig:relic} is different from the previous work~\cite{Huitu:2018gbc}. This is because in the previous work the dark matter abundance in our galaxy has been assumed to be the observed value ($\Omega_\mathrm{DM}h^2\approx0.120$) regardless of the thermal abundance computed at each parameter space. This can occur after thermal production of dark matter via additional non-thermal dark matter production or entropy production, for instance. On the other hand in our case, thermal dark matter production is only assumed. } These behavior is basically same with the previous work as expected~\cite{Gross:2017dan}. The orange region is excluded by the upper bound on the dark matter lifetime $\tau_\mathrm{DM}\gtrsim10^{27}~\mathrm{s}$ where the VEV is fixed as $v_{\phi} = 10^{13}\ \mathrm{GeV}, 10^{14}\ \mathrm{GeV}, 10^{15}\ \mathrm{GeV}$. One can observe from the plots that the bound becomes stronger for small $v_\phi$ and non-zero gauge kinetic mixing $\sin\epsilon$. \section{Conclusion} We have studied the pNGB dark matter scenario derived from the gauged $U(1)_{B-L}$ symmetry. The model is consist of particles in the ordinary $U(1)_{B-L}$ model with an additional scalar singlet with $Q_{B-L}=+1$. The small neutrino masses have also been generated via type-I seesaw mechanism as usual. In this model, the pNGB associated with $U(1)_{B-L}$ symmetry breaking is identified as a dark matter candidate. The interactions of the new $U(1)_{B-L}$ gauge boson and the scalar mixing have led the decays of the pNGB. We have shown that the lifetime of the pNGB is long enough to be dark matter. We have also found the parameter space, which are consistent with the relevant constraints such as observed relic abundance of dark matter, Higgs invisible decay, Higgs signal strength, and perturbative unitarity bound of the couplings. For future prospects, the planned gamma-ray observations such as Cherenkov Telescope Array (CTA)~\cite{Carr:2015hta} and Large High Altitude Air Shower Observatory (LHAASO)~\cite{Bai:2019khm} can explore the dark matter mass over $100~\mathrm{GeV}$. In particular, the LHAASO experiment is already being operated, and can search the dark matter mass region between 1 TeV and 100 TeV. The upper bound on the dark matter lifetime is expected to be updated by one order of magnitude as discussed in Ref.~\cite{He:2019bcr}. These upcoming experiments will be able to explore full parameter space of our gauged $U(1)_{B-L}$ pNGB dark matter. \section*{Acknowledgments} \noindent TT acknowledges funding from the Natural Sciences and Engineering Research Council of Canada (NSERC). The work of KT is supported by the MEXT Grant-in-Aid for Scientific Research on Innovation Areas (Grant No. 18H05543). Numerical computation in this work was carried out at the Yukawa Institute Computer Facility and Compute Canada (Compute Ontario).