MERIT: Multi-Agent Collaboration for Unsupervised Time Series Representation Learning
Authors: Shu Zhou, Yunyang Xuan, Yuxuan Ao, Xin Wang, Tao Fan, Hao Wang, Xiao Luo
Accepted at: acl25

MERIT: Multi-Agent Collaboration for Unsupervised Time Series Representation Learning

Shu Zhou1*, Yunyang Xuan1*, Yuxuan Ao1*, Xin Wang2, Tao Fan3, Hao Wang1†
1Nanjing University 2Baidu 3Nanjing University of Finance & Economics
{shuzhou, yunyangxuan, yxao}@smail.nju.edu.cn
{xinwang2749, fantao0916}@gmail.com, ywhaowang@nju.edu.cn

Abstract

This paper studies the problem of unsupervised time series representation learning, which aims to map unlabeled time series data into a low-dimensional latent space for various downstream tasks. Previous works usually combine a range of augmentation strategies with contrastive learning to generate discriminative representations. However, these augmentation strategies could alter the original semantics of time series data, which could degrade the performance of representation learning. To solve this problem, this paper incorporates the large language model (LLM) agent to guide unsupervised time series representation learning and proposes a novel framework named Multi-Agent Collaboration for Time-series Representation Learning (MERIT). The core of our MERIT is to utilize three LLM agents to collaboratively generate positive views for time series data. In particular, we first design a retrieval agent to automatically identify the relevant time series data from a coarse candidate set. Then, these selected sequences are further utilized to enhance an augmentation agent which automatically selects reliable augmentation strategies from an augmentation strategy library. We also design a review agent to evaluate the quality of generated views and stop the generation process. These three agents are designed to work in a loop for effective time series representation learning. Extensive experiments on various datasets demonstrate the effectiveness of MERIT compared with state-of-the-art baselines.

1 Introduction

In the data-driven era, time series data exist widely in various fields including finance (Sezer et al., 2020; Liu et al., 2024), healthcare (Caballero Barajas and Akella, 2015), and transportation (Sun et al., 2023). Time series data is naturally high-dimensional, which brings challenges for analytical modeling (Qiu et al., 2011). Traditional feature engineering approaches are time-consuming and expert-dependent, which are difficult to generalize across different tasks. In contrast, unsupervised time series representation learning approaches (Liu and Chen, 2024a; Yang and Hong, 2022; Lafabregue et al., 2022) can map unlabeled time series data to a low-dimensional latent space without expensive annotation. In this way, they can automatically mine latent structural and temporal features to provide downstream tasks such as regression, classification, and anomaly detection (Eldele et al., 2024; Liu and Chen, 2024a).

Recent unsupervised time series representation learning approaches (Trirat et al., 2024; Yue et al., 2022; Eldele et al., 2021; Franceschi et al., 2019a) typically generate positive views using a series of hand-designed transformations, including random dithering, scaling, and cropping. They then utilize contrastive learning to ensure the augmented representations of the same sample are close to the other samples. However, random augmentation could distort key patterns and weaken feature structures, resulting in false positive views that degrade representation learning (Wen et al., 2020). For example, when applied to medical signal processing, excessive smoothing, and interpolation jitter may erase the characteristic peaks and valleys of the electrocardiogram, which hurts the semantics of time series data (Hemakom et al., 2023). In financial trading sequences, adding uncorrelated noise may hide the decision cues embedded in price fluctuations, leading to a decrease in the precision of subsequent forecasting and investment analysis (Huang et al., 2023b). Therefore, it is highly anticipated to have high-quality time series augmentation strategies with crucial semantics preserved in various scenarios to facilitate effective representation learning.

Due to the strong capacity of large language
Figure 1: Comparison between existing time series representation learning approaches (a) and our proposed LLM-driven framework (b).

models (LLMs) (Achiam et al., 2023; Anil et al., 2023; Touvron et al., 2023; Zhou et al., 2025a), we aim to incorporate LLMs into time series representation learning. However, there are still two major challenges in applying LLMs to time series data representation learning. ① *LLMs usually have a limited understanding of numerical signals* (Liu et al., 2023a; Liang et al., 2022; Zhou et al., 2025b; Taylor et al., 2022). Therefore, it is hard to require LLMs to directly generate reliable time series representations or augmented time series. LLMs could even generate wrong formats with the principle of next-token predictions. ② *Their ability for semantic understanding and feature extraction is insufficient under the zero-shot condition* (Wei et al., 2022; Sanh et al., 2021; Merrill et al., 2024), especially for complicated time series. Therefore, we should introduce contextual search and well-designed instructions to lay a solid foundation for constructing a more flexible, robust, and semantically preserved unsupervised time series representation learning framework.

Towards this end, we propose a novel framework named Multi-Agent Collaboration for Time-series Representation Learning (MERIT). Different from existing representation learning methods, our MERIT utilizes three LLM-based agents to automatically generate high-quality positive sample views for time series data (see Figure 1), and thus achieve more reliable representations. In particular, we first introduce a retrieval agent, which utilizes the semantic understanding and association inference ability to select the relevant sequences from the database. To enhance the retrieval efficiency, we also calculate the similarity of time series which generate a coarse candidate. These selected relevant sequences are considered as context data with instructions for an augmentation agent, which automatically identifies reliable augmentation schemes from an augmentation strategy library. In this way, we can generate positive views that match the data characteristics, ensuring that the critical semantics can be preserved as much as possible for effective representation learning. To further ensure the reliability without potential hallucination, we introduce a review agent to evaluate the quality of the generated augmented views and terminate unsuitable augmentations if necessary. Finally, both appropriate augmented views and retrieved sequences are incorporated into a contrastive time series representation learning paradigm. Extensive experiments on a wide range of benchmark datasets validate the effectiveness of our MERIT in comparison with various state-of-the-art approaches.

The contributions of this paper are as follows:
① *Problem Connection*. We are the first to connect LLM agents with time series representation learning, which utilizes the reasoning capability of LLMs to enhance the time series learning paradigm.
② *Novel Methodology*. Our multi-agent collaborate framework MERIT utilizes a retrieval agent to extract context from the data, which enhances the reasoning ability of an augmentation agent for effective time series positive views. A review agent is also adopted to ensure the reliability. ③ *Extensive Experiments*. Extensive experiments on several publicly available time series datasets results show that MERIT significantly outperforms existing comparative learning methods.

2 Related Work

2.1 Time Series Representation Learning

Time series representation learning has become increasingly important for various downstream tasks. Early approaches leveraged traditional dimensionality reduction techniques like Principal Component Analysis (PCA) (Pearson, 1901) and autoencoders (Kramer, 1991) to learn compact representations. Recent self-supervised learning advancements have introduced contrastive learning-based methods (Liu and Chen, 2024b; Luo et al., 2023; Wu et al., 2023; Yue et al., 2022), which generate positive pairs through data augmentation and maximize their agreement in the representation space. However, many methods rely on fixed or random augmentation, potentially distorting the semantics of time series. Some studies attempt to address this through carefully designed augmentations (Zhang
Figure 2: An overview of MERIT. Our retrieval agent first selects neighborhood candidates with similarity, followed by refinement using an LLM. Our augmentation agent then selects suitable data augmentation strategies from the augmentation strategy library. Finally, our review agent evaluates the quality of the augmented sequences, which approves positive samples into a memory bank and returns to the retrieval agent for refinement if rejected. The augmented views and neighboring samples are utilized as positives for time series representation learning.

et al., 2023, 2022b; Eldele et al., 2021; Yang et al., 2021), but they lack adaptive selection based on data characteristics. More recent methods (Xu et al., 2023; Liu et al., 2023b) leverage masked autoencoding and use transformer architectures, but they still face challenges with maintaining semantic consistency during augmentation.

2.2 Multi-agent Systems

Multi-agent systems (MAS) (Baroni et al., 2022; Li et al., 2023; Park et al., 2024) attract growing interest in machine learning tasks, where agents interact to achieve individual or shared goals. Early works have focused on cooperative settings, with agents learning a shared representation through communication and coordination (Sunchag et al., 2018). More recent approaches explore competitive and adversarial settings, where agents learn distinct representations through competition (Lowe et al., 2017). Researchers have also applied MAS to multi-agent reinforcement learning and decentralized approaches for learning representations in multi-agent environments (Anschel et al., 2018; Gupta et al., 2017). Additionally, MAS has been explored in graph representation learning (Wang et al., 2024; Zhang et al., 2022a), unsupervised representation learning (Zhu et al., 2022), and cross-modal representation learning (Zhang et al., 2024), highlighting its potential in addressing complex representation learning challenges. Towards this end, this paper proposes a novel approach MERIT, which uses LLMs agents to collaboratively generate positive views for time series data.

3 The Proposed MERIT

This paper studies the problem of time series representation learning and proposes a multi-agent framework named MERIT, which incorporates three LLM-based intelligent agents in a closed-loop collaboration mechanism to dynamically generate high-quality positive views while ensuring the preservation of semantics. In particular, our framework consists of three LLM-based agents: (1) Retrieval agent, which first selects the candidates for the input sequence and then identifies the relevant context; (2) Augmentation agent, which selects appropriate augmentation strategies based on context information; (3) Review agent, which
evaluates the quality of the generated views. The whole process enables the MERIT framework to dynamically generate views of positive samples and to improve the discrimination and transferability of time series representations. The overview of our MERIT can be found in Figure 2.

3.1 Problem Definition

Given a dataset \( X = \{x_1, \ldots, x_N\} \) of \( N \) time series \( x_i \) of length \( T \) with \( C \) channels, the objective of self-supervised learning is to learn a function \( f_\theta \), such that \( \forall i \in [1, N], z_i = f_\theta(x_i) \). Each \( z_i \in \mathbb{R}^d \) is a \( d \)-dimensional representation of time series \( x_i \), which should preserve as much information of the original data as possible. In this work, \( f_\theta(\cdot) \) is learned fully from unlabeled data \( X \).

3.2 Retrieval Agent for Context Mining

In zero-shot scenarios, directly applying LLMs to raw time series data can be problematic due to their limited understanding of numerical signals (Liu et al., 2023a; Liang et al., 2022; Taylor et al., 2022). Therefore, our framework first utilizes a retrieval agent to provide LLM with high-quality context from the dataset, which is beneficial to the subsequent process. Our retrieval agent takes a two-step paradigm, which first selects a set of candidate sequences based on their similarity to the target sequence and then further refines this set using the semantic reasoning capabilities of LLMs.

In particular, we first identify a coarse candidate set \( \mathcal{C}_i \) for the target sequence \( x_i \in \mathbb{R}^{T \times C} \), which can greatly save the cost of LLMs. By calculating the similarity scores between the target sequence and other sequences in the dataset, we select the top \( K \) sequences that are similar to \( x_i \) as the candidate set as follows:

\[
\mathcal{C}_i = \{x_j | x_j \in \text{Top-K(Sim}(x_i, x_j)), x_j \neq x_i\}
\]

where \( \text{Sim}(\cdot, \cdot) \) is the function used to measure sequence similarity and Top-K(\cdot) returns the set of samples with top \( K \) scores.

Then, we adopt an LLM to further narrow down the scope by designing a prompt containing inference instructions, which semantically filter these candidate sequences for the similar sequences. In formulation, given a target sequence \( x_i \) and a candidate sequence \( x_j \), the prompt contains an inference requirement that instructs the LLM to explain why \( x_j \) is similar to \( x_i \) and generates a semantic relevance score \( \text{Rel}(x_i, x_j) \) based on its explanation:

