Social Tie Analysis

发布时间:2024年3月28日

Introduction

Interpersonal ties are responsible for the structure of social networks and the transmission of information through these networks. Different types of social ties have essentially different influence on people. Awareness of the types of social ties can benefit many applications such as recommendation and community detection. For example, our close friends tend to move in the same circles that we do, while our classmates may be distributed into different communities. Though a bulk of research has focused on inferring particular types of relationships in a specific social network, few publications systematically study the generalization of the problem of inferring social ties over multiple heterogeneous networks.

In this work, we develop a framework for classifying the type of social relationships by learning across heterogeneous networks. The framework incorporates social theories into a factor graph model, which effectively improves the accuracy of inferring the type of social relationships in a target network, by borrowing knowledge from a different source network. Our empirical study on six different networks validates the effectiveness of the proposed framework. For example, by leveraging information from a coauthor network with labeled advisor-advisee relationships, the proposed framework is able to obtain an F1-score of 90% (8-28% improvements over alternative methods) for inferring manager-subordinate relationships in an enterprise email network. The proposed model is efficient. It takes only a few minutes to train the proposed transfer model on large networks containing tens of thousands of nodes.

OR Bibtex

@article{Tang:16TOIS,

   author = {Jie Tang and Tiancheng Lou and Jon Kleinberg and Sen Wu},

    title = {Transfer Link Prediction across Heterogeneous Social Networks},

    year = {2016},

    volume = {34},

    number = {2},

    pages = {Article No. 7},

    journal = {TOIS},

}

