Title: Efficient Online Clustering with Moving Costs
Venue: NeurIPS 2023
Accepted: yes
Keywords: Online Learning

Regret Analysis

Clustering

k-Median
Abstract: In this work we consider an online learning problem, called Online $k$-Clustering with Moving Costs, at which a learner maintains a set of $k$ facilities over $T$ rounds so as to minimize the connection cost of an adversarially selected sequence of clients. The learner is informed on the positions of the clients at each round $t$ only after its facility-selection and can use this information to update its decision in the next round. However, updating the facility positions comes with an additional moving cost based on the moving distance of the facilities. We present the first $\mathcal{O}(\log n)$-regret polynomial-time online learning algorithm guaranteeing that the overall cost (connection $+$ moving) is at most $\mathcal{O}(\log n)$ times the time-averaged connection cost of the best fixed solution. Our work improves on the recent result of (Fotakis et al., 2021) establishing $\mathcal{O}(k)$-regret guarantees only on the connection cost.

Efficient Online Clustering with Moving Costs

Abstract

In this work we consider an online learning problem, called Online k -Clustering with Moving Costs , at which a learner maintains a set of k facilities over T rounds so as to minimize the connection cost of an adversarially selected sequence of clients. The learner is informed on the positions of the clients at each round t only after its facility-selection and can use this information to update its decision in the next round. However, updating the facility positions comes with an additional moving cost based on the moving distance of the facilities. We present the first O (log n ) -regret polynomial-time online learning algorithm guaranteeing that the overall cost (connection + moving) is at most O (log n ) times the time-averaged connection cost of the best fixed solution . Our work improves on the recent result of Fotakis et al. [31] establishing O ( k ) -regret guarantees only on the connection cost.

1 Introduction

Due to their various applications in diverse fields (e.g. machine learning, operational research, data science etc.), clustering problems have been extensively studied. In the well-studied k -median problem, given a set of clients, k facilities should be placed on a metric with the objective to minimize the sum of the distance of each client from its closest center [55, 14, 13, 67, 6, 44, 52, 65, 51, 15, 54, 3].

In many modern applications (e.g., epidemiology, social media, conference, etc.) the positions of the clients are not static but rather evolve over time [57, 56, 64, 59, 23, 5]. For example the geographic distribution of the clients of an online store or the distribution of Covid-19 cases may drastically change from year to year or respectively from day to day [31]. In such settings it is desirable to update/change the positions of the facilities (e.g., compositions of warehouses or Covid test-units) so as to better serve the time-evolving trajectory of the clients.

The clients' positions may change in complex and unpredictable ways and thus an a priori knowledge on their trajectory is not always available. Motivated by this, a recent line of research studies clustering problems under the online learning framework by assuming that the sequence of clients' positions is unknown and adversarially selected [18, 28, 16, 31]. More precisely, a learner must place k facilities at each round t ≥ 1 without knowing the positions of clients at round t which are revealed to the learner only after its facility-selection. The learner can use this information to update its decision in the next round; however, moving a facility comes with an additional moving cost that should be taken into account in the learner's updating decision, e.g. moving Covid-19 test-units comes with a cost [18, 28].

Building on this line of works, we consider the following online learning problem:

Problem 1 ( Online k -Clustering with Moving Costs ) . Let G ( V, E, w ) be a weighted graph with | V | = n vertices and k facilities. At each round t = 1 , . . . , T :

The learner selects F t ⊆ V , with | F t | = k , at which facilities are placed.

The adversary selects the clients' positions, R t ⊆ V .

The learner learns the clients' positions R t and suffers

where d G ( j, i ) is the distance between vertices i, j ∈ V ; M G ( F t -1 , F t ) is the minimum overall distance required to move k facilities from F t -1 to F t ; and γ ≥ 0 is the facility-weight.

An online learning algorithm for Problem 1 tries to minimize the overall (connection + moving) cost by placing k facilities at each round t ≥ 1 based only on the previous positions of clients R 1 , . . . , R t -1 . To the best of our knowledge, Problem 1 was first introduced in [18] 2 . If for any sequence of clients, the overall cost of the algorithm is at most α times the overall connection cost of the optimal fixed placement of facilities F ∗ then the algorithm is called α -regret, while in the special case of α = 1 the algorithm is additionally called no-regret .

Problem 1 comes as a special case of the well-studied Metrical Task System by considering each of the possible ( n k ) facility placements as a different state. In their seminal work, [11] guarantee that the famous Multiplicative Weights Update algorithm ( MWU ) achieves (1 + ϵ ) -regret in Problem 1 for any ϵ > 0 . Unfortunately, running the MWU algorithm for Problem 1 is not really an option since it requires O ( n k ) time and space complexity. As a result, the following question naturally arises:

Q. Can we achieve α -regret for Problem 1 with polynomial-time online learning algorithms?

Answering the above question is a challenging task. Even in the very simple scenario of time-invariant clients, i.e. R t = R for all t ≥ 1 , an α -regret online learning algorithm must essentially compute an α -approximate solution of the k -median problem. Unfortunately the k -median problem cannot be approximated with ratio α < 1+2 /e ≃ 1 . 71 (unless NP ⊆ DTIME[ n log log n ] [43]) which excludes the existence of an (1+2 /e ) -regret polynomial-time online learning algorithm for Problem 1. Despite the fact that many O (1) -approximation algorithms have been proposed for the k -median problem (the best current ratio is 1 + √ 3 [54]), these algorithms crucially rely on the (offline) knowledge of the whole sequence of clients and most importantly are not designed to handle the moving cost of the facilities [55, 14, 13, 67, 6, 44, 52, 65, 51, 15, 54, 3].

In their recent work, Fotakis et al. [31] propose an O ( k ) -regret polynomial-time online learning algorithm for Problem 1 without moving costs (i.e. the special case of γ = 0 ). Their approach is based on designing a no-regret polynomial-time algorithm for a fractional relaxation of Problem 1 and then using an online client-oblivious rounding scheme in order to convert a fractional solution to an integral one. Their analysis is based on the fact that the connection cost of any possible client is at most O ( k ) times its fractional connection cost. However in order to establish the latter guarantee their rounding scheme performs abrupt changes on the facilities leading to huge moving cost.

Our Contribution and Techniques. In this work, we provide a positive answer to question ( Q ), by designing the first polynomial-time online learning algorithm for Online k -Clustering with Moving Costs that achieves O (log n ) -regret for any γ ≥ 0 . The cornerstone idea of our work was to realize that O (1) -regret can be established with a polynomial-time online learning algorithm in the special case of G being a Hierarchical Separation Tree (HST). Then, by using the standard metric embedding result of [25], we can easily convert such an algorithm to an O (log n ) -regret algorithm for general graphs. Our approach for HSTs consists of two main technical steps:

We introduce a fractional relaxation of Problem 1 for HSTs. We then consider a specific regularizer on the fractional facility placements, called Dilated Entropic Regularizer [26], that takes into account the specific structure of the HST. Our first technical contribution is to establish that the famous Follow the Leader algorithm [35] with dilated entropic regularization admits O (1) -regret for any γ ≥ 0 .

Our second technical contribution is the design of a novel online client-oblivious rounding scheme, called Cut&Round , that converts a fractional solution for HSTs into an integral one. By exploiting the specific HST structure we establish that Cut&Round , despite not knowing the clients' positions R t , simultaneously guarantees that ( i ) the connection cost of each client j ∈ R t is upper bounded by its fractional connection cost, and ( ii ) the expected moving cost of the facilities is at most O (1) times the fractional moving cost.

Experimental Evaluation. In Section F of the Appendix we experimentally compare our algorithm with the algorithm of Fotakis et al. [31]. Our experiments verify that our algorithm is robust to increases of the facility weight γ while the algorithm of [31] presents a significant cost increase. We additionally experimentally evaluate our algorithm in the MNIST and CIFAR10 datasets. Our experimental evaluations suggest that the O (log n ) -regret bound is a pessimistic upper bound and that in practise our algorithm performs significantly better. Finally, we evaluate our algorithm both in the random arrival case (where the requested vertices are drawn uniformly at random from the graph) as well as in adversarial settings, where the request sequences are constructed through some arbitrary deterministic process.

Related Work. As already mentioned, our work most closely relates with the work of Fotakis et al. [31] that provides an O ( k ) -regret algorithm running in polynomial-time for γ = 0 . [16] also consider Problem 1 for γ = 0 with the difference that the connection cost of clients is captured through the k -means objective i.e. the sum of the squared distances. They provide an (1 + ϵ ) -regret algorithm with O ( ( k 2 /ϵ 2 ) 2 k ) time-complexity that is still exponential in k . [18, 28] study the special case of Problem 1 in which G is the line graph and γ = 1 while assuming 1 -lookahead on the request R t . For k = 1 , [18] provide an (1 + ϵ ) -competitive online algorithm meaning that its cost is at most (1 + ϵ ) times the cost of the optimal dynamic solution and directly implies (1 + ϵ ) -regret. [28] extended the previous result by providing a 63 -competitive algorithm for k = 2 on line graphs. Our work also relates with the works of [23] and [4] that study offline approximation algorithms for clustering problems with time-evolving metrics . Finally our work is closely related with the research line of online learning in combinatorial domains and other settings of online clustering. Due to space limitations, we resume this discussion in Section A of the Appendix.

2 Preliminaries and Our Results

Let G ( V, E, w ) be a weighted undirected graph where V denotes the set of vertices and E the set of edges among them. The weight w e of an edge e = ( i, j ) ∈ E denotes the cost of traversing e . Without loss, we assume that w e ∈ N and w e ≥ 1 for all edges e ∈ E . The distance between vertices i, j ∈ V is denoted with d G ( i, j ) and equals the cost of the minimum cost path from i ∈ V to j ∈ V . We use n := | V | to denote the cardinality of G and D G := max i,j ∈ V d G ( i, j ) to denote its diameter.

Given a placement of facilities F ⊆ V , with | F | = k , a client placed at vertex j ∈ V connects to the closest open facility i ∈ F . This is formally captured in Definition 1.

Definition 1. The connection cost of a set of clients R ⊆ V under the facility-placement F ⊆ V with | F | = k equals

Next, consider any pair of facility-placements F, F ′ ⊆ V such that | F | = | F ′ | = k . The moving distance between F and F ′ is the minimum overall distance needed to transfer the k facilities from F to F ′ , formally defined in Definition 2.

Definition 2. Fix any facility-placements F, F ′ ⊆ V where | F | = | F ′ | = k . Let Σ be the set of all possible matchings from F to F ′ , i.e. each σ ∈ Σ is a one-to-one mapping σ : F ↦→ F ′ with σ ( i ) ∈ F ′ denoting the mapping of facility i ∈ F . The moving cost between F and F ′ equals

At each round t ≥ 1 , an online learning algorithm A for Problem 1 takes as input all the previous positions of the clients R 1 , . . . , R t -1 ⊆ V and outputs a facility-placement F t := A ( R 1 , . . . , R t -1 )

such that F t ⊆ V and | F t | = k . The performance of an online learning algorithm is measured by the notion of regret , which we formally introduce in Definition 3.

Definition 3. An online learning algorithm A for Problem 1 is called α -regret with additive regret β if and only if for any sequence of clients R 1 , . . . , R T ⊆ V ,

where F t = A ( R 1 , . . . , R t -1 ) and α, β are constants independent of T .

An online learning algorithm A selects the positions of the k facilities at each round t ≥ 1 solely based on the positions of the clients in the previous rounds, R 1 , . . . , R t -1 . If A is α -regret then Definition 3 implies that its time-averaged overall cost (connection + moving cost) is at most α times the time-averaged cost of the optimal static solution! 3 Furthermore, the dependency on √ T is known to be optimal [11] and β is typically only required to be polynomially bounded by the size of the input, as for T →∞ the corresponding term in the time-averaged cost vanishes.

As already mentioned, the seminal work of [11] implies the existence of an (1 + ϵ ) -regret algorithm for Problem 1; however, this algorithm requires O ( n k ) time and space complexity. Prior to this work, the only polynomial-time 4 online learning algorithm for Problem 1 was due to Fotakis et al. [31], for the special case of γ = 0 . Specifically, in their work the authors design an online learning algorithm with the following guarantee:

Theorem (Fotakis et al. [31]) . There exists a randomized online learning algorithm for Problem 1 that runs in polynomial time (w.r.t. T , n and log D G ) such that

Clearly, the algorithm of [31] has not been designed to account for charging the moving of facilities, as indicated by the absence of the moving cost in the above regret guarantee. The main contribution of this work is to obtain (for the first time) regret guarantees that also account for the moving cost.

Theorem 1. There exists a randomized online learning algorithm for Problem 1 (Algorithm 2) that runs in polynomial time (w.r.t. T , n and log D G ) and admits the following regret guarantee:

for β = O ( k · n 3 / 2 · D G · max( γ, 1)) and any γ ≥ 0 .

Remark 1. We remark that while our additive regret β is larger than the corresponding term in [31] by a factor of o ( √ n ) , our results apply to any γ ≥ 0 while the algorithm of [31] can generally suffer unbounded moving cost for γ →∞ , as our experimental results verify.

2.1 HSTs and Metric Embeddings

In this section we provide some preliminary introduction to Hierarchical Separation Trees (HSTs), as they consist a key technical tool towards proving Theorem 1. A weighted tree T ( V, E, w ) is a weighted graph with no cycles. Equivalently, for any pair of vertices i, j ∈ V there exists a unique path that connects them. In Definition 4, we establish some basic notation for tree graphs.

Definition 4. Fix any tree T ( V, E, w ) . For every vertex u ∈ V , cld( u ) ⊆ V denotes the set children vertices of u and p ( u ) denotes its unique parent, i.e. u ∈ cld( p ( u )) . The root r ∈ V of T is the unique node with p ( r ) = ∅ and the set L ( T ) := { u ∈ V : cld( u ) = ∅ } denotes the leaves of T . We use dpt( u ) to denote the depth of a vertex u ∈ V , i.e. the length of the (unique) path from the root r to u , and h ( T ) := max u ∈ L ( T ) dpt( u ) to denote the height of T . We use lev( u ) := h ( T ) -dpt( u ) to denote the level of a vertex u ∈ V . Finally, T ( u ) ⊆ V denotes the set of vertices on the sub-tree rooted at u , i.e. the set of vertices that are descendants of u .

Next, we proceed to define a family of well-structured tree graphs that constitute one of the primary technical tools used in our analysis.