\[
\text{Rel}(x_i, x_j) = \text{LLM}(x_i, x_j, \mathcal{P})
\]

where the prompt \( \mathcal{P} \) includes the description of the target sequence \( x_i \) and the context of the candidate sequence \( x_j \), and the LLM is asked to provide the reason for the similarity. Finally, based on the semantic relevance scores, we select the highest scoring \( M \) sequences to form the final reference set \( \mathcal{R}_i \):

\[
\mathcal{R}_i = \{x_j | x_j \in \text{Top-M(}\text{Rel}(x_i, x_j)) \cap \mathcal{C}_i\}
\]

In this way, we are able to construct reference context with high semantic relevance \( \mathcal{R}_i \) for the target time series, which provides a data-centric view of contextual support for the subsequent paradigm.

3.3 Augmentation Agent with Adaptive Strategy Selection

Positive views from augmentation are the key to unsupervised time series representation learning (Yue et al., 2022; Eldele et al., 2021). Existing time series augmentation approaches often rely on a fixed set of transformations, which may potentially distort crucial semantic information in diverse scenarios (Zhang et al., 2022b; Yang et al., 2021; Eldele et al., 2021). To address this, our augmentation agent utilizes contextual information provided by the retrieval agent to dynamically select appropriate augmentation strategies in a data-centric way. By adapting to the specific characteristics of the time series data, we can ensure that the generated positive views are semantically reliable.

In detail, from the reference set \( \mathcal{R}_i \), our augmentation agent is required to choose a suitable augmentation strategy for the target sequence \( x_i \). Towards this end, we require an LLM to generate the set of augmentation strategies, which are applicable to the current data, i.e.,

\[
\mathcal{S}_i = \text{LLM}(x_i, \mathcal{R}_i, \mathcal{S}),
\]

where \( \mathcal{S} = \{\text{Sailing, Resizing, Jittering, Flipping, Permutation, Time Masking, Frequency Masking, Time Neighboring}\} \) is the augmentation strategy library and \( \mathcal{S}_i \subseteq \mathcal{S} \). Then, we apply these strategies to the target sequence \( x_i \) to generate the corresponding augmented samples:

\[
\hat{x}_i^s = s(x_i), \quad \forall s \in \mathcal{S}_i,
\]
where \( \hat{x}_i^s \) is the augmented sample with the strategy s. A set of positive views can be obtained by combining the augmented views of \( x_i \) and its similar sequence \( x_j \in \mathcal{R}_i \) respectively:

\[
\hat{X}_i^P = \{ \hat{x}_i^s | s \in S_i \} \cup \{ x_j | j \in \mathcal{R}_i \}.
\] (6)

We also conduct augmentation on \( x_j \) to promote diverse positive views.

3.4 Review Agent for Reliable Actions

Although we have generated adaptive positive views for specific target sample, there is still a chance that the LLM may generate semantically inappropriate or distorted augmented samples due to LLM hallucination (Ji et al., 2023; Huang et al., 2023a). To mitigate this risk and further enhance the reliability of our framework, we introduce a review agent to assess the quality of augmentation actions and provide feedback. By carefully reviewing each augmented sample, we can ensure that only high-quality views are used for time series representation learning.

Specifically, after generating the augmented samples \( \hat{x}_i^s \), our review agent evaluates our augmentation action. Here, we feed the target sequence \( x_i \) and the augmented sequence \( \hat{x}_i^s \) into an LLM, and the LLM outputs a quality assessment result, Quality(\( x_i, \hat{x}_i^s \)), along with the reasoning process:

\[
\text{Quality}(\hat{x}_i^s) = \text{LLM}(x_i, \hat{x}_i^s),
\] (7)

where the output of quality assessment is ‘Correct’ or ‘Error’. Based on the assessment results, we store the approved positive views in a memory bank \( \mathcal{M} \) each time and re-start the searching procedure:

\[
\mathcal{M} \leftarrow \mathcal{M} \cup \{ \hat{x}_i^s | s \in S_i, \text{Quality}(\hat{x}_i^s) = \text{‘Correct’} \}.
\] (8)

We will stop the procedure when no augmented view is rejected by the review agent or the memory bank is full. This iterative process ensures that only reliable and semantically consistent views are used for representation learning.

3.5 Time Series Representation Learning

After generating reliable positive views, we incorporate them into a contrastive learning framework, which maximizes the similarity between the original time series and its augmented views while minimizing the similarity with other samples (Hu et al., 2024; He et al., 2020; Tian et al., 2020). In this way, we can learn effective time series representations for different downstream tasks.

In formulation, for each target sequence \( x_i \in X \), the set of positive samples \( \hat{X}_i^P \) can be rewritten as:

\[
\hat{X}_i^P = \mathcal{M} \cup \{ x_j | j \in \mathcal{R}_i \}.
\] (9)

where \( \mathcal{M} \) is positive views approved by the memory bank and, \( \mathcal{R}_i \) is the set of semantically similar sequences selected by the retrieval agent. We utilize an encoder \( f_\theta \) to map the original sequence and its positive samples to the representation space:

\[
z_i = f_\theta(x_i), \quad z_{ir}^* = f_\theta(\hat{x}_{ir}), \hat{x}_{ir} \in \hat{X}_i^P.
\] (10)

The contrastive learning loss \( \mathcal{L} \) is written as:

\[
\mathcal{L} = \frac{1}{N} \sum_{i=1}^N \frac{1}{|\hat{X}_i^P|} \sum_{j=1}^{|\hat{X}_i^P|} - \log \frac{\exp(\frac{\operatorname{sim}(z_i, z_{ir})}{\tau})}{\sum_{k=1}^N \exp(\frac{\operatorname{sim}(z_i, z_k)}{\tau})}
\] (11)

where \( \operatorname{sim}(z_a, z_b) = \frac{z_a^\top z_b}{\|z_a\| \|z_b\|} \) denotes the cosine similarity of the two representation vectors. \( \tau \) is a temperature parameter that regulates the scale of the similarity. In this way, we maximize the mutual information between target data and its positive views for effective time series representations.

4 Experiments

Baselines. To evaluate the performance of MERIT, we compare it with a wide range of state-of-the-art baselines, including unsupervised, self-supervised, and fully supervised methods: DTW (Müller, 2007), DONUT (Xu et al., 2018), SR (Ren et al., 2019), N-BEATS (Oreshkin et al., 2019), LogTrans (Li et al., 2019), TS-TCC (Eldele et al., 2021), TNC (Tonekaboni et al., 2021), T-Loss (Eldele et al., 2021), Informer (Zhou et al., 2021), TST (Zerveas et al., 2021), CoST (Woo et al., 2022), TS2Vec (Yue et al., 2022), InfoTS (Luo et al., 2023) and TimesURL (Liu and Chen, 2024b). These methods are evaluated across various downstream tasks, including classification, imputation, forecasting, anomaly detection, and transfer learning. More details can be found in Appendix C.

Implementation Details. For MERIT, we implement a multi-agent collaboration framework consisting of three specialized agents. Each agent is designed with specific roles and responsibilities in the representation learning process. More details can be found in the Appendix E.

4.1 Classification

Setups. To evaluate the effectiveness of MERIT on time series classification and transfer learning, we
<table>
  <tr>
    <th>Method</th>
    <th>AWB</th>
    <th>AF</th>
    <th>BM</th>
    <th>CT</th>
    <th>CR</th>
    <th>CDG</th>
    <th>EW</th>
    <th>EP</th>
    <th>EC</th>
    <th>ER</th>
    <th>FD</th>
    <th>FM</th>
    <th>HMD</th>
    <th>HW</th>
    <th>HB</th>
    <th>Average</th>
  </tr>
  <tr>
    <td>DTW</td>
    <td>98.0</td>
    <td>22.0</td>
    <td>97.5</td>
    <td>96.9</td>
    <td>94.4</td>
    <td>27.5</td>
    <td>55.7</td>
    <td>96.4</td>
    <td>29.3</td>
    <td>13.3</td>
    <td>52.8</td>
    <td>55.0</td>
    <td>27.8</td>
    <td>28.5</td>
    <td>71.7</td>
    <td>62.9</td>
  </tr>
  <tr>
    <td>TST</td>
    <td>98.3</td>
    <td>26.7</td>
    <td>97.5</td>
    <td>97.3</td>
    <td>95.8</td>
    <td>35.0</td>
    <td>61.1</td>
    <td>97.1</td>
    <td>32.3</td>
    <td>13.3</td>
    <td>54.7</td>
    <td>56.7</td>
    <td>30.6</td>
    <td>31.5</td>
    <td>73.3</td>
    <td>61.7</td>
  </tr>
  <tr>
    <td>TS-TCC</td>
    <td>98.7</td>
    <td>26.7</td>
    <td>100.0</td>
    <td>97.8</td>
    <td>97.2</td>
    <td>40.0</td>
    <td>61.8</td>
    <td>97.8</td>
    <td>33.1</td>
    <td>13.3</td>
    <td>55.9</td>
    <td>58.3</td>
    <td>33.3</td>
    <td>32.3</td>
    <td>74.2</td>
    <td>67.0</td>
  </tr>
  <tr>
    <td>T-Loss</td>
    <td>98.5</td>
    <td>26.7</td>
    <td>97.5</td>
    <td>97.6</td>
    <td>97.2</td>
    <td>37.5</td>
    <td>61.1</td>
    <td>97.5</td>
    <td>32.7</td>
    <td>13.3</td>
    <td>55.3</td>
    <td>58.3</td>
    <td>30.6</td>
    <td>31.9</td>
    <td>73.8</td>
    <td>65.8</td>
  </tr>
  <tr>
    <td>TS2Vec</td>
    <td>98.9</td>
    <td>26.7</td>
    <td>100.0</td>
    <td>98.1</td>
    <td>97.2</td>
    <td>42.5</td>
    <td>62.6</td>
    <td>98.2</td>
    <td>33.8</td>
    <td>13.3</td>
    <td>56.5</td>
    <td>60.0</td>
    <td>33.3</td>
    <td>33.1</td>
    <td>75.0</td>
    <td>70.4</td>
  </tr>
  <tr>
    <td>TimesURL</td>
    <td>99.0</td>
    <td>26.7</td>
    <td>100.0</td>
    <td>98.4</td>
    <td>98.6</td>
    <td>45.0</td>
    <td>64.1</td>
    <td>98.6</td>
    <td>34.2</td>
    <td>13.3</td>
    <td>57.2</td>
    <td>61.7</td>
    <td>36.1</td>
    <td>34.6</td>
    <td>75.8</td>
    <td>75.2</td>
  </tr>
  <tr>
    <td>MERIT</td>
    <td><b>99.3</b></td>
    <td><b>33.3</b></td>
    <td><b>100.0</b></td>
    <td><b>98.7</b></td>
    <td><b>100.0</b></td>
    <td><b>47.5</b></td>
    <td><b>65.6</b></td>
    <td><b>99.3</b></td>
    <td><b>35.0</b></td>
    <td><b>13.3</b></td>
    <td><b>58.4</b></td>
    <td><b>63.3</b></td>
    <td><b>38.9</b></td>
    <td><b>35.4</b></td>
    <td><b>76.7</b></td>
    <td><b>77.2</b></td>
  </tr>
</table>

