semisupervised learning on heterogeneous graphs and its … · 2018-07-06 · „ere are multiple...

9
Semisupervised Learning on Heterogeneous Graphs and its Applications to Facebook News Feed Cheng Ju Facebook, Inc University of California, Berkeley James Li Facebook, Inc Bram Wasti Facebook, Inc Shengbo Guo Facebook, Inc ABSTRACT Graph-based semi-supervised learning is a fundamental machine learning problem, and has been well studied. Most studies focus on homogeneous networks (e.g. citation network, friend network). In the present paper, we propose the Heterogeneous Embedding Label Propagation (HELP) algorithm, a graph-based semi-supervised deep learning algorithm, for graphs that are characterized by heteroge- neous node types. Empirically, we demonstrate the eectiveness of this method in domain classication tasks with Facebook user- domain interaction graph, and compare the performance of the proposed HELP algorithm with the state of the art algorithms. We show that the HELP algorithm improves the predictive performance across multiple tasks, together with semantically meaningful em- bedding that are discriminative for downstream classication or regression tasks. CCS CONCEPTS Information systems Data mining; KEYWORDS Social Network; Semisupervised Learning; Neural Networks; Graph Embedding ACM Reference format: Cheng Ju, James Li, Bram Wasti, and Shengbo Guo. 2018. Semisupervised Learning on Heterogeneous Graphs and its Applications to Facebook News Feed. In Proceedings of , , , 9 pages. DOI: 1 INTRODUCTION 1.1 Motivation ere are multiple factors that inuence the ranking of a story on a person’s News Feed. A comprehensive look of the many factors involved can be found in [3]. For content that contains links to outside Web domains, one of the most important factors is the quality of the content from this domain. ere are dierent dimensions under consideration for the overall quality of a domain (e.g. if its URLs always contain exaggerated headlines). For many Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s). , © 2018 Copyright held by the owner/author(s). ... $15.00 DOI: of the important dimensions, we train classiers to predict the likelihood a piece of content is of this dimension using content features. ese classier predictions are then used in conjunction with other signals (e.g. timeliness, interaction history) to assess the content rank on a person’s News Feed. We have following demands and expectations for the semi- supervised methods for our applications. First, as the data is large and predictions can get stale quickly, we must pay special aention to training time and warm-start issues. When an unseen domain ap- pears, we need the score immediately, instead of retrain the model on the whole data. Second, as the number of nodes is huge, if the embedding is given by a look-up table for every nodes in the graph, the computation would be a boleneck. us we plan to avoid embedding nodes based on a look-up table. ird, as we has clear classication tasks, we are looking for an end-to-end approach to take the graph information into supervised training simultaneously, instead of two-stage embedding-supervision procedures. Last but not least, the quality labels are usually obtained by human labeler and thus expensive, while the content features X and dierent type of interaction graphs (e.g. resharing graph) are easy to get. e inductive semi-supervised methods have great advantage under this condition. 1.2 Graph-based Semi-supervised Learning Graph-based semi-supervised learning is widely used in network analysis, for prediction/clustering tasks over nodes and edges. A class of commonly used approaches can be considered as a two- stage procedure: the rst rst step is node embedding, where each node are represented in a vector which contains the graph infor- mation; the second step simply apply these vectors are further for the conventional machine learning tasks. [24] proposed a spectral clustering method, which uses the eigenvectors of the normalized Laplacian matrix as node embedding, and applies k-means algo- rithm on the embedding vectors for unsupervised clustering. [23] proposed another clustering method, using the eigenvectors of the modularity matrix to nd hidden community in networks . [1] generated several handcraed local features (e.g. sum of neighbors) as embedding, and applied supervised learning on them to predict the probability that two node would be connected in the future, which is more exible compared to proximity based link-prediction [18, 20]. [30, 32] further studied the embedding methods proposed by [23, 24] for supervised learning tasks, to predict the community label of the nodes in social network, which showed great success. [31] proposed a edge-centric clustering scheme, which learns a arXiv:1805.07479v2 [cs.SI] 5 Jul 2018

Upload: others

Post on 18-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

Semisupervised Learning on Heterogeneous Graphs and itsApplications to Facebook News FeedCheng Ju

Facebook, IncUniversity of California, Berkeley

James LiFacebook, Inc

Bram WastiFacebook, Inc

Shengbo GuoFacebook, Inc

ABSTRACTGraph-based semi-supervised learning is a fundamental machinelearning problem, and has been well studied. Most studies focus onhomogeneous networks (e.g. citation network, friend network). Inthe present paper, we propose the Heterogeneous Embedding LabelPropagation (HELP) algorithm, a graph-based semi-supervised deeplearning algorithm, for graphs that are characterized by heteroge-neous node types. Empirically, we demonstrate the e�ectivenessof this method in domain classi�cation tasks with Facebook user-domain interaction graph, and compare the performance of theproposed HELP algorithm with the state of the art algorithms. Weshow that the HELP algorithm improves the predictive performanceacross multiple tasks, together with semantically meaningful em-bedding that are discriminative for downstream classi�cation orregression tasks.

CCS CONCEPTS•Information systems →Data mining;

KEYWORDSSocial Network; Semisupervised Learning; Neural Networks; GraphEmbeddingACM Reference format:Cheng Ju, James Li, Bram Wasti, and Shengbo Guo. 2018. SemisupervisedLearning on Heterogeneous Graphs and its Applications to Facebook NewsFeed. In Proceedings of , , , 9 pages.DOI:

1 INTRODUCTION1.1 Motivation�ere are multiple factors that in�uence the ranking of a storyon a person’s News Feed. A comprehensive look of the manyfactors involved can be found in [3]. For content that containslinks to outside Web domains, one of the most important factorsis the quality of the content from this domain. �ere are di�erentdimensions under consideration for the overall quality of a domain(e.g. if its URLs always contain exaggerated headlines). For many

Permission to make digital or hard copies of part or all of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor pro�t or commercial advantage and that copies bear this notice and the full citationon the �rst page. Copyrights for third-party components of this work must be honored.For all other uses, contact the owner/author(s).,© 2018 Copyright held by the owner/author(s). . . .$15.00DOI:

of the important dimensions, we train classi�ers to predict thelikelihood a piece of content is of this dimension using contentfeatures. �ese classi�er predictions are then used in conjunctionwith other signals (e.g. timeliness, interaction history) to assess thecontent rank on a person’s News Feed.

We have following demands and expectations for the semi-supervised methods for our applications. First, as the data is largeand predictions can get stale quickly, we must pay special a�entionto training time and warm-start issues. When an unseen domain ap-pears, we need the score immediately, instead of retrain the modelon the whole data. Second, as the number of nodes is huge, if theembedding is given by a look-up table for every nodes in the graph,the computation would be a bo�leneck. �us we plan to avoidembedding nodes based on a look-up table. �ird, as we has clearclassi�cation tasks, we are looking for an end-to-end approach totake the graph information into supervised training simultaneously,instead of two-stage embedding-supervision procedures. Last butnot least, the quality labels y are usually obtained by human labelerand thus expensive, while the content features X and di�erent typeof interaction graphs (e.g. resharing graph) are easy to get. �einductive semi-supervised methods have great advantage underthis condition.

1.2 Graph-based Semi-supervised LearningGraph-based semi-supervised learning is widely used in networkanalysis, for prediction/clustering tasks over nodes and edges. Aclass of commonly used approaches can be considered as a two-stage procedure: the �rst �rst step is node embedding, where eachnode are represented in a vector which contains the graph infor-mation; the second step simply apply these vectors are further forthe conventional machine learning tasks. [24] proposed a spectralclustering method, which uses the eigenvectors of the normalizedLaplacian matrix as node embedding, and applies k-means algo-rithm on the embedding vectors for unsupervised clustering. [23]proposed another clustering method, using the eigenvectors of themodularity matrix to �nd hidden community in networks . [1]generated several handcra�ed local features (e.g. sum of neighbors)as embedding, and applied supervised learning on them to predictthe probability that two node would be connected in the future,which is more �exible compared to proximity based link-prediction[18, 20]. [30, 32] further studied the embedding methods proposedby [23, 24] for supervised learning tasks, to predict the communitylabel of the nodes in social network, which showed great success.[31] proposed a edge-centric clustering scheme, which learns a

arX

iv:1

805.

0747

9v2

[cs

.SI]

5 J

ul 2

018

Page 2: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

sparse social dimension for each node by clustering its edges. Re-cently, several deep learning based representation learning methodshave shown great success in a wide range of tasks for network data.DEEPWALK [27] learns latent representations of vertices in a net-work based on truncated random walks and the SkipGram model.Node2vec [11] further extends DEEPWALK by two additional biassearch parameters which controls the random walks, and thus con-trol the representation on homophilic and structural pa�ern. Bothof [27] and [11] are assessed by feeding the generated embeddinginto a supervised task on graph. Compared to previous embeddingmethods, these two methods are more �exible and scalable: thefeatures could be learned by parallel training with stochastic gradi-ent descent, and adding new nodes on the graph does not requirerecomputing the features for all the observations. With extra com-putational trick like negative sampling and hierarchical loss [22],the computation could be further reduced. To learn sparse features,[6] further proposed a deep learning based model for the latentrepresentation learning of mixed categories of vertex. Large-scaleinformation network embedding [29] computes the embeddingby optimizing the objective function to preserve “�rst-order” and“second-order” graph proximity.

Another class of semi-supervised methods directly use the graphinformation during supervised training, instead of the two-stageembedding-supervision procedure in the last paragraph. Labelpropagation [35] is an simple but e�ective algorithm, where thelabel information of labeled nodes are propagated on graph to un-labeled data. [33] presented a semi-supervised learning frameworkthat learns graph embedding during the training of a supervisedtask. [33] further proposed both transductive and inductive versionof their algorithm, and compared them with several widely usedsemi-supervised methods. �e neural graph machine [5] extendedidea of label propagation of regularizing on the �nal prediction toregularizing the hidden output of neural networks. Another classof algorithms build additional nuisance task to predict the graphcontext, in addition to the supervised label prediction.

Most work about semi-supervised learning on graph focusedon homogeneous networks, where there exists only singular typeof nodes and relationships. LSHM (Latent Space HeterogeneousModel) is proposed by [12], which creates a look-up table for theembedding of each node in the graph. �e model are trained by boththe supervised loss, de�ned as classi�cation loss from a logistic re-gression model on the top of the embedding, and an unsupervisedloss, de�ned as the distance between two connected nodes. [6]further proposed the Heterogeneous Networks Embedding (HNE)algorithm based on deep neural networks, which in contrast is apurely unsupervised method. It uses each pair of node as input topredict their similarity, and de�ne a hidden output as the embed-ding. It applies di�erent network structure to process nodes withdi�erent type, while keeps the networks sharing the parameterfor same type of node. Inspired by DeepWalk and Node2vec, [8]proposed a new meta-path-based random-walk strategy to buildthe sequences of nodes, and then feed them into SkipGram modelto get a unsupervised embedding for each node.

In this work, we propose a new graph-based semi-supervisedalgorithm, HELP (heterogeneous embedding label propagation). Itis an inductive algorithm that can utilize both the features and thegraph where predictions can be made on instances unobserved in

