{'fraction_non_alphanumeric': 0.034471124107293485, 'fraction_numerical': 0.00832255524939549, 'mean_word_length': 4.418647166361974, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Surrogate Assisted Optimisation for Travelling Thief Problems


 
 The travelling thief problem (TTP) is a multi-component optimisation problem involving two interdependent NP-hard components: the travelling salesman problem (TSP) and the knapsack problem (KP). Recent state-of-the-art TTP solvers modify the underlying TSP and KP solutions in an iterative and interleaved fashion. The TSP solution (cyclic tour) is typically changed in a deterministic way, while changes to the KP solution typically involve a random search, effectively resulting in a quasi-meandering exploration of the TTP solution space. Once a plateau is reached, the iterative search of the TTP solution space is restarted by using a new initial TSP tour. We propose to make the search more efficient though an adaptive surrogate model (based on a customised form of Support Vector Regression) that learns the characteristics of initial TSP tours that lead to good TTP solutions. The model is used to filter out non-promising initial TSP tours, in effect reducing the amount of time spent to find a good TTP solution. Experiments on a broad range of benchmark TTP instances indicate that the proposed approach filters out a considerable number of non-promising initial tours, at the cost of missing only a small number of the best TTP solutions.
 



Introduction
Real-world optimisation problems composed of multiple interdependent components are very challenging: solving each component in isolation does not guarantee finding an optimal solution to the whole problem [4,10]. The travelling thief problem (TTP) combines two interdependent components: the travelling salesman problem (TSP) and the knapsack problem (KP), both NP-hard problems [3,13]. In TTP, items are scattered among a set of cities; a thief goes on a cyclic tour through the cities and collects a subset of the items into a rented knapsack. As more items are collected, the speed of the thief decreases. This increases the travelling time and hence the renting cost of the knapsack. The aim in solving TTP is to maximise total gain by simultaneously maximising the total profit of the collected items and minimising the travelling time. TTP can be viewed as a proxy for the arc-routing logistic problems such as mail delivery, garbage collection, and network maintenance problems where the order of visiting places or nodes is as important as the length of the taken path [5,9].
Recent state-of-the-art solvers for TTP [6,12] solve the TSP and KP components in an iterative and interleaved fashion using a dedicated solver for each component. The TSP solution (cyclic tour) is typically changed in a deterministic way, while changes to the KP solution (item collection plan) typically involve a random search. This effectively results in a quasi-meandering exploration of the TTP solution space. Upon reaching a plateau, the iterative search of the TTP solution space is restarted by employing a new initial TSP tour. We have empirically observed that the final objective value does not vary appreciably for similar initial cyclic tours, suggesting that the overall search for a TTP solution with such solvers involves redundant exploration of the solution space. Furthermore, a subset of initial TSP tours (determined during the search) will often lead to poor TTP solutions.
We propose to increase the efficiency of TTP search via filtering out non-promising initial TSP tours through the use of an adaptive surrogate model. Various surrogate models have been previously used to speed up computationally expensive simulations in fields such as groundwater modelling [2]. The proposed surrogate model approximates the final TTP objective value for any given initial TSP tour. The model is built and automatically updated during the iterative search for a TTP solution. It is based on non-linear Support Vector Regression [15] with a novel kernel function for measuring the similarity between TSP tours. To our knowledge, this is the first time surrogate assisted optimisation is used within the context of TTP. Experiments on a wide subset of benchmark TTP instances show that our proposed approach filters out a considerable number of the non-promising initial cyclic tours while missing only a small number of the best TTP solutions.

Background
Each TTP instance has a set {1, . . . , m} of m items and a set {1, . . . , n} of n cities. The distance between each pair of cities i = i is d(i, i ) = d(i , i). Each item j is located at city lj > 1. Each item has weight wj > 0 and profit πj > 0.
The thief starts a cyclic tour at city 1, travels between cities (visiting each city once), collects a subset of the items available in each city, and returns to city 1. The tour is represented by using a permutation of n cities. A given tour is represented as c, with c k = i indicating that the k-th city in the tour c is i, and c(i) = k indicating that the position of city i in the tour c is k. Here c1 = 1 and c(1) = 1. A knapsack with a rent rate R per unit time and a weight capacity W is rented by the thief to hold the collected items. The item collection plan is represented by p, with pi ∈ {0, 1} indicating the collection state of item i. An overall solution that provides a tour c and a collection plan p is expressed as c, p .
The total weight of the items collected from city i is denoted by Wp(i) = ∀l j =i wjpj. The total weight of the items collected from the initial k cities in the tour c is denoted by The thief traverses from city c k to the next city with speed vc,p(k). The speed decreases as Wc,p(k) increases. The speed at the city c k is given by vc,p(k) = vmax − Wc,p(k) · (vmax − vmin)/W , where vmin and vmax are minimum and maximum speeds, respectively. Given a TTP solution c, p , the total profit is P (p) = m i=1 piπi, the travelling time to city c k is Tc,p(k) = k−1 k =1 d(c k , c k +1 )/vc,p(k ), and the total travelling time is T (c, p) = Tc,p(n + 1) = Tc,p(n) + d(cn, c1)/vc,p(n). The goal of a TTP solution is to maximise the following objective function over any viable c and p: Recent solvers for TTP follow a cooperative strategy by solving the TSP and KP components in an interleaved fashion using a dedicated solver for each component [6,11,12]. Fig. 1 shows how any given TTP instance is solved by these cooperative solvers.
For each given TTP instance, the Chained Lin-Kernighan (CLK) heuristic [1] is used to generate an initial cyclic tour. An initial collection plan is then obtained by a heuristic such as Insertion [9] or PackIterative [7]. Next, the TSPSolver and KPSolver functions are invoked in an interleaved fashion to solve the TSP and KP components in successive rounds. In each iteration, in order to improve the objective value, the TSPSolver deterministically chooses the best tour modifications, while the KPSolver uses a stochastic local search for improving the collection plan.
If the objective value is not improved in a round, the solver restarts by asking the CLK routine to generate a new initial tour, provided that the termination condition is not met. If the termination condition is met, the best obtained objective value and the corresponding solution are returned.   Fig. 1 in order to filter out non-promising initial tours.

Proposed Surrogate Model
Using the cooperative strategy shown in Fig. 1, we have empirically observed that for similar initial cyclic tours, the final objective value does not vary much. This suggests that the overall search for a TTP solution with cooperative solvers involves redundant exploration of the solution space. Furthermore, a subset of initial TSP tours (determined during the search) will often lead to poor TTP solutions.
Considering this semi-deterministic nature of the cooperative solvers, we propose a surrogate model to emulate the set of functionality enclosed in the dotted red rectangle in Fig. 1. The surrogate model is used as shown in Fig. 2 within the blue dashed rectangle. For each generated initial tour, the surrogate model provides an approximation of the final TTP objective value. If the generated initial tour appears non-promising, it is disregarded from further optimisation (ie., filtered out). Otherwise, the generated initial tour is allowed to proceed for further iterative optimisation.
For the surrogate model we propose an adaptive learning approach employing non-linear kernel-based support vector regression (SVR) [14,15]. While solving of a given TTP instance, the surrogate model transitions between several phases as shown in Fig. 3: initialisation, training, testing, and applying. The phases and transitions between phases are elucidated below.

Initial Phase Training Phase
Testing Phase Applying Phase Figure 3: Transitions between phases of the surrogate model.

Initial Phase
The given TTP instance is solved via restarting for a predefined number of times t, where each run uses a new initial tour. For any run r in this phase, the initial tour c r and the corresponding obtained final objective value g r are kept as a pair c r , g r in a training set.

Training Phase
To aid training the SVR, the training set is first normalised as follows. Considering g min and g max as the minimum and maximum objective values in the training set, each g r is mapped to the [0,1] interval via: The resulting set X={ c 1 , n(g1) , c 2 , n(g2) , ..., c t , n(gt) } is used for training the kernel-based SVR. Given a tour c, SVR approximates the normalised final objective value via: where the SVR parameters b, α r and α * r for r ∈ [1, t] are computed as per [14,15]. For the kernel function k(c a , c b ) we use a customised form of Gaussian radial basis function: where γ is a hyper-parameter, while Φ(c a , c b ) is a measure of distance between tours c a and c b based on the positions of the cities in the tours: Here, c(j) indicates the position of city j in cyclic tour c, The approximate final objective value g is obtained by reversing the normalisation: g = n( g) · (g max − g min ) + g min (6)

Testing Phase
Here the surrogate model is tested to ensure it has adequate accuracy and is retrained if required. The given TTP instance is further solved using new initial tours for λ · t times, where t is the number of instances in the training set and λ is empirically selected as 0.20. In every run r, for each generated initial cyclic tour c, the actual final objective value g as well as the approximate final objective value g are obtained.
There are two conditions where retraining is triggered using an expanded training set. Let us first define a Normalised Error (NE) measure as: For any run which has NE > e, where e is a predefined error limit empirically set to 0.02, the corresponding initial tour and actual final objective value are kept in a temporary buffer. The temporary buffer is initialised to be empty at each start of the testing phase.
A form of moving cumulative average [8] of squares of all obtained NE values is kept, referred to as mean squared normalised error (MSNE). The MSNE is set to zero at each start of the testing phase. For each run (with r starting at 1), MSNE is updated using: The first condition for retraining is as follows. If a run is encountered that has g < gmin or g > gmax, the corresponding initial tour and final objective value are added to the temporary buffer, followed by incorporating the buffer into the training set and immediately restarting the training phase.
The second condition is as follows. If MSNE > e after processing all λ · t initial tours, the temporary buffer is incorporated into the training set and the training phase is restarted.

Applying Phase
Here the surrogate model is employed for filtering out (disregarding) non-promising initial tours. Retraining may also be triggered in a similar manner to the testing phase.
We define maximum tolerable error (MTE) as: where β is a hyper-parameter. For a given initial tour c, the corresponding approximate normalised final objective value n( g) is obtained. If n( g) ≥ 1 − MTE, the tour c is allowed to proceed for further iterative optimisation. Otherwise, the tour is filtered out either when n( g) < −MTE, or with a probability of 1 − (n( g) + MTE) 2 . Fig. 4 shows how the probability of filtering out c is based on the value of n( g).
Whenever an initial tour c is not filtered out, the given TTP instance is solved using c and the actual final objective value g is obtained. The corresponding NE is computed as per Eqn. (7), followed by updating MSNE as per Eqn. (8).
Similar to the testing phase, if NE > e, the corresponding initial tour and actual final objective value are stored in the temporary buffer initialised in the preceding testing phase. If g < gmin or g > gmax, the corresponding initial tour and final objective value are added to the temporary buffer, followed by incorporating the buffer into the training set and immediately restarting the training phase.
Furthermore, retraining occurs whenever MSNE > e or the number of runs with NE > e exceeds

Experiments
As a baseline TTP solver we use the recently proposed cooperative coordination (CoCo) solver [12]. We extend the solver with the proposed surrogate model and refer to it as CoCo-SM.
We use a broad subset of medium and large-sized benchmark TTP instances introduced by [13]. Considered instances are placed into 3 categories. Each category has 32 instances with a range of 574 to 7397 cities. In category A, there is only one item in each city; the profits and weights of the items are strongly correlated; knapsack capacity is relatively small. In category B, there are 5 items in each city; the profits and weights of the items are uncorrelated; the weights of the items are similar to each other; knapsack capacity is moderate. In category C, there are 10 items in each city; the profits and weights of the items are uncorrelated; knapsack capacity is high.
Experiments were performed with β ∈ {0, 1, 2, 3} for computing MTE in Eqn. (9). Both solvers were run on each TTP instance 10 times. In each run, CoCo solver was initially run for 1000 restarts on each instance. CoCo-SM was then run on the same instance using the same set of 1000 initial tours generated and used by CoCo for that instance. As such, we can see the effects if the CoCo-SM solver was used instead of the CoCo solver using the same set of the initial tours.
The initial tours and the corresponding actual final objective values in the first 10% of the restarts in each run on each instance were used to build the initial surrogate model in CoCo-SM. For the custom RBF kernel in Eqn. (4), the hyper-parameter γ was set to 1 based on preliminary experiments. Table 1 shows the results with the configuration of β = 2 in Eqn. (9). The results are presented as the percentage of filtered out tours and the corresponding number of missed best solutions (out of 10 runs). In a "missed best solution", an initial tour that led to the best possible solution in a run is incorrectly filtered out. The higher the percentage of filtered out tours, the better. The lower number of missed best solutions, the better. The results show that on average about 30% of initial tours are filtered out at the cost of missing about 1 best solution out of 10.
The overhead for training and using the surrogate model is overall negligible. For example, for the hardest to solve instance (the last instance in category C), around 10,000 seconds are required to process 1000 initial tours by the CoCo solver, while about 15 seconds are required to train and use the surrogate model during processing of all the tours in CoCo-SM. As such, if 30% of the initial tours are filtered out, the solver requires about 30% less time to solve a given TTP instance. The results indicate that the proposed surrogate model achieves considerably better filtering than simple random filtering. The results also show that there is a trade-off: the larger the percentage of filtered out tours, the higher the chance of missing the best solution.   Table 1: Average percentage of the filtered out initial cyclic tours with the corresponding number of missed best solutions (out of 10 runs) using the CoCo-SM solver with the configuration of β = 2 in Eqn. (9). Three categories of TTP instances are used. Category A: knapsack capacity is relatively small; 1 item in each city; weights and profits of items are highly correlated. Category B: knapsack capacity is moderate; 5 items in each city; weights and profits of items are uncorrelated; weights of all items are similar. Category C: knapsack capacity is high; 10 items in each city; weights and profits of items are uncorrelated.

Conclusion
We have proposed to increase the efficiency of recent TTP solvers by incorporating a surrogate model that assists in pruning the starting points for restart-based optimisation.
In recent TTP solvers, the solutions to the underlying TSP and KP problems are changed in an iterative and interleaved fashion. The TSP solution (cyclic tour) is typically changed in a deterministic way, while changes to the KP solution typically involve a random search, resulting in a quasi-meandering exploration of the TTP solution space. Upon reaching a plateau, the iterative search of the TTP solution space is restarted by employing a new initial TSP tour.
The proposed surrogate model, based on Support Vector Regression with a novel kernel, adaptively learns the characteristics of initial TSP tours that lead to good TTP solutions. Non-promising initial TSP tours are detected and disregarded, in effect reducing the amount of time spent to find a good TTP solution.
Experiments on benchmark TTP instances show that the proposed approach removes a considerable number of non-promising initial tours, at the cost of missing a small number of the best TTP solutions.