Table 1: Classification accuracy (%) on 30 UEA datasets. The best results are highlighted in bold. More results can be found in Appendix J.

<table>
  <tr>
    <th>Target</th>
    <th>TNC</th>
    <th>T-Loss</th>
    <th>TS2Vec</th>
    <th>TimesURL</th>
    <th>MERIT</th>
  </tr>
  <tr>
    <td>Synthetic Control</td>
    <td>78.3</td>
    <td>82.1</td>
    <td>85.6</td>
    <td>87.2</td>
    <td>89.5</td>
  </tr>
  <tr>
    <td>Two Patterns</td>
    <td>76.5</td>
    <td>80.8</td>
    <td>83.9</td>
    <td>85.7</td>
    <td>87.8</td>
  </tr>
  <tr>
    <td>Wafer</td>
    <td>75.2</td>
    <td>79.4</td>
    <td>82.7</td>
    <td>84.3</td>
    <td>86.4</td>
  </tr>
  <tr>
    <td>ECG200</td>
    <td>77.8</td>
    <td>81.5</td>
    <td>84.2</td>
    <td>86.1</td>
    <td>88.3</td>
  </tr>
  <tr>
    <td>ECGFiveDays</td>
    <td>76.9</td>
    <td>80.6</td>
    <td>83.5</td>
    <td>85.2</td>
    <td>87.4</td>
  </tr>
  <tr>
    <td>TwoLeadECG</td>
    <td>75.6</td>
    <td>79.2</td>
    <td>82.8</td>
    <td>84.6</td>
    <td>86.7</td>
  </tr>
  <tr>
    <td>Average</td>
    <td>76.7</td>
    <td>80.6</td>
    <td>83.8</td>
    <td>85.5</td>
    <td>87.7</td>
  </tr>
</table>

Table 2: Transfer learning results (accuracy %) from source (CBF or CinCECGTorso) to target domains.

<table>
  <tr>
    <th rowspan="2">Dataset Metrics</th>
    <th colspan="2">InfoTS</th>
    <th colspan="2">TimesURL</th>
    <th colspan="2">MERIT</th>
  </tr>
  <tr>
    <th>MSE</th>
    <th>MAE</th>
    <th>MSE</th>
    <th>MAE</th>
    <th>MSE</th>
    <th>MAE</th>
  </tr>
  <tr>
    <td>ETTh1</td>
    <td>0.125</td>
    <td>0.659</td>
    <td>0.640</td>
    <td>0.717</td>
    <td>0.666</td>
    <td>0.639</td>
    <td>0.630</td>
  </tr>
  <tr>
    <td></td>
    <td>0.250</td>
    <td>0.679</td>
    <td>0.648</td>
    <td>0.726</td>
    <td>0.674</td>
    <td>0.659</td>
    <td>0.638</td>
  </tr>
  <tr>
    <td></td>
    <td>0.375</td>
    <td>0.702</td>
    <td>0.656</td>
    <td>0.726</td>
    <td>0.676</td>
    <td>0.682</td>
    <td>0.646</td>
  </tr>
  <tr>
    <td></td>
    <td>0.500</td>
    <td>0.712</td>
    <td>0.693</td>
    <td>0.783</td>
    <td>0.695</td>
    <td>0.692</td>
    <td>0.683</td>
  </tr>
  <tr>
    <td>ETTh2</td>
    <td>0.125</td>
    <td>2.455</td>
    <td>1.215</td>
    <td>2.491</td>
    <td>1.199</td>
    <td>2.435</td>
    <td>1.205</td>
  </tr>
  <tr>
    <td></td>
    <td>0.250</td>
    <td>2.560</td>
    <td>1.239</td>
    <td>2.644</td>
    <td>1.244</td>
    <td>2.540</td>
    <td>1.229</td>
  </tr>
  <tr>
    <td></td>
    <td>0.375</td>
    <td>2.673</td>
    <td>1.269</td>
    <td>2.757</td>
    <td>1.266</td>
    <td>2.653</td>
    <td>1.259</td>
  </tr>
  <tr>
    <td></td>
    <td>0.500</td>
    <td>2.701</td>
    <td>1.281</td>
    <td>2.844</td>
    <td>1.283</td>
    <td>2.681</td>
    <td>1.271</td>
  </tr>
  <tr>
    <td>Avg.</td>
    <td>1.326</td>
    <td>0.860</td>
    <td>1.386</td>
    <td>0.864</td>
    <td>1.306</td>
    <td>0.850</td>
    <td></td>
  </tr>
</table>

Table 3: Imputation results on ETT dataset with 15% missing values.

conduct experiments on 30 datasets from the UEA archive (Bagnall et al., 2018) and UCR archive (Dau et al., 2019). For classification, we train MERIT on the training set and extract representations for both training and testing sets. A linear classifier is then trained on the extracted representations from the training set and evaluated on the testing set. For transfer learning, we evaluate the transferability of the learned representations using datasets from the UCR archive (Dau et al., 2019). Following (Yue et al., 2022), we first pre-train the model on a source dataset and then transfer the learned representations to target datasets for classification tasks. We use CBF and CinCECGTorso as source domains and evaluate different methods on target domains with different characteristics.

Results. Table 1 presents the classification accuracy of different methods. MERIT achieves the highest average accuracy of 77.2%, outperforming other methods and demonstrating the effectiveness of our multi-agent collaborative framework for time series representation learning. Table 2 shows the classification accuracy on target domains. The results demonstrate that MERIT achieves superior transfer performance across different target datasets. This superior performance can be attributed to the following reasons: ① The retrieval agent effectively identifies the most relevant context for each time series, providing a strong foundation for augmentation. ② The augmentation agent selects the most suitable augmentation strategies based on the specific characteristics of the time series and its context, ensuring the generation of high-quality augmented views. ③ The review agent filters out low-quality augmented views, further enhancing the quality of the learned representations.

4.2 Imputation

Setups. Time series data often suffers from missing values due to sensor failures or irregular sampling. We evaluate the imputation performance of MERIT on the ETT dataset (Zhou et al., 2021), which contains power load data collected from electricity transformers. Following recent works (Yue et al., 2022), we randomly mask 15% of the values in the test set and use the learned representations to reconstruct the missing values.

Results. Table 3 shows the MSE and MAE results on the ETT dataset. We can observe that MERIT achieves the best performance across all settings, demonstrating its effectiveness in learning representations that capture the underlying patterns of time series data. The superior performance can be attributed to the collaborative mechanism among the three agents, which helps to generate high-quality augmented views that preserve the semantic information of the original time series.

4.3 Forecasting

Setups. Time series forecasting is a fundamental task in many real-world applications. We evaluate our proposed MERIT on both short-term and long-term forecasting tasks using the ETT dataset
<table>
  <tr>
    <th rowspan="2">Method Metrics</th>
    <th colspan="2">TimesURL</th>
    <th colspan="2">CoST</th>
    <th colspan="2">MERIT</th>
  </tr>
  <tr>
    <th>MSE</th>
    <th>MAE</th>
    <th>MSE</th>
    <th>MAE</th>
    <th>MSE</th>
    <th>MAE</th>
  </tr>
  <tr>
    <td>ETTh1</td>
    <td>0.125</td>
    <td>0.659</td>
    <td>0.640</td>
    <td>0.690</td>
    <td>0.658</td>
    <td>0.636</td>
    <td>0.631</td>
  </tr>
  <tr>
    <td></td>
    <td>0.250</td>
    <td>0.679</td>
    <td>0.648</td>
    <td>0.710</td>
    <td>0.668</td>
    <td>0.657</td>
    <td>0.637</td>
  </tr>
  <tr>
    <td></td>
    <td>0.375</td>
    <td>0.702</td>
    <td>0.656</td>
    <td>0.728</td>
    <td>0.676</td>
    <td>0.681</td>
    <td>0.647</td>
  </tr>
  <tr>
    <td></td>
    <td>0.500</td>
    <td>0.712</td>
    <td>0.693</td>
    <td>0.751</td>
    <td>0.682</td>
    <td>0.694</td>
    <td>0.682</td>
  </tr>
  <tr>
    <td>ETTh2</td>
    <td>0.125</td>
    <td>2.455</td>
    <td>1.215</td>
    <td>2.866</td>
    <td>1.288</td>
    <td>2.437</td>
    <td>1.203</td>
  </tr>
  <tr>
    <td></td>
    <td>0.250</td>
    <td>2.560</td>
    <td>1.239</td>
    <td>2.792</td>
    <td>1.271</td>
    <td>2.542</td>
    <td>1.227</td>
  </tr>
  <tr>
    <td></td>
    <td>0.375</td>
    <td>2.673</td>
    <td>1.269</td>
    <td>2.793</td>
    <td>1.271</td>
    <td>2.655</td>
    <td>1.258</td>
  </tr>
  <tr>
    <td></td>
    <td>0.500</td>
    <td>2.701</td>
    <td>1.281</td>
    <td>2.769</td>
    <td>1.267</td>
    <td>2.684</td>
    <td>1.272</td>
  </tr>
  <tr>
    <td>Avg.</td>
    <td></td>
    <td>1.643</td>
    <td>0.955</td>
    <td>1.762</td>
    <td>0.973</td>
    <td>1.624</td>
    <td>0.946</td>
  </tr>
</table>

Table 4: Forecasting results on the ETTh dataset.

(Zhou et al., 2021). Following recent works (Yue et al., 2022), we consider four different prediction lengths: 12.5%, 25%, 37.5%, and 50% of the input sequence length. For each setting, we use the learned representations to predict future values through a simple MLP network.

Results. Table 4 shows the MSE and MAE results for both short-term and long-term forecasting. We can observe that MERIT consistently outperforms all baseline methods across different prediction lengths, demonstrating its strong capability in capturing temporal dependencies. The performance improvement is particularly significant for longer prediction horizons, which suggests that our multi-agent collaboration framework is effective in learning robust and generalizable representations for time series forecasting.

4.4 Anomaly Detection

Setups. Detecting anomalies from monitoring data is essential for industrial maintenance and system reliability. We evaluate MERIT on two benchmark datasets: KPI (Ren et al., 2019), a competition dataset containing multiple minutely sampled KPI curves, and Yahoo (Nikolay Laptev, 2015), which includes 367 hourly sampled time series. Following recent research (Ren et al., 2019), we adopt a streaming evaluation protocol that determines whether the last point in a time series slice is anomalous. During training, each time series is split into two halves according to time order, with the first half for training and the second for evaluation.

Results. Table 5 demonstrates the compared performance across different methods on two datasets. From the results, we can find that MERIT achieves superior performance across both datasets from Table 5, particularly showing significant improvements in F1-score. This demonstrates that our multi-agent collaboration framework can effectively capture anomalous patterns while maintaining high precision and recall rates.

