Manuscript Offprint
arXiv:2608.25238TrustFormer: Cross-Temporal and Cross- Dimensional Transformer for Task-Specific Multi-Dimensional Trust Evaluation
Botao Zhu and Xianbin Wang
Department of Electrical and Computer Engineering, Western University, London, Ontario, Canada
Abstract—In dynamic collaborative systems, the selection of reliable collaborators is critical to ensuring effective task execution. Existing trust evaluation methods often rely on unidimensional or scalar representations, which fail to faithfully capture a collaborator's true trustworthiness, thereby motivating a shift toward multi-dimensional trust modeling. However, due to the asynchrony of collected trust-related data across different dimensions, as well as the complex intra- and inter-dimensional dependencies embedded within these data, multi-dimensional trust evaluation remains challenging. To address these challenges, we propose TrustFormer, a task-specific multi-dimensional trust evaluation framework. Specifically, TrustFormer leverages task identifiers and device-generated timestamps to synchronize heterogeneous trust-related data across historical collaborations. It further employs cross-temporal and cross-dimensional attention mechanisms to jointly model temporal dynamics and inter-dimensional correlations, thereby effectively learning the multi-dimensional trust evolution of potential collaborators from historical performance data. In addition, according to the multi-dimensional resource requirements of tasks, potential collaborators' multidimensional resource trust is evaluated. Finally, by synthesizing these multi-dimensional trust profiles, the framework enables the optimal collaborator selection. Experimental results demonstrate that TrustFormer outperforms existing methods by yielding a 40.8% improvement in trust evaluation accuracy and enabling more reliable collaborator selection.
Index Terms—Cross-temporal attention, cross-dimensional attention, multi-dimensional trust, Transformer
I. INTRODUCTION
By integrating the Internet of Things (IoT), edge computing, and artificial intelligence, distributed intelligent systems are expected to support a wide range of applications, such as autonomous driving and robotic collaboration. Due to their inherent resource constraints, individual devices are unable to execute increasingly complex tasks independently, necessitating collaboration with other devices for task execution. Under this paradigm, the effective selection of reliable collaborators is of paramount importance for successful task completion and overall system effectiveness [1]. Trust has been widely recognized as a holistic mechanism for evaluating whether a collaborator possesses the required capabilities and resources to undertake specific tasks. Existing trust evaluation methods typically collect collaborators' historical performance data—such as task success rates and packet loss ratios—and aggregate these multi-dimensional metrics into a single scalar trust score using predefined weighting schemes [2]. However, scalar aggregation obscures dimension-specific deficiencies, making it difficult to identify which aspect of a collaborator is unreliable.
As future collaborative systems support increasingly diverse tasks, the requirements imposed on collaborators exhibit inherently multi-dimensional characteristics. For instance, safety-critical tasks require strictly high task completion accuracy and stable computational behaviors, whereas data-intensive tasks heavily prioritize storage capabilities and bandwidth performance [1]. Therefore, it is imperative for trust evaluation to transition from a traditional scalar paradigm to a multi-dimensional paradigm. The evaluation mechanism must independently quantify a collaborator's trustworthiness across each required dimension, producing a trust vector that directly corresponds to the task's multi-dimensional requirements. This approach not only yields a comprehensive and fine-grained profiling of the collaborator's trustworthiness but also guarantees that the selected collaborator satisfies the task requirements across all dimensions. However, realizing multi-dimensional trust evaluation in collaborative systems poses several challenges.
How to effectively synchronize heterogeneous data for multidimensional trust evaluation? In distributed collaborative systems, historical trust-related data collected from past collaborations is inevitably dispersed across different participants. To achieve accurate trust evaluation, the records of task outcomes from task owners and the corresponding states and resource conditions of participating collaborators have to be gathered for aggregated analysis. Due to clock drift across devices and varying delays introduced by network transmission, distributed data received by the trust evaluation server is often desynchronized and out of chronological order. Without effective synchronization, data from different collaborations may be mistakenly mixed together, and the data order within the same collaboration may be misaligned, ultimately leading to unreliable trust evaluation. While commonly used clock synchronization protocols (such as Network Time Protocol or Precision Time Protocol) can achieve time alignment across devices, they could incur substantial network communication overhead for distributed systems [3]. In fact, synchronizing all devices to a global absolute time coordinate system is unnecessary in trust evaluation. This is because the essence of trust evaluation is to discover the evolutionary patterns of collaborators' historical behaviors from the data collected during past collaborations. Therefore, we could consider some lightweight strategies, such as the monotonicity of local clocks within each data source and task identifiers, to align multidimensional data across collaborations.
How to jointly capture the intra-dimensional temporal trust evolution and the cross-dimensional dependencies? A collaborator's trustworthiness is inherently time-varying, and each trust dimension may exhibit complex evolution patterns. For instance, a collaborator's task completion accuracy may gradually degrade due to device aging, abruptly deteriorate after a period of high trust because of strategic misbehavior, or intermittently fluctuate under unstable resource conditions [4]. Traditional trust estimation methods, such as weighted moving averages, primarily reflect recent statistical trends and lack the ability to actively identify such complex temporal patterns, particularly abrupt changes [5]. Furthermore, multiple trust dimensions are inherently interdependent and exhibit dynamic correlations. For example, anomalies in CPU stability often coincide with declines in task completion accuracy, while resource contention may simultaneously degrade timeliness and disrupt memory behavior. Existing trust evaluation approaches typically employ sequence models, e.g., standard Transformer-based architectures, to capture the evolution of trust. However, these models are primarily designed to model temporal dependencies. In multi-dimensional trust, an effective trust model must possess dual modeling capabilities: it should learn the temporal evolution of each dimension along the time axis while simultaneously capturing the dynamic coupling across dimensions, enabling more accurate and comprehensive trust assessment.
To address the aforementioned challenges, we propose TrustFormer, a Transformer-based multi-dimensional trust evaluation framework. TrustFormer integrates lightweight data synchronization with cross-temporal and cross-dimensional trust modeling to align heterogeneous trust-related data and evaluate collaborator trustworthiness according to task-specific multi-dimensional requirements. The contributions of this paper are summarized as follows.
• We propose a task-specific multi-dimensional trust evaluation paradigm that provides a more comprehensive and realistic assessment of collaborator trustworthiness with respect to task requirements.
• We propose a lightweight data synchronization mechanism for multi-dimensional trust-related data by leveraging task identifiers and the monotonicity of local device clocks.
• We design cross-temporal and cross-dimensional attention mechanisms that capture both the temporal evolution within each trust dimension and the interdependencies across different dimensions, enabling more effective modeling of multi-dimensional trust.
A. Task Model with Multi-Dimensional Requirements
When device acts as a task owner, it generates a task characterized by
where specifies the minimum trust requirements for potential collaborators across historical performance dimensions, and denotes the set of such dimensions. In this paper, we consider as , where and represent CPU and memory stability, while and denote task completion accuracy and timeliness, respectively. Similarly, specifies the requirements for potential collaborators' resources, where is the set of physical resource dimensions. In this paper, we assume that consists of three dimensions: available CPU, storage, and throughput. Each dictates the lowest acceptable resource provision in its respective physical unit (e.g., GHz for CPU, GB for storage, or Mbps for throughput). This multi-dimensional requirement structure reflects the fact that different tasks impose distinct requirements on collaborator reliability and resource capabilities. It is worth noting that the number of requirement dimensions can be extended as needed.
B. Task-Specific Multi-Dimensional Trust Model
Upon receiving the task from task owner , the trust server initiates trust evaluations for a set of candidate collaborators. Given the multi-dimensional nature of task requirements, relying on a conventional scalar trust value is insufficient. Therefore, it is imperative to evaluate potential collaborators across multiple dimensions to ensure that the selected collaborator can guarantee effective task completion. Specifically, for a candidate collaborator , its comprehensive trust profile is quantified as the degree of credibility in satisfying the multi-dimensional requirements of task across both the historical performance dimensions and the resource dimensions . Formally, the multi-dimensional trust of collaborator with respect to task is formulated as
(2) where represents the multi-dimensional historical trust of collaborator evaluated from its historical performance records. Similarly, represents the multi-dimensional resource trust of collaborator , indicating whether it possesses sufficient physical resources to satisfy the resource requirements of task . Without loss of generality, we adopt a binary formulation, where if the resource capacity of collaborator in dimension meets the corresponding task requirement; otherwise, . Based on the trust evaluation results, the trust server selects a suitable collaborator to execute the task .
C. Problem Formulation
Given a task submitted by task owner , the trust server aims to select the optimal collaborator that maximizes the aggregate trust value subject to the task's multi-dimensional requirements. To this end, we formulate the collaborator selection as the following optimization problem:
where is the all-ones vector, corresponding to uniform weighting across trust dimensions. The binary resource-trust dimensions are retained for a complete task-specific trust representation, while Constraint (5) restricts feasible candidates to those satisfying all resource requirements. Constraint (4) ensures that each historical trust dimension meets the corresponding task-specified requirement. Task-specific weights can be incorporated by replacing 1 with a task-defined weight vector.
III. TRUSTFORMER FOR MULTI-DIMENSIONAL TRUST EVALUATION
This section introduces the proposed TrustFormer for multi-dimensional trust evaluation. TrustFormer incorporates lightweight synchronization strategies to accurately align the historical performance data of collaborators. By leveraging cross-temporal and cross-dimensional attention mechanisms, the framework effectively captures both the temporal dynamics within individual trust dimensions and the complex interdependencies across them. Consequently, TrustFormer facilitates a more comprehensive and accurate modeling of multi-dimensional trust.
A. Multi-Dimensional Historical Data Collection
Evaluating the multi-dimensional trust of collaborators requires collecting their performance data from historical collaborations across multiple metrics. This data should be obtained from both participants in each collaboration: task owners can only observe task outcomes (e.g., task completion accuracy and timeliness), whereas collaborators can report their internal runtime metrics (e.g., CPU utilization). We assume that both collaborators and task owners report data honestly; however, even if collaborators behave dishonestly, their performance can still be inferred from the task outcomes reported by task owners. The trust server coordinates the entire process and serves as the central repository for all performance records. We illustrate the data collection process through a single historical collaboration. Suppose the trust server establishes a collaboration between a task owner and a collaborator to execute a task . Prior to task initiation, the trust server generates a globally unique cryptographic nonce, denoted as , and records a server-side timestamp to mark the start of the collaboration. This is distributed to both parties, serving as the binding key that associates all subsequent data streams with this specific collaboration.
Collaborator-side collection: Throughout task execution, collaborator periodically samples and reports its local resource states to the trust server. According to the system model, historical CPU and memory utilization are required, defining the sampled dimension subset as . Each sampled record is represented as , where is the device's local timestamp at the -th sampling point, and are the measured CPU and memory utilization, respectively. The fixed-interval sampling (e.g., every 1 second) continues from task start until completion, producing a comprehensive sequence of records for each collaboration.
Task-owner-side collection: Upon receiving the execution results, task owner independently verifies the outcomes and subsequently reports collaborator 's performance to the trust server. This report covers two historical dimensions, , i.e., task completion accuracy and timeliness. Formally, this verification record is represented as , where is task owner 's local monotonic timestamp at the moment of verification. quantifies the validated task completion accuracy, while serves as a binary timeliness indicator, yielding 1 if the task is completed within the prescribed deadline and 0 otherwise. Once the verification record is received, the trust server records a local timestamp to define the server-side boundary for the completion of the task . Any subsequent records tagged with that arrive beyond this boundary are discarded.
B. Multi-Dimensional Historical Data Synchronization
The trust server cannot utilize raw performance records directly, as variable network delays scramble their arrival order, and the embedded local timestamps originate from unsynchronized device clocks. In this study, strictly synchronizing all data to a unified global clock is not required. Instead, it is sufficient to accurately group the received data into their respective collaboration sessions and ensure that the chronological order within each individual performance dimension is correctly preserved. To reconstruct records from historical collaborations, the trust server first leverages to group all scattered records into their corresponding collaboration sessions. Subsequently, the trust server reconstructs the true

