{'fraction_non_alphanumeric': 0.03210740072202166, 'fraction_numerical': 0.007694043321299639, 'mean_word_length': 4.771715067066024, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Semi-Supervised Graph-to-Graph Translation

Graph translation is very promising research direction and has a wide range of potential real-world applications. Graph is a natural structure for representing relationship and interactions, and its translation can encode the intrinsic semantic changes of relationships in different scenarios. However, despite its seemingly wide possibilities, usage of graph translation so far is still quite limited. One important reason is the lack of high-quality paired dataset. For example, we can easily build graphs representing peoples' shared music tastes and those representing co-purchase behavior, but a well paired dataset is much more expensive to obtain. Therefore, in this work, we seek to provide a graph translation model in the semi-supervised scenario. This task is non-trivial, because graph translation involves changing the semantics in the form of link topology and node attributes, which is difficult to capture due to the combinatory nature and inter-dependencies. Furthermore, due to the high order of freedom in graph's composition, it is difficult to assure the generalization ability of trained models. These difficulties impose a tighter requirement for the exploitation of unpaired samples. Addressing them, we propose to construct a dual representation space, where transformation is performed explicitly to model the semantic transitions. Special encoder/decoder structures are designed, and auxiliary mutual information loss is also adopted to enforce the alignment of unpaired/paired examples. We evaluate the proposed method in three different datasets.


INTRODUCTION
: An example of graph-to-graph translation the target domain, which represents similar reading preference. The translation function is expected to generate the target graph based on the source graph. It is in effect learning to capture the intrinsic attributes, like aesthetic preferences and personal characters in this case, and discovering the patterns behind that domain transition. It can facilitate many real-world applications. For instance, given the brain network of a healthy subject, we may want to predict the brain network when the subject has certain disease. Given the traffic flow of a city, we want to estimate the traffic flow when events such as concert is held in the city.
The popularity of graph translation is attracting increasing attention and several efforts have been made. Most of them focus on modeling the transition of graph topology in the form of edge existence and node attributes across the source and the target domains. For example, [10] formally defined this task and proposed a basic framework based on edge-node interactions. [11] extended previous work by building two parallel paths for updating nodes and edges respectively, and introduced a graph frequency regularization term to maintain the inherent consistency of predicted graphs. There are also some other works focusing on special needs of different applications. For example, [6] introduced domain knowledge into the translator design for reaction prediction, and [28] adopted multi-head attention to capture the patterns in skeleton mapping.
Despite their dedications, all aforementioned graph-to-graph translation algorithms investigate fully-supervised setting, i.e., largescale paired graphs in source and target domain are available to provide supervision for learning translation patterns. However, for many domains, obtaining large-scale paired graphs is a non-trivial task, sometimes even impossible. The source and target graphs are expected to share the exactly same node sets, which is expensive to guarantee and collect in large scale. For example, in Figure 1, the source-domain graphs can be obtained from music streaming platforms like Spotify, and the target domain from e-book platforms like Amazon Kindle. It is difficult to build the corresponding pairs, as users could use different IDs across those two platforms. Another example is the brain networks, where two domains are brain activity patterns of healthy people and Dyslexia patients respectively.
In this case, constructing pairs would need the same person in both healthy and diseased situation, which is impossible.
Although large-scale paired graph dataset is difficult to collect, dataset with limited number of paired graphs and large number of unpaired graphs is much easier to build, which enables us to explore semi-supervision techniques addressing this problem. Graph translation follows the classical auto-encoder framework, with an encoder in source domain and a decoder in target domain. Through introducing auxiliary reconstruction tasks and building a sourcedomain decoder and a target-domain encoder, those mono-domain graphs can be utilized to boost the learning process. Recovering the original source graph imposes a higher requirement on the sourcedomain encoder to extract more complete and representative features, and reconstructing the graph based on the its embedding can also guide the target-domain decoder to model the real graph distributions in the that domain. However, directly extending previous works in this manner has its pitfalls. The source and target domains are assumed to share one same embedding space, and the extracted embedding of source graphs are used for both reconstruction task and translation task, which makes it difficult to model the semantic drifts across two domains. Take 1 for example, embedding of node 2 would be close to node 3 as a result of message-passing mechanism in the source domain, but they are supposed to be distant in order to recover the non-connection information in the target domain. This trade-off could impair model's expressive ability and lead it to get sub-optimal performance.
To cope with this semantic gap, we design a new framework, which we call as SegTran, as shown in Figure 2. Concretely, we design a specific translation module to model the semantic transition explicitly and enforce the alignment across two domains. This translation module is trained on the limited number of paired graphs, while other components can benefit from both paired cross-domain graphs and unpaired mono-domain graphs during training. Furthermore, to assure that patterns captured by the translation module is general, we also explored providing auxiliary training signals for it by maximizing the mutual information between the source graph and its translation results. The structures of the encoder and decoder are also specially designed, as graph translation facing some intrinsic difficulties, due to diverse topology and the interdependency between nodes and edges [10]. The main contributions of the paper are: • We propose a new framework for graph translation which is better at coping with the semi-supervised scenario. It can promote future research of graph translation algorithms as the lack of large scale paired dataset is one key obstacle its exploration and applications. • We design novel encoder/decoder architectures by using position embedding, multi-head attention, along with an explicit translation module, to achieve higher expressive ability. The design of each component is well-justified. • Experiments are performed on three large datasets, and our model achieved the state of art result on all of them. Extensive analysis of our model's behavior is also presented.
The rest of the paper are organized as follows. In Sec. 2, we review related work. In Sec. 3, we formally define the problem. In Sec. 4, we give the details of SegTran. In Sec. 5, we conduct experiments to evaluate the effectiveness of SegTran. In Sec. 6, we conclude with future work.

RELATED WORK
In this section, we review related work, which includes graph translation and semi-supervised translation.

Graph Translation
Translation of complex structures has long been a hot research topic. Sequence-to-sequence learning is a standard methodology for many applications in natural language processing domain [2,31]. Tree-structured translation was found to be beneficial for molecular generation tasks in the chemistry field [14,17]. With the development of novel architectures, especially transformer [35] and graph convolution network [20], the power of deep network in modeling inter-dependency and interactions have been greatly improved, which make it possible to translate a more general and flexible structure, the graph.
In graph, information are contained in both nodes and edges, and its translation has some intrinsic difficulties. First is the diverse topology structures. The semantics of graphs are not only encoded in each node's feature vector, but also in each edge's (non-)existence, which is combinatory in nature. Therefore, encoding a whole graph as a vector is often found to be brittle [10]. Second, nodes and edges are inter-dependent, and they interact in an iterative way [42]. This 'recurrent' relationship is difficult to model, because it could easily go 'explode' or 'shrink', and make the learning process unstable. Third, the relationship between nodes and their neighbors are nonlocal. Say, distant nodes could still attribute to the existence of the target edge. These difficulties make it more difficult to capture the patterns and model the distributions of graphs.
Earlier works mainly focus on obtaining the intermediate representation during the translation process for downstream tasks, like [19,29], and payed little attention to the design of special models. [22] translates across different graph views by modeling the correlations of different node types, and [6,23] use a bunch of predefined rules to guide the target graph generation processes. All these works require domain knowledge, and their models are domain-specific. [30] introduces some techniques from the natural language processing domain, but their work is refrained to the topology, and is not suitable for our setting. Works more related to ours are [10,11], which both focus on building a general graph translation framework. [10] updates node attributes and edge existence iteratively, and adopt a GAN [8] to improve the translation quality. [11] constructs a node-edge co-evolution block, and designs a spectral-related regularization to maintain the translation consistency.

Semi-supervised Translation
Semi-supervised problem, where only a small fraction of training data has supervision, is also an important research problem. Previous works have dedicated to exploit unlabeled samples in many approaches: exploiting relationship among training examples [18], enhancing feature extractors with auxiliary unsupervised task [9], reducing model bias with ensemble-based methods [21], etc. However, most of these methods are proposed for discriminative models, assuming availability of a shared intermediate embedding space with limited dimensions, or expecting the output to be a vector of probability. Our task is in essence a generative task, with both the input and output lying in the same space with a very large dimension, making those approaches infeasible.
The most related tasks to our problem setting is the utilization of monolingual dataset in neural machine translation, where unpaired sentences in the target language are used to boost model's performance. The most popular method there is based on back translation [1,26,27], where a pre-trained target-to-source translator is applied to those unpaired sentences, hence pseudo source sentences can be obtained. They train the translator by enforcing it to generate real target from those fake pseudo sentences in the source language. In this way, a cycle-consistency can be built, and it has shown to get state-of-the-art performance. However, in those tasks, the semantic across domains are the same, which enables them to use one shared embedding space for both the source and the target sentences. Say, the meaning of the sentence remains the same, only the grammar and dictionary changes. And this difference in syntax and dictionaries can be encoded in the parameters of decoder model. Similar is the case of unsupervised style transfer in computer vision field [44], where only low-level features like texture and color can change across domains.

PROBLEM SETTING
Many real-world problems can be viewed as the graph-to-graph translation problem, i.e., given the graph of an object in source status, predict the graph of the same object in target status. For example, predict the shared reading preference of a group of people given their similarity in music taste, or generate the brain activity network of a subject after certain diseases based on it in the healthy state.
Throughout the paper, we use = {V , A , F } to denote an attributed graph of the -th object in source status, where V = { 1 , . . . , } is a set of nodes, A ∈ R × is the adjacency matrix of , and F ∈ R × denotes the node attribute matrix, where F ( ) ∈ R 1× is the node attributes of node j and is the dimension of the node attributes. Similarly, we define the corresponding target graph of as = {V , A , F }, where A ∈ R × is the adjacency matrix of , and F ∈ R × with being dimensionality of node attribute in target status. We set F to be the same as F in this work due to the dataset, but our model can also be used to the scenarios when they are different. Note that we assume and share the same set of nodes while their graph structures are different. This is a reasonable assumption for many applications. Still take Figure  1 for an example, the nodes, referring to users, have to remain in the same set to build the correspondence across two domains. But the edges, representing uses' relationship with each other, along with node attributes can be different. For two graphs of different objects in the same status, say and , we consider V ≠ V because V = V is a special case, which can also be handled by our model.
To learn a model that can predict graph-to-graph translation, we need a set of paired graphs to provide supervision. We use G = { , } =1 to denote paired graphs. However, obtaining large-scale paired graphs is not easy. In many cases, it is difficult or even impossible to acquire the representation of one graph in two domains, like the reading/music preference example and the brain network example. Thus, is usually small, which cannot well train a model for graph translation. Fortunately, it is relatively easy to obtain a set of unpaired graphs, i.e., graph in one status with its corresponding graph in another status missing. For simplicity, we use G = { } =1 to denote a set of graphs in the status, and G = { } =1 to represent a set of graphs in the status. G = { , } =1 is the overlapping part of G and G with < and < . With the above notations, the problem of semi-supervised graph translation is formally defined as Given G , G and G = { , } =1 , we aim to learn a function that can transform a source-domain graph to the target domain, i.e., Note that though we only consider two statuses, it is straightforward to extend our setting to multi-status graph translation.

METHODOLOGY
In this section, we give the details of the proposed framework SegTran for semi-supervised graph-to-graph translation. It is challenging to directly translate a graph from one domain to another domain because (i) the graph structures are complex and discrete; and (ii) we have limited paired graphs to provide supervision. Thus, our basic idea is to learn good representations that preserves the topological and nodal features, translate the graph in latent domain and project the translated representation back to graph in target domain.
An illustration of the proposed framework is shown in Figure 2. It is composed of three components: (i) two encoders which aim to learn node and graph representations for graphs of each domain; (ii) two decoders which aim to reconstruct the attributed graph to guide the encoder to learn good representations during training phase and to predict the graph in target domain during test phase; and (iii) a translator which is designed to translate the graph in the latent domain from both node and graph level. In addition, the translator leverages both the paired and unpaired graph for learning better transition ability. This design has several advantages: (i) It allows the unpaired graphs to provide auxiliary training signals for learning better encoder; (ii) Through sharing the same decoder for both translation and reconstruction tasks, its ability in modeling the graph distribution of the target domain can also be enhanced; and (iii) Due to the semantic gap issue, instead of constructing one shared embedding space and expect it to be domain-agnostic, we explicitly modeling the semantic transition process through a translator module, and form the so-called "dual embedding" between the source and target domain. Next, we give the details of each component.
Given an input attributed graph, we first introduce an encoder to learn node embedding that capture the network topological and node attributes so that we can conduct translation in the latent space. Graph neural networks (GNNs) have shown promising results for learning node representations [12,15,16,20,33]. Thus, we choose GNN as the basic encoder. The basic idea of GNN is to aggregate a node's neighborhood information in each layer to update the representation of the node, which can be mathematically written in a message-passing framework [7]: h is the embedding of node at layer , belongs to 's neighbor groups N ( ), and refers to the activation function. We use a linear layer as the updating function and mean as message function respectively. However, previous works have found two main issues of classical GNNs. The first is that their expressiveness is significantly constrained by the depth. For example, a k-layer graph convolution network(GCN) can only capture k-order graph moments without the bias term [5], and each layer is effectively a low-pass filter and resulting in too smooth graph features as it goes deep [37]. This issue would weaken GNN's representation ability, making it harder to encode topology information in the processed node embedding. The second issue is that most of them are position-agnostic. Classical GNNs fail to distinguish two nodes with similar neighborhood but at different positions in the graph [41,43]. This problem becomes severer when we are using GNN to extract node embeddings to predict the existence of edges. For example, if both nodes , ′ and their neighborhoods N ( ), N ( ′ ) have similar attributes, the encoder would tend to produce similar embedding for them. This makes it hard for the decoder to learn that is not connected to To address these issues, we extend classical message-passing based GNNs by adding skip connections and using position embedding, as shown in Figure 3. With skip connections, higher GNN layers can still access lower-level features, and better representations can be learned. Concretely, we concatenate the initial node attributes to the output of each encoding layer, as in Figure 3. As to the position embedding, inspired by the work of [41], we represent each node using the lengths of their shortest paths to a couple of selected anchors. Concretely, each time a graph is to be inputted, say , we randomly selected nodes as anchors, and calculate position embedding of each node basing on them. We use Pos ∈ R × to  ( 2 ), where is the number of nodes in that graph. Considering the size of graphs in our dataset, we preset it to eight for simplicity. Although the absolute values of obtained position embedding would be different when the anchor set changes, their relative relationship remains the same, and can be exploited.

Encoder
With these preparations, now we can present the formulations of our extended GNN structure. In -th block, the message passing and fusing process can be written as: represents node embedding at layer − 1, A[:, ] is the -th column in adjacency matrix, and P −1 = [p −1 1 , p −1 2 , · · · , p −1 ] is the position embedding at that layer. F and Pos are the initial node attributes and position embedding respectively. W and W are the weight parameters, and refers to the activation function such as ReLU.

Decoder
With the representation learned by the encoder, we introduce a decoder to reconstruct the graph. Note that the decoder is not only used to perform the reconstruction task during training phase, but will also be used to complete the graph translation in test phase. During testing, suppose we are given , to predict , it need to first go through source-domain encoder, then translator, followed by the target-domain decoder.
After the encoding part, for each node , now we have two representation vectors, H and P . H is the embedding of the node attributes, and P is the processed embedding for its relative position in the graph. To predict the existence of edges between two nodes, clearly both these two features are helpful. Considering that these two features carry different-level semantic meanings and are in different embedding spaces, directly concatenating them might be improper. In order to learn to fuse the position and attribute information, we construct the decoder with a number of samestructured blocks. Inside the block, we apply a multi-head attention layer [35] with "Query"/"Key" being P and "Value" being H. Its formulation can be written as: W ∈ R , , W ∈ R , , W ∈ R , and they are the query embedding matrix, key embedding matrix, value embedding matrix respectively. W is the output matrix which fuse the result from different heads. / is the dimensionality of P/H, which is the obtained position/node embedding from the encoder. is the embedding dimension of Query/Key, and is the embedding dimension of Value. In this way, model can learn to utilize the position information in aggregating/updating attribute embedding in a data-driven approach.
Then, after concatenating position embedding and processed attribute embedding, we use a weighted inner production to perform link prediction: Here, S is the parameter matrix capturing the interaction between nodes. For node attribute prediction, we append a two-layer MLP after the multi-head attention module as: Since each graph are usually sparse, i.e., the majority elements in the adjacency matrix A are zero, simply treating each element in the adjacency matrix equally for the graph reconstruction loss will make the loss function dominated by missing links, causing trivial results. To alleviate this problem, following existing work [25], we assign higher weight to non-zero elements in A as follows: where is between 0 and 1 to control the weight of the missing links in a graph. With S, the graph reconstruction loss can be written as: where ⊙ denotes element-wise multiplication.

Translator Module
With the encoders and decoders in place, now we can introduce how we learn the translation patterns across two domains. In this framework, we model the translation process in the intermediate level, through transitioning a source graph embedding to its target graph embedding. As shown in Figure 2, Translator module is a key component in our framework, which is required to build the mapping from source domain to target domain. Concretely, we adopt a MLP structure to implement it. The translator operates in a node-wise fashion, using both global feature along with node-level feature as the input: , (P ))).
_ refers to the translated result, and H , _ represent the translated intermediate-level node attribute embedding of node . Same is the case for P , _ . is the global pooling function, which is used to fuse the representation of all nodes in a graph. In this way, the graph-level embedding is appended to the extracted node-level embedding, so that translation patterns can be learned with both local and global features.
During training, this correspondence is easy to be established for paired graphs. We can perform a regression task and minimize the prediction loss in the intermediate embedding level as: In this equation, refers to the embedding obtained from the target graph, and _ means the predicted result based on the source graph by the translator module.
However, for the large amount of unpaired graphs, this kind of training signals can not be obtained. Inspired by [4,13], we propose to use the mutual information(MI) score as an auxiliary supervision to better align these two spaces, as it can quantify the dependence of two random variables. If two graphs are paired, then they should have a high MI score with each other, and if they are not paired, then their MI score would be low. Therefore, by optimizing the MI score between the translated result and the source graph, the translator module would be encouraged to produce more credible results. However, as the dimension of embedding space is too high(R ·( + ) ), directly working on it could suffer from curse of dimensionality and could result in brittle results. Addressing this, we apply MI score to global-level embedding through the function, which can change the dimension to R + . For simplicity of notation, we use g to denote the global feature of graph after the g = ( (H , P s )), and use g _ to denote the output of this translator module, the global feature of translated result The mutual information score is calculated on top of that, following the same procedures as [13], which involves a specific estimator MI:

Objective Function of SegTran
Putting previous parts together, we can get our full model architecture. The optimization goal during training can be written as: Besides the paired translation loss L defined in Equation 11, we also add the reconstruction loss L defined in Equation 9 and MI loss L defined in Equation 14. L is applied to graphs from both source and target domains, and its weight is controlled by the hyper-parameter . L is applied to only unpaired source graphs, by computing the mutual information between and translation result _ , and its weight is controlled by .

Training Algorithm
Besides, as our model is composed of multiple different components, we follow a pretrain-finetune pipeline to make the training process more stable. The full training algorithm can be found in Algorithm 1. We first pre-train the encoder and decoder using the reconstruction loss with both paired and unpaired graphs, so that one meaningful intermediate embedding space for each domain can be learned. Then, we fix them, only train the translator module, to learn the mapping between two embedding spaces. After that, we fix the whole model, and prepare the mutual information estimator. When all these preparations are done, we start the fine-tune steps, by alternatively updating on paired and unpaired graphs, and train the whole model in an end-to-end manner.

EXPERIMENTS
In this section, we conduct experiments to evaluate the effectiveness of SegTran and the factors that could affect its performance. In particular, we aim to answer the following questions. Update the mutual information estimator; 8: Receive a batch of unpaired graphs ⟨ ⟩ , ⟨ ⟩ ; 9: Update the model using L + L ; 10: end while 11: return Trained encoder, decoder, and translator module.
• How effective is SegTran in graph translation by leveraging paired and unpaired graphs? • How different ratios of unpaired graphs could affect the translation performance of SegTran? • What are the contributions of each components of SegTran?
We begin by introducing the experimental settings, datasets and baselines. We then conduct experiments to answer these questions. Finally, we analyze parameter sensitivity of SegTran.

