Deteksi Anomali Pada Data Tabular Menggunakan Siamese Neural Network Dengan Weighted Contrastive Loss

Rahmawati, Karina (2026) Deteksi Anomali Pada Data Tabular Menggunakan Siamese Neural Network Dengan Weighted Contrastive Loss. Other thesis, Institut Teknologi Sepuluh Nopember.

[thumbnail of 5025221041-Undergraduate_Thesis.pdf] Text
5025221041-Undergraduate_Thesis.pdf - Accepted Version
Restricted to Repository staff only

Download (7MB) | Request a copy

Abstract

Deteksi anomali pada data tabular sering menghadapi tantangan berupa ketidakseimbangan data dan kemiripan karakteristik antara data normal dan anomali. Siamese Neural Network (SNN) merupakan pendekatan yang efektif untuk mempelajari hubungan kemiripan antar data melalui pembentukan ruang embedding. Namun, Standard Contrastive Loss memperlakukan seluruh pasangan data secara sama sehingga kurang optimal dalam menangani pasangan normal-anomali yang sulit dipisahkan. Penelitian ini mengusulkan Weighted Contrastive Loss pada arsitektur SNN untuk deteksi anomali pada data tabular. Strategi pembobotan dirancang untuk memberikan perhatian lebih besar pada hard negative pairs sehingga model lebih berfokus pada pasangan yang paling informatif. Anomaly score dihitung menggunakan metode k-Nearest Neighbor (kNN) pada ruang embedding yang dihasilkan. Eksperimen dilakukan pada enam dataset tabular dengan rasio anomali 2,9%–35,0%. Hasil penelitian menunjukkan bahwa Weighted Contrastive Loss secara konsisten meningkatkan AUC-PR dibandingkan Standard Contrastive Loss pada seluruh dataset yang diuji, dengan peningkatan terbesar sebesar 0,0315 pada dataset Waveform. Selain itu, SNN dengan Weighted Contrastive Loss menunjukkan performa yang kompetitif dibandingkan metode machine learning tradisional maupun model deep learning untuk data tabular, serta unggul pada beberapa dataset yang lebih menantang seperti Seismic dan Stroke.
======================================================================================================================================
Anomaly detection in tabular data faces challenges due to class imbalance and the similarity between normal and anomalous instances. Siamese Neural Network (SNN) is an effective approach for learning similarity relationships through the construction of an embedding space. However, Standard Contrastive Loss treats all training pairs equally, making it less effective in handling normal–anomaly pairs that are difficult to separate. This study proposes a Weighted Contrastive Loss for SNN-based anomaly detection in tabular data. The weighting strategy is designed to assign greater importance to hard negative pairs, enabling the model to focus on the most informative training samples. Anomaly scores are computed using the k-Nearest Neighbor (kNN) method in the learned embedding space. Experiments were conducted on six tabular datasets with anomaly ratios ranging from 2.9% to 35.0%. The results show that Weighted Contrastive Loss consistently improves PR-AUC compared to Standard Contrastive Loss across all evaluated datasets, with the largest improvement of 0.0315 achieved on the Waveform dataset. Furthermore, SNN with Weighted Contrastive Loss demonstrates competitive performance against traditional machine learning methods and deep learning models for tabular data, while achieving superior results on more challenging datasets such as Seismic and Stroke.

Item Type: Thesis (Other)
Uncontrolled Keywords: Data Tabular, Data Tidak Seimbang, Deteksi Anomali, Weighted Contrastive Loss, Anomaly Detection, Imbalanced Data, Siamese Neural Network, Tabular Data, Weighted Contrastive Loss
Subjects: Q Science > QA Mathematics > QA336 Artificial Intelligence
Q Science > QA Mathematics > QA76.87 Neural networks (Computer Science)
Divisions: Faculty of Intelligent Electrical and Informatics Technology (ELECTICS) > Informatics Engineering > 55201-(S1) Undergraduate Thesis
Depositing User: Karina Rahmawati
Date Deposited: 24 Jul 2026 13:53
Last Modified: 24 Jul 2026 13:53
URI: http://repository.its.ac.id/id/eprint/137461

Actions (login required)

View Item View Item