Fig. 1. TrustFormer leverages lightweight data synchronization and cross-temporal and cross-dimensional transformer to enable task-specific multi-dimensional trust evaluation and collaborator selection.
chronological sequences of CPU and memory utilization, and , by sorting the raw records according to their embedded local timestamps ( ). This localized temporal alignment is effective because records originating from the same physical device inherently guarantee the correct relative execution order.
To achieve a uniform multi-dimensional representation, the trust server aggregates the chronological sequences of the cu and mu dimensions into individual scalar values for collaborator . Rather than using simple summary statistics that discard the inherent temporal structure, we compute the root mean square of successive differences in the ordered monitoring sequence to serve as a stability metric. The CPU stability dimension is calculated as
The memory stability dimension, , is calculated identically using its respective sequence. A low value indicates stable resource consumption consistent with normal execution, whereas a high value suggests erratic behavior that may signal resource contention or abnormal execution. The correctness of these metrics critically depends on the ordering established in the synchronization step. Therefore, the multi-dimensional historical performance of collaborator in task is represented as a vector , , associated with the server-side completion timestamp .
C. Data Preprocessing when New Tasks Arrive
When a new task request ( ) arrives from task owner , the trust server initiates the historical trust evaluation for all potential collaborators. For collaborator , the trust server retrieves the historical performance vectors of its K previously completed collaborations. By vertically stacking these historical performance vectors in strictly chronological order, the server constructs the temporal multi-dimensional performance matrix and its associated timestamp vector as follows:
where the semicolon (;) denotes row-wise vertical concatenation, ensuring that the rows of temporally align with the elements of the column vector . Each column in traces the temporal evolution of a single performance dimension.
D. Multi-Dimensional Trust Representation Learning via Cross-Temporal and Cross-Dimensional Attentions
To capture the complex temporal dynamics and inter-dimensional dependencies inherent in collaborator 's multi-dimensional historical performance, we employ cross-temporal and cross-dimensional attention mechanisms.
Embedding: To project the matrix into a representation suitable for learning, each element in , representing the -th dimension of the -th historical record, is projected via a dimension-specific linear layer to yield . For the temporal modeling, let denote the -th element of . The time intervals between consecutive collaborations are encoded following the method in [6], combining a learnable positional embedding with a continuous time interval mapping to capture both sequential order and temporal distance, producing . The final embedding for dimension at the -th historical record is , where is shared across all dimensions within the same historical record. This process results in an embedding .
Cross-temporal attention: This attention captures how each performance dimension evolves across the historical collaborations. For each dimension independently, its temporal embedding sequence is extracted from . Standard multi-head self-attention (MSA) is applied along the temporal axis as follows:
(10) where , , are learnable projection matrices. The attention matrix captures pairwise dependencies between all historical collaborations within dimension , allowing the model to identify temporal patterns such as gradual performance degradation or abrupt behavioral changes. The per-dimension attention outputs are reassembled into the full representation and stabilized via residual connections and layer normalization, given by
Cross-dimensional attention: This attention captures correlations among different performance dimensions within each collaboration. For each collaboration independently, the embedding is extracted, containing the updated representations of all dimensions at the -th collaboration. MSA is applied across dimensions
where captures pairwise dependencies among all performance dimensions. Since is small, we directly apply MSA without the router mechanism in Crossformer [7]. The output follows the same residual and normalization structure as follows:
This attention enables the model to learn dynamic cross-dimension correlations. For instance, a decline in CPU stability often co-occurs with a drop in task completion accuracy. The cross-temporal and cross-dimensional attention stages constitute a single time-dimension attention block. By stacking such blocks, the final output can be obtained as , which encodes both the temporal dynamics and inter-dimensional dependencies of the collaborator's historical performance.
E. Historical Trust Calculation
To compute the multi-dimensional historical trust, we perform average pooling along the temporal axis for each dimension to obtain the temporally fused representation . It is then passed through an MLP as follows:
where is a sigmoid activation. The multi-dimensional historical trust evaluation for collaborator is
IV. RESOURCE EVALUATION AND COLLABORATOR SELECTION
After acquiring the historical trust of collaborator , its resource trust is further evaluated across multiple dimensions. Based on the specific resource requirements of task , collaborator submits its resource profiles to the trust evaluation server. The server then performs a dimension-wise evaluation: for each required dimension, the resource trust value is set to 1 if the reported capability satisfies the task requirement, and 0 otherwise. This process yields the multi-dimensional resource trust for collaborator . This evaluation procedure is applied identically to all potential collaborators. Finally, in accordance with Eqs. (3)-(5), the optimal collaborator is selected. Specifically, the chosen collaborator must satisfy the minimum trust thresholds across all dimensions required by task while achieving the maximum aggregate trust value.
V. RESULT ANALYSIS
To validate the effectiveness of the proposed model, we adopt an empirical data-driven device modeling approach. To obtain realistic device behavior profiles, we deploy two representative collaborative tasks, namely face recognition and virus scanning, on DELL 5200, DELL 5820, and DELL 7060. The default resource requirements of each task for collaborators are set to 2 GHz of available CPU, 1 GB of storage, and 150 Mbps of throughput. By controlling the runtime conditions of devices, we systematically construct five representative behavior modes and collect the corresponding performance data: (i) reliable mode, where devices operate under interference-free conditions; (ii) low-capability mode, where intensive background processes are continuously executed, forcing devices to remain under high resource utilization; (iii) degradation mode, where background workload is gradually increased during execution, leading to progressive performance degradation over time; (iv) intermittent anomaly mode, where interfering processes are randomly activated and deactivated, causing devices to switch unpredictably between normal and high-load states; (v) strategic cheating mode, where devices operate normally in the first phase and then introduce sustained interference in the second phase, resulting in a sharp performance drop after an initially favorable period. For each device-task-behavior combination, 100 collaboration instances are conducted. In each instance, we collect the collaborator's performance data. Through statistical analysis, we extract the parameters across all dimensions for each behavioral pattern, thereby formulating the data-driven device behavior models.
Based on the constructed behavior models, we further build a simulation platform using Python and the NS-3 simulator that scales the three physical devices into 200 virtual devices. Each collaborator is assigned a behavior mode, with proportions set to 60% reliable, 10% low-capability, 10% degradation, 10% intermittent anomaly, and 10% strategic cheating. The inter-arrival time between collaborations is sampled from an
TABLE I IMPACT OF DATA DISORDER ON TRUST EVALUATION ACCURACY. RESULTS ARE REPORTED AS MEAN ± STD OVER FIVE RUNS.
| Disorder Level | MSE | MAE |
|---|---|---|
| Synchronized | 0.0181 ± 0.0008 | 0.0923 ± 0.0021 |
| 10% | 0.0203 ± 0.0009 | 0.0987 ± 0.0024 |
| 30% | 0.0248 ± 0.0012 | 0.1098 ± 0.0028 |
| 50% | 0.0301 ± 0.0014 | 0.1213 ± 0.0033 |
exponential distribution to emulate non-uniform collaboration patterns, resulting in a total of 20,000 records. The dataset is split chronologically into training (70%), validation (10%), and test (20%) sets. The hyperparameters are set as follows: is 256, the number of attention heads is 4, and the number of block layers is 2. The model is trained using the mean squared error loss.
A. Impact of Synchronization on Trust Evaluation Accuracy To validate the necessity of the proposed data synchronization mechanism, we evaluate TrustFormer's evaluation accuracy when the input data suffer from varying degrees of temporal disorder. During inference, we randomly shuffle , , and of the collaborator-side monitoring records within each collaboration. This setup simulates the practical scenario where data synchronization is partially or entirely absent. As shown in Table I, we evaluate the prediction accuracy using mean squared error (MSE) and mean absolute error (MAE) under each disorder level. Both metrics increase monotonically with the degree of disorder, with MSE rising by and MAE by under disorder. Even a modest disorder causes a increase in MSE, confirming that data synchronization is an essential prerequisite for reliable multi-dimensional trust evaluation.
B. Trust Evaluation Accuracy Across Behavior Types
To evaluate TrustFormer's trust evaluation accuracy under diverse collaborator behaviors, we compare it against LSTM and a standard Transformer by reporting the evaluation error separately for each behavior type. As shown in Table II, all three methods achieve comparable trust evaluation accuracy for reliable collaborators, whose behavior is stationary and easily predictable. However, the performance gap widens significantly for collaborators with complex behavioral dynamics. For strategic collaborators, whose trustworthiness abruptly shifts from high to low, TrustFormer achieves an MSE of 0.0268, reducing the evaluation error by over LSTM and over the standard Transformer. A similar advantage is observed for degradation collaborators, where TrustFormer reduces MSE by and compared to the two baselines, respectively. These results indicate that TrustFormer enables more accurate trust evaluation under complex behavioral dynamics by explicitly capturing both temporal evolution and cross-dimension correlations.
C. Collaborator Selection Accuracy Comparison
To evaluate the effectiveness of multi-dimensional trust evaluation for collaborator selection, we simulate 500 rounds of
TABLE II TRUST EVALUATION ACCURACY ACROSS BEHAVIOR TYPES.
| Behavior Type | LSTM MSE/MAE | Transformer MSE/MAE | TrustFormer MSE/MAE |
|---|---|---|---|
| Reliable | 0.0156/0.0951 | 0.0143/0.0908 | 0.0138/0.0891 |
| Low-capability | 0.0247/0.1134 | 0.0218/0.1063 | 0.0201/0.1018 |
| Degradation | 0.0389/0.1327 | 0.0312/0.1178 | 0.0243/0.1036 |
| Intermittent | 0.0341/0.1198 | 0.0287/0.1094 | 0.0229/0.0973 |
| Strategic | 0.0453/0.1364 | 0.0374/0.1231 | 0.0268/0.1043 |

