Trie-Constrained Token Prediction with Hierarchy-Aware Semantic Alignment for HS Code Prediction

Harmonized System (HS) code prediction (HSP) from commodity text is essential to international trade, and its importance continues to grow in port logistics. For the purposes of such prediction, recently, large language models (LLMs) have been actively investigated, owing especially to their strong language-understanding capabilities. However, their high computational cost limits deployment in constrained environments such as container terminals. Small language models (SLMs) offer a practical alternative, but their smaller scale makes them prone to generating invalid HS codes and to overlooking the hierarchical semantics between commodity text and HS codes. To address these limitations, this study proposes TRIE-HSA, which combines trie-constrained token prediction with hierarchy-aware semantic alignment (HSA). This method constrains the SLM to predict only valid digits under the HS taxonomy and aligns commodity text representations with the hierarchical structure of HS codes. In extensive experiments on data collected from an operational container terminal, TRIE-HSA improved average HS6 accuracy by 49.96 %p over zero-shot inference and exceeded the strongest task-specific benchmark by 11.94 %p. These results demonstrate that accurate and structurally valid HSP is achievable with fewer than 10 billion parameters. Therefore, TRIE-HSA offers a practical basis for deployment of HSP in port logistics operations that cannot support largescale LLMs.

Link
https://www.semanticscholar.org/paper/318399f39562255d390451e89b940927c908deea
Found by
Semantic Scholar
Authors
Minseop Kim, Taekhyun Park, Kikun Park, Hyerim Bae
Categories
benchmark
Published
2026-08-05
Last seen by the radar
2026-08-06
Citations
0
Influential citations
0
Radar score
32.97 / 100 (how it is scored)
Why it scored so
Matched: benchmark; Primary record: Semantic Scholar
Related links
https://arxiv.org/abs/2608.04464
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar