Commerce-Review-KO-RoBERTa-Large
🇰🇷 한국어 카드: MODEL_CARD.ko.md
A Korean product-review aspect extractor. For each review it returns aspect spans that are copied verbatim from the text, each with one of 112 aspect categories (price, size, durability, scent, …) and a polarity (POS / NEG / NEU). Every claim it outputs points to characters in the review, so a downstream answer can show the evidence instead of paraphrasing it.
It is a full fine-tune of klue/roberta-large on the AI-Hub aspect-sentiment review
corpus (dataset 71603). On a sealed, product-disjoint test split it beats a 27B instruction model used
zero-shot on every axis we measured (table below). That claim is limited to this data distribution.
How to use
The checkpoint loads as a standard RobertaForTokenClassification, but its 228 outputs are two heads side by
side (225 BIO aspect tags + 3 polarity logits), the input is a sentence pair, and decoding needs the
category mask. Use inference.py from this repo; the plain token-classification pipeline will not
decode it correctly.
# pip install transformers torch huggingface_hub
from huggingface_hub import hf_hub_download
import importlib.util, sys
p = hf_hub_download("ThakiCloud/Commerce-Review-KO-RoBERTa-Large", "inference.py")
spec = importlib.util.spec_from_file_location("inference", p); mod = importlib.util.module_from_spec(spec); spec.loader.exec_module(mod)
m = mod.ReviewABSA("ThakiCloud/Commerce-Review-KO-RoBERTa-Large")
m.predict(["배송은 빨랐는데 사이즈가 생각보다 작아요"], ["여성의류"])
# -> [[{"cat": ..., "pol": ..., "start": ..., "end": ..., "evidence": ...}, ...]]
mainsis the product's main category; the 20 accepted values are the keys ofallowed_by_maininmeta.json(e.g.여성의류,스킨케어,주방가전). Unknown values fall back to all 112 categories.- Reviews longer than 512 tokens are split into windows (stride 128); token logits are averaged.
- Deterministic: no sampling. Evaluated on GPU with bf16 autocast; CPU fp32 gives the same spans on ≥95% of reviews (see Verification).
Results
All numbers are ours, measured with the same scorer on the same reviews. The baseline is a 27B
instruction-tuned LLM (Qwen3.8-27B family, internal serving) prompted zero-shot to output
{category, polarity, evidence}; its evidence strings were mapped back to character offsets.
Sealed test — 18,858 reviews, 1,745 products; the split is grouped by product name and shares no product with train or validation. Scored once, after the checkpoint (seed 2 of 3) had been fixed on validation. CIs: paired bootstrap, 2,000 resamples, resampling products and recomputing the pooled metric each time.
| Metric | 27B zero-shot | This model | Δ [95% CI] |
|---|---|---|---|
| Joint F1 (span overlaps, category and polarity match) | 0.6820 | 0.8267 | +14.48 pp [+13.66, +15.29] |
| Category F1 | 0.7880 | 0.9234 | +13.54 pp [+12.85, +14.23] |
| Sentiment macro-F1 (on matched spans) | 0.7823 | 0.8715 | +8.92 pp [+8.00, +9.81] |
| Evidence F1, exact span | 0.5029 | 0.6739 | +17.10 pp [+16.03, +18.26] |
| Evidence F1, overlapping span | 0.8692 | 0.9036 | +3.44 pp [+2.93, +3.91] |
| Unsupported-claim rate ↓ | 9.07% | 6.07% | −2.99 pp [−3.44, −2.53] |
"Unsupported claim" = an output item that is not verbatim in the review or overlaps no gold evidence span.
Validation (3 seeds, the 3,992 validation reviews the 27B baseline was run on; validation shares some products with train, so it is not product-disjoint):
| Joint F1 | Unsupported | Δ Joint F1 vs 27B [95% CI] | |
|---|---|---|---|
| 27B zero-shot | 0.6830 | 7.45% | — |
| seed 0 | 0.8376 | 5.73% | +15.46 pp [+14.38, +16.53] |
| seed 1 | 0.8362 | 5.67% | +15.31 pp [+14.22, +16.37] |
| seed 2 (released) | 0.8402 | 5.38% | +15.72 pp [+14.66, +16.80] |
Test Joint F1 is 1.35 pp below validation for the released seed, which is the expected size of picking the best of three seeds on validation.
What we do not claim
- No generalisation claim. Much of the gain is learning this corpus's span-boundary and category conventions (category F1 0.79 → 0.92), which a zero-shot model cannot know. We have not measured reviews from other shops or other annotation schemes.
- No SOTA claim, and no comparison with a fine-tuned LLM.
- Weak products remain: the bottom 10% of test products by Joint F1 score ≤ 0.545.
Limitations
- Categories are fixed to the 112 in
meta.json; overlapping gold spans were reduced to one BIO path in training, so nested aspects are not produced. - Implicit aspects (no span in the text) are not extracted.
- Korean only; trained on shopping-mall and SNS product reviews across fashion, cosmetics, appliances, IT devices and household goods.
Training
- Data: AI-Hub "속성기반 감정분석 데이터" (aspect-based sentiment, dataset 71603), 183,056 training reviews.
No AI-Hub data is redistributed in this repository;
meta.jsoncontains only the label schema (category names and which categories apply to each main category). - Recipe: sentence-pair input
[main category]+ review; factorised heads (BIO over category, per-token polarity); category decoding masked by main category; 512-token windows, stride 128. 3 epochs, lr 2e-5, batch 32, one H200. - Changes from the base model: a new 228-way token-classification head and full fine-tuning of all encoder weights. The two training-time heads are concatenated into one linear layer here (verified identical, below).
Verification of this upload
Before upload, a conversion job checked on 300 random validation reviews that this exact folder
(1) gives identical decoded spans and max |logit difference| < 1e-4 compared with the original two-head
training checkpoint, (2) gives the same output through the published inference.py, and (3) matches the
stored GPU-bf16 predictions used for the reported numbers on ≥95% of reviews.
License and attribution
License: CC BY-SA 4.0 (chosen conservatively; see below).
- Base model:
klue/roberta-large, from the KLUE project — Park et al., 2021, "KLUE: Korean Language Understanding Evaluation", arXiv:2105.09680. - Why CC BY-SA 4.0: the KLUE project repository is licensed CC BY-SA 4.0, and the KLUE BERT Base weights state
CC BY-SA 4.0, but the
klue/roberta-largemodel page states no separate license. We did not receive a clarification from the KLUE authors, so these fine-tuned weights are released under CC BY-SA 4.0 as the conservative choice. ShareAlike applies: models derived from these weights must be released under the same or a compatible license, with attribution. - Changes made: a new token-classification head (225 BIO aspect tags + 3 polarity logits, stored as one 228-way linear layer) and full fine-tuning of all encoder weights on AI-Hub dataset 71603.
- Training data: AI-Hub "속성기반 감정분석 데이터" (Aspect-based Sentiment Analysis Data, dataset 71603), National Information Society Agency (NIA), Korea. This research used datasets from 'The Open AI Dataset Project (AI-Hub, S. Korea)'. All data information can be accessed through 'AI-Hub (www.aihub.or.kr)'. No AI-Hub data (raw or processed reviews) is included in this repository.