---
title: Trans-XFed Architecture for Supply Chain FL
url: https://www.emergentmind.com/topics/trans-xfed-architecture
type: topic
---

# Trans-XFed Architecture for Supply Chain FL

Trans-XFed most directly denotes a federated learning architecture for supply chain credit assessment that combines FedProx, CKKS homomorphic encryption, a client-local transformer encoder, a Performance-Based Client Selection Strategy (PBCS), and Integrated Gradients (IG) to address privacy, information silos, class imbalance, Non-IID data, and interpretability in binary default prediction [2508.13715]. In the supplied literature, the same label also appears in other, non-equivalent architectural contexts—most notably transporter-mediated federated learning under the FedEx framework and a Transformer reparameterization centered on a single widened shared encoder FFN—so the term is context-dependent rather than fully standardized across sources [2302.07323] [2309.01826].

## 1. Scope, task definition, and data regime

In its primary usage, Trans-XFed is formulated as a horizontal federated learning system for binary classification in supply chain credit assessment, where the target is to predict whether a borrower will default or not default, with labels $y \in \{0,1\}$ [2508.13715]. The local datasets share the same 21-dimensional feature space and contain tabular features describing company attributes and financial indicators, but their distributions differ across industries and time periods. This heterogeneous regime motivates the explicit treatment of class imbalance and Non-IID effects as first-class architectural constraints rather than incidental training noise.

The experimental deployment uses $K=4$ financial institutions as clients, with local dataset sizes $N_k \in \{18{,}368;\ 19{,}904;\ 18{,}816;\ 13{,}440\}$ and minority-class rates between approximately $11.75\%$ and $14.04\%$ [2508.13715]. A central coordinator orchestrates communication rounds $t=1,\ldots,T$ with $T=50$. At each round, the server dispatches the current global model, selected clients perform local training, and encrypted model parameters are returned for secure aggregation. Raw data never leave the clients.

The design objective is therefore multi-criteria. It is not only to maximize predictive performance on an imbalanced default-detection task, but also to preserve privacy during parameter exchange, to stabilize optimization under heterogeneous local distributions, and to expose feature-level rationales for downstream credit decisions. A plausible implication is that the architecture is aimed at domains in which collaborative learning, regulatory scrutiny, and asymmetric error costs coexist.

## 2. End-to-end system architecture and training workflow

The system comprises a central server, client-local learning stacks, CKKS homomorphic encryption modules, and an explainability pipeline [2508.13715]. The server orchestrates communication rounds, ranks clients, aggregates encrypted parameters, decrypts aggregated ciphertext, and updates the global model. Each client hosts a local dataset, a transformer encoder with classifier head, a FedProx-based local optimizer, an IG module for local explainability, and an HE module for encrypting model parameters before transmission.

One round proceeds in six stages. First, the server initializes or maintains global weights $w^t$ and broadcasts them to all clients. Second, each client evaluates the received model on its local validation split and computes a local F1 score; the server ranks these scores and selects the top $M=rK$ clients with $r=0.5$. Third, selected clients train locally for $E=250$ epochs using SGD with learning rate $0.01$ and batch size $64$. Fourth, each selected client encrypts its updated parameters with CKKS under the server-provided public key. Fifth, the server computes an encrypted weighted sum using coefficients $\gamma_k$ proportional to the selected clients’ data volumes and then decrypts the aggregate. Sixth, the updated global model is broadcast for the next round. Training continues until a stopping criterion such as the maximum number of rounds or a validation plateau is reached.

This workflow makes model selection and aggregation explicitly performance-aware. Client ranking occurs before local training in each round, rather than after model collection, which means the architecture filters participants according to their current local validation behavior under the global model. This differs from random-participation federated baselines and directly couples communication scheduling to minority-class-sensitive validation performance.

## 3. Federated objective, FedProx regularization, and PBCS

The global federated objective is the weighted sum of local expected losses,
\[
\min_{w} \sum_{i=1}^{N} p_i F_i(w),
\]
where $F_i(w)=\mathbb{E}_{(x,y)\sim D_i}[\ell(f_w(x),y)]$ and the weights $p_i$ are typically proportional to client data size [2508.13715]. For a selected client $i$ at round $t$, local optimization uses the FedProx objective
\[
\min_{w_i} \; F_i(w_i) + \frac{\mu}{2}\left\lVert w_i-w^t \right\rVert_2^2,
\]
with proximal coefficient $\mu$ scheduled from $0$ to $0.01$ in increments of $0.0002$ across rounds. The proximal term constrains local drift away from the dispatched global weights and is intended to mitigate instability under heterogeneous client distributions.

For the credit-scoring task, Trans-XFed uses weighted Negative Log-Likelihood as its preferred loss:
\[
\ell_{\text{NLL}}(x,y)
=
-\sum_{c=1}^{C}\beta_c \,\mathbf{1}[y=c]\,\log P(y=c\mid x),
\]
with $C=2$ classes, $\beta_{\text{default}}=0.75$, and $\beta_{\text{non-default}}=0.25$ [2508.13715]. This reweighting emphasizes the minority default class. Cross Entropy and Focal loss are evaluated as baselines, but weighted NLL is the chosen Trans-XFed objective.

Local SGD with FedProx uses
\[
w_i \leftarrow w_i - \eta \Big(\nabla F_i(w_i;B)+\mu(w_i-w^t)\Big),
\]
and the server updates the global model by weighted averaging,
\[
w^{t+1}=\sum_{i\in S}\gamma_i w_i^{t+1},
\]
where $\gamma_i \ge 0$, $\sum_{i\in S}\gamma_i=1$, and $\gamma_i \propto N_i$ for selected clients [2508.13715].

PBCS operationalizes client selection through minority-class-sensitive validation statistics. Each client computes precision $P=TP/(TP+FP)$, recall $R=TP/(TP+FN)$, and
\[
F1=\frac{2PR}{P+R},
\]
for the positive default class using a threshold such as $0.5$ [2508.13715]. The server sorts clients by descending F1 and selects the top $\lfloor rK \rfloor$. The stated rationale is that high-F1 clients typically provide better recall for the minority class and more reliable local updates, thereby reducing noisy gradients from poorly calibrated clients. The design, however, has explicit trade-offs: high-F1 clients may be overrepresented, diversity can decrease, and some clients may rarely participate. The paper identifies occasional random inclusion, minimum participation quotas, decay factors, or exploration phases as mitigations.

## 4. Privacy mechanisms, transformer representation, and local explainability

Privacy preservation is implemented with CKKS, the Cheon–Kim–Kim–Song approximate homomorphic encryption scheme, which supports homomorphic addition and multiplication over real-valued vectors [2508.13715]. The server initializes CKKS parameters and generates public and secret keys; clients encrypt local parameters with the public key, and the server aggregates in the encrypted domain:
\[
\llbracket w^{t+1} \rrbracket = \sum_{k\in S}\gamma_k\,\mathrm{Enc}_{pk}(w_k^{t+1}),
\]
followed by
\[
w^{t+1}=\mathrm{Dec}_{sk}\big(\llbracket w^{t+1} \rrbracket\big).
\]
The threat model is parameter and gradient leakage during transit and aggregation. The paper states that even if communication channels or server memory are inspected, ciphertext reveals no sensitive patterns. At the same time, CKKS introduces ciphertext expansion, computational cost, and approximate-arithmetic noise-budget management, so privacy is obtained with explicit systems overhead.

The model backbone is a client-local transformer encoder adapted to tabular inputs [2508.13715]. Each of the 21 features is treated as a token. Continuous features are normalized and projected to $d_{\text{model}}$ through learned linear embeddings, while categorical features, if present, use learned embeddings. Positional encodings can be omitted or fixed because the data have no natural order. The encoder uses scaled dot-product attention,
\[
\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right)V,
\]
and multi-head attention with $h=3$ heads:
\[
\mathrm{MHA}(Q,K,V)=\mathrm{Concat}(\mathrm{head}_1,\ldots,\mathrm{head}_h)W^O.
\]
Residual connections, layer normalization, and a position-wise feed-forward network complete the block. The encoder output feeds fully connected layers for binary classification, with output $\hat{y}=\sigma(z)$.