the graph seen at training time. It is also able to handle multipleheterogeneous nodes in the graph, and generate embeddings forthem. We call it “label propagation” as it also implicitly impose a“smooth constraint” based on the graph [5], which is similar to thelabel propagation algorithm [35]. We also demonstrated the e�ec-tiveness of our proposed approach with several node-classi�cationtasks on a subset of the Facebook graph consisting of users andWeb Domains, with focus in particular to identifying domains whorepeatedly show content that are sensational [2] and/or otherwiselow quality [19], or domains who repeatedly show content that areauthentic and high quality [17].

1.3 NotationsWe use the notation ui to denote the feature vector for the i-th user.We use dj to denote the feature vector for the j-th domain. We useyj to denote the label of domain dj . We use the index j = 1, · · · ,Lto denote the index of the labeled domains. We further de�ne afunction concat(·, ·), which concatenates two row vectors into one.We use XT to denote the transpose of a matrix X . We use θ todenote all the trainable model parameters for a neural network.

1.4 Related WorksIn this section, we review several inductive contextual graph-basedsemi-supervised deep learning methods, and show how they canbe applied into our domain classi�cation task. In general, graph-based semi-supervised learning methods relies on the assumptionthat connected nodes tend to have similar labels. By this assump-tion, [33] summarized that the loss function for graph-based semi-supervised learning can be decomposed into two part: the super-vised loss part (��ing constraint) and the graph-based unsupervisedregularization part (smoothness constraint). [33] systematicallysummarized most of the non-deep graph-based semi-supervisedlearning method, including Learning with local and global con-sistency [34] and Manifold regularization [4]. It then presented asemi-supervised learning framework called Planetoid (PredictingLabels And Neighbors with Embeddings Transductively Or Induc-tively from Data) that learns graph embedding during the trainingof a supervised task. Authors further proposed both the transduc-tive and inductive version of their algorithm, and compared themwith several widely used semi-supervised methods [33]. Figure 1shows the inductive version of the Planetoid with an example onour domain label prediction task, where the features are passed intoa feed-forward neural network for both predict the domain labeland the graph context. �e transductive version is similar, except ittrains a look-up table for each domain as embedding, instead of theintermediate output of a neural network (a parameterized functionof input feature vectors). In this example, the supervised loss is thelabel classi�cation loss for each domain, and the unsupervised lossis de�ned as the prediction loss for the existence of each domainin its context, where the context is de�ned for the nodes share thesame label, or the nodes appear close to each other in the randomwalk on the graph based on DEEPWALK [27].

To be more speci�c, the right-most network block in �gure 1used in [33] is a single-layer network with sigmoid activation andwc is the row for node c in the context matrix [10], which makesthe loss function for Planetoid-I to be:

Page 3: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

Domain featuresDomainEmbeddingNetwork

Domain label

Label Prediction Network

Embedding output

Domain features

Existence ofContext Nodes

Figure 1: Network architecture for Planetoid-I.

GPlanetoid−I (θ ) = Ls + Lu

Ls = − 1L

L∑i=1

logp(yi |di )

Lu = λ Ei,c,γ logσ (γwTc h(di ))

where γ is a binary indicator determines if the nodes with index c, iare similar or not; p(yi |di ) is the �nal output on top of the le� threebuilding blocks, representing the predicted probability of true labelfrom the classi�cation neural network. h represents the buildingblock at the middle bo�om, which generates the embedding for thenode by applying a parametric function on the input feature vector.λ is the hyper-parameter that controls the trade-o� for the ��ingconstraint and smoothing constraint.

�e neural graph machine [5] is a deep learning based extensionof label propagation, which imposes a non-linear smoothing con-straint by regularizing the intermediate output of a hidden layerof neural networks. In our example, the supervised loss is still thepredicting loss for the domain label, while the unsupervised smoothconstraint is the average distance between connected domains.

GNGM (θ ) = Ls + Lu

Ls = − 1L

L∑i=1

logp(yi |di )

Lu = λ1∑

i, j ∈ELLwdi ,djd(h(di ),h(dj )) +

λ2∑

i, j ∈ELUwdi ,djd(h(di ),h(dj ))

λ3∑

i, j ∈EUU

wdi ,djd(h(di ),h(dj ))

where d(·, ·) is a distance function for a pair of vectors, and [5]suggests de�ne d with l1 or l2 distance for the two input vectors.p(yi |di ) has same meaning as for Planetoid-I, and h(di ) is the nodeembedding that de�ned as the intermediate output of the second

laster layer. ELL , ELU and EUU de�nes the node pair that bothlabeled, only one labeled, and both unlabeled. λ1, λ2, λ3 are hyper-parameters control the smoothing constraint for di�erent labeltypes.

Domain features

DomainEmbeddingNetwork

Domain label

Label Prediction Network

Embedding output

Domain features

DomainEmbeddingNetwork

Domain label

Label Prediction Network

Embedding output

Weight Sharing

Weight Sharing

Graph Regularization

Figure 2: Network architecture for neural graphical ma-chines

2 THE HELP2.1 Neural Network Structure

Figure 3: �e network structure for the HELP.

Figure 3 shows the network structure of the HELP for user-domain network, where the nodes in the network are either domainor user, and the links are de�ned as the interaction between usersand domains (e.g. an user likes a domain). Inspired by the neuralgraphical machines [5], which impose a smoothing constraint onthe intermediate output of a feed forward neural network, wepropose a new network architecture with four building blocksthat can handle two di�erent type nodes. �e two building blocks,hd ,hu , at the bo�om of �gure 3 represents two feed forward neural

