Traditional Methods for ML on Graphs
是根据同济子豪兄学长的中文讲解做的笔记哦,感兴趣的话可以直接去b站观看详细视频:
传送带:
https://github.com/TommyZihao/zihao_course/blob/main/CS224W/1-Intro.md
Node-Level Feature
图数据挖掘可以分为节点层面,连接层面还有全图层面
Possible options
节点、连接、子图、全图都可以有特征
- Weight (e.g. , frequency of communication )
- Ranking (best friend, second best friend …)
- Type ( friend, relative, co-worker )
- Sign : Friend vs. Foe, Trust vs. Distrust
- Properties depending on the structure of the rest of the graph: Number of common friends
多模态特征: 图像、 视频、文本、音频
自己的特征称之为属性特征
收入、学历、年龄、婚姻状态、工作单位、征信
本节重点一个节点在图里面的功能,它是桥接还是枢纽,还是边缘节点,更倾向于节点在社群里面扮演什么角色。
Feature Design :
Using effective features over graphs is the key to achieving good model performance.
Tradtional ML pipeline uses hand-designed features. 人工构造的特征(特征工程)
我们可以采用人为设计特征向量,把向量输入到机器学习特征中(特征工程)
Goal : Make predictions for a set of subjects.
Design choices:
Features: d-dimensional vectors
Objects :Nodes, edges, sets of nodes, entire graphs
Objective function: What task are we aiming to solve?
节点层面的特征工程( Node-Level Tasks)
过程:输入某个节点的D维向量,输出该节点是某类的概率(如图) 关键是把D维向量构造好,质量要足够高
可以进行节点的分类判断,由已知的图猜测未知的节点分类问题,为半监督学习(semi-supervised learning)
- Goal : Characterize the structure and position of a node in the network:
- Node degree (节点的连接数,只看数量,不看质量)
- Node centrality(节点的重要度)
- Clustering coefficient (聚集系数)
- Graphlets (定义子图模式)
Node Degree
Node Centrality
重要度其实就是节点的质量
Node centrality cv takes the node importtance in a graph into account
节点重要度又可以分为其他几类:
- Eigenvector centrality
- Betweenness centrality
- Closeness centrality
- and many other…
Eigenvector centrality :
一个节点的重要度等于与它相邻的节点的重要度求和,是递归问题(recursive manner)
可以运用矩阵运算,其实就等同于求邻接矩阵的特征向量和特征值
Rewrite the recursive equation in the matrix form.
A: Adjacency matrix
C: Centrality vector
Betweenness centrality
可以用来判断一个节点是否处在交通咽喉和必经之地
A node is important if it lies on many shortest paths between other nodes.
算每一对的最短距离(如图)
Closenesss centrality
去哪儿都近
A node is important if it has small shortest path lengths to all other nodes.
Clustering Coefficient
集群系数(有多抱团)
数三角形的个数
不同节点的集群系数不一样,找节点之间的联系
说明节点的连接关系密切
ego-network(自我中心网络)
三角形意味着我们提前定义了一个子图,我们也可以定义其他的,比如 graphlet
Graphlet
可以看作是同分异构体
不同节点扮演不同的节点角色
我们提取某一个节点周围的graphlet的子图个数,可以构建一个向量,称为Graphlet Degree Vector
可以描述节点的拓扑结构,比较两个节点的GDV向量可以计算距离和相似度
Analogy
- Degree count #(edges) that a node touches
- Clustering coefficient counts #(triangles) that a node touches.
- Graphlet Degree Vector(GDV): Graphlet-base features for nodes
- GDV count(#graphlets) that a node touches