@INPROCEEDINGS{Tang:12WSDM,

   author = {Jie Tang and Tiancheng Lou and Jon Kleinberg},

    title = {Inferring Social Ties across Heterogeneous Networks},

    booktitle = {WSDM'12},

    year = {2012},

    pages = {743--752},

}

Motivation

Following figure gives an example of inferring social ties across a product reviewers' network and a mobile communication network. The top sub-figure is the input to our problem: a reviewer network, which consists of reviewers and relationships between reviewers; and a mobile network, which is comprised of mobile users and their communication information (calling or texting message). The bottom sub-figure shows the output of our problem: the inferred social ties in the two networks. In the reviewer network, we infer the trust/distrust relationships and in the communication network, we identify friendships, colleagues, and families. The middle subfigure is the component of knowledge transfer for inferring social ties in different networks. This is the key objective of this work. The fundamental challenge is how to bridge the available knowledge from different networks to help infer the different types of social relationships.

Data sets

[Download]

We try to find a number of different types of networks to investigate the problem of inferring social ties across heterogeneous networks. In this study, we consider six different networks: Epinions, Slashdot, MobileU, MobileD, Coauthor, and Enron.

Epinions [download] is a network of product reviewers. Each user on the site can post a review for any product and other users would rate the review with trust or distrust. In this data, we created a network of reviewers connected with trust and distrust relationships. The data set consists of 131,828 users and 841,372 relationships, of which about 85.0\% are trust relationships. 80,668 users received at least one trust or distrust relationships. Our goal on this data set is to infer the trust relationships between users.

Slashdot [download] is a network of friends. Slashdot is a site for sharing  technology related news. In 2002, Slashdot introduced the Slashdot Zoo which allows users to tag each other as ``friends'' (like) or ``foes'' (dislike). The data set is comprised of 77,357 users and 516,575 relationships of which 76.7\% are ``friend'' relationships. Our goal on this data set is to infer the ``friend'' relationships between users.

MobileU [download] is a network of mobile users. It consists of the logs of calls, blue-tooth scanning data and cell tower IDs of 107 users during about ten months. If two users communicated (by making a call and sending a text message) with each other or co-occurred in the same place, we create a relationship between them. In total, the data contains 5,436 relationships. Our goal is to infer whether two users have a friend relationship. For evaluation, all users are required to

complete an online survey, in which 157 pairs of users are labeled as friends.% of each other.

MobileD [download] is a relatively larger mobile network of enterprise, where nodes are employees in a company and relationships are formed by calls and short messages sent between each other during a few months. In this mobile network, each user is labeled with her/his position (such as manager or ordinary employee) in the company. In total, there are 232 users (50 managers and 182 ordinary employees) and 3,567 relationships (including calling and texting messages) between the users. The objective here is to infer manager-subordinate relationships between users based on their mobile usage patterns.

Coauthor [download] is a network of authors. The data set, crawled from Arnetminer.org,  is comprised of 815,946 authors and 2,792,833 coauthor relationships. In this data set, we attempt to infer  advisor-advisee relationships between coauthors. For evaluation, we created a smaller ground truth data using the following method: (1) collecting the advisor-advisee information from the Mathematics Genealogy project and the AI Genealogy project; (2) manually crawling the advisor-advisee information from researchers' homepages. Finally, we have created a data set with 1,534 coauthor relationships, of which 514 are advisor-advisee relationships.

Enron [download] is an email communication network. It consists of 136,329 emails between 151 Enron employees. Two types of relationships, i.e., manager-subordinate and colleague, were annotated between these employees. Our goal on this data set is to infer manager-subordinate relationships between users. There are in total 3,572 relationships, of which 133 are manager-subordinate relationships.

Please note that for the first three data sets (i.e., Epinions, Slashdot, and MobileU), our goal is to infer undirected relationships (friendships or trustful elationships); while for the other three data sets (i.e., Coauthor, Enron, and MobileD), our goal is to infer directed relationships (the source end has a higher social status than the target end, e.g., advisor-advisee relationships and manager-subordinate relationships).

**Data Format**

Each file consists of three components: node-based features, edge-based features and triad-based features.

* Component 1: node-based features (starting with the label +1 (labeled instance to the model), ?1 (unknown positive to the model), ?0 (unknown negative to the model)

+1 SlashdotCommonNeighbor_49:1 SlashdotDirected_A_OUT_177:1 SlashdotDirected_B_OUT_201:1 SlashdotDirected_A_IN_573:1 SlashdotDirected_B_IN_309:1 SlashdotDEBREE_A_666:1 SlashdotDEBREE_B_478:1

?1 SlashdotCommonNeighbor_96:1 SlashdotDirected_A_OUT_177:1 SlashdotDirected_B_OUT_401:1 SlashdotDirected_A_IN_573:1 SlashdotDirected_B_IN_239:1 SlashdotDEBREE_A_666:1 SlashdotDEBREE_B_428:1

?0 SlashdotCommonNeighbor_53:1 SlashdotDirected_A_OUT_177:1 SlashdotDirected_B_OUT_1:1 SlashdotDirected_A_IN_573:1 SlashdotDirected_B_IN_987:1 SlashdotDEBREE_A_666:1 SlashdotDEBREE_B_988:1


* Component 2: edge-based features (node 27 to 86. Here 27 and 86 are line numbers)

#edge 27 86 structure_hole_2

#edge 27 142 structure_hole_1


* Component 3: triad-based features (triad formed by nodes (263, 270, 296)

#triangle 263 270 296 0

#triangle 263 273 300 0


Models

We propose a transfer-based factor graph (TranFG) model for learning and predicting the type of social relationships across networks.

We evaluate the inferring accuracy of the proposed approach and the comparison methods. We compare the performance of the four methods for inferring friendships (or trustful relationships) on four pairs of networks: Epinions (S) to Slashdot (T), Slashdot (S) to Epinions (T), Epinions (S) to MobileU (T), and Slashdot (S) to MobileU (T). In all experiments, we use 40% of the labeled data in the target network for training and the rest for test. For transfer, we
consider the labeled information in the source network. Our approach shows better performance than the three alternative methods.

We conducted sign tests for each result, which shows that all the improvements of our approach TranFG over the three methods are statistically significant (p << 0.01; t-test).

Code

[download] [readme.txt]

Welcome to use the code under the terms of the license for research or non commercial purposes, however please acknowledge its use with a citation:

@INPROCEEDINGS{Tang:15TOIS,

   author = {Jie Tang and Tiancheng Lou and Jon Kleinberg and Sen Wu},

    title = {Transfer Link Prediction across Heterogeneous Social Networks},

    booktitle = {TOIS},

}

@INPROCEEDINGS{Tang:12WSDM,

   author = {Jie Tang and Tiancheng Lou and Jon Kleinberg},

    title = {Inferring Social Ties across Heterogeneous Networks},

    booktitle = {WSDM'12},

    year = {2012},

    pages = {743--752},

}

1. implementation


Triad Factor Graph Model

by Tiancheng Lou, Tsinghua University


Usage: mpiexec -n NUM_PROCS OpenCRF [options]

Options:

task: -est


-niter int : number of iterations

-nbpiter int : number of iterations in belif propgation

-srcmodel string : (for -estc) the model to load

-dstmodel string : model file to save

-method string : methods (lbfgs/gradient), default: gradient

-gradientstep double : learning rate

-hasvalue : [default] attributes with values (format: attr:val)

-novalue : attributes without values (format: attr)

-trainfile string : train file

-testfile string : test file



2. data preparation

First n line describes n variable nodes and their attribute factors in the factor graph mode.

A line starts with character '?' or '+', where '?' indicates the label of this node is UNKNOWN, while '+' implies a known label. The following character is the label of this node. Note that even if we assume the label is unknown for the model, you can still give the label here, if it is actually available. The model will ignore the label of '?' sample during the training process, but it can be used in the evaluation. Separated by space, the rest tokens in a line are organized as "[feature name]:[feature value]", depicting the attrubutes of the node. The feature value can be a real number, and the feature name should be a string without space.

-----------

example:

+1 feature_cnt_ratio_1:1 paper_cover_ratio_11:1 coauthor_paper_cnt_6:1 conference_cover_ratio_11:1

**This line depicts a node with a known label '1'. Four features are given: "feature_cnt_ratio_1", "paper_cover_ratio_11", "coauthor_paper_cnt_6" and "conference_cover_ratio_11". The values of all these four features are 1, while the other features appearing in other lines but not this line, has the value 0.

-----------

The following m lines establish the factors between nodes. The factors can only be established in two nodes. A line started by "#edge", followed by two positive integers i and j, indicates a factor between node i and node j. (Node described in the i-th line of this file is node i) At the end of this line is a string, indicating the name of this factor. Factors with the same name share the same form of function g(yi, yj).

-----------

example:

#edge 143 4289 same-advisor

**Nodes in the 143-rd line and the 4289-th line are correlated with a "same-advisor" factor.

-----------


For transfer learning across different networks, please list all networks using the above format into one file. To clarify, for features you want to transfer across different networks, please use the same feature prefix(e.g., feature_cnt_ratio_1) as well as edge and triad features. Otherwise please use different feature prefix.


3. output

The accuracy, precision, recall, and F1-score are calculated in each iteration, over both the sets of All nodes and Unlabeled nodes. Note that the result is only valid for binary classification. OpenCRF will take the label of the first line as "positive" label.

"pred.txt" gives the prediction result of all the nodes (including known nodes). The result is presented by the label id. 0 represents the first kind of label detected in the train file, 1 represents the second kind of label encountered in the file, 2 for the third kind of label, etc.

"marginal.txt" gives the marginal probability of each label for every node. Each line, the marginal probability is presented in the order of label id (p(y=label0), p(y=labe1), p(y=label2)....)



The is beta version code also used in paper Confluence: Conformity Influence in Large Social Networks (Tang-Wu-Sun, KDD'13), may has some problems.


Feel free to contact me if you have any questions:


Sen Wu: ronaldosen@gmail.com