Page 4: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

network block, with the input as the contextual features of domainand user, and the output as the embedding for domain and user.Two “embedding” building blocks do not share any parameter, andthere is no constraint on the input/output shape.

A�er the two-tower “embedding” building blocks, we de�ne theother two building blocks. �e �rst is the label prediction blockfor domain label prediction, which we de�ned as f . It takes theembedding ed = hd (di ) of the given domain as input, and outputthe probability f (ed ) that the given domain would be labeled 1 byhuman checker. �e other is the “context” block д, which “predicts”the context of the graph. To be more speci�c, it is a block of feedforward neural network that computes the distance д(eu , eu ) ofbetween the user and the domain, given the embedding of both ofthem from the embedding blocks.

During the training stage, the inputs are the pairs of the user-domain. Inspired by [5], our proposed objective function functioncan be also decomposed into a neural network cost (supervised)and the label propagation cost (unsupervised) as follows:

GHELP (θ ) =L∑j=1

Ls (f (hd (dj ));θ ) +

λ∑i, j

Lu (wui ,dj ,hd (di ),hu (ui ))

�e �rst part, the supervised loss, is the cross-entropy for thebinary label of domains:

Ls (f (hd (dj )) = yj log(f (hd (dj )) + yj log(1 − f (hd (dj ))

�e second part, the graph regularization loss, is de�ned as:

Lu (wui ,dj ,hd (di ),hu (ui )) = wui ,dj · d2ui ,dj

+(1 −wui ,dj ) ·max(0,m − dui ,dj )2

where dui ,dj =√

1 − д(concat(hd (di ),hu (ui ))), andm is a tunable,�xed margin parameter. Having a margin indicates that uncon-nected pairs that have the distance beyond this margin will notcontribute to the loss. �is loss is used in Siamese network, todistinguish a given pair of images [15]. Instead of using L2 distanceof the output of an embedding network/feature extractor, we usea separate neural network block to generate “similarity score” foreach pair, and use one minus such score as the distance metric.

In our experiment, the input contextual features are numerical,thus we only consider the fully-connected neural networks. Wecan easily extend it with image features using convolutional neuralnetworks, and text features using recurrent neural networks. f is a2-layer fully connected neural network with output shape (16, 1);hd and hu are both 3-layer fully connected neural networks withoutput shape (96, 64, 32), without parameter-sharing; д is a 2-layerfully connected neural network with output shape (16, 1).

During the training phase, in each epoch, all the labeled do-main are passed, and user-domain pairs are sub-sampled due tothe huge number of pairs. In each iteration within the epoch, thetotal loss is computed, and the gradient based on the total loss isback-propagated to the whole network, including f , д, hu , and hd ,

simultaneously. During the domain classi�cation/predicting stage,it requires no extra re-training, and only the domain feature is used.

Notice here the network structure is designed for user-domainbipartite graph. It can be adapted to multiple type of nodes, withmultiple smoothing constraints for more than one edge type.

3 EXPERIMENTS3.1 Labels of Domains�e labels used in the experiments are generated manually ac-cording to some internal guideline. We consider three di�erent“dimensions”: each dimension stands for a certain type of qualityevaluation. Table 1 shows the summary statistics of each label.

Table 1: Summary Statistics for Labeled Domains

Label Type Total Size # of Positivedimension#1 5498 1094dimension#2 6399 748dimension#3 1781 477

3.2 MetricIn the experiments, we considered a binary classi�cation problem,thus following metrics are considered. �e �rst metric is the areaunder Receiver Operating Characteristic curve (AUROC). �e curveis plo�ed with the true positive rate (TPR) against the false positiverate (FPR) at various threshold se�ings. �e AUROC is de�ned asthe area below the ROC curve. It can be explained as the expec-tation that a uniformly drawn random positive is ranked before auniformly drawn random negative.

�e second metric is the area under the Precision-Recall curve(AUPRC). �e curve is plo�ed with the precision (true positivesover the sum of true positives and false positives) against the recall(true positives over the sum of true positives and false negatives)at various threshold se�ings. In practice, we are more in favorof AUPRC in comparison to AUPRC due to the following reasons.First, the classes for all the three label types are imbalanced. Ithas been shown that in the imbalanced data set, PR curve is moreinformative [28]. To be more speci�c, as there are much morenegative samples than positive ones, the true negative exampleswill overwhelm the comparison in ROC, while will not in�uencePRC. �e second reason is we mainly focus on �nding the positive(the domains labeled as 1). �e AUPRC mainly re�ect the qualityof retrieval of the positives and its value is not invariant when wechange the baseline (which category should be labeled as 1), whichis di�erent from AUROC.

3.3 FeaturesFor domains, we collected 29 content features, which include mul-tiple summary statistics (e.g. number of likes), and some rankingscore generated from other model. For users, we collected 129background features, most of which are user activity statistics inthe past. We do not disclose the details of features as it does notin�uence understanding the proposed algorithm and the followingexperiments.

Page 5: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

We sub-sampled 2.4 million English-speaking users at Facebookfor this o�ine experiment, with the domains that have at least oneinteraction with the sampled users in last 7 days. �e bipartitegraph contains 14.46 Million user-domain edges.

Table 2: Sample size for user, domain, and their interactions(edges).

type sizeDomain 241, 205

User 2, 433, 581Edge 14, 460, 336

3.4 �e User-Domain Graph

Figure 4: An illustration of user-domain interaction graph.

Figure 4 visualize a user-domain graph. Each edge is consideredas undirected, containing two information: the interaction type,and the count of such interaction in last 7 days. In this study, weonly focus on the Resharing as the interaction type. �us the weightof each edge represents the number of reshares for the given userfor the URLs from the given domain.

�e experimental data is generated on 10/27/2017, which meansthe graph is based on the user-domain interaction statistics from10/20/2017 to 10/27/2017.

4 BENCHMARKSWe consider following algorithms as benchmarks for HELP:

• Label Propagation algorithm (LP) by [35], which only usethe graph information. It is not surprising to see it hasmuch worse performance compared other methods use themore informative contextual features. We report this onlyto demonstrate much information contains in the graph.

• Multi-layer Perceptron (MLP), which is a fully connectedfeed-forward neural network using only the feature infor-mation.

• Planetoid-I (Predicting Labels And Neighbors with Embed-dings Transductively Or Inductively from Data, InductiveVersion) by [33], with domain-domain graph compressedfrom user-domain graph.

• Neural Graph Machine (NGM) by [5], with domain-domaingraph compressed from user-domain graph.

As we don’t have explicit domain-domain graph, we construct itby compressing the user-domain graph. we construct the domain-domain graph by:

(1) For each domain di and domain dj , �nd the set of users Uhave edges for both domains.

(2) For each user uk ∈ U , de�ne the similarity of two domainsbased on the similarity between user domains: simdi ,dj

k =

min(euk ,di , euk ,dj ).(3) Finally de�ne the edge between di ,dj as the sum of the

similarities computed from all users:

edi ,dj =∑uk ∈U

simdi ,djk .

�ere are multiple way to compress the user-domain graph todomain-domain graph. We have experimented multiple strategies,but does not show signi�cant di�erence. As this is not the mainfocus of this study, we only choose the most straightforward one.

4.1 OptimizationAll the neural network models are trained by Adam optimizer [14],with initial learning rate 0.001, and decayed with ratio 0.1 for every20 epochs. We set the weight decay as 10−5. We train each model 60epochs. We train each network 10 times and report the average ofeach performance metric as this can stabilize the results by reducingthe impact of randomness in initialization and training [13].

We also experimented warm-start reported in [33]. However,this does not improve the performance. So the supervised andunsupervised part are trained simultaneously.

5 CLASSIFICATION PERFORMANCE5.1 Experiment Results�ough two metric are reported, we mainly focus on the AUPRC,as we mainly want to improve the quality of retrieval for positivesamples. See detailed discuss ion section 3.2.

Table 3: �epredictive performance on testing set for dimen-sion#1 domain label. All the values are in 10−2 scale.

Model AUROC AUPRCLP 85.7 71.0

MLP 95.1 83.3PLANETOID-I 95.1 83.8

NGM L1 95.3 83.5NGM L2 95.1 82.9

HELP 95.2 84.2

Table 3 shows the predictive performance when predicting if adomain should be labeled as a dimension#1 domain. �e AUCROCdoes not have noticeable di�erence for all deep learning based algo-rithms. For AUPRC, Planetoid-I and NGM with L1 regularizationslightly improved the performance, and HELP achieved the bestperformance.

Table 4 shows the predictive performance when predicting if adomain should be labeled as a dimension#2 domain. Similar to pre-vious experiment, the AUCROC does not have noticeable di�erence,

Page 6: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

Table 4: �epredictive performance on testing set for dimen-sion#2 domain label. All the values are in 10−2 scale.

Model AUROC AUPRCLP 87.1 67.7

MLP 95.6 81.6PLANETOID-I 95.6 81.9

NGM L1 95.6 80.9NGM L2 95.7 81.5

HELP 96.3 82.9

which may due to the severe imbalance of the positive/negative sam-ples. For AUPRC, the HELP signi�cantly improved the benchmarkMLP by 1.3% absolute increment. �e Planetoid-I have small im-provement compared to MLP, while other semi-supervised methoddoes not show any noticeable improvement.

Table 5: �epredictive performance on testing set for dimen-sion#3 domain label. All the values are in 10−2 scale.

Model AUROC AUPRCLP 71.9 50.1

MLP 82.2 58.1PLANETOID-I 82.2 60.2

NGM L1 82.6 63.3NGM L2 82.2 62.9

HELP 82.6 64.9

Table 5 shows the predictive performance when predicting ifa domain should be labeled as a dimension#3 domain. Di�erentfrom previous two labels, all the semi-supervised learning methodssigni�cantly improve the AUPRC, with at least 2% absolute improve-ment. One of the most convincing reason is the dimension#3 datais much smaller than dimension#1/dimension#2 dataset, which isusually considered as the case that in favor of the semi-supervisedmethod than purely supervised methods. �e HELP model achievedbest performance for both AUROC (0.4% absolute improvement)and AUPRC (6.8% absolute improvement).

5.2 Comparison of Unsupervised Graph-basedLoss

�ere are many loss functions can be applied for “context prediction”in the graph-based neural networks. In this section, we investigatedthe performance for di�erent several variations of the HELP withdi�erent semi-supervised loss function.

5.2.1 Weighted Graph. �en we �rst consider commonly usedsupervised loss functions for edge prediction as the graph regular-ization.

A�er generates the embedding for an user eu and a domain ed ,we concatenate two embedding into one:

econcat = concat(eu , ed )

and directly feed it into a feed-forward neural network д to predictthe edge for this user-domain pair:

wu,d = д(econcat)

In this se�ing, the label is the weight of the edge (i.e. numberof reshares in the past week). We considered the following lossfunctions:

• L1 (least absolute deviations regression):

L(w, w) = | |w − w | |1• L2 (least squares regression):

L(w, w) = | |w − w | |22• SmoothL1: L1 loss is not strongly convex thus the solution

is less stable compared to L2 loss, while L2 loss is sensitivefor the outliers and vulnerable to exploding gradients[9,16]. SmoothL1 loss, also known as the Huber loss, is acombination of L1 and L2 loss which enjoys the advantagesfrom both of them [9]. It is implemented in PyTorch [25]:

L(w, w) ={

0.5(w − w)2, | |w − w | |1 < 1| |w − w | |1, | |w − w | |1 >= 1

5.2.2 Unweighted Graph. We also considered the unweightedgraph. �e only di�erence from the weighted graph in 5.2.1 isthat, instead of using the weight of the link, we dichotomized theweighted edge into a unweighted binary link. For instance, wecan de�ne there is a link between user ui and domain dj , if theuser reshared some link from domain dj more than twice in thelast week. In this manner, we set the target wui ,dj to be a binaryvariable, and the output from the neural network wui ,dj is boundedin [0, 1], which can be interpreted as the probability of the existenceof a link within this user-domain pair. As the target in this se�ingis binary, we considered the following loss functions:

• CrossEntropy: this is one of the most common loss func-tions used in classi�cation:

L(wui ,dj , wui ,dj ) = (1−wui ,dj ) log(1− ®wui ,dj )+wui ,dj log(wui ,dj )

We also consider the embedding-distance based loss functions.�ese functions does not inputing the embedding into a new blockof neural network. Instead, it only relies on the distance betweenthe user and the domain embedding eu , ed , and binary indicatorof the existence of the edge wu,d .

• Contrastive Loss: this loss decreases the energy of likepairs and increase the energy of unlike pairs [7, 15]. Herewe de�ne the energy as one minus the output of the graphregularization building block. Recall that the output ofthe graph regularization building block represents the pre-dicted existence of the edge between the given user-domainpair. We simply set the marginm to be 0.2.

dist = | |eui − edj | |2L(wui ,dj , eui , edj ) = w · dist2 + (1 −w)[max(0,m − dist)]2

Page 7: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

• CosineEmbed: we consider the cosine embedding loss im-plemented in PyTorch [25]:

L(wui ,dj , eui , edj ) ={

1 − cos(eui , edj ), wui ,dj = 1cos(eui , edj ) wui ,dj = 0

• L1Embed: we also consider the L1 and L2 distance metricused in neural graphical machines [5]:

L(wui ,dj , eui , edj ) = wi | |eui − edj | |1• L2Embed:

L(wui ,dj , eui , edj ) = wi | |eui − edj | |22

Table 6: �e predictive performance forHELPwith di�erentunsupervised loss on testing set for dimension#2 domain la-bel. All the values are in 10−2 scale.

Loss AUROC AUPRCContrastive 96.3 82.9CosineEmbed 95.6 82.1

L1Embed 95.2 81.6L2Embed 95.3 81.4

L1 96.0 82.7L2 95.8 82.1

SmoothL1 95.9 82.5CrossEntropy 96.1 82.8

MLP 95.6 81.6Table 7: �e performance for di�erent loss function whenconsidering dimension#2 label.

Table 6 shows the performance of the HELP model with di�erentunsupervised loss. Among all the loss choices, the HELP withcontrastive loss achieves both the best performance for AUROCand AUPRC. �e other three embedding based loss, CosineEmbed,L1Embed and L2Embed, achieves worse performance. �is maybe explained by the �exible distance evaluation. For contrastiveloss we used here, we generate the distance from a feed forwardneural network with the embedding from both user and domain asinput, instead of a �xed commonly used distance metric like cosinedistance. �is makes the distance selection more �exible.

In addition, we observe the L1Embed and L2Embed is noticeablyworse than CosineEmbed and Contrastive, and they does not showany improvement compared to simple MLP. �is might due tothe L1/L2 losses only “pull” the connected pair closer, while bothCosineEmbed and Contrastive loss not only “pull” the connectedpair closer, but also “push” the unconnected pair farther away, andtherefore improves the learning of the embedding.

For the classi�cation based loss (L1, L2, SmoothL1, and CrossEn-tropy), we observed all of them has improvement compared tothe benchmark MLP. �e L2 loss has slightly worse performancecompared th L1 and SmoothL1, a combination of L1 and L2 loss.�is might due to some extreme weight in the edge, which make

too strong impact when training the network. Furthermore, whenedges are treated unweighted by thresholding weighted edge, theperformance is slightly improved. Similar to previous explanation,we believe such discretization improve the performance by avoidthe outliers in the edge weights. A potential solution of it would betruncate the loss for unweighted edge, and we leave it for futurework.

6 UNSUPERVISED LEARNINGAs discussed above, we do not have explicit label for each user.However, we de�ne some ad-hoc labels for each user to assess thee�ectiveness of the user embedding, a side-produce in the HELPmodel.

6.1 Visualization of EmbeddingWe visualize the embedding for users, which is the side-product ofthe HELP model.

To avoid information leakage/over-�tting during the train-ing, we generate the graph with the interactions 1 week af-ter the training data for visualization. In other word thegraph is generated by the interactions between user and do-main from 10/27/2017 to 11/03/2017. In addition, the userfeatures/domain labels in our visualization are also collectedone week a�er the collecting date of the experiment data.

We investigate and visualize the users that might be “vulnerable”to dimension#2 domains, which we de�ned as the active users withfrequent interaction with some dimension#2 domains. To be morespeci�c:

• For each type of interaction (e.g. clicking the link), we �rstselect the users that have more than 5 such interactionsduring the whole evaluating week as active users.

• Among such users, if the user is more than 5 such inter-action with domains that labeled as dimension#2 domainin one week, we de�ne this user as a vulnerable (positive)user.

• In visualization, we use the red (positive) nodes to representthe vulnerable users, while using blue (negative) nodes forthe remaining active users.

• As there are much less positive samples, we down sam-pled the negative samples to relative same size as positivesamples.

In this section, we studied the �ve di�erent interaction types,including:

• Click: clicking of the link.• Reshare: resharing the link.• Wow: Clicking the Wow bu�on for the link.• Angry: Clicking the Angry bu�on for the link.

We compared the user embedding generated from the HELP,and the raw features. We use t-SNE to reduce the dimension to 2,while maintaining the Euclidean distance between nodes for bothraw features [21] and the generated embedding from the HELP. Wesimply used the t-SNE function with default parameter in sklearn[26]. �en we plot each node on 2-D space, with color represents ifthe node is a vulnerable use or not.

Page 8: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

Figure 5: Click. �e le� �gure is for the embedding from theHELP; the right �gure is for the raw features.

Figure 6: Reshare. �e le� �gure is for the embedding fromthe HELP; the right �gure is for the raw features.

Figure 5 and 6 shows the visualization comparison for Click andReshare. For both Click and Reshare, we can observe a passablepa�ern for the separation of blue/red nodes even for the raw fea-tures. �ough most of the blue nodes are on the one side, there arestill many regions that blue and red nodes are mixed. However, theembedding from the HELP further pulled the users of di�erent typefurther away. We can observe very clear separation boundary fortwo type of users.

Figure 7: Wow. �e le� �gure is for the embedding from theHELP; the right �gure is for the raw features.

Figure 8: Angry. �e le� �gure is for the embedding fromthe HELP; the right �gure is for the raw features.

Figure 7 and 8 shows the visualization comparison for Wow andAngry. For these interaction types, the raw features did a bad job

in separating two di�erent type of users. However, the embeddingfrom the HELP still achieves satisfactory performance in separatingtwo type of users.

In conclusion, the HELP generates embedding for users as aside-product. Our visualization results suggest such user-levelembedding can help other tasks, like user-level clustering.

7 DISCUSSIONIn this work, we propose HELP, a graph-based semi-superviseddeep learning method for graphs with heterogeneous type of nodes.We demonstrate its performance with several domain classi�cationtasks for News Feed in Facebook. One potential future directionis multi-tasks prediction to predict di�erent type of label simul-taneously: we can extend the network architecture by stacking amultiple-output prediction layer on the second last layer, which out-put a vector of probability for multiple label dimensions. �is canbe done by extending the supervised loss with the multi-label loss.It has following bene�ts: �rst the model size can be compressedas we only need to train one model for multi-labels. Second, theembedding generated in this network contains information for dif-ferent label type, thus is more informative and can be potentiallyused as a general “integrity reputation embedding” for a domain.

Another interesting direction is allowing di�erent types of edgesbetween nodes. In our experiments, we only consider the “resharinginteraction” edges. Di�erent type of edge can be included to furtherimprove the performance of the semi-supervised approach. Inaddition, we may use weighted combination of multiple interactiontypes as the weight in graph.

We directly concatenated two embedding and then feed it intoa building block to estimate the similarity for each pair. Insteadof concatenating, several di�erent approaches can be applied tocombine the embedding of the domain-user pair, which may fur-ther improve the performance of the HELP. For example we mayconsider the element-wise product/di�erence of two embeddingvectors.

�ere are also several minor changes may further improve theperformance of the HELP. We set margin m = 0.2 in an ad-hocmanner for the contrastive loss, which can be further investigated.We can also extend the EmbedL1/EmbedL2 loss by imitating thecontrastive loss that including penalization for the unconnectedpair with small distance. Due to the limited space, we leave this asour future work.

8 ACKNOWLEDGEMENTSAuthors sincerely appreciate the Facebook News Feed team for thehelp during the project and the insightful feedback.

Page 9: Semisupervised Learning on Heterogeneous Graphs and its … · 2018-07-06 · „ere are multiple factors that in…uence the ranking of a story on a person’s News Feed. A comprehensive

, ,

REFERENCES[1] Mohammad Al Hasan, Vineet Chaoji, Saeed Salem, and Mohammed Zaki. 2006.

Link prediction using supervised learning. In SDM06: workshop on link analysis,counter-terrorism and security.

[2] A. Babu, Liu A., and J Zhang. 2017. News Feed FYI: New Updatesto Reduce Clickbait Headlines. h�ps://newsroom.�.com/news/2017/05/news-feed-fyi-new-updates-to-reduce-clickbait-headlines/. (2017).

[3] Lars Backstrom. 2016. Serving a Billion Personalized News Feeds. In Proceedingsof the Ninth ACM International Conference on Web Search and Data Mining, SanFrancisco, CA, USA, February 22-25, 2016. 469. DOI:h�p://dx.doi.org/10.1145/2835776.2835848

[4] Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. 2006. Manifold regulariza-tion: A geometric framework for learning from labeled and unlabeled examples.Journal of machine learning research 7, Nov (2006), 2399–2434.

[5] �ang D Bui, Sujith Ravi, and Vivek Ramavajjala. 2017. Neural Graph Machines:Learning Neural Networks Using Graphs. arXiv preprint arXiv:1703.04818 (2017).

[6] Shiyu Chang, Wei Han, Jiliang Tang, Guo-Jun Qi, Charu C Aggarwal, and�omas S Huang. 2015. Heterogeneous network embedding via deep archi-tectures. In Proceedings of the 21th ACM SIGKDD International Conference onKnowledge Discovery and Data Mining. ACM, 119–128.

[7] Sumit Chopra, Raia Hadsell, and Yann LeCun. 2005. Learning a similarity metricdiscriminatively, with application to face veri�cation. In Computer Vision andPa�ern Recognition, 2005. CVPR 2005. IEEE Computer Society Conference on, Vol. 1.IEEE, 539–546.

[8] Yuxiao Dong, Nitesh V Chawla, and Ananthram Swami. 2017. metapath2vec:Scalable representation learning for heterogeneous networks. In Proceedings ofthe 23rd ACM SIGKDD International Conference on Knowledge Discovery and DataMining. ACM, 135–144.

[9] Ross Girshick. 2015. Fast r-cnn. In Proceedings of the IEEE international conferenceon computer vision. 1440–1448.

[10] Yoav Goldberg and Omer Levy. 2014. word2vec Explained: deriving Mikolov etal.’s negative-sampling word-embedding method. arXiv preprint arXiv:1402.3722(2014).

[11] Aditya Grover and Jure Leskovec. 2016. node2vec: Scalable feature learning fornetworks. In Proceedings of the 22nd ACM SIGKDD international conference onKnowledge discovery and data mining. ACM, 855–864.

[12] Yann Jacob, Ludovic Denoyer, and Patrick Gallinari. 2014. Learning latentrepresentations of nodes for classifying in heterogeneous social networks. InProceedings of the 7th ACM international conference on Web search and datamining. ACM, 373–382.

[13] Cheng Ju, Aurelien Bibaut, and Mark J van der Laan. 2017. �e Relative Per-formance of Ensemble Methods with Deep Convolutional Neural Networks forImage Classi�cation. arXiv preprint arXiv:1704.01664 (2017).

[14] Diederik Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimiza-tion. arXiv preprint arXiv:1412.6980 (2014).

[15] Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. 2015. Siamese neuralnetworks for one-shot image recognition. In ICML Deep Learning Workshop,Vol. 2.

[16] Roger Koenker and Kevin F Hallock. 2001. �antile regression. Journal ofeconomic perspectives 15, 4 (2001), 143–156.

[17] A. Lada, J. Li, and S. Ding. 2017. News Feed FYI: New Signals to Show YouMore Authentic and Timely Stories. h�ps://newsroom.�.com/news/2017/01/news-feed-fyi-new-signals-to-show-you-more-authentic-and-timely-stories/.(2017).

[18] David Liben-Nowell and Jon Kleinberg. 2007. �e link-prediction problem forsocial networks. Journal of the American society for information science andtechnology 58, 7 (2007), 1019–1031.

[19] J. Lin and Guo S. 2017. News Feed FYI: Reducing Links to Low-�ality Web Page Experiences. h�ps://newsroom.�.com/news/2017/05/reducing-links-to-low-quality-web-page-experiences/. (2017).

[20] Linyuan Lu and Tao Zhou. 2011. Link prediction in complex networks: A survey.Physica A: Statistical Mechanics and its Applications 390, 6 (2011), 1150–1170.

[21] Laurens van der Maaten and Geo�rey Hinton. 2008. Visualizing data using t-SNE.Journal of Machine Learning Research 9, Nov (2008), 2579–2605.

[22] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Je� Dean. 2013.Distributed representations of words and phrases and their compositionality. InAdvances in neural information processing systems. 3111–3119.

[23] Mark EJ Newman. 2006. Finding community structure in networks using theeigenvectors of matrices. Physical review E 74, 3 (2006), 036104.

[24] Andrew Y Ng, Michael I Jordan, Yair Weiss, and others. 2002. On spectralclustering: Analysis and an algorithm. Advances in neural information processingsystems 2 (2002), 849–856.

[25] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang,Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer.2017. Automatic di�erentiation in PyTorch. (2017).

[26] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. �irion, O. Grisel, M.Blondel, P. Pre�enhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cour-napeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: MachineLearning in Python. Journal of Machine Learning Research 12 (2011), 2825–2830.

[27] Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. 2014. Deepwalk: Online learn-ing of social representations. In Proceedings of the 20th ACM SIGKDD internationalconference on Knowledge discovery and data mining. ACM, 701–710.

[28] Takaya Saito and Marc Rehmsmeier. 2015. �e precision-recall plot is moreinformative than the ROC plot when evaluating binary classi�ers on imbalanceddatasets. PloS one 10, 3 (2015), e0118432.

[29] Jian Tang, Meng �, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei.2015. Line: Large-scale information network embedding. In Proceedings of the24th International Conference on World Wide Web. International World Wide WebConferences Steering Commi�ee, 1067–1077.

[30] Lei Tang and Huan Liu. 2009. Relational learning via latent social dimensions.In Proceedings of the 15th ACM SIGKDD international conference on Knowledgediscovery and data mining. ACM, 817–826.

[31] Lei Tang and Huan Liu. 2009. Scalable learning of collective behavior based onsparse social dimensions. In Proceedings of the 18th ACM conference on Informationand knowledge management. ACM, 1107–1116.

[32] Lei Tang and Huan Liu. 2011. Leveraging social media networks for classi�cation.Data Mining and Knowledge Discovery 23, 3 (2011), 447–478.

[33] Zhilin Yang, William Cohen, and Ruslan Salakhudinov. 2016. Revisiting Semi-Supervised Learning with Graph Embeddings. In International Conference onMachine Learning. 40–48.

[34] Denny Zhou, Olivier Bousquet, �omas N Lal, Jason Weston, and BernhardScholkopf. 2004. Learning with local and global consistency. In Advances inneural information processing systems. 321–328.

[35] Xiaojin Zhu and Zoubin Ghahramani. 2002. Learning from labeled and unlabeleddata with label propagation. (2002).