Fig. 2. The proposed TrustFormer achieves higher collaborator selection accuracy across all dimensions.
task assignment. In each round, a task is generated with a random requirement vector , where each component is uniformly sampled from [0.5, 0.9]. The resource requirements are kept fixed as described above. We report the collaborator selection accuracy at both the per-dimension level and the overall level, where the latter requires all dimensions to be simultaneously satisfied. As shown in Fig. 2, TrustFormer consistently outperforms LSTM and Transformer across all dimensions. This gap is amplified in the overall accuracy, where TrustFormer achieves 91.3% compared to 85.4% (Transformer) and 80.7% (LSTM), confirming that more accurate multi-dimensional trust evaluation translates directly into more reliable collaborator selection.
VI. CONCLUSION
This paper has proposed TrustFormer, a task-specific multidimensional trust evaluation framework. TrustFormer achieves lightweight synchronization of multi-dimensional trust-related data. By employing cross-temporal attention and cross-dimensional attention, TrustFormer jointly captures the temporal evolution of each dimension and the dynamic correlations across dimensions from historical data, producing accurate multi-dimensional trust vectors to support collaborator selection. Experimental results have demonstrated that TrustFormer outperforms existing methods in both trust evaluation accuracy and collaborator selection reliability, with particularly notable advantages under complex behavioral patterns such as strategic deception and gradual degradation.
REFERENCES
[1] W. Feng, Z. Yan, H. Zhang, K. Zeng, Y. Xiao, and Y. T. Hou, “A survey on security, privacy, and trust in mobile crowdsourcing,” IEEE Internet Things J., vol. 5, no. 4, pp. 2971–2992, Aug. 2018.
[2] B. Zhu, X. Wang, and D. Niyato, “Task-specific trust evaluation for multi-hop collaborator selection via GNN-aided distributed agentic AI,” IEEE J. Sel. Areas Commun., vol. 44, pp. 2411–2426, 2026.
[3] M. Lévesque and D. Tipper, “A survey of clock synchronization over packet-switched networks,” IEEE Commun. Surveys Tuts., vol. 18, no. 4, pp. 2926–2947, 2016.
[4] H. Gao, C. Liu, Y. Yin, Y. Xu, and Y. Li, “A hybrid approach to trust node assessment and management for VANETs cooperative data communication: Historical interaction perspective,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 9, pp. 16504–16513, Sept. 2022.
[5] J. D. Caddell and R. Nilchiani, “The dynamics of trust: Path dependence in interpersonal trust,” IEEE Eng. Manag. Rev., vol. 51, no. 3, pp. 148–165, Sept. 2023.
[6] A. Dai, Y. Xiao, F. Ren, H. Shen, S. Zhi, and B. Ma, “Temporal-enhanced transformer for anomaly detection in spacecraft irregular-interval telemetry,” Adv. Space Res., vol. 77, no. 2, pp. 2356–2371, 2026.
[7] W. Wang et al., “Crossformer++: A versatile vision transformer hinging on cross-scale attention,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 46, no. 1, pp. 554–568, 2024.