You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

indobert-beauty-spam-classifier

A fine-tuned IndoBERT model for detecting spam in Indonesian-language beauty product reviews.

Model Details

  • Base model: indolem/indobert-base-uncased
  • Architecture: BertForSequenceClassification (12 layers, hidden size 768, 12 attention heads)
  • Language: Indonesian (id)
  • Task: Binary text classification (spam detection)
  • Labels:
    • 0: Not Spam
    • 1: Spam

Intended Use

Classifies whether a beauty product review written in Indonesian is spam (promotional links, unrelated content, bot-like text) or a genuine review. Built for filtering user-generated review content on a beauty e-commerce platform.

Not intended for: languages other than Indonesian, review content outside the beauty/cosmetics domain, or as a sole moderation decision-maker in production without human review (see Limitations).

How to Use

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

model_name = "sofyanwaldy/indobert-beauty-spam-classifier"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

text = "Dapatkan uang dengan cepat! Klik di sini untuk informasi lebih lanjut."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class = torch.argmax(logits, dim=-1).item()
print("Spam" if predicted_class == 1 else "Not Spam")

Training Data

Fine-tuned on a custom dataset of 260 labeled Indonesian beauty product reviews (spam_classification_dataset_bahasa.csv):

  • 162 not-spam examples
  • 98 spam examples
  • 80/20 train/test split (seed=42)

Training Procedure

Hyperparameter Value
Epochs 3
Learning rate 2e-5
Batch size (train/eval) 8
Weight decay 0.01
Optimizer AdamW (HF Trainer default)

Trained with the Hugging Face Trainer API on top of indolem/indobert-base-uncased.

Evaluation

No evaluation metrics were logged during training. Precision/recall/F1 on a held-out set have not yet been computed for this checkpoint β€” treat performance as unverified until evaluated.

Limitations and Bias

  • Very small training set (260 examples): high risk of overfitting and poor generalization to review styles/topics not represented in the data.
  • Class imbalance (~62% not-spam / 38% spam): may bias the model toward predicting "Not Spam."
  • Domain-specific: trained only on beauty product reviews; unlikely to generalize to other review domains.
  • No formal evaluation metrics available for this checkpoint β€” accuracy/F1 unknown.
  • Not tested for adversarial or obfuscated spam patterns (e.g., leetspeak, character substitution).

License

MIT, inherited from base model indolem/indobert-base-uncased.

Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for sofyanwaldy/indobert-beauty-spam-classifier

Finetuned
(401)
this model