File size: 2,662 Bytes
e83913b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
---
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.
|