<table>
  <tr>
    <th rowspan="2">Datasets Metrics</th>
    <th colspan="3">KPI</th>
    <th colspan="3">Yahoo</th>
  </tr>
  <tr>
    <th>F1</th>
    <th>Precision</th>
    <th>Recall</th>
    <th>F1</th>
    <th>Precision</th>
    <th>Recall</th>
  </tr>
  <tr>
    <td>SPOT</td>
    <td>0.751</td>
    <td>0.783</td>
    <td>0.722</td>
    <td>0.847</td>
    <td>0.856</td>
    <td>0.839</td>
  </tr>
  <tr>
    <td>DSPOT</td>
    <td>0.768</td>
    <td>0.795</td>
    <td>0.743</td>
    <td>0.861</td>
    <td>0.872</td>
    <td>0.850</td>
  </tr>
  <tr>
    <td>DONUT</td>
    <td>0.779</td>
    <td>0.803</td>
    <td>0.756</td>
    <td>0.873</td>
    <td>0.885</td>
    <td>0.862</td>
  </tr>
  <tr>
    <td>SR</td>
    <td>0.785</td>
    <td>0.812</td>
    <td>0.760</td>
    <td>0.879</td>
    <td>0.890</td>
    <td>0.868</td>
  </tr>
  <tr>
    <td>TS2Vec</td>
    <td>0.791</td>
    <td>0.818</td>
    <td>0.766</td>
    <td>0.885</td>
    <td>0.896</td>
    <td>0.874</td>
  </tr>
  <tr>
    <td>TimesURL</td>
    <td>0.803</td>
    <td>0.825</td>
    <td>0.782</td>
    <td>0.892</td>
    <td>0.901</td>
    <td>0.883</td>
  </tr>
  <tr>
    <td>MERIT</td>
    <td><b>0.815</b></td>
    <td><b>0.836</b></td>
    <td><b>0.795</b></td>
    <td><b>0.905</b></td>
    <td><b>0.913</b></td>
    <td><b>0.897</b></td>
  </tr>
</table>

Table 5: Anomaly detection results on the KPI and Yahoo datasets.

<table>
  <tr>
    <th rowspan="2">Task Dataset</th>
    <th colspan="2">Classification</th>
    <th colspan="2">Forecasting</th>
  </tr>
  <tr>
    <th>UCR</th>
    <th>UEA</th>
    <th>ETTh1</th>
    <th>ETTh2</th>
  </tr>
  <tr>
    <td>MERIT w/o RET</td>
    <td>84.2</td>
    <td>75.1</td>
    <td>0.672</td>
    <td>2.489</td>
  </tr>
  <tr>
    <td>MERIT w/o AUG</td>
    <td>83.1</td>
    <td>74.3</td>
    <td>0.695</td>
    <td>2.523</td>
  </tr>
  <tr>
    <td>MERIT w/o REV</td>
    <td>84.9</td>
    <td>75.8</td>
    <td>0.668</td>
    <td>2.476</td>
  </tr>
  <tr>
    <td>MERIT (Full Model)</td>
    <td><b>86.8</b></td>
    <td><b>77.2</b></td>
    <td><b>0.639</b></td>
    <td><b>2.435</b></td>
  </tr>
</table>

Table 6: Ablation study of our MERIT in both classification and forecasting tasks.

4.5 Further Analysis

Ablation Study. To analyze the effectiveness of different components in our MERIT, we introduce three different variants: (i) MERIT w/o RET, which replaces the context retrieval with random sampling. (ii) MERIT w/o AUG, which uses fixed augmentation strategies instead of our augmentation agent. (iii) MERIT w/o REV, which removes the procedure of our review agent. Table 6 shows the performance comparison on classification and forecasting tasks. From the results, we have the following observations: ① Removing the retrieval agent results in a slight decrease in performance, suggesting that the contextual information provided by the retrieval agent helps the model learn a better representation. ② MERIT w/o AUG performs much worse than the full model, indicating the importance of dynamic augmentation strategy selection. ③ MERIT outperforms MERIT w/o REV, indicating that the review agent is effective in filtering low-quality augmented views.

Sensitivity Analysis. Figure 3 illustrates the sensitivity of MERIT to the number of retrieved candidates and the number of semantically relevant sequences. For retrieved candidates, performance tends to improve as retrieved candidates increase from 1 to 7, suggesting that considering more candidates is beneficial for identifying relevant contexts. However, performance tends to decrease when the number is too large, which could result from the potential noise of too many samples. For the number
Figure 3: Sensitivity analysis of our proposed MERIT with respect to the number of candidate numbers and relevant sequences.

Figure 4: Robustness of MERIT classification accuracy to input noise (left) and label noise (right).

Figure 5: Performance of our MERIT with different LLMs and sizes.

of semantically relevant sequences, the model performance improves as relevant sequences increase from 1 to 4 before saturation. The performance of our MERIT is quite stable when the number of relevant sequences is between 3 to 4.

Robustness Analysis to Noise. To evaluate the robustness of the MERIT framework, we add different levels of noise to the input data in a time series classification task and set the noise level from 0 to 0.5. From the results, we can observe that as the noise level increases, the performance of all models decreases, while MERIT consistently outperforms the other models. We also show the effect of the percentage of random label flip noise on the model. The results also show that our MERIT achieves higher performance than others. These results highlight the robustness of our multi-agent framework in the presence of noise and its advantage over methods that do not explicitly explore semantic information during augmentation.

Different LLMs and Sizes. In this part, we evaluate the performance of our proposed MERIT with respect to different LLMs and sizes. Firstly, we compare the performance of different LLMs including LLaMa2-7B, LLaMa3-8B and LLaMa3.1-8B with similar parameters. The results are shown in Figure 5. From the results, we can observe that more advanced large modeling frameworks lead to better results. Then we vary different sizes of LLaMa2 in {7B, 13B and 70B}. From the results, we can still find that bigger parameters give better results. However, both different LLMs and sizes have restricted improvement in results.

Case Study. Here, we study how the review agent can reason from multiple perspectives to make an “accept” or “reject” decision. In particular, Figure 6 shows a case where the proposed augmentation is rejected by the review agent. This case study reveals that the review agent is able to effectively recognize and reject the introduction of semantically distorted or low-quality augmented views, thus ensuring that the MERIT framework produces high-quality, semantically reliable time series representations. This highlights the critical role of the review agent as a quality gatekeeper in the MERIT framework and the reasoning capability of the LLM in complex quality assessment tasks.

Figure 6: An example of the review agent on the ECG dataset. The review agent reasons from two perspectives: holistic and locally.
5 Conclusion

In this paper, we study the problem of unsupervised time series representation learning and we present a novel multi-agent collaboration framework MERIT for this problem. By leveraging LLMs as intelligent decision-makers, our framework introduces three agents with different functionalities that work collaboratively to generate high-quality positive views for contrastive learning. Extensive experiments demonstrate that MERIT consistently outperforms existing methods across various downstream tasks. Future research directions include optimizing LLM inference efficiency, and extending the framework to handle multi-modal time series data.

Limitations

MERIT is currently designed and evaluated for univariate and multivariate time series data. However, the real world presents diverse data forms, including event sequences, time series with accompanying text or images, and heterogeneous data. The framework’s adaptability to such data modalities remains an area for future exploration.

Acknowledgements

This work is supported by National Natural Science Foundation of China (Grant No. 72074108) and Fundamental Research Funds for the Central Universities at Nanjing University (Grant No. 010814370338), Jiangsu Young Talents in Social Sciences and Tang Scholar of Nanjing University.

References

Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774.

Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. 2023. Palm 2 technical report. arXiv preprint arXiv:2305.10403.

Oron Anschel, Nir Baram, and Nahum Shimkin. 2018. Learning representations in a multi-agent environment. In International Conference on Learning Representations.

Anthony Bagnall, Hoang Anh Dau, Jason Lines, Michael Flynn, James Large, Aaron Bostrom, Paul Southam, and Eamonn Keogh. 2018. The uea multivariate time series classification archive, 2018. arXiv preprint arXiv:1811.00075.

Marco Baroni, Roberto Dessì, and Angeliki Lazaridou. 2022. Emergent language-based coordination in deep multi-agent systems. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: Tutorial Abstracts, pages 11–16, Abu Dhabi, UAE. Association for Computational Linguistics.

Karla L Caballero Barajas and Ram Akella. 2015. Dynamically modeling patient’s health state from electronic medical records: A time series approach. In Proceedings of the 21th ACM SIGKDD international conference on knowledge discovery and data mining, pages 69–78.

Zhengping Chen, Jianmin Wu, Yingjie Xu, and Xiaoyong Wang. 2023. Timegpt: Large language models for temporal pattern understanding. arXiv preprint arXiv:2310.03589.

Hoang Anh Dau, Anthony Bagnall, Kaveh Kamgar, Chin-Chia Michael Yeh, Yan Zhu, Shaghayegh Gharghabi, Chotirat Ann Ratanamahatana, and Eamonn Keogh. 2019. The ucr time series archive. IEEE/CAA Journal of Automatica Sinica, 6(6):1293–1305.

Emadeldeen Eldele, Mohamed Ragab, Zhenghua Chen, Min Wu, Chee-Keong Kwoh, and Xiaoli Li. 2024. Label-efficient time series representation learning: A review. IEEE Transactions on Artificial Intelligence.

Emadeldeen Eldele, Mohamed Ragab, Zhenghua Chen, Min Wu, Chee Keong Kwoh, Xiaoli Li, and Cuntai Guan. 2021. Time-series representation learning via temporal and contextual contrasting. arXiv preprint arXiv:2106.14112.

Archibald Fraikin, Adrien Bennetot, and Stéphanie Allassonnière. 2023. T-rep: Representation learning for time series using time-embeddings. arXiv preprint arXiv:2310.04486.

Jean-Yves Franceschi, Aymeric Dieuleveut, and Martin Jaggi. 2019a. Unsupervised scalable representation learning for multivariate time series. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, Red Hook, NY, USA. Curran Associates Inc.

Jean-Yves Franceschi, Aymeric Dieuleveut, and Martin Jaggi. 2019b. Unsupervised scalable representation learning for multivariate time series. In Advances in neural information processing systems, volume 32.

Jayesh K Gupta, Maxim Egorov, and Mykel Kochenderfer. 2017. Cooperative multi-agent control using deep reinforcement learning. In International Conference on Autonomous Agents and Multiagent Systems, pages 66–83.

Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. 2020. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9729–9738.
Apit Hemakom, Danita Atiwiat, and Pasin Israsena. 2023. Ecg and eeg based detection and multilevel classification of stress using machine learning for specified genders: A preliminary study. Plos one, 18(9):e0291070.

Haigen Hu, Xiaoyuan Wang, Yan Zhang, Qi Chen, and Qiu Guan. 2024. A comprehensive survey on contrastive learning. Neurocomputing, page 128645.

Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng, Haotian Wang, Qianglong Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, et al. 2023a. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM Transactions on Information Systems.

Wei-Chia Huang, Chiao-Ting Chen, Chi Lee, Fan-Hsuan Kuo, and Szu-Hao Huang. 2023b. Attentive gated graph sequence neural network-based time-series information fusion for financial trading. Information Fusion, 91:261–276.

Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, and Pascale Fung. 2023. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):1–38.

Diederik P Kingma and Jimmy Ba. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.

Mark A Kramer. 1991. Nonlinear principal component analysis using autoassociative neural networks. AIChE journal, 37(2):233–243.

Baptiste Lafabregue, Jonathan Weber, Pierre Gançarski, and Germain Forester. 2022. End-to-end deep representation learning for time series clustering: a comparative study. Data Mining and Knowledge Discovery, 36(1):29–81.

Huao Li, Yu Chong, Simon Stepputtis, Joseph Campbell, Dana Hughes, Charles Lewis, and Katia Sycara. 2023. Theory of mind for multi-agent collaboration via large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 180–192, Singapore. Association for Computational Linguistics.

Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhui Chen, Yu-Xiang Wang, and Xifeng Yan. 2019. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting. In Advances in neural information processing systems, volume 32.

Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, Deepak Narayanan, Yuhuai Wu, Ananya Kumar, et al. 2022. Holistic evaluation of language models. arXiv preprint arXiv:2211.09110.

Haoxin Liu, Zhiyuan Zhao, Jindong Wang, Harshvardhan Kamathí, and B. Aditya Prakash. 2024. LST-Prompt: Large language models as zero-shot time series forecasters by long-short-term prompting. In Findings of the Association for Computational Linguistics: ACL 2024, pages 7832–7840, Bangkok, Thailand. Association for Computational Linguistics.

Jiexi Liu and Songcan Chen. 2024a. Timesurl: Self-supervised contrastive learning for universal time series representation learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 13918–13926.

Jiexi Liu and Songcan Chen. 2024b. Timesurl: Self-supervised contrastive learning for universal time series representation learning. 38(12):13918–13926.

Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. 2023a. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9):1–35.

Siteng Liu, Zhao Lin, Yue Wu, and Tianyi Zhou. 2023b. Tst: Time series transformer for forecasting and anomaly detection. arXiv preprint arXiv:2301.04028.

Yang Liu, Shuang Li, Zhenghua Zhang, and Haoyi Wang. 2023c. Tstext: Time series as text for language model-based analysis. arXiv preprint arXiv:2308.11228.

Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, Pieter Abbeel, and Igor Mordatch. 2017. Multi-agent actor-critic for mixed cooperative-competitive environments. In Advances in neural information processing systems, pages 6379–6390.

Dongsheng Luo, Wei Cheng, Yingheng Wang, Dongkuan Xu, Jingchao Ni, Wenchao Yu, Xuchao Zhang, Yanchi Liu, Yuncong Chen, Haifeng Chen, et al. 2023. Time series contrastive learning with information-aware augmentations. In Proceedings of the AAAI Conference on Artificial Intelligence.

Mike A Merrill, Mingtian Tan, Vinayak Gupta, Thomas Hartvigsen, and Tim Althoff. 2024. Language models still struggle to zero-shot reason about time series. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 3512–3533, Miami, Florida, USA. Association for Computational Linguistics.

Meinard Müller. 2007. Dynamic time warping. Information retrieval for music and motion, pages 69–84.

Yuri Billawala Nikolay Laptev, Saeed Amizadeh. 2015. A benchmark dataset for time series anomaly detection.

Boris N Oreshkin, Dmitri Carpov, Nicolas Chapados, and Yoshua Bengio. 2019. N-beats: Neural basis expansion analysis for interpretable time series forecasting. In International Conference on Learning Representations.
Someon Park, Jaehoon Kim, Seungwan Jin, Sohyun Park, and Kyungsik Han. 2024. PREDICT: Multi-agent-based debate simulation for generalized hate speech detection. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pages 20963–20987. Miami, Florida, USA. Association for Computational Linguistics.

Karl Pearson. 1901. On lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2(11):559–572.

Peng Qiu, Erin F Simonds, Sean C Bendall, Kenneth D Gibbs Jr, Robert V Bruggner, Michael D Linderman, Karen Sachs, Garry P Nolan, and Sylvia K Plevritis. 2011. Extracting a cellular hierarchy from high-dimensional cytometry data with spade. Nature biotechnology, 29(10):886–891.

Hansheng Ren, Bixiong Xu, Yujing Wang, Chao Yi, Congrui Huang, Xiaoyu Kou, Tony Xing, Mao Yang, Jie Tong, and Qi Zhang. 2019. Time series anomaly detection with multiresolution ensemble decoding. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01):4027–4034.

Victor Sanh, Albert Webson, Colin Raffel, Stephen H Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al. 2021. Multitask prompted training enables zero-shot task generalization. arXiv preprint arXiv:2110.08207.

Omer Berat Sezer, Mehmet Ugur Gudelek, and Ahmet Murat Ozbayoglu. 2020. Financial time series forecasting with deep learning: A systematic literature review: 2005–2019. Applied soft computing, 90:106181.

Le Sun, Jiancong Liang, Chunjiang Zhang, Di Wu, and Yanchun Zhang. 2023. Meta-transfer metric learning for time series classification in 6g-supported intelligent transportation systems. IEEE Transactions on Intelligent Transportation Systems.

Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech M Czarnecki, Vinicius Zambaldi, et al. 2018. Value-decomposition networks for cooperative multi-agent learning. In International Conference on Learning Representations.

Yuqi Tang, Yuanhang Chen, Xiyuan Zhang, Yifang Wang, Zhenghua Zhang, et al. 2023. Foundation models for time series: A survey. arXiv preprint arXiv:2310.07820.

Ross Taylor, Marcin Kardas, Guillem Cucurull, Thomas Scialom, Anthony Hartshorn, Elvis Saravia, Andrew Poulton, Viktor Kerkez, and Robert Stojnic. 2022. Galactica: A large language model for science. arXiv preprint arXiv:2211.09085.

Yonglong Tian, Dilip Krishnan, and Phillip Isola. 2020. Contrastive multiview coding. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XI 16, pages 776–794. Springer.

Siavash Tonekaboni, Danny Eytan, and Anna Goldenberg. 2021. Unsupervised representation learning for time series with temporal neighborhood coding. In International Conference on Learning Representations.

Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.

Patara Trirat, Yooju Shin, Junhyeok Kang, Youngeun Nam, Jihye Na, Minyoung Bae, Joeun Kim, Byunghyun Kim, and Jae-Gil Lee. 2024. Universal time-series representation learning: A survey. arXiv preprint arXiv:2401.03717.

Jingwei Wang, Qianyue Hao, Wenzhen Huang, Xiachen Fan, Zhentao Tang, Bin Wang, Jianye Hao, and Yong Li. 2024. Dysp: Dynamic parameter sharing in multi-agent reinforcement learning for spatio-temporal resource allocation. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 3128–3139.

Zhixin Wang, Xiyuan Zhang, Hao Wang, and Jun Zhou. 2023. Timelm: Understanding time series data through large language models. arXiv preprint arXiv:2310.01927.

Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837.

Qingsong Wen, Liang Sun, Fan Yang, Xiaomin Song, Jingkun Gao, Xue Wang, and Huan Xu. 2020. Time series data augmentation for deep learning: A survey. arXiv preprint arXiv:2002.12478.

Gerald Woo, Chenghao Liu, Doyen Sahoo, Akshat Kumar, and Steven Hoi. 2022. Cost: Contrastive learning of disentangled seasonal-trend representations for time series forecasting. In International Conference on Learning Representations.

Zhongqing Wu, Junhan Lin, Wei Chen, Jia Zhou, and Hui Yang. 2023. Temporal knowledge acquisition via large language models. arXiv preprint arXiv:2305.14019.

Haowen Xu, Wenxiao Chen, Nengwen Zhao, Zeyan Li, Jiahao Bu, Zhihan Li, Ying Liu, Youjian Zhao, Dan Pei, Yang Feng, et al. 2018. Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications. In Proceedings of the 2018 world wide web conference, pages 187–196.
Zhihan Xu, Yanbo Shang, Guangyi Wang, Jingyuan Li, et al. 2023. Timemae: Self-supervised representations of time series with decoupled masked autoencoders. arXiv preprint arXiv:2303.00320.

Chaochao Yang, Lei Chen, Qiannan Guo, Xiaoyun Wang, and Shuang Li. 2021. Robust time series representation learning with multi-view attention consistency. In 2021 IEEE International Conference on Data Mining (ICDM), pages 1493–1498.

Ling Yang and Shenda Hong. 2022. Unsupervised time-series representation learning with iterative bilinear temporal-spectral fusion. In International conference on machine learning, pages 25038–25054. PMLR.

Zhihan Yue, Yujing Wang, Juanyong Duan, Tianmeng Yang, Congrui Huang, Yunhai Tong, and Bixiong Xu. 2022. Ts2vec: Towards universal representation of time series. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 8980–8987.

George Zerveas, Srideepika Jayaraman, Dhaval Patel, Anuradha Bhamidipaty, and Carsten Eickhoff. 2021. A transformer-based framework for multivariate time series representation learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pages 2114–2124.

Lei Zhang, Binglu Wang, Yongqiang Zhao, Yuan Yuan, Tianfei Zhou, and Zhijun Li. 2024. Collaborative multimodal fusion network for multiagent perception. IEEE Transactions on Cybernetics.

Wei Zhang, Jinyang Wang, Wei Chen, and Jiashu Huang. 2023. Seriesilm: Learning language models on time series data. arXiv preprint arXiv:2309.08482.

Weijia Zhang, Hao Liu, Jindong Han, Yong Ge, and Hui Xiong. 2022a. Multi-agent graph convolutional reinforcement learning for dynamic electric vehicle charging pricing. In Proceedings of the 28th ACM SIGKDD conference on knowledge discovery and data mining, pages 2471–2481.

Xiyuan Zhang, Zhao Yu, Qitian Zhou, and Yong Li. 2022b. Cost: Contrastive learning of disentangled seasonal-trend representations for time series forecasting. arXiv preprint arXiv:2202.01575.

Haoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang, Jianxin Li, Hui Xiong, and Wancai Zhang. 2021. Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 11106–11115.

Shu Zhou, Xin Wang, Jingwen Qiu, Xiaomin Li, Bin Shi, and Hao Wang. 2025a. Losdf: A logical optimization and semantic decoupling framework for question answering in multi-party conversations. Information Processing & Management, 62(5):104200.

Shu Zhou, Rui Zhao, Zhengda Zhou, Haohan Yi, Xuhui Zheng, and Hao Wang. 2025b. Enhancing extractive question answering in multiparty dialogues with logical inference memory network. In Proceedings of the 31st International Conference on Computational Linguistics, pages 8725–8738, Abu Dhabi, UAE. Association for Computational Linguistics.

Changxi Zhu, Mehdi Dastani, and Shihan Wang. 2022. A survey of multi-agent reinforcement learning with communication. arXiv preprint arXiv:2203.08975, 1.
A  More Related Work

A.1  Large Language Models for Time Series Analysis

Large Language Models (LLMs) are demonstrating remarkable capabilities beyond natural language processing, leading to growing interest in their application to time series analysis. Initial explorations focused on leveraging LLMs for time series forecasting by generating natural language descriptions of temporal patterns (Tang et al., 2023). Subsequently, research has expanded to encompass various approaches for integrating LLMs into time series tasks, including prompt engineering to enhance LLMs’ understanding of temporal data (Wu et al., 2023), combining LLMs with traditional time series models (Wang et al., 2023; Zhang et al., 2023), and leveraging LLMs for semantic understanding of time series data by converting them into natural language descriptions or generating human-readable explanations for temporal patterns (Liu et al., 2023c; Chen et al., 2023). These diverse research directions highlight the growing potential of LLMs to enhance various aspects of time series analysis.

B  Datasets Details

Classification Tasks: The UEA archive (Bagnall et al., 2018) is a widely used benchmark for evaluating time series classification algorithms. It comprises a diverse collection of time series datasets from various domains, including motion capture, sensor data, and medical recordings. These datasets vary in length, number of classes, and complexity, providing a comprehensive and challenging evaluation environment for time series representation learning methods. For the UEA datasets, we use the original train/test splits.

Forecasting Tasks: We utilize ETT, Electricity and Weather datasets for both short-term (24 and 48 horizons) and long-term (96 to 720 horizons) forecasting evaluations. These datasets are commonly used benchmarks for time series forecasting.

