Trie-Constrained Token Prediction with Hierarchy-Aware Semantic Alignment for HS Code Prediction
Minseop Kim, Taekhyun Park, Kikun Park, Hyerim Bae
Abstract
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.
Create a lesson
Related papers
From powder to part: influence of virgin and recovered Inconel 625 powders on the DED-LP processability, microstructure and mechanical properties
Romain Deloffre, Lorène Héraud, Julie Lartigau
Piezoelectric Energy Harvesting from a Pitch-Plunge Aerofoil in Compressible Flow, the Euler Full-Order Model, Strip Theory and the Reduced Models Compared
Nikolaos D. Tantaroudas, Ilias Karachalios, Andrew J. McCracken
A Bayesian Model Updating Framework for Systems Under Hybrid Uncertainties via Probability Integral Transform and Maximum Mean Discrepancy
Shijie Zhong, Jiangfeng Fu
The Exact Approximation Ratio of Uniformly Rotated Coordinate-wise Median in the Euclidean Plane
Song Zichen
Research on the Price Prediction Algorithms of Major Cryptocurrencies and a Basic Transaction Framework
Shengjian Chen
Quantum Block Encodings for Periodic Two-Phase Finite Element Operators: 2D Poisson and 2D Elasticity
Krishnan Suresh