<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Learning-Augmented Algorithms for Online Steiner Tree</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>06/30/2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10351515</idno>
					<idno type="doi">10.1609/aaai.v36i8.20854</idno>
					<title level='j'>Proceedings of the AAAI Conference on Artificial Intelligence</title>
<idno>2159-5399</idno>
<biblScope unit="volume">36</biblScope>
<biblScope unit="issue">8</biblScope>					

					<author>Chenyang Xu</author><author>Benjamin Moseley</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[This paper considers the recently popular beyond-worst-case algorithm analysis model which integrates machine-learned predictions with online algorithm design. We consider the online Steiner tree problem in this model for both directed and undirected graphs. Steiner tree is known to have strong lower bounds in the online setting and any algorithm’s worst-case guarantee is far from desirable.  This paper considers algorithms that predict which terminal arrives online. The predictions may be incorrect and the algorithms’ performance is parameterized by the number of incorrectly predicted terminals. These guarantees ensure that algorithms break through the online lower bounds with good predictions and the competitive ratio gracefully degrades as the prediction error grows. We then observe that the theory is predictive of what will occur empirically. We show on graphs where terminals are drawn from a distribution, the new online algorithms have strong performance even with modestly correct predictions.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Introduction</head><p>An emerging line of work on beyond-worst-case algorithms makes use of machine learning for algorithmic design. This line of work suggests that there is an opportunity to advance the area of beyond-worst-case algorithmics and analysis by augmenting combinatorial algorithms with machine learned predictions. Such algorithms perform better than worst-case bounds with accurate predictions while retaining the worstcase guarantees even with erroneous predictions. There has been significant interest in this area (e.g. <ref type="bibr">(Gupta and Roughgarden 2017;</ref><ref type="bibr">Balcan et al. 2018;</ref><ref type="bibr">Balcan, Dick, and White 2018;</ref><ref type="bibr">Chawla et al. 2020;</ref><ref type="bibr">Kraska et al. 2018;</ref><ref type="bibr">Lykouris and Vassilvtiskii 2018;</ref><ref type="bibr">Purohit, Svitkina, and Kumar 2018;</ref><ref type="bibr">Lattanzi et al. 2020)</ref>).</p><p>Online Learning-Augmented Algorithms. This paper considers the augmenting model in the online setting where algorithms make decisions over time without knowledge of the future. In this model, an algorithm is given access to a learned prediction about the problem instance. The learned prediction is error prone and the performance of the algorithm is expected to be bounded in terms of the prediction's quality. The quality measure is prediction specific. The performance measure is the competitive ratio where an algorithm is c-competitive if the algorithm's objective value is at most a c factor larger than the optimal objective value for every input. In the learning-augmented algorithms model, finding appropriate parameters to predict and making the algorithm robust to the prediction error are usually key algorithmic challenges.</p><p>Many online problems have been considered in this context, such as caching <ref type="bibr">(Lykouris and Vassilvtiskii 2018;</ref><ref type="bibr">Rohatgi 2020;</ref><ref type="bibr">Jiang, Panigrahi, and Sun 2020;</ref><ref type="bibr">Wei 2020)</ref>, page migration <ref type="bibr">(Indyk et al. 2020)</ref>, metrical task systems <ref type="bibr">(Antoniadis et al. 2020a)</ref>, ski rental <ref type="bibr">(Purohit, Svitkina, and Kumar 2018;</ref><ref type="bibr">Gollapudi and Panigrahi 2019;</ref><ref type="bibr">Anand, Ge, and Panigrahi 2020)</ref>, scheduling <ref type="bibr">(Purohit, Svitkina, and Kumar 2018;</ref><ref type="bibr">Im et al. 2021)</ref>, load balancing <ref type="bibr">(Lattanzi et al. 2020)</ref>, online linear optimization <ref type="bibr">(Bhaskara et al. 2020)</ref>, online flow allocation <ref type="bibr">(Lavastida et al. 2021)</ref>, speed scaling <ref type="bibr">(Bamas et al. 2020)</ref>, set cover <ref type="bibr">(Bamas, Maggiori, and Svensson 2020)</ref>, and bipartite matching and secretary problems <ref type="bibr">(Antoniadis et al. 2020b)</ref>.</p><p>The Steiner Tree Problem. Steiner tree is one of the most fundamental combinatorial optimization problems. For undirected Steiner tree, there is an undirected graph G = (V, E) where each edge e &#8712; E has a cost c e and a terminal set T &#8838; V . We need to buy edges in E such that all terminals are connected via the bought edges and the goal is to minimize the total cost of the bought edges. For the directed case, the edges are directed and there is a root node r. In this problem all of the terminals must have a directed path to the root via the edges bought.</p><p>Theoretically, the problem has been of interest to the community for decades, starting with the inclusion in Karp's 21 NP-Complete problems <ref type="bibr">(Karp 1972)</ref>. Since then, it has been studied extensively in approximation algorithm design <ref type="bibr">(Kou, Markowsky, and Berman 1981;</ref><ref type="bibr">Takakashi 1980;</ref><ref type="bibr">Wu, Widmayer, and Wong 1986;</ref><ref type="bibr">Byrka et al. 2010)</ref>, stochastic algorithms <ref type="bibr">(Gupta and P&#225;l 2005;</ref><ref type="bibr">Gupta, Hajiaghayi, and Kumar 2007;</ref><ref type="bibr">Kurz, Mutzel, and Zey 2012;</ref><ref type="bibr">Leitner et al. 2018</ref>) and online algorithms <ref type="bibr">(Imase and Waxman 1991;</ref><ref type="bibr">Berman and Coulston 1997;</ref><ref type="bibr">Angelopoulos 2008</ref><ref type="bibr">Angelopoulos , 2009))</ref>. Practically, the Steiner tree problem is fundamental for many network problems such as fiber optic networks <ref type="bibr">(Bachhiesl et al. 2002)</ref>, social networks <ref type="bibr">(Chiang et al. 2013;</ref><ref type="bibr">Lappas et al. 2010)</ref>, and biological networks <ref type="bibr">(Sadeghi and Fr&#246;hlich 2013)</ref>. This problem has so many uses practically, that recently there have been competitions to find fast algorithms for it and its variants, including the 11th DIMACS Implementation Challenge (2014) and the 3rd Parameterized Algorithms and Computational Experiments (PACE) Challenge ( <ref type="formula">2018</ref>).</p><p>This paper focuses on the online version of Steiner tree. In this case, the graph G is known in advance, meaning that the edges that can be bought are completely known as well as all the nodes in the graph. However, the nodes that actually are the terminals T are unknown. The terminals in T arrive one at a time. Let t 1 , t 2 , . . . t k be the arriving order of terminals, where k = |T |. When terminal t i arrives, it must immediately be connected to t 1 , t 2 , . . . t i-1 by buying edges of G and once an edge is bought, it is irrevocable. The goal is to minimize the total cost.</p><p>The online problem occurs often in practice. For instance, when building a network often new nodes are added to the network over time. Not knowing which terminals will arrive makes the problem inherently hard. The algorithm with the best worst-case guarantees is the simple greedy algorithm <ref type="bibr">(Imase and Waxman 1991)</ref>, which always chooses to connect an arriving node via the cheapest feasible path. The competitive ratios of the greedy algorithm on undirected graphs and directed graphs are, respectively, &#920;(log k) and &#920;(k), which are the best possible using worst-case analysis (see <ref type="bibr">(Imase and Waxman 1991;</ref><ref type="bibr">Westbrook and Yan 1995)</ref>). However, these results are far from desirable. The question thus looms, is there the potential to go beyond worst-case lower bounds in the learning-augmented algorithms for online Steiner tree?</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Results</head><p>We consider the online Steiner tree problem in the learningaugmented model. The prediction is defined to be the set of terminals. That is, the algorithm is supplied with a set of terminals T at the beginning of time. Some of these may be incorrect. Define the prediction error &#951; to be the number of incorrectly predicted terminals. Then the actual terminals in T arrive online. This paper shows the following results, breaking through worst-case lower bounds.</p><p>&#8226; In the undirected case, we propose an O(log &#951;)competitive algorithm. That is, with accurate predictions, the algorithm is constant competitive. Then with the worst predictions, the competitive ratio is O(log k), matching the best worst-case bound. Between, the algorithm has slow degradation of performance in terms of the prediction error. We further show that any algorithm has competitive ratio &#8486;(log &#951;) with this prediction and thus our algorithm is the best possible online algorithm using this prediction. &#8226; In the directed case, we give an algorithm that is O(&#951; + log k)-competitive. With near perfect predictions, the algorithm is O(log k)-competitive, which is exponentially better than the worst-case lower bound &#8486;(k). With a large prediction error, the algorithm matches the O(k) bound of the best worst-case algorithm. Between, the algorithm has slow degradation of performance in terms of the error as in the undirected case. As in the undirected case, we show that any algorithm has competitive ratio &#8486;(&#951;) with this prediction. Our algorithm is close to the best possible when using this prediction.</p><p>The next question is if these theoretical results predict what will occur empirically on real graphs. For the undirected case we show that with modestly accurate predictions, the algorithms indeed can outperform the baseline. Then the performance degrades as there is more error in the prediction, never becoming much worse than the baseline. These empirical results corroborate the theory. Moreover, we give a learning algorithm that is able to learn predictions from a small number of sample instances such that our Steiner tree algorithms have strong performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Online Undirected Steiner Tree</head><p>For the brevity of the algorithms' statement and analysis, we make two assumptions. First, we assume that G is a complete graph in metric space. This can be assumed by taking the metric completion of any input graph and is standard for the Steiner tree problem. Second, the predicted terminal set T and the real terminal set T share the same size k. The discussion about this assumption is provided in the full version of this paper. We aim to show the following theorem in this section.</p><p>Theorem 1. Given a predicted terminal set T , there exists an algorithm with competitive ratio at most O(log &#951;), where</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Preliminaries</head><p>The input is an undirected graph G = (V, E), where each edge e has cost c e &#8805; 0, and a terminal set T &#8838; V that arrives online. Recall k := |T | = | T |. When a terminal t arrives, we must buy some edges such that it is connected with all previous terminals in the subgraph formed by bought edges. The goal is to minimize the total cost of the bought edges.</p><p>In the analysis, we will leverage results on the online greedy algorithm. The following theorem was shown in <ref type="bibr">(Imase and Waxman 1991)</ref>. The traditional online greedy algorithm maintains a tree T connecting all the terminals. This tree is initialized to &#8709;. Then when a terminal t arrives, the edges on the shortest path from t to any node in T will be added into T .</p><p>Theorem 2 ((Imase and Waxman 1991)). The online greedy algorithm is O(log k)-competitive.</p><p>We will also use the following properties of minimum spanning trees.</p><p>Lemma 3. Consider an offline Steiner tree instance. A minimum spanning tree MST(T ) on terminals is a 2-approximated solution <ref type="bibr">(Kou, Markowsky, and Berman 1981)</ref>. In addition, for any edge e, if {e}&#8746;MST(T ) contains a cycle, c e is the maximum edge cost in the cycle <ref type="bibr">(Schrijver 2003)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Warm-up: Analysis of a Simple Online Algorithm</head><p>Towards proving Theorem 1, we first introduce a simple and natural algorithm whose competitive ratio is O(&#951;). This is a far worse guarantee than the algorithm we develop, but it will help build our techniques and give the intuition.</p><p>Intuitively, if the prediction is error-free, the instance becomes an offline problem. Several constant approximation algorithms can be employed for the offline case. For example, we compute a minimum spanning tree MST( T ) on the accurate predicted terminal set T and each time when a new terminal arrives, connect it with all previous terminals only using the edges in MST( T ). This algorithm obtains a competitive ratio 2 if T = T .</p><p>Inspired by this, a natural online algorithm is the following. This algorithm has poor performance when the error in the predictions is large. This will then lead us to develop a more robust algorithm.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Online Algorithm with Predicted Terminals (OAPT):</head><p>Let T be the predicted set of terminals and MST( T ) be the minimum spanning tree on T . Let T i be the first set of i terminals that arrive online. T k contains all online terminals.</p><p>Initialize A = &#8709; to be the tree that the algorithm will construct connecting the online terminals. The algorithm returns the set of edges in A after all terminals arrive. We divide the edges of A = A 1 &#8746; A 2 into two sets, A 1 and A 2 depending on the case that causes us to add edges to A. Consider when terminal t i arrives.</p><p>&#8226; Case 1: If t i / &#8712; T or t i is the first terminal in T to arrive, add to A 1 the shortest edge in G connecting t i to terminals T i-1 that have arrived. No edge is bought if this is the first terminal that arrives.</p><p>&#8226; Case 2: Otherwise, add the shortest path in MST( T ) to A 2 which connects t i to a terminal in T &#8745; T i-1 . In other words, buy the shortest path in MST( T ) connecting t i to a predicted terminal that has previously arrived.</p><p>Our goal is to show that the competitive ratio of this algorithm is exactly &#920;(&#951;).</p><p>Theorem 4. The competitive ratio of OAPT is &#920;(&#951;).</p><p>First we observe that the algorithm is no better than &#8486;(&#951;)competitive. This lower bound will motivate the design of a more robust algorithm in the next section.</p><p>Lemma 5. The competitive ratio of OAPT is &#8486;(&#951;).</p><p>To prove Lemma 5, we first construct an instance and then show that algorithm OAPT is &#951;-competitive on it. The instance is shown in Fig. <ref type="figure">1</ref>. Due to space, the detailed proof is omitted in this version.</p><p>Next we prove the upper bound of the algorithm's performance. The solution A is partitioned into two sets A 1 and A 2 . We bound the cost of these sets separately. The following lemma bounds the cost of A 1 . Essentially, these edges do not cost most than O(log &#951;) because there are at most &#951;+1 terminals that contribute to edges in A 1 and their cost is bounded by running the traditional online greedy algorithm on these terminals, which is logarithmically competitive. </p><p>Lemma 6. Let c(A 1 ) be the total cost of edges in A 1 . We have c(A 1 ) &#8804; O(log &#951;)OPT, where OPT is the optimal objective value.</p><p>Proof. Let T be the terminals which get connected to the tree via Case (1). By definition of &#951;, we have |T | &#8804; &#951; + 1. This is because all terminals that are in T \ T are in Case (1) and these contribute to &#951;. The only other terminal that executes Case (1) is the first terminal in T that arrives.</p><p>Consider a new problem instance I where the terminal set is T . In this new instance, the graph along with edge costs remains the same. Let OPT(I ) be the optimal cost of this new instance and OPT the optimal cost of the original problem. Notice that OPT(I ) &#8804; OPT as T &#8838; T and OPT represents a feasible solution for the new instance.</p><p>We know that the cost of the traditional online greedy algorithm is at most O(log(|T |))OPT(I ) because it is log(|T |) competitive on the instance OPT(I ) by Theorem 2. This holds no matter the arriving order of the terminals. Let c(Greedy) be the cost of the greedy algorithm if the terminals in T arrive consistent with the arriving order for the original problem. We have that c(Greedy</p><p>Notice that the shortest edge from t i to T i-1 is definitely at most the shortest edge from t i to T i-1 &#8745;T . Thus, c(A 1 ) &#8804; c(Greedy) &#8804; O(log(&#951;))OPT. Now we focus on the second set A 2 . These terminals potentially cause the bulk of the cost for the algorithm. We will bound c(A 2 ) by O(&#951;)OPT, which proves Theorem 4. We first show that for each edge e &#8712; A 2 has cost at most OPT. Notice that this is not enough to prove c(A 2 ) &#8804; O(&#951;)OPT because the number of edges in A 2 could be as large as k -1. For the remainder of this section, let P i denote the path added into A 2 in iteration i.</p><p>Lemma 7. Each edge in A 2 has cost at most OPT.</p><p>Proof. Consider when terminal t i arrives, the algorithm executes Case (2) and the path P i = &#8709;. Notice that if Case (2) is executed then there is a terminal in t j &#8712; T &#8745; T i-1 that has arrived before t i . Moreover, for any terminal t j &#8712; T &#8745; T i-1 , the cost of edge (t i , t j ) is at most OPT because these two nodes are connected in the optimal solution and c(t i , t j ) is the minimum cost to connect them. To show the lemma, we show that for any edge e &#8712; P i , c e &#8804; c(t i , t j ). This then bounds the cost of any edge in A 2 by OPT.</p><p>Fix the terminal t j &#8712; T &#8745; T i-1 that t i connects to using path P i . If the edge (t i , t j ) is in MST( T ) then this will be the unique edge in P i . If (t i , t j ) is not in MST( T ) then by Lemma 3 every edge on the cycle P i &#8746; {(t i , t j )} has cost at most c(t i , t j ) &#8804; OPT.</p><p>We are ready to bound the cost of the edges in A 2 . Lemma 8. The edges of A 2 can be partitioned into two sets B 1 and B 2 , where c(B 1 ) &#8804; OPT and |B 2 | &#8804; &#951;. Moreover, the total cost of edges in A 2 is at most O(&#951;)OPT.</p><p>Proof. We begin by partitioning the edges of A 2 into two sets B 1 and B 2 . Let E contain the edges in MST( T ) &#8745; MST( T &#8745;T ). Initialize S = MST( T ). The set S will always be a spanning tree of T . We do the following iteratively. For each edge e &#8712; MST( T &#8745; T ) \ MST( T ), we add it to S and remove an arbitrary edge e &#8712; MST( T ) \ MST( T &#8745; T ) from S that forms a cycle. The removed edge e is added to</p><p>Intuitively, the above procedure obtains a spanning tree S of T by replacing some edges in MST( T ) that are not in MST( T ) &#8745; MST( T &#8745; T ) with the edges in MST( T &#8745; T ).</p><p>We have that c(E ) &#8804; c(MST( T &#8745; T )). This is because c(e) &#8805; c(e ) in each step of the algorithm by definition of MST( T ) and Lemma 3. Knowing c(MST( T &#8745; T )) &#8804; OPT, we see that c(B 1 ) &#8804; c(E ) &#8804; OPT.</p><p>According to the algorithm, the number of edges in E is exactly the same as the number of edges in MST( T &#8745; T ). In other words,</p><p>Namely, the number of edges in the second partition is at most &#951;. Using Lemma 7, we have c(B 2 ) &#8804; &#951;OPT, completing the proof of this lemma.</p><p>Proof of Theorem 4. The theorem can be proved directly by Lemma 6 and Lemma 8:</p><p>The lower bound in the theorem is given in Lemma 5. Altogether, we have the main theorem.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>An Improved Online Algorithm Leveraging Predictions</head><p>In this section, we will build on the simple algorithm to give a more robust online algorithm that has a competitive ratio of O(log &#951;). Notice that in the prior proof, the large cost arises due to the edges that are added in Case (2), especially the edges in B 2 = A 2 \ E in proof of the final lemma. The new algorithm is designed to mitigate this cost.</p><p>Improved Online Algorithm with Predicted Terminals (IOAPT): Let T be the predicted set of terminals and MST( T ) be the minimum spanning tree on T . Let T i be the first set of i terminals that arrive online. T k contains all online terminals.</p><p>Initialize A = &#8709; to be the subgraph that the algorithm will construct connecting the online terminals. The algorithm returns the set of edges in A after all terminals arrive. We divide the edges of A = A 1 &#8746; A 2 into two sets, A 1 and A 2 depending on the case that causes us to add edges to A. Consider when terminal t i arrives.</p><p>&#8226; Case 1: If t i / &#8712; T or t i is the first terminal in T to arrive, add to A 1 the shortest edge in G connecting t i to terminals T i-1 that have arrived. No edge is bought if this is the first terminal that arrives.</p><p>&#8226; Case 2: Otherwise, find the shortest path P i connecting t i to T &#8745; T i-1 in MST( T ). Use e i to denote the shortest edge connecting t i to T &#8745; T i-1 in G. We add to A 2 a sub-path P i &#8838; P i such that its endpoints contain t i while its total cost is in [c ei , 2c ei ]. Next, add e i to A 2 if t i is not connected to the tree after adding P i .</p><p>Notice that in Case 2, we can always find such a subpath P i due to the property of the minimum spanning tree and the assumption that G is a metric. Thus, the algorithm always computes a feasible solution. We have the following two lemmas. The proofs are identical to Lemma 7 and Lemma 8 respectively.</p><p>Lemma 9. The cost of any edge in A 2 computed by IOAPT is at most OPT.</p><p>Lemma 10. The edges of A 2 can be partitioned into two sets B 1 and B 2 where c(B 1 ) &#8804; OPT and |B 2 | &#8804; &#951;.</p><p>With these lemmas, we can prove the theorem.</p><p>Theorem 11. The competitive ratio of IOAPT is O(log &#951;).</p><p>Proof. The analysis of c(A 1 ) is the same as that in OAPT. The proof of Lemma 6 immediately implies c(A 1 ) &#8804; O(log &#951;)OPT. Next we focus on bounding the cost of A 2 .</p><p>Let &#8710; i c(A 2 ) be the increase in c(A 2 ) in when terminal t i arrives. According to definition of the algorithm, we know</p><p>Lemma 10 states the edges in MST( T ) can be partitioned into two sets E 0 and E 1 := MST( T ) \ E 0 , where the cost of E 0 is at most 2OPT and the number of edges in E 1 is &#951;. Let T G be the 'good' terminals that execute Case (2) and P i &#8838; E 0 . Let T B be the remaining 'bad' terminals. We see the following for the good terminals, c(</p><p>In other words, if the sub-path added in each iteration always belongs to E 0 , the total cost of c(A 2 ) is bounded by a constant factor of OPT. Say an iteration is good if the sub-path added in it belongs to E 0 . The total increment of all good iterations is at most O(OPT).</p><p>We use the second upper bound to analyze the cost of the bad terminals. This follows similarly to the proof of Lemma 6. Indeed, we know the following,</p><p>If iteration i is bad, there exists at least one edge in sub-path P i belonging to E 1 . Since |E 1 | = &#951;, the number of bad iterations is at most &#951;. The total cost of these iterations The competitive ratio O(log(&#951;)) approaches the worstcase bound log(k) when &#951; = k. Here we give a stronger statement to show our algorithm optimally uses the predictions. The proof is provided in the full version of this paper.</p><p>Theorem 12. For online undirected Steiner tree with predicted terminals, given any &#951; &#8805; 1, no online algorithm has a competitive ratio better than &#8486;(log(&#951;)).</p><p>Improving the Performance of the Algorithm in Practice. We describe a practical modification of the algorithm. This modification ensures that the algorithm maintains its theoretical bound, while improving the performance. The observation is that the algorithm may purchase edges not needed for feasibility. Some edges added by our algorithm are purchased based on predicted terminals and they will become useless if these predicted terminals do not arrive. We can choose not to buy these edges immediately. When t i arrives, the edges in P i are not bought immediately if we buy e i . Instead, the algorithm buys the edges the first time a terminal uses them to connect to previous terminals.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Online Steiner Tree in Directed Graphs</head><p>This section considers online Steiner tree when the graph is directed. The input is a directed graph G = (V, E), where each edge e has cost c e &#8805; 0, a root vertex r &#8712; V and a terminal set T &#8838; V that arrives online. This paper assumes without loss of generality, that c e &gt; 1 for any edge e. Additionally the input graph is assumed to ensure that there exists a directed path from root r to every vertex in V .</p><p>The terminals in T arrive online. When a terminal v &#8712; T arrives the algorithm must buy some edges to ensure there is a directed path from the root r to v in the subgraph induced by the bought edges. The goal is to minimize the total cost of the bought edges.</p><p>In directed graphs, the worst-case bound on the competitive ratio is &#8486;(k) <ref type="bibr">(Westbrook and Yan 1995)</ref>. Our main result shows that we can break through this bound.</p><p>Theorem 13. Given a predicted terminal set T , there exists an algorithm with competitive ratio at most O(log k + &#951;), where &#951; := k -|T &#8745; T |.</p><p>The algorithm claimed in Theorem 13 is O(log k)consistent and O(k)-robust, meaning that the ratio is O(log k) if &#951; = 0 and is at most O(k) for any &#951;. The algorithm for directed graphs builds on the algorithm for undirected graphs. As before, there are two sets of edges A 1 , A 2 . The set A 1 contains edges that are bought because a terminal arrives that was not predicted. As in the undirected case such these edges are bought using a greedy algorithm. The edges in A 2 are bought using a different algorithm over the undirected case.</p><p>Online Algorithm with Predicted Terminals in Directed Graphs: Initialize &#955; = 1 to be a parameter, which is intuitively a guess of the maximum connection cost of any terminal in T . Let T (&#955;) := {t &#8712; T | c(t, r) &#8804; &#955;} be the set of predicted terminals that have a path to the root of cost at most &#955;. Let MDST( T (&#955;)) be the minimum directed Steiner tree of T (&#955;), which can be computed by an offline optimal algorithm<ref type="foot">foot_0</ref> .</p><p>Initialize A 1 = &#8709; and A 2 = &#8709;. The edges that are bought will be A = A 1 &#8746;A 2 . Order the terminals such that t i arrives before t i+1 and let T i = {t 1 , t 2 , . . . , t i } be the first i terminals to arrive. Let &#946; i = max tj &#8712;Ti c(t j , r) be the maximum cost of connecting a terminal in T i directly to the root.</p><p>Consider when a terminal t i &#8712; T arrives. If &#946; i &gt; &#955; then both increase &#955; by a factor 2 and update T (&#955;) and MDST( T (&#955;)). Next perform one of the following.</p><p>&#8226; If t i / &#8712; T (&#955;) then add the shortest path from t i to r to A 1 , buying these edges.</p><p>&#8226; Otherwise, add the unique path from t i to r in MDST( T (&#955;)) to A 2 . Our goal is to show the following theorem. Theorem 14. The competitive ratio of the Algorithm for directed Steiner tree is O(log k + &#951;).</p><p>Before proving the theorem, we show a technical lemma. Lemma 15. For any &#955;, c(MDST( T (&#955;))) &#8804; OPT + &#955;&#951;.</p><p>Proof. The proof idea is to construct a feasible Steiner tree of T (&#955;) whose value is at most OPT + &#955;&#951;. Then the inequality will hold due to the optimality of MDST( T (&#955;)). The feasible tree is constructed as follows: connect all terminals in T (&#955;) &#8745; T to the root in the same way as the optimal solution and add the shortest path from t to r for each terminal t &#8712; T (&#955;) \ T . The total cost of the former part is at most OPT while the latter term incurs a cost of &#955;&#951; since c(t, r) &#8804; &#955; for any terminal t &#8712; T (&#955;). Thus, the total cost of this subgraph is at most OPT + &#955;&#951;, implying that c(MDST( T (&#955;))) &#8804; OPT + &#955;&#951;.</p><p>We can now prove the main theorem. Due to space, the detailed proof is omitted in this paper.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Experimental Results</head><p>This section investigates the empirical performance of the proposed algorithm OAPT and IOAPT for the undirected Steiner tree problem. The goal is to answer the following two questions:</p><p>&#8226; Robustness -How much prediction accuracy does the algorithms need to outperform the baseline algorithm empirically? &#8226; Learnability -How many samples are required to empirically learn predictions sufficient for the algorithms to perform better than the baseline?</p><p>The baseline we compare against is the online greedy algorithm which is the best traditional online algorithm. We investigate the performance of both OAPT and IOAPT.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Setup</head><p>The experiments<ref type="foot">foot_2</ref> are conducted on a machine running Ubuntu 18.04 with an i7-7800X CPU and 48 GB memory. Experiments are averaged over 10 runs. We consider two types of graphs.</p><p>Random Graphs. The number of nodes in a graph is set to be 2,000 and 50,000 edges are selected uniformly at random. The cost of each edge is an integer sampled uniformly from <ref type="bibr">[1,</ref><ref type="bibr">1000]</ref>. To ensure the connectivity of graphs, we add all remaining edges to form a complete graph, given the edges high cost of 100,000.</p><p>Road Graphs. The road network of Bay Area is provided by The 9th DIMACS Implementation Challenge<ref type="foot">foot_3</ref> in graph format where a node denotes a point in Bay Area and the cost of an edge is the road length between the two endpoints. The original data contains 321,270 nodes and 400,086 edges. In the experiments, we employ the same sampling method as in <ref type="bibr">(Moseley, Vassilvitskii, and Wang 2021)</ref> to sample connected subgraphs from this large graph. Briefly, we draw rectangles with a certain size on the road network randomly and construct a subgraph from each rectangle. The experiments employ 4 sampled subgraphs with 23512 &#177; 1135 nodes and 31835 &#177; 1815 edges. These graphs give the same trends, thus, we show one such graph in this section and others appear in the full version of the paper.</p><p>The terminal set T and the prediction T are constructed differently depending on the experiments.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Robustness to Accuracy</head><p>This experiment tests the performance of OAPT and IOAPT when the prediction accuracy varies. Recall that k is the number of terminals. We set k = 200 and 2, 000 respectively for random graphs and road graphs unless stated otherwise<ref type="foot">foot_4</ref> .</p><p>The set T of k terminals are sampled uniformly from the vertex set V . They arrive in random order.</p><p>We now construct the predictions. Let &#955; &#8712; [0, 1] be a parameter corresponding to the prediction accuracy. First, we sample a node set T0 with k&#955; nodes uniformly from the terminal set T . And then another node set T1 with k(1 -&#955;) nodes is sampled uniformly from the non-terminal nodes V \ T . Let T0 &#8746; T1 be the predicted terminal set T . Notice that &#955; indicates the prediction accuracy. Thus, testing the performance of algorithms with different &#955;'s answers the robustness question. This experiment is in Fig. <ref type="figure">2</ref>(a) and 3(a).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Learning the Terminals</head><p>Here we construct instances where the algorithm explicitly learns the terminals. Each such instance will have a distribution over terminal sets of size k and employ random order. We will sample s training instances of k terminals T 1 , T 2 , . . . T s . The learning algorithm used to predict terminals is defined as follows.</p><p>The Learning Algorithm. A node v is predicted to be in T with probability f (v)/s if f (v) &gt; &#952;s, where f (v) is the number of sampled sets in which node v appears and &#952; is a parameter in [0, 1]. Note that the number of predicted terminals may not equal k.</p><p>There is a question on how to choose &#952;. This is done as follows. We choose an instance T i from the training set at random and check which &#952; would give OAPT (IOAPT) the best performance on this instance. We then use this &#952; for OAPT (IOAPT) on the online instance. For efficiency, we only consider &#952; &#8712; {0, 0.2, 0.4, 0.6, 0.8, 1}.</p><p>Distribution for Random Graphs. Two distributions are considered for random graphs. The first is a bad distribution where there is nothing to learn, the uniform distribution. In this case, all terminals are drawn uniformly from V . The second is called a two-class distribution where there is a set of nodes to learn. Let V h be a small collection of nodes that will be terminals with higher probability. V h is set to 400 nodes uniformly at random. Let k = 200 be the number of terminals. Half are drawn from V h and half from V \ V h . Here we hope the learning algorithm quickly learns V h , and further, our algorithms can take advantage of the predictions. The results appear in Fig. <ref type="figure">2(b</ref>) and 2(c).</p><p>Distribution for Road Graphs. This experiment is designed to model the case where terminals can appear in geographical similar locations. The graph will be clustered and a specified number of terminals will arrive per cluster following a distribution over nodes in the cluster. Use r to denote the radius of the graph. Given a parameter &#963;, partition all nodes into several clusters such that the radius of each cluster is at most &#963;r. The greedy clustering algorithm <ref type="bibr">(Gonzalez 1985)</ref> is used. We let &#963; = 0.1 in the experiments unless state otherwise. The terminal set T is obtained by picking 2000/x random clusters and sampling x terminals uniformly from each selected cluster. We let x be 10 and 100. When x = 10 the distribution is harder to learn than when x = 100. See Fig. <ref type="figure">3</ref>  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Empirical Discussion</head><p>We see the following trends.</p><p>&#8226; Both Fig. <ref type="figure">2</ref>(a) 3(a) show that the algorithms perform well on different graphs even with modestly correct predictions. Once about 20% of the predictions are correct, the algorithms perform better than the baseline. &#8226; Fig. <ref type="figure">2</ref>(b) 3(b) show the algorithms are robust for difficult distributions, which are sparse distributions where there is effectively nothing to learn. The learning algorithm will quickly realize that predictions cause negative effects and then output very few predicted terminals (see the prediction error figures in this paper's full version for more corroborating experiments). After tens of training instances, the ratios become never worse than 1.01. &#8226; Fig. <ref type="figure">2</ref>(c) 3(c) show the learning algorithm quickly learns good distributions. Further, both online algorithms have strong performance using the predictions. We conclude that with a small number of training samples, the learning algorithm is able to learn useful predictions sufficient for the online algorithms to outperform the baseline.</p><p>These experiments corroborate the theory. The algorithms obtain much better performance than the baseline even with modestly good predictions. If given very inaccurate predictions, the algorithms are barely worse than the baseline. Moreover, we see that only a small number of sample instances are needed for the algorithms to have competitive performance when terminals arrive from a good distribution.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Conclusion</head><p>Online Steiner tree is one of the most fundamental online network design problems. It is a special case or a subproblem of many online network design problems. Steiner tree captures the challenge of building networks online and, moreover, Steiner tree algorithms are often used as building blocks or subroutines for more general problems. As the community expands the learning augmented algorithms area into more general online network design problems, this paper provides models, and algorithmic and analysis techniques that can be leveraged for these problems.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Noting that this problem is NP-hard and it is known to be inapproximable within a O(log k) ratio unless P = N P (Dinur and Steurer</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1"><p>2014), we do not have efficient optimal algorithms or approximation algorithms in practice. Thus, the directed case is more for theoretical interests.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_2"><p>The code is available at https://github.com/Chenyang-1995/ Online-Steiner-Tree</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_3"><p>http://users.diag.uniroma1.it/challenge9/download.shtml</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_4"><p>We also conduct experiments with different numbers of terminals. See this paper's full version for more results.</p></note>
		</body>
		</text>
</TEI>