Anomaly Detection: We employ two benchmark datasets: KPI (Ren et al., 2019), a competition dataset with minutely sampled KPI curves, and Yahoo (Nikolay Laptev, 2015), containing 367 hourly sampled time series. These datasets represent real-world scenarios where anomaly detection is crucial.

Transfer Learning: We use datasets from the UCR archive (Dau et al., 2019), including CBF and CinCECGTorso as source domains, and evaluate on multiple target domains. This allows us to assess the ability of MERIT to generalize to new, unseen datasets.

C  Baseline Descriptions

DTW (Müller, 2007): Dynamic Time Warping (DTW) is a classical algorithm for measuring similarity between two temporal sequences that may vary in speed.

TimesURL (Liu and Chen, 2024b): A self-supervised contrastive learning framework for universal time series representation learning.

TS-TCC (Eldele et al., 2021): A self-supervised framework that learns representations by contrasting temporal contexts.

TS2Vec (Yue et al., 2022): A universal framework for learning representations of time series in an arbitrary semantic level.

T-Loss (Franceschi et al., 2019b): A self-supervised method that learns representations by predicting future values.

InfoTS (Luo et al., 2023): A self-supervised method that learns representations by maximizing the mutual information between different augmented views of a time series.

TST (Zerveas et al., 2021): A Transformer-based model for self-supervised learning of time series representations.

DTW (Müller, 2007): A classical algorithm for measuring similarity between two temporal sequences that may vary in speed.

TS-TCC (Eldele et al., 2021): A self-supervised framework that learns representations by contrasting temporal contexts.

CoST (Woo et al., 2022): A self-supervised method that learns disentangled seasonal and trend representations.

Informer (Zhou et al., 2021): A transformer-based model for long sequence time series forecasting.

LogTrans (Li et al., 2019): A transformer with log-sparse attention for time series forecasting.

N-BEATS (Oreshkin et al., 2019): A deep neural architecture based on backward and forward residual links.

DONUT (Xu et al., 2018): A VAE-based model for unsupervised anomaly detection.

SR (Ren et al., 2019): A spectral residual-based anomaly detection method.

TNC (Tonkaboni et al., 2021): A temporal neighborhood coding approach for representation learn-
D Evaluation Metrics

Classification: For classification tasks, we use accuracy (ACC) and macro-averaged F1-score (F1) as the evaluation metrics. ACC measures the overall prediction correctness, while F1 considers both precision and recall, which is particularly important for imbalanced datasets.

Forecasting: For forecasting tasks, we adopt two widely-used metrics:
• Mean Squared Error (MSE): \( \text{MSE} = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2 \),
• Mean Absolute Error (MAE): \( \text{MAE} = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i| \),
where \( y_i \) and \( \hat{y}_i \) denote the ground truth and predicted values, respectively.

Anomaly Detection: For anomaly detection tasks, we use the following metrics:
• Area Under the Receiver Operating Characteristic curve (AUROC)
• Area Under the Precision-Recall curve (AUPRC)
• F1-score at the best threshold (Best-F1)

Transfer Learning: For transfer learning tasks, we evaluate the performance using accuracy (ACC) on the target domains. We also report the relative performance degradation compared to the source domain performance to assess the transfer efficiency.

E Implementation Details

Retrieval Agent: This agent consists of two components: a trainable encoder (Fraikin et al., 2023) and a pre-trained LLM (LLaMA3.1-8B). This agent uses an encoder to extract initial representations for coarse candidate selection. The agent first selects the top \( K = 5 \) most similar sequences as candidates based on cosine similarity between their TCN representations. Then, it employs the LLM to select \( M = 3 \) semantically relevant sequences from the candidates as the retrieved contexts.

Augmentation Agent: This agent utilizes a pre-trained LLM (LLaMA3.1-8B) to dynamically select augmentation strategies based on the retrieved contexts and the target sequence. The strategy library \( \mathcal{S} \) includes: {Sailing, Resizing, Jittering, Flipping, Permutation, Time Masking, Frequency Masking, Time Neighboring}.

Review Agent: This agent employs a pre-trained LLM (LLaMA3.1-8B) to evaluate the quality of augmented samples. It assesses whether the augmented samples maintain semantic consistency with the original sequence. The agent approves high-quality augmented samples and stores them in a memory bank.

Other Details: We use a trainable encoder (Fraikin et al., 2023) to map the original time series and its augmented versions to a representation space. The encoder has the same architecture as the one used in the retrieval agent. This encoder is trained using the contrastive loss function. For training the encoder, we use the Adam optimizer (Kingma and Ba, 2014) with a learning rate of 0.001 and weight decay of 0.0005. The batch size is set to 128 for all experiments. We train the model for 100 epochs on all datasets. All experiments are conducted using 5 different random seeds, and we report the mean of the results. For all downstream tasks, we use the same train/validation/test splits as in (Yue et al., 2022) to ensure a fair comparison. For all metrics except MSE and MAE, higher values indicate better performance. For MSE and MAE, lower values indicate better performance. Following common practice, we report the mean over multiple runs for all experiments to ensure statistical significance. We use Llama3.1-8b as our base LLM model. The LLM inference is performed on a dedicated GPU server with the following specifications: an NVIDIA A100 GPU (40GB), a 64-core AMD EPYC CPU, 512GB of RAM, and a 2TB NVMe SSD. The average response times are as follows: 27ms per query for the retrieval agent, 78ms per augmentation for the augmentation agent, and 68ms per review for the review agent.

F Analysis of LLM Prompt Design

We experiment with different prompt templates for each agent to analyze their impact on performance. Figure 7 shows the performance comparison of three template variants:
• Basic: Simple instruction-based prompts;
• Structured (default): Detailed prompts with specific format requirements;
• CoT: Chain-of-thought prompts encouraging step-by-step reasoning.

From Figure 7, it can be concluded that (1) Structured prompts (Structured) perform the best in terms of accuracy and manual consistency; (2) CoT prompts, while providing a more detailed reasoning process, have a significantly higher response
Figure 7: Performance comparison of different prompt templates across agents. Left: Accuracy of different prompt templates. Right: Response time of different prompt templates.

Figure 8: Analysis of feedback loop mechanism. (Left) Performance comparison between with and without feedback loop on UCR classification task over training epochs. (Mid) Quality assessment success rate of augmented samples. (Right) Distribution of feedback types from the Review Agent. The shaded areas in (left) and (mid) represent the standard deviation over 5 runs.

time; and (3) Basic prompts (Basic) are the fastest to respond, but are less accurate.

G  Impact of Feedback Loop

We analyze the effectiveness of the feedback loop mechanism by examining its impact on the retrieval and augmentation agents, focusing on the quality assessment success rate and the feedback distribution. The iterative nature of the feedback loop improves the quality of generated positive views. Figure 8 (Left) shows that compared to the model without the feedback loop, the model with the feedback mechanism achieves 5.2% higher classification accuracy, which indirectly shows the positive effects of our feedback mechanism, but it should be noted that the feedback loop itself does not directly influence the model’s convergence, but rather the quality of positive samples. Furthermore, the quality assessment success rate improves from 60% to over 90% during training (Figure 8 (Mid)), demonstrating the review agent’s increasing effectiveness in identifying high-quality augmentations, which further proves the positive role of feedback mechanism. The feedback distribution (Figure 8 (Right)) reveals that pattern preservation (45%) and temporal coherence (35%) are the primary concerns, followed by semantic validity (20%), aligning with our design principle of maintaining both structural and semantic integrity. These findings demonstrate the crucial role of the feedback loop in maintaining high-quality augmentations and guiding the continuous improvement of the retrieval and augmentation agents.

H  Algorithm

The details of our algorithm are shown in Algorithm 1.

I  Prompt Design

The prompts for our three agents are shown in Figure 9, Figure 10 and Figure 11, respectively.
Algorithm 1 Multi-Agent Collaboration for Unsupervised Time series Representation Learning (MERIT)

Input: Dataset \( X = \{x_1, \ldots, x_N\} \in \mathbb{R}^{N \times T \times C} \), Similarity function Sim(\cdot, \cdot), Parameters K, M, Augmentation strategy library S, Temperature \( \tau \), Maximum iterations \( N_{iter} \), Maximum memory bank size B

Output: Learned representation function \( f_\theta \)

Initialize: Encoder \( f_\theta \), Memory bank \( \mathcal{M} \leftarrow \emptyset \)
1: for each \( x_i \in X \) do
2:   // Retrieval Agent (executed once)
3:     \( \mathcal{C}_i \leftarrow \text{Top-K(Sim}(x_i, x_j)) \) for all \( x_j \in X \setminus \{x_i\} \) ▷ Candidate Selection
4:     \( \mathcal{R}_i \leftarrow \text{Top-M(LLM-Prompt}(x_i, x_j, \text{Reasoning})) \) for all \( x_j \in \mathcal{C}_i \) ▷ LLM-based Refinement
5:     \( n_{iter} \leftarrow 0 \)
6:     \( \mathcal{M}_i \leftarrow \emptyset \) ▷ Initialize local memory bank for current \( x_i \)
7:     while \( n_{iter} < N_{iter} \) and \( |\mathcal{M}_i| < B \) do
8:       // Augmentation Agent
9:         \( S_i \leftarrow \text{LLM-Prompt}(x_i, \mathcal{R}_i, \text{Reasoning}) \) ▷ Select Augmentation Strategies
10:        \( X_i^{\text{aug}} \leftarrow \{s(x_i)|s \in S_i\} \cup \{s(x_j)|s \in S_i, x_j \in \mathcal{R}_i\} \) ▷ Generate Augmented Samples
11:       // Review Agent
12:        \( X^{\text{temp}} \leftarrow \emptyset \)
13:        for each \( x^{\text{aug}} \in X_i^{\text{aug}} \) do
14:          Quality(\( x^{\text{aug}} \)) \( \leftarrow \) LLM-Prompt(\( x_i, x^{\text{aug}}, \text{Reasoning} \)) ▷ Assess Quality
15:          if Quality(\( x^{\text{aug}} \)) = 'Correct' then
16:            \( X^{\text{temp}} \leftarrow X^{\text{temp}} \cup \{x^{\text{aug}}\} \)
17:          end if
18:        end for
19:        if \( X^{\text{temp}} \neq \emptyset \) then
20:          \( \mathcal{M}_i \leftarrow \mathcal{M}_i \cup X^{\text{temp}} \) ▷ Store approved augmentations in local memory bank
21:        end if
22:        if all \( x^{\text{aug}} \in X_i^{\text{aug}} \) are rejected then
23:          \( n_{iter} \leftarrow n_{iter} + 1 \)
24:        else
25:          \( n_{iter} \leftarrow N_{iter} \) ▷ Terminate if no augmentation is rejected
26:        end if
27:      end while
28:      \( \mathcal{M} \leftarrow \mathcal{M} \cup \mathcal{M}_i \) ▷ Add approved augmentations to global memory bank
29:    end for
30:    // Time Series Representation Learning
31:    for each epoch do
32:      for each \( x_i \in X \) do
33:        \( \hat{X}_i^P \leftarrow \{x_j|x_j \in \mathcal{R}_i\} \cup \{x^{\text{aug}}|x^{\text{aug}} \in \mathcal{M}_i\} \) ▷ Construct positive samples
34:        Sample a mini-batch \( B \) from \( \hat{X}_i^P \)
35:        for each \( x^{\text{aug}} \in B \) do
36:          \( z_i = f_\theta(x_i) \)
37:          \( z^{\text{aug}} = f_\theta(x^{\text{aug}}) \)
38:          Update \( f_\theta \) by minimizing the contrastive loss \( \mathcal{L} \) in Eq. (12)
39:        end for
40:      end for
41:    end for

