Responsive Banner

Klasifikasi tingkat keparahan depresi pada teks reddit menggunakan Fasttext dan Bigru dengan mekanisme Attention

Mu'thy, Muhammad Muzakky (2026) Klasifikasi tingkat keparahan depresi pada teks reddit menggunakan Fasttext dan Bigru dengan mekanisme Attention. Undergraduate thesis, Universitas Islam Maulana Malik Ibrahim.

[img] Text (Fulltext)
220605110175.pdf - Accepted Version
Available under License Creative Commons Attribution Non-commercial No Derivatives.

(3MB)

Abstract

INDONESIA

Depresi merupakan gangguan kesehatan mental yang membutuhkan penanganan dini secara tepat. Pemanfaatan teknologi Natural Language Processing (NLP) memungkinkan identifikasi tingkat keparahan depresi melalui analisis teks pengguna di media sosial Reddit. Penelitian ini bertujuan mengukur kinerja model Bidirectional Gated Recurrent Unit (BiGRU) dengan mekanisme atensi (attention mechanism) dan pembobotan kelas (class weighting) dalam mengklasifikasikan empat level depresi (minimum, mild, moderate, severe) secara ordinal. Guna mengatasi tantangan ketidakseimbangan kelas (class imbalance) yang sangat ekstrem pada dataset, penelitian ini merancang ablation study menjadi empat skenario (Baseline, Class Weight Only, Attention Only, dan Full Model) menggunakan representasi kata FastText dan Ordinal Output Layer. Hasil uji coba melalui Stratified 5-Fold Cross validation menunjukkan skenario Class Weight Only memberikan performa paling optimal dan berkeadilan lintas kelas, dengan mencetak Macro F1-Score 32,51% serta Quadratic weighted kappa (QWK) tertinggi di angka 29,66%. Sebaliknya, skenario Attention Only justru memicu paradoks akurasi; di mana akurasi globalnya tampak tertinggi (72,60%) namun nilai QWK anjlok drastis hingga 4,68% akibat kegagalan sistematis mengenali kelas minoritas. Sementara itu, Full Model menghasilkan ketidakstabilan konvergensi dengan rata-rata QWK 21,71%. Penelitian ini menyimpulkan bahwa intervensi pembobotan kelas pada fungsi kerugian (loss function) jauh lebih fundamental dan kritis dalam memitigasi bias mayoritas dibandingkan penambahan kompleksitas arsitektur mekanisme atensi pada pemodelan teks kesehatan mental yang distribusinya sangat timpang.

ENGLISH

Depression is a mental health disorder that requires timely and appropriate intervention. The utilization of Natural Language Processing (NLP) technology enables the identification of depression severity through the analysis of user text on the Reddit social media platform. This study aims to evaluate the performance of a Bidirectional Gated Recurrent Unit (BiGRU) model equipped with an attention mechanism and class weighting in ordinally classifying four levels of depression (minimum, mild, moderate, severe). To address the extreme class imbalance within the dataset, an ablation study was designed across four configurations (Baseline, Class Weight Only, Attention Only, and Full Model) leveraging FastText word representations and an Ordinal Output Layer. Experimental results using Stratified 5-Fold Cross-Validation demonstrate that the Class Weight Only scenario delivers the most optimal and equitable performance across classes, achieving a Macro F1-Score of 32.51% and the highest Quadratic weighted kappa (QWK) at 29.66%. Conversely, the Attention Only scenario triggers an accuracy paradox, where the global accuracy appears highest (72.60%) but the QWK drops drastically to 4.68% due to a systematic failure to recognize minority classes. Meanwhile, the Full Model leads to convergence instability with an average QWK of 21.71%. This study concludes that class weighting intervention in the loss function is far more fundamental and critical in mitigating majority bias than increasing architectural complexity through attention mechanisms in mental health text modeling with highly skewed distributions.

ARABIC

يعد الاكتئاب اضطراباً في الصحة العقلية يتطلب تدخلاً مبكراً ومناسباً. يتيح استخدام تقنية معالجة اللغات الطبيعية (NLP) تحديد مستوى شدة الاكتئاب من خلال تحليل النصوص التي يكتبها المستخدمون على منصة التواصل الاجتماعي ريديت (Reddit). تهدف هذه الدراسة إلى تقييم أداء نموذج الوحدة المتكررة ذات البوابة ثنائية الاتجاه (BiGRU) المزود بآلية الانتباه (Attention Mechanism) وترجيح الفئة (Class weighting) في التصنيف الترتيبي لأربعة مستويات من الاكتئاب (الأدنى، الخفيف، المتوسط، الشديد). للتغلب على تحدي عدم توازن الفئات (Class imbalance) الشديد جداً في مجموعة البيانات، صممت هذه الدراسة تجربة استئصال (Ablation study) مقسمة إلى أربعة سيناريوهات (الأساس، ترجيح الفئة فقط، الانتباه فقط، والنموذج الكامل) باستخدام تمثيل الكلمات FastText وطبقة المخرجات الترتيبية (Ordinal Output Layer). أظهرت نتائج الاختبار باستخدام التحقق المتقاطع الطبقي خماسي الطيات (Stratified 5-Fold Cross validation) أن سيناريو "ترجيح الفئة فقط" (Class Weight Only) قدم الأداء الأمثل والأكثر عدالة عبر الفئات، حيث سجل درجة Macro F1-Score بلغت 32.51% وأعلى قيمة لمعامل كابا الموزون تربيعياً (QWK) بنسبة 29.66%. وعلى النقيض من ذلك، تسبب سيناريو "الانتباه فقط" (Attention Only) في مفارقة الدقة؛ حيث بدت الدقة الإجمالية هي الأعلى (72.60%) ولكن انخفضت قيمة QWK بشكل كبير إلى 4.68% بسبب الفشل المنهجي في التعرف على فئات الأقلية. وفي الوقت نفسه، أدى "النموذج الكامل" (Full Model) إلى عدم استقرار التقارب بمتوسط QWK بلغ 21.71%. تخلص هذه الدراسة إلى أن التدخل من خلال ترجيح الفئات في دالة الخسارة (Loss Function) يعد أكثر جوهرية وأهمية في التخفيف من تحيز الأغلبية مقارنة بزيادة تعقيد البنية من خلال آليات الانتباه في نمذجة نصوص الصحة العقلية ذات التوزيع غير المتكافئ للغاية.

Item Type: Thesis (Undergraduate)
Supervisor: Crysdian, Cahyo and Aziz, Okta Qomaruddin
Keywords: Depresi; Klasifikasi Ordinal; BiGRU; Mekanisme Atensi; Pembobotan Kelas; FastText; Depression; Ordinal Classification; Attention Mechanism; Class weighting; الاكتئاب; التصنيف الترتيبي; آلية الانتباه، ترجيح الفئة.
Subjects: 08 INFORMATION AND COMPUTING SCIENCES > 0801 Artificial Intelligence and Image Processing > 080107 Natural Language Processing
Departement: Fakultas Sains dan Teknologi > Jurusan Teknik Informatika
Depositing User: Muhammad Muzakky Mu'thy
Date Deposited: 19 Jun 2026 09:49
Last Modified: 19 Jun 2026 09:49
URI: http://etheses.uin-malang.ac.id/id/eprint/85633

Downloads

Downloads per month over past year

Actions (login required)

View Item View Item