Definition 5. A Hierarchical Separation Tree (HST) is a weighted tree T ( V, E, w ) such that (i) for any node u and any of its children v ∈ cld ( u ) , the edge e = ( u, v ) admits weight w e = 2 lev( v ) , and (ii) the tree is balanced, namely lev ( u ) = 0 for all leaves u ∈ L ( T ) .

In their seminal works, [10] and later [24] showed that HSTs can approximately preserve the distances of any graph G ( V, E, w ) within some logarithmic level of distortion.

Theorem 2. For any graph G ( V, E, w ) with | V | = n and diameter D , there exists a polynomial-time randomized algorithm that given as input G produces an HST T with height h ( T ) ≤ ⌈ log D ⌉ s.t.

L ( T ) = V , meaning that the leaves of T correspond to the vertices of G .

Theorem 2 states that any weighted graph G ( V, E, w ) can be embedded into an HST T with O (log n ) -distortion. This means that the distance d G ( u, v ) between any pair of vertices u, v ∈ V can be approximated by their respective distance d T ( u, v ) in T within an (expected) factor of O (log n ) .

Remark 2. We note that traditionally HSTs are neither balanced nor are required to have weights that are specifically powers of 2 . However, we can transform any general HST into our specific definition, and this has been accounted for in the statement of the above theorem. The details are deferred to Section B of the Appendix.

3 Overview of our approach

In this section we present the key steps of our approach towards designing the O (log n ) -regret online learning algorithm for Problem 1. Our approach can be summarized in the following three pillars:

In Section 3.1 we introduce a fractional relaxation of Problem 1 in the special case of HSTs (Problem 2). Problem 2 is an artificial problem at which the learner can place a fractional amount of facility to the leaves of an HST so as to fractionally serve the arrived clients. Since the optimal static solution of Problem 2 lower bounds the optimal static solution of Problem 1 in the special case of HSTs, the first step of our approach is to design an O (1) -regret algorithm for Problem 2.

In Section 3.2 we present the formal guarantees of a novel randomized rounding scheme, called Cut&Round , that is client-oblivious and converts any fractional solution for Problem 2 into an actual placement of k facilities on the leaves of the HST with just an O (1) -overhead in the connection and the moving cost.

In Section 3.3 we present how the fractional algorithm for Problem 2 together with the Cut&Round rounding naturally lead to an O (1) -regret online learning algorithm for Problem 1 in the special case of HSTs (Algorithm 1). Our main algorithm, presented in Algorithm 2, then consists of running Algorithm 1 into an O (log n ) HST embedding of input graph.

3.1 A Fractional Relaxation for HSTs

In this section we introduce a fractional relaxation for Problem 1, called Fractional k -Clustering with Moving Costs on HSTs (Problem 2). Fix any HST T ( V, E, w ) (in this section, V denotes the nodes of the HST). We begin by presenting a fractional extension of placing k facilities on the leaves of T .

Definition 6. The set of fractional facility placements FP ( T ) consists of all vectors y ∈ R | V | such that

∑ v ∈ L ( T ) y v = k , i.e. the total amount of facility on the leaves equals k .

For a leaf vertex v ∈ L ( T ) , y v simply denotes the fractional amount of facilities that are placed on it. For all non-leaf vertices v / ∈ L ( T ) , y v denotes the total amount of facility placed in the leaves of the sub-tree T ( v ) . Thus, any integral vector y ∈ FP ( T ) ∩ ◆ corresponds to a placement of k facilities on the leaves of T .

In Definitions 7 and 8 we extend the notion of connection and moving cost for fractional facility placements. In the special case of integral facility placements, Definitions 7 and 8 respectively collapse to Definitions 1 and 2 (a formal proof is given in Claims 1 and 2 of Section C of the Appendix).

Definition 7. The fractional connection cost of a set of clients R ⊆ L ( T ) under y ∈ FP ( T ) is defined as

where P ( j, r ) denotes the set of vertices in the (unique) path from the leaf j ∈ L ( T ) to the root r .

Definition 8. The fractional moving cost between any y, y ′ ∈ FP ( T ) is defined as

We are now ready to present our fractional generalization of Problem 1 in the special case of HSTs. Problem 2 ( Fractional k -Clustering with Moving Costs on HSTs ) . Fix any HST T . At each round t = 1 , . . . , T :

The learner selects a vector y t ∈ FP ( T ) .

The adversary selects a set of clients R t ⊆ L ( T ) .

The learner suffers cost f R t ( y t ) + || y t -y t -1 || T .

In Section 4, we develop and present an O (1) -regret algorithm for Problem 2 (see Algorithm 3). To this end, we present its formal regret guarantee established in Theorem 3.

Theorem 3. There exists a polynomial-time online learning algorithm for Problem 2 (Algorithm 3), such that for any sequence R 1 , . . . , R T ⊆ L ( T ) , its output y 1 , . . . , y T satisfies

3.2 From Fractional to Integral Placements in HSTs

As already mentioned, the basic idea of our approach is to convert at each round t ≥ 1 the fractional placement y t ∈ FP ( T ) produced by Algorithm 3 into an integral facility placement F t ⊆ L ( T ) with | F t | = k on the leaves of the HST. In order to guarantee small regret, our rounding scheme should preserve both the connection and the moving cost of the fractional solution within constant factors for any possible set of arriving clients . In order to guarantee the latter, our rounding scheme Cut&Round (Algorithm 4) uses shared randomness across different rounds. Cut&Round is rather complicated and is presented in Section 5. To this end, we present its formal guarantee.

Theorem 4. There exists a linear-time deterministic algorithm, called Cut&Round (Algorithm 4), that takes as input an HST T , a fractional facility placement y ∈ FP ( T ) and a vector α ∈ [0 , 1] | V | and outputs a placement of k facilities F ← Cut&Round( T , y, α ) on the leaves of T ( F ⊆ L ( T ) and | F | = k ) such that

E α ∼ Unif(0 , 1) [ C R ( F )] = f R ( y ) for all client requests R ⊆ L ( T ) .

E α ∼ Unif(0 , 1) [ γ · M T ( F, F ′ )] ≤ 4 · || y -y ′ || T for all other fractional facility placements y ′ ∈ FP ( T ) and F ′ ← Cut&Round( T , y ′ , α ) .

Item 1 of Theorem 4 establishes that although Cut&Round is oblivious to the arrived set of clients R t ⊆ L ( T ) , the expected connection cost of the output equals the fractional connection cost under y t ∈ FP ( T ) . Item 2 of Theorem 4 states that once the same random seed α is used into two consecutive time steps, then the expected moving cost between the facility-placements F t and F t +1 is at most O (1) -times the fractional moving cost between y t and y t +1 . Both properties crucially rely on the structure of the HST and consist one of the main technical contributions of our work.

3.3 Overall Online Learning Algorithm

We are now ready to formally introduce our main algorithm (Algorithm 2) and prove Theorem 1. First, we combine the algorithms from Theorems 3 and 4 to design an O (1) -regret algorithm for Problem 1 on HSTs (Algorithm 1). Up next we present how Algorithm 1 can be converted into an O (log n ) -regret online learning algorithm for general graphs, using the metric embedding technique of Theorem 2, resulting to our final algorithm (Algorithm 2).

Algorithm 1 O (1) -regret for HSTs.

1: Input: A sequence R 1 , . . . , R T ⊆ L ( T ) .

2: The learner samples α v ∼ Unif(0 , 1) for all v ∈ V ( T ) .

3: for each round t = 1 to T do

4: The learner places the k facilities to the leaves of the HST T based on the output F t := Cut&Round( T , y t , α ) .

5: The learner learns R t ⊆ L ( T ) .

6: The learner updates y t +1 ∈ FP ( T ) by running Algorithm 3 for Problem 2 with input R 1 , . . . , R t .

7: end for

Algorithm 2 O (log n ) -regret for graphs.

1: Input: A sequence R 1 , . . . , R T ⊆ L ( T ) .

2: The learner embeds G ( V, E, w ) into a (random) HST T with L ( T ) = V via the procedure of Theorem 2.

3: for each round t = 1 to T do

4: The learner selects a facility-placement F t ⊆ V .

5: The learner learns R t ⊆ V .

6: The learner updates F t +1 by giving as input R 1 , . . . , R t ⊆ L ( T ) to Algorithm 1 for T .

7: end for

Theorem 5. For any sequence of client requests R 1 , . . . , R T ⊆ L ( T ) , the sequence of facilityplacements F 1 , . . . , F T ⊆ L ( T ) produced by Algorithm 1 satisfies

Theorem 5 establishes that Algorithm 1 achieves constant regret in the special case of HSTs and its proof easily follows by Theorems 3 and 4. Then, the proof of Theorem 1 easily follows by Theorem 2 and Theorem 5. All the proofs are deferred to Section C of the Appendix.

4 O (1) -Regret for Fractional HST Clustering

In this section we present the O (1) -regret algorithm for Problem 2, described in Algorithm 3, and exhibit the key ideas in establishing Theorem 3. Without loss of generality, we can assume that the facility-weight satisfies γ ≥ 1 5 .

Algorithm 3 is the well-known online learning algorithm Follow the Regularized Leader ( FTRL ) with a specific regularizer R T ( · ) presented in Definition 9. Our results crucially rely on the properties of this regularizer since it takes into account the HST structure and permits us to bound the fractional moving cost of FTRL .

Definition 9. Given an HST T , the dilated entropic regularizer R T ( y ) over y ∈ FP ( T ) is defined as

̸

where δ v := ( k/n ) · | L ( T ) ∩ T ( v ) | and n := | L ( T ) | .

Algorithm 3 FTRL with dilated entropic regularization

1: Input: An adversarial sequence R 1 , . . . , R T ⊆ L ( T ) .

2: for t = 1 to T do

3: The learner selects y t ∈ FP ( T ) .

4: The learner suffers cost f R t ( y t ) + || y t -y t -1 || T .

5: The learner updates y t +1 ← arg min y ∈FP ( T ) [ ∑ t s =1 f R s ( y ) + ( γ √ nT ) · R T ( y ) ] .

6: end for

Algorithm 3 selects at each step t the facility placement y t ∈ FP ( T ) that minimizes a convex combination of the total fractional connection cost for the sub-sequence R 1 , . . . , R t -1 and R T ( y ) . The regularization term ensures the stability of the output, which will result in a bounded fractional moving cost.

Analysis of Algorithm 3. Due to space limitations, all proofs are moved to Section D of the Appendix. The primary reason for the specific selection of the regularizer at Definition 9 is that R T ( · ) is strongly convex with respect to the norm || · || T of Definition 8, as established in Lemma 1 which is the main technical contribution of the section. We use D = D T for the diameter of T .

Lemma 1. For any vectors y, y ′ ∈ FP ( T ) ,

The strong convexity of R T ( y ) with respect to || · || T is crucial since it permits us to bound the moving cost of Algorithm 3 by its fractional connection cost.

Lemma 2. For any sequence R 1 , . . . , R T ⊆ L ( T ) , the output of Algorithm 3 satisfies

We remark that using another regularizer R ( · ) that is strongly convex with respect to another norm || · || would still imply Lemma 1 with respect to || · || . The problem though is that the fractional moving cost ∑ T t =1 || y t -y t -1 || can no longer be associated with the actual moving cost ∑ T t =1 M T ( F t , F t -1 ) . It is for this reason that using a regularizer that is strongly convex with respect to || · || T is crucial.

Next, by adapting the standard analysis of FTRL to our specific setting, we derive Lemma 3 establishing that Algorithm 3 admits bounded connection cost.

Lemma 3. For any sequence R 1 , . . . , R T ⊆ L ( T ) , the output of Algorithm 3 satisfies

The proof of Theorem 3 directly follows by Lemma 2 and 3. We conclude the section by presenting how Step 5 of Algorithm 3 can be efficiently implemented, namely

Since Φ t ( y ) is strongly convex and the set FP ( T ) is a polytope, one could use standard optimization algorithms such as the ellipsoid method or projected gradient descent to approximately minimize

Φ t ( y ) given access to a sub-gradient oracle for Φ t ( · ) . In Claim 11 of Section D of the Appendix, we establish that the sub-gradients of Φ( · ) can be computed in polynomial time and thus any of the previous methods can be used to approximately minimize Φ( · ) . In Lemma 4 we establish the intuitive fact that approximately implementing Step 5 does not affect the guarantees of Theorem 3.

Lemma 4. Let y t be the minimizer of Φ t ( · ) in FP ( T ) and let z t ∈ FP ( T ) be any point such that Φ t ( z t ) ≤ Φ t ( y t ) + ϵ for some ϵ = O ( T -1 / 2 ) . Then,

Remark 3. In our implementation of the algorithm, we approximately solve Step 5 of Algorithm 3 via Mirror Descent based on the Bregman divergence of R T ( · ) . This admits the same convergence rates as projected gradient descent but the projection step can be computed in linear time with respect to the size of the HST T . We present the details of our implementation in Section C of the Appendix.

5 The Cut & Round Rounding

In this section we present our novel rounding scheme (Algorithm Cut&Round ) as well as the main steps that are required in order to establish Theorem 4. To ease notation, for any real number x ≥ 0 we denote its decimal part as δ ( x ) = x -⌊ x ⌋ . We comment that our rounding scheme simply maintains and updates a distribution over the vertices of the HST, and can be thus implemented in polynomialtime. Similar rounding schemes, like the one presented in [9], typically maintain a distribution over all possible facility-placements, which generally cannot be implemented in polynomial-time.

Algorithm 4 Cut&Round .

Algorithm 5 Alloc . Input: Numbers y u , y rem ≥ 0 , Y rem ∈ N and α u ∈ [0 , 1] . if Y rem == ⌊ y rem ⌋ then if δ ( y u ) < δ ( y rem ) then Y u ←⌊ y u ⌋ else Y u ←⌊ y u ⌋ + ✶ [ a u ≤ δ ( y u ) -δ ( y rem ) 1 -δ ( y rem ) ] end if else if δ ( y u ) < δ ( y rem ) then Y u ←⌊ y u ⌋ + ✶ [ a u ≤ δ ( y u ) δ ( y rem ) ] else Y u ←⌊ y u ⌋ +1 end if end if Return Y u .

