  Functional near-infrared spectroscopy (fNIRS) is a non-invasive technique for
monitoring brain activity. To better understand the brain, researchers often
use deep learning to address the classification challenges of fNIRS data. Our
study shows that while current networks in fNIRS are highly accurate for
predictions within their training distribution, they falter at identifying and
excluding abnormal data which is out-of-distribution, affecting their
reliability. We propose integrating metric learning and supervised methods into
fNIRS research to improve networks capability in identifying and excluding
out-of-distribution outliers. This method is simple yet effective. In our
experiments, it significantly enhances the performance of various networks in
fNIRS, particularly transformer-based one, which shows the great improvement in
reliability. We will make our experiment data available on GitHub.
