Augmentations in Graph Contrastive Learning: Current Methodological Flaws & Towards Better Practices

https://dl.acm.org/doi/pdf/10.1145/3485447.3512200

Augmentations in Graph Contrastive Learning: Current Methodological Flaws & Towards Better Practices ,2022,WWW

总结: 第一次看到这种全是实验的文章,个人觉得这篇文章有两个点比较有启发性:

  1. 除了accuracy 之外,我们需要关注一些其他指标,比如affinity等,帮助我们更好的评价一个模型。
  2. context-aware augmentation,之前一直没有关注过这一点,结合领域知识设计一个增强策略。

不过这篇文章,也有一些点是有待商榷的:

  1. 文章中实验的通用性,这篇文章作者只关注了图分类数据集,然后使用的DAGAs策略也比较有限
  2. 作者虽然提到了context-aware augmentation,但是没有提出更具体的设计方案。使用的两个case也比较特殊。

1. 简介

1.1 摘要

Graph classification has a wide range of applications in bioinformatics, social sciences, automated fake news detection, web document classification, and more. In many practical scenarios, including webscale applications, labels are scarce or hard to obtain. Unsupervised learning is thus a natural paradigm for these settings, but its performance often lags behind that of supervised learning. However, recently contrastive learning (CL) has enabled unsupervised computer vision models to perform comparably to supervised models. Theoretical and empirical works analyzing visual CL frameworks find that leveraging large datasets and task relevant augmentations is essential for CL framework success. Interestingly, graph CL frameworks report high performance while using orders of magnitude smaller data, and employing domain-agnostic graph augmentations (DAGAs) that can corrupt task relevant information. Motivated by these discrepancies, we seek to determine why existing graph CL frameworks continue to perform well, and identify flawed practices in graph data augmentation and popular graph CL evaluation protocols. We find that DAGA can destroy task-relevant information and harm the model’s ability to learn discriminative representations. We also show that on small benchmark datasets, the inductive bias of graph neural networks can significantly compensate for these limitations, while on larger graph classification tasks commonly-used DAGAs perform poorly. Based on our findings, we propose better practices and sanity checks for future research and applications, including adhering to principles in visual CL when designing context-aware graph augmentations. For example, in graph-based document classification, which can be used for better web search, we show task-relevant augmentations improve accuracy by up to 20%.

图分类被广泛用于生物、社交科学、假新闻检测、网络文档分类等跟个领域。在许多实际应用中,包括网络级应用,标签很稀少并且难以获取。因此,在这些场景下,无监督学习是一种很好的模式,但是其性能往往落后于you监督学习。然而,最近对比学习让CV中的无监督模型达到了可以媲美有监督模型的性能。在一些研究visual CL框架的理论和实验性工作中发现,利用大规模数据集,并且使用任务相关的增强手段,对于CL框架能否取得成功,起着非常关键的作用。有趣的是,尽管使用相对较小的数据集和domain-agnostic 图增强手段,graph CL框架依旧能取得很高的性能。

基于这个发现,我们尝试研究为什么现有的graph CL框架依然能表现优异,以及现有图数据增强和流行图CL评估协议在实际应用中的缺陷。我们发现DAGA会破坏任务相关信息,并损害模型学习高质量表示的能力。我们还发现,在小型标准数据集上,GNNs的归纳偏置可以显著弥补这些限制,但是在更大规模数据集的图分类任务中,常用的DAGAs表现不佳。基于以上发现,我们为未来的研究和实践提出了更好的practices and sanity checks,包括遵循visual CL中的增强原则,即设计context-aware图增强。例如,在基于图的文档分类中,我们发现使用task-relevant增强,准确率可以提高超过20%。

1.2 本文工作

背景: 在很多图分类任务场景下,标签稀少并且难以获得,因此这些场景中无监督学习方法称为一种更好选择。但是无监督方法往往性能低于有监督模型。不过,近年来出现的CL方法,可以让无监督模型取得和有监督模型相媲美的性能。

动机: visual CL框架中,一些理论和实验工作表明,VCL有两个关键性principles:

  • training on large, diverse datasets
  • leveraging strong, task-relevant augmentaions

现有的GCL框架并没有遵循这两个原则,它们不仅使用相对小的、binary classification数据集,还通常依赖于domain-agnostic graph augmentations(DAGAs)。但是这些GCL框架依旧取得了很好的性能。这是为什么呢?