On principle, Cut&Round (Algorithm 4) assigns to each vertex v an integer number of facilities Y v to be placed at the leaves of its sub-tree. Notice that due to sub-routine Alloc (Algorithm 5), Y v either equals ⌊ y v ⌋ or ⌊ y v ⌋ + 1 . Cut&Round initially assigns k facilities to the set of leaves that descend from the root r , which is precisely L ( T ) . Then, it moves in decreasing level order to decide Y v for each node v . Once Y v is determined (Step 5 ), the Y v facilities are allocated to the sub-trees of its children u ∈ cld( v ) (Steps 7 -10 ) via sub-routine Alloc using the thresholds α u , in a manner that guarantees that Y v = ∑ u ∈ cld( v ) Y u (see Section E.1 of the Appendix). This implies the feasibility of Cut&Round , as exactly k facilities are placed in the leaves of T at the end of the process.

Assuming that the set of thresholds α v is randomly drawn from the uniform distribution in [0 , 1] , sub-routine Alloc (Algorithm 5) guarantees that Y v either equals ⌊ y v ⌋ or ⌊ y v ⌋ +1 while E α [ Y v ] = y v . This is formally captured in Lemma 5 and is crucial in the proof of Theorem 4.

Lemma 5. Consider Algorithm 4 given as input a vector y ∈ FP ( T ) and random thresholds α v ∼ Unif(0 , 1) . Then,

By coupling Lemma 5 with the HST structure we are able to establish Theorem 4. The proof is technically involved and thus deferred to Section E of the Appendix.

6 Conclusion

In this work, we designed the first polynomial-time online learning algorithm for Online k -Clustering with Moving Costs that achieves O (log n ) -regret with respect to the cost of the optimal static facility placement, extending the results of Fotakis et al. [31] for the special case of γ = 0 . The cornerstone of our approach was to realize and establish that O (1) -regret is plausible for HST metrics. This was achieved through designing a dilated entropic regularizer to capture the structure of the HST and combine it with the FTRL algorithm, as well as designing a lossless (up to constant factors) rounding scheme that simultaneously works for both the connection and the moving cost. Both of these components where central towards acquiring constant regret on HSTs.

A interesting future direction is to investigate whether a polynomial-time online learning algorithm with O (1) -regret for the problem is theoretically possible or not. Since the O (log n ) -factor is inherently lost when using HST embeddings, this would require a significantly different approach to the one presented in this work. Finally, we comment that our current optimality guarantees are with respect to the optimal static facility placement. Going beyond the notion of regret, an intriguing future direction is establishing guarantees with respect to the optimal dynamic facility-placement that moves facilities from round to round by suffering the corresponding moving cost.

References

Alekh Agarwal, Daniel J. Hsu, Satyen Kale, John Langford, Lihong Li, and Robert E. Schapire. Taming the monster: A fast and simple algorithm for contextual bandits. In International Conference on Machine Learning , 2014.

Nir Ailon. Improved bounds for online learning over the permutahedron and other ranking polytopes. In Proceedings of the 17th International Conference on Artificial Intelligence and Statistics , AISTATS 2014, 2014.

Soroush Alamdari and David B. Shmoys. A bicriteria approximation algorithm for the k-center and k-median problems. In Workshop on Approximation and Online Algorithms , 2017.

Hyung-Chan An, Ashkan Norouzi-Fard, and Ola Svensson. Dynamic facility location via exponential clocks. ACM Trans. Algorithms , 13(2):21:1-21:20, 2017.

Tarique Anwar, Surya Nepal, Cecile Paris, Jian Yang, Jia Wu, and Quan Z. Sheng. Tracking the evolution of clusters in social media streams. IEEE Transactions on Big Data , pages 1-15, 2022.

Vijay Arya, Naveen Garg, Rohit Khandekar, Adam Meyerson, Kamesh Munagala, and Vinayaka Pandit. Local search heuristic for k-median and facility location problems. In Proceedings of the Thirty-Third Annual ACM Symposium on Theory of Computing , STOC '01, page 21-29. Association for Computing Machinery, 2001.

Baruch Awerbuch and Robert Kleinberg. Online linear optimization and adaptive routing. J. Comput. Syst. Sci. , 2008.

Maria-Florina Balcan and Avrim Blum. Approximation algorithms and online mechanisms for item pricing. In ACM Conference on Electronic Commerce , 2006.

Nikhil Bansal, Niv Buchbinder, Aleksander Madry, and Joseph Naor. A polylogarithmiccompetitive algorithm for the k-server problem. In Rafail Ostrovsky, editor, IEEE 52nd Annual Symposium on Foundations of Computer Science, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011 , pages 267-276. IEEE Computer Society, 2011.

Yair Bartal. Probabilistic approximation of metric spaces and its algorithmic applications. Proceedings of 37th Conference on Foundations of Computer Science , pages 184-193, 1996.

Avrim Blum and Carl Burch. On-line learning and the metrical task system problem. Mach. Learn. , 39(1):35-58, 2000.

Sébastien Bubeck, Michael B. Cohen, Yin Tat Lee, James R. Lee, and Aleksander Madry. kserver via multiscale entropic regularization. In Ilias Diakonikolas, David Kempe, and Monika Henzinger, editors, Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018 , pages 3-16. ACM, 2018.

Moses Charikar and Sudipto Guha. Improved combinatorial algorithms for the facility location and k-median problems. In Proceedings of the 40th Annual Symposium on Foundations of Computer Science , FOCS '99. IEEE Computer Society, 1999.

Moses Charikar, Sudipto Guha, Éva Tardos, and David B. Shmoys. A constant-factor approximation algorithm for the k-median problem (extended abstract). In Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing , STOC '99, page 1-10. Association for Computing Machinery, 1999.

Moses Charikar and Shi Li. A dependent lp-rounding approach for the k-median problem. In Automata, Languages, and Programming - 39th International Colloquium, ICALP 2012 , volume 7391 of Lecture Notes in Computer Science , pages 194-205. Springer, 2012.

Vincent Cohen-Addad, Benjamin Guedj, Varun Kanade, and Guy Rom. Online k-means clustering. In Arindam Banerjee and Kenji Fukumizu, editors, The 24th International Conference on Artificial Intelligence and Statistics, AISTATS 2021, April 13-15, 2021, Virtual Event , volume 130 of Proceedings of Machine Learning Research , pages 1126-1134. PMLR, 2021.

Aaron Cote, Adam Meyerson, and Laura J. Poplawski. Randomized k-server on hierarchical binary trees. In Cynthia Dwork, editor, Proceedings of the 40th Annual ACM Symposium on Theory of Computing, Victoria, British Columbia, Canada, May 17-20, 2008 , pages 227-234. ACM, 2008.

Bart de Keijzer and Dominik Wojtczak. Facility reallocation on the line. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI 2018 , pages 188-194, 2018.

Sina Dehghani, Soheil Ehsani, MohammadTaghi Hajiaghayi, Vahid Liaghat, and Saeed Seddighin. Stochastic k-server: How should uber work? In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland , volume 80 of LIPIcs , pages 126:1-126:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017.

Sina Dehghani, MohammadTaghi Hajiaghayi, Hamid Mahini, and Saeed Seddighin. Price of competition and dueling games. arXiv preprint arXiv:1605.04004 , 2016.

Miroslav Dudík, Nika Haghtalab, Haipeng Luo, Robert E. Schapire, Vasilis Syrgkanis, and Jennifer Wortman Vaughan. Oracle-efficient online learning and auction design. In 58th IEEE Annual Symposium on Foundations of Computer Science , FOCS 2017, 2017.

Miroslav Dudík, Daniel J. Hsu, Satyen Kale, Nikos Karampatziakis, John Langford, Lev Reyzin, and Tong Zhang. Efficient optimal learning for contextual bandits. In Proceedings of the Twenty-Seventh Conference on Uncertainty in Artificial Intelligence , UAI 2011, 2011.

David Eisenstat, Claire Mathieu, and Nicolas Schabanel. Facility location in evolving metrics. In Automata, Languages, and Programming - 41st International ColloquiumICALP 2014 , volume 8573 of Lecture Notes in Computer Science , pages 459-470. Springer, 2014.

Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. In Proceedings of the Thirty-Fifth Annual ACM Symposium on Theory of Computing , STOC '03, page 448-455, New York, NY, USA, 2003. Association for Computing Machinery.

Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. J. Comput. Syst. Sci. , 69(3):485-497, 2004.

Gabriele Farina, Christian Kroer, and Tuomas Sandholm. Optimistic regret minimization for extensive-form games via dilated distance-generating functions. In Neural Information Processing Systems , 2019.

Hendrik Fichtenberger, Silvio Lattanzi, Ashkan Norouzi-Fard, and Ola Svensson. Consistent k-clustering for general metrics. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021 , pages 2660-2678. SIAM, 2021.

Dimitris Fotakis, Loukas Kavouras, Panagiotis Kostopanagiotis, Philip Lazos, Stratis Skoulakis, and Nikos Zarifis. Reallocating multiple facilities on the line. In Proceedings of the TwentyEighth International Joint Conference on Artificial Intelligence, IJCAI 2019 , pages 273-279, 2019.

Dimitris Fotakis, Loukas Kavouras, Grigorios Koumoutsos, Stratis Skoulakis, and Manolis Vardas. The online min-sum set cover problem. In Proc. of the 47th International Colloquium on Automata, Languages and Programming , ICALP 2020.

Dimitris Fotakis, Thanasis Lianeas, Georgios Piliouras, and Stratis Skoulakis. Efficient online learning of optimal rankings: Dimensionality reduction via gradient descent. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020 , 2020.

Dimitris Fotakis, Georgios Piliouras, and Stratis Skoulakis. Efficient online learning for dynamic k-clustering. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning , volume 139 of Proceedings of Machine Learning Research , pages 3396-3406. PMLR, 18-24 Jul 2021.

Takahiro Fujita, Kohei Hatano, and Eiji Takimoto. Combinatorial online prediction via metarounding. In 24th International Conference on Algorithmic Learning Theory , ALT 2013, 2013.

Dan Garber. Efficient online linear optimization with approximation algorithms. In Proceedings of the 30th International Conference on Neural Information Processing Systems , NIPS 2017, 2017.

Xiangyu Guo, Janardhan Kulkarni, Shi Li, and Jiayi Xian. Consistent k-median: Simpler, better and robust. In Arindam Banerjee and Kenji Fukumizu, editors, Proceedings of The 24th International Conference on Artificial Intelligence and Statistics , volume 130 of Proceedings of Machine Learning Research , pages 1135-1143. PMLR, 13-15 Apr 2021.

Elad Hazan. Introduction to online convex optimization. CoRR , abs/1909.05207, 2019.

Elad Hazan, Wei Hu, Yuanzhi Li, and Zhiyuan Li. Online improper learning with an approximation oracle. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 31. Curran Associates, Inc., 2018.

Elad Hazan and Satyen Kale. Online submodular minimization. J. Mach. Learn. Res. , 2012.

Elad Hazan, Satyen Kale, and Shai Shalev-Shwartz. Near-optimal algorithms for online matrix prediction. In 25th Annual Conference on Learning Theory , COLT 2012, 2012.

Elad Hazan and Tomer Koren. The computational power of optimization in online learning. In Proceedings of the 48th Annual ACM Symposium on Theory of Computing , STOC 2016, 2016.

David P. Helmbold, Robert E. Schapire, and M. Long. Predicting nearly as well as the best pruning of a decision tree. In Machine Learning , 1997.

David P. Helmbold and Manfred K. Warmuth. Learning permutations with exponential weights. In Proceedings of the 20th Annual Conference on Learning Theory , COLT 2007, 2007.

Nicole Immorlica, Adam Tauman Kalai, Brendan Lucier, Ankur Moitra, Andrew Postlewaite, and Moshe Tennenholtz. Dueling algorithms. In Proceedings of the Forty-Third Annual ACM Symposium on Theory of Computing , STOC '11, page 215-224, New York, NY, USA, 2011. Association for Computing Machinery.

Kamal Jain, Mohammad Mahdian, and Amin Saberi. A new greedy approach for facility location problems. In John H. Reif, editor, Proceedings on 34th Annual ACM Symposium on Theory of Computing, May 19-21, 2002, Montréal, Québec, Canada , pages 731-740. ACM, 2002.

Kamal Jain and Vijay V. Vazirani. Approximation algorithms for metric facility location and k-median problems using the primal-dual schema and lagrangian relaxation. J. ACM , 48(2):274-296, 2001.

Stefanie Jegelka and Jeff A. Bilmes. Online submodular minimization for combinatorial structures. In Proceedings of the 28th International Conference on Machine Learning , ICML 2011, 2011.

Sham Kakade, Adam Tauman Kalai, and Katrina Ligett. Playing games with approximation algorithms. In Proceedings of the 39th Annual ACM Symposium on Theory of Computing , STOC 2007, 2007.

Adam Kalai and Santosh Vempala. Efficient algorithms for online decision problems. In J. Comput. Syst. Sci . Springer, 2003.

Wouter M. Koolen, Manfred K. Warmuth, and Jyrki Kivinen. Hedging structured concepts. In the 23rd Conference on Learning Theory, COLT 2010 , 2010.

Elias Koutsoupias. The k-server problem. Comput. Sci. Rev. , 3(2):105-118, 2009.

Elias Koutsoupias and Christos H. Papadimitriou. On the k-server conjecture. J. ACM , 42(5):971983, 1995.

Amit Kumar. Constant factor approximation algorithm for the knapsack median problem. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms , SODA '12, page 824-832. Society for Industrial and Applied Mathematics, 2012.

Amit Kumar, Yogish Sabharwal, and Sandeep Sen. Linear-time approximation schemes for clustering problems in any dimensions. J. ACM , 57(2), 2010.

Silvio Lattanzi and Sergei Vassilvitskii. Consistent k-clustering. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017 , volume 70 of Proceedings of Machine Learning Research , pages 1975-1984. PMLR, 2017.

Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. SIAM J. Comput. , 45(2):530-547, 2016.

Jyh-Han Lin and Jeffrey Scott Vitter. Approximation algorithms for geometric median problems. Information Processing Letters , 44(5):245 - 249, 1992.

M.E.J. Newman. The structure and function of complex networks. SIAM review , 45(2):167-256, 2003.

Romualdo Pastor-Satorras and Alessandro Vespignani. Epidemic Spreading in Scale-Free Networks. Physical Review Letters , 86(14):3200-3203, 2001.

Holakou Rahmanian and Manfred K. Warmuth. Online dynamic programming. In NIPS , 2017.

