Explainable AI for Comprehensive Risk Assessment for Financial Reports: A Lightweight Hierarchical Transformer Network Approach

Xue Wen Tan, Stanley Kok

Introduction

Publicly traded companies in the United States are required to file annual 10-K reports, which provide a comprehensive overview of their financial performance and potential risks. Within these reports, the "Management’s Discussion and Analysis" (MD&A) section is particularly valuable, offering qualitative insights into a company's future prospects. However, the sheer volume and complexity of these documents—often exceeding 14,000 tokens—make manual analysis a daunting task for human analysts.

While Artificial Intelligence (AI) offers a solution for automating this analysis, existing models face significant hurdles: the "black box" nature of deep learning, a narrow focus on general volatility rather than downside risk, and the prohibitive computational costs of deploying Large Language Models (LLMs). This paper introduces TinyXRA (Tiny eXplainable Risk Assessor), a lightweight hierarchical transformer model designed to address these challenges by providing accurate, interpretable, and efficient risk assessments.

Methodology: The TinyXRA Framework

TinyXRA is built on a specialized architecture tailored for long-form financial text. Its design rests on three core pillars:

1. Lightweight Encoder (TinyBERT)

Rather than employing massive models like BERT or Llama, TinyXRA utilizes TinyBERT, a distilled and compact version of the BERT architecture. This choice allows the model to process lengthy 10-K documents on consumer-grade hardware, such as an NVIDIA RTX 2080 Ti, making it accessible for firms with constrained computational resources without significantly compromising predictive power.

2. Hierarchical Attention Mechanism

To handle the structure of 10-K reports, the model employs a two-level attention mechanism. First, it identifies significant words within individual sentences. Second, it determines which sentences are most critical to the overall risk profile of the document. This hierarchical approach mirrors how human analysts scan reports for key red flags.

3. Triplet Ranking Loss

Standard classification models often treat risk levels (e.g., Low, Medium, High) as independent categories. TinyXRA instead uses triplet loss, training the model by comparing an "anchor" sample (Medium Risk) against a "positive" (High Risk) and a "negative" (Low Risk). This forces the model to learn the ordinal relationship between risk levels, ensuring that the mathematical representation of High Risk is further from Low Risk than it is from Medium Risk.

Data and Risk Metrics

The study utilizes a robust dataset of U.S. SEC 10-K filings from 2013 to 2024. To label these reports, the authors moved beyond simple stock price volatility. They employed the Fama-French Three-Factor Model to isolate unsystematic, company-specific risk.

Crucially, the research incorporates the Sortino Ratio, which focuses specifically on downside risk. Unlike standard deviation, which penalizes both "good" upside volatility and "bad" downside volatility, the Sortino ratio provides an investor-centric view by only considering returns that fall below a specified target. The model also accounts for higher-order moments of the return distribution, such as skewness and kurtosis, for a more comprehensive risk profile.

Key Findings and Results

TinyXRA demonstrates that high performance and interpretability are not mutually exclusive.

State-of-the-Art Performance

In comparative tests across seven years (2018–2024), TinyXRA consistently achieved the highest scores in F1, Spearman’s Rho, and Kendall’s Tau. Notably, it outperformed general-purpose LLMs like Llama 3.2-1B and Qwen2-0.5B, even when those models were fine-tuned for the task. Statistical analysis using Cohen’s d tests confirmed "large" effect sizes, highlighting the superiority of the hierarchical approach for long-form financial text.

Faithful Explainability

The model generates attention-based word clouds and heatmaps to visualize risk. To ensure these explanations were "faithful"—meaning they accurately reflect the model's internal logic—the authors conducted ablation experiments. By systematically removing the words and sentences the model flagged as important, they observed a sharp decline in performance, proving that the model's predictions were indeed driven by the highlighted terms.

Qualitative Coherence

The model’s outputs align with real-world economic contexts. For instance, in 2023, "Low Risk" word clouds featured terms like earnings, rental, deposits, and dividend. In a high-interest-rate environment, these terms reflect the stability and cash flow that investors prioritized as "safe" bets.

Conclusion and Future Directions

TinyXRA represents a significant step forward in financial AI, offering a scalable and transparent solution for risk assessment. By prioritizing downside risk and computational efficiency, it meets the practical needs of financial institutions and regulators.

Future research will focus on refining the tokenization process to avoid subword fragments in visualizations and developing a "business-logic layer" to translate raw attention weights into high-level narrative insights. Additionally, addressing potential survivorship bias in historical datasets remains a priority for improving the model's long-term robustness.

The code for TinyXRA is available at https://github.com/Chen-XueWen/TinyXRA.

Summary updated

Abstract

Every publicly traded U.S. company files an annual 10-K report containing critical insights into financial health and risk. We propose Tiny eXplainable Risk Assessor (TinyXRA), a lightweight and explainable transformer-based model that automatically assesses company risk from these reports. Unlike prior work that relies solely on the standard deviation of excess returns (adjusted for the Fama-French model), which indiscriminately penalizes both upside and downside risk, TinyXRA incorporates skewness, kurtosis, and the Sortino ratio for more comprehensive risk assessment. We leverage TinyBERT as our encoder to efficiently process lengthy financial documents, coupled with a novel dynamic, attention-based word cloud mechanism that provides intuitive risk visualization while filtering irrelevant terms. This lightweight design ensures scalable deployment across diverse computing environments with real-time processing capabilities for thousands of financial documents which is essential for production systems with constrained computational resources. We employ triplet loss for risk quartile classification, improving over pairwise loss approaches in existing literature by capturing both the direction and magnitude of risk differences. Our TinyXRA achieves state-of-the-art predictive accuracy across seven test years on a dataset spanning 2013-2024, while providing transparent and interpretable risk assessments. We conduct comprehensive ablation studies to evaluate our contributions and assess model explanations both quantitatively by systematically removing highly attended words and sentences, and qualitatively by examining explanation coherence. The paper concludes with findings, practical implications, limitations, and future research directions. Our code is available at https://github.com/Chen-XueWen/TinyXRA.
BibTeX
@misc{tan2025explainable,
  author = {Xue Wen Tan and Stanley Kok},
  title = {{Explainable AI for Comprehensive Risk Assessment for Financial Reports: A Lightweight Hierarchical Transformer Network Approach}},
  year = {2025},
  eprint = {2506.23767},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.23767},
}
Figure