A TRANSFORMER-BASED APPROACH FOR FINANCIAL RISK ASSESSMENT
Financial risk assessment identifies and measures the risk of loss in financial decisions. It includes credit, market, cash flow, and operational risk. The traditional methods depend on history and expert judgment. Machine learning speed up and standardize risk prediction. This study used Transformer model to classify financial risk into Low, Medium, and High classes. The benchmarks the model against machine learning and deep learning baselines under one protocol. We used a tabular dataset with 16 financial indicator features. Preprocessing included cleansing, encoding of categorical variables, scaling, and feature engineering. The Transformer used self-attention over the feature tokens. We compared the transformer with ML models baselines. These baselines included logistic regression, k-nearest neighbor, gradient boosting, support vector machine, random forest, XGBoost, CatBoost, a recurrent network, and a long short-term memory network. We evaluate the results using accuracy, precision, recall, F1-score, and the area under the ROC curve. The proposed Transformer reached an accuracy of 83.84% on the test set of 2,500 records. It achieved balanced precision, recall, and F1-score across the three classes. The baseline models reached 74.92% to 80.26%. Logistic regression was lowest at 74.92%, and CatBoost was the best baseline at 80.26%. The Transformer gave the highest accuracy among all tested models. This approach supports financial institutions and industries.