Juliette Stehlé, Nicolas V oirin, Alain Barrat, Ciro Cattuto, Lorenzo Isella, Jean-François Pinton, Marco Quaggiotto, Wouter Van den Broeck, Corinne Régis, Bruno Lina, and Philippe Vanhems. High-resolution measurements of face-to-face contact patterns in a primary school. PLOS ONE , 6(8), 2011.

Matthew J. Streeter and Daniel Golovin. An online algorithm for maximizing submodular functions. In 22nd Annual Conference on Neural Information Processing Systems , NIPS 2008, 2008.

Daiki Suehiro, Kohei Hatano, Shuji Kijima, Eiji Takimoto, and Kiyohito Nagano. Online prediction under submodular constraints. In Algorithmic Learning Theory , ALT 2012, 2012.

Eiji Takimoto and Manfred K. Warmuth. Predicting nearly as well as the best pruning of a planar decision graph. In Theoretical Computer Science , 2000.

Eiji Takimoto and Manfred K. Warmuth. Path kernels and multiplicative updates. J. Mach. Learn. Res. , 2003.

Chayant Tantipathananandh, Tanya Berger-Wolf, and David Kempe. A framework for community identification in dynamic social networks. In Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining , KDD '07, page 717-726. Association for Computing Machinery, 2007.

David P. Williamson and David B. Shmoys. The Design of Approximation Algorithms . Cambridge University Press, USA, 1st edition, 2011.

Shota Yasutake, Kohei Hatano, Shuji Kijima, Eiji Takimoto, and Masayuki Takeda. Online linear optimization over permutations. In Proceedings of the 22nd International Conference on Algorithms and Computation , ISAAC 2011, 2011.

Neal E. Young. K-medians, facility location, and the chernoff-wald bound. In Proceedings of the Eleventh Annual ACM-SIAM Symposium on Discrete Algorithms , SODA '00, page 86-95. Society for Industrial and Applied Mathematics, 2000.

Appendix

A Further Related Work

In this chapter of the appendix, we continue our discussion on the literature that relates to this work.

Efficient Combinatorial Online Learning. There exists a long line of research studying efficient online learning algorithms in various combinatorial domains (e.g., selection of paths, permutations, binary search trees etc.) [40, 62, 63, 41, 7, 60, 45, 22, 42, 66, 38, 37, 1, 2, 20, 30, 29]. Another related line of work studies black-box reductions converting any α -approximation (offline) algorithm to an O ( α ) -regret online learning algorithm for a specific class of combinatorial optimization problems called linear optimization problems [47, 8, 46, 48, 61, 32, 39, 58, 21, 33, 36]. We remark that a key difference of our setting with the aforementioned works is that in the latter case the learner is not penalized for switching actions from round to round with an additional moving/switching cost. In the context of Problem 1 this means that γ = 0 which is exactly the setting considered by [31]. As a result, apart from the fact that k -median does not belong in the class of linear optimization problems , the aforementioned black-box reductions do not apply to Problem 1 since they do not account for the moving cost.

The k-server Problem. Our work also relates with the rich line of literature on the k -server problem [50, 17, 49, 9, 19, 12]. In this setting there exists only 1 client at each round, while 1 -lookahead is assumed, i.e. the request R t is revealed prior to the action of the algorithm at step t . Moreover in k -server a facility must be placed in the exact position of the request, leading to a simpler combinatorial structure with respect to Problem 1 6 . However, in the k -server problem, instead of using the benchmark of regret , the more challenging metric of competitive ratio that measures the sub-optimality with respect to the optimal dynamic solution is used. Mostly related to ours is the work of [9] providing the first poly(log n ) -competitive algorithm for k -server by reducing the problem to the special case of HSTs. [9] first design a poly(log n ) -competitive algorithm for a fractional version of k -server at which facilities can be fractionally placed into the vertices of the HST. They then use a randomized rounding scheme to convert the fractional solution into an integral one. The basic difference of the randomized rounding scheme of [9] with the one that we introduce in this work (Algorithm Cut&Round ) is that the first provides guarantees only for the moving cost of the facilities while Cut&Round provides guarantees both for the moving cost of the facilities as well as the connection cost of the clients.

Consistent k -Clustering. Another setting of clustering in the presence of unknown clients is that of Consistent k -Clustering [53, 34, 27]. In this setting, given an unknown stream of clients , a set of k facilities has to be maintained over time so that at any round t , the selected facilities form an approximately optimal solution of the sub-instance consisting of clients appeared in the time interval { 1 , t } . A basic difference of Consistent k -Clustering with Problem 1 is that in the first case the moving cost is not penalized as long as the number of swaps does not exceed a certain threshold ( O ( k ) ).

B Proof of Theorem 2

In this chapter of the appendix we briefly discuss the details behind Theorem 2 and show how the results of [10] and [24] hold even for the specific definition of HSTs we have considered in Definition 5.

Traditionally, HSTs are not required to be balanced nor are required to have weights that are specifically powers of 2 . In fact, the seminal work of [10], later improved by [24], states that there exists a randomized procedure such that for every weighted graph G ( V, E, w ) , it constructs (in polynomial-time) a tree T such that:

There exists a perfect matching σ : V ↦→ L ( T ) that maps the vertices of G to the leaves of T .

For any vertices i, j ∈ V , their corresponding distance on T can only increase, i.e. d G ( i, j ) ≤ d T ( σ ( i ) , σ ( j )) .

On expectation, distances between vertices are distorted only by a logarithmic factor, i.e. E [ d T ( σ ( i ) , σ ( j ))] ≤ O (log | V | ) · d G ( i, j )

The weight of any edge e = ( v, u ) between a vertex v ∈ V ( T ) and its parent vertex u is precisely diam ( G ) · 2 -dpt ( v ) .

The height of T satisfies h ( T ) ≤ ⌈ log ( diam ( G )) ⌉ .

The purpose of this section is to argue that one can easily transform such a tree T to match our notion of HSTs (Definition 5), while maintaining the same guarantees for the distortion of the distances. Recall that we have already assumed that the minimum edge weight of G is 1 , i.e. min e ∈ E w e = 1 . Furthermore, we can also assume without loss of generality that the diameter of G is a power of 2 ; if not, simple scaling arguments suffice to transform G into such a graph by only distorting distances by a constant factor. Thus, we assume that diam ( G ) = 2 d for some d ≥ 0 .

We start from the tree T that the algorithm of [24] generates. Recall that by definition, the weight of an edge e = ( i, j ) between some vertex i and its parent node j is 2 d -dpt ( i ) . In order to balance the tree, we take each leaf vertex u ∈ L ( T ) at depth dpt ( u ) and extend it downwards by adding new vertices until it reaches a new depth dpt ′ ( u ) = d . For every new edge that we add during this process, we maintain that the weight of the edge e = ( i, j ) from i to its parent j is diam ( G ) · 2 -dpt ( i ) .

Let T ′ be used to denote our modified tree. Clearly, the above construction guarantees h ( T ′ ) = d . Since by definition h ( T ) ≤ ⌈ log ( diam ( G )) ⌉ = d , we know that all leaves initially lied at depth at most d , and thus by the end of the above process all leaves will lie at the same level of the tree and have depth d . Thus, we have indeed constructed a balanced tree. Furthermore, since by definition dpt ( v ) = h ( T ) -lev ( v ) , we get that the weight of the edge e = ( i, j ) from i to its parent j is w e = diam ( G ) · 2 lev ( i ) -d = 2 lev ( i ) . So, the constructed tree indeed satisfies all the requirements of Definition 5 and is a valid HST (according to our definition).

We will now argue that T ′ also satisfies all items of Theorem 2. Fist of all, the height of our new tree is precisely d , and thus it is true that h ( T ′ ) ≤ ⌈ log ( diam ( G )) ⌉ . Furthermore, since we only added edges to the initial tree T , the distance between any two leaves can only increase. Thus, we get that for any vertices i, j ∈ V it holds

Finally, it remains to upper bound the expected distortion on T ′ . Recall that by construction of [24], we know that

Since edge lengths decrease by a factor of 2 every time we move down the tree, we know that the total length of the path we added in order to move leaf i from depth dpt ( i ) to depth d is precisely 1 + 2 + . . . 2 dpt ( i ) -1 ≤ 2 dpt ( i ) . This implies that any distance on T ′ can be at most twice the corresponding distance on T , i.e.

which completes the proof.

C Proofs of Section 3

In this chapter of the appendix we present all the omitted proofs from Section 3 concerning the basic algorithmic primitives we use in order to establish our main result in Theorem 1.

Roadmap. In section C.1 we establish the connection between Problems 1 and 2 and show that our notion of fractional connection and moving cost collapses with our initial definitions in the case of integral facility placements. Then, in section C.2 we present the proof of Theorem 5 and in section C.3 we present the proof of Theorem 1.

C.1 Establishing the relation between Problems 1 and 2

Fix any HST T and let FP ( T ) be the corresponding set of fractional facility placements. In this section, we will establish that in the case of integral facility placements y ∈ FP ( T ) ∩ ◆ , the notions of fractional connection cost and fractional moving cost (formally stated in Definitions 7 and 8) collapse to the notions of actual connection and moving costs (formally stated in Definitions 1 and 2) respectively.

Let y ∈ FP ( T ) ∩ ◆ be an integral facility placement. Then, by definition, for each leaf v ∈ L ( T ) we have y v ∈ { 0 , 1 } facilities that are placed on it, and the total amount of placed facilities is k , i.e. ∑ v ∈ L ( T ) y v = k . Thus, we can associate with any integral facility placement y a corresponding set

such that | F ( y ) | = k , meaning that F ( y ) is a valid facility placement of the leaves of the T .

In Claim 1 we will establish that for any set of clients, the connection cost under F ( y ) is equal to the fractional connection cost under y . Then, in Claim 2 we will establish that the fractional moving cost between y and y ′ gives us precisely the moving cost between facility placements F ( y ) and F ( y ′ ) on T .

Claim 1. For any integral facility placement y ∈ FP ( T ) ∩ ◆ and any set of clients R ⊆ L ( T ) , it holds that f R ( y ) = C R ( F ( y ))

Proof. Fix any y ∈ FP ( T ) ∩ ◆ and any R ⊆ L ( T ) . By definition of the connection cost (Definition 1), we have

Let's fix a particular client that lies on some leaf j ∈ L ( T ) of T . Let i ∗ = arg min i ∈ F ( y ) d T ( i, j ) be the leaf closest to j that F ( y ) places a facility into. Since T is an HST and distances increase by a factor of 2 as we move up the tree, it is not hard to see that i ∗ is the leaf in F ( y ) whose lowest common ancestor (lca) with j has the smallest level. Let l ∗ = lca ( j, i ∗ ) . Equivalently, l ∗ is the minimum-level vertex in P ( j, r ) such that y l ∗ ≥ 1 . Since T is balanced, we have that the connection cost of client j under F ( y ) is precisely

and since by integrality we have that y v = 0 for any v ∈ P ( j, l ∗ ) \ { l ∗ } and y v ≥ 1 for all v ∈ P ( l ∗ , r ) , we have

Summing over all clients j ∈ R we get

which concludes the proof.

For any integral facility placements y, y ′ ∈ FP ( T ) ∩ , it holds that

Proof. Fix any two integral facility placements y, y ′ ∈ FP ( T ) ∩ ◆ . By definition of the moving cost (Definition 2), we have that

where Σ is the set of all possible matchings from the facilities in F ( y ) to the facilities in F ( y ′ ) .

In general graphs, the minimum transportation cost can have a very complicated structure and typically requires solving a minimum transportation problem in order to compute it. However, in the special case of HSTs, we are actually able to obtain a very simple expression for this quantity.

Recall that in an HST T , edge weights increase by a factor of 2 every time we move up a level on the tree. Thus, it is always in out interest to move facilities between leaves whose lowest common ancestor is as low as possible. In other words, the matching σ that minimizes the transportation cost from F ( y ) to F ( y ′ ) can be obtained by selecting an arbitrary leaf in F ( y ) , matching it to the leaf in F ( y ′ ) with which it shares the lowest lowest common ancestor and then repeating the process for the rest of the leaves.

Now fix any vertex v ∈ V ( T ) . Recall that y v is equal to the number of facilities in F ( y ) that are placed in the descendant leaves of v (respectively for y ′ v ). Thus, if we apply the above (optimal) transportation plan, the number of facilities that will end up traversing the edge from v to its parent vertex is going to be precisely | y v -y ′ v | . Since the weight of this edge is by definition 2 lev( v ) , we get that and since

we have proven the claim.

C.2 Proof of Theorem 5

Wewill now formally present the proof of Theorem 5, bounding the expected total cost of Algorithm 1. Fix any sequence of clients R 1 , . . . , R T . Since the random seed α is selected uniformly at random (Step 3 of Algorithm 1), by Item 1 of Theorem 4 we get that

Moreover since the same random seed α is used at all rounds t ≥ 1 , Item 2 of Theorem 4 implies that γ · E [ M T ( F t +1 , F t )] ≤ 4 · || y t +1 -y t || T

Thus,

where the last inequality follows by Theorem 3 for β = O ( k · | L ( T ) | 3 / 2 · D T · max( γ, 1) ) . The proof is concluded by the fact that

which is established in Claim 1 of Appendix C.1, stating that for any placement of k -facilities F ⊆ L ( T ) there exists a corresponding y ∈ FP ( T ) whose fractional connection cost is equal to F 's under any client request.

C.3 Proof of Theorem 1

We will now formally present the proof of Theorem 1, bounding the regret of Algorithm 2.

Let T be the HST that we randomly embed our graph G ( V, E, w ) into. Since V = L ( T ) , we slightly abuse notation and use u to refer both to some vertex of G and to the corresponding leaf of T . From Theorem 5, we know that the output of Algorithm 1 satisfies

where we use T in the connection and moving cost to indicate that all distances are measured on the HST. Here, the expectation is taken over the random choices of Algorithm 1.

Next, notice that both the connection cost and the moving cost are defined as sum of distances. Thus, the results of Theorem 2 about the distance distortion from G to T clearly apply for these quantities as well, namely

and

Thus, taking an expectation over the randomness of T , we finally get that

