HSGraphAgent: Knowledge-Graph-Guided Large Language Models for Harmonized System Code Classification

Qiang Xia, Zijian Zhang, Ao Wang, Wenhan Wang, Xiangyu Wang, Jian Li


Abstract
Harmonized System (HS) code classification is a hierarchically structured and regulation-constrained task, often complicated by short and noisy product descriptions. Misclassification can lead to tariff misapplication, regulatory violations, or delayed customs clearance, which in turn requires predictions to be both semantically appropriate and hierarchically valid. While large language models (LLMs) show strong semantic understanding, their unconstrained generation is poorly aligned with these requirements, often producing non-existent or hierarchically inconsistent codes. We propose HSGraphAgent a knowledge-graph-guided LLM framework that formulates HS classification as a stepwise, regulation-aware reasoning process over an explicit HS knowledge graph. By encoding hierarchical containment relations and regulatory exclusion rules, and enforcing them through a Select-Redirect mechanism, HSGraphAgent constrains inference to legally valid paths while producing explicit and traceable reasoning trajectories. Experiments on taxonomy-wide 4-digit and fine-grained 6-digit HS benchmarks demonstrate consistent improvements over direct generation and retrieval-augmented baselines, with particularly strong gains in fine-grained and regulation-sensitive classification settings.
Anthology ID:
2026.acl-long.2072
Volume:
Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
44761–44773
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.2072/
DOI:
Bibkey:
Cite (ACL):
Qiang Xia, Zijian Zhang, Ao Wang, Wenhan Wang, Xiangyu Wang, and Jian Li. 2026. HSGraphAgent: Knowledge-Graph-Guided Large Language Models for Harmonized System Code Classification. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 44761–44773, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
HSGraphAgent: Knowledge-Graph-Guided Large Language Models for Harmonized System Code Classification (Xia et al., ACL 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.acl-long.2072.pdf
Checklist:
 2026.acl-long.2072.checklist.pdf