论文阅读和分析:DeeperGCN All You Need to Train Deeper GCNs

基本内容:

图卷积网络(GCNs)由于其在图上的表示学习能力而引起了广泛的关注。与卷积神经网络(CNN)不同,卷积神经网络能够堆叠非常深的层,GCN在深入时存在梯度消失、过度平滑和过度拟合问题。这些挑战限制了GCN在大规模图上的表示能力。如何能够成功且可靠地训练非常深的GCN的DeepGCN。

1、定义可微广义聚合函数,以统一不同的消息聚合操作(例如平均值、最大值)。

2、提出了一个新的规范化层,即MsgNorm和GCN残差连接的预激活版本。

算法原理:

The GENeralized Graph Convolution (GENConv) from the “DeeperGCN: All You Need to Train Deeper GCNs” paper. Supports SoftMax & PowerMean aggregation. The message construction is:
x i ′ = M L P ( x i + A G G ( { R e L U ( x j + e j i ) + ϵ , j ∈ N ( i ) } ) ) \mathbf{x}_i^{\prime} = \mathrm{MLP} \left( \mathbf{x}_i + \mathrm{AGG} \left( \left\{ \mathrm{ReLU} \left( \mathbf{x}_j + \mathbf{e_{ji}} \right) +\epsilon ,j \in \mathcal{N}(i) \right\} \right) \right) xi=MLP(xi+AGG({ReLU(xj+eji)+ϵ,jN(i)}))

算法核心实现阅读和分析:

pytorch_geometric/ogbn_proteins_deepgcn.py at master · pyg-team/pytorch_geometric · GitHub

def forward(self, x: Union[Tensor, OptPairTensor], edge_index: Adj,
            edge_attr: OptTensor = None, size: Size = None) -> Tensor:
    """"""
    if isinstance(x, Tensor):
        x: OptPairTensor = (x, x)

    if hasattr(self, 'lin_src'):
        x = (self.lin_src(x[0]), x[1])

    if isinstance(edge_index, SparseTensor):
        edge_attr = edge_index.storage.value()

    if edge_attr is not None and hasattr(self, 'lin_edge'):
        edge_attr = self.lin_edge(edge_attr)

    # Node and edge feature dimensionalites need to match.
    if edge_attr is not None:
        assert x[0].size(-1) == edge_attr.size(-1)

    # propagate_type: (x: OptPairTensor, edge_attr: OptTensor)
    # 经过传播进行聚合;
    out = self.propagate(edge_index, x=x, edge_attr=edge_attr, size=size)

    # 聚合;
    if hasattr(self, 'lin_aggr_out'):
        out = self.lin_aggr_out(out)

    # 归一化步骤;
    if hasattr(self, 'msg_norm'):
        out = self.msg_norm(x[1] if x[1] is not None else x[0], out)

    # 这个是公式中的x_i;
    x_dst = x[1]
    if x_dst is not None:
        if hasattr(self, 'lin_dst'):
            x_dst = self.lin_dst(x_dst)
        out = out + x_dst
	# 计算公式MLP后面的部分;
    return self.mlp(out)

def message(self, x_j: Tensor, edge_attr: OptTensor) -> Tensor:
    # 计算公式中AGG括号内的部分;
    msg = x_j if edge_attr is None else x_j + edge_attr
    return msg.relu() + self.eps

参考:

1、torch_geometric.nn — pytorch_geometric documentation (pytorch-geometric.readthedocs.io)

2、[2006.07739] DeeperGCN: All You Need to Train Deeper GCNs (arxiv.org)

3、pytorch_geometric/ogbn_proteins_deepgcn.py at master · pyg-team/pytorch_geometric · GitHub

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
To understand other people is a crucial skill in today's world. It helps us connect with others on a deeper level, build stronger relationships, and collaborate effectively. However, understanding others is not always easy. It requires patience, empathy, and an open mind. The first step to understanding others is to listen actively. We need to listen to what the other person is saying without interrupting or judging them. It's essential to pay attention to their body language, tone of voice, and emotions to get a complete understanding of their message. The second step is to empathize with others. We need to put ourselves in their shoes and try to understand their perspective. Empathy allows us to see things from a different angle and appreciate other people's feelings and needs. The third step is to communicate effectively. We need to express ourselves clearly and respectfully and be willing to listen to others' opinions. Effective communication helps build trust and respect and provides a foundation for understanding. Another important aspect of understanding others is to be aware of cultural differences. People from different cultures may have different values, beliefs, and communication styles. It's essential to be respectful of these differences and be open to learning from them. To understand others also requires self-awareness. We need to examine our own biases, assumptions, and beliefs that may influence our perceptions of others. Self-awareness helps us avoid stereotypes and judgments and allows us to approach others with an open mind. In conclusion, understanding others is a critical skill that requires active listening, empathy, effective communication, cultural awareness, and self-awareness. By understanding others, we can build stronger relationships, collaborate more effectively, and create a more inclusive and empathetic society.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

KPer_Yang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值