本文工作: 作者提出了一些策略,可以帮助实验人员观察到除了精确度之外的一些现象,从而更好的评价他们的模型性能。并且通过实验发现,对于GCL,VCL中的那两条principles不仅重要,而且是必要的,可以显著提高模型性能。作者的核心工作主要有下面两点:

  1. Analysis of limitations in domain-agnostic augmentations

    分析了现有主流GCL使用的DAGAs的缺陷

  2. Identification of methodological flaws & better practices

    提出了一些评价GCL模型的其他指标,并总结了一些GCL在实际应用中需要注意的点

  3. Case studies with strong augmentations

    通过两个case study,说明如何设计context-aware augmentations,以及它的重要性

2. 具体内容

2.1 现有GCL中augmentation和evaluation的缺陷

发现1:现有的DAGAs增强策略会破坏任务相关信息

发现2:现有的GCL评价策略有缺陷,会导致模型学习到弱判别力表示

发现3:为什么GCL框架有缺陷,但是依旧性能比较好?因为randomly-initialized GNNs具有很强的归纳偏置,可以缓解这一缺陷带来的问题。

destroying task-relevant information

对于增强策略的优劣,可以用affinity和diversity两个指标来评价。

  • affinity:密切性,增强后的图应当和原始图有着类似的分布,并共享任务相关的语义信息。简单来说就是要保留原始语义。
  • diversity:差异性,增强图要和原始图之间存在差异,避免平凡解。

也就是我们常说的:存在差异的同时保留语义。

一个好的增强策略,这两个指标都应该是最优的。

现有的增强策略,比如子图、丢节点、边扰动等等,差异性是够的,核心问题是affinity是不是足够优秀?

作者进行了这样一个实验:先用原始数据训练好一个PNA网络,然后使用20%图大小的random node/subgraph dropping生成增强图,最后对比PNA网络在原始图和增强图上的性能表现。实验结果如下表所示:

可以看到,模型在增强图上的分类精确度大幅降低,说明DAGAs破坏了原始图的语义信息。

weakly discriminative representations

Limitation1指出,DAGAs会破坏任务相关的语义信息,这个缺陷会衍生出另外一个缺陷:导致错误的positive pairs,因为语义信息被破坏,正样本对中的两个样本可能不再共享task-relevant信息。

也就是说,两个语义上不相似的样本的表示之间的相似度会被扩大(因为它们被误认为是正样本对了),这可能导致最终学习到的intra-class样本间的相似度要低于inter-class样本间的相似度。

为了验证这一猜想,作者进行了如下实验:分别使用GraphCL、InfoGraph和MVGRL学习整个数据集的样本表示,然后计算样本对之间的余弦相似度。实验结果如下图所示:

作者这里用的应该是二分类数据集,对角线上表示相同类别样本间的相似度。可以看到使用difusion-based和subgraph采样的MVGRL和InfoGraph,产生false positive pairs的概率要小于使用DAGAs的GraphCL。反映在图上就是,对角线上两个block的颜色要浅于非对角线上的两个block。

strong inductive bias

在前文L2的实验中,作者发现没有训练的GNNs(L2中图片最左边)已经具有比较好的分类性能了,这是因为GNNs具有很强的归纳偏置能力。作者做了一个简单实验,将GCL模型和随机模型的性能进行比较。

总结

作者通过以上所有实验,总结了GCL在实际应用中需要注意的几点:

  1. 使用DAGA会破坏task-relevant信息,应该设计context-aware graph augmentation
  2. 在小规模图数据集上,随机模型具有很强的归纳偏置,做实验时应当将其作为baseline
  3. 使用negative-sample GCL框架时,不该用small, binary graph datasets
  4. 除了accuracy number之外,应当有更多的评价手段,比如affinity、diversity和cosine similarity。

Context-aware augmentation

作者通过两个case study来说明如何结合领域知识来设计context-aware augmentations。

Case Study 1:Document Classification

第一个任务是文档分类。

图构建方式:co-occurrence graph,节点表示单词,两个单词出现在同一个窗口(大小为2或者4)则在两者之间添加一条边。

DAGA增强: node, edge, and subgraph dropping at {5%, 10%, 20%}

Context-Aware增强:使用NLP中现有的增强手段, synonym replacement, random word insertion, random word swapping and random word deletion。

Case Study 2:Super-pixel Classification

第二个任务是super-pixel图像分类。

DANAs增强:随机丢节点20%

Context-Aware增强: select random colorizing as the context-aware augmentation

打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2021-2022 Yin Peng
  • 引擎: Hexo   |  主题:修改自 Ayer
  • 访问人数: | 浏览次数:

请我喝杯咖啡吧~

支付宝
微信