<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Phys.</journal-id>
<journal-title>Frontiers in Physics</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Phys.</abbrev-journal-title>
<issn pub-type="epub">2296-424X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1089114</article-id>
<article-id pub-id-type="doi">10.3389/fphy.2023.1089114</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Physics</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Immiscible color flows in optimal transport networks for image classification</article-title>
<alt-title alt-title-type="left-running-head">Lonardi et al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/fphy.2023.1089114">10.3389/fphy.2023.1089114</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Lonardi</surname>
<given-names>Alessandro</given-names>
</name>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<xref ref-type="fn" rid="fn1">
<sup>&#x2020;</sup>
</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2069104/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Baptista</surname>
<given-names>Diego</given-names>
</name>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<xref ref-type="fn" rid="fn1">
<sup>&#x2020;</sup>
</xref>
</contrib>
<contrib contrib-type="author">
<name>
<surname>De Bacco</surname>
<given-names>Caterina</given-names>
</name>
</contrib>
</contrib-group>
<aff>
<institution>Physics for Inference and Optimization Group</institution>, <institution>Max Planck Institute for Intelligent Systems</institution>, <institution>Cyber Valley</institution>, <addr-line>T&#xfc;bingen</addr-line>, <country>Germany</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1132069/overview">Adriano Tiribocchi</ext-link>, National Research Council (CNR), Italy</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2102939/overview">Giovanni Franzina</ext-link>, Istituto per le Applicazioni del Calcolo (IAC), Italy</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1955634/overview">Pablo Villegas</ext-link>, Enrico Fermi Center for Study and Research, Italy</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Alessandro Lonardi, <email>alessandro.lonardi@tuebingen.mpg.de</email>; Diego Baptista, <email>diego.theuerkauf@tuebingen.mpg.de</email>
</corresp>
<fn fn-type="equal" id="fn1">
<label>
<sup>&#x2020;</sup>
</label>
<p>These authors have contributed equally to this work and share first authorship</p>
</fn>
<fn fn-type="other">
<p>This article was submitted to Complex Systems, a section of the journal Frontiers in Physics</p>
</fn>
</author-notes>
<pub-date pub-type="epub">
<day>27</day>
<month>02</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>11</volume>
<elocation-id>1089114</elocation-id>
<history>
<date date-type="received">
<day>03</day>
<month>11</month>
<year>2022</year>
</date>
<date date-type="accepted">
<day>20</day>
<month>01</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2023 Lonardi, Baptista and De Bacco.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Lonardi, Baptista and De Bacco</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>In classification tasks, it is crucial to meaningfully exploit the information contained in the data. While much of the work in addressing these tasks is focused on building complex algorithmic infrastructures to process inputs in a black-box fashion, little is known about how to exploit the various facets of the data before inputting this into an algorithm. Here, we focus on this latter perspective by proposing a physics-inspired dynamical system that adapts optimal transport principles to effectively leverage color distributions of images. Our dynamics regulates immiscible fluxes of colors traveling on a network built from images. Instead of aggregating colors together, it treats them as different commodities that interact with a shared capacity on the edges. The resulting optimal flows can then be fed into standard classifiers to distinguish images in different classes. We show how our method can outperform competing approaches on image classification tasks in datasets where color information matters.</p>
</abstract>
<kwd-group>
<kwd>network flow optimization</kwd>
<kwd>image classification</kwd>
<kwd>network optimization</kwd>
<kwd>optimal transport</kwd>
<kwd>self-adapting dynamical systems</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>Optimal transport (OT) is a powerful method for computing the distance between two data distributions. This problem has a cross-disciplinary domain of applications, ranging from logistics and route optimization <xref ref-type="bibr" rid="B1">[1</xref>&#x2013;<xref ref-type="bibr" rid="B3">3]</xref> to biology [<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B5">5</xref>] and computer vision [<xref ref-type="bibr" rid="B6">6</xref>&#x2013;<xref ref-type="bibr" rid="B10">10</xref>], among others. Within this broad variety of problems, OT is largely utilized in machine learning [<xref ref-type="bibr" rid="B11">11</xref>] and deployed for solving classification tasks, where the goal is to optimally match discrete distributions that are typically learned from data. Relevant usage examples are also found in multiple fields of physics, as in protein fold recognition [<xref ref-type="bibr" rid="B12">12</xref>], stochastic thermodynamics [<xref ref-type="bibr" rid="B13">13</xref>], designing transportation networks [<xref ref-type="bibr" rid="B14">14</xref>, <xref ref-type="bibr" rid="B15">15</xref>], routing in multilayer networks [<xref ref-type="bibr" rid="B16">16</xref>], or general relativity [<xref ref-type="bibr" rid="B17">17</xref>]. A prominent application is image classification [<xref ref-type="bibr" rid="B18">18</xref>&#x2013;<xref ref-type="bibr" rid="B23">23</xref>], where the goal is to measure the similarity between two images. OT solves this problem by interpreting image pairs as two discrete distributions and then assessing their similarity <italic>via</italic> the Wasserstein (<italic>W</italic>
<sub>1</sub>) distance ([<xref ref-type="bibr" rid="B24">24</xref>], Definition 6.1), a measure obtained by minimizing the cost needed to transform one distribution into the other. Using <italic>W</italic>
<sub>1</sub> for image classification carries many advantages over other similarity measures between histograms. For example, <italic>W</italic>
<sub>1</sub> preserves all properties of a metric [<xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B24">24</xref>], it is robust over domain shift for train and test data [<xref ref-type="bibr" rid="B22">22</xref>], and it provides meaningful gradients to learn data distributions on non-overlapping domains [<xref ref-type="bibr" rid="B25">25</xref>]. Because of these and several other desirable properties, much research effort has been put into speeding up algorithms to calculate <italic>W</italic>
<sub>1</sub> [<xref ref-type="bibr" rid="B12">12</xref>, <xref ref-type="bibr" rid="B19">19</xref>, <xref ref-type="bibr" rid="B20">20</xref>, <xref ref-type="bibr" rid="B26">26</xref>, <xref ref-type="bibr" rid="B27">27</xref>]. However, all these methods overlook the potential of effectively using image colors directly in the OT formulation. As a result, practitioners have access to increasingly efficient algorithms, but those do not necessarily improve accuracy in predictions, as we lack a framework that fully exploits the richness of the input information.</p>
<p>Colored images originally encoded as three-dimensional histograms&#x2014;with one dimension per color channel&#x2014;are often compressed into lower dimensional data using feature extraction algorithms [<xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B23">23</xref>]. Here, we propose a different approach that maps the three distinct color histograms to multicommodity flows transported in a network built using images&#x2019; pixels. We combine recent developments in OT with the physics insights of capacitated network models [<xref ref-type="bibr" rid="B1">1</xref>, <xref ref-type="bibr" rid="B5">5</xref>, <xref ref-type="bibr" rid="B28">28</xref>&#x2013;<xref ref-type="bibr" rid="B31">31</xref>] to treat colors as masses of different types that flow through the edges of a network. Different flows are coupled together with a shared conductivity to minimize a unique cost function. This setup is reminiscent of the distinction between modeling the flow of one substance, e.g., water, and modeling the flows of multiple substances that do not mix, e.g., immiscible fluids, which share the same network infrastructure. By virtue of this multicommodity treatment, we achieve stronger classification performance than state-of-the-art OT-based algorithms in real datasets where color information matters.</p>
</sec>
<sec id="s2">
<title>2 Problem formulation</title>
<sec id="s2-1">
<title>2.1 Unicommodity optimal transport</title>
<p>Given two <italic>m</italic>- and <italic>n</italic>-dimensional probability vectors <italic>g</italic> and <italic>h</italic> and a positive-valued ground cost matrix <italic>C</italic>, the goal of a standard&#x2014;unicommodity&#x2014;OT problem is to find an optimal transport path <italic>P</italic>
<sup>&#x22c6;</sup> satisfying the conservation constraints <italic>&#x2211;</italic>
<sub>
<italic>j</italic>
</sub>
<italic>P</italic>
<sub>
<italic>ij</italic>
</sub> &#x3d; <italic>g</italic>
<sub>
<italic>i</italic>
</sub>
<italic>&#x2200;i</italic> and <italic>&#x2211;</italic>
<sub>
<italic>i</italic>
</sub>
<italic>P</italic>
<sub>
<italic>ij</italic>
</sub> &#x3d; <italic>h</italic>
<sub>
<italic>j</italic>
</sub>
<italic>&#x2200;j</italic>, while minimizing <italic>J</italic>(<italic>g</italic>, <italic>h</italic>) &#x3d; <italic>&#x2211;</italic>
<sub>
<italic>ij</italic>
</sub>
<italic>P</italic>
<sub>
<italic>ij</italic>
</sub>
<italic>C</italic>
<sub>
<italic>ij</italic>
</sub>.</p>
<p>Entries <inline-formula id="inf1">
<mml:math id="m1">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> can be interpreted as the mass transported from <italic>g</italic>
<sub>
<italic>i</italic>
</sub> to <italic>h</italic>
<sub>
<italic>j</italic>
</sub> when paying a cost <italic>C</italic>
<sub>
<italic>ij</italic>
</sub>, while <italic>J</italic>
<sup>&#x22c6;</sup>, i.e., <italic>J</italic> evaluated at <italic>P</italic>
<sup>&#x22c6;</sup>, encodes the minimum effort needed to transport <italic>g</italic> to <italic>h</italic>. Notably, if all entries <italic>C</italic>
<sub>
<italic>ij</italic>
</sub> are distances between <italic>i</italic> and <italic>j</italic>, then <italic>J</italic>
<sup>&#x22c6;</sup> is the <italic>W</italic>
<sub>1</sub> distance between <italic>g</italic> and <italic>h</italic> (see [<xref ref-type="bibr" rid="B24">24</xref>] for a standard proof and [<xref ref-type="bibr" rid="B9">9</xref>] for derivations focusing on the discrete case).</p>
</sec>
<sec id="s2-2">
<title>2.2 Physics-inspired multicommodity optimal transport</title>
<p>Interpreting colors as masses traveling along a network built from images&#x2019; pixels (as we define in detail below), unicommodity OT could be used to capture the similarity between grayscale images. However, it may not be ideal for colored images, when color information matters. The limitation of unicommodity OT in <xref ref-type="sec" rid="s2-1">Section 2.1</xref> is that it does not fully capture the variety of information contained in different color channels as it is not able to distinguish them. Motivated by this, we tackle this challenge and move beyond this standard setting by incorporating insights from the dynamics of immiscible flows into physics. Specifically, we treat the different pixels&#x2019; color channels as masses of different types that do not mix but rather travel and interact on the same network infrastructure, while optimizing a unique cost function. By assuming capacitated edges with conductivities that are proportional to the amount of mass traveling through an edge, we can define a set of ODEs that regulate fluxes and conductivities. These are optimally distributed along a network to better account for color information while satisfying physical conservation laws. Similar ideas have been successfully used to route different types of passengers in transportation networks [<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B16">16</xref>, <xref ref-type="bibr" rid="B32">32</xref>].</p>
<p>Formally, we couple together the histograms of <italic>M</italic> &#x3d; 3 color channels, the <italic>commodities</italic>, indexed with <italic>a</italic> &#x3d; 1, <italic>&#x2026;</italic>, <italic>M</italic>. We define <italic>g</italic>
<sup>
<italic>a</italic>
</sup> and <italic>h</italic>
<sup>
<italic>a</italic>
</sup> as <italic>m</italic>- and <italic>n</italic>-dimensional probability vectors of mass of type <italic>a</italic>. More compactly, we define the matrix <italic>G</italic> with entries <inline-formula id="inf2">
<mml:math id="m2">
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> (respectively, <italic>H</italic> for <italic>h</italic>), each containing the intensity of color channel <italic>a</italic> in pixel <italic>i</italic> of the first (respectively, second) image. These regulate the sources and sinks of mass in our setting. We then enforce the conservation of mass for each commodity index <italic>a</italic> <inline-formula id="inf3">
<mml:math id="m3">
<mml:msub>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>. This ensures that all the color mass in the first image is accounted for in the second image, and vice versa. This should be valid for each mass type.</p>
<p>Moreover, we define the set &#x3a0;(<italic>G</italic>, <italic>H</italic>) containing (<italic>m</italic> &#xd7; <italic>n</italic> &#xd7; <italic>M</italic>)-dimensional tensors <italic>P</italic> with entries <inline-formula id="inf4">
<mml:math id="m4">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> being transport paths between <italic>g</italic>
<sup>
<italic>a</italic>
</sup> and <italic>h</italic>
<sup>
<italic>a</italic>
</sup>. These regulate how fluxes of colors of different types travel along a network. We enforce the interaction between transport paths for different commodities by introducing a <italic>shared cost</italic>.<disp-formula id="e1">
<mml:math id="m5">
<mml:msub>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:munder>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:math>
<label>(1)</label>
</disp-formula>where <inline-formula id="inf5">
<mml:math id="m6">
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>/</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> is the 2-norm of the vector <inline-formula id="inf6">
<mml:math id="m7">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>M</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> and 0 &#x3c; &#x393; &#x3c; 4/3 is a regularization parameter. We take &#x393; &#x3e; 0 since a negative exponent would favor the proliferation of loops with infinite mass [<xref ref-type="bibr" rid="B28">28</xref>]. Instead, we conventionally consider &#x393; &#x3c; 4/3 (see <xref ref-type="sec" rid="s3-2">Section 3.2</xref>) since the cost <italic>J</italic>
<sub>&#x393;</sub> exhibits the same convexity properties for any &#x393; &#x3e; 1, i.e., it is strictly convex, and OT paths do not change substantially with &#x393; in this regime [<xref ref-type="bibr" rid="B2">2</xref>]. We can thus formulate its corresponding multicommodity OT problem as that of finding a tensor <italic>P</italic>
<sup>&#x22c6;</sup> solution of<disp-formula id="e2">
<mml:math id="m8">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:munder>
<mml:mrow>
<mml:mi>min</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>P</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="normal">&#x3a0;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:munder>
<mml:msub>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(2)</label>
</disp-formula>
</p>
<p>It should be noted that for <italic>M</italic> &#x3d; 1 and &#x393; &#x3d; 1, we recover the standard unicommodity OT setup.</p>
<p>The problem in Eq. <xref ref-type="disp-formula" rid="e2">2</xref> admits a precise physical interpretation. In fact, it can be recast as a constrained minimization problem with the objective function being the energy dissipated by the multicommodity flows (Joule&#x2019;s law) and a constant total conductivity. Furthermore, transport paths follow Kirchhoff&#x2019;s law enforcing conservation of mass [<xref ref-type="bibr" rid="B2">2</xref>, <xref ref-type="bibr" rid="B32">32</xref>, <xref ref-type="bibr" rid="B33">33</xref>] (see <xref ref-type="sec" rid="s10">Supplementary Material</xref> for a detailed discussion).</p>
<p>Noticeably, <italic>J</italic>
<sub>&#x393;</sub> is a quantity that takes into account all the different mass types, and the OT paths <italic>P</italic>
<sup>&#x22c6;</sup> are found through a unique optimization problem. We emphasize that this is fundamentally different from solving <italic>M</italic>-independent unicommodity problems, where different types of mass are not coupled together as in our setting, and then combining their optimal costs to estimate images&#x2019; similarity. Estimating <inline-formula id="inf7">
<mml:math id="m9">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>G</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> directly gives a quantitative and principled measure of the similarity between two images <italic>G</italic> and <italic>H</italic>. The lower this cost, the higher the similarity of the two images. While this is valid also for the unicommodity cost in <xref ref-type="sec" rid="s2-1">Section 2.1</xref>, the difference here is that we account differently for the color information as we distinguish different colors <italic>via</italic> the <italic>M</italic>-dimensional vector <italic>P</italic>
<sub>
<italic>ij</italic>
</sub>. The cost in Eq. <xref ref-type="disp-formula" rid="e2">2</xref> then properly couples colors by following physical laws regulating immiscible flows. The idea is that if this information matters for the given classification task, incorporating it into the minimization problem would output a cost that helps to distinguish images better, e.g., with higher accuracy.</p>
</sec>
</sec>
<sec sec-type="materials|methods" id="s3">
<title>3 Materials and methods</title>
<sec id="s3-1">
<title>3.1 Optimal transport network on images</title>
<p>Having introduced the main ideas and intuitions, we now explain in detail how to adapt the OT formalism to images. Specifically, we introduce an auxiliary bipartite network <italic>K</italic>
<sub>
<italic>m</italic>,<italic>n</italic>
</sub>(<italic>V</italic>
<sub>1</sub>, <italic>V</italic>
<sub>2</sub>, <italic>E</italic>
<sub>12</sub>), which is the first building block of the network where the OT problem is solved. A visual representation of this is shown in <xref ref-type="fig" rid="F1">Figure 1</xref>. The images 1 and 2 are represented as matrices (<italic>G</italic> and <italic>H</italic>) of sizes <italic>m</italic> &#xd7; <italic>M</italic> and <italic>n</italic> &#xd7; <italic>M,</italic> respectively, where <italic>M</italic> is the number of color channels of the images (<italic>M</italic> &#x3d; 3 in our examples). The sets of nodes <italic>V</italic>
<sub>1</sub> and <italic>V</italic>
<sub>2</sub> of the network <italic>K</italic>
<sub>
<italic>m</italic>,<italic>n</italic>
</sub> are the pixels of images 1 and 2, respectively. The set of edges <italic>E</italic>
<sub>12</sub> contains a subset of all pixel pairs between the two images, as detailed further. We consider the cost of an edge (<italic>i</italic>, <italic>j</italic>) as<disp-formula id="e3">
<mml:math id="m10">
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c4;</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>min</mml:mi>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b8;</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b8;</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>&#x3c4;</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(3)</label>
</disp-formula>where the vector v<sub>
<italic>i</italic>
</sub> &#x3d; (<italic>x</italic>
<sub>
<italic>i</italic>
</sub>, <italic>y</italic>
<sub>
<italic>i</italic>
</sub>) contains the horizontal and vertical coordinates of pixel <italic>i</italic> of image 1 (similarly v<sub>
<italic>j</italic>
</sub> for image 2). The quantity <italic>&#x3b8;</italic> &#x2208; [0, 1] is a hyperparameter that is given in input and can be chosen with cross-validation. It acts as a weight for a convex combination between the Euclidean distance between pixels and the difference in their color intensities, following the intuition in [<xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B23">23</xref>]. When <italic>&#x3b8;</italic> &#x3d; 0, the OT path <italic>P</italic>
<sup>&#x22c6;</sup> is the one that minimizes only the geometrical distance between pixels. Instead, when <italic>&#x3b8;</italic> &#x3d; 1, pixels&#x2019; locations are no longer considered, and transport paths are only weighted by color distributions. The parameter <italic>&#x3c4;</italic> is introduced following [<xref ref-type="bibr" rid="B22">22</xref>, <xref ref-type="bibr" rid="B23">23</xref>] with the scope of removing all edges with cost <italic>C</italic>
<sub>
<italic>ij</italic>
</sub>(<italic>&#x3b8;</italic>, <italic>&#x3c4;</italic>) &#x3d; <italic>&#x3c4;</italic>, i.e., those for which (1 &#x2212; <italic>&#x3b8;</italic>)&#x2016;v<sub>
<italic>i</italic>
</sub> &#x2212; v<sub>
<italic>j</italic>
</sub>&#x2016;<sub>2</sub> &#x2b; <italic>&#x3b8;</italic>&#x2016;<italic>G</italic>
<sub>
<italic>i</italic>
</sub> &#x2212; <italic>H</italic>
<sub>
<italic>j</italic>
</sub>&#x2016;<sub>1</sub> &#x3e; <italic>&#x3c4;</italic>. These are substituted by <italic>m</italic> &#x2b; <italic>n</italic> transshipment edges <italic>e</italic> &#x2208; <italic>E</italic>&#x2032;, each of which has a cost of <italic>&#x3c4;</italic>/2 and is connected to one unique auxiliary vertex <italic>u</italic>
<sub>1</sub>. Thresholding the cost decreases significantly the computational complexity of OT, making it linear with the number of nodes &#x7c;<italic>V</italic>
<sub>1</sub>&#x7c; &#x2b; &#x7c;<italic>V</italic>
<sub>2</sub>&#x7c; &#x2b; 2 &#x3d; <italic>m</italic> &#x2b; <italic>n</italic> &#x2b; 2 (see <xref ref-type="sec" rid="s10">Supplementary Material</xref>).</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Bipartite network representation for multicommodity OT. The two images (shown on the leftmost and rightmost sides of the panel) are encoded in the RGB matrices <italic>G</italic> and <italic>H</italic>, which regulate the flow traveling on the network <italic>K</italic>. The graph is made of <italic>m</italic> &#x2b; <italic>n</italic> &#x2b; 2 nodes, i.e., the total number of pixels plus the two auxiliary vertices introduced in <xref ref-type="sec" rid="s3-1">Section 3.1</xref>. Gray edges (belonging to the set <italic>E</italic>
<sub>12</sub>) connect nodes in image 1 to nodes in image 2; these edges are trimmed according to a threshold <italic>&#x3c4;</italic>. We highlight the entries of the matrix <italic>C</italic> in red if these are larger than <italic>&#x3c4;</italic>. Transshipment and auxiliary edges used to relax mass conservation (which belong to <italic>E</italic>&#x2032;) are colored in brown and magenta.</p>
</caption>
<graphic xlink:href="fphy-11-1089114-g001.tif"/>
</fig>
<p>Furthermore, we relax the conservation of mass by allowing <italic>&#x2211;</italic>
<sub>
<italic>i</italic>
</sub>
<italic>G</italic>
<sub>
<italic>ia</italic>
</sub> &#x2260; <italic>&#x2211;</italic>
<sub>
<italic>j</italic>
</sub>
<italic>H</italic>
<sub>
<italic>ja</italic>
</sub>. The excess mass <italic>m</italic>
<sup>
<italic>a</italic>
</sup> &#x3d; <italic>&#x2211;</italic>
<sub>
<italic>j</italic>
</sub>
<italic>H</italic>
<sub>
<italic>ja</italic>
</sub> &#x2212; <italic>&#x2211;</italic>
<sub>
<italic>i</italic>
</sub>
<italic>G</italic>
<sub>
<italic>ia</italic>
</sub> is assigned to a second auxiliary node, <italic>u</italic>
<sub>2</sub>. We connect it to the network with <italic>n</italic> additional transshipment edges, <italic>e</italic> &#x2208; <italic>E</italic>&#x2032;, each penalizing the total cost by <italic>c</italic> &#x3d; max<sub>
<italic>ij</italic>
</sub>
<italic>C</italic>
<sub>
<italic>ij</italic>
</sub>/2. This construction improves classification when the histograms&#x2019; total masses largely differ [<xref ref-type="bibr" rid="B22">22</xref>]. Intuitively, this can happen when comparing &#x201c;darker&#x201d; images against &#x201c;brighter&#x201d; images more precisely, when entries of <italic>g</italic>
<sup>
<italic>a</italic>
</sup> and <italic>h</italic>
<sup>
<italic>a</italic>
</sup> are further apart in the RGB color space.</p>
<p>Overall, we obtain a network <italic>K</italic> with nodes <inline-formula id="inf8">
<mml:math id="m11">
<mml:mi>V</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x222a;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>V</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x222a;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> and edges <italic>E</italic> &#x3d; <italic>E</italic>
<sub>12</sub> &#x222a; <italic>E</italic>&#x2032;, i.e., the original bipartite graph <italic>K</italic>
<sub>
<italic>m</italic>,<italic>n</italic>
</sub>, together with the auxiliary transshipment links and nodes. It should be noted that in its entirety, the system is isolated, i.e., the total mass is conserved. See <xref ref-type="sec" rid="s10">Supplementary Material</xref> for a detailed description of the OT setup.</p>
<p>Given this auxiliary graph, the OT problem is then solved by injecting the color mass contained in image 1 in nodes <italic>i</italic> &#x2208; <italic>V</italic>
<sub>1</sub>, as specified by <italic>G</italic>, and extracting it from nodes <italic>j</italic> &#x2208; <italic>V</italic>
<sub>2</sub> of image 2, as specified by <italic>H</italic>. This is carried out by transporting mass using either i) an edge in <italic>E</italic>
<sub>12</sub> or ii) a transshipment one in <italic>E</italic>&#x2032;. In the following section, we describe how this problem is solved mathematically.</p>
</sec>
<sec id="s3-2">
<title>3.2 Optimizing immiscible color flows: The dynamics</title>
<p>We solve the OT problem by proposing the following ODEs for controlling mass transportation:<disp-formula id="e4">
<mml:math id="m12">
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:munder>
<mml:msub>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>V</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mi>a</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(4)</label>
</disp-formula>
<disp-formula id="e5">
<mml:math id="m13">
<mml:mfrac>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b2;</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(5)</label>
</disp-formula>which constitute the pivotal equations of our model. Here, we introduce the <italic>shared conductivities</italic> <italic>x</italic>
<sub>
<italic>e</italic>
</sub> &#x2265; 0 and define <inline-formula id="inf9">
<mml:math id="m14">
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, taking values <inline-formula id="inf10">
<mml:math id="m15">
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
</inline-formula> and <inline-formula id="inf11">
<mml:math id="m16">
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula> on the auxiliary nodes. With <italic>L</italic>
<sub>
<italic>ij</italic>
</sub>[<italic>x</italic>] &#x3d; <italic>&#x2211;</italic>
<sub>
<italic>e</italic>
</sub>(<italic>x</italic>
<sub>
<italic>e</italic>
</sub>/<italic>C</italic>
<sub>
<italic>e</italic>
</sub>)<italic>B</italic>
<sub>
<italic>ie</italic>
</sub>
<italic>B</italic>
<sub>
<italic>je</italic>
</sub>, we denote the weighted Laplacian of <italic>K</italic>, where <italic>B</italic> is its signed incidence matrix and <italic>&#x2202;i</italic> is the neighborhood of node <italic>i</italic>. Lastly, <inline-formula id="inf12">
<mml:math id="m17">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> is the scalar potential acting on nodes for a given commodity <italic>a</italic>. The least-square solutions of Eq. <xref ref-type="disp-formula" rid="e4">4</xref> are <inline-formula id="inf13">
<mml:math id="m18">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2020;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>, where &#x2020; denotes the Moore&#x2013;Penrose inverse. The critical exponent 0 &#x3c; <italic>&#x3b2;</italic> &#x3c; 2 [&#x393; &#x3d; 2(2 &#x2212; <italic>&#x3b2;</italic>)/(3 &#x2212; <italic>&#x3b2;</italic>)] is a hyperparameter that needs to be chosen before solving Eqs <xref ref-type="disp-formula" rid="e4">4</xref> and <xref ref-type="disp-formula" rid="e5">5</xref>. Depending on the modeling task, its value can be fixed <italic>a priori</italic> (e.g., <italic>&#x3b2;</italic> &#x3d; 1 for the shortest path problem [<xref ref-type="bibr" rid="B34">34</xref>], <italic>&#x3b2;</italic> &#x2243; 5/3 for river networks [<xref ref-type="bibr" rid="B35">35</xref>], and <italic>&#x3b2;</italic> &#x2192; 2<sup>&#x2212;</sup> for the Steiner tree problem [<xref ref-type="bibr" rid="B36">36</xref>]) or cross-validated as we do here for image classification. The exponent aggregates paths using the principle of economy of scale if 1 &#x3c; <italic>&#x3b2;</italic> &#x3c; 2. It dilutes them along the network otherwise, with the goal of reducing traffic congestion. This behavior is a direct consequence of the subadditivity of <italic>J</italic>
<sub>&#x393;</sub> in Eq. <xref ref-type="disp-formula" rid="e2">2</xref> for <italic>&#x3b2;</italic> &#x3e; 1 (&#x393; &#x3c; 1), and, respectively, superadditivity for <italic>&#x3b2;</italic> &#x3c; 1 (&#x393; &#x3e; 1). It has been theoretically discussed and empirically observed, for example, in [<xref ref-type="bibr" rid="B32">32</xref>, <xref ref-type="bibr" rid="B37">37</xref>, <xref ref-type="bibr" rid="B38">38</xref>].</p>
<p>The feedback mechanism of Eq. <xref ref-type="disp-formula" rid="e5">5</xref> defines multicommodity fluxes <inline-formula id="inf14">
<mml:math id="m19">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> that are admissible for the minimization problem introduced in Eq. <xref ref-type="disp-formula" rid="e2">2</xref>. Particularly, for color of type <italic>a</italic> on edges <italic>e</italic> &#x3d; (<italic>i</italic>, <italic>j</italic>), we couple potentials <inline-formula id="inf15">
<mml:math id="m20">
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> that are the solutions of Eq. <xref ref-type="disp-formula" rid="e4">4</xref> and shared conductivities (<italic>x</italic>
<sub>
<italic>e</italic>
</sub>) to define<disp-formula id="e6">
<mml:math id="m21">
<mml:msubsup>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>C</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mo>&#x2200;</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
<mml:mi>a</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>M</mml:mi>
<mml:mo>.</mml:mo>
</mml:math>
<label>(6)</label>
</disp-formula>
</p>
<p>This also highlights another physical interpretation; i.e., by interpreting the <inline-formula id="inf16">
<mml:math id="m22">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> as pressure potentials, the fluxes are seen to arise from a difference in pressure between two nodes as in hydraulic or electrical networks. Crucially, this allocation is governed by <italic>one unique conductivity</italic> for all commodities, whose dynamics depends on the 2-norm over <italic>a</italic> of differences in potentials, as in Eq. <xref ref-type="disp-formula" rid="e5">5</xref>. In analogy with immiscible flows, this ensures that flows of different types share the same infrastructure, and in practice, it couples them into a unique optimization problem.</p>
<p>In the case of only one commodity (<italic>M</italic> &#x3d; 1), variants of this dynamics have been used to model transport optimization in various physical systems [<xref ref-type="bibr" rid="B1">1</xref>, <xref ref-type="bibr" rid="B5">5</xref>, <xref ref-type="bibr" rid="B29">29</xref>&#x2013;<xref ref-type="bibr" rid="B31">31</xref>].</p>
<p>The salient result of our construction is that the asymptotic trajectories of Eqs <xref ref-type="disp-formula" rid="e4">4</xref> and <xref ref-type="disp-formula" rid="e5">5</xref> are equivalent to the minimizers of Eq. <xref ref-type="disp-formula" rid="e2">2</xref>, i.e., lim<sub>
<italic>t</italic>&#x2192;&#x2b;<italic>&#x221e;</italic>
</sub>
<italic>P</italic>(<italic>t</italic>) &#x3d; <italic>P</italic>
<sup>&#x22c6;</sup> (see <xref ref-type="sec" rid="s10">Supplementary Material</xref> for derivations following [<xref ref-type="bibr" rid="B32">32</xref>, <xref ref-type="bibr" rid="B33">33</xref>]). Therefore, numerically integrating our dynamics solves the multicommodity OT problem. In other words, this allows us to estimate the optimal cost in Eq. <xref ref-type="disp-formula" rid="e2">2</xref> and use that to compute similarities between images. A pseudo-code of the algorithmic implementation is shown in <xref ref-type="statement" rid="Algorithm_1">Algorithm 1</xref>.</p>
<p>
<statement content-type="algorithm" id="Algorithm_1">
<label>Algorithm 1</label>
<p>Multicommodity dynamics.</p>
<p>
<inline-graphic xlink:href="fphy-11-1089114-fx1.tif"/>
</p>
</statement>
</p>
</sec>
<sec id="s3-3">
<title>3.3 Computational complexity</title>
<p>In principle, our multicommodity method has a computational complexity of order <italic>O</italic>(<italic>M</italic>&#x7c;<italic>V</italic>&#x7c;<sup>2</sup>) for complete transport network topologies, i.e., when edges in the transport network <italic>K</italic> are assigned to all pixel pairs. Nonetheless, we substantially reduce this complexity to <italic>O</italic>(<italic>M</italic>&#x7c;<italic>V</italic>&#x7c;) by sparsifying the graph with the trimming procedure of [<xref ref-type="bibr" rid="B22">22</xref>, <xref ref-type="bibr" rid="B23">23</xref>]. More details are given in <xref ref-type="sec" rid="s10">Supplementary Material</xref>. Empirically, we observe that by running Eqs <xref ref-type="disp-formula" rid="e4">4</xref> and <xref ref-type="disp-formula" rid="e5">5</xref>, most of the entries of <italic>x</italic> decay to zero after a few steps, producing a progressively sparser weighted Laplacian <italic>L</italic>[<italic>x</italic>]. This allows for faster computation of the Moore&#x2013;Penrose inverse <italic>L</italic>
<sup>&#x2020;</sup>[<italic>x</italic>] and least-square potentials <inline-formula id="inf17">
<mml:math id="m23">
<mml:msubsup>
<mml:mrow>
<mml:mi>&#x3d5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo movablelimits="false" form="prefix">&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi>L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2020;</mml:mo>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mo stretchy="false">[</mml:mo>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">]</mml:mo>
</mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>. A thorough experimental analysis of the convergence properties of the OT dynamics has been carried out in [<xref ref-type="bibr" rid="B39">39</xref>].</p>
</sec>
</sec>
<sec sec-type="results|discussion" id="s4">
<title>4 Results and discussion</title>
<sec id="s4-1">
<title>4.1 Classification task</title>
<p>We provide empirical evidence that our multicommodity dynamics outperforms competing OT algorithms on classification tasks. As anticipated previously, we use the OT optimal cost <inline-formula id="inf18">
<mml:math id="m24">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> as a measure of similarity between two images and perform supervised classification with a <italic>k</italic>-nearest neighbor (<italic>k</italic>-NN) classifier as described in [<xref ref-type="bibr" rid="B20">20</xref>]. Alternative methods (e.g., SVM as in [<xref ref-type="bibr" rid="B19">19</xref>]) could also be used for this task. However, these may require the cost <inline-formula id="inf19">
<mml:math id="m25">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> to satisfy the distance axioms to properly induce a kernel. While it is not straightforward to verify these conditions for the OT cost in Eq. <xref ref-type="disp-formula" rid="e2">2</xref>, this is not necessary for the <italic>k</italic>-NN classifier, which requires looser conditions on <inline-formula id="inf20">
<mml:math id="m26">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>.</p>
<p>We compare the classification accuracy of our model against i) the Sinkhorn algorithm [<xref ref-type="bibr" rid="B19">19</xref>, <xref ref-type="bibr" rid="B40">40</xref>] (utilizing the more stable Sinkhorn scheme proposed in [<xref ref-type="bibr" rid="B41">41</xref>]); ii) a unicommodity dynamics executed on grayscale images, i.e., with color information compressed into one single commodity (<italic>M</italic> &#x3d; 1); and iii) the Sinkhorn algorithm on grayscale images. All methods are tested on the following two datasets: the Jena Flowers 30 Dataset (JF30) [<xref ref-type="bibr" rid="B42">42</xref>] and the Fruit Dataset (FD) [<xref ref-type="bibr" rid="B43">43</xref>]. The first consists of 1,479 images of 30 wild-flowering angiosperms (flowers). Flowers are labeled with their species, and inferring them is the goal of the classification task. The second dataset contains 15 fruit types and 163 images. Here, we want to classify fruit types. The parameters of the OT problem setup (<italic>&#x3b8;</italic> and <italic>&#x3c4;</italic>) and regularization parameters (<italic>&#x3b2;</italic> and <italic>&#x25b;</italic>, which enforce the entropic barrier in the Sinkhorn algorithm [<xref ref-type="bibr" rid="B19">19</xref>]), have been cross-validated for both datasets (see <xref ref-type="sec" rid="s3">Section 3</xref> and <xref ref-type="sec" rid="s4">Section 4</xref> in <xref ref-type="sec" rid="s10">Supplementary Material</xref>). All methods are then tested in their optimal configurations (see <xref ref-type="sec" rid="s10">Supplementary Material</xref> for implementation details).</p>
<p>Classification results are shown in <xref ref-type="table" rid="T1">Table 1</xref>. In all cases, leveraging colors leads to higher accuracy (about an 8% increase) with respect to classification performed using grayscale images. This signals that in the datasets under consideration, color information is a relevant feature for differentiating image samples. Remarkably, we get a similar increase in performance (about 7%&#x2013;8%) on both colored datasets when comparing our multicommodity dynamics against the Sinkhorn algorithm. As the two algorithms use the same (colored) input, we can attribute this increment to the effective usage of color that our approach is capable of.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>Classification task results. With multicommodity, Sinkhorn RGB, unicommodity, and Sinkhorn GS, we label methods on colored images (the first two) and grayscale images (the second two). The optimal parameters in the central columns are selected with a 4-fold cross-validation; <italic>k</italic> is the number of nearest neighbors used in the classifier. The rightmost column shows the fraction (in percentage) of correctly classified images. Results are ordered by performance, and we highlight the best ones in bold.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th rowspan="2" align="left"/>
<th rowspan="2" align="center">Algorithm</th>
<th colspan="5" align="center">Hyperparameters</th>
<th align="center">Class accuracy</th>
</tr>
<tr>
<th align="center">
<italic>&#x3b8;</italic>
</th>
<th align="center">
<italic>&#x3c4;</italic>
</th>
<th align="center">
<italic>&#x3b2;</italic>
</th>
<th align="center">
<italic>&#x25b;</italic>
</th>
<th align="center">
<italic>k</italic>
</th>
<th align="center">[%] (<italic>&#x2191;</italic>)</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="4" align="left">JF30</td>
<td align="left">Multicommodity</td>
<td align="center">0.25</td>
<td align="center">0.125</td>
<td align="center">1</td>
<td align="center">&#x2014;</td>
<td align="center">1</td>
<td align="center">62.2</td>
</tr>
<tr>
<td align="left">Sinkhorn RGB</td>
<td align="center">0.25</td>
<td align="center">0.05</td>
<td align="center">&#x2014;</td>
<td align="center">100</td>
<td align="center">1</td>
<td align="center">58.4</td>
</tr>
<tr>
<td align="left">Sinkhorn GS</td>
<td align="center">0.25</td>
<td align="center">0.05</td>
<td align="center">&#x2014;</td>
<td align="center">500</td>
<td align="center">1</td>
<td align="center">54.3</td>
</tr>
<tr>
<td align="left">Unicommodity</td>
<td align="center">0.25</td>
<td align="center">0.125</td>
<td align="center">1.25</td>
<td align="center">&#x2014;</td>
<td align="center">1</td>
<td align="center">53.6</td>
</tr>
<tr>
<td rowspan="4" align="left">FD</td>
<td align="left">Multicommodity</td>
<td align="center">0</td>
<td align="center">0.04</td>
<td align="center">1.5</td>
<td align="center">&#x2014;</td>
<td align="center">2</td>
<td align="center">75.0</td>
</tr>
<tr>
<td align="left">Sinkhorn RGB</td>
<td align="center">0.5</td>
<td align="center">0.06</td>
<td align="center">&#x2014;</td>
<td align="center">750</td>
<td align="center">1</td>
<td align="center">69.6</td>
</tr>
<tr>
<td align="left">Unicommodity</td>
<td align="center">0</td>
<td align="center">0.06</td>
<td align="center">1.5</td>
<td align="center">&#x2014;</td>
<td align="center">5</td>
<td align="center">64.3</td>
</tr>
<tr>
<td align="left">Sinkhorn GS</td>
<td align="center">0.25</td>
<td align="center">0.06</td>
<td align="center">&#x2014;</td>
<td align="center">500</td>
<td align="center">4</td>
<td align="center">60.7</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>In addition, by analyzing results in more detail, we first observe that on JF30, all methods perform best when <italic>&#x3b8;</italic> &#x3d; 0.25, i.e., 25% of the information used to build <italic>C</italic> comes from colors. This trend does not recur on the FD, where both dynamics favor <italic>&#x3b8;</italic> &#x3d; 0 (Euclidean <italic>C</italic>). Hence, our model is able to leverage color information <italic>via</italic> the multicommodity OT dynamical formulation.</p>
<p>Second, on JF30, both dynamics perform best with <italic>&#x3c4;</italic> &#x3d; 0.125, contrary to Sinkhorn-based methods that prefer <italic>&#x3c4;</italic> &#x3d; 0.05. Thus, Sinkhorn&#x2019;s classification accuracy is negatively affected both by low <italic>&#x3c4;</italic>&#x2014;many edges of the transport network are cut&#x2014;and by large <italic>&#x3c4;</italic> &#x2014;noisy color information is used to build <italic>C</italic>. We do not observe this behavior in our model, where trimming fewer edges is advantageous. All optimal values of <italic>&#x3c4;</italic> are lower on the FD since the color distributions in this dataset are naturally light-tailed (see <xref ref-type="sec" rid="s10">Supplementary Material</xref>).</p>
<p>Lastly, we investigate the interplay between <italic>&#x3b8;</italic> and <italic>&#x3b2;</italic>. We notice that <italic>&#x3b8;</italic> &#x3d; 0 (FD) corresponds to higher <italic>&#x3b2;</italic> &#x3d; 1.5. Instead, for larger <italic>&#x3b8;</italic> &#x3d; 0.25 (JF30), the model prefers lower <italic>&#x3b2;</italic> (<italic>&#x3b2;</italic> &#x3d; 1 and 1.25 for the multicommodity and unicommodity dynamics, respectively). In the former case (<italic>&#x3b8;</italic> &#x3d; 0, <italic>C</italic>
<sub>
<italic>ij</italic>
</sub> is the Euclidean distance), the cost is equal to zero for pixels with the same locations. Thus, consolidation of transport paths&#x2014;large <italic>&#x3b2;</italic>&#x2014;is favored on cheap links. Instead, increasing <italic>&#x3b8;</italic> leads to more edges with comparable costs as colors distribute smoothly over images. In this second scenario, better performance is achieved with distributed transport paths, i.e., lower <italic>&#x3b2;</italic> (see <xref ref-type="sec" rid="s10">Supplementary Material</xref>).</p>
</sec>
<sec id="s4-2">
<title>4.2 Performance in terms of sensitivity</title>
<p>We assess the effectiveness of our method against benchmarks by comparing the sensitivity of our multicommodity dynamics and that of the Sinkhorn algorithm on the colored JF30 dataset. Specifically, we set all algorithm parameters to their best configurations, as shown in <xref ref-type="table" rid="T1">Table 1</xref>. Then, for each of the 30 classes in JF30, we compute its one-to-all sensitivity, i.e., the true positive rate. This is defined for any class <italic>c</italic> as<disp-formula id="e7">
<mml:math id="m27">
<mml:mi>S</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">T</mml:mi>
<mml:mi mathvariant="normal">P</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">T</mml:mi>
<mml:mi mathvariant="normal">P</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="normal">F</mml:mi>
<mml:mi mathvariant="normal">N</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:math>
<label>(7)</label>
</disp-formula>where TP(<italic>c</italic>) is the true positive rate, i.e., the number of images in <italic>c</italic> that are correctly classified; FN(<italic>c</italic>) is the false negative rate, i.e., the number of <italic>c</italic>-samples that are assigned a label different from <italic>c</italic>. Hence, Eq. <xref ref-type="disp-formula" rid="e7">7</xref> returns the probability that a sample is assigned label <italic>c</italic>, given that it belongs to <italic>c</italic>.</p>
<p>We find that our method robustly outperforms the Sinkhorn algorithm. Specifically, the multicommodity dynamics has the highest sensitivity 50% of the times&#x2014;15 classes out of a total of 30&#x2014;as shown in <xref ref-type="fig" rid="F2">Figure 2</xref>. For nine classes, Sinkhorn has higher sensitivity, and for six classes, both methods give the same values of <italic>S</italic>.Furthermore, we find that in 2/3 (20 out of 30) of the classes, the multicommodity dynamics returns <italic>S</italic>(<italic>c</italic>) &#x2265; 1/2. This means that our model predicts the correct label more than 50% of the time. In only three out of these 20 cases, Sinkhorn attains higher values of <italic>S</italic>, while in most instances where Sinkhorn outperforms our method, it has a lower sensitivity of <italic>S</italic> &#x3c; 1/2. Hence, this is the case in classes where both methods have difficulty distinguishing images.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Sensitivity on the JF30 dataset. Sensitivity values are shown for the multicommodity dynamics (blue circles) and for Sinkhorn RGB (red triangles). Markers are sorted in descending order of <italic>S</italic>, regardless of the method. Background colors are blue, red, and gray, when <italic>S</italic> is higher for the multicommodity method, the Sinkhorn algorithm, or none of them, respectively. In green, we plot frequency bars for all classes in the test set.</p>
</caption>
<graphic xlink:href="fphy-11-1089114-g002.tif"/>
</fig>
</sec>
<sec id="s4-3">
<title>4.3 The impact of colors</title>
<p>To further assess the significance of leveraging color information, we conduct three different experiments that highlight both qualitatively and quantitatively various performance differences between the unicommodity and multicommodity approaches. As the two share the same principled dynamics based on OT with the main difference being that multicommodity does not compress the color information, we can use this analysis to better understand how fully exploiting the color information drives better classification.</p>
<p>
<italic>Experiment 1: Landscape of optimal cost.</italic> Here, we focus on a qualitative comparison between the cost landscapes obtained with the two approaches. We consider the example of an individual image taken from the FD test set and plot the landscape of optimal costs <inline-formula id="inf21">
<mml:math id="m28">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> when comparing it to the train set. Results for the multicommodity dynamics (<italic>M</italic> &#x3d; 3) and the unicommodity dynamics (<italic>M</italic> &#x3d; 1) on grayscale images are shown in <xref ref-type="fig" rid="F3">Figure 3</xref>. Here, we highlight the five lowest values of the cost and mark them in green if they correspond to correctly classified train samples and in red otherwise. At first glance, one may conclude that their performance is identical (as both dynamics classify correctly three samples out of five), and we notice how the multicommodity dynamics consistently clusters them at the bottom of the cost landscape, thus ranking them in a better order. This may explain why the cross-validated best value of <italic>k</italic> (the number of nearest neighbors in the <italic>k</italic>-NN classifier) is higher for unicommodity methods in this dataset. On a larger sample of data, this results in better overall classification performance, as shown in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Evaluating the effect of colors. Experiment 1: The top black-framed image is the one to be classified. Predictions given by the multicommodity and unicommodity dynamics (those with lower <inline-formula id="inf22">
<mml:math id="m29">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>) are shown on the right side of the panel and are displayed in a sorted fashion from worst to best (from bottom to top). Experiment 2: The top right samples are the three test images to be classified. Middle and bottom rows are predictions given by the two dynamics. Markers, backgrounds, and test images shared a color code: red for apples, orange for apricots, and yellow for melons. In both panels, green circles and red crosses are used to highlight classified and misclassified images, respectively. All algorithms are executed with their optimal configurations listed in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
</caption>
<graphic xlink:href="fphy-11-1089114-g003.tif"/>
</fig>
<p>
<italic>Experiment 2: Controlling for shape.</italic> We further mark this tendency with a second experiment where we select a subset of the FD composed of images belonging to three classes of fruits that have similar shapes but different colors such as red apples, orange apricots, and yellow melons. As we expect shape to be less informative than colors in this custom set, we can assess the extent to which color plays a crucial role in the classification process. Specifically, the test set is made of three random samples, each drawn from one of these classes (top row of the rightmost panel) in <xref ref-type="fig" rid="F3">Figure 3</xref>, while the train set contains the remaining instances of the classes. We plot the cost landscape <inline-formula id="inf23">
<mml:math id="m30">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> for the train set and draw in the red, orange, and yellow values of <inline-formula id="inf24">
<mml:math id="m31">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> that correspond to the samples that are compared against the test apple, apricot, and melon, respectively. We also sort the train samples so that they are grouped in three regions (highlighted by the background color in <xref ref-type="fig" rid="F3">Figure 3</xref>), which correspond to train melons, apricots, and apples. With this construction, if the minimum cost among the yellow markers falls in the yellow region, it will correspond to a correctly classified sample (respectively, for orange and red). We further mark the yellow, orange, and red minima in green if the test and train labels correspond, i.e., the marker&#x2019;s and background colors are the same, and in red otherwise. Train and test samples are also in <xref ref-type="fig" rid="F3">Figure 3</xref>. The multicommodity dynamics correctly label each test image. In contrast, unicommodity dynamics fails at this task, labeling a melon as an apricot. This suggests that the multicommodity approach is able to use the color information in datasets where this feature is more informative than others, e.g., shape.</p>
<p>
<italic>Experiment 3: When shape matters.</italic> Having shown results on a custom dataset where shape was controlled to matter less, we now do the opposite and select a dataset where this feature should be more informative. The goal is to assess whether a multicommodity approach helps in this case as well, as its main input information may not be as relevant anymore. Specifically, we select as a test sample a cherry, whose form is arguably distinguishable from that of many other fruits in the dataset. One can expect that comparing it against the train set of the FD will result in having both unicommodity and multicommodity dynamics able to assign low <inline-formula id="inf25">
<mml:math id="m32">
<mml:msubsup>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x22c6;</mml:mo>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> to train cherries and higher costs to other fruits. This intuition is confirmed by the results in <xref ref-type="fig" rid="F4">Figure 4</xref>. Here, train cherries (in green) strongly cluster in the lower portion of the cost landscape, whereas all the other fruits have higher costs. In <xref ref-type="fig" rid="F4">Figure 4</xref>, we also plot some of the correctly classified train samples. These results suggest that when color information is negligible compared to another type of information (e.g., shape), unicommodity and multicommodity formulations perform similarly. In light of this, we reinforce the claim that our multicommodity formulation can boost classification in contexts where color information does matter but may not give any advantage when other types of information are more informative. We encourage practitioners to evaluate when this is the case based on domain knowledge when available.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Evaluating the importance of colors: when shapes matter most. Experiment 3: The top black-framed image is the one to be classified. The best three (out of 10) predictions returned by the two dynamics are shown on the right. We mark the training samples belonging to the same class as the test image with green circles. All algorithms are executed with their optimal configurations listed in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
</caption>
<graphic xlink:href="fphy-11-1089114-g004.tif"/>
</fig>
</sec>
</sec>
<sec sec-type="conclusion" id="s5">
<title>5 Conclusion</title>
<p>We propose a physics-informed multicommodity OT formulation for effectively using color information to improve image classification. We model colors as immiscible flows traveling on a capacitated network and propose equations for its dynamics, with the goal of optimizing flow distribution on edges. Color flows are regulated by a shared conductivity to minimize a unique cost function. Thresholding the ground cost as in [<xref ref-type="bibr" rid="B22">22</xref>, <xref ref-type="bibr" rid="B23">23</xref>] makes our model computationally efficient.</p>
<p>We outperform other OT-based approaches such as the Sinkhorn algorithm on two datasets where color matters. Our model also assigns a lower cost to correctly classified images than its unicommodity counterpart, and it is more robust on datasets where items have similar shape. Thus, color information is distinctly relevant. We note that for some datasets, color information may not matter as much as another type of information (e.g., shape), which has stronger discriminative power. However, while we focused here on different color channels as the different commodities in our formulation, the ideas of this study can be extended to scenarios where other relevant information can be distinguished into different types. For instance, one could combine several features together, e.g., colors, contours, and objects&#x2019; orientations when available.</p>
<p>Our model can be further improved. While it uses the thresholding of [<xref ref-type="bibr" rid="B22">22</xref>, <xref ref-type="bibr" rid="B23">23</xref>] to speed up convergence (as mentioned in <xref ref-type="sec" rid="s3-1">Section 3.1</xref>), it is still slower than Sinkhorn-based methods. Hence, investigating approaches aimed at improving its computational performance is an important direction for future work. Speed-up can be achieved, for example, with the implementation of [<xref ref-type="bibr" rid="B39">39</xref>], where the unicommodity OT problem on sparse topologies is solved in <italic>O</italic>(&#x7c;<italic>E</italic>&#x7c;<sup>0.36</sup>) time steps. This bound has been found using a backward Euler scheme combined with the inexact Newton&#x2013;Raphson method for the update of <italic>x</italic> and solving Kirchhoff&#x2019;s law using an algebraic multigrid method [<xref ref-type="bibr" rid="B44">44</xref>].</p>
<p>Our main goal is to frame an image classification task into that of finding optimal flows of masses of different types in networks built from images. We follow physics principles to assess whether using colors as immiscible flows can give an advantage compared to other standard OT-based methods that do not incorporate such insights. The increased classification performance observed in our experiments stimulates the integration of similar ideas into deep network architectures [<xref ref-type="bibr" rid="B45">45</xref>] as a relevant avenue for future work. Combining their prediction capabilities with our insights on how to better exploit the various facets of the input data has the potential to push the performance of deep classifiers even further. For example, one could extend the state-of-the-art architecture of Eisenberger et al. [<xref ref-type="bibr" rid="B45">45</xref>], which efficiently computes implicit gradients for generic Sinkhorn layers within a neural network, by including edge, shape, and contour information for Wasserstein barycenter computation or image clustering.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s6">
<title>Data availability statement</title>
<p>The original contributions presented in the study are publicly available. This data can be found here: <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.7910/DVN/QDHYST">https://doi.org/10.7910/DVN/QDHYST</ext-link>, <ext-link ext-link-type="uri" xlink:href="https://github.com/daniloeler/fruitdataset">https://github.com/daniloeler/fruitdataset</ext-link>.</p>
</sec>
<sec id="s7">
<title>Author contributions</title>
<p>All authors contributed to developing the models, conceiving the experiments, analyzing the results, and reviewing the manuscript. AL and DB conducted the experiments. All authors read and agreed to the published version of the manuscript.</p>
</sec>
<ack>
<p>The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting AL and DB.</p>
</ack>
<sec sec-type="COI-statement" id="s8">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s9">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<sec id="s10">
<title>Supplementary material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="https://www.frontiersin.org/articles/10.3389/fphy.2023.1089114/full#supplementary-material">https://www.frontiersin.org/articles/10.3389/fphy.2023.1089114/full&#x23;supplementary-material</ext-link>
</p>
<supplementary-material xlink:href="DataSheet1.PDF" id="SM1" mimetype="application/PDF" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<label>1.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Kaiser</surname>
<given-names>F</given-names>
</name>
<name>
<surname>Ronellenfitsch</surname>
<given-names>H</given-names>
</name>
<name>
<surname>Witthaut</surname>
<given-names>D</given-names>
</name>
</person-group>. <article-title>Discontinuous transition to loop formation in optimal supply networks</article-title>. <source>Nat Commun</source> (<year>2020</year>) <volume>11</volume>:<fpage>5796</fpage>&#x2013;<lpage>11</lpage>. <pub-id pub-id-type="doi">10.1038/s41467-020-19567-2</pub-id>
</citation>
</ref>
<ref id="B2">
<label>2.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lonardi</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Putti</surname>
<given-names>M</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Multicommodity routing optimization for engineering networks</article-title>. <source>Scientific Rep</source> (<year>2022</year>) <volume>12</volume>:<fpage>7474</fpage>. <pub-id pub-id-type="doi">10.1038/s41598-022-11348-9</pub-id>
</citation>
</ref>
<ref id="B3">
<label>3.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Lonardi</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Facca</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Putti</surname>
<given-names>M</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <source>Infrastructure adaptation and emergence of loops in network routing with time-dependent loads</source>. <comment>arXiv</comment> (<year>2021</year>). <pub-id pub-id-type="doi">10.48550/ARXIV.2112.10620</pub-id>
</citation>
</ref>
<ref id="B4">
<label>4.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Demetci</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Santorella</surname>
<given-names>R</given-names>
</name>
<name>
<surname>Sandstede</surname>
<given-names>B</given-names>
</name>
<name>
<surname>Noble</surname>
<given-names>WS</given-names>
</name>
<name>
<surname>Singh</surname>
<given-names>R</given-names>
</name>
</person-group>. <source>Gromov-Wasserstein optimal transport to align single-cell multi-omics data</source>. <comment>bioRxiv</comment> (<year>2020</year>). <pub-id pub-id-type="doi">10.1101/2020.04.28.066787</pub-id>
</citation>
</ref>
<ref id="B5">
<label>5.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Katifori</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Sz&#xf6;ll&#x151;si</surname>
<given-names>GJ</given-names>
</name>
<name>
<surname>Magnasco</surname>
<given-names>MO</given-names>
</name>
</person-group>. <article-title>Damage and fluctuations induce loops in optimal transport networks</article-title>. <source>Phys Rev Lett</source> (<year>2010</year>) <volume>104</volume>:<fpage>048704</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.104.048704</pub-id>
</citation>
</ref>
<ref id="B6">
<label>6.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Werman</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Peleg</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Rosenfeld</surname>
<given-names>A</given-names>
</name>
</person-group>. <article-title>A distance metric for multidimensional histograms</article-title>. <source>Comput Vis Graphics, Image Process</source> (<year>1985</year>) <volume>32</volume>:<fpage>328</fpage>&#x2013;<lpage>36</lpage>. <pub-id pub-id-type="doi">10.1016/0734-189X(85)90055-6</pub-id>
</citation>
</ref>
<ref id="B7">
<label>7.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Peleg</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Werman</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Rom</surname>
<given-names>H</given-names>
</name>
</person-group>. <article-title>A unified approach to the change of resolution: Space and gray-level</article-title>. <source>IEEE Trans Pattern Anal Machine Intelligence</source> (<year>1989</year>) <volume>11</volume>:<fpage>739</fpage>&#x2013;<lpage>42</lpage>. <pub-id pub-id-type="doi">10.1109/34.192468</pub-id>
</citation>
</ref>
<ref id="B8">
<label>8.</label>
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Rubner</surname>
<given-names>Y</given-names>
</name>
<name>
<surname>Tomasi</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Guibas</surname>
<given-names>LJ</given-names>
</name>
</person-group>. <article-title>A metric for distributions with applications to image databases</article-title>. In: <conf-name>Sixth International Conference on Computer Vision (IEEE Cat. No.98CH36271)</conf-name>. <publisher-loc>Bombay, India</publisher-loc>: <publisher-name>IEEE</publisher-name> (<year>1998</year>). p. <fpage>59</fpage>&#x2013;<lpage>66</lpage>. <pub-id pub-id-type="doi">10.1109/ICCV.1998.710701</pub-id>
</citation>
</ref>
<ref id="B9">
<label>9.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Rubner</surname>
<given-names>Y</given-names>
</name>
<name>
<surname>Tomasi</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Guibas</surname>
<given-names>LJ</given-names>
</name>
</person-group>. <article-title>The earth mover&#x2019;s distance as a metric for image retrieval</article-title>. <source>Int J Comput Vis</source> (<year>2000</year>) <volume>40</volume>:<fpage>99</fpage>&#x2013;<lpage>121</lpage>. <pub-id pub-id-type="doi">10.1023/A:1026543900054</pub-id>
</citation>
</ref>
<ref id="B10">
<label>10.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Baptista</surname>
<given-names>D</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Principled network extraction from images</article-title>. <source>R Soc Open Sci</source> (<year>2021</year>) <volume>8</volume>:<fpage>210025</fpage>. <pub-id pub-id-type="doi">10.1098/rsos.210025</pub-id>
</citation>
</ref>
<ref id="B11">
<label>11.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Peyr&#xe9;</surname>
<given-names>G</given-names>
</name>
<name>
<surname>Cuturi</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>Computational optimal transport: With applications to data science</article-title>. <source>Foundations Trends&#xae; Machine Learn</source> (<year>2019</year>) <volume>11</volume>:<fpage>355</fpage>&#x2013;<lpage>607</lpage>. <pub-id pub-id-type="doi">10.1561/2200000073</pub-id>
</citation>
</ref>
<ref id="B12">
<label>12.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Koehl</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Delarue</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Orland</surname>
<given-names>H</given-names>
</name>
</person-group>. <article-title>Optimal transport at finite temperature</article-title>. <source>Phys Rev E</source> (<year>2019</year>) <volume>100</volume>:<fpage>013310</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevE.100.013310</pub-id>
</citation>
</ref>
<ref id="B13">
<label>13.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Aurell</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Mej&#xed;a-Monasterio</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Muratore-Ginanneschi</surname>
<given-names>P</given-names>
</name>
</person-group>. <article-title>Optimal protocols and optimal transport in stochastic thermodynamics</article-title>. <source>Phys Rev Lett</source> (<year>2011</year>) <volume>106</volume>:<fpage>250601</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.106.250601</pub-id>
</citation>
</ref>
<ref id="B14">
<label>14.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Leite</surname>
<given-names>D</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <source>Revealing the similarity between urban transportation networks and optimal transport-based infrastructures</source>. <comment>
<italic>arXiv preprint arXiv:2209.06751</italic>
</comment> (<year>2022</year>).</citation>
</ref>
<ref id="B15">
<label>15.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Baptista</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Leite</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Facca</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Putti</surname>
<given-names>M</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Network extraction by routing optimization</article-title>. <source>Scientific Rep</source> (<year>2020</year>) <volume>10</volume>:<fpage>20806</fpage>. <pub-id pub-id-type="doi">10.1038/s41598-020-77064-4</pub-id>
</citation>
</ref>
<ref id="B16">
<label>16.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ibrahim</surname>
<given-names>AA</given-names>
</name>
<name>
<surname>Lonardi</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Bacco</surname>
<given-names>CD</given-names>
</name>
</person-group>. <article-title>Optimal transport in multilayer networks for traffic flow optimization</article-title>. <source>Algorithms</source> (<year>2021</year>) <volume>14</volume>:<fpage>189</fpage>. <pub-id pub-id-type="doi">10.3390/a14070189</pub-id>
</citation>
</ref>
<ref id="B17">
<label>17.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Mondino</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Suhr</surname>
<given-names>S</given-names>
</name>
</person-group>. <article-title>An optimal transport formulation of the Einstein equations of general relativity</article-title>. <source>J Eur Math Soc</source> (<year>2022</year>). <pub-id pub-id-type="doi">10.4171/JEMS/1188</pub-id>
</citation>
</ref>
<ref id="B18">
<label>18.</label>
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Grauman</surname>
<given-names>K</given-names>
</name>
<name>
<surname>Darrell</surname>
<given-names>T</given-names>
</name>
</person-group>. <article-title>Fast contour matching using approximate Earth mover&#x2019;s distance</article-title>. In: <conf-name>Proceedings of the 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2004. CVPR 2004</conf-name>; <conf-date>27 June 2004 - 02 July 2004</conf-date>. <publisher-loc>Washington, DC, USA</publisher-loc>: <publisher-name>IEEE</publisher-name> (<year>2004</year>). <pub-id pub-id-type="doi">10.1109/CVPR.2004.1315035</pub-id>
</citation>
</ref>
<ref id="B19">
<label>19.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Cuturi</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>Sinkhorn distances: Lightspeed computation of optimal transport</article-title>. In: <source>Advances in neural information processing systems</source>, <volume>Vol. 26</volume>. <publisher-loc>Red Hook, NY, USA</publisher-loc>: <publisher-name>Curran Associates, Inc.</publisher-name> (<year>2013</year>). p. <fpage>2292</fpage>&#x2013;<lpage>300</lpage>.</citation>
</ref>
<ref id="B20">
<label>20.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Koehl</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Delarue</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Orland</surname>
<given-names>H</given-names>
</name>
</person-group>. <article-title>Statistical physics approach to the optimal transport problem</article-title>. <source>Phys Rev Lett</source> (<year>2019</year>) <volume>123</volume>:<fpage>040603</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.123.040603</pub-id>
</citation>
</ref>
<ref id="B21">
<label>21.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Thorpe</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Park</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Kolouri</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Rohde</surname>
<given-names>GK</given-names>
</name>
<name>
<surname>Slep&#x10d;ev</surname>
<given-names>D</given-names>
</name>
</person-group>. <article-title>A transportation <italic>L</italic>
<sup>p</sup> distance for signal analysis</article-title>. <source>J Math Imaging Vis</source> (<year>2017</year>) <volume>59</volume>:<fpage>187</fpage>&#x2013;<lpage>210</lpage>. <pub-id pub-id-type="doi">10.1007/s10851-017-0726-4</pub-id>
</citation>
</ref>
<ref id="B22">
<label>22.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Pele</surname>
<given-names>O</given-names>
</name>
<name>
<surname>Werman</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>A linear time histogram metric for improved SIFT matching</article-title>. In: <source>Computer vision &#x2013; ECCV 2008</source>. <publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer Berlin Heidelberg</publisher-name> (<year>2008</year>). p. <fpage>495</fpage>&#x2013;<lpage>508</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-540-88690-7_37</pub-id>
</citation>
</ref>
<ref id="B23">
<label>23.</label>
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Pele</surname>
<given-names>O</given-names>
</name>
<name>
<surname>Werman</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>Fast and robust earth mover&#x2019;s distances</article-title>. In: <conf-name>2009 IEEE 12th International Conference on Computer Vision</conf-name>. <publisher-loc>Kyoto, Japan</publisher-loc>: <publisher-name>IEEE</publisher-name> (<year>2009</year>). p. <fpage>460</fpage>&#x2013;<lpage>7</lpage>. <pub-id pub-id-type="doi">10.1109/ICCV.2009.5459199</pub-id>
</citation>
</ref>
<ref id="B24">
<label>24.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Villani</surname>
<given-names>C</given-names>
</name>
</person-group>. In: <source>Optimal transport: Old and new</source>, <volume>Vol. 338</volume>. <publisher-loc>Berlin, Heidelberg</publisher-loc>: <publisher-name>Springer</publisher-name> (<year>2009</year>). <pub-id pub-id-type="doi">10.1007/978-3-540-71050-9</pub-id>
</citation>
</ref>
<ref id="B25">
<label>25.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Arjovsky</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Chintala</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Bottou</surname>
<given-names>L</given-names>
</name>
</person-group>. <article-title>Wasserstein generative adversarial networks</article-title>. In: <person-group person-group-type="editor">
<name>
<surname>Precup</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Teh</surname>
<given-names>YW</given-names>
</name>
</person-group>, editors. <source>Proceedings of the 34th international conference on machine learning (PMLR)</source>. <source>Proceedings of machine learning research</source>, <volume>Vol. 70</volume> (<year>2017</year>). p. <fpage>214</fpage>&#x2013;<lpage>23</lpage>.</citation>
</ref>
<ref id="B26">
<label>26.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Lin</surname>
<given-names>T</given-names>
</name>
<name>
<surname>Ho</surname>
<given-names>N</given-names>
</name>
<name>
<surname>Jordan</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>On efficient optimal transport: An analysis of greedy and accelerated mirror descent algorithms</article-title>. In: <source>Proceedings of the 36th international conference on machine learning (PMLR)</source>. In: <source>Proceedings of machine learning research</source>, <volume>Vol. 97</volume> (<year>2019</year>). p. <fpage>3982</fpage>&#x2013;<lpage>91</lpage>.</citation>
</ref>
<ref id="B27">
<label>27.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Dvurechensky</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Gasnikov</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Kroshnin</surname>
<given-names>A</given-names>
</name>
</person-group>. <article-title>Computational optimal transport: Complexity by accelerated gradient descent is better than by Sinkhorn&#x2019;s algorithm</article-title>. In: <source>Proceedings of the 35th international conference on machine learning (PMLR)</source>. In: <source>Proceedings of machine learning research</source>, <volume>Vol. 80</volume> (<year>2018</year>). p. <fpage>1367</fpage>&#x2013;<lpage>76</lpage>.</citation>
</ref>
<ref id="B28">
<label>28.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Banavar</surname>
<given-names>JR</given-names>
</name>
<name>
<surname>Colaiori</surname>
<given-names>F</given-names>
</name>
<name>
<surname>Flammini</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Maritan</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Rinaldo</surname>
<given-names>A</given-names>
</name>
</person-group>. <article-title>Topology of the fittest transportation network</article-title>. <source>Phys Rev Lett</source> (<year>2000</year>) <volume>84</volume>:<fpage>4745</fpage>&#x2013;<lpage>8</lpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.84.4745</pub-id>
</citation>
</ref>
<ref id="B29">
<label>29.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ronellenfitsch</surname>
<given-names>H</given-names>
</name>
<name>
<surname>Katifori</surname>
<given-names>E</given-names>
</name>
</person-group>. <article-title>Global optimization, local adaptation, and the role of growth in distribution networks</article-title>. <source>Phys Rev Lett</source> (<year>2016</year>) <volume>117</volume>:<fpage>138301</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.117.138301</pub-id>
</citation>
</ref>
<ref id="B30">
<label>30.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hu</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Cai</surname>
<given-names>D</given-names>
</name>
</person-group>. <article-title>Adaptation and optimization of biological transport networks</article-title>. <source>Phys Rev Lett</source> (<year>2013</year>) <volume>111</volume>:<fpage>138701</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.111.138701</pub-id>
</citation>
</ref>
<ref id="B31">
<label>31.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Corson</surname>
<given-names>F</given-names>
</name>
</person-group>. <article-title>Fluctuations and redundancy in optimal transport networks</article-title>. <source>Phys Rev Lett</source> (<year>2010</year>) <volume>104</volume>:<fpage>048703</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.104.048703</pub-id>
</citation>
</ref>
<ref id="B32">
<label>32.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lonardi</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Facca</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Putti</surname>
<given-names>M</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Designing optimal networks for multicommodity transport problem</article-title>. <source>Phys Rev Res</source> (<year>2021</year>) <volume>3</volume>:<fpage>043010</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevResearch.3.043010</pub-id>
</citation>
</ref>
<ref id="B33">
<label>33.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bonifaci</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Facca</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Folz</surname>
<given-names>F</given-names>
</name>
<name>
<surname>Karrenbauer</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Kolev</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Mehlhorn</surname>
<given-names>K</given-names>
</name>
<etal/>
</person-group> <article-title>Physarum-inspired multi-commodity flow dynamics</article-title>. <source>Theor Comput Sci</source> (<year>2022</year>) <volume>920</volume>:<fpage>1</fpage>&#x2013;<lpage>20</lpage>. <pub-id pub-id-type="doi">10.1016/j.tcs.2022.02.001</pub-id>
</citation>
</ref>
<ref id="B34">
<label>34.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bonifaci</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Mehlhorn</surname>
<given-names>K</given-names>
</name>
<name>
<surname>Varma</surname>
<given-names>G</given-names>
</name>
</person-group>. <article-title>Physarum can compute shortest paths</article-title>. <source>J Theor Biol</source> (<year>2012</year>) <volume>309</volume>:<fpage>121</fpage>&#x2013;<lpage>33</lpage>. <pub-id pub-id-type="doi">10.1016/j.jtbi.2012.06.017</pub-id>
</citation>
</ref>
<ref id="B35">
<label>35.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Rinaldo</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Rodriguez-Iturbe</surname>
<given-names>I</given-names>
</name>
<name>
<surname>Rigon</surname>
<given-names>R</given-names>
</name>
<name>
<surname>Ijjasz-Vasquez</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Bras</surname>
<given-names>RL</given-names>
</name>
</person-group>. <article-title>Self-organized fractal river networks</article-title>. <source>Phys Rev Lett</source> (<year>1993</year>) <volume>70</volume>:<fpage>822</fpage>&#x2013;<lpage>5</lpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.70.822</pub-id>
</citation>
</ref>
<ref id="B36">
<label>36.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Barab&#xe1;si</surname>
<given-names>AL</given-names>
</name>
</person-group>. <article-title>Invasion percolation and global optimization</article-title>. <source>Phys Rev Lett</source> (<year>1996</year>) <volume>76</volume>:<fpage>3750</fpage>&#x2013;<lpage>3</lpage>. <pub-id pub-id-type="doi">10.1103/PhysRevLett.76.3750</pub-id>
</citation>
</ref>
<ref id="B37">
<label>37.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Santambrogio</surname>
<given-names>F</given-names>
</name>
</person-group>. <article-title>Optimal channel networks, landscape function and branched transport</article-title>. <source>Inter Free Boundaries</source> (<year>2007</year>) <volume>9</volume>:<fpage>149</fpage>&#x2013;<lpage>69</lpage>. <pub-id pub-id-type="doi">10.4171/IFB/160</pub-id>
</citation>
</ref>
<ref id="B38">
<label>38.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ibrahim</surname>
<given-names>AA</given-names>
</name>
<name>
<surname>Leite</surname>
<given-names>D</given-names>
</name>
<name>
<surname>De Bacco</surname>
<given-names>C</given-names>
</name>
</person-group>. <article-title>Sustainable optimal transport in multilayer networks</article-title>. <source>Phys Rev E</source> (<year>2022</year>) <volume>105</volume>:<fpage>064302</fpage>. <pub-id pub-id-type="doi">10.1103/PhysRevE.105.064302</pub-id>
</citation>
</ref>
<ref id="B39">
<label>39.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Facca</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Benzi</surname>
<given-names>M</given-names>
</name>
</person-group>. <article-title>Fast iterative solution of the optimal transport problem on graphs</article-title>. <source>SIAM J Scientific Comput</source> (<year>2021</year>) <volume>43</volume>:<fpage>A2295</fpage>&#x2013;<lpage>A2319</lpage>. <pub-id pub-id-type="doi">10.1137/20M137015X</pub-id>
</citation>
</ref>
<ref id="B40">
<label>40.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Flamary</surname>
<given-names>R</given-names>
</name>
<name>
<surname>Courty</surname>
<given-names>N</given-names>
</name>
<name>
<surname>Gramfort</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Alaya</surname>
<given-names>MZ</given-names>
</name>
<name>
<surname>Boisbunon</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Chambon</surname>
<given-names>S</given-names>
</name>
<etal/>
</person-group> <article-title>POT: Python optimal transport</article-title>. <source>J Machine Learn Res</source> (<year>2021</year>) <volume>22</volume>:<fpage>1</fpage>&#x2013;<lpage>8</lpage>.</citation>
</ref>
<ref id="B41">
<label>41.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schmitzer</surname>
<given-names>B</given-names>
</name>
</person-group>. <article-title>Stabilized sparse scaling algorithms for entropy regularized transport problems</article-title>. <source>SIAM J Scientific Comput</source> (<year>2019</year>) <volume>41</volume>:<fpage>A1443</fpage>&#x2013;<lpage>A1481</lpage>. <pub-id pub-id-type="doi">10.1137/16M1106018</pub-id>
</citation>
</ref>
<ref id="B42">
<label>42.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Seeland</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Rzanny</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Alaqraa</surname>
<given-names>N</given-names>
</name>
<name>
<surname>W&#xe4;ldchen</surname>
<given-names>J</given-names>
</name>
<name>
<surname>M&#xe4;der</surname>
<given-names>P</given-names>
</name>
</person-group>. <source>Jena Flowers 30 dataset</source> (<year>2017</year>). <pub-id pub-id-type="doi">10.7910/DVN/QDHYST</pub-id>
</citation>
</ref>
<ref id="B43">
<label>43.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Macanh&#xe3;</surname>
<given-names>PA</given-names>
</name>
<name>
<surname>Eler</surname>
<given-names>DM</given-names>
</name>
<name>
<surname>Garcia</surname>
<given-names>RE</given-names>
</name>
<name>
<surname>Junior</surname>
<given-names>WEM</given-names>
</name>
</person-group>. <article-title>Handwritten feature descriptor methods applied to fruit classification</article-title>. In: <source>Information Technology - new generations</source>. <publisher-loc>Cham</publisher-loc>: <publisher-name>Springer International Publishing</publisher-name> (<year>2018</year>). p. <fpage>699</fpage>&#x2013;<lpage>705</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-319-54978-1_87</pub-id>
</citation>
</ref>
<ref id="B44">
<label>44.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Trottenberg</surname>
<given-names>U</given-names>
</name>
<name>
<surname>Oosterlee</surname>
<given-names>CW</given-names>
</name>
<name>
<surname>Schuller</surname>
<given-names>A</given-names>
</name>
</person-group>. <source>Multigrid</source>. <publisher-loc>Amsterdam, Netherlands</publisher-loc>: <publisher-name>Elsevier</publisher-name> (<year>2000</year>).</citation>
</ref>
<ref id="B45">
<label>45.</label>
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Eisenberger</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Toker</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Leal-Taix&#xe9;</surname>
<given-names>L</given-names>
</name>
<name>
<surname>Bernard</surname>
<given-names>F</given-names>
</name>
<name>
<surname>Cremers</surname>
<given-names>D</given-names>
</name>
</person-group>. <article-title>A unified framework for implicit sinkhorn differentiation</article-title>. In: <conf-name>Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</conf-name> (<year>2022</year>). p. <fpage>509</fpage>&#x2013;<lpage>18</lpage>.</citation>
</ref>
<ref id="B46">
<label>46.</label>
<citation citation-type="book">
<source>MODI (Open Source code implementation)</source> (<year>2022</year>). <comment>Available from: <ext-link ext-link-type="uri" xlink:href="https://github.com/aleable/MODI">https://github.com/aleable/MODI</ext-link>
</comment>.</citation>
</ref>
</ref-list>
</back>
</article>