J Detailed Classification Results

The detailed classification results are shown in Table 7.

![Prompt for our retrieval agent.](page_1042_1042_324_324.png)

Figure 9: The prompt for our retrieval agent.
Review Agent Prompt

You are an expert in sequence analysis.
Below is a generated sequence after applying an augmentation strategy.

The available strategies are:
[Sailing, Resizing, Jittering, Flipping, Permutation, Time Masking, Frequency Masking, Time Neighboring].

Your task is to:
1. Verify whether the generated sequence aligns with the rules of the given strategy.
2. Provide a clear explanation if the sequence does not align with the rules.

Please respond in the following format: 1. The generated sequence is < correct > or < error >.
2. The reason is that < Reason >.

Original Sequence: <Original_Sequence>,
Generated Sequence: <Generated_Sequence>
Think step by step and do in-depth reasoning, show details of reasoning.

Figure 10: The prompt for our review agent.

Augmentation Agent Prompt

You are an expert in sequence augmentation.
Below are a current sequence and its similar sequence.

Your task is to:
1. Select the suitable augmentation strategy for the current sequence.
2. Select the suitable augmentation strategy for the similar sequence.

The available strategies are:
[Sailing, Resizing, Jittering, Flipping, Permutation, Time Masking, Frequency Masking, Time Neighboring].

Please respond in the following format: 1. Current Sequence Strategy: <Current_Strategy>
2. Similar Sequence Strategy: <Similar_Sequence_Strategy>.

Current Sequence: <Current_Sequence>.
Similar Sequence: <Similar_Sequence>.
Think step by step and do in-depth reasoning, show details of reasoning.

Figure 11: The prompt for our augmentation agent.
<table>
  <tr>
    <th>Dataset</th>
    <th>DTW</th>
    <th>TST</th>
    <th>TS-TCC</th>
    <th>T-Loss</th>
    <th>TS2Vec</th>
    <th>TimesURL</th>
    <th>MERIT</th>
  </tr>
  <tr>
    <td>ArticularyWordRecognition</td>
    <td>98.0</td>
    <td>98.3</td>
    <td>98.7</td>
    <td>98.5</td>
    <td>98.9</td>
    <td>99.0</td>
    <td><b>99.3</b></td>
  </tr>
  <tr>
    <td>AtrialFibrillation</td>
    <td>22.0</td>
    <td>26.7</td>
    <td>26.7</td>
    <td>26.7</td>
    <td>26.7</td>
    <td>26.7</td>
    <td><b>33.3</b></td>
  </tr>
  <tr>
    <td><b>BasicMotions</b></td>
    <td>97.5</td>
    <td>97.5</td>
    <td><b>100.0</b></td>
    <td>97.5</td>
    <td><b>100.0</b></td>
    <td><b>100.0</b></td>
    <td><b>100.0</b></td>
  </tr>
  <tr>
    <td>CharacterTrajectories</td>
    <td>96.9</td>
    <td>97.3</td>
    <td>97.8</td>
    <td>97.6</td>
    <td>98.1</td>
    <td>98.4</td>
    <td><b>98.7</b></td>
  </tr>
  <tr>
    <td>Cricket</td>
    <td>94.4</td>
    <td>95.8</td>
    <td>97.2</td>
    <td>97.2</td>
    <td>97.2</td>
    <td>98.6</td>
    <td><b>100.0</b></td>
  </tr>
  <tr>
    <td>DuckDuckGeese</td>
    <td>27.5</td>
    <td>35.0</td>
    <td>40.0</td>
    <td>37.5</td>
    <td>42.5</td>
    <td>45.0</td>
    <td><b>47.5</b></td>
  </tr>
  <tr>
    <td>EigenWorms</td>
    <td>55.7</td>
    <td>61.1</td>
    <td>61.8</td>
    <td>61.1</td>
    <td>62.6</td>
    <td>64.1</td>
    <td><b>65.6</b></td>
  </tr>
  <tr>
    <td>Epilepsy</td>
    <td>96.4</td>
    <td>97.1</td>
    <td>97.8</td>
    <td>97.5</td>
    <td>98.2</td>
    <td>98.6</td>
    <td><b>99.3</b></td>
  </tr>
  <tr>
    <td>EthanolConcentration</td>
    <td>29.3</td>
    <td>32.3</td>
    <td>33.1</td>
    <td>32.7</td>
    <td>33.8</td>
    <td>34.2</td>
    <td><b>35.0</b></td>
  </tr>
  <tr>
    <td>ERing</td>
    <td>13.3</td>
    <td>13.3</td>
    <td>13.3</td>
    <td>13.3</td>
    <td>13.3</td>
    <td>13.3</td>
    <td><b>13.3</b></td>
  </tr>
  <tr>
    <td>FaceDetection</td>
    <td>52.8</td>
    <td>54.7</td>
    <td>55.9</td>
    <td>55.3</td>
    <td>56.5</td>
    <td>57.2</td>
    <td><b>58.4</b></td>
  </tr>
  <tr>
    <td>FingerMovements</td>
    <td>55.0</td>
    <td>56.7</td>
    <td>58.3</td>
    <td>58.3</td>
    <td>60.0</td>
    <td>61.7</td>
    <td><b>63.3</b></td>
  </tr>
  <tr>
    <td>HandMovementDirection</td>
    <td>27.8</td>
    <td>30.6</td>
    <td>33.3</td>
    <td>30.6</td>
    <td>33.3</td>
    <td>36.1</td>
    <td><b>38.9</b></td>
  </tr>
  <tr>
    <td>Handwriting</td>
    <td>28.5</td>
    <td>31.5</td>
    <td>32.3</td>
    <td>31.9</td>
    <td>33.1</td>
    <td>34.6</td>
    <td><b>35.4</b></td>
  </tr>
  <tr>
    <td>Heartbeat</td>
    <td>71.7</td>
    <td>73.3</td>
    <td>74.2</td>
    <td>73.8</td>
    <td>75.0</td>
    <td>75.8</td>
    <td><b>76.7</b></td>
  </tr>
  <tr>
    <td>InsectWingbeat</td>
    <td>11.5</td>
    <td>12.8</td>
    <td>13.6</td>
    <td>13.2</td>
    <td>14.0</td>
    <td>14.8</td>
    <td><b>15.6</b></td>
  </tr>
  <tr>
    <td>JapaneseVowels</td>
    <td>95.7</td>
    <td>96.2</td>
    <td>97.0</td>
    <td>96.8</td>
    <td>97.3</td>
    <td>97.8</td>
    <td><b>98.4</b></td>
  </tr>
  <tr>
    <td>Libras</td>
    <td>83.3</td>
    <td>85.0</td>
    <td>86.7</td>
    <td>86.1</td>
    <td>87.2</td>
    <td>88.3</td>
    <td><b>89.4</b></td>
  </tr>
  <tr>
    <td>LSST</td>
    <td>45.3</td>
    <td>47.8</td>
    <td>49.1</td>
    <td>48.4</td>
    <td>50.0</td>
    <td>51.6</td>
    <td><b>52.8</b></td>
  </tr>
  <tr>
    <td>MotorImagery</td>
    <td>39.0</td>
    <td>42.0</td>
    <td>44.0</td>
    <td>43.0</td>
    <td>45.0</td>
    <td>46.0</td>
    <td><b>48.0</b></td>
  </tr>
  <tr>
    <td>NATOPS</td>
    <td>88.3</td>
    <td>90.0</td>
    <td>91.7</td>
    <td>90.8</td>
    <td>92.5</td>
    <td>93.3</td>
    <td><b>94.2</b></td>
  </tr>
  <tr>
    <td>PenDigits</td>
    <td>97.5</td>
    <td>97.9</td>
    <td>98.3</td>
    <td>98.1</td>
    <td>98.5</td>
    <td>98.8</td>
    <td><b>99.2</b></td>
  </tr>
  <tr>
    <td>PEMS-SF</td>
    <td>71.0</td>
    <td>73.4</td>
    <td>74.8</td>
    <td>74.1</td>
    <td>75.5</td>
    <td>76.9</td>
    <td><b>78.3</b></td>
  </tr>
  <tr>
    <td>PhonemeSpectra</td>
    <td>10.1</td>
    <td>11.8</td>
    <td>13.4</td>
    <td>12.6</td>
    <td>14.3</td>
    <td>15.1</td>
    <td><b>16.8</b></td>
  </tr>
  <tr>
    <td>RacketSports</td>
    <td>86.8</td>
    <td>88.2</td>
    <td>89.5</td>
    <td>88.8</td>
    <td>90.1</td>
    <td>90.8</td>
    <td><b>91.4</b></td>
  </tr>
  <tr>
    <td>SelfRegulationSCP1</td>
    <td>77.4</td>
    <td>79.2</td>
    <td>80.2</td>
    <td>79.7</td>
    <td>81.1</td>
    <td>82.1</td>
    <td><b>83.0</b></td>
  </tr>
  <tr>
    <td>SelfRegulationSCP2</td>
    <td>48.3</td>
    <td>50.6</td>
    <td>52.2</td>
    <td>51.7</td>
    <td>53.3</td>
    <td>54.4</td>
    <td><b>55.6</b></td>
  </tr>
  <tr>
    <td>SpokenArabicDigits</td>
    <td>96.7</td>
    <td>97.3</td>
    <td>97.8</td>
    <td>97.5</td>
    <td>98.0</td>
    <td>98.3</td>
    <td><b>98.7</b></td>
  </tr>
  <tr>
    <td>StandWalkJump</td>
    <td>33.3</td>
    <td>36.7</td>
    <td>40.0</td>
    <td>36.7</td>
    <td>40.0</td>
    <td>43.3</td>
    <td><b>46.7</b></td>
  </tr>
  <tr>
    <td>UWaveGestureLibrary</td>
    <td>85.6</td>
    <td>87.2</td>
    <td>88.4</td>
    <td>87.8</td>
    <td>89.1</td>
    <td>90.3</td>
    <td><b>91.5</b></td>
  </tr>
  <tr>
    <th>Average</th>
    <th>62.9</th>
    <th>61.7</th>
    <th>67.0</th>
    <th>65.8</th>
    <th>70.4</th>
    <th>75.2</th>
    <th><b>77.2</b></th>
  </tr>
</table>

Table 7: Classification accuracy (%) on 30 UEA datasets. The best results are highlighted in bold.

Reviewer paper summaries: This paper proposes MERIT, a framework for time series representation learning, using LLM agents to collaboratively generate positive views for contrastive learning. Proposed framework consists of three llm agents: a Retrieval Agent, an Augmentation Agent, and a Review Agent.

This paper explores the problem of unsupervised time-series representation learning and introduces a novel multi-agent collaborative framework named MERIT (Multi-Agent Collaboration for Time-series Representation Learning). The framework leverages three large language model (LLM)-based agents—Retrieval Agent, Enhancement Agent, and Review Agent—to collaboratively generate high-quality positive sample views for subsequent contrastive learning, thereby improving the effectiveness of time-series representations. Extensive experiments on multiple public datasets demonstrate the superiority of MERIT over existing methods. This work marks the first integration of LLM agents with time-series representation learning, enhancing the reasoning capabilities of the learning paradigm. Additionally, it proposes a novel methodology in the form of the MERIT framework, which utilizes the Retrieval Agent to extract contextual information, strengthens the reasoning ability of the Enhancement Agent, and employs the Review Agent to ensure reliability.

