Open Access Article

Title: Intelligent risk analysis framework for civil and commercial contract clauses based on BERT

Authors: Ding Qi

Addresses: College of Marine Culture and Law, Jimei University, Xiamen, 361031, China

Abstract: According to past researches, lause-level risk identification is formulated as a classification task across multiple publicly available legal datasets, including commercial contracts, terms of service, and compliance clauses. To better capture long-range dependencies and structural patterns in legal text, this paper introduces an intelligent risk analysis framework for civil and commercial contract clauses with proposed relative position enhanced bidirectional encoder representations from transformers. It is a strong language model architecture owing to its transformer model, which captures long distance dependences efficiently. Meanwhile, compared with traditional position embedding, the relative embedding has better performance on understanding local context, improving model's robustness. Experimental results show that the proposed model consistently outperforms CNN-based, RNN-based, and standard transformer baselines across five datasets. The enhanced model achieves 2-3.5 percentage points improvement in macro F1-score over baseline models. These findings demonstrate that integrating relative positional information effectively enhances the detection and classification of risky contractual clauses.

Keywords: contract risk analysis; clause classification; bidirectional encoder representations from transformers; BERT; relative position embeddings; legal text mining.

DOI: 10.1504/IJICT.2026.153387

International Journal of Information and Communication Technology, 2026 Vol.27 No.43, pp.46 - 62

Received: 29 Dec 2025
Accepted: 30 Jan 2026

Published online: 06 May 2026 *