English · 한국어

URLGate-Static-0.1-Hybrid
A non-executing HTML snapshot classifier for the second URLGate stage, before a user or agent enters personal data.
The model reads a saved snapshot. It never fetches resources or executes HTML, JavaScript, CSS, forms, or downloads. A low score does not verify the live site.
URLGate series
The model listing groups this model with the compact Init gate, the Kanana typed-decision layer, and the archived package. Start with URLGate-Init-0.1-0.5M; use Static only when a separately isolated collector already provides a non-executing HTML snapshot.
| Item | Measured value |
|---|---|
| Bundle size | 3.59 MB |
| Official full AP | 0.9601 |
| Official full P@R=0.9 | 0.8970 |
| Official 0.05% base-rate AP | 0.3434 |
| Official 0.05% base-rate P@R=0.9 | 0.0175 |
| Network requests during inference | 0 |
| Script execution | none |
Architecture
URLGate Static keeps three signals separate until the final calibration layer:
- character 3–5 gram hashing over bounded actionable and visible text;
- a small histogram gradient-boosting model over forms, inputs, password fields, external form actions, scripts, iframes, external resources, event-handler attributes, URL length and entropy;
- logistic late fusion over the two branch logits.
The design favors predictable CPU memory, language-independent character features, and evidence that can be shown to an agent. It provides a distinct static-content signal and does not claim that sparse features are universally best.
Quick start
pip install numpy pandas scikit-learn joblib
python inference.py --url 'https://example.test/login' --html-file saved_page.html
from inference import URLGateStatic
gate = URLGateStatic(".")
result = gate.inspect("https://example.test/login", saved_html)
print(result["decision"], result["risk_score"])
Only pass snapshots obtained by a separate isolated collector. Do not point the model at a live URL and do not execute page content to prepare its input.
Training data
- Dataset: PhreshPhish v1.0.1, official URL–HTML train/test split.
- Dataset license: CC BY 4.0; retain attribution and follow the dataset's anti-phishing research terms.
- HTML handling: bounded Python
HTMLParser, no browser, no resource load, no JavaScript execution. - Training roles: 430,753 train, 15,240 validation, and 12,475 calibration examples.
- Text budget: 16,384 projected characters; raw HTML budget is recorded in the preprocessing manifest.
The model bundle does not redistribute the PhreshPhish HTML corpus.
Preprocessing integrity
| Split | Rows | HTML truncated | URL/HTML parse-error signal | Network/script/browser execution |
|---|---|---|---|---|
| Official train source | 498,255 | 79,110 | 36 | 0 / 0 / 0 |
| Official test | 168,060 | 26,766 | 10 | 0 / 0 / 0 |
Malformed URLs are retained and marked with a parse-error signal instead of being silently dropped. The 56-shard membership and file hashes are recorded in the aggregate manifest and training metadata.
Evaluation
The official full and 975 low-base-rate memberships are evaluated with the published PhreshPhish interpolation formula. Thresholds come from the official training roles and are not tuned on the official test.
| Condition | AP | P@R=0.9 |
|---|---|---|
| Official full | 0.9601 | 0.8970 |
| Official 0.05% base rate, replicate mean | 0.3434 | 0.0175 |
Relationship to URLGate Init
The separately released 490,945-parameter URL-only Init model scored AP 0.9700 and P@R=0.9 0.9383 on the same official full membership; at the 0.05% base rate it scored AP 0.4274 and P@R=0.9 0.0300. Static v0.1 scores lower on all four values. It must therefore not be described as an unconditional accuracy improvement over Init.
Static remains useful as a distinct, non-executing snapshot signal. A conditional cascade may route uncertain Init cases here, but that combined operating policy has not yet been benchmarked and is not part of the reported score.
Complete base-rate results are in evaluation/official_metrics.json; per-repetition values are included for formula checking. Model scoring latency in that file excludes HTML parsing, so it must not be presented as end-to-end page latency.
Intended use
- Inspect a frozen first-render or raw HTML snapshot before login, form submission, upload, download, or other sensitive interaction.
- Escalate uncertain Init results without loading a large language model.
- Provide a defensive signal and structural evidence to an existing browser or agent security system.
Limitations and safety
- Static HTML cannot reveal later DOM mutation, click-triggered flows, redirects, service workers, or runtime network behavior.
- The bounded parser may truncate unusually large pages and may lose browser-specific DOM repairs.
- Character hashing can learn collection artifacts and cannot explain individual n-gram weights as causal evidence.
- The structure branch can be evaded by changing markup while preserving deceptive behavior.
- The model does not inspect screenshots, brand identity, DNS, TLS, domain age, or current threat intelligence.
- Never enter real credentials or personal data merely because the model returns
allow.
Reproduction
evaluation/training_metadata.json, evaluation/official_metrics.json, the preprocessing manifest and file hashes identify the exact run. This is a new URLGate model trained on the official data, not an exact SpecularNet or PhishLang reproduction.
License and attribution
The bundle code and locally trained weights are released under Apache 2.0. PhreshPhish remains CC BY 4.0 and is not relicensed by this repository. Cite and follow the upstream dataset terms.
The common URLGate mark was generated specifically for this project without input or reference images. Its provenance and CC0 dedication are recorded in assets/NOTICE.md.
Citation
@article{dalton2025phreshphish,
title={PhreshPhish: A Real-World, High-Quality, Large-Scale Phishing Website Dataset and Benchmark},
author={Dalton, Thomas and Gowda, Hemanth and Rao, Girish and Pargi, Sachin and Hadj Khodabakhshi, Alireza and Rombs, Joseph and Jou, Stephan and Marwah, Manish},
year={2025},
journal={arXiv preprint},
eprint={2507.10854},
url={https://arxiv.org/abs/2507.10854}
}