|
|
| --- |
| language: en |
| license: cc-by-nc-nd-4.0 |
| tags: |
| - text-classification |
| - bert |
| - scam-detection |
| - fraud-detection |
| - call-transcripts |
| datasets: |
| - scam-and-non-scam-call-conversation-dataset |
| metrics: |
| - accuracy |
| - precision |
| - recall |
| - f1 |
| pipeline_tag: text-classification |
| widget: |
| - text: "Hello, this is your bank calling. We noticed suspicious activity and need your card number and PIN immediately to secure your account." |
| example_title: Scam example |
| - text: "Hi, this is Dr. Smith's office confirming your dental appointment for next Tuesday at 10am." |
| example_title: Non-scam example |
| --- |
| |
| # bert-scam-call-classifier |
|
|
| A fine-tuned `bert-base-uncased` binary text classifier that flags phone-call transcripts as **scam** or **non_scam**, based on conversational/behavioral patterns rather than topic keywords alone. |
| |
| ## Model description |
| |
| - **Base model:** [`bert-base-uncased`](https://huggingface.co/bert-base-uncased) |
| - **Task:** Binary sequence classification (`0 = non_scam`, `1 = scam`) |
| - **Fine-tuning framework:** Hugging Face `transformers.Trainer` |
| - **Max sequence length:** 256 tokens |
|
|
|
|
| ## Training data |
|
|
| Fine-tuned on the [Scam and Non-Scam Call Conversation Dataset](https://www.kaggle.com/datasets) (Kaggle), built for the paper "Classifying Scam Calls through Content Analysis with Dynamic Sparsity Top-k Attention Regularization" (IEEE Access). |
|
|
| | Split | Count | |
| |---| |
| | Total conversations | 800 | |
| | Scam | 400 | |
| | Non-scam | 400 | |
| | Train | 640 | |
| | Validation | 80 | |
| | Test | 80 | |
|
|
| *(Exact split counts will vary slightly depending on your run — the notebook fills these in automatically from `train_df`/`val_df`/`test_df`.)* |
|
|
| The dataset is released under **CC BY-NC-ND 4.0** — non-commercial use only, and this model inherits that restriction. |
|
|
| ## Training procedure |
|
|
| - Optimizer: AdamW (via `Trainer` defaults) |
| - Learning rate: 2e-5 |
| - Epochs: 4 (with early stopping on validation F1) |
| - Batch size: 16 (train) / 32 (eval) |
| - Precision: fp16 (if a GPU was available), else fp32 |
|
|
| ## Evaluation results (held-out test set) |
|
|
| | Metric | Score | |
| |---| |
| | Accuracy | 1.0000 | |
| | Precision | 1.0000 | |
| | Recall | 1.0000 | |
| | F1 | 1.0000 | |
|
|
| ## How to use |
|
|
| ```python |
| from transformers import pipeline |
| |
| clf = pipeline("text-classification", model="your-hf-username/bert-scam-call-classifier") |
| clf("Hello, this is your bank calling. We need your card number and PIN to verify your account immediately.") |
| ``` |
|
|
| ## Citation |
|
|
| If you use this dataset, please cite the original paper: |
|
|
| > *Classifying Scam Calls through Content Analysis with Dynamic Sparsity Top-k Attention Regularization*, IEEE Access. |
|
|
| --- |
| *Model card generated for this fine-tuning run. |
| |