{'fraction_non_alphanumeric': 0.0280131499745335, 'fraction_numerical': 0.013728758623882946, 'mean_word_length': 4.923614920460779, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, '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}}
GLAN: A Graph-based Linear Assignment Network

Differentiable solvers for the linear assignment problem (LAP) have attracted much research attention in recent years, which are usually embedded into learning frameworks as components. However, previous algorithms, with or without learning strategies, usually suffer from the degradation of the optimality with the increment of the problem size. In this paper, we propose a learnable linear assignment solver based on deep graph networks. Specifically, we first transform the cost matrix to a bipartite graph and convert the assignment task to the problem of selecting reliable edges from the constructed graph. Subsequently, a deep graph network is developed to aggregate and update the features of nodes and edges. Finally, the network predicts a label for each edge that indicates the assignment relationship. The experimental results on a synthetic dataset reveal that our method outperforms state-of-the-art baselines and achieves consistently high accuracy with the increment of the problem size. Furthermore, we also embed the proposed solver, in comparison with state-of-the-art baseline solvers, into a popular multi-object tracking (MOT) framework to train the tracker in an end-to-end manner. The experimental results on MOT benchmarks illustrate that the proposed LAP solver improves the tracker by the largest margin.


Introduction
As a fundamental problem in mathematics, linear assignment [1] aims to assign n jobs to n agents under one-to-one matching constraints, meanwhile achieves the best state that the cost involved in the problem is minimum or the profit is maximum.
It is closely related to many computer vision problems including point matching [2], handwritten mathematical expressions recognition [3], and multi-object tracking [4,5].
A well-known method for linear assignment is the Hungarian algorithm [6,7] which can obtain the optimal solution without an exhaustive search. However, its computational complexity is extremely sensitive to the size of the problem. Consequently, using more elaborate heuristic or greedy strategies, several approximate algorithms including deep greedy switching [8,9], interior point algorithms [10,11] and auction algorithm [12] have been proposed to seek acceptable suboptimal solutions with time constraints. However, it is difficult to formulate the gradients of heuristic linear assignment solvers, which prevents them from being directly embedded into the learning frameworks.
Aiming to address this issue, the SinkHorn algorithm [13] and its variants [14,15] are widely taken as a differentiable linear assignment layer that obtains the approximate solutions by performing normalization along both rows and columns of the cost matrix alternatively. With simple row-and column-normalization process, the SinkHorn-like algorithms often suffer from low assignment precision as the problem size increasing. Formulating the linear assignment problem as an integer linear programming task, Zeng et al. [16] proposed a differentiable matching layer that updates the assignment solution following the negative gradient direction and maps it onto the one-to-one matching constraint set using Dykstra's algorithm [17,18]. However, its computational complexity is extremely sensitive to the problem size. In addition, these non-learnable approaches [13,16] are inadaptable to fit data distributions in different tasks.
With the growing interest in using deep neural networks (DNNs) for computer vision tasks, solving linear assignment problems using DNNs has attracted much research attention. Researchers [19,20,5] model the assignment process with the deep learning framework based on Recurrent Neural Networks (RNNs) [21] or Convolu-tional Neural Networks (CNNs) [22]. However, these works mainly focus on representing elements in cost matrix with local or sequential features and less investigation has been devoted to utilizing the structured relationships between each pair of them.
Specifically, the features captured by CNNs only collect information from local neighborhoods. Although the receptive field can be expanded through stacking several CNN layers, it always fails to cover the whole cost matrix when the size of the problem increases. The RNNs-based methods treat the cost matrix as time-sequential flow data which allows these algorithms to deal with linear assignment problems of varying sizes.
However, during inference, the contribution of the previous element to the current state becomes insignificant when the sequence length expands, which may affect the performance of RNN-based models.
Addressing the above-mentioned issues, we propose a novel graph-based linear assignment network (GLAN) aiming to improve both the accuracy and the computational efficiency. Our framework falls into the group of deep learning methods, and it is designed on top of graph neural networks. Given a cost matrix, we first transform it into a bipartite graph in which two sets of nodes correspond to the agents and jobs respectively, and edges between the two node sets are assigned with the corresponding cost values. By this way, the linear assignment problem is converted to the problem of selecting reliable edges from the bipartite graph. Subsequently, a graph neural network is developed to perform information aggregation and updating on the constructed graph, which generates the final edge representations through several convolution operations. Finally, according to the updated graph state, our network predicts a label for each edge which indicates whether the assignment relationship is reliable or not. Different from previous learning-based algorithms, the message passing process in the proposed framework is independent of the size and the structure of the constructed graph. Furthermore, the receptive field of the proposed network can cover the whole graph after only two-layer convolution modules. As a result, the proposed method is able to make assignment decisions efficiently for problems of varying sizes from the global scope.
To validate the advancement of the proposed method over previous approaches, we construct a synthetic dataset for LAP in which each sample contains a random cost ma-trix and its optimal assignment solution. The training of the network is guided under the assignment difference between the predictions and optimal solutions, as well as the one-to-one matching constraints, as the supervision signal. We compare the proposed method with several state-of-the-art baseline methods in terms of assignment precision and computational complexity. Experimental results reveal that our method achieves the highest average assignment precision with low time consumption. In addition, we embed all tested differentiable assignment solvers into an MOT pipeline respectively where each learning-based solver is taken as a trainable component to fit the data distribution. The tracking results evaluated under the standard MOT metrics illustrate that the proposed linear assignment solver is able to well capture the inductive information in the real scenarios and enhance the tracking performance by the largest margin on most metrics. We will release the code publically available upon the acceptance of the paper.
In summary, with the proposed learning framework for linear assignment problems, this paper makes contribution in three-fold: (1) we convert the problem of linear assignment to learning of edge selection from a bipartite graph constructed based on the cost matrix; (2) we propose a differentiable framework based on graph neural network to update the graph states, and the proposed model achieves excellent performance in terms of assignment precision and computation efficiency; and (3) we embed the proposed LAP solver into a popular MOT pipeline and validate its effectiveness in boosting tracking performance.

Heuristic Linear Assignment
In the 1950s, combining the graph theory and the duality of linear programming, Kuhn et al. propose a well-known iterative method named Hungarian algorithm [6] in which a maximal alternating forest is constructed in each iteration to augment the primal solution and the optimal solution can be obtained with O(n 3 ) computation complexity. Due to the dynamic nature as well as the size expansion of many problems, where a solution needs to be found under tight time constraints, the heuristic algorithms whose solutions are close to the optimum have been investigated for decades. Simulating the process of real auction, Bertsekas et al. design the auction algorithm [12] which is composed of two phases, the bidding phase and the assignment phase. The performance of the auction algorithm is improved by using the scaling strategy, where an is involved to update the elements in the cost (or price) matrix. Its results for linear assignment problems are close to the optimal solution, but it still suffers from the high computation complexity. A variation of the Hungarian algorithm has been proposed in [23], which starts with an initialization phase based on a naive auction algorithm and uses the shortest alternating paths to augment primal solutions. In addition, several algorithms solve the linear assignment problems by general linear programming approaches such as the interior point method [11,10] and dual forest method [24]. For example, Ramakrishnan et al. [11] modify the Karmarkar interior-point algorithm [25] and develop an approximate dual projective algorithm for assignment problems. Akgül et al. [24] use the forest construction as a dual forest algorithm to solve the linear assignment problems.
To speed up the computation, researchers investigate several pseudo flow algorithms including [26] which solves the corresponding minimum cost flow problem.
Besides, many heuristic approaches based on greedy strategies are devoted to seeking approximate solutions in a fast manner. In [27], Trick et al. propose a greedy heuristic approach for the generalized assignment problems and prove that some randomization to the greedy approach can facilitate finding better solutions. Another similar approach is the greedy randomized adaptive search procedure (GRASP) [28] where each search iteration is made up of a construction stage, where a randomized greedy solution is constructed, and a local search stage which applies local iterative improvement on the greedy solution. Inspired by the above greedy heuristics, Naiem et al. propose the Deep Greedy Switching (DGS) algorithm [8,9] which starts with a random initial solution and tries to find a better solution through searching within a well-defined neighborhood. These methods are significantly faster than previous heuristic methods, due to the partial greedy strategy. However, they often terminate when the objective function value reaches a local optimum.

Differentiable Linear Assignment Solvers
Despite the progress from the previous heuristic approaches, gradients of these algorithms are difficult to formulate using standard derivation paradigms, which limits their extension to machine learning frameworks.
Performing row-wise and column-wise normalization on the cost matrix, the SinkHorn algorithm [13] has been widely used in learning-based frameworks as an assignment layer due to its high computation efficiency. However, its solution heavily depends on the distribution of values in the cost matrix, and always deteriorates when the size of the problem increases. Based on SinkHorn [13], several works [14,15] solve the linear assignment problem under the optimal transport architecture with entropic penalization [14] and greedy updating strategy [15]. These methods derived from SinkHorn [13] achieve faster convergency in inference and better assignment performance, but still can not obtain satisfactory results on large-sized problem. Aiming to improve the assignment quality, i.e., assignment precision, Zeng et al. [16] propose a differentiable mask matching layer, named Relax Matching (RM), by unrolling a projected gradient descent algorithm in which Dykstra's algorithm [17,18] is employed to achieve the projection mapping the solution to constraint set. Based on a mathematic reasoning process, RM [16] obtains advancement in assignment precision over the SinkHorn algorithm [13] by a large margin. But its computation complexity increases greatly with the size of problems expanding. Despite the achievements made by these approaches mentioned above, they are inadaptable to fit the distribution of data in different tasks due to their non-learnable property.
With the popularity of deep learning frameworks, several data-driven algorithms for linear assignment problems have been proposed in recent years. In [29], the linear assignment problem has been converted to an equivalent linear continuous programming problem which is solved by a recurrent neural network without any designed parameters. However, the optimization process includes many matrix multiplication operations, making the methods inefficient to solve large-sized problems. Decomposing the n-to-n assignment problem into n multi-classification tasks, DFC [19] and DBL [20] address these sub-tasks with stacked fully-connection (FC) layers and a bidirectional long short-term memory neural network (BDLSTM) respectively. But the relationships between each pair of sub-tasks have not been taken into consideration.
Regarding the cost matrix as an image with n × n pixels, DCNN [19] employs the model based on CNNs to get local representations for making assignment decisions.
However, the CNNs layers in their model have fixed receptive fields, which limits the generalization on problems with varying sizes. To receive information from the global scope, two bidirectional RNNs sequentially applied to the cost matrix in a row-wise and column-wise direction in [5]. However, it is not suitable to capture the global inductive information in sequential order for time-independent problems.
Our work falls into the group of deep learning algorithms for linear assignment problems. Different from previous learning-based works, our method does not work directly on the cost matrix, but converts the problem to learning of edge selection on a constructed bipartite graph. A graph neural network is developed to perform computation on the graph for edge prediction, and its excellent performance is evaluated in both synthetic datasets and real-world MOT tasks.

Linear Assignment Problem
Given two sets of n agents I = {1, 2, . . . , n} and n jobs J = {1, 2, . . . , n}, assigning job j to agent i results in a cost value of C ij . The objective of linear assignment problems is to find the minimum total cost of assigning each job to exactly one agent and each agent to one job. The problem can be expressed as an integer binary programming problem where the decision variable x ij is set to 1 if job j is assigned to agent i, and is set to 0 otherwise. Therefore, the linear assignment problem can be formulated as: n j=1 x ij = 1, i = 1, 2, . . . , n, x

Assigning with Edge Labeling
Despite the progress of previous learning-based approaches [19,5,20] that regard the cost matrix as an image or sequential data flow, the inherent structure information of the cost matrix has not been fully explored in their models.
Basically, assignments can be modeled and visualized in different ways [1]. In this paper, the linear assignment is converted to an edge labeling problem by constructing a bipartite graph. Specifically, given a cost matrix of n size, we consider the agents and jobs as two sets of nodes in the constructed graph. Then we build edges between each pair of agent and job and assign the corresponding cost values to these edges, i.e., the initial value on the edge (i, j) is assigned with C ij . Finally, the value in edge (i, j) predicted by our framework indicates the assignment between agent i and job j is reliable or not. Then all the agents and jobs are considered as nodes in the bipartite graph G and the edges are assigned with cost values according to the cost matrix. Thus finding the optimal assignment is converted to selecting reliable edges in the constructed graph G.
To learn how to select reliable edges from the constructed graph G, we build a fully trainable graph network which takes the G as input, and performs information aggregation and updating over the graph to predict the edge labels. The predicted label on the edge e ij is equivalent to the value of x ij in the permutation matrix which indicates whether to assign agent i to job j and job j to agent i also. The pipeline of the proposed framework is described in Sec. 4.

Proposed Framework
Recently, there has been growing interest in Graph neural networks (GNNs) [30,31] which can well capture relational structured representations on data and has been widely applied to computer vision tasks such as action recognition [32,33] and hierarchical representation learning [34]. Inspired by these studies, we design our learning framework by extending the graph network block [31,35] module in which some operations over graph data have been defined. As illustrated in Fig 2, the pipeline for training the proposed framework consists of four modules: bipartite graph generation, encoder/decoder, convolution module, and loss function. Given a cost matrix, the proposed framework firstly constructs a bipartite graph that is taken as input to an encoder and transformed into a latent representation. Then the edge/node convolution layer in the convolution module iteratively performs feature aggregation from neighbors by attention/weight strategies and update the attributes for per-edge and per-node. Subsequently, the edge labels are predicted by a decoder according to the updated graph states. Finally, the loss between optimal solutions and predicted labels guides the training process. Besides, the one-to-one matching constraints are also taken into account as a part of supervision signals. In the following, we describe each module in detail.

Bipartite Graph Construction
As described in Sec. 3.2, a cost matrix can be transformed into a bipartite graph in which the nodes are grouped into two classes representing agents and jobs respectively. Dec.
N Y Figure 2: The pipeline of the proposed linear assignment framework. Given a cost matrix, we first construct its corresponding bipartite graph, as that is described in Sec. 3.2. Then the constructed graph is taken as input to the encoder module. The encoder transforms the attributes on the graph to latent features. Subsequently, the high-dimension graph iteratively passes the convolution module. In this module, the edge and node convolution layers perform information aggregation and updating to calculate the structure representations for each node and edge. After S iterations in the convolution module, the convolved edge attributes are passed to a decoder to predict the labels on the edges.
In the constructed graph, edges only exist between the nodes in inter-class. The raw features of these edges are assigned with the cost values between source nodes and receive nodes according to the cost matrix. Therefore the initial attributes of the edges in the constructed graph can be expressed as: Note that all the raw attributes of the nodes in the constructed graph are initialized with zero-valued vectors. In order to avoid the influence of noise edges on training, for each agent node, we keep t adjacent edges with the lowest costs and remove the rest edges.
The constructed graph is represented as where V and E denote the node set and edge set, V and E are the node attribute set and edge attribute set, respectively.

Encoder/Decoder
The encoder module transforms the attributes of the constructed graph into latent representations by applying an Multi-Layer Perceptrons (MLPs) to each edge to form the embedding features. The transformed graph then is passed to the convolutional module as input to update its state.
The decoder coupled with the encoder reads out the edge attributes from the output graph and predicts each edge label through an update function. Similarly, the update function is designed as an MLPs and mapped to each edge to form edge labels through a sigmoid activation.

The Convolution Module
The convolutional module consists of a node convolution layer and an edge convolution layer. For i th node in the graph, the node convolution layer collects the information from adjacent edges and its 1 th order neighborhoods by adaptive aggregation weights and updates its attributes. For each edge, the edge convolutional layer aggregates the attribute from its source node and receive node through channel-attention strategy and performs the attribute update. Although the reception field of the convolution module is 1 th -order neighborhoods, the messages on each node can reach all other nodes after two iterations of convolution. Therefore, the reception field of the k-iteration convolution module can cover the whole graph when k ≥ 2.
The edge convolution layer: This layer consists of an aggregation function and an update function. For each edge, the aggregation function collects information from its source node and receive node: where e ij denotes the attributes of the edge connecting node i and node j, v i and v j the attributes of i th and j th node. indicates the element-wise multiplication of two vector. The operator [·, ·, ·] concatenates its input vectors in channel wise. In addition, c v is the node channel attention vector with the same dimension as node attribute, and The operators κ v and κ e are both parameterized as MLP with different configurations to map their input into desired space.
Taking the concatenated attributes as input, an update function ρ e designed as an MLP is applied to output the updated feature: The node convolution layer: This layer is designed to collect information from adjacent edges and 1 th -order neighborhoods for each node. In this layer, not only the channel attention, but the aggregation weights are also taken into consideration.
Specifically, for i th node in graph G, this layer first aggregates the information from the associated edges and its 1 th -order adjacent nodes by adaptive weights: where ρ v 1 denotes the function to transform its input to an embedding feature. E i denotes the attribute set of all edges associated with node v i in graph G and V i the attribute set of 1 th -order adjacent nodes to node v i . For node v i , ω ij is the weight measuring the contribution of its adjacent node v j during feature aggregation, and Then the collected embedding features are concatenated with the current attributes of node v i and are passed to another transformation function that outputs the updated attributes for node v i : The functions ρ v 1 , ρ v 2 and τ are all specified as MLPs modules, while the structures and parameters in these MLPs are different from each other.
It is worth mentioning that the operations in the above two layers are independent of the size and structure of the constructed graph, which allows the proposed learning framework to be trained using cost matrices of different sizes.

Loss Function
Similar to [5], we consider the linear assignment problem as a binary classification task and divide the elements in the ground-truth assignment matrix Y gt into positive labels and negative ones. Considering the case that for each node, there is at most one positive edge among its adjacent edges and the rest are negative ones, to avoid the negative labels dominating the training, we utilize the Balanced Cross Entropy as the loss function: where y i is the predicted label for edge (s i , r i ) which connects agent s i and job r i , y gt is the corresponding ground-truth vector indicating the edges as positive and negative, and w is the weight which balances the loss to avoid the negative labels dominating the training.
The one-to-one matching constraint embodies the nature of the solution for linear assignment problems. However, it has not been fully explored in previous learningbased approaches. To impose this constraint in our learning framework, we first construct a predicted assignment matrix Y ∈ R n×n whose size is the same as the problem: where ind(·, ·) is a bijection mapping an edge to an integer index. Then we design the soft constraint loss as follows: In the above equations, 1 is a one-valued vector; sum r (·) sums the values in predicted assignment matrix along the row-wise; norm r (·) returns a vector in which each element is the 2-norm of corresponding row-vector. In training, Eq. 16 drives the prediction to satisfy the constraints in Eq. 2 and 3. As a part of supervision signals in training, Eq. 17 guides the proposed network to output sparse predictions.
We finally combine the binary classification loss and the constraint loss to guide the training process as follows: where α > 0 weights the degree of the soft one-to-one matching constraints imposed.

Settings
In our experiments, we set the maximum of iteration in the convolution module and the dimension of edge feature to 5 and 16, respectively. And the number of adjacent edges for each node t is assigned with 8. In addition, the weight for positive edges is fixed to 0.9.

Training
For training the proposed framework, we generate a synthetic dataset that consists of M samples. Each sample is composed of a cost matrix C in which the elements are generated from a uniform distribution on (0, 1) and the corresponding optimal assignment solution Y gt which is obtained by the Hungarian algorithm [6]. In experiments, the cost matrices in the synthetic dataset have varying sizes ranging from 10 to 150 with an interval of 10. For the sake of clarity, with the default lower bound of cost data as 0, we name the synthetic dataset SynData 1 10 150 where the superscript 1 denotes the upper bound of the cost value and the subscript 10 150 represents the minimum size (10) and maximum size (150) of cost matrices. Besides, we randomly sample 30% of this dataset for evaluation and keep the other 70% for training. The training totally takes 20 epochs where the learning rate is set as 0.003 initially and declined by 5% after each 5 epochs. In addition, the α in Eq. 19 is 0 at the beginning and increases 0.01 after each epoch.

Comparison with Baseline Methods
In this section, we report the experimental results of the proposed framework, named GLAN (Graph-based Linear Assignment Network), compared with six state-ofthe-art baselines, SH [13], SD [14], RM [16], DLASP [19], BDL [20], and DHN [5] of which the first three algorithms are traditional learning-free methods and the last three are deep learning approaches. In Tables 1 and 2, two versions of DLASP [19] are involved in comparison, named DFC and DCNN which are build upon Fully-Connection (FC) layers and CNNs [22] respectively.
To evaluate the performance of these methods, we apply Greedy discretization to the solution matrices predicted by these approaches, and define the assignment precision criteria as where tr(·) returns the trace of given matrix. In addition, in order to fairly compare our method with baselines in terms of computation efficiency, all the methods are run on PC with a Intel Core i5-4590 CPU (3.30 GHz), a RAM (16GB) and a GTX 1060Ti GPU (6G).
The average precision of each tested algorithm is illustrated in Table 1. In addition, Table 2 reports the comparisons in terms of computational time. In non-learnable approaches, adopting simple normalization along row and column, SinkHorn [13] can not obtain satisfactory assignment precision, despite of its relative fast inference process. As a variant of SinkHorn [13] with entropic penalization, SD [14] runs with the lowest time cost, and significantly outperforms SinkHorn [13] in assignment precision. However, their performance on assignment precision often deteriorates when the size of problems increases. The RM [16] algorithm employs an elaborate reasoning process to update the solution iteratively and achieves the best assignment precision among the learning-free baselines. However, its computation time grows greatly with the increase of the problem size. In learning-based methods, DFC [19] passes the sub-classification tasks generated from the cost matrix to several FC layers to make decisions for linear assignment problems. Its computational complexity is the lowest than other learning-based methods, but it gets the worst assignment precision. Similar to the DFC [19], decomposing the linear assignment problem into a sequence of smaller subassignment tasks, the RNN-based model BDL [20] achieves a better performance on assignment precision due to its adaptation to problems of varying sizes. However, the relationships between sub-assignment tasks are not taken into account in both of their frameworks. Employing several stacked CNN layers, DCNN [19] also achieves a better performance than the FC-based version of DLASP [19], i.e., DFC. However, due to the limited receptive field of convolution kennels, it can not makes assignment decisions through global information when the size of the problem is greater than its receptive field. To receive information from the global scope, another RNN-based model, named DHN [5], transforms the cost matrix into two sequential patterns from column-wise and row-wise respectively to make assignment decisions. The performance of DHN [5] outperforms all the other previous baselines on assignment precision. But same as the RM [16], the computational time of DHN [5] is also sensitive to the problem size.
Devoting to learning the inductive representations and relational structures, that help to make the decisions for linear assignment problems, our graph network achieves the best assignment precisions in general as shown in Table 1. Specifically, the average assignment precision of the proposed method superiors the one of DHN [5] by 10.08%. By multiple iterations of the convolution module, the receptive field of our model can cover the whole graph no matter how large the graph is. As shown Table 1, our method achieves consistently high assignment accuracies with the problem size increasing. Furthermore, since the network architecture is independent of the structure and size of the graph, the running time of the proposed method increases very slightly as the problem size expands.

Ablation Study
To verify the effectiveness of each component in our framework, we perform several ablation experiments for the number of convolution layers, the dimension of edge feature, the channel attention and aggregation weights, and the constraint losses.  mentioned in Sec 1, the information of one node can be passed to any other nodes after two convolution operations. To explore the influence of the number of convolution layers, we set the dimension of edge features to 16 and vary the convolution iterations from 2 to 10. As illustrated in Fig. 3(a), when the iteration is set to 2, our model has outperformed the best baseline method DHN [5]. As the number of convolution layer increases from 2 to 5, the performance of our model is improved significantly.
However, there is no significant improvement when convolution iteration is set to a value greater than 5, which means that using 5 convolutional layers is sufficient to capture the global inductive information for making assignment decisions.
• Influence of edge feature dimension. The edge feature here refers to the latent representations of edges in the convolution layer. We fix the convolution iterations to 5 and perform the ablation study for edge feature dimension, where the dimension is set to several values to illustrate its influence on performance. As illustrated in Fig. 3(b), the performance of our model is significantly improved when the dimension is expanded from 2 to 4. In addition, the performance is enhanced to a certain extent by setting the dimension to 16. However, when setting the dimension to a larger value than 16, such as 32, 64, and 128, the assignment precision is basically stable around the result predicted by assigning the dimension with 16. As mentioned above, our model is a lightweight framework, where only 5 convolution layers and 16-dimension latent representations are sufficient to achieve the nearly best assignment precision. • Effectiveness of constraint losses. The loss function Eq. 16 leads the assignment matrix output by our framework to satisfy the constraints in Eq. 2 and Eq. 3. And another loss function Eq. 17 guides our framework to make a sparse assignment decision.
Aiming to quantify the contribution of the proposed soft constraint losses formulated as Eq. 16 and 17, we also design three downgraded versions of our model, named GLAN-L1 -L2 , GLAN-L1 and GLAN-L2 , where L1 and L2 denote removing constraint loss Eq. 16 and Eq. 17 in training respectively. As illustrated in Fig. 3(d), without any constraint loss as the supervision signal in the training process, the model GLAN-   L1 -L2 has the worst performance compared with other versions. With the constraint loss Eq. 16 or Eq. 17 as a part of training supervision, the proposed framework make better assignment precisions than GLAN-L1 -L2 in all cases. Furthermore, the two constraint losses are not conflicting with each other, and they are combined into the full version of our model GLAN making it achieve the best performance in all cases.

generalization study
Generalization ability is an important quality of linear assignment solvers, especially for learning-based methods that are usually sensitive to the different data distribution between test data and training data. To verify the generalization ability of our framework and baselines, we train the learning-based models on the synthetic dataset SynData 1 10 150 and test them on three types of dataset which have different data distributions from SynData 1 10 150 . Specifically, in order to evaluate the assignment precision on dataset with larger cost matrices, we generate a synthetic dataset named SynData 1 200 3000 where the problem size is ranging from 200 to 3000 with an interval of 200 and the cost value is in (0,1). Table 3 reports the assignment precisions of our framework compared with  the state-of-the-art baselines. In traditional solvers, the performance of SH [13] and SD [14] have an evident tendency to degradation with the problem size expanding.
The assignment precision of the other traditional method, i.e., RM [16], is not sensitive to the problem size, however its performance is still poor. In the learning-based method, with the expansion of the problem scale, the assignment precision of DHN is severely reduced. When the problem size is greater than 1000, the problem cannot be solved within 5 minutes, which makes it difficult to perform complete statistics on the results of large-sized problems. In addition, DCNN [19] and BDL [20] have similar average assignment precision, while their performance are still sensitive to the size of problem. Different from these baselines discussed above, our proposed framework GLAN achieves consistent assignment precision, and surpasses all baselines on all cases, which demonstrates that our model trained on small-sized data is competent for more difficult problems with large-sized cost.
Besides, we also test all the methods on the dataset which is the combination of the datasets SynData 1 10 150 and SynData 1 200 3000 , yet the cost matrices are multiplied by a real value randomly sampled from 1 to 10 making the cost value be in (0, 10).
For the sake of clarity, this dataset is divided into two parts named SynData 10 10 150 and SynData 10 200 3000 , and the corresponding experimental results are reported in Table 4 and Table 5. Concretely, Table 4 illustrates the comparison results to validate the models' generalization on test data which has a different cost value interval from the training data. And Table 5 reports the experimental results predicted on a more difficult dataset in which not only the problem size but the cost value interval are also different from the training data. In traditional solvers, SH [13] simply makes assignment decision by performing column-and row-normalization iteratively, thus is not sensitive to the cost value scale and achieves the similar assignment precision to its results on SynData 1 10 150 and SynData 1 200 3000 . As the variant of SH [13], SD [14] achieves better performance on the dataset with interval of (0, 10) than that in (0, 1).
Interestingly, RM [16] achieves the best assignment precision on data with varying sizes from 10 to 30 in Table 4, because multiplying a value greater than 1 on cost matrix is equivalent to expanding the gradient during optimization, thus speeding up its convergence rate. Besides, in the case of the same data size, RM [16] achieves better results on data in (0, 10) than on data in (0, 1). However, the assignment precision of RM [16] is lower than our proposed framework GLAN when the problem size is greater than 30. In learning-based baselines, both DCNN [19] and BDL [20] obtain relative low assignment precision on data with small-size such as 10 and 20, and gradually increase the precision until it is stable around a certain value as the problem size expands. The results of DCNN [19] and BDL [20] on SynData 10 10 150 demonstrate that both of them overfit small-sized training data and are susceptible to different data distribution. Besides, the assignment precision of DFC [19] and DHN [5] on SynData 10 10 150 are obviously worse than the results on SynData 1 10 150 . In addition, the performance of DHN [5] on SynData 10 200 3000 are still deteriorated as the problem size increases, and worse than that on SynData 1 160 300 , which demonstrate that DHN [5] fails to handle the linear assignment problem whose data size and value scale are different from its training data. Due to the structured inductive representations, our framework GLAN obtains the similar performance on SynData 10 10 150 as that on the dataset SynData 1 10 150 , and achieves the best average assignment precision. Furthermore, it also obtains the best and nearly consistent assignment precision on SynData 10 200 3000 where both the problem size and cost value scale are different from the training data.
The experimental results mentioned above demonstrate that our framework is insensitive to the data size and value scale, and can achieve consistent assignment precision.

Evaluation in MOT.
To validate the effectiveness of our framework on real scenarios, we employ the multi-object tracking (MOT) problem as the task and embed our GLAN into MOT architecture as an assignment module. In the following, we will introduce the experimental settings and report the experimental results in detail.
MOT can be tackled by exploiting the regression head of a detector to perform temporal alignment of object bounding boxes [36]. Based on the tracking pipeline in [36] which adopts the Faster-RCNN [37] as a detector, Xu et al. [5] embed the differentiable DHN into the MOT architecture to train the detector in an end-to-end manner. Similarly, we also combine the differentiable assignment solvers with the tracker in [36] to verify their effectiveness in MOT tasks. Here, we exclude the DFC [19] because it is inflexible to cope with cost matrices with varying sizes. For simplicity, we name the tracker in [36] FRT (Faster RCNN Tracker).
In training, the matching between predicted bounding boxes and ground truth is viewed as an assignment problem, and the cost matrix is constructed according to center distance and Intersection-over-Union (IOU) between tracks and bounding boxes.
Furthermore, we employ the soft MOTA and MOTP (please refer to [5] for the details of the construction of them) to guide the learning process. In the case of MOT, there can be different numbers of tracks and ground-truth objects, and the objects in the previous frame can be missed in the current frame or a new object can exist in the current frame. Therefore, in training, we remove the constraint loss to prevent the un-assigned track or object from having a high assignment score. In evaluation, following the tracking pipeline in [36], only the trained detector is used to perform tracking and the assignment solvers are not employed to facilitate the tracking process.
The performance of each tested method on MOT benchmark MOT17 [38] is evaluated by standard MOT metrics and is reported in Table 6. It is observed that trained along with differentiable assignment solvers, the performance of the tracker has been improved in most metrics. Specifically, the learnable-free differentiable methods, RM [16], SD [14] and SH [13], solve the assignment problem directly on the cost matrix, which allows the relationships between each pair of tracks and bounding boxes to be taken into consideration. Therefore, the trackers trained with these solvers have been improved on almost metrics. Despite the improvements achieved by learning-based baselines, there are still several limitations to enhancing the tracker. In detail, the BDL [20] splits the assignment problem into several classification sub-tasks, but the relationships between these sub-tasks are not involved in solving the original assignment problems.
The DHN [5] transforms the cost matrix to a sequential pattern and passes it to an RNNbased model to extract discriminative representations from the global scope. However, it is unsuitable to solve the time-independent problem with the RNN-based model. Besides, the DCNN [19] regards the cost matrix as an image and employs stacked CNN layers to obtain the assignment prediction. But the predicted assignments always reach the local optima when the size of problems exceeds the receptive fields.
In virtue of the structure of the bipartite graph constructed from the cost matrix, the proposed framework GLAN can well capture the global inductive information through message passing, and the tracker trained with GLAN achieves the best results in terms of most metrics. Specifically, in MOT17, both our model and RM [16] achieve the best improvement in terms of MOTA (+2.9%), MOTP (+0.9%) and MT (+1.8%) over FRT [36]. Besides, the tracker combined with our GLAN also obtains the best results in terms of ML and FN, which demonstrates the effectiveness and adaptability of our method for MOT task.

Conclusion
In this paper, we propose a novel learning framework to improve a differentiable solver for the linear assignment problem. We first convert the problem of making a linear assignment from a cost matrix to the problem of edge selection from a constructed bipartite graph. In order to solve the edge selection task, we propose a graph network to form structured representations for each edge by message passing and predict their labels. Experimental results on synthetic datasets reveal that with low computational complexity, the proposed method outperforms other state-of-the-art baseline solvers on assignment precision. Moreover, as a trainable layer in MOT architecture, the proposed assignment solver can best boost the tracking performance than other differentiable approaches.