becleverksh commited on
Commit
bc39933
ยท
verified ยท
1 Parent(s): 81964f0

Upload bf16 release artifact

Browse files
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ figures/evaluation-test-1-1.png filter=lfs diff=lfs merge=lfs -text
37
+ figures/evaluation-train-1-1.png filter=lfs diff=lfs merge=lfs -text
38
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ko
4
+ - en
5
+ license: apache-2.0
6
+ library_name: transformers
7
+ pipeline_tag: token-classification
8
+ base_model: openai/privacy-filter
9
+ tags:
10
+ - token-classification
11
+ - ner
12
+ - pii
13
+ - privacy
14
+ - pii-masking
15
+ - korean
16
+ - finance
17
+ - bioes
18
+ - viterbi
19
+ - mixture-of-experts
20
+ datasets:
21
+ - BCCard/pii-masking-openpii-finance
22
+ metrics:
23
+ - f1
24
+ - precision
25
+ - recall
26
+ ---
27
+
28
+ # 1. Overview
29
+ A Korean/English **PII detection model for the finance domain**, built by full fine-tuning
30
+ [`openai/privacy-filter`](https://huggingface.co/openai/privacy-filter) (1.4B MoE, 50M active) on synthetic finance-domain PII data. It tags **18 PII entity types** (73 BIOES classes) at token level and is intended as the **NER layer of a multi-layer PII-masking gateway** in front of LLM services โ€”
31
+ behind a regex backstop for fully structured identifiers, never as a standalone compliance guarantee.
32
+
33
+ On held-out validation it reaches **strict span-F1 0.956 (ko) / 0.969 (en)**. On an independent, adversarially-hardened Golden Set it holds **0.944 (ko) / 0.907 (en)** with **masking coverage 0.996 (ko) / 0.998 (en)** โ€” i.e. โ‰ฅ99.5% of gold PII characters are covered by predicted spans.
34
+
35
+ ## 1.1. TL;DR
36
+ * **Base model**: [`openai/privacy-filter`](https://huggingface.co/openai/privacy-filter) โ€” 1.4B-parameter MoE (128 experts, 50M active), 8 layers, hidden 640, bidirectional banded attention (ยฑ128), o200k tokenizer
37
+ * **Domain / Language**: Finance (BC Card โ€” cards, accounts, national IDs, customer service text) / Korean + English
38
+ * **Task**: Token classification (BIOES) โ†’ character-offset PII spans โ†’ masking
39
+ * **Labels (18)**: `PERSON, RRN, FRN, CARD_NUMBER, ACCOUNT_NUMBER, SECRET, USER_ID, EMAIL, PHONE, PASSPORT, DRIVER_LICENSE, GENERIC_ID, ADDRESS, ZIPCODE, DATE, CARD_EXPIRY, CVC, IPIN`
40
+ * **Method**: Full fine-tuning (all parameters incl. experts & router) with a re-initialized 73-class head (rows copied from the base head by taxonomy mapping)
41
+ * **Decoding**: **constrained BIOES Viterbi** (not per-token argmax) + whitespace span refinement โ€” the bundled `viterbi_calibration.json` exposes precisionโ†”recall operating-point biases without retraining
42
+ * **Format**: BF16 (attention `sinks` kept FP32), single safetensors + tokenizer + label taxonomy + Viterbi calibration sidecar
43
+ * **Sequence length**: trained on sequences โ‰ค768 tokens โ€” chunk longer inputs
44
+ * **Intended use**
45
+ - In-house **PII masking gateway** (detect โ†’ mask before text reaches an LLM)
46
+ - Korean-centric finance text with mixed English (IDs, e-mails, card numbers)
47
+
48
+ ## 1.2. Label Taxonomy (N=18)
49
+ The 18 labels re-map the upstream ai4privacy source labels to the granularity a Korean financial masking policy needs - merging fragments into single spans (`GIVENNAME`/`SURNAME` โ†’ `PERSON`, `CITY`/`STREET`/`BUILDINGNUM` โ†’ `ADDRESS`) and adding Korea-specific classes absent upstream (`RRN`, `FRN`, `IPIN`, `CARD_EXPIRY`, `CVC`, `SECRET`). `data source` records the row-source buckets in which each label occurs: `ko` means `openpii-1.5m-ko`, `en` means `openpii-1.5m-en`, and `domain` means locally synthesized rows.
50
+
51
+ | label | description | data source |
52
+ |-------|-------------|-------------|
53
+ | `PERSON` | full name (surname + given, single span) | ko, en, domain |
54
+ | `RRN` | resident registration number (Korea) | ko, domain |
55
+ | `FRN` | foreign registration number | domain |
56
+ | `CARD_NUMBER` | credit/debit card PAN | ko, en, domain |
57
+ | `ACCOUNT_NUMBER` | bank account number | ko, domain |
58
+ | `SECRET` | auth secret (password / API key / token) | ko, domain |
59
+ | `USER_ID` | online member ID | ko, en, domain |
60
+ | `EMAIL` | email address | ko, en, domain |
61
+ | `PHONE` | phone number (mobile / landline) | ko, en, domain |
62
+ | `PASSPORT` | passport number | ko, en, domain |
63
+ | `DRIVER_LICENSE` | driver's license number | ko, en, domain |
64
+ | `GENERIC_ID` | generic identifier (no KO counterpart) | ko, en, domain |
65
+ | `ADDRESS` | address (city / street / building, single span) | ko, en, domain |
66
+ | `ZIPCODE` | postal code | ko, en, domain |
67
+ | `DATE` | date / time | ko, en, domain |
68
+ | `CARD_EXPIRY` | card expiry date | domain |
69
+ | `CVC` | card verification code | domain |
70
+ | `IPIN` | I-PIN number | domain |
71
+
72
+ Each entity type has `B-`, `I-`, `E-` and `S-` boundary classes, plus the background class `O`. This yields 73 output classes. The bundled `label-taxonomy.yaml` and `config.json` must remain in the same label order.
73
+
74
+ ## 1.3. Usage
75
+
76
+ ```python
77
+ import torch
78
+ from transformers import AutoModelForTokenClassification, AutoTokenizer
79
+
80
+ model_id = "BCCard/MoAI-Privacy-Filter"
81
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
82
+ model = AutoModelForTokenClassification.from_pretrained(model_id)
83
+ model.eval()
84
+
85
+ text = "๊ณ ๊ฐ ๋ชจ์•„์ด๋‹˜(000000-0000000)๊ป˜์„œ 010-0000-0000๋กœ ์—ฐ๋ฝ ์š”์ฒญํ•˜์…จ์Šต๋‹ˆ๋‹ค."
86
+ enc = tokenizer(text, return_offsets_mapping=True, add_special_tokens=False, return_tensors="pt")
87
+ offsets = enc.pop("offset_mapping")[0].tolist()
88
+
89
+ with torch.no_grad():
90
+ logits = model(**enc).logits[0] # [T, 73] โ€” raw output
91
+
92
+ # 1) Decode the logits with constrained BIOES Viterbi (recommended; see note below)
93
+ # and map token paths to character spans via `offsets` โ€” the detector's output:
94
+ # -> [{"start": 3, "end": 6, "label": "PERSON"}, '๋ชจ์•„์ด'
95
+ # {"start": 8, "end": 22, "label": "RRN"}, '000000-0000000'
96
+ # {"start": 26, "end": 39, "label": "PHONE"}] '010-0000-0000'
97
+ # 2) Masking is downstream application logic โ€” replace each span according to
98
+ # your masking policy, e.g.:
99
+ # -> "๊ณ ๊ฐ [PERSON]๋‹˜([RRN])๊ป˜์„œ [PHONE]๋กœ ์—ฐ๋ฝ ์š”์ฒญํ•˜์…จ์Šต๋‹ˆ๋‹ค."
100
+ ```
101
+
102
+ > **Decoding note** โ€” this model (like its base) is post-trained for **constrained Viterbi decoding**
103
+ > over the BIOES transition grammar, *not* independent per-token argmax. Argmax can emit invalid tag
104
+ > sequences (span splits / orphan tags) and measurably lowers span-F1. The bundled
105
+ > `viterbi_calibration.json` follows the upstream operating-point schema: its six transition biases
106
+ > shift the precisionโ†”recall trade-off at deploy time without retraining (all `0.0` = neutral).
107
+
108
+ ## 1.4. Training Data
109
+ | Dataset | Role | Size |
110
+ |---------|------|------|
111
+ | (Public) [BCCard/pii-masking-openpii-finance](https://huggingface.co/datasets/BCCard/pii-masking-openpii-finance) (v2) | Training / validation | ~58.5k train rows ยท ~14.5k validation rows |
112
+ | (Private) BCCard/pii-masking-openpii-finance-test (v2) | Golden Set (release gate; never used for training/tuning) | 2,000 rows (ko 1,460 / en 540) |
113
+
114
+ * Sources: curated Korean subset of `ai4privacy/pii-masking-openpii-1.5m` (label taxonomy remapped, name spans merged & naturalized) + finance-domain synthetic templates + **~30% English replay** (forgetting guard)
115
+ * Hard-example design baked into v2: surface-similar non-PII decoys (FP suppression), label-confusion pairs in one sentence (RRNโ†”FRN, DRIVER_LICENSEโ†”GENERIC_ID), weak-context true PII (FN suppression), long-span address boundary variants
116
+ * All values are synthetic; validity-pattern collisions with real identifiers are removed at generation time (e.g. card numbers are forced to fail Luhn)
117
+
118
+ ## 1.5. Training Procedure
119
+ | Item | Value |
120
+ |------|-------|
121
+ | Method | Full fine-tuning (1.4B params โ€” experts and router included) |
122
+ | Head | 33-class base head โ†’ 73-class head, initialized by copying base rows via taxonomy mapping |
123
+ | Loss | Token-level cross-entropy |
124
+ | Batch | effective 16 (per-device ร— world ร— accum), fixed across hardware layouts |
125
+ | LR / scheduler | 1e-4 / linear decay, warmup 3% |
126
+ | Optimizer | AdamW (fused), weight decay 0.0, max_grad_norm 1.0 |
127
+ | Epochs | 5 โ€” best checkpoint by validation span micro-F1, **decoded with the same constrained Viterbi as deployment** |
128
+ | Precision | FP32 master weights + BF16 autocast; MoE router/experts explicitly kept FP32 during compute |
129
+ | Hardware | 1ร— NVIDIA H100 (~5h) |
130
+
131
+ <div align="center">
132
+ <img src="figures/evaluation-train-1-1.png" alt="Training loss, learning-rate and gradient-norm curves for the v1 and v2 models" >
133
+ </div>
134
+
135
+ <div align="center">
136
+ <img src="figures/evaluation-test-1-1.png" alt="Training-time validation metric curves for the v1 and v2 models" >
137
+ </div>
138
+
139
+ <br>
140
+
141
+ # 2. Evaluation
142
+ ## 2.1. Setup
143
+ * **Golden Set**: independently generated 2,000-row test set (ko 1,460 / en 540), **adversarially hardened** โ€” weak-context PII, decoys, confusion pairs and boundary variants are deliberately over-represented, so scores here read *lower* than typical in-distribution synthetic benchmarks
144
+ * **Protocol**: strict exact-match span P/R/F1 (CoNLL-style; boundary and label must both match) + **masking coverage** (share of gold PII *characters* covered by predicted spans, label-agnostic โ€” the leakage-oriented metric)
145
+ * **Decoding**: constrained Viterbi + whitespace refinement โ€” identical to the deployment chain
146
+
147
+ ## 2.2. Results
148
+ ### `validation` dataset
149
+
150
+ | Metric | v2 model / v2 validation |
151
+ |---|---:|
152
+ | micro F1 | 0.9599 |
153
+ | macro F1 | 0.9603 |
154
+ | ko strict micro F1 | 0.9562 |
155
+ | ko macro F1 | 0.9568 |
156
+ | en strict micro F1 | 0.9688 |
157
+ | en macro F1 | 0.9631 |
158
+ | **masking coverage** | **0.9979** |
159
+ | **ko masking coverage** | **0.9987** |
160
+ | **en masking coverage** | **0.9965** |
161
+
162
+ * These values were measured post-hoc by running the exported `final-bf16` artifact over all 14,543 v2 validation rows (ko 10,460 / en 4,083) through the deployment-equivalent chain: constrained Viterbi, actual tokenizer character offsets and whitespace refinement.
163
+ * Overall micro F1 and masking coverage pool all ko/en spans or characters before scoring. Overall macro F1 pools per-label TP/FP/FN across both languages and then averages the 18 label F1 values.
164
+ * Character coverage counts are ko **482,861 / 483,488** and en **264,979 / 265,898** gold PII characters.
165
+ * The training-time checkpoint-selection metrics remain ko micro F1 **0.9820**, en micro F1 **0.9739** and global macro F1 **0.9764** at epoch 5. They compare entity spans on token indices, so they are not interchangeable with the character-span values above and do not include masking coverage.
166
+
167
+ ### `test` dataset
168
+ Independently generated Golden Set โ€” deliberately harder than validation: weak-context PII, surface-similar decoys, label-confusion pairs and long-span boundary variants are over-represented.
169
+ **ฮ” = vs. the post-hoc validation baseline above** using the same `final-bf16` artifact and character-span evaluation chain. The difference measures test hardening and distribution shift, not model regression.
170
+
171
+ | Metric | v2 model / v2 test | ฮ” |
172
+ |---|---:|---:|
173
+ | micro F1 | 0.9336 | -2.63%p |
174
+ | macro F1 | 0.9308 | -2.94%p |
175
+ | ko strict micro F1 | 0.9441 | -1.21%p |
176
+ | ko macro F1 | 0.9416 | -1.53%p |
177
+ | en strict micro F1 | 0.9065 | -6.24%p |
178
+ | en macro F1 | 0.9017 | -6.14%p |
179
+ | **masking coverage** | **0.9964** | -0.16%p |
180
+ | **ko masking coverage** | **0.9956** | -0.31%p |
181
+ | **en masking coverage** | **0.9984** | +0.18%p |
182
+
183
+ * **Masking coverage stays โ‰ฅ0.9956 on the adversarial set** โ€” only 0.44% (ko) / 0.16% (en) of gold PII characters are uncovered; most strict-F1 losses are boundary or label-name errors, not leaks
184
+ * **English ADDRESS holds on hard boundary variants**: strict recall **0.983** on long-span address forms (state suffixes, unit/floor tails) that are heavily represented in this set
185
+ * **Weak-context person names are the main remaining leak channel**: ko `PERSON` strict recall 0.875 with 82 full-span misses (see Limitations)
186
+ * Label-swap errors (e.g. en `ACCOUNT_NUMBER` predicted as `GENERIC_ID`/`CARD_NUMBER`) keep **coverage 1.0** โ€” the value is still masked; only the label name is wrong
187
+
188
+ ## 2.3. Reading the numbers
189
+ Strict exact-match span-F1 on an adversarial test is a deliberately harsh score: a one-character boundary miss or a swapped label counts as a full error. For the product question โ€” *"how much PII text leaks through?"* โ€” masking coverage is the operative metric: **0.44% (ko) / 0.16% (en) of gold PII characters uncovered**, concentrated in weak-context person names.
190
+
191
+ <br>
192
+
193
+ ## 2.4. Limitations
194
+ * **One layer of defense** โ€” inherits the base model's positioning: not an anonymization or compliance guarantee. Deploy behind a regex backstop for fully structured identifiers (RRN patterns, card numbers, phones) and combine with policy-level controls.
195
+ * **Weak-context person names** โ€” Korean names without honorifics/particles or list-form values are the main miss channel (ko `PERSON` recall 0.875 on the adversarial set). Consider a recall-leaning Viterbi operating point in high-sensitivity deployments.
196
+ * **Alphanumeric ID confusion** โ€” `USER_ID`/`SECRET`/`GENERIC_ID`/`ACCOUNT_NUMBER` share surface forms; without cue words the label may swap (masking still applies โ€” coverage stays ~1.0).
197
+ * **Synthetic-only training & evaluation** โ€” no real customer text was used or evaluated. Real-world robustness (typos, slang, OCR noise) is unvalidated; shadow-mode rollout is recommended before enforcement.
198
+ * **Fixed label policy** โ€” the 18-label taxonomy is baked in at fine-tuning time; changing masking policy granularity requires re-fine-tuning (runtime keep/mask toggles must operate on these labels).
199
+ * **Context window** โ€” banded attention limits each token's context to ยฑ128 tokens; trained sequence regime is โ‰ค768 tokens (chunk longer documents).
200
+
201
+ <br>
202
+
203
+ # 3. Future Work
204
+ * **v3 data** โ€” weak-context person-name hard positives, cue-word diversification for the alphanumeric ID group, privacy-safe failure-collection loop from shadow operation
205
+ * **Operating point** - recall-leaning Viterbi transition biases tuned on validation or a dedicated calibration set without Golden Set feedback
206
+ * **Serving** - target-hardware latency, throughput and memory benchmarks for the separately published INT8 weight-only ONNX artifact
207
+
208
+ <br>
209
+
210
+ # 4. Meta Info
211
+ ## 4.1. Citation
212
+ ```bibtex
213
+ @misc{bccard2026moaiprivacyfilter,
214
+ title = {MoAI-Privacy-Filter: A Korean Finance-Domain PII Detection Model},
215
+ author = {BC Card AX Team},
216
+ year = {2026},
217
+ howpublished = {https://huggingface.co/BCCard/MoAI-Privacy-Filter},
218
+ note = {Full fine-tune of openai/privacy-filter for Korean/English PII masking in the BC Card domain}
219
+ }
220
+ ```
221
+
222
+ ## 4.2. See Also
223
+ * **Base model**: [`openai/privacy-filter`](https://huggingface.co/openai/privacy-filter)
224
+ * **INT8 ONNX artifact**: [`BCCard/MoAI-Privacy-Filter-INT8`](https://huggingface.co/BCCard/MoAI-Privacy-Filter-INT8)
225
+ * **Training dataset**: [`BCCard/pii-masking-openpii-finance`](https://huggingface.co/datasets/BCCard/pii-masking-openpii-finance)
226
+ * **Source data attribution**: `ai4privacy/pii-masking-openpii-1.5m` (CC-BY-4.0)
227
+
228
+ <br>
config.json ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "OpenAIPrivacyFilterForTokenClassification"
4
+ ],
5
+ "attention_bias": true,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": null,
8
+ "classifier_dropout": 0.0,
9
+ "default_n_ctx": 128000,
10
+ "dtype": "bfloat16",
11
+ "eos_token_id": 199999,
12
+ "head_dim": 64,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 640,
15
+ "id2label": {
16
+ "0": "O",
17
+ "1": "B-PERSON",
18
+ "2": "I-PERSON",
19
+ "3": "E-PERSON",
20
+ "4": "S-PERSON",
21
+ "5": "B-RRN",
22
+ "6": "I-RRN",
23
+ "7": "E-RRN",
24
+ "8": "S-RRN",
25
+ "9": "B-FRN",
26
+ "10": "I-FRN",
27
+ "11": "E-FRN",
28
+ "12": "S-FRN",
29
+ "13": "B-CARD_NUMBER",
30
+ "14": "I-CARD_NUMBER",
31
+ "15": "E-CARD_NUMBER",
32
+ "16": "S-CARD_NUMBER",
33
+ "17": "B-ACCOUNT_NUMBER",
34
+ "18": "I-ACCOUNT_NUMBER",
35
+ "19": "E-ACCOUNT_NUMBER",
36
+ "20": "S-ACCOUNT_NUMBER",
37
+ "21": "B-SECRET",
38
+ "22": "I-SECRET",
39
+ "23": "E-SECRET",
40
+ "24": "S-SECRET",
41
+ "25": "B-USER_ID",
42
+ "26": "I-USER_ID",
43
+ "27": "E-USER_ID",
44
+ "28": "S-USER_ID",
45
+ "29": "B-EMAIL",
46
+ "30": "I-EMAIL",
47
+ "31": "E-EMAIL",
48
+ "32": "S-EMAIL",
49
+ "33": "B-PHONE",
50
+ "34": "I-PHONE",
51
+ "35": "E-PHONE",
52
+ "36": "S-PHONE",
53
+ "37": "B-PASSPORT",
54
+ "38": "I-PASSPORT",
55
+ "39": "E-PASSPORT",
56
+ "40": "S-PASSPORT",
57
+ "41": "B-DRIVER_LICENSE",
58
+ "42": "I-DRIVER_LICENSE",
59
+ "43": "E-DRIVER_LICENSE",
60
+ "44": "S-DRIVER_LICENSE",
61
+ "45": "B-GENERIC_ID",
62
+ "46": "I-GENERIC_ID",
63
+ "47": "E-GENERIC_ID",
64
+ "48": "S-GENERIC_ID",
65
+ "49": "B-ADDRESS",
66
+ "50": "I-ADDRESS",
67
+ "51": "E-ADDRESS",
68
+ "52": "S-ADDRESS",
69
+ "53": "B-ZIPCODE",
70
+ "54": "I-ZIPCODE",
71
+ "55": "E-ZIPCODE",
72
+ "56": "S-ZIPCODE",
73
+ "57": "B-DATE",
74
+ "58": "I-DATE",
75
+ "59": "E-DATE",
76
+ "60": "S-DATE",
77
+ "61": "B-CARD_EXPIRY",
78
+ "62": "I-CARD_EXPIRY",
79
+ "63": "E-CARD_EXPIRY",
80
+ "64": "S-CARD_EXPIRY",
81
+ "65": "B-CVC",
82
+ "66": "I-CVC",
83
+ "67": "E-CVC",
84
+ "68": "S-CVC",
85
+ "69": "B-IPIN",
86
+ "70": "I-IPIN",
87
+ "71": "E-IPIN",
88
+ "72": "S-IPIN"
89
+ },
90
+ "initial_context_length": 4096,
91
+ "initializer_range": 0.02,
92
+ "intermediate_size": 640,
93
+ "label2id": {
94
+ "B-ACCOUNT_NUMBER": 17,
95
+ "B-ADDRESS": 49,
96
+ "B-CARD_EXPIRY": 61,
97
+ "B-CARD_NUMBER": 13,
98
+ "B-CVC": 65,
99
+ "B-DATE": 57,
100
+ "B-DRIVER_LICENSE": 41,
101
+ "B-EMAIL": 29,
102
+ "B-FRN": 9,
103
+ "B-GENERIC_ID": 45,
104
+ "B-IPIN": 69,
105
+ "B-PASSPORT": 37,
106
+ "B-PERSON": 1,
107
+ "B-PHONE": 33,
108
+ "B-RRN": 5,
109
+ "B-SECRET": 21,
110
+ "B-USER_ID": 25,
111
+ "B-ZIPCODE": 53,
112
+ "E-ACCOUNT_NUMBER": 19,
113
+ "E-ADDRESS": 51,
114
+ "E-CARD_EXPIRY": 63,
115
+ "E-CARD_NUMBER": 15,
116
+ "E-CVC": 67,
117
+ "E-DATE": 59,
118
+ "E-DRIVER_LICENSE": 43,
119
+ "E-EMAIL": 31,
120
+ "E-FRN": 11,
121
+ "E-GENERIC_ID": 47,
122
+ "E-IPIN": 71,
123
+ "E-PASSPORT": 39,
124
+ "E-PERSON": 3,
125
+ "E-PHONE": 35,
126
+ "E-RRN": 7,
127
+ "E-SECRET": 23,
128
+ "E-USER_ID": 27,
129
+ "E-ZIPCODE": 55,
130
+ "I-ACCOUNT_NUMBER": 18,
131
+ "I-ADDRESS": 50,
132
+ "I-CARD_EXPIRY": 62,
133
+ "I-CARD_NUMBER": 14,
134
+ "I-CVC": 66,
135
+ "I-DATE": 58,
136
+ "I-DRIVER_LICENSE": 42,
137
+ "I-EMAIL": 30,
138
+ "I-FRN": 10,
139
+ "I-GENERIC_ID": 46,
140
+ "I-IPIN": 70,
141
+ "I-PASSPORT": 38,
142
+ "I-PERSON": 2,
143
+ "I-PHONE": 34,
144
+ "I-RRN": 6,
145
+ "I-SECRET": 22,
146
+ "I-USER_ID": 26,
147
+ "I-ZIPCODE": 54,
148
+ "O": 0,
149
+ "S-ACCOUNT_NUMBER": 20,
150
+ "S-ADDRESS": 52,
151
+ "S-CARD_EXPIRY": 64,
152
+ "S-CARD_NUMBER": 16,
153
+ "S-CVC": 68,
154
+ "S-DATE": 60,
155
+ "S-DRIVER_LICENSE": 44,
156
+ "S-EMAIL": 32,
157
+ "S-FRN": 12,
158
+ "S-GENERIC_ID": 48,
159
+ "S-IPIN": 72,
160
+ "S-PASSPORT": 40,
161
+ "S-PERSON": 4,
162
+ "S-PHONE": 36,
163
+ "S-RRN": 8,
164
+ "S-SECRET": 24,
165
+ "S-USER_ID": 28,
166
+ "S-ZIPCODE": 56
167
+ },
168
+ "max_position_embeddings": 131072,
169
+ "model_type": "openai_privacy_filter",
170
+ "num_attention_heads": 14,
171
+ "num_experts_per_tok": 4,
172
+ "num_hidden_layers": 8,
173
+ "num_key_value_heads": 2,
174
+ "num_local_experts": 128,
175
+ "output_router_logits": false,
176
+ "pad_token_id": 199999,
177
+ "rms_norm_eps": 1e-05,
178
+ "rope_parameters": {
179
+ "beta_fast": 32.0,
180
+ "beta_slow": 1.0,
181
+ "factor": 32.0,
182
+ "original_max_position_embeddings": 4096,
183
+ "rope_theta": 150000.0,
184
+ "rope_type": "yarn",
185
+ "truncate": false
186
+ },
187
+ "router_aux_loss_coef": 0.001,
188
+ "sliding_window": 128,
189
+ "tie_word_embeddings": false,
190
+ "transformers.js_config": {
191
+ "use_external_data_format": {
192
+ "model": 1,
193
+ "model.onnx": 3,
194
+ "model_fp16.onnx": 2
195
+ }
196
+ },
197
+ "transformers_version": "5.13.1",
198
+ "use_cache": false,
199
+ "vocab_size": 200064
200
+ }
figures/evaluation-test-1-1.png ADDED

Git LFS Details

  • SHA256: 0481eb0a53ab6e5699c87fd53a1c855c688d3f22532edb563a815d90419040d1
  • Pointer size: 131 Bytes
  • Size of remote file: 245 kB
figures/evaluation-train-1-1.png ADDED

Git LFS Details

  • SHA256: a5e0badc81ac4a9e613f34875a65e70a57ea37b3de4fad748cf7f9f89c40c646
  • Pointer size: 131 Bytes
  • Size of remote file: 119 kB
label-taxonomy.yaml ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # =============================================================================
2
+ # Label Mapping - ai4privacy 1.5m ๋ผ๋ฒจ -> ๋‚ด๋ถ€ ํ•™์Šต ๋ผ๋ฒจ ๋งคํ•‘ ํ…Œ์ด๋ธ”
3
+ #
4
+ # * ์—ญํ• : ๋ชจ๋ธ ํ•™์Šต ๋ผ๋ฒจ = ๋กœ๊น… ์Šคํ‚ค๋งˆ ํ‚ค = ์ •์ฑ… ํ…Œ์ด๋ธ” ํ‚ค์˜ ๋‹จ์ผ ์†Œ์Šค
5
+ # (docs/handoff/2026-07-03-pii-masking-architecture-qna.md [13])
6
+ # * ์—ญ์‚ฐ ๊ทผ๊ฑฐ: playbooks/privacy_filter/privacy-filter-policy.md (ํ‘œ 1 ์ •ํ˜• ํŒจํ„ด / ํ‘œ 2 ๋งˆ์Šคํ‚น ๊ธฐ์ค€)
7
+ # * ์‹ค์ธก ๊ทผ๊ฑฐ: docs/handoff/2026-07-03-ai4privacy-1p5m-ko-audit.md (v0 ์ดˆ์•ˆ + ko ์„œ๋ธŒ์…‹ ๊ฐ์‚ฌ)
8
+ # * v0 -> v1 ๋ณ€๊ฒฝ: ์ฃผ์†Œ ์ฒ˜๋ฆฌ ํ™•์ •(๋‹จ์ผ+์„œ๋ธŒ๋งˆ์Šคํ‚น) / FRN ์‹ ์„ค / USER_IDยทACCOUNT_NUMBER
9
+ # ๋“œ๋กญ ์ฒ ํšŒ / ์—ฌ๊ถŒยท์šด์ „๋ฉดํ—ˆ ๋ถ„๋ฆฌ ์œ ์ง€ / regex ์ „๋‹ด ํ•ญ๋ชฉ ๋ถ„๋ฆฌ
10
+ # * 2026-07-21: AGEยทGENDER ๋“œ๋กญ ํ™•์ • (ํ‘œ1ยทํ‘œ2 ๋ฌด๊ทผ๊ฑฐ - ์ •์ฑ… ์—ญ์‚ฐ ์›์น™ ๊ด€์ฒ , N=17 -> 15)
11
+ # * 2026-07-21: ํ‘œ2 ๋ฌธ๋งฅ ํ•ญ๋ชฉ 3์ข… ๋ชจ๋ธ ์Šน๊ฒฉ (CARD_EXPIRYยทCVCยทIPIN - ๋ฌธ๋งฅ ๊ฒ€์ถœ์€ ๋ชจ๋ธ ๋ ˆ์ธ
12
+ # ๋ณธ๋ น, ํ‚ค์›Œ๋“œ regex๋Š” ์ด์ค‘ ๋ ˆ์ธ ๋ณ‘ํ–‰. N=15 -> 18, 61 -> 73ํด๋ž˜์Šค)
13
+ # =============================================================================
14
+
15
+ version: v1
16
+ date: 2026-07-21
17
+ basis:
18
+ policy: playbooks/privacy_filter/privacy-filter-policy.md
19
+ audit: docs/handoff/2026-07-03-ai4privacy-1p5m-ko-audit.md
20
+
21
+ # -----------------------------------------------------------------------------
22
+ # 1. ๋ชจ๋ธ ํ•™์Šต ๋ผ๋ฒจ (N=18 -> BIOES 4N+1 = 73ํด๋ž˜์Šค)
23
+ # * data_source: ๋ผ๋ฒจ ํ‘œ๋ณธ์˜ ์ถœ์ฒ˜ ๋ฆฌ์ŠคํŠธ - ko(1.5m-ko ์ •์ œ๋ณธ) / en(1.5m-en ๋ฆฌํ”Œ๋ ˆ์ด) /
24
+ # domain(๋„๋ฉ”์ธ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ ๋Œ€๊ธฐ - ํ—ค๋“œ๋Š” ์œ ์‚ฌ ๋ผ๋ฒจ ํ–‰ ๋ณต์‚ฌ๋กœ init)
25
+ # * RRN์˜ 1.5m ์œ ๋ž˜๋ถ„์€ ko ํ•œ์ • (en TAXNUM์€ GENERIC_ID fallback) - domain์€ ์ฆ๊ฐ• ๋ฐฉ์‹ B
26
+ # * en ๋ถ„ํฌ ์‹ค์ธก (2026-07-13, 163,740ํ–‰/1,247,393์ŠคํŒฌ): ์ƒ์œ„ 19์ข… ์ง‘์ค‘ - PASSWORD 0,
27
+ # ACCOUNTNUM 1, USERNAME 20 -> "ํฌ์†Œ ๋ผ๋ฒจ์€ en ๋‹ด๋‹น" ๊ฐ€์„ค ๊ธฐ๊ฐ, [domain] ์žฌ๋ฐฐ์ •
28
+ # -----------------------------------------------------------------------------
29
+ model_labels:
30
+ - name: PERSON
31
+ description: ์„ฑ๋ช… (์„ฑ+์ด๋ฆ„ ๋ณ‘ํ•ฉ ๋‹จ์ผ ์ŠคํŒฌ)
32
+ policy_ref: "ํ‘œ2 ์„ฑ๋ช… (๊น€*์šฉ - ์ฒซยท๋ ๊ธ€์ž ์ œ์™ธ) / ํ‘œ2 ์„ฑ๋ช…(์˜๋ฌธ) (์•ž 4์ž๋ฆฌ ๋…ธ์ถœ) - ์น˜ํ™˜ ์‹œ ์Šคํฌ๋ฆฝํŠธ(ํ•œ๊ธ€/์˜๋ฌธ)๋กœ ๊ทœ์น™ ๋ถ„๊ธฐ, full-span ๊ฒฝ๊ณ„ ํ•„์ˆ˜"
33
+ data_source: [ko, en]
34
+ head_init_base: private_person
35
+ - name: RRN
36
+ description: ์ฃผ๋ฏผ๋“ฑ๋ก๋ฒˆํ˜ธ
37
+ policy_ref: "ํ‘œ1 ์ฃผ๋ฏผ๋ฒˆํ˜ธ / ํ‘œ2 ์ฃผ๋ฏผ๋“ฑ๋ก๋ฒˆํ˜ธ (๋’ค 7์ž๋ฆฌ ๋งˆ์Šคํ‚น)"
38
+ data_source: [ko, domain] # domain = ์ฆ๊ฐ• ๋ฐฉ์‹ B ์‹ ๊ทœ ์ƒ์„ฑ๋ถ„ (์ „๋žต๋ฌธ ยง3.3.1)
39
+ head_init_base: account_number
40
+ - name: FRN
41
+ description: ์™ธ๊ตญ์ธ๋“ฑ๋ก๋ฒˆํ˜ธ (์‹ ์„ค - 1.5m ์†Œ์Šค 0๊ฑด)
42
+ policy_ref: "ํ‘œ1 ์™ธ๊ตญ์ธ๋“ฑ๋ก๋ฒˆํ˜ธ ([5-8] ์‹œ์ž‘) / ํ‘œ2 ์ฃผ๋ฏผ๋“ฑ๋ก๋ฒˆํ˜ธ(์™ธ๊ตญ์ธ๋“ฑ๋ก๋ฒˆํ˜ธ ํฌํ•จ) (๋’ค 7์ž๋ฆฌ)"
43
+ data_source: [domain]
44
+ head_init_from: RRN
45
+ - name: CARD_NUMBER
46
+ description: ์‹ ์šฉ/์ฒดํฌ์นด๋“œ ๋ฒˆํ˜ธ
47
+ policy_ref: "ํ‘œ1 ์นด๋“œ๋ฒˆํ˜ธ / ํ‘œ2 ์นด๋“œ๋ฒˆํ˜ธ (7~12๋ฒˆ์งธ ์ž๋ฆฌ, PCI-DSS)"
48
+ data_source: [ko, en, domain] # domain = ์ฆ๊ฐ• ๋ฐฉ์‹ B ์‹ ๊ทœ ์ƒ์„ฑ๋ถ„ (์ „๋žต๋ฌธ ยง3.3.1)
49
+ head_init_base: account_number
50
+ - name: ACCOUNT_NUMBER
51
+ description: ๊ณ„์ขŒ๋ฒˆํ˜ธ (v0 ๋“œ๋กญ ์ฒ ํšŒ - ํ‘œ2 ๋งˆ์Šคํ‚น ๊ธฐ์ค€ ์กด์žฌ)
52
+ policy_ref: "ํ‘œ1 ๊ณ„์ขŒ๋ฒˆํ˜ธ (์ „ํ™”๋ฒˆํ˜ธ ํก์ˆ˜ ์œ„ํ—˜ - recognizer ์šฐ์„ ์ˆœ์œ„ ํ•„์š”) / ํ‘œ2 ๊ณ„์ขŒ๋ฒˆํ˜ธ (๋’ค 5์ž๋ฆฌ)"
53
+ data_source: [domain] # ko 5ยทen 1๊ฑด ์‹ค์ธก - ํ•ฉ์„ฑ ์ฆ๊ฐ• ํ•„์ˆ˜ (์€ํ–‰๋ณ„ ํฌ๋งท ๊ทœ์น™ ์ƒ์„ฑ ์šฉ์ด)
54
+ head_init_base: account_number
55
+ - name: SECRET
56
+ description: ์ธ์ฆ ์‹œํฌ๋ฆฟ (๋น„๋ฐ€๋ฒˆํ˜ธยทAPI ํ‚คยทํ† ํฐ ํ†ตํ•ฉ - ์นด๋“œ/ํšŒ์›/ISP ๊ตฌ๋ถ„์€ ๋ฌธ๋งฅ ๋ถˆ๊ฐ€ + ์•ก์…˜ ๋™์ผ)
57
+ policy_ref: "ํ‘œ2 ์นด๋“œ๋น„๋ฐ€๋ฒˆํ˜ธยท์˜จ๋ผ์ธ ํšŒ์› ํŒจ์Šค์›Œ๋“œยทISP๋น„๋ฐ€๋ฒˆํ˜ธ (์ฒ˜๋ฆฌ ๊ธˆ์ง€ -> ๊ฒŒ์ดํŠธ์›จ์ด์—์„œ๋Š” LLM ๋…ธ์ถœ ๊ธˆ์ง€ = ์ „์ฒด ๋งˆ์Šคํ‚น์œผ๋กœ ํ•ด์„)"
58
+ data_source: [domain] # 1.5m ์ „๋ฌด (ko 4ยทen 0 ์‹ค์ธก) - ๋„๋ฉ”์ธ/ํ•ฉ์„ฑ ์ฆ๊ฐ• ์ „๋‹ด
59
+ head_init_base: secret # base 8์ข… ์ค‘ secret ํ–‰ ์ •ํ™• ๋ณต์‚ฌ (์ธ์ ‘ ์•„๋‹Œ ์ง๊ณ„ ์ƒ์†)
60
+ - name: USER_ID
61
+ description: ์˜จ๋ผ์ธ ํšŒ์› ID (v0 ๋“œ๋กญ ์ฒ ํšŒ - ํ‘œ2 ๋งˆ์Šคํ‚น ๊ธฐ์ค€ ์กด์žฌ)
62
+ policy_ref: "ํ‘œ2 ์˜จ๋ผ์ธ ํšŒ์› ID (์•ž 2์ž๋ฆฌ ์ œ์™ธ)"
63
+ data_source: [domain] # ko 4ยทen 20๊ฑด ์‹ค์ธก - ์ฆ๊ฐ• ํ•„์ˆ˜
64
+ head_init_base: account_number
65
+ - name: EMAIL
66
+ description: ์ด๋ฉ”์ผ ์ฃผ์†Œ
67
+ policy_ref: "ํ‘œ1 ์ด๋ฉ”์ผ / ํ‘œ2 ์ด๋ฉ”์ผ์ฃผ์†Œ (ID ์•ž 2์ž๋ฆฌ ์ œ์™ธ ๋งˆ์Šคํ‚น)"
68
+ data_source: [ko, en]
69
+ head_init_base: private_email
70
+ - name: PHONE
71
+ description: ์ „ํ™”๋ฒˆํ˜ธ (ํœด๋Œ€ํฐ/์ผ๋ฐ˜์ „ํ™” ํ†ตํ•ฉ - ์น˜ํ™˜ ๋‹จ๊ณ„์—์„œ ํ”„๋ฆฌํ”ฝ์Šค๋กœ ์žฌ๋ถ„๋ฅ˜)
72
+ policy_ref: "ํ‘œ1 ํœด๋Œ€ํฐ๋ฒˆํ˜ธยท์ „ํ™”๋ฒˆํ˜ธ / ํ‘œ2 ๊ธฐ๋ณธ ๋’ค 6์ž๋ฆฌ ๊ณตํ†ต - ๋‚ด๋ถ€๋ง ์ฑ„๋„ ํ•œ์ • ํœด๋Œ€ํฐ
73
+ ๋’ค 4์ž๋ฆฌ ์™„ํ™” (์น˜ํ™˜ ์‹œ ๊ฐ’ ํ”„๋ฆฌํ”ฝ์Šค๋กœ ํœด๋Œ€ํฐ ํŒ๋ณ„ + ์ฑ„๋„ ์ถ• ๋ถ„๊ธฐ)"
74
+ data_source: [ko, en]
75
+ head_init_base: private_phone
76
+ - name: PASSPORT
77
+ description: ์—ฌ๊ถŒ๋ฒˆํ˜ธ (๋ถ„๋ฆฌ ์œ ์ง€ - ๋งˆ์Šคํ‚น ๊ธฐ์ค€ ์ƒ์ด + ko 3,211๊ฑด)
78
+ policy_ref: "ํ‘œ1 ์—ฌ๊ถŒ๋ฒˆํ˜ธ / ํ‘œ2 ์—ฌ๊ถŒ๋ฒˆํ˜ธ (๋’ค 4์ž๋ฆฌ)"
79
+ data_source: [ko, en]
80
+ head_init_base: account_number
81
+ - name: DRIVER_LICENSE
82
+ description: ์šด์ „๋ฉดํ—ˆ๋ฒˆํ˜ธ (๋ถ„๋ฆฌ ์œ ์ง€ - ๋งˆ์Šคํ‚น ๊ธฐ์ค€ ์ƒ์ด + ko 4,092๊ฑด)
83
+ policy_ref: "ํ‘œ1 ์šด์ „๋ฉดํ—ˆ๋ฒˆํ˜ธ / ํ‘œ2 ์šด์ „๋ฉดํ—ˆ๋ฒˆํ˜ธ (์ค‘๊ฐ„ 6์ž๋ฆฌ)"
84
+ data_source: [ko, en]
85
+ head_init_base: account_number
86
+ - name: GENERIC_ID
87
+ description: ๋ฒ”์šฉ ์‹๋ณ„์ž (ํ•œ๊ตญ ๋Œ€์‘๋ฌผ ์—†๋Š” ID๋ฅ˜ - recall-first๋กœ O ๋Œ€์‹  ์œ ์ง€)
88
+ policy_ref: "audit ยง5 (SOCIALNUM 10์ž๋ฆฌยทIDCARDNUM ์˜์ˆซ์ž)"
89
+ data_source: [ko, en]
90
+ head_init_base: account_number
91
+ - name: ADDRESS
92
+ description: ์ฃผ์†Œ (์‹œยท๋„๋กœ๋ช…ยท๊ฑด๋ฌผ๋ฒˆํ˜ธ ํ†ตํ•ฉ ์ŠคํŒฌ - ์น˜ํ™˜ ๋‹จ๊ณ„์—์„œ ์ˆซ์ž ์„œ๋ธŒ๋งˆ์Šคํ‚น)
93
+ policy_ref: "ํ‘œ2 ์ฃผ์†Œ (์ง€๋ฒˆ: ์/๋ฉด/๋™ ๋ฏธ๋งŒ ์ˆซ์ž / ๋„๋กœ๋ช…: ๊ฑด๋ฌผ๋ฒˆํ˜ธยท์ƒ์„ธ์ฃผ์†Œ ์ˆซ์ž ๋งˆ์Šคํ‚น -> ์ŠคํŒฌ ๋‚ด ๊ทœ์น™ ์น˜ํ™˜)"
94
+ data_source: [ko, en]
95
+ head_init_base: private_address
96
+ - name: ZIPCODE
97
+ description: ์šฐํŽธ๋ฒˆํ˜ธ (๋ถ„๋ฆฌ ์œ ์ง€ - keep ํ† ๊ธ€ ์„ธ๋ถ„์„ฑ ์ „์ œ)
98
+ policy_ref: "handoff [10] ZIPCODE keep ์‹ค์ฆ"
99
+ data_source: [ko, en]
100
+ head_init_base: private_address
101
+ - name: DATE
102
+ description: ๋‚ ์งœยท์‹œ๊ฐ (์ƒ๋…„์›”์ผ ๋ฏธ๋ถ„๋ฆฌ - ko ๋ฐ์ดํ„ฐ DOB 0๊ฑด + ๊ณผ์ž‰ ๋งˆ์Šคํ‚น ์ค€์ˆ˜ ์ธ์ • ์กฐํ•ญ)
103
+ policy_ref: "ํ‘œ2 ์ƒ๋…„์›”์ผ (๋…ธ์ถœ ๊ธˆ์ง€ - DATE ์ „์ฒด ๋งˆ์Šคํ‚น์œผ๋กœ ์ดˆ๊ณผ ์ค€์ˆ˜)"
104
+ data_source: [ko, en]
105
+ head_init_base: private_date
106
+ - name: CARD_EXPIRY
107
+ description: ์นด๋“œ์œ ํšจ๊ธฐํ•œ (ํ‘œ2 ๋ฌธ๋งฅ ํ•ญ๋ชฉ ์Šน๊ฒฉ 2026-07-21 - ํ‚ค์›Œ๋“œ regex ์ด์ค‘ ๋ ˆ์ธ ๋ณ‘ํ–‰)
108
+ policy_ref: "ํ‘œ2 ์นด๋“œ์œ ํšจ๊ธฐํ•œ (**/** ์ „์ฒด ๋งˆ์Šคํ‚น)"
109
+ data_source: [domain] # 1.5m ์›์ฒœ 0๊ฑด - ์ฆ๊ฐ• ์ „๋‹ด (PAN ๋™๋ฐ˜ ๋ฌธ๋งฅ ์ƒ์„ฑ)
110
+ head_init_base: private_date
111
+ - name: CVC
112
+ description: ์นด๋“œ๊ฒ€์ฆ์ฝ”๋“œ (CVC/CVV/CAV ํ†ตํ•ฉ - ํ‘œ2 ๋ฌธ๋งฅ ํ•ญ๋ชฉ ์Šน๊ฒฉ 2026-07-21)
113
+ policy_ref: "ํ‘œ2 ์นด๋“œ๊ฒ€์ฆ์ฝ”๋“œ (์ €์žฅยท์ถœ๋ ฅ ๊ธˆ์ง€ -> ๊ฒŒ์ดํŠธ์›จ์ด ์ „์ฒด ๋งˆ์Šคํ‚น ํ•ด์„)"
114
+ data_source: [domain] # 1.5m ์›์ฒœ 0๊ฑด - ์ฆ๊ฐ• ์ „๋‹ด (๋‹จ๋… ์ƒ์„ฑ ๊ธˆ์ง€ - PAN ๋™๋ฐ˜ ํ•„์ˆ˜)
115
+ head_init_base: account_number
116
+ - name: IPIN
117
+ description: I-PIN ๋ฒˆํ˜ธ (ํ‘œ2 ๋ฌธ๋งฅ ํ•ญ๋ชฉ ์Šน๊ฒฉ 2026-07-21 - ๊ฐ’ ๊ทœ๊ฒฉ pending)
118
+ policy_ref: "ํ‘œ2 I-PIN (๋’ค 5์ž๋ฆฌ - ํ•˜์ดํ”ˆ ๋ฌด๊ด€ ์ˆซ์ž ๊ธฐ์ค€)"
119
+ data_source: [domain] # 1.5m ์›์ฒœ 0๊ฑด - ๊ทœ๊ฒฉ ํ™•์ • ์ „ ํŒŒ์ผ๋Ÿฟ ์ˆ˜๋Ÿ‰๋งŒ
120
+ head_init_base: account_number
121
+
122
+ # -----------------------------------------------------------------------------
123
+ # 2. ์†Œ์Šค ๋ผ๋ฒจ ๋งคํ•‘ (ai4privacy 1.5m -> ๋‚ด๋ถ€ ๋ผ๋ฒจ)
124
+ # * "O" = ํ•™์Šต์—์„œ ๋น„์—”ํ‹ฐํ‹ฐ ์ฒ˜๋ฆฌ (๋“œ๋กญ ๋ฆฌ์ŠคํŠธ - ์ •์ฑ…ํŒ€ ์ปจํŽŒ ํ›„ ํ™•์ •)
125
+ # * ์กฐ๊ฑด๋ถ€ ๋งคํ•‘์€ locale + value_pattern ์•ˆ์ „์žฅ์น˜ ๋™๋ฐ˜
126
+ # -----------------------------------------------------------------------------
127
+ source_mapping: # <source_mapping>
128
+ GIVENNAME: PERSON
129
+ SURNAME: PERSON
130
+ TITLE: O # ๊ตฐ/์–‘/gun/yang ์ง์—ญ ์กด์นญ 88% - ์ „๋Ÿ‰ ๋“œ๋กญ
131
+ TAXNUM:
132
+ label: RRN # <conditional_mapping>
133
+ condition:
134
+ locale: ko
135
+ value_pattern: '^\d{6}-[1-4]\d{6}$' # ์‹ค์ธก 3,975/3,975 ์ •ํ•ฉ - ์•ˆ์ „์žฅ์น˜
136
+ fallback: GENERIC_ID # ๋น„์ •ํ•ฉ ๊ฐ’ / ํƒ€ ๋กœ์ผ€์ผ(en ๋ฆฌํ”Œ๋ ˆ์ด)์€ ์„ธ๋ฌด ID -> ๋ฒ”์šฉ ID
137
+ SOCIALNUM: GENERIC_ID
138
+ IDCARDNUM: GENERIC_ID
139
+ DRIVERLICENSENUM: DRIVER_LICENSE
140
+ PASSPORTNUM: PASSPORT
141
+ TELEPHONENUM: PHONE
142
+ EMAIL: EMAIL
143
+ CREDITCARDNUMBER: CARD_NUMBER
144
+ ACCOUNTNUM: ACCOUNT_NUMBER
145
+ CITY: ADDRESS
146
+ STREET: ADDRESS
147
+ BUILDINGNUM: ADDRESS
148
+ ZIPCODE: ZIPCODE
149
+ DATE: DATE
150
+ TIME: DATE
151
+ AGE: O # 2026-07-21 ๋“œ๋กญ ํ™•์ • - ํ‘œ1ยทํ‘œ2 ๋ฌด๊ทผ๊ฑฐ (quasi-identifier ์กด์น˜์•ˆ ํ๊ธฐ)
152
+ GENDER: O # ใ€ƒ
153
+ SEX: O # ใ€ƒ (GENDER ์ค‘๋ณต ์†Œ์Šค)
154
+ USERNAME: USER_ID
155
+ PASSWORD: SECRET # ko 4ยทen 0๊ฑด - ์‹œ๋“œ ๋ฏธ๋ฏธ, ๋ณธ ํ‘œ๋ณธ์€ ๋„๋ฉ”์ธ/ํ•ฉ์„ฑ ์ฆ๊ฐ•
156
+ # ๋กฑํ…Œ์ผ (ko <= 40๊ฑด, ํ•™์Šต ๋ผ๋ฒจ ๋ถ€์ ๊ฒฉ) - ์ •์ฑ…ํŒ€ ์ปจํŽŒ ๋Œ€๊ธฐ ๋“œ๋กญ ๋ฆฌ์ŠคํŠธ
157
+ ORGANISATION: O
158
+ URL: O
159
+ AMOUNT: O
160
+ COUNTRY: O
161
+ CURRENCY: O
162
+ BANKNAME: O
163
+ TIMEZONE: O
164
+ SALARY: O
165
+ IPV4: O # ๊ณ ๊ฐ IP๋Š” ํ‘œ2 ํ•ญ๋ชฉ์ด๋‚˜ ko 2๊ฑด - 1์ฐจ regex(ํ‘œ1 IP์ฃผ์†Œ) ์ „๋‹ด
166
+ JOBTITLE: O
167
+ HOSPITALNAME: O
168
+ ALLERGIES: O
169
+ WEIGHT: O # en ์ „์šฉ ๋ผ๋ฒจ (ko 0๊ฑด) - 2026-07-13 en ์ „์ˆ˜ ๊ฒ€์ฆ์—์„œ ๋ฐœ๊ฒฌ, ์ •์ฑ… ์™ธ
170
+ HEIGHT: O # validation ์ „์šฉ ํฌ์†Œ ๋ผ๋ฒจ (ko 1๊ฑด + en 1๊ฑด) - 2026-07-22 refine fail-fast๋กœ ๋ฐœ๊ฒฌ, ์ •์ฑ… ์™ธ
171
+
172
+ # -----------------------------------------------------------------------------
173
+ # 3. ๋ณ‘ํ•ฉ ๊ทœ์น™ (์ •์ œ ์Šคํฌ๋ฆฝํŠธ 2๋‹จ๊ณ„ - ์ธ์ ‘ ์ŠคํŒฌ ๋ณ‘ํ•ฉ, koยทen ๊ณตํ†ต)
174
+ # * ๋ณ‘ํ•ฉ์€ ์–ธ์–ด ๊ณตํ†ต (en "John Smith"๋„ ๋‹จ์ผ ์ŠคํŒฌ์ด์–ด์•ผ ํ‘œ2 ์˜๋ฌธ ์„ฑ๋ช… ๊ทœ์น™ ์„ฑ๋ฆฝ)
175
+ # * ko ์ „์šฉ์€ ๋ณ‘ํ•ฉ์ด ์•„๋‹ˆ๋ผ ๊ทธ ๋‹ค์Œ์˜ "์ž์—ฐํ™”"(์„ฑ+๋ช… ๋ถ™์—ฌ์“ฐ๊ธฐ - ์ „๏ฟฝ๏ฟฝ๋ฌธ ยง3.4.2 (1) 2๋‹จ๊ณ„)
176
+ # * ์ˆœ์„œ ๊ฐ•์ œ ๊ธˆ์ง€: ko ์ฃผ์†Œ๋Š” ํฐ -> ์ž‘, en ์ฃผ์†Œ๋Š” ์ž‘ -> ํฐ ์—ญ์ˆœ - ์ธ์ ‘์„ฑ๋งŒ ์กฐ๊ฑด
177
+ #
178
+ # * gap_allowed : ๋‘ ์—”ํ‹ฐํ‹ฐ ์‚ฌ์ด์˜ ์ธ์‹ยทํ—ˆ์šฉ์ด ๊ฐ€๋Šฅํ•œ ๊ตฌ์กฐ ๋ฐ ํŒจํ„ด
179
+ # - whitespace (๊ณต๋ฐฑยทํƒญ)
180
+ # - punct (๊ตฌ๋‘์  : `, . - ยท / ( )` ๋“ฑ ๋ฌธ์žฅ ๋ถ€ํ˜ธ)
181
+ # -----------------------------------------------------------------------------
182
+ merge_rules: # <merge_rules>
183
+ person:
184
+ source_labels: [GIVENNAME, SURNAME]
185
+ max_gap_chars: 4
186
+ gap_allowed: whitespace_or_punct
187
+ output_label: PERSON
188
+ address:
189
+ source_labels: [CITY, STREET, BUILDINGNUM]
190
+ max_gap_chars: 4
191
+ gap_allowed: whitespace_or_punct
192
+ output_label: ADDRESS
193
+
194
+ # -----------------------------------------------------------------------------
195
+ # 4. 1์ฐจ regex ์ „๋‹ด ํ•ญ๋ชฉ (๋ชจ๋ธ ๋ผ๋ฒจ ์ œ์™ธ - ๋กœ๊น… ์Šคํ‚ค๋งˆ ํ‚ค์—๋Š” ํฌํ•จ)
196
+ # * ํ‘œ1 ์ •ํ˜• ํŒจํ„ด recognizer๊ฐ€ ๊ฒ€์ถœ, ์น˜ํ™˜ ์ •์ฑ…์€ ํ‘œ2 ์ค€์šฉ
197
+ # -----------------------------------------------------------------------------
198
+ regex_only:
199
+ - key: CI
200
+ policy_ref: "ํ‘œ1 CI (86์ž+`==` ๊ณ ์ •, lookaround ๊ฒฝ๊ณ„ - ๊ฒ€์ˆ˜ ๋ณด๊ฐ• 2026-07-21) / ํ‘œ2 CI (์•ž 7์ž๋ฆฌ ๋…ธ์ถœ)"
201
+ # SHA-512 base64 ๋™ํ˜• ๊ณผํƒ ํ—ˆ์šฉ - ์ •๋ฐ€๋„ ํ•„์š”์‹œ ciยท์—ฐ๊ณ„์ •๋ณด ํ‚ค์›Œ๋“œ ๊ฐ€์ 
202
+ - key: IP_ADDRESS
203
+ policy_ref: "ํ‘œ1 IP์ฃผ์†Œ (์˜ฅํ…Ÿ 0~255 ์—„๊ฒฉํ˜• - ๊ฒ€์ˆ˜ ๋ณด๊ฐ• 2026-07-21) / ํ‘œ2 ๊ณ ๊ฐ์˜ IP์ฃผ์†Œ (์•ž 3์ž๋ฆฌ = ์ฒซ ์˜ฅํ…Ÿ ๋งˆ์Šคํ‚น ํ•ด์„, IPv4 ํ•œ์ •)"
204
+
205
+ # -----------------------------------------------------------------------------
206
+ # 4-1. 1์ฐจ regex ๋ณ‘ํ–‰ (์ด์ค‘ ๋ ˆ์ธ) - ๋ชจ๋ธ ๋ผ๋ฒจ์ด๋ฉด์„œ ํ‚ค์›Œ๋“œ regex๋„ ๋ณ‘ํ–‰
207
+ # * 2026-07-21 ๋ชจ๋ธ ์Šน๊ฒฉ 3์ข…: ํ‚ค์›Œ๋“œ regex(๊ณ ์ •๋ฐ€ ์ €recall - ๋ช…์‹œ ๋ฌธํ˜•) + ๋ชจ๋ธ(๋ฌดํ‚ค์›Œ๋“œ
208
+ # ๋งฅ๋ฝ recall) union - ๋ฌธ๋งฅ ์˜์กด ๊ฒ€์ถœ์€ ๋ชจ๋ธ ๋ ˆ์ธ์˜ ์กด์žฌ ์ด์œ 
209
+ # * ํŒจํ„ด ์—”์ง„ ์ „์ œ: Python re (lookbehind ์‚ฌ์šฉ - RE2/Hyperscan ๊ณ„์—ด ๋น„ํ˜ธํ™˜)
210
+ # * ์น˜ํ™˜์€ ๊ฐ’ ์บก์ฒ˜๊ทธ๋ฃน๋งŒ (ํ‚ค์›Œ๋“œ ๋ณด์กด = ์ถ”์ ์„ฑ)
211
+ # -----------------------------------------------------------------------------
212
+ regex_assist:
213
+ - key: CARD_EXPIRY
214
+ patterns:
215
+ keyword: '(?i)(์œ ํšจ\s*๊ธฐ[๊ฐ„ํ•œ]|expir\w*|valid\s*thru)\D{0,12}(0[1-9]|1[0-2])\s*[/.\-]\s*((?:20)?\d\d)(?!\d)'
216
+ pan_adjacent: '(0[1-9]|1[0-2])\s*/\s*\d{2}(?!\d)' # ์นด๋“œ๋ฒˆํ˜ธ ๋งค์น˜ ์งํ›„ \D{0,20} ์œˆ๋„์šฐ ๋‚ด์—์„œ๋งŒ ์ ์šฉ
217
+ - key: CVC
218
+ patterns:
219
+ keyword: '(?i)(\b(?:cv[vc]2?|security\s*code)\b|์นด๋“œ\s*๊ฒ€์ฆ\s*(?:๋ฒˆํ˜ธ|์ฝ”๋“œ|๊ฐ’)?|๋ณด์•ˆ\s*์ฝ”๋“œ)\W{0,6}(?!(?:19|20)\d\d(?!\d))(\d{3,4})(?!\d)'
220
+ # CIDยทCSC ํ‚ค์›Œ๋“œ ๊ธฐ๋ณธ ์ œ์™ธ (correlation ID ์ถฉ๋Œ). ์ •๋ฐ€๋„ ์˜ต์…˜: PAN co-occurrence ๊ฒŒ์ดํŠธ
221
+ - key: IPIN
222
+ patterns:
223
+ keyword: '(?i)(์•„์ดํ•€|i[-\s]?pin)\s*(?:๋ฒˆํ˜ธ|no\.?)?\D{0,8}(\d{6}[-\s]?\d{7})(?!\d)'
224
+ # ์ฃผ๋ฏผ๋ฒˆํ˜ธ ๊ทœ์น™ ์„ ํ–‰ ์ ์šฉ ํ›„ ์ž”์—ฌ๋ถ„๋งŒ IPIN. ๊ฐ’ ๊ทœ๊ฒฉ(13์ž๋ฆฌ ๊ฐ€์ •) ํ™•์ธ ํ•„์š” (pending)
225
+
226
+ # -----------------------------------------------------------------------------
227
+ # 5. ์Šค์ฝ”ํ”„ ์™ธ - ํ…์ŠคํŠธ ๊ฒŒ์ดํŠธ์›จ์ด๊ฐ€ ๋‹ค๋ฃจ์ง€ ์•Š๋Š” ํ‘œ2 ํ•ญ๋ชฉ (์„ ์–ธ์  ๊ธฐ๋ก)
228
+ # -----------------------------------------------------------------------------
229
+ out_of_scope:
230
+ - key: VIDEO_PERSONAL_INFO
231
+ policy_ref: "ํ‘œ2 ๊ฐœ์ธ์˜์ƒ์ •๋ณด (๊ฒ€์ • ๋ชฉ์  ์™ธ ์ฒ˜๋ฆฌ ๊ธˆ์ง€)"
232
+ reason: "ํ…์ŠคํŠธ ์—”ํ‹ฐํ‹ฐ๊ฐ€ ์•„๋‹Œ ๋ชจ๋‹ฌ๋ฆฌํ‹ฐ(์ด๋ฏธ์ง€ยท์˜์ƒ) - ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ ์ž…๋ ฅ ๊ฒฝ๋กœ๊ฐ€ ์—ด๋ฆฌ๋ฉด
233
+ ํ…์ŠคํŠธ ํ•„ํ„ฐ๋ฅผ ์šฐํšŒํ•˜๋ฏ€๋กœ ๋ณ„๋„ ํ†ต์ œ(์ž…๋ ฅ ์ฐจ๋‹จ or ๋น„์ „ ํ•„ํ„ฐ) ํ•„์š”"
234
+
235
+ # -----------------------------------------------------------------------------
236
+ # 6. ๋ฏธ๊ฒฐ - ์ •์ฑ…ํŒ€ ์ปจํŽŒ ํ•ญ๋ชฉ, TBD
237
+ # -----------------------------------------------------------------------------
238
+ pending_confirmation:
239
+ - "๋“œ๋กญ ๋ฆฌ์ŠคํŠธ(O ๋งคํ•‘) ์ „์ฒด = ๋น„PII ์„ ์–ธ - ํŠนํžˆ ORGANISATIONยทAMOUNTยทSALARY"
240
+ - "IPIN ๊ฐ’ ๊ทœ๊ฒฉ (13์ž๋ฆฌ ๊ฐ€์ •) - ์ œ๊ณต๊ธฐ๊ด€ ๊ณ„์•ฝ ํ™•์ธ (CVC ๊ฒ€์ถœ ๊ทœ์น™์€ 2026-07-21 ํ‚ค์›Œ๋“œ ๋™๋ฐ˜ ํŒจํ„ด ์ฑ„ํƒ์œผ๋กœ ํ•ด์†Œ)"
241
+ - "SECRET ์‹ ์„ค ์ฑ„ํƒ (2026-07-13) - ํ‘œ2 ์ฒ˜๋ฆฌ๊ธˆ์ง€๋ฅ˜์˜ '๊ฒŒ์ดํŠธ์›จ์ด ์ „์ฒด ๋งˆ์Šคํ‚น' ํ•ด์„์€
242
+ ์ •์ฑ…ํŒ€ ์‚ฌํ›„ ์ปจํŽŒ ๋Œ€์ƒ"
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9beec7575336b7c05ee59d7da9dfd25027b241ae5507e1ac4f7a04d7a10d83cb
3
+ size 2799040778
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
3
+ size 27868174
tokenizer_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "eos_token": "<|endoftext|>",
4
+ "is_local": false,
5
+ "local_files_only": false,
6
+ "model_input_names": [
7
+ "input_ids",
8
+ "attention_mask"
9
+ ],
10
+ "model_max_length": 128000,
11
+ "pad_token": "<|endoftext|>",
12
+ "tokenizer_class": "TokenizersBackend"
13
+ }
viterbi_calibration.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "operating_points": {
3
+ "default": {
4
+ "biases": {
5
+ "transition_bias_background_stay": 0.0,
6
+ "transition_bias_background_to_start": 0.0,
7
+ "transition_bias_end_to_background": 0.0,
8
+ "transition_bias_end_to_start": 0.0,
9
+ "transition_bias_inside_to_continue": 0.0,
10
+ "transition_bias_inside_to_end": 0.0
11
+ }
12
+ }
13
+ }
14
+ }