This work addresses the issue that random data augmentation in contrastive learning for time series representation may disrupt the semantic integrity of the sequences. To tackle this, it proposes a multi-agent framework consisting of a retrieval agent that selects semantically similar time series, an augmentation agent that adaptively chooses augmentation strategies for a given sequence, and a review agent that evaluates the quality of the augmented sequences. The proposed MERIT model is evaluated on several benchmarks across various tasks, including time series classification, imputation, forecasting, and anomaly detection.
Summary of strengths: - As mentioned in the introduction, the idea is novel and the research is interesting, given that this is the first methodology to utilize an LLM agent for time series data representation learning.
- The overall structure of the paper is well-organized, making it easy to understand. The proposed framework, consisting of a retrieval agent, augmentation agent, and review agent, along with explanations for each part and high consistency with the figure’s explanation, facilitates easy comprehension of what could be a complex methodology.
- The experiments are well-designed with a variety of datasets, baseline methodologies, and ablation studies, ensuring that the effectiveness of the proposed methodology is persuasively demonstrated from multiple perspectives.

1.This work pioneers the integration of large language models (LLMs) into the field of unsupervised time-series representation learning, introducing a closed-loop collaborative framework composed of three agents: retrieval, enhancement, and review. This innovative approach transcends the limitations of traditional fixed or random augmentation strategies by leveraging the semantic understanding and reasoning capabilities of LLMs to dynamically generate high-quality positive sample views, marking a significant advancement in the field.
2.The MERIT framework employs a collaborative design where the Retrieval Agent supplies semantically relevant contextual data, the Enhancement Agent adaptively selects augmentation strategies, and the Review Agent ensures the quality of the generated views. This division of labor fully leverages the reasoning capabilities of LLMs while enhancing the semantic consistency of positive samples through a feedback loop mechanism.
3.The paper conducts extensive experiments on 30 UEA datasets, ETT forecasting datasets, and KPI and Yahoo anomaly detection datasets, covering a wide range of tasks including classification, forecasting, anomaly detection, and transfer learning. The results demonstrate that MERIT significantly outperforms state-of-the-art methods (such as TS2Vec and TimesURL) in most tasks, achieving an average accuracy of 77.2% in classification tasks, which highlights its robustness and versatility. Additionally, analyses on noise robustness, different LLM models, and parameter scales further reinforce the credibility of the findings.
4.This paper provides a comprehensive review of related work in time-series representation learning and multi-agent systems, clearly outlining the evolution from traditional methods (such as PCA and autoencoders) to modern contrastive learning approaches (like TS-TCC and TS2Vec). It identifies the limitations of existing methods in augmentation strategy selection, thereby establishing a solid theoretical foundation for the proposed approach.

1. This work addresses the limitations of current time series data augmentation by leveraging an LLM-based agent framework to improve the performance of unsupervised time series representation learning. The research problem is meaningful, and the proposed method is innovative.  

2. The model's effectiveness is validated across multiple benchmarks, strengthening the work's credibility and persuasiveness.
Summary of weaknesses: - The introduction points out two main issues: 1) problems with existing time series data representation learning methodologies, and 2) challenges in using LLMs for time series data representation learning. However, it does not fundamentally explain the reason or motivation for using LLMs in time series data representation learning, raising questions and making it difficult to understand this part.
- The rationale behind the selection of functionalities for each LLM agent within the framework is not described in detail. While the roles and operational mechanisms of each agent are explained, the authors' reasoning behind choosing these specific approaches is not clearly explained.
- There is a lack of experimental and logical support for fundamentally understanding why LLM agents can effectively handle time series data and why the proposed methodology works well. Although the performance benefits are acknowledged, the absence of an in-depth analysis of the underlying reasons raises doubts about whether this is a generally applicable and useful framework.

1.While MERIT relies on the collaboration of three LLM agents and demonstrates exceptional performance, its computational complexity is relatively high, potentially posing efficiency challenges when applied to large-scale datasets. The paper mentions the use of the LLaMA3.1-8B model and A100 GPU in the implementation details (Appendix F), but it lacks specific information on computational costs (such as training time and memory usage) or a comparative analysis with baseline methods. This omission may limit the practical applicability of the approach, particularly in resource-constrained scenarios. It is recommended that the authors supplement the study with a quantitative analysis of computational resources to help readers evaluate its scalability.
2.The process by which the Enhancement Agent adaptively selects strategies from the augmentation strategy library (such as Sailing, Jittering, etc.) relies on the reasoning capabilities of the LLM. However, the paper does not provide a detailed explanation of how the LLM makes decisions based on contextual data. For instance, Section 3.3 mentions "selecting appropriate augmentation strategies using the reference set provided by the Retrieval Agent," but it lacks specific selection criteria or case studies. This omission may make it difficult for readers to understand the relationship between the chosen augmentation strategies and the characteristics of the data. It is recommended that the authors include a concrete case study demonstrating how the LLM selects augmentation strategies based on the properties of the time-series data.
3.In the classification tasks, Table 7 presents the accuracy rates across 30 UEA datasets. However, the performance on certain datasets (e.g., ERing, with an accuracy of only 13.3%) aligns with that of baseline methods, suggesting that MERIT does not significantly enhance performance in some scenarios. The authors do not provide explanations or analyses for such outliers, which may obscure the limitations of the proposed method.
4.The paper acknowledges the limited understanding of numerical signals by LLMs under zero-shot conditions (Section 2) and addresses this issue by leveraging the Retrieval Agent to provide context. However, the potential hallucination problem of LLMs and its impact on the quality of augmented views are only briefly mentioned in Section 3.4, without in-depth analysis. It is recommended that the authors supplement the study with additional experiments or case studies to explore the specific effects of LLM hallucination on MERIT’s performance and the efficacy of the proposed mitigation strategies.

1. The proposed use of Multi-Agent Collaboration for time series representation learning appears innovative at first glance. However, the framework introduced by the authors does not establish significant relevance to time series data specifically, as it could be applied equally to image and text data. For instance, existing methodologies in time series analysis predominantly focus on inter-variable relationships within multivariate time series [R1], including considerations of long-short term dependencies [R2] and frequency domain features [R3], which are not adequately addressed by the Multi-Agent Collaboration framework.

2. Existing literature [R4, R5] on time series data augmentation demonstrates challenges in selecting an effective method that consistently enhances performance across diverse datasets and downstream tasks. The experimental section lacks a detailed analysis of how the Retrieval Agent, Augmentation Agent, and Review Agent overcome these challenges or mitigate the risk of negative impacts from chosen augmentation methods.

3. The choice of baselines in the experimental setup lacks inclusion of recent advancements, particularly in time series prediction methods. For classification tasks, it is recommended that the authors consider [R6, R7] as current baselines, while for prediction methods, [R8, R9] should be incorporated as benchmarks.

4. The evaluation metrics chosen for anomaly detection experiments are deemed insufficient. Relying solely on F1-score, Precision, and Recall metrics may lead to biased comparison outcomes [R10, R11, R12]. 

5. Concerns arise regarding the performance of the MERIT method as presented in Table 7 on the UEA 30 dataset. It is uncommon for proposed methodologies in multivariate time series classification to consistently achieve top performance across all 30 datasets [R6, R7]. Clarification on the methodology or additional comparative experiments against state-of-the-art approaches would strengthen the validity of the reported results.


[R1] Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. ICLR, 2023.

[R2] Pathformer: Multi-scale transformers with adaptive pathways for time series forecasting. ICLR, 2024.

[R3] Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting. ICML, 2022.

[R4] Time series data augmentation for deep learning: A survey. IICAI, 2021.

[R5] An empirical survey of data augmentation for time series classification with neural networks. Plos One, 2021.

[R6] Shapeformer: Shapelet transformer for multivariate time series classification. KDD, 2024.

[R7] Tslanet: Rethinking transformers for time series representation learning. ICML, 2024.

[R8] Timemixer: decomposable multiscale mixing for time series forecasting. ICLR, 2024.

[R9] TimeXer: Empowering Transformers for Time Series Forecasting with Exogenous Variables. NeurIPS, 2024.

[R10] Towards a rigorous evaluation of time-series anomaly detection. AAAI, 2022.

[R11] Volume under the surface: a new accuracy evaluation measure for time-series anomaly detection. VLDB, 2022.

[R12] DCdetector: Dual Attention Contrastive Representation Learning for Time Series Anomaly Detection. KDD, 2023.
Comments, suggestions and typos: None

1.It is recommended that the authors add a dedicated section discussing the potential advantages and challenges of MERIT in practical applications, such as specific scenarios in finance, healthcare, or transportation. By incorporating case studies (e.g., the generation of augmented views for ECG data, as shown in Figure 6), the authors could further illustrate how semantic consistency is ensured and evaluate its practical value for downstream tasks.
2.It is recommended to include standard deviations or confidence intervals in Table 7 to highlight the stability of the results, particularly for datasets with lower performance (e.g., ERing). For forecasting and anomaly detection tasks, grouping the results based on time-series characteristics (such as periodicity and noise levels) would help clarify the method’s applicability and limitations. Additionally, a comparison of MERIT’s computational costs with non-LLM baselines (e.g., TS2Vec) would provide readers with valuable insights into the trade-offs of incorporating LLMs, helping them better assess the benefits and costs of this approach.
3.The paper contains several typographical errors, such as “inforamtion” (which should be “information” in Section 3). It is strongly recommended to conduct a thorough proofreading of the entire manuscript to ensure accuracy and professionalism.

1. In the stage of selecting the coarse candidate set, how is the similarity between time series computed? Is a pre-trained time series model used for this purpose?

2. How are time series features fed into the LLM? Is the raw data directly input?

3. Considering that LLMs generally exhibit limited semantic understanding of time series in zero-shot scenarios and that in this work, the designed agents are not explicitly fine-tuned for time series tasks, I still have some doubts about the effectiveness of the three agents, as they essentially rely on zero-shot semantic understanding of time series. Although the authors conduct ablation studies to validate the efficacy of each agent, I would like to raise a few questions:

(1) For the ablation experiment validating RET, could the authors consider replacing context retrieval with similarity sampling, i.e., selecting sequences similar to the current one as reference context? After all, the RET module is preceded by a coarse candidate set selection process.

(2) Could the authors present more details on the experimental setup for the ablation of AUG? For instance, comparing the augmentation strength of random perturbations versus the AUG agent's selected augmentations.

(3) For the ablation of REV, can the authors ensure that the number of positive samples remains consistent after removing REV, perhaps by randomly selecting sequences to replace the review process?
Overall assessment scores: 3

3.5

3.5
Metareview score: 3
Metareview: This paper proposes a novel multi-agent framework for time series representation learning, addressing the issue of random data augmentation in time-series data. This framework consists of a retrieval agent, augmentation agent, and a review agent. Experiments on several benchmarks validates its effectiveness.
Summary of reasons to publish: 1. This paper is well motivated and the written is easy to follow;
2. The proposed architecture is simple yet effective in multiple datasets;
3. An interesting exploration to address the time-series representation task using multi-agent framework;