Deep neural networks are notoriously miscalibrated, i.e., their outputs do not reflect the true probability of the event we aim to predict. While networks for tabular or image data are usually overconfident, recent works have shown that graph neural networks (GNNs) show the opposite behavior for node-level classification. But what happens when we are predicting links? We show that, in this case, GNNs often exhibit a mixed behavior. More specifically, they may be overconfident in negative predictions while being underconfident in positive ones. Based on this observation, we propose IN-N-OUT, the first-ever method to calibrate GNNs for link prediction. IN-N-OUT is based on two simple intuitions: i) attributing true/false labels to an edge while respecting a GNNs prediction should cause but small fluctuations in that edge's embedding; and, conversely, ii) if we label that same edge contradicting our GNN, embeddings should change more substantially. An extensive experimental campaign shows that IN-N-OUT significantly improves the calibration of GNNs in link prediction, consistently outperforming the baselines available -- which are not designed for this specific task.
翻译:摘要:深度神经网络普遍存在校准偏差,即其输出并不能准确反映我们旨在预测事件的实际概率。尽管处理表格或图像数据的网络通常表现出过度自信,但近期研究表明,图神经网络(GNN)在节点级分类任务中呈现相反行为。但当任务转向链接预测时会发生什么?我们证明,在此场景下GNN常表现出混合性行为——具体而言,网络可能对负预测过度自信,而对正预测信心不足。基于这一发现,我们提出IN-N-OUT,这是首个专用于链接预测的GNN校准方法。该方法基于两个简洁直觉:其一,若在GNN预测正确的边贴上真实/虚假标签,该边的嵌入应仅产生微小波动;反之,若对同一条边施加与GNN预测矛盾的标签,其嵌入变化应更为显著。大量实验表明,IN-N-OUT显著提升了链接预测任务中GNN的校准性能,且一致优于现有非专用于此任务的基线方法。