This work proposes a multimodal fusion inference model for large-scale power trading analytics by fusing natural language understanding, multimodal deep learning, federated learning, and automatic chart generation. Initially, heterogeneous multimodal data is gathered from the FMST dataset and the ENTSO-E electricity market dataset. This consists of the following types of data: time series data of electricity trading transactions, market metrics, financial news data stream, macroeconomic variables, order book data, and electricity grid information. Then, the gathered data is processed individually, depending on its modality, via missing-value imputation, normalization, sliding-window segmentation, tokenization, embedding, and visual feature extraction. Subsequently, a BIMCoder framework for interpreting the semantic query is adapted for use. Prior to its implementation, the original BIM-focused vocabulary and ontology were substituted with electricity market vocabularies through the FMST and ENTSO-E data sets; the framework was then further refined by training on power trading queries and their analytical intentions. The created query embedding can help to perform downstream analytical inference tasks. After that, feature extraction is done based on modality with the help of Temporal Transformers and iTransformers for temporal dependency learning. iTransformer is a transformer-based multivariate time-series forecasting architecture aimed at efficient capture of heterogeneous variable interaction in the form of time-series. It is applied as the benchmark and complementary temporal modeling tool. FinBERT is a transformer language model pre-trained on financial text analysis and learning of the representation of finance-related sentiments. It is used for the extraction of contextual semantic embeddings from financial news and market reports. Vision transformer (ViT) is a transformer-based visual representation architecture that uses the self-attention mechanism for processing image patches. It is meant to be used for chart understanding and visual features extraction. Visual features extraction and graph neural networks are deep learning models designed for graph-structured data. They are applied for capturing the power grid topology and the interconnection relationship. Temporal Transformer is a transformer-based sequence learning architecture utilized for modeling long-range temporal dependencies of electricity trading and market time-series data. It is meant to be the primary temporal feature extractor in the proposed framework.
Following feature extraction, a cross-modal transformer fusion technique is employed to combine heterogeneous features from textual, numerical, visual, and graph-based modalities through cross-attention mechanisms and multimodal fusion layers. The resulting multimodal representations are used for structured analysis and inference, including forecasting, anomaly detection, trend analysis, and explainable analytics for power trading applications. In addition, the proposed system automatically generates charts using a chart-aware reasoning module based on LLM-driven visualization selection. Finally, multiple evaluation metrics are used to assess the performance of the proposed framework in forecasting, classification, natural language understanding (NLU), query interpretation, and chart generation tasks. The overall architecture of the proposed framework is illustrated in Figure 1.
This architecture in Figure 1 shows the inference architecture of multimodal fusion designed for analyzing power trading on large scales with the FMST and ENTSO-E datasets. At first, various datasets, including electrical trading logs, order-book depth logs, financial news, macroeconomic indicators, renewable energy statistics, and power grid congestion, will be collected. All datasets undergo various preprocessing techniques, such as imputation of missing values, normalization, time synchronization, sliding-window segmentation, tokenization, and image resizing. Next, the user's queries will be semantically understood using BIMCoder-based natural language understanding and converted into structured intents. Then, feature extraction is performed across all modalities using Temporal Transformers and iTransformers for temporal features, FinBERT for financial news analysis, ViT for chart and image features, and a GNN for power grid topology analysis. The extracted heterogeneous features are finally combined with a cross-modal Transformer fusion model with an attention mechanism. To improve scalability, preserve privacy, and enable regionally generalizable predictions, the federated collaborative learning technique is used, whereby regional nodes build local models using their data while exchanging model parameters only with the central server. In the end, the combined representations are used by the inference engine powered by explainable AI to produce forecasts, abnormality detection outcomes, risk assessments, trend analyses, and visualization charts.
The framework can utilize multiple input modes such as electric power exchange logs, financial news, market data, power grid structure, and user natural language queries. The system will have semantic understanding through BIMCoder, modality encoding, cross-modal transformer fusion, federated collaborative learning, structured analytical inference, automated chart generation, and explainable AI components. The framework will generate forecasting results, anomaly detections, risk analysis, structured analytical reports, and visualization dashboards by enhancing forecasting accuracy and interpretability.
It is important to note that the nodes depicted in Figure 1 (such as North America, Europe, and Asia) are included to demonstrate how such a federated learning framework can be scalable and applied in practice. For the experimental evaluation in this paper, the FMST and ENTSO-E datasets were employed; however, no North American or Asian electricity market datasets were used. As such, the nodes indicated in Figure 1 do not reflect the real-life datasets used in this research.
Multimodal data collection
The proposed multimodal fusion inference system employs heterogeneous datasets derived from the FMST and the ENTSO-E electricity market. The main focus of the data collection process is to create a common multimodal analysis environment that supports structured inference using natural language, multimodal forecasting, anomaly detection, and automatic chart generation. The collected multimodal data includes numerical trade data, time-series data representing the electricity market, order book depth data, financial news and macroeconomic indicators, power grid operation data, and historical chart data for visualizations. The above-mentioned heterogeneity in modalities will be temporally synchronized in a unified manner to ensure effective cross-modal learning and structured analysis. Moreover, the collected multimodal data will help in capturing temporal dependencies, semantic financial relations, regional trade behavior, and grid topology interactions for large-scale power trading analysis.
FMST dataset
The FMST dataset2,33 has been used as the main multimodal learning dataset because of its large-scale heterogeneous financial sensing dataset. The FMST dataset includes high-frequency price-trading data, order-book snapshot depth data, financial news, Chinese market news, and macroeconomic datasets collected from various international trading environments from January 2018 to December 2024. The initially available data comprised approximately 4.8 × 108 instances of high-frequency price trading data, 1.6 × 108 instances of order-book snapshot data, 1.02 × 106 instances of financial news articles, 7.8 × 105 instances of Chinese news articles, and 2.4 × 104 instances of macroeconomic data.
Records with duplicate entries, missing or inaccurate timestamps, and incomplete critical data were eliminated prior to model construction. While textual records were cleaned and converted into contextual representations using FinBERT-based embeddings, numerical records underwent missing-value treatment, outlier identification, normalization, and sliding-window segmentation. A common temporal reference of one minute was then used to synchronize the diverse modalities. The mean, maximum, minimum, standard deviation, and volume-related characteristics of high-frequency order-book observations were combined to create one-minute statistical representations. While slowly changing macroeconomic variables were kept until the next available official update, textual records were aligned based on their publication timestamps.
Only the valid multimodal time frames resulting from preprocessing, filtering, and temporal synchronization were used for model training and assessment. The 70% training, 15% validation, and 15% testing subsets of these viable samples were divided chronologically. To avoid information leakage from subsequent observations into the training process, the temporal frames were kept mutually exclusive. Only the validation set was used for hyperparameter selection and early stopping, whereas the test set was used solely for the final assessment. To ensure reliability and equitable comparison, the same chronological division technique was applied consistently across the studies.
Table 1 offers a complete description of the FMST data set used in the designed multimodal reasoning inference system. In particular, this dataset comprises heterogeneous data from international financial trading systems and macroeconomic data repositories. High-frequency numerical data and order book information are extracted to capture variations over time and in market microstructure. Moreover, financial news and market reports have been incorporated into the designed system to represent semantic information for a better understanding of economic and trading events. Furthermore, macroeconomic data have been introduced to explain the effect of the economy on electricity trade and markets.
ENTSO-E electricity market dataset
ENTSO-E electricity market data34 is integrated into the proposed framework to modify the multimodal learning setting for practical applications in power trading analysis and smart grid analytics. ENTSO-E electricity market data refers to large-scale data on the electricity market, including electricity prices, generation capacity, load demand, renewable energy generation, cross-border flows, and other relevant information obtained from ENTSO-E. In this research, the following features of the ENTSO-E dataset are used: electricity price data, load-demand data, renewable generation data, cross-border trade data, and transmission congestion data for the period from 2019 to 2025. Around 3.2 × 107 electricity prices, 1.8 × 107 load demands, 9.5 × 106 renewables generation, and 6.4 × 106 cross-border flow data are used in this case.
Table 2 presents the ENTSO-E electricity market data used in the proposed approach for large-scale power trading analytics. The dataset includes heterogeneous electricity market data acquired from several European power trading regions and transmission system operators. Records related to electricity prices and load demand are useful for predicting future time series and understanding the behavior of electricity market transactions. On the other hand, records related to renewables are important for modeling variations in renewable energy and their impact on supply and demand imbalances. Lastly, cross-border transmission flow records and congestion indices have been considered to study the inter-regional grid operations and transmission constraints in the network. Following filtering, duplicate removal, quality control, and temporal synchronization, the heterogeneous ENTSO-E data streams were integrated into 2,400,000 final usable multimodal analysis samples. These samples were subsequently arranged chronologically, with 1,680,000 samples (70%) used for training, 360,000 samples (15%) used for validation, and 360,000 samples (15%) reserved for testing. Grid congestion indicators were temporally aligned with the corresponding analysis windows and used for the downstream congestion-related classification task.
Data preprocessing
Once data is gathered from both FMST and ENTSO-E electricity markets datasets in terms of heterogeneous information from multiple channels, including numerical records, unstructured text documents, and visualization charts, a series of comprehensive data preprocessing tasks is carried out to enhance consistency, synchronization, quality, and multimodal learning ability. As heterogeneous data includes both structured numeric records, unstructured text, and visualization data, each modality undergoes its own independent preprocessing tasks before being fused into a multimodal data format. Specifically, frequent trading records, order-book depth data, load demand data, renewable energy generation data, as well as macroeconomic data undergo missing value filling, normalization, outlier detection, and sliding-window-based time series segmentation. At the same time, financial news reports and market information text data are subject to tokenization, stopword removal, semantic cleansing, and FinBERT-based contextual embedding generation. Visualization data is preprocessed via image scaling, feature extraction, and label detection using an optical character recognition (OCR)-based approach. Finally, all modalities are synchronized in terms of the time axis and standardized in terms of features. Preprocessing was required because the FMST and ENTSO-E datasets contain heterogeneous data with different temporal resolutions, including high-frequency trading records, financial news, macroeconomic indicators, electricity prices, renewable generation, and cross-border transmission data. The preprocessing pipeline performed temporal alignment, denoising, semantic representation learning, and feature standardization, producing unified multimodal representations for query analysis, forecasting, anomaly detection, explainable analytics, and automated chart generation.
As a result of the fact that the time resolution of FMST and ENTSO-E data is quite different, the hierarchical approach to temporal alignment was used prior to multimodal fusion. To align these data sets, the 1-min time step was chosen as the common reference frame, which retains most of the high frequency dynamics in the market and allows observation of electricity markets. For FMST market orders recorded with 10 s resolution, the statistical one-minute features such as average value, maximum value, minimum value, standard deviation, and volume were used to retain high-frequency market dynamics. The hourly and daily ENTSO-E variables were aligned with respect to the common timeline through forward propagation in each interval. Slowly evolving variables such as macroeconomic indicators were retained until the next official update. Linear interpolation was performed on short missing periods in continuous numerical signals, and text data was aligned according to the actual publication timestamp. The efficiency of temporal alignment was checked by comparing statistical properties before and after the resampling process, including mean, variance, temporal autocorrelation, and spectral properties.
Numerical data
Inconsistencies in the observations from the datasets are a result of sensor failure, delayed reporting in the markets, disruption of the transmission process, and asynchronous updates in different regions. Linear interpolation and temporal mean imputation techniques have been used to deal with the missing values for variables such as electricity prices, load demand, order book observations, and renewable energy production. The mathematical descriptions are described in Supplementary File 1.
Text data
The FMST dataset includes finance-related news texts, Chinese market-related news texts, and event-driven economic news. The textual data undergoes tokenization and semantic cleaning to extract salient language-based information for multimodal reasoning. Following semantic cleaning of the text, contextual semantic embeddings are created by leveraging FinBERT to create an embedding of financial power trading semantics in a multidimensional vector space. Embedding creation is represented mathematically as follows:
Et = FinBERT(Tt) (5)
where: Tt is the tokenized text, Et are contextual semantic embeddings.
Chart/image data
Historical trading charts, heat maps, and dashboard visualization elements are resized to fixed sizes before the visual feature extraction stage for consistent computation. Resizing is achieved by the following transformation:
I' = Resize(I, h, w) (6)
Here, I is the input image. I' is the output resized image. h, w represent the target height and width. This pre-processing allows for stable vision transformer-based feature extraction. Chart information from electricity trading dashboards and historical market charts is extracted with the help of ViTs. This process extracts spatial and structure-related information from the visual chart data. Feature extraction can be described as follows:
Fv = ViT (I') (7)
Where, I' is the input chart images. Fv represents the extracted visual features. To increase interpretability and recognition of charts, OCR is used to extract text, such as labels, axis information, timestamps, and numbers, from historical trading charts. The OCR-based feature extraction stage can be written as follows:
L = OCR (I') (8)
Where, L is the extracted text labels. I' represents the chart images.
The preprocessing workflow that creates a uniform feature representation for multimodal fusion and inference from heterogeneous data from the FMST and ENTSO-E datasets is shown in Figure 2. Three modalities—numerical, textual, and visual data—are initially used to classify the gathered data, which includes numerical electricity trading records, financial news, historical market charts, renewable energy statistics, and grid operation data. To capture temporal dependencies, numerical data are subjected to sliding-window segmentation, Min–Max normalization, and missing value imputation. While visual data is scaled, preprocessed, and analyzed with OCR and Vision Transformers for label and feature extraction, textual data is tokenized, cleaned, and encoded with FinBERT embeddings. Ultimately, a unified multimodal representation is created by temporally aligning and integrating all modality-specific characteristics. This representation is then used as the input for large-scale power trading analysis using the cross-modal transformer fusion framework.
Multimodal feature extraction
In addition to preprocessing and synchronization processes, the suggested framework implements multimodal feature extraction that will help extract valuable insights from different heterogeneous data gathered from FMST and ENTSO-E electricity market data. Considering the types of data collected, which include number-based time series information, textual information in finance, power grid network topologies, and visualized data in the form of charts, modality-specific deep learning models called encoders are used to extract specific features from various modalities. Time series data on electricity trading records, prices, renewables, and load demand are used with temporal transformers and iTransformers to model temporal relations and behaviors in the markets. For the multivariate temporal input sequence Xt, the process of temporal feature extraction can be mathematically denoted as follows:
Ft = Transformer (Xt) (9)
where: Xt – time series electricity market sequences, Ft extracted temporal features. Self-attention mechanisms implemented through the Transformer take into account dynamic dependencies in trading, prices, and electricity demand across regions. Such an attention mechanism can be calculated below:
(10)
where: QU, KE, and VA are the value, key, and query matrices, respectively; feature dimensions are denoted by dk. Here,
,
, and
represent the query, key, and value matrices, respectively, which are created from the input feature representations. In this context, n is the sequence length and d is the dimensionality of the feature embeddings. The value d acts as a scaling factor for stable gradient computation.
At the same time, financial news articles, market reports, and economic events data included in the FMST dataset are also semantically encoded through FinBERT for extracting contextual financial representation that can influence electricity market operations. Let Ts be tokenized textual input data sequences. The generation of semantic embeddings through textual feature extraction is mathematically formulated as follows:
FEs = FinBERT(Ts) (11)
where: FEs represents the extracted semantic text features. With such extracted semantic embeddings, the framework can learn about market sentiments, financial risk factors, relationships between economic events, and contextual trade influences in the power market domain. On the other hand, this framework can model interconnected power grid structures and transmission relations by using Graph Neural Networks (GNNs). Let G = (V, E) denote the electricity transmission graph, where V refers to grid nodes, and E denotes the connection transmissions. The graph feature extraction approach is mathematically expressed as:
FEg = GNN (G) (12)
where: FEg stands for graph topology feature representations. The last step is that the features of all modalities are combined to form a single multimodal feature representation by employing cross-modal feature alignment. Mathematically, the multimodal feature fusion can be written as
FEm = [FEt, FEs, FEg, FEv] (13)
Where, FEt stands for temporal features created from electricity market time series, FEm stands for textual semantic features created by using FinBERT, FEv represents visual features created by using Vision Transformers from chart images, and FEg stands for graph features created using power grid topology by Graph Neural Networks. Here, F fusion represents the final multimodal fused feature.
In which, FEm is the unified multimodal feature space consisting of time, semantics, graph, and visual features. Then, the multimodal feature embeddings are employed in cross-modal Transformer fusion, structure analysis, forecasting, anomaly detection, reasoning, and automated charting as part of the intelligent power trading framework. Following modality-specific feature extraction, multimodal fusion is carried out right away. To guarantee uniform dimensionality across all modalities, the temporal embeddings produced by the temporal transformer/iTransformer, semantic embeddings generated by FinBERT, visual embeddings extracted using the ViT, and graph embeddings learned by the GNN are first projected into a common latent feature space. The suggested cross-modal transformer fusion module then concatenates and processes these aligned embeddings. The fusion module learns complementary correlations between temporal market dynamics, financial semantics, visual trading patterns, and power grid architecture through multi-head cross-attention. The downstream inference engine then uses the resulting unified multimodal representation for explainable analytics, forecasting, anomaly detection, structured analytical reasoning, and automated chart creation.
The FMST dataset contains heterogeneous multimodal data on financial and market sensor data for large-scale multimodal fusion. As shown in Table 3 below, numeric features such as electricity or financial trading prices, trading volumes, bidding price, asking price, and bid-ask spread are obtained to describe market dynamics, financial trading behaviors, and fluctuations. The use of temporal features, namely timestamps, is required to enable the Transformer to learn market behavior sequentially. Furthermore, macroeconomic features such as inflation rates and GDP growth rates are taken to describe external economic impacts on electricity and financial trading markets. Financial news textual features are represented in contextualized semantics via FinBERT, enabling modeling of market sentiment, events impact, and financial risk indicators. Volatility indices, moving averages, liquidity metrics, and event types are also extracted to improve anomaly detection, forecast accuracy, and multimodal reasoning.
The electricity market data set from ENTSO-E gives insights into large-scale operations and transactions in interconnected European electricity markets and transmission systems. As is evident from Table 4, features of the electricity market, such as hourly electricity prices, day-ahead market prices, and cross-border trades, are extracted to study the behavior of regional energy trading and price fluctuations. Features such as demand loads and reserve balances are used to infer the electricity consumption patterns and the grid's balancing capacity. Renewable energy metrics such as solar and wind power output are also used to study the intermittency of renewables and varying demand-supply scenarios within the smart grid environment. Moreover, operational metrics of the grid include features such as the congestion index, transmission flows, and grid frequency stability to capture interconnections within the grid and the reliability status of the power system. The carbon emission rates and penetration rates of renewable energy sources are also added to perform sustainability-based forecasting and explainable reasoning.
Cross-modal transformer fusion
In the proposed model architecture, semantic queries produced by the LLM-based NLP Natural Language Query Understanding module serve as guides for contextual queries, whereas temporal signals, semantic representations, graph topology features, and visual chart embeddings are used as the keys and value pairs, respectively, in multimodal reasoning. These capabilities allow the model to learn complex interactions, such as the result of economic news on electricity prices, the consequence of generation variability on cross-border trading behavior, and how power grid congestion affects volatility.
Multi-head fusion attention is also incorporated into the architecture in order to facilitate the interaction between heterogeneous features and the multimodal representation learning capabilities. The model may simultaneously learn various semantic interactions in several representation subspaces by using the multi-head fusion technique. The process of multi-head attention fusion can be described as:
(14)
where: headi refers to the ith attention head, WO denotes the output projection matrix.
The resultant fused multimodal embedding is further enhanced by applying feed-forward neural networks with residual normalization for more stable feature processing and analytical generalization. Mathematically, the resultant fused multimodal embedding can be characterized as follows:
(15)
Where FEfusion denotes the resultant fused multimodal embedding.
Cross-modal Transformer fusion results in cross-modal embeddings, which are then used for forecasting, anomaly detection, reasoning analysis, interpretable inference, and automatic chart creation in the proposed intelligent power trading system. The introduction of cross-modal Transformer fusion enhances feature interactions, context-based reasoning, multimodal dependencies, and prediction accuracy in power trading compared to traditional unimodal forecasts.
The novel cross-modal transformer fusion architecture employs heterogeneous multimodal representations obtained from electricity trading data to form an analytical feature space for intelligent trading decisions in the electricity domain, as given in Algorithm 1 (Supplementary File 1). First, the modality-dependent features obtained from Temporal Transformers, FinBERT, GNNs, ViTs, and LLMs are mapped into a common latent representation space via trainable mapping matrices, ensuring all modalities share the same dimensionality. Next, the combined multimodal representations will be sent into the cross-attention Transformer architecture, where query, key, and value matrices will be created to capture context-aware interactions across heterogeneous modalities. This technique allows the framework to account for the complex dependencies among electricity prices, market sentiment, fluctuations in renewable energy production, power grid congestion, and visual trading trends. Additionally, to capture various semantic relations among representation subspaces, the proposed framework employs a multi-head attention fusion technique. Following attention-based fusion, feedforward neural networks are used to further improve feature stability while avoiding any loss of information when performing multimodal integration. Finally, the fused multimodal representation that has been created will be used for various analysis purposes, such as prediction, anomaly detection, structural reasoning, explainable inference, and automatic chart creation within the suggested intelligent power trading system.
Federated collaborative learning
The suggested architecture uses federated collaborative learning (FCL) to facilitate distributed multimodal model training across heterogeneous logical client partitions after the cross-modal transformer fusion procedure. To replicate heterogeneous distributed learning settings, the clients in the current experimental setup are built as non-overlapping partitions of the FMST and ENTSO-E datasets. The experimental clients do not represent independently acquired datasets from distinct geographic regions, even though the datasets contain information across several markets and geographic settings. Therefore, rather than directly illustrating real-world cross-region generalization or privacy preservation, the current evaluation concentrates on the efficacy of FCL for distributed multimodal learning and model optimization. Future deployment scenarios include the framework's possible use in privacy-sensitive real-world deployments and autonomously run regional markets. For this reason, the proposed framework adopts a federated learning approach, in which various decentralized market nodes train their respective multimodal models without exchanging sensitive information, such as raw electricity market transactions, financial data, and grid operational information. Each decentralized regional node performs localized optimization using its own multimodal trading dataset, which includes electricity price information, renewable energy production information, financial stream data, and grid congestion data. However, in the experimental analysis, the aforementioned decentralized clients correspond to distinct logical data partitions of the FMST and ENTSO-E datasets, while the geographical locations, as shown in Figure 1, are intended to illustrate possible use cases and are not the actual geographical datasets used in the experimental validation process. Let Di refer to the local dataset of the ith region, and wi refer to the local model parameters. Mathematically, the local optimization problem can be formulated as follows:
(16)
Where:
represents parameters of the model at iteration t, η represents the learning rate, and
represents gradient updates performed using local multimodal data. Where,
represents the model parameters of client i at communication round t,
is the updated model parameters of the client after the local training, η is the learning rate, and
represents the gradient of the local loss function using client i’s dataset.
This decentralized learning algorithm allows each regional trading point to train the local model by learning the behavior of the local market, variations in electricity demand, renewable energy sources, and characteristics of the electrical grid without revealing any critical market data.
After training the model locally, the proposed approach uses global collaborative aggregation via Federated Averaging (FedAvg) to create a single global multimodal inference model. In this way, rather than sending raw data for analysis, the model parameters are sent in an encrypted form to the centralized aggregation server. The global federated averaging process can be mathematically stated as:
(17)
Where: wg denotes global model parameters, N denotes total amount of participating nodes, ni denotes amount of models in node i, n denotes overall quantity of models in all nodes. Where, wg denotes the new global model parameters after aggregation, wi is the local model parameters of client i, ni is the number of training data samples with client i, ni is the total number of training data samples, and N is the total number of federated clients.
The federated aggregation approach enhances the global generalization performance by fusing diverse multimodal information learned from different electricity trading scenarios and regional markets. Therefore, the proposed learning framework can manage better regional market differences, variability of electricity trade between regions, and diverse power grids compared to centralized approaches.
Moreover, the proposed FCL framework combines privacy-preserving multimodal inference and communication-efficient distributed optimization for improved robustness and scalability of analytics in intelligent power trading systems.
To reduce the communications required for federated learning, adaptive model synchronization and selective parameter updating are used between the participating nodes. Global multimodal fusion model is updated repeatedly in the process of optimizing locally and aggregating globally until convergence. The final federated optimization problem is formulated as:
(18)
Where Li(w) refers to the local loss function of node i, w indicates optimized global model parameters. Where, L denotes the complete federated learning objective, Li is the local loss of client i, ni is the number of data samples with client i, and N is the total number of federated clients. Multimodal representation that is formed via federated learning is then leveraged for the purpose of prediction, anomaly detection, interpretive analysis, structured inference creation, and automatic chart plotting.
Structured analytical inference
Following FCL, the suggested framework applies structured analytical inference (SAI) to convert the fused multimodal representations into structured analytical outputs for making intelligent decisions related to power trading. The main focus of this process is to create forecasts, anomaly detection reports, trend analysis outcomes, and SQL-like structured analytics using various multimodal data gathered from FMST and ENTSO-E datasets. Firstly, the optimally fused multimodal representation produced by the Cross-Modal Transformer Fusion layer will be fed into an inference engine that uses the semantic embeddings generated by the Natural Language Query Understanding module. Suppose it used FEfusion to represent the optimally fused multimodal representation and Eq to represent semantic query embeddings. The structured analytical inference process can be formally described as:
(19)
where: As refers to structured analytical outputs, Infer(cdot) denotes a multimodal analytical inference function. These analytics representations include forecasting metrics, electricity prices’ trends, volatility analysis, renewable production trends, congestion risks, and electricity trading insights with respect to user-defined analytical intents. With this approach, it becomes possible to map natural language market queries into machine-readable structured analytics representations that can be used in generating explainable decision-making support systems and visualization tools. Following that, forecasting and trend analysis are achieved using fused multimodal embeddings obtained using electricity trading information, financial news feeds, renewables’ trends, and electrical grids' topology relations. Suppose Xt is temporal electricity trading information and Ffusion is the fusion of the multimodal embeddings. Then the forecasting task can be formulated mathematically as follows:
(20)
Here,
are forecasts for electricity market output, f(cdot) is the multimodal forecasting function. The forecasting component forecasts market prices, load demand, renewable generation, and cross-border electricity transfers for upcoming trading periods. Moreover, anomalies are detected for any irregularities such as abnormal market behavior, congestion on the transmission grid, price spikes, and other factors. The process of anomaly detection can be expressed mathematically as:
(21)
where: Ai are anomalies, Xi represent observations in trading period i, μ and σ are mean and standard deviation, λ is anomaly threshold. Moreover, the proposed framework creates structured analytics reports and natural language summaries based on SQL-type queries and explainable inference models. Some of the types of generated analytics reports include forecasting reports, market volatility summaries, renewable energy analysis, market risks explanation, and congestion-aware electricity trading. The analytics report creation is formulated mathematically as:
(22)
where: R denotes produced analytical reports and summary outputs.
Automated chart generation
After the structured analytical inference stage, the framework conducts automated chart generation (ACG) by mapping the structured analytical results into a dynamic visualization that supports intelligence-based power trading analytics. In this regard, the main goal of this phase is to automatically generate visualizations, including bar charts, trend lines, volatility graphs, heatmaps, and trading dashboards, from the multimodal analytical representations derived from the FMST and ENTSO-E data. Unlike typical visualization solutions, where visualization chart types must be manually selected and parameters configured As, the proposed framework adopts an LLM-based visualization reasoning mechanism to select the appropriate chart type according to user analytical queries, structured inference results, and multimodal contexts. At first, the multimodal visualization representation Eq obtained through inference engine analysis is mapped along with the semantic query embedding to derive an optimal visualization structure. The visualization chart selection equation can be written as follows:
(23)
where: Ct represents the selected type of chart, Select(cdot) is the visualization suggestion function. In this regard, the volatility analysis is plotted in line and heatmap types, whereas the comparison of electricity demand by categorization is done in bar charts, and the distribution of renewable energy in various regions is done in the form of a dashboard and a pie chart type. The visualization approach makes it more understandable to make decisions and analyze in big power trading environments.
Subsequently, after visualization, the framework generates chart templates according to the structure of forecasting outputs, anomaly detection indicators, market trends, and grid statistics generated from the multimodal inference engine. Where FEfusion is the multimodal analytical representation after fusion and R is the generated structured report. Chart generation is represented as:
(24)
Where, Vc is a set of generated visualization outputs, Generate(cdot) refers to automated chart generation.
The generated charts include electricity price volatility charts, trends in renewables, congestion-related heat maps, cross-border transmission charts, and anomaly-detection-based visualization summaries. In addition, to enhance visualization comprehension and semantics, the suggested framework uses ChartQA-assisted visual reasoning and OCR-assisted label extraction, in line with the analytical output, to align with chart legends, numerical values, timestamps, and market indicators. Such an approach enables the framework to generate meaningful visualizations of power trading activity, regional demand variations, and electricity market dynamics.
In addition, the automated chart generation module facilitates explainable, visualization-aware reasoning by integrating multimodal semantics with dynamically generated visuals. Generated visual analytics are accompanied by text explanations on market fluctuations, congestion levels, renewable energy fluctuations, and electricity demand trends. Mathematically, the process of visualization-aware explanation generation can be defined as:
Ev = Explain(Vc, As) (25)
Where, Ev stands for explainable visualization summarizations.
Explainable AI layer
Following automated chart generation, the proposed methodology adds an explainable AI (XAI) component that enables transparent, interpretable, and human-comprehensible analytical reasoning for large-scale power trading intelligence. The main task of the explainable AI component is to make explanations about how multimodal features, forecasting models, market events, renewables, and grid topology interactions affect the results of analytical decisions produced by multimodal fusion inference. Because deep learning models such as transformers, GNNs, vision transformers, and LLMs operate as black boxes, the proposed XAI module leverages attention-mechanism-based explainability, feature attribution methods, and visualization-aware reasoning to make the analytical process more transparent and reliable. Initially, the multimodal fused representation FEfusion, structured outputs of analysis As, and the resulting chart representation Vc are fed into an explainability engine where the contributions made by each modality to the process of forecasting, anomaly detection, and trend identification are found. The mathematical formulation of the feature attribution method is as follows:
(26)
Where Xf is a vector of explainable feature attributions, while Explain(cdot) stands for the explainability function. This technique makes it possible for the system to detect important market factors affecting its analysis results, such as price peaks, imbalances in renewable generation, transmission capacity limits, shifts in market sentiment, and variations in market demand.
As follows, the presented XAI model uses attention-based visualization and SHAP analysis to produce interpretable explanations for multi-modal prediction results. Attention weights retrieved from the cross-modal transformer fusion layer are used to emphasize important time sequences, market events, chart elements, and graph topology interactions that affect the prediction decision. Formally, the attention-based score calculation can be stated as:
(27)
Where αi is the attention importance weight, while QU and KE are the query and key matrices correspondingly. The feature contribution analysis using SHapley additive explanations (SHAP) is additionally integrated in the approach to calculate the extent to which each of the multimodal features contributes to prediction and reasoning outcomes. The formula for SHAP value calculation is expressed as follows:
(28)
Where
is the SHAP value, F stands for feature set, and S is feature subsets. Thus, the use of the above allows for generating human-readable explanations of the factors that affect electricity price predictions, anomaly detection, and analytical reasoning. These factors include specific market indicators, renewable energy features, financial sentiment values, and transmission constraints. As computing exact SHAP values is very expensive for high-dimensional multimodal transformer models, the framework uses an approximate SHAP value computation approach based on background sampling and mini-batch feature evaluation. In the process, the feature attributions are computed separately for each modality—temporal, textual, visual, and graph—after local inference on individual federated clients. Subsequently, the modality-specific explanations are aggregated by weighted averaging in the federated aggregation phase.
Also, the Explainable AI module develops human-interpretable natural language reasoning descriptions of market dynamics, congestion levels, renewable energy generation, load mismatches, and trade patterns. The mathematical expression for such an explanation generation is as follows:
(29)
where Ex stands for generated explainable analytical insights. In this regard, for instance, if the proposed framework suggests an unexpected jump in the price of electricity during peak consumption periods, the Explainable AI will point out critical elements that include a drop in renewables generation, transmission congestion, negative market sentiment, and higher load consumption, while at the same time indicating relevant geographical areas through generated visualizations such as charts and dashboards. Table 5 provides an outline of the approximate SHAP implementation, inference latency, GPU memory overhead, runtime, and computational parameters of the Explainable AI module of the proposed multimodal federated system.
System implementation details
The architecture was implemented using Python 3.11 along with PyTorch 2.2 deep learning libraries, with GPU acceleration powered by CUDA. The CUDA framework by NVIDIA is a parallel computing platform that is used for accelerating deep learning calculations on GPUs. The PyTorch 2.2 framework is an open-source deep learning framework that is useful in implementing and training neural networks. It also supports GPU acceleration and automatic differentiation. Temporal electricity market data were modeled using Temporal Transformer and iTransformer networks, financial news was encoded with FinBERT, chart images were processed using (ViT, and power grid topology was represented using GNNs. Natural language queries were interpreted using a domain-adapted BIMCoder model, fine-tuned on FMST and ENTSO-E power trading terminology and query–intent pairs. Federated training was implemented using the Flower framework with secure parameter aggregation. The multimodal fusion engine was developed in Python 3.11 using PyTorch 2.2 with CUDA acceleration and trained with the Adam optimizer, learning rate scheduling, gradient clipping, and mixed-precision distributed GPU training. The complete hardware configuration, software environment, training hyperparameters, and implementation settings are summarized in Table 6.
Following preprocessing and temporal synchronization, the multimodal dataset was partitioned into training, validation, and testing sets using a chronological 70:15:15 split for all modalities. This strategy prevented temporal data leakage by ensuring that training samples strictly preceded the validation and test sets, with no overlapping sliding windows. Hyperparameter tuning was performed exclusively on the validation set, while the test set was reserved for the final performance evaluation. There are four modality-specific encoders in the multimodal architecture. Temporal Transformer and iTransformer networks encode temporal electricity market sequences; FinBERT embeddings represent financial news; a ViT processes historical trading charts; and a GNN models power grid topology. A multi-head cross-modal transformer with cross-attention, feed-forward layers, residual connections, and layer normalization is used to fuse the retrieved modality-specific embeddings after they have been projected into a shared latent feature space with the same dimensions. The downstream inference engine uses the resulting unified multimodal representation for automated chart creation, explainable reasoning, anomaly detection, and forecasting.
During model training, early stopping based on validation loss, dropout, weight decay, gradient clipping, and dynamic learning rate scheduling were employed to improve training stability and generalization. All experiments were repeated under identical settings, and the reported results are presented as the mean ± standard deviation. The explainable AI module was executed after model inference and therefore did not affect the training process. Approximate SHAP values were computed using background sampling and mini-batch processing, introducing minimal inference latency and GPU memory overhead while providing efficient multimodal explanations within the federated framework.