A small classification model that checks whether a single Japanese message contains a threat of harm, discrimination, an insult, coercion or a sexual remark made by the writer themself. It does not generate text.
This is a model for research and evaluation. It was evaluated on synthetic text, and its performance on real users’ messages has not been checked. It is not intended for production use.
This page records the specification and evaluation. The full model card is on Hugging Face. The sensitive-information classifier built the same way is Safe Privacy Detect.
Time to judge one 200-character message (p50), measured on AWS (c7i.xlarge, 4 vCPUs)
Designed for 4 CPUs and no GPU. No network needed at run time
70,156,431 parameters. The base model is sbintuitions/modernbert-ja-70m
For each of five targets, one of three labels with probabilities
Safe Abuse Detect looks only at the text of the one message it is given, and whether the writer’s own words or acts are written there. It does not judge the writer’s intent, character or dangerousness, or whether anything should be done.
Quotes, words or acts inside news or fiction, and reports of being harmed are not DETECTED by themselves.
Criticising the service in strong words, cancelling, going to a lawyer or a financial ADR body, asking for a manager or an apology: the rules say NOT_DETECTED. How often the model wrongly flags these has not been measured yet.
A joke taken back, an unclear target, or masking that hides the content should get ABSTAIN. In practice, on 50–60% of the messages where ABSTAIN was correct, it answered NOT_DETECTED or DETECTED.
One Japanese message. It is built around a single chat message (up to 200 characters) and accepts up to 800. It does not look at the rest of the conversation. Split long text on the calling side.
{"threat": {"status": "NOT_DETECTED", "probabilities": {...}},
"insult": {"status": "DETECTED", ...}, ...}
It does not say which part of the text matched. The bundled predict.py writes the text to neither its output nor its logs.
The writer says or hints that they will harm a person’s body or life, or a building or equipment
Demeaning a person or group, or calling for or announcing their exclusion, because of nationality, ethnicity, sex, disability or a similar attribute
Attacking the character, ability or looks of a particular person or group (including the other party, staff or the AI chat) in demeaning words
Threatening a disadvantage other than harm (exposure, damaging a reputation, refusing to leave, stalking and so on), or intimidating someone into doing what they are not obliged to do
Explicit sexual remarks or demands aimed at the person the writer is talking to
Each target is judged on its own, so one message can hit several (an insult aimed at an attribute is both discrimination and insult). The scope is the definitions above; they do not match any legal definition.
The bundled script predict.py returns two more states: OUT_OF_SCOPE (an unsupported target ID, near-empty text, text less than 30% Japanese characters, or more than 800 characters) and FAILED (a runtime error or a timeout; 1,000 ms by default). Abuse written only in English or romanised Japanese is not judged and comes back OUT_OF_SCOPE.
| Characters | p50 | p95 | Per second |
|---|---|---|---|
| 50 | 9.69 ms | 10.59 ms | 103.2 |
| 100 | 16.33 ms | 16.77 ms | 61.5 |
| 200 | 24.81 ms | 25.80 ms | 40.2 |
| 400 | 44.87 ms | 45.30 ms | 22.3 |
| 800 | 90.57 ms | 93.98 ms | 11.0 |
AWS (c7i.xlarge, 4 vCPUs, Tokyo region, 2026-11-30, v0.1.0). 32-bit ONNX, ONNX Runtime 1.23.2, 4 threads. Outbound traffic was cut after setup, and Docker ran with --network none, 4 CPUs and a 2 GiB memory limit. For each length, 20 warm-up runs and then 200 runs, one message at a time. The times do not include any network transfer. 1.85 s from start to the first answer; peak resident memory of the inference process about 650 MiB.
On the development PC (AMD Ryzen 7 5700X, WSL, limited to 4 CPUs, 2026-11-30): p50 18.2 ms and p95 25.3 ms at 200 characters, p50 71.4 ms and p95 85.7 ms at 800. Even on the same PC, results vary by 10–20% from run to run. Speed depends on the type and number of CPUs, so measure again on your own machines with the bundled bench.py. There is no 8-bit quantised version (in the trials, it made the miss rates much worse).
Three results missed their targets: the discrimination miss rate (25.2%), the insult miss rate (31.9%) and the message-level pass-through rate (7.8%). Everything else was within target.
62 of 793. Target: 5% or less
28 of 850. Target: 5% or less
Pass-through rate: of the messages containing at least one such act, the share where no target was DETECTED. False-positive rate: of the messages containing none, the share where some target was DETECTED.
The dashed line is the target (10% or less for threat and discrimination, 15% or less for insult, coercion and sexual). The figures are the same as in the table below.
| Target | Miss rate | False positives (ordinary) | False positives (confusable) | Abstain rate | Abstain accuracy | ECE |
|---|---|---|---|---|---|---|
| threat | 4.9% (9 of 185) | 0.7% | 2.4% (2 of 83) | 0.8% | 46.6% (34 of 73) | 0.018 |
| discrimination | 25.2% (77 of 306) | 1.1% | 5.6% (4 of 72) | 0.8% | 50.0% (13 of 26) | 0.032 |
| insult | 31.9% (111 of 348) | 1.1% | 6.9% (6 of 87) | 0.3% | 42.9% (6 of 14) | 0.029 |
| coercion | 11.6% (27 of 233) | 2.0% | 4.3% (5 of 117) | 1.6% | 38.8% (26 of 67) | 0.017 |
| sexual | 12.9% (24 of 186) | 0.4% | 1.5% (1 of 68) | 0.3% | 43.3% (26 of 60) | 0.008 |
| Target | ≤ 10% / 15% | ≤ 3% | ≤ 10% | ≤ 10% | Reference only | ≤ 0.05 |
The miss-rate target is ≤ 10% for threat and discrimination and ≤ 15% for insult, coercion and sexual. The targets are proposals set by the developer before the evaluation (before seeing any results). Because readers disagree about abuse and coercion, the first draft (a 5% miss rate for every target) was revised before the evaluation.
2026-11-30, 1,789 messages, run once for this version. 32-bit ONNX, values after calibration. The evaluation set is synthetic: a generative AI that took no part in creating the training data or tuning the model wrote it from the labelling rules alone. The answers are a majority vote of three generative AIs that read the rules; no person checked them. Only 26 (discrimination) and 14 (insult) examples have ABSTAIN as the answer, so abstain accuracy there is rough. False positives on legitimate complaints and strong dissatisfaction could not be measured with this set. On the development data (for reference) the miss rates were threat 4.9%, discrimination 5.6%, insult 14.5%, coercion 11.3% and sexual 11.7%, but that data was used for tuning decisions during development, so it flatters the model.
These are requests from the author, not licence conditions.
Enquiries about evaluating it on your own text, or about testing it together, are welcome.
Enquiries go through the support page on legacy-tools.dev.