AungMoonLord_bert-log-anomaly-detection
AungMoonLord · View on Hugging Face ↗
Get this model
Seeders: 1 · Leechers: 0
Observed 2026-09-05T20:48:33Z across trackers.
Model card
The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.
library_name: transformers metrics:
- accuracy
- precision
- recall
- f1 license: apache-2.0 base_model:
- google-bert/bert-base-uncased pipeline_tag: text-classification
Model Card for Model ID
Model Summary
bert-log-anomaly-detectionis a BERT-based NLP model fine-tuned for single SQL transaction log anomaly detection.The model classifies each database transaction log as either
NormalorAnomaly, with the goal of supporting AI-powered fraud detection and cybersecurity monitoring systems.This model was developed as part of the Samsung × KBTG Digital Fraud Cybersecurity Hackathon (Thailand) under the AI-Powered Fraud Detection & Prevention track.
Model Description
This model analyzes individual SQL database transaction logs and detects abnormal patterns that may indicate fraudulent, malicious, or suspicious behavior.
Demo: Hackathon prototype
- Developed by: Aungruk Vanichanai, Napat Wanitwatthakorn, Thanakrit Sriphiphattana
- Shared by: Aungruk Vanichanai
- Model type: Transformer-based binary text classifier
- Language(s) (NLP): English (SQL logs in text format)
- License: Apache 2.0
- Finetuned from model: google-bert/bert-base-uncased
Model Sources
- GitHub Repository: https://github.com/AungMoonLord/AI-Cybersecurity-Hackathon/tree/main/New%20Finetune%20Hackathon
How to Get Started with the Model
Step 1 (Setup)
import torch
from transformers import BertForSequenceClassification, BertTokenizer
MODEL_PATH = "AungMoonLord/bert-log-anomaly-detection"
model = BertForSequenceClassification.from_pretrained(MODEL_PATH)
tokenizer = BertTokenizer.from_pretrained(MODEL_PATH)
model.eval()
Step 2 (Clean and Label Logs) — Optional, but may slightly improve accuracy, recall, and F1-score
# Perfom log preprocessing
def add_prefix_token(text): # log data must pass this code before training/inferencing
# clean log
text = text.replace("\t", " ")
text = text.strip()
# add token
if text[0].isalpha() or text[3].isalpha():
return "[SQL]\n" + text
else:
return "[LOG]\n" + text
Step 3 (Create the Function for Log Classification)
def predict_log(log_text):
log_text = add_prefix_token(log_text)
inputs = tokenizer(
log_text,
return_tensors="pt",
truncation=True,
padding=True, # for cases when the inference contains more than 1 log, i.e., batch size > 1
max_length=128
)
with torch.no_grad():
logits = model(**inputs).logits
pred = torch.argmax(logits, dim=1).item()
prob = torch.softmax(logits, dim=-1).tolist()[0]
return "Normal" if pred == 1 else "Anomaly", prob
Step 4 (Samples of Inferences)
# Example 1
text1 = "SELECT * FROM users WHERE id = 1 OR 1=1"
print(predict_log(text1))
# Example 2
text2 = "2025-01-06 14:23:45 | User: anonymous | IP: 203.154.89.102 | Duration: 0.05s SELECT * FROM users WHERE username = 'admin' OR '1'='1' -- ' AND password = 'x'"
print(predict_log(text2))
# Example 3
text3 = "3051-06-22T07:20:02.296945Z 3 Query select e3mJKDCCY from 7Q8SpG8LLEWhrfpe4s5 where ph4d = 'a1S9hQa92uC1EAyJf2Y';"
print(predict_log(text3))
Application in Hackathon Project
- Developed by Waris Sripatoomrak, this model integrates with an n8n workflow to automate fraud detection within financial transaction logs.
Out-of-Scope Use
Multi-log sequence anomaly detection
Non-textual anomaly detection
Training Data
SQL database transaction logs (1,611 samples) synthetically generated by ChatGPT, Qwen, DeepSeek, Grok, Gemini, and Claude
Each log labeled as either
NormalorAnomalyData prepared for single-log classification
Evaluation
Metrics
- Training Set
| Metric | Value |
|---|---|
| Accuracy | 0.8950 |
| Precision | 0.8580 |
| Recall | 0.9026 |
| F1-score | 0.8797 |
| Validation Loss | 0.3279 |
- Test Set (Baseline — No Step 2 Preprocessing)
| Metric | Value |
|---|---|
| Accuracy | 0.6950 |
| Precision | 0.6639 |
| Recall | 0.7900 |
| F1-score | 0.7215 |
| Validation Loss | 0.6251 |
- Test Set (Full Pipeline — With Step 2 Preprocessing)
| Metric | Value |
|---|---|
| Accuracy | 0.7000 |
| Precision | 0.6613 |
| Recall | 0.8200 |
| F1-score | 0.7321 |
| Validation Loss | 0.6344 |
Summary
The model demonstrates strong anomaly detection capability with high recall, making it suitable for fraud detection and cybersecurity use cases.
Magnet link
Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:
magnet:?xt=urn:btih:5e5898ec291bf49ef88c3798f0026e4184783f15&dn=AungMoonLord_bert-log-anomaly-detectionOpen magnet in torrent client · infohash 5e5898ec291bf49ef88c3798f0026e4184783f15
Files & hashes
| Path | Size | sha1 | sha256 |
|---|---|---|---|
| README.md | 5.0 KB (5,109 B) | 8d0f176bab96a803ed21e5f42f4793db1bbf0a7d | 4fd4b464571861db0572db87fbf8e6c2dcd2dbf32bf007a0ad199114bf3ded46 |
| config.json | 707 B (707 B) | 3c7a3dacc2d703055f052e0ab1435073e05143fc | 4d4696ee1b7a23917473062c805c89bc5deb1062878cceabad00ce5c2574510f |
| model.safetensors | 417.7 MB (437,958,648 B) | 2738fadb46ec14db664f28afd0dfc9dd599c1a32 | 9cd32047860f126fe0e2694d188669279ababa7a60de1f25c671f6bf42d72114 |
| special_tokens_map.json | 732 B (732 B) | ba5e3e474dd99473e6fd1bec11f3c34d406c6760 | 5aa43c2f985a25296d5a5ce621c2f77376ca8091a47993c492fd5460b895b140 |
| tokenizer.json | 695.0 KB (711,661 B) | 8f778e7d950e055b18b53222c75d2c54c3732df5 | cb374d6bc042c22455946f4e09a89d29882a199fdaf8fb25be00dc8b8857a448 |
| tokenizer_config.json | 1.4 KB (1,475 B) | 64050e8a76d5054d69beefda573049ff4fcf1a05 | 0a24cfac1657d41bcf30140892edc92398292749048bf81275d44a84a03b193e |
| vocab.txt | 226.1 KB (231,508 B) | fb140275c155a9c7c5a3b3e0e77a9e839594a938 | 07eced375cec144d27c900241f3e339478dec958f92fddbc551f295c992038a3 |
Cite this release
- Canonical URL
- https://aiseedbank.org/models/AungMoonLord_bert-log-anomaly-detection/
- Slug
- AungMoonLord_bert-log-anomaly-detection
- Infohash
- 5e5898ec291bf49ef88c3798f0026e4184783f15
- License
- apache-2.0
- Signing key fingerprint
- 85a3b32c3712427b
Every file carries a locally computed sha256 — verify a download against the signed sums: AungMoonLord_bert-log-anomaly-detection.SHA256SUMS (+ minisign signature).
Provenance
| Upstream repository | AungMoonLord/bert-log-anomaly-detection |
|---|---|
| Revision (pinned) | 9ece304f330c8fa08a9ba825fd3d1adcf746aaf6 |
| Fetched at | 2026-08-24T09:58:38Z |
| License at fetch | apache-2.0 |
| Snapshot tool | huggingface · seedbank 0.1.0 |
Trackers
- udp://announce.aitorrent.org:6969/announce
- http://announce.aitorrent.org:7070/announce
- udp://announce2.aitorrent.org:6970/announce
- http://announce2.aitorrent.org:7071/announce
- udp://tracker.opentrackr.org:1337/announce
- udp://open.demonii.com:1337/announce
- udp://open.stealth.si:80/announce
- udp://exodus.desync.com:6969/announce
- udp://tracker.torrent.eu.org:451/announce
✓ verified · rehash-vs-hf-metadata at 2026-08-24T09:58:51Z
apache-2.0418.6 MB (438,909,840 bytes)transformerssafetensorsberttext-classificationtext-embeddings-inferenceendpoints_compatible