Boosting OOD Detection in Biomedical Data with Siamese Neural Networks - Honorato, Eduardo Sperle; Dalalana, Gabriel José Pelisser (Anais da Brazilian Conference on Intelligent Systems (BRACIS), 2025)
Out-of-Distribution (OOD) detection is critical for ensuring the reliability of machine learning models, particularly in sensitive domains such as biomedicine. In this work, we propose a novel OOD detection framework based on Siamese Neural Networks (SNNs) trained with triplet loss, aiming to generate discriminative feature spaces where known-class samples are tightly clustered and unknown samples are pushed apart. We introduce the “One-From-Each” triplet mining strategy, which selects hard negatives from each class individually, enhancing the diversity and representativeness of the training triplets. A committee of traditional OOD detectors—including k-Nearest Neighbors, Gaussian Mixture Models, Isolation Forests, and One-Class SVMs—is applied on the learned feature spaces for class-specific OOD detection. Extensive experiments are conducted on diverse biomedical datasets, including OrganSMNIST, TissueMNIST, OCTMNIST, Genomics OOD, and Voice Pathology. Results demonstrate that our method significantly improves AUROC compared to baseline and standard classifiers, with gains of up to 28.9% on OrganSMNIST. While the proposed approach consistently outperforms classical baselines, the results also highlight the difficulty of OOD detection in certain datasets, such as voice pathology. These findings emphasize the potential of feature-embedding strategies for robust OOD detection and point towards promising directions for future research.