[Paper Review] Classification of Goods Using Text Descriptions With Sentences Retrieval
This paper proposes a deep learning model based on KoELECTRA that assists customs officials in classifying goods into HS codes by retrieving relevant sentences from the HS manual and using them to improve hierarchical classification of headings (4-digit) and subheadings (6-digit). The model achieves 95.5% top-3 accuracy on 129,084 past cases, significantly reducing classification time and enhancing interpretability through supporting facts and similar cases.
The task of assigning and validating internationally accepted commodity code (HS code) to traded goods is one of the critical functions at the customs office. This decision is crucial to importers and exporters, as it determines the tariff rate. However, similar to court decisions made by judges, the task can be non-trivial even for experienced customs officers. The current paper proposes a deep learning model to assist this seemingly challenging HS code classification. Together with Korea Customs Service, we built a decision model based on KoELECTRA that suggests the most likely heading and subheadings (i.e., the first four and six digits) of the HS code. Evaluation on 129,084 past cases shows that the top-3 suggestions made by our model have an accuracy of 95.5% in classifying 265 subheadings. This promising result implies algorithms may reduce the time and effort taken by customs officers substantially by assisting the HS code classification task.
Motivation & Objective
- To reduce the time and effort required for HS code classification by customs officers, who currently face increasing workloads due to complex, diverse goods and rising e-commerce volumes.
- To improve the accuracy and consistency of HS code assignment, which directly affects tariff rates and can lead to international disputes when inconsistent.
- To enhance interpretability of AI-driven decisions by retrieving relevant sentences from the HS manual and providing supporting facts and similar cases.
- To support both declarants and customs officials by offering a decision-support system that suggests likely HS codes with justifications.
- To address the challenge of hierarchical classification in Chapter 85 (electrical equipment), known for its complexity and high error rates.
Proposed method
- The model first predicts 4-digit HS code headings using product descriptions via a fine-tuned KoELECTRA model.
- It then retrieves the most relevant key sentences from the HS manual using dense retrieval techniques, based on semantic similarity to the product description.
- For subheading (6-digit) prediction, the model combines the product description and retrieved HS manual sentences as input to a hierarchical classification head.
- The model applies temperature scaling to calibrate confidence scores for top-k predictions, improving reliability for human review.
- It generates output templates that include top-3 heading and subheading candidates, along with retrieved sentences and similar past cases for contextual justification.
- The framework mimics the GRI-based reasoning process used by human experts, aligning AI decisions with legal and interpretive standards.
Experimental results
Research questions
- RQ1Can a deep learning model using text retrieval from the HS manual improve the accuracy of hierarchical HS code classification for customs officials?
- RQ2How effective is the integration of retrieved HS manual sentences in enhancing model interpretability and decision justification?
- RQ3To what extent does the model’s performance compare to existing solutions in real-world customs classification tasks?
- RQ4Can the model reduce the workload of customs officers by providing high-confidence, explainable suggestions for HS code assignment?
- RQ5How well does the model generalize to complex, ambiguous product categories such as those in Chapter 85 (electrical equipment)?
Key findings
- The model achieved a top-3 accuracy of 95.5% in classifying 265 subheadings across 129,084 past cases, demonstrating strong performance on real-world customs data.
- The model outperformed the winning solution from an e-commerce product classification challenge, indicating its robustness in complex classification tasks.
- In an internal evaluation at Korea Customs Service, the model achieved a top-3 accuracy of 82% on eleven undisclosed decision cases, validating its practical utility.
- Retrieved sentences from the HS manual were found to be highly relevant, with a recall and precision of 0.75 each in matching expert-provided justifications.
- The model’s output format, including confidence scores, retrieved sentences, and similar cases, closely resembles expert reports, enhancing trust and usability.
- The integration of contextual logic and rule-based reasoning (via GRI and HS manual) improved model credibility compared to purely pattern-based deep learning models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.