Run this model with HF Jobs

Run orqan137/Kanana-URLGate-Decide-3B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/orqan137/Kanana-URLGate-Decide-3B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/orqan137/Kanana-URLGate-Decide-3B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

English · 한국어

URLGate geometric gateway mark

Kanana-URLGate-Decide-3B

Powered by Kanana

Kanana-URLGate-Decide-3B is a decision adapter that returns a probability distribution for phishing from a URL and, optionally, offline page text. It never opens the URL or executes HTML, JavaScript, or other page content. Its role is to provide a typed probability that downstream policy code or a human reviewer can consume after a compact first-stage URL check.

The frozen base model is kakaocorp/kanana-2-v-decide-3b-2611, pinned at revision 12820d654ed9789a0f7f48daeee1703c3483c464. Training keeps the base model's 2,560-dimensional decision embeddings frozen and learns only a rank-64 shared residual metric adapter. This repository does not redistribute the base weights.

Role in the URLGate series

The model listing keeps the inputs, roles, and comparable results in one place.

Component Input Role
URLGate-Init-0.1-0.5M URL string Default first gate and strongest URLGate model on the shared PhreshPhish protocol
URLGate-Static-0.1-Hybrid URL + non-executing HTML snapshot Optional static-content signal
Kanana-URLGate-Decide-3B URL + optional offline page text Typed probability for downstream policy and review
URLGate-Init-0.1-0.5M-Legacy URL string Archived package layout for reproducibility

The Kanana adapter provides a general probability interface, but its URL-ranking performance is lower than the compact URLGate Init model on the same PhreshPhish URL-only evaluation. Use it as a downstream decision layer rather than a replacement for the first-stage detector.

Inputs and outputs

Task Input Output
phishing One string formatted as URL: ...\nOffline page text: ... Probability distribution over false and true
domain One Korean news headline Probability distribution over the seven KLUE YNAT topics

The domain labels are it_science, economy, society, life_culture, world, sports, and politics. This release contains no finance-specific label or finance training set and must not be presented as a financial classifier.

Quick start

import json
import torch
from transformers import AutoModel
from kanana_urlgate_decide import adapted_system_one, load_adapter, validate_request_inputs

BASE_MODEL = "kakaocorp/kanana-2-v-decide-3b-2611"
BASE_REVISION = "12820d654ed9789a0f7f48daeee1703c3483c464"
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

state = (
    "URL: https://secure-login.example/verify\n"
    "Offline page text: Your account will be suspended unless you enter "
    "your password and security code immediately."
)
validate_request_inputs(state=state, images=None, allowed_image_root=".")

model = AutoModel.from_pretrained(
    BASE_MODEL,
    revision=BASE_REVISION,
    trust_remote_code=True,
    dtype=torch.bfloat16,
).to(DEVICE).eval()

adapter = load_adapter(".", device=model.device).eval()
config = json.loads(open("adapter_config.json", encoding="utf-8").read())

result = adapted_system_one(
    model,
    adapter,
    state=state,
    questions={"phishing": config["questions"]["phishing"]},
    adapter_tasks={"phishing": "phishing"},
)
print(result["answers"]["phishing"])

If a deployment needs live page evidence, a separate isolated collector must extract plain text before calling this package. The package itself performs no network request, browser rendering, or script execution.

Training method

The data bundle contains 12,000 PhreshPhish examples and 8,400 KLUE YNAT examples across separate training, development and calibration roles. Gradient training uses 8,000 PhreshPhish and 7,000 KLUE examples; the remaining 4,000 and 1,400 examples are reserved for development/calibration. Raw source data is not included in this repository.

PhreshPhish and PhiUSIIL are CC BY 4.0; KLUE is CC BY-SA 4.0. The bundle distributes only the learned adapter and aggregate metrics.

The adapter adjusts distances between frozen state and answer embeddings. It has 327,680 matrix parameters, plus small task-specific scale and bias terms. The phishing and news tasks share one residual space, while the output-selection rule is frozen from the calibration split before official evaluation.

  • phishing: uses the shared adapter by default.
  • domain: uses the frozen base output by default because the adapter did not show a consistent calibration-split advantage.
  • Thresholds: the repository does not impose a blocking threshold; deployments must calibrate one for their own base rate and false-positive cost.

Benchmarks

Phishing is a rare-event ranking problem, so the primary metrics are Average Precision and precision at 90% recall rather than accuracy alone.

PhreshPhish official evaluation

URL-only evaluation scores all 168,060 official test rows. The official full membership contains 90,262 benign and 28,476 phishing samples.

Model AP P@R=0.9
Base 0.7307 0.7704
Shared adapter 0.9101 0.8127

The adapter improves substantially over its frozen base but remains below URLGate Init on the same protocol.

Low-prevalence evaluation

Phishing rate Base AP Adapter AP Base P@R=0.9 Adapter P@R=0.9
0.05% 0.0057 0.0309 0.0057 0.0073
0.1% 0.0109 0.0570 0.0118 0.0148
0.5% 0.0502 0.2177 0.0516 0.0647
1% 0.0948 0.3467 0.0973 0.1214
5% 0.3394 0.6914 0.3566 0.4152

At 0.05% prevalence, the paired bootstrap difference between adapter and base is +0.0252 AP (95% CI [+0.0247, +0.0257]) and +0.0016 P@R=0.9 (95% CI [+0.0014, +0.0017]). The low absolute precision is why this model must not act as a universal auto-blocker.

URL and offline page text

A fixed 10,000-example subset compares URL-only input with URL plus a bounded, non-executing text projection. This is an input ablation, not the official full-membership score.

Input Shared adapter AP ROC-AUC P@R=0.9
URL only 0.9635 0.9720 0.9377
URL + page text 0.9675 0.9673 0.8944

Adding page text raises AP slightly while lowering ROC-AUC and P@R=0.9. URL-only remains the default. Treat page text as optional evidence only after validating it in the target deployment.

External transfer: PhiUSIIL

Evaluation covers 235,795 PhiUSIIL URLs after removing 137 exact overlaps with the PhreshPhish training URLs.

Model AP ROC-AUC P@R=0.9
Base 0.9326 0.9762 0.9742
Shared adapter 0.9678 0.9793 0.9282

The adapter improves AP and ROC-AUC while reducing P@R=0.9. PhiUSIIL also contains strong collection artifacts and class-specific URL-format differences. This result is an external-format diagnostic, not the primary performance claim.

KLUE YNAT

Evaluation uses 7,707 validation examples that were not used for adapter validation or calibration.

Model Accuracy Macro-F1 Economy recall Politics recall
Base 0.8531 0.8471 0.8328 0.8506
Shared adapter 0.8736 0.8640 0.8615 0.8027

The adapter improves aggregate Macro-F1 and economy recall but lowers politics recall. Because it did not show a consistent advantage on the prior calibration split, domain keeps the base output as its default. These labels represent general news topics, not political stance, risk, or finance-specific categories.

Relationship to Jev-style models

Jev introduced a System One interface that maps an unstructured state and typed questions to probabilities over predefined answers. Laya follows the same general problem format with Apache-2.0 weights. This adapter follows the interface principle: it returns a small probability distribution instead of generating free-form security prose.

Related public models target different inputs. Cyber-Jev covers broader application-security text, while Jeff spam adapter classifies email and SMS. Their datasets, licenses, and evaluation protocols differ, so their reported values are not a direct ranking against this model.

Intended use and limitations

Recommended uses:

  • prioritize URLs for analyst review;
  • provide a typed score to an existing security policy;
  • combine a compact URL gate with a slower downstream review layer;
  • study decision adapters over frozen Kanana embeddings.

Do not:

  • block users or accounts solely from this score;
  • treat false as proof that a site is safe;
  • treat page text as trusted instructions;
  • claim live redirect, DOM, screenshot, attachment, DNS, TLS, or reputation analysis;
  • interpret domain as political stance, financial risk, or a finance classifier.

Attackers can manipulate both URLs and visible text. Performance can shift across languages, time periods, traffic sources, and campaign families. Calibrate thresholds on recent deployment traffic and retain a review or live-analysis path.

Reproducibility and license

  • Base revision: 12820d654ed9789a0f7f48daeee1703c3483c464
  • Adapter SHA-256: e2bbb44e62ed59ef5755b0ab7882ce505636fdc7741b38a56aded89bcb41518f
  • Detailed metrics: evaluation/metrics.json
  • Raw source data and execution-environment inventory are excluded from the bundle.

The base model and this derivative adapter are governed by the Kanana Open License. The base weights are not redistributed here. When using or redistributing this adapter, review the license obligations including the Responsible AI guidelines, retaining LICENSE and NOTICE, documenting modifications (CHANGES.md), and displaying Powered by Kanana. Certain commercial API, cloud, SI/on-premise, or on-device offerings may require a separate agreement.

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.

The optional convenience function is imported as from kanana_urlgate_decide.decision import decide; the original package-level API is adapted_system_one. The convenience helper uses the training question and URL/offline-text field structure. Published embedding benchmarks used a 1,024-token cap, while the general API follows the upstream model configuration; matching a question alone does not make long-input inference numerically identical to that benchmark.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for orqan137/Kanana-URLGate-Decide-3B

Finetuned
(4)
this model

Datasets used to train orqan137/Kanana-URLGate-Decide-3B