Thiago Carvalho , Marley Vellasco , José Franco Amaral
{"title":"Towards out-of-distribution detection using gradient vectors","authors":"Thiago Carvalho , Marley Vellasco , José Franco Amaral","doi":"10.1016/j.neunet.2025.108142","DOIUrl":null,"url":null,"abstract":"<div><div>Deploying Deep Learning algorithms in the real world requires some care that is generally not considered in the training procedure. In real-world scenarios, where the input data cannot be controlled, it is important for a model to identify when a sample does not belong to any known class. This is accomplished using out-of-distribution (OOD) detection, a technique designed to distinguish unknown samples from those that belong to the in-distribution classes. These methods mainly rely on output or intermediate features to calculate OOD scores, but the gradient space is still under-explored for this task. In this work, we propose a new family of methods using gradient features, named GradVec, using the gradient space as input representation for different OOD detection methods. The main idea is that the model gradient presents, in a more informative way, the knowledge that a sample belongs to a known class, being able to distinguish it from other unknown ones. GradVec methods do not change the model training procedure and no additional data is needed to adjust the OOD detector, and it can be used on any pre-trained model. Our approach presents superior results in different scenarios for OOD detection in image classification and text classification, reducing FPR95 up to 26.67 % and 21.29 %, respectively.</div></div>","PeriodicalId":49763,"journal":{"name":"Neural Networks","volume":"194 ","pages":"Article 108142"},"PeriodicalIF":6.3000,"publicationDate":"2025-09-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Neural Networks","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0893608025010226","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0
Abstract
Deploying Deep Learning algorithms in the real world requires some care that is generally not considered in the training procedure. In real-world scenarios, where the input data cannot be controlled, it is important for a model to identify when a sample does not belong to any known class. This is accomplished using out-of-distribution (OOD) detection, a technique designed to distinguish unknown samples from those that belong to the in-distribution classes. These methods mainly rely on output or intermediate features to calculate OOD scores, but the gradient space is still under-explored for this task. In this work, we propose a new family of methods using gradient features, named GradVec, using the gradient space as input representation for different OOD detection methods. The main idea is that the model gradient presents, in a more informative way, the knowledge that a sample belongs to a known class, being able to distinguish it from other unknown ones. GradVec methods do not change the model training procedure and no additional data is needed to adjust the OOD detector, and it can be used on any pre-trained model. Our approach presents superior results in different scenarios for OOD detection in image classification and text classification, reducing FPR95 up to 26.67 % and 21.29 %, respectively.
期刊介绍:
Neural Networks is a platform that aims to foster an international community of scholars and practitioners interested in neural networks, deep learning, and other approaches to artificial intelligence and machine learning. Our journal invites submissions covering various aspects of neural networks research, from computational neuroscience and cognitive modeling to mathematical analyses and engineering applications. By providing a forum for interdisciplinary discussions between biology and technology, we aim to encourage the development of biologically-inspired artificial intelligence.