Datasets.
We conduct experiments on one synthetic dataset, BA [10], and two widely used real-world datasets, DBLP [32] and Traffic 1 . The details of the datasets are given as follows: • BA: In BA dataset, source domain is constructed by the Barabasi-Albert model [24]. The graph is built by adding nodes to it sequentially with preferential attachment mechanism, until it reaches 40 nodes. Each newly-added node is connected to only one existing node randomly, with probability . Here, means the current degree of node . This method can generate graphs that follow the scale-free degree distributions. The target graph is constructed as 2-hop reach-ability graph, i.e., if node is 2-hop reachable from node in the source graph, then they are connected in the target graph. As the generated graphs are unattributed, we initialize the node attribute matrix F to be the same as adjacency matrix A. We include this synthetic dataset to understand if SegTran can really capture the translation patterns.
• DBLP: DBLP is a multi-view citation network, with 22559 nodes representing researchers. It provides edges of three types, representing co-authorship, citation, and research overlapping respectively. Each node has a 2000-dimension vector available, encoding the research interests. In our experiment, we use the citation network as the source, and research overlapping network as the target domain. This dataset is given in the transductive learning setting, and all the nodes appeared in one single large graph. Addressing this, we manually split it by first selecting a center node and then sampling nodes within its 2-hop neighborhood to get a smaller graph. The sampled graphs are not required to have exactly same number of nodes, and we control the graph size by setting the upper-bound of node degree as 15. • Traffic: For traffic dataset, we use the publicly available New York Taxi Trip dataset in year 2015. Each trip record contains the take-on and take-off places, as well as the trip-start time. We follow prior studies [36,[38][39][40] and split the city into 100 regions, and build the edges based on the taxi flow amount between each region pairs within one hour. This results in 365 * 24 graphs in total. On this dataset, we perform a traffic flow prediction task, and set the target domain as the graph state one hour in the future. Node attributes are initialized using the mean of historic taxi flows in the past 24 hours.
The statistics of the three datasets are summarized in Table 1, where "Dataset Size" is the total number of graphs and "Average Graph Size" is the average number of nodes in each graph. Note that in BA and Traffic datasets, all graphs have the same size. As we adopt the semi-supervised problem setting, we only use a small subset of graphs as paired, and treat a larger subset as unpaired. The size of each subset is also listed in the "Paired Training" and "Unpaired Training", respectively. The number of paired graphs for testing is listed in the "Paired Testing" row.

Baselines.
We compare SegTran with representative and state-of-the-art supervised and semi-supervised graph-to-graph translation approaches, which includes: • DGT [10]: This method belongs to the encoder-decoder framework. The encoder is composed of edge-to-edge blocks to update the edge representation and edge-to-node blocks to obtain the node embedding. The decoder performs an inverse process as to the encoder, and maps extracted node representation to the target graph. It also utilizes a discriminator and follows the adversarial training approach to generate more "real" graphs. For implementation, we used the the code provided by the author 2 . • NEC-DGT [11]: This is the state-of-the-art approach in graph translation, which also follows the encoder-decoder framework.
To model the iterative and interactive translation process of nodes and edges, it split each of its block into two branches, one for updating the node attributes and one for updating the edge representations. Special architecture is designed for each branch. Besides, it also designed a spectral-based regularization term to learn and maintain the consistency of predicted nodes and edges. We use the implementation provided by the author 3 .
• NEC-DGT-enhanced: As both DGT adn NEC-DGT can only work on paired graphs, they are unable to learn from those unpaired training samples, which would make the comparison unfair. Addressing this problem, we design an extension of NEC-DGT by adding a source-domain decoder, and call it NEC-DGT-enhanced. With this auxiliary decoder, NEC-DGT-enhanced can utilize unpaired graphs by performing reconstruction tasks, which is supposed to improve the performance of the encoder. Note that this can be treated a a variant of SegTran without dual embedding and translator module. • SegTran_p: To further validate the performance of our model design and verify the improvement can be gained from utilizing unpaired graphs, we also designed a new baseline, SegTran_p. It is of the same architecture as SegTran, but is trained only on the paired graphs.

Configurations.
All experiments are conducted on a 64-bit machine with Nvidia GPU (Tesla V100, 1246MHz , 16 GB memory), and ADAM optimization algorithm is used to train all the models. For DGT, NEC-DGT, and NEC-DGT-Enhanced, the learning rate is initialized to 0.0001, following the settings in their code. For SegTran and SegTran_p, the learning rate is initialized to 0.001. In SegTran, the value of hyper-parameter and are both set as 1.0. A more detailed analysis over the performance sensitivity to them can be found in Section 5.5. Besides, all models are trained until converging, with the maximum training epoch being 5000.

Evaluation Metrics.
For the evaluation metrics, we adopt mean squared error(MSE) and mean average percentage error(MAPE). As MSE is more sensitive when the ground-truth value is large and MAPE is more sensitive when the ground-truth value is small, we believe they can provide a more comprehensive comparison combined. Besides, class-imbalance exists in this problem, as edges are usually sparse, and directly training on them would result in trivial results. Addressing it, we re-weight the importance of edges and non-edges during the loss calculation, in both training and testing.

Graph-to-Graph Translation Performance
To answer the first question, we compare the graph tranlation performance of SegTran with the baselines under the semi-supervised scenario on the three datasets. We train the model on the paired and unpaired training graphs, and conduct graph translation on the test graph. Each experiment is conducted 5 times to alleviate the randomness. The average performance with standard deviation in terms of MSE and MAPE are reported in Table 2. From the table, we can make following observations: • SegTran outperforms all other approaches by a reasonable margin. Compared with NEC-DGT-Enhanced, It shows an improvement of 0.082 on BA dataset, 0.005 on DBLP, and 0.009 on Traffic dataset measured by MSE loss. In the term MAPE loss, the improvements are 0.033, 0.013, and 0.016 respectively. This result validates the effectiveness of SegTran. • SegTran performs much more stable than NEC-DGT-Enhanced, although they both utilize unpaired graphs. Looking at the standard deviations, it can be observed that NEC-DGT-Enhanced has higher performance variations. For example, its standard deviation on BA dataset is about two times that of SegTran. This To summarize, these results prove the importance of introducing unpaired graphs to graph translation tasks with only limited number of paired training samples. Besides, they also validate the intuition that explicitly modeling the difference between two domains in the intermediate space can make it easier for the model to utilize unpaired graphs.

Ratio of Unpaired Graphs
In this subsection, we analyze the sensitivity of our model and NEC-DGT-Enhanced towards the amount of unpaired graphs, which answers the second question. We fix the number of paired training graphs, and change the settings by taking different percentage of samples in the dataset as unpaired graphs for semi-supervised training. Concretely, we vary unpaired graph to paired graph ratio  Figure 5 From the figure, we make the following observations: • In general, as the increase of ratio of unpaired graphs, the performance of both NEC-DGT-Enhanced and SegTran increases, which implies that unpaired graphs can help to learn better encoder and decoder for graph-to-graph translation. • As the increase of the ratio of unpaired graphs, the performance of SegTran is consistently better than NEC-DGT-Enhanced, which validate the effectiveness of SegTran in learning from unpaired graphs.

Ablation Study
To answer the third question, in this subsection, we conduct ablation study to understand the importance of each component of the proposed framework SegTran. All experiments are performed in semi-supervised setting, with configurations exactly same as SegTran, if not stated otherwise. Gain from dual embedding In our model design, "dual embedding" is adopted to distinguish between the source and the target domain, and help the model to learn more from unpaired graph. To test its affect, we perform an ablation study by removing the translation module, requiring two domains to share the same embedding space. Other parts are not influenced, except the mutual information loss, which is no longer needed in this case. The performance of "Shared Embedding" in terms of MSE is shown in Table 3. From the table, we can see that on both BA and DBLP dataset, compared with SegTran, removing dual embedding and changing to shared embedding would result in a significant performance drop, which is about 0.065 and 0.053 points decrease, respectively. This is because "dual embedding" can ease the trade-off between reconstruction and translation tasks. Without it, the same features would be used for them, which could result in sub-optimal performance. This result shows the effectiveness of this design in leveraging the semantic change from source domain to target domain.
Importance of position embedding In this part, we test the effects of the position embedding, and evaluate its contributions in guiding the encoding process. In removing the position embedding, we leave the model architecture untouched, and use the first eight dimensions of node attributes to replace the calculated position embedding. Through the result in Table 3, it can be seen that it will result in a performance drop of 0.01 on BA, and 0.012 on DBLP. This result shows that position embedding is important for extending representation ability of graph encoder module.
Importance of MI loss We also test the benefits from auxiliary mutual information loss when aligning the transformed embedding of unpaired graphs. For this experiment, we simply remove this loss during the fine-tune steps, and observe the change of performance. We find a drop of 0.009 points on BA, and 0.005 on DBLP. The drop is smaller on DBLP datast, and it may still be a result of dataset size. As DBLP is much larger, the number of paired graphs is more sufficient for the training, which makes this auxiliary loss not that important. But overall, we can observe that this supervision can train the translator better.
Influence of multi-head attention In this part, we test the influence of the multi-head attention module in the decoding process. This module is designed to fuse the processed embedding of nodes based on their relative distances. The relative distances is measured using the processed position embedding along with the metric space constructed by each attention head. Through multi-head attention, higher-order interaction between processed node embedding and position embedding is supported. For comparison, we directly remove this layer from the decoder. This manipulation will not influence other parts of the translation network. From Table 3, we can see that on BA dataset, this module can bring a moderate improvement of around 0.003. On DBLP dataset, the performance is similar whether this module is removed or not. Therefore, the importance of this layer is rather dependent on the complexity of dataset, and sometimes it is not necessary.

Parameter Sensitivity Analysis
In this subsection, we analyze the sensitivity of SegTran's performance towards the hyper-parameters and , the weight of reconstruction loss and mutual information loss. We vary both and as {0.3, 0.7, 1.0, 1.3}. These experiments all use the same pre-trained model, as these two hyper-parameters only influence fine-tune process. Other settings are the same as SegTran. This experiment is performed on BA dataset, and the result is shown in Figure 6. The axis is the translation error measured using MSE loss, axis refers to the value of , and axis represents .
From the figure, we can observe that generally, reconstruction loss and mutual information loss are both important for achieving a better performance. When is small, it is difficult for this model to achieve a high performance. This observation makes sense because reconstruction loss guides the encoder to extract more complete features from input graphs, and consequently has a direct influence on the quality of intermediate embedding space.

Case study
In Figure 7, we provide an example of BA dataset to show and compare the captured translation patterns of SegTran and NEC-DGT-Enhanced. Figure 7(a) is the source graph, and Figure 7 Figure 7(c) and Figure 7(d), to show the prediction results clearly, we split them into three groups. When the predicted existence probability is above 0.2, we draw it in black if it is true otherwise in red. When the probability is between 0.05 and 0.2, we draw it in grey. Edges with smaller probability are filtered out.
It can be seen that SegTran has a high translation quality, and made no erroneous predictions. In the target graph, node 3 is the most popular node. The same pattern can be found in the translated result by SegTran, where node 3 has a high probability of linking to most other nodes. As to the distant node pairs, like node 5 and 7, or node 1 and 7, which have no links in the target graph, SegTran assigns a relatively low probability to their existence, below 0.2.
The performance of NEC-DGT-Enhanced, on the other hand, is not that satisfactory. It mistakenly split the nodes into two groups, {0, 2, 5} and others, and assigns large weight to edges inside them but little weight to edges between them. Node 5 is connected only to node 2 in the source graph, therefore NEC-DGT-Enhanced tries to push the embedding of it as well as its neighbors distant from other nodes, which could be the reason resulting in this phenomena. This example shows that SegTran is better in capturing the graph distributions in the target domain and learning the translation patterns. Graph-to-graph translation has many applications. However, for many domains, obtaining large-scale data is expensive. Thus, in this paper, we investigate a new problem of semi-supervised graphto-graph translation. We propose a new framework SegTran, which is composed of a encoder to learn graph representation, a decoder to reconstruct and a translator module to translate graph in the latent space. SegTran adopts dual embedding to bridge the semantic gap between the source and target domain. Experimental results on synthetic and real-world datasets demonstrate the effectiveness of the proposed framework for semi-supervised graph translation. Further experiments are conducted to understand SegTran and its hyper-parameter sensitivity.
There are several interesting directions need further investigation. First in this paper, we mainly focus on translating one graph in the source domain to another graph in the target domain. In real-world, there are many situations which require the translation from one domain to many other domains. For example, in molecular translation task [14,17], we could make different requirements on the properties of translated compound, and each requirement would form a domain. Therefore, we plan to extend SegTran to one-to-many graph translation. Second, the graph translation has many real-world applications. In this paper, we conduct experiments on citation network and traffic network. We would like to extend our framework for more application domains such as the graph translation in brain network and medical domains [3,34].

ACKNOWLEDGEMENT
This project was partially supported by NSF projects IIS-1707548, IIS-1909702, IIS-1955851, CBET-1638320 and Global Research Outreach program of Samsung Advanced Institute of Technology #225003.