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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Legal-BERT Semantic Clustering and Explainable XGBoost for Liability Allocation in Automated Cross-Border Digital Trade Contract Performance

Junjie Zhou
Theoretical and Natural Science
Artificial Intelligence in Law
article

Legal-BERT Semantic Clustering and Explainable XGBoost for Liability Allocation in Automated Cross-Border Digital Trade Contract Performance

Junjie Zhou
article en

Abstract

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.

Theoretical and Natural ScienceVol. 208(1)
University of Glasgow (GB)
Artificial Intelligence in Law
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon