# Multi-Relational Graph Convolution Network for Service Recommendation in Mashup Development
## 3 Multi-Relational GCN Based Service Recommendation Model
### Overall Framework
#### 3.2.1. Graph Construction  
To fully exploit different kinds of relations between mashups and services and alleviate the sparsity and cold-start problem of the mashup-service composition record, we construct a multi-relational mashup-service graph \(\mathcal{G}=(\mathcal{V},\mathcal{E},\mathcal{R},\mathcal{W})\), where the node set \(\mathcal{V}=M\cup S\) includes all mashups and services, and \(\mathcal{E}\) denotes the edges between the nodes if there exist a certain relation. \(\mathcal{R}\) denotes the relation types of edges, and \(\mathcal{R}=\{\mathcal{R}_{\mathrm{C}},\mathcal{R}_{D},\mathcal{R}_{T}\}\) represents the three types of relations: composition relation, functional relation, and tagging relation. \(\mathcal{W}\) denotes the weights of edges for each relation type. Next, we describe the construction process of the three types of relations in detail:  
* Composition Relation. The composition relation between the mashup and service can be modeled as a bipartite graph, where an edge of type \(\mathcal{R}_{\mathrm{C}}\) exists between mashup \(m\) and service \(s\) if \((m,s)\) appears in \(MS\). The composition relation is represented as an adjacency matrix \(A^{\mathcal{C}}\in\{0,1\}^{N\times N}\) with \(A^{\mathcal{C}}(i,j)=1\) if nodes \(i\) and \(j\) have a composition relation in \(MS\) and 0 otherwise. Note that the matrix \(A^{\mathcal{C}}\) is extremely sparse as most mashups typically only invoke a few services to meet their demands. In addition, there exist some mashups and services that have no composition history, i.e., the rows and columns of matrix \(A^{\mathcal{C}}\) of the cold-start mashups and services are zero vectors. To mitigate the sparsity and cold-start issues of the composition relation, other features of services and mashups such as textual descriptions and tags are utilized. * Functional Relation. The textual descriptions of mashups and services provide functional properties and can alleviate the sparsity and cold-start problem of the compo  
Figure 1: Overall framework of MRGCN for service recommendation. sition relation. For instance, for a new mashup, m has no composition record, and we can still recommend a possible service \(s\) if mashup \(m^{\prime}\) is functionally similar to \(m\) and \(m^{\prime}\) invokes service \(s\). We represent the functional relation as a graph where two nodes are connected with type \(\mathcal{R}_{D}\) if their textual descriptions are similar to each other. It is crucial to measure the similarities of textual descriptions between mashups and services. In this paper, we adopt two approaches for learning the feature representations from textual descriptions and the similarity between them: * LDA [29]. Latent Dirichlet Allocation (LDA) is an unsupervised generative model that can discover topics in a collection of documents and assign topic distributions to each document. We collect the textual descriptions of all mashups and services as a document corpus. After training, the textual description of each mashup/service will have a distribution over all topics, and each topic will have a distribution over all words. Specifically, each mashup/service is mapped to a latent topic space and represented as a topic distribution \(d\in\mathbb{R}^{NK}\), where \(NK\) is the number of topics. * Doc2 vec [30]. Different from LDA that processes documents as \"bag-of-words\" where the order of words is ignored, the doc2 vec model learns a distributed vector representation for a piece of document. It follows the idea of word2 vec where the target word is predicted given context words. Concretely, it concatenates the document vector with several word vectors from the document and predicts the following word in a context window. Compared to word2 vec, the only change is the addition of the document vector that acts as a memory of the topic of the document. After training, the textual description of the mashup/service is represented as a dense vector \(d\in\mathbb{R}^{ND}\), where \(ND\) is the dimension size.