Explainability is provided by Integrated Gradients, computed locally on each client:
\[
\mathrm{IG}_i(x)=\left(x_i-x'_i\right)\int_{0}^{1}\frac{\partial F\!\big(x'+\alpha(x-x')\big)}{\partial x_i}\,d\alpha,
\]
where $F$ is the model output, $x$ is the sample, and $x'$ is a baseline such as the zero vector [2508.13715]. The key privacy property is locality: data and gradients do not leave the client. Clients may share only aggregate explanation statistics, such as mean IG per feature over subsets of samples. The paper contrasts IG with SHAP and LIME, noting that IG satisfies sensitivity and implementation invariance and integrates straightforwardly with deep networks.

## 5. Experimental performance, interpretability findings, and implementation profile

The experimental setup uses real-world supply chain datasets from Shi et al. (2025), with four training clients sharing 21 features and a test set of size $17{,}664$ built by taking $20\%$ from each client [2508.13715]. Each client uses a stratified $80\%/20\%$ train/validation split that preserves class ratios. Baselines are FedAvg and FedProx with random client selection, the same transformer-plus-fully-connected local architecture, and weighted aggregation. The implementation stack is Python 3.10, PyTorch 1.9.0, and TenSEAL 0.3.14.

The reported evaluation emphasizes minority-class recall and F1, with precision also reported. AUC-ROC and AUC-PR are described as suitable, but the paper prioritizes recall and F1. The central empirical claim is that Trans-XFed reaches its best minority-class performance substantially earlier than the baselines.

| Model | Minority-class test result | Best round |
|---|---|---|
| Trans-XFed (NLL) | Recall 0.8889; Precision 0.5961; F1 0.7137 | 10 |
| FedAvg (NLL) | Recall 0.8879; Precision 0.5730; F1 0.6968 | 36 |
| FedProx (NLL) | Recall 0.8486; Precision 0.5456; F1 0.6642 | 36 |

Trans-XFed with CE and Focal loss is also described as competitive, but NLL performs best [2508.13715]. The ablation narrative attributes the performance profile to several interacting components. PBCS accelerates convergence and improves F1 relative to random selection. The transformer is said to improve representation quality and interpretability via attention relative to simple MLP backbones. IG provides feature-level explanations consistent with domain knowledge. HE secures parameter exchange with acceptable overhead, and the faster convergence is reported to compensate for the higher communication cost.

The interpretability findings are specific. For defaulting samples, “small and micro enterprises,” “bank early warning,” “revolving credit facility,” and “years relationship with bank” receive strong positive attributions. For non-defaulting samples, “guarantee type” and “credit rating” have protective influence, expressed as negative attribution on default probability. Some features, including “government platform finance” and “prohibited industry,” show minimal effect in both groups. Attention analysis further identifies “repayment method” as central to default prediction, while “platform type” and “guarantee type” often exhibit negative relationships for non-defaults [2508.13715].

The limitations are also explicit. CKKS enlarges payloads and adds computational cost; approximate arithmetic introduces small decryption error. Even with HE, updates may encode distributional signals, so the paper identifies secure multi-party computation, differential privacy, and privacy auditing as future directions. PBCS raises fairness concerns because weaker clients can be selected less often. Scaling to larger client counts may require more efficient attention variants, parameter sharing strategies, personalized federated learning, or domain adaptation across industries.

## 6. Alternative architectural usages of the label

The supplied literature attaches the same label to two additional architectures that are technically distinct from the supply-chain system. This suggests that “Trans-XFed” functions more as a context-dependent architectural tag than as a single canonical design.

| Usage in supplied sources | Core architectural idea | Source |
|---|---|---|
| Supply-chain FL | FedProx + CKKS + transformer encoder + PBCS + IG | [2508.13715] |
| Indirect-communication FL | Mobile transporters disseminate global models and collect cumulative local updates | [2302.07323] |
| Transformer reparameterization | One shared widened encoder FFN; decoder FFNs removed | [2309.01826] |

In the FedEx-related usage, the architecture assumes no direct server–client or client–client connectivity; instead, mobile transporters such as UAVs or vehicles physically disseminate the current global model and collect cumulative local updates from stationary clients [2302.07323]. Two variants are defined: FedEx-Sync, in which all transporters start together and faster ones wait for the slowest, and FedEx-Async, in which each transporter begins a new tour immediately after completing the previous one. The system explicitly models round-trip time $\Delta_k$, staleness through $(t-1)-\phi_i(t)$, and asynchronous delay terms. The design insights follow the convergence bounds: FedEx-Sync motivates minimizing $\max_k \Delta_k(a)$, whereas FedEx-Async motivates minimizing $\sum_k R_k(a)\Delta_k(a)^2$. The paper’s route-planning procedure uses a bi-level CARD method with Gibbs Sampling in the outer loop and 2-OPT TSP heuristics in the inner loop. This architecture is therefore about FL under absent communication infrastructure rather than explainable credit assessment.

In the Transformer-architecture usage, “Trans-XFed Architecture” is mapped to the “One Wide FFN” configuration, in which a single FFN is shared across all encoder layers, decoder FFNs are removed, and the shared encoder FFN is widened to recover or exceed baseline capacity [2309.01826]. For Transformer Big with $N_{\text{enc}}=N_{\text{dec}}=6$, $d_{\text{model}}=1024$, and $d_{\text{ff}}=4096$, the widened configuration sets
\[
d_{\text{ff}}'=(N_{\text{enc}}+N_{\text{dec}})\times d_{\text{ff}}=49{,}152.
\]
The FFN uses ReLU,
\[
\mathrm{FFN}(x)=\max(0,xW_1+b_1)W_2+b_2,
\]
and when the decoder FFN is removed, its associated residual connection and layer normalization are also removed. On WMT22 En$\rightarrow$De, the baseline Transformer Big reports BLEU $35.6$, chrF $62.6$, COMET $57.2$, speed $110.8 \pm 1.2$ tokens/s, and $228$M parameters, whereas the One Wide FFN configuration reports BLEU $36.5^\dagger$, chrF $63.2^\dagger$, COMET $59.6$, speed $137.5 \pm 1.6$ tokens/s, and the same parameter count of $228$M [2309.01826]. Here the architectural emphasis is not federated optimization but redundancy reduction in FFN sublayers and improved autoregressive latency.

Taken together, these usages make clear that the term does not denote a universally fixed blueprint. In the supply-chain paper it names an explainable federated credit-scoring system; in the FedEx material it denotes transporter-mediated federated communication; in the Transformer-compression material it denotes a specific FFN-sharing topology. The shared motif is architectural integration across multiple constraints, but the concrete mechanisms, objectives, and evaluation regimes differ substantially.

Source: https://www.emergentmind.com/topics/trans-xfed-architecture