Legal-BERT Semantic Clustering and Explainable XGBoost for Liability Allocation in Automated Cross-Border Digital Trade Contract Performance
Cross-border automated contract performance involves multiple contracting parties, platforms, software developers, and external data suppliers as performers, giving rise to multi-class allocation of liability. We present a computational method involving Legal-BERT semantic vectors, unsupervised clustering, and explainable XGBoost classification. EU, Singaporean, and England & Wales legal texts are categorized through comparative coding, with the UNCTIRAL Model Law on Automated Contracting providing international benchmarking. Legal-BERT encodes the context of paragraphs, UMAP performs dimensionality reduction of Legal-BERT vectors, and HDBSCAN detects recurrent liability reasoning patterns. XGBoost predicts the responsible party across five classes based on coded variables concerning control, causality, disclosure, ability to intervene, failure type, and jurisdictional aspects. Source-based partitioning avoids leaking paragraphs across training and testing sets; moreover, we use stratified five-fold cross-validation and nested optimization to find the best classification model. Actor-based allocation score is determined through SHAP values on the basis of probability predictions, legal considerations, and penalties for poor control and causality. In our case study of 438 cases, clustering produced silhouette coefficient of 0.46 ± 0.04. Classification gave macro-F1 of 0.816 ± 0.019 and multiclass AUC of 0.904 ± 0.013. Scenario agreement was 0.842 ± 0.051. The framework provides an inspectable computational basis for comparing liability patterns across automated performance failures.
Authors
- Junjie Zhou
Institutions
- University of Glasgow (GB)
Publication Details
- Journal
- Theoretical and Natural Science
- Published
- 2026-12-01
- DOI
- https://doi.org/10.54254/2753-8818/2026.39640
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 0.00