Let n = | V | and D = diam ( G ) . From the above, we get that Algorithm 2 is indeed α -regret for α = O (log n ) . Furthermore, we have that | L ( T ) | = | V | = n , and D T = 2 · (2 h ( T ) -1) ≤ 4 D since h ( T ) ≤ ⌈ log D ⌉ . Thus, setting β = O ( k · n 3 / 2 · D · max(1 , γ )) , we get that Algorithm 2 has β -additive regret, completing the proof of Theorem 1.

D Analysis of FTRL (Proofs of Section 4)

In this chapter of the appendix we present all the omitted proofs from Section 4 concerning our analysis of the Follow the Regularized Leader ( FTRL ) algorithm (Algorithm 3). To avoid repetition, from now on we fix an arbitrary HST T and use FP ( T ) to denote the set of all fractional placements of k facilities on the leaves of T . We use n = | L ( T ) | to denote the number of leaves of T , h = h ( T ) to denote its height and D = diam ( T ) to denote its diameter. Since T is an HST, we know that its diameter D , i.e. the maximum distance between any two leaves, is precisely D = 2 · (2 h -1) .

To ease notation, let w v = 2 lev( v ) . For convenience, we remind the reader that our regularizer function R T : FP ( T ) ↦→ R is defined as

̸

where δ v = k · | L ( T ) ∩ T ( v ) | / | L ( T ) | is the percentage of leaves that lie on the sub-tree rooted at vertex v multiplied by k and p ( v ) is the parent of node v . Also, recall that for any y ∈ FP ( T ) we have defined the norm

Roadmap. In Section D.1 we prove Lemma 1, namely the strong convexity of R T with respect to || · || T . Then, in Section D.2 we bound the moving cost of FTRL , proving Lemma 2. Next, in Section D.3 we bound the connection cost cost of FTRL , proving Lemma 3. Finally, in Section D.4 we account for approximation errors in the computation of the regularized leader, proving Lemma 4.

D.1 Strong Convexity (Proof of Lemma 1)

The objective of this section is to prove Lemma 1, specifically that for any fractional facility placements y, y ′ ∈ FP ( T ) it holds that

where α = (8 kDγ 2 ) -1 .

We begin by computing the gradient of R T on any fractional facility placement y ∈ FP ( T ) .

Claim 3. The partial derivatives of R T on any point y ∈ FP ( T ) are given by

̸

Proof. Clearly, R T is well-defined and differentiable on FP ( T ) . For any v = r , we compute the partial derivatives of R T ( y ) to obtain

Since y ∈ FP ( T ) , we know y v = ∑ u ∈ cld( v ) y u and by definition, δ v = ∑ u ∈ cld( v ) δ u . Finally, recall that w u = w v / 2 for any u ∈ cld( v ) . By plugging everything in we get

̸

for any v = r . For the root vertex, using similar arguments we get

Now that we have calculated the gradient of R T , we can substitute it into the definition of strong convexity. Specifically, by Claim 3, Lemma 1 states that

̸

To ease the presentation, we define quantities

̸

̸

We will prove that f ( y ′ , y ) ≥ (1 / 2 kD ) · h 2 ( y ′ , y ) and that h ( y ′ , y ) ≥ (1 / 2 γ ) · || y ′ -y || T in Claims 4 and 5 respectively. Combining these claims, equation (1) clearly holds, completing the proof of Lemma 1.

Claim 4. For any y, y ′ ∈ FP ( T ) , it holds that f ( y ′ , y ) ≥ 1 2 kD · ( h ( y ′ , y )) 2 .

̸

Proof. We begin by establishing some notation. For any v = r , let

̸

̸

where I = { v = r : µ ′ v ≥ µ v } and I ′ = { v = r : µ ′ v < µ v } . By applying the log-sum inequality in both of these terms, we obtain and

Then, we have that

̸

Next, observe that and also

and

̸

̸

̸

̸

Let B ′ = ∑ v ∈ I µ ′ v and B = ∑ v ∈ I µ v . Then, we have shown that

Our next step is to apply Pinsker's inequality to the above expression. Pinsker's inequality states that for any p, q ∈ (0 , 1) , it holds that

Since B ≤ kD and B ′ ≤ kD , we can scale everything in inequality 2 and apply Pinsker's inequality to obtain

To complete the proof, we substitute

where the last equality follows from the fact that the ratio in the inner sum always sum to 1 , and thus by only summing over the ones with positive difference we get half of the total sum of absolute differences. By swapping the summation order once again, we get

̸

and from inequality (3) we finally get

as desired.

Claim 5. For any y, y ′ ∈ FP ( T ) , it holds that || y ′ -y || T ≤ 2 γ · h ( y ′ , y ) .

̸

Proof. To prove the claim, we first need to establish some extra notation. For any y ∈ FP ( T ) and v = r , let

Furthermore, for any vertex v and any integer i ∈ [0 , h -lev ( v )] , we use p ( v, i ) to denote the i -th ancestor of v on T , for example p ( v, 0) = v , p ( v, 1) = p ( v ) and p ( v, h -lev ( v )) = r .

Recall that by definition, y r = δ r = k . Thus, if we telescope these terms and let m v = h -lev ( v ) -1 , we clearly have that

which implies

and from the triangular inequality

Plugging inequality (4) into the definition of norm || · || T , we get

̸

and by carefully exchanging the summation order, we obtain

̸

Finally, observe that ∑ u ∈ T ( v ) w u y ′ u ≤ 2 w v y ′ v . To see this, fix the sub-tree T ( v ) rooted at vertex v and recall that since y ′ ∈ FP ( T ) , the total amount of facilities at each level is y ′ v . Furthermore, the weights w v decrease by a factor of 2 at every level. Using the same arguments, we obtain ∑ u ∈ T ( v ) w u δ u ≤ 2 w v δ v . Combining everything, we finally get

̸

or equivalently, || y ′ -y || T ≤ 2 γ · h ( y ′ , y ) .

D.2 Bounding the Moving Cost (Proof of Lemma 2)

In this section we will upper bound the moving cost of FTRL by its connection cost. Fix any sequence of client requests R 1 , R 2 , . . . , R T ⊆ L ( T ) . Recall that at each step t , FTRL selects a fractional facility placement y t given by

where Φ t ( y ) = ∑ t -1 s =1 f R s ( y ) + 1 η · R T ( y ) is the objective that FTRL minimizes over at step t for η = ( γ · √ nT ) -1 . In this section, we prove Lemma 2, by arguing that

since the proof follows easily by the definitions of η and α .

From Lemma 1 we already know that R T is α -strongly convex with respect to || · || T for α = (8 kDγ 2 ) -1 . Furthermore, by definition the fractional connection cost

is clearly convex for any client request R ⊆ L ( T ) . Thus, it is straight-forward to argue that at any step t , the FTRL objective Φ t is α η -strongly convex with respect to || · || T . Unfortunately, f R ( y ) is not differentiable on FP ( T ) , but its sub-gradients are well-defined on any y ∈ FP ( T ) . Thus, the strong convexity of Φ t provides us with the following guarantee:

Claim 6. Fix any pair of fractional facility placements y, y ′ ∈ FP ( T ) and any time step t ∈ [ T ] . Let g t ∈ ∂ Φ t ( y ) be any sub-gradient of Φ t at y . Then, it holds that

Furthermore, since by definition y t is the (unique) minimizer of Φ t , the first order optimality conditions on Φ t imply that there exists some g ∗ t ∈ ∂ Φ t ( y t ) such that ⟨ g ∗ t , y -y t ⟩ ≥ 0 for any y ∈ FP ( T ) . Claim 6 for y = y t , y ′ = y t -1 and g t = g ∗ t gives us

Thus, we have

where for the equality we used the fact that Φ t ( y ) = Φ t -1 ( y )+ f R t -1 ( y ) and for the second inequality we used the fact that y t -1 is by definition the minimizer of Φ t -1 . Finally, since f R ( y ) ≥ 0 for any client request R ⊆ L ( T ) , we have

where the last inequality follows from the Arithmetic Mean - Geometric Mean inequality. Summing over all t completes the proof of Lemma 2.

D.3 Bounding the Connection Cost (Proof of Lemma 3)

In this section we will upper bound the connection cost of FTRL by the connection cost of the optimal fractional facility placement in hindsight. This is a standard analysis found in many textbooks, and we present it just for the sake of completeness.

Fix any sequence of client requests R 1 , R 2 , . . . , R T ⊆ L ( T ) . Recall that at each step t , FTRL selects a fractional facility placement y t given by

where Φ t ( y ) = ∑ t -1 s =1 f R s ( y ) + 1 η · R T ( y ) is the objective that FTRL minimizes over at step t for η = ( γ · √ nT ) -1 . Let y ∗ be the optimal facility placement in hindsight, i.e.

In this section we prove Lemma 3,by arguing that

and then the proof follows easily by definition of η .

In the standard analysis of FTRL , the following quantities are of special interest as they appear in the final regret guarantees of the algorithm:

Let diam( R T ) := max y,y ′ ∈FP ( T ) | R T ( y ) -R T ( y ′ ) | be the diameter of the regularizer.

Let G f be an upper bound on the dual norm of the sub-gradient of the fractional connection cost for any client request, i.e. for any R ⊆ L ( T ) and any y ∈ FP ( T ) , there exists some sub-gradient g ∈ ∂f R ( y ) such that || g || ∗ T ≤ G f . Here, || · || ∗ T denotes the dual norm of || · || T .

We begin by presenting the standard analysis of FTRL and deriving an expression for the regret guarantee that depends on the above quantities. Recall that at any step t , the FTRL objective Φ t doesn't include f R t since the client request R t is not revealed to the algorithm at the time of decision. Webegin by bounding the connection cost of a theoretical algorithm that has access to this information and thus at time t can pick facility placement y t +1 .

Claim 7. The output of FTRL satisfies

where the equality holds by definition of Φ t and the inequality holds from the optimality of y t -1 on Φ t -1 . Similarly, we obtain

If we keep applying this rule, we finally get that

Furthermore, we have Φ 1 ( y 1 ) = R T ( y 1 ) /η and Φ t ( y ∗ ) ≥ Φ t ( y t ) for all t . Thus, we get

or equivalently (by substituting Φ T +1 's definition) we have

The claim follows from the definition of diam( R T ) .

Next, we proceed by bounding the increase in the connection cost that we suffer by choosing y t instead of y t +1 at time t .

Claim 8. For any t ≥ 0 , it holds that f R t ( y t ) ≤ f R t ( y t +1 ) + ηG 2 f /α .

Proof. For any client request R ⊆ L ( T ) , the fractional connection cost function f R ( y ) is clearly convex and its sub-gradients are well-defined on FP ( T ) . By definition of G f , we know that there exists some sub-gradient g ∈ ∂f R t ( y t ) such that || g || ∗ T ≤ G f . Using this sub-gradient, we get

Proof. We have

where the first inequality is derived from the convexity of the fractional connection cost, the second inequality is an application of Holder's inequality and the third inequality is from G f 's definition.

As we have already argued in section D.2, we know that for any step t , the FTRL objective Φ t is α/η -strongly convex with respect to || · || T . Using the definition of strong convexity, this implies that

for any sub-gradient g ∈ ∂ Φ t +1 ( y t +1 ) . Furthermore, since y t +1 is the minimizer of Φ t +1 , we know from the first order optimality conditions that we can select g ∈ ∂ Φ t +1 ( y t +1 ) such that ⟨ g, y -y t +1 ⟩ ≥ 0 for any y ∈ FP ( T ) . Using such a sub-gradient, we get

where we just expanded Φ t +1 's definition and used the fact that y t is the minimizer of Φ t . Combining everything, we finally obtain

and the claim follows.

We complete the analysis of FTRL by combining Claims 7 and 8 in order to obtain the following regret guarantee:

Claim 9. The output of FTRL satisfies

It remains to substitute the specific values of the parameters that appear in the regret guarantee. We have already proven in section D.1 that R T is α -strongly convex with respect to || · || T for α = (8 kDγ 2 ) -1 . Next, we provide an upper bound for the diameter of the regularizer.

Claim 10. It holds that diam( R T ) ≤ knD .

Proof. Fix any y ∈ FP ( T ) . Be definition, we know that y v ≤ y p ( v ) and δ v ≤ δ p ( v ) for any v = r . Thus, the expressions inside the logarithms of the regularizer are always at most 1 , which implies that R T ( y ) ≤ 0 . Furthermore, for any α, β > 0 it holds that α -β ≤ α · ln ( α/β ) . Using this inequality, we get that

̸

Fix any level l ∈ [0 , h -1] and let V l = { v ∈ V ( T ) : lev ( v ) = l } denote the set of vertices of the HST at level l . Since y ∈ FP ( T ) , we know that ∑ v ∈ V l y v = k , and by definition of δ 's we know that ∑ v ∈ V l δ v = k as well. Furthermore, we know that ∑ v ∈ V l y p ( v ) ≤ n · ∑ v ∈ V l +1 y v = n · k since any vertex v can have at most n (i.e. the total number of leaves) children. Using the same argument,

̸

we have ∑ v ∈ V l δ p ( v ) ≤ n · ∑ v ∈ V l +1 y v = n · k . Thus, combining everything we obtain

̸

which proves our claim.

Finally, we only need to find an upper bound for G f . We begin by computing a set of sub-gradients for the fractional connection cost function.

Claim 11. Fix any client request R ⊆ L ( T ) and any y ∈ FP ( T ) . Define the vector g R,y ∈ R | V ( T ) | such that

Then, g R,y ∈ ∂f R ( y ) , i.e. g R,y is a sub-gradient of f R on point y .

Proof. Fix any client request R ⊆ L ( T ) . By definition of the fractional connection cost on facility placement y ∈ FP ( T ) , we have

where P ( j, r ) denotes the unique path from leaf j ∈ L ( T ) to the root r . This is clearly a convex function on FP ( T ) and thus the sub-gradients of f R are well-defined. Fix any v ∈ V ( T ) . We distinguish between two cases.

If y v < 1 , then the partial derivative of f R ( y ) is well-defined and given by

where T ( v ) is the set of vertices on the sub-tree rooted at vertex v .

If y v ≥ 1 , then clearly it doesn't contribute to f R ( y ) . Using standard calculus, it is not hard to argue that in this case there exists a sub-gradient of f R ( y ) whose coordinate corresponding to v is 0 . Thus, we have argued that that g R,y is a valid sub-gradient of f R on point y .

Finally, we provide an upper bound on the dual-norm of the sub-gradients that we computed on Claim 11.

Claim 12. For any y ∈ FP ( T ) and any R ⊆ L ( T ) , it holds that || g R,v || ∗ T ≤ 2 n γ .

Proof. Recall that we have defined the moving cost norm as

which is basically a weighted l 1 -norm with weights γ · w v . It is well-known that the dual of the l 1 -norm is the l ∞ norm. Similarly, the dual of the weighted l 1 -norm is a weighted l ∞ norm with inverse weights, i.e. || · || ∗ = l ∞ (( γw ) -1 ) . Thus, we have

Using the calculation of the sub-gradients from Claim 11 and that R ⊆ L ( T ) and thus | R | ≤ n , we immediately get the claim.

Claim 10 provides us with an expression for diam( R T ) and Claim 12 provides us with an expression for G f . Plugging everything in into Claim 9, we complete the proof of Lemma 3.

D.4 Incorporating approximation errors (Proof of Lemma 4)

Fix any sequence of client requests R 1 , R 2 , . . . , R T ⊆ L ( T ) . Recall that at each step t , FTRL selects a fractional facility placement y t given by

where Φ t ( y ) = ∑ t -1 s =1 f R s ( y ) + 1 η · R T ( y ) is the objective that FTRL minimizes over at step t for η = ( γ · √ nT ) -1 .

Now, assume that instead of minimizing Φ t ( y ) over FP ( T ) to compute y t , we are only able to compute a fractional facility placement z t ∈ FP ( T ) such that Φ t ( z t ) ≤ Φ t ( y t ) + ϵ for some ϵ > 0 .

Claim 13. For any step t , it holds that

Proof. As we have already argued in section D.2, we know that for any step t , the FTRL objective Φ t is α/η -strongly convex with respect to || · || T . Combining this with the first order optimality condition for Φ t on y t , we get

Using Claim 13, we can easily bound both the connection and the moving cost of the approximated FTRL solutions.

For the connection cost, recall that the fractional connection cost function f R t at step t is convex, which implies that

for some g ∈ ∂f R t ( z t ) . Using Holder's inequality to upper bound the inner-product and using the upper bound of Claim 12 for the dual norm of the sub-gradients of f R t , we get that

and finally from Claim 13 we get that

which implies that

for

̸

It is always the case that we update y ′ from some y ∈ FP ( T ) , so we can simplify the above expression to get

̸

For the moving cost, recall it suffices to use the triangular inequality that || · || T (as a norm) satisfies:

The proof of Lemma 4 follows easily by plugging in η = ( γ · √ nT ) -1 , α = (8 kDγ 2 ) -1 and ϵ = O (1 / √ T ) .

D.5 Implementation of Projected Mirror Descent

We conclude this section by considering the Projected Mirror Descent update step, namely

that takes as input a fractional facility placement y ∈ FP ( T ) and returns some other y ′ ∈ FP ( T ) that minimizes a linear cost under vector c plus the Bregman Divergence between the initial and the new point under regularizer R T . Here, η > 0 is a tuning parameter that balances the dynamics between the linear cost and the Bregman Divergence.

By letting c be the sub-gradient of the fractional connection cost over the observed sequence of clients, we can use this update step in order to approximate the FTRL objective; this is, in fact, the implementation we did for our experimental evaluation of Algorithm 2. In this section we will argue that the special structure of R T allows us to compute the update step in linear (to the size of the HST) time.

By definition of the Bregman Divergence, we have

Substituting everything, we get that the update step of Projected Mirror Descent can be written as

̸

̸

Recall that by definition, FP ( T ) is the polytope

Since our objective is to minimize function F ( · ) over FP ( T ) , we can write down the KKT optimality conditions to obtain the following conditions about the minimizer y ∗ :

where µ v is the Lagrange multiplier for constraint y v = ∑ u ∈ cld( v ) y u and µ v = 0 for v ∈ L ( T ) . To complete our computation of y ∗ , it remains to compute the Lagrange multipliers µ .

Since y ∗ ∈ FP ( T ) , it is not hard to verify that for any v / ∈ L ( T ) it holds

and using the KKT optimality condition, this implies that for any v / ∈ L ( T )

or equivalently, since w v = 2 w u for all u ∈ cld( v ) ,

Thus, starting from µ v = 0 on the leaves, this expression provides as a bottom-up algorithm to compute all the Lagrange multipliers µ . Using these multipliers and the KKT optimality conditions, we can then easily compute the ratios

̸

for all vertices v = r . Finally, we can start from the root vertex r , for which we know that y ∗ r = k , and cascade these ratios downwards until we reach the leaves and we have compute all entries of y ∗ . Clearly, this is all done in linear time to the number of vertices.

Intuitively, this update step can be interpreted as an application of the Multiplicative Weights Update algorithm on every parent vertex v that decides how its mass should be split to its children. We repeat this process in a bottom-up manner, and then we simply start with k facilities on the root and begin splitting them based on these ratios while moving downwards.

E Analysis of Cut & Round (Proofs of Section 5)

In this chapter of the appendix we present all the omitted proofs from Section 5 concerning our online rounding scheme Cut&Round . To avoid repetition, from now on we fix an arbitrary HST T and use FP ( T ) to denote the set of all fractional placements of k facilities on the leaves of T .

Roadmap. In section E.1, we argue about the correctness of Cut&Round ; namely, we show that no matter the input, Cut&Round always returns a set of k -leaves of T where the facilities are placed. Then, in section E.2 we establish the main property of Cut&Round and prove Lemma 5. Finally, in section E.3 we analyze the expected connection cost of Cut&Round 's output and prove Item 1 of Theorem 4 (Lemma 6) while in section E.4 we analyze the expected moving cost of Cut&Round 's output and prove Item 2 of Theorem 4 (Lemma 7).

E.1 Correctness of Cut & Round

We begin by proving the correctness of Cut&Round . Fix any y ∈ FP ( T ) and any set of thresholds α ∈ [0 , 1] | V ( T ) | . Let F = Cut&Round( T , y, α ) . In this section, we will prove that | F | = k , i.e. we will argue that Cut&Round always returns a set of k leaves at which facilities must be placed, as it is expected to. In order to show this, we will need to analyze the Y v variables produced by Cut&Round .

Claim 14. For any leaf v ∈ L ( T ) , it holds that Y v ∈ { 0 , 1 } .

Proof. Observe that for any v ∈ V ( T ) , sub-routine Alloc sets Y v to either ⌊ y v ⌋ or ⌊ y v ⌋ +1 . By definition of FP ( T ) , we have y v ∈ [0 , 1] for each leaf v ∈ L ( T ) . We distinguish between two different cases. If y v ∈ [0 , 1) , then clearly Y v ∈ { 0 , 1 } . If y v = 1 , then δ ( y v ) = 0 and thus Alloc will always set Y v = ⌊ y v ⌋ = 1 . Thus, the claim holds for all leaves v ∈ L ( T ) .

Proof. Fix any non-leaf vertex v / ∈ L ( T ) . We will analyze the inner loop of Cut&Round that iterates over v 's children. Initially, Cut&Round sets Y rem = Y v and y rem = y v . Then, we proceed to itteratively call Alloc , once per child vertex of v . Each time Alloc assigns some value Y u to a child vertex u ∈ cld( v ) , we update Y rem to Y rem -Y u ; thus, to prove our claim it suffices to argue that after we update the last child vertex, we have Y rem = 0 .

Since by definition of sub-routine Alloc we know that Y v ∈ {⌊ y v ⌋ , ⌊ y v ⌋ +1 } , we know that initially (before any child vertex is assigned a value Y u ) it holds that Y rem ∈ {⌊ y rem ⌋ , ⌊ y rem ⌋ +1 } . In fact, a simple case analysis over the decision tree of sub-routine Alloc suffices to see that this invariant holds not only at the beginning, but even after we begin assigning values to the child vertices and update Y rem and y rem .

Since y ∈ FP ( T ) , we know that y v = ∑ u ∈ cld( v ) y u and thus y rem = y u at the time we iterate over the last child vertex u ∈ cld( v ) . Furthermore, from the above discussion we know that Y rem ∈ {⌊ y u ⌋ , ⌊ y u ⌋ +1 } . Since δ ( y u ) = δ ( y rem ) , it is easy to verify that in any case Alloc sets Y u = Y rem and thus after the last update we have Y rem = 0 , as desired.

Proof of Correctness. Recall that by definition, the output of Cut&Round is F = { v ∈ L ( T ) : Y v = 1 } . Since from Claim 14 we know that Y v ∈ { 0 , 1 } for all v ∈ L ( T ) , this implies that | F | = ∑ v ∈ L ( T ) Y v . We apply Claim 15 to the root vertex r , then again to each u ∈ cld( r ) and so on until we reach the leaves. This gives us that Y r = ∑ v ∈ L ( T ) Y v and thus | F | = Y r . Since by definition Cut&Round sets Y r = k , we have proven that | F | = k as desired.

E.2 Proof of Lemma 5 (Computing the Allocation Probabilities)

In this section, we formally prove the main property of algorithm Cut&Round , as stated in Lemma 5. Fix any fractional facility placement y ∈ FP ( T ) and let α v ∼ Unif(0 , 1) be independent uniformly random thresholds for all v ∈ V ( T ) . Let F = Cut&Round( T , y, α ) be the output of algorithm Cut&Round on this set of inputs. Recall that algorithm Cut&Round sets the variables Y v during its execution, for all v ∈ V ( T ) . As we have already discussed, Y v is the total number of facilities in F on the leaves of the sub-tree rooted at v , i.e. Y v = | T ( v ) ∩ F | . We will prove that for any v ∈ V ( T ) , we have

We begin by writing down the following property for sub-routine Alloc :

Claim 16. Fix any fractional facility placement y ∈ FP ( T ) and let α v ∼ Unif(0 , 1) for all v ∈ V ( T ) . For any vertex u ∈ V ( T ) of T , let Y u = Alloc( y u , y rem , Y rem , α u ) be the number of facilities assigned to the sub-tree of u by Line 8 of Algorithm Cut&Round (Algorithm 4). Then,

̸

̸

Proof. This claim is a direct consequence of sub-routine Alloc 's description (Algorithm 5) and the fact that α v ∼ Unif(0 , 1) for all v ∈ V ( T ) .

Using this claim, we are now ready to prove Lemma 5.

Proof of Lemma 5. We prove the lemma via a top-down induction on the vertices of T (decreasing level order). For the root vertex, we know that since y ∈ FP ( T ) we have y r = k and also by definition of Cut&Round we have Y r = k . Thus, we get that Y r = y r = ⌊ y r ⌋ with probability 1 -δ ( y r ) = 1 and the claim holds. Now, fix any non-leaf vertex v / ∈ L ( T ) and assume that Y v = ⌊ y v ⌋ with probability 1 -δ ( y v ) and Y v = ⌊ y v ⌋ +1 with probability δ ( y v ) . To complete our induction, we will now proceed to prove the claim for all the children vertices of v .

We begin by proving the claim for the first child of vertex v , and then we will show how the same arguments extend for all its children. Let u ∈ cld( v ) be the first child vertex of v that Cut&Round iterates over. Then, by definition of Cut&Round we have that Y rem = Y v and y rem = y v . Using the inductive hypothesis on v , this implies that Y rem = ⌊ y rem ⌋ with probability 1 -δ ( y rem ) and Y rem = ⌊ y rem ⌋ +1 with probability δ ( y rem ) . Conditioning on the value of Y rem , we get

/a80 We distinguish between two different cases based on whether δ ( y u ) ≤ δ ( y rem ) or δ ( y u ) > δ ( y rem ) . In any case, we can use Claim 16 to substitute the conditional probabilities on the above expression and easily get that

/a80 α [ Y u = ⌊ y u ⌋ ] = 1 -δ ( y u ) Thus, we have already proven the claim for the first child of v . However, to complete our induction, we need to prove the claim for all children of v and not just the first one. The only property that we used and holds specifically for the first child was that Y rem = ⌊ y rem ⌋ with probability 1 -δ ( y rem ) and Y rem = ⌊ y rem ⌋ +1 with probability δ ( y rem ) . Let Y ′ rem and y ′ rem be the updated remaining facilities after the value Y u of the first child has been assigned. If we can prove that Y ′ rem = ⌊ y ′ rem ⌋ with probability 1 -δ ( y ′ rem ) and Y ′ rem = ⌊ y ′ rem ⌋ +1 with probability δ ( y ′ rem ) , then we can keep applying the same argument and inductively prove the claim for all the children of v .

By definition, we have that Y ′ rem = Y rem -Y u and y ′ rem = y rem -y u . Once again, we distinguish between two different cases.

Let δ ( y u ) ≤ δ ( y rem ) . In that case, we get that ⌊ y ′ rem ⌋ = ⌊ y rem ⌋ - ⌊ y u ⌋ and also that δ ( y ′ rem ) = δ ( y rem ) -δ ( y u ) . Since we know that Y rem ∈ {⌊ y rem ⌋ , ⌊ y rem ⌋ + 1 } and Y u ∈ {⌊ y u ⌋ , ⌊ y u ⌋ +1 } , this implies that

/a80 Using conditional probabilities and the inductive hypothesis on the distribution of Y rem , we obtain

as desired.

Let δ ( y u ) > δ ( y rem ) . In that case, we get that ⌊ y ′ rem ⌋ = ⌊ y rem ⌋ - ⌊ y u ⌋ -1 and also that δ ( y ′ rem ) = 1 + δ ( y rem ) -δ ( y u ) . Since we know that Y rem ∈ {⌊ y rem ⌋ , ⌊ y rem ⌋ +1 } and Y u ∈ {⌊ y u ⌋ , ⌊ y u ⌋ +1 } , this implies that

/a80 α [ Y ′ rem = ⌊ y ′ rem ⌋ ] = /a80 α [ Y rem = ⌊ y rem ⌋ ∩ Y u = ⌊ y u ⌋ +1] Using conditional probabilities and the inductive hypothesis on the distribution of Y rem , we obtain

/a80 /a80 Using Claim 16 to substitute the conditional probabilities, we finally get as desired.

Thus, we have concluded the proof of Lemma 5.

E.3 Proof of Item 1 in Theorem 4 (Bounding the Expected Connection Cost)

Lemma 6. Let F = Cut&Round( y, α ) where for all v ∈ V ( T ) , α v ∼ Unif(0 , 1) independently. Then,

❊ α [ C R ( F )] = f R ( y ) for any R ⊆ L ( T ) Proof. Fix any y ∈ FP ( T ) and let α ∈ [0 , 1] | V ( T ) | be a set of thresholds such that for each v ∈ V ( T ) , α v is drawn independently at random from the uniform distribution, i.e. α v ∼ Unif(0 , 1) . Let F = Cut&Round( T , y, α ) . We will prove that for any set of clients R ⊆ L ( T ) , it holds that α [ C R ( F )] = f R ( y ) .

❊ Recall that the Y v variables set by Cut&Round denote the total number of facilities in F that are placed on the sub-tree rooted at vertex v , i.e. Y v = | F ∩ T ( v ) | . As argued in section E.1, we know that Y ∈ FP ( T ) ∩ ◆ , i.e. Y is a valid integral facility placement. Thus, from Claim 1 of section C.1, we know that C R ( F ) = f R ( Y ) . This implies that by definition of the fractional connection cost under client request R , we have that

Thus, we get

where the first equality holds by linearity of expectation, and the second equality holds by the fact that Y v ∈ N for all v ∈ V ( T ) . Since Y v ∈ {⌊ y v ⌋ , ⌊ y v ⌋ +1 } , we know that for any v ∈ V ( T ) , Y v can be 0 only if y v ∈ [0 , 1) . Furthermore, from Lemma 5, we know that in the case of uniformly random thresholds, this happens with probability precisely 1 -y v . Combining these facts, we get /a80 α [ Y v = 0] = max(0 , 1 -y v ) and thus

concluding the proof of Lemma 6.

E.4 Proof of Item 2 in Theorem 4 (Bounding the Expected Moving Cost)

Lemma 7. Let F = Round&Cut( y, α ) and also let F ′ = Round&Cut( T , y ′ , α ) where α v ∼ Unif(0 , 1) for all v ∈ V ( T ) . Then,

Proof. Fix any pair of fractional facility placements y, y ′ ∈ FP ( T ) and let corresponding outputs of Cut&Round be denoted as F = Cut&Round( T , y, α ) and F ′ = Cut&Round( T , y ′ , α ) . Observe that the same set of (uniformly random) thresholds α v is used in both cases, as this will play a crucial part in our analysis. To prove Lemma 7, we need to prove that

where the expectation is taken over the value of the uniformly random thresholds α v .

The proof of Lemma 7 is technically involved, and thus we will break down our approach into smaller sections to ease the presentation. We begin by proving the Lemma in the special case where the transition from y to y ′ has a very simple structure, which we now proceed to define:

Definition 10. We say that two fractional facility placements y, y ′ ∈ FP ( T ) are ϵ -neighboring if there are two leaves s, t ∈ L ( T ) with least common ancestor p ∈ V ( T ) such that the following hold:

Furthermore, we say that y, y ′ are strictly ϵ -neighboring if ϵ is sufficiently small to satisfy

ϵ < 1 .

Basically, if y and y ′ are ϵ -neighboring then y ′ is obtained by pushing ϵ -mass on y from s to t along the unique path that connects these two leaves. Furthermore, if ϵ is sufficiently small so that for any v ∈ V ( T ) either ⌊ y v ⌋ = ⌊ y ′ v ⌋ or | y v -y ′ v | ≤ 1 and at least one of the two is integral, then we say that the two fractional facility placements are strictly ϵ -neighboring. As we will shortly argue, Lemma 7 holds in the special case where y, y ′ are strictly ϵ -neighboring.

Claim 17. If y, y ′ ∈ FP ( T ) are strictly ϵ -neighboring for some ϵ ≥ 0 , then

Before proving Claim 17, let us first show why it suffices to argue about the general case and prove Lemma 7. Let y, y ′ ∈ FP ( T ) be any two fractional placements. Recall that || y -y ′ || T captures precisely the minimum transportation cost from y to y ′ on T . If we break down this transportation plan into small movements of masses between leaves, then we can view it as a sequence of transitions between strictly ϵ -neighboring placements. This is formalized in the following claim:

Claim 18. For any y, y ′ ∈ FP ( T ) , there exists a finite sequence y 0 , y 1 , . . . , y m ∈ FP ( T ) of fractional facility placements with y = y 0 and y ′ = y m such that

1. y j , y j +1 are strictly ϵ -neighboring for some ϵ ≥ 0 for j = 0 , 1 , . . . , m -1 .

We will now prove Lemma 7. Let F j = Cut&Round( T , y j , α ) be the corresponding output of Cut&Round on y j using the same (uniformly random) thresholds α v . Then,

In the above calculation, the first inequality holds from the fact that the minimum transportation cost satisfies the triangular inequality. The first equality holds from linearity of expectation. The second inequality holds from Claim 17 and the second equality holds from Claim 18.

Thus, we have shown that proving Lemma 7 for the special case of strictly ϵ -neighboring fractional facility placements y, y ′ suffices to prove Lemma 7 for the general case of any y, y ′ ∈ FP ( T ) and conclude this section. The rest of this section is dedicated to proving Claim 17, which is the main technical challenge towards proving Lemma 7.

Proof of Claim 17. Fix any pair of strictly ϵ -neighboring fractional facility placements y, y ′ ∈ FP ( T ) and let the corresponding outputs of Cut&Round be F = Cut&Round( T , y, α ) and F ′ = Cut&Round( T , y ′ , α ) . In section E.1 we have already shown that F, F ′ ⊆ L ( T ) are valid facility placements since | F | = | F ′ | = k . Let Y, Y ′ ∈ FP ( T ) be used to denote the corresponding integral placements, i.e.

Y v := | L ( T ) ∩ F | = number of facilities in F placed on the leaves of the sub-tree rooted at v and

Y ′ v := | L ( T ) ∩ F ′ | = number of facilities in F ′ placed on the leaves of the sub-tree rooted at v

Recall that Y and Y ′ are precisely the values of the Y -variables that algorithm Cut&Round sets. As shown in Claim 2 of Section E.4, we know that γ · M T ( F, F ′ ) = || Y -Y ′ || T . Thus, in order to prove Claim 17, we need to show that

❊ α [ || Y -Y ′ || T ] ≤ 4 · || y -y ′ || T Since y, y ′ are strictly ϵ -neighboring fractional facility placements, we know that there exist two leaves s, t ∈ L ( T ) with lowest common ancestor p ∈ V ( T ) such that | y v -y ′ v | is ϵ among vertices on the (unique) path from s to t (excluding vertex p ) and is 0 otherwise. Let L = lev( p ) . Then, by definition of || · || T we have

Furthermore, recall that from Lemma 5, Cut&Round rounds y v to either Y v = ⌊ y v ⌋ + 1 with probability δ ( y v ) or to ⌊ y v ⌋ with probability 1 -δ ( y v ) . Since ϵ is sufficiently small so that either ⌊ y v ⌋ = ⌊ y ′ v ⌋ or | y v -y ′ v | ≤ 1 and at lowest one of the two is integral (and it is thus always rounded to itself), we get that | Y v -Y ′ v | ≤ 1 for all v ∈ V ( T ) . This implies that

Let l ∈ [0 , h ( T )] be any level on the HST T and let C l be used to denote the expected number of vertices at level l that are rounded to different values, i.e.

̸

Then, the above imply that

It remains to compute C l for all l ∈ [0 , h ( T )] . This is done in Claim 19, where we prove that C l = 0 for l ≥ L (the level of s and t 's lowest common ancestor) and C l ≤ 4 ϵ · ( L -l ) otherwise. Combining this claim with equations (5) and (6) immediately implies that which completes the proof of Claim 17.

Proof. Recall that for fixed thresholds α v , the output of Cut&Round is deterministic. Since L is the level of vertex p (the lowest common ancestor of leaves s, t ) and by definition of strictly ϵ -neighboring placements y, y ′ we know y v = y ′ v for any vertex v such that lev( v ) ≥ L , we immediately get that C l = 0 for any l ≥ L .

We will now proceed to analyze C l for any l < L . We partition the set of vertices v ∈ V ( T ) with lev( v ) = l into three sets:

A vertex v is called active if it lies on the (unique) path between leaves s and t .

A vertex v is called inactive if it is not a descendant of p (the lowest common ancestor of leaves s and t ).

A vertex v is called affected if it is not active and is a descendant of p .

Obviously, each vertex v with lev( v ) = l must lie in exactly one of these sets.

̸

Inactive Vertices. We will prove that for every inactive vertex v , /a80 α [ Y v = Y ′ v ] = 0 . Since the same set of thresholds α is used to round both y and y ′ , the output of Cut&Round is deterministic. Furthermore, if a vertex v is inactive, then we know that y v = y ′ v and also y u = y ′ u for any ancestor vertex of u of v (by Definition 10 of neighboring facility placements). Thus, this immediately implies that Y v = Y ′ v with probability 1 and thus we do not need to account for inactive vertices when computing C l .

̸

Active Vertices. We will prove that for every active vertex v , /a80 α [ Y v = Y ′ v ] = ϵ . Recall that any active vertex is either an ancestor of leaf s or leaf t . We will only prove the claim in the case when v is an ancestor of t ; the other case is completely analogous. A formal proof by induction is given in Claim 20, presented at the end of this section. As a direct corollary, since there are only two active vertices per level, the expected number of active vertices in level l that are rounded two different values is precisely 2 ϵ .

Affected Vertices. Finally, we will now analyze the affected vertices. By definition, we know that each affected vertex v will have a unique active ancestor (also counting p ). We partition the set of affected vertices on level l into 2( L -l -1) + 1 groups, based on their corresponding active ancestor. The main argument we need to establish is that by definition of Round&Cut , at most one vertex in each of these groups can be rounded to a different value.

To see this, observe that Round&Cut is monotone, in the sense that if y ′ v ≥ y v and also y ′ u ≥ y u for all ancestors u of v , then (assuming the same set of thresholds is used), we know that Y ′ v ≥ Y v . Using this fact on the vertices of a group, since all of them can either only increase or decrease, in order to maintain balance at most one of them can change, otherwise we would get a change of 2 or more on the parent node which cannot happen.

̸

Furthermore, for a specific group, if both the common active ancestor and its child u with y u = y ′ u end up rounded to the same value, we get (from the fact that the same thresholds are used) that all the vertices in the group will be rounded to the same value. Thus, in order for a (unique) vertex in any group to change, at least one of two active vertices must change, which happens with probability at most 2 ϵ . Since there are 2( L -l -1) + 1 groups, we get as a corollary that the expected number of affected vertices at level l that get rounded to a different value is at most 2 ϵ · (2 L -2 l -1) .

̸

Claim 20. Let v be any active vertex that is an ancestor of t . Then, /a80 α [ Y v = Y ′ v ] = ϵ . Proof. In fact, we will in fact prove the following stronger claim, which clearly implies Claim 20.

/a80 α [ Y v = ⌊ y v ⌋ and Y ′ v = ⌊ y v ⌋ ] = 1 -δ ( y v ) -ϵ . · /a80 α [ Y v = ⌊ y v ⌋ and Y ′ v = ⌊ y v ⌋ +1] = ϵ . · /a80 α [ Y v = ⌊ y v ⌋ +1 and Y ′ v = ⌊ y v ⌋ ] = 0 · /a80 α [ Y v = ⌊ y v ⌋ +1 and Y ′ v = ⌊ y v ⌋ +1] = δ ( y v )

Once again, we will prove the claim via induction, starting from the highest active ancestor of t at level l = L -1 and moving towards the leaf t at level l = 0 . We begin by mentioning that for vertex p ( s and t 's lowest common ancestor at level L ) we know for sure that Y p = Y ′ p since y p = y ′ p and y u = y ′ u for any u such that lev( u ) ≥ L ; thus, since the same set of thresholds α is used, the execution of Cut&Round will be identical up to this point.

We assume that the first child of any vertex v visited by Alloc is always the active child; this can be done without loss of generality as the order that Alloc visits the vertices hasn't played any part on our analysis yet.

Base of the induction. For the base of the induction, let v be the (unique) child of p that is an ancestor of t ; i.e. let v be the highest active ancestor of t . We have already mentioned that Y p = Y ′ p with probability 1 . Thus, it can either be the case that Y p = Y ′ p = ⌊ y p ⌋ of Y p = Y ′ p = ⌊ y p ⌋ +1 . From Lemma 5 we know that the first happens with probability 1 -δ ( y p ) and the latter with probability δ ( y p ) . We distinguish between the following cases:

Let δ ( y v ) < δ ( y p ) . Then, if Y p = Y ′ p = ⌊ y p ⌋ we know from the description of Alloc that Y v = Y ′ v = ⌊ y v ⌋ with probability 1 . On the other hand, if Y p = Y ′ p = ⌊ y p ⌋ +1 , we know that Y v = ⌊ y v ⌋ +1 if α v ≤ δ ( y v ) /δ ( y p ) and likewise Y ′ v = ⌊ y v ⌋ +1 if α v ≤ ( δ ( y v )+ ϵ ) / ( δ ( y p )) . Thus, by conditioning on the values of Y p and Y ′ p , we get

/a80 δ ( y p ) . 2. /a80 α [ Y v = ⌊ y v ⌋ and Y ′ v = ⌊ y v ⌋ +1] = (1 -δ ( y p )) · 0 + δ ( y p ) · ( δ ( y v )+ ϵ δ ( y p ) -δ ( y v ) δ ( y p ) ) = ϵ . 3. /a80 α [ Y v = ⌊ y v ⌋ +1 and Y ′ v = ⌊ y v ⌋ ] = (1 -δ ( y p )) · 0 + δ ( y p ) · 0 = 0 .

/a80 α [ Y v = ⌊ y v ⌋ +1 and Y ′ v = ⌊ y v ⌋ +1] = (1 -δ ( y p )) · 0 + δ ( y p ) · δ ( y v ) δ ( y p ) = δ ( y v ) . · Let δ ( y v ) ≥ δ ( y p ) . Then, if Y p = Y ′ p = ⌊ y p ⌋ +1 we know from the description of Alloc that Y v = Y ′ v = ⌊ y v ⌋ +1 with probability 1 . On the other hand, if Y p = Y ′ p = ⌊ y p ⌋ , we know that Y v = ⌊ y v ⌋ +1 if α v ≤ ( δ ( y v ) -δ ( y p )) / (1 -δ ( y p )) and likewise Y ′ v = ⌊ y v ⌋ +1 if α v ≤ ( δ ( y v ) + ϵ -δ ( y p )) / (1 -δ ( y p )) . Thus, by conditioning on the values of Y p and Y ′ p , we get

So in both cases, the base of the induction holds.

Inductive Step. Using the exact same approach, we can prove the claim for any active ancestor u of t , assuming that the claim holds for u 's father v = p ( u ) . The only difference, is that now we can't claim that Y v = Y ′ v with probability 1 . Instead, there are three different cases that we need to consider; namely

Y v = Y ′ v = ⌊ y v ⌋ +1 with probability δ ( y v ) .

Y v = ⌊ y v ⌋ and Y ′ v = ⌊ y v ⌋ +1 with probability ϵ .

where the probabilities hold from the inductive hypothesis on the parent vertex v . Next, we will need to once again consider the case of whether δ ( y u ) < δ ( y v ) or not (notice that the same relation will hold for y ′ u and y ′ v ) and use the description of Alloc to get the assignment probabilities. Since this is a simple matter of arithmetic, the details are omitted.

F Experimental Evaluation

In this section we experimentally evaluate the performance of Algorithm 2 with respect to the best fixed facility placement and compare it with the respective performance of the algorithm proposed by [31]. In all the following experiments the step-size of Algorithm 3 (subroutine of Algorithm 2) is set to η := max( γ, 1) √ nT .

Periodically Moving Clients. We first present a simple setting to indicate the inefficiency of the online learning algorithm of [31] in handling moving costs. In this experiment the underlying graph is the 0 . 01 -discretization of [0 , 1] × [0 , 1] . At each round t ≥ 1 , we periodically select one of four balls of radius R = 0 . 2 depicted in Figure 1 and then a client arrives uniformly at random on the selected ball. In Figure 1 and Table 1 we present the overall cost of Algorithm 2 and the algorithm of [31] for different values of facility-weight γ , k = 3 facilities and T = 4000 time-steps. In all cases, the facilities of Algorithm 2 eventually converge to three of the four ball-centers, which is the optimal fixed facility placement. As the experiment reveals, the algorithm of [31] admits significantly larger cost as the facility-weight increases while Algorithm 2 is robust to the increase.

y=0

y=1

100

10-1

10-1,

Fotakis et al.

Fotakis et al.

OurAlgorithm

OurAlgorithm

10-2

100

101

102

103

100

101

102

103

y=10

FacilityPlacement

1.00

101

0.75

0.50

0.25

0.00

10°

-0.25

-0.50-

Fotakis et al.

-0.75

Our Algorithm

-1.00-

100

101

102

103

-1.0

-0.5

0.0

0.5

1.0

Real-World Datasets. We evaluate the performance of Algorithm 2 on the MNIST and CIFAR10 datasets. We randomly sample n = 10000 images and construct a graph where each image corresponds to a vertex with the edge weights given by the Euclidean distance of the respective images. At each round t , an image is sampled uniformly at random and a client arrives in the corresponding vertex. We then evaluate Algorithm 2 in the latter setting for T = 3000 rounds and k = 10 facilities. In Table 2 we present the ratio of the overall cost of Algorithm 2 over the ratio cost of the fractional hindsight optimal 7 . As our experiments indicate, the sub-optimality of Algorithm 2 is way smaller than the theoretical O (log n ) upper bound on the regret.

Beyond unit batch sizes and random arrivals. Finally, we once again evaluate the performance of Algorithm 2 on the MNIST and CIFAR10 datasets. This time, the requests arrive in batches of size R = 10 for T = 3000 rounds. In order to go beyond the random arrival model ,we first sample the R · T requested vertices uniformly at random from [ n ] and then we proceed to order them based on their respective categories, using the lexicographical vector order to break ties. Then, we partition these requests into T batches of size R and sequentially reveal them to the algorithm as usual. As a result, all images/vertices from the first category are requested first, then the second etc.

In Table 3 , we present our experimental evaluations on the above constructed sequence. As our experiments indicate, our algorithm admits way better performance than the theoretical O (log n ) guarantees even in sequences with higher batch sizes and non-random arrivals.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper considers the $k$-median clustering problem in the online learning framework. More specifically, at the beginning of each round, the algorithm needs to maintain a set of $k$ centers (or facilities). After this, the actual set of clients is revealed. The algorithm incurs a cost equal to the total assignment cost of each client to the nearest center. At the next round, the algorithm can change the location of the $k$ centers, but then it also has to pay for the movement cost of the centers (by the min-cost matching between the two sets of locations). The total cost of the algorithm is the sum (over all rounds) of the assignment cost and the movement cost. The goal is to minimize the regret. The algorithm is said to have $(\\alpha, \\beta)$ regret, if the total cost is at most $\\alpha$ times the cost of the offline static solution plus an additive term of the form $O(\\beta \\sqrt{T})$ (for $T$ rounds). \n\nOnline learning with movement cost has been well-studied, and an influential result [11] gives an $(1+\\epsilon, \\beta)$ regret for any constant $\\epsilon > 0$ and $\\beta$ depends on size of the metric space. This result uses connections with the metrical task system problem. The running time of this algorithm (in each round) is of the form $O(n^k)$, and so is exponential in $k$. The paper asks if one can give efficient algorithms in this setting. \n\nThe main result of the paper shows that for HSTs (hierarchically separated trees), one can get constant-regret efficient algorithms. Then, using standard ideas, one can get an $O(\\log n, \\beta)$-regret (where $\\beta$ depends on the metric space only). For HST's, the algorithm is obtained in a two phase manner (again, this is standard in the case of online algorithms): frst maintain a fractional solution to this problem, and then maintain a randomized integral solution online (whose marginals are given by the fractional solution). For maintaining the fractional solution, they use the well-known FTRL approach, though the regularizer is non-standard (but was known in prior-work) and requires lots of details. The second part also requires non-trivial analysis, though again some of the ideas seem to be related to [9].\n\nSTRENGTHS:\n1. The online learning framework for clustering is an interesting problem, and this is the first non-trivial result for this problem. \n2. The analysis, though along standard lines, requires lot of details and so is non-trivial.\n\nWEAKNESSES:\n1. As mentioned earlier, most of the ideas follow along standard lines. \n2. The actual regret guarantee is somewhat weak: one would expect constant-regret for general metric spaces.\n\nQUESTIONS:\n1. Can we get better results for tree metrics? As stated the reliance on HST's seems crucial. \n2. What are the new ideas in fractional to integral conversion? At a very high level, it seems very related to the result in [9], though the authors do point out that [9] does not consider assignment costs, and only movement costs. Still, it was not clear, if any new ideas are needed here. \n3. The running time is mentioned to polynomial in $n$, but can it be polynomial in $T$ also? For example, is it conceivable that when $T$ gets very large, the running time can also grow with it? I was a bit confused because if we are looking at the aggreagate time after $T$ rounds, then oen can potentially spend time polynomial in $T$. Are we assuming that $T$ is polynomially bounded?\n\nLIMITATIONS:\nNo negative societal impact.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies online clustering with moving costs problem. In the problem, the client sets change over time. In each round t, the algorithm has to place k facilities F_t before seeing the set R_t of clients.  Two costs will be involved in each round t: the connection costs and the moving costs. The connection cost is the k-median cost of the solution F_t, with R_t being the client set. The moving cost is gamma times the earth-mover distance between F_{t-1} and F_t. The cost is compared to the cost of the best static solution.  \n\nThe main result of the paper is an algorithm that achieves O(log n)-regret and beta \\sqrt{T} additive error, where beta = O(kn^{3/2} * D_G * max{gamma, 1}.  To achieve this goal, the authors reduced the general metric to a HST metric, by losing an O(log n) factor in the regret. For the HST metric, the authors first solved a fractional version of the problem, and then use an oblivious randomized rounding algorithm to round the fractional solutions to integral ones. The rounding algorithm guarantees that in expectation, the moving cost incurred by the integral solutions is at most that of the fractional solutions. \n\nTo solve the fractional version of the problem, the authors used a dilated entropic regularizer. For every non-leaf u in the tree, they consider the fractional centers in each child-tree of u. After scaling this gives a distribution. They consider the entropy of this distribution. The dilated entropic regularizer is the weighted sum of the entropies over all non-leaves u, where the weight for a vertex u is 2^{lev(u)}; that is, the distance from u to any of its descendent leaf.  With this regularizer defined, the algorithm in every round chooses the fractional solution that minimizes the retrospective connection cost plus the scaled regularizer. The authors then show that the algorithm can achieve a O(k n^{3/2} D \\gamma) * \\sqrt{T} additive regret.\n\nSTRENGTHS:\n-This is the first result that considers moving cost in the online learning model. The model introduced is interesting, and the paper may initiate the study of the model for other problems. Previous results only consider the connection cost. \n\n -The paper achieves an O(log n)-multiplicative regret guarantee, improving the previous O(k) factor.\n\nWEAKNESSES:\nThe parameter beta is too big.\n\nQUESTIONS:\nNo questions.\n\nLIMITATIONS:\nNo Limitations.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper considers a regret framework for the following online learning problem. As input we are given a weighted graph and a number k of facilities. At each time step, we must select k vertices of the graph to serve as facilities. Afterwards, we learn the clients (also vertices of the graph) that the facilities must serve. The cost of the time step is the connection cost of the clients to the facilities, plus the cost of moving the facilities from the old positions to the new positions. The goal is for the total cost over all rounds to be small compared to the best solution in hindsight, that is, a static set of k facilities that minimizes the connection costs over all rounds. While the multiplicative weights algorithm can be shoehorned to give a (1+\\eps)-regret algorithm, it runs in time O(n^k), hence not polynomial. An O(k)-regret polytime algorithm is known for when there are no moving costs. This paper presents the first polytime algorithm with regret guarantees that accounts for moving costs; it achieves O(log n)-regret (suppressing additive terms). \n\nA key tool in the paper is to first develop an O(1)-regret algorithm for the special case where the input graph is a type of weighted tree called a Hierarchical Separation Tree (HST). Then for the general case, an O(log n)-distortion metric embedding is used to reduce the general graph case to the tree case. To achieve an O(1)-regret algorithm for HSTs, there are two phases. The first phase is to obtain an O(1)-regret algorithm for a fractional relaxation of the problem, in which facilities can be placed fractionally on vertices. The structure of the HST is crucial in both the formulation of the fractional relaxation and in the algorithm used to solve it (which is the well-known Follow the Regularized Leader algorithm, with the choice of regularizer exploiting the structure of the HST). The second phase is to round the fractional solutions to integral solutions, through a novel rounding algorithm the authors call Cut and Round, which preserves the connection and moving costs of the fractional solutions up to constant factors. Here as well, the structure of the HST is crucial.\n\nSTRENGTHS:\n- This paper gives the first polytime algorithm with regret guarantees for k-clustering with moving costs. Incorporating moving costs gives rise to a more expressive and realistic model than those considered previously. \n\n- This paper solves the problem (up to constant factors) for a certain class of trees, which is interesting in its own right. \n\n- While many of the techniques used (follow the regularized leader, fractional relaxations, and randomized rounding) are somewhat standard, reducing the problem to trees is a key insight that enables the use of these techniques. \n\n- The paper is clear and easy to follow.\n\nWEAKNESSES:\n- Without lower bounds, it is difficult to interpret the regret factor. \n\n- A more detailed comparison to the ideas used in the work of Fotakis et. al. would help contextualize the present work and highlight which ideas are novel. For example, the work of Fotakis et. al. also uses a fractional relaxation. What are the obstacles to extending their work, and in what ways is the present approach similar to theirs?\n\n- While the authors emphasize that the tree structure is exploited in many parts of the algorithm, they do not provide any intuition or motivation for why this case is in some sense easier. \n\n- The paper appears to violate the formatting instructions in terms of font size.\n\nQUESTIONS:\n- How crucial is the matching-based formulation of moving costs to the proof? Have you considered other natural ways of defining moving costs and if so, what obstacles arise?\n\n- Can the results be easily adapted to when the connection cost is based on, say, \\ell_p objectives?\n\n- Does the problem become easier for \\gamma = 1?\n\nLIMITATIONS:\nLimitations are acknowledged.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors study the k-median problem in an online learning setting with incorporated moving costs. In this setting the instance is revealed in batches, and before each batch the algorithm is required to place k centers so that to minimize the assignment costs of the (unseen) points that are then revealed in the batch. The objective function incorporates a cost for each center-placement that is moved between consecutive batches. The cost of the algorithm is the sum of the cost incurred in all batches. The performance of the algorithm is then measured w.r.t. to the best possible *fixed* placement of k-center, and is called the regret of the algorithm. \n\nThe authors present an algorithm that has regret of a O(log n) multiplicative factor, and a O(Poly(k, n, Diameter, \\gamma)*\\sqrt(T)) additive term, where n is the number of all possible points that are revealed, and T the number of batches. The Poly(k, n, Diameter, \\gamma) term in the additive factor becomes insignificant when T grows to infinity.\n\nIn their experiments, the authors compared their algorithm to the previous state-of-the-art algorithm by [Fotakis et al.], which does not consider the moving cost in the objective function. The authors report that their proposed algorithm outperformed [Fotakis et al.] on instances that were adversarial for the competing algorithm. Then, the authors also applied their algorithm to a couple of instances of images, where the images arrived in a random order. They compared the results to the optimum fractional solution on the whole instance. In this second set of experiments, the proposed algorithm performed very close to the optimum. However, the random order arrival seemed to be the easiest arrival order for the algorithm. This is because the distribution of the images did not shift over the batches of updates\n\nSTRENGTHS:\n+ Studies a well-motivated formulation that incorporates the moving costs of the center. This models better the discussed applications, overcoming the shortcomings of previous studies.\n\n+ Solid theoretical contributions, and well-structured presentation.\n\nWEAKNESSES:\n- The additive term O(k * n^{3/2} * Diameter * \\gamma * \\sqrt{T}) stops being the dominant term (and in fact being less than any arbitrary fixed solution)  when T >> n, which may be unrealistic in some cases (including the motivating applications provided in the introduction). However, this may be an inherent artifact of the online batch-learning model.\n\n- No experiment made it to the main body of the paper (although briefly discussed).\n\n- The experiments consider batches of size 1, and only compare Fotakis et al. on instances adversarial to the competing algorithm. In the second experiment on real instances, the random arrival order is very friendly to the online learning framework.\n\nQUESTIONS:\nI find the problem formulation well motivated and natural. The theoretical result and the techniques are quite interesting, and deserve publication. The experimental evaluation is very friendly to the particular setting, and